Файловый менеджер - Редактировать - /home/gqdcvggs/go.imators.com/peerkinton-bot.tar
Назад
events/messageCreate.js 0000644 00000002436 15114741631 0011166 0 ustar 00 const claudeHandler = require('../handlers/claudeHandler.js'); module.exports = { name: 'messageCreate', async execute(message) { if (message.author.bot) return; const guildConfig = global.guildConfigs.get(message.guild.id); if (!guildConfig) return; if (guildConfig.securityEnabled && guildConfig.secureChannels && guildConfig.secureChannels.includes(message.channel.id)) { const isSpamOrInsult = await claudeHandler.checkMessageSecurity(message.content); if (isSpamOrInsult) { try { await message.delete(); await message.author.send(`⚠️ Ton message a été supprimé du serveur **${message.guild.name}** car il a été détecté comme spam ou contenu inapproprié.`); } catch (error) { console.log('Impossible de supprimer le message ou d\'envoyer le MP'); } return; } } if (guildConfig.conversationAnalysis && guildConfig.analysisChannels && guildConfig.analysisChannels.includes(message.channel.id)) { await claudeHandler.analyzeConversation(message); } }, }; events/.DS_Store 0000644 00000014004 15114741631 0007535 0 ustar 00 Bud1 � a g e C r e m e s s a g e C r e a t e . j sIlocblob � F������ r e a d y . j sIlocblob * F������ @ � @ � @ � @ E � DSDB ` @ � @ � @ events/ready.js 0000644 00000002067 15114741631 0007522 0 ustar 00 const { REST, Routes } = require('discord.js'); const fs = require('fs'); module.exports = { name: 'ready', once: true, async execute(client) { console.log(`Connecté en tant que ${client.user.tag}!`); const commands = []; const commandFiles = fs.readdirSync('./commands').filter(file => file.endsWith('.js')); for (const file of commandFiles) { const command = require(`../commands/${file}`); commands.push(command.data.toJSON()); } const rest = new REST({ version: '10' }).setToken(client.config.token); try { console.log('Début du rafraîchissement des commandes slash (/)...'); await rest.put( Routes.applicationCommands(client.config.clientId), { body: commands }, ); console.log('Commandes slash (/) rechargées avec succès!'); } catch (error) { console.error(error); } client.user.setActivity('Peerkinton Server', { type: 'WATCHING' }); }, }; deploy-commands.js 0000644 00000004112 15114741631 0010176 0 ustar 00 const { REST, Routes } = require('discord.js'); const fs = require('fs'); const config = require('./config.json'); const commands = []; const commandFiles = fs.readdirSync('./commands').filter(file => file.endsWith('.js')); for (const file of commandFiles) { const command = require(`./commands/${file}`); if (command.data && command.data.toJSON) { commands.push(command.data.toJSON()); console.log(`✅ Commande chargée: ${command.data.name}`); } else { console.log(`❌ Erreur avec la commande: ${file}`); } } const rest = new REST({ version: '10' }).setToken(config.token); (async () => { try { console.log(`🚀 Début du déploiement de ${commands.length} commandes slash...`); const data = await rest.put( Routes.applicationCommands(config.clientId), { body: commands }, ); console.log(`✅ ${data.length} commandes slash déployées avec succès!`); console.log('Commandes disponibles:'); data.forEach(cmd => { console.log(` - /${cmd.name}: ${cmd.description}`); }); console.log('\n🎉 Déploiement terminé! Tu peux maintenant lancer le bot avec: npm start'); } catch (error) { console.error('❌ Erreur lors du déploiement:'); if (error.code === 50001) { console.error('Erreur: Bot manque de permissions. Vérifie que ton bot a les bonnes permissions sur le serveur.'); } else if (error.code === 401) { console.error('Erreur: Token invalide. Vérifie ton token dans config.json'); } else if (error.status === 400) { console.error('Erreur: Client ID invalide ou problème avec les commandes'); } else { console.error(error); } console.log('\n🔧 Vérifications:'); console.log('1. Token bot correct dans config.json'); console.log('2. Client ID correct dans config.json'); console.log('3. Bot ajouté au serveur avec permissions applications.commands'); process.exit(1); } })(); package.json 0000644 00000000577 15114741631 0007046 0 ustar 00 { "name": "peerkinton-bot", "version": "1.0.0", "description": "Bot Discord pour Peerkinton", "main": "index.js", "scripts": { "start": "node index.js", "dev": "nodemon index.js" }, "dependencies": { "discord.js": "^14.14.1", "fs": "^0.0.1-security", "path": "^0.12.7", "axios": "^1.6.7" }, "devDependencies": { "nodemon": "^3.0.3" } } config.json 0000644 00000000645 15114741631 0006714 0 ustar 00 { "token": "MTM4OTE3MjI1MDA5NTI1NTY3Mw.Gife4q.iDLWKC9R0BJz6QRKOp_21AwMF5OoHAi63-mSbI", "clientId": "1389172250095255673", "guildId": "1386762016781373534", "claudeApiKey": "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", "prefix": "!", "colors": { "yellow": "#FFD700", "red": "#FF0000", "green": "#00FF00", "blue": "#0000FF" } } ecosystem.config.js 0000644 00000000766 15114741631 0010375 0 ustar 00 module.exports = { apps: [{ name: 'peerkinton-bot', script: 'index.js', instances: 1, autorestart: true, watch: false, max_memory_restart: '1G', restart_delay: 5000, max_restarts: 10, min_uptime: '10s', env: { NODE_ENV: 'production' }, error_file: './logs/err.log', out_file: './logs/out.log', log_file: './logs/combined.log', time: true }] }; package-lock.json 0000644 00000106462 15114741631 0007774 0 ustar 00 { "name": "peerkinton-bot", "version": "1.0.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "peerkinton-bot", "version": "1.0.0", "dependencies": { "axios": "^1.6.7", "discord.js": "^14.14.1", "fs": "^0.0.1-security", "path": "^0.12.7" }, "devDependencies": { "nodemon": "^3.0.3" } }, "node_modules/@discordjs/builders": { "version": "1.11.2", "resolved": "https://registry.npmjs.org/@discordjs/builders/-/builders-1.11.2.tgz", "integrity": "sha512-F1WTABdd8/R9D1icJzajC4IuLyyS8f3rTOz66JsSI3pKvpCAtsMBweu8cyNYsIyvcrKAVn9EPK+Psoymq+XC0A==", "license": "Apache-2.0", "dependencies": { "@discordjs/formatters": "^0.6.1", "@discordjs/util": "^1.1.1", "@sapphire/shapeshift": "^4.0.0", "discord-api-types": "^0.38.1", "fast-deep-equal": "^3.1.3", "ts-mixer": "^6.0.4", "tslib": "^2.6.3" }, "engines": { "node": ">=16.11.0" }, "funding": { "url": "https://github.com/discordjs/discord.js?sponsor" } }, "node_modules/@discordjs/collection": { "version": "1.5.3", "resolved": "https://registry.npmjs.org/@discordjs/collection/-/collection-1.5.3.tgz", "integrity": "sha512-SVb428OMd3WO1paV3rm6tSjM4wC+Kecaa1EUGX7vc6/fddvw/6lg90z4QtCqm21zvVe92vMMDt9+DkIvjXImQQ==", "license": "Apache-2.0", "engines": { "node": ">=16.11.0" } }, "node_modules/@discordjs/formatters": { "version": "0.6.1", "resolved": "https://registry.npmjs.org/@discordjs/formatters/-/formatters-0.6.1.tgz", "integrity": "sha512-5cnX+tASiPCqCWtFcFslxBVUaCetB0thvM/JyavhbXInP1HJIEU+Qv/zMrnuwSsX3yWH2lVXNJZeDK3EiP4HHg==", "license": "Apache-2.0", "dependencies": { "discord-api-types": "^0.38.1" }, "engines": { "node": ">=16.11.0" }, "funding": { "url": "https://github.com/discordjs/discord.js?sponsor" } }, "node_modules/@discordjs/rest": { "version": "2.5.1", "resolved": "https://registry.npmjs.org/@discordjs/rest/-/rest-2.5.1.tgz", "integrity": "sha512-Tg9840IneBcbrAjcGaQzHUJWFNq1MMWZjTdjJ0WS/89IffaNKc++iOvffucPxQTF/gviO9+9r8kEPea1X5J2Dw==", "license": "Apache-2.0", "dependencies": { "@discordjs/collection": "^2.1.1", "@discordjs/util": "^1.1.1", "@sapphire/async-queue": "^1.5.3", "@sapphire/snowflake": "^3.5.3", "@vladfrangu/async_event_emitter": "^2.4.6", "discord-api-types": "^0.38.1", "magic-bytes.js": "^1.10.0", "tslib": "^2.6.3", "undici": "6.21.3" }, "engines": { "node": ">=18" }, "funding": { "url": "https://github.com/discordjs/discord.js?sponsor" } }, "node_modules/@discordjs/rest/node_modules/@discordjs/collection": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/@discordjs/collection/-/collection-2.1.1.tgz", "integrity": "sha512-LiSusze9Tc7qF03sLCujF5iZp7K+vRNEDBZ86FT9aQAv3vxMLihUvKvpsCWiQ2DJq1tVckopKm1rxomgNUc9hg==", "license": "Apache-2.0", "engines": { "node": ">=18" }, "funding": { "url": "https://github.com/discordjs/discord.js?sponsor" } }, "node_modules/@discordjs/util": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/@discordjs/util/-/util-1.1.1.tgz", "integrity": "sha512-eddz6UnOBEB1oITPinyrB2Pttej49M9FZQY8NxgEvc3tq6ZICZ19m70RsmzRdDHk80O9NoYN/25AqJl8vPVf/g==", "license": "Apache-2.0", "engines": { "node": ">=18" }, "funding": { "url": "https://github.com/discordjs/discord.js?sponsor" } }, "node_modules/@discordjs/ws": { "version": "1.2.3", "resolved": "https://registry.npmjs.org/@discordjs/ws/-/ws-1.2.3.tgz", "integrity": "sha512-wPlQDxEmlDg5IxhJPuxXr3Vy9AjYq5xCvFWGJyD7w7Np8ZGu+Mc+97LCoEc/+AYCo2IDpKioiH0/c/mj5ZR9Uw==", "license": "Apache-2.0", "dependencies": { "@discordjs/collection": "^2.1.0", "@discordjs/rest": "^2.5.1", "@discordjs/util": "^1.1.0", "@sapphire/async-queue": "^1.5.2", "@types/ws": "^8.5.10", "@vladfrangu/async_event_emitter": "^2.2.4", "discord-api-types": "^0.38.1", "tslib": "^2.6.2", "ws": "^8.17.0" }, "engines": { "node": ">=16.11.0" }, "funding": { "url": "https://github.com/discordjs/discord.js?sponsor" } }, "node_modules/@discordjs/ws/node_modules/@discordjs/collection": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/@discordjs/collection/-/collection-2.1.1.tgz", "integrity": "sha512-LiSusze9Tc7qF03sLCujF5iZp7K+vRNEDBZ86FT9aQAv3vxMLihUvKvpsCWiQ2DJq1tVckopKm1rxomgNUc9hg==", "license": "Apache-2.0", "engines": { "node": ">=18" }, "funding": { "url": "https://github.com/discordjs/discord.js?sponsor" } }, "node_modules/@sapphire/async-queue": { "version": "1.5.5", "resolved": "https://registry.npmjs.org/@sapphire/async-queue/-/async-queue-1.5.5.tgz", "integrity": "sha512-cvGzxbba6sav2zZkH8GPf2oGk9yYoD5qrNWdu9fRehifgnFZJMV+nuy2nON2roRO4yQQ+v7MK/Pktl/HgfsUXg==", "license": "MIT", "engines": { "node": ">=v14.0.0", "npm": ">=7.0.0" } }, "node_modules/@sapphire/shapeshift": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/@sapphire/shapeshift/-/shapeshift-4.0.0.tgz", "integrity": "sha512-d9dUmWVA7MMiKobL3VpLF8P2aeanRTu6ypG2OIaEv/ZHH/SUQ2iHOVyi5wAPjQ+HmnMuL0whK9ez8I/raWbtIg==", "license": "MIT", "dependencies": { "fast-deep-equal": "^3.1.3", "lodash": "^4.17.21" }, "engines": { "node": ">=v16" } }, "node_modules/@sapphire/snowflake": { "version": "3.5.3", "resolved": "https://registry.npmjs.org/@sapphire/snowflake/-/snowflake-3.5.3.tgz", "integrity": "sha512-jjmJywLAFoWeBi1W7994zZyiNWPIiqRRNAmSERxyg93xRGzNYvGjlZ0gR6x0F4gPRi2+0O6S71kOZYyr3cxaIQ==", "license": "MIT", "engines": { "node": ">=v14.0.0", "npm": ">=7.0.0" } }, "node_modules/@types/node": { "version": "24.0.7", "resolved": "https://registry.npmjs.org/@types/node/-/node-24.0.7.tgz", "integrity": "sha512-YIEUUr4yf8q8oQoXPpSlnvKNVKDQlPMWrmOcgzoduo7kvA2UF0/BwJ/eMKFTiTtkNL17I0M6Xe2tvwFU7be6iw==", "license": "MIT", "dependencies": { "undici-types": "~7.8.0" } }, "node_modules/@types/ws": { "version": "8.18.1", "resolved": "https://registry.npmjs.org/@types/ws/-/ws-8.18.1.tgz", "integrity": "sha512-ThVF6DCVhA8kUGy+aazFQ4kXQ7E1Ty7A3ypFOe0IcJV8O/M511G99AW24irKrW56Wt44yG9+ij8FaqoBGkuBXg==", "license": "MIT", "dependencies": { "@types/node": "*" } }, "node_modules/@vladfrangu/async_event_emitter": { "version": "2.4.6", "resolved": "https://registry.npmjs.org/@vladfrangu/async_event_emitter/-/async_event_emitter-2.4.6.tgz", "integrity": "sha512-RaI5qZo6D2CVS6sTHFKg1v5Ohq/+Bo2LZ5gzUEwZ/WkHhwtGTCB/sVLw8ijOkAUxasZ+WshN/Rzj4ywsABJ5ZA==", "license": "MIT", "engines": { "node": ">=v14.0.0", "npm": ">=7.0.0" } }, "node_modules/anymatch": { "version": "3.1.3", "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.3.tgz", "integrity": "sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==", "dev": true, "license": "ISC", "dependencies": { "normalize-path": "^3.0.0", "picomatch": "^2.0.4" }, "engines": { "node": ">= 8" } }, "node_modules/asynckit": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==", "license": "MIT" }, "node_modules/axios": { "version": "1.10.0", "resolved": "https://registry.npmjs.org/axios/-/axios-1.10.0.tgz", "integrity": "sha512-/1xYAC4MP/HEG+3duIhFr4ZQXR4sQXOIe+o6sdqzeykGLx6Upp/1p8MHqhINOvGeP7xyNHe7tsiJByc4SSVUxw==", "license": "MIT", "dependencies": { "follow-redirects": "^1.15.6", "form-data": "^4.0.0", "proxy-from-env": "^1.1.0" } }, "node_modules/balanced-match": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", "dev": true, "license": "MIT" }, "node_modules/binary-extensions": { "version": "2.3.0", "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.3.0.tgz", "integrity": "sha512-Ceh+7ox5qe7LJuLHoY0feh3pHuUDHAcRUeyL2VYghZwfpkNIy/+8Ocg0a3UuSoYzavmylwuLWQOf3hl0jjMMIw==", "dev": true, "license": "MIT", "engines": { "node": ">=8" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/brace-expansion": { "version": "1.1.12", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.12.tgz", "integrity": "sha512-9T9UjW3r0UW5c1Q7GTwllptXwhvYmEzFhzMfZ9H7FQWt+uZePjZPjBP/W1ZEyZ1twGWom5/56TF4lPcqjnDHcg==", "dev": true, "license": "MIT", "dependencies": { "balanced-match": "^1.0.0", "concat-map": "0.0.1" } }, "node_modules/braces": { "version": "3.0.3", "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz", "integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==", "dev": true, "license": "MIT", "dependencies": { "fill-range": "^7.1.1" }, "engines": { "node": ">=8" } }, "node_modules/call-bind-apply-helpers": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/call-bind-apply-helpers/-/call-bind-apply-helpers-1.0.2.tgz", "integrity": "sha512-Sp1ablJ0ivDkSzjcaJdxEunN5/XvksFJ2sMBFfq6x0ryhQV/2b/KwFe21cMpmHtPOSij8K99/wSfoEuTObmuMQ==", "license": "MIT", "dependencies": { "es-errors": "^1.3.0", "function-bind": "^1.1.2" }, "engines": { "node": ">= 0.4" } }, "node_modules/chokidar": { "version": "3.6.0", "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.6.0.tgz", "integrity": "sha512-7VT13fmjotKpGipCW9JEQAusEPE+Ei8nl6/g4FBAmIm0GOOLMua9NDDo/DWp0ZAxCr3cPq5ZpBqmPAQgDda2Pw==", "dev": true, "license": "MIT", "dependencies": { "anymatch": "~3.1.2", "braces": "~3.0.2", "glob-parent": "~5.1.2", "is-binary-path": "~2.1.0", "is-glob": "~4.0.1", "normalize-path": "~3.0.0", "readdirp": "~3.6.0" }, "engines": { "node": ">= 8.10.0" }, "funding": { "url": "https://paulmillr.com/funding/" }, "optionalDependencies": { "fsevents": "~2.3.2" } }, "node_modules/combined-stream": { "version": "1.0.8", "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", "license": "MIT", "dependencies": { "delayed-stream": "~1.0.0" }, "engines": { "node": ">= 0.8" } }, "node_modules/concat-map": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", "dev": true, "license": "MIT" }, "node_modules/debug": { "version": "4.4.1", "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.1.tgz", "integrity": "sha512-KcKCqiftBJcZr++7ykoDIEwSa3XWowTfNPo92BYxjXiyYEVrUQh2aLyhxBCwww+heortUFxEJYcRzosstTEBYQ==", "dev": true, "license": "MIT", "dependencies": { "ms": "^2.1.3" }, "engines": { "node": ">=6.0" }, "peerDependenciesMeta": { "supports-color": { "optional": true } } }, "node_modules/delayed-stream": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", "integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==", "license": "MIT", "engines": { "node": ">=0.4.0" } }, "node_modules/discord-api-types": { "version": "0.38.13", "resolved": "https://registry.npmjs.org/discord-api-types/-/discord-api-types-0.38.13.tgz", "integrity": "sha512-FELWJRgLVQuR7Az8RhdEZE0k6QNjSW9PCUcU1iyP2Gke8HrJmnMceSS9pD93UM64s3tvZzJPajpPLjWZJylf4g==", "license": "MIT", "workspaces": [ "scripts/actions/documentation" ] }, "node_modules/discord.js": { "version": "14.21.0", "resolved": "https://registry.npmjs.org/discord.js/-/discord.js-14.21.0.tgz", "integrity": "sha512-U5w41cEmcnSfwKYlLv5RJjB8Joa+QJyRwIJz5i/eg+v2Qvv6EYpCRhN9I2Rlf0900LuqSDg8edakUATrDZQncQ==", "license": "Apache-2.0", "dependencies": { "@discordjs/builders": "^1.11.2", "@discordjs/collection": "1.5.3", "@discordjs/formatters": "^0.6.1", "@discordjs/rest": "^2.5.1", "@discordjs/util": "^1.1.1", "@discordjs/ws": "^1.2.3", "@sapphire/snowflake": "3.5.3", "discord-api-types": "^0.38.1", "fast-deep-equal": "3.1.3", "lodash.snakecase": "4.1.1", "magic-bytes.js": "^1.10.0", "tslib": "^2.6.3", "undici": "6.21.3" }, "engines": { "node": ">=18" }, "funding": { "url": "https://github.com/discordjs/discord.js?sponsor" } }, "node_modules/dunder-proto": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/dunder-proto/-/dunder-proto-1.0.1.tgz", "integrity": "sha512-KIN/nDJBQRcXw0MLVhZE9iQHmG68qAVIBg9CqmUYjmQIhgij9U5MFvrqkUL5FbtyyzZuOeOt0zdeRe4UY7ct+A==", "license": "MIT", "dependencies": { "call-bind-apply-helpers": "^1.0.1", "es-errors": "^1.3.0", "gopd": "^1.2.0" }, "engines": { "node": ">= 0.4" } }, "node_modules/es-define-property": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.1.tgz", "integrity": "sha512-e3nRfgfUZ4rNGL232gUgX06QNyyez04KdjFrF+LTRoOXmrOgFKDg4BCdsjW8EnT69eqdYGmRpJwiPVYNrCaW3g==", "license": "MIT", "engines": { "node": ">= 0.4" } }, "node_modules/es-errors": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/es-errors/-/es-errors-1.3.0.tgz", "integrity": "sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==", "license": "MIT", "engines": { "node": ">= 0.4" } }, "node_modules/es-object-atoms": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/es-object-atoms/-/es-object-atoms-1.1.1.tgz", "integrity": "sha512-FGgH2h8zKNim9ljj7dankFPcICIK9Cp5bm+c2gQSYePhpaG5+esrLODihIorn+Pe6FGJzWhXQotPv73jTaldXA==", "license": "MIT", "dependencies": { "es-errors": "^1.3.0" }, "engines": { "node": ">= 0.4" } }, "node_modules/es-set-tostringtag": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/es-set-tostringtag/-/es-set-tostringtag-2.1.0.tgz", "integrity": "sha512-j6vWzfrGVfyXxge+O0x5sh6cvxAog0a/4Rdd2K36zCMV5eJ+/+tOAngRO8cODMNWbVRdVlmGZQL2YS3yR8bIUA==", "license": "MIT", "dependencies": { "es-errors": "^1.3.0", "get-intrinsic": "^1.2.6", "has-tostringtag": "^1.0.2", "hasown": "^2.0.2" }, "engines": { "node": ">= 0.4" } }, "node_modules/fast-deep-equal": { "version": "3.1.3", "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", "license": "MIT" }, "node_modules/fill-range": { "version": "7.1.1", "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz", "integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==", "dev": true, "license": "MIT", "dependencies": { "to-regex-range": "^5.0.1" }, "engines": { "node": ">=8" } }, "node_modules/follow-redirects": { "version": "1.15.9", "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.9.tgz", "integrity": "sha512-gew4GsXizNgdoRyqmyfMHyAmXsZDk6mHkSxZFCzW9gwlbtOW44CDtYavM+y+72qD/Vq2l550kMF52DT8fOLJqQ==", "funding": [ { "type": "individual", "url": "https://github.com/sponsors/RubenVerborgh" } ], "license": "MIT", "engines": { "node": ">=4.0" }, "peerDependenciesMeta": { "debug": { "optional": true } } }, "node_modules/form-data": { "version": "4.0.3", "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.3.tgz", "integrity": "sha512-qsITQPfmvMOSAdeyZ+12I1c+CKSstAFAwu+97zrnWAbIr5u8wfsExUzCesVLC8NgHuRUqNN4Zy6UPWUTRGslcA==", "license": "MIT", "dependencies": { "asynckit": "^0.4.0", "combined-stream": "^1.0.8", "es-set-tostringtag": "^2.1.0", "hasown": "^2.0.2", "mime-types": "^2.1.12" }, "engines": { "node": ">= 6" } }, "node_modules/fs": { "version": "0.0.1-security", "resolved": "https://registry.npmjs.org/fs/-/fs-0.0.1-security.tgz", "integrity": "sha512-3XY9e1pP0CVEUCdj5BmfIZxRBTSDycnbqhIOGec9QYtmVH2fbLpj86CFWkrNOkt/Fvty4KZG5lTglL9j/gJ87w==", "license": "ISC" }, "node_modules/fsevents": { "version": "2.3.3", "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==", "dev": true, "hasInstallScript": true, "license": "MIT", "optional": true, "os": [ "darwin" ], "engines": { "node": "^8.16.0 || ^10.6.0 || >=11.0.0" } }, "node_modules/function-bind": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==", "license": "MIT", "funding": { "url": "https://github.com/sponsors/ljharb" } }, "node_modules/get-intrinsic": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.3.0.tgz", "integrity": "sha512-9fSjSaos/fRIVIp+xSJlE6lfwhES7LNtKaCBIamHsjr2na1BiABJPo0mOjjz8GJDURarmCPGqaiVg5mfjb98CQ==", "license": "MIT", "dependencies": { "call-bind-apply-helpers": "^1.0.2", "es-define-property": "^1.0.1", "es-errors": "^1.3.0", "es-object-atoms": "^1.1.1", "function-bind": "^1.1.2", "get-proto": "^1.0.1", "gopd": "^1.2.0", "has-symbols": "^1.1.0", "hasown": "^2.0.2", "math-intrinsics": "^1.1.0" }, "engines": { "node": ">= 0.4" }, "funding": { "url": "https://github.com/sponsors/ljharb" } }, "node_modules/get-proto": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/get-proto/-/get-proto-1.0.1.tgz", "integrity": "sha512-sTSfBjoXBp89JvIKIefqw7U2CCebsc74kiY6awiGogKtoSGbgjYE/G/+l9sF3MWFPNc9IcoOC4ODfKHfxFmp0g==", "license": "MIT", "dependencies": { "dunder-proto": "^1.0.1", "es-object-atoms": "^1.0.0" }, "engines": { "node": ">= 0.4" } }, "node_modules/glob-parent": { "version": "5.1.2", "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", "dev": true, "license": "ISC", "dependencies": { "is-glob": "^4.0.1" }, "engines": { "node": ">= 6" } }, "node_modules/gopd": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.2.0.tgz", "integrity": "sha512-ZUKRh6/kUFoAiTAtTYPZJ3hw9wNxx+BIBOijnlG9PnrJsCcSjs1wyyD6vJpaYtgnzDrKYRSqf3OO6Rfa93xsRg==", "license": "MIT", "engines": { "node": ">= 0.4" }, "funding": { "url": "https://github.com/sponsors/ljharb" } }, "node_modules/has-flag": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==", "dev": true, "license": "MIT", "engines": { "node": ">=4" } }, "node_modules/has-symbols": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.1.0.tgz", "integrity": "sha512-1cDNdwJ2Jaohmb3sg4OmKaMBwuC48sYni5HUw2DvsC8LjGTLK9h+eb1X6RyuOHe4hT0ULCW68iomhjUoKUqlPQ==", "license": "MIT", "engines": { "node": ">= 0.4" }, "funding": { "url": "https://github.com/sponsors/ljharb" } }, "node_modules/has-tostringtag": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/has-tostringtag/-/has-tostringtag-1.0.2.tgz", "integrity": "sha512-NqADB8VjPFLM2V0VvHUewwwsw0ZWBaIdgo+ieHtK3hasLz4qeCRjYcqfB6AQrBggRKppKF8L52/VqdVsO47Dlw==", "license": "MIT", "dependencies": { "has-symbols": "^1.0.3" }, "engines": { "node": ">= 0.4" }, "funding": { "url": "https://github.com/sponsors/ljharb" } }, "node_modules/hasown": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz", "integrity": "sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==", "license": "MIT", "dependencies": { "function-bind": "^1.1.2" }, "engines": { "node": ">= 0.4" } }, "node_modules/ignore-by-default": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/ignore-by-default/-/ignore-by-default-1.0.1.tgz", "integrity": "sha512-Ius2VYcGNk7T90CppJqcIkS5ooHUZyIQK+ClZfMfMNFEF9VSE73Fq+906u/CWu92x4gzZMWOwfFYckPObzdEbA==", "dev": true, "license": "ISC" }, "node_modules/inherits": { "version": "2.0.3", "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", "integrity": "sha512-x00IRNXNy63jwGkJmzPigoySHbaqpNuzKbBOmzK+g2OdZpQ9w+sxCN+VSB3ja7IAge2OP2qpfxTjeNcyjmW1uw==", "license": "ISC" }, "node_modules/is-binary-path": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", "dev": true, "license": "MIT", "dependencies": { "binary-extensions": "^2.0.0" }, "engines": { "node": ">=8" } }, "node_modules/is-extglob": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", "dev": true, "license": "MIT", "engines": { "node": ">=0.10.0" } }, "node_modules/is-glob": { "version": "4.0.3", "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", "dev": true, "license": "MIT", "dependencies": { "is-extglob": "^2.1.1" }, "engines": { "node": ">=0.10.0" } }, "node_modules/is-number": { "version": "7.0.0", "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", "dev": true, "license": "MIT", "engines": { "node": ">=0.12.0" } }, "node_modules/lodash": { "version": "4.17.21", "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==", "license": "MIT" }, "node_modules/lodash.snakecase": { "version": "4.1.1", "resolved": "https://registry.npmjs.org/lodash.snakecase/-/lodash.snakecase-4.1.1.tgz", "integrity": "sha512-QZ1d4xoBHYUeuouhEq3lk3Uq7ldgyFXGBhg04+oRLnIz8o9T65Eh+8YdroUwn846zchkA9yDsDl5CVVaV2nqYw==", "license": "MIT" }, "node_modules/magic-bytes.js": { "version": "1.12.1", "resolved": "https://registry.npmjs.org/magic-bytes.js/-/magic-bytes.js-1.12.1.tgz", "integrity": "sha512-ThQLOhN86ZkJ7qemtVRGYM+gRgR8GEXNli9H/PMvpnZsE44Xfh3wx9kGJaldg314v85m+bFW6WBMaVHJc/c3zA==", "license": "MIT" }, "node_modules/math-intrinsics": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/math-intrinsics/-/math-intrinsics-1.1.0.tgz", "integrity": "sha512-/IXtbwEk5HTPyEwyKX6hGkYXxM9nbj64B+ilVJnC/R6B0pH5G4V3b0pVbL7DBj4tkhBAppbQUlf6F6Xl9LHu1g==", "license": "MIT", "engines": { "node": ">= 0.4" } }, "node_modules/mime-db": { "version": "1.52.0", "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==", "license": "MIT", "engines": { "node": ">= 0.6" } }, "node_modules/mime-types": { "version": "2.1.35", "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", "license": "MIT", "dependencies": { "mime-db": "1.52.0" }, "engines": { "node": ">= 0.6" } }, "node_modules/minimatch": { "version": "3.1.2", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", "dev": true, "license": "ISC", "dependencies": { "brace-expansion": "^1.1.7" }, "engines": { "node": "*" } }, "node_modules/ms": { "version": "2.1.3", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", "dev": true, "license": "MIT" }, "node_modules/nodemon": { "version": "3.1.10", "resolved": "https://registry.npmjs.org/nodemon/-/nodemon-3.1.10.tgz", "integrity": "sha512-WDjw3pJ0/0jMFmyNDp3gvY2YizjLmmOUQo6DEBY+JgdvW/yQ9mEeSw6H5ythl5Ny2ytb7f9C2nIbjSxMNzbJXw==", "dev": true, "license": "MIT", "dependencies": { "chokidar": "^3.5.2", "debug": "^4", "ignore-by-default": "^1.0.1", "minimatch": "^3.1.2", "pstree.remy": "^1.1.8", "semver": "^7.5.3", "simple-update-notifier": "^2.0.0", "supports-color": "^5.5.0", "touch": "^3.1.0", "undefsafe": "^2.0.5" }, "bin": { "nodemon": "bin/nodemon.js" }, "engines": { "node": ">=10" }, "funding": { "type": "opencollective", "url": "https://opencollective.com/nodemon" } }, "node_modules/normalize-path": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", "dev": true, "license": "MIT", "engines": { "node": ">=0.10.0" } }, "node_modules/path": { "version": "0.12.7", "resolved": "https://registry.npmjs.org/path/-/path-0.12.7.tgz", "integrity": "sha512-aXXC6s+1w7otVF9UletFkFcDsJeO7lSZBPUQhtb5O0xJe8LtYhj/GxldoL09bBj9+ZmE2hNoHqQSFMN5fikh4Q==", "license": "MIT", "dependencies": { "process": "^0.11.1", "util": "^0.10.3" } }, "node_modules/picomatch": { "version": "2.3.1", "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", "dev": true, "license": "MIT", "engines": { "node": ">=8.6" }, "funding": { "url": "https://github.com/sponsors/jonschlinkert" } }, "node_modules/process": { "version": "0.11.10", "resolved": "https://registry.npmjs.org/process/-/process-0.11.10.tgz", "integrity": "sha512-cdGef/drWFoydD1JsMzuFf8100nZl+GT+yacc2bEced5f9Rjk4z+WtFUTBu9PhOi9j/jfmBPu0mMEY4wIdAF8A==", "license": "MIT", "engines": { "node": ">= 0.6.0" } }, "node_modules/proxy-from-env": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-1.1.0.tgz", "integrity": "sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==", "license": "MIT" }, "node_modules/pstree.remy": { "version": "1.1.8", "resolved": "https://registry.npmjs.org/pstree.remy/-/pstree.remy-1.1.8.tgz", "integrity": "sha512-77DZwxQmxKnu3aR542U+X8FypNzbfJ+C5XQDk3uWjWxn6151aIMGthWYRXTqT1E5oJvg+ljaa2OJi+VfvCOQ8w==", "dev": true, "license": "MIT" }, "node_modules/readdirp": { "version": "3.6.0", "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==", "dev": true, "license": "MIT", "dependencies": { "picomatch": "^2.2.1" }, "engines": { "node": ">=8.10.0" } }, "node_modules/semver": { "version": "7.7.2", "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.2.tgz", "integrity": "sha512-RF0Fw+rO5AMf9MAyaRXI4AV0Ulj5lMHqVxxdSgiVbixSCXoEmmX/jk0CuJw4+3SqroYO9VoUh+HcuJivvtJemA==", "dev": true, "license": "ISC", "bin": { "semver": "bin/semver.js" }, "engines": { "node": ">=10" } }, "node_modules/simple-update-notifier": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/simple-update-notifier/-/simple-update-notifier-2.0.0.tgz", "integrity": "sha512-a2B9Y0KlNXl9u/vsW6sTIu9vGEpfKu2wRV6l1H3XEas/0gUIzGzBoP/IouTcUQbm9JWZLH3COxyn03TYlFax6w==", "dev": true, "license": "MIT", "dependencies": { "semver": "^7.5.3" }, "engines": { "node": ">=10" } }, "node_modules/supports-color": { "version": "5.5.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", "dev": true, "license": "MIT", "dependencies": { "has-flag": "^3.0.0" }, "engines": { "node": ">=4" } }, "node_modules/to-regex-range": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", "dev": true, "license": "MIT", "dependencies": { "is-number": "^7.0.0" }, "engines": { "node": ">=8.0" } }, "node_modules/touch": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/touch/-/touch-3.1.1.tgz", "integrity": "sha512-r0eojU4bI8MnHr8c5bNo7lJDdI2qXlWWJk6a9EAFG7vbhTjElYhBVS3/miuE0uOuoLdb8Mc/rVfsmm6eo5o9GA==", "dev": true, "license": "ISC", "bin": { "nodetouch": "bin/nodetouch.js" } }, "node_modules/ts-mixer": { "version": "6.0.4", "resolved": "https://registry.npmjs.org/ts-mixer/-/ts-mixer-6.0.4.tgz", "integrity": "sha512-ufKpbmrugz5Aou4wcr5Wc1UUFWOLhq+Fm6qa6P0w0K5Qw2yhaUoiWszhCVuNQyNwrlGiscHOmqYoAox1PtvgjA==", "license": "MIT" }, "node_modules/tslib": { "version": "2.8.1", "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==", "license": "0BSD" }, "node_modules/undefsafe": { "version": "2.0.5", "resolved": "https://registry.npmjs.org/undefsafe/-/undefsafe-2.0.5.tgz", "integrity": "sha512-WxONCrssBM8TSPRqN5EmsjVrsv4A8X12J4ArBiiayv3DyyG3ZlIg6yysuuSYdZsVz3TKcTg2fd//Ujd4CHV1iA==", "dev": true, "license": "MIT" }, "node_modules/undici": { "version": "6.21.3", "resolved": "https://registry.npmjs.org/undici/-/undici-6.21.3.tgz", "integrity": "sha512-gBLkYIlEnSp8pFbT64yFgGE6UIB9tAkhukC23PmMDCe5Nd+cRqKxSjw5y54MK2AZMgZfJWMaNE4nYUHgi1XEOw==", "license": "MIT", "engines": { "node": ">=18.17" } }, "node_modules/undici-types": { "version": "7.8.0", "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-7.8.0.tgz", "integrity": "sha512-9UJ2xGDvQ43tYyVMpuHlsgApydB8ZKfVYTsLDhXkFL/6gfkp+U8xTGdh8pMJv1SpZna0zxG1DwsKZsreLbXBxw==", "license": "MIT" }, "node_modules/util": { "version": "0.10.4", "resolved": "https://registry.npmjs.org/util/-/util-0.10.4.tgz", "integrity": "sha512-0Pm9hTQ3se5ll1XihRic3FDIku70C+iHUdT/W926rSgHV5QgXsYbKZN8MSC3tJtSkhuROzvsQjAaFENRXr+19A==", "license": "MIT", "dependencies": { "inherits": "2.0.3" } }, "node_modules/ws": { "version": "8.18.3", "resolved": "https://registry.npmjs.org/ws/-/ws-8.18.3.tgz", "integrity": "sha512-PEIGCY5tSlUt50cqyMXfCzX+oOPqN0vuGqWzbcJ2xvnkzkq46oOpz7dQaTDBdfICb4N14+GARUDw2XV2N4tvzg==", "license": "MIT", "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 } } } } } logs/out-0.log 0000664 00000001454 15114741631 0007170 0 ustar 00 2025-07-01T14:32:36: Connecté en tant que Peerkinton#4655! 2025-07-01T14:32:36: Début du rafraîchissement des commandes slash (/)... 2025-07-01T14:32:36: Commandes slash (/) rechargées avec succès! 2025-07-01T19:29:33: Connecté en tant que Peerkinton#4655! 2025-07-01T19:29:41: Début du rafraîchissement des commandes slash (/)... 2025-07-01T19:29:41: Commandes slash (/) rechargées avec succès! 2025-07-01T21:35:11: Connecté en tant que Peerkinton#4655! 2025-07-01T21:35:11: Début du rafraîchissement des commandes slash (/)... 2025-07-01T21:35:11: Commandes slash (/) rechargées avec succès! 2025-07-01T21:38:33: Connecté en tant que Peerkinton#4655! 2025-07-01T21:38:33: Début du rafraîchissement des commandes slash (/)... 2025-07-01T21:38:33: Commandes slash (/) rechargées avec succès! logs/combined-0.log 0000664 00000013213 15114741631 0010135 0 ustar 00 2025-07-01T14:32:36: Connecté en tant que Peerkinton#4655! 2025-07-01T14:32:36: Début du rafraîchissement des commandes slash (/)... 2025-07-01T14:32:36: Commandes slash (/) rechargées avec succès! 2025-07-01T14:32:45: (node:335955) Warning: Supplying "ephemeral" for interaction response options is deprecated. Utilize flags instead. (Use `node --trace-warnings ...` to show where the warning was created) 2025-07-01T19:28:50: DiscordAPIError[10062]: Unknown interaction at handleErrors (/home/gqdcvggs/imators.systems/peerkinton-bot/node_modules/@discordjs/rest/dist/index.js:748:13) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) at async BurstHandler.runRequest (/home/gqdcvggs/imators.systems/peerkinton-bot/node_modules/@discordjs/rest/dist/index.js:852:23) at async _REST.request (/home/gqdcvggs/imators.systems/peerkinton-bot/node_modules/@discordjs/rest/dist/index.js:1293:22) at async ChatInputCommandInteraction.reply (/home/gqdcvggs/imators.systems/peerkinton-bot/node_modules/discord.js/src/structures/interfaces/InteractionResponses.js:200:22) at async Object.execute (/home/gqdcvggs/imators.systems/peerkinton-bot/commands/config.js:164:17) at async Client.<anonymous> (/home/gqdcvggs/imators.systems/peerkinton-bot/index.js:43:9) { requestBody: { files: [], json: { type: 4, data: [Object] } }, rawError: { message: 'Unknown interaction', code: 10062 }, code: 10062, status: 404, method: 'POST', url: 'https://discord.com/api/v10/interactions/1389689358189203456/aW50ZXJhY3Rpb246MTM4OTY4OTM1ODE4OTIwMzQ1NjpBMnRLcFZWczF4M01lcW9QQlJzWkZtYjBMRHJ6MzFQRDZ0T0JjaFloODM3bjU3TFJ1NlJxWFFsNnRKd01adVJwallxNmZXRFRJNElJVmF0bldDNlRuSTZqM1NsZXhLZEgzYWR1emQ5T00yU0NCdllTM2g0UjhtcFVpdFFwVHI2QQ/callback?with_response=false' } DiscordAPIError[10062]: Unknown interaction at handleErrors (/home/gqdcvggs/imators.systems/peerkinton-bot/node_modules/@discordjs/rest/dist/index.js:748:13) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) at async BurstHandler.runRequest (/home/gqdcvggs/imators.systems/peerkinton-bot/node_modules/@discordjs/rest/dist/index.js:852:23) at async _REST.request (/home/gqdcvggs/imators.systems/peerkinton-bot/node_modules/@discordjs/rest/dist/index.js:1293:22) at async ChatInputCommandInteraction.reply (/home/gqdcvggs/imators.systems/peerkinton-bot/node_modules/discord.js/src/structures/interfaces/InteractionResponses.js:200:22) at async Client.<anonymous> (/home/gqdcvggs/imators.systems/peerkinton-bot/index.js:50:13) 2025-07-01T19:29:33: Connecté en tant que Peerkinton#4655! 2025-07-01T19:29:41: Début du rafraîchissement des commandes slash (/)... 2025-07-01T19:29:41: Commandes slash (/) rechargées avec succès! 2025-07-01T21:34:49: (node:643702) Warning: Supplying "ephemeral" for interaction response options is deprecated. Utilize flags instead. (Use `node --trace-warnings ...` to show where the warning was created) 2025-07-01T21:34:53: DiscordAPIError[10062]: Unknown interaction at handleErrors (/home/gqdcvggs/imators.systems/peerkinton-bot/node_modules/@discordjs/rest/dist/index.js:748:13) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) at async BurstHandler.runRequest (/home/gqdcvggs/imators.systems/peerkinton-bot/node_modules/@discordjs/rest/dist/index.js:852:23) at async _REST.request (/home/gqdcvggs/imators.systems/peerkinton-bot/node_modules/@discordjs/rest/dist/index.js:1293:22) at async ChatInputCommandInteraction.reply (/home/gqdcvggs/imators.systems/peerkinton-bot/node_modules/discord.js/src/structures/interfaces/InteractionResponses.js:200:22) at async Object.execute (/home/gqdcvggs/imators.systems/peerkinton-bot/commands/config.js:164:17) at async Client.<anonymous> (/home/gqdcvggs/imators.systems/peerkinton-bot/index.js:43:9) { requestBody: { files: [], json: { type: 4, data: [Object] } }, rawError: { message: 'Unknown interaction', code: 10062 }, code: 10062, status: 404, method: 'POST', url: 'https://discord.com/api/v10/interactions/1389721120877318246/aW50ZXJhY3Rpb246MTM4OTcyMTEyMDg3NzMxODI0NjpRMW1hU2toWWJabFBBQVZYNE8zMkRDNzVFY3BwZ2dWV3RZM3Njejd6ZUczWlpISnB1NW1ZOWxVU1VIdnZZOFhhZTlBMFFXRHNBVzNsWGVPS0dMRHdwQUxnQmk4bjdoQnIxMFBpMGtGVXZQSFRIaHRmdHVpZUlBQzROdE1pb1ZSSw/callback?with_response=false' } DiscordAPIError[10062]: Unknown interaction at handleErrors (/home/gqdcvggs/imators.systems/peerkinton-bot/node_modules/@discordjs/rest/dist/index.js:748:13) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) at async BurstHandler.runRequest (/home/gqdcvggs/imators.systems/peerkinton-bot/node_modules/@discordjs/rest/dist/index.js:852:23) at async _REST.request (/home/gqdcvggs/imators.systems/peerkinton-bot/node_modules/@discordjs/rest/dist/index.js:1293:22) at async ChatInputCommandInteraction.reply (/home/gqdcvggs/imators.systems/peerkinton-bot/node_modules/discord.js/src/structures/interfaces/InteractionResponses.js:200:22) at async Client.<anonymous> (/home/gqdcvggs/imators.systems/peerkinton-bot/index.js:50:13) 2025-07-01T21:35:11: Connecté en tant que Peerkinton#4655! 2025-07-01T21:35:11: Début du rafraîchissement des commandes slash (/)... 2025-07-01T21:35:11: Commandes slash (/) rechargées avec succès! 2025-07-01T21:38:33: Connecté en tant que Peerkinton#4655! 2025-07-01T21:38:33: Début du rafraîchissement des commandes slash (/)... 2025-07-01T21:38:33: Commandes slash (/) rechargées avec succès! 2025-07-01T21:38:39: (node:767292) Warning: Supplying "ephemeral" for interaction response options is deprecated. Utilize flags instead. (Use `node --trace-warnings ...` to show where the warning was created) logs/err-0.log 0000664 00000011537 15114741631 0007154 0 ustar 00 2025-07-01T14:32:45: (node:335955) Warning: Supplying "ephemeral" for interaction response options is deprecated. Utilize flags instead. (Use `node --trace-warnings ...` to show where the warning was created) 2025-07-01T19:28:50: DiscordAPIError[10062]: Unknown interaction at handleErrors (/home/gqdcvggs/imators.systems/peerkinton-bot/node_modules/@discordjs/rest/dist/index.js:748:13) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) at async BurstHandler.runRequest (/home/gqdcvggs/imators.systems/peerkinton-bot/node_modules/@discordjs/rest/dist/index.js:852:23) at async _REST.request (/home/gqdcvggs/imators.systems/peerkinton-bot/node_modules/@discordjs/rest/dist/index.js:1293:22) at async ChatInputCommandInteraction.reply (/home/gqdcvggs/imators.systems/peerkinton-bot/node_modules/discord.js/src/structures/interfaces/InteractionResponses.js:200:22) at async Object.execute (/home/gqdcvggs/imators.systems/peerkinton-bot/commands/config.js:164:17) at async Client.<anonymous> (/home/gqdcvggs/imators.systems/peerkinton-bot/index.js:43:9) { requestBody: { files: [], json: { type: 4, data: [Object] } }, rawError: { message: 'Unknown interaction', code: 10062 }, code: 10062, status: 404, method: 'POST', url: 'https://discord.com/api/v10/interactions/1389689358189203456/aW50ZXJhY3Rpb246MTM4OTY4OTM1ODE4OTIwMzQ1NjpBMnRLcFZWczF4M01lcW9QQlJzWkZtYjBMRHJ6MzFQRDZ0T0JjaFloODM3bjU3TFJ1NlJxWFFsNnRKd01adVJwallxNmZXRFRJNElJVmF0bldDNlRuSTZqM1NsZXhLZEgzYWR1emQ5T00yU0NCdllTM2g0UjhtcFVpdFFwVHI2QQ/callback?with_response=false' } DiscordAPIError[10062]: Unknown interaction at handleErrors (/home/gqdcvggs/imators.systems/peerkinton-bot/node_modules/@discordjs/rest/dist/index.js:748:13) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) at async BurstHandler.runRequest (/home/gqdcvggs/imators.systems/peerkinton-bot/node_modules/@discordjs/rest/dist/index.js:852:23) at async _REST.request (/home/gqdcvggs/imators.systems/peerkinton-bot/node_modules/@discordjs/rest/dist/index.js:1293:22) at async ChatInputCommandInteraction.reply (/home/gqdcvggs/imators.systems/peerkinton-bot/node_modules/discord.js/src/structures/interfaces/InteractionResponses.js:200:22) at async Client.<anonymous> (/home/gqdcvggs/imators.systems/peerkinton-bot/index.js:50:13) 2025-07-01T21:34:49: (node:643702) Warning: Supplying "ephemeral" for interaction response options is deprecated. Utilize flags instead. (Use `node --trace-warnings ...` to show where the warning was created) 2025-07-01T21:34:53: DiscordAPIError[10062]: Unknown interaction at handleErrors (/home/gqdcvggs/imators.systems/peerkinton-bot/node_modules/@discordjs/rest/dist/index.js:748:13) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) at async BurstHandler.runRequest (/home/gqdcvggs/imators.systems/peerkinton-bot/node_modules/@discordjs/rest/dist/index.js:852:23) at async _REST.request (/home/gqdcvggs/imators.systems/peerkinton-bot/node_modules/@discordjs/rest/dist/index.js:1293:22) at async ChatInputCommandInteraction.reply (/home/gqdcvggs/imators.systems/peerkinton-bot/node_modules/discord.js/src/structures/interfaces/InteractionResponses.js:200:22) at async Object.execute (/home/gqdcvggs/imators.systems/peerkinton-bot/commands/config.js:164:17) at async Client.<anonymous> (/home/gqdcvggs/imators.systems/peerkinton-bot/index.js:43:9) { requestBody: { files: [], json: { type: 4, data: [Object] } }, rawError: { message: 'Unknown interaction', code: 10062 }, code: 10062, status: 404, method: 'POST', url: 'https://discord.com/api/v10/interactions/1389721120877318246/aW50ZXJhY3Rpb246MTM4OTcyMTEyMDg3NzMxODI0NjpRMW1hU2toWWJabFBBQVZYNE8zMkRDNzVFY3BwZ2dWV3RZM3Njejd6ZUczWlpISnB1NW1ZOWxVU1VIdnZZOFhhZTlBMFFXRHNBVzNsWGVPS0dMRHdwQUxnQmk4bjdoQnIxMFBpMGtGVXZQSFRIaHRmdHVpZUlBQzROdE1pb1ZSSw/callback?with_response=false' } DiscordAPIError[10062]: Unknown interaction at handleErrors (/home/gqdcvggs/imators.systems/peerkinton-bot/node_modules/@discordjs/rest/dist/index.js:748:13) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) at async BurstHandler.runRequest (/home/gqdcvggs/imators.systems/peerkinton-bot/node_modules/@discordjs/rest/dist/index.js:852:23) at async _REST.request (/home/gqdcvggs/imators.systems/peerkinton-bot/node_modules/@discordjs/rest/dist/index.js:1293:22) at async ChatInputCommandInteraction.reply (/home/gqdcvggs/imators.systems/peerkinton-bot/node_modules/discord.js/src/structures/interfaces/InteractionResponses.js:200:22) at async Client.<anonymous> (/home/gqdcvggs/imators.systems/peerkinton-bot/index.js:50:13) 2025-07-01T21:38:39: (node:767292) Warning: Supplying "ephemeral" for interaction response options is deprecated. Utilize flags instead. (Use `node --trace-warnings ...` to show where the warning was created) handlers/claudeHandler.js 0000644 00000011523 15114741631 0011442 0 ustar 00 const axios = require('axios'); const config = require('../config.json'); const conversationBuffers = new Map(); const CONVERSATION_TIMEOUT = 300000; class ClaudeHandler { static async makeClaudeRequest(prompt) { try { const response = await axios.post('https://api.anthropic.com/v1/messages', { model: 'claude-3-sonnet-20240229', max_tokens: 1000, messages: [ { role: 'user', content: prompt } ] }, { headers: { 'Content-Type': 'application/json', 'x-api-key': config.claudeApiKey, 'anthropic-version': '2023-06-01' } }); return response.data.content[0].text; } catch (error) { console.error('Erreur Claude API:', error.response?.data || error.message); return null; } } static async checkMessageSecurity(messageContent) { const prompt = `Analyse ce message Discord et détermine s'il contient du spam, des insultes, du contenu offensant ou inapproprié. Réponds uniquement par "OUI" si c'est inapproprié ou "NON" si c'est acceptable. Message à analyser: "${messageContent}" Réponds seulement OUI ou NON:`; const response = await this.makeClaudeRequest(prompt); if (!response) return false; return response.trim().toUpperCase() === 'OUI'; } static async analyzeConversation(message) { const channelId = message.channel.id; if (!conversationBuffers.has(channelId)) { conversationBuffers.set(channelId, { messages: [], lastActivity: Date.now(), timeout: null }); } const buffer = conversationBuffers.get(channelId); buffer.messages.push({ author: message.author.username, content: message.content, timestamp: message.createdTimestamp }); buffer.lastActivity = Date.now(); if (buffer.timeout) { clearTimeout(buffer.timeout); } buffer.timeout = setTimeout(async () => { await this.processConversationEnd(message.channel, buffer.messages); conversationBuffers.delete(channelId); }, CONVERSATION_TIMEOUT); if (buffer.messages.length >= 10) { const shouldDelete = await this.shouldDeleteMessages(buffer.messages); if (shouldDelete) { try { const messagesToDelete = await message.channel.messages.fetch({ limit: 5 }); await message.channel.bulkDelete(messagesToDelete); } catch (error) { console.log('Impossible de supprimer les messages en masse'); } } } } static async processConversationEnd(channel, messages) { if (messages.length < 3) return; const conversationText = messages.map(m => `${m.author}: ${m.content}`).join('\n'); const prompt = `Analyse cette conversation Discord qui vient de se terminer. Détermine si elle contient du contenu offensant, des critiques malveillantes, du harcèlement ou tout autre comportement toxique qui justifierait la suppression des messages. Conversation: ${conversationText} Réponds uniquement par "SUPPRIMER" si les messages doivent être supprimés ou "GARDER" s'ils sont acceptables:`; const response = await this.makeClaudeRequest(prompt); if (!response) return; if (response.trim().toUpperCase() === 'SUPPRIMER') { try { const messagesToDelete = await channel.messages.fetch({ limit: messages.length }); await channel.bulkDelete(messagesToDelete); await channel.send('⚠️ Des messages ont été supprimés par le système d\'analyse automatique pour violation des règles du serveur.'); } catch (error) { console.log('Impossible de supprimer les messages de la conversation'); } } } static async shouldDeleteMessages(messages) { const recentMessages = messages.slice(-5); const conversationText = recentMessages.map(m => `${m.author}: ${m.content}`).join('\n'); const prompt = `Analyse ces messages Discord récents. Détermine s'ils contiennent du contenu qui nécessite une suppression immédiate (spam, insultes graves, harcèlement). Messages: ${conversationText} Réponds uniquement par "OUI" pour supprimer ou "NON" pour garder:`; const response = await this.makeClaudeRequest(prompt); if (!response) return false; return response.trim().toUpperCase() === 'OUI'; } } module.exports = ClaudeHandler; index.js 0000644 00000003210 15114741631 0006210 0 ustar 00 const { Client, GatewayIntentBits, Collection } = require('discord.js'); const fs = require('fs'); const path = require('path'); const config = require('./config.json'); const client = new Client({ intents: [ GatewayIntentBits.Guilds, GatewayIntentBits.GuildMessages, GatewayIntentBits.MessageContent, GatewayIntentBits.GuildMembers ] }); client.commands = new Collection(); client.config = config; global.guildConfigs = new Map(); const commandFiles = fs.readdirSync('./commands').filter(file => file.endsWith('.js')); for (const file of commandFiles) { const command = require(`./commands/${file}`); client.commands.set(command.data.name, command); } const eventFiles = fs.readdirSync('./events').filter(file => file.endsWith('.js')); for (const file of eventFiles) { const event = require(`./events/${file}`); if (event.once) { client.once(event.name, (...args) => event.execute(...args)); } else { client.on(event.name, (...args) => event.execute(...args)); } } client.on('interactionCreate', async interaction => { if (!interaction.isChatInputCommand()) return; const command = client.commands.get(interaction.commandName); if (!command) return; try { await command.execute(interaction); } catch (error) { console.error(error); const reply = { content: 'Erreur lors de l\'exécution de la commande!', ephemeral: true }; if (interaction.replied || interaction.deferred) { await interaction.followUp(reply); } else { await interaction.reply(reply); } } }); client.login(config.token); commands/mute.js 0000644 00000010623 15114741631 0007662 0 ustar 00 const { SlashCommandBuilder, EmbedBuilder, PermissionFlagsBits } = require('discord.js'); module.exports = { data: new SlashCommandBuilder() .setName('mute') .setDescription('Empêche un utilisateur d\'envoyer des messages') .addUserOption(option => option.setName('utilisateur') .setDescription('Utilisateur à mute') .setRequired(true) ) .addStringOption(option => option.setName('raison') .setDescription('Raison du mute') .setRequired(true) ) .addIntegerOption(option => option.setName('duree') .setDescription('Durée en minutes (max 28 jours = 40320 min)') .setMinValue(1) .setMaxValue(40320) .setRequired(false) ), async execute(interaction) { if (!interaction.member.permissions.has(PermissionFlagsBits.ModerateMembers)) { return interaction.reply({ content: '❌ Tu n\'as pas la permission de timeout des utilisateurs!', ephemeral: true }); } const targetUser = interaction.options.getUser('utilisateur'); const reason = interaction.options.getString('raison'); const duration = interaction.options.getInteger('duree') || 10; const targetMember = interaction.guild.members.cache.get(targetUser.id); if (!targetMember) { return interaction.reply({ content: '❌ Utilisateur introuvable sur ce serveur!', ephemeral: true }); } if (targetMember.permissions.has(PermissionFlagsBits.Administrator)) { return interaction.reply({ content: '❌ Je ne peux pas mute un administrateur!', ephemeral: true }); } if (targetMember.roles.highest.position >= interaction.member.roles.highest.position) { return interaction.reply({ content: '❌ Tu ne peux pas mute quelqu\'un avec un rôle égal ou supérieur!', ephemeral: true }); } try { const timeoutDuration = duration * 60 * 1000; const timeoutUntil = new Date(Date.now() + timeoutDuration); const dmEmbed = new EmbedBuilder() .setColor('#FFA500') .setTitle('🔇 Tu as été mute') .setDescription(`Tu as été mute sur le serveur **${interaction.guild.name}**`) .addFields( { name: '📝 Raison', value: reason, inline: false }, { name: '⏰ Durée', value: `${duration} minute(s)`, inline: true }, { name: '👤 Modérateur', value: `${interaction.user}`, inline: true }, { name: '📅 Fin du mute', value: `<t:${Math.floor(timeoutUntil.getTime() / 1000)}:F>`, inline: false } ) .setFooter({ text: 'Peerkinton • Modération' }) .setTimestamp(); try { await targetUser.send({ embeds: [dmEmbed] }); } catch (error) { console.log('Impossible d\'envoyer le MP à l\'utilisateur mute'); } await targetMember.timeout(timeoutDuration, `${reason} - Par ${interaction.user.tag}`); const successEmbed = new EmbedBuilder() .setColor('#00FF00') .setTitle('✅ Utilisateur mute') .setDescription(`**${targetUser.tag}** a été mute avec succès`) .addFields( { name: '📝 Raison', value: reason, inline: false }, { name: '⏰ Durée', value: `${duration} minute(s)`, inline: true }, { name: '👤 Modérateur', value: `${interaction.user}`, inline: true }, { name: '📅 Fin du mute', value: `<t:${Math.floor(timeoutUntil.getTime() / 1000)}:F>`, inline: false } ) .setFooter({ text: 'Peerkinton • Modération' }) .setTimestamp(); await interaction.reply({ embeds: [successEmbed] }); } catch (error) { console.error(error); await interaction.reply({ content: '❌ Erreur lors du mute. Vérifie mes permissions!', ephemeral: true }); } } }; commands/config.js 0000644 00000016164 15114741631 0010163 0 ustar 00 const { SlashCommandBuilder, EmbedBuilder, PermissionFlagsBits, ChannelType } = require('discord.js'); module.exports = { data: new SlashCommandBuilder() .setName('config') .setDescription('Configure le bot (Admin uniquement)') .addSubcommand(subcommand => subcommand .setName('suggestion') .setDescription('Configure le salon des suggestions') .addChannelOption(option => option.setName('salon') .setDescription('Salon pour les suggestions') .addChannelTypes(ChannelType.GuildText) .setRequired(true) ) ) .addSubcommand(subcommand => subcommand .setName('secure') .setDescription('Configure la sécurité anti-spam et insultes') .addBooleanOption(option => option.setName('activer') .setDescription('Activer la sécurité') .setRequired(true) ) .addChannelOption(option => option.setName('salon') .setDescription('Salon à protéger') .addChannelTypes(ChannelType.GuildText) .setRequired(false) ) ) .addSubcommand(subcommand => subcommand .setName('convanalys') .setDescription('Active l\'analyse des conversations par Claude') .addBooleanOption(option => option.setName('activer') .setDescription('Activer l\'analyse') .setRequired(true) ) .addChannelOption(option => option.setName('salon') .setDescription('Salon à analyser') .addChannelTypes(ChannelType.GuildText) .setRequired(false) ) ) .addSubcommand(subcommand => subcommand .setName('view') .setDescription('Voir la configuration actuelle') ), async execute(interaction) { if (!interaction.member.permissions.has(PermissionFlagsBits.Administrator)) { return interaction.reply({ content: '❌ Tu dois être administrateur pour utiliser cette commande!', ephemeral: true }); } const subcommand = interaction.options.getSubcommand(); const guildId = interaction.guild.id; if (!global.guildConfigs.has(guildId)) { global.guildConfigs.set(guildId, {}); } const guildConfig = global.guildConfigs.get(guildId); switch (subcommand) { case 'suggestion': const suggestionChannel = interaction.options.getChannel('salon'); guildConfig.suggestionChannel = suggestionChannel.id; global.guildConfigs.set(guildId, guildConfig); await interaction.reply({ content: `✅ Salon des suggestions configuré sur ${suggestionChannel}!`, ephemeral: true }); break; case 'secure': const secureEnabled = interaction.options.getBoolean('activer'); const secureChannel = interaction.options.getChannel('salon'); guildConfig.securityEnabled = secureEnabled; if (secureChannel) { if (!guildConfig.secureChannels) guildConfig.secureChannels = []; if (!guildConfig.secureChannels.includes(secureChannel.id)) { guildConfig.secureChannels.push(secureChannel.id); } } global.guildConfigs.set(guildId, guildConfig); await interaction.reply({ content: `✅ Sécurité ${secureEnabled ? 'activée' : 'désactivée'}${secureChannel ? ` pour ${secureChannel}` : ''}!`, ephemeral: true }); break; case 'convanalys': const analysEnabled = interaction.options.getBoolean('activer'); const analysChannel = interaction.options.getChannel('salon'); guildConfig.conversationAnalysis = analysEnabled; if (analysChannel) { if (!guildConfig.analysisChannels) guildConfig.analysisChannels = []; if (!guildConfig.analysisChannels.includes(analysChannel.id)) { guildConfig.analysisChannels.push(analysChannel.id); } } global.guildConfigs.set(guildId, guildConfig); await interaction.reply({ content: `✅ Analyse des conversations ${analysEnabled ? 'activée' : 'désactivée'}${analysChannel ? ` pour ${analysChannel}` : ''}!`, ephemeral: true }); break; case 'view': const embed = new EmbedBuilder() .setColor('#0099FF') .setTitle('⚙️ Configuration du serveur') .addFields( { name: '💡 Salon suggestions', value: guildConfig.suggestionChannel ? `<#${guildConfig.suggestionChannel}>` : 'Non configuré', inline: true }, { name: '🛡️ Sécurité', value: guildConfig.securityEnabled ? '✅ Activée' : '❌ Désactivée', inline: true }, { name: '🔍 Analyse conversations', value: guildConfig.conversationAnalysis ? '✅ Activée' : '❌ Désactivée', inline: true } ) .setFooter({ text: 'Peerkinton • Configuration' }) .setTimestamp(); if (guildConfig.secureChannels && guildConfig.secureChannels.length > 0) { embed.addFields({ name: '🔒 Salons sécurisés', value: guildConfig.secureChannels.map(id => `<#${id}>`).join(', '), inline: false }); } if (guildConfig.analysisChannels && guildConfig.analysisChannels.length > 0) { embed.addFields({ name: '📊 Salons analysés', value: guildConfig.analysisChannels.map(id => `<#${id}>`).join(', '), inline: false }); } await interaction.reply({ embeds: [embed], ephemeral: true }); break; } } }; commands/suggestion.js 0000644 00000003616 15114741631 0011103 0 ustar 00 const { SlashCommandBuilder, EmbedBuilder, ChannelType } = require('discord.js'); module.exports = { data: new SlashCommandBuilder() .setName('suggestion') .setDescription('Propose une suggestion') .addStringOption(option => option.setName('suggestion') .setDescription('Ta suggestion') .setRequired(true) ) .addChannelOption(option => option.setName('salon') .setDescription('Salon où poster la suggestion') .addChannelTypes(ChannelType.GuildText) .setRequired(false) ), async execute(interaction) { const suggestion = interaction.options.getString('suggestion'); const channel = interaction.options.getChannel('salon') || interaction.channel; const guildConfig = global.guildConfigs.get(interaction.guild.id) || {}; const suggestionChannel = guildConfig.suggestionChannel; const targetChannel = suggestionChannel ? interaction.guild.channels.cache.get(suggestionChannel) : channel; const embed = new EmbedBuilder() .setColor('#00FF00') .setTitle('💡 Nouvelle Suggestion') .setDescription(suggestion) .addFields( { name: '👤 Proposé par', value: `${interaction.user}`, inline: true }, { name: '📅 Date', value: `<t:${Math.floor(Date.now() / 1000)}:F>`, inline: true } ) .setFooter({ text: 'Peerkinton • Système de suggestions' }) .setTimestamp(); const message = await targetChannel.send({ embeds: [embed] }); await message.react('👍'); await message.react('👎'); await interaction.reply({ content: `✅ Ta suggestion a été postée dans ${targetChannel}!`, ephemeral: true }); } }; commands/play.js 0000644 00000001643 15114741631 0007657 0 ustar 00 const { SlashCommandBuilder, EmbedBuilder } = require('discord.js'); module.exports = { data: new SlashCommandBuilder() .setName('play') .setDescription('Affiche les informations de connexion au serveur Minecraft'), async execute(interaction) { const embed = new EmbedBuilder() .setColor('#FFD700') .setTitle('🎮 Serveur Minecraft Peerkinton') .setDescription('Rejoins notre serveur Minecraft !') .addFields( { name: '🌐 Adresse IP', value: '`play.peerkinton.com`', inline: true }, { name: '🎯 Version', value: '1.20.1', inline: true }, ) .setThumbnail('https://cdn.discordapp.com/attachments/123/456/minecraft-icon.png') .setFooter({ text: 'Peerkinton • Serveur Minecraft' }) .setTimestamp(); await interaction.reply({ embeds: [embed] }); } }; commands/ban.js 0000644 00000010045 15114741631 0007446 0 ustar 00 const { SlashCommandBuilder, EmbedBuilder, PermissionFlagsBits } = require('discord.js'); module.exports = { data: new SlashCommandBuilder() .setName('ban') .setDescription('Ban un utilisateur') .addUserOption(option => option.setName('utilisateur') .setDescription('Utilisateur à bannir') .setRequired(true) ) .addStringOption(option => option.setName('raison') .setDescription('Raison du bannissement') .setRequired(true) ) .addIntegerOption(option => option.setName('duree') .setDescription('Durée en jours pour supprimer les messages (0-7)') .setMinValue(0) .setMaxValue(7) .setRequired(false) ), async execute(interaction) { if (!interaction.member.permissions.has(PermissionFlagsBits.BanMembers)) { return interaction.reply({ content: '❌ Tu n\'as pas la permission de bannir des utilisateurs!', ephemeral: true }); } const targetUser = interaction.options.getUser('utilisateur'); const reason = interaction.options.getString('raison'); const deleteMessageDays = interaction.options.getInteger('duree') || 0; const targetMember = interaction.guild.members.cache.get(targetUser.id); if (targetMember) { if (targetMember.permissions.has(PermissionFlagsBits.Administrator)) { return interaction.reply({ content: '❌ Je ne peux pas bannir un administrateur!', ephemeral: true }); } if (targetMember.roles.highest.position >= interaction.member.roles.highest.position) { return interaction.reply({ content: '❌ Tu ne peux pas bannir quelqu\'un avec un rôle égal ou supérieur!', ephemeral: true }); } } try { const dmEmbed = new EmbedBuilder() .setColor('#FF0000') .setTitle('🔨 Tu as été banni') .setDescription(`Tu as été banni du serveur **${interaction.guild.name}**`) .addFields( { name: '📝 Raison', value: reason, inline: false }, { name: '👤 Modérateur', value: `${interaction.user}`, inline: true }, { name: '📅 Date', value: `<t:${Math.floor(Date.now() / 1000)}:F>`, inline: true } ) .setFooter({ text: 'Peerkinton • Modération' }) .setTimestamp(); try { await targetUser.send({ embeds: [dmEmbed] }); } catch (error) { console.log('Impossible d\'envoyer le MP à l\'utilisateur banni'); } await interaction.guild.members.ban(targetUser, { deleteMessageDays: deleteMessageDays, reason: `${reason} - Par ${interaction.user.tag}` }); const successEmbed = new EmbedBuilder() .setColor('#00FF00') .setTitle('✅ Utilisateur banni') .setDescription(`**${targetUser.tag}** a été banni avec succès`) .addFields( { name: '📝 Raison', value: reason, inline: false }, { name: '👤 Modérateur', value: `${interaction.user}`, inline: true }, { name: '🗑️ Messages supprimés', value: `${deleteMessageDays} jour(s)`, inline: true } ) .setFooter({ text: 'Peerkinton • Modération' }) .setTimestamp(); await interaction.reply({ embeds: [successEmbed] }); } catch (error) { console.error(error); await interaction.reply({ content: '❌ Erreur lors du bannissement. Vérifie mes permissions!', ephemeral: true }); } } }; node_modules/asynckit/parallel.js 0000664 00000001771 15114741631 0013213 0 ustar 00 var iterate = require('./lib/iterate.js') , initState = require('./lib/state.js') , terminator = require('./lib/terminator.js') ; // Public API module.exports = parallel; /** * Runs iterator over provided array elements in parallel * * @param {array|object} list - array or object (named list) to iterate over * @param {function} iterator - iterator to run * @param {function} callback - invoked when all elements processed * @returns {function} - jobs terminator */ function parallel(list, iterator, callback) { var state = initState(list); while (state.index < (state['keyedList'] || list).length) { iterate(list, iterator, state, function(error, result) { if (error) { callback(error, result); return; } // looks like it's the last one if (Object.keys(state.jobs).length === 0) { callback(null, state.results); return; } }); state.index++; } return terminator.bind(state, callback); } node_modules/asynckit/package.json 0000664 00000003113 15114741631 0013337 0 ustar 00 { "name": "asynckit", "version": "0.4.0", "description": "Minimal async jobs utility library, with streams support", "main": "index.js", "scripts": { "clean": "rimraf coverage", "lint": "eslint *.js lib/*.js test/*.js", "test": "istanbul cover --reporter=json tape -- 'test/test-*.js' | tap-spec", "win-test": "tape test/test-*.js", "browser": "browserify -t browserify-istanbul test/lib/browserify_adjustment.js test/test-*.js | obake --coverage | tap-spec", "report": "istanbul report", "size": "browserify index.js | size-table asynckit", "debug": "tape test/test-*.js" }, "pre-commit": [ "clean", "lint", "test", "browser", "report", "size" ], "repository": { "type": "git", "url": "git+https://github.com/alexindigo/asynckit.git" }, "keywords": [ "async", "jobs", "parallel", "serial", "iterator", "array", "object", "stream", "destroy", "terminate", "abort" ], "author": "Alex Indigo <iam@alexindigo.com>", "license": "MIT", "bugs": { "url": "https://github.com/alexindigo/asynckit/issues" }, "homepage": "https://github.com/alexindigo/asynckit#readme", "devDependencies": { "browserify": "^13.0.0", "browserify-istanbul": "^2.0.0", "coveralls": "^2.11.9", "eslint": "^2.9.0", "istanbul": "^0.4.3", "obake": "^0.1.2", "phantomjs-prebuilt": "^2.1.7", "pre-commit": "^1.1.3", "reamde": "^1.1.0", "rimraf": "^2.5.2", "size-table": "^0.2.0", "tap-spec": "^4.1.1", "tape": "^4.5.1" }, "dependencies": {} } node_modules/asynckit/serialOrdered.js 0000664 00000003327 15114741631 0014202 0 ustar 00 var iterate = require('./lib/iterate.js') , initState = require('./lib/state.js') , terminator = require('./lib/terminator.js') ; // Public API module.exports = serialOrdered; // sorting helpers module.exports.ascending = ascending; module.exports.descending = descending; /** * Runs iterator over provided sorted array elements in series * * @param {array|object} list - array or object (named list) to iterate over * @param {function} iterator - iterator to run * @param {function} sortMethod - custom sort function * @param {function} callback - invoked when all elements processed * @returns {function} - jobs terminator */ function serialOrdered(list, iterator, sortMethod, callback) { var state = initState(list, sortMethod); iterate(list, iterator, state, function iteratorHandler(error, result) { if (error) { callback(error, result); return; } state.index++; // are we there yet? if (state.index < (state['keyedList'] || list).length) { iterate(list, iterator, state, iteratorHandler); return; } // done here callback(null, state.results); }); return terminator.bind(state, callback); } /* * -- Sort methods */ /** * sort helper to sort array elements in ascending order * * @param {mixed} a - an item to compare * @param {mixed} b - an item to compare * @returns {number} - comparison result */ function ascending(a, b) { return a < b ? -1 : a > b ? 1 : 0; } /** * sort helper to sort array elements in descending order * * @param {mixed} a - an item to compare * @param {mixed} b - an item to compare * @returns {number} - comparison result */ function descending(a, b) { return -1 * ascending(a, b); } node_modules/asynckit/LICENSE 0000664 00000002066 15114741631 0012064 0 ustar 00 The MIT License (MIT) Copyright (c) 2016 Alex Indigo Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. node_modules/asynckit/bench.js 0000664 00000002350 15114741631 0012470 0 ustar 00 /* eslint no-console: "off" */ var asynckit = require('./') , async = require('async') , assert = require('assert') , expected = 0 ; var Benchmark = require('benchmark'); var suite = new Benchmark.Suite; var source = []; for (var z = 1; z < 100; z++) { source.push(z); expected += z; } suite // add tests .add('async.map', function(deferred) { var total = 0; async.map(source, function(i, cb) { setImmediate(function() { total += i; cb(null, total); }); }, function(err, result) { assert.ifError(err); assert.equal(result[result.length - 1], expected); deferred.resolve(); }); }, {'defer': true}) .add('asynckit.parallel', function(deferred) { var total = 0; asynckit.parallel(source, function(i, cb) { setImmediate(function() { total += i; cb(null, total); }); }, function(err, result) { assert.ifError(err); assert.equal(result[result.length - 1], expected); deferred.resolve(); }); }, {'defer': true}) // add listeners .on('cycle', function(ev) { console.log(String(ev.target)); }) .on('complete', function() { console.log('Fastest is ' + this.filter('fastest').map('name')); }) // run async .run({ 'async': true }); node_modules/asynckit/lib/defer.js 0000664 00000000671 15114741631 0013250 0 ustar 00 module.exports = defer; /** * Runs provided function on next iteration of the event loop * * @param {function} fn - function to run */ function defer(fn) { var nextTick = typeof setImmediate == 'function' ? setImmediate : ( typeof process == 'object' && typeof process.nextTick == 'function' ? process.nextTick : null ); if (nextTick) { nextTick(fn); } else { setTimeout(fn, 0); } } node_modules/asynckit/lib/state.js 0000664 00000001655 15114741631 0013306 0 ustar 00 // API module.exports = state; /** * Creates initial state object * for iteration over list * * @param {array|object} list - list to iterate over * @param {function|null} sortMethod - function to use for keys sort, * or `null` to keep them as is * @returns {object} - initial state object */ function state(list, sortMethod) { var isNamedList = !Array.isArray(list) , initState = { index : 0, keyedList: isNamedList || sortMethod ? Object.keys(list) : null, jobs : {}, results : isNamedList ? {} : [], size : isNamedList ? Object.keys(list).length : list.length } ; if (sortMethod) { // sort array keys based on it's values // sort object's keys just on own merit initState.keyedList.sort(isNamedList ? sortMethod : function(a, b) { return sortMethod(list[a], list[b]); }); } return initState; } node_modules/asynckit/lib/readable_parallel.js 0000664 00000001241 15114741631 0015570 0 ustar 00 var parallel = require('../parallel.js'); // API module.exports = ReadableParallel; /** * Streaming wrapper to `asynckit.parallel` * * @param {array|object} list - array or object (named list) to iterate over * @param {function} iterator - iterator to run * @param {function} callback - invoked when all elements processed * @returns {stream.Readable#} */ function ReadableParallel(list, iterator, callback) { if (!(this instanceof ReadableParallel)) { return new ReadableParallel(list, iterator, callback); } // turn on object mode ReadableParallel.super_.call(this, {objectMode: true}); this._start(parallel, list, iterator, callback); } node_modules/asynckit/lib/readable_serial_ordered.js 0000664 00000001655 15114741631 0016770 0 ustar 00 var serialOrdered = require('../serialOrdered.js'); // API module.exports = ReadableSerialOrdered; // expose sort helpers module.exports.ascending = serialOrdered.ascending; module.exports.descending = serialOrdered.descending; /** * Streaming wrapper to `asynckit.serialOrdered` * * @param {array|object} list - array or object (named list) to iterate over * @param {function} iterator - iterator to run * @param {function} sortMethod - custom sort function * @param {function} callback - invoked when all elements processed * @returns {stream.Readable#} */ function ReadableSerialOrdered(list, iterator, sortMethod, callback) { if (!(this instanceof ReadableSerialOrdered)) { return new ReadableSerialOrdered(list, iterator, sortMethod, callback); } // turn on object mode ReadableSerialOrdered.super_.call(this, {objectMode: true}); this._start(serialOrdered, list, iterator, sortMethod, callback); } node_modules/asynckit/lib/iterate.js 0000664 00000003402 15114741631 0013613 0 ustar 00 var async = require('./async.js') , abort = require('./abort.js') ; // API module.exports = iterate; /** * Iterates over each job object * * @param {array|object} list - array or object (named list) to iterate over * @param {function} iterator - iterator to run * @param {object} state - current job status * @param {function} callback - invoked when all elements processed */ function iterate(list, iterator, state, callback) { // store current index var key = state['keyedList'] ? state['keyedList'][state.index] : state.index; state.jobs[key] = runJob(iterator, key, list[key], function(error, output) { // don't repeat yourself // skip secondary callbacks if (!(key in state.jobs)) { return; } // clean up jobs delete state.jobs[key]; if (error) { // don't process rest of the results // stop still active jobs // and reset the list abort(state); } else { state.results[key] = output; } // return salvaged results callback(error, state.results); }); } /** * Runs iterator over provided job element * * @param {function} iterator - iterator to invoke * @param {string|number} key - key/index of the element in the list of jobs * @param {mixed} item - job description * @param {function} callback - invoked after iterator is done with the job * @returns {function|mixed} - job abort function or something else */ function runJob(iterator, key, item, callback) { var aborter; // allow shortcut if iterator expects only two arguments if (iterator.length == 2) { aborter = iterator(item, async(callback)); } // otherwise go with full three arguments else { aborter = iterator(item, key, async(callback)); } return aborter; } node_modules/asynckit/lib/terminator.js 0000664 00000001025 15114741631 0014341 0 ustar 00 var abort = require('./abort.js') , async = require('./async.js') ; // API module.exports = terminator; /** * Terminates jobs in the attached state context * * @this AsyncKitState# * @param {function} callback - final callback to invoke after termination */ function terminator(callback) { if (!Object.keys(this.jobs).length) { return; } // fast forward iteration index this.index = this.size; // abort jobs abort(this); // send back results we have so far async(callback)(null, this.results); } node_modules/asynckit/lib/readable_asynckit.js 0000664 00000003113 15114741631 0015621 0 ustar 00 var streamify = require('./streamify.js') , defer = require('./defer.js') ; // API module.exports = ReadableAsyncKit; /** * Base constructor for all streams * used to hold properties/methods */ function ReadableAsyncKit() { ReadableAsyncKit.super_.apply(this, arguments); // list of active jobs this.jobs = {}; // add stream methods this.destroy = destroy; this._start = _start; this._read = _read; } /** * Destroys readable stream, * by aborting outstanding jobs * * @returns {void} */ function destroy() { if (this.destroyed) { return; } this.destroyed = true; if (typeof this.terminator == 'function') { this.terminator(); } } /** * Starts provided jobs in async manner * * @private */ function _start() { // first argument – runner function var runner = arguments[0] // take away first argument , args = Array.prototype.slice.call(arguments, 1) // second argument - input data , input = args[0] // last argument - result callback , endCb = streamify.callback.call(this, args[args.length - 1]) ; args[args.length - 1] = endCb; // third argument - iterator args[1] = streamify.iterator.call(this, args[1]); // allow time for proper setup defer(function() { if (!this.destroyed) { this.terminator = runner.apply(null, args); } else { endCb(null, Array.isArray(input) ? [] : {}); } }.bind(this)); } /** * Implement _read to comply with Readable streams * Doesn't really make sense for flowing object mode * * @private */ function _read() { } node_modules/asynckit/lib/streamify.js 0000664 00000005624 15114741631 0014171 0 ustar 00 var async = require('./async.js'); // API module.exports = { iterator: wrapIterator, callback: wrapCallback }; /** * Wraps iterators with long signature * * @this ReadableAsyncKit# * @param {function} iterator - function to wrap * @returns {function} - wrapped function */ function wrapIterator(iterator) { var stream = this; return function(item, key, cb) { var aborter , wrappedCb = async(wrapIteratorCallback.call(stream, cb, key)) ; stream.jobs[key] = wrappedCb; // it's either shortcut (item, cb) if (iterator.length == 2) { aborter = iterator(item, wrappedCb); } // or long format (item, key, cb) else { aborter = iterator(item, key, wrappedCb); } return aborter; }; } /** * Wraps provided callback function * allowing to execute snitch function before * real callback * * @this ReadableAsyncKit# * @param {function} callback - function to wrap * @returns {function} - wrapped function */ function wrapCallback(callback) { var stream = this; var wrapped = function(error, result) { return finisher.call(stream, error, result, callback); }; return wrapped; } /** * Wraps provided iterator callback function * makes sure snitch only called once, * but passes secondary calls to the original callback * * @this ReadableAsyncKit# * @param {function} callback - callback to wrap * @param {number|string} key - iteration key * @returns {function} wrapped callback */ function wrapIteratorCallback(callback, key) { var stream = this; return function(error, output) { // don't repeat yourself if (!(key in stream.jobs)) { callback(error, output); return; } // clean up jobs delete stream.jobs[key]; return streamer.call(stream, error, {key: key, value: output}, callback); }; } /** * Stream wrapper for iterator callback * * @this ReadableAsyncKit# * @param {mixed} error - error response * @param {mixed} output - iterator output * @param {function} callback - callback that expects iterator results */ function streamer(error, output, callback) { if (error && !this.error) { this.error = error; this.pause(); this.emit('error', error); // send back value only, as expected callback(error, output && output.value); return; } // stream stuff this.push(output); // back to original track // send back value only, as expected callback(error, output && output.value); } /** * Stream wrapper for finishing callback * * @this ReadableAsyncKit# * @param {mixed} error - error response * @param {mixed} output - iterator output * @param {function} callback - callback that expects final results */ function finisher(error, output, callback) { // signal end of the stream // only for successfully finished streams if (!error) { this.push(null); } // back to original track callback(error, output); } node_modules/asynckit/lib/readable_serial.js 0000664 00000001217 15114741631 0015256 0 ustar 00 var serial = require('../serial.js'); // API module.exports = ReadableSerial; /** * Streaming wrapper to `asynckit.serial` * * @param {array|object} list - array or object (named list) to iterate over * @param {function} iterator - iterator to run * @param {function} callback - invoked when all elements processed * @returns {stream.Readable#} */ function ReadableSerial(list, iterator, callback) { if (!(this instanceof ReadableSerial)) { return new ReadableSerial(list, iterator, callback); } // turn on object mode ReadableSerial.super_.call(this, {objectMode: true}); this._start(serial, list, iterator, callback); } node_modules/asynckit/lib/async.js 0000664 00000001127 15114741631 0013275 0 ustar 00 var defer = require('./defer.js'); // API module.exports = async; /** * Runs provided callback asynchronously * even if callback itself is not * * @param {function} callback - callback to invoke * @returns {function} - augmented callback */ function async(callback) { var isAsync = false; // check if async happened defer(function() { isAsync = true; }); return function async_callback(err, result) { if (isAsync) { callback(err, result); } else { defer(function nextTick_callback() { callback(err, result); }); } }; } node_modules/asynckit/lib/abort.js 0000664 00000000761 15114741631 0013272 0 ustar 00 // API module.exports = abort; /** * Aborts leftover active jobs * * @param {object} state - current state object */ function abort(state) { Object.keys(state.jobs).forEach(clean.bind(state)); // reset leftover jobs state.jobs = {}; } /** * Cleans up leftover job by invoking abort function for the provided job id * * @this state * @param {string|number} key - job id to abort */ function clean(key) { if (typeof this.jobs[key] == 'function') { this.jobs[key](); } } node_modules/asynckit/serial.js 0000664 00000000765 15114741631 0012700 0 ustar 00 var serialOrdered = require('./serialOrdered.js'); // Public API module.exports = serial; /** * Runs iterator over provided array elements in series * * @param {array|object} list - array or object (named list) to iterate over * @param {function} iterator - iterator to run * @param {function} callback - invoked when all elements processed * @returns {function} - jobs terminator */ function serial(list, iterator, callback) { return serialOrdered(list, iterator, null, callback); } node_modules/asynckit/stream.js 0000664 00000001277 15114741631 0012713 0 ustar 00 var inherits = require('util').inherits , Readable = require('stream').Readable , ReadableAsyncKit = require('./lib/readable_asynckit.js') , ReadableParallel = require('./lib/readable_parallel.js') , ReadableSerial = require('./lib/readable_serial.js') , ReadableSerialOrdered = require('./lib/readable_serial_ordered.js') ; // API module.exports = { parallel : ReadableParallel, serial : ReadableSerial, serialOrdered : ReadableSerialOrdered, }; inherits(ReadableAsyncKit, Readable); inherits(ReadableParallel, ReadableAsyncKit); inherits(ReadableSerial, ReadableAsyncKit); inherits(ReadableSerialOrdered, ReadableAsyncKit); node_modules/asynckit/index.js 0000664 00000000234 15114741631 0012517 0 ustar 00 module.exports = { parallel : require('./parallel.js'), serial : require('./serial.js'), serialOrdered : require('./serialOrdered.js') }; node_modules/asynckit/README.md 0000664 00000016730 15114741631 0012341 0 ustar 00 # asynckit [](https://www.npmjs.com/package/asynckit) Minimal async jobs utility library, with streams support. [](https://travis-ci.org/alexindigo/asynckit) [](https://travis-ci.org/alexindigo/asynckit) [](https://ci.appveyor.com/project/alexindigo/asynckit) [](https://coveralls.io/github/alexindigo/asynckit?branch=master) [](https://david-dm.org/alexindigo/asynckit) [](https://www.bithound.io/github/alexindigo/asynckit) <!-- [](https://www.npmjs.com/package/reamde) --> AsyncKit provides harness for `parallel` and `serial` iterators over list of items represented by arrays or objects. Optionally it accepts abort function (should be synchronously return by iterator for each item), and terminates left over jobs upon an error event. For specific iteration order built-in (`ascending` and `descending`) and custom sort helpers also supported, via `asynckit.serialOrdered` method. It ensures async operations to keep behavior more stable and prevent `Maximum call stack size exceeded` errors, from sync iterators. | compression | size | | :----------------- | -------: | | asynckit.js | 12.34 kB | | asynckit.min.js | 4.11 kB | | asynckit.min.js.gz | 1.47 kB | ## Install ```sh $ npm install --save asynckit ``` ## Examples ### Parallel Jobs Runs iterator over provided array in parallel. Stores output in the `result` array, on the matching positions. In unlikely event of an error from one of the jobs, will terminate rest of the active jobs (if abort function is provided) and return error along with salvaged data to the main callback function. #### Input Array ```javascript var parallel = require('asynckit').parallel , assert = require('assert') ; var source = [ 1, 1, 4, 16, 64, 32, 8, 2 ] , expectedResult = [ 2, 2, 8, 32, 128, 64, 16, 4 ] , expectedTarget = [ 1, 1, 2, 4, 8, 16, 32, 64 ] , target = [] ; parallel(source, asyncJob, function(err, result) { assert.deepEqual(result, expectedResult); assert.deepEqual(target, expectedTarget); }); // async job accepts one element from the array // and a callback function function asyncJob(item, cb) { // different delays (in ms) per item var delay = item * 25; // pretend different jobs take different time to finish // and not in consequential order var timeoutId = setTimeout(function() { target.push(item); cb(null, item * 2); }, delay); // allow to cancel "leftover" jobs upon error // return function, invoking of which will abort this job return clearTimeout.bind(null, timeoutId); } ``` More examples could be found in [test/test-parallel-array.js](test/test-parallel-array.js). #### Input Object Also it supports named jobs, listed via object. ```javascript var parallel = require('asynckit/parallel') , assert = require('assert') ; var source = { first: 1, one: 1, four: 4, sixteen: 16, sixtyFour: 64, thirtyTwo: 32, eight: 8, two: 2 } , expectedResult = { first: 2, one: 2, four: 8, sixteen: 32, sixtyFour: 128, thirtyTwo: 64, eight: 16, two: 4 } , expectedTarget = [ 1, 1, 2, 4, 8, 16, 32, 64 ] , expectedKeys = [ 'first', 'one', 'two', 'four', 'eight', 'sixteen', 'thirtyTwo', 'sixtyFour' ] , target = [] , keys = [] ; parallel(source, asyncJob, function(err, result) { assert.deepEqual(result, expectedResult); assert.deepEqual(target, expectedTarget); assert.deepEqual(keys, expectedKeys); }); // supports full value, key, callback (shortcut) interface function asyncJob(item, key, cb) { // different delays (in ms) per item var delay = item * 25; // pretend different jobs take different time to finish // and not in consequential order var timeoutId = setTimeout(function() { keys.push(key); target.push(item); cb(null, item * 2); }, delay); // allow to cancel "leftover" jobs upon error // return function, invoking of which will abort this job return clearTimeout.bind(null, timeoutId); } ``` More examples could be found in [test/test-parallel-object.js](test/test-parallel-object.js). ### Serial Jobs Runs iterator over provided array sequentially. Stores output in the `result` array, on the matching positions. In unlikely event of an error from one of the jobs, will not proceed to the rest of the items in the list and return error along with salvaged data to the main callback function. #### Input Array ```javascript var serial = require('asynckit/serial') , assert = require('assert') ; var source = [ 1, 1, 4, 16, 64, 32, 8, 2 ] , expectedResult = [ 2, 2, 8, 32, 128, 64, 16, 4 ] , expectedTarget = [ 0, 1, 2, 3, 4, 5, 6, 7 ] , target = [] ; serial(source, asyncJob, function(err, result) { assert.deepEqual(result, expectedResult); assert.deepEqual(target, expectedTarget); }); // extended interface (item, key, callback) // also supported for arrays function asyncJob(item, key, cb) { target.push(key); // it will be automatically made async // even it iterator "returns" in the same event loop cb(null, item * 2); } ``` More examples could be found in [test/test-serial-array.js](test/test-serial-array.js). #### Input Object Also it supports named jobs, listed via object. ```javascript var serial = require('asynckit').serial , assert = require('assert') ; var source = [ 1, 1, 4, 16, 64, 32, 8, 2 ] , expectedResult = [ 2, 2, 8, 32, 128, 64, 16, 4 ] , expectedTarget = [ 0, 1, 2, 3, 4, 5, 6, 7 ] , target = [] ; var source = { first: 1, one: 1, four: 4, sixteen: 16, sixtyFour: 64, thirtyTwo: 32, eight: 8, two: 2 } , expectedResult = { first: 2, one: 2, four: 8, sixteen: 32, sixtyFour: 128, thirtyTwo: 64, eight: 16, two: 4 } , expectedTarget = [ 1, 1, 4, 16, 64, 32, 8, 2 ] , target = [] ; serial(source, asyncJob, function(err, result) { assert.deepEqual(result, expectedResult); assert.deepEqual(target, expectedTarget); }); // shortcut interface (item, callback) // works for object as well as for the arrays function asyncJob(item, cb) { target.push(item); // it will be automatically made async // even it iterator "returns" in the same event loop cb(null, item * 2); } ``` More examples could be found in [test/test-serial-object.js](test/test-serial-object.js). _Note: Since _object_ is an _unordered_ collection of properties, it may produce unexpected results with sequential iterations. Whenever order of the jobs' execution is important please use `serialOrdered` method._ ### Ordered Serial Iterations TBD For example [compare-property](compare-property) package. ### Streaming interface TBD ## Want to Know More? More examples can be found in [test folder](test/). Or open an [issue](https://github.com/alexindigo/asynckit/issues) with questions and/or suggestions. ## License AsyncKit is licensed under the MIT license. node_modules/discord.js/package.json 0000664 00000006317 15114741631 0013565 0 ustar 00 { "$schema": "https://json.schemastore.org/package.json", "name": "discord.js", "version": "14.21.0", "description": "A powerful library for interacting with the Discord API", "main": "./src/index.js", "types": "./typings/index.d.ts", "exports": { ".": { "import": { "types": "./typings/index.d.mts", "default": "./src/index.js" }, "require": { "types": "./typings/index.d.ts", "default": "./src/index.js" } } }, "directories": { "lib": "src", "test": "test" }, "files": [ "src", "typings/*.d.ts", "typings/*.d.mts" ], "contributors": [ "Crawl <icrawltogo@gmail.com>", "Amish Shah <amishshah.2k@gmail.com>", "Vlad Frangu <me@vladfrangu.dev>", "SpaceEEC <spaceeec@yahoo.com>", "Aura Román <kyradiscord@gmail.com>" ], "license": "Apache-2.0", "keywords": [ "discord", "api", "bot", "client", "node", "discordapp" ], "repository": { "type": "git", "url": "https://github.com/discordjs/discord.js.git", "directory": "packages/discord.js" }, "bugs": { "url": "https://github.com/discordjs/discord.js/issues" }, "homepage": "https://discord.js.org", "funding": "https://github.com/discordjs/discord.js?sponsor", "dependencies": { "@discordjs/builders": "^1.11.2", "@discordjs/collection": "1.5.3", "@discordjs/formatters": "^0.6.1", "@discordjs/ws": "^1.2.3", "@sapphire/snowflake": "3.5.3", "discord-api-types": "^0.38.1", "fast-deep-equal": "3.1.3", "lodash.snakecase": "4.1.1", "magic-bytes.js": "^1.10.0", "tslib": "^2.6.3", "undici": "6.21.3", "@discordjs/rest": "^2.5.1", "@discordjs/util": "^1.1.1" }, "devDependencies": { "@favware/cliff-jumper": "^4.1.0", "@types/node": "^16.18.105", "@typescript-eslint/eslint-plugin": "^8.2.0", "@typescript-eslint/parser": "^8.2.0", "cross-env": "^7.0.3", "dtslint": "4.2.1", "eslint": "^8.57.0", "eslint-formatter-pretty": "^5.0.0", "jest": "29.7.0", "prettier": "^3.3.3", "tsd": "^0.31.1", "tslint": "6.1.3", "turbo": "^2.0.14", "typescript": "~5.5.4", "@discordjs/api-extractor": "^7.38.1", "@discordjs/docgen": "^0.12.1", "@discordjs/scripts": "^0.1.0" }, "engines": { "node": ">=18" }, "publishConfig": { "provenance": true }, "scripts": { "test": "pnpm run docs:test && pnpm run test:typescript", "test:typescript": "tsc --noEmit && tsd", "lint": "prettier --check . && tslint typings/index.d.ts && cross-env ESLINT_USE_FLAT_CONFIG=false eslint --format=pretty src typings", "format": "prettier --write . && cross-env ESLINT_USE_FLAT_CONFIG=false eslint --fix --format=pretty src", "fmt": "pnpm run format", "docs": "docgen -i \"./src/*.js\" \"./src/**/*.js\" -c ./docs/index.json -r ../../ -o ./docs/docs.json && pnpm run docs:new", "docs:test": "docgen -i \"./src/*.js\" \"./src/**/*.js\" -c ./docs/index.json -r ../../", "docs:new": "api-extractor run --local --minify && generate-split-documentation", "changelog": "git cliff --prepend ./CHANGELOG.md -u -c ./cliff.toml -r ../../ --include-path 'packages/discord.js/*'", "release": "cliff-jumper" } } node_modules/discord.js/LICENSE 0000664 00000025043 15114741631 0012301 0 ustar 00 Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 1. Definitions. "License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. "Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. "Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. "You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. "Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. "Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. "Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). "Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. "Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." "Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. 2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. 3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. 4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: (a) You must give any other recipients of the Work or Derivative Works a copy of this License; and (b) You must cause any modified files to carry prominent notices stating that You changed the files; and (c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and (d) If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. 5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. 6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. 7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. 8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. 9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. END OF TERMS AND CONDITIONS Copyright 2021 Noel Buechler Copyright 2015 Amish Shah Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. node_modules/discord.js/typings/index.d.mts 0000664 00001116051 15114741631 0015050 0 ustar 00 import { ActionRowBuilder as BuilderActionRow, MessageActionRowComponentBuilder, ButtonBuilder as BuilderButtonComponent, EmbedBuilder as BuildersEmbed, ChannelSelectMenuBuilder as BuilderChannelSelectMenuComponent, MentionableSelectMenuBuilder as BuilderMentionableSelectMenuComponent, RoleSelectMenuBuilder as BuilderRoleSelectMenuComponent, StringSelectMenuBuilder as BuilderStringSelectMenuComponent, UserSelectMenuBuilder as BuilderUserSelectMenuComponent, TextInputBuilder as BuilderTextInputComponent, SelectMenuOptionBuilder as BuildersSelectMenuOption, ModalActionRowComponentBuilder, ModalBuilder as BuildersModal, AnyComponentBuilder, type RestOrArray, ApplicationCommandOptionAllowedChannelTypes, } from '@discordjs/builders'; import { blockQuote, bold, channelMention, codeBlock, formatEmoji, hideLinkEmbed, hyperlink, inlineCode, italic, quote, roleMention, spoiler, strikethrough, time, TimestampStyles, underscore, userMention, } from '@discordjs/formatters'; import { Awaitable, JSONEncodable } from '@discordjs/util'; import { Collection, ReadonlyCollection } from '@discordjs/collection'; import { BaseImageURLOptions, ImageURLOptions, RawFile, REST, RESTOptions } from '@discordjs/rest'; import { WebSocketManager as WSWebSocketManager, IShardingStrategy, IIdentifyThrottler, SessionInfo, } from '@discordjs/ws'; import { APIActionRowComponent, APIApplicationCommandInteractionData, APIApplicationCommandOption, APIAuditLogChange, APIButtonComponent, APIEmbed, APIEmoji, APIInteractionDataResolvedChannel, APIInteractionDataResolvedGuildMember, APIInteractionGuildMember, APIMessage, APIMessageComponent, APIOverwrite, APIPartialChannel, APIPartialEmoji, APIPartialGuild, APIRole, APISelectMenuComponent, APITemplateSerializedSourceGuild, APIUser, ButtonStyle, ChannelType, ComponentType, GatewayDispatchEvents, GatewayVoiceServerUpdateDispatchData, GatewayVoiceStateUpdateDispatchData, GuildFeature, GuildMFALevel, GuildNSFWLevel, GuildPremiumTier, GuildVerificationLevel, Locale, InteractionType, InviteTargetType, MessageType, OAuth2Scopes, RESTPostAPIApplicationCommandsJSONBody, Snowflake, StageInstancePrivacyLevel, StickerFormatType, StickerType, TeamMemberMembershipState, WebhookType, OverwriteType, GuildExplicitContentFilter, GuildDefaultMessageNotifications, ApplicationCommandPermissionType, ApplicationCommandOptionType, ApplicationCommandType, ActivityType, GuildScheduledEventEntityType, GuildScheduledEventPrivacyLevel, GuildScheduledEventStatus, IntegrationExpireBehavior, ApplicationFlags, PermissionFlagsBits, ThreadMemberFlags, UserFlags, MessageFlags, GuildSystemChannelFlags, GatewayIntentBits, ActivityFlags, AuditLogEvent, APIMessageComponentEmoji, EmbedType, APIComponentInActionRow, APIModalInteractionResponseCallbackData, APIModalSubmitInteraction, APIComponentInMessageActionRow, TextInputStyle, APITextInputComponent, APIComponentInModalActionRow, APIModalComponent, APISelectMenuOption, APIEmbedField, APIEmbedAuthor, APIEmbedFooter, APIEmbedImage, VideoQualityMode, LocalizationMap, MessageActivityType, APIAttachment, APIChannel, ThreadAutoArchiveDuration, FormattingPatterns, APIEmbedProvider, AuditLogOptionsType, TextChannelType, ChannelFlags, SortOrderType, APIMessageStringSelectInteractionData, APIMessageUserSelectInteractionData, APIStringSelectComponent, APIUserSelectComponent, APIRoleSelectComponent, APIMentionableSelectComponent, APIChannelSelectComponent, APIGuildMember, APIMessageRoleSelectInteractionData, APIMessageMentionableSelectInteractionData, APIMessageChannelSelectInteractionData, AutoModerationRuleKeywordPresetType, AutoModerationActionType, AutoModerationRuleEventType, AutoModerationRuleTriggerType, AuditLogRuleTriggerType, GatewayAutoModerationActionExecutionDispatchData, APIAutoModerationRule, ForumLayoutType, ApplicationRoleConnectionMetadataType, APIApplicationRoleConnectionMetadata, ImageFormat, GuildMemberFlags, RESTGetAPIGuildThreadsResult, RESTGetAPIGuildOnboardingResult, APIGuildOnboardingPrompt, APIGuildOnboardingPromptOption, GuildOnboardingPromptType, AttachmentFlags, RoleFlags, TeamMemberRole, GuildWidgetStyle, GuildOnboardingMode, APISKU, SKUFlags, SKUType, APIEntitlement, EntitlementType, ApplicationIntegrationType, InteractionContextType, APIPoll, PollLayoutType, APIPollAnswer, APISelectMenuDefaultValue, SelectMenuDefaultValueType, InviteType, ReactionType, APIAuthorizingIntegrationOwnersMap, MessageReferenceType, GuildScheduledEventRecurrenceRuleWeekday, GuildScheduledEventRecurrenceRuleMonth, GuildScheduledEventRecurrenceRuleFrequency, APISubscription, SubscriptionStatus, ApplicationWebhookEventStatus, ApplicationWebhookEventType, RESTPostAPIInteractionCallbackWithResponseResult, RESTAPIInteractionCallbackObject, RESTAPIInteractionCallbackResourceObject, InteractionResponseType, RESTAPIInteractionCallbackActivityInstanceResource, VoiceChannelEffectSendAnimationType, GatewayVoiceChannelEffectSendDispatchData, APIChatInputApplicationCommandInteractionData, APIContextMenuInteractionData, APISoundboardSound, APIComponentInContainer, APIContainerComponent, APIThumbnailComponent, APISectionComponent, APITextDisplayComponent, APIUnfurledMediaItem, APIMediaGalleryItem, APIMediaGalleryComponent, APISeparatorComponent, SeparatorSpacingSize, APIFileComponent, APIMessageTopLevelComponent, EntryPointCommandHandlerType, } from 'discord-api-types/v10'; import { ChildProcess } from 'node:child_process'; import { EventEmitter } from 'node:events'; import { Stream } from 'node:stream'; import { MessagePort, Worker } from 'node:worker_threads'; import { RawActivityData, RawAnonymousGuildData, RawApplicationCommandData, RawApplicationData, RawApplicationEmojiData, RawBaseGuildData, RawChannelData, RawClientApplicationData, RawDMChannelData, RawEmojiData, RawGuildAuditLogData, RawGuildAuditLogEntryData, RawGuildBanData, RawGuildChannelData, RawGuildData, RawGuildEmojiData, RawGuildMemberData, RawGuildPreviewData, RawGuildScheduledEventData, RawGuildTemplateData, RawIntegrationApplicationData, RawIntegrationData, RawInteractionData, RawInviteData, RawInviteGuildData, RawInviteStageInstance, RawMessageButtonInteractionData, RawMessageComponentInteractionData, RawMessageData, RawMessagePayloadData, RawMessageReactionData, RawOAuth2GuildData, RawPartialGroupDMChannelData, RawPartialMessageData, RawPermissionOverwriteData, RawPresenceData, RawReactionEmojiData, RawRichPresenceAssets, RawRoleData, RawStageInstanceData, RawStickerData, RawStickerPackData, RawTeamData, RawTeamMemberData, RawThreadChannelData, RawThreadMemberData, RawTypingData, RawUserData, RawVoiceRegionData, RawVoiceStateData, RawWebhookData, RawWelcomeChannelData, RawWelcomeScreenData, RawWidgetData, RawWidgetMemberData, } from './rawDataTypes.mjs'; //#region Classes export class Activity { private constructor(presence: Presence, data?: RawActivityData); public readonly presence: Presence; public applicationId: Snowflake | null; public assets: RichPresenceAssets | null; public buttons: string[]; public get createdAt(): Date; public createdTimestamp: number; public details: string | null; public emoji: Emoji | null; public flags: Readonly<ActivityFlagsBitField>; public name: string; public party: { id: string | null; size: [number, number]; } | null; public state: string | null; public syncId: string | null; public timestamps: { start: Date | null; end: Date | null; } | null; public type: ActivityType; public url: string | null; public equals(activity: Activity): boolean; public toString(): string; } export type ActivityFlagsString = keyof typeof ActivityFlags; export interface BaseComponentData { id?: number; type: ComponentType; } export type MessageActionRowComponentData = | JSONEncodable<APIComponentInMessageActionRow> | ButtonComponentData | StringSelectMenuComponentData | UserSelectMenuComponentData | RoleSelectMenuComponentData | MentionableSelectMenuComponentData | ChannelSelectMenuComponentData; export type ModalActionRowComponentData = JSONEncodable<APIComponentInModalActionRow> | TextInputComponentData; export type ActionRowComponentData = MessageActionRowComponentData | ModalActionRowComponentData; export type ActionRowComponent = MessageActionRowComponent | ModalActionRowComponent; export interface ActionRowData<ComponentType extends JSONEncodable<APIComponentInActionRow> | ActionRowComponentData> extends BaseComponentData { components: readonly ComponentType[]; } export class ActionRowBuilder< ComponentType extends AnyComponentBuilder = AnyComponentBuilder, > extends BuilderActionRow<ComponentType> { public constructor( data?: Partial< | ActionRowData<ActionRowComponentData | JSONEncodable<APIComponentInActionRow>> | APIActionRowComponent<APIComponentInMessageActionRow | APIComponentInModalActionRow> >, ); public static from<ComponentType extends AnyComponentBuilder = AnyComponentBuilder>( other: | JSONEncodable<APIActionRowComponent<ReturnType<ComponentType['toJSON']>>> | APIActionRowComponent<ReturnType<ComponentType['toJSON']>>, ): ActionRowBuilder<ComponentType>; } export type MessageActionRowComponent = | ButtonComponent | StringSelectMenuComponent | UserSelectMenuComponent | RoleSelectMenuComponent | MentionableSelectMenuComponent | ChannelSelectMenuComponent; export type ModalActionRowComponent = TextInputComponent; export class ActionRow<ComponentType extends MessageActionRowComponent | ModalActionRowComponent> extends Component< APIActionRowComponent<APIComponentInMessageActionRow | APIComponentInModalActionRow> > { private constructor(data: APIActionRowComponent<APIComponentInMessageActionRow | APIComponentInModalActionRow>); public readonly components: ComponentType[]; public toJSON(): APIActionRowComponent<ReturnType<ComponentType['toJSON']>>; } export class ActivityFlagsBitField extends BitField<ActivityFlagsString> { public static Flags: typeof ActivityFlags; public static resolve(bit?: BitFieldResolvable<ActivityFlagsString, number>): number; } export abstract class AnonymousGuild extends BaseGuild { protected constructor(client: Client<true>, data: RawAnonymousGuildData, immediatePatch?: boolean); public banner: string | null; public description: string | null; public nsfwLevel: GuildNSFWLevel; public premiumSubscriptionCount: number | null; public splash: string | null; public vanityURLCode: string | null; public verificationLevel: GuildVerificationLevel; public bannerURL(options?: ImageURLOptions): string | null; public splashURL(options?: ImageURLOptions): string | null; } export class AutoModerationActionExecution { private constructor(data: GatewayAutoModerationActionExecutionDispatchData, guild: Guild); public guild: Guild; public action: AutoModerationAction; public ruleId: Snowflake; public ruleTriggerType: AutoModerationRuleTriggerType; public get user(): User | null; public userId: Snowflake; public get channel(): GuildTextBasedChannel | ForumChannel | MediaChannel | null; public channelId: Snowflake | null; public get member(): GuildMember | null; public messageId: Snowflake | null; public alertSystemMessageId: Snowflake | null; public content: string; public matchedKeyword: string | null; public matchedContent: string | null; public get autoModerationRule(): AutoModerationRule | null; } export class AutoModerationRule extends Base { private constructor(client: Client<true>, data: APIAutoModerationRule, guild: Guild); public id: Snowflake; public guild: Guild; public name: string; public creatorId: Snowflake; public eventType: AutoModerationRuleEventType; public triggerType: AutoModerationRuleTriggerType; public triggerMetadata: AutoModerationTriggerMetadata; public actions: AutoModerationAction[]; public enabled: boolean; public exemptRoles: Collection<Snowflake, Role>; public exemptChannels: Collection<Snowflake, GuildBasedChannel>; public edit(options: AutoModerationRuleEditOptions): Promise<AutoModerationRule>; public delete(reason?: string): Promise<void>; public setName(name: string, reason?: string): Promise<AutoModerationRule>; public setEventType(eventType: AutoModerationRuleEventType, reason?: string): Promise<AutoModerationRule>; public setKeywordFilter(keywordFilter: readonly string[], reason?: string): Promise<AutoModerationRule>; public setRegexPatterns(regexPatterns: readonly string[], reason?: string): Promise<AutoModerationRule>; public setPresets( presets: readonly AutoModerationRuleKeywordPresetType[], reason?: string, ): Promise<AutoModerationRule>; public setAllowList(allowList: readonly string[], reason?: string): Promise<AutoModerationRule>; public setMentionTotalLimit(mentionTotalLimit: number, reason?: string): Promise<AutoModerationRule>; public setMentionRaidProtectionEnabled( mentionRaidProtectionEnabled: boolean, reason?: string, ): Promise<AutoModerationRule>; public setActions(actions: readonly AutoModerationActionOptions[], reason?: string): Promise<AutoModerationRule>; public setEnabled(enabled?: boolean, reason?: string): Promise<AutoModerationRule>; public setExemptRoles( roles: ReadonlyCollection<Snowflake, Role> | readonly RoleResolvable[], reason?: string, ): Promise<AutoModerationRule>; public setExemptChannels( channels: ReadonlyCollection<Snowflake, GuildBasedChannel> | readonly GuildChannelResolvable[], reason?: string, ): Promise<AutoModerationRule>; } export abstract class Application extends Base { protected constructor(client: Client<true>, data: RawApplicationData); public get createdAt(): Date; public get createdTimestamp(): number; public description: string | null; public icon: string | null; public id: Snowflake; public name: string | null; public termsOfServiceURL: string | null; public privacyPolicyURL: string | null; public rpcOrigins: string[]; public cover: string | null; public verifyKey: string | null; public coverURL(options?: ImageURLOptions): string | null; public iconURL(options?: ImageURLOptions): string | null; public toJSON(): unknown; public toString(): string | null; } export class ApplicationCommand<PermissionsFetchType = {}> extends Base { private constructor(client: Client<true>, data: RawApplicationCommandData, guild?: Guild, guildId?: Snowflake); public applicationId: Snowflake; public contexts: InteractionContextType[] | null; public get createdAt(): Date; public get createdTimestamp(): number; public defaultMemberPermissions: Readonly<PermissionsBitField> | null; public description: string; public descriptionLocalizations: LocalizationMap | null; public descriptionLocalized: string | null; /** @deprecated Use {@link ApplicationCommand.contexts} instead */ public dmPermission: boolean | null; public guild: Guild | null; public guildId: Snowflake | null; public get manager(): ApplicationCommandManager; public id: Snowflake; public integrationTypes: ApplicationIntegrationType[] | null; public handler: EntryPointCommandHandlerType | null; public name: string; public nameLocalizations: LocalizationMap | null; public nameLocalized: string | null; public options: (ApplicationCommandOption & { nameLocalized?: string; descriptionLocalized?: string })[]; public permissions: ApplicationCommandPermissionsManager< PermissionsFetchType, PermissionsFetchType, Guild | null, Snowflake >; public type: ApplicationCommandType; public version: Snowflake; public nsfw: boolean; public delete(): Promise<ApplicationCommand<PermissionsFetchType>>; public edit(data: Partial<ApplicationCommandData>): Promise<ApplicationCommand<PermissionsFetchType>>; public setName(name: string): Promise<ApplicationCommand<PermissionsFetchType>>; public setNameLocalizations(nameLocalizations: LocalizationMap): Promise<ApplicationCommand<PermissionsFetchType>>; public setDescription(description: string): Promise<ApplicationCommand<PermissionsFetchType>>; public setDescriptionLocalizations( descriptionLocalizations: LocalizationMap, ): Promise<ApplicationCommand<PermissionsFetchType>>; public setDefaultMemberPermissions( defaultMemberPermissions: PermissionResolvable | null, ): Promise<ApplicationCommand<PermissionsFetchType>>; public setDMPermission(dmPermission?: boolean): Promise<ApplicationCommand<PermissionsFetchType>>; public setOptions( options: readonly ApplicationCommandOptionData[], ): Promise<ApplicationCommand<PermissionsFetchType>>; public equals( command: ApplicationCommand | ApplicationCommandData | RawApplicationCommandData, enforceOptionOrder?: boolean, ): boolean; public static optionsEqual( existing: readonly ApplicationCommandOption[], options: | readonly ApplicationCommandOption[] | readonly ApplicationCommandOptionData[] | readonly APIApplicationCommandOption[], enforceOptionOrder?: boolean, ): boolean; private static _optionEquals( existing: ApplicationCommandOption, options: ApplicationCommandOption | ApplicationCommandOptionData | APIApplicationCommandOption, enforceOptionOrder?: boolean, ): boolean; private static transformOption(option: ApplicationCommandOptionData, received?: boolean): unknown; private static transformCommand(command: ApplicationCommandData): RESTPostAPIApplicationCommandsJSONBody; private static isAPICommandData(command: object): command is RESTPostAPIApplicationCommandsJSONBody; } export class ApplicationRoleConnectionMetadata { private constructor(data: APIApplicationRoleConnectionMetadata); public name: string; public nameLocalizations: LocalizationMap | null; public description: string; public descriptionLocalizations: LocalizationMap | null; public key: string; public type: ApplicationRoleConnectionMetadataType; } export type ApplicationResolvable = Application | Activity | Snowflake; export class ApplicationFlagsBitField extends BitField<ApplicationFlagsString> { public static Flags: typeof ApplicationFlags; public static resolve(bit?: BitFieldResolvable<ApplicationFlagsString, number>): number; } export type ApplicationFlagsResolvable = BitFieldResolvable<ApplicationFlagsString, number>; export type AutoModerationRuleResolvable = AutoModerationRule | Snowflake; export abstract class Base { public constructor(client: Client<true>); public readonly client: Client<true>; public toJSON(...props: Record<string, boolean | string>[]): unknown; public valueOf(): string; } export class BaseClient extends EventEmitter implements AsyncDisposable { public constructor(options?: ClientOptions | WebhookClientOptions); private decrementMaxListeners(): void; private incrementMaxListeners(): void; public options: ClientOptions | WebhookClientOptions; public rest: REST; public destroy(): void; public toJSON(...props: Record<string, boolean | string>[]): unknown; public [Symbol.asyncDispose](): Promise<void>; } export type GuildCacheMessage<Cached extends CacheType> = CacheTypeReducer< Cached, Message<true>, APIMessage, Message | APIMessage, Message | APIMessage >; export type BooleanCache<Cached extends CacheType> = Cached extends 'cached' ? true : false; export abstract class CommandInteraction<Cached extends CacheType = CacheType> extends BaseInteraction<Cached> { public type: InteractionType.ApplicationCommand; public get command(): ApplicationCommand | ApplicationCommand<{ guild: GuildResolvable }> | null; public channelId: Snowflake; public commandId: Snowflake; public commandName: string; public commandType: ApplicationCommandType; public commandGuildId: Snowflake | null; public deferred: boolean; public ephemeral: boolean | null; public replied: boolean; public webhook: InteractionWebhook; public inGuild(): this is CommandInteraction<'raw' | 'cached'>; public inCachedGuild(): this is CommandInteraction<'cached'>; public inRawGuild(): this is CommandInteraction<'raw'>; public deferReply( options: InteractionDeferReplyOptions & { withResponse: true }, ): Promise<InteractionCallbackResponse>; /** @deprecated `fetchReply` is deprecated. Use `withResponse` instead or fetch the response after using the method. */ public deferReply( options: InteractionDeferReplyOptions & { fetchReply: true }, ): Promise<Message<BooleanCache<Cached>>>; public deferReply(options?: InteractionDeferReplyOptions): Promise<InteractionResponse<BooleanCache<Cached>>>; public deleteReply(message?: MessageResolvable | '@original'): Promise<void>; public editReply( options: string | MessagePayload | InteractionEditReplyOptions, ): Promise<Message<BooleanCache<Cached>>>; public fetchReply(message?: Snowflake | '@original'): Promise<Message<BooleanCache<Cached>>>; public followUp(options: string | MessagePayload | InteractionReplyOptions): Promise<Message<BooleanCache<Cached>>>; public reply(options: InteractionReplyOptions & { withResponse: true }): Promise<InteractionCallbackResponse>; /** @deprecated `fetchReply` is deprecated. Use `withResponse` instead or fetch the response after using the method. */ public reply(options: InteractionReplyOptions & { fetchReply: true }): Promise<Message<BooleanCache<Cached>>>; public reply( options: string | MessagePayload | InteractionReplyOptions, ): Promise<InteractionResponse<BooleanCache<Cached>>>; public launchActivity(options: LaunchActivityOptions & { withResponse: true }): Promise<InteractionCallbackResponse>; public launchActivity(options?: LaunchActivityOptions & { withResponse?: false }): Promise<undefined>; public launchActivity(options?: LaunchActivityOptions): Promise<InteractionCallbackResponse | undefined>; public showModal( modal: | JSONEncodable<APIModalInteractionResponseCallbackData> | ModalComponentData | APIModalInteractionResponseCallbackData, options: ShowModalOptions & { withResponse: true }, ): Promise<InteractionCallbackResponse>; public showModal( modal: | JSONEncodable<APIModalInteractionResponseCallbackData> | ModalComponentData | APIModalInteractionResponseCallbackData, options?: ShowModalOptions & { withResponse: true }, ): Promise<InteractionCallbackResponse>; public showModal( modal: | JSONEncodable<APIModalInteractionResponseCallbackData> | ModalComponentData | APIModalInteractionResponseCallbackData, options?: ShowModalOptions, ): Promise<undefined>; /** @deprecated Sending a premium-style button is the new Discord behaviour. */ public sendPremiumRequired(): Promise<void>; public awaitModalSubmit( options: AwaitModalSubmitOptions<ModalSubmitInteraction>, ): Promise<ModalSubmitInteraction<Cached>>; private transformOption( option: APIApplicationCommandOption, resolved: Extract< APIApplicationCommandInteractionData, APIChatInputApplicationCommandInteractionData | APIContextMenuInteractionData >['resolved'], ): CommandInteractionOption<Cached>; } export class InteractionResponse<Cached extends boolean = boolean> { private constructor(interaction: Interaction, id?: Snowflake); public interaction: Interaction<WrapBooleanCache<Cached>>; public client: Client; public id: Snowflake; public get createdAt(): Date; public get createdTimestamp(): number; public awaitMessageComponent<ComponentType extends MessageComponentType>( options?: AwaitMessageCollectorOptionsParams<ComponentType, Cached>, ): Promise<MappedInteractionTypes<Cached>[ComponentType]>; public createMessageComponentCollector<ComponentType extends MessageComponentType>( options?: MessageCollectorOptionsParams<ComponentType, Cached>, ): InteractionCollector<MappedInteractionTypes<Cached>[ComponentType]>; public delete(): Promise<void>; public edit(options: string | MessagePayload | WebhookMessageEditOptions): Promise<Message>; public fetch(): Promise<Message>; } export abstract class BaseGuild extends Base { protected constructor(client: Client<true>, data: RawBaseGuildData); public get createdAt(): Date; public get createdTimestamp(): number; public features: `${GuildFeature}`[]; public icon: string | null; public id: Snowflake; public name: string; public get nameAcronym(): string; public get partnered(): boolean; public get verified(): boolean; public fetch(): Promise<Guild>; public iconURL(options?: ImageURLOptions): string | null; public toString(): string; } export class BaseGuildEmoji extends Emoji { protected constructor(client: Client<true>, data: RawGuildEmojiData, guild: Guild | GuildPreview); public imageURL(options?: BaseImageURLOptions): string; public get url(): string; public available: boolean | null; public get createdAt(): Date; public get createdTimestamp(): number; public guild: Guild | GuildPreview; public id: Snowflake; public managed: boolean | null; public requiresColons: boolean | null; } // tslint:disable-next-line no-empty-interface export interface BaseGuildTextChannel extends TextBasedChannelFields<true> {} export class BaseGuildTextChannel extends GuildChannel { protected constructor(guild: Guild, data?: RawGuildChannelData, client?: Client<true>, immediatePatch?: boolean); public defaultAutoArchiveDuration?: ThreadAutoArchiveDuration; public defaultThreadRateLimitPerUser: number | null; public rateLimitPerUser: number | null; public nsfw: boolean; public threads: GuildTextThreadManager<AllowedThreadTypeForTextChannel | AllowedThreadTypeForNewsChannel>; public topic: string | null; public createInvite(options?: InviteCreateOptions): Promise<Invite>; public fetchInvites(cache?: boolean): Promise<Collection<string, Invite>>; public setDefaultAutoArchiveDuration( defaultAutoArchiveDuration: ThreadAutoArchiveDuration, reason?: string, ): Promise<this>; public setTopic(topic: string | null, reason?: string): Promise<this>; public setType(type: ChannelType.GuildText, reason?: string): Promise<TextChannel>; public setType(type: ChannelType.GuildAnnouncement, reason?: string): Promise<NewsChannel>; } // tslint:disable-next-line no-empty-interface export interface BaseGuildVoiceChannel extends Omit<TextBasedChannelFields<true>, 'lastPinTimestamp' | 'lastPinAt'> {} export class BaseGuildVoiceChannel extends GuildChannel { public constructor(guild: Guild, data?: RawGuildChannelData); public bitrate: number; public get full(): boolean; public get joinable(): boolean; public get members(): Collection<Snowflake, GuildMember>; public nsfw: boolean; public rateLimitPerUser: number | null; public rtcRegion: string | null; public userLimit: number; public videoQualityMode: VideoQualityMode | null; public createInvite(options?: InviteCreateOptions): Promise<Invite>; public fetchInvites(cache?: boolean): Promise<Collection<string, Invite>>; public setBitrate(bitrate: number, reason?: string): Promise<this>; public setRTCRegion(rtcRegion: string | null, reason?: string): Promise<this>; public setUserLimit(userLimit: number, reason?: string): Promise<this>; public setVideoQualityMode(videoQualityMode: VideoQualityMode, reason?: string): Promise<this>; } export type EnumLike<Enum, Value> = Record<keyof Enum, Value>; export class BitField<Flags extends string, Type extends number | bigint = number> { public constructor(bits?: BitFieldResolvable<Flags, Type>); public bitfield: Type; public add(...bits: BitFieldResolvable<Flags, Type>[]): BitField<Flags, Type>; public any(bit: BitFieldResolvable<Flags, Type>): boolean; public equals(bit: BitFieldResolvable<Flags, Type>): boolean; public freeze(): Readonly<BitField<Flags, Type>>; public has(bit: BitFieldResolvable<Flags, Type>): boolean; public missing(bits: BitFieldResolvable<Flags, Type>, ...hasParams: readonly unknown[]): Flags[]; public remove(...bits: BitFieldResolvable<Flags, Type>[]): BitField<Flags, Type>; public serialize(...hasParams: readonly unknown[]): Record<Flags, boolean>; public toArray(...hasParams: readonly unknown[]): Flags[]; public toJSON(): Type extends number ? number : string; public valueOf(): Type; public [Symbol.iterator](): IterableIterator<Flags>; public static Flags: EnumLike<unknown, number | bigint>; public static resolve(bit?: BitFieldResolvable<string, number | bigint>): number | bigint; } export class ButtonInteraction<Cached extends CacheType = CacheType> extends MessageComponentInteraction<Cached> { private constructor(client: Client<true>, data: RawMessageButtonInteractionData); public componentType: ComponentType.Button; public get component(): CacheTypeReducer< Cached, ButtonComponent, APIButtonComponent, ButtonComponent | APIButtonComponent, ButtonComponent | APIButtonComponent >; public inGuild(): this is ButtonInteraction<'raw' | 'cached'>; public inCachedGuild(): this is ButtonInteraction<'cached'>; public inRawGuild(): this is ButtonInteraction<'raw'>; } export type AnyComponent = | APIMessageComponent | APIModalComponent | APIActionRowComponent<APIComponentInMessageActionRow | APIComponentInModalActionRow> | AnyComponentV2; export class Component<RawComponentData extends AnyComponent = AnyComponent> { public readonly data: Readonly<RawComponentData>; public get id(): RawComponentData['id']; public get type(): RawComponentData['type']; public toJSON(): RawComponentData; public equals(other: this | RawComponentData): boolean; } export type AnyComponentV2 = APIComponentInContainer | APIContainerComponent | APIThumbnailComponent; export type TopLevelComponent = | ActionRow<MessageActionRowComponent> | ContainerComponent | FileComponent | MediaGalleryComponent | SectionComponent | SeparatorComponent | TextDisplayComponent; export type TopLevelComponentData = | ActionRowData<MessageActionRowComponentData> | ContainerComponentData | FileComponentData | MediaGalleryComponentData | SectionComponentData | SeparatorComponentData | TextDisplayComponentData; export class ButtonComponent extends Component<APIButtonComponent> { private constructor(data: APIButtonComponent); public get style(): ButtonStyle; public get label(): string | null; public get emoji(): APIMessageComponentEmoji | null; public get disabled(): boolean; public get customId(): string | null; public get url(): string | null; } export type ComponentEmojiResolvable = APIMessageComponentEmoji | string; export class ButtonBuilder extends BuilderButtonComponent { public constructor(data?: Partial<ButtonComponentData> | Partial<APIButtonComponent>); public static from(other: JSONEncodable<APIButtonComponent> | APIButtonComponent): ButtonBuilder; public override setEmoji(emoji: ComponentEmojiResolvable): this; } export class StringSelectMenuBuilder extends BuilderStringSelectMenuComponent { public constructor(data?: Partial<StringSelectMenuComponentData | APIStringSelectComponent>); private static normalizeEmoji( selectMenuOption: JSONEncodable<APISelectMenuOption> | SelectMenuComponentOptionData, ): (APISelectMenuOption | StringSelectMenuOptionBuilder)[]; public override addOptions( ...options: RestOrArray<BuildersSelectMenuOption | SelectMenuComponentOptionData | APISelectMenuOption> ): this; public override setOptions( ...options: RestOrArray<BuildersSelectMenuOption | SelectMenuComponentOptionData | APISelectMenuOption> ): this; public static from( other: JSONEncodable<APIStringSelectComponent> | APIStringSelectComponent, ): StringSelectMenuBuilder; } export { /** @deprecated Use {@link StringSelectMenuBuilder} instead */ StringSelectMenuBuilder as SelectMenuBuilder, /** @deprecated Use {@link StringSelectMenuOptionBuilder} instead */ StringSelectMenuOptionBuilder as SelectMenuOptionBuilder, }; export class UserSelectMenuBuilder extends BuilderUserSelectMenuComponent { public constructor(data?: Partial<UserSelectMenuComponentData | APIUserSelectComponent>); public static from(other: JSONEncodable<APIUserSelectComponent> | APIUserSelectComponent): UserSelectMenuBuilder; } export class RoleSelectMenuBuilder extends BuilderRoleSelectMenuComponent { public constructor(data?: Partial<RoleSelectMenuComponentData | APIRoleSelectComponent>); public static from(other: JSONEncodable<APIRoleSelectComponent> | APIRoleSelectComponent): RoleSelectMenuBuilder; } export class MentionableSelectMenuBuilder extends BuilderMentionableSelectMenuComponent { public constructor(data?: Partial<MentionableSelectMenuComponentData | APIMentionableSelectComponent>); public static from( other: JSONEncodable<APIMentionableSelectComponent> | APIMentionableSelectComponent, ): MentionableSelectMenuBuilder; } export class ChannelSelectMenuBuilder extends BuilderChannelSelectMenuComponent { public constructor(data?: Partial<ChannelSelectMenuComponentData | APIChannelSelectComponent>); public static from( other: JSONEncodable<APIChannelSelectComponent> | APIChannelSelectComponent, ): ChannelSelectMenuBuilder; } export class StringSelectMenuOptionBuilder extends BuildersSelectMenuOption { public constructor(data?: SelectMenuComponentOptionData | APISelectMenuOption); public override setEmoji(emoji: ComponentEmojiResolvable): this; public static from(other: JSONEncodable<APISelectMenuOption> | APISelectMenuOption): StringSelectMenuOptionBuilder; } export class ModalBuilder extends BuildersModal { public constructor(data?: Partial<ModalComponentData> | Partial<APIModalInteractionResponseCallbackData>); public static from( other: JSONEncodable<APIModalInteractionResponseCallbackData> | APIModalInteractionResponseCallbackData, ): ModalBuilder; } export class TextInputBuilder extends BuilderTextInputComponent { public constructor(data?: Partial<TextInputComponentData | APITextInputComponent>); public static from(other: JSONEncodable<APITextInputComponent> | APITextInputComponent): TextInputBuilder; } export class TextInputComponent extends Component<APITextInputComponent> { public get customId(): string; public get value(): string; } export class BaseSelectMenuComponent<Data extends APISelectMenuComponent> extends Component<Data> { protected constructor(data: Data); public get placeholder(): string | null; public get maxValues(): number | null; public get minValues(): number | null; public get customId(): string; public get disabled(): boolean; } export class StringSelectMenuComponent extends BaseSelectMenuComponent<APIStringSelectComponent> { public get options(): APISelectMenuOption[]; } export { /** @deprecated Use {@link StringSelectMenuComponent} instead */ StringSelectMenuComponent as SelectMenuComponent, }; export class UserSelectMenuComponent extends BaseSelectMenuComponent<APIUserSelectComponent> {} export class RoleSelectMenuComponent extends BaseSelectMenuComponent<APIRoleSelectComponent> {} export class MentionableSelectMenuComponent extends BaseSelectMenuComponent<APIMentionableSelectComponent> {} export class ChannelSelectMenuComponent extends BaseSelectMenuComponent<APIChannelSelectComponent> { public getChannelTypes(): ChannelType[] | null; } export interface EmbedData { title?: string; type?: EmbedType; description?: string; url?: string; timestamp?: string | number | Date; color?: number; footer?: EmbedFooterData; image?: EmbedAssetData; thumbnail?: EmbedAssetData; provider?: APIEmbedProvider; author?: EmbedAuthorData; fields?: readonly APIEmbedField[]; video?: EmbedAssetData; } export interface IconData { iconURL?: string; proxyIconURL?: string; } export interface EmbedAuthorData extends Omit<APIEmbedAuthor, 'icon_url' | 'proxy_icon_url'>, IconData {} export interface EmbedFooterData extends Omit<APIEmbedFooter, 'icon_url' | 'proxy_icon_url'>, IconData {} export interface EmbedAssetData extends Omit<APIEmbedImage, 'proxy_url'> { proxyURL?: string; } export class EmbedBuilder extends BuildersEmbed { public constructor(data?: EmbedData | APIEmbed); public override setColor(color: ColorResolvable | null): this; public static from(other: JSONEncodable<APIEmbed> | APIEmbed): EmbedBuilder; public get length(): number; } export class Embed { private constructor(data: APIEmbed); public readonly data: Readonly<APIEmbed>; public get fields(): APIEmbedField[]; public get footer(): EmbedFooterData | null; public get title(): string | null; public get description(): string | null; public get url(): string | null; public get color(): number | null; public get hexColor(): string | null; public get timestamp(): string | null; public get thumbnail(): EmbedAssetData | null; public get image(): EmbedAssetData | null; public get author(): EmbedAuthorData | null; public get provider(): APIEmbedProvider | null; public get video(): EmbedAssetData | null; public get length(): number; public equals(other: Embed | APIEmbed): boolean; public toJSON(): APIEmbed; } export interface MappedChannelCategoryTypes { [ChannelType.GuildAnnouncement]: NewsChannel; [ChannelType.GuildVoice]: VoiceChannel; [ChannelType.GuildText]: TextChannel; [ChannelType.GuildStageVoice]: StageChannel; [ChannelType.GuildForum]: ForumChannel; [ChannelType.GuildMedia]: MediaChannel; } export type CategoryChannelType = Exclude< ChannelType, | ChannelType.DM | ChannelType.GroupDM | ChannelType.PublicThread | ChannelType.AnnouncementThread | ChannelType.PrivateThread | ChannelType.GuildCategory | ChannelType.GuildDirectory >; export class CategoryChannel extends GuildChannel { public get children(): CategoryChannelChildManager; public type: ChannelType.GuildCategory; public get parent(): null; public parentId: null; } export type CategoryChannelResolvable = Snowflake | CategoryChannel; export type ChannelFlagsString = keyof typeof ChannelFlags; export type ChannelFlagsResolvable = BitFieldResolvable<ChannelFlagsString, number>; export class ChannelFlagsBitField extends BitField<ChannelFlagsString> { public static Flags: typeof ChannelFlags; public static resolve(bit?: BitFieldResolvable<ChannelFlagsString, ChannelFlags>): number; } export abstract class BaseChannel extends Base { public constructor(client: Client<true>, data?: RawChannelData, immediatePatch?: boolean); public get createdAt(): Date | null; public get createdTimestamp(): number | null; public id: Snowflake; public flags: Readonly<ChannelFlagsBitField> | null; public get partial(): false; public type: ChannelType; public get url(): string; public delete(): Promise<this>; public fetch(force?: boolean): Promise<this>; public isThread(): this is AnyThreadChannel; public isTextBased(): this is TextBasedChannel; public isDMBased(): this is PartialGroupDMChannel | DMChannel | PartialDMChannel; public isVoiceBased(): this is VoiceBasedChannel; public isThreadOnly(): this is ThreadOnlyChannel; public isSendable(): this is SendableChannels; public toString(): ChannelMention | UserMention; } export type If<Value extends boolean, TrueResult, FalseResult = null> = Value extends true ? TrueResult : Value extends false ? FalseResult : TrueResult | FalseResult; /** @internal */ type AsyncEventIteratorDisposability = ReturnType<typeof EventEmitter.on> extends AsyncDisposable ? AsyncDisposable : {}; /** @internal */ interface AsyncEventIterator<Params extends any[]> extends AsyncIterableIterator<Params>, AsyncEventIteratorDisposability { [Symbol.asyncIterator](): AsyncEventIterator<Params>; } export class Client<Ready extends boolean = boolean> extends BaseClient { public constructor(options: ClientOptions); private actions: unknown; private presence: ClientPresence; private _eval(script: string): unknown; private _validateOptions(options: ClientOptions): void; private get _censoredToken(): string | null; // This a technique used to brand the ready state. Or else we'll get `never` errors on typeguard checks. private readonly _ready: Ready; // Override inherited static EventEmitter methods, with added type checks for Client events. public static once<Emitter extends EventEmitter, Event extends keyof ClientEvents>( eventEmitter: Emitter, eventName: Emitter extends Client ? Event : string | symbol, options?: { signal?: AbortSignal | undefined }, ): Promise<Emitter extends Client ? ClientEvents[Event] : any[]>; public static on<Emitter extends EventEmitter, Event extends keyof ClientEvents>( eventEmitter: Emitter, eventName: Emitter extends Client ? Event : string | symbol, options?: { signal?: AbortSignal | undefined }, ): AsyncEventIterator<Emitter extends Client ? ClientEvents[Event] : any[]>; public application: If<Ready, ClientApplication>; public channels: ChannelManager; public get emojis(): BaseGuildEmojiManager; public guilds: GuildManager; public options: Omit<ClientOptions, 'intents'> & { intents: IntentsBitField }; public get readyAt(): If<Ready, Date>; public readyTimestamp: If<Ready, number>; public sweepers: Sweepers; public shard: ShardClientUtil | null; public token: If<Ready, string, string | null>; public get uptime(): If<Ready, number>; public user: If<Ready, ClientUser>; public users: UserManager; public voice: ClientVoiceManager; public ws: WebSocketManager; public destroy(): Promise<void>; public deleteWebhook(id: Snowflake, options?: WebhookDeleteOptions): Promise<void>; public fetchGuildPreview(guild: GuildResolvable): Promise<GuildPreview>; public fetchInvite(invite: InviteResolvable, options?: ClientFetchInviteOptions): Promise<Invite>; public fetchGuildTemplate(template: GuildTemplateResolvable): Promise<GuildTemplate>; public fetchVoiceRegions(): Promise<Collection<string, VoiceRegion>>; public fetchSticker(id: Snowflake): Promise<Sticker>; public fetchStickerPacks(options: { packId: Snowflake }): Promise<StickerPack>; public fetchStickerPacks(options?: StickerPackFetchOptions): Promise<Collection<Snowflake, StickerPack>>; /** @deprecated Use {@link Client.fetchStickerPacks} instead. */ public fetchPremiumStickerPacks(): ReturnType<Client['fetchStickerPacks']>; public fetchWebhook(id: Snowflake, token?: string): Promise<Webhook>; public fetchGuildWidget(guild: GuildResolvable): Promise<Widget>; public generateInvite(options?: InviteGenerationOptions): string; public login(token?: string): Promise<string>; public isReady(): this is Client<true>; public toJSON(): unknown; public on<Event extends keyof ClientEvents>(event: Event, listener: (...args: ClientEvents[Event]) => void): this; public on<Event extends string | symbol>( event: Exclude<Event, keyof ClientEvents>, listener: (...args: any[]) => void, ): this; public once<Event extends keyof ClientEvents>(event: Event, listener: (...args: ClientEvents[Event]) => void): this; public once<Event extends string | symbol>( event: Exclude<Event, keyof ClientEvents>, listener: (...args: any[]) => void, ): this; public emit<Event extends keyof ClientEvents>(event: Event, ...args: ClientEvents[Event]): boolean; public emit<Event extends string | symbol>(event: Exclude<Event, keyof ClientEvents>, ...args: unknown[]): boolean; public off<Event extends keyof ClientEvents>(event: Event, listener: (...args: ClientEvents[Event]) => void): this; public off<Event extends string | symbol>( event: Exclude<Event, keyof ClientEvents>, listener: (...args: any[]) => void, ): this; public removeAllListeners<Event extends keyof ClientEvents>(event?: Event): this; public removeAllListeners<Event extends string | symbol>(event?: Exclude<Event, keyof ClientEvents>): this; } export interface StickerPackFetchOptions { packId?: Snowflake; } export class ClientApplication extends Application { private constructor(client: Client<true>, data: RawClientApplicationData); public botPublic: boolean | null; public botRequireCodeGrant: boolean | null; public bot: User | null; public commands: ApplicationCommandManager; public emojis: ApplicationEmojiManager; public entitlements: EntitlementManager; public subscriptions: SubscriptionManager; public guildId: Snowflake | null; public get guild(): Guild | null; public flags: Readonly<ApplicationFlagsBitField>; public approximateGuildCount: number | null; public approximateUserInstallCount: number | null; public approximateUserAuthorizationCount: number | null; public tags: string[]; public installParams: ClientApplicationInstallParams | null; public integrationTypesConfig: IntegrationTypesConfiguration | null; public customInstallURL: string | null; public owner: User | Team | null; public get partial(): boolean; public interactionsEndpointURL: string | null; public eventWebhooksURL: string | null; public eventWebhooksStatus: ApplicationWebhookEventStatus | null; public eventWebhooksTypes: ApplicationWebhookEventType[] | null; public roleConnectionsVerificationURL: string | null; public edit(options: ClientApplicationEditOptions): Promise<ClientApplication>; public fetch(): Promise<ClientApplication>; public fetchRoleConnectionMetadataRecords(): Promise<ApplicationRoleConnectionMetadata[]>; public fetchSKUs(): Promise<Collection<Snowflake, SKU>>; public editRoleConnectionMetadataRecords( records: readonly ApplicationRoleConnectionMetadataEditOptions[], ): Promise<ApplicationRoleConnectionMetadata[]>; } export class ClientPresence extends Presence { private constructor(client: Client<true>, data: RawPresenceData); private _parse(data: PresenceData): RawPresenceData; public set(presence: PresenceData): ClientPresence; } export class ClientUser extends User { public mfaEnabled: boolean; public get presence(): ClientPresence; public verified: boolean; public edit(options: ClientUserEditOptions): Promise<this>; public setActivity(options?: ActivityOptions): ClientPresence; public setActivity(name: string, options?: Omit<ActivityOptions, 'name'>): ClientPresence; public setAFK(afk?: boolean, shardId?: number | readonly number[]): ClientPresence; public setAvatar(avatar: BufferResolvable | Base64Resolvable | null): Promise<this>; public setBanner(banner: BufferResolvable | Base64Resolvable | null): Promise<this>; public setPresence(data: PresenceData): ClientPresence; public setStatus(status: PresenceStatusData, shardId?: number | readonly number[]): ClientPresence; public setUsername(username: string): Promise<this>; } export class Options extends null { private constructor(); private static userAgentAppendix: string; public static get DefaultMakeCacheSettings(): CacheWithLimitsOptions; public static get DefaultSweeperSettings(): SweeperOptions; public static createDefault(): ClientOptions; public static cacheWithLimits(settings?: CacheWithLimitsOptions): CacheFactory; public static cacheEverything(): CacheFactory; } export class ClientVoiceManager { private constructor(client: Client); public readonly client: Client; public adapters: Map<Snowflake, InternalDiscordGatewayAdapterLibraryMethods>; } export type ComponentInContainer = | ActionRow<MessageActionRowComponent> | FileComponent | MediaGalleryComponent | SectionComponent | SeparatorComponent | TextDisplayComponent; export type ComponentInContainerData = | ActionRowData<ActionRowComponentData> | FileComponentData | MediaGalleryComponentData | SectionComponentData | SeparatorComponentData | TextDisplayComponentData; export interface ContainerComponentData< ComponentType extends JSONEncodable<APIComponentInContainer> | ComponentInContainerData = | JSONEncodable<APIComponentInContainer> | ComponentInContainerData, > extends BaseComponentData { components: readonly ComponentType[]; accentColor?: number; spoiler?: boolean; } export class ContainerComponent extends Component<APIContainerComponent> { private constructor(data: APIContainerComponent); public get accentColor(): number; public get hexAccentColor(): HexColorString; public get spoiler(): boolean; public readonly components: ComponentInContainer[]; } export { Collection, ReadonlyCollection } from '@discordjs/collection'; export interface CollectorEventTypes<Key, Value, Extras extends unknown[] = []> { collect: [Value, ...Extras]; ignore: [Value, ...Extras]; dispose: [Value, ...Extras]; end: [collected: ReadonlyCollection<Key, Value>, reason: string]; } export abstract class Collector<Key, Value, Extras extends unknown[] = []> extends EventEmitter { protected constructor(client: Client<true>, options?: CollectorOptions<[Value, ...Extras]>); private _timeout: NodeJS.Timeout | null; private _idletimeout: NodeJS.Timeout | null; private _endReason: string | null; public readonly client: Client; public collected: Collection<Key, Value>; public lastCollectedTimestamp: number | null; public get lastCollectedAt(): Date | null; public ended: boolean; public get endReason(): string | null; public filter: CollectorFilter<[Value, ...Extras]>; public get next(): Promise<Value>; public options: CollectorOptions<[Value, ...Extras]>; public checkEnd(): boolean; public handleCollect(...args: unknown[]): Promise<void>; public handleDispose(...args: unknown[]): Promise<void>; public stop(reason?: string): void; public resetTimer(options?: CollectorResetTimerOptions): void; public [Symbol.asyncIterator](): AsyncIterableIterator<[Value, ...Extras]>; public toJSON(): unknown; protected listener: (...args: any[]) => void; public abstract collect(...args: unknown[]): Awaitable<Key | null>; public abstract dispose(...args: unknown[]): Key | null; public on<EventKey extends keyof CollectorEventTypes<Key, Value, Extras>>( event: EventKey, listener: (...args: CollectorEventTypes<Key, Value, Extras>[EventKey]) => void, ): this; public once<EventKey extends keyof CollectorEventTypes<Key, Value, Extras>>( event: EventKey, listener: (...args: CollectorEventTypes<Key, Value, Extras>[EventKey]) => void, ): this; } export class ChatInputCommandInteraction<Cached extends CacheType = CacheType> extends CommandInteraction<Cached> { public commandType: ApplicationCommandType.ChatInput; public options: Omit<CommandInteractionOptionResolver<Cached>, 'getMessage' | 'getFocused'>; public inGuild(): this is ChatInputCommandInteraction<'raw' | 'cached'>; public inCachedGuild(): this is ChatInputCommandInteraction<'cached'>; public inRawGuild(): this is ChatInputCommandInteraction<'raw'>; public toString(): string; } export class AutocompleteInteraction<Cached extends CacheType = CacheType> extends BaseInteraction<Cached> { public type: InteractionType.ApplicationCommandAutocomplete; public get command(): ApplicationCommand | ApplicationCommand<{ guild: GuildResolvable }> | null; public channelId: Snowflake; public commandId: Snowflake; public commandName: string; public commandType: ApplicationCommandType.ChatInput; public commandGuildId: Snowflake | null; public responded: boolean; public options: Omit< CommandInteractionOptionResolver<Cached>, 'getMessage' | 'getUser' | 'getAttachment' | 'getChannel' | 'getMember' | 'getMentionable' | 'getRole' >; public inGuild(): this is AutocompleteInteraction<'raw' | 'cached'>; public inCachedGuild(): this is AutocompleteInteraction<'cached'>; public inRawGuild(): this is AutocompleteInteraction<'raw'>; public respond(options: readonly ApplicationCommandOptionChoiceData[]): Promise<void>; } export class CommandInteractionOptionResolver<Cached extends CacheType = CacheType> { private constructor( client: Client<true>, options: readonly CommandInteractionOption[], resolved: CommandInteractionResolvedData, ); public readonly client: Client; public readonly data: readonly CommandInteractionOption<Cached>[]; public readonly resolved: Readonly<CommandInteractionResolvedData<Cached>> | null; private _group: string | null; private _hoistedOptions: CommandInteractionOption<Cached>[]; private _subcommand: string | null; private _getTypedOption( name: string, allowedTypes: readonly ApplicationCommandOptionType[], properties: readonly (keyof ApplicationCommandOption)[], required: true, ): CommandInteractionOption<Cached>; private _getTypedOption( name: string, allowedTypes: readonly ApplicationCommandOptionType[], properties: readonly (keyof ApplicationCommandOption)[], required: boolean, ): CommandInteractionOption<Cached> | null; public get(name: string, required: true): CommandInteractionOption<Cached>; public get(name: string, required?: boolean): CommandInteractionOption<Cached> | null; public getSubcommand(required?: true): string; public getSubcommand(required: boolean): string | null; public getSubcommandGroup(required: true): string; public getSubcommandGroup(required?: boolean): string | null; public getBoolean(name: string, required: true): boolean; public getBoolean(name: string, required?: boolean): boolean | null; /** * @privateRemarks * The ternary in the return type is required. * The `type` property of the {@link PublicThreadChannel} interface is typed as `ChannelType.PublicThread | ChannelType.AnnouncementThread`. * If the user were to pass only one of those channel types, the `Extract<>` would resolve to `never`. */ public getChannel<const Type extends ChannelType = ChannelType>( name: string, required: true, channelTypes?: readonly Type[], ): Extract< NonNullable<CommandInteractionOption<Cached>['channel']>, { type: Type extends ChannelType.PublicThread | ChannelType.AnnouncementThread ? ChannelType.PublicThread | ChannelType.AnnouncementThread : Type; } >; /** * @privateRemarks * The ternary in the return type is required. * The `type` property of the {@link PublicThreadChannel} interface is typed as `ChannelType.PublicThread | ChannelType.AnnouncementThread`. * If the user were to pass only one of those channel types, the `Extract<>` would resolve to `never`. */ public getChannel<const Type extends ChannelType = ChannelType>( name: string, required?: boolean, channelTypes?: readonly Type[], ): Extract< NonNullable<CommandInteractionOption<Cached>['channel']>, { type: Type extends ChannelType.PublicThread | ChannelType.AnnouncementThread ? ChannelType.PublicThread | ChannelType.AnnouncementThread : Type; } > | null; public getString(name: string, required: true): string; public getString(name: string, required?: boolean): string | null; public getInteger(name: string, required: true): number; public getInteger(name: string, required?: boolean): number | null; public getNumber(name: string, required: true): number; public getNumber(name: string, required?: boolean): number | null; public getUser(name: string, required: true): NonNullable<CommandInteractionOption<Cached>['user']>; public getUser(name: string, required?: boolean): NonNullable<CommandInteractionOption<Cached>['user']> | null; public getMember(name: string): NonNullable<CommandInteractionOption<Cached>['member']> | null; public getRole(name: string, required: true): NonNullable<CommandInteractionOption<Cached>['role']>; public getRole(name: string, required?: boolean): NonNullable<CommandInteractionOption<Cached>['role']> | null; public getAttachment(name: string, required: true): NonNullable<CommandInteractionOption<Cached>['attachment']>; public getAttachment( name: string, required?: boolean, ): NonNullable<CommandInteractionOption<Cached>['attachment']> | null; public getMentionable( name: string, required: true, ): NonNullable<CommandInteractionOption<Cached>['member' | 'role' | 'user']>; public getMentionable( name: string, required?: boolean, ): NonNullable<CommandInteractionOption<Cached>['member' | 'role' | 'user']> | null; public getMessage(name: string, required: true): NonNullable<CommandInteractionOption<Cached>['message']>; public getMessage(name: string, required?: boolean): NonNullable<CommandInteractionOption<Cached>['message']> | null; public getFocused(getFull: true): AutocompleteFocusedOption; public getFocused(getFull?: boolean): string; } export class ContextMenuCommandInteraction<Cached extends CacheType = CacheType> extends CommandInteraction<Cached> { public options: Omit< CommandInteractionOptionResolver<Cached>, | 'getMessage' | 'getFocused' | 'getMentionable' | 'getRole' | 'getUser' | 'getMember' | 'getAttachment' | 'getNumber' | 'getInteger' | 'getString' | 'getChannel' | 'getBoolean' | 'getSubcommandGroup' | 'getSubcommand' >; public commandType: ApplicationCommandType.Message | ApplicationCommandType.User; public targetId: Snowflake; public inGuild(): this is ContextMenuCommandInteraction<'raw' | 'cached'>; public inCachedGuild(): this is ContextMenuCommandInteraction<'cached'>; public inRawGuild(): this is ContextMenuCommandInteraction<'raw'>; private resolveContextMenuOptions(data: APIApplicationCommandInteractionData): CommandInteractionOption<Cached>[]; } export class PrimaryEntryPointCommandInteraction< Cached extends CacheType = CacheType, > extends CommandInteraction<Cached> { public commandType: ApplicationCommandType.PrimaryEntryPoint; public inGuild(): this is PrimaryEntryPointCommandInteraction<'raw' | 'cached'>; public inCachedGuild(): this is PrimaryEntryPointCommandInteraction<'cached'>; public inRawGuild(): this is PrimaryEntryPointCommandInteraction<'raw'>; } // tslint:disable-next-line no-empty-interface export interface DMChannel extends Omit< TextBasedChannelFields<false, true>, 'bulkDelete' | 'fetchWebhooks' | 'createWebhook' | 'setRateLimitPerUser' | 'setNSFW' > {} export class DMChannel extends BaseChannel { private constructor(client: Client<true>, data?: RawDMChannelData); public flags: Readonly<ChannelFlagsBitField>; public recipientId: Snowflake; public get recipient(): User | null; public type: ChannelType.DM; public fetch(force?: boolean): Promise<this>; public toString(): UserMention; } export class Emoji extends Base { protected constructor(client: Client<true>, emoji: RawEmojiData); public animated: boolean | null; public get createdAt(): Date | null; public get createdTimestamp(): number | null; public id: Snowflake | null; public name: string | null; public get identifier(): string; public imageURL(options?: BaseImageURLOptions): string | null; public get url(): string | null; public toJSON(): unknown; public toString(): string; } export interface ApplicationEmojiCreateOptions { attachment: BufferResolvable | Base64Resolvable; name: string; } export interface ApplicationEmojiEditOptions { name?: string; } export class ApplicationEmoji extends Emoji { private constructor(client: Client<true>, data: RawApplicationEmojiData, application: ClientApplication); public application: ClientApplication; public author: User | null; public id: Snowflake; public managed: boolean | null; public requiresColons: boolean | null; public delete(): Promise<ApplicationEmoji>; public edit(options: ApplicationEmojiEditOptions): Promise<ApplicationEmoji>; public equals(other: ApplicationEmoji | unknown): boolean; public fetchAuthor(): Promise<User>; public setName(name: string): Promise<ApplicationEmoji>; } export class ApplicationEmojiManager extends CachedManager<Snowflake, ApplicationEmoji, EmojiResolvable> { private constructor(application: ClientApplication, iterable?: Iterable<RawApplicationEmojiData>); public application: ClientApplication; public create(options: ApplicationEmojiCreateOptions): Promise<ApplicationEmoji>; public fetch(id: Snowflake, options?: BaseFetchOptions): Promise<ApplicationEmoji>; public fetch(id?: undefined, options?: BaseFetchOptions): Promise<Collection<Snowflake, ApplicationEmoji>>; public fetchAuthor(emoji: EmojiResolvable): Promise<User>; public delete(emoji: EmojiResolvable): Promise<void>; public edit(emoji: EmojiResolvable, options: ApplicationEmojiEditOptions): Promise<ApplicationEmoji>; } export class Entitlement extends Base { private constructor(client: Client<true>, data: APIEntitlement); public id: Snowflake; public skuId: Snowflake; public userId: Snowflake; public guildId: Snowflake | null; public applicationId: Snowflake; public type: EntitlementType; public consumed: boolean; public deleted: boolean; public startsTimestamp: number | null; public endsTimestamp: number | null; public get guild(): Guild | null; public get startsAt(): Date | null; public get endsAt(): Date | null; public consume(): Promise<void>; public fetchUser(): Promise<User>; public isActive(): boolean; public isTest(): this is this & { startsTimestamp: null; endsTimestamp: null; get startsAt(): null; get endsAt(): null; }; public isUserSubscription(): this is this & { guildId: null; get guild(): null }; public isGuildSubscription(): this is this & { guildId: Snowflake; guild: Guild }; } export class Guild extends AnonymousGuild { private constructor(client: Client<true>, data: RawGuildData); private _sortedRoles(): Collection<Snowflake, Role>; private _sortedChannels(channel: NonThreadGuildBasedChannel): Collection<Snowflake, NonThreadGuildBasedChannel>; public get afkChannel(): VoiceChannel | null; public afkChannelId: Snowflake | null; public afkTimeout: number; public applicationId: Snowflake | null; public maxVideoChannelUsers: number | null; public approximateMemberCount: number | null; public approximatePresenceCount: number | null; public autoModerationRules: AutoModerationRuleManager; public available: boolean; public bans: GuildBanManager; public channels: GuildChannelManager; public commands: GuildApplicationCommandManager; public defaultMessageNotifications: GuildDefaultMessageNotifications; public discoverySplash: string | null; public emojis: GuildEmojiManager; public explicitContentFilter: GuildExplicitContentFilter; public invites: GuildInviteManager; public get joinedAt(): Date; public joinedTimestamp: number; public large: boolean; public maximumMembers: number | null; public maximumPresences: number | null; public maxStageVideoChannelUsers: number | null; public memberCount: number; public members: GuildMemberManager; public mfaLevel: GuildMFALevel; public ownerId: Snowflake; public preferredLocale: Locale; public premiumProgressBarEnabled: boolean; public premiumTier: GuildPremiumTier; public presences: PresenceManager; public get publicUpdatesChannel(): TextChannel | null; public publicUpdatesChannelId: Snowflake | null; public roles: RoleManager; public get rulesChannel(): TextChannel | null; public rulesChannelId: Snowflake | null; public get safetyAlertsChannel(): TextChannel | null; public safetyAlertsChannelId: Snowflake | null; public scheduledEvents: GuildScheduledEventManager; public get shard(): WebSocketShard; public shardId: number; public soundboardSounds: GuildSoundboardSoundManager; public stageInstances: StageInstanceManager; public stickers: GuildStickerManager; public incidentsData: IncidentActions | null; public get systemChannel(): TextChannel | null; public systemChannelFlags: Readonly<SystemChannelFlagsBitField>; public systemChannelId: Snowflake | null; public vanityURLUses: number | null; public get voiceAdapterCreator(): InternalDiscordGatewayAdapterCreator; public voiceStates: VoiceStateManager; public get widgetChannel(): TextChannel | NewsChannel | VoiceBasedChannel | ForumChannel | MediaChannel | null; public widgetChannelId: Snowflake | null; public widgetEnabled: boolean | null; public get maximumBitrate(): number; public createTemplate(name: string, description?: string): Promise<GuildTemplate>; public delete(): Promise<Guild>; public discoverySplashURL(options?: ImageURLOptions): string | null; public edit(options: GuildEditOptions): Promise<Guild>; public editOnboarding(options: GuildOnboardingEditOptions): Promise<GuildOnboarding>; public editWelcomeScreen(options: WelcomeScreenEditOptions): Promise<WelcomeScreen>; public equals(guild: Guild): boolean; public fetchAuditLogs<Event extends GuildAuditLogsResolvable = AuditLogEvent>( options?: GuildAuditLogsFetchOptions<Event>, ): Promise<GuildAuditLogs<Event extends null ? AuditLogEvent : Event>>; public fetchIntegrations(): Promise<Collection<Snowflake | string, Integration>>; public fetchOnboarding(): Promise<GuildOnboarding>; public fetchOwner(options?: BaseFetchOptions): Promise<GuildMember>; public fetchPreview(): Promise<GuildPreview>; public fetchTemplates(): Promise<Collection<GuildTemplate['code'], GuildTemplate>>; public fetchVanityData(): Promise<Vanity>; public fetchWebhooks(): Promise<Collection<Snowflake, Webhook<WebhookType.ChannelFollower | WebhookType.Incoming>>>; public fetchWelcomeScreen(): Promise<WelcomeScreen>; public fetchWidget(): Promise<Widget>; public fetchWidgetSettings(): Promise<GuildWidgetSettings>; public widgetImageURL(style?: GuildWidgetStyle): string; public leave(): Promise<Guild>; public disableInvites(disabled?: boolean): Promise<Guild>; public setIncidentActions(incidentActions: IncidentActionsEditOptions): Promise<IncidentActions>; public setAFKChannel(afkChannel: VoiceChannelResolvable | null, reason?: string): Promise<Guild>; public setAFKTimeout(afkTimeout: number, reason?: string): Promise<Guild>; public setBanner(banner: BufferResolvable | Base64Resolvable | null, reason?: string): Promise<Guild>; public setDefaultMessageNotifications( defaultMessageNotifications: GuildDefaultMessageNotifications | null, reason?: string, ): Promise<Guild>; public setDiscoverySplash( discoverySplash: BufferResolvable | Base64Resolvable | null, reason?: string, ): Promise<Guild>; public setExplicitContentFilter( explicitContentFilter: GuildExplicitContentFilter | null, reason?: string, ): Promise<Guild>; public setIcon(icon: BufferResolvable | Base64Resolvable | null, reason?: string): Promise<Guild>; public setName(name: string, reason?: string): Promise<Guild>; public setOwner(owner: GuildMemberResolvable, reason?: string): Promise<Guild>; public setPreferredLocale(preferredLocale: Locale | null, reason?: string): Promise<Guild>; public setPublicUpdatesChannel(publicUpdatesChannel: TextChannelResolvable | null, reason?: string): Promise<Guild>; public setRulesChannel(rulesChannel: TextChannelResolvable | null, reason?: string): Promise<Guild>; public setSafetyAlertsChannel(safetyAlertsChannel: TextChannelResolvable | null, reason?: string): Promise<Guild>; public setSplash(splash: BufferResolvable | Base64Resolvable | null, reason?: string): Promise<Guild>; public setSystemChannel(systemChannel: TextChannelResolvable | null, reason?: string): Promise<Guild>; public setSystemChannelFlags(systemChannelFlags: SystemChannelFlagsResolvable, reason?: string): Promise<Guild>; public setVerificationLevel(verificationLevel: GuildVerificationLevel | null, reason?: string): Promise<Guild>; public setPremiumProgressBarEnabled(enabled?: boolean, reason?: string): Promise<Guild>; public setWidgetSettings(settings: GuildWidgetSettingsData, reason?: string): Promise<Guild>; public setMFALevel(level: GuildMFALevel, reason?: string): Promise<Guild>; public toJSON(): unknown; } export interface FileComponentData extends BaseComponentData { file: UnfurledMediaItemData; spoiler?: boolean; } export class FileComponent extends Component<APIFileComponent> { private constructor(data: APIFileComponent); public readonly file: UnfurledMediaItem; public get spoiler(): boolean; } export class GuildAuditLogs<Event extends AuditLogEvent = AuditLogEvent> { private constructor(guild: Guild, data: RawGuildAuditLogData); private applicationCommands: Collection<Snowflake, ApplicationCommand>; private webhooks: Collection<Snowflake, Webhook<WebhookType.ChannelFollower | WebhookType.Incoming>>; private integrations: Collection<Snowflake | string, Integration>; private guildScheduledEvents: Collection<Snowflake, GuildScheduledEvent>; private autoModerationRules: Collection<Snowflake, AutoModerationRule>; public entries: Collection<Snowflake, GuildAuditLogsEntry<Event>>; public toJSON(): unknown; } export class GuildAuditLogsEntry< TAction extends AuditLogEvent = AuditLogEvent, TActionType extends GuildAuditLogsActionType = TAction extends keyof GuildAuditLogsTypes ? GuildAuditLogsTypes[TAction][1] : 'All', TTargetType extends GuildAuditLogsTargetType = TAction extends keyof GuildAuditLogsTypes ? GuildAuditLogsTypes[TAction][0] : 'Unknown', > { private constructor(guild: Guild, data: RawGuildAuditLogEntryData, logs?: GuildAuditLogs); public static Targets: GuildAuditLogsTargets; public action: TAction; public actionType: TActionType; public changes: AuditLogChange[]; public get createdAt(): Date; public get createdTimestamp(): number; public executorId: Snowflake | null; public executor: User | PartialUser | null; public extra: TAction extends keyof GuildAuditLogsEntryExtraField ? GuildAuditLogsEntryExtraField[TAction] : null; public id: Snowflake; public reason: string | null; public targetId: Snowflake | null; public target: TTargetType extends keyof GuildAuditLogsEntryTargetField<TAction> ? GuildAuditLogsEntryTargetField<TAction>[TTargetType] : { id: Snowflake | undefined; [x: string]: unknown } | null; public targetType: TTargetType; public static actionType(action: AuditLogEvent): GuildAuditLogsActionType; public static targetType(target: AuditLogEvent): GuildAuditLogsTargetType; public toJSON(): unknown; } export class GuildBan extends Base { private constructor(client: Client<true>, data: RawGuildBanData, guild: Guild); public guild: Guild; public user: User; public get partial(): boolean; public reason?: string | null; public fetch(force?: boolean): Promise<GuildBan>; } export abstract class GuildChannel extends BaseChannel { public constructor(guild: Guild, data?: RawGuildChannelData, client?: Client<true>, immediatePatch?: boolean); private memberPermissions(member: GuildMember, checkAdmin: boolean): Readonly<PermissionsBitField>; private rolePermissions(role: Role, checkAdmin: boolean): Readonly<PermissionsBitField>; public get createdAt(): Date; public get createdTimestamp(): number; public get deletable(): boolean; public flags: Readonly<ChannelFlagsBitField>; public guild: Guild; public guildId: Snowflake; public get manageable(): boolean; public get members(): Collection<Snowflake, GuildMember>; public name: string; public get parent(): CategoryChannel | null; public parentId: Snowflake | null; public permissionOverwrites: PermissionOverwriteManager; public get permissionsLocked(): boolean | null; public get position(): number; public rawPosition: number; public type: GuildChannelTypes; public get viewable(): boolean; public clone(options?: GuildChannelCloneOptions): Promise<this>; public delete(reason?: string): Promise<this>; public edit(options: GuildChannelEditOptions): Promise<this>; public equals(channel: GuildChannel): boolean; public lockPermissions(): Promise<this>; public permissionsFor(memberOrRole: GuildMember | Role, checkAdmin?: boolean): Readonly<PermissionsBitField>; public permissionsFor( memberOrRole: GuildMemberResolvable | RoleResolvable, checkAdmin?: boolean, ): Readonly<PermissionsBitField> | null; public setName(name: string, reason?: string): Promise<this>; public setParent(channel: CategoryChannelResolvable | null, options?: SetParentOptions): Promise<this>; public setPosition(position: number, options?: SetChannelPositionOptions): Promise<this>; public isTextBased(): this is GuildBasedChannel & TextBasedChannel; public toString(): ChannelMention; } export class GuildEmoji extends BaseGuildEmoji { private constructor(client: Client<true>, data: RawGuildEmojiData, guild: Guild); private _roles: Snowflake[]; public get deletable(): boolean; public guild: Guild; public author: User | null; public get roles(): GuildEmojiRoleManager; public delete(reason?: string): Promise<GuildEmoji>; public edit(options: GuildEmojiEditOptions): Promise<GuildEmoji>; public equals(other: GuildEmoji | unknown): boolean; public fetchAuthor(): Promise<User>; public setName(name: string, reason?: string): Promise<GuildEmoji>; } export type GuildMemberFlagsString = keyof typeof GuildMemberFlags; export type GuildMemberFlagsResolvable = BitFieldResolvable<GuildMemberFlagsString, number>; export class GuildMemberFlagsBitField extends BitField<GuildMemberFlagsString> { public static Flags: GuildMemberFlags; public static resolve(bit?: BitFieldResolvable<GuildMemberFlagsString, GuildMemberFlags>): number; } export interface GuildMember extends PartialTextBasedChannelFields<false> {} export class GuildMember extends Base { private constructor(client: Client<true>, data: RawGuildMemberData, guild: Guild); private _roles: Snowflake[]; public avatar: string | null; public avatarDecorationData: AvatarDecorationData | null; public banner: string | null; public get bannable(): boolean; public get dmChannel(): DMChannel | null; public get displayColor(): number; public get displayHexColor(): HexColorString; public get displayName(): string; public guild: Guild; public get id(): Snowflake; public pending: boolean; public get communicationDisabledUntil(): Date | null; public communicationDisabledUntilTimestamp: number | null; public flags: Readonly<GuildMemberFlagsBitField>; public get joinedAt(): Date | null; public joinedTimestamp: number | null; public get kickable(): boolean; public get manageable(): boolean; public get moderatable(): boolean; public nickname: string | null; public get partial(): false; public get permissions(): Readonly<PermissionsBitField>; public get premiumSince(): Date | null; public premiumSinceTimestamp: number | null; public get presence(): Presence | null; public get roles(): GuildMemberRoleManager; public user: User; public get voice(): VoiceState; public avatarURL(options?: ImageURLOptions): string | null; public avatarDecorationURL(): string | null; public bannerURL(options?: ImageURLOptions): string | null; public ban(options?: BanOptions): Promise<GuildMember>; public disableCommunicationUntil(timeout: DateResolvable | null, reason?: string): Promise<GuildMember>; public timeout(timeout: number | null, reason?: string): Promise<GuildMember>; public fetch(force?: boolean): Promise<GuildMember>; public createDM(force?: boolean): Promise<DMChannel>; public deleteDM(): Promise<DMChannel>; public displayAvatarURL(options?: ImageURLOptions): string; public displayBannerURL(options?: ImageURLOptions): string | null; public displayAvatarDecorationURL(): string | null; public edit(options: GuildMemberEditOptions): Promise<GuildMember>; public isCommunicationDisabled(): this is GuildMember & { communicationDisabledUntilTimestamp: number; readonly communicationDisabledUntil: Date; }; public kick(reason?: string): Promise<GuildMember>; public permissionsIn(channel: GuildChannelResolvable): Readonly<PermissionsBitField>; public setFlags(flags: GuildMemberFlagsResolvable, reason?: string): Promise<GuildMember>; public setNickname(nickname: string | null, reason?: string): Promise<GuildMember>; public toJSON(): unknown; public toString(): UserMention; public valueOf(): string; } export class GuildOnboarding extends Base { private constructor(client: Client, data: RESTGetAPIGuildOnboardingResult); public get guild(): Guild; public guildId: Snowflake; public prompts: Collection<Snowflake, GuildOnboardingPrompt>; public defaultChannels: Collection<Snowflake, GuildChannel>; public enabled: boolean; public mode: GuildOnboardingMode; } export class GuildOnboardingPrompt extends Base { private constructor(client: Client, data: APIGuildOnboardingPrompt, guildId: Snowflake); public id: Snowflake; public get guild(): Guild; public guildId: Snowflake; public options: Collection<Snowflake, GuildOnboardingPromptOption>; public title: string; public singleSelect: boolean; public required: boolean; public inOnboarding: boolean; public type: GuildOnboardingPromptType; } export class GuildOnboardingPromptOption extends Base { private constructor(client: Client, data: APIGuildOnboardingPromptOption, guildId: Snowflake); private _emoji: APIPartialEmoji; public id: Snowflake; public get emoji(): Emoji | GuildEmoji | null; public get guild(): Guild; public guildId: Snowflake; public channels: Collection<Snowflake, GuildChannel>; public roles: Collection<Snowflake, Role>; public title: string; public description: string | null; } export class GuildPreview extends Base { private constructor(client: Client<true>, data: RawGuildPreviewData); public approximateMemberCount: number; public approximatePresenceCount: number; public get createdAt(): Date; public get createdTimestamp(): number; public description: string | null; public discoverySplash: string | null; public emojis: Collection<Snowflake, GuildPreviewEmoji>; public stickers: Collection<Snowflake, Sticker>; public features: `${GuildFeature}`[]; public icon: string | null; public id: Snowflake; public name: string; public splash: string | null; public discoverySplashURL(options?: ImageURLOptions): string | null; public iconURL(options?: ImageURLOptions): string | null; public splashURL(options?: ImageURLOptions): string | null; public fetch(): Promise<GuildPreview>; public toJSON(): unknown; public toString(): string; } export class GuildScheduledEvent<Status extends GuildScheduledEventStatus = GuildScheduledEventStatus> extends Base { private constructor(client: Client<true>, data: RawGuildScheduledEventData); public id: Snowflake; public guildId: Snowflake; public channelId: Snowflake | null; public creatorId: Snowflake | null; public name: string; public description: string | null; public scheduledStartTimestamp: number | null; public scheduledEndTimestamp: number | null; public privacyLevel: GuildScheduledEventPrivacyLevel; public status: Status; public entityType: GuildScheduledEventEntityType; public entityId: Snowflake | null; public entityMetadata: GuildScheduledEventEntityMetadata | null; public userCount: number | null; public creator: User | null; public recurrenceRule: GuildScheduledEventRecurrenceRule | null; public get createdTimestamp(): number; public get createdAt(): Date; public get scheduledStartAt(): Date | null; public get scheduledEndAt(): Date | null; public get channel(): VoiceChannel | StageChannel | null; public get guild(): Guild | null; public get url(): string; public image: string | null; public get partial(): false; public coverImageURL(options?: Readonly<BaseImageURLOptions>): string | null; public createInviteURL(options?: GuildScheduledEventInviteURLCreateOptions): Promise<string>; public edit<AcceptableStatus extends GuildScheduledEventSetStatusArg<Status>>( options: GuildScheduledEventEditOptions<Status, AcceptableStatus>, ): Promise<GuildScheduledEvent<AcceptableStatus>>; public fetch(force?: boolean): Promise<GuildScheduledEvent<Status>>; public delete(): Promise<GuildScheduledEvent<Status>>; public setName(name: string, reason?: string): Promise<GuildScheduledEvent<Status>>; public setScheduledStartTime( scheduledStartTime: DateResolvable, reason?: string, ): Promise<GuildScheduledEvent<Status>>; public setScheduledEndTime(scheduledEndTime: DateResolvable, reason?: string): Promise<GuildScheduledEvent<Status>>; public setDescription(description: string, reason?: string): Promise<GuildScheduledEvent<Status>>; public setStatus<AcceptableStatus extends GuildScheduledEventSetStatusArg<Status>>( status: AcceptableStatus, reason?: string, ): Promise<GuildScheduledEvent<AcceptableStatus>>; public setLocation(location: string, reason?: string): Promise<GuildScheduledEvent<Status>>; public fetchSubscribers<Options extends FetchGuildScheduledEventSubscribersOptions>( options?: Options, ): Promise<GuildScheduledEventManagerFetchSubscribersResult<Options>>; public toString(): string; public isActive(): this is GuildScheduledEvent<GuildScheduledEventStatus.Active>; public isCanceled(): this is GuildScheduledEvent<GuildScheduledEventStatus.Canceled>; public isCompleted(): this is GuildScheduledEvent<GuildScheduledEventStatus.Completed>; public isScheduled(): this is GuildScheduledEvent<GuildScheduledEventStatus.Scheduled>; } export interface GuildScheduledEventRecurrenceRule { startTimestamp: number; get startAt(): Date; endTimestamp: number | null; get endAt(): Date | null; frequency: GuildScheduledEventRecurrenceRuleFrequency; interval: number; byWeekday: readonly GuildScheduledEventRecurrenceRuleWeekday[] | null; byNWeekday: readonly GuildScheduledEventRecurrenceRuleNWeekday[] | null; byMonth: readonly GuildScheduledEventRecurrenceRuleMonth[] | null; byMonthDay: readonly number[] | null; byYearDay: readonly number[] | null; count: number | null; } export interface GuildScheduledEventRecurrenceRuleNWeekday { n: number; day: GuildScheduledEventRecurrenceRuleWeekday; } export class GuildTemplate extends Base { private constructor(client: Client<true>, data: RawGuildTemplateData); public createdTimestamp: number; public updatedTimestamp: number; public get url(): string; public code: string; public name: string; public description: string | null; public usageCount: number; public creator: User; public creatorId: Snowflake; public get createdAt(): Date; public get updatedAt(): Date; public get guild(): Guild | null; public guildId: Snowflake; public serializedGuild: APITemplateSerializedSourceGuild; public unSynced: boolean | null; public createGuild(name: string, icon?: BufferResolvable | Base64Resolvable): Promise<Guild>; public delete(): Promise<GuildTemplate>; public edit(options?: GuildTemplateEditOptions): Promise<GuildTemplate>; public sync(): Promise<GuildTemplate>; public static GuildTemplatesPattern: RegExp; } export class GuildPreviewEmoji extends BaseGuildEmoji { private constructor(client: Client<true>, data: RawGuildEmojiData, guild: GuildPreview); public guild: GuildPreview; public roles: Snowflake[]; } export class Integration extends Base { private constructor(client: Client<true>, data: RawIntegrationData, guild: Guild); public account: IntegrationAccount; public application: IntegrationApplication | null; public enabled: boolean | null; public expireBehavior: IntegrationExpireBehavior | null; public expireGracePeriod: number | null; public guild: Guild; public id: Snowflake | string; public name: string; public role: Role | null; public enableEmoticons: boolean | null; public get roles(): Collection<Snowflake, Role>; public scopes: OAuth2Scopes[]; public get syncedAt(): Date | null; public syncedTimestamp: number | null; public syncing: boolean | null; public type: IntegrationType; public user: User | null; public subscriberCount: number | null; public revoked: boolean | null; public delete(reason?: string): Promise<Integration>; } export class IntegrationApplication extends Application { private constructor(client: Client<true>, data: RawIntegrationApplicationData); public bot: User | null; public termsOfServiceURL: string | null; public privacyPolicyURL: string | null; public rpcOrigins: string[]; public hook: boolean | null; public cover: string | null; public verifyKey: string | null; } export type GatewayIntentsString = keyof typeof GatewayIntentBits; export class IntentsBitField extends BitField<GatewayIntentsString> { public static Flags: typeof GatewayIntentBits; public static resolve(bit?: BitFieldResolvable<GatewayIntentsString, number>): number; } export type CacheType = 'cached' | 'raw' | undefined; export type CacheTypeReducer< State extends CacheType, CachedType, RawType = CachedType, PresentType = CachedType | RawType, Fallback = PresentType | null, > = [State] extends ['cached'] ? CachedType : [State] extends ['raw'] ? RawType : [State] extends ['raw' | 'cached'] ? PresentType : Fallback; export type Interaction<Cached extends CacheType = CacheType> = | ChatInputCommandInteraction<Cached> | MessageContextMenuCommandInteraction<Cached> | UserContextMenuCommandInteraction<Cached> | PrimaryEntryPointCommandInteraction<Cached> | AnySelectMenuInteraction<Cached> | ButtonInteraction<Cached> | AutocompleteInteraction<Cached> | ModalSubmitInteraction<Cached>; export type RepliableInteraction<Cached extends CacheType = CacheType> = Exclude< Interaction<Cached>, AutocompleteInteraction<Cached> >; export class BaseInteraction<Cached extends CacheType = CacheType> extends Base { // This a technique used to brand different cached types. Or else we'll get `never` errors on typeguard checks. private readonly _cacheType: Cached; protected constructor(client: Client<true>, data: RawInteractionData); public applicationId: Snowflake; public authorizingIntegrationOwners: APIAuthorizingIntegrationOwnersMap; public get channel(): CacheTypeReducer< Cached, GuildTextBasedChannel | null, GuildTextBasedChannel | null, GuildTextBasedChannel | null, TextBasedChannel | null >; public channelId: Snowflake | null; public context: InteractionContextType | null; public get createdAt(): Date; public get createdTimestamp(): number; public get guild(): CacheTypeReducer<Cached, Guild, null>; public guildId: CacheTypeReducer<Cached, Snowflake>; public id: Snowflake; public member: CacheTypeReducer<Cached, GuildMember, APIInteractionGuildMember>; public readonly token: string; public type: InteractionType; public user: User; public version: number; public appPermissions: Readonly<PermissionsBitField>; public memberPermissions: CacheTypeReducer<Cached, Readonly<PermissionsBitField>>; public locale: Locale; public guildLocale: CacheTypeReducer<Cached, Locale>; public entitlements: Collection<Snowflake, Entitlement>; public attachmentSizeLimit: number; public inGuild(): this is BaseInteraction<'raw' | 'cached'>; public inCachedGuild(): this is BaseInteraction<'cached'>; public inRawGuild(): this is BaseInteraction<'raw'>; public isButton(): this is ButtonInteraction<Cached>; public isAutocomplete(): this is AutocompleteInteraction<Cached>; public isChatInputCommand(): this is ChatInputCommandInteraction<Cached>; public isCommand(): this is CommandInteraction<Cached>; public isContextMenuCommand(): this is ContextMenuCommandInteraction<Cached>; public isPrimaryEntryPointCommand(): this is PrimaryEntryPointCommandInteraction<Cached>; public isMessageComponent(): this is MessageComponentInteraction<Cached>; public isMessageContextMenuCommand(): this is MessageContextMenuCommandInteraction<Cached>; public isModalSubmit(): this is ModalSubmitInteraction<Cached>; public isUserContextMenuCommand(): this is UserContextMenuCommandInteraction<Cached>; /** @deprecated Use {@link BaseInteraction.isStringSelectMenu} instead. */ public isSelectMenu(): this is StringSelectMenuInteraction<Cached>; public isAnySelectMenu(): this is AnySelectMenuInteraction<Cached>; public isStringSelectMenu(): this is StringSelectMenuInteraction<Cached>; public isUserSelectMenu(): this is UserSelectMenuInteraction<Cached>; public isRoleSelectMenu(): this is RoleSelectMenuInteraction<Cached>; public isMentionableSelectMenu(): this is MentionableSelectMenuInteraction<Cached>; public isChannelSelectMenu(): this is ChannelSelectMenuInteraction<Cached>; public isRepliable(): this is RepliableInteraction<Cached>; } export class InteractionCallback { private constructor(client: Client<true>, data: RESTAPIInteractionCallbackObject); public activityInstanceId: string | null; public readonly client: Client<true>; public get createdAt(): Date; public get createdTimestamp(): number; public id: Snowflake; public responseMessageEphemeral: boolean | null; public responseMessageId: Snowflake | null; public responseMessageLoading: boolean | null; public type: InteractionType; } export class InteractionCallbackResponse { private constructor(client: Client<true>, data: RESTPostAPIInteractionCallbackWithResponseResult); public readonly client: Client<true>; public interaction: InteractionCallback; public resource: InteractionCallbackResource | null; } export class InteractionCallbackResource { private constructor(client: Client<true>, data: RESTAPIInteractionCallbackResourceObject); public activityInstance: RESTAPIInteractionCallbackActivityInstanceResource | null; public message: Message | null; public type: InteractionResponseType; } export class InteractionCollector<Interaction extends CollectedInteraction> extends Collector< Snowflake, Interaction, [Collection<Snowflake, Interaction>] > { public constructor(client: Client<true>, options?: InteractionCollectorOptions<Interaction>); private _handleMessageDeletion(message: Message): void; private _handleChannelDeletion(channel: NonThreadGuildBasedChannel): void; private _handleGuildDeletion(guild: Guild): void; public channelId: Snowflake | null; public messageInteractionId: Snowflake | null; public componentType: ComponentType | null; public guildId: Snowflake | null; public interactionType: InteractionType | null; public messageId: Snowflake | null; public options: InteractionCollectorOptions<Interaction>; public total: number; public users: Collection<Snowflake, User>; public collect(interaction: Interaction): Snowflake; public empty(): void; public dispose(interaction: Interaction): Snowflake; public on(event: 'collect' | 'dispose' | 'ignore', listener: (interaction: Interaction) => void): this; public on( event: 'end', listener: (collected: ReadonlyCollection<Snowflake, Interaction>, reason: string) => void, ): this; public on(event: string, listener: (...args: any[]) => void): this; public once(event: 'collect' | 'dispose' | 'ignore', listener: (interaction: Interaction) => void): this; public once( event: 'end', listener: (collected: ReadonlyCollection<Snowflake, Interaction>, reason: string) => void, ): this; public once(event: string, listener: (...args: any[]) => void): this; } // tslint:disable-next-line no-empty-interface export interface InteractionWebhook extends PartialWebhookFields {} export class InteractionWebhook { public constructor(client: Client<true>, id: Snowflake, token: string); public readonly client: Client<true>; public token: string; public send(options: string | MessagePayload | InteractionReplyOptions): Promise<Message>; public editMessage( message: MessageResolvable | '@original', options: string | MessagePayload | WebhookMessageEditOptions, ): Promise<Message>; public fetchMessage(message: Snowflake | '@original'): Promise<Message>; } export class Invite extends Base { private constructor(client: Client<true>, data: RawInviteData); public channel: NonThreadGuildBasedChannel | PartialGroupDMChannel | null; public channelId: Snowflake | null; public code: string; public get deletable(): boolean; public get createdAt(): Date | null; public createdTimestamp: number | null; public get expiresAt(): Date | null; public get expiresTimestamp(): number | null; public guild: InviteGuild | Guild | null; public get inviter(): User | null; public inviterId: Snowflake | null; public maxAge: number | null; public maxUses: number | null; public memberCount: number; public presenceCount: number; public targetApplication: IntegrationApplication | null; public targetUser: User | null; public targetType: InviteTargetType | null; public temporary: boolean | null; public type: InviteType; public get url(): string; public uses: number | null; public delete(reason?: string): Promise<Invite>; public toJSON(): unknown; public toString(): string; public static InvitesPattern: RegExp; /** @deprecated Public Stage Instances don't exist anymore */ public stageInstance: InviteStageInstance | null; public guildScheduledEvent: GuildScheduledEvent | null; } /** @deprecated Public Stage Instances don't exist anymore */ export class InviteStageInstance extends Base { private constructor(client: Client<true>, data: RawInviteStageInstance, channelId: Snowflake, guildId: Snowflake); public channelId: Snowflake; public guildId: Snowflake; public members: Collection<Snowflake, GuildMember>; public topic: string; public participantCount: number; public speakerCount: number; public get channel(): StageChannel | null; public get guild(): Guild | null; } export class InviteGuild extends AnonymousGuild { private constructor(client: Client<true>, data: RawInviteGuildData); public welcomeScreen: WelcomeScreen | null; } export class LimitedCollection<Key, Value> extends Collection<Key, Value> { public constructor(options?: LimitedCollectionOptions<Key, Value>, iterable?: Iterable<readonly [Key, Value]>); public maxSize: number; public keepOverLimit: ((value: Value, key: Key, collection: this) => boolean) | null; } export interface MediaGalleryComponentData extends BaseComponentData { items: readonly MediaGalleryItemData[]; } export class MediaGalleryComponent extends Component<APIMediaGalleryComponent> { private constructor(data: APIMediaGalleryComponent); public readonly items: MediaGalleryItem[]; } export interface MediaGalleryItemData { media: UnfurledMediaItemData; description?: string; spoiler?: boolean; } export class MediaGalleryItem { private constructor(data: APIMediaGalleryItem); public readonly data: APIMediaGalleryItem; public readonly media: UnfurledMediaItem; public get description(): string | null; public get spoiler(): boolean; } export interface MessageCall { get endedAt(): Date | null; endedTimestamp: number | null; participants: readonly Snowflake[]; } export type MessageComponentType = | ComponentType.Button | ComponentType.ChannelSelect | ComponentType.MentionableSelect | ComponentType.RoleSelect | ComponentType.StringSelect | ComponentType.UserSelect; export interface MessageCollectorOptionsParams< ComponentType extends MessageComponentType, Cached extends boolean = boolean, > extends MessageComponentCollectorOptions<MappedInteractionTypes<Cached>[ComponentType]> { componentType?: ComponentType; } export interface MessageChannelCollectorOptionsParams< ComponentType extends MessageComponentType, Cached extends boolean = boolean, > extends MessageChannelComponentCollectorOptions<MappedInteractionTypes<Cached>[ComponentType]> { componentType?: ComponentType; } export interface AwaitMessageCollectorOptionsParams< ComponentType extends MessageComponentType, Cached extends boolean = boolean, > extends Pick< InteractionCollectorOptions<MappedInteractionTypes<Cached>[ComponentType]>, keyof AwaitMessageComponentOptions<any> > { componentType?: ComponentType; } export interface StringMappedInteractionTypes<Cached extends CacheType = CacheType> { Button: ButtonInteraction<Cached>; StringSelectMenu: StringSelectMenuInteraction<Cached>; UserSelectMenu: UserSelectMenuInteraction<Cached>; RoleSelectMenu: RoleSelectMenuInteraction<Cached>; MentionableSelectMenu: MentionableSelectMenuInteraction<Cached>; ChannelSelectMenu: ChannelSelectMenuInteraction<Cached>; ActionRow: MessageComponentInteraction<Cached>; } export type WrapBooleanCache<Cached extends boolean> = If<Cached, 'cached', CacheType>; export interface MappedInteractionTypes<Cached extends boolean = boolean> { [ComponentType.Button]: ButtonInteraction<WrapBooleanCache<Cached>>; [ComponentType.StringSelect]: StringSelectMenuInteraction<WrapBooleanCache<Cached>>; [ComponentType.UserSelect]: UserSelectMenuInteraction<WrapBooleanCache<Cached>>; [ComponentType.RoleSelect]: RoleSelectMenuInteraction<WrapBooleanCache<Cached>>; [ComponentType.MentionableSelect]: MentionableSelectMenuInteraction<WrapBooleanCache<Cached>>; [ComponentType.ChannelSelect]: ChannelSelectMenuInteraction<WrapBooleanCache<Cached>>; } export class Message<InGuild extends boolean = boolean> extends Base { private readonly _cacheType: InGuild; private constructor(client: Client<true>, data: RawMessageData); private _patch(data: RawPartialMessageData | RawMessageData): void; public activity: MessageActivity | null; public applicationId: Snowflake | null; public attachments: Collection<Snowflake, Attachment>; public author: User; public get bulkDeletable(): boolean; public get channel(): If<InGuild, GuildTextBasedChannel, TextBasedChannel>; public channelId: Snowflake; public get cleanContent(): string; public components: TopLevelComponent[]; public content: string; public get createdAt(): Date; public createdTimestamp: number; public get crosspostable(): boolean; public get deletable(): boolean; public get editable(): boolean; public get editedAt(): Date | null; public editedTimestamp: number | null; public embeds: Embed[]; public groupActivityApplication: ClientApplication | null; public guildId: If<InGuild, Snowflake>; public get guild(): If<InGuild, Guild>; public get hasThread(): boolean; public id: Snowflake; /** @deprecated Use {@link Message.interactionMetadata} instead. */ public interaction: MessageInteraction | null; public interactionMetadata: MessageInteractionMetadata | null; public get member(): GuildMember | null; public mentions: MessageMentions<InGuild>; public nonce: string | number | null; public get partial(): false; public get pinnable(): boolean; public pinned: boolean; public reactions: ReactionManager; public stickers: Collection<Snowflake, Sticker>; public position: number | null; public roleSubscriptionData: RoleSubscriptionData | null; public resolved: CommandInteractionResolvedData | null; public system: boolean; public get thread(): AnyThreadChannel | null; public tts: boolean; public poll: Poll | null; public call: MessageCall | null; public type: MessageType; public get url(): string; public webhookId: Snowflake | null; public flags: Readonly<MessageFlagsBitField>; public reference: MessageReference | null; public messageSnapshots: Collection<Snowflake, MessageSnapshot>; public awaitMessageComponent<ComponentType extends MessageComponentType>( options?: AwaitMessageCollectorOptionsParams<ComponentType, InGuild>, ): Promise<MappedInteractionTypes<InGuild>[ComponentType]>; public awaitReactions(options?: AwaitReactionsOptions): Promise<Collection<Snowflake | string, MessageReaction>>; public createReactionCollector(options?: ReactionCollectorOptions): ReactionCollector; public createMessageComponentCollector<ComponentType extends MessageComponentType>( options?: MessageCollectorOptionsParams<ComponentType, InGuild>, ): InteractionCollector<MappedInteractionTypes<InGuild>[ComponentType]>; public delete(): Promise<OmitPartialGroupDMChannel<Message<InGuild>>>; public edit( content: string | MessageEditOptions | MessagePayload, ): Promise<OmitPartialGroupDMChannel<Message<InGuild>>>; public equals(message: Message, rawData: unknown): boolean; public fetchReference(): Promise<OmitPartialGroupDMChannel<Message<InGuild>>>; public fetchWebhook(): Promise<Webhook>; public crosspost(): Promise<OmitPartialGroupDMChannel<Message<InGuild>>>; public fetch(force?: boolean): Promise<OmitPartialGroupDMChannel<Message<InGuild>>>; public pin(reason?: string): Promise<OmitPartialGroupDMChannel<Message<InGuild>>>; public react(emoji: EmojiIdentifierResolvable): Promise<MessageReaction>; public removeAttachments(): Promise<OmitPartialGroupDMChannel<Message<InGuild>>>; public reply( options: string | MessagePayload | MessageReplyOptions, ): Promise<OmitPartialGroupDMChannel<Message<InGuild>>>; public forward(channel: Exclude<TextBasedChannelResolvable, PartialGroupDMChannel>): Promise<Message>; public resolveComponent(customId: string): MessageActionRowComponent | null; public startThread(options: StartThreadOptions): Promise<PublicThreadChannel<false>>; public suppressEmbeds(suppress?: boolean): Promise<OmitPartialGroupDMChannel<Message<InGuild>>>; public toJSON(): unknown; public toString(): string; public unpin(reason?: string): Promise<OmitPartialGroupDMChannel<Message<InGuild>>>; public inGuild(): this is Message<true>; } export class AttachmentBuilder { public constructor(attachment: BufferResolvable | Stream, data?: AttachmentData); public attachment: BufferResolvable | Stream; public description: string | null; public name: string | null; public get spoiler(): boolean; public setDescription(description: string): this; public setFile(attachment: BufferResolvable | Stream, name?: string): this; public setName(name: string): this; public setSpoiler(spoiler?: boolean): this; public toJSON(): unknown; public static from(other: JSONEncodable<AttachmentPayload>): AttachmentBuilder; } export class Attachment { private constructor(data: APIAttachment); private attachment: BufferResolvable | Stream; public contentType: string | null; public description: string | null; public duration: number | null; public ephemeral: boolean; public flags: AttachmentFlagsBitField; public height: number | null; public id: Snowflake; public name: string; public proxyURL: string; public size: number; public get spoiler(): boolean; public title: string | null; public url: string; public waveform: string | null; public width: number | null; public toJSON(): unknown; } export type AttachmentFlagsString = keyof typeof AttachmentFlags; export class AttachmentFlagsBitField extends BitField<AttachmentFlagsString> { public static Flags: Record<AttachmentFlagsString, number>; public static resolve(bit?: BitFieldResolvable<AttachmentFlagsString, number>): number; } export class MessageCollector extends Collector<Snowflake, Message, [Collection<Snowflake, Message>]> { public constructor(channel: TextBasedChannel, options?: MessageCollectorOptions); private _handleChannelDeletion(channel: NonThreadGuildBasedChannel): void; private _handleGuildDeletion(guild: Guild): void; public channel: TextBasedChannel; public options: MessageCollectorOptions; public received: number; public collect(message: Message): Snowflake | null; public dispose(message: Message): Snowflake | null; } export class MessageComponentInteraction<Cached extends CacheType = CacheType> extends BaseInteraction<Cached> { protected constructor(client: Client<true>, data: RawMessageComponentInteractionData); public type: InteractionType.MessageComponent; public get component(): CacheTypeReducer< Cached, MessageActionRowComponent, APIComponentInMessageActionRow, MessageActionRowComponent | APIComponentInMessageActionRow, MessageActionRowComponent | APIComponentInMessageActionRow >; public componentType: MessageComponentType; public customId: string; public channelId: Snowflake; public deferred: boolean; public ephemeral: boolean | null; public message: Message<BooleanCache<Cached>>; public replied: boolean; public webhook: InteractionWebhook; public inGuild(): this is MessageComponentInteraction<'raw' | 'cached'>; public inCachedGuild(): this is MessageComponentInteraction<'cached'>; public inRawGuild(): this is MessageComponentInteraction<'raw'>; public deferReply( options: InteractionDeferReplyOptions & { withResponse: true }, ): Promise<InteractionCallbackResponse>; /** @deprecated `fetchReply` is deprecated. Use `withResponse` instead or fetch the response after using the method. */ public deferReply( options: InteractionDeferReplyOptions & { fetchReply: true }, ): Promise<Message<BooleanCache<Cached>>>; public deferReply(options?: InteractionDeferReplyOptions): Promise<InteractionResponse<BooleanCache<Cached>>>; public deferUpdate( options: InteractionDeferUpdateOptions & { withResponse: true }, ): Promise<InteractionCallbackResponse>; /** @deprecated `fetchReply` is deprecated. Use `withResponse` instead or fetch the response after using the method. */ public deferUpdate( options: InteractionDeferUpdateOptions & { fetchReply: true }, ): Promise<Message<BooleanCache<Cached>>>; public deferUpdate(options?: InteractionDeferUpdateOptions): Promise<InteractionResponse<BooleanCache<Cached>>>; public deleteReply(message?: MessageResolvable | '@original'): Promise<void>; public editReply( options: string | MessagePayload | InteractionEditReplyOptions, ): Promise<Message<BooleanCache<Cached>>>; public fetchReply(message?: Snowflake | '@original'): Promise<Message<BooleanCache<Cached>>>; public followUp(options: string | MessagePayload | InteractionReplyOptions): Promise<Message<BooleanCache<Cached>>>; public reply(options: InteractionReplyOptions & { withResponse: true }): Promise<InteractionCallbackResponse>; /** @deprecated `fetchReply` is deprecated. Use `withResponse` instead or fetch the response after using the method. */ public reply(options: InteractionReplyOptions & { fetchReply: true }): Promise<Message<BooleanCache<Cached>>>; public reply( options: string | MessagePayload | InteractionReplyOptions, ): Promise<InteractionResponse<BooleanCache<Cached>>>; public update(options: InteractionUpdateOptions & { withResponse: true }): Promise<InteractionCallbackResponse>; /** @deprecated `fetchReply` is deprecated. Use `withResponse` instead or fetch the response after using the method. */ public update(options: InteractionUpdateOptions & { fetchReply: true }): Promise<Message<BooleanCache<Cached>>>; public update( options: string | MessagePayload | InteractionUpdateOptions, ): Promise<InteractionResponse<BooleanCache<Cached>>>; public launchActivity(options: LaunchActivityOptions & { withResponse: true }): Promise<InteractionCallbackResponse>; public launchActivity(options?: LaunchActivityOptions & { withResponse?: false }): Promise<undefined>; public launchActivity(options?: LaunchActivityOptions): Promise<InteractionCallbackResponse | undefined>; public showModal( modal: | JSONEncodable<APIModalInteractionResponseCallbackData> | ModalComponentData | APIModalInteractionResponseCallbackData, options: ShowModalOptions & { withResponse: true }, ): Promise<InteractionCallbackResponse>; public showModal( modal: | JSONEncodable<APIModalInteractionResponseCallbackData> | ModalComponentData | APIModalInteractionResponseCallbackData, options?: ShowModalOptions, ): Promise<undefined>; public showModal( modal: | JSONEncodable<APIModalInteractionResponseCallbackData> | ModalComponentData | APIModalInteractionResponseCallbackData, options?: ShowModalOptions, ): Promise<undefined>; /** @deprecated Sending a premium-style button is the new Discord behaviour. */ public sendPremiumRequired(): Promise<void>; public awaitModalSubmit( options: AwaitModalSubmitOptions<ModalSubmitInteraction>, ): Promise<ModalSubmitInteraction<Cached>>; } export class MessageContextMenuCommandInteraction< Cached extends CacheType = CacheType, > extends ContextMenuCommandInteraction<Cached> { public commandType: ApplicationCommandType.Message; public options: Omit< CommandInteractionOptionResolver<Cached>, | 'getFocused' | 'getMentionable' | 'getRole' | 'getUser' | 'getNumber' | 'getAttachment' | 'getInteger' | 'getString' | 'getChannel' | 'getBoolean' | 'getSubcommandGroup' | 'getSubcommand' >; public get targetMessage(): NonNullable<CommandInteractionOption<Cached>['message']>; public inGuild(): this is MessageContextMenuCommandInteraction<'raw' | 'cached'>; public inCachedGuild(): this is MessageContextMenuCommandInteraction<'cached'>; public inRawGuild(): this is MessageContextMenuCommandInteraction<'raw'>; } export type MessageFlagsString = keyof typeof MessageFlags; export class MessageFlagsBitField extends BitField<MessageFlagsString> { public static Flags: typeof MessageFlags; public static resolve(bit?: MessageFlagsResolvable): number; } export type MessageFlagsResolvable = BitFieldResolvable<MessageFlagsString, number>; export class MessageMentions<InGuild extends boolean = boolean> { private constructor( message: Message, users: readonly APIUser[] | ReadonlyCollection<Snowflake, User>, roles: readonly Snowflake[] | ReadonlyCollection<Snowflake, Role>, everyone: boolean, repliedUser?: APIUser | User, ); private _channels: Collection<Snowflake, Channel> | null; private readonly _content: string; private _members: Collection<Snowflake, GuildMember> | null; private _parsedUsers: Collection<Snowflake, User> | null; public get channels(): Collection<Snowflake, Channel>; public readonly client: Client; public everyone: boolean; public readonly guild: If<InGuild, Guild>; public has(data: UserResolvable | RoleResolvable | ChannelResolvable, options?: MessageMentionsHasOptions): boolean; public get members(): If<InGuild, Collection<Snowflake, GuildMember>>; public get parsedUsers(): Collection<Snowflake, User>; public repliedUser: User | null; public roles: Collection<Snowflake, Role>; public users: Collection<Snowflake, User>; public crosspostedChannels: Collection<Snowflake, CrosspostedChannel>; public toJSON(): unknown; private static GlobalChannelsPattern: RegExp; private static GlobalUsersPattern: RegExp; public static ChannelsPattern: typeof FormattingPatterns.Channel; public static EveryonePattern: RegExp; public static RolesPattern: typeof FormattingPatterns.Role; public static UsersPattern: typeof FormattingPatterns.User; } export type MessagePayloadOption = | MessageCreateOptions | MessageEditOptions | WebhookMessageCreateOptions | WebhookMessageEditOptions | InteractionReplyOptions | InteractionUpdateOptions; export class MessagePayload { public constructor(target: MessageTarget, options: MessagePayloadOption); public body: RawMessagePayloadData | null; public get isUser(): boolean; public get isWebhook(): boolean; public get isMessage(): boolean; public get isMessageManager(): boolean; /** @deprecated This will no longer serve a purpose in the next major version. */ public get isInteraction(): boolean; public files: RawFile[] | null; public options: MessagePayloadOption; public target: MessageTarget; public static create( target: MessageTarget, options: string | MessagePayloadOption, extra?: MessagePayloadOption, ): MessagePayload; public static resolveFile( fileLike: BufferResolvable | Stream | AttachmentPayload | JSONEncodable<AttachmentPayload>, ): Promise<RawFile>; public makeContent(): string | undefined; public resolveBody(): this; public resolveFiles(): Promise<this>; } export class MessageReaction { private constructor(client: Client<true>, data: RawMessageReactionData, message: Message); private _emoji: GuildEmoji | ReactionEmoji | ApplicationEmoji; public burstColors: string[] | null; public readonly client: Client<true>; public count: number; public countDetails: ReactionCountDetailsData; public get emoji(): GuildEmoji | ReactionEmoji | ApplicationEmoji; public me: boolean; public meBurst: boolean; public message: Message | PartialMessage; public get partial(): false; public users: ReactionUserManager; public react(): Promise<MessageReaction>; public remove(): Promise<MessageReaction>; public fetch(): Promise<MessageReaction>; public toJSON(): unknown; public valueOf(): Snowflake | string; } export interface MessageReactionEventDetails { type: ReactionType; burst: boolean; } export interface ModalComponentData { customId: string; title: string; components: readonly ( | JSONEncodable<APIActionRowComponent<APIComponentInModalActionRow>> | ActionRowData<ModalActionRowComponentData> )[]; } export interface BaseModalData { customId: string; type: ComponentType; } export interface TextInputModalData extends BaseModalData { type: ComponentType.TextInput; value: string; } export interface ActionRowModalData { type: ComponentType.ActionRow; components: readonly TextInputModalData[]; } export class ModalSubmitFields { private constructor(components: readonly (readonly ModalActionRowComponent[])[]); public components: ActionRowModalData[]; public fields: Collection<string, ModalActionRowComponent>; public getField<Type extends ComponentType>(customId: string, type: Type): { type: Type } & TextInputModalData; public getField(customId: string, type?: ComponentType): TextInputModalData; public getTextInputValue(customId: string): string; } export interface ModalMessageModalSubmitInteraction<Cached extends CacheType = CacheType> extends ModalSubmitInteraction<Cached> { message: Message<BooleanCache<Cached>>; channelId: Snowflake; update(options: InteractionUpdateOptions & { withResponse: true }): Promise<InteractionCallbackResponse>; /** @deprecated `fetchReply` is deprecated. Use `withResponse` instead or fetch the response after using the method. */ update(options: InteractionUpdateOptions & { fetchReply: true }): Promise<Message>; update( options: string | MessagePayload | InteractionUpdateOptions, ): Promise<InteractionResponse<BooleanCache<Cached>>>; inGuild(): this is ModalMessageModalSubmitInteraction<'raw' | 'cached'>; inCachedGuild(): this is ModalMessageModalSubmitInteraction<'cached'>; inRawGuild(): this is ModalMessageModalSubmitInteraction<'raw'>; } export class ModalSubmitInteraction<Cached extends CacheType = CacheType> extends BaseInteraction<Cached> { private constructor(client: Client<true>, data: APIModalSubmitInteraction); public type: InteractionType.ModalSubmit; public readonly customId: string; public readonly components: ActionRowModalData[]; public readonly fields: ModalSubmitFields; public deferred: boolean; public ephemeral: boolean | null; public message: Message<BooleanCache<Cached>> | null; public replied: boolean; public readonly webhook: InteractionWebhook; public reply(options: InteractionReplyOptions & { withResponse: true }): Promise<InteractionCallbackResponse>; /** @deprecated `fetchReply` is deprecated. Use `withResponse` instead or fetch the response after using the method. */ public reply(options: InteractionReplyOptions & { fetchReply: true }): Promise<Message<BooleanCache<Cached>>>; public reply( options: string | MessagePayload | InteractionReplyOptions, ): Promise<InteractionResponse<BooleanCache<Cached>>>; public deleteReply(message?: MessageResolvable | '@original'): Promise<void>; public editReply( options: string | MessagePayload | InteractionEditReplyOptions, ): Promise<Message<BooleanCache<Cached>>>; public deferReply( options: InteractionDeferReplyOptions & { withResponse: true }, ): Promise<InteractionCallbackResponse>; /** @deprecated `fetchReply` is deprecated. Use `withResponse` instead or fetch the response after using the method. */ public deferReply( options: InteractionDeferReplyOptions & { fetchReply: true }, ): Promise<Message<BooleanCache<Cached>>>; public deferReply(options?: InteractionDeferReplyOptions): Promise<InteractionResponse<BooleanCache<Cached>>>; public fetchReply(message?: Snowflake | '@original'): Promise<Message<BooleanCache<Cached>>>; public followUp(options: string | MessagePayload | InteractionReplyOptions): Promise<Message<BooleanCache<Cached>>>; public deferUpdate( options: InteractionDeferUpdateOptions & { withResponse: true }, ): Promise<InteractionCallbackResponse>; /** @deprecated `fetchReply` is deprecated. Use `withResponse` instead or fetch the response after using the method. */ public deferUpdate( options: InteractionDeferUpdateOptions & { fetchReply: true }, ): Promise<Message<BooleanCache<Cached>>>; public deferUpdate(options?: InteractionDeferUpdateOptions): Promise<InteractionResponse<BooleanCache<Cached>>>; /** @deprecated Sending a premium-style button is the new Discord behaviour. */ public sendPremiumRequired(): Promise<void>; public launchActivity(options: LaunchActivityOptions & { withResponse: true }): Promise<InteractionCallbackResponse>; public launchActivity(options?: LaunchActivityOptions & { withResponse?: false }): Promise<undefined>; public launchActivity(options?: LaunchActivityOptions): Promise<InteractionCallbackResponse | undefined>; public inGuild(): this is ModalSubmitInteraction<'raw' | 'cached'>; public inCachedGuild(): this is ModalSubmitInteraction<'cached'>; public inRawGuild(): this is ModalSubmitInteraction<'raw'>; public isFromMessage(): this is ModalMessageModalSubmitInteraction<Cached>; } export class NewsChannel extends BaseGuildTextChannel { public threads: GuildTextThreadManager<AllowedThreadTypeForNewsChannel>; public type: ChannelType.GuildAnnouncement; public addFollower(channel: TextChannelResolvable, reason?: string): Promise<NewsChannel>; } export type NewsChannelResolvable = NewsChannel | Snowflake; export class OAuth2Guild extends BaseGuild { private constructor(client: Client<true>, data: RawOAuth2GuildData); public owner: boolean; public permissions: Readonly<PermissionsBitField>; } export interface PartialGroupDMChannel extends Omit< TextBasedChannelFields<false, false>, | 'bulkDelete' | 'send' | 'sendTyping' | 'createMessageCollector' | 'awaitMessages' | 'fetchWebhooks' | 'createWebhook' | 'setRateLimitPerUser' | 'setNSFW' > {} export class PartialGroupDMChannel extends BaseChannel { private constructor(client: Client<true>, data: RawPartialGroupDMChannelData); public type: ChannelType.GroupDM; public flags: null; public name: string | null; public icon: string | null; public recipients: PartialRecipient[]; public ownerId: Snowflake | null; public iconURL(options?: ImageURLOptions): string | null; public fetchOwner(options?: BaseFetchOptions): Promise<User>; public toString(): ChannelMention; } export interface GuildForumTagEmoji { id: Snowflake | null; name: string | null; } export interface GuildForumTag { id: Snowflake; name: string; moderated: boolean; emoji: GuildForumTagEmoji | null; } export interface GuildForumTagData extends Partial<GuildForumTag> { name: string; } export interface DefaultReactionEmoji { id: Snowflake | null; name: string | null; } export interface ThreadOnlyChannel extends Omit< TextBasedChannelFields, | 'send' | 'lastMessage' | 'lastPinAt' | 'bulkDelete' | 'sendTyping' | 'createMessageCollector' | 'awaitMessages' | 'createMessageComponentCollector' | 'awaitMessageComponent' | 'messages' > {} export abstract class ThreadOnlyChannel extends GuildChannel { public type: ChannelType.GuildForum | ChannelType.GuildMedia; public threads: GuildForumThreadManager; public availableTags: GuildForumTag[]; public defaultReactionEmoji: DefaultReactionEmoji | null; public defaultThreadRateLimitPerUser: number | null; public rateLimitPerUser: number | null; public defaultAutoArchiveDuration: ThreadAutoArchiveDuration | null; public nsfw: boolean; public topic: string | null; public defaultSortOrder: SortOrderType | null; public setAvailableTags(tags: readonly GuildForumTagData[], reason?: string): Promise<this>; public setDefaultReactionEmoji(emojiId: DefaultReactionEmoji | null, reason?: string): Promise<this>; public setDefaultThreadRateLimitPerUser(rateLimit: number, reason?: string): Promise<this>; public createInvite(options?: InviteCreateOptions): Promise<Invite>; public fetchInvites(cache?: boolean): Promise<Collection<string, Invite>>; public setDefaultAutoArchiveDuration( defaultAutoArchiveDuration: ThreadAutoArchiveDuration, reason?: string, ): Promise<this>; public setTopic(topic: string | null, reason?: string): Promise<this>; public setDefaultSortOrder(defaultSortOrder: SortOrderType | null, reason?: string): Promise<this>; } export class ForumChannel extends ThreadOnlyChannel { public type: ChannelType.GuildForum; public defaultForumLayout: ForumLayoutType; public setDefaultForumLayout(defaultForumLayout: ForumLayoutType, reason?: string): Promise<this>; } export class MediaChannel extends ThreadOnlyChannel { public type: ChannelType.GuildMedia; } export class PermissionOverwrites extends Base { private constructor(client: Client<true>, data: RawPermissionOverwriteData, channel: NonThreadGuildBasedChannel); public allow: Readonly<PermissionsBitField>; public readonly channel: NonThreadGuildBasedChannel; public deny: Readonly<PermissionsBitField>; public id: Snowflake; public type: OverwriteType; public edit(options: PermissionOverwriteOptions, reason?: string): Promise<PermissionOverwrites>; public delete(reason?: string): Promise<PermissionOverwrites>; public toJSON(): unknown; public static resolveOverwriteOptions( options: PermissionOverwriteOptions, initialPermissions: { allow?: PermissionResolvable; deny?: PermissionResolvable }, ): ResolvedOverwriteOptions; public static resolve(overwrite: OverwriteResolvable, guild: Guild): APIOverwrite; } export type PermissionsString = keyof typeof PermissionFlagsBits; export class PermissionsBitField extends BitField<PermissionsString, bigint> { public any(permission: PermissionResolvable, checkAdmin?: boolean): boolean; public has(permission: PermissionResolvable, checkAdmin?: boolean): boolean; public missing(bits: BitFieldResolvable<PermissionsString, bigint>, checkAdmin?: boolean): PermissionsString[]; public serialize(checkAdmin?: boolean): Record<PermissionsString, boolean>; public toArray(): PermissionsString[]; public static All: bigint; public static Default: bigint; public static StageModerator: bigint; public static Flags: typeof PermissionFlagsBits; public static resolve(permission?: PermissionResolvable): bigint; } export class Presence extends Base { protected constructor(client: Client<true>, data?: RawPresenceData); public activities: Activity[]; public clientStatus: ClientPresenceStatusData | null; public guild: Guild | null; public get member(): GuildMember | null; public status: PresenceStatus; public get user(): User | null; public userId: Snowflake; public equals(presence: Presence): boolean; } export interface PollQuestionMedia { text: string; } export class Poll extends Base { private constructor(client: Client<true>, data: APIPoll, message: Message); public readonly message: Message; public question: PollQuestionMedia; public answers: Collection<number, PollAnswer>; public expiresTimestamp: number; public get expiresAt(): Date; public allowMultiselect: boolean; public layoutType: PollLayoutType; public resultsFinalized: boolean; public end(): Promise<Message>; } export interface BaseFetchPollAnswerVotersOptions { after?: Snowflake; limit?: number; } export class PollAnswer extends Base { private constructor(client: Client<true>, data: APIPollAnswer & { count?: number }, poll: Poll); private _emoji: APIPartialEmoji | null; public readonly poll: Poll; public id: number; public text: string | null; public voteCount: number; public get emoji(): GuildEmoji | Emoji | null; public fetchVoters(options?: BaseFetchPollAnswerVotersOptions): Promise<Collection<Snowflake, User>>; } export class ReactionCollector extends Collector<Snowflake | string, MessageReaction, [User]> { public constructor(message: Message, options?: ReactionCollectorOptions); private _handleChannelDeletion(channel: NonThreadGuildBasedChannel): void; private _handleGuildDeletion(guild: Guild): void; private _handleMessageDeletion(message: Message): void; public message: Message; public options: ReactionCollectorOptions; public total: number; public users: Collection<Snowflake, User>; public static key(reaction: MessageReaction): Snowflake | string; public collect(reaction: MessageReaction, user: User): Snowflake | string | null; public dispose(reaction: MessageReaction, user: User): Snowflake | string | null; public empty(): void; public on( event: 'collect' | 'dispose' | 'remove' | 'ignore', listener: (reaction: MessageReaction, user: User) => void, ): this; public on( event: 'end', listener: (collected: ReadonlyCollection<Snowflake, MessageReaction>, reason: string) => void, ): this; public on(event: string, listener: (...args: any[]) => void): this; public once( event: 'collect' | 'dispose' | 'remove' | 'ignore', listener: (reaction: MessageReaction, user: User) => void, ): this; public once( event: 'end', listener: (collected: ReadonlyCollection<Snowflake, MessageReaction>, reason: string) => void, ): this; public once(event: string, listener: (...args: any[]) => void): this; } export class ReactionEmoji extends Emoji { private constructor(reaction: MessageReaction, emoji: RawReactionEmojiData); public reaction: MessageReaction; public toJSON(): unknown; } export class RichPresenceAssets { private constructor(activity: Activity, assets: RawRichPresenceAssets); public readonly activity: Activity; public largeImage: Snowflake | null; public largeText: string | null; public smallImage: Snowflake | null; public smallText: string | null; public largeImageURL(options?: ImageURLOptions): string | null; public smallImageURL(options?: ImageURLOptions): string | null; } export class Role extends Base { private constructor(client: Client<true>, data: RawRoleData, guild: Guild); public color: number; public get createdAt(): Date; public get createdTimestamp(): number; public get editable(): boolean; public flags: RoleFlagsBitField; public guild: Guild; public get hexColor(): HexColorString; public hoist: boolean; public id: Snowflake; public managed: boolean; public get members(): Collection<Snowflake, GuildMember>; public mentionable: boolean; public name: string; public permissions: Readonly<PermissionsBitField>; public get position(): number; public rawPosition: number; public tags: RoleTagData | null; public comparePositionTo(role: RoleResolvable): number; public icon: string | null; public unicodeEmoji: string | null; public delete(reason?: string): Promise<Role>; public edit(options: RoleEditOptions): Promise<Role>; public equals(role: Role): boolean; public iconURL(options?: ImageURLOptions): string | null; public permissionsIn( channel: NonThreadGuildBasedChannel | Snowflake, checkAdmin?: boolean, ): Readonly<PermissionsBitField>; public setColor(color: ColorResolvable, reason?: string): Promise<Role>; public setHoist(hoist?: boolean, reason?: string): Promise<Role>; public setMentionable(mentionable?: boolean, reason?: string): Promise<Role>; public setName(name: string, reason?: string): Promise<Role>; public setPermissions(permissions: PermissionResolvable, reason?: string): Promise<Role>; public setIcon(icon: BufferResolvable | Base64Resolvable | EmojiResolvable | null, reason?: string): Promise<Role>; public setPosition(position: number, options?: SetRolePositionOptions): Promise<Role>; public setUnicodeEmoji(unicodeEmoji: string | null, reason?: string): Promise<Role>; public toJSON(): unknown; public toString(): RoleMention; } export type RoleFlagsString = keyof typeof RoleFlags; export class RoleFlagsBitField extends BitField<RoleFlagsString> { public static Flags: typeof RoleFlags; public static resolve(bit?: BitFieldResolvable<RoleFlagsString, number>): number; } export interface SectionComponentData extends BaseComponentData { accessory: ButtonComponentData | ThumbnailComponentData; components: readonly TextDisplayComponentData[]; } export class SectionComponent< AccessoryType extends ButtonComponent | ThumbnailComponent = ButtonComponent | ThumbnailComponent, > extends Component<APISectionComponent> { private constructor(data: APISectionComponent); public readonly accessory: AccessoryType; public readonly components: TextDisplayComponent[]; public toJSON(): APISectionComponent; } export class StringSelectMenuInteraction< Cached extends CacheType = CacheType, > extends MessageComponentInteraction<Cached> { public constructor(client: Client<true>, data: APIMessageStringSelectInteractionData); public get component(): CacheTypeReducer< Cached, StringSelectMenuComponent, APIStringSelectComponent, StringSelectMenuComponent | APIStringSelectComponent, StringSelectMenuComponent | APIStringSelectComponent >; public componentType: ComponentType.StringSelect; public values: string[]; public inGuild(): this is StringSelectMenuInteraction<'raw' | 'cached'>; public inCachedGuild(): this is StringSelectMenuInteraction<'cached'>; public inRawGuild(): this is StringSelectMenuInteraction<'raw'>; } export { /** @deprecated Use {@link StringSelectMenuInteraction} instead */ StringSelectMenuInteraction as SelectMenuInteraction, }; export class UserSelectMenuInteraction< Cached extends CacheType = CacheType, > extends MessageComponentInteraction<Cached> { public constructor(client: Client<true>, data: APIMessageUserSelectInteractionData); public get component(): CacheTypeReducer< Cached, UserSelectMenuComponent, APIUserSelectComponent, UserSelectMenuComponent | APIUserSelectComponent, UserSelectMenuComponent | APIUserSelectComponent >; public componentType: ComponentType.UserSelect; public values: Snowflake[]; public users: Collection<Snowflake, User>; public members: Collection< Snowflake, CacheTypeReducer<Cached, GuildMember, APIGuildMember, GuildMember | APIGuildMember, GuildMember | APIGuildMember> >; public inGuild(): this is UserSelectMenuInteraction<'raw' | 'cached'>; public inCachedGuild(): this is UserSelectMenuInteraction<'cached'>; public inRawGuild(): this is UserSelectMenuInteraction<'raw'>; } export class RoleSelectMenuInteraction< Cached extends CacheType = CacheType, > extends MessageComponentInteraction<Cached> { public constructor(client: Client<true>, data: APIMessageRoleSelectInteractionData); public get component(): CacheTypeReducer< Cached, RoleSelectMenuComponent, APIRoleSelectComponent, RoleSelectMenuComponent | APIRoleSelectComponent, RoleSelectMenuComponent | APIRoleSelectComponent >; public componentType: ComponentType.RoleSelect; public values: Snowflake[]; public roles: Collection<Snowflake, CacheTypeReducer<Cached, Role, APIRole, Role | APIRole, Role | APIRole>>; public inGuild(): this is RoleSelectMenuInteraction<'raw' | 'cached'>; public inCachedGuild(): this is RoleSelectMenuInteraction<'cached'>; public inRawGuild(): this is RoleSelectMenuInteraction<'raw'>; } export class MentionableSelectMenuInteraction< Cached extends CacheType = CacheType, > extends MessageComponentInteraction<Cached> { public constructor(client: Client<true>, data: APIMessageMentionableSelectInteractionData); public get component(): CacheTypeReducer< Cached, MentionableSelectMenuComponent, APIMentionableSelectComponent, MentionableSelectMenuComponent | APIMentionableSelectComponent, MentionableSelectMenuComponent | APIMentionableSelectComponent >; public componentType: ComponentType.MentionableSelect; public values: Snowflake[]; public users: Collection<Snowflake, User>; public members: Collection< Snowflake, CacheTypeReducer<Cached, GuildMember, APIGuildMember, GuildMember | APIGuildMember, GuildMember | APIGuildMember> >; public roles: Collection<Snowflake, CacheTypeReducer<Cached, Role, APIRole, Role | APIRole, Role | APIRole>>; public inGuild(): this is MentionableSelectMenuInteraction<'raw' | 'cached'>; public inCachedGuild(): this is MentionableSelectMenuInteraction<'cached'>; public inRawGuild(): this is MentionableSelectMenuInteraction<'raw'>; } export class ChannelSelectMenuInteraction< Cached extends CacheType = CacheType, > extends MessageComponentInteraction<Cached> { public constructor(client: Client<true>, data: APIMessageChannelSelectInteractionData); public get component(): CacheTypeReducer< Cached, ChannelSelectMenuComponent, APIChannelSelectComponent, ChannelSelectMenuComponent | APIChannelSelectComponent, ChannelSelectMenuComponent | APIChannelSelectComponent >; public componentType: ComponentType.ChannelSelect; public values: Snowflake[]; public channels: Collection< Snowflake, CacheTypeReducer<Cached, Channel, APIChannel, Channel | APIChannel, Channel | APIChannel> >; public inGuild(): this is ChannelSelectMenuInteraction<'raw' | 'cached'>; public inCachedGuild(): this is ChannelSelectMenuInteraction<'cached'>; public inRawGuild(): this is ChannelSelectMenuInteraction<'raw'>; } // Ideally this should be named SelectMenuInteraction, but that's the name of the "old" StringSelectMenuInteraction, meaning // the type name is reserved as a re-export to prevent a breaking change from being made, as such: // TODO: Rename this to SelectMenuInteraction in the next major export type AnySelectMenuInteraction<Cached extends CacheType = CacheType> = | StringSelectMenuInteraction<Cached> | UserSelectMenuInteraction<Cached> | RoleSelectMenuInteraction<Cached> | MentionableSelectMenuInteraction<Cached> | ChannelSelectMenuInteraction<Cached>; export type SelectMenuType = APISelectMenuComponent['type']; export interface SeparatorComponentData extends BaseComponentData { spacing?: SeparatorSpacingSize; divider?: boolean; } export class SeparatorComponent extends Component<APISeparatorComponent> { private constructor(data: APISeparatorComponent); public get spacing(): SeparatorSpacingSize; public get divider(): boolean; } export interface ShardEventTypes { death: [process: ChildProcess | Worker]; disconnect: []; error: [error: Error]; message: [message: any]; ready: []; reconnecting: []; resume: []; spawn: [process: ChildProcess | Worker]; } export class Shard extends EventEmitter { private constructor(manager: ShardingManager, id: number); private _evals: Map<string, Promise<unknown>>; private _exitListener: (...args: any[]) => void; private _fetches: Map<string, Promise<unknown>>; private _handleExit(respawn?: boolean, timeout?: number): void; private _handleMessage(message: unknown): void; private incrementMaxListeners(emitter: EventEmitter | ChildProcess): void; private decrementMaxListeners(emitter: EventEmitter | ChildProcess): void; public args: string[]; public execArgv: string[]; public env: unknown; public id: number; public manager: ShardingManager; public process: ChildProcess | null; public ready: boolean; public silent: boolean; public worker: Worker | null; public eval(script: string): Promise<unknown>; public eval<Result>(fn: (client: Client) => Result): Promise<Result>; public eval<Result, Context>( fn: (client: Client<true>, context: Serialized<Context>) => Result, context: Context, ): Promise<Result>; public fetchClientValue(prop: string): Promise<unknown>; public kill(): void; public respawn(options?: { delay?: number; timeout?: number }): Promise<ChildProcess>; public send(message: unknown): Promise<Shard>; public spawn(timeout?: number): Promise<ChildProcess>; public on<Event extends keyof ShardEventTypes>( event: Event, listener: (...args: ShardEventTypes[Event]) => void, ): this; public once<Event extends keyof ShardEventTypes>( event: Event, listener: (...args: ShardEventTypes[Event]) => void, ): this; } export class ShardClientUtil { private constructor(client: Client<true>, mode: ShardingManagerMode); private _handleMessage(message: unknown): void; private _respond(type: string, message: unknown): void; private incrementMaxListeners(emitter: EventEmitter | ChildProcess): void; private decrementMaxListeners(emitter: EventEmitter | ChildProcess): void; public client: Client; public get count(): number; public get ids(): number[]; public mode: ShardingManagerMode; public parentPort: MessagePort | null; public broadcastEval<Result>(fn: (client: Client) => Awaitable<Result>): Promise<Serialized<Result>[]>; public broadcastEval<Result>( fn: (client: Client) => Awaitable<Result>, options: { shard: number }, ): Promise<Serialized<Result>>; public broadcastEval<Result, Context>( fn: (client: Client<true>, context: Serialized<Context>) => Awaitable<Result>, options: { context: Context }, ): Promise<Serialized<Result>[]>; public broadcastEval<Result, Context>( fn: (client: Client<true>, context: Serialized<Context>) => Awaitable<Result>, options: { context: Context; shard: number }, ): Promise<Serialized<Result>>; public fetchClientValues(prop: string): Promise<unknown[]>; public fetchClientValues(prop: string, shard: number): Promise<unknown>; public respawnAll(options?: MultipleShardRespawnOptions): Promise<void>; public send(message: unknown): Promise<void>; public static singleton(client: Client<true>, mode: ShardingManagerMode): ShardClientUtil; public static shardIdForGuildId(guildId: Snowflake, shardCount: number): number; } export class ShardingManager extends EventEmitter { public constructor(file: string, options?: ShardingManagerOptions); private _performOnShards(method: string, args: readonly unknown[]): Promise<unknown[]>; private _performOnShards(method: string, args: readonly unknown[], shard: number): Promise<unknown>; public file: string; public respawn: boolean; public silent: boolean; public shardArgs: string[]; public shards: Collection<number, Shard>; public token: string | null; public totalShards: number | 'auto'; public shardList: number[] | 'auto'; public broadcast(message: unknown): Promise<Shard[]>; public broadcastEval<Result>(fn: (client: Client) => Awaitable<Result>): Promise<Serialized<Result>[]>; public broadcastEval<Result>( fn: (client: Client) => Awaitable<Result>, options: { shard: number }, ): Promise<Serialized<Result>>; public broadcastEval<Result, Context>( fn: (client: Client<true>, context: Serialized<Context>) => Awaitable<Result>, options: { context: Context }, ): Promise<Serialized<Result>[]>; public broadcastEval<Result, Context>( fn: (client: Client<true>, context: Serialized<Context>) => Awaitable<Result>, options: { context: Context; shard: number }, ): Promise<Serialized<Result>>; public createShard(id: number): Shard; public fetchClientValues(prop: string): Promise<unknown[]>; public fetchClientValues(prop: string, shard: number): Promise<unknown>; public respawnAll(options?: MultipleShardRespawnOptions): Promise<Collection<number, Shard>>; public spawn(options?: MultipleShardSpawnOptions): Promise<Collection<number, Shard>>; public on(event: 'shardCreate', listener: (shard: Shard) => void): this; public once(event: 'shardCreate', listener: (shard: Shard) => void): this; } export interface FetchRecommendedShardCountOptions { guildsPerShard?: number; multipleOf?: number; } export { DiscordSnowflake as SnowflakeUtil, SnowflakeGenerateOptions, DeconstructedSnowflake, } from '@sapphire/snowflake'; export class SKU extends Base { private constructor(client: Client<true>, data: APISKU); public id: Snowflake; public type: SKUType; public applicationId: Snowflake; public name: string; public slug: string; public flags: Readonly<SKUFlagsBitField>; } export type SKUFlagsString = keyof typeof SKUFlags; export class SKUFlagsBitField extends BitField<SKUFlagsString> { public static FLAGS: typeof SKUFlags; public static resolve(bit?: BitFieldResolvable<SKUFlagsString, number>): number; } export class Subscription extends Base { private constructor(client: Client<true>, data: APISubscription); public id: Snowflake; public userId: Snowflake; public skuIds: Snowflake[]; public entitlementIds: Snowflake[]; public renewalSkuIds: Snowflake[] | null; public currentPeriodStartTimestamp: number; public currentPeriodEndTimestamp: number; public status: SubscriptionStatus; public canceledTimestamp: number | null; public country: string | null; public get canceledAt(): Date | null; public get currentPeriodStartAt(): Date; public get currentPeriodEndAt(): Date; } export class StageChannel extends BaseGuildVoiceChannel { public get stageInstance(): StageInstance | null; public topic: string | null; public type: ChannelType.GuildStageVoice; public createStageInstance(options: StageInstanceCreateOptions): Promise<StageInstance>; public setTopic(topic: string): Promise<StageChannel>; } export class DirectoryChannel extends BaseChannel { public flags: Readonly<ChannelFlagsBitField>; public guild: InviteGuild; public guildId: Snowflake; public name: string; public toString(): ChannelMention; } export class StageInstance extends Base { private constructor(client: Client<true>, data: RawStageInstanceData, channel: StageChannel); public id: Snowflake; public guildId: Snowflake; public channelId: Snowflake; public topic: string; public privacyLevel: StageInstancePrivacyLevel; /** @deprecated See https://github.com/discord/discord-api-docs/pull/4296 for more information */ public discoverableDisabled: boolean | null; public guildScheduledEventId?: Snowflake; public get channel(): StageChannel | null; public get guild(): Guild | null; public get guildScheduledEvent(): GuildScheduledEvent | null; public edit(options: StageInstanceEditOptions): Promise<StageInstance>; public delete(): Promise<StageInstance>; public setTopic(topic: string): Promise<StageInstance>; public get createdTimestamp(): number; public get createdAt(): Date; } export class Sticker extends Base { private constructor(client: Client<true>, data: RawStickerData); public get createdTimestamp(): number; public get createdAt(): Date; public available: boolean | null; public description: string | null; public format: StickerFormatType; public get guild(): Guild | null; public guildId: Snowflake | null; public id: Snowflake; public name: string; public packId: Snowflake | null; public get partial(): boolean; public sortValue: number | null; public tags: string | null; public type: StickerType | null; public user: User | null; public get url(): string; public fetch(): Promise<Sticker>; public fetchPack(): Promise<StickerPack | null>; public fetchUser(): Promise<User | null>; public edit(options?: GuildStickerEditOptions): Promise<Sticker>; public delete(reason?: string): Promise<Sticker>; public equals(other: Sticker | unknown): boolean; } export class StickerPack extends Base { private constructor(client: Client<true>, data: RawStickerPackData); public get createdTimestamp(): number; public get createdAt(): Date; public bannerId: Snowflake | null; public get coverSticker(): Sticker | null; public coverStickerId: Snowflake | null; public description: string; public id: Snowflake; public name: string; public skuId: Snowflake; public stickers: Collection<Snowflake, Sticker>; public bannerURL(options?: ImageURLOptions): string | null; } export class Sweepers { public constructor(client: Client<true>, options: SweeperOptions); public readonly client: Client; public intervals: Record<SweeperKey, NodeJS.Timeout | null>; public options: SweeperOptions; public sweepApplicationCommands( filter: CollectionSweepFilter< SweeperDefinitions['applicationCommands'][0], SweeperDefinitions['applicationCommands'][1] >, ): number; public sweepAutoModerationRules( filter: CollectionSweepFilter< SweeperDefinitions['autoModerationRules'][0], SweeperDefinitions['autoModerationRules'][1] >, ): number; public sweepBans(filter: CollectionSweepFilter<SweeperDefinitions['bans'][0], SweeperDefinitions['bans'][1]>): number; public sweepEmojis( filter: CollectionSweepFilter<SweeperDefinitions['emojis'][0], SweeperDefinitions['emojis'][1]>, ): number; public sweepEntitlements( filter: CollectionSweepFilter<SweeperDefinitions['entitlements'][0], SweeperDefinitions['entitlements'][1]>, ): number; public sweepInvites( filter: CollectionSweepFilter<SweeperDefinitions['invites'][0], SweeperDefinitions['invites'][1]>, ): number; public sweepGuildMembers( filter: CollectionSweepFilter<SweeperDefinitions['guildMembers'][0], SweeperDefinitions['guildMembers'][1]>, ): number; public sweepMessages( filter: CollectionSweepFilter<SweeperDefinitions['messages'][0], SweeperDefinitions['messages'][1]>, ): number; public sweepPresences( filter: CollectionSweepFilter<SweeperDefinitions['presences'][0], SweeperDefinitions['presences'][1]>, ): number; public sweepReactions( filter: CollectionSweepFilter<SweeperDefinitions['reactions'][0], SweeperDefinitions['reactions'][1]>, ): number; public sweepStageInstances( filter: CollectionSweepFilter<SweeperDefinitions['stageInstances'][0], SweeperDefinitions['stageInstances'][1]>, ): number; public sweepStickers( filter: CollectionSweepFilter<SweeperDefinitions['stickers'][0], SweeperDefinitions['stickers'][1]>, ): number; public sweepThreadMembers( filter: CollectionSweepFilter<SweeperDefinitions['threadMembers'][0], SweeperDefinitions['threadMembers'][1]>, ): number; public sweepThreads( filter: CollectionSweepFilter<SweeperDefinitions['threads'][0], SweeperDefinitions['threads'][1]>, ): number; public sweepUsers( filter: CollectionSweepFilter<SweeperDefinitions['users'][0], SweeperDefinitions['users'][1]>, ): number; public sweepVoiceStates( filter: CollectionSweepFilter<SweeperDefinitions['voiceStates'][0], SweeperDefinitions['voiceStates'][1]>, ): number; public static archivedThreadSweepFilter( lifetime?: number, ): GlobalSweepFilter<SweeperDefinitions['threads'][0], SweeperDefinitions['threads'][1]>; public static expiredInviteSweepFilter( lifetime?: number, ): GlobalSweepFilter<SweeperDefinitions['invites'][0], SweeperDefinitions['invites'][1]>; public static filterByLifetime<Key, Value>( options?: LifetimeFilterOptions<Key, Value>, ): GlobalSweepFilter<Key, Value>; public static outdatedMessageSweepFilter( lifetime?: number, ): GlobalSweepFilter<SweeperDefinitions['messages'][0], SweeperDefinitions['messages'][1]>; } export type SystemChannelFlagsString = keyof typeof GuildSystemChannelFlags; export class SystemChannelFlagsBitField extends BitField<SystemChannelFlagsString> { public static Flags: typeof GuildSystemChannelFlags; public static resolve(bit?: BitFieldResolvable<SystemChannelFlagsString, number>): number; } export class Team extends Base { private constructor(client: Client<true>, data: RawTeamData); public id: Snowflake; public name: string; public icon: string | null; public ownerId: Snowflake | null; public members: Collection<Snowflake, TeamMember>; public get owner(): TeamMember | null; public get createdAt(): Date; public get createdTimestamp(): number; public iconURL(options?: ImageURLOptions): string | null; public toJSON(): unknown; public toString(): string; } export class TeamMember extends Base { private constructor(team: Team, data: RawTeamMemberData); public team: Team; public get id(): Snowflake; /** @deprecated Use {@link TeamMember.role} instead. */ public permissions: string[]; public membershipState: TeamMemberMembershipState; public user: User; public role: TeamMemberRole; public toString(): UserMention; } export class TextChannel extends BaseGuildTextChannel { public rateLimitPerUser: number; public threads: GuildTextThreadManager<AllowedThreadTypeForTextChannel>; public type: ChannelType.GuildText; } export interface TextDisplayComponentData extends BaseComponentData { content: string; } export class TextDisplayComponent extends Component<APITextDisplayComponent> { private constructor(data: APITextDisplayComponent); public readonly content: string; } export type ForumThreadChannel = PublicThreadChannel<true>; export type TextThreadChannel = PublicThreadChannel<false> | PrivateThreadChannel; export type AnyThreadChannel = TextThreadChannel | ForumThreadChannel; export interface PublicThreadChannel<Forum extends boolean = boolean> extends ThreadChannel<Forum> { type: ChannelType.PublicThread | ChannelType.AnnouncementThread; } export interface PrivateThreadChannel extends ThreadChannel<false> { get createdTimestamp(): number; get createdAt(): Date; type: ChannelType.PrivateThread; } // tslint:disable-next-line no-empty-interface export interface ThreadChannel<ThreadOnly extends boolean = boolean> extends Omit<TextBasedChannelFields<true>, 'fetchWebhooks' | 'createWebhook' | 'setNSFW'> {} export class ThreadChannel<ThreadOnly extends boolean = boolean> extends BaseChannel { private constructor(guild: Guild, data?: RawThreadChannelData, client?: Client<true>); public archived: boolean | null; public get archivedAt(): Date | null; public archiveTimestamp: number | null; public get createdAt(): Date | null; private _createdTimestamp: number | null; public get createdTimestamp(): number | null; public autoArchiveDuration: ThreadAutoArchiveDuration | null; public get editable(): boolean; public flags: Readonly<ChannelFlagsBitField>; public guild: Guild; public guildId: Snowflake; public get guildMembers(): Collection<Snowflake, GuildMember>; public invitable: boolean | null; public get joinable(): boolean; public get joined(): boolean; public locked: boolean | null; public get manageable(): boolean; public get viewable(): boolean; public get sendable(): boolean; public memberCount: number | null; public messageCount: number | null; public appliedTags: Snowflake[]; public totalMessageSent: number | null; public members: ThreadMemberManager; public name: string; public ownerId: Snowflake; public get parent(): If<ThreadOnly, ForumChannel | MediaChannel, TextChannel | NewsChannel> | null; public parentId: Snowflake | null; public rateLimitPerUser: number | null; public type: ThreadChannelType; public get unarchivable(): boolean; public delete(reason?: string): Promise<this>; public edit(options: ThreadEditOptions): Promise<this>; public join(): Promise<this>; public leave(): Promise<this>; public permissionsFor(memberOrRole: GuildMember | Role, checkAdmin?: boolean): Readonly<PermissionsBitField>; public permissionsFor( memberOrRole: GuildMemberResolvable | RoleResolvable, checkAdmin?: boolean, ): Readonly<PermissionsBitField> | null; public fetchOwner(options?: FetchThreadOwnerOptions): Promise<ThreadMember | null>; public fetchStarterMessage(options?: BaseFetchOptions): Promise<Message<true> | null>; public setArchived(archived?: boolean, reason?: string): Promise<this>; public setAutoArchiveDuration(autoArchiveDuration: ThreadAutoArchiveDuration, reason?: string): Promise<this>; public setInvitable(invitable?: boolean, reason?: string): Promise<this>; public setLocked(locked?: boolean, reason?: string): Promise<this>; public setName(name: string, reason?: string): Promise<this>; // The following 3 methods can only be run on forum threads. public setAppliedTags(appliedTags: readonly Snowflake[], reason?: string): Promise<If<ThreadOnly, this, never>>; public pin(reason?: string): Promise<If<ThreadOnly, this, never>>; public unpin(reason?: string): Promise<If<ThreadOnly, this, never>>; public toString(): ChannelMention; } export class ThreadMember<HasMemberData extends boolean = boolean> extends Base { private constructor(thread: ThreadChannel, data: RawThreadMemberData, extra?: unknown); public flags: ThreadMemberFlagsBitField; private member: If<HasMemberData, GuildMember>; public get guildMember(): HasMemberData extends true ? GuildMember : GuildMember | null; public id: Snowflake; public get joinedAt(): Date | null; public joinedTimestamp: number | null; public get manageable(): boolean; public thread: AnyThreadChannel; public get user(): User | null; public get partial(): false; /* tslint:disable:unified-signatures */ public remove(): Promise<ThreadMember>; /** @deprecated The `reason` parameter is deprecated as Discord does not parse them. */ public remove(reason?: string): Promise<ThreadMember>; /* tslint:enable:unified-signatures */ } export type ThreadMemberFlagsString = keyof typeof ThreadMemberFlags; export class ThreadMemberFlagsBitField extends BitField<ThreadMemberFlagsString> { public static Flags: typeof ThreadMemberFlags; public static resolve(bit?: BitFieldResolvable<ThreadMemberFlagsString, number>): number; } export interface ThumbnailComponentData extends BaseComponentData { media: UnfurledMediaItemData; description?: string; spoiler?: boolean; } export class ThumbnailComponent extends Component<APIThumbnailComponent> { private constructor(data: APIThumbnailComponent); public readonly media: UnfurledMediaItem; public get description(): string | null; public get spoiler(): boolean; } export class Typing extends Base { private constructor(channel: TextBasedChannel, user: PartialUser, data?: RawTypingData); public channel: TextBasedChannel; public user: User | PartialUser; public startedTimestamp: number; public get startedAt(): Date; public get guild(): Guild | null; public get member(): GuildMember | null; public inGuild(): this is this & { channel: TextChannel | NewsChannel | ThreadChannel; get guild(): Guild; }; } export interface AvatarDecorationData { asset: string; skuId: Snowflake; } export interface UnfurledMediaItemData { url: string; } export class UnfurledMediaItem { private constructor(data: APIUnfurledMediaItem); public readonly data: APIUnfurledMediaItem; public get url(): string; } // tslint:disable-next-line no-empty-interface export interface User extends PartialTextBasedChannelFields<false> {} export class User extends Base { protected constructor(client: Client<true>, data: RawUserData); private _equals(user: APIUser): boolean; public accentColor: number | null | undefined; public avatar: string | null; /** @deprecated Use {@link User.avatarDecorationData} instead */ public avatarDecoration: string | null; public avatarDecorationData: AvatarDecorationData | null; public banner: string | null | undefined; public bot: boolean; public get createdAt(): Date; public get createdTimestamp(): number; public discriminator: string; public get displayName(): string; public get defaultAvatarURL(): string; public get dmChannel(): DMChannel | null; public flags: Readonly<UserFlagsBitField> | null; public globalName: string | null; public get hexAccentColor(): HexColorString | null | undefined; public id: Snowflake; public get partial(): false; public system: boolean; public get tag(): string; public username: string; public avatarURL(options?: ImageURLOptions): string | null; public avatarDecorationURL(options?: BaseImageURLOptions): string | null; public bannerURL(options?: ImageURLOptions): string | null | undefined; public createDM(force?: boolean): Promise<DMChannel>; public deleteDM(): Promise<DMChannel>; public displayAvatarURL(options?: ImageURLOptions): string; public equals(user: User): boolean; public fetch(force?: boolean): Promise<User>; /** @deprecated This method is deprecated and will be removed in the next major version. Flags may still be retrieved via {@link User.fetch} */ public fetchFlags(force?: boolean): Promise<UserFlagsBitField>; public toString(): UserMention; } export class UserContextMenuCommandInteraction< Cached extends CacheType = CacheType, > extends ContextMenuCommandInteraction<Cached> { public commandType: ApplicationCommandType.User; public options: Omit< CommandInteractionOptionResolver<Cached>, | 'getMessage' | 'getFocused' | 'getMentionable' | 'getRole' | 'getNumber' | 'getAttachment' | 'getInteger' | 'getString' | 'getChannel' | 'getBoolean' | 'getSubcommandGroup' | 'getSubcommand' >; public get targetUser(): User; public get targetMember(): CacheTypeReducer<Cached, GuildMember, APIInteractionGuildMember> | null; public inGuild(): this is UserContextMenuCommandInteraction<'raw' | 'cached'>; public inCachedGuild(): this is UserContextMenuCommandInteraction<'cached'>; public inRawGuild(): this is UserContextMenuCommandInteraction<'raw'>; } export type UserFlagsString = keyof typeof UserFlags; export class UserFlagsBitField extends BitField<UserFlagsString> { public static Flags: typeof UserFlags; public static resolve(bit?: BitFieldResolvable<UserFlagsString, number>): number; } /** @internal */ export function basename(path: string, ext?: string): string; export function cleanContent(str: string, channel: TextBasedChannel): string; export function discordSort<Key, Value extends { rawPosition: number; id: Snowflake }>( collection: ReadonlyCollection<Key, Value>, ): Collection<Key, Value>; export function cleanCodeBlockContent(text: string): string; export function fetchRecommendedShardCount(token: string, options?: FetchRecommendedShardCountOptions): Promise<number>; export function flatten(obj: unknown, ...props: Record<string, boolean | string>[]): unknown; /** @internal */ export function makeError(obj: MakeErrorOptions): Error; /** @internal */ export function makePlainError(err: Error): MakeErrorOptions; /** @internal */ export function moveElementInArray( // eslint-disable-next-line no-restricted-syntax array: unknown[], element: unknown, newIndex: number, offset?: boolean, ): number; export function parseEmoji(text: string): PartialEmoji | null; export function resolveColor(color: ColorResolvable): number; /** @internal */ export function resolvePartialEmoji(emoji: Snowflake): PartialEmojiOnlyId; /** @internal */ export function resolvePartialEmoji(emoji: Emoji | EmojiIdentifierResolvable): PartialEmoji | null; export function verifyString(data: string, error?: typeof Error, errorMessage?: string, allowEmpty?: boolean): string; /** @internal */ export function setPosition<Item extends Channel | Role>( item: Item, position: number, relative: boolean, sorted: ReadonlyCollection<Snowflake, Item>, client: Client<true>, route: string, reason?: string, ): Promise<{ id: Snowflake; position: number }[]>; export function parseWebhookURL(url: string): WebhookClientDataIdWithToken | null; /** @internal */ export function transformResolved<Cached extends CacheType>( supportingData: SupportingInteractionResolvedData, data?: Extract< APIApplicationCommandInteractionData, APIChatInputApplicationCommandInteractionData | APIContextMenuInteractionData >['resolved'], ): CommandInteractionResolvedData<Cached>; export function resolveSKUId(resolvable: SKUResolvable): Snowflake | null; /** @internal */ export interface CreateChannelOptions { allowFromUnknownGuild?: boolean; } /** @internal */ export function createChannel( client: Client<true>, data: APIChannel, guild?: Guild, extras?: CreateChannelOptions, ): Channel; /** @deprecated This class is redundant as all methods of the class can be imported from discord.js directly. */ export class Formatters extends null { /** @deprecated Import this method directly from discord.js instead. */ public static blockQuote: typeof blockQuote; /** @deprecated Import this method directly from discord.js instead. */ public static bold: typeof bold; /** @deprecated Import this method directly from discord.js instead. */ public static channelMention: typeof channelMention; /** @deprecated Import this method directly from discord.js instead. */ public static codeBlock: typeof codeBlock; /** @deprecated Import this method directly from discord.js instead. */ public static formatEmoji: typeof formatEmoji; /** @deprecated Import this method directly from discord.js instead. */ public static hideLinkEmbed: typeof hideLinkEmbed; /** @deprecated Import this method directly from discord.js instead. */ public static hyperlink: typeof hyperlink; /** @deprecated Import this method directly from discord.js instead. */ public static inlineCode: typeof inlineCode; /** @deprecated Import this method directly from discord.js instead. */ public static italic: typeof italic; /** @deprecated Import this method directly from discord.js instead. */ public static quote: typeof quote; /** @deprecated Import this method directly from discord.js instead. */ public static roleMention: typeof roleMention; /** @deprecated Import this method directly from discord.js instead. */ public static spoiler: typeof spoiler; /** @deprecated Import this method directly from discord.js instead. */ public static strikethrough: typeof strikethrough; /** @deprecated Import this method directly from discord.js instead. */ public static time: typeof time; /** @deprecated Import this property directly from discord.js instead. */ public static TimestampStyles: typeof TimestampStyles; /** @deprecated Import this method directly from discord.js instead. */ public static underscore: typeof underscore; /** @deprecated Import this method directly from discord.js instead. */ public static userMention: typeof userMention; } export type ComponentData = | MessageActionRowComponentData | ModalActionRowComponentData | ComponentInContainerData | ContainerComponentData | ThumbnailComponentData; export interface SendSoundboardSoundOptions { soundId: Snowflake; guildId?: Snowflake; } export class VoiceChannel extends BaseGuildVoiceChannel { public get speakable(): boolean; public type: ChannelType.GuildVoice; public sendSoundboardSound(sound: SoundboardSound | SendSoundboardSoundOptions): Promise<void>; } export class VoiceChannelEffect { private constructor(data: GatewayVoiceChannelEffectSendDispatchData, guild: Guild); public guild: Guild; public channelId: Snowflake; public userId: Snowflake; public emoji: Emoji | null; public animationType: VoiceChannelEffectSendAnimationType | null; public animationId: number | null; public soundId: Snowflake | number | null; public soundVolume: number | null; public get channel(): VoiceChannel | null; public get soundboardSound(): GuildSoundboardSound | null; } export class VoiceRegion { private constructor(data: RawVoiceRegionData); public custom: boolean; public deprecated: boolean; public id: string; public name: string; public optimal: boolean; public toJSON(): unknown; } export class VoiceState extends Base { private constructor(guild: Guild, data: RawVoiceStateData); public get channel(): VoiceBasedChannel | null; public channelId: Snowflake | null; public get deaf(): boolean | null; public guild: Guild; public id: Snowflake; public get member(): GuildMember | null; public get mute(): boolean | null; public selfDeaf: boolean | null; public selfMute: boolean | null; public serverDeaf: boolean | null; public serverMute: boolean | null; public sessionId: string | null; public streaming: boolean | null; public selfVideo: boolean | null; public suppress: boolean | null; public requestToSpeakTimestamp: number | null; public setDeaf(deaf?: boolean, reason?: string): Promise<GuildMember>; public setMute(mute?: boolean, reason?: string): Promise<GuildMember>; public disconnect(reason?: string): Promise<GuildMember>; public setChannel(channel: GuildVoiceChannelResolvable | null, reason?: string): Promise<GuildMember>; public setRequestToSpeak(request?: boolean): Promise<this>; public setSuppressed(suppressed?: boolean): Promise<this>; public edit(options: VoiceStateEditOptions): Promise<this>; public fetch(force?: boolean): Promise<VoiceState>; } // tslint:disable-next-line no-empty-interface export interface Webhook<Type extends WebhookType = WebhookType> extends WebhookFields {} export class Webhook<Type extends WebhookType = WebhookType> { private constructor(client: Client<true>, data?: RawWebhookData); public avatar: string | null; public avatarURL(options?: ImageURLOptions): string | null; public channelId: Snowflake; public readonly client: Client; public guildId: Snowflake; public name: string; public owner: Type extends WebhookType.Incoming ? User | APIUser | null : User | APIUser; public sourceGuild: Type extends WebhookType.ChannelFollower ? Guild | APIPartialGuild : null; public sourceChannel: Type extends WebhookType.ChannelFollower ? NewsChannel | APIPartialChannel : null; public token: Type extends WebhookType.Incoming ? string : Type extends WebhookType.ChannelFollower ? null : string | null; public type: Type; public applicationId: Type extends WebhookType.Application ? Snowflake : null; public get channel(): TextChannel | VoiceChannel | NewsChannel | StageChannel | ForumChannel | MediaChannel | null; public isUserCreated(): this is Webhook<WebhookType.Incoming> & { owner: User | APIUser; }; public isApplicationCreated(): this is Webhook<WebhookType.Application>; public isIncoming(): this is Webhook<WebhookType.Incoming>; public isChannelFollower(): this is Webhook<WebhookType.ChannelFollower>; public editMessage( message: MessageResolvable, options: string | MessagePayload | WebhookMessageEditOptions, ): Promise<Message>; public fetchMessage(message: Snowflake, options?: WebhookFetchMessageOptions): Promise<Message>; public send(options: string | MessagePayload | WebhookMessageCreateOptions): Promise<Message>; } // tslint:disable-next-line no-empty-interface export interface WebhookClient extends WebhookFields, BaseClient {} export class WebhookClient extends BaseClient { public constructor(data: WebhookClientData, options?: WebhookClientOptions); public readonly client: this; public options: WebhookClientOptions; public token: string; public editMessage( message: MessageResolvable, options: string | MessagePayload | WebhookMessageEditOptions, ): Promise<APIMessage>; public fetchMessage(message: Snowflake, options?: WebhookFetchMessageOptions): Promise<APIMessage>; public send(options: string | MessagePayload | WebhookMessageCreateOptions): Promise<APIMessage>; } export class WebSocketManager extends EventEmitter { private constructor(client: Client); private readonly packetQueue: unknown[]; private destroyed: boolean; public readonly client: Client; public gateway: string | null; public shards: Collection<number, WebSocketShard>; public status: Status; public get ping(): number; public on(event: GatewayDispatchEvents, listener: (data: any, shardId: number) => void): this; public once(event: GatewayDispatchEvents, listener: (data: any, shardId: number) => void): this; private debug(messages: readonly string[], shardId?: number): void; private connect(): Promise<void>; private broadcast(packet: unknown): void; private destroy(): Promise<void>; private handlePacket(packet?: unknown, shard?: WebSocketShard): boolean; private checkShardsReady(): void; private triggerClientReady(): void; } export interface WebSocketShardEventTypes { ready: []; resumed: []; invalidSession: []; destroyed: []; close: [event: CloseEvent]; allReady: [unavailableGuilds?: Set<Snowflake>]; } export class WebSocketShard extends EventEmitter { private constructor(manager: WebSocketManager, id: number); private closeSequence: number; private sessionInfo: SessionInfo | null; public lastPingTimestamp: number; private expectedGuilds: Set<Snowflake> | null; private readyTimeout: NodeJS.Timeout | null; public manager: WebSocketManager; public id: number; public status: Status; public ping: number; private debug(messages: readonly string[]): void; private onReadyPacket(packet: unknown): void; private gotGuild(guildId: Snowflake): void; private checkReady(): void; private emitClose(event?: CloseEvent): void; public send(data: unknown, important?: boolean): void; public on<Event extends keyof WebSocketShardEventTypes>( event: Event, listener: (...args: WebSocketShardEventTypes[Event]) => void, ): this; public once<Event extends keyof WebSocketShardEventTypes>( event: Event, listener: (...args: WebSocketShardEventTypes[Event]) => void, ): this; } export class Widget extends Base { private constructor(client: Client<true>, data: RawWidgetData); private _patch(data: RawWidgetData): void; public fetch(): Promise<Widget>; public imageURL(style?: GuildWidgetStyle): string; public id: Snowflake; public name: string; public instantInvite?: string; public channels: Collection<Snowflake, WidgetChannel>; public members: Collection<string, WidgetMember>; public presenceCount: number; } export class WidgetMember extends Base { private constructor(client: Client<true>, data: RawWidgetMemberData); public id: string; public username: string; public discriminator: string; public avatar: string | null; public status: PresenceStatus; public deaf: boolean | null; public mute: boolean | null; public selfDeaf: boolean | null; public selfMute: boolean | null; public suppress: boolean | null; public channelId: Snowflake | null; public avatarURL: string; public activity: WidgetActivity | null; } export type SoundboardSoundResolvable = SoundboardSound | Snowflake | string; export class SoundboardSound extends Base { private constructor(client: Client<true>, data: APISoundboardSound); public name: string; public soundId: Snowflake | string; public volume: number; private _emoji: Omit<APIEmoji, 'animated'> | null; public guildId: Snowflake | null; public available: boolean; public user: User | null; public get createdAt(): Date; public get createdTimestamp(): number; public get emoji(): Emoji | null; public get guild(): Guild | null; public get url(): string; public edit(options?: GuildSoundboardSoundEditOptions): Promise<GuildSoundboardSound>; public delete(reason?: string): Promise<GuildSoundboardSound>; public equals(other: SoundboardSound | APISoundboardSound): boolean; } export type DefaultSoundboardSound = SoundboardSound & { get guild(): null; guildId: null; soundId: string }; export type GuildSoundboardSound = SoundboardSound & { get guild(): Guild; guildId: Snowflake; soundId: Snowflake }; export class WelcomeChannel extends Base { private constructor(guild: Guild, data: RawWelcomeChannelData); private _emoji: Omit<APIEmoji, 'animated'>; public channelId: Snowflake; public guild: Guild | InviteGuild; public description: string; public get channel(): TextChannel | NewsChannel | ForumChannel | MediaChannel | null; public get emoji(): GuildEmoji | Emoji; } export class WelcomeScreen extends Base { private constructor(guild: Guild, data: RawWelcomeScreenData); public get enabled(): boolean; public guild: Guild | InviteGuild; public description: string | null; public welcomeChannels: Collection<Snowflake, WelcomeChannel>; } //#endregion //#region Constants export type NonSystemMessageType = | MessageType.Default | MessageType.Reply | MessageType.ChatInputCommand | MessageType.ContextMenuCommand; export type UndeletableMessageType = | MessageType.RecipientAdd | MessageType.RecipientRemove | MessageType.Call | MessageType.ChannelNameChange | MessageType.ChannelIconChange | MessageType.ThreadStarterMessage; /** @deprecated This type will no longer be updated. Use {@link UndeletableMessageType} instead. */ export type DeletableMessageType = | MessageType.AutoModerationAction | MessageType.ChannelFollowAdd | MessageType.ChannelPinnedMessage | MessageType.ChatInputCommand | MessageType.ContextMenuCommand | MessageType.Default | MessageType.GuildBoost | MessageType.GuildBoostTier1 | MessageType.GuildBoostTier2 | MessageType.GuildBoostTier3 | MessageType.GuildInviteReminder | MessageType.InteractionPremiumUpsell | MessageType.Reply | MessageType.RoleSubscriptionPurchase | MessageType.StageEnd | MessageType.StageRaiseHand | MessageType.StageSpeaker | MessageType.StageStart | MessageType.StageTopic | MessageType.ThreadCreated | MessageType.UserJoin; export const Constants: { MaxBulkDeletableMessageAge: 1_209_600_000; SweeperKeys: SweeperKey[]; NonSystemMessageTypes: NonSystemMessageType[]; TextBasedChannelTypes: TextBasedChannelTypes[]; SendableChannels: SendableChannelTypes[]; GuildTextBasedChannelTypes: GuildTextBasedChannelTypes[]; ThreadChannelTypes: ThreadChannelType[]; VoiceBasedChannelTypes: VoiceBasedChannelTypes[]; SelectMenuTypes: SelectMenuType[]; UndeletableMessageTypes: UndeletableMessageType[]; /** @deprecated This list will no longer be updated. Use {@link Constants.UndeletableMessageTypes} instead. */ DeletableMessageTypes: DeletableMessageType[]; StickerFormatExtensionMap: Record<StickerFormatType, ImageFormat>; }; export const version: string; //#endregion //#region Errors export enum DiscordjsErrorCodes { ClientInvalidOption = 'ClientInvalidOption', ClientInvalidProvidedShards = 'ClientInvalidProvidedShards', ClientMissingIntents = 'ClientMissingIntents', ClientNotReady = 'ClientNotReady', TokenInvalid = 'TokenInvalid', TokenMissing = 'TokenMissing', ApplicationCommandPermissionsTokenMissing = 'ApplicationCommandPermissionsTokenMissing', /** @deprecated WebSocket errors are now handled in `@discordjs/ws` */ WSCloseRequested = 'WSCloseRequested', /** @deprecated WebSocket errors are now handled in `@discordjs/ws` */ WSConnectionExists = 'WSConnectionExists', /** @deprecated WebSocket errors are now handled in `@discordjs/ws` */ WSNotOpen = 'WSNotOpen', /** @deprecated No longer in use */ ManagerDestroyed = 'ManagerDestroyed', BitFieldInvalid = 'BitFieldInvalid', /** @deprecated This error is now handled in `@discordjs/ws` */ ShardingInvalid = 'ShardingInvalid', /** @deprecated This error is now handled in `@discordjs/ws` */ ShardingRequired = 'ShardingRequired', /** @deprecated This error is now handled in `@discordjs/ws` */ InvalidIntents = 'InvalidIntents', /** @deprecated This error is now handled in `@discordjs/ws` */ DisallowedIntents = 'DisallowedIntents', ShardingNoShards = 'ShardingNoShards', ShardingInProcess = 'ShardingInProcess', ShardingInvalidEvalBroadcast = 'ShardingInvalidEvalBroadcast', ShardingShardNotFound = 'ShardingShardNotFound', ShardingAlreadySpawned = 'ShardingAlreadySpawned', ShardingProcessExists = 'ShardingProcessExists', ShardingWorkerExists = 'ShardingWorkerExists', ShardingReadyTimeout = 'ShardingReadyTimeout', ShardingReadyDisconnected = 'ShardingReadyDisconnected', ShardingReadyDied = 'ShardingReadyDied', ShardingNoChildExists = 'ShardingNoChildExists', ShardingShardMiscalculation = 'ShardingShardMiscalculation', ColorRange = 'ColorRange', ColorConvert = 'ColorConvert', InviteOptionsMissingChannel = 'InviteOptionsMissingChannel', /** @deprecated Button validation errors are now handled in `@discordjs/builders` */ ButtonLabel = 'ButtonLabel', /** @deprecated Button validation errors are now handled in `@discordjs/builders` */ ButtonURL = 'ButtonURL', /** @deprecated Button validation errors are now handled in `@discordjs/builders` */ ButtonCustomId = 'ButtonCustomId', /** @deprecated Select Menu validation errors are now handled in `@discordjs/builders` */ SelectMenuCustomId = 'SelectMenuCustomId', /** @deprecated Select Menu validation errors are now handled in `@discordjs/builders` */ SelectMenuPlaceholder = 'SelectMenuPlaceholder', /** @deprecated Select Menu validation errors are now handled in `@discordjs/builders` */ SelectOptionLabel = 'SelectOptionLabel', /** @deprecated Select Menu validation errors are now handled in `@discordjs/builders` */ SelectOptionValue = 'SelectOptionValue', /** @deprecated Select Menu validation errors are now handled in `@discordjs/builders` */ SelectOptionDescription = 'SelectOptionDescription', InteractionCollectorError = 'InteractionCollectorError', FileNotFound = 'FileNotFound', /** @deprecated No longer in use */ UserBannerNotFetched = 'UserBannerNotFetched', UserNoDMChannel = 'UserNoDMChannel', VoiceNotStageChannel = 'VoiceNotStageChannel', VoiceStateNotOwn = 'VoiceStateNotOwn', VoiceStateInvalidType = 'VoiceStateInvalidType', ReqResourceType = 'ReqResourceType', /** @deprecated This error is now handled in `@discordjs/rest` */ ImageFormat = 'ImageFormat', /** @deprecated This error is now handled in `@discordjs/rest` */ ImageSize = 'ImageSize', MessageBulkDeleteType = 'MessageBulkDeleteType', MessageContentType = 'MessageContentType', MessageNonceRequired = 'MessageNonceRequired', MessageNonceType = 'MessageNonceType', /** @deprecated No longer in use */ SplitMaxLen = 'SplitMaxLen', BanResolveId = 'BanResolveId', FetchBanResolveId = 'FetchBanResolveId', PruneDaysType = 'PruneDaysType', GuildChannelResolve = 'GuildChannelResolve', GuildVoiceChannelResolve = 'GuildVoiceChannelResolve', GuildChannelOrphan = 'GuildChannelOrphan', GuildChannelUnowned = 'GuildChannelUnowned', GuildOwned = 'GuildOwned', GuildMembersTimeout = 'GuildMembersTimeout', GuildSoundboardSoundsTimeout = 'GuildSoundboardSoundsTimeout', GuildUncachedMe = 'GuildUncachedMe', ChannelNotCached = 'ChannelNotCached', StageChannelResolve = 'StageChannelResolve', GuildScheduledEventResolve = 'GuildScheduledEventResolve', FetchOwnerId = 'FetchOwnerId', InvalidType = 'InvalidType', InvalidElement = 'InvalidElement', MessageThreadParent = 'MessageThreadParent', MessageExistingThread = 'MessageExistingThread', ThreadInvitableType = 'ThreadInvitableType', WebhookMessage = 'WebhookMessage', WebhookTokenUnavailable = 'WebhookTokenUnavailable', WebhookURLInvalid = 'WebhookURLInvalid', WebhookApplication = 'WebhookApplication', MessageReferenceMissing = 'MessageReferenceMissing', EmojiType = 'EmojiType', EmojiManaged = 'EmojiManaged', MissingManageGuildExpressionsPermission = 'MissingManageGuildExpressionsPermission', /** @deprecated Use {@link DiscordjsErrorCodes.MissingManageGuildExpressionsPermission} instead. */ MissingManageEmojisAndStickersPermission = 'MissingManageEmojisAndStickersPermission', NotGuildSoundboardSound = 'NotGuildSoundboardSound', NotGuildSticker = 'NotGuildSticker', ReactionResolveUser = 'ReactionResolveUser', /** @deprecated Not used anymore since the introduction of `GUILD_WEB_PAGE_VANITY_URL` feature */ VanityURL = 'VanityURL', InviteResolveCode = 'InviteResolveCode', InviteNotFound = 'InviteNotFound', DeleteGroupDMChannel = 'DeleteGroupDMChannel', FetchGroupDMChannel = 'FetchGroupDMChannel', MemberFetchNonceLength = 'MemberFetchNonceLength', GlobalCommandPermissions = 'GlobalCommandPermissions', GuildUncachedEntityResolve = 'GuildUncachedEntityResolve', InteractionAlreadyReplied = 'InteractionAlreadyReplied', InteractionNotReplied = 'InteractionNotReplied', /** @deprecated Not used anymore since ephemeral replies can now be deleted */ InteractionEphemeralReplied = 'InteractionEphemeralReplied', CommandInteractionOptionNotFound = 'CommandInteractionOptionNotFound', CommandInteractionOptionType = 'CommandInteractionOptionType', CommandInteractionOptionEmpty = 'CommandInteractionOptionEmpty', CommandInteractionOptionNoSubcommand = 'CommandInteractionOptionNoSubcommand', CommandInteractionOptionNoSubcommandGroup = 'CommandInteractionOptionNoSubcommandGroup', AutocompleteInteractionOptionNoFocusedOption = 'AutocompleteInteractionOptionNoFocusedOption', ModalSubmitInteractionFieldNotFound = 'ModalSubmitInteractionFieldNotFound', ModalSubmitInteractionFieldType = 'ModalSubmitInteractionFieldType', InvalidMissingScopes = 'InvalidMissingScopes', InvalidScopesWithPermissions = 'InvalidScopesWithPermissions', NotImplemented = 'NotImplemented', SweepFilterReturn = 'SweepFilterReturn', GuildForumMessageRequired = 'GuildForumMessageRequired', EntitlementCreateInvalidOwner = 'EntitlementCreateInvalidOwner', BulkBanUsersOptionEmpty = 'BulkBanUsersOptionEmpty', PollAlreadyExpired = 'PollAlreadyExpired', } export class DiscordjsError extends Error { private constructor(code: DiscordjsErrorCodes, ...args: unknown[]); public readonly code: DiscordjsErrorCodes; public get name(): `Error [${DiscordjsErrorCodes}]`; } export class DiscordjsTypeError extends TypeError { private constructor(code: DiscordjsErrorCodes, ...args: unknown[]); public readonly code: DiscordjsErrorCodes; public get name(): `TypeError [${DiscordjsErrorCodes}]`; } export class DiscordjsRangeError extends RangeError { private constructor(code: DiscordjsErrorCodes, ...args: unknown[]); public readonly code: DiscordjsErrorCodes; public get name(): `RangeError [${DiscordjsErrorCodes}]`; } //#endregion //#region Managers export abstract class BaseManager { protected constructor(client: Client); public readonly client: Client; } export abstract class DataManager<Key, Holds, Resolvable> extends BaseManager { protected constructor(client: Client<true>, holds: Constructable<Holds>); public readonly holds: Constructable<Holds>; public get cache(): Collection<Key, Holds>; public resolve(resolvable: Holds): Holds; public resolve(resolvable: Resolvable): Holds | null; public resolveId(resolvable: Key | Holds): Key; public resolveId(resolvable: Resolvable): Key | null; public valueOf(): Collection<Key, Holds>; } export abstract class CachedManager<Key, Holds, Resolvable> extends DataManager<Key, Holds, Resolvable> { protected constructor(client: Client<true>, holds: Constructable<Holds>, iterable?: Iterable<Holds>); private readonly _cache: Collection<Key, Holds>; private _add(data: unknown, cache?: boolean, { id, extras }?: { id: Key; extras: unknown[] }): Holds; } export type ApplicationCommandDataResolvable = | ApplicationCommandData | RESTPostAPIApplicationCommandsJSONBody | JSONEncodable<RESTPostAPIApplicationCommandsJSONBody>; export class ApplicationCommandManager< ApplicationCommandScope = ApplicationCommand<{ guild: GuildResolvable }>, PermissionsOptionsExtras = { guild: GuildResolvable }, PermissionsGuildType = null, > extends CachedManager<Snowflake, ApplicationCommandScope, ApplicationCommandResolvable> { protected constructor(client: Client<true>, iterable?: Iterable<unknown>); public permissions: ApplicationCommandPermissionsManager< { command?: ApplicationCommandResolvable } & PermissionsOptionsExtras, { command: ApplicationCommandResolvable } & PermissionsOptionsExtras, PermissionsGuildType, null >; private commandPath({ id, guildId }: { id?: Snowflake; guildId?: Snowflake }): string; public create(command: ApplicationCommandDataResolvable, guildId?: Snowflake): Promise<ApplicationCommandScope>; public delete(command: ApplicationCommandResolvable, guildId?: Snowflake): Promise<ApplicationCommandScope | null>; public edit( command: ApplicationCommandResolvable, data: Partial<ApplicationCommandDataResolvable>, ): Promise<ApplicationCommandScope>; public edit( command: ApplicationCommandResolvable, data: Partial<ApplicationCommandDataResolvable>, guildId: Snowflake, ): Promise<ApplicationCommand>; public fetch( id: Snowflake, options: FetchApplicationCommandOptions & { guildId: Snowflake }, ): Promise<ApplicationCommand>; public fetch(options: FetchApplicationCommandOptions): Promise<Collection<Snowflake, ApplicationCommandScope>>; public fetch(id: Snowflake, options?: FetchApplicationCommandOptions): Promise<ApplicationCommandScope>; public fetch( id?: Snowflake, options?: FetchApplicationCommandOptions, ): Promise<Collection<Snowflake, ApplicationCommandScope>>; public set( commands: readonly ApplicationCommandDataResolvable[], ): Promise<Collection<Snowflake, ApplicationCommandScope>>; public set( commands: readonly ApplicationCommandDataResolvable[], guildId: Snowflake, ): Promise<Collection<Snowflake, ApplicationCommand>>; private static transformCommand(command: ApplicationCommandDataResolvable): RESTPostAPIApplicationCommandsJSONBody; } export class ApplicationCommandPermissionsManager< BaseOptions, FetchSingleOptions, GuildType, CommandIdType, > extends BaseManager { private constructor(manager: ApplicationCommandManager | GuildApplicationCommandManager | ApplicationCommand); private manager: ApplicationCommandManager | GuildApplicationCommandManager | ApplicationCommand; public commandId: CommandIdType; public guild: GuildType; public guildId: Snowflake | null; public add( options: FetchSingleOptions & EditApplicationCommandPermissionsMixin, ): Promise<ApplicationCommandPermissions[]>; public has( options: FetchSingleOptions & { permissionId: ApplicationCommandPermissionIdResolvable; permissionType?: ApplicationCommandPermissionType; }, ): Promise<boolean>; public fetch(options: FetchSingleOptions): Promise<ApplicationCommandPermissions[]>; public fetch(options: BaseOptions): Promise<Collection<Snowflake, ApplicationCommandPermissions[]>>; public remove( options: | (FetchSingleOptions & { token: string; channels?: readonly (GuildChannelResolvable | ChannelPermissionConstant)[]; roles?: readonly (RoleResolvable | RolePermissionConstant)[]; users: readonly UserResolvable[]; }) | (FetchSingleOptions & { token: string; channels?: readonly (GuildChannelResolvable | ChannelPermissionConstant)[]; roles: readonly (RoleResolvable | RolePermissionConstant)[]; users?: readonly UserResolvable[]; }) | (FetchSingleOptions & { token: string; channels: readonly (GuildChannelResolvable | ChannelPermissionConstant)[]; roles?: readonly (RoleResolvable | RolePermissionConstant)[]; users?: readonly UserResolvable[]; }), ): Promise<ApplicationCommandPermissions[]>; public set( options: FetchSingleOptions & EditApplicationCommandPermissionsMixin, ): Promise<ApplicationCommandPermissions[]>; private permissionsPath(guildId: Snowflake, commandId?: Snowflake): string; } export class AutoModerationRuleManager extends CachedManager< Snowflake, AutoModerationRule, AutoModerationRuleResolvable > { private constructor(guild: Guild, iterable: unknown); public guild: Guild; public create(options: AutoModerationRuleCreateOptions): Promise<AutoModerationRule>; public edit( autoModerationRule: AutoModerationRuleResolvable, options: AutoModerationRuleEditOptions, ): Promise<AutoModerationRule>; public fetch(options: AutoModerationRuleResolvable | FetchAutoModerationRuleOptions): Promise<AutoModerationRule>; public fetch(options?: FetchAutoModerationRulesOptions): Promise<Collection<Snowflake, AutoModerationRule>>; public delete(autoModerationRule: AutoModerationRuleResolvable, reason?: string): Promise<void>; } export class BaseGuildEmojiManager extends CachedManager<Snowflake, GuildEmoji, EmojiResolvable> { protected constructor(client: Client<true>, iterable?: Iterable<RawGuildEmojiData>); public resolveIdentifier(emoji: EmojiIdentifierResolvable): string | null; } export class CategoryChannelChildManager extends DataManager<Snowflake, CategoryChildChannel, GuildChannelResolvable> { private constructor(channel: CategoryChannel); public channel: CategoryChannel; public get guild(): Guild; public create<Type extends CategoryChannelType>( options: CategoryCreateChannelOptions & { type: Type }, ): Promise<MappedChannelCategoryTypes[Type]>; public create(options: CategoryCreateChannelOptions): Promise<TextChannel>; } export class ChannelManager extends CachedManager<Snowflake, Channel, ChannelResolvable> { private constructor(client: Client<true>, iterable: Iterable<RawChannelData>); public fetch(id: Snowflake, options?: FetchChannelOptions): Promise<Channel | null>; } export type EntitlementResolvable = Snowflake | Entitlement; export type SKUResolvable = Snowflake | SKU; export type SubscriptionResolvable = Snowflake | Subscription; export interface GuildEntitlementCreateOptions { sku: SKUResolvable; guild: GuildResolvable; } export interface UserEntitlementCreateOptions { sku: SKUResolvable; user: UserResolvable; } export interface FetchEntitlementOptions extends BaseFetchOptions { entitlement: EntitlementResolvable; } export interface FetchEntitlementsOptions { limit?: number; guild?: GuildResolvable; user?: UserResolvable; skus?: readonly SKUResolvable[]; excludeEnded?: boolean; excludeDeleted?: boolean; cache?: boolean; before?: Snowflake; after?: Snowflake; } export class EntitlementManager extends CachedManager<Snowflake, Entitlement, EntitlementResolvable> { private constructor(client: Client<true>, iterable: Iterable<APIEntitlement>); public fetch(options: EntitlementResolvable | FetchEntitlementOptions): Promise<Entitlement>; public fetch(options?: FetchEntitlementsOptions): Promise<Collection<Snowflake, Entitlement>>; public createTest(options: GuildEntitlementCreateOptions | UserEntitlementCreateOptions): Promise<Entitlement>; public deleteTest(entitlement: EntitlementResolvable): Promise<void>; public consume(entitlementId: Snowflake): Promise<void>; } export interface FetchSubscriptionOptions extends BaseFetchOptions { sku: SKUResolvable; subscriptionId: Snowflake; } export interface FetchSubscriptionsOptions { after?: Snowflake; before?: Snowflake; limit?: number; sku: SKUResolvable; user: UserResolvable; } export class SubscriptionManager extends CachedManager<Snowflake, Subscription, SubscriptionResolvable> { private constructor(client: Client<true>, iterable?: Iterable<APISubscription>); public fetch(options: FetchSubscriptionOptions): Promise<Subscription>; public fetch(options: FetchSubscriptionsOptions): Promise<Collection<Snowflake, Subscription>>; } export interface FetchGuildApplicationCommandFetchOptions extends Omit<FetchApplicationCommandOptions, 'guildId'> {} export class GuildApplicationCommandManager extends ApplicationCommandManager<ApplicationCommand, {}, Guild> { private constructor(guild: Guild, iterable?: Iterable<RawApplicationCommandData>); public guild: Guild; public create(command: ApplicationCommandDataResolvable): Promise<ApplicationCommand>; public delete(command: ApplicationCommandResolvable): Promise<ApplicationCommand | null>; public edit( command: ApplicationCommandResolvable, data: Partial<ApplicationCommandDataResolvable>, ): Promise<ApplicationCommand>; public fetch(id: Snowflake, options?: FetchGuildApplicationCommandFetchOptions): Promise<ApplicationCommand>; public fetch(options: FetchGuildApplicationCommandFetchOptions): Promise<Collection<Snowflake, ApplicationCommand>>; public fetch( id?: undefined, options?: FetchGuildApplicationCommandFetchOptions, ): Promise<Collection<Snowflake, ApplicationCommand>>; public set(commands: readonly ApplicationCommandDataResolvable[]): Promise<Collection<Snowflake, ApplicationCommand>>; } export type MappedGuildChannelTypes = { [ChannelType.GuildCategory]: CategoryChannel; } & MappedChannelCategoryTypes; export type GuildChannelTypes = CategoryChannelType | ChannelType.GuildCategory; export class GuildChannelManager extends CachedManager<Snowflake, GuildBasedChannel, GuildChannelResolvable> { private constructor(guild: Guild, iterable?: Iterable<RawGuildChannelData>); public get channelCountWithoutThreads(): number; public guild: Guild; public addFollower( channel: NewsChannelResolvable, targetChannel: TextChannelResolvable, reason?: string, ): Promise<Snowflake>; public create<Type extends GuildChannelTypes>( options: GuildChannelCreateOptions & { type: Type }, ): Promise<MappedGuildChannelTypes[Type]>; public create(options: GuildChannelCreateOptions): Promise<TextChannel>; public createWebhook(options: WebhookCreateOptions): Promise<Webhook<WebhookType.Incoming>>; public edit(channel: GuildChannelResolvable, data: GuildChannelEditOptions): Promise<GuildChannel>; public fetch(id: Snowflake, options?: BaseFetchOptions): Promise<GuildBasedChannel | null>; public fetch( id?: undefined, options?: BaseFetchOptions, ): Promise<Collection<Snowflake, NonThreadGuildBasedChannel | null>>; public fetchWebhooks( channel: GuildChannelResolvable, ): Promise<Collection<Snowflake, Webhook<WebhookType.ChannelFollower | WebhookType.Incoming>>>; public setPosition( channel: GuildChannelResolvable, position: number, options?: SetChannelPositionOptions, ): Promise<GuildChannel>; public setPositions(channelPositions: readonly ChannelPosition[]): Promise<Guild>; public fetchActiveThreads(cache?: boolean): Promise<FetchedThreads>; private rawFetchGuildActiveThreads(): Promise<RESTGetAPIGuildThreadsResult>; public delete(channel: GuildChannelResolvable, reason?: string): Promise<void>; } export class GuildEmojiManager extends BaseGuildEmojiManager { private constructor(guild: Guild, iterable?: Iterable<RawGuildEmojiData>); public guild: Guild; public create(options: GuildEmojiCreateOptions): Promise<GuildEmoji>; public fetch(id: Snowflake, options?: BaseFetchOptions): Promise<GuildEmoji>; public fetch(id?: undefined, options?: BaseFetchOptions): Promise<Collection<Snowflake, GuildEmoji>>; public fetchAuthor(emoji: EmojiResolvable): Promise<User>; public delete(emoji: EmojiResolvable, reason?: string): Promise<void>; public edit(emoji: EmojiResolvable, options: GuildEmojiEditOptions): Promise<GuildEmoji>; } export class GuildEmojiRoleManager extends DataManager<Snowflake, Role, RoleResolvable> { private constructor(emoji: GuildEmoji); public emoji: GuildEmoji; public guild: Guild; public add( roleOrRoles: RoleResolvable | readonly RoleResolvable[] | ReadonlyCollection<Snowflake, Role>, ): Promise<GuildEmoji>; public set(roles: readonly RoleResolvable[] | ReadonlyCollection<Snowflake, Role>): Promise<GuildEmoji>; public remove( roleOrRoles: RoleResolvable | readonly RoleResolvable[] | ReadonlyCollection<Snowflake, Role>, ): Promise<GuildEmoji>; } export interface FetchSoundboardSoundsOptions { guildIds: readonly Snowflake[]; time?: number; } export class GuildManager extends CachedManager<Snowflake, Guild, GuildResolvable> { private constructor(client: Client<true>, iterable?: Iterable<RawGuildData>); public create(options: GuildCreateOptions): Promise<Guild>; public fetch(options: Snowflake | FetchGuildOptions): Promise<Guild>; public fetch(options?: FetchGuildsOptions): Promise<Collection<Snowflake, OAuth2Guild>>; public fetchSoundboardSounds( options: FetchSoundboardSoundsOptions, ): Promise<Collection<Snowflake, Collection<Snowflake, GuildSoundboardSound>>>; public setIncidentActions( guild: GuildResolvable, incidentActions: IncidentActionsEditOptions, ): Promise<IncidentActions>; public widgetImageURL(guild: GuildResolvable, style?: GuildWidgetStyle): string; } export interface AddOrRemoveGuildMemberRoleOptions { user: GuildMemberResolvable; role: RoleResolvable; reason?: string; } export class GuildMemberManager extends CachedManager<Snowflake, GuildMember, GuildMemberResolvable> { private constructor(guild: Guild, iterable?: Iterable<RawGuildMemberData>); public guild: Guild; public get me(): GuildMember | null; public add( user: UserResolvable, options: AddGuildMemberOptions & { fetchWhenExisting: false }, ): Promise<GuildMember | null>; public add(user: UserResolvable, options: AddGuildMemberOptions): Promise<GuildMember>; public ban(user: UserResolvable, options?: BanOptions): Promise<GuildMember | User | Snowflake>; public bulkBan( users: ReadonlyCollection<Snowflake, UserResolvable> | readonly UserResolvable[], options?: BulkBanOptions, ): Promise<BulkBanResult>; public edit(user: UserResolvable, options: GuildMemberEditOptions): Promise<GuildMember>; public fetch( options: UserResolvable | FetchMemberOptions | (FetchMembersOptions & { user: UserResolvable }), ): Promise<GuildMember>; public fetch(options?: FetchMembersOptions): Promise<Collection<Snowflake, GuildMember>>; public fetchMe(options?: BaseFetchOptions): Promise<GuildMember>; public kick(user: UserResolvable, reason?: string): Promise<GuildMember | User | Snowflake>; public list(options?: GuildListMembersOptions): Promise<Collection<Snowflake, GuildMember>>; public prune(options: GuildPruneMembersOptions & { dry?: false; count: false }): Promise<null>; public prune(options?: GuildPruneMembersOptions): Promise<number>; public search(options: GuildSearchMembersOptions): Promise<Collection<Snowflake, GuildMember>>; public unban(user: UserResolvable, reason?: string): Promise<User | null>; public addRole(options: AddOrRemoveGuildMemberRoleOptions): Promise<GuildMember | User | Snowflake>; public removeRole(options: AddOrRemoveGuildMemberRoleOptions): Promise<GuildMember | User | Snowflake>; } export class GuildBanManager extends CachedManager<Snowflake, GuildBan, GuildBanResolvable> { private constructor(guild: Guild, iterable?: Iterable<RawGuildBanData>); public guild: Guild; public create(user: UserResolvable, options?: BanOptions): Promise<GuildMember | User | Snowflake>; public fetch(options: UserResolvable | FetchBanOptions): Promise<GuildBan>; public fetch(options?: FetchBansOptions): Promise<Collection<Snowflake, GuildBan>>; public remove(user: UserResolvable, reason?: string): Promise<User | null>; public bulkCreate( users: ReadonlyCollection<Snowflake, UserResolvable> | readonly UserResolvable[], options?: BulkBanOptions, ): Promise<BulkBanResult>; } export class GuildInviteManager extends DataManager<string, Invite, InviteResolvable> { private constructor(guild: Guild, iterable?: Iterable<RawInviteData>); public guild: Guild; public create(channel: GuildInvitableChannelResolvable, options?: InviteCreateOptions): Promise<Invite>; public fetch(options: InviteResolvable | FetchInviteOptions): Promise<Invite>; public fetch(options?: FetchInvitesOptions): Promise<Collection<string, Invite>>; public delete(invite: InviteResolvable, reason?: string): Promise<Invite>; } export class GuildScheduledEventManager extends CachedManager< Snowflake, GuildScheduledEvent, GuildScheduledEventResolvable > { private constructor(guild: Guild, iterable?: Iterable<RawGuildScheduledEventData>); public guild: Guild; public create(options: GuildScheduledEventCreateOptions): Promise<GuildScheduledEvent>; public fetch(): Promise<Collection<Snowflake, GuildScheduledEvent>>; public fetch< Options extends GuildScheduledEventResolvable | FetchGuildScheduledEventOptions | FetchGuildScheduledEventsOptions, >(options?: Options): Promise<GuildScheduledEventManagerFetchResult<Options>>; public edit< Status extends GuildScheduledEventStatus, AcceptableStatus extends GuildScheduledEventSetStatusArg<Status>, >( guildScheduledEvent: GuildScheduledEventResolvable, options: GuildScheduledEventEditOptions<Status, AcceptableStatus>, ): Promise<GuildScheduledEvent<AcceptableStatus>>; public delete(guildScheduledEvent: GuildScheduledEventResolvable): Promise<void>; public fetchSubscribers<Options extends FetchGuildScheduledEventSubscribersOptions>( guildScheduledEvent: GuildScheduledEventResolvable, options?: Options, ): Promise<GuildScheduledEventManagerFetchSubscribersResult<Options>>; } export interface GuildSoundboardSoundCreateOptions { file: BufferResolvable | Stream; name: string; contentType?: string; volume?: number; emojiId?: Snowflake; emojiName?: string; reason?: string; } export interface GuildSoundboardSoundEditOptions { name?: string; volume?: number | null; emojiId?: Snowflake | null; emojiName?: string | null; reason?: string; } export interface FetchGuildSoundboardSoundOptions extends BaseFetchOptions { soundboardSound: SoundboardSoundResolvable; } export interface FetchGuildSoundboardSoundsOptions extends Pick<BaseFetchOptions, 'cache'> {} export class GuildSoundboardSoundManager extends CachedManager<Snowflake, SoundboardSound, SoundboardSoundResolvable> { private constructor(guild: Guild, iterable?: Iterable<APISoundboardSound>); public guild: Guild; public create(options: GuildSoundboardSoundCreateOptions): Promise<GuildSoundboardSound>; public edit( soundboardSound: SoundboardSoundResolvable, options: GuildSoundboardSoundEditOptions, ): Promise<GuildSoundboardSound>; public delete(soundboardSound: SoundboardSoundResolvable): Promise<void>; public fetch(options: SoundboardSoundResolvable | FetchGuildSoundboardSoundOptions): Promise<GuildSoundboardSound>; public fetch(options?: FetchGuildSoundboardSoundsOptions): Promise<Collection<Snowflake, GuildSoundboardSound>>; } export class GuildStickerManager extends CachedManager<Snowflake, Sticker, StickerResolvable> { private constructor(guild: Guild, iterable?: Iterable<RawStickerData>); public guild: Guild; public create(options: GuildStickerCreateOptions): Promise<Sticker>; public edit(sticker: StickerResolvable, data?: GuildStickerEditOptions): Promise<Sticker>; public delete(sticker: StickerResolvable, reason?: string): Promise<void>; public fetch(id: Snowflake, options?: BaseFetchOptions): Promise<Sticker>; public fetch(id?: Snowflake, options?: BaseFetchOptions): Promise<Collection<Snowflake, Sticker>>; public fetchUser(sticker: StickerResolvable): Promise<User | null>; } export class GuildMemberRoleManager extends DataManager<Snowflake, Role, RoleResolvable> { private constructor(member: GuildMember); public get hoist(): Role | null; public get icon(): Role | null; public get color(): Role | null; public get highest(): Role; public get premiumSubscriberRole(): Role | null; public get botRole(): Role | null; public member: GuildMember; public guild: Guild; public add( roleOrRoles: RoleResolvable | readonly RoleResolvable[] | ReadonlyCollection<Snowflake, Role>, reason?: string, ): Promise<GuildMember>; public set( roles: readonly RoleResolvable[] | ReadonlyCollection<Snowflake, Role>, reason?: string, ): Promise<GuildMember>; public remove( roleOrRoles: RoleResolvable | readonly RoleResolvable[] | ReadonlyCollection<Snowflake, Role>, reason?: string, ): Promise<GuildMember>; } export interface FetchPollAnswerVotersOptions extends BaseFetchPollAnswerVotersOptions { messageId: Snowflake; answerId: number; } export abstract class MessageManager<InGuild extends boolean = boolean> extends CachedManager< Snowflake, Message<InGuild>, MessageResolvable > { protected constructor(channel: TextBasedChannel, iterable?: Iterable<RawMessageData>); public channel: TextBasedChannel; public delete(message: MessageResolvable): Promise<void>; public edit( message: MessageResolvable, options: string | MessagePayload | MessageEditOptions, ): Promise<Message<InGuild>>; public fetch(options: MessageResolvable | FetchMessageOptions): Promise<Message<InGuild>>; public fetch(options?: FetchMessagesOptions): Promise<Collection<Snowflake, Message<InGuild>>>; public fetchPinned(cache?: boolean): Promise<Collection<Snowflake, Message<InGuild>>>; public react(message: MessageResolvable, emoji: EmojiIdentifierResolvable): Promise<void>; public pin(message: MessageResolvable, reason?: string): Promise<void>; public unpin(message: MessageResolvable, reason?: string): Promise<void>; public endPoll(messageId: Snowflake): Promise<Message>; public fetchPollAnswerVoters(options: FetchPollAnswerVotersOptions): Promise<Collection<Snowflake, User>>; } export class DMMessageManager extends MessageManager { public channel: DMChannel; } export class PartialGroupDMMessageManager extends MessageManager { public channel: PartialGroupDMChannel; } export class GuildMessageManager extends MessageManager<true> { public channel: GuildTextBasedChannel; public crosspost(message: MessageResolvable): Promise<Message<true>>; } export class PermissionOverwriteManager extends CachedManager< Snowflake, PermissionOverwrites, PermissionOverwriteResolvable > { private constructor(client: Client<true>, iterable?: Iterable<RawPermissionOverwriteData>); public set( overwrites: readonly OverwriteResolvable[] | ReadonlyCollection<Snowflake, OverwriteResolvable>, reason?: string, ): Promise<NonThreadGuildBasedChannel>; private upsert( userOrRole: RoleResolvable | UserResolvable, options: PermissionOverwriteOptions, overwriteOptions?: GuildChannelOverwriteOptions, existing?: PermissionOverwrites, ): Promise<NonThreadGuildBasedChannel>; public create( userOrRole: RoleResolvable | UserResolvable, options: PermissionOverwriteOptions, overwriteOptions?: GuildChannelOverwriteOptions, ): Promise<NonThreadGuildBasedChannel>; public edit( userOrRole: RoleResolvable | UserResolvable, options: PermissionOverwriteOptions, overwriteOptions?: GuildChannelOverwriteOptions, ): Promise<NonThreadGuildBasedChannel>; public delete(userOrRole: RoleResolvable | UserResolvable, reason?: string): Promise<NonThreadGuildBasedChannel>; } export class PresenceManager extends CachedManager<Snowflake, Presence, PresenceResolvable> { private constructor(client: Client<true>, iterable?: Iterable<RawPresenceData>); } export class ReactionManager extends CachedManager<Snowflake | string, MessageReaction, MessageReactionResolvable> { private constructor(message: Message, iterable?: Iterable<RawMessageReactionData>); public message: Message; public removeAll(): Promise<Message>; } export class ReactionUserManager extends CachedManager<Snowflake, User, UserResolvable> { private constructor(reaction: MessageReaction, iterable?: Iterable<RawUserData>); public reaction: MessageReaction; public fetch(options?: FetchReactionUsersOptions): Promise<Collection<Snowflake, User>>; public remove(user?: UserResolvable): Promise<MessageReaction>; } export class RoleManager extends CachedManager<Snowflake, Role, RoleResolvable> { private constructor(guild: Guild, iterable?: Iterable<RawRoleData>); public get everyone(): Role; public get highest(): Role; public guild: Guild; public get premiumSubscriberRole(): Role | null; public botRoleFor(user: UserResolvable): Role | null; public fetch(id: Snowflake, options?: BaseFetchOptions): Promise<Role | null>; public fetch(id?: undefined, options?: BaseFetchOptions): Promise<Collection<Snowflake, Role>>; public create(options?: RoleCreateOptions): Promise<Role>; public edit(role: RoleResolvable, options: RoleEditOptions): Promise<Role>; public delete(role: RoleResolvable, reason?: string): Promise<void>; public setPosition(role: RoleResolvable, position: number, options?: SetRolePositionOptions): Promise<Role>; public setPositions(rolePositions: readonly RolePosition[]): Promise<Guild>; public comparePositions(role1: RoleResolvable, role2: RoleResolvable): number; } export class StageInstanceManager extends CachedManager<Snowflake, StageInstance, StageInstanceResolvable> { private constructor(guild: Guild, iterable?: Iterable<RawStageInstanceData>); public guild: Guild; public create(channel: StageChannelResolvable, options: StageInstanceCreateOptions): Promise<StageInstance>; public fetch(channel: StageChannelResolvable, options?: BaseFetchOptions): Promise<StageInstance>; public edit(channel: StageChannelResolvable, options: StageInstanceEditOptions): Promise<StageInstance>; public delete(channel: StageChannelResolvable): Promise<void>; } export class ThreadManager<ThreadOnly extends boolean = boolean> extends CachedManager< Snowflake, If<ThreadOnly, ForumThreadChannel, TextThreadChannel>, ThreadChannelResolvable > { protected constructor( channel: TextChannel | NewsChannel | ForumChannel | MediaChannel, iterable?: Iterable<RawThreadChannelData>, ); public channel: If<ThreadOnly, ForumChannel | MediaChannel, TextChannel | NewsChannel>; public fetch( options: ThreadChannelResolvable, cacheOptions?: BaseFetchOptions, ): Promise<If<ThreadOnly, ForumThreadChannel, TextThreadChannel> | null>; public fetch( options: FetchThreadsOptions & { archived: FetchArchivedThreadOptions }, cacheOptions?: { cache?: boolean }, ): Promise<FetchedThreadsMore>; public fetch(options?: FetchThreadsOptions, cacheOptions?: { cache?: boolean }): Promise<FetchedThreads>; public fetchArchived(options?: FetchArchivedThreadOptions, cache?: boolean): Promise<FetchedThreadsMore>; public fetchActive(cache?: boolean): Promise<FetchedThreads>; } export class GuildTextThreadManager<AllowedThreadType> extends ThreadManager<false> { public create( options: GuildTextThreadCreateOptions<AllowedThreadType>, ): Promise<AllowedThreadType extends ChannelType.PrivateThread ? PrivateThreadChannel : PublicThreadChannel<false>>; } export class GuildForumThreadManager extends ThreadManager<true> { public create(options: GuildForumThreadCreateOptions): Promise<ForumThreadChannel>; } export class ThreadMemberManager extends CachedManager<Snowflake, ThreadMember, ThreadMemberResolvable> { private constructor(thread: ThreadChannel, iterable?: Iterable<RawThreadMemberData>); public thread: AnyThreadChannel; public get me(): ThreadMember | null; /* tslint:disable:unified-signatures */ public add(member: UserResolvable | '@me'): Promise<Snowflake>; /** @deprecated The `reason` parameter is deprecated as Discord does not parse them. */ public add(member: UserResolvable | '@me', reason?: string): Promise<Snowflake>; /* tslint:enable:unified-signatures */ public fetch( options: ThreadMember<true> | ((FetchThreadMemberOptions & { withMember: true }) | { member: ThreadMember<true> }), ): Promise<ThreadMember<true>>; public fetch(options: ThreadMemberResolvable | FetchThreadMemberOptions): Promise<ThreadMember>; public fetch( options: FetchThreadMembersWithGuildMemberDataOptions, ): Promise<Collection<Snowflake, ThreadMember<true>>>; public fetch(options?: FetchThreadMembersWithoutGuildMemberDataOptions): Promise<Collection<Snowflake, ThreadMember>>; public fetchMe(options?: BaseFetchOptions): Promise<ThreadMember>; /* tslint:disable:unified-signatures */ public remove(member: UserResolvable | '@me'): Promise<Snowflake>; /** @deprecated The `reason` parameter is deprecated as Discord does not parse them. */ public remove(member: UserResolvable | '@me', reason?: string): Promise<Snowflake>; /* tslint:enable:unified-signatures */ } export class UserManager extends CachedManager<Snowflake, User, UserResolvable> { private constructor(client: Client<true>, iterable?: Iterable<RawUserData>); private dmChannel(userId: Snowflake): DMChannel | null; public createDM(user: UserResolvable, options?: BaseFetchOptions): Promise<DMChannel>; public deleteDM(user: UserResolvable): Promise<DMChannel>; public fetch(user: UserResolvable, options?: BaseFetchOptions): Promise<User>; /** @deprecated This method is deprecated and will be removed in the next major version. Flags may still be retrieved via {@link UserManager.fetch} */ public fetchFlags(user: UserResolvable, options?: BaseFetchOptions): Promise<UserFlagsBitField>; public send(user: UserResolvable, options: string | MessagePayload | MessageCreateOptions): Promise<Message>; } export class VoiceStateManager extends CachedManager<Snowflake, VoiceState, typeof VoiceState> { private constructor(guild: Guild, iterable?: Iterable<RawVoiceStateData>); public guild: Guild; public fetch(member: GuildMemberResolvable | '@me', options?: BaseFetchOptions): Promise<VoiceState>; } //#endregion //#region Mixins // Model the TextBasedChannel mixin system, allowing application of these fields // to the classes that use these methods without having to manually add them // to each of those classes export type Constructable<Entity> = abstract new (...args: any[]) => Entity; export interface PartialTextBasedChannelFields<InGuild extends boolean = boolean> { send(options: string | MessagePayload | MessageCreateOptions): Promise<Message<InGuild>>; } export interface TextBasedChannelFields<InGuild extends boolean = boolean, InDM extends boolean = boolean> extends PartialTextBasedChannelFields<InGuild> { lastMessageId: Snowflake | null; get lastMessage(): Message | null; lastPinTimestamp: number | null; get lastPinAt(): Date | null; messages: If<InGuild, GuildMessageManager, If<InDM, DMMessageManager, PartialGroupDMMessageManager>>; awaitMessageComponent<ComponentType extends MessageComponentType>( options?: AwaitMessageCollectorOptionsParams<ComponentType, true>, ): Promise<MappedInteractionTypes[ComponentType]>; awaitMessages(options?: AwaitMessagesOptions): Promise<Collection<Snowflake, Message>>; bulkDelete( messages: Collection<Snowflake, Message> | readonly MessageResolvable[] | number, filterOld?: boolean, ): Promise<Collection<Snowflake, Message | PartialMessage | undefined>>; createMessageComponentCollector<ComponentType extends MessageComponentType>( options?: MessageChannelCollectorOptionsParams<ComponentType, true>, ): InteractionCollector<MappedInteractionTypes[ComponentType]>; createMessageCollector(options?: MessageCollectorOptions): MessageCollector; createWebhook(options: ChannelWebhookCreateOptions): Promise<Webhook<WebhookType.Incoming>>; fetchWebhooks(): Promise<Collection<Snowflake, Webhook<WebhookType.ChannelFollower | WebhookType.Incoming>>>; sendTyping(): Promise<void>; setRateLimitPerUser(rateLimitPerUser: number, reason?: string): Promise<this>; setNSFW(nsfw?: boolean, reason?: string): Promise<this>; } /** @internal */ export interface PartialWebhookFields { id: Snowflake; get url(): string; deleteMessage(message: MessageResolvable | APIMessage | '@original', threadId?: Snowflake): Promise<void>; editMessage( message: MessageResolvable | '@original', options: string | MessagePayload | WebhookMessageEditOptions, ): Promise<APIMessage | Message>; fetchMessage(message: Snowflake | '@original', options?: WebhookFetchMessageOptions): Promise<APIMessage | Message>; send( options: string | MessagePayload | InteractionReplyOptions | WebhookMessageCreateOptions, ): Promise<APIMessage | Message>; } /** @internal */ export interface WebhookFields extends PartialWebhookFields { get createdAt(): Date; get createdTimestamp(): number; delete(reason?: string): Promise<void>; edit(options: WebhookEditOptions): Promise<this>; sendSlackMessage(body: unknown): Promise<boolean>; } //#endregion //#region Typedefs export interface ActivitiesOptions extends Omit<ActivityOptions, 'shardId'> {} export interface ActivityOptions { name: string; state?: string; url?: string; type?: ActivityType; shardId?: number | readonly number[]; } export interface AddGuildMemberOptions { accessToken: string; nick?: string; roles?: ReadonlyCollection<Snowflake, Role> | readonly RoleResolvable[]; mute?: boolean; deaf?: boolean; force?: boolean; fetchWhenExisting?: boolean; } export type AllowedPartial = | User | Channel | GuildMember | Message | MessageReaction | GuildScheduledEvent | ThreadMember | SoundboardSound; export type AllowedThreadTypeForNewsChannel = ChannelType.AnnouncementThread; export type AllowedThreadTypeForTextChannel = ChannelType.PublicThread | ChannelType.PrivateThread; export interface BaseApplicationCommandData { name: string; nameLocalizations?: LocalizationMap; dmPermission?: boolean; defaultMemberPermissions?: PermissionResolvable | null; nsfw?: boolean; contexts?: readonly InteractionContextType[]; integrationTypes?: readonly ApplicationIntegrationType[]; } export interface AttachmentData { name?: string; description?: string; } export type CommandOptionDataTypeResolvable = ApplicationCommandOptionType; export type CommandOptionChannelResolvableType = ApplicationCommandOptionType.Channel; export type CommandOptionChoiceResolvableType = | ApplicationCommandOptionType.String | CommandOptionNumericResolvableType; export type CommandOptionNumericResolvableType = | ApplicationCommandOptionType.Number | ApplicationCommandOptionType.Integer; export type CommandOptionSubOptionResolvableType = | ApplicationCommandOptionType.Subcommand | ApplicationCommandOptionType.SubcommandGroup; export type CommandOptionNonChoiceResolvableType = Exclude< CommandOptionDataTypeResolvable, CommandOptionChoiceResolvableType | CommandOptionSubOptionResolvableType | CommandOptionChannelResolvableType >; export interface BaseApplicationCommandOptionsData { name: string; nameLocalizations?: LocalizationMap; description: string; descriptionLocalizations?: LocalizationMap; required?: boolean; autocomplete?: never; } export interface UserApplicationCommandData extends BaseApplicationCommandData { type: ApplicationCommandType.User; } export interface MessageApplicationCommandData extends BaseApplicationCommandData { type: ApplicationCommandType.Message; } export interface ChatInputApplicationCommandData extends BaseApplicationCommandData { description: string; descriptionLocalizations?: LocalizationMap; type?: ApplicationCommandType.ChatInput; options?: readonly ApplicationCommandOptionData[]; } export interface PrimaryEntryPointCommandData extends BaseApplicationCommandData { description?: string; descriptionLocalizations?: LocalizationMap; type: ApplicationCommandType.PrimaryEntryPoint; handler?: EntryPointCommandHandlerType; } export type ApplicationCommandData = | UserApplicationCommandData | MessageApplicationCommandData | ChatInputApplicationCommandData | PrimaryEntryPointCommandData; export interface ApplicationCommandChannelOptionData extends BaseApplicationCommandOptionsData { type: CommandOptionChannelResolvableType; channelTypes?: readonly ApplicationCommandOptionAllowedChannelTypes[]; channel_types?: readonly ApplicationCommandOptionAllowedChannelTypes[]; } export interface ApplicationCommandChannelOption extends BaseApplicationCommandOptionsData { type: ApplicationCommandOptionType.Channel; channelTypes?: readonly ApplicationCommandOptionAllowedChannelTypes[]; } export interface ApplicationCommandRoleOptionData extends BaseApplicationCommandOptionsData { type: ApplicationCommandOptionType.Role; } export interface ApplicationCommandRoleOption extends BaseApplicationCommandOptionsData { type: ApplicationCommandOptionType.Role; } export interface ApplicationCommandUserOptionData extends BaseApplicationCommandOptionsData { type: ApplicationCommandOptionType.User; } export interface ApplicationCommandUserOption extends BaseApplicationCommandOptionsData { type: ApplicationCommandOptionType.User; } export interface ApplicationCommandMentionableOptionData extends BaseApplicationCommandOptionsData { type: ApplicationCommandOptionType.Mentionable; } export interface ApplicationCommandMentionableOption extends BaseApplicationCommandOptionsData { type: ApplicationCommandOptionType.Mentionable; } export interface ApplicationCommandAttachmentOption extends BaseApplicationCommandOptionsData { type: ApplicationCommandOptionType.Attachment; } export interface ApplicationCommandAutocompleteNumericOption extends Omit<BaseApplicationCommandOptionsData, 'autocomplete'> { type: CommandOptionNumericResolvableType; minValue?: number; maxValue?: number; autocomplete: true; } export interface ApplicationCommandAutocompleteStringOption extends Omit<BaseApplicationCommandOptionsData, 'autocomplete'> { type: ApplicationCommandOptionType.String; minLength?: number; maxLength?: number; autocomplete: true; } export interface ApplicationCommandAutocompleteNumericOptionData extends Omit<BaseApplicationCommandOptionsData, 'autocomplete'> { type: CommandOptionNumericResolvableType; minValue?: number; min_value?: number; maxValue?: number; max_value?: number; autocomplete: true; } export interface ApplicationCommandAutocompleteStringOptionData extends Omit<BaseApplicationCommandOptionsData, 'autocomplete'> { type: ApplicationCommandOptionType.String; minLength?: number; min_length?: number; maxLength?: number; max_length?: number; autocomplete: true; } export interface ApplicationCommandChoicesData<Type extends string | number = string | number> extends Omit<BaseApplicationCommandOptionsData, 'autocomplete'> { type: CommandOptionChoiceResolvableType; choices?: readonly ApplicationCommandOptionChoiceData<Type>[]; autocomplete?: false; } export interface ApplicationCommandChoicesOption<Type extends string | number = string | number> extends Omit<BaseApplicationCommandOptionsData, 'autocomplete'> { type: CommandOptionChoiceResolvableType; choices?: readonly ApplicationCommandOptionChoiceData<Type>[]; autocomplete?: false; } export interface ApplicationCommandNumericOptionData extends ApplicationCommandChoicesData<number> { type: CommandOptionNumericResolvableType; minValue?: number; min_value?: number; maxValue?: number; max_value?: number; } export interface ApplicationCommandStringOptionData extends ApplicationCommandChoicesData<string> { type: ApplicationCommandOptionType.String; minLength?: number; min_length?: number; maxLength?: number; max_length?: number; } export interface ApplicationCommandBooleanOptionData extends BaseApplicationCommandOptionsData { type: ApplicationCommandOptionType.Boolean; } export interface ApplicationCommandNumericOption extends ApplicationCommandChoicesOption<number> { type: CommandOptionNumericResolvableType; minValue?: number; maxValue?: number; } export interface ApplicationCommandStringOption extends ApplicationCommandChoicesOption<string> { type: ApplicationCommandOptionType.String; minLength?: number; maxLength?: number; } export interface ApplicationCommandBooleanOption extends BaseApplicationCommandOptionsData { type: ApplicationCommandOptionType.Boolean; } export interface ApplicationCommandSubGroupData extends Omit<BaseApplicationCommandOptionsData, 'required'> { type: ApplicationCommandOptionType.SubcommandGroup; options: readonly ApplicationCommandSubCommandData[]; } export interface ApplicationCommandSubGroup extends Omit<BaseApplicationCommandOptionsData, 'required'> { type: ApplicationCommandOptionType.SubcommandGroup; options?: readonly ApplicationCommandSubCommand[]; } export interface ApplicationCommandSubCommandData extends Omit<BaseApplicationCommandOptionsData, 'required'> { type: ApplicationCommandOptionType.Subcommand; options?: readonly Exclude< ApplicationCommandOptionData, ApplicationCommandSubGroupData | ApplicationCommandSubCommandData >[]; } export interface ApplicationCommandSubCommand extends Omit<BaseApplicationCommandOptionsData, 'required'> { type: ApplicationCommandOptionType.Subcommand; options?: readonly Exclude<ApplicationCommandOption, ApplicationCommandSubGroup | ApplicationCommandSubCommand>[]; } export interface ApplicationCommandNonOptionsData extends BaseApplicationCommandOptionsData { type: CommandOptionNonChoiceResolvableType; } export interface ApplicationCommandNonOptions extends BaseApplicationCommandOptionsData { type: Exclude<CommandOptionNonChoiceResolvableType, ApplicationCommandOptionType>; } export type ApplicationCommandOptionData = | ApplicationCommandSubGroupData | ApplicationCommandNonOptionsData | ApplicationCommandChannelOptionData | ApplicationCommandAutocompleteNumericOptionData | ApplicationCommandAutocompleteStringOptionData | ApplicationCommandNumericOptionData | ApplicationCommandStringOptionData | ApplicationCommandRoleOptionData | ApplicationCommandUserOptionData | ApplicationCommandMentionableOptionData | ApplicationCommandBooleanOptionData | ApplicationCommandSubCommandData; export type ApplicationCommandOption = | ApplicationCommandSubGroup | ApplicationCommandAutocompleteNumericOption | ApplicationCommandAutocompleteStringOption | ApplicationCommandNonOptions | ApplicationCommandChannelOption | ApplicationCommandNumericOption | ApplicationCommandStringOption | ApplicationCommandRoleOption | ApplicationCommandUserOption | ApplicationCommandMentionableOption | ApplicationCommandBooleanOption | ApplicationCommandAttachmentOption | ApplicationCommandSubCommand; export interface ApplicationCommandOptionChoiceData<Value extends string | number = string | number> { name: string; nameLocalizations?: LocalizationMap; value: Value; } export interface ApplicationCommandPermissions { id: Snowflake; type: ApplicationCommandPermissionType; permission: boolean; } export interface ApplicationCommandPermissionsUpdateData { id: Snowflake; guildId: Snowflake; applicationId: Snowflake; permissions: readonly ApplicationCommandPermissions[]; } export interface EditApplicationCommandPermissionsMixin { permissions: readonly ApplicationCommandPermissions[]; token: string; } export type ChannelPermissionConstant = Snowflake; export type RolePermissionConstant = Snowflake; export type ApplicationCommandPermissionIdResolvable = | GuildChannelResolvable | RoleResolvable | UserResolvable | ChannelPermissionConstant | RolePermissionConstant; export type ApplicationCommandResolvable = ApplicationCommand | Snowflake; export type ApplicationFlagsString = keyof typeof ApplicationFlags; export interface ApplicationRoleConnectionMetadataEditOptions { name: string; nameLocalizations?: LocalizationMap | null; description: string; descriptionLocalizations?: LocalizationMap | null; key: string; type: ApplicationRoleConnectionMetadataType; } export type AuditLogChange = { [SourceElement in APIAuditLogChange as SourceElement['key']]: { key: SourceElement['key']; old?: SourceElement['old_value']; new?: SourceElement['new_value']; }; }[APIAuditLogChange['key']]; export interface AutoModerationAction { type: AutoModerationActionType; metadata: AutoModerationActionMetadata; } export interface AutoModerationActionMetadata { channelId: Snowflake | null; durationSeconds: number | null; customMessage: string | null; } export interface AutoModerationTriggerMetadata { keywordFilter: readonly string[]; regexPatterns: readonly string[]; presets: readonly AutoModerationRuleKeywordPresetType[]; allowList: readonly string[]; mentionTotalLimit: number | null; mentionRaidProtectionEnabled: boolean; } export interface AwaitMessageComponentOptions<Interaction extends CollectedMessageInteraction> extends Omit<MessageComponentCollectorOptions<Interaction>, 'max' | 'maxComponents' | 'maxUsers'> {} export interface ModalSubmitInteractionCollectorOptions<Interaction extends ModalSubmitInteraction> extends Omit<InteractionCollectorOptions<Interaction>, 'channel' | 'message' | 'guild' | 'interactionType'> {} export interface AwaitModalSubmitOptions<Interaction extends ModalSubmitInteraction> extends Omit<ModalSubmitInteractionCollectorOptions<Interaction>, 'max' | 'maxComponents' | 'maxUsers'> { time: number; } export interface AwaitMessagesOptions extends MessageCollectorOptions { errors?: readonly string[]; } export interface AwaitReactionsOptions extends ReactionCollectorOptions { errors?: readonly string[]; } export interface BanOptions { /** @deprecated Use {@link BanOptions.deleteMessageSeconds} instead. */ deleteMessageDays?: number; deleteMessageSeconds?: number; reason?: string; } export interface BulkBanOptions extends Omit<BanOptions, 'deleteMessageDays'> {} export interface BulkBanResult { bannedUsers: readonly Snowflake[]; failedUsers: readonly Snowflake[]; } export interface PollData { question: PollQuestionMedia; answers: readonly PollAnswerData[]; duration: number; allowMultiselect: boolean; layoutType?: PollLayoutType; } export interface PollAnswerData { text: string; emoji?: EmojiIdentifierResolvable; } export type Base64Resolvable = Buffer | Base64String; export type Base64String = string; export interface BaseFetchOptions { cache?: boolean; force?: boolean; } export type BitFieldResolvable<Flags extends string, Type extends number | bigint> = | RecursiveReadonlyArray<Flags | Type | `${bigint}` | Readonly<BitField<Flags, Type>>> | Flags | Type | `${bigint}` | Readonly<BitField<Flags, Type>>; export type BufferResolvable = Buffer | string; export interface Caches { ApplicationCommandManager: [manager: typeof ApplicationCommandManager, holds: typeof ApplicationCommand]; ApplicationEmojiManager: [manager: typeof ApplicationEmojiManager, holds: typeof ApplicationEmoji]; AutoModerationRuleManager: [manager: typeof AutoModerationRuleManager, holds: typeof AutoModerationRule]; BaseGuildEmojiManager: [manager: typeof BaseGuildEmojiManager, holds: typeof GuildEmoji]; // TODO: ChannelManager: [manager: typeof ChannelManager, holds: typeof Channel]; DMMessageManager: [manager: typeof MessageManager, holds: typeof Message<false>]; EntitlementManager: [manager: typeof EntitlementManager, holds: typeof Entitlement]; GuildBanManager: [manager: typeof GuildBanManager, holds: typeof GuildBan]; // TODO: GuildChannelManager: [manager: typeof GuildChannelManager, holds: typeof GuildChannel]; GuildEmojiManager: [manager: typeof GuildEmojiManager, holds: typeof GuildEmoji]; GuildForumThreadManager: [manager: typeof GuildForumThreadManager, holds: typeof ThreadChannel<true>]; GuildInviteManager: [manager: typeof GuildInviteManager, holds: typeof Invite]; // TODO: GuildManager: [manager: typeof GuildManager, holds: typeof Guild]; GuildMemberManager: [manager: typeof GuildMemberManager, holds: typeof GuildMember]; GuildMessageManager: [manager: typeof GuildMessageManager, holds: typeof Message<true>]; GuildScheduledEventManager: [manager: typeof GuildScheduledEventManager, holds: typeof GuildScheduledEvent]; GuildStickerManager: [manager: typeof GuildStickerManager, holds: typeof Sticker]; GuildTextThreadManager: [manager: typeof GuildTextThreadManager, holds: typeof ThreadChannel<false>]; MessageManager: [manager: typeof MessageManager, holds: typeof Message]; // TODO: PermissionOverwriteManager: [manager: typeof PermissionOverwriteManager, holds: typeof PermissionOverwrites]; PresenceManager: [manager: typeof PresenceManager, holds: typeof Presence]; ReactionManager: [manager: typeof ReactionManager, holds: typeof MessageReaction]; ReactionUserManager: [manager: typeof ReactionUserManager, holds: typeof User]; // TODO: RoleManager: [manager: typeof RoleManager, holds: typeof Role]; StageInstanceManager: [manager: typeof StageInstanceManager, holds: typeof StageInstance]; ThreadManager: [manager: typeof ThreadManager, holds: typeof ThreadChannel]; ThreadMemberManager: [manager: typeof ThreadMemberManager, holds: typeof ThreadMember]; UserManager: [manager: typeof UserManager, holds: typeof User]; VoiceStateManager: [manager: typeof VoiceStateManager, holds: typeof VoiceState]; } export type CacheConstructors = { [Cache in keyof Caches]: Caches[Cache][0] & { name: Cache }; }; type OverriddenCaches = | 'DMMessageManager' | 'GuildForumThreadManager' | 'GuildMessageManager' | 'GuildTextThreadManager'; // This doesn't actually work the way it looks 😢. // Narrowing the type of `manager.name` doesn't propagate type information to `holds` and the return type. export type CacheFactory = ( managerType: CacheConstructors[Exclude<keyof Caches, OverriddenCaches>], holds: Caches[(typeof manager)['name']][1], manager: CacheConstructors[keyof Caches], ) => (typeof manager)['prototype'] extends DataManager<infer Key, infer Value, any> ? Collection<Key, Value> : never; export type CacheWithLimitsOptions = { [K in keyof Caches]?: Caches[K][0]['prototype'] extends DataManager<infer Key, infer Value, any> ? LimitedCollectionOptions<Key, Value> | number : never; }; export interface CategoryCreateChannelOptions { name: string; permissionOverwrites?: readonly OverwriteResolvable[] | ReadonlyCollection<Snowflake, OverwriteResolvable>; topic?: string; type?: CategoryChannelType; nsfw?: boolean; bitrate?: number; userLimit?: number; rateLimitPerUser?: number; position?: number; rtcRegion?: string; videoQualityMode?: VideoQualityMode; defaultThreadRateLimitPerUser?: number; availableTags?: readonly GuildForumTagData[]; defaultReactionEmoji?: DefaultReactionEmoji; defaultAutoArchiveDuration?: ThreadAutoArchiveDuration; defaultSortOrder?: SortOrderType; defaultForumLayout?: ForumLayoutType; reason?: string; } export interface ChannelCreationOverwrites { allow?: PermissionResolvable; deny?: PermissionResolvable; id: RoleResolvable | UserResolvable; } export type ChannelMention = `<#${Snowflake}>`; export interface ChannelPosition { channel: NonThreadGuildBasedChannel | Snowflake; lockPermissions?: boolean; parent?: CategoryChannelResolvable | null; position?: number; } export type GuildTextChannelResolvable = TextChannel | NewsChannel | Snowflake; export type ChannelResolvable = Channel | Snowflake; export interface ChannelWebhookCreateOptions { name: string; avatar?: BufferResolvable | Base64Resolvable | null; reason?: string; } export interface WebhookCreateOptions extends ChannelWebhookCreateOptions { channel: TextChannel | NewsChannel | VoiceChannel | StageChannel | ForumChannel | MediaChannel | Snowflake; } export interface GuildMembersChunk { index: number; count: number; notFound: readonly unknown[]; nonce: string | undefined; } export type OmitPartialGroupDMChannel<Structure extends { channel: Channel }> = Structure & { channel: Exclude<Structure['channel'], PartialGroupDMChannel>; }; export interface ClientEvents { applicationCommandPermissionsUpdate: [data: ApplicationCommandPermissionsUpdateData]; autoModerationActionExecution: [autoModerationActionExecution: AutoModerationActionExecution]; autoModerationRuleCreate: [autoModerationRule: AutoModerationRule]; autoModerationRuleDelete: [autoModerationRule: AutoModerationRule]; autoModerationRuleUpdate: [ oldAutoModerationRule: AutoModerationRule | null, newAutoModerationRule: AutoModerationRule, ]; cacheSweep: [message: string]; channelCreate: [channel: NonThreadGuildBasedChannel]; channelDelete: [channel: DMChannel | NonThreadGuildBasedChannel]; channelPinsUpdate: [channel: TextBasedChannel, date: Date]; channelUpdate: [ oldChannel: DMChannel | NonThreadGuildBasedChannel, newChannel: DMChannel | NonThreadGuildBasedChannel, ]; debug: [message: string]; warn: [message: string]; emojiCreate: [emoji: GuildEmoji]; emojiDelete: [emoji: GuildEmoji]; emojiUpdate: [oldEmoji: GuildEmoji, newEmoji: GuildEmoji]; entitlementCreate: [entitlement: Entitlement]; entitlementDelete: [entitlement: Entitlement]; entitlementUpdate: [oldEntitlement: Entitlement | null, newEntitlement: Entitlement]; error: [error: Error]; guildAuditLogEntryCreate: [auditLogEntry: GuildAuditLogsEntry, guild: Guild]; guildAvailable: [guild: Guild]; guildBanAdd: [ban: GuildBan]; guildBanRemove: [ban: GuildBan]; guildCreate: [guild: Guild]; guildDelete: [guild: Guild]; guildUnavailable: [guild: Guild]; guildIntegrationsUpdate: [guild: Guild]; guildMemberAdd: [member: GuildMember]; guildMemberAvailable: [member: GuildMember | PartialGuildMember]; guildMemberRemove: [member: GuildMember | PartialGuildMember]; guildMembersChunk: [members: ReadonlyCollection<Snowflake, GuildMember>, guild: Guild, data: GuildMembersChunk]; guildMemberUpdate: [oldMember: GuildMember | PartialGuildMember, newMember: GuildMember]; guildUpdate: [oldGuild: Guild, newGuild: Guild]; guildSoundboardSoundCreate: [soundboardSound: GuildSoundboardSound]; guildSoundboardSoundDelete: [soundboardSound: GuildSoundboardSound | PartialSoundboardSound]; guildSoundboardSoundUpdate: [ oldSoundboardSound: GuildSoundboardSound | null, newSoundboardSound: GuildSoundboardSound, ]; guildSoundboardSoundsUpdate: [soundboardSounds: ReadonlyCollection<Snowflake, GuildSoundboardSound>, guild: Guild]; inviteCreate: [invite: Invite]; inviteDelete: [invite: Invite]; messageCreate: [message: OmitPartialGroupDMChannel<Message>]; messageDelete: [message: OmitPartialGroupDMChannel<Message | PartialMessage>]; messagePollVoteAdd: [pollAnswer: PollAnswer, userId: Snowflake]; messagePollVoteRemove: [pollAnswer: PollAnswer, userId: Snowflake]; messageReactionRemoveAll: [ message: OmitPartialGroupDMChannel<Message | PartialMessage>, reactions: ReadonlyCollection<string | Snowflake, MessageReaction>, ]; messageReactionRemoveEmoji: [reaction: MessageReaction | PartialMessageReaction]; messageDeleteBulk: [ messages: ReadonlyCollection<Snowflake, OmitPartialGroupDMChannel<Message | PartialMessage>>, channel: GuildTextBasedChannel, ]; messageReactionAdd: [ reaction: MessageReaction | PartialMessageReaction, user: User | PartialUser, details: MessageReactionEventDetails, ]; messageReactionRemove: [ reaction: MessageReaction | PartialMessageReaction, user: User | PartialUser, details: MessageReactionEventDetails, ]; messageUpdate: [ oldMessage: OmitPartialGroupDMChannel<Message | PartialMessage>, newMessage: OmitPartialGroupDMChannel<Message>, ]; presenceUpdate: [oldPresence: Presence | null, newPresence: Presence]; ready: [client: Client<true>]; invalidated: []; roleCreate: [role: Role]; roleDelete: [role: Role]; roleUpdate: [oldRole: Role, newRole: Role]; threadCreate: [thread: AnyThreadChannel, newlyCreated: boolean]; threadDelete: [thread: AnyThreadChannel]; threadListSync: [threads: ReadonlyCollection<Snowflake, AnyThreadChannel>, guild: Guild]; threadMemberUpdate: [oldMember: ThreadMember, newMember: ThreadMember]; threadMembersUpdate: [ addedMembers: ReadonlyCollection<Snowflake, ThreadMember>, removedMembers: ReadonlyCollection<Snowflake, ThreadMember | PartialThreadMember>, thread: AnyThreadChannel, ]; threadUpdate: [oldThread: AnyThreadChannel, newThread: AnyThreadChannel]; typingStart: [typing: Typing]; userUpdate: [oldUser: User | PartialUser, newUser: User]; voiceChannelEffectSend: [voiceChannelEffect: VoiceChannelEffect]; voiceStateUpdate: [oldState: VoiceState, newState: VoiceState]; /** @deprecated Use {@link ClientEvents.webhooksUpdate} instead. */ webhookUpdate: ClientEvents['webhooksUpdate']; webhooksUpdate: [channel: TextChannel | NewsChannel | VoiceChannel | ForumChannel | MediaChannel]; interactionCreate: [interaction: Interaction]; shardDisconnect: [closeEvent: CloseEvent, shardId: number]; shardError: [error: Error, shardId: number]; shardReady: [shardId: number, unavailableGuilds: Set<Snowflake> | undefined]; shardReconnecting: [shardId: number]; shardResume: [shardId: number, replayedEvents: number]; stageInstanceCreate: [stageInstance: StageInstance]; stageInstanceUpdate: [oldStageInstance: StageInstance | null, newStageInstance: StageInstance]; stageInstanceDelete: [stageInstance: StageInstance]; stickerCreate: [sticker: Sticker]; stickerDelete: [sticker: Sticker]; stickerUpdate: [oldSticker: Sticker, newSticker: Sticker]; subscriptionCreate: [subscription: Subscription]; subscriptionDelete: [subscription: Subscription]; subscriptionUpdate: [oldSubscription: Subscription | null, newSubscription: Subscription]; guildScheduledEventCreate: [guildScheduledEvent: GuildScheduledEvent]; guildScheduledEventUpdate: [ oldGuildScheduledEvent: GuildScheduledEvent | PartialGuildScheduledEvent | null, newGuildScheduledEvent: GuildScheduledEvent, ]; guildScheduledEventDelete: [guildScheduledEvent: GuildScheduledEvent | PartialGuildScheduledEvent]; guildScheduledEventUserAdd: [guildScheduledEvent: GuildScheduledEvent | PartialGuildScheduledEvent, user: User]; guildScheduledEventUserRemove: [guildScheduledEvent: GuildScheduledEvent | PartialGuildScheduledEvent, user: User]; soundboardSounds: [soundboardSounds: ReadonlyCollection<Snowflake, GuildSoundboardSound>, guild: Guild]; } export interface ClientFetchInviteOptions { guildScheduledEventId?: Snowflake; } export interface ClientOptions { shards?: number | readonly number[] | 'auto'; shardCount?: number; closeTimeout?: number; makeCache?: CacheFactory; allowedMentions?: MessageMentionOptions; partials?: readonly Partials[]; failIfNotExists?: boolean; presence?: PresenceData; intents: BitFieldResolvable<GatewayIntentsString, number>; waitGuildTimeout?: number; sweepers?: SweeperOptions; ws?: WebSocketOptions; rest?: Partial<RESTOptions>; jsonTransformer?: (obj: unknown) => unknown; enforceNonce?: boolean; } export type ClientPresenceStatus = 'online' | 'idle' | 'dnd'; export interface ClientPresenceStatusData { web?: ClientPresenceStatus; mobile?: ClientPresenceStatus; desktop?: ClientPresenceStatus; } export interface ClientUserEditOptions { username?: string; avatar?: BufferResolvable | Base64Resolvable | null; banner?: BufferResolvable | Base64Resolvable | null; } export interface CloseEvent { /** @deprecated Not used anymore since using {@link @discordjs/ws#(WebSocketManager:class)} internally */ wasClean: boolean; code: number; /** @deprecated Not used anymore since using {@link @discordjs/ws#(WebSocketManager:class)} internally */ reason: string; } export type CollectorFilter<Arguments extends unknown[]> = (...args: Arguments) => Awaitable<boolean>; export interface CollectorOptions<FilterArguments extends unknown[]> { filter?: CollectorFilter<FilterArguments>; time?: number; idle?: number; dispose?: boolean; } export interface CollectorResetTimerOptions { time?: number; idle?: number; } export type ColorResolvable = | keyof typeof Colors | 'Random' | readonly [red: number, green: number, blue: number] | number | HexColorString; export interface CommandInteractionOption<Cached extends CacheType = CacheType> { name: string; type: ApplicationCommandOptionType; value?: string | number | boolean; focused?: boolean; autocomplete?: boolean; options?: readonly CommandInteractionOption[]; user?: User; member?: CacheTypeReducer<Cached, GuildMember, APIInteractionDataResolvedGuildMember>; channel?: CacheTypeReducer<Cached, GuildBasedChannel, APIInteractionDataResolvedChannel>; role?: CacheTypeReducer<Cached, Role, APIRole>; attachment?: Attachment; message?: Message<BooleanCache<Cached>>; } export interface CommandInteractionResolvedData<Cached extends CacheType = CacheType> { users?: ReadonlyCollection<Snowflake, User>; members?: ReadonlyCollection<Snowflake, CacheTypeReducer<Cached, GuildMember, APIInteractionDataResolvedGuildMember>>; roles?: ReadonlyCollection<Snowflake, CacheTypeReducer<Cached, Role, APIRole>>; channels?: ReadonlyCollection<Snowflake, CacheTypeReducer<Cached, Channel, APIInteractionDataResolvedChannel>>; messages?: ReadonlyCollection<Snowflake, CacheTypeReducer<Cached, Message, APIMessage>>; attachments?: ReadonlyCollection<Snowflake, Attachment>; } export interface AutocompleteFocusedOption extends Pick<CommandInteractionOption, 'name'> { focused: true; type: | ApplicationCommandOptionType.String | ApplicationCommandOptionType.Integer | ApplicationCommandOptionType.Number; value: string; } export declare const Colors: { Default: 0x000000; White: 0xffffff; Aqua: 0x1abc9c; Green: 0x57f287; Blue: 0x3498db; Yellow: 0xfee75c; Purple: 0x9b59b6; LuminousVividPink: 0xe91e63; Fuchsia: 0xeb459e; Gold: 0xf1c40f; Orange: 0xe67e22; Red: 0xed4245; Grey: 0x95a5a6; Navy: 0x34495e; DarkAqua: 0x11806a; DarkGreen: 0x1f8b4c; DarkBlue: 0x206694; DarkPurple: 0x71368a; DarkVividPink: 0xad1457; DarkGold: 0xc27c0e; DarkOrange: 0xa84300; DarkRed: 0x992d22; DarkGrey: 0x979c9f; DarkerGrey: 0x7f8c8d; LightGrey: 0xbcc0c0; DarkNavy: 0x2c3e50; Blurple: 0x5865f2; Greyple: 0x99aab5; DarkButNotBlack: 0x2c2f33; NotQuiteBlack: 0x23272a; }; export enum Events { ApplicationCommandPermissionsUpdate = 'applicationCommandPermissionsUpdate', AutoModerationActionExecution = 'autoModerationActionExecution', AutoModerationRuleCreate = 'autoModerationRuleCreate', AutoModerationRuleDelete = 'autoModerationRuleDelete', AutoModerationRuleUpdate = 'autoModerationRuleUpdate', ClientReady = 'ready', EntitlementCreate = 'entitlementCreate', EntitlementDelete = 'entitlementDelete', EntitlementUpdate = 'entitlementUpdate', GuildAuditLogEntryCreate = 'guildAuditLogEntryCreate', GuildAvailable = 'guildAvailable', GuildCreate = 'guildCreate', GuildDelete = 'guildDelete', GuildUpdate = 'guildUpdate', GuildUnavailable = 'guildUnavailable', GuildMemberAdd = 'guildMemberAdd', GuildMemberRemove = 'guildMemberRemove', GuildMemberUpdate = 'guildMemberUpdate', GuildMemberAvailable = 'guildMemberAvailable', GuildMembersChunk = 'guildMembersChunk', GuildIntegrationsUpdate = 'guildIntegrationsUpdate', GuildRoleCreate = 'roleCreate', GuildRoleDelete = 'roleDelete', InviteCreate = 'inviteCreate', InviteDelete = 'inviteDelete', GuildRoleUpdate = 'roleUpdate', GuildEmojiCreate = 'emojiCreate', GuildEmojiDelete = 'emojiDelete', GuildEmojiUpdate = 'emojiUpdate', GuildBanAdd = 'guildBanAdd', GuildBanRemove = 'guildBanRemove', ChannelCreate = 'channelCreate', ChannelDelete = 'channelDelete', ChannelUpdate = 'channelUpdate', ChannelPinsUpdate = 'channelPinsUpdate', MessageCreate = 'messageCreate', MessageDelete = 'messageDelete', MessageUpdate = 'messageUpdate', MessageBulkDelete = 'messageDeleteBulk', MessagePollVoteAdd = 'messagePollVoteAdd', MessagePollVoteRemove = 'messagePollVoteRemove', MessageReactionAdd = 'messageReactionAdd', MessageReactionRemove = 'messageReactionRemove', MessageReactionRemoveAll = 'messageReactionRemoveAll', MessageReactionRemoveEmoji = 'messageReactionRemoveEmoji', ThreadCreate = 'threadCreate', ThreadDelete = 'threadDelete', ThreadUpdate = 'threadUpdate', ThreadListSync = 'threadListSync', ThreadMemberUpdate = 'threadMemberUpdate', ThreadMembersUpdate = 'threadMembersUpdate', UserUpdate = 'userUpdate', PresenceUpdate = 'presenceUpdate', VoiceChannelEffectSend = 'voiceChannelEffectSend', VoiceServerUpdate = 'voiceServerUpdate', VoiceStateUpdate = 'voiceStateUpdate', TypingStart = 'typingStart', WebhooksUpdate = 'webhookUpdate', InteractionCreate = 'interactionCreate', Error = 'error', Warn = 'warn', Debug = 'debug', CacheSweep = 'cacheSweep', ShardDisconnect = 'shardDisconnect', ShardError = 'shardError', ShardReconnecting = 'shardReconnecting', ShardReady = 'shardReady', ShardResume = 'shardResume', Invalidated = 'invalidated', Raw = 'raw', StageInstanceCreate = 'stageInstanceCreate', StageInstanceUpdate = 'stageInstanceUpdate', StageInstanceDelete = 'stageInstanceDelete', SubscriptionCreate = 'subscriptionCreate', SubscriptionUpdate = 'subscriptionUpdate', SubscriptionDelete = 'subscriptionDelete', GuildStickerCreate = 'stickerCreate', GuildStickerDelete = 'stickerDelete', GuildStickerUpdate = 'stickerUpdate', GuildScheduledEventCreate = 'guildScheduledEventCreate', GuildScheduledEventUpdate = 'guildScheduledEventUpdate', GuildScheduledEventDelete = 'guildScheduledEventDelete', GuildScheduledEventUserAdd = 'guildScheduledEventUserAdd', GuildScheduledEventUserRemove = 'guildScheduledEventUserRemove', GuildSoundboardSoundCreate = 'guildSoundboardSoundCreate', GuildSoundboardSoundDelete = 'guildSoundboardSoundDelete', GuildSoundboardSoundUpdate = 'guildSoundboardSoundUpdate', GuildSoundboardSoundsUpdate = 'guildSoundboardSoundsUpdate', SoundboardSounds = 'soundboardSounds', } export enum ShardEvents { Death = 'death', Disconnect = 'disconnect', Error = 'error', Message = 'message', Ready = 'ready', Reconnecting = 'reconnecting', Resume = 'resume', Spawn = 'spawn', } export enum WebSocketShardEvents { Close = 'close', Destroyed = 'destroyed', InvalidSession = 'invalidSession', Ready = 'ready', Resumed = 'resumed', AllReady = 'allReady', } export enum Status { Ready = 0, Connecting = 1, Reconnecting = 2, Idle = 3, Nearly = 4, Disconnected = 5, WaitingForGuilds = 6, Identifying = 7, Resuming = 8, } export interface GuildScheduledEventInviteURLCreateOptions extends InviteCreateOptions { channel?: GuildInvitableChannelResolvable; } export interface RoleCreateOptions extends RoleData { reason?: string; } export interface RoleEditOptions extends RoleData { reason?: string; } export interface StageInstanceCreateOptions { topic: string; privacyLevel?: StageInstancePrivacyLevel; sendStartNotification?: boolean; guildScheduledEvent?: GuildScheduledEventResolvable; } export interface CrosspostedChannel { channelId: Snowflake; guildId: Snowflake; type: ChannelType; name: string; } export type DateResolvable = Date | number | string; export interface GuildTemplateEditOptions { name?: string; description?: string; } export interface EmbedField { name: string; value: string; inline: boolean; } export type EmojiIdentifierResolvable = | EmojiResolvable | `${'' | 'a:'}${string}:${Snowflake}` | `<${'' | 'a'}:${string}:${Snowflake}>` | string; export type EmojiResolvable = Snowflake | GuildEmoji | ReactionEmoji | ApplicationEmoji; export interface FetchApplicationCommandOptions extends BaseFetchOptions { guildId?: Snowflake; locale?: Locale; withLocalizations?: boolean; } export interface FetchArchivedThreadOptions { type?: 'public' | 'private'; fetchAll?: boolean; before?: ThreadChannelResolvable | DateResolvable; limit?: number; } export interface FetchAutoModerationRuleOptions extends BaseFetchOptions { autoModerationRule: AutoModerationRuleResolvable; } export interface FetchAutoModerationRulesOptions { cache?: boolean; } export interface FetchBanOptions extends BaseFetchOptions { user: UserResolvable; } export interface FetchBansOptions { limit?: number; before?: Snowflake; after?: Snowflake; cache?: boolean; } export interface FetchChannelOptions extends BaseFetchOptions { allowUnknownGuild?: boolean; } export interface FetchedThreads { threads: ReadonlyCollection<Snowflake, AnyThreadChannel>; members: ReadonlyCollection<Snowflake, ThreadMember>; } export interface FetchedThreadsMore extends FetchedThreads { hasMore: boolean; } export interface FetchGuildOptions extends BaseFetchOptions { guild: GuildResolvable; withCounts?: boolean; } export interface FetchGuildsOptions { before?: Snowflake; after?: Snowflake; limit?: number; } export interface FetchGuildScheduledEventOptions extends BaseFetchOptions { guildScheduledEvent: GuildScheduledEventResolvable; withUserCount?: boolean; } export interface FetchGuildScheduledEventsOptions { cache?: boolean; withUserCount?: boolean; } export interface FetchGuildScheduledEventSubscribersOptions { limit?: number; withMember?: boolean; } export interface FetchInviteOptions extends BaseFetchOptions { code: string; } export interface FetchInvitesOptions { channelId?: GuildInvitableChannelResolvable; cache?: boolean; } export interface FetchMemberOptions extends BaseFetchOptions { user: UserResolvable; } export interface FetchMembersOptions { user?: UserResolvable | readonly UserResolvable[]; query?: string; limit?: number; withPresences?: boolean; time?: number; nonce?: string; } export interface FetchMessageOptions extends BaseFetchOptions { message: MessageResolvable; } export interface FetchMessagesOptions { limit?: number; before?: Snowflake; after?: Snowflake; around?: Snowflake; cache?: boolean; } export interface FetchReactionUsersOptions { type?: ReactionType; limit?: number; after?: Snowflake; } export interface FetchThreadMemberOptions extends BaseFetchOptions { member: ThreadMemberResolvable; withMember?: boolean; } export interface FetchThreadOwnerOptions extends BaseFetchOptions { withMember?: boolean; } export interface FetchThreadMembersWithGuildMemberDataOptions { withMember: true; after?: Snowflake; limit?: number; cache?: boolean; } export interface FetchThreadMembersWithoutGuildMemberDataOptions { withMember?: false; cache?: boolean; } export type FetchThreadMembersOptions = | FetchThreadMembersWithGuildMemberDataOptions | FetchThreadMembersWithoutGuildMemberDataOptions; export interface FetchThreadsOptions { archived?: FetchArchivedThreadOptions; } export interface AttachmentPayload { attachment: BufferResolvable | Stream; name?: string; description?: string; } export type GlobalSweepFilter<Key, Value> = () => | ((value: Value, key: Key, collection: Collection<Key, Value>) => boolean) | null; interface GuildAuditLogsTypes { [AuditLogEvent.GuildUpdate]: ['Guild', 'Update']; [AuditLogEvent.ChannelCreate]: ['Channel', 'Create']; [AuditLogEvent.ChannelUpdate]: ['Channel', 'Update']; [AuditLogEvent.ChannelDelete]: ['Channel', 'Delete']; [AuditLogEvent.ChannelOverwriteCreate]: ['Channel', 'Create']; [AuditLogEvent.ChannelOverwriteUpdate]: ['Channel', 'Update']; [AuditLogEvent.ChannelOverwriteDelete]: ['Channel', 'Delete']; [AuditLogEvent.MemberKick]: ['User', 'Delete']; [AuditLogEvent.MemberPrune]: ['User', 'Delete']; [AuditLogEvent.MemberBanAdd]: ['User', 'Delete']; [AuditLogEvent.MemberBanRemove]: ['User', 'Create']; [AuditLogEvent.MemberUpdate]: ['User', 'Update']; [AuditLogEvent.MemberRoleUpdate]: ['User', 'Update']; [AuditLogEvent.MemberMove]: ['User', 'Update']; [AuditLogEvent.MemberDisconnect]: ['User', 'Delete']; [AuditLogEvent.BotAdd]: ['User', 'Create']; [AuditLogEvent.RoleCreate]: ['Role', 'Create']; [AuditLogEvent.RoleUpdate]: ['Role', 'Update']; [AuditLogEvent.RoleDelete]: ['Role', 'Delete']; [AuditLogEvent.InviteCreate]: ['Invite', 'Create']; [AuditLogEvent.InviteUpdate]: ['Invite', 'Update']; [AuditLogEvent.InviteDelete]: ['Invite', 'Delete']; [AuditLogEvent.WebhookCreate]: ['Webhook', 'Create']; [AuditLogEvent.WebhookUpdate]: ['Webhook', 'Update']; [AuditLogEvent.WebhookDelete]: ['Webhook', 'Delete']; [AuditLogEvent.EmojiCreate]: ['Emoji', 'Create']; [AuditLogEvent.EmojiUpdate]: ['Emoji', 'Update']; [AuditLogEvent.EmojiDelete]: ['Emoji', 'Delete']; [AuditLogEvent.MessageDelete]: ['Message', 'Delete']; [AuditLogEvent.MessageBulkDelete]: ['Message', 'Delete']; [AuditLogEvent.MessagePin]: ['Message', 'Create']; [AuditLogEvent.MessageUnpin]: ['Message', 'Delete']; [AuditLogEvent.IntegrationCreate]: ['Integration', 'Create']; [AuditLogEvent.IntegrationUpdate]: ['Integration', 'Update']; [AuditLogEvent.IntegrationDelete]: ['Integration', 'Delete']; [AuditLogEvent.StageInstanceCreate]: ['StageInstance', 'Create']; [AuditLogEvent.StageInstanceUpdate]: ['StageInstance', 'Update']; [AuditLogEvent.StageInstanceDelete]: ['StageInstance', 'Delete']; [AuditLogEvent.StickerCreate]: ['Sticker', 'Create']; [AuditLogEvent.StickerUpdate]: ['Sticker', 'Update']; [AuditLogEvent.StickerDelete]: ['Sticker', 'Delete']; [AuditLogEvent.GuildScheduledEventCreate]: ['GuildScheduledEvent', 'Create']; [AuditLogEvent.GuildScheduledEventUpdate]: ['GuildScheduledEvent', 'Update']; [AuditLogEvent.GuildScheduledEventDelete]: ['GuildScheduledEvent', 'Delete']; [AuditLogEvent.ThreadCreate]: ['Thread', 'Create']; [AuditLogEvent.ThreadUpdate]: ['Thread', 'Update']; [AuditLogEvent.ThreadDelete]: ['Thread', 'Delete']; [AuditLogEvent.ApplicationCommandPermissionUpdate]: ['ApplicationCommand', 'Update']; [AuditLogEvent.SoundboardSoundCreate]: ['SoundboardSound', 'Create']; [AuditLogEvent.SoundboardSoundUpdate]: ['SoundboardSound', 'Update']; [AuditLogEvent.SoundboardSoundDelete]: ['SoundboardSound', 'Delete']; [AuditLogEvent.AutoModerationRuleCreate]: ['AutoModeration', 'Create']; [AuditLogEvent.AutoModerationRuleUpdate]: ['AutoModeration', 'Update']; [AuditLogEvent.AutoModerationRuleDelete]: ['AutoModeration', 'Delete']; [AuditLogEvent.AutoModerationBlockMessage]: ['User', 'Update']; [AuditLogEvent.AutoModerationFlagToChannel]: ['User', 'Update']; [AuditLogEvent.AutoModerationUserCommunicationDisabled]: ['User', 'Update']; [AuditLogEvent.OnboardingPromptCreate]: ['GuildOnboardingPrompt', 'Create']; [AuditLogEvent.OnboardingPromptUpdate]: ['GuildOnboardingPrompt', 'Update']; [AuditLogEvent.OnboardingPromptDelete]: ['GuildOnboardingPrompt', 'Delete']; [AuditLogEvent.OnboardingCreate]: ['GuildOnboarding', 'Create']; [AuditLogEvent.OnboardingUpdate]: ['GuildOnboarding', 'Update']; } export type GuildAuditLogsActionType = GuildAuditLogsTypes[keyof GuildAuditLogsTypes][1] | 'All'; export interface GuildAuditLogsEntryExtraField { [AuditLogEvent.MemberKick]: { integrationType: string } | null; [AuditLogEvent.MemberRoleUpdate]: { integrationType: string } | null; [AuditLogEvent.MemberPrune]: { removed: number; days: number }; [AuditLogEvent.MemberMove]: { channel: VoiceBasedChannel | { id: Snowflake }; count: number }; [AuditLogEvent.MessageDelete]: { channel: GuildTextBasedChannel | { id: Snowflake }; count: number }; [AuditLogEvent.MessageBulkDelete]: { count: number }; [AuditLogEvent.MessagePin]: { channel: GuildTextBasedChannel | { id: Snowflake }; messageId: Snowflake }; [AuditLogEvent.MessageUnpin]: { channel: GuildTextBasedChannel | { id: Snowflake }; messageId: Snowflake }; [AuditLogEvent.MemberDisconnect]: { count: number }; [AuditLogEvent.ChannelOverwriteCreate]: | Role | GuildMember | { id: Snowflake; name: string; type: AuditLogOptionsType.Role } | { id: Snowflake; type: AuditLogOptionsType.Member }; [AuditLogEvent.ChannelOverwriteUpdate]: | Role | GuildMember | { id: Snowflake; name: string; type: AuditLogOptionsType.Role } | { id: Snowflake; type: AuditLogOptionsType.Member }; [AuditLogEvent.ChannelOverwriteDelete]: | Role | GuildMember | { id: Snowflake; name: string; type: AuditLogOptionsType.Role } | { id: Snowflake; type: AuditLogOptionsType.Member }; [AuditLogEvent.StageInstanceCreate]: StageChannel | { id: Snowflake }; [AuditLogEvent.StageInstanceDelete]: StageChannel | { id: Snowflake }; [AuditLogEvent.StageInstanceUpdate]: StageChannel | { id: Snowflake }; [AuditLogEvent.ApplicationCommandPermissionUpdate]: { applicationId: Snowflake }; [AuditLogEvent.AutoModerationBlockMessage]: { autoModerationRuleName: string; autoModerationRuleTriggerType: AuditLogRuleTriggerType; channel: GuildTextBasedChannel | { id: Snowflake }; }; [AuditLogEvent.AutoModerationFlagToChannel]: { autoModerationRuleName: string; autoModerationRuleTriggerType: AuditLogRuleTriggerType; channel: GuildTextBasedChannel | { id: Snowflake }; }; [AuditLogEvent.AutoModerationUserCommunicationDisabled]: { autoModerationRuleName: string; autoModerationRuleTriggerType: AuditLogRuleTriggerType; channel: GuildTextBasedChannel | { id: Snowflake }; }; } export interface GuildAuditLogsEntryTargetField<TAction extends AuditLogEvent> { User: User | PartialUser | null; Guild: Guild; Webhook: Webhook<WebhookType.ChannelFollower | WebhookType.Incoming>; Invite: Invite; Emoji: GuildEmoji | { id: Snowflake }; Role: Role | { id: Snowflake }; Message: TAction extends AuditLogEvent.MessageBulkDelete ? GuildTextBasedChannel | { id: Snowflake } : User | null; Integration: Integration; Channel: NonThreadGuildBasedChannel | { id: Snowflake; [x: string]: unknown }; Thread: AnyThreadChannel | { id: Snowflake; [x: string]: unknown }; StageInstance: StageInstance; Sticker: Sticker; GuildScheduledEvent: GuildScheduledEvent; ApplicationCommand: ApplicationCommand | { id: Snowflake }; AutoModerationRule: AutoModerationRule; GuildOnboardingPrompt: GuildOnboardingPrompt | { id: Snowflake; [x: string]: unknown }; SoundboardSound: SoundboardSound | { id: Snowflake }; } export interface GuildAuditLogsFetchOptions<Event extends GuildAuditLogsResolvable> { before?: Snowflake | GuildAuditLogsEntry; after?: Snowflake | GuildAuditLogsEntry; limit?: number; user?: UserResolvable; type?: Event; } export type GuildAuditLogsResolvable = AuditLogEvent | null; export type GuildAuditLogsTargetType = GuildAuditLogsTypes[keyof GuildAuditLogsTypes][0] | 'Unknown'; export type GuildAuditLogsTargets = { [Key in GuildAuditLogsTargetType]: Key; }; export type GuildBanResolvable = GuildBan | UserResolvable; export type GuildChannelResolvable = Snowflake | GuildBasedChannel; export interface AutoModerationRuleCreateOptions { name: string; eventType: AutoModerationRuleEventType; triggerType: AutoModerationRuleTriggerType; triggerMetadata?: AutoModerationTriggerMetadataOptions; actions: readonly AutoModerationActionOptions[]; enabled?: boolean; exemptRoles?: ReadonlyCollection<Snowflake, Role> | readonly RoleResolvable[]; exemptChannels?: ReadonlyCollection<Snowflake, GuildBasedChannel> | readonly GuildChannelResolvable[]; reason?: string; } export interface AutoModerationRuleEditOptions extends Partial<Omit<AutoModerationRuleCreateOptions, 'triggerType'>> {} export interface AutoModerationTriggerMetadataOptions extends Partial<AutoModerationTriggerMetadata> {} export interface AutoModerationActionOptions { type: AutoModerationActionType; metadata?: AutoModerationActionMetadataOptions; } export interface AutoModerationActionMetadataOptions extends Partial<Omit<AutoModerationActionMetadata, 'channelId'>> { channel?: GuildTextChannelResolvable | ThreadChannel; } export interface GuildChannelCreateOptions extends Omit<CategoryCreateChannelOptions, 'type'> { parent?: CategoryChannelResolvable | null; type?: Exclude< ChannelType, | ChannelType.DM | ChannelType.GroupDM | ChannelType.PublicThread | ChannelType.AnnouncementThread | ChannelType.PrivateThread >; } export interface GuildChannelCloneOptions extends Omit<GuildChannelCreateOptions, 'name'> { name?: string; } export interface GuildChannelEditOptions { name?: string; type?: ChannelType.GuildText | ChannelType.GuildAnnouncement; position?: number; topic?: string | null; nsfw?: boolean; bitrate?: number; userLimit?: number; parent?: CategoryChannelResolvable | null; rateLimitPerUser?: number; lockPermissions?: boolean; permissionOverwrites?: readonly OverwriteResolvable[] | ReadonlyCollection<Snowflake, OverwriteResolvable>; defaultAutoArchiveDuration?: ThreadAutoArchiveDuration; rtcRegion?: string | null; videoQualityMode?: VideoQualityMode | null; availableTags?: readonly GuildForumTagData[]; defaultReactionEmoji?: DefaultReactionEmoji | null; defaultThreadRateLimitPerUser?: number; flags?: ChannelFlagsResolvable; defaultSortOrder?: SortOrderType | null; defaultForumLayout?: ForumLayoutType; reason?: string; } export interface GuildChannelOverwriteOptions { reason?: string; type?: OverwriteType; } export interface GuildCreateOptions { name: string; icon?: BufferResolvable | Base64Resolvable | null; verificationLevel?: GuildVerificationLevel; defaultMessageNotifications?: GuildDefaultMessageNotifications; explicitContentFilter?: GuildExplicitContentFilter; roles?: readonly PartialRoleData[]; channels?: readonly PartialChannelData[]; afkChannelId?: Snowflake | number; afkTimeout?: number; systemChannelId?: Snowflake | number; systemChannelFlags?: SystemChannelFlagsResolvable; } export interface GuildWidgetSettings { enabled: boolean; channel: TextChannel | NewsChannel | VoiceBasedChannel | ForumChannel | MediaChannel | null; } export interface GuildEditOptions { name?: string; verificationLevel?: GuildVerificationLevel | null; defaultMessageNotifications?: GuildDefaultMessageNotifications | null; explicitContentFilter?: GuildExplicitContentFilter | null; afkTimeout?: number; afkChannel?: VoiceChannelResolvable | null; icon?: BufferResolvable | Base64Resolvable | null; owner?: GuildMemberResolvable; splash?: BufferResolvable | Base64Resolvable | null; discoverySplash?: BufferResolvable | Base64Resolvable | null; banner?: BufferResolvable | Base64Resolvable | null; systemChannel?: TextChannelResolvable | null; systemChannelFlags?: SystemChannelFlagsResolvable; rulesChannel?: TextChannelResolvable | null; publicUpdatesChannel?: TextChannelResolvable | null; safetyAlertsChannel?: TextChannelResolvable | null; preferredLocale?: Locale | null; features?: readonly `${GuildFeature}`[]; description?: string | null; premiumProgressBarEnabled?: boolean; reason?: string; } export interface GuildEmojiCreateOptions { attachment: BufferResolvable | Base64Resolvable; name: string; roles?: ReadonlyCollection<Snowflake, Role> | readonly RoleResolvable[]; reason?: string; } export interface GuildEmojiEditOptions { name?: string; roles?: ReadonlyCollection<Snowflake, Role> | readonly RoleResolvable[]; reason?: string; } export interface GuildStickerCreateOptions { file: BufferResolvable | Stream | AttachmentPayload | JSONEncodable<AttachmentBuilder>; name: string; tags: string; description?: string | null; reason?: string; } export interface GuildStickerEditOptions { name?: string; description?: string | null; tags?: string; reason?: string; } export interface GuildMemberEditOptions { nick?: string | null; roles?: ReadonlyCollection<Snowflake, Role> | readonly RoleResolvable[]; mute?: boolean; deaf?: boolean; channel?: GuildVoiceChannelResolvable | null; communicationDisabledUntil?: DateResolvable | null; flags?: GuildMemberFlagsResolvable; reason?: string; } export type GuildMemberResolvable = GuildMember | UserResolvable; export type GuildResolvable = Guild | NonThreadGuildBasedChannel | GuildMember | GuildEmoji | Invite | Role | Snowflake; export interface GuildPruneMembersOptions { count?: boolean; days?: number; dry?: boolean; reason?: string; roles?: readonly RoleResolvable[]; } export interface GuildWidgetSettingsData { enabled: boolean; channel: TextChannel | NewsChannel | VoiceBasedChannel | ForumChannel | MediaChannel | Snowflake | null; } export interface GuildSearchMembersOptions { query: string; limit?: number; cache?: boolean; } export interface GuildListMembersOptions { after?: Snowflake; limit?: number; cache?: boolean; } // TODO: use conditional types for better TS support export interface GuildScheduledEventCreateOptions { name: string; scheduledStartTime: DateResolvable; scheduledEndTime?: DateResolvable; privacyLevel: GuildScheduledEventPrivacyLevel; entityType: GuildScheduledEventEntityType; description?: string; channel?: GuildVoiceChannelResolvable; entityMetadata?: GuildScheduledEventEntityMetadataOptions; image?: BufferResolvable | Base64Resolvable | null; reason?: string; recurrenceRule?: GuildScheduledEventRecurrenceRuleOptions; } export type GuildScheduledEventRecurrenceRuleOptions = | BaseGuildScheduledEventRecurrenceRuleOptions< GuildScheduledEventRecurrenceRuleFrequency.Yearly, { byMonth: readonly GuildScheduledEventRecurrenceRuleMonth[]; byMonthDay: readonly number[]; } > | BaseGuildScheduledEventRecurrenceRuleOptions< GuildScheduledEventRecurrenceRuleFrequency.Monthly, { byNWeekday: readonly GuildScheduledEventRecurrenceRuleNWeekday[]; } > | BaseGuildScheduledEventRecurrenceRuleOptions< GuildScheduledEventRecurrenceRuleFrequency.Weekly | GuildScheduledEventRecurrenceRuleFrequency.Daily, { byWeekday: readonly GuildScheduledEventRecurrenceRuleWeekday[]; } >; type BaseGuildScheduledEventRecurrenceRuleOptions< Frequency extends GuildScheduledEventRecurrenceRuleFrequency, Extra extends {}, > = { startAt: DateResolvable; interval: number; frequency: Frequency; } & Extra; export interface GuildScheduledEventEditOptions< Status extends GuildScheduledEventStatus, AcceptableStatus extends GuildScheduledEventSetStatusArg<Status>, > extends Omit<Partial<GuildScheduledEventCreateOptions>, 'channel' | 'recurrenceRule'> { channel?: GuildVoiceChannelResolvable | null; status?: AcceptableStatus; recurrenceRule?: GuildScheduledEventRecurrenceRuleOptions | null; } export interface GuildScheduledEventEntityMetadata { location: string | null; } export interface GuildScheduledEventEntityMetadataOptions { location?: string; } export type GuildScheduledEventManagerFetchResult< Options extends GuildScheduledEventResolvable | FetchGuildScheduledEventOptions | FetchGuildScheduledEventsOptions, > = Options extends GuildScheduledEventResolvable | FetchGuildScheduledEventOptions ? GuildScheduledEvent : Collection<Snowflake, GuildScheduledEvent>; export type GuildScheduledEventManagerFetchSubscribersResult< Options extends FetchGuildScheduledEventSubscribersOptions, > = Options extends { withMember: true } ? Collection<Snowflake, GuildScheduledEventUser<true>> : Collection<Snowflake, GuildScheduledEventUser<false>>; export type GuildScheduledEventResolvable = Snowflake | GuildScheduledEvent; export type GuildScheduledEventSetStatusArg<Status extends GuildScheduledEventStatus> = Status extends GuildScheduledEventStatus.Scheduled ? GuildScheduledEventStatus.Active | GuildScheduledEventStatus.Canceled : Status extends GuildScheduledEventStatus.Active ? GuildScheduledEventStatus.Completed : never; export interface GuildScheduledEventUser<WithMember> { guildScheduledEventId: Snowflake; user: User; member: WithMember extends true ? GuildMember : null; } export type GuildTemplateResolvable = string; export type GuildVoiceChannelResolvable = VoiceBasedChannel | Snowflake; export interface GuildOnboardingEditOptions { prompts?: readonly GuildOnboardingPromptData[] | ReadonlyCollection<Snowflake, GuildOnboardingPrompt>; defaultChannels?: readonly ChannelResolvable[] | ReadonlyCollection<Snowflake, GuildChannel>; enabled?: boolean; mode?: GuildOnboardingMode; reason?: string; } export interface GuildOnboardingPromptData { id?: Snowflake; title: string; singleSelect?: boolean; required?: boolean; inOnboarding?: boolean; type?: GuildOnboardingPromptType; options: readonly GuildOnboardingPromptOptionData[] | ReadonlyCollection<Snowflake, GuildOnboardingPromptOption>; } export interface GuildOnboardingPromptOptionData { id?: Snowflake | null; channels?: readonly ChannelResolvable[] | ReadonlyCollection<Snowflake, GuildChannel>; roles?: readonly RoleResolvable[] | ReadonlyCollection<Snowflake, Role>; title: string; description?: string | null; emoji?: EmojiIdentifierResolvable | Emoji | null; } export type HexColorString = `#${string}`; export interface IncidentActions { invitesDisabledUntil: Date | null; dmsDisabledUntil: Date | null; dmSpamDetectedAt: Date | null; raidDetectedAt: Date | null; } export interface IncidentActionsEditOptions { invitesDisabledUntil?: DateResolvable | null | undefined; dmsDisabledUntil?: DateResolvable | null | undefined; } export interface IntegrationAccount { id: string | Snowflake; name: string; } export type IntegrationType = 'twitch' | 'youtube' | 'discord' | 'guild_subscription'; export type IntegrationTypesConfigurationParameters = ClientApplicationInstallParams; export interface IntegrationTypesConfigurationContext { oauth2InstallParams: IntegrationTypesConfigurationParameters | null; } export type IntegrationTypesConfiguration = Partial< Record<ApplicationIntegrationType, IntegrationTypesConfigurationContext> >; export type CollectedInteraction<Cached extends CacheType = CacheType> = | StringSelectMenuInteraction<Cached> | UserSelectMenuInteraction<Cached> | RoleSelectMenuInteraction<Cached> | MentionableSelectMenuInteraction<Cached> | ChannelSelectMenuInteraction<Cached> | ButtonInteraction<Cached> | ModalSubmitInteraction<Cached>; export interface InteractionCollectorOptions< Interaction extends CollectedInteraction, Cached extends CacheType = CacheType, > extends CollectorOptions<[Interaction, Collection<Snowflake, Interaction>]> { channel?: TextBasedChannelResolvable; componentType?: ComponentType; guild?: GuildResolvable; interactionType?: InteractionType; max?: number; maxComponents?: number; maxUsers?: number; message?: CacheTypeReducer<Cached, Message, APIMessage>; interactionResponse?: InteractionResponse<BooleanCache<Cached>>; } export interface InteractionDeferReplyOptions { /** @deprecated Use {@link InteractionDeferReplyOptions.flags} instead. */ ephemeral?: boolean; flags?: BitFieldResolvable<Extract<MessageFlagsString, 'Ephemeral'>, MessageFlags.Ephemeral> | undefined; withResponse?: boolean; /** @deprecated Use {@link InteractionDeferReplyOptions.withResponse} instead. */ fetchReply?: boolean; } export interface InteractionDeferUpdateOptions { withResponse?: boolean; /** @deprecated Use {@link InteractionDeferUpdateOptions.withResponse} instead. */ fetchReply?: boolean; } export interface InteractionReplyOptions extends BaseMessageOptionsWithPoll { /** @deprecated Use {@link InteractionReplyOptions.flags} instead. */ ephemeral?: boolean; tts?: boolean; withResponse?: boolean; /** @deprecated Use {@link InteractionReplyOptions.withResponse} instead. */ fetchReply?: boolean; flags?: | BitFieldResolvable< Extract<MessageFlagsString, 'Ephemeral' | 'SuppressEmbeds' | 'SuppressNotifications' | 'IsComponentsV2'>, | MessageFlags.Ephemeral | MessageFlags.SuppressEmbeds | MessageFlags.SuppressNotifications | MessageFlags.IsComponentsV2 > | undefined; } export interface InteractionUpdateOptions extends MessageEditOptions { withResponse?: boolean; /** @deprecated Use {@link InteractionUpdateOptions.withResponse} instead. */ fetchReply?: boolean; } export interface InviteGenerationOptions { permissions?: PermissionResolvable; guild?: GuildResolvable; disableGuildSelect?: boolean; scopes: readonly OAuth2Scopes[]; } export type GuildInvitableChannelResolvable = | TextChannel | VoiceChannel | NewsChannel | StageChannel | ForumChannel | MediaChannel | Snowflake; export interface InviteCreateOptions { temporary?: boolean; maxAge?: number; maxUses?: number; unique?: boolean; reason?: string; targetApplication?: ApplicationResolvable; targetUser?: UserResolvable; targetType?: InviteTargetType; } export type InviteResolvable = string; export interface LifetimeFilterOptions<Key, Value> { excludeFromSweep?: (value: Value, key: Key, collection: LimitedCollection<Key, Value>) => boolean; getComparisonTimestamp?: (value: Value, key: Key, collection: LimitedCollection<Key, Value>) => number; lifetime?: number; } /** @internal */ export interface MakeErrorOptions { name: string; message: string; stack: string; } export type ActionRowComponentOptions = | ButtonComponentData | StringSelectMenuComponentData | UserSelectMenuComponentData | RoleSelectMenuComponentData | MentionableSelectMenuComponentData | ChannelSelectMenuComponentData; export type MessageActionRowComponentResolvable = MessageActionRowComponent | ActionRowComponentOptions; export interface MessageActivity { partyId?: string; type: MessageActivityType; } export interface BaseButtonComponentData extends BaseComponentData { type: ComponentType.Button; style: ButtonStyle; disabled?: boolean; emoji?: ComponentEmojiResolvable; label?: string; } export interface LinkButtonComponentData extends BaseButtonComponentData { style: ButtonStyle.Link; url: string; } export interface InteractionButtonComponentData extends BaseButtonComponentData { style: Exclude<ButtonStyle, ButtonStyle.Link>; customId: string; } export type ButtonComponentData = InteractionButtonComponentData | LinkButtonComponentData; export interface MessageCollectorOptions extends CollectorOptions<[Message, Collection<Snowflake, Message>]> { max?: number; maxProcessed?: number; } export type MessageComponent = | Component | ActionRowBuilder<MessageActionRowComponentBuilder | ModalActionRowComponentBuilder> | ButtonComponent | StringSelectMenuComponent | UserSelectMenuComponent | RoleSelectMenuComponent | MentionableSelectMenuComponent | ChannelSelectMenuComponent; export type CollectedMessageInteraction<Cached extends CacheType = CacheType> = Exclude< CollectedInteraction<Cached>, ModalSubmitInteraction >; export interface MessageComponentCollectorOptions<Interaction extends CollectedMessageInteraction> extends Omit<InteractionCollectorOptions<Interaction>, 'channel' | 'message' | 'guild' | 'interactionType'> {} export interface MessageChannelComponentCollectorOptions<Interaction extends CollectedMessageInteraction> extends Omit<InteractionCollectorOptions<Interaction>, 'channel' | 'guild' | 'interactionType'> {} export interface MessageInteractionMetadata { id: Snowflake; type: InteractionType; user: User; authorizingIntegrationOwners: APIAuthorizingIntegrationOwnersMap; originalResponseMessageId: Snowflake | null; interactedMessageId: Snowflake | null; triggeringInteractionMetadata: MessageInteractionMetadata | null; } /** @deprecated Use {@link MessageInteractionMetadata} instead. */ export interface MessageInteraction { id: Snowflake; type: InteractionType; commandName: string; user: User; } export interface MessageMentionsHasOptions { ignoreDirect?: boolean; ignoreRoles?: boolean; ignoreRepliedUser?: boolean; ignoreEveryone?: boolean; } export interface MessageMentionOptions { parse?: readonly MessageMentionTypes[]; roles?: readonly Snowflake[]; users?: readonly Snowflake[]; repliedUser?: boolean; } export type MessageMentionTypes = 'roles' | 'users' | 'everyone'; export interface MessageSnapshot extends Partialize< Message, null, Exclude< keyof Message, | 'attachments' | 'client' | 'components' | 'content' | 'createdTimestamp' | 'editedTimestamp' | 'embeds' | 'flags' | 'mentions' | 'stickers' | 'type' > > {} export interface BaseMessageOptions { content?: string; embeds?: readonly (JSONEncodable<APIEmbed> | APIEmbed)[]; allowedMentions?: MessageMentionOptions; files?: readonly ( | BufferResolvable | Stream | JSONEncodable<APIAttachment> | Attachment | AttachmentBuilder | AttachmentPayload )[]; components?: readonly ( | JSONEncodable<APIMessageTopLevelComponent> | TopLevelComponentData | ActionRowData<MessageActionRowComponentData | MessageActionRowComponentBuilder> | APIMessageTopLevelComponent )[]; } export interface BaseMessageOptionsWithPoll extends BaseMessageOptions { poll?: PollData; } export interface MessageCreateOptions extends BaseMessageOptionsWithPoll { tts?: boolean; nonce?: string | number; enforceNonce?: boolean; reply?: ReplyOptions; forward?: ForwardOptions; stickers?: readonly StickerResolvable[]; flags?: | BitFieldResolvable< Extract<MessageFlagsString, 'SuppressEmbeds' | 'SuppressNotifications' | 'IsComponentsV2'>, MessageFlags.SuppressEmbeds | MessageFlags.SuppressNotifications | MessageFlags.IsComponentsV2 > | undefined; } export interface GuildForumThreadMessageCreateOptions extends BaseMessageOptions, Pick<MessageCreateOptions, 'flags' | 'stickers'> {} export interface MessageEditAttachmentData { id: Snowflake; } export interface MessageEditOptions extends Omit<BaseMessageOptions, 'content'> { content?: string | null; attachments?: readonly (Attachment | MessageEditAttachmentData)[]; flags?: | BitFieldResolvable< Extract<MessageFlagsString, 'SuppressEmbeds' | 'IsComponentsV2'>, MessageFlags.SuppressEmbeds | MessageFlags.IsComponentsV2 > | undefined; } export type MessageReactionResolvable = MessageReaction | Snowflake | string; export interface MessageReference { channelId: Snowflake; guildId: Snowflake | undefined; messageId: Snowflake | undefined; type: MessageReferenceType; } export type MessageResolvable = Message | Snowflake; export interface BaseSelectMenuComponentData extends BaseComponentData { customId: string; disabled?: boolean; maxValues?: number; minValues?: number; placeholder?: string; } export interface StringSelectMenuComponentData extends BaseSelectMenuComponentData { type: ComponentType.StringSelect; options: readonly SelectMenuComponentOptionData[]; } export interface UserSelectMenuComponentData extends BaseSelectMenuComponentData { type: ComponentType.UserSelect; defaultValues?: readonly APISelectMenuDefaultValue<SelectMenuDefaultValueType.User>[]; } export interface RoleSelectMenuComponentData extends BaseSelectMenuComponentData { type: ComponentType.RoleSelect; defaultValues?: readonly APISelectMenuDefaultValue<SelectMenuDefaultValueType.Role>[]; } export interface MentionableSelectMenuComponentData extends BaseSelectMenuComponentData { type: ComponentType.MentionableSelect; defaultValues?: readonly APISelectMenuDefaultValue< SelectMenuDefaultValueType.Role | SelectMenuDefaultValueType.User >[]; } export interface ChannelSelectMenuComponentData extends BaseSelectMenuComponentData { type: ComponentType.ChannelSelect; channelTypes?: readonly ChannelType[]; defaultValues?: readonly APISelectMenuDefaultValue<SelectMenuDefaultValueType.Channel>[]; } export interface MessageSelectOption { default: boolean; description: string | null; emoji: APIPartialEmoji | null; label: string; value: string; } export interface ReactionCountDetailsData { burst: number; normal: number; } export interface SelectMenuComponentOptionData { default?: boolean; description?: string; emoji?: ComponentEmojiResolvable; label: string; value: string; } export interface TextInputComponentData extends BaseComponentData { type: ComponentType.TextInput; customId: string; style: TextInputStyle; label: string; minLength?: number; maxLength?: number; required?: boolean; value?: string; placeholder?: string; } export type MessageTarget = | Interaction | InteractionWebhook | TextBasedChannel | User | GuildMember | Webhook<WebhookType.Incoming> | WebhookClient | Message | MessageManager; export interface MultipleShardRespawnOptions { shardDelay?: number; respawnDelay?: number; timeout?: number; } export interface MultipleShardSpawnOptions { amount?: number | 'auto'; delay?: number; timeout?: number; } export interface OverwriteData { allow?: PermissionResolvable; deny?: PermissionResolvable; id: GuildMemberResolvable | RoleResolvable; type?: OverwriteType; } export type OverwriteResolvable = PermissionOverwrites | OverwriteData; export type PermissionFlags = Record<keyof typeof PermissionFlagsBits, bigint>; export type PermissionOverwriteOptions = Partial<Record<keyof typeof PermissionFlagsBits, boolean | null>>; export type PermissionResolvable = BitFieldResolvable<keyof typeof PermissionFlagsBits, bigint>; export type PermissionOverwriteResolvable = UserResolvable | RoleResolvable | PermissionOverwrites; export interface RecursiveReadonlyArray<ItemType> extends ReadonlyArray<ItemType | RecursiveReadonlyArray<ItemType>> {} export interface PartialRecipient { username: string; } export interface PresenceData { status?: PresenceStatusData; afk?: boolean; activities?: readonly ActivitiesOptions[]; shardId?: number | readonly number[]; } export type PresenceResolvable = Presence | UserResolvable | Snowflake; export interface PartialChannelData { id?: Snowflake | number; parentId?: Snowflake | number; type?: ChannelType.GuildText | ChannelType.GuildVoice | ChannelType.GuildCategory; name: string; topic?: string | null; nsfw?: boolean; bitrate?: number; userLimit?: number; rtcRegion?: string | null; videoQualityMode?: VideoQualityMode; permissionOverwrites?: readonly PartialOverwriteData[]; rateLimitPerUser?: number; } export interface PartialEmoji { animated: boolean; id: Snowflake | undefined; name: string; } export interface PartialEmojiOnlyId { id: Snowflake; } export type Partialize< PartialType extends AllowedPartial, NulledKeys extends keyof PartialType | null = null, NullableKeys extends keyof PartialType | null = null, OverridableKeys extends keyof PartialType | '' = '', > = { [K in keyof Omit<PartialType, OverridableKeys>]: K extends 'partial' ? true : K extends NulledKeys ? null : K extends NullableKeys ? PartialType[K] | null : PartialType[K]; }; export interface PartialDMChannel extends Partialize<DMChannel, null, null, 'lastMessageId'> { lastMessageId: undefined; } export interface PartialGuildMember extends Partialize<GuildMember, 'joinedAt' | 'joinedTimestamp' | 'pending'> {} export interface PartialMessage extends Partialize<Message, 'type' | 'system' | 'pinned' | 'tts', 'content' | 'cleanContent' | 'author'> {} export interface PartialMessageReaction extends Partialize<MessageReaction, 'count'> {} export interface PartialGuildScheduledEvent extends Partialize<GuildScheduledEvent, 'userCount', 'status' | 'privacyLevel' | 'name' | 'entityType'> {} export interface PartialThreadMember extends Partialize<ThreadMember, 'flags' | 'joinedAt' | 'joinedTimestamp'> {} export interface PartialSoundboardSound extends Partialize<SoundboardSound, 'available' | 'name' | 'volume'> {} export interface PartialOverwriteData { id: Snowflake | number; type?: OverwriteType; allow?: PermissionResolvable; deny?: PermissionResolvable; } export interface PartialRoleData extends RoleData { id?: Snowflake | number; } export enum Partials { User, Channel, GuildMember, Message, Reaction, GuildScheduledEvent, ThreadMember, SoundboardSound, } export interface PartialUser extends Partialize<User, 'username' | 'tag' | 'discriminator'> {} export type PresenceStatusData = ClientPresenceStatus | 'invisible'; export type PresenceStatus = PresenceStatusData | 'offline'; export interface ReactionCollectorOptions extends CollectorOptions<[MessageReaction, User]> { max?: number; maxEmojis?: number; maxUsers?: number; } export interface ReplyOptions { messageReference: MessageResolvable; failIfNotExists?: boolean; } export interface BaseForwardOptions { message: MessageResolvable; channel?: Exclude<TextBasedChannelResolvable, PartialGroupDMChannel>; guild?: GuildResolvable; } export type ForwardOptionsWithMandatoryChannel = BaseForwardOptions & Required<Pick<BaseForwardOptions, 'channel'>>; export interface ForwardOptionsWithOptionalChannel extends BaseForwardOptions { message: Exclude<MessageResolvable, Snowflake>; } export type ForwardOptions = ForwardOptionsWithMandatoryChannel | ForwardOptionsWithOptionalChannel; export interface MessageReplyOptions extends Omit<MessageCreateOptions, 'reply' | 'forward'> { failIfNotExists?: boolean; } export interface ResolvedOverwriteOptions { allow: PermissionsBitField; deny: PermissionsBitField; } export interface RoleData { name?: string; color?: ColorResolvable; hoist?: boolean; position?: number; permissions?: PermissionResolvable; mentionable?: boolean; icon?: BufferResolvable | Base64Resolvable | EmojiResolvable | null; unicodeEmoji?: string | null; } export type RoleMention = '@everyone' | `<@&${Snowflake}>`; export interface RolePosition { role: RoleResolvable; position: number; } export type RoleResolvable = Role | Snowflake; export interface RoleSubscriptionData { roleSubscriptionListingId: Snowflake; tierName: string; totalMonthsSubscribed: number; isRenewal: boolean; } export interface RoleTagData { botId?: Snowflake; integrationId?: Snowflake; premiumSubscriberRole?: true; subscriptionListingId?: Snowflake; availableForPurchase?: true; guildConnections?: true; } export interface SetChannelPositionOptions { relative?: boolean; reason?: string; } export interface SetParentOptions { lockPermissions?: boolean; reason?: string; } export interface SetRolePositionOptions { relative?: boolean; reason?: string; } export type ShardingManagerMode = 'process' | 'worker'; export interface ShardingManagerOptions { totalShards?: number | 'auto'; shardList?: readonly number[] | 'auto'; mode?: ShardingManagerMode; respawn?: boolean; silent?: boolean; shardArgs?: readonly string[]; token?: string; execArgv?: readonly string[]; } export interface ShowModalOptions { withResponse?: boolean; } export interface LaunchActivityOptions { withResponse?: boolean; } export { Snowflake }; export type StageInstanceResolvable = StageInstance | Snowflake; export interface StartThreadOptions { name: string; autoArchiveDuration?: ThreadAutoArchiveDuration; reason?: string; rateLimitPerUser?: number; } export type ClientStatus = number; export type StickerResolvable = Sticker | Snowflake; export type SystemChannelFlagsResolvable = BitFieldResolvable<SystemChannelFlagsString, number>; export type StageChannelResolvable = StageChannel | Snowflake; export interface StageInstanceEditOptions { topic?: string; privacyLevel?: StageInstancePrivacyLevel; } /** @internal */ export interface SupportingInteractionResolvedData { client: Client; guild?: Guild; channel?: GuildTextBasedChannel; } export type SweeperKey = keyof SweeperDefinitions; export type CollectionSweepFilter<Key, Value> = (value: Value, key: Key, collection: Collection<Key, Value>) => boolean; export interface SweepOptions<Key, Value> { interval: number; filter: GlobalSweepFilter<Key, Value>; } export interface LifetimeSweepOptions { interval: number; lifetime: number; filter?: never; } export interface SweeperDefinitions { applicationCommands: [Snowflake, ApplicationCommand]; autoModerationRules: [Snowflake, AutoModerationRule]; bans: [Snowflake, GuildBan]; emojis: [Snowflake, GuildEmoji]; entitlements: [Snowflake, Entitlement]; invites: [string, Invite, true]; guildMembers: [Snowflake, GuildMember]; messages: [Snowflake, Message, true]; presences: [Snowflake, Presence]; reactions: [string | Snowflake, MessageReaction]; stageInstances: [Snowflake, StageInstance]; stickers: [Snowflake, Sticker]; threadMembers: [Snowflake, ThreadMember]; threads: [Snowflake, AnyThreadChannel, true]; users: [Snowflake, User]; voiceStates: [Snowflake, VoiceState]; } export type SweeperOptions = { [Key in keyof SweeperDefinitions]?: SweeperDefinitions[Key][2] extends true ? SweepOptions<SweeperDefinitions[Key][0], SweeperDefinitions[Key][1]> | LifetimeSweepOptions : SweepOptions<SweeperDefinitions[Key][0], SweeperDefinitions[Key][1]>; }; export interface LimitedCollectionOptions<Key, Value> { maxSize?: number; keepOverLimit?: (value: Value, key: Key, collection: LimitedCollection<Key, Value>) => boolean; } export type Channel = | CategoryChannel | DMChannel | PartialDMChannel | PartialGroupDMChannel | NewsChannel | StageChannel | TextChannel | PublicThreadChannel | PrivateThreadChannel | VoiceChannel | ForumChannel | MediaChannel; export type TextBasedChannel = Exclude<Extract<Channel, { type: TextChannelType }>, ForumChannel | MediaChannel>; export type SendableChannels = Extract<Channel, { send: (...args: any[]) => any }>; export type TextBasedChannels = TextBasedChannel; export type TextBasedChannelTypes = TextBasedChannel['type']; export type GuildTextBasedChannelTypes = Exclude<TextBasedChannelTypes, ChannelType.DM | ChannelType.GroupDM>; export type SendableChannelTypes = SendableChannels['type']; export type VoiceBasedChannel = Extract<Channel, { bitrate: number }>; export type GuildBasedChannel = Extract<Channel, { guild: Guild }>; export type CategoryChildChannel = Exclude<Extract<Channel, { parent: CategoryChannel | null }>, CategoryChannel>; export type NonThreadGuildBasedChannel = Exclude<GuildBasedChannel, AnyThreadChannel>; export type GuildTextBasedChannel = Extract<GuildBasedChannel, TextBasedChannel>; export type TextChannelResolvable = Snowflake | TextChannel; export type TextBasedChannelResolvable = Snowflake | TextBasedChannel; export type ThreadChannelResolvable = Snowflake | ThreadChannel; export type ThreadChannelType = ChannelType.AnnouncementThread | ChannelType.PublicThread | ChannelType.PrivateThread; export interface GuildTextThreadCreateOptions<AllowedThreadType> extends StartThreadOptions { startMessage?: MessageResolvable; type?: AllowedThreadType; invitable?: AllowedThreadType extends ChannelType.PrivateThread ? boolean : never; } export interface GuildForumThreadCreateOptions extends StartThreadOptions { message: GuildForumThreadMessageCreateOptions | MessagePayload; appliedTags?: readonly Snowflake[]; } export interface ThreadEditOptions { name?: string; archived?: boolean; autoArchiveDuration?: ThreadAutoArchiveDuration; rateLimitPerUser?: number; locked?: boolean; invitable?: boolean; appliedTags?: readonly Snowflake[]; flags?: ChannelFlagsResolvable; reason?: string; } export type ThreadMemberResolvable = ThreadMember | UserResolvable; export type UserMention = `<@${Snowflake}>`; export type UserResolvable = User | Snowflake | Message | GuildMember | ThreadMember; export interface Vanity { code: string | null; uses: number; } export type VoiceBasedChannelTypes = VoiceBasedChannel['type']; export type VoiceChannelResolvable = Snowflake | VoiceChannel; export interface VoiceStateEditOptions { requestToSpeak?: boolean; suppressed?: boolean; } export type WebhookClientData = WebhookClientDataIdWithToken | WebhookClientDataURL; export interface WebhookClientDataIdWithToken { id: Snowflake; token: string; } export interface WebhookClientDataURL { url: string; } export interface WebhookClientOptions extends Pick<ClientOptions, 'allowedMentions' | 'rest'> {} export interface WebhookDeleteOptions { token?: string; reason?: string; } export interface WebhookEditOptions { name?: string; avatar?: BufferResolvable | null; channel?: GuildTextChannelResolvable | VoiceChannel | StageChannel | ForumChannel | MediaChannel; reason?: string; } export interface WebhookMessageEditOptions extends MessageEditOptions { threadId?: Snowflake; withComponents?: boolean; } export interface InteractionEditReplyOptions extends WebhookMessageEditOptions, Pick<BaseMessageOptionsWithPoll, 'poll'> { message?: MessageResolvable | '@original'; } export interface WebhookFetchMessageOptions { threadId?: Snowflake; } export interface WebhookMessageCreateOptions extends Omit<MessageCreateOptions, 'nonce' | 'reply' | 'stickers' | 'forward'> { username?: string; avatarURL?: string; threadId?: Snowflake; threadName?: string; appliedTags?: readonly Snowflake[]; withComponents?: boolean; } export interface WebSocketOptions { large_threshold?: number; version?: number; buildStrategy?(manager: WSWebSocketManager): IShardingStrategy; buildIdentifyThrottler?(manager: WSWebSocketManager): Awaitable<IIdentifyThrottler>; } export interface WidgetActivity { name: string; } export interface WidgetChannel { id: Snowflake; name: string; position: number; } export interface WelcomeChannelData { description: string; channel: TextChannel | NewsChannel | ForumChannel | MediaChannel | Snowflake; emoji?: EmojiIdentifierResolvable; } export interface WelcomeScreenEditOptions { enabled?: boolean; description?: string; welcomeChannels?: readonly WelcomeChannelData[]; } export interface ClientApplicationEditOptions { customInstallURL?: string; description?: string; roleConnectionsVerificationURL?: string; installParams?: ClientApplicationInstallParams; flags?: ApplicationFlagsResolvable; icon?: BufferResolvable | Base64Resolvable | null; coverImage?: BufferResolvable | Base64Resolvable | null; interactionsEndpointURL?: string; eventWebhooksURL?: string; eventWebhooksStatus?: ApplicationWebhookEventStatus.Enabled | ApplicationWebhookEventStatus.Disabled; eventWebhooksTypes?: readonly ApplicationWebhookEventType[]; tags?: readonly string[]; } export interface ClientApplicationInstallParams { scopes: readonly OAuth2Scopes[]; permissions: Readonly<PermissionsBitField>; } export type Serialized<Value> = Value extends symbol | bigint | (() => any) ? never : Value extends number | string | boolean | undefined ? Value : Value extends JSONEncodable<infer JSONResult> ? JSONResult : Value extends ReadonlyArray<infer ItemType> ? Serialized<ItemType>[] : Value extends ReadonlyMap<unknown, unknown> | ReadonlySet<unknown> ? {} : { [K in keyof Value]: Serialized<Value[K]> }; //#endregion //#region Voice /** * @internal Use `DiscordGatewayAdapterLibraryMethods` from `@discordjs/voice` instead. */ export interface InternalDiscordGatewayAdapterLibraryMethods { onVoiceServerUpdate(data: GatewayVoiceServerUpdateDispatchData): void; onVoiceStateUpdate(data: GatewayVoiceStateUpdateDispatchData): void; destroy(): void; } /** * @internal Use `DiscordGatewayAdapterImplementerMethods` from `@discordjs/voice` instead. */ export interface InternalDiscordGatewayAdapterImplementerMethods { sendPayload(payload: unknown): boolean; destroy(): void; } /** * @internal Use `DiscordGatewayAdapterCreator` from `@discordjs/voice` instead. */ export type InternalDiscordGatewayAdapterCreator = ( methods: InternalDiscordGatewayAdapterLibraryMethods, ) => InternalDiscordGatewayAdapterImplementerMethods; //#endregion // External export * from 'discord-api-types/v10'; export * from '@discordjs/builders'; export * from '@discordjs/formatters'; export * from '@discordjs/rest'; export * from '@discordjs/util'; export * from '@discordjs/ws'; node_modules/discord.js/typings/rawDataTypes.d.ts 0000664 00000015766 15114741631 0016206 0 ustar 00 // These are aggregate types that are used in the typings file but do not exist as actual exported values. // To prevent them from showing up in an editor, they are imported from here instead of exporting them there directly. import { APIApplication, APIApplicationCommand, APIApplicationCommandInteraction, APIAttachment, APIAuditLog, APIAuditLogEntry, APIBan, APIChannel, APIEmoji, APIExtendedInvite, APIGuild, APIGuildIntegration, APIGuildIntegrationApplication, APIGuildMember, APIGuildPreview, APIGuildWelcomeScreen, APIGuildWelcomeScreenChannel, APIGuildWidget, APIGuildWidgetMember, APIInteractionDataResolvedChannel, APIInteractionDataResolvedGuildMember, APIInteractionGuildMember, APIInvite, APIInviteStageInstance, APIMessage, APIMessageButtonInteractionData, APIMessageComponentInteraction, APIMessageSelectMenuInteractionData, APIOverwrite, APIPartialChannel, APIPartialEmoji, APIPartialGuild, APIReaction, APIRole, APIStageInstance, APISticker, APIStickerItem, APIStickerPack, APITeam, APITeamMember, APITemplate, APIThreadMember, APIUnavailableGuild, APIUser, APIVoiceRegion, APIVoiceState, APIWebhook, GatewayActivity, GatewayActivityAssets, GatewayActivityEmoji, GatewayGuildBanAddDispatchData, GatewayGuildMemberAddDispatchData, GatewayGuildMemberUpdateDispatchData, GatewayInteractionCreateDispatchData, GatewayInviteCreateDispatchData, GatewayInviteDeleteDispatchData, GatewayMessageReactionAddDispatchData, GatewayMessageUpdateDispatchData, GatewayPresenceUpdate, GatewayReadyDispatchData, GatewayTypingStartDispatchData, RESTAPIPartialCurrentUserGuild, RESTGetAPIWebhookWithTokenResult, RESTPatchAPIChannelMessageJSONBody, RESTPatchAPICurrentGuildMemberNicknameJSONBody, RESTPatchAPIInteractionFollowupJSONBody, RESTPatchAPIInteractionOriginalResponseJSONBody, RESTPatchAPIWebhookWithTokenJSONBody, RESTPostAPIChannelMessageJSONBody, RESTPostAPIInteractionCallbackFormDataBody, RESTPostAPIInteractionFollowupJSONBody, RESTPostAPIWebhookWithTokenJSONBody, Snowflake, APIGuildScheduledEvent, } from 'discord-api-types/v10'; import { GuildChannel, Guild, PermissionOverwrites } from './index.js'; export type RawActivityData = GatewayActivity; export type RawApplicationData = RawClientApplicationData | RawIntegrationApplicationData; export type RawClientApplicationData = GatewayReadyDispatchData['application'] | APIMessage['application']; export type RawIntegrationApplicationData = APIGuildIntegrationApplication | Partial<APIApplication>; export type RawApplicationCommandData = APIApplicationCommand; export type RawChannelData = | RawGuildChannelData | RawThreadChannelData | RawDMChannelData | RawPartialGroupDMChannelData; export type RawDMChannelData = APIChannel | APIInteractionDataResolvedChannel; export type RawGuildChannelData = APIChannel | APIInteractionDataResolvedChannel | Required<APIPartialChannel>; export type RawPartialGroupDMChannelData = APIChannel | Required<APIPartialChannel>; export type RawThreadChannelData = APIChannel | APIInteractionDataResolvedChannel; export type RawEmojiData = | RawGuildEmojiData | RawReactionEmojiData | GatewayActivityEmoji | Omit<Partial<APIPartialEmoji>, 'animated'>; export type RawApplicationEmojiData = APIEmoji; export type RawGuildEmojiData = APIEmoji; export type RawReactionEmojiData = APIEmoji | APIPartialEmoji; export type RawGuildAuditLogData = APIAuditLog; export type RawGuildAuditLogEntryData = APIAuditLogEntry; export type RawGuildBanData = GatewayGuildBanAddDispatchData | APIBan; export type RawGuildData = APIGuild | APIUnavailableGuild; export type RawAnonymousGuildData = RawGuildData | RawInviteGuildData; export type RawBaseGuildData = RawAnonymousGuildData | RawOAuth2GuildData; export type RawInviteGuildData = APIPartialGuild; export type RawOAuth2GuildData = RESTAPIPartialCurrentUserGuild; export type RawGuildMemberData = | APIGuildMember | APIInteractionGuildMember | APIInteractionDataResolvedGuildMember | GatewayGuildMemberAddDispatchData | GatewayGuildMemberUpdateDispatchData | Required<RESTPatchAPICurrentGuildMemberNicknameJSONBody> | { user: { id: Snowflake } }; export type RawThreadMemberData = APIThreadMember; export type RawGuildPreviewData = APIGuildPreview; export type RawGuildScheduledEventData = APIGuildScheduledEvent; export type RawGuildTemplateData = APITemplate; export type RawIntegrationData = APIGuildIntegration; export type RawInteractionData = GatewayInteractionCreateDispatchData; export type RawCommandInteractionData = APIApplicationCommandInteraction; export type RawMessageComponentInteractionData = APIMessageComponentInteraction; export type RawMessageButtonInteractionData = APIMessageButtonInteractionData; export type RawMessageSelectMenuInteractionData = APIMessageSelectMenuInteractionData; export type RawInviteData = | APIExtendedInvite | APIInvite | (GatewayInviteCreateDispatchData & { channel: GuildChannel; guild: Guild }) | (GatewayInviteDeleteDispatchData & { channel: GuildChannel; guild: Guild }); export type RawInviteStageInstance = APIInviteStageInstance; export type RawMessageData = APIMessage; export type RawPartialMessageData = GatewayMessageUpdateDispatchData; export type RawAttachmentData = APIAttachment; export type RawMessagePayloadData = | RESTPostAPIChannelMessageJSONBody | RESTPatchAPIChannelMessageJSONBody | RESTPostAPIWebhookWithTokenJSONBody | RESTPatchAPIWebhookWithTokenJSONBody | RESTPostAPIInteractionCallbackFormDataBody | RESTPatchAPIInteractionOriginalResponseJSONBody | RESTPostAPIInteractionFollowupJSONBody | RESTPatchAPIInteractionFollowupJSONBody; export type RawMessageReactionData = APIReaction | GatewayMessageReactionAddDispatchData; export type RawPermissionOverwriteData = APIOverwrite | PermissionOverwrites; export type RawPresenceData = GatewayPresenceUpdate; export type RawRoleData = APIRole; export type RawRichPresenceAssets = GatewayActivityAssets; export type RawStageInstanceData = | APIStageInstance | (Partial<APIStageInstance> & Pick<APIStageInstance, 'id' | 'channel_id' | 'guild_id'>); export type RawStickerData = APISticker | APIStickerItem; export type RawStickerPackData = APIStickerPack; export type RawTeamData = APITeam; export type RawTeamMemberData = APITeamMember; export type RawTypingData = GatewayTypingStartDispatchData; export type RawUserData = | (APIUser & { member?: Omit<APIGuildMember, 'user'> }) | (GatewayPresenceUpdate['user'] & Pick<APIUser, 'username'>); export type RawVoiceRegionData = APIVoiceRegion; export type RawVoiceStateData = APIVoiceState | Omit<APIVoiceState, 'guild_id'>; export type RawWebhookData = | APIWebhook | RESTGetAPIWebhookWithTokenResult | (Partial<APIWebhook> & Required<Pick<APIWebhook, 'id' | 'guild_id'>>); export type RawWelcomeChannelData = APIGuildWelcomeScreenChannel; export type RawWelcomeScreenData = APIGuildWelcomeScreen; export type RawWidgetData = APIGuildWidget; export type RawWidgetMemberData = APIGuildWidgetMember; node_modules/discord.js/typings/rawDataTypes.d.mts 0000664 00000015767 15114741631 0016364 0 ustar 00 // These are aggregate types that are used in the typings file but do not exist as actual exported values. // To prevent them from showing up in an editor, they are imported from here instead of exporting them there directly. import { APIApplication, APIApplicationCommand, APIApplicationCommandInteraction, APIAttachment, APIAuditLog, APIAuditLogEntry, APIBan, APIChannel, APIEmoji, APIExtendedInvite, APIGuild, APIGuildIntegration, APIGuildIntegrationApplication, APIGuildMember, APIGuildPreview, APIGuildWelcomeScreen, APIGuildWelcomeScreenChannel, APIGuildWidget, APIGuildWidgetMember, APIInteractionDataResolvedChannel, APIInteractionDataResolvedGuildMember, APIInteractionGuildMember, APIInvite, APIInviteStageInstance, APIMessage, APIMessageButtonInteractionData, APIMessageComponentInteraction, APIMessageSelectMenuInteractionData, APIOverwrite, APIPartialChannel, APIPartialEmoji, APIPartialGuild, APIReaction, APIRole, APIStageInstance, APISticker, APIStickerItem, APIStickerPack, APITeam, APITeamMember, APITemplate, APIThreadMember, APIUnavailableGuild, APIUser, APIVoiceRegion, APIVoiceState, APIWebhook, GatewayActivity, GatewayActivityAssets, GatewayActivityEmoji, GatewayGuildBanAddDispatchData, GatewayGuildMemberAddDispatchData, GatewayGuildMemberUpdateDispatchData, GatewayInteractionCreateDispatchData, GatewayInviteCreateDispatchData, GatewayInviteDeleteDispatchData, GatewayMessageReactionAddDispatchData, GatewayMessageUpdateDispatchData, GatewayPresenceUpdate, GatewayReadyDispatchData, GatewayTypingStartDispatchData, RESTAPIPartialCurrentUserGuild, RESTGetAPIWebhookWithTokenResult, RESTPatchAPIChannelMessageJSONBody, RESTPatchAPICurrentGuildMemberNicknameJSONBody, RESTPatchAPIInteractionFollowupJSONBody, RESTPatchAPIInteractionOriginalResponseJSONBody, RESTPatchAPIWebhookWithTokenJSONBody, RESTPostAPIChannelMessageJSONBody, RESTPostAPIInteractionCallbackFormDataBody, RESTPostAPIInteractionFollowupJSONBody, RESTPostAPIWebhookWithTokenJSONBody, Snowflake, APIGuildScheduledEvent, } from 'discord-api-types/v10'; import { GuildChannel, Guild, PermissionOverwrites } from './index.mjs'; export type RawActivityData = GatewayActivity; export type RawApplicationData = RawClientApplicationData | RawIntegrationApplicationData; export type RawClientApplicationData = GatewayReadyDispatchData['application'] | APIMessage['application']; export type RawIntegrationApplicationData = APIGuildIntegrationApplication | Partial<APIApplication>; export type RawApplicationCommandData = APIApplicationCommand; export type RawChannelData = | RawGuildChannelData | RawThreadChannelData | RawDMChannelData | RawPartialGroupDMChannelData; export type RawDMChannelData = APIChannel | APIInteractionDataResolvedChannel; export type RawGuildChannelData = APIChannel | APIInteractionDataResolvedChannel | Required<APIPartialChannel>; export type RawPartialGroupDMChannelData = APIChannel | Required<APIPartialChannel>; export type RawThreadChannelData = APIChannel | APIInteractionDataResolvedChannel; export type RawEmojiData = | RawGuildEmojiData | RawReactionEmojiData | GatewayActivityEmoji | Omit<Partial<APIPartialEmoji>, 'animated'>; export type RawApplicationEmojiData = APIEmoji; export type RawGuildEmojiData = APIEmoji; export type RawReactionEmojiData = APIEmoji | APIPartialEmoji; export type RawGuildAuditLogData = APIAuditLog; export type RawGuildAuditLogEntryData = APIAuditLogEntry; export type RawGuildBanData = GatewayGuildBanAddDispatchData | APIBan; export type RawGuildData = APIGuild | APIUnavailableGuild; export type RawAnonymousGuildData = RawGuildData | RawInviteGuildData; export type RawBaseGuildData = RawAnonymousGuildData | RawOAuth2GuildData; export type RawInviteGuildData = APIPartialGuild; export type RawOAuth2GuildData = RESTAPIPartialCurrentUserGuild; export type RawGuildMemberData = | APIGuildMember | APIInteractionGuildMember | APIInteractionDataResolvedGuildMember | GatewayGuildMemberAddDispatchData | GatewayGuildMemberUpdateDispatchData | Required<RESTPatchAPICurrentGuildMemberNicknameJSONBody> | { user: { id: Snowflake } }; export type RawThreadMemberData = APIThreadMember; export type RawGuildPreviewData = APIGuildPreview; export type RawGuildScheduledEventData = APIGuildScheduledEvent; export type RawGuildTemplateData = APITemplate; export type RawIntegrationData = APIGuildIntegration; export type RawInteractionData = GatewayInteractionCreateDispatchData; export type RawCommandInteractionData = APIApplicationCommandInteraction; export type RawMessageComponentInteractionData = APIMessageComponentInteraction; export type RawMessageButtonInteractionData = APIMessageButtonInteractionData; export type RawMessageSelectMenuInteractionData = APIMessageSelectMenuInteractionData; export type RawInviteData = | APIExtendedInvite | APIInvite | (GatewayInviteCreateDispatchData & { channel: GuildChannel; guild: Guild }) | (GatewayInviteDeleteDispatchData & { channel: GuildChannel; guild: Guild }); export type RawInviteStageInstance = APIInviteStageInstance; export type RawMessageData = APIMessage; export type RawPartialMessageData = GatewayMessageUpdateDispatchData; export type RawAttachmentData = APIAttachment; export type RawMessagePayloadData = | RESTPostAPIChannelMessageJSONBody | RESTPatchAPIChannelMessageJSONBody | RESTPostAPIWebhookWithTokenJSONBody | RESTPatchAPIWebhookWithTokenJSONBody | RESTPostAPIInteractionCallbackFormDataBody | RESTPatchAPIInteractionOriginalResponseJSONBody | RESTPostAPIInteractionFollowupJSONBody | RESTPatchAPIInteractionFollowupJSONBody; export type RawMessageReactionData = APIReaction | GatewayMessageReactionAddDispatchData; export type RawPermissionOverwriteData = APIOverwrite | PermissionOverwrites; export type RawPresenceData = GatewayPresenceUpdate; export type RawRoleData = APIRole; export type RawRichPresenceAssets = GatewayActivityAssets; export type RawStageInstanceData = | APIStageInstance | (Partial<APIStageInstance> & Pick<APIStageInstance, 'id' | 'channel_id' | 'guild_id'>); export type RawStickerData = APISticker | APIStickerItem; export type RawStickerPackData = APIStickerPack; export type RawTeamData = APITeam; export type RawTeamMemberData = APITeamMember; export type RawTypingData = GatewayTypingStartDispatchData; export type RawUserData = | (APIUser & { member?: Omit<APIGuildMember, 'user'> }) | (GatewayPresenceUpdate['user'] & Pick<APIUser, 'username'>); export type RawVoiceRegionData = APIVoiceRegion; export type RawVoiceStateData = APIVoiceState | Omit<APIVoiceState, 'guild_id'>; export type RawWebhookData = | APIWebhook | RESTGetAPIWebhookWithTokenResult | (Partial<APIWebhook> & Required<Pick<APIWebhook, 'id' | 'guild_id'>>); export type RawWelcomeChannelData = APIGuildWelcomeScreenChannel; export type RawWelcomeScreenData = APIGuildWelcomeScreen; export type RawWidgetData = APIGuildWidget; export type RawWidgetMemberData = APIGuildWidgetMember; node_modules/discord.js/typings/index.d.ts 0000664 00001116050 15114741631 0014672 0 ustar 00 import { ActionRowBuilder as BuilderActionRow, MessageActionRowComponentBuilder, ButtonBuilder as BuilderButtonComponent, EmbedBuilder as BuildersEmbed, ChannelSelectMenuBuilder as BuilderChannelSelectMenuComponent, MentionableSelectMenuBuilder as BuilderMentionableSelectMenuComponent, RoleSelectMenuBuilder as BuilderRoleSelectMenuComponent, StringSelectMenuBuilder as BuilderStringSelectMenuComponent, UserSelectMenuBuilder as BuilderUserSelectMenuComponent, TextInputBuilder as BuilderTextInputComponent, SelectMenuOptionBuilder as BuildersSelectMenuOption, ModalActionRowComponentBuilder, ModalBuilder as BuildersModal, AnyComponentBuilder, type RestOrArray, ApplicationCommandOptionAllowedChannelTypes, } from '@discordjs/builders'; import { blockQuote, bold, channelMention, codeBlock, formatEmoji, hideLinkEmbed, hyperlink, inlineCode, italic, quote, roleMention, spoiler, strikethrough, time, TimestampStyles, underscore, userMention, } from '@discordjs/formatters'; import { Awaitable, JSONEncodable } from '@discordjs/util'; import { Collection, ReadonlyCollection } from '@discordjs/collection'; import { BaseImageURLOptions, ImageURLOptions, RawFile, REST, RESTOptions } from '@discordjs/rest'; import { WebSocketManager as WSWebSocketManager, IShardingStrategy, IIdentifyThrottler, SessionInfo, } from '@discordjs/ws'; import { APIActionRowComponent, APIApplicationCommandInteractionData, APIApplicationCommandOption, APIAuditLogChange, APIButtonComponent, APIEmbed, APIEmoji, APIInteractionDataResolvedChannel, APIInteractionDataResolvedGuildMember, APIInteractionGuildMember, APIMessage, APIMessageComponent, APIOverwrite, APIPartialChannel, APIPartialEmoji, APIPartialGuild, APIRole, APISelectMenuComponent, APITemplateSerializedSourceGuild, APIUser, ButtonStyle, ChannelType, ComponentType, GatewayDispatchEvents, GatewayVoiceServerUpdateDispatchData, GatewayVoiceStateUpdateDispatchData, GuildFeature, GuildMFALevel, GuildNSFWLevel, GuildPremiumTier, GuildVerificationLevel, Locale, InteractionType, InviteTargetType, MessageType, OAuth2Scopes, RESTPostAPIApplicationCommandsJSONBody, Snowflake, StageInstancePrivacyLevel, StickerFormatType, StickerType, TeamMemberMembershipState, WebhookType, OverwriteType, GuildExplicitContentFilter, GuildDefaultMessageNotifications, ApplicationCommandPermissionType, ApplicationCommandOptionType, ApplicationCommandType, ActivityType, GuildScheduledEventEntityType, GuildScheduledEventPrivacyLevel, GuildScheduledEventStatus, IntegrationExpireBehavior, ApplicationFlags, PermissionFlagsBits, ThreadMemberFlags, UserFlags, MessageFlags, GuildSystemChannelFlags, GatewayIntentBits, ActivityFlags, AuditLogEvent, APIMessageComponentEmoji, EmbedType, APIComponentInActionRow, APIModalInteractionResponseCallbackData, APIModalSubmitInteraction, APIComponentInMessageActionRow, TextInputStyle, APITextInputComponent, APIComponentInModalActionRow, APIModalComponent, APISelectMenuOption, APIEmbedField, APIEmbedAuthor, APIEmbedFooter, APIEmbedImage, VideoQualityMode, LocalizationMap, MessageActivityType, APIAttachment, APIChannel, ThreadAutoArchiveDuration, FormattingPatterns, APIEmbedProvider, AuditLogOptionsType, TextChannelType, ChannelFlags, SortOrderType, APIMessageStringSelectInteractionData, APIMessageUserSelectInteractionData, APIStringSelectComponent, APIUserSelectComponent, APIRoleSelectComponent, APIMentionableSelectComponent, APIChannelSelectComponent, APIGuildMember, APIMessageRoleSelectInteractionData, APIMessageMentionableSelectInteractionData, APIMessageChannelSelectInteractionData, AutoModerationRuleKeywordPresetType, AutoModerationActionType, AutoModerationRuleEventType, AutoModerationRuleTriggerType, AuditLogRuleTriggerType, GatewayAutoModerationActionExecutionDispatchData, APIAutoModerationRule, ForumLayoutType, ApplicationRoleConnectionMetadataType, APIApplicationRoleConnectionMetadata, ImageFormat, GuildMemberFlags, RESTGetAPIGuildThreadsResult, RESTGetAPIGuildOnboardingResult, APIGuildOnboardingPrompt, APIGuildOnboardingPromptOption, GuildOnboardingPromptType, AttachmentFlags, RoleFlags, TeamMemberRole, GuildWidgetStyle, GuildOnboardingMode, APISKU, SKUFlags, SKUType, APIEntitlement, EntitlementType, ApplicationIntegrationType, InteractionContextType, APIPoll, PollLayoutType, APIPollAnswer, APISelectMenuDefaultValue, SelectMenuDefaultValueType, InviteType, ReactionType, APIAuthorizingIntegrationOwnersMap, MessageReferenceType, GuildScheduledEventRecurrenceRuleWeekday, GuildScheduledEventRecurrenceRuleMonth, GuildScheduledEventRecurrenceRuleFrequency, APISubscription, SubscriptionStatus, ApplicationWebhookEventStatus, ApplicationWebhookEventType, RESTPostAPIInteractionCallbackWithResponseResult, RESTAPIInteractionCallbackObject, RESTAPIInteractionCallbackResourceObject, InteractionResponseType, RESTAPIInteractionCallbackActivityInstanceResource, VoiceChannelEffectSendAnimationType, GatewayVoiceChannelEffectSendDispatchData, APIChatInputApplicationCommandInteractionData, APIContextMenuInteractionData, APISoundboardSound, APIComponentInContainer, APIContainerComponent, APIThumbnailComponent, APISectionComponent, APITextDisplayComponent, APIUnfurledMediaItem, APIMediaGalleryItem, APIMediaGalleryComponent, APISeparatorComponent, SeparatorSpacingSize, APIFileComponent, APIMessageTopLevelComponent, EntryPointCommandHandlerType, } from 'discord-api-types/v10'; import { ChildProcess } from 'node:child_process'; import { EventEmitter } from 'node:events'; import { Stream } from 'node:stream'; import { MessagePort, Worker } from 'node:worker_threads'; import { RawActivityData, RawAnonymousGuildData, RawApplicationCommandData, RawApplicationData, RawApplicationEmojiData, RawBaseGuildData, RawChannelData, RawClientApplicationData, RawDMChannelData, RawEmojiData, RawGuildAuditLogData, RawGuildAuditLogEntryData, RawGuildBanData, RawGuildChannelData, RawGuildData, RawGuildEmojiData, RawGuildMemberData, RawGuildPreviewData, RawGuildScheduledEventData, RawGuildTemplateData, RawIntegrationApplicationData, RawIntegrationData, RawInteractionData, RawInviteData, RawInviteGuildData, RawInviteStageInstance, RawMessageButtonInteractionData, RawMessageComponentInteractionData, RawMessageData, RawMessagePayloadData, RawMessageReactionData, RawOAuth2GuildData, RawPartialGroupDMChannelData, RawPartialMessageData, RawPermissionOverwriteData, RawPresenceData, RawReactionEmojiData, RawRichPresenceAssets, RawRoleData, RawStageInstanceData, RawStickerData, RawStickerPackData, RawTeamData, RawTeamMemberData, RawThreadChannelData, RawThreadMemberData, RawTypingData, RawUserData, RawVoiceRegionData, RawVoiceStateData, RawWebhookData, RawWelcomeChannelData, RawWelcomeScreenData, RawWidgetData, RawWidgetMemberData, } from './rawDataTypes.js'; //#region Classes export class Activity { private constructor(presence: Presence, data?: RawActivityData); public readonly presence: Presence; public applicationId: Snowflake | null; public assets: RichPresenceAssets | null; public buttons: string[]; public get createdAt(): Date; public createdTimestamp: number; public details: string | null; public emoji: Emoji | null; public flags: Readonly<ActivityFlagsBitField>; public name: string; public party: { id: string | null; size: [number, number]; } | null; public state: string | null; public syncId: string | null; public timestamps: { start: Date | null; end: Date | null; } | null; public type: ActivityType; public url: string | null; public equals(activity: Activity): boolean; public toString(): string; } export type ActivityFlagsString = keyof typeof ActivityFlags; export interface BaseComponentData { id?: number; type: ComponentType; } export type MessageActionRowComponentData = | JSONEncodable<APIComponentInMessageActionRow> | ButtonComponentData | StringSelectMenuComponentData | UserSelectMenuComponentData | RoleSelectMenuComponentData | MentionableSelectMenuComponentData | ChannelSelectMenuComponentData; export type ModalActionRowComponentData = JSONEncodable<APIComponentInModalActionRow> | TextInputComponentData; export type ActionRowComponentData = MessageActionRowComponentData | ModalActionRowComponentData; export type ActionRowComponent = MessageActionRowComponent | ModalActionRowComponent; export interface ActionRowData<ComponentType extends JSONEncodable<APIComponentInActionRow> | ActionRowComponentData> extends BaseComponentData { components: readonly ComponentType[]; } export class ActionRowBuilder< ComponentType extends AnyComponentBuilder = AnyComponentBuilder, > extends BuilderActionRow<ComponentType> { public constructor( data?: Partial< | ActionRowData<ActionRowComponentData | JSONEncodable<APIComponentInActionRow>> | APIActionRowComponent<APIComponentInMessageActionRow | APIComponentInModalActionRow> >, ); public static from<ComponentType extends AnyComponentBuilder = AnyComponentBuilder>( other: | JSONEncodable<APIActionRowComponent<ReturnType<ComponentType['toJSON']>>> | APIActionRowComponent<ReturnType<ComponentType['toJSON']>>, ): ActionRowBuilder<ComponentType>; } export type MessageActionRowComponent = | ButtonComponent | StringSelectMenuComponent | UserSelectMenuComponent | RoleSelectMenuComponent | MentionableSelectMenuComponent | ChannelSelectMenuComponent; export type ModalActionRowComponent = TextInputComponent; export class ActionRow<ComponentType extends MessageActionRowComponent | ModalActionRowComponent> extends Component< APIActionRowComponent<APIComponentInMessageActionRow | APIComponentInModalActionRow> > { private constructor(data: APIActionRowComponent<APIComponentInMessageActionRow | APIComponentInModalActionRow>); public readonly components: ComponentType[]; public toJSON(): APIActionRowComponent<ReturnType<ComponentType['toJSON']>>; } export class ActivityFlagsBitField extends BitField<ActivityFlagsString> { public static Flags: typeof ActivityFlags; public static resolve(bit?: BitFieldResolvable<ActivityFlagsString, number>): number; } export abstract class AnonymousGuild extends BaseGuild { protected constructor(client: Client<true>, data: RawAnonymousGuildData, immediatePatch?: boolean); public banner: string | null; public description: string | null; public nsfwLevel: GuildNSFWLevel; public premiumSubscriptionCount: number | null; public splash: string | null; public vanityURLCode: string | null; public verificationLevel: GuildVerificationLevel; public bannerURL(options?: ImageURLOptions): string | null; public splashURL(options?: ImageURLOptions): string | null; } export class AutoModerationActionExecution { private constructor(data: GatewayAutoModerationActionExecutionDispatchData, guild: Guild); public guild: Guild; public action: AutoModerationAction; public ruleId: Snowflake; public ruleTriggerType: AutoModerationRuleTriggerType; public get user(): User | null; public userId: Snowflake; public get channel(): GuildTextBasedChannel | ForumChannel | MediaChannel | null; public channelId: Snowflake | null; public get member(): GuildMember | null; public messageId: Snowflake | null; public alertSystemMessageId: Snowflake | null; public content: string; public matchedKeyword: string | null; public matchedContent: string | null; public get autoModerationRule(): AutoModerationRule | null; } export class AutoModerationRule extends Base { private constructor(client: Client<true>, data: APIAutoModerationRule, guild: Guild); public id: Snowflake; public guild: Guild; public name: string; public creatorId: Snowflake; public eventType: AutoModerationRuleEventType; public triggerType: AutoModerationRuleTriggerType; public triggerMetadata: AutoModerationTriggerMetadata; public actions: AutoModerationAction[]; public enabled: boolean; public exemptRoles: Collection<Snowflake, Role>; public exemptChannels: Collection<Snowflake, GuildBasedChannel>; public edit(options: AutoModerationRuleEditOptions): Promise<AutoModerationRule>; public delete(reason?: string): Promise<void>; public setName(name: string, reason?: string): Promise<AutoModerationRule>; public setEventType(eventType: AutoModerationRuleEventType, reason?: string): Promise<AutoModerationRule>; public setKeywordFilter(keywordFilter: readonly string[], reason?: string): Promise<AutoModerationRule>; public setRegexPatterns(regexPatterns: readonly string[], reason?: string): Promise<AutoModerationRule>; public setPresets( presets: readonly AutoModerationRuleKeywordPresetType[], reason?: string, ): Promise<AutoModerationRule>; public setAllowList(allowList: readonly string[], reason?: string): Promise<AutoModerationRule>; public setMentionTotalLimit(mentionTotalLimit: number, reason?: string): Promise<AutoModerationRule>; public setMentionRaidProtectionEnabled( mentionRaidProtectionEnabled: boolean, reason?: string, ): Promise<AutoModerationRule>; public setActions(actions: readonly AutoModerationActionOptions[], reason?: string): Promise<AutoModerationRule>; public setEnabled(enabled?: boolean, reason?: string): Promise<AutoModerationRule>; public setExemptRoles( roles: ReadonlyCollection<Snowflake, Role> | readonly RoleResolvable[], reason?: string, ): Promise<AutoModerationRule>; public setExemptChannels( channels: ReadonlyCollection<Snowflake, GuildBasedChannel> | readonly GuildChannelResolvable[], reason?: string, ): Promise<AutoModerationRule>; } export abstract class Application extends Base { protected constructor(client: Client<true>, data: RawApplicationData); public get createdAt(): Date; public get createdTimestamp(): number; public description: string | null; public icon: string | null; public id: Snowflake; public name: string | null; public termsOfServiceURL: string | null; public privacyPolicyURL: string | null; public rpcOrigins: string[]; public cover: string | null; public verifyKey: string | null; public coverURL(options?: ImageURLOptions): string | null; public iconURL(options?: ImageURLOptions): string | null; public toJSON(): unknown; public toString(): string | null; } export class ApplicationCommand<PermissionsFetchType = {}> extends Base { private constructor(client: Client<true>, data: RawApplicationCommandData, guild?: Guild, guildId?: Snowflake); public applicationId: Snowflake; public contexts: InteractionContextType[] | null; public get createdAt(): Date; public get createdTimestamp(): number; public defaultMemberPermissions: Readonly<PermissionsBitField> | null; public description: string; public descriptionLocalizations: LocalizationMap | null; public descriptionLocalized: string | null; /** @deprecated Use {@link ApplicationCommand.contexts} instead */ public dmPermission: boolean | null; public guild: Guild | null; public guildId: Snowflake | null; public get manager(): ApplicationCommandManager; public id: Snowflake; public integrationTypes: ApplicationIntegrationType[] | null; public handler: EntryPointCommandHandlerType | null; public name: string; public nameLocalizations: LocalizationMap | null; public nameLocalized: string | null; public options: (ApplicationCommandOption & { nameLocalized?: string; descriptionLocalized?: string })[]; public permissions: ApplicationCommandPermissionsManager< PermissionsFetchType, PermissionsFetchType, Guild | null, Snowflake >; public type: ApplicationCommandType; public version: Snowflake; public nsfw: boolean; public delete(): Promise<ApplicationCommand<PermissionsFetchType>>; public edit(data: Partial<ApplicationCommandData>): Promise<ApplicationCommand<PermissionsFetchType>>; public setName(name: string): Promise<ApplicationCommand<PermissionsFetchType>>; public setNameLocalizations(nameLocalizations: LocalizationMap): Promise<ApplicationCommand<PermissionsFetchType>>; public setDescription(description: string): Promise<ApplicationCommand<PermissionsFetchType>>; public setDescriptionLocalizations( descriptionLocalizations: LocalizationMap, ): Promise<ApplicationCommand<PermissionsFetchType>>; public setDefaultMemberPermissions( defaultMemberPermissions: PermissionResolvable | null, ): Promise<ApplicationCommand<PermissionsFetchType>>; public setDMPermission(dmPermission?: boolean): Promise<ApplicationCommand<PermissionsFetchType>>; public setOptions( options: readonly ApplicationCommandOptionData[], ): Promise<ApplicationCommand<PermissionsFetchType>>; public equals( command: ApplicationCommand | ApplicationCommandData | RawApplicationCommandData, enforceOptionOrder?: boolean, ): boolean; public static optionsEqual( existing: readonly ApplicationCommandOption[], options: | readonly ApplicationCommandOption[] | readonly ApplicationCommandOptionData[] | readonly APIApplicationCommandOption[], enforceOptionOrder?: boolean, ): boolean; private static _optionEquals( existing: ApplicationCommandOption, options: ApplicationCommandOption | ApplicationCommandOptionData | APIApplicationCommandOption, enforceOptionOrder?: boolean, ): boolean; private static transformOption(option: ApplicationCommandOptionData, received?: boolean): unknown; private static transformCommand(command: ApplicationCommandData): RESTPostAPIApplicationCommandsJSONBody; private static isAPICommandData(command: object): command is RESTPostAPIApplicationCommandsJSONBody; } export class ApplicationRoleConnectionMetadata { private constructor(data: APIApplicationRoleConnectionMetadata); public name: string; public nameLocalizations: LocalizationMap | null; public description: string; public descriptionLocalizations: LocalizationMap | null; public key: string; public type: ApplicationRoleConnectionMetadataType; } export type ApplicationResolvable = Application | Activity | Snowflake; export class ApplicationFlagsBitField extends BitField<ApplicationFlagsString> { public static Flags: typeof ApplicationFlags; public static resolve(bit?: BitFieldResolvable<ApplicationFlagsString, number>): number; } export type ApplicationFlagsResolvable = BitFieldResolvable<ApplicationFlagsString, number>; export type AutoModerationRuleResolvable = AutoModerationRule | Snowflake; export abstract class Base { public constructor(client: Client<true>); public readonly client: Client<true>; public toJSON(...props: Record<string, boolean | string>[]): unknown; public valueOf(): string; } export class BaseClient extends EventEmitter implements AsyncDisposable { public constructor(options?: ClientOptions | WebhookClientOptions); private decrementMaxListeners(): void; private incrementMaxListeners(): void; public options: ClientOptions | WebhookClientOptions; public rest: REST; public destroy(): void; public toJSON(...props: Record<string, boolean | string>[]): unknown; public [Symbol.asyncDispose](): Promise<void>; } export type GuildCacheMessage<Cached extends CacheType> = CacheTypeReducer< Cached, Message<true>, APIMessage, Message | APIMessage, Message | APIMessage >; export type BooleanCache<Cached extends CacheType> = Cached extends 'cached' ? true : false; export abstract class CommandInteraction<Cached extends CacheType = CacheType> extends BaseInteraction<Cached> { public type: InteractionType.ApplicationCommand; public get command(): ApplicationCommand | ApplicationCommand<{ guild: GuildResolvable }> | null; public channelId: Snowflake; public commandId: Snowflake; public commandName: string; public commandType: ApplicationCommandType; public commandGuildId: Snowflake | null; public deferred: boolean; public ephemeral: boolean | null; public replied: boolean; public webhook: InteractionWebhook; public inGuild(): this is CommandInteraction<'raw' | 'cached'>; public inCachedGuild(): this is CommandInteraction<'cached'>; public inRawGuild(): this is CommandInteraction<'raw'>; public deferReply( options: InteractionDeferReplyOptions & { withResponse: true }, ): Promise<InteractionCallbackResponse>; /** @deprecated `fetchReply` is deprecated. Use `withResponse` instead or fetch the response after using the method. */ public deferReply( options: InteractionDeferReplyOptions & { fetchReply: true }, ): Promise<Message<BooleanCache<Cached>>>; public deferReply(options?: InteractionDeferReplyOptions): Promise<InteractionResponse<BooleanCache<Cached>>>; public deleteReply(message?: MessageResolvable | '@original'): Promise<void>; public editReply( options: string | MessagePayload | InteractionEditReplyOptions, ): Promise<Message<BooleanCache<Cached>>>; public fetchReply(message?: Snowflake | '@original'): Promise<Message<BooleanCache<Cached>>>; public followUp(options: string | MessagePayload | InteractionReplyOptions): Promise<Message<BooleanCache<Cached>>>; public reply(options: InteractionReplyOptions & { withResponse: true }): Promise<InteractionCallbackResponse>; /** @deprecated `fetchReply` is deprecated. Use `withResponse` instead or fetch the response after using the method. */ public reply(options: InteractionReplyOptions & { fetchReply: true }): Promise<Message<BooleanCache<Cached>>>; public reply( options: string | MessagePayload | InteractionReplyOptions, ): Promise<InteractionResponse<BooleanCache<Cached>>>; public launchActivity(options: LaunchActivityOptions & { withResponse: true }): Promise<InteractionCallbackResponse>; public launchActivity(options?: LaunchActivityOptions & { withResponse?: false }): Promise<undefined>; public launchActivity(options?: LaunchActivityOptions): Promise<InteractionCallbackResponse | undefined>; public showModal( modal: | JSONEncodable<APIModalInteractionResponseCallbackData> | ModalComponentData | APIModalInteractionResponseCallbackData, options: ShowModalOptions & { withResponse: true }, ): Promise<InteractionCallbackResponse>; public showModal( modal: | JSONEncodable<APIModalInteractionResponseCallbackData> | ModalComponentData | APIModalInteractionResponseCallbackData, options?: ShowModalOptions & { withResponse: true }, ): Promise<InteractionCallbackResponse>; public showModal( modal: | JSONEncodable<APIModalInteractionResponseCallbackData> | ModalComponentData | APIModalInteractionResponseCallbackData, options?: ShowModalOptions, ): Promise<undefined>; /** @deprecated Sending a premium-style button is the new Discord behaviour. */ public sendPremiumRequired(): Promise<void>; public awaitModalSubmit( options: AwaitModalSubmitOptions<ModalSubmitInteraction>, ): Promise<ModalSubmitInteraction<Cached>>; private transformOption( option: APIApplicationCommandOption, resolved: Extract< APIApplicationCommandInteractionData, APIChatInputApplicationCommandInteractionData | APIContextMenuInteractionData >['resolved'], ): CommandInteractionOption<Cached>; } export class InteractionResponse<Cached extends boolean = boolean> { private constructor(interaction: Interaction, id?: Snowflake); public interaction: Interaction<WrapBooleanCache<Cached>>; public client: Client; public id: Snowflake; public get createdAt(): Date; public get createdTimestamp(): number; public awaitMessageComponent<ComponentType extends MessageComponentType>( options?: AwaitMessageCollectorOptionsParams<ComponentType, Cached>, ): Promise<MappedInteractionTypes<Cached>[ComponentType]>; public createMessageComponentCollector<ComponentType extends MessageComponentType>( options?: MessageCollectorOptionsParams<ComponentType, Cached>, ): InteractionCollector<MappedInteractionTypes<Cached>[ComponentType]>; public delete(): Promise<void>; public edit(options: string | MessagePayload | WebhookMessageEditOptions): Promise<Message>; public fetch(): Promise<Message>; } export abstract class BaseGuild extends Base { protected constructor(client: Client<true>, data: RawBaseGuildData); public get createdAt(): Date; public get createdTimestamp(): number; public features: `${GuildFeature}`[]; public icon: string | null; public id: Snowflake; public name: string; public get nameAcronym(): string; public get partnered(): boolean; public get verified(): boolean; public fetch(): Promise<Guild>; public iconURL(options?: ImageURLOptions): string | null; public toString(): string; } export class BaseGuildEmoji extends Emoji { protected constructor(client: Client<true>, data: RawGuildEmojiData, guild: Guild | GuildPreview); public imageURL(options?: BaseImageURLOptions): string; public get url(): string; public available: boolean | null; public get createdAt(): Date; public get createdTimestamp(): number; public guild: Guild | GuildPreview; public id: Snowflake; public managed: boolean | null; public requiresColons: boolean | null; } // tslint:disable-next-line no-empty-interface export interface BaseGuildTextChannel extends TextBasedChannelFields<true> {} export class BaseGuildTextChannel extends GuildChannel { protected constructor(guild: Guild, data?: RawGuildChannelData, client?: Client<true>, immediatePatch?: boolean); public defaultAutoArchiveDuration?: ThreadAutoArchiveDuration; public defaultThreadRateLimitPerUser: number | null; public rateLimitPerUser: number | null; public nsfw: boolean; public threads: GuildTextThreadManager<AllowedThreadTypeForTextChannel | AllowedThreadTypeForNewsChannel>; public topic: string | null; public createInvite(options?: InviteCreateOptions): Promise<Invite>; public fetchInvites(cache?: boolean): Promise<Collection<string, Invite>>; public setDefaultAutoArchiveDuration( defaultAutoArchiveDuration: ThreadAutoArchiveDuration, reason?: string, ): Promise<this>; public setTopic(topic: string | null, reason?: string): Promise<this>; public setType(type: ChannelType.GuildText, reason?: string): Promise<TextChannel>; public setType(type: ChannelType.GuildAnnouncement, reason?: string): Promise<NewsChannel>; } // tslint:disable-next-line no-empty-interface export interface BaseGuildVoiceChannel extends Omit<TextBasedChannelFields<true>, 'lastPinTimestamp' | 'lastPinAt'> {} export class BaseGuildVoiceChannel extends GuildChannel { public constructor(guild: Guild, data?: RawGuildChannelData); public bitrate: number; public get full(): boolean; public get joinable(): boolean; public get members(): Collection<Snowflake, GuildMember>; public nsfw: boolean; public rateLimitPerUser: number | null; public rtcRegion: string | null; public userLimit: number; public videoQualityMode: VideoQualityMode | null; public createInvite(options?: InviteCreateOptions): Promise<Invite>; public fetchInvites(cache?: boolean): Promise<Collection<string, Invite>>; public setBitrate(bitrate: number, reason?: string): Promise<this>; public setRTCRegion(rtcRegion: string | null, reason?: string): Promise<this>; public setUserLimit(userLimit: number, reason?: string): Promise<this>; public setVideoQualityMode(videoQualityMode: VideoQualityMode, reason?: string): Promise<this>; } export type EnumLike<Enum, Value> = Record<keyof Enum, Value>; export class BitField<Flags extends string, Type extends number | bigint = number> { public constructor(bits?: BitFieldResolvable<Flags, Type>); public bitfield: Type; public add(...bits: BitFieldResolvable<Flags, Type>[]): BitField<Flags, Type>; public any(bit: BitFieldResolvable<Flags, Type>): boolean; public equals(bit: BitFieldResolvable<Flags, Type>): boolean; public freeze(): Readonly<BitField<Flags, Type>>; public has(bit: BitFieldResolvable<Flags, Type>): boolean; public missing(bits: BitFieldResolvable<Flags, Type>, ...hasParams: readonly unknown[]): Flags[]; public remove(...bits: BitFieldResolvable<Flags, Type>[]): BitField<Flags, Type>; public serialize(...hasParams: readonly unknown[]): Record<Flags, boolean>; public toArray(...hasParams: readonly unknown[]): Flags[]; public toJSON(): Type extends number ? number : string; public valueOf(): Type; public [Symbol.iterator](): IterableIterator<Flags>; public static Flags: EnumLike<unknown, number | bigint>; public static resolve(bit?: BitFieldResolvable<string, number | bigint>): number | bigint; } export class ButtonInteraction<Cached extends CacheType = CacheType> extends MessageComponentInteraction<Cached> { private constructor(client: Client<true>, data: RawMessageButtonInteractionData); public componentType: ComponentType.Button; public get component(): CacheTypeReducer< Cached, ButtonComponent, APIButtonComponent, ButtonComponent | APIButtonComponent, ButtonComponent | APIButtonComponent >; public inGuild(): this is ButtonInteraction<'raw' | 'cached'>; public inCachedGuild(): this is ButtonInteraction<'cached'>; public inRawGuild(): this is ButtonInteraction<'raw'>; } export type AnyComponent = | APIMessageComponent | APIModalComponent | APIActionRowComponent<APIComponentInMessageActionRow | APIComponentInModalActionRow> | AnyComponentV2; export class Component<RawComponentData extends AnyComponent = AnyComponent> { public readonly data: Readonly<RawComponentData>; public get id(): RawComponentData['id']; public get type(): RawComponentData['type']; public toJSON(): RawComponentData; public equals(other: this | RawComponentData): boolean; } export type AnyComponentV2 = APIComponentInContainer | APIContainerComponent | APIThumbnailComponent; export type TopLevelComponent = | ActionRow<MessageActionRowComponent> | ContainerComponent | FileComponent | MediaGalleryComponent | SectionComponent | SeparatorComponent | TextDisplayComponent; export type TopLevelComponentData = | ActionRowData<MessageActionRowComponentData> | ContainerComponentData | FileComponentData | MediaGalleryComponentData | SectionComponentData | SeparatorComponentData | TextDisplayComponentData; export class ButtonComponent extends Component<APIButtonComponent> { private constructor(data: APIButtonComponent); public get style(): ButtonStyle; public get label(): string | null; public get emoji(): APIMessageComponentEmoji | null; public get disabled(): boolean; public get customId(): string | null; public get url(): string | null; } export type ComponentEmojiResolvable = APIMessageComponentEmoji | string; export class ButtonBuilder extends BuilderButtonComponent { public constructor(data?: Partial<ButtonComponentData> | Partial<APIButtonComponent>); public static from(other: JSONEncodable<APIButtonComponent> | APIButtonComponent): ButtonBuilder; public override setEmoji(emoji: ComponentEmojiResolvable): this; } export class StringSelectMenuBuilder extends BuilderStringSelectMenuComponent { public constructor(data?: Partial<StringSelectMenuComponentData | APIStringSelectComponent>); private static normalizeEmoji( selectMenuOption: JSONEncodable<APISelectMenuOption> | SelectMenuComponentOptionData, ): (APISelectMenuOption | StringSelectMenuOptionBuilder)[]; public override addOptions( ...options: RestOrArray<BuildersSelectMenuOption | SelectMenuComponentOptionData | APISelectMenuOption> ): this; public override setOptions( ...options: RestOrArray<BuildersSelectMenuOption | SelectMenuComponentOptionData | APISelectMenuOption> ): this; public static from( other: JSONEncodable<APIStringSelectComponent> | APIStringSelectComponent, ): StringSelectMenuBuilder; } export { /** @deprecated Use {@link StringSelectMenuBuilder} instead */ StringSelectMenuBuilder as SelectMenuBuilder, /** @deprecated Use {@link StringSelectMenuOptionBuilder} instead */ StringSelectMenuOptionBuilder as SelectMenuOptionBuilder, }; export class UserSelectMenuBuilder extends BuilderUserSelectMenuComponent { public constructor(data?: Partial<UserSelectMenuComponentData | APIUserSelectComponent>); public static from(other: JSONEncodable<APIUserSelectComponent> | APIUserSelectComponent): UserSelectMenuBuilder; } export class RoleSelectMenuBuilder extends BuilderRoleSelectMenuComponent { public constructor(data?: Partial<RoleSelectMenuComponentData | APIRoleSelectComponent>); public static from(other: JSONEncodable<APIRoleSelectComponent> | APIRoleSelectComponent): RoleSelectMenuBuilder; } export class MentionableSelectMenuBuilder extends BuilderMentionableSelectMenuComponent { public constructor(data?: Partial<MentionableSelectMenuComponentData | APIMentionableSelectComponent>); public static from( other: JSONEncodable<APIMentionableSelectComponent> | APIMentionableSelectComponent, ): MentionableSelectMenuBuilder; } export class ChannelSelectMenuBuilder extends BuilderChannelSelectMenuComponent { public constructor(data?: Partial<ChannelSelectMenuComponentData | APIChannelSelectComponent>); public static from( other: JSONEncodable<APIChannelSelectComponent> | APIChannelSelectComponent, ): ChannelSelectMenuBuilder; } export class StringSelectMenuOptionBuilder extends BuildersSelectMenuOption { public constructor(data?: SelectMenuComponentOptionData | APISelectMenuOption); public override setEmoji(emoji: ComponentEmojiResolvable): this; public static from(other: JSONEncodable<APISelectMenuOption> | APISelectMenuOption): StringSelectMenuOptionBuilder; } export class ModalBuilder extends BuildersModal { public constructor(data?: Partial<ModalComponentData> | Partial<APIModalInteractionResponseCallbackData>); public static from( other: JSONEncodable<APIModalInteractionResponseCallbackData> | APIModalInteractionResponseCallbackData, ): ModalBuilder; } export class TextInputBuilder extends BuilderTextInputComponent { public constructor(data?: Partial<TextInputComponentData | APITextInputComponent>); public static from(other: JSONEncodable<APITextInputComponent> | APITextInputComponent): TextInputBuilder; } export class TextInputComponent extends Component<APITextInputComponent> { public get customId(): string; public get value(): string; } export class BaseSelectMenuComponent<Data extends APISelectMenuComponent> extends Component<Data> { protected constructor(data: Data); public get placeholder(): string | null; public get maxValues(): number | null; public get minValues(): number | null; public get customId(): string; public get disabled(): boolean; } export class StringSelectMenuComponent extends BaseSelectMenuComponent<APIStringSelectComponent> { public get options(): APISelectMenuOption[]; } export { /** @deprecated Use {@link StringSelectMenuComponent} instead */ StringSelectMenuComponent as SelectMenuComponent, }; export class UserSelectMenuComponent extends BaseSelectMenuComponent<APIUserSelectComponent> {} export class RoleSelectMenuComponent extends BaseSelectMenuComponent<APIRoleSelectComponent> {} export class MentionableSelectMenuComponent extends BaseSelectMenuComponent<APIMentionableSelectComponent> {} export class ChannelSelectMenuComponent extends BaseSelectMenuComponent<APIChannelSelectComponent> { public getChannelTypes(): ChannelType[] | null; } export interface EmbedData { title?: string; type?: EmbedType; description?: string; url?: string; timestamp?: string | number | Date; color?: number; footer?: EmbedFooterData; image?: EmbedAssetData; thumbnail?: EmbedAssetData; provider?: APIEmbedProvider; author?: EmbedAuthorData; fields?: readonly APIEmbedField[]; video?: EmbedAssetData; } export interface IconData { iconURL?: string; proxyIconURL?: string; } export interface EmbedAuthorData extends Omit<APIEmbedAuthor, 'icon_url' | 'proxy_icon_url'>, IconData {} export interface EmbedFooterData extends Omit<APIEmbedFooter, 'icon_url' | 'proxy_icon_url'>, IconData {} export interface EmbedAssetData extends Omit<APIEmbedImage, 'proxy_url'> { proxyURL?: string; } export class EmbedBuilder extends BuildersEmbed { public constructor(data?: EmbedData | APIEmbed); public override setColor(color: ColorResolvable | null): this; public static from(other: JSONEncodable<APIEmbed> | APIEmbed): EmbedBuilder; public get length(): number; } export class Embed { private constructor(data: APIEmbed); public readonly data: Readonly<APIEmbed>; public get fields(): APIEmbedField[]; public get footer(): EmbedFooterData | null; public get title(): string | null; public get description(): string | null; public get url(): string | null; public get color(): number | null; public get hexColor(): string | null; public get timestamp(): string | null; public get thumbnail(): EmbedAssetData | null; public get image(): EmbedAssetData | null; public get author(): EmbedAuthorData | null; public get provider(): APIEmbedProvider | null; public get video(): EmbedAssetData | null; public get length(): number; public equals(other: Embed | APIEmbed): boolean; public toJSON(): APIEmbed; } export interface MappedChannelCategoryTypes { [ChannelType.GuildAnnouncement]: NewsChannel; [ChannelType.GuildVoice]: VoiceChannel; [ChannelType.GuildText]: TextChannel; [ChannelType.GuildStageVoice]: StageChannel; [ChannelType.GuildForum]: ForumChannel; [ChannelType.GuildMedia]: MediaChannel; } export type CategoryChannelType = Exclude< ChannelType, | ChannelType.DM | ChannelType.GroupDM | ChannelType.PublicThread | ChannelType.AnnouncementThread | ChannelType.PrivateThread | ChannelType.GuildCategory | ChannelType.GuildDirectory >; export class CategoryChannel extends GuildChannel { public get children(): CategoryChannelChildManager; public type: ChannelType.GuildCategory; public get parent(): null; public parentId: null; } export type CategoryChannelResolvable = Snowflake | CategoryChannel; export type ChannelFlagsString = keyof typeof ChannelFlags; export type ChannelFlagsResolvable = BitFieldResolvable<ChannelFlagsString, number>; export class ChannelFlagsBitField extends BitField<ChannelFlagsString> { public static Flags: typeof ChannelFlags; public static resolve(bit?: BitFieldResolvable<ChannelFlagsString, ChannelFlags>): number; } export abstract class BaseChannel extends Base { public constructor(client: Client<true>, data?: RawChannelData, immediatePatch?: boolean); public get createdAt(): Date | null; public get createdTimestamp(): number | null; public id: Snowflake; public flags: Readonly<ChannelFlagsBitField> | null; public get partial(): false; public type: ChannelType; public get url(): string; public delete(): Promise<this>; public fetch(force?: boolean): Promise<this>; public isThread(): this is AnyThreadChannel; public isTextBased(): this is TextBasedChannel; public isDMBased(): this is PartialGroupDMChannel | DMChannel | PartialDMChannel; public isVoiceBased(): this is VoiceBasedChannel; public isThreadOnly(): this is ThreadOnlyChannel; public isSendable(): this is SendableChannels; public toString(): ChannelMention | UserMention; } export type If<Value extends boolean, TrueResult, FalseResult = null> = Value extends true ? TrueResult : Value extends false ? FalseResult : TrueResult | FalseResult; /** @internal */ type AsyncEventIteratorDisposability = ReturnType<typeof EventEmitter.on> extends AsyncDisposable ? AsyncDisposable : {}; /** @internal */ interface AsyncEventIterator<Params extends any[]> extends AsyncIterableIterator<Params>, AsyncEventIteratorDisposability { [Symbol.asyncIterator](): AsyncEventIterator<Params>; } export class Client<Ready extends boolean = boolean> extends BaseClient { public constructor(options: ClientOptions); private actions: unknown; private presence: ClientPresence; private _eval(script: string): unknown; private _validateOptions(options: ClientOptions): void; private get _censoredToken(): string | null; // This a technique used to brand the ready state. Or else we'll get `never` errors on typeguard checks. private readonly _ready: Ready; // Override inherited static EventEmitter methods, with added type checks for Client events. public static once<Emitter extends EventEmitter, Event extends keyof ClientEvents>( eventEmitter: Emitter, eventName: Emitter extends Client ? Event : string | symbol, options?: { signal?: AbortSignal | undefined }, ): Promise<Emitter extends Client ? ClientEvents[Event] : any[]>; public static on<Emitter extends EventEmitter, Event extends keyof ClientEvents>( eventEmitter: Emitter, eventName: Emitter extends Client ? Event : string | symbol, options?: { signal?: AbortSignal | undefined }, ): AsyncEventIterator<Emitter extends Client ? ClientEvents[Event] : any[]>; public application: If<Ready, ClientApplication>; public channels: ChannelManager; public get emojis(): BaseGuildEmojiManager; public guilds: GuildManager; public options: Omit<ClientOptions, 'intents'> & { intents: IntentsBitField }; public get readyAt(): If<Ready, Date>; public readyTimestamp: If<Ready, number>; public sweepers: Sweepers; public shard: ShardClientUtil | null; public token: If<Ready, string, string | null>; public get uptime(): If<Ready, number>; public user: If<Ready, ClientUser>; public users: UserManager; public voice: ClientVoiceManager; public ws: WebSocketManager; public destroy(): Promise<void>; public deleteWebhook(id: Snowflake, options?: WebhookDeleteOptions): Promise<void>; public fetchGuildPreview(guild: GuildResolvable): Promise<GuildPreview>; public fetchInvite(invite: InviteResolvable, options?: ClientFetchInviteOptions): Promise<Invite>; public fetchGuildTemplate(template: GuildTemplateResolvable): Promise<GuildTemplate>; public fetchVoiceRegions(): Promise<Collection<string, VoiceRegion>>; public fetchSticker(id: Snowflake): Promise<Sticker>; public fetchStickerPacks(options: { packId: Snowflake }): Promise<StickerPack>; public fetchStickerPacks(options?: StickerPackFetchOptions): Promise<Collection<Snowflake, StickerPack>>; /** @deprecated Use {@link Client.fetchStickerPacks} instead. */ public fetchPremiumStickerPacks(): ReturnType<Client['fetchStickerPacks']>; public fetchWebhook(id: Snowflake, token?: string): Promise<Webhook>; public fetchGuildWidget(guild: GuildResolvable): Promise<Widget>; public generateInvite(options?: InviteGenerationOptions): string; public login(token?: string): Promise<string>; public isReady(): this is Client<true>; public toJSON(): unknown; public on<Event extends keyof ClientEvents>(event: Event, listener: (...args: ClientEvents[Event]) => void): this; public on<Event extends string | symbol>( event: Exclude<Event, keyof ClientEvents>, listener: (...args: any[]) => void, ): this; public once<Event extends keyof ClientEvents>(event: Event, listener: (...args: ClientEvents[Event]) => void): this; public once<Event extends string | symbol>( event: Exclude<Event, keyof ClientEvents>, listener: (...args: any[]) => void, ): this; public emit<Event extends keyof ClientEvents>(event: Event, ...args: ClientEvents[Event]): boolean; public emit<Event extends string | symbol>(event: Exclude<Event, keyof ClientEvents>, ...args: unknown[]): boolean; public off<Event extends keyof ClientEvents>(event: Event, listener: (...args: ClientEvents[Event]) => void): this; public off<Event extends string | symbol>( event: Exclude<Event, keyof ClientEvents>, listener: (...args: any[]) => void, ): this; public removeAllListeners<Event extends keyof ClientEvents>(event?: Event): this; public removeAllListeners<Event extends string | symbol>(event?: Exclude<Event, keyof ClientEvents>): this; } export interface StickerPackFetchOptions { packId?: Snowflake; } export class ClientApplication extends Application { private constructor(client: Client<true>, data: RawClientApplicationData); public botPublic: boolean | null; public botRequireCodeGrant: boolean | null; public bot: User | null; public commands: ApplicationCommandManager; public emojis: ApplicationEmojiManager; public entitlements: EntitlementManager; public subscriptions: SubscriptionManager; public guildId: Snowflake | null; public get guild(): Guild | null; public flags: Readonly<ApplicationFlagsBitField>; public approximateGuildCount: number | null; public approximateUserInstallCount: number | null; public approximateUserAuthorizationCount: number | null; public tags: string[]; public installParams: ClientApplicationInstallParams | null; public integrationTypesConfig: IntegrationTypesConfiguration | null; public customInstallURL: string | null; public owner: User | Team | null; public get partial(): boolean; public interactionsEndpointURL: string | null; public eventWebhooksURL: string | null; public eventWebhooksStatus: ApplicationWebhookEventStatus | null; public eventWebhooksTypes: ApplicationWebhookEventType[] | null; public roleConnectionsVerificationURL: string | null; public edit(options: ClientApplicationEditOptions): Promise<ClientApplication>; public fetch(): Promise<ClientApplication>; public fetchRoleConnectionMetadataRecords(): Promise<ApplicationRoleConnectionMetadata[]>; public fetchSKUs(): Promise<Collection<Snowflake, SKU>>; public editRoleConnectionMetadataRecords( records: readonly ApplicationRoleConnectionMetadataEditOptions[], ): Promise<ApplicationRoleConnectionMetadata[]>; } export class ClientPresence extends Presence { private constructor(client: Client<true>, data: RawPresenceData); private _parse(data: PresenceData): RawPresenceData; public set(presence: PresenceData): ClientPresence; } export class ClientUser extends User { public mfaEnabled: boolean; public get presence(): ClientPresence; public verified: boolean; public edit(options: ClientUserEditOptions): Promise<this>; public setActivity(options?: ActivityOptions): ClientPresence; public setActivity(name: string, options?: Omit<ActivityOptions, 'name'>): ClientPresence; public setAFK(afk?: boolean, shardId?: number | readonly number[]): ClientPresence; public setAvatar(avatar: BufferResolvable | Base64Resolvable | null): Promise<this>; public setBanner(banner: BufferResolvable | Base64Resolvable | null): Promise<this>; public setPresence(data: PresenceData): ClientPresence; public setStatus(status: PresenceStatusData, shardId?: number | readonly number[]): ClientPresence; public setUsername(username: string): Promise<this>; } export class Options extends null { private constructor(); private static userAgentAppendix: string; public static get DefaultMakeCacheSettings(): CacheWithLimitsOptions; public static get DefaultSweeperSettings(): SweeperOptions; public static createDefault(): ClientOptions; public static cacheWithLimits(settings?: CacheWithLimitsOptions): CacheFactory; public static cacheEverything(): CacheFactory; } export class ClientVoiceManager { private constructor(client: Client); public readonly client: Client; public adapters: Map<Snowflake, InternalDiscordGatewayAdapterLibraryMethods>; } export type ComponentInContainer = | ActionRow<MessageActionRowComponent> | FileComponent | MediaGalleryComponent | SectionComponent | SeparatorComponent | TextDisplayComponent; export type ComponentInContainerData = | ActionRowData<ActionRowComponentData> | FileComponentData | MediaGalleryComponentData | SectionComponentData | SeparatorComponentData | TextDisplayComponentData; export interface ContainerComponentData< ComponentType extends JSONEncodable<APIComponentInContainer> | ComponentInContainerData = | JSONEncodable<APIComponentInContainer> | ComponentInContainerData, > extends BaseComponentData { components: readonly ComponentType[]; accentColor?: number; spoiler?: boolean; } export class ContainerComponent extends Component<APIContainerComponent> { private constructor(data: APIContainerComponent); public get accentColor(): number; public get hexAccentColor(): HexColorString; public get spoiler(): boolean; public readonly components: ComponentInContainer[]; } export { Collection, ReadonlyCollection } from '@discordjs/collection'; export interface CollectorEventTypes<Key, Value, Extras extends unknown[] = []> { collect: [Value, ...Extras]; ignore: [Value, ...Extras]; dispose: [Value, ...Extras]; end: [collected: ReadonlyCollection<Key, Value>, reason: string]; } export abstract class Collector<Key, Value, Extras extends unknown[] = []> extends EventEmitter { protected constructor(client: Client<true>, options?: CollectorOptions<[Value, ...Extras]>); private _timeout: NodeJS.Timeout | null; private _idletimeout: NodeJS.Timeout | null; private _endReason: string | null; public readonly client: Client; public collected: Collection<Key, Value>; public lastCollectedTimestamp: number | null; public get lastCollectedAt(): Date | null; public ended: boolean; public get endReason(): string | null; public filter: CollectorFilter<[Value, ...Extras]>; public get next(): Promise<Value>; public options: CollectorOptions<[Value, ...Extras]>; public checkEnd(): boolean; public handleCollect(...args: unknown[]): Promise<void>; public handleDispose(...args: unknown[]): Promise<void>; public stop(reason?: string): void; public resetTimer(options?: CollectorResetTimerOptions): void; public [Symbol.asyncIterator](): AsyncIterableIterator<[Value, ...Extras]>; public toJSON(): unknown; protected listener: (...args: any[]) => void; public abstract collect(...args: unknown[]): Awaitable<Key | null>; public abstract dispose(...args: unknown[]): Key | null; public on<EventKey extends keyof CollectorEventTypes<Key, Value, Extras>>( event: EventKey, listener: (...args: CollectorEventTypes<Key, Value, Extras>[EventKey]) => void, ): this; public once<EventKey extends keyof CollectorEventTypes<Key, Value, Extras>>( event: EventKey, listener: (...args: CollectorEventTypes<Key, Value, Extras>[EventKey]) => void, ): this; } export class ChatInputCommandInteraction<Cached extends CacheType = CacheType> extends CommandInteraction<Cached> { public commandType: ApplicationCommandType.ChatInput; public options: Omit<CommandInteractionOptionResolver<Cached>, 'getMessage' | 'getFocused'>; public inGuild(): this is ChatInputCommandInteraction<'raw' | 'cached'>; public inCachedGuild(): this is ChatInputCommandInteraction<'cached'>; public inRawGuild(): this is ChatInputCommandInteraction<'raw'>; public toString(): string; } export class AutocompleteInteraction<Cached extends CacheType = CacheType> extends BaseInteraction<Cached> { public type: InteractionType.ApplicationCommandAutocomplete; public get command(): ApplicationCommand | ApplicationCommand<{ guild: GuildResolvable }> | null; public channelId: Snowflake; public commandId: Snowflake; public commandName: string; public commandType: ApplicationCommandType.ChatInput; public commandGuildId: Snowflake | null; public responded: boolean; public options: Omit< CommandInteractionOptionResolver<Cached>, 'getMessage' | 'getUser' | 'getAttachment' | 'getChannel' | 'getMember' | 'getMentionable' | 'getRole' >; public inGuild(): this is AutocompleteInteraction<'raw' | 'cached'>; public inCachedGuild(): this is AutocompleteInteraction<'cached'>; public inRawGuild(): this is AutocompleteInteraction<'raw'>; public respond(options: readonly ApplicationCommandOptionChoiceData[]): Promise<void>; } export class CommandInteractionOptionResolver<Cached extends CacheType = CacheType> { private constructor( client: Client<true>, options: readonly CommandInteractionOption[], resolved: CommandInteractionResolvedData, ); public readonly client: Client; public readonly data: readonly CommandInteractionOption<Cached>[]; public readonly resolved: Readonly<CommandInteractionResolvedData<Cached>> | null; private _group: string | null; private _hoistedOptions: CommandInteractionOption<Cached>[]; private _subcommand: string | null; private _getTypedOption( name: string, allowedTypes: readonly ApplicationCommandOptionType[], properties: readonly (keyof ApplicationCommandOption)[], required: true, ): CommandInteractionOption<Cached>; private _getTypedOption( name: string, allowedTypes: readonly ApplicationCommandOptionType[], properties: readonly (keyof ApplicationCommandOption)[], required: boolean, ): CommandInteractionOption<Cached> | null; public get(name: string, required: true): CommandInteractionOption<Cached>; public get(name: string, required?: boolean): CommandInteractionOption<Cached> | null; public getSubcommand(required?: true): string; public getSubcommand(required: boolean): string | null; public getSubcommandGroup(required: true): string; public getSubcommandGroup(required?: boolean): string | null; public getBoolean(name: string, required: true): boolean; public getBoolean(name: string, required?: boolean): boolean | null; /** * @privateRemarks * The ternary in the return type is required. * The `type` property of the {@link PublicThreadChannel} interface is typed as `ChannelType.PublicThread | ChannelType.AnnouncementThread`. * If the user were to pass only one of those channel types, the `Extract<>` would resolve to `never`. */ public getChannel<const Type extends ChannelType = ChannelType>( name: string, required: true, channelTypes?: readonly Type[], ): Extract< NonNullable<CommandInteractionOption<Cached>['channel']>, { type: Type extends ChannelType.PublicThread | ChannelType.AnnouncementThread ? ChannelType.PublicThread | ChannelType.AnnouncementThread : Type; } >; /** * @privateRemarks * The ternary in the return type is required. * The `type` property of the {@link PublicThreadChannel} interface is typed as `ChannelType.PublicThread | ChannelType.AnnouncementThread`. * If the user were to pass only one of those channel types, the `Extract<>` would resolve to `never`. */ public getChannel<const Type extends ChannelType = ChannelType>( name: string, required?: boolean, channelTypes?: readonly Type[], ): Extract< NonNullable<CommandInteractionOption<Cached>['channel']>, { type: Type extends ChannelType.PublicThread | ChannelType.AnnouncementThread ? ChannelType.PublicThread | ChannelType.AnnouncementThread : Type; } > | null; public getString(name: string, required: true): string; public getString(name: string, required?: boolean): string | null; public getInteger(name: string, required: true): number; public getInteger(name: string, required?: boolean): number | null; public getNumber(name: string, required: true): number; public getNumber(name: string, required?: boolean): number | null; public getUser(name: string, required: true): NonNullable<CommandInteractionOption<Cached>['user']>; public getUser(name: string, required?: boolean): NonNullable<CommandInteractionOption<Cached>['user']> | null; public getMember(name: string): NonNullable<CommandInteractionOption<Cached>['member']> | null; public getRole(name: string, required: true): NonNullable<CommandInteractionOption<Cached>['role']>; public getRole(name: string, required?: boolean): NonNullable<CommandInteractionOption<Cached>['role']> | null; public getAttachment(name: string, required: true): NonNullable<CommandInteractionOption<Cached>['attachment']>; public getAttachment( name: string, required?: boolean, ): NonNullable<CommandInteractionOption<Cached>['attachment']> | null; public getMentionable( name: string, required: true, ): NonNullable<CommandInteractionOption<Cached>['member' | 'role' | 'user']>; public getMentionable( name: string, required?: boolean, ): NonNullable<CommandInteractionOption<Cached>['member' | 'role' | 'user']> | null; public getMessage(name: string, required: true): NonNullable<CommandInteractionOption<Cached>['message']>; public getMessage(name: string, required?: boolean): NonNullable<CommandInteractionOption<Cached>['message']> | null; public getFocused(getFull: true): AutocompleteFocusedOption; public getFocused(getFull?: boolean): string; } export class ContextMenuCommandInteraction<Cached extends CacheType = CacheType> extends CommandInteraction<Cached> { public options: Omit< CommandInteractionOptionResolver<Cached>, | 'getMessage' | 'getFocused' | 'getMentionable' | 'getRole' | 'getUser' | 'getMember' | 'getAttachment' | 'getNumber' | 'getInteger' | 'getString' | 'getChannel' | 'getBoolean' | 'getSubcommandGroup' | 'getSubcommand' >; public commandType: ApplicationCommandType.Message | ApplicationCommandType.User; public targetId: Snowflake; public inGuild(): this is ContextMenuCommandInteraction<'raw' | 'cached'>; public inCachedGuild(): this is ContextMenuCommandInteraction<'cached'>; public inRawGuild(): this is ContextMenuCommandInteraction<'raw'>; private resolveContextMenuOptions(data: APIApplicationCommandInteractionData): CommandInteractionOption<Cached>[]; } export class PrimaryEntryPointCommandInteraction< Cached extends CacheType = CacheType, > extends CommandInteraction<Cached> { public commandType: ApplicationCommandType.PrimaryEntryPoint; public inGuild(): this is PrimaryEntryPointCommandInteraction<'raw' | 'cached'>; public inCachedGuild(): this is PrimaryEntryPointCommandInteraction<'cached'>; public inRawGuild(): this is PrimaryEntryPointCommandInteraction<'raw'>; } // tslint:disable-next-line no-empty-interface export interface DMChannel extends Omit< TextBasedChannelFields<false, true>, 'bulkDelete' | 'fetchWebhooks' | 'createWebhook' | 'setRateLimitPerUser' | 'setNSFW' > {} export class DMChannel extends BaseChannel { private constructor(client: Client<true>, data?: RawDMChannelData); public flags: Readonly<ChannelFlagsBitField>; public recipientId: Snowflake; public get recipient(): User | null; public type: ChannelType.DM; public fetch(force?: boolean): Promise<this>; public toString(): UserMention; } export class Emoji extends Base { protected constructor(client: Client<true>, emoji: RawEmojiData); public animated: boolean | null; public get createdAt(): Date | null; public get createdTimestamp(): number | null; public id: Snowflake | null; public name: string | null; public get identifier(): string; public imageURL(options?: BaseImageURLOptions): string | null; public get url(): string | null; public toJSON(): unknown; public toString(): string; } export interface ApplicationEmojiCreateOptions { attachment: BufferResolvable | Base64Resolvable; name: string; } export interface ApplicationEmojiEditOptions { name?: string; } export class ApplicationEmoji extends Emoji { private constructor(client: Client<true>, data: RawApplicationEmojiData, application: ClientApplication); public application: ClientApplication; public author: User | null; public id: Snowflake; public managed: boolean | null; public requiresColons: boolean | null; public delete(): Promise<ApplicationEmoji>; public edit(options: ApplicationEmojiEditOptions): Promise<ApplicationEmoji>; public equals(other: ApplicationEmoji | unknown): boolean; public fetchAuthor(): Promise<User>; public setName(name: string): Promise<ApplicationEmoji>; } export class ApplicationEmojiManager extends CachedManager<Snowflake, ApplicationEmoji, EmojiResolvable> { private constructor(application: ClientApplication, iterable?: Iterable<RawApplicationEmojiData>); public application: ClientApplication; public create(options: ApplicationEmojiCreateOptions): Promise<ApplicationEmoji>; public fetch(id: Snowflake, options?: BaseFetchOptions): Promise<ApplicationEmoji>; public fetch(id?: undefined, options?: BaseFetchOptions): Promise<Collection<Snowflake, ApplicationEmoji>>; public fetchAuthor(emoji: EmojiResolvable): Promise<User>; public delete(emoji: EmojiResolvable): Promise<void>; public edit(emoji: EmojiResolvable, options: ApplicationEmojiEditOptions): Promise<ApplicationEmoji>; } export class Entitlement extends Base { private constructor(client: Client<true>, data: APIEntitlement); public id: Snowflake; public skuId: Snowflake; public userId: Snowflake; public guildId: Snowflake | null; public applicationId: Snowflake; public type: EntitlementType; public consumed: boolean; public deleted: boolean; public startsTimestamp: number | null; public endsTimestamp: number | null; public get guild(): Guild | null; public get startsAt(): Date | null; public get endsAt(): Date | null; public consume(): Promise<void>; public fetchUser(): Promise<User>; public isActive(): boolean; public isTest(): this is this & { startsTimestamp: null; endsTimestamp: null; get startsAt(): null; get endsAt(): null; }; public isUserSubscription(): this is this & { guildId: null; get guild(): null }; public isGuildSubscription(): this is this & { guildId: Snowflake; guild: Guild }; } export class Guild extends AnonymousGuild { private constructor(client: Client<true>, data: RawGuildData); private _sortedRoles(): Collection<Snowflake, Role>; private _sortedChannels(channel: NonThreadGuildBasedChannel): Collection<Snowflake, NonThreadGuildBasedChannel>; public get afkChannel(): VoiceChannel | null; public afkChannelId: Snowflake | null; public afkTimeout: number; public applicationId: Snowflake | null; public maxVideoChannelUsers: number | null; public approximateMemberCount: number | null; public approximatePresenceCount: number | null; public autoModerationRules: AutoModerationRuleManager; public available: boolean; public bans: GuildBanManager; public channels: GuildChannelManager; public commands: GuildApplicationCommandManager; public defaultMessageNotifications: GuildDefaultMessageNotifications; public discoverySplash: string | null; public emojis: GuildEmojiManager; public explicitContentFilter: GuildExplicitContentFilter; public invites: GuildInviteManager; public get joinedAt(): Date; public joinedTimestamp: number; public large: boolean; public maximumMembers: number | null; public maximumPresences: number | null; public maxStageVideoChannelUsers: number | null; public memberCount: number; public members: GuildMemberManager; public mfaLevel: GuildMFALevel; public ownerId: Snowflake; public preferredLocale: Locale; public premiumProgressBarEnabled: boolean; public premiumTier: GuildPremiumTier; public presences: PresenceManager; public get publicUpdatesChannel(): TextChannel | null; public publicUpdatesChannelId: Snowflake | null; public roles: RoleManager; public get rulesChannel(): TextChannel | null; public rulesChannelId: Snowflake | null; public get safetyAlertsChannel(): TextChannel | null; public safetyAlertsChannelId: Snowflake | null; public scheduledEvents: GuildScheduledEventManager; public get shard(): WebSocketShard; public shardId: number; public soundboardSounds: GuildSoundboardSoundManager; public stageInstances: StageInstanceManager; public stickers: GuildStickerManager; public incidentsData: IncidentActions | null; public get systemChannel(): TextChannel | null; public systemChannelFlags: Readonly<SystemChannelFlagsBitField>; public systemChannelId: Snowflake | null; public vanityURLUses: number | null; public get voiceAdapterCreator(): InternalDiscordGatewayAdapterCreator; public voiceStates: VoiceStateManager; public get widgetChannel(): TextChannel | NewsChannel | VoiceBasedChannel | ForumChannel | MediaChannel | null; public widgetChannelId: Snowflake | null; public widgetEnabled: boolean | null; public get maximumBitrate(): number; public createTemplate(name: string, description?: string): Promise<GuildTemplate>; public delete(): Promise<Guild>; public discoverySplashURL(options?: ImageURLOptions): string | null; public edit(options: GuildEditOptions): Promise<Guild>; public editOnboarding(options: GuildOnboardingEditOptions): Promise<GuildOnboarding>; public editWelcomeScreen(options: WelcomeScreenEditOptions): Promise<WelcomeScreen>; public equals(guild: Guild): boolean; public fetchAuditLogs<Event extends GuildAuditLogsResolvable = AuditLogEvent>( options?: GuildAuditLogsFetchOptions<Event>, ): Promise<GuildAuditLogs<Event extends null ? AuditLogEvent : Event>>; public fetchIntegrations(): Promise<Collection<Snowflake | string, Integration>>; public fetchOnboarding(): Promise<GuildOnboarding>; public fetchOwner(options?: BaseFetchOptions): Promise<GuildMember>; public fetchPreview(): Promise<GuildPreview>; public fetchTemplates(): Promise<Collection<GuildTemplate['code'], GuildTemplate>>; public fetchVanityData(): Promise<Vanity>; public fetchWebhooks(): Promise<Collection<Snowflake, Webhook<WebhookType.ChannelFollower | WebhookType.Incoming>>>; public fetchWelcomeScreen(): Promise<WelcomeScreen>; public fetchWidget(): Promise<Widget>; public fetchWidgetSettings(): Promise<GuildWidgetSettings>; public widgetImageURL(style?: GuildWidgetStyle): string; public leave(): Promise<Guild>; public disableInvites(disabled?: boolean): Promise<Guild>; public setIncidentActions(incidentActions: IncidentActionsEditOptions): Promise<IncidentActions>; public setAFKChannel(afkChannel: VoiceChannelResolvable | null, reason?: string): Promise<Guild>; public setAFKTimeout(afkTimeout: number, reason?: string): Promise<Guild>; public setBanner(banner: BufferResolvable | Base64Resolvable | null, reason?: string): Promise<Guild>; public setDefaultMessageNotifications( defaultMessageNotifications: GuildDefaultMessageNotifications | null, reason?: string, ): Promise<Guild>; public setDiscoverySplash( discoverySplash: BufferResolvable | Base64Resolvable | null, reason?: string, ): Promise<Guild>; public setExplicitContentFilter( explicitContentFilter: GuildExplicitContentFilter | null, reason?: string, ): Promise<Guild>; public setIcon(icon: BufferResolvable | Base64Resolvable | null, reason?: string): Promise<Guild>; public setName(name: string, reason?: string): Promise<Guild>; public setOwner(owner: GuildMemberResolvable, reason?: string): Promise<Guild>; public setPreferredLocale(preferredLocale: Locale | null, reason?: string): Promise<Guild>; public setPublicUpdatesChannel(publicUpdatesChannel: TextChannelResolvable | null, reason?: string): Promise<Guild>; public setRulesChannel(rulesChannel: TextChannelResolvable | null, reason?: string): Promise<Guild>; public setSafetyAlertsChannel(safetyAlertsChannel: TextChannelResolvable | null, reason?: string): Promise<Guild>; public setSplash(splash: BufferResolvable | Base64Resolvable | null, reason?: string): Promise<Guild>; public setSystemChannel(systemChannel: TextChannelResolvable | null, reason?: string): Promise<Guild>; public setSystemChannelFlags(systemChannelFlags: SystemChannelFlagsResolvable, reason?: string): Promise<Guild>; public setVerificationLevel(verificationLevel: GuildVerificationLevel | null, reason?: string): Promise<Guild>; public setPremiumProgressBarEnabled(enabled?: boolean, reason?: string): Promise<Guild>; public setWidgetSettings(settings: GuildWidgetSettingsData, reason?: string): Promise<Guild>; public setMFALevel(level: GuildMFALevel, reason?: string): Promise<Guild>; public toJSON(): unknown; } export interface FileComponentData extends BaseComponentData { file: UnfurledMediaItemData; spoiler?: boolean; } export class FileComponent extends Component<APIFileComponent> { private constructor(data: APIFileComponent); public readonly file: UnfurledMediaItem; public get spoiler(): boolean; } export class GuildAuditLogs<Event extends AuditLogEvent = AuditLogEvent> { private constructor(guild: Guild, data: RawGuildAuditLogData); private applicationCommands: Collection<Snowflake, ApplicationCommand>; private webhooks: Collection<Snowflake, Webhook<WebhookType.ChannelFollower | WebhookType.Incoming>>; private integrations: Collection<Snowflake | string, Integration>; private guildScheduledEvents: Collection<Snowflake, GuildScheduledEvent>; private autoModerationRules: Collection<Snowflake, AutoModerationRule>; public entries: Collection<Snowflake, GuildAuditLogsEntry<Event>>; public toJSON(): unknown; } export class GuildAuditLogsEntry< TAction extends AuditLogEvent = AuditLogEvent, TActionType extends GuildAuditLogsActionType = TAction extends keyof GuildAuditLogsTypes ? GuildAuditLogsTypes[TAction][1] : 'All', TTargetType extends GuildAuditLogsTargetType = TAction extends keyof GuildAuditLogsTypes ? GuildAuditLogsTypes[TAction][0] : 'Unknown', > { private constructor(guild: Guild, data: RawGuildAuditLogEntryData, logs?: GuildAuditLogs); public static Targets: GuildAuditLogsTargets; public action: TAction; public actionType: TActionType; public changes: AuditLogChange[]; public get createdAt(): Date; public get createdTimestamp(): number; public executorId: Snowflake | null; public executor: User | PartialUser | null; public extra: TAction extends keyof GuildAuditLogsEntryExtraField ? GuildAuditLogsEntryExtraField[TAction] : null; public id: Snowflake; public reason: string | null; public targetId: Snowflake | null; public target: TTargetType extends keyof GuildAuditLogsEntryTargetField<TAction> ? GuildAuditLogsEntryTargetField<TAction>[TTargetType] : { id: Snowflake | undefined; [x: string]: unknown } | null; public targetType: TTargetType; public static actionType(action: AuditLogEvent): GuildAuditLogsActionType; public static targetType(target: AuditLogEvent): GuildAuditLogsTargetType; public toJSON(): unknown; } export class GuildBan extends Base { private constructor(client: Client<true>, data: RawGuildBanData, guild: Guild); public guild: Guild; public user: User; public get partial(): boolean; public reason?: string | null; public fetch(force?: boolean): Promise<GuildBan>; } export abstract class GuildChannel extends BaseChannel { public constructor(guild: Guild, data?: RawGuildChannelData, client?: Client<true>, immediatePatch?: boolean); private memberPermissions(member: GuildMember, checkAdmin: boolean): Readonly<PermissionsBitField>; private rolePermissions(role: Role, checkAdmin: boolean): Readonly<PermissionsBitField>; public get createdAt(): Date; public get createdTimestamp(): number; public get deletable(): boolean; public flags: Readonly<ChannelFlagsBitField>; public guild: Guild; public guildId: Snowflake; public get manageable(): boolean; public get members(): Collection<Snowflake, GuildMember>; public name: string; public get parent(): CategoryChannel | null; public parentId: Snowflake | null; public permissionOverwrites: PermissionOverwriteManager; public get permissionsLocked(): boolean | null; public get position(): number; public rawPosition: number; public type: GuildChannelTypes; public get viewable(): boolean; public clone(options?: GuildChannelCloneOptions): Promise<this>; public delete(reason?: string): Promise<this>; public edit(options: GuildChannelEditOptions): Promise<this>; public equals(channel: GuildChannel): boolean; public lockPermissions(): Promise<this>; public permissionsFor(memberOrRole: GuildMember | Role, checkAdmin?: boolean): Readonly<PermissionsBitField>; public permissionsFor( memberOrRole: GuildMemberResolvable | RoleResolvable, checkAdmin?: boolean, ): Readonly<PermissionsBitField> | null; public setName(name: string, reason?: string): Promise<this>; public setParent(channel: CategoryChannelResolvable | null, options?: SetParentOptions): Promise<this>; public setPosition(position: number, options?: SetChannelPositionOptions): Promise<this>; public isTextBased(): this is GuildBasedChannel & TextBasedChannel; public toString(): ChannelMention; } export class GuildEmoji extends BaseGuildEmoji { private constructor(client: Client<true>, data: RawGuildEmojiData, guild: Guild); private _roles: Snowflake[]; public get deletable(): boolean; public guild: Guild; public author: User | null; public get roles(): GuildEmojiRoleManager; public delete(reason?: string): Promise<GuildEmoji>; public edit(options: GuildEmojiEditOptions): Promise<GuildEmoji>; public equals(other: GuildEmoji | unknown): boolean; public fetchAuthor(): Promise<User>; public setName(name: string, reason?: string): Promise<GuildEmoji>; } export type GuildMemberFlagsString = keyof typeof GuildMemberFlags; export type GuildMemberFlagsResolvable = BitFieldResolvable<GuildMemberFlagsString, number>; export class GuildMemberFlagsBitField extends BitField<GuildMemberFlagsString> { public static Flags: GuildMemberFlags; public static resolve(bit?: BitFieldResolvable<GuildMemberFlagsString, GuildMemberFlags>): number; } export interface GuildMember extends PartialTextBasedChannelFields<false> {} export class GuildMember extends Base { private constructor(client: Client<true>, data: RawGuildMemberData, guild: Guild); private _roles: Snowflake[]; public avatar: string | null; public avatarDecorationData: AvatarDecorationData | null; public banner: string | null; public get bannable(): boolean; public get dmChannel(): DMChannel | null; public get displayColor(): number; public get displayHexColor(): HexColorString; public get displayName(): string; public guild: Guild; public get id(): Snowflake; public pending: boolean; public get communicationDisabledUntil(): Date | null; public communicationDisabledUntilTimestamp: number | null; public flags: Readonly<GuildMemberFlagsBitField>; public get joinedAt(): Date | null; public joinedTimestamp: number | null; public get kickable(): boolean; public get manageable(): boolean; public get moderatable(): boolean; public nickname: string | null; public get partial(): false; public get permissions(): Readonly<PermissionsBitField>; public get premiumSince(): Date | null; public premiumSinceTimestamp: number | null; public get presence(): Presence | null; public get roles(): GuildMemberRoleManager; public user: User; public get voice(): VoiceState; public avatarURL(options?: ImageURLOptions): string | null; public avatarDecorationURL(): string | null; public bannerURL(options?: ImageURLOptions): string | null; public ban(options?: BanOptions): Promise<GuildMember>; public disableCommunicationUntil(timeout: DateResolvable | null, reason?: string): Promise<GuildMember>; public timeout(timeout: number | null, reason?: string): Promise<GuildMember>; public fetch(force?: boolean): Promise<GuildMember>; public createDM(force?: boolean): Promise<DMChannel>; public deleteDM(): Promise<DMChannel>; public displayAvatarURL(options?: ImageURLOptions): string; public displayBannerURL(options?: ImageURLOptions): string | null; public displayAvatarDecorationURL(): string | null; public edit(options: GuildMemberEditOptions): Promise<GuildMember>; public isCommunicationDisabled(): this is GuildMember & { communicationDisabledUntilTimestamp: number; readonly communicationDisabledUntil: Date; }; public kick(reason?: string): Promise<GuildMember>; public permissionsIn(channel: GuildChannelResolvable): Readonly<PermissionsBitField>; public setFlags(flags: GuildMemberFlagsResolvable, reason?: string): Promise<GuildMember>; public setNickname(nickname: string | null, reason?: string): Promise<GuildMember>; public toJSON(): unknown; public toString(): UserMention; public valueOf(): string; } export class GuildOnboarding extends Base { private constructor(client: Client, data: RESTGetAPIGuildOnboardingResult); public get guild(): Guild; public guildId: Snowflake; public prompts: Collection<Snowflake, GuildOnboardingPrompt>; public defaultChannels: Collection<Snowflake, GuildChannel>; public enabled: boolean; public mode: GuildOnboardingMode; } export class GuildOnboardingPrompt extends Base { private constructor(client: Client, data: APIGuildOnboardingPrompt, guildId: Snowflake); public id: Snowflake; public get guild(): Guild; public guildId: Snowflake; public options: Collection<Snowflake, GuildOnboardingPromptOption>; public title: string; public singleSelect: boolean; public required: boolean; public inOnboarding: boolean; public type: GuildOnboardingPromptType; } export class GuildOnboardingPromptOption extends Base { private constructor(client: Client, data: APIGuildOnboardingPromptOption, guildId: Snowflake); private _emoji: APIPartialEmoji; public id: Snowflake; public get emoji(): Emoji | GuildEmoji | null; public get guild(): Guild; public guildId: Snowflake; public channels: Collection<Snowflake, GuildChannel>; public roles: Collection<Snowflake, Role>; public title: string; public description: string | null; } export class GuildPreview extends Base { private constructor(client: Client<true>, data: RawGuildPreviewData); public approximateMemberCount: number; public approximatePresenceCount: number; public get createdAt(): Date; public get createdTimestamp(): number; public description: string | null; public discoverySplash: string | null; public emojis: Collection<Snowflake, GuildPreviewEmoji>; public stickers: Collection<Snowflake, Sticker>; public features: `${GuildFeature}`[]; public icon: string | null; public id: Snowflake; public name: string; public splash: string | null; public discoverySplashURL(options?: ImageURLOptions): string | null; public iconURL(options?: ImageURLOptions): string | null; public splashURL(options?: ImageURLOptions): string | null; public fetch(): Promise<GuildPreview>; public toJSON(): unknown; public toString(): string; } export class GuildScheduledEvent<Status extends GuildScheduledEventStatus = GuildScheduledEventStatus> extends Base { private constructor(client: Client<true>, data: RawGuildScheduledEventData); public id: Snowflake; public guildId: Snowflake; public channelId: Snowflake | null; public creatorId: Snowflake | null; public name: string; public description: string | null; public scheduledStartTimestamp: number | null; public scheduledEndTimestamp: number | null; public privacyLevel: GuildScheduledEventPrivacyLevel; public status: Status; public entityType: GuildScheduledEventEntityType; public entityId: Snowflake | null; public entityMetadata: GuildScheduledEventEntityMetadata | null; public userCount: number | null; public creator: User | null; public recurrenceRule: GuildScheduledEventRecurrenceRule | null; public get createdTimestamp(): number; public get createdAt(): Date; public get scheduledStartAt(): Date | null; public get scheduledEndAt(): Date | null; public get channel(): VoiceChannel | StageChannel | null; public get guild(): Guild | null; public get url(): string; public image: string | null; public get partial(): false; public coverImageURL(options?: Readonly<BaseImageURLOptions>): string | null; public createInviteURL(options?: GuildScheduledEventInviteURLCreateOptions): Promise<string>; public edit<AcceptableStatus extends GuildScheduledEventSetStatusArg<Status>>( options: GuildScheduledEventEditOptions<Status, AcceptableStatus>, ): Promise<GuildScheduledEvent<AcceptableStatus>>; public fetch(force?: boolean): Promise<GuildScheduledEvent<Status>>; public delete(): Promise<GuildScheduledEvent<Status>>; public setName(name: string, reason?: string): Promise<GuildScheduledEvent<Status>>; public setScheduledStartTime( scheduledStartTime: DateResolvable, reason?: string, ): Promise<GuildScheduledEvent<Status>>; public setScheduledEndTime(scheduledEndTime: DateResolvable, reason?: string): Promise<GuildScheduledEvent<Status>>; public setDescription(description: string, reason?: string): Promise<GuildScheduledEvent<Status>>; public setStatus<AcceptableStatus extends GuildScheduledEventSetStatusArg<Status>>( status: AcceptableStatus, reason?: string, ): Promise<GuildScheduledEvent<AcceptableStatus>>; public setLocation(location: string, reason?: string): Promise<GuildScheduledEvent<Status>>; public fetchSubscribers<Options extends FetchGuildScheduledEventSubscribersOptions>( options?: Options, ): Promise<GuildScheduledEventManagerFetchSubscribersResult<Options>>; public toString(): string; public isActive(): this is GuildScheduledEvent<GuildScheduledEventStatus.Active>; public isCanceled(): this is GuildScheduledEvent<GuildScheduledEventStatus.Canceled>; public isCompleted(): this is GuildScheduledEvent<GuildScheduledEventStatus.Completed>; public isScheduled(): this is GuildScheduledEvent<GuildScheduledEventStatus.Scheduled>; } export interface GuildScheduledEventRecurrenceRule { startTimestamp: number; get startAt(): Date; endTimestamp: number | null; get endAt(): Date | null; frequency: GuildScheduledEventRecurrenceRuleFrequency; interval: number; byWeekday: readonly GuildScheduledEventRecurrenceRuleWeekday[] | null; byNWeekday: readonly GuildScheduledEventRecurrenceRuleNWeekday[] | null; byMonth: readonly GuildScheduledEventRecurrenceRuleMonth[] | null; byMonthDay: readonly number[] | null; byYearDay: readonly number[] | null; count: number | null; } export interface GuildScheduledEventRecurrenceRuleNWeekday { n: number; day: GuildScheduledEventRecurrenceRuleWeekday; } export class GuildTemplate extends Base { private constructor(client: Client<true>, data: RawGuildTemplateData); public createdTimestamp: number; public updatedTimestamp: number; public get url(): string; public code: string; public name: string; public description: string | null; public usageCount: number; public creator: User; public creatorId: Snowflake; public get createdAt(): Date; public get updatedAt(): Date; public get guild(): Guild | null; public guildId: Snowflake; public serializedGuild: APITemplateSerializedSourceGuild; public unSynced: boolean | null; public createGuild(name: string, icon?: BufferResolvable | Base64Resolvable): Promise<Guild>; public delete(): Promise<GuildTemplate>; public edit(options?: GuildTemplateEditOptions): Promise<GuildTemplate>; public sync(): Promise<GuildTemplate>; public static GuildTemplatesPattern: RegExp; } export class GuildPreviewEmoji extends BaseGuildEmoji { private constructor(client: Client<true>, data: RawGuildEmojiData, guild: GuildPreview); public guild: GuildPreview; public roles: Snowflake[]; } export class Integration extends Base { private constructor(client: Client<true>, data: RawIntegrationData, guild: Guild); public account: IntegrationAccount; public application: IntegrationApplication | null; public enabled: boolean | null; public expireBehavior: IntegrationExpireBehavior | null; public expireGracePeriod: number | null; public guild: Guild; public id: Snowflake | string; public name: string; public role: Role | null; public enableEmoticons: boolean | null; public get roles(): Collection<Snowflake, Role>; public scopes: OAuth2Scopes[]; public get syncedAt(): Date | null; public syncedTimestamp: number | null; public syncing: boolean | null; public type: IntegrationType; public user: User | null; public subscriberCount: number | null; public revoked: boolean | null; public delete(reason?: string): Promise<Integration>; } export class IntegrationApplication extends Application { private constructor(client: Client<true>, data: RawIntegrationApplicationData); public bot: User | null; public termsOfServiceURL: string | null; public privacyPolicyURL: string | null; public rpcOrigins: string[]; public hook: boolean | null; public cover: string | null; public verifyKey: string | null; } export type GatewayIntentsString = keyof typeof GatewayIntentBits; export class IntentsBitField extends BitField<GatewayIntentsString> { public static Flags: typeof GatewayIntentBits; public static resolve(bit?: BitFieldResolvable<GatewayIntentsString, number>): number; } export type CacheType = 'cached' | 'raw' | undefined; export type CacheTypeReducer< State extends CacheType, CachedType, RawType = CachedType, PresentType = CachedType | RawType, Fallback = PresentType | null, > = [State] extends ['cached'] ? CachedType : [State] extends ['raw'] ? RawType : [State] extends ['raw' | 'cached'] ? PresentType : Fallback; export type Interaction<Cached extends CacheType = CacheType> = | ChatInputCommandInteraction<Cached> | MessageContextMenuCommandInteraction<Cached> | UserContextMenuCommandInteraction<Cached> | PrimaryEntryPointCommandInteraction<Cached> | AnySelectMenuInteraction<Cached> | ButtonInteraction<Cached> | AutocompleteInteraction<Cached> | ModalSubmitInteraction<Cached>; export type RepliableInteraction<Cached extends CacheType = CacheType> = Exclude< Interaction<Cached>, AutocompleteInteraction<Cached> >; export class BaseInteraction<Cached extends CacheType = CacheType> extends Base { // This a technique used to brand different cached types. Or else we'll get `never` errors on typeguard checks. private readonly _cacheType: Cached; protected constructor(client: Client<true>, data: RawInteractionData); public applicationId: Snowflake; public authorizingIntegrationOwners: APIAuthorizingIntegrationOwnersMap; public get channel(): CacheTypeReducer< Cached, GuildTextBasedChannel | null, GuildTextBasedChannel | null, GuildTextBasedChannel | null, TextBasedChannel | null >; public channelId: Snowflake | null; public context: InteractionContextType | null; public get createdAt(): Date; public get createdTimestamp(): number; public get guild(): CacheTypeReducer<Cached, Guild, null>; public guildId: CacheTypeReducer<Cached, Snowflake>; public id: Snowflake; public member: CacheTypeReducer<Cached, GuildMember, APIInteractionGuildMember>; public readonly token: string; public type: InteractionType; public user: User; public version: number; public appPermissions: Readonly<PermissionsBitField>; public memberPermissions: CacheTypeReducer<Cached, Readonly<PermissionsBitField>>; public locale: Locale; public guildLocale: CacheTypeReducer<Cached, Locale>; public entitlements: Collection<Snowflake, Entitlement>; public attachmentSizeLimit: number; public inGuild(): this is BaseInteraction<'raw' | 'cached'>; public inCachedGuild(): this is BaseInteraction<'cached'>; public inRawGuild(): this is BaseInteraction<'raw'>; public isButton(): this is ButtonInteraction<Cached>; public isAutocomplete(): this is AutocompleteInteraction<Cached>; public isChatInputCommand(): this is ChatInputCommandInteraction<Cached>; public isCommand(): this is CommandInteraction<Cached>; public isContextMenuCommand(): this is ContextMenuCommandInteraction<Cached>; public isPrimaryEntryPointCommand(): this is PrimaryEntryPointCommandInteraction<Cached>; public isMessageComponent(): this is MessageComponentInteraction<Cached>; public isMessageContextMenuCommand(): this is MessageContextMenuCommandInteraction<Cached>; public isModalSubmit(): this is ModalSubmitInteraction<Cached>; public isUserContextMenuCommand(): this is UserContextMenuCommandInteraction<Cached>; /** @deprecated Use {@link BaseInteraction.isStringSelectMenu} instead. */ public isSelectMenu(): this is StringSelectMenuInteraction<Cached>; public isAnySelectMenu(): this is AnySelectMenuInteraction<Cached>; public isStringSelectMenu(): this is StringSelectMenuInteraction<Cached>; public isUserSelectMenu(): this is UserSelectMenuInteraction<Cached>; public isRoleSelectMenu(): this is RoleSelectMenuInteraction<Cached>; public isMentionableSelectMenu(): this is MentionableSelectMenuInteraction<Cached>; public isChannelSelectMenu(): this is ChannelSelectMenuInteraction<Cached>; public isRepliable(): this is RepliableInteraction<Cached>; } export class InteractionCallback { private constructor(client: Client<true>, data: RESTAPIInteractionCallbackObject); public activityInstanceId: string | null; public readonly client: Client<true>; public get createdAt(): Date; public get createdTimestamp(): number; public id: Snowflake; public responseMessageEphemeral: boolean | null; public responseMessageId: Snowflake | null; public responseMessageLoading: boolean | null; public type: InteractionType; } export class InteractionCallbackResponse { private constructor(client: Client<true>, data: RESTPostAPIInteractionCallbackWithResponseResult); public readonly client: Client<true>; public interaction: InteractionCallback; public resource: InteractionCallbackResource | null; } export class InteractionCallbackResource { private constructor(client: Client<true>, data: RESTAPIInteractionCallbackResourceObject); public activityInstance: RESTAPIInteractionCallbackActivityInstanceResource | null; public message: Message | null; public type: InteractionResponseType; } export class InteractionCollector<Interaction extends CollectedInteraction> extends Collector< Snowflake, Interaction, [Collection<Snowflake, Interaction>] > { public constructor(client: Client<true>, options?: InteractionCollectorOptions<Interaction>); private _handleMessageDeletion(message: Message): void; private _handleChannelDeletion(channel: NonThreadGuildBasedChannel): void; private _handleGuildDeletion(guild: Guild): void; public channelId: Snowflake | null; public messageInteractionId: Snowflake | null; public componentType: ComponentType | null; public guildId: Snowflake | null; public interactionType: InteractionType | null; public messageId: Snowflake | null; public options: InteractionCollectorOptions<Interaction>; public total: number; public users: Collection<Snowflake, User>; public collect(interaction: Interaction): Snowflake; public empty(): void; public dispose(interaction: Interaction): Snowflake; public on(event: 'collect' | 'dispose' | 'ignore', listener: (interaction: Interaction) => void): this; public on( event: 'end', listener: (collected: ReadonlyCollection<Snowflake, Interaction>, reason: string) => void, ): this; public on(event: string, listener: (...args: any[]) => void): this; public once(event: 'collect' | 'dispose' | 'ignore', listener: (interaction: Interaction) => void): this; public once( event: 'end', listener: (collected: ReadonlyCollection<Snowflake, Interaction>, reason: string) => void, ): this; public once(event: string, listener: (...args: any[]) => void): this; } // tslint:disable-next-line no-empty-interface export interface InteractionWebhook extends PartialWebhookFields {} export class InteractionWebhook { public constructor(client: Client<true>, id: Snowflake, token: string); public readonly client: Client<true>; public token: string; public send(options: string | MessagePayload | InteractionReplyOptions): Promise<Message>; public editMessage( message: MessageResolvable | '@original', options: string | MessagePayload | WebhookMessageEditOptions, ): Promise<Message>; public fetchMessage(message: Snowflake | '@original'): Promise<Message>; } export class Invite extends Base { private constructor(client: Client<true>, data: RawInviteData); public channel: NonThreadGuildBasedChannel | PartialGroupDMChannel | null; public channelId: Snowflake | null; public code: string; public get deletable(): boolean; public get createdAt(): Date | null; public createdTimestamp: number | null; public get expiresAt(): Date | null; public get expiresTimestamp(): number | null; public guild: InviteGuild | Guild | null; public get inviter(): User | null; public inviterId: Snowflake | null; public maxAge: number | null; public maxUses: number | null; public memberCount: number; public presenceCount: number; public targetApplication: IntegrationApplication | null; public targetUser: User | null; public targetType: InviteTargetType | null; public temporary: boolean | null; public type: InviteType; public get url(): string; public uses: number | null; public delete(reason?: string): Promise<Invite>; public toJSON(): unknown; public toString(): string; public static InvitesPattern: RegExp; /** @deprecated Public Stage Instances don't exist anymore */ public stageInstance: InviteStageInstance | null; public guildScheduledEvent: GuildScheduledEvent | null; } /** @deprecated Public Stage Instances don't exist anymore */ export class InviteStageInstance extends Base { private constructor(client: Client<true>, data: RawInviteStageInstance, channelId: Snowflake, guildId: Snowflake); public channelId: Snowflake; public guildId: Snowflake; public members: Collection<Snowflake, GuildMember>; public topic: string; public participantCount: number; public speakerCount: number; public get channel(): StageChannel | null; public get guild(): Guild | null; } export class InviteGuild extends AnonymousGuild { private constructor(client: Client<true>, data: RawInviteGuildData); public welcomeScreen: WelcomeScreen | null; } export class LimitedCollection<Key, Value> extends Collection<Key, Value> { public constructor(options?: LimitedCollectionOptions<Key, Value>, iterable?: Iterable<readonly [Key, Value]>); public maxSize: number; public keepOverLimit: ((value: Value, key: Key, collection: this) => boolean) | null; } export interface MediaGalleryComponentData extends BaseComponentData { items: readonly MediaGalleryItemData[]; } export class MediaGalleryComponent extends Component<APIMediaGalleryComponent> { private constructor(data: APIMediaGalleryComponent); public readonly items: MediaGalleryItem[]; } export interface MediaGalleryItemData { media: UnfurledMediaItemData; description?: string; spoiler?: boolean; } export class MediaGalleryItem { private constructor(data: APIMediaGalleryItem); public readonly data: APIMediaGalleryItem; public readonly media: UnfurledMediaItem; public get description(): string | null; public get spoiler(): boolean; } export interface MessageCall { get endedAt(): Date | null; endedTimestamp: number | null; participants: readonly Snowflake[]; } export type MessageComponentType = | ComponentType.Button | ComponentType.ChannelSelect | ComponentType.MentionableSelect | ComponentType.RoleSelect | ComponentType.StringSelect | ComponentType.UserSelect; export interface MessageCollectorOptionsParams< ComponentType extends MessageComponentType, Cached extends boolean = boolean, > extends MessageComponentCollectorOptions<MappedInteractionTypes<Cached>[ComponentType]> { componentType?: ComponentType; } export interface MessageChannelCollectorOptionsParams< ComponentType extends MessageComponentType, Cached extends boolean = boolean, > extends MessageChannelComponentCollectorOptions<MappedInteractionTypes<Cached>[ComponentType]> { componentType?: ComponentType; } export interface AwaitMessageCollectorOptionsParams< ComponentType extends MessageComponentType, Cached extends boolean = boolean, > extends Pick< InteractionCollectorOptions<MappedInteractionTypes<Cached>[ComponentType]>, keyof AwaitMessageComponentOptions<any> > { componentType?: ComponentType; } export interface StringMappedInteractionTypes<Cached extends CacheType = CacheType> { Button: ButtonInteraction<Cached>; StringSelectMenu: StringSelectMenuInteraction<Cached>; UserSelectMenu: UserSelectMenuInteraction<Cached>; RoleSelectMenu: RoleSelectMenuInteraction<Cached>; MentionableSelectMenu: MentionableSelectMenuInteraction<Cached>; ChannelSelectMenu: ChannelSelectMenuInteraction<Cached>; ActionRow: MessageComponentInteraction<Cached>; } export type WrapBooleanCache<Cached extends boolean> = If<Cached, 'cached', CacheType>; export interface MappedInteractionTypes<Cached extends boolean = boolean> { [ComponentType.Button]: ButtonInteraction<WrapBooleanCache<Cached>>; [ComponentType.StringSelect]: StringSelectMenuInteraction<WrapBooleanCache<Cached>>; [ComponentType.UserSelect]: UserSelectMenuInteraction<WrapBooleanCache<Cached>>; [ComponentType.RoleSelect]: RoleSelectMenuInteraction<WrapBooleanCache<Cached>>; [ComponentType.MentionableSelect]: MentionableSelectMenuInteraction<WrapBooleanCache<Cached>>; [ComponentType.ChannelSelect]: ChannelSelectMenuInteraction<WrapBooleanCache<Cached>>; } export class Message<InGuild extends boolean = boolean> extends Base { private readonly _cacheType: InGuild; private constructor(client: Client<true>, data: RawMessageData); private _patch(data: RawPartialMessageData | RawMessageData): void; public activity: MessageActivity | null; public applicationId: Snowflake | null; public attachments: Collection<Snowflake, Attachment>; public author: User; public get bulkDeletable(): boolean; public get channel(): If<InGuild, GuildTextBasedChannel, TextBasedChannel>; public channelId: Snowflake; public get cleanContent(): string; public components: TopLevelComponent[]; public content: string; public get createdAt(): Date; public createdTimestamp: number; public get crosspostable(): boolean; public get deletable(): boolean; public get editable(): boolean; public get editedAt(): Date | null; public editedTimestamp: number | null; public embeds: Embed[]; public groupActivityApplication: ClientApplication | null; public guildId: If<InGuild, Snowflake>; public get guild(): If<InGuild, Guild>; public get hasThread(): boolean; public id: Snowflake; /** @deprecated Use {@link Message.interactionMetadata} instead. */ public interaction: MessageInteraction | null; public interactionMetadata: MessageInteractionMetadata | null; public get member(): GuildMember | null; public mentions: MessageMentions<InGuild>; public nonce: string | number | null; public get partial(): false; public get pinnable(): boolean; public pinned: boolean; public reactions: ReactionManager; public stickers: Collection<Snowflake, Sticker>; public position: number | null; public roleSubscriptionData: RoleSubscriptionData | null; public resolved: CommandInteractionResolvedData | null; public system: boolean; public get thread(): AnyThreadChannel | null; public tts: boolean; public poll: Poll | null; public call: MessageCall | null; public type: MessageType; public get url(): string; public webhookId: Snowflake | null; public flags: Readonly<MessageFlagsBitField>; public reference: MessageReference | null; public messageSnapshots: Collection<Snowflake, MessageSnapshot>; public awaitMessageComponent<ComponentType extends MessageComponentType>( options?: AwaitMessageCollectorOptionsParams<ComponentType, InGuild>, ): Promise<MappedInteractionTypes<InGuild>[ComponentType]>; public awaitReactions(options?: AwaitReactionsOptions): Promise<Collection<Snowflake | string, MessageReaction>>; public createReactionCollector(options?: ReactionCollectorOptions): ReactionCollector; public createMessageComponentCollector<ComponentType extends MessageComponentType>( options?: MessageCollectorOptionsParams<ComponentType, InGuild>, ): InteractionCollector<MappedInteractionTypes<InGuild>[ComponentType]>; public delete(): Promise<OmitPartialGroupDMChannel<Message<InGuild>>>; public edit( content: string | MessageEditOptions | MessagePayload, ): Promise<OmitPartialGroupDMChannel<Message<InGuild>>>; public equals(message: Message, rawData: unknown): boolean; public fetchReference(): Promise<OmitPartialGroupDMChannel<Message<InGuild>>>; public fetchWebhook(): Promise<Webhook>; public crosspost(): Promise<OmitPartialGroupDMChannel<Message<InGuild>>>; public fetch(force?: boolean): Promise<OmitPartialGroupDMChannel<Message<InGuild>>>; public pin(reason?: string): Promise<OmitPartialGroupDMChannel<Message<InGuild>>>; public react(emoji: EmojiIdentifierResolvable): Promise<MessageReaction>; public removeAttachments(): Promise<OmitPartialGroupDMChannel<Message<InGuild>>>; public reply( options: string | MessagePayload | MessageReplyOptions, ): Promise<OmitPartialGroupDMChannel<Message<InGuild>>>; public forward(channel: Exclude<TextBasedChannelResolvable, PartialGroupDMChannel>): Promise<Message>; public resolveComponent(customId: string): MessageActionRowComponent | null; public startThread(options: StartThreadOptions): Promise<PublicThreadChannel<false>>; public suppressEmbeds(suppress?: boolean): Promise<OmitPartialGroupDMChannel<Message<InGuild>>>; public toJSON(): unknown; public toString(): string; public unpin(reason?: string): Promise<OmitPartialGroupDMChannel<Message<InGuild>>>; public inGuild(): this is Message<true>; } export class AttachmentBuilder { public constructor(attachment: BufferResolvable | Stream, data?: AttachmentData); public attachment: BufferResolvable | Stream; public description: string | null; public name: string | null; public get spoiler(): boolean; public setDescription(description: string): this; public setFile(attachment: BufferResolvable | Stream, name?: string): this; public setName(name: string): this; public setSpoiler(spoiler?: boolean): this; public toJSON(): unknown; public static from(other: JSONEncodable<AttachmentPayload>): AttachmentBuilder; } export class Attachment { private constructor(data: APIAttachment); private attachment: BufferResolvable | Stream; public contentType: string | null; public description: string | null; public duration: number | null; public ephemeral: boolean; public flags: AttachmentFlagsBitField; public height: number | null; public id: Snowflake; public name: string; public proxyURL: string; public size: number; public get spoiler(): boolean; public title: string | null; public url: string; public waveform: string | null; public width: number | null; public toJSON(): unknown; } export type AttachmentFlagsString = keyof typeof AttachmentFlags; export class AttachmentFlagsBitField extends BitField<AttachmentFlagsString> { public static Flags: Record<AttachmentFlagsString, number>; public static resolve(bit?: BitFieldResolvable<AttachmentFlagsString, number>): number; } export class MessageCollector extends Collector<Snowflake, Message, [Collection<Snowflake, Message>]> { public constructor(channel: TextBasedChannel, options?: MessageCollectorOptions); private _handleChannelDeletion(channel: NonThreadGuildBasedChannel): void; private _handleGuildDeletion(guild: Guild): void; public channel: TextBasedChannel; public options: MessageCollectorOptions; public received: number; public collect(message: Message): Snowflake | null; public dispose(message: Message): Snowflake | null; } export class MessageComponentInteraction<Cached extends CacheType = CacheType> extends BaseInteraction<Cached> { protected constructor(client: Client<true>, data: RawMessageComponentInteractionData); public type: InteractionType.MessageComponent; public get component(): CacheTypeReducer< Cached, MessageActionRowComponent, APIComponentInMessageActionRow, MessageActionRowComponent | APIComponentInMessageActionRow, MessageActionRowComponent | APIComponentInMessageActionRow >; public componentType: MessageComponentType; public customId: string; public channelId: Snowflake; public deferred: boolean; public ephemeral: boolean | null; public message: Message<BooleanCache<Cached>>; public replied: boolean; public webhook: InteractionWebhook; public inGuild(): this is MessageComponentInteraction<'raw' | 'cached'>; public inCachedGuild(): this is MessageComponentInteraction<'cached'>; public inRawGuild(): this is MessageComponentInteraction<'raw'>; public deferReply( options: InteractionDeferReplyOptions & { withResponse: true }, ): Promise<InteractionCallbackResponse>; /** @deprecated `fetchReply` is deprecated. Use `withResponse` instead or fetch the response after using the method. */ public deferReply( options: InteractionDeferReplyOptions & { fetchReply: true }, ): Promise<Message<BooleanCache<Cached>>>; public deferReply(options?: InteractionDeferReplyOptions): Promise<InteractionResponse<BooleanCache<Cached>>>; public deferUpdate( options: InteractionDeferUpdateOptions & { withResponse: true }, ): Promise<InteractionCallbackResponse>; /** @deprecated `fetchReply` is deprecated. Use `withResponse` instead or fetch the response after using the method. */ public deferUpdate( options: InteractionDeferUpdateOptions & { fetchReply: true }, ): Promise<Message<BooleanCache<Cached>>>; public deferUpdate(options?: InteractionDeferUpdateOptions): Promise<InteractionResponse<BooleanCache<Cached>>>; public deleteReply(message?: MessageResolvable | '@original'): Promise<void>; public editReply( options: string | MessagePayload | InteractionEditReplyOptions, ): Promise<Message<BooleanCache<Cached>>>; public fetchReply(message?: Snowflake | '@original'): Promise<Message<BooleanCache<Cached>>>; public followUp(options: string | MessagePayload | InteractionReplyOptions): Promise<Message<BooleanCache<Cached>>>; public reply(options: InteractionReplyOptions & { withResponse: true }): Promise<InteractionCallbackResponse>; /** @deprecated `fetchReply` is deprecated. Use `withResponse` instead or fetch the response after using the method. */ public reply(options: InteractionReplyOptions & { fetchReply: true }): Promise<Message<BooleanCache<Cached>>>; public reply( options: string | MessagePayload | InteractionReplyOptions, ): Promise<InteractionResponse<BooleanCache<Cached>>>; public update(options: InteractionUpdateOptions & { withResponse: true }): Promise<InteractionCallbackResponse>; /** @deprecated `fetchReply` is deprecated. Use `withResponse` instead or fetch the response after using the method. */ public update(options: InteractionUpdateOptions & { fetchReply: true }): Promise<Message<BooleanCache<Cached>>>; public update( options: string | MessagePayload | InteractionUpdateOptions, ): Promise<InteractionResponse<BooleanCache<Cached>>>; public launchActivity(options: LaunchActivityOptions & { withResponse: true }): Promise<InteractionCallbackResponse>; public launchActivity(options?: LaunchActivityOptions & { withResponse?: false }): Promise<undefined>; public launchActivity(options?: LaunchActivityOptions): Promise<InteractionCallbackResponse | undefined>; public showModal( modal: | JSONEncodable<APIModalInteractionResponseCallbackData> | ModalComponentData | APIModalInteractionResponseCallbackData, options: ShowModalOptions & { withResponse: true }, ): Promise<InteractionCallbackResponse>; public showModal( modal: | JSONEncodable<APIModalInteractionResponseCallbackData> | ModalComponentData | APIModalInteractionResponseCallbackData, options?: ShowModalOptions, ): Promise<undefined>; public showModal( modal: | JSONEncodable<APIModalInteractionResponseCallbackData> | ModalComponentData | APIModalInteractionResponseCallbackData, options?: ShowModalOptions, ): Promise<undefined>; /** @deprecated Sending a premium-style button is the new Discord behaviour. */ public sendPremiumRequired(): Promise<void>; public awaitModalSubmit( options: AwaitModalSubmitOptions<ModalSubmitInteraction>, ): Promise<ModalSubmitInteraction<Cached>>; } export class MessageContextMenuCommandInteraction< Cached extends CacheType = CacheType, > extends ContextMenuCommandInteraction<Cached> { public commandType: ApplicationCommandType.Message; public options: Omit< CommandInteractionOptionResolver<Cached>, | 'getFocused' | 'getMentionable' | 'getRole' | 'getUser' | 'getNumber' | 'getAttachment' | 'getInteger' | 'getString' | 'getChannel' | 'getBoolean' | 'getSubcommandGroup' | 'getSubcommand' >; public get targetMessage(): NonNullable<CommandInteractionOption<Cached>['message']>; public inGuild(): this is MessageContextMenuCommandInteraction<'raw' | 'cached'>; public inCachedGuild(): this is MessageContextMenuCommandInteraction<'cached'>; public inRawGuild(): this is MessageContextMenuCommandInteraction<'raw'>; } export type MessageFlagsString = keyof typeof MessageFlags; export class MessageFlagsBitField extends BitField<MessageFlagsString> { public static Flags: typeof MessageFlags; public static resolve(bit?: MessageFlagsResolvable): number; } export type MessageFlagsResolvable = BitFieldResolvable<MessageFlagsString, number>; export class MessageMentions<InGuild extends boolean = boolean> { private constructor( message: Message, users: readonly APIUser[] | ReadonlyCollection<Snowflake, User>, roles: readonly Snowflake[] | ReadonlyCollection<Snowflake, Role>, everyone: boolean, repliedUser?: APIUser | User, ); private _channels: Collection<Snowflake, Channel> | null; private readonly _content: string; private _members: Collection<Snowflake, GuildMember> | null; private _parsedUsers: Collection<Snowflake, User> | null; public get channels(): Collection<Snowflake, Channel>; public readonly client: Client; public everyone: boolean; public readonly guild: If<InGuild, Guild>; public has(data: UserResolvable | RoleResolvable | ChannelResolvable, options?: MessageMentionsHasOptions): boolean; public get members(): If<InGuild, Collection<Snowflake, GuildMember>>; public get parsedUsers(): Collection<Snowflake, User>; public repliedUser: User | null; public roles: Collection<Snowflake, Role>; public users: Collection<Snowflake, User>; public crosspostedChannels: Collection<Snowflake, CrosspostedChannel>; public toJSON(): unknown; private static GlobalChannelsPattern: RegExp; private static GlobalUsersPattern: RegExp; public static ChannelsPattern: typeof FormattingPatterns.Channel; public static EveryonePattern: RegExp; public static RolesPattern: typeof FormattingPatterns.Role; public static UsersPattern: typeof FormattingPatterns.User; } export type MessagePayloadOption = | MessageCreateOptions | MessageEditOptions | WebhookMessageCreateOptions | WebhookMessageEditOptions | InteractionReplyOptions | InteractionUpdateOptions; export class MessagePayload { public constructor(target: MessageTarget, options: MessagePayloadOption); public body: RawMessagePayloadData | null; public get isUser(): boolean; public get isWebhook(): boolean; public get isMessage(): boolean; public get isMessageManager(): boolean; /** @deprecated This will no longer serve a purpose in the next major version. */ public get isInteraction(): boolean; public files: RawFile[] | null; public options: MessagePayloadOption; public target: MessageTarget; public static create( target: MessageTarget, options: string | MessagePayloadOption, extra?: MessagePayloadOption, ): MessagePayload; public static resolveFile( fileLike: BufferResolvable | Stream | AttachmentPayload | JSONEncodable<AttachmentPayload>, ): Promise<RawFile>; public makeContent(): string | undefined; public resolveBody(): this; public resolveFiles(): Promise<this>; } export class MessageReaction { private constructor(client: Client<true>, data: RawMessageReactionData, message: Message); private _emoji: GuildEmoji | ReactionEmoji | ApplicationEmoji; public burstColors: string[] | null; public readonly client: Client<true>; public count: number; public countDetails: ReactionCountDetailsData; public get emoji(): GuildEmoji | ReactionEmoji | ApplicationEmoji; public me: boolean; public meBurst: boolean; public message: Message | PartialMessage; public get partial(): false; public users: ReactionUserManager; public react(): Promise<MessageReaction>; public remove(): Promise<MessageReaction>; public fetch(): Promise<MessageReaction>; public toJSON(): unknown; public valueOf(): Snowflake | string; } export interface MessageReactionEventDetails { type: ReactionType; burst: boolean; } export interface ModalComponentData { customId: string; title: string; components: readonly ( | JSONEncodable<APIActionRowComponent<APIComponentInModalActionRow>> | ActionRowData<ModalActionRowComponentData> )[]; } export interface BaseModalData { customId: string; type: ComponentType; } export interface TextInputModalData extends BaseModalData { type: ComponentType.TextInput; value: string; } export interface ActionRowModalData { type: ComponentType.ActionRow; components: readonly TextInputModalData[]; } export class ModalSubmitFields { private constructor(components: readonly (readonly ModalActionRowComponent[])[]); public components: ActionRowModalData[]; public fields: Collection<string, ModalActionRowComponent>; public getField<Type extends ComponentType>(customId: string, type: Type): { type: Type } & TextInputModalData; public getField(customId: string, type?: ComponentType): TextInputModalData; public getTextInputValue(customId: string): string; } export interface ModalMessageModalSubmitInteraction<Cached extends CacheType = CacheType> extends ModalSubmitInteraction<Cached> { message: Message<BooleanCache<Cached>>; channelId: Snowflake; update(options: InteractionUpdateOptions & { withResponse: true }): Promise<InteractionCallbackResponse>; /** @deprecated `fetchReply` is deprecated. Use `withResponse` instead or fetch the response after using the method. */ update(options: InteractionUpdateOptions & { fetchReply: true }): Promise<Message>; update( options: string | MessagePayload | InteractionUpdateOptions, ): Promise<InteractionResponse<BooleanCache<Cached>>>; inGuild(): this is ModalMessageModalSubmitInteraction<'raw' | 'cached'>; inCachedGuild(): this is ModalMessageModalSubmitInteraction<'cached'>; inRawGuild(): this is ModalMessageModalSubmitInteraction<'raw'>; } export class ModalSubmitInteraction<Cached extends CacheType = CacheType> extends BaseInteraction<Cached> { private constructor(client: Client<true>, data: APIModalSubmitInteraction); public type: InteractionType.ModalSubmit; public readonly customId: string; public readonly components: ActionRowModalData[]; public readonly fields: ModalSubmitFields; public deferred: boolean; public ephemeral: boolean | null; public message: Message<BooleanCache<Cached>> | null; public replied: boolean; public readonly webhook: InteractionWebhook; public reply(options: InteractionReplyOptions & { withResponse: true }): Promise<InteractionCallbackResponse>; /** @deprecated `fetchReply` is deprecated. Use `withResponse` instead or fetch the response after using the method. */ public reply(options: InteractionReplyOptions & { fetchReply: true }): Promise<Message<BooleanCache<Cached>>>; public reply( options: string | MessagePayload | InteractionReplyOptions, ): Promise<InteractionResponse<BooleanCache<Cached>>>; public deleteReply(message?: MessageResolvable | '@original'): Promise<void>; public editReply( options: string | MessagePayload | InteractionEditReplyOptions, ): Promise<Message<BooleanCache<Cached>>>; public deferReply( options: InteractionDeferReplyOptions & { withResponse: true }, ): Promise<InteractionCallbackResponse>; /** @deprecated `fetchReply` is deprecated. Use `withResponse` instead or fetch the response after using the method. */ public deferReply( options: InteractionDeferReplyOptions & { fetchReply: true }, ): Promise<Message<BooleanCache<Cached>>>; public deferReply(options?: InteractionDeferReplyOptions): Promise<InteractionResponse<BooleanCache<Cached>>>; public fetchReply(message?: Snowflake | '@original'): Promise<Message<BooleanCache<Cached>>>; public followUp(options: string | MessagePayload | InteractionReplyOptions): Promise<Message<BooleanCache<Cached>>>; public deferUpdate( options: InteractionDeferUpdateOptions & { withResponse: true }, ): Promise<InteractionCallbackResponse>; /** @deprecated `fetchReply` is deprecated. Use `withResponse` instead or fetch the response after using the method. */ public deferUpdate( options: InteractionDeferUpdateOptions & { fetchReply: true }, ): Promise<Message<BooleanCache<Cached>>>; public deferUpdate(options?: InteractionDeferUpdateOptions): Promise<InteractionResponse<BooleanCache<Cached>>>; /** @deprecated Sending a premium-style button is the new Discord behaviour. */ public sendPremiumRequired(): Promise<void>; public launchActivity(options: LaunchActivityOptions & { withResponse: true }): Promise<InteractionCallbackResponse>; public launchActivity(options?: LaunchActivityOptions & { withResponse?: false }): Promise<undefined>; public launchActivity(options?: LaunchActivityOptions): Promise<InteractionCallbackResponse | undefined>; public inGuild(): this is ModalSubmitInteraction<'raw' | 'cached'>; public inCachedGuild(): this is ModalSubmitInteraction<'cached'>; public inRawGuild(): this is ModalSubmitInteraction<'raw'>; public isFromMessage(): this is ModalMessageModalSubmitInteraction<Cached>; } export class NewsChannel extends BaseGuildTextChannel { public threads: GuildTextThreadManager<AllowedThreadTypeForNewsChannel>; public type: ChannelType.GuildAnnouncement; public addFollower(channel: TextChannelResolvable, reason?: string): Promise<NewsChannel>; } export type NewsChannelResolvable = NewsChannel | Snowflake; export class OAuth2Guild extends BaseGuild { private constructor(client: Client<true>, data: RawOAuth2GuildData); public owner: boolean; public permissions: Readonly<PermissionsBitField>; } export interface PartialGroupDMChannel extends Omit< TextBasedChannelFields<false, false>, | 'bulkDelete' | 'send' | 'sendTyping' | 'createMessageCollector' | 'awaitMessages' | 'fetchWebhooks' | 'createWebhook' | 'setRateLimitPerUser' | 'setNSFW' > {} export class PartialGroupDMChannel extends BaseChannel { private constructor(client: Client<true>, data: RawPartialGroupDMChannelData); public type: ChannelType.GroupDM; public flags: null; public name: string | null; public icon: string | null; public recipients: PartialRecipient[]; public ownerId: Snowflake | null; public iconURL(options?: ImageURLOptions): string | null; public fetchOwner(options?: BaseFetchOptions): Promise<User>; public toString(): ChannelMention; } export interface GuildForumTagEmoji { id: Snowflake | null; name: string | null; } export interface GuildForumTag { id: Snowflake; name: string; moderated: boolean; emoji: GuildForumTagEmoji | null; } export interface GuildForumTagData extends Partial<GuildForumTag> { name: string; } export interface DefaultReactionEmoji { id: Snowflake | null; name: string | null; } export interface ThreadOnlyChannel extends Omit< TextBasedChannelFields, | 'send' | 'lastMessage' | 'lastPinAt' | 'bulkDelete' | 'sendTyping' | 'createMessageCollector' | 'awaitMessages' | 'createMessageComponentCollector' | 'awaitMessageComponent' | 'messages' > {} export abstract class ThreadOnlyChannel extends GuildChannel { public type: ChannelType.GuildForum | ChannelType.GuildMedia; public threads: GuildForumThreadManager; public availableTags: GuildForumTag[]; public defaultReactionEmoji: DefaultReactionEmoji | null; public defaultThreadRateLimitPerUser: number | null; public rateLimitPerUser: number | null; public defaultAutoArchiveDuration: ThreadAutoArchiveDuration | null; public nsfw: boolean; public topic: string | null; public defaultSortOrder: SortOrderType | null; public setAvailableTags(tags: readonly GuildForumTagData[], reason?: string): Promise<this>; public setDefaultReactionEmoji(emojiId: DefaultReactionEmoji | null, reason?: string): Promise<this>; public setDefaultThreadRateLimitPerUser(rateLimit: number, reason?: string): Promise<this>; public createInvite(options?: InviteCreateOptions): Promise<Invite>; public fetchInvites(cache?: boolean): Promise<Collection<string, Invite>>; public setDefaultAutoArchiveDuration( defaultAutoArchiveDuration: ThreadAutoArchiveDuration, reason?: string, ): Promise<this>; public setTopic(topic: string | null, reason?: string): Promise<this>; public setDefaultSortOrder(defaultSortOrder: SortOrderType | null, reason?: string): Promise<this>; } export class ForumChannel extends ThreadOnlyChannel { public type: ChannelType.GuildForum; public defaultForumLayout: ForumLayoutType; public setDefaultForumLayout(defaultForumLayout: ForumLayoutType, reason?: string): Promise<this>; } export class MediaChannel extends ThreadOnlyChannel { public type: ChannelType.GuildMedia; } export class PermissionOverwrites extends Base { private constructor(client: Client<true>, data: RawPermissionOverwriteData, channel: NonThreadGuildBasedChannel); public allow: Readonly<PermissionsBitField>; public readonly channel: NonThreadGuildBasedChannel; public deny: Readonly<PermissionsBitField>; public id: Snowflake; public type: OverwriteType; public edit(options: PermissionOverwriteOptions, reason?: string): Promise<PermissionOverwrites>; public delete(reason?: string): Promise<PermissionOverwrites>; public toJSON(): unknown; public static resolveOverwriteOptions( options: PermissionOverwriteOptions, initialPermissions: { allow?: PermissionResolvable; deny?: PermissionResolvable }, ): ResolvedOverwriteOptions; public static resolve(overwrite: OverwriteResolvable, guild: Guild): APIOverwrite; } export type PermissionsString = keyof typeof PermissionFlagsBits; export class PermissionsBitField extends BitField<PermissionsString, bigint> { public any(permission: PermissionResolvable, checkAdmin?: boolean): boolean; public has(permission: PermissionResolvable, checkAdmin?: boolean): boolean; public missing(bits: BitFieldResolvable<PermissionsString, bigint>, checkAdmin?: boolean): PermissionsString[]; public serialize(checkAdmin?: boolean): Record<PermissionsString, boolean>; public toArray(): PermissionsString[]; public static All: bigint; public static Default: bigint; public static StageModerator: bigint; public static Flags: typeof PermissionFlagsBits; public static resolve(permission?: PermissionResolvable): bigint; } export class Presence extends Base { protected constructor(client: Client<true>, data?: RawPresenceData); public activities: Activity[]; public clientStatus: ClientPresenceStatusData | null; public guild: Guild | null; public get member(): GuildMember | null; public status: PresenceStatus; public get user(): User | null; public userId: Snowflake; public equals(presence: Presence): boolean; } export interface PollQuestionMedia { text: string; } export class Poll extends Base { private constructor(client: Client<true>, data: APIPoll, message: Message); public readonly message: Message; public question: PollQuestionMedia; public answers: Collection<number, PollAnswer>; public expiresTimestamp: number; public get expiresAt(): Date; public allowMultiselect: boolean; public layoutType: PollLayoutType; public resultsFinalized: boolean; public end(): Promise<Message>; } export interface BaseFetchPollAnswerVotersOptions { after?: Snowflake; limit?: number; } export class PollAnswer extends Base { private constructor(client: Client<true>, data: APIPollAnswer & { count?: number }, poll: Poll); private _emoji: APIPartialEmoji | null; public readonly poll: Poll; public id: number; public text: string | null; public voteCount: number; public get emoji(): GuildEmoji | Emoji | null; public fetchVoters(options?: BaseFetchPollAnswerVotersOptions): Promise<Collection<Snowflake, User>>; } export class ReactionCollector extends Collector<Snowflake | string, MessageReaction, [User]> { public constructor(message: Message, options?: ReactionCollectorOptions); private _handleChannelDeletion(channel: NonThreadGuildBasedChannel): void; private _handleGuildDeletion(guild: Guild): void; private _handleMessageDeletion(message: Message): void; public message: Message; public options: ReactionCollectorOptions; public total: number; public users: Collection<Snowflake, User>; public static key(reaction: MessageReaction): Snowflake | string; public collect(reaction: MessageReaction, user: User): Snowflake | string | null; public dispose(reaction: MessageReaction, user: User): Snowflake | string | null; public empty(): void; public on( event: 'collect' | 'dispose' | 'remove' | 'ignore', listener: (reaction: MessageReaction, user: User) => void, ): this; public on( event: 'end', listener: (collected: ReadonlyCollection<Snowflake, MessageReaction>, reason: string) => void, ): this; public on(event: string, listener: (...args: any[]) => void): this; public once( event: 'collect' | 'dispose' | 'remove' | 'ignore', listener: (reaction: MessageReaction, user: User) => void, ): this; public once( event: 'end', listener: (collected: ReadonlyCollection<Snowflake, MessageReaction>, reason: string) => void, ): this; public once(event: string, listener: (...args: any[]) => void): this; } export class ReactionEmoji extends Emoji { private constructor(reaction: MessageReaction, emoji: RawReactionEmojiData); public reaction: MessageReaction; public toJSON(): unknown; } export class RichPresenceAssets { private constructor(activity: Activity, assets: RawRichPresenceAssets); public readonly activity: Activity; public largeImage: Snowflake | null; public largeText: string | null; public smallImage: Snowflake | null; public smallText: string | null; public largeImageURL(options?: ImageURLOptions): string | null; public smallImageURL(options?: ImageURLOptions): string | null; } export class Role extends Base { private constructor(client: Client<true>, data: RawRoleData, guild: Guild); public color: number; public get createdAt(): Date; public get createdTimestamp(): number; public get editable(): boolean; public flags: RoleFlagsBitField; public guild: Guild; public get hexColor(): HexColorString; public hoist: boolean; public id: Snowflake; public managed: boolean; public get members(): Collection<Snowflake, GuildMember>; public mentionable: boolean; public name: string; public permissions: Readonly<PermissionsBitField>; public get position(): number; public rawPosition: number; public tags: RoleTagData | null; public comparePositionTo(role: RoleResolvable): number; public icon: string | null; public unicodeEmoji: string | null; public delete(reason?: string): Promise<Role>; public edit(options: RoleEditOptions): Promise<Role>; public equals(role: Role): boolean; public iconURL(options?: ImageURLOptions): string | null; public permissionsIn( channel: NonThreadGuildBasedChannel | Snowflake, checkAdmin?: boolean, ): Readonly<PermissionsBitField>; public setColor(color: ColorResolvable, reason?: string): Promise<Role>; public setHoist(hoist?: boolean, reason?: string): Promise<Role>; public setMentionable(mentionable?: boolean, reason?: string): Promise<Role>; public setName(name: string, reason?: string): Promise<Role>; public setPermissions(permissions: PermissionResolvable, reason?: string): Promise<Role>; public setIcon(icon: BufferResolvable | Base64Resolvable | EmojiResolvable | null, reason?: string): Promise<Role>; public setPosition(position: number, options?: SetRolePositionOptions): Promise<Role>; public setUnicodeEmoji(unicodeEmoji: string | null, reason?: string): Promise<Role>; public toJSON(): unknown; public toString(): RoleMention; } export type RoleFlagsString = keyof typeof RoleFlags; export class RoleFlagsBitField extends BitField<RoleFlagsString> { public static Flags: typeof RoleFlags; public static resolve(bit?: BitFieldResolvable<RoleFlagsString, number>): number; } export interface SectionComponentData extends BaseComponentData { accessory: ButtonComponentData | ThumbnailComponentData; components: readonly TextDisplayComponentData[]; } export class SectionComponent< AccessoryType extends ButtonComponent | ThumbnailComponent = ButtonComponent | ThumbnailComponent, > extends Component<APISectionComponent> { private constructor(data: APISectionComponent); public readonly accessory: AccessoryType; public readonly components: TextDisplayComponent[]; public toJSON(): APISectionComponent; } export class StringSelectMenuInteraction< Cached extends CacheType = CacheType, > extends MessageComponentInteraction<Cached> { public constructor(client: Client<true>, data: APIMessageStringSelectInteractionData); public get component(): CacheTypeReducer< Cached, StringSelectMenuComponent, APIStringSelectComponent, StringSelectMenuComponent | APIStringSelectComponent, StringSelectMenuComponent | APIStringSelectComponent >; public componentType: ComponentType.StringSelect; public values: string[]; public inGuild(): this is StringSelectMenuInteraction<'raw' | 'cached'>; public inCachedGuild(): this is StringSelectMenuInteraction<'cached'>; public inRawGuild(): this is StringSelectMenuInteraction<'raw'>; } export { /** @deprecated Use {@link StringSelectMenuInteraction} instead */ StringSelectMenuInteraction as SelectMenuInteraction, }; export class UserSelectMenuInteraction< Cached extends CacheType = CacheType, > extends MessageComponentInteraction<Cached> { public constructor(client: Client<true>, data: APIMessageUserSelectInteractionData); public get component(): CacheTypeReducer< Cached, UserSelectMenuComponent, APIUserSelectComponent, UserSelectMenuComponent | APIUserSelectComponent, UserSelectMenuComponent | APIUserSelectComponent >; public componentType: ComponentType.UserSelect; public values: Snowflake[]; public users: Collection<Snowflake, User>; public members: Collection< Snowflake, CacheTypeReducer<Cached, GuildMember, APIGuildMember, GuildMember | APIGuildMember, GuildMember | APIGuildMember> >; public inGuild(): this is UserSelectMenuInteraction<'raw' | 'cached'>; public inCachedGuild(): this is UserSelectMenuInteraction<'cached'>; public inRawGuild(): this is UserSelectMenuInteraction<'raw'>; } export class RoleSelectMenuInteraction< Cached extends CacheType = CacheType, > extends MessageComponentInteraction<Cached> { public constructor(client: Client<true>, data: APIMessageRoleSelectInteractionData); public get component(): CacheTypeReducer< Cached, RoleSelectMenuComponent, APIRoleSelectComponent, RoleSelectMenuComponent | APIRoleSelectComponent, RoleSelectMenuComponent | APIRoleSelectComponent >; public componentType: ComponentType.RoleSelect; public values: Snowflake[]; public roles: Collection<Snowflake, CacheTypeReducer<Cached, Role, APIRole, Role | APIRole, Role | APIRole>>; public inGuild(): this is RoleSelectMenuInteraction<'raw' | 'cached'>; public inCachedGuild(): this is RoleSelectMenuInteraction<'cached'>; public inRawGuild(): this is RoleSelectMenuInteraction<'raw'>; } export class MentionableSelectMenuInteraction< Cached extends CacheType = CacheType, > extends MessageComponentInteraction<Cached> { public constructor(client: Client<true>, data: APIMessageMentionableSelectInteractionData); public get component(): CacheTypeReducer< Cached, MentionableSelectMenuComponent, APIMentionableSelectComponent, MentionableSelectMenuComponent | APIMentionableSelectComponent, MentionableSelectMenuComponent | APIMentionableSelectComponent >; public componentType: ComponentType.MentionableSelect; public values: Snowflake[]; public users: Collection<Snowflake, User>; public members: Collection< Snowflake, CacheTypeReducer<Cached, GuildMember, APIGuildMember, GuildMember | APIGuildMember, GuildMember | APIGuildMember> >; public roles: Collection<Snowflake, CacheTypeReducer<Cached, Role, APIRole, Role | APIRole, Role | APIRole>>; public inGuild(): this is MentionableSelectMenuInteraction<'raw' | 'cached'>; public inCachedGuild(): this is MentionableSelectMenuInteraction<'cached'>; public inRawGuild(): this is MentionableSelectMenuInteraction<'raw'>; } export class ChannelSelectMenuInteraction< Cached extends CacheType = CacheType, > extends MessageComponentInteraction<Cached> { public constructor(client: Client<true>, data: APIMessageChannelSelectInteractionData); public get component(): CacheTypeReducer< Cached, ChannelSelectMenuComponent, APIChannelSelectComponent, ChannelSelectMenuComponent | APIChannelSelectComponent, ChannelSelectMenuComponent | APIChannelSelectComponent >; public componentType: ComponentType.ChannelSelect; public values: Snowflake[]; public channels: Collection< Snowflake, CacheTypeReducer<Cached, Channel, APIChannel, Channel | APIChannel, Channel | APIChannel> >; public inGuild(): this is ChannelSelectMenuInteraction<'raw' | 'cached'>; public inCachedGuild(): this is ChannelSelectMenuInteraction<'cached'>; public inRawGuild(): this is ChannelSelectMenuInteraction<'raw'>; } // Ideally this should be named SelectMenuInteraction, but that's the name of the "old" StringSelectMenuInteraction, meaning // the type name is reserved as a re-export to prevent a breaking change from being made, as such: // TODO: Rename this to SelectMenuInteraction in the next major export type AnySelectMenuInteraction<Cached extends CacheType = CacheType> = | StringSelectMenuInteraction<Cached> | UserSelectMenuInteraction<Cached> | RoleSelectMenuInteraction<Cached> | MentionableSelectMenuInteraction<Cached> | ChannelSelectMenuInteraction<Cached>; export type SelectMenuType = APISelectMenuComponent['type']; export interface SeparatorComponentData extends BaseComponentData { spacing?: SeparatorSpacingSize; divider?: boolean; } export class SeparatorComponent extends Component<APISeparatorComponent> { private constructor(data: APISeparatorComponent); public get spacing(): SeparatorSpacingSize; public get divider(): boolean; } export interface ShardEventTypes { death: [process: ChildProcess | Worker]; disconnect: []; error: [error: Error]; message: [message: any]; ready: []; reconnecting: []; resume: []; spawn: [process: ChildProcess | Worker]; } export class Shard extends EventEmitter { private constructor(manager: ShardingManager, id: number); private _evals: Map<string, Promise<unknown>>; private _exitListener: (...args: any[]) => void; private _fetches: Map<string, Promise<unknown>>; private _handleExit(respawn?: boolean, timeout?: number): void; private _handleMessage(message: unknown): void; private incrementMaxListeners(emitter: EventEmitter | ChildProcess): void; private decrementMaxListeners(emitter: EventEmitter | ChildProcess): void; public args: string[]; public execArgv: string[]; public env: unknown; public id: number; public manager: ShardingManager; public process: ChildProcess | null; public ready: boolean; public silent: boolean; public worker: Worker | null; public eval(script: string): Promise<unknown>; public eval<Result>(fn: (client: Client) => Result): Promise<Result>; public eval<Result, Context>( fn: (client: Client<true>, context: Serialized<Context>) => Result, context: Context, ): Promise<Result>; public fetchClientValue(prop: string): Promise<unknown>; public kill(): void; public respawn(options?: { delay?: number; timeout?: number }): Promise<ChildProcess>; public send(message: unknown): Promise<Shard>; public spawn(timeout?: number): Promise<ChildProcess>; public on<Event extends keyof ShardEventTypes>( event: Event, listener: (...args: ShardEventTypes[Event]) => void, ): this; public once<Event extends keyof ShardEventTypes>( event: Event, listener: (...args: ShardEventTypes[Event]) => void, ): this; } export class ShardClientUtil { private constructor(client: Client<true>, mode: ShardingManagerMode); private _handleMessage(message: unknown): void; private _respond(type: string, message: unknown): void; private incrementMaxListeners(emitter: EventEmitter | ChildProcess): void; private decrementMaxListeners(emitter: EventEmitter | ChildProcess): void; public client: Client; public get count(): number; public get ids(): number[]; public mode: ShardingManagerMode; public parentPort: MessagePort | null; public broadcastEval<Result>(fn: (client: Client) => Awaitable<Result>): Promise<Serialized<Result>[]>; public broadcastEval<Result>( fn: (client: Client) => Awaitable<Result>, options: { shard: number }, ): Promise<Serialized<Result>>; public broadcastEval<Result, Context>( fn: (client: Client<true>, context: Serialized<Context>) => Awaitable<Result>, options: { context: Context }, ): Promise<Serialized<Result>[]>; public broadcastEval<Result, Context>( fn: (client: Client<true>, context: Serialized<Context>) => Awaitable<Result>, options: { context: Context; shard: number }, ): Promise<Serialized<Result>>; public fetchClientValues(prop: string): Promise<unknown[]>; public fetchClientValues(prop: string, shard: number): Promise<unknown>; public respawnAll(options?: MultipleShardRespawnOptions): Promise<void>; public send(message: unknown): Promise<void>; public static singleton(client: Client<true>, mode: ShardingManagerMode): ShardClientUtil; public static shardIdForGuildId(guildId: Snowflake, shardCount: number): number; } export class ShardingManager extends EventEmitter { public constructor(file: string, options?: ShardingManagerOptions); private _performOnShards(method: string, args: readonly unknown[]): Promise<unknown[]>; private _performOnShards(method: string, args: readonly unknown[], shard: number): Promise<unknown>; public file: string; public respawn: boolean; public silent: boolean; public shardArgs: string[]; public shards: Collection<number, Shard>; public token: string | null; public totalShards: number | 'auto'; public shardList: number[] | 'auto'; public broadcast(message: unknown): Promise<Shard[]>; public broadcastEval<Result>(fn: (client: Client) => Awaitable<Result>): Promise<Serialized<Result>[]>; public broadcastEval<Result>( fn: (client: Client) => Awaitable<Result>, options: { shard: number }, ): Promise<Serialized<Result>>; public broadcastEval<Result, Context>( fn: (client: Client<true>, context: Serialized<Context>) => Awaitable<Result>, options: { context: Context }, ): Promise<Serialized<Result>[]>; public broadcastEval<Result, Context>( fn: (client: Client<true>, context: Serialized<Context>) => Awaitable<Result>, options: { context: Context; shard: number }, ): Promise<Serialized<Result>>; public createShard(id: number): Shard; public fetchClientValues(prop: string): Promise<unknown[]>; public fetchClientValues(prop: string, shard: number): Promise<unknown>; public respawnAll(options?: MultipleShardRespawnOptions): Promise<Collection<number, Shard>>; public spawn(options?: MultipleShardSpawnOptions): Promise<Collection<number, Shard>>; public on(event: 'shardCreate', listener: (shard: Shard) => void): this; public once(event: 'shardCreate', listener: (shard: Shard) => void): this; } export interface FetchRecommendedShardCountOptions { guildsPerShard?: number; multipleOf?: number; } export { DiscordSnowflake as SnowflakeUtil, SnowflakeGenerateOptions, DeconstructedSnowflake, } from '@sapphire/snowflake'; export class SKU extends Base { private constructor(client: Client<true>, data: APISKU); public id: Snowflake; public type: SKUType; public applicationId: Snowflake; public name: string; public slug: string; public flags: Readonly<SKUFlagsBitField>; } export type SKUFlagsString = keyof typeof SKUFlags; export class SKUFlagsBitField extends BitField<SKUFlagsString> { public static FLAGS: typeof SKUFlags; public static resolve(bit?: BitFieldResolvable<SKUFlagsString, number>): number; } export class Subscription extends Base { private constructor(client: Client<true>, data: APISubscription); public id: Snowflake; public userId: Snowflake; public skuIds: Snowflake[]; public entitlementIds: Snowflake[]; public renewalSkuIds: Snowflake[] | null; public currentPeriodStartTimestamp: number; public currentPeriodEndTimestamp: number; public status: SubscriptionStatus; public canceledTimestamp: number | null; public country: string | null; public get canceledAt(): Date | null; public get currentPeriodStartAt(): Date; public get currentPeriodEndAt(): Date; } export class StageChannel extends BaseGuildVoiceChannel { public get stageInstance(): StageInstance | null; public topic: string | null; public type: ChannelType.GuildStageVoice; public createStageInstance(options: StageInstanceCreateOptions): Promise<StageInstance>; public setTopic(topic: string): Promise<StageChannel>; } export class DirectoryChannel extends BaseChannel { public flags: Readonly<ChannelFlagsBitField>; public guild: InviteGuild; public guildId: Snowflake; public name: string; public toString(): ChannelMention; } export class StageInstance extends Base { private constructor(client: Client<true>, data: RawStageInstanceData, channel: StageChannel); public id: Snowflake; public guildId: Snowflake; public channelId: Snowflake; public topic: string; public privacyLevel: StageInstancePrivacyLevel; /** @deprecated See https://github.com/discord/discord-api-docs/pull/4296 for more information */ public discoverableDisabled: boolean | null; public guildScheduledEventId?: Snowflake; public get channel(): StageChannel | null; public get guild(): Guild | null; public get guildScheduledEvent(): GuildScheduledEvent | null; public edit(options: StageInstanceEditOptions): Promise<StageInstance>; public delete(): Promise<StageInstance>; public setTopic(topic: string): Promise<StageInstance>; public get createdTimestamp(): number; public get createdAt(): Date; } export class Sticker extends Base { private constructor(client: Client<true>, data: RawStickerData); public get createdTimestamp(): number; public get createdAt(): Date; public available: boolean | null; public description: string | null; public format: StickerFormatType; public get guild(): Guild | null; public guildId: Snowflake | null; public id: Snowflake; public name: string; public packId: Snowflake | null; public get partial(): boolean; public sortValue: number | null; public tags: string | null; public type: StickerType | null; public user: User | null; public get url(): string; public fetch(): Promise<Sticker>; public fetchPack(): Promise<StickerPack | null>; public fetchUser(): Promise<User | null>; public edit(options?: GuildStickerEditOptions): Promise<Sticker>; public delete(reason?: string): Promise<Sticker>; public equals(other: Sticker | unknown): boolean; } export class StickerPack extends Base { private constructor(client: Client<true>, data: RawStickerPackData); public get createdTimestamp(): number; public get createdAt(): Date; public bannerId: Snowflake | null; public get coverSticker(): Sticker | null; public coverStickerId: Snowflake | null; public description: string; public id: Snowflake; public name: string; public skuId: Snowflake; public stickers: Collection<Snowflake, Sticker>; public bannerURL(options?: ImageURLOptions): string | null; } export class Sweepers { public constructor(client: Client<true>, options: SweeperOptions); public readonly client: Client; public intervals: Record<SweeperKey, NodeJS.Timeout | null>; public options: SweeperOptions; public sweepApplicationCommands( filter: CollectionSweepFilter< SweeperDefinitions['applicationCommands'][0], SweeperDefinitions['applicationCommands'][1] >, ): number; public sweepAutoModerationRules( filter: CollectionSweepFilter< SweeperDefinitions['autoModerationRules'][0], SweeperDefinitions['autoModerationRules'][1] >, ): number; public sweepBans(filter: CollectionSweepFilter<SweeperDefinitions['bans'][0], SweeperDefinitions['bans'][1]>): number; public sweepEmojis( filter: CollectionSweepFilter<SweeperDefinitions['emojis'][0], SweeperDefinitions['emojis'][1]>, ): number; public sweepEntitlements( filter: CollectionSweepFilter<SweeperDefinitions['entitlements'][0], SweeperDefinitions['entitlements'][1]>, ): number; public sweepInvites( filter: CollectionSweepFilter<SweeperDefinitions['invites'][0], SweeperDefinitions['invites'][1]>, ): number; public sweepGuildMembers( filter: CollectionSweepFilter<SweeperDefinitions['guildMembers'][0], SweeperDefinitions['guildMembers'][1]>, ): number; public sweepMessages( filter: CollectionSweepFilter<SweeperDefinitions['messages'][0], SweeperDefinitions['messages'][1]>, ): number; public sweepPresences( filter: CollectionSweepFilter<SweeperDefinitions['presences'][0], SweeperDefinitions['presences'][1]>, ): number; public sweepReactions( filter: CollectionSweepFilter<SweeperDefinitions['reactions'][0], SweeperDefinitions['reactions'][1]>, ): number; public sweepStageInstances( filter: CollectionSweepFilter<SweeperDefinitions['stageInstances'][0], SweeperDefinitions['stageInstances'][1]>, ): number; public sweepStickers( filter: CollectionSweepFilter<SweeperDefinitions['stickers'][0], SweeperDefinitions['stickers'][1]>, ): number; public sweepThreadMembers( filter: CollectionSweepFilter<SweeperDefinitions['threadMembers'][0], SweeperDefinitions['threadMembers'][1]>, ): number; public sweepThreads( filter: CollectionSweepFilter<SweeperDefinitions['threads'][0], SweeperDefinitions['threads'][1]>, ): number; public sweepUsers( filter: CollectionSweepFilter<SweeperDefinitions['users'][0], SweeperDefinitions['users'][1]>, ): number; public sweepVoiceStates( filter: CollectionSweepFilter<SweeperDefinitions['voiceStates'][0], SweeperDefinitions['voiceStates'][1]>, ): number; public static archivedThreadSweepFilter( lifetime?: number, ): GlobalSweepFilter<SweeperDefinitions['threads'][0], SweeperDefinitions['threads'][1]>; public static expiredInviteSweepFilter( lifetime?: number, ): GlobalSweepFilter<SweeperDefinitions['invites'][0], SweeperDefinitions['invites'][1]>; public static filterByLifetime<Key, Value>( options?: LifetimeFilterOptions<Key, Value>, ): GlobalSweepFilter<Key, Value>; public static outdatedMessageSweepFilter( lifetime?: number, ): GlobalSweepFilter<SweeperDefinitions['messages'][0], SweeperDefinitions['messages'][1]>; } export type SystemChannelFlagsString = keyof typeof GuildSystemChannelFlags; export class SystemChannelFlagsBitField extends BitField<SystemChannelFlagsString> { public static Flags: typeof GuildSystemChannelFlags; public static resolve(bit?: BitFieldResolvable<SystemChannelFlagsString, number>): number; } export class Team extends Base { private constructor(client: Client<true>, data: RawTeamData); public id: Snowflake; public name: string; public icon: string | null; public ownerId: Snowflake | null; public members: Collection<Snowflake, TeamMember>; public get owner(): TeamMember | null; public get createdAt(): Date; public get createdTimestamp(): number; public iconURL(options?: ImageURLOptions): string | null; public toJSON(): unknown; public toString(): string; } export class TeamMember extends Base { private constructor(team: Team, data: RawTeamMemberData); public team: Team; public get id(): Snowflake; /** @deprecated Use {@link TeamMember.role} instead. */ public permissions: string[]; public membershipState: TeamMemberMembershipState; public user: User; public role: TeamMemberRole; public toString(): UserMention; } export class TextChannel extends BaseGuildTextChannel { public rateLimitPerUser: number; public threads: GuildTextThreadManager<AllowedThreadTypeForTextChannel>; public type: ChannelType.GuildText; } export interface TextDisplayComponentData extends BaseComponentData { content: string; } export class TextDisplayComponent extends Component<APITextDisplayComponent> { private constructor(data: APITextDisplayComponent); public readonly content: string; } export type ForumThreadChannel = PublicThreadChannel<true>; export type TextThreadChannel = PublicThreadChannel<false> | PrivateThreadChannel; export type AnyThreadChannel = TextThreadChannel | ForumThreadChannel; export interface PublicThreadChannel<Forum extends boolean = boolean> extends ThreadChannel<Forum> { type: ChannelType.PublicThread | ChannelType.AnnouncementThread; } export interface PrivateThreadChannel extends ThreadChannel<false> { get createdTimestamp(): number; get createdAt(): Date; type: ChannelType.PrivateThread; } // tslint:disable-next-line no-empty-interface export interface ThreadChannel<ThreadOnly extends boolean = boolean> extends Omit<TextBasedChannelFields<true>, 'fetchWebhooks' | 'createWebhook' | 'setNSFW'> {} export class ThreadChannel<ThreadOnly extends boolean = boolean> extends BaseChannel { private constructor(guild: Guild, data?: RawThreadChannelData, client?: Client<true>); public archived: boolean | null; public get archivedAt(): Date | null; public archiveTimestamp: number | null; public get createdAt(): Date | null; private _createdTimestamp: number | null; public get createdTimestamp(): number | null; public autoArchiveDuration: ThreadAutoArchiveDuration | null; public get editable(): boolean; public flags: Readonly<ChannelFlagsBitField>; public guild: Guild; public guildId: Snowflake; public get guildMembers(): Collection<Snowflake, GuildMember>; public invitable: boolean | null; public get joinable(): boolean; public get joined(): boolean; public locked: boolean | null; public get manageable(): boolean; public get viewable(): boolean; public get sendable(): boolean; public memberCount: number | null; public messageCount: number | null; public appliedTags: Snowflake[]; public totalMessageSent: number | null; public members: ThreadMemberManager; public name: string; public ownerId: Snowflake; public get parent(): If<ThreadOnly, ForumChannel | MediaChannel, TextChannel | NewsChannel> | null; public parentId: Snowflake | null; public rateLimitPerUser: number | null; public type: ThreadChannelType; public get unarchivable(): boolean; public delete(reason?: string): Promise<this>; public edit(options: ThreadEditOptions): Promise<this>; public join(): Promise<this>; public leave(): Promise<this>; public permissionsFor(memberOrRole: GuildMember | Role, checkAdmin?: boolean): Readonly<PermissionsBitField>; public permissionsFor( memberOrRole: GuildMemberResolvable | RoleResolvable, checkAdmin?: boolean, ): Readonly<PermissionsBitField> | null; public fetchOwner(options?: FetchThreadOwnerOptions): Promise<ThreadMember | null>; public fetchStarterMessage(options?: BaseFetchOptions): Promise<Message<true> | null>; public setArchived(archived?: boolean, reason?: string): Promise<this>; public setAutoArchiveDuration(autoArchiveDuration: ThreadAutoArchiveDuration, reason?: string): Promise<this>; public setInvitable(invitable?: boolean, reason?: string): Promise<this>; public setLocked(locked?: boolean, reason?: string): Promise<this>; public setName(name: string, reason?: string): Promise<this>; // The following 3 methods can only be run on forum threads. public setAppliedTags(appliedTags: readonly Snowflake[], reason?: string): Promise<If<ThreadOnly, this, never>>; public pin(reason?: string): Promise<If<ThreadOnly, this, never>>; public unpin(reason?: string): Promise<If<ThreadOnly, this, never>>; public toString(): ChannelMention; } export class ThreadMember<HasMemberData extends boolean = boolean> extends Base { private constructor(thread: ThreadChannel, data: RawThreadMemberData, extra?: unknown); public flags: ThreadMemberFlagsBitField; private member: If<HasMemberData, GuildMember>; public get guildMember(): HasMemberData extends true ? GuildMember : GuildMember | null; public id: Snowflake; public get joinedAt(): Date | null; public joinedTimestamp: number | null; public get manageable(): boolean; public thread: AnyThreadChannel; public get user(): User | null; public get partial(): false; /* tslint:disable:unified-signatures */ public remove(): Promise<ThreadMember>; /** @deprecated The `reason` parameter is deprecated as Discord does not parse them. */ public remove(reason?: string): Promise<ThreadMember>; /* tslint:enable:unified-signatures */ } export type ThreadMemberFlagsString = keyof typeof ThreadMemberFlags; export class ThreadMemberFlagsBitField extends BitField<ThreadMemberFlagsString> { public static Flags: typeof ThreadMemberFlags; public static resolve(bit?: BitFieldResolvable<ThreadMemberFlagsString, number>): number; } export interface ThumbnailComponentData extends BaseComponentData { media: UnfurledMediaItemData; description?: string; spoiler?: boolean; } export class ThumbnailComponent extends Component<APIThumbnailComponent> { private constructor(data: APIThumbnailComponent); public readonly media: UnfurledMediaItem; public get description(): string | null; public get spoiler(): boolean; } export class Typing extends Base { private constructor(channel: TextBasedChannel, user: PartialUser, data?: RawTypingData); public channel: TextBasedChannel; public user: User | PartialUser; public startedTimestamp: number; public get startedAt(): Date; public get guild(): Guild | null; public get member(): GuildMember | null; public inGuild(): this is this & { channel: TextChannel | NewsChannel | ThreadChannel; get guild(): Guild; }; } export interface AvatarDecorationData { asset: string; skuId: Snowflake; } export interface UnfurledMediaItemData { url: string; } export class UnfurledMediaItem { private constructor(data: APIUnfurledMediaItem); public readonly data: APIUnfurledMediaItem; public get url(): string; } // tslint:disable-next-line no-empty-interface export interface User extends PartialTextBasedChannelFields<false> {} export class User extends Base { protected constructor(client: Client<true>, data: RawUserData); private _equals(user: APIUser): boolean; public accentColor: number | null | undefined; public avatar: string | null; /** @deprecated Use {@link User.avatarDecorationData} instead */ public avatarDecoration: string | null; public avatarDecorationData: AvatarDecorationData | null; public banner: string | null | undefined; public bot: boolean; public get createdAt(): Date; public get createdTimestamp(): number; public discriminator: string; public get displayName(): string; public get defaultAvatarURL(): string; public get dmChannel(): DMChannel | null; public flags: Readonly<UserFlagsBitField> | null; public globalName: string | null; public get hexAccentColor(): HexColorString | null | undefined; public id: Snowflake; public get partial(): false; public system: boolean; public get tag(): string; public username: string; public avatarURL(options?: ImageURLOptions): string | null; public avatarDecorationURL(options?: BaseImageURLOptions): string | null; public bannerURL(options?: ImageURLOptions): string | null | undefined; public createDM(force?: boolean): Promise<DMChannel>; public deleteDM(): Promise<DMChannel>; public displayAvatarURL(options?: ImageURLOptions): string; public equals(user: User): boolean; public fetch(force?: boolean): Promise<User>; /** @deprecated This method is deprecated and will be removed in the next major version. Flags may still be retrieved via {@link User.fetch} */ public fetchFlags(force?: boolean): Promise<UserFlagsBitField>; public toString(): UserMention; } export class UserContextMenuCommandInteraction< Cached extends CacheType = CacheType, > extends ContextMenuCommandInteraction<Cached> { public commandType: ApplicationCommandType.User; public options: Omit< CommandInteractionOptionResolver<Cached>, | 'getMessage' | 'getFocused' | 'getMentionable' | 'getRole' | 'getNumber' | 'getAttachment' | 'getInteger' | 'getString' | 'getChannel' | 'getBoolean' | 'getSubcommandGroup' | 'getSubcommand' >; public get targetUser(): User; public get targetMember(): CacheTypeReducer<Cached, GuildMember, APIInteractionGuildMember> | null; public inGuild(): this is UserContextMenuCommandInteraction<'raw' | 'cached'>; public inCachedGuild(): this is UserContextMenuCommandInteraction<'cached'>; public inRawGuild(): this is UserContextMenuCommandInteraction<'raw'>; } export type UserFlagsString = keyof typeof UserFlags; export class UserFlagsBitField extends BitField<UserFlagsString> { public static Flags: typeof UserFlags; public static resolve(bit?: BitFieldResolvable<UserFlagsString, number>): number; } /** @internal */ export function basename(path: string, ext?: string): string; export function cleanContent(str: string, channel: TextBasedChannel): string; export function discordSort<Key, Value extends { rawPosition: number; id: Snowflake }>( collection: ReadonlyCollection<Key, Value>, ): Collection<Key, Value>; export function cleanCodeBlockContent(text: string): string; export function fetchRecommendedShardCount(token: string, options?: FetchRecommendedShardCountOptions): Promise<number>; export function flatten(obj: unknown, ...props: Record<string, boolean | string>[]): unknown; /** @internal */ export function makeError(obj: MakeErrorOptions): Error; /** @internal */ export function makePlainError(err: Error): MakeErrorOptions; /** @internal */ export function moveElementInArray( // eslint-disable-next-line no-restricted-syntax array: unknown[], element: unknown, newIndex: number, offset?: boolean, ): number; export function parseEmoji(text: string): PartialEmoji | null; export function resolveColor(color: ColorResolvable): number; /** @internal */ export function resolvePartialEmoji(emoji: Snowflake): PartialEmojiOnlyId; /** @internal */ export function resolvePartialEmoji(emoji: Emoji | EmojiIdentifierResolvable): PartialEmoji | null; export function verifyString(data: string, error?: typeof Error, errorMessage?: string, allowEmpty?: boolean): string; /** @internal */ export function setPosition<Item extends Channel | Role>( item: Item, position: number, relative: boolean, sorted: ReadonlyCollection<Snowflake, Item>, client: Client<true>, route: string, reason?: string, ): Promise<{ id: Snowflake; position: number }[]>; export function parseWebhookURL(url: string): WebhookClientDataIdWithToken | null; /** @internal */ export function transformResolved<Cached extends CacheType>( supportingData: SupportingInteractionResolvedData, data?: Extract< APIApplicationCommandInteractionData, APIChatInputApplicationCommandInteractionData | APIContextMenuInteractionData >['resolved'], ): CommandInteractionResolvedData<Cached>; export function resolveSKUId(resolvable: SKUResolvable): Snowflake | null; /** @internal */ export interface CreateChannelOptions { allowFromUnknownGuild?: boolean; } /** @internal */ export function createChannel( client: Client<true>, data: APIChannel, guild?: Guild, extras?: CreateChannelOptions, ): Channel; /** @deprecated This class is redundant as all methods of the class can be imported from discord.js directly. */ export class Formatters extends null { /** @deprecated Import this method directly from discord.js instead. */ public static blockQuote: typeof blockQuote; /** @deprecated Import this method directly from discord.js instead. */ public static bold: typeof bold; /** @deprecated Import this method directly from discord.js instead. */ public static channelMention: typeof channelMention; /** @deprecated Import this method directly from discord.js instead. */ public static codeBlock: typeof codeBlock; /** @deprecated Import this method directly from discord.js instead. */ public static formatEmoji: typeof formatEmoji; /** @deprecated Import this method directly from discord.js instead. */ public static hideLinkEmbed: typeof hideLinkEmbed; /** @deprecated Import this method directly from discord.js instead. */ public static hyperlink: typeof hyperlink; /** @deprecated Import this method directly from discord.js instead. */ public static inlineCode: typeof inlineCode; /** @deprecated Import this method directly from discord.js instead. */ public static italic: typeof italic; /** @deprecated Import this method directly from discord.js instead. */ public static quote: typeof quote; /** @deprecated Import this method directly from discord.js instead. */ public static roleMention: typeof roleMention; /** @deprecated Import this method directly from discord.js instead. */ public static spoiler: typeof spoiler; /** @deprecated Import this method directly from discord.js instead. */ public static strikethrough: typeof strikethrough; /** @deprecated Import this method directly from discord.js instead. */ public static time: typeof time; /** @deprecated Import this property directly from discord.js instead. */ public static TimestampStyles: typeof TimestampStyles; /** @deprecated Import this method directly from discord.js instead. */ public static underscore: typeof underscore; /** @deprecated Import this method directly from discord.js instead. */ public static userMention: typeof userMention; } export type ComponentData = | MessageActionRowComponentData | ModalActionRowComponentData | ComponentInContainerData | ContainerComponentData | ThumbnailComponentData; export interface SendSoundboardSoundOptions { soundId: Snowflake; guildId?: Snowflake; } export class VoiceChannel extends BaseGuildVoiceChannel { public get speakable(): boolean; public type: ChannelType.GuildVoice; public sendSoundboardSound(sound: SoundboardSound | SendSoundboardSoundOptions): Promise<void>; } export class VoiceChannelEffect { private constructor(data: GatewayVoiceChannelEffectSendDispatchData, guild: Guild); public guild: Guild; public channelId: Snowflake; public userId: Snowflake; public emoji: Emoji | null; public animationType: VoiceChannelEffectSendAnimationType | null; public animationId: number | null; public soundId: Snowflake | number | null; public soundVolume: number | null; public get channel(): VoiceChannel | null; public get soundboardSound(): GuildSoundboardSound | null; } export class VoiceRegion { private constructor(data: RawVoiceRegionData); public custom: boolean; public deprecated: boolean; public id: string; public name: string; public optimal: boolean; public toJSON(): unknown; } export class VoiceState extends Base { private constructor(guild: Guild, data: RawVoiceStateData); public get channel(): VoiceBasedChannel | null; public channelId: Snowflake | null; public get deaf(): boolean | null; public guild: Guild; public id: Snowflake; public get member(): GuildMember | null; public get mute(): boolean | null; public selfDeaf: boolean | null; public selfMute: boolean | null; public serverDeaf: boolean | null; public serverMute: boolean | null; public sessionId: string | null; public streaming: boolean | null; public selfVideo: boolean | null; public suppress: boolean | null; public requestToSpeakTimestamp: number | null; public setDeaf(deaf?: boolean, reason?: string): Promise<GuildMember>; public setMute(mute?: boolean, reason?: string): Promise<GuildMember>; public disconnect(reason?: string): Promise<GuildMember>; public setChannel(channel: GuildVoiceChannelResolvable | null, reason?: string): Promise<GuildMember>; public setRequestToSpeak(request?: boolean): Promise<this>; public setSuppressed(suppressed?: boolean): Promise<this>; public edit(options: VoiceStateEditOptions): Promise<this>; public fetch(force?: boolean): Promise<VoiceState>; } // tslint:disable-next-line no-empty-interface export interface Webhook<Type extends WebhookType = WebhookType> extends WebhookFields {} export class Webhook<Type extends WebhookType = WebhookType> { private constructor(client: Client<true>, data?: RawWebhookData); public avatar: string | null; public avatarURL(options?: ImageURLOptions): string | null; public channelId: Snowflake; public readonly client: Client; public guildId: Snowflake; public name: string; public owner: Type extends WebhookType.Incoming ? User | APIUser | null : User | APIUser; public sourceGuild: Type extends WebhookType.ChannelFollower ? Guild | APIPartialGuild : null; public sourceChannel: Type extends WebhookType.ChannelFollower ? NewsChannel | APIPartialChannel : null; public token: Type extends WebhookType.Incoming ? string : Type extends WebhookType.ChannelFollower ? null : string | null; public type: Type; public applicationId: Type extends WebhookType.Application ? Snowflake : null; public get channel(): TextChannel | VoiceChannel | NewsChannel | StageChannel | ForumChannel | MediaChannel | null; public isUserCreated(): this is Webhook<WebhookType.Incoming> & { owner: User | APIUser; }; public isApplicationCreated(): this is Webhook<WebhookType.Application>; public isIncoming(): this is Webhook<WebhookType.Incoming>; public isChannelFollower(): this is Webhook<WebhookType.ChannelFollower>; public editMessage( message: MessageResolvable, options: string | MessagePayload | WebhookMessageEditOptions, ): Promise<Message>; public fetchMessage(message: Snowflake, options?: WebhookFetchMessageOptions): Promise<Message>; public send(options: string | MessagePayload | WebhookMessageCreateOptions): Promise<Message>; } // tslint:disable-next-line no-empty-interface export interface WebhookClient extends WebhookFields, BaseClient {} export class WebhookClient extends BaseClient { public constructor(data: WebhookClientData, options?: WebhookClientOptions); public readonly client: this; public options: WebhookClientOptions; public token: string; public editMessage( message: MessageResolvable, options: string | MessagePayload | WebhookMessageEditOptions, ): Promise<APIMessage>; public fetchMessage(message: Snowflake, options?: WebhookFetchMessageOptions): Promise<APIMessage>; public send(options: string | MessagePayload | WebhookMessageCreateOptions): Promise<APIMessage>; } export class WebSocketManager extends EventEmitter { private constructor(client: Client); private readonly packetQueue: unknown[]; private destroyed: boolean; public readonly client: Client; public gateway: string | null; public shards: Collection<number, WebSocketShard>; public status: Status; public get ping(): number; public on(event: GatewayDispatchEvents, listener: (data: any, shardId: number) => void): this; public once(event: GatewayDispatchEvents, listener: (data: any, shardId: number) => void): this; private debug(messages: readonly string[], shardId?: number): void; private connect(): Promise<void>; private broadcast(packet: unknown): void; private destroy(): Promise<void>; private handlePacket(packet?: unknown, shard?: WebSocketShard): boolean; private checkShardsReady(): void; private triggerClientReady(): void; } export interface WebSocketShardEventTypes { ready: []; resumed: []; invalidSession: []; destroyed: []; close: [event: CloseEvent]; allReady: [unavailableGuilds?: Set<Snowflake>]; } export class WebSocketShard extends EventEmitter { private constructor(manager: WebSocketManager, id: number); private closeSequence: number; private sessionInfo: SessionInfo | null; public lastPingTimestamp: number; private expectedGuilds: Set<Snowflake> | null; private readyTimeout: NodeJS.Timeout | null; public manager: WebSocketManager; public id: number; public status: Status; public ping: number; private debug(messages: readonly string[]): void; private onReadyPacket(packet: unknown): void; private gotGuild(guildId: Snowflake): void; private checkReady(): void; private emitClose(event?: CloseEvent): void; public send(data: unknown, important?: boolean): void; public on<Event extends keyof WebSocketShardEventTypes>( event: Event, listener: (...args: WebSocketShardEventTypes[Event]) => void, ): this; public once<Event extends keyof WebSocketShardEventTypes>( event: Event, listener: (...args: WebSocketShardEventTypes[Event]) => void, ): this; } export class Widget extends Base { private constructor(client: Client<true>, data: RawWidgetData); private _patch(data: RawWidgetData): void; public fetch(): Promise<Widget>; public imageURL(style?: GuildWidgetStyle): string; public id: Snowflake; public name: string; public instantInvite?: string; public channels: Collection<Snowflake, WidgetChannel>; public members: Collection<string, WidgetMember>; public presenceCount: number; } export class WidgetMember extends Base { private constructor(client: Client<true>, data: RawWidgetMemberData); public id: string; public username: string; public discriminator: string; public avatar: string | null; public status: PresenceStatus; public deaf: boolean | null; public mute: boolean | null; public selfDeaf: boolean | null; public selfMute: boolean | null; public suppress: boolean | null; public channelId: Snowflake | null; public avatarURL: string; public activity: WidgetActivity | null; } export type SoundboardSoundResolvable = SoundboardSound | Snowflake | string; export class SoundboardSound extends Base { private constructor(client: Client<true>, data: APISoundboardSound); public name: string; public soundId: Snowflake | string; public volume: number; private _emoji: Omit<APIEmoji, 'animated'> | null; public guildId: Snowflake | null; public available: boolean; public user: User | null; public get createdAt(): Date; public get createdTimestamp(): number; public get emoji(): Emoji | null; public get guild(): Guild | null; public get url(): string; public edit(options?: GuildSoundboardSoundEditOptions): Promise<GuildSoundboardSound>; public delete(reason?: string): Promise<GuildSoundboardSound>; public equals(other: SoundboardSound | APISoundboardSound): boolean; } export type DefaultSoundboardSound = SoundboardSound & { get guild(): null; guildId: null; soundId: string }; export type GuildSoundboardSound = SoundboardSound & { get guild(): Guild; guildId: Snowflake; soundId: Snowflake }; export class WelcomeChannel extends Base { private constructor(guild: Guild, data: RawWelcomeChannelData); private _emoji: Omit<APIEmoji, 'animated'>; public channelId: Snowflake; public guild: Guild | InviteGuild; public description: string; public get channel(): TextChannel | NewsChannel | ForumChannel | MediaChannel | null; public get emoji(): GuildEmoji | Emoji; } export class WelcomeScreen extends Base { private constructor(guild: Guild, data: RawWelcomeScreenData); public get enabled(): boolean; public guild: Guild | InviteGuild; public description: string | null; public welcomeChannels: Collection<Snowflake, WelcomeChannel>; } //#endregion //#region Constants export type NonSystemMessageType = | MessageType.Default | MessageType.Reply | MessageType.ChatInputCommand | MessageType.ContextMenuCommand; export type UndeletableMessageType = | MessageType.RecipientAdd | MessageType.RecipientRemove | MessageType.Call | MessageType.ChannelNameChange | MessageType.ChannelIconChange | MessageType.ThreadStarterMessage; /** @deprecated This type will no longer be updated. Use {@link UndeletableMessageType} instead. */ export type DeletableMessageType = | MessageType.AutoModerationAction | MessageType.ChannelFollowAdd | MessageType.ChannelPinnedMessage | MessageType.ChatInputCommand | MessageType.ContextMenuCommand | MessageType.Default | MessageType.GuildBoost | MessageType.GuildBoostTier1 | MessageType.GuildBoostTier2 | MessageType.GuildBoostTier3 | MessageType.GuildInviteReminder | MessageType.InteractionPremiumUpsell | MessageType.Reply | MessageType.RoleSubscriptionPurchase | MessageType.StageEnd | MessageType.StageRaiseHand | MessageType.StageSpeaker | MessageType.StageStart | MessageType.StageTopic | MessageType.ThreadCreated | MessageType.UserJoin; export const Constants: { MaxBulkDeletableMessageAge: 1_209_600_000; SweeperKeys: SweeperKey[]; NonSystemMessageTypes: NonSystemMessageType[]; TextBasedChannelTypes: TextBasedChannelTypes[]; SendableChannels: SendableChannelTypes[]; GuildTextBasedChannelTypes: GuildTextBasedChannelTypes[]; ThreadChannelTypes: ThreadChannelType[]; VoiceBasedChannelTypes: VoiceBasedChannelTypes[]; SelectMenuTypes: SelectMenuType[]; UndeletableMessageTypes: UndeletableMessageType[]; /** @deprecated This list will no longer be updated. Use {@link Constants.UndeletableMessageTypes} instead. */ DeletableMessageTypes: DeletableMessageType[]; StickerFormatExtensionMap: Record<StickerFormatType, ImageFormat>; }; export const version: string; //#endregion //#region Errors export enum DiscordjsErrorCodes { ClientInvalidOption = 'ClientInvalidOption', ClientInvalidProvidedShards = 'ClientInvalidProvidedShards', ClientMissingIntents = 'ClientMissingIntents', ClientNotReady = 'ClientNotReady', TokenInvalid = 'TokenInvalid', TokenMissing = 'TokenMissing', ApplicationCommandPermissionsTokenMissing = 'ApplicationCommandPermissionsTokenMissing', /** @deprecated WebSocket errors are now handled in `@discordjs/ws` */ WSCloseRequested = 'WSCloseRequested', /** @deprecated WebSocket errors are now handled in `@discordjs/ws` */ WSConnectionExists = 'WSConnectionExists', /** @deprecated WebSocket errors are now handled in `@discordjs/ws` */ WSNotOpen = 'WSNotOpen', /** @deprecated No longer in use */ ManagerDestroyed = 'ManagerDestroyed', BitFieldInvalid = 'BitFieldInvalid', /** @deprecated This error is now handled in `@discordjs/ws` */ ShardingInvalid = 'ShardingInvalid', /** @deprecated This error is now handled in `@discordjs/ws` */ ShardingRequired = 'ShardingRequired', /** @deprecated This error is now handled in `@discordjs/ws` */ InvalidIntents = 'InvalidIntents', /** @deprecated This error is now handled in `@discordjs/ws` */ DisallowedIntents = 'DisallowedIntents', ShardingNoShards = 'ShardingNoShards', ShardingInProcess = 'ShardingInProcess', ShardingInvalidEvalBroadcast = 'ShardingInvalidEvalBroadcast', ShardingShardNotFound = 'ShardingShardNotFound', ShardingAlreadySpawned = 'ShardingAlreadySpawned', ShardingProcessExists = 'ShardingProcessExists', ShardingWorkerExists = 'ShardingWorkerExists', ShardingReadyTimeout = 'ShardingReadyTimeout', ShardingReadyDisconnected = 'ShardingReadyDisconnected', ShardingReadyDied = 'ShardingReadyDied', ShardingNoChildExists = 'ShardingNoChildExists', ShardingShardMiscalculation = 'ShardingShardMiscalculation', ColorRange = 'ColorRange', ColorConvert = 'ColorConvert', InviteOptionsMissingChannel = 'InviteOptionsMissingChannel', /** @deprecated Button validation errors are now handled in `@discordjs/builders` */ ButtonLabel = 'ButtonLabel', /** @deprecated Button validation errors are now handled in `@discordjs/builders` */ ButtonURL = 'ButtonURL', /** @deprecated Button validation errors are now handled in `@discordjs/builders` */ ButtonCustomId = 'ButtonCustomId', /** @deprecated Select Menu validation errors are now handled in `@discordjs/builders` */ SelectMenuCustomId = 'SelectMenuCustomId', /** @deprecated Select Menu validation errors are now handled in `@discordjs/builders` */ SelectMenuPlaceholder = 'SelectMenuPlaceholder', /** @deprecated Select Menu validation errors are now handled in `@discordjs/builders` */ SelectOptionLabel = 'SelectOptionLabel', /** @deprecated Select Menu validation errors are now handled in `@discordjs/builders` */ SelectOptionValue = 'SelectOptionValue', /** @deprecated Select Menu validation errors are now handled in `@discordjs/builders` */ SelectOptionDescription = 'SelectOptionDescription', InteractionCollectorError = 'InteractionCollectorError', FileNotFound = 'FileNotFound', /** @deprecated No longer in use */ UserBannerNotFetched = 'UserBannerNotFetched', UserNoDMChannel = 'UserNoDMChannel', VoiceNotStageChannel = 'VoiceNotStageChannel', VoiceStateNotOwn = 'VoiceStateNotOwn', VoiceStateInvalidType = 'VoiceStateInvalidType', ReqResourceType = 'ReqResourceType', /** @deprecated This error is now handled in `@discordjs/rest` */ ImageFormat = 'ImageFormat', /** @deprecated This error is now handled in `@discordjs/rest` */ ImageSize = 'ImageSize', MessageBulkDeleteType = 'MessageBulkDeleteType', MessageContentType = 'MessageContentType', MessageNonceRequired = 'MessageNonceRequired', MessageNonceType = 'MessageNonceType', /** @deprecated No longer in use */ SplitMaxLen = 'SplitMaxLen', BanResolveId = 'BanResolveId', FetchBanResolveId = 'FetchBanResolveId', PruneDaysType = 'PruneDaysType', GuildChannelResolve = 'GuildChannelResolve', GuildVoiceChannelResolve = 'GuildVoiceChannelResolve', GuildChannelOrphan = 'GuildChannelOrphan', GuildChannelUnowned = 'GuildChannelUnowned', GuildOwned = 'GuildOwned', GuildMembersTimeout = 'GuildMembersTimeout', GuildSoundboardSoundsTimeout = 'GuildSoundboardSoundsTimeout', GuildUncachedMe = 'GuildUncachedMe', ChannelNotCached = 'ChannelNotCached', StageChannelResolve = 'StageChannelResolve', GuildScheduledEventResolve = 'GuildScheduledEventResolve', FetchOwnerId = 'FetchOwnerId', InvalidType = 'InvalidType', InvalidElement = 'InvalidElement', MessageThreadParent = 'MessageThreadParent', MessageExistingThread = 'MessageExistingThread', ThreadInvitableType = 'ThreadInvitableType', WebhookMessage = 'WebhookMessage', WebhookTokenUnavailable = 'WebhookTokenUnavailable', WebhookURLInvalid = 'WebhookURLInvalid', WebhookApplication = 'WebhookApplication', MessageReferenceMissing = 'MessageReferenceMissing', EmojiType = 'EmojiType', EmojiManaged = 'EmojiManaged', MissingManageGuildExpressionsPermission = 'MissingManageGuildExpressionsPermission', /** @deprecated Use {@link DiscordjsErrorCodes.MissingManageGuildExpressionsPermission} instead. */ MissingManageEmojisAndStickersPermission = 'MissingManageEmojisAndStickersPermission', NotGuildSoundboardSound = 'NotGuildSoundboardSound', NotGuildSticker = 'NotGuildSticker', ReactionResolveUser = 'ReactionResolveUser', /** @deprecated Not used anymore since the introduction of `GUILD_WEB_PAGE_VANITY_URL` feature */ VanityURL = 'VanityURL', InviteResolveCode = 'InviteResolveCode', InviteNotFound = 'InviteNotFound', DeleteGroupDMChannel = 'DeleteGroupDMChannel', FetchGroupDMChannel = 'FetchGroupDMChannel', MemberFetchNonceLength = 'MemberFetchNonceLength', GlobalCommandPermissions = 'GlobalCommandPermissions', GuildUncachedEntityResolve = 'GuildUncachedEntityResolve', InteractionAlreadyReplied = 'InteractionAlreadyReplied', InteractionNotReplied = 'InteractionNotReplied', /** @deprecated Not used anymore since ephemeral replies can now be deleted */ InteractionEphemeralReplied = 'InteractionEphemeralReplied', CommandInteractionOptionNotFound = 'CommandInteractionOptionNotFound', CommandInteractionOptionType = 'CommandInteractionOptionType', CommandInteractionOptionEmpty = 'CommandInteractionOptionEmpty', CommandInteractionOptionNoSubcommand = 'CommandInteractionOptionNoSubcommand', CommandInteractionOptionNoSubcommandGroup = 'CommandInteractionOptionNoSubcommandGroup', AutocompleteInteractionOptionNoFocusedOption = 'AutocompleteInteractionOptionNoFocusedOption', ModalSubmitInteractionFieldNotFound = 'ModalSubmitInteractionFieldNotFound', ModalSubmitInteractionFieldType = 'ModalSubmitInteractionFieldType', InvalidMissingScopes = 'InvalidMissingScopes', InvalidScopesWithPermissions = 'InvalidScopesWithPermissions', NotImplemented = 'NotImplemented', SweepFilterReturn = 'SweepFilterReturn', GuildForumMessageRequired = 'GuildForumMessageRequired', EntitlementCreateInvalidOwner = 'EntitlementCreateInvalidOwner', BulkBanUsersOptionEmpty = 'BulkBanUsersOptionEmpty', PollAlreadyExpired = 'PollAlreadyExpired', } export class DiscordjsError extends Error { private constructor(code: DiscordjsErrorCodes, ...args: unknown[]); public readonly code: DiscordjsErrorCodes; public get name(): `Error [${DiscordjsErrorCodes}]`; } export class DiscordjsTypeError extends TypeError { private constructor(code: DiscordjsErrorCodes, ...args: unknown[]); public readonly code: DiscordjsErrorCodes; public get name(): `TypeError [${DiscordjsErrorCodes}]`; } export class DiscordjsRangeError extends RangeError { private constructor(code: DiscordjsErrorCodes, ...args: unknown[]); public readonly code: DiscordjsErrorCodes; public get name(): `RangeError [${DiscordjsErrorCodes}]`; } //#endregion //#region Managers export abstract class BaseManager { protected constructor(client: Client); public readonly client: Client; } export abstract class DataManager<Key, Holds, Resolvable> extends BaseManager { protected constructor(client: Client<true>, holds: Constructable<Holds>); public readonly holds: Constructable<Holds>; public get cache(): Collection<Key, Holds>; public resolve(resolvable: Holds): Holds; public resolve(resolvable: Resolvable): Holds | null; public resolveId(resolvable: Key | Holds): Key; public resolveId(resolvable: Resolvable): Key | null; public valueOf(): Collection<Key, Holds>; } export abstract class CachedManager<Key, Holds, Resolvable> extends DataManager<Key, Holds, Resolvable> { protected constructor(client: Client<true>, holds: Constructable<Holds>, iterable?: Iterable<Holds>); private readonly _cache: Collection<Key, Holds>; private _add(data: unknown, cache?: boolean, { id, extras }?: { id: Key; extras: unknown[] }): Holds; } export type ApplicationCommandDataResolvable = | ApplicationCommandData | RESTPostAPIApplicationCommandsJSONBody | JSONEncodable<RESTPostAPIApplicationCommandsJSONBody>; export class ApplicationCommandManager< ApplicationCommandScope = ApplicationCommand<{ guild: GuildResolvable }>, PermissionsOptionsExtras = { guild: GuildResolvable }, PermissionsGuildType = null, > extends CachedManager<Snowflake, ApplicationCommandScope, ApplicationCommandResolvable> { protected constructor(client: Client<true>, iterable?: Iterable<unknown>); public permissions: ApplicationCommandPermissionsManager< { command?: ApplicationCommandResolvable } & PermissionsOptionsExtras, { command: ApplicationCommandResolvable } & PermissionsOptionsExtras, PermissionsGuildType, null >; private commandPath({ id, guildId }: { id?: Snowflake; guildId?: Snowflake }): string; public create(command: ApplicationCommandDataResolvable, guildId?: Snowflake): Promise<ApplicationCommandScope>; public delete(command: ApplicationCommandResolvable, guildId?: Snowflake): Promise<ApplicationCommandScope | null>; public edit( command: ApplicationCommandResolvable, data: Partial<ApplicationCommandDataResolvable>, ): Promise<ApplicationCommandScope>; public edit( command: ApplicationCommandResolvable, data: Partial<ApplicationCommandDataResolvable>, guildId: Snowflake, ): Promise<ApplicationCommand>; public fetch( id: Snowflake, options: FetchApplicationCommandOptions & { guildId: Snowflake }, ): Promise<ApplicationCommand>; public fetch(options: FetchApplicationCommandOptions): Promise<Collection<Snowflake, ApplicationCommandScope>>; public fetch(id: Snowflake, options?: FetchApplicationCommandOptions): Promise<ApplicationCommandScope>; public fetch( id?: Snowflake, options?: FetchApplicationCommandOptions, ): Promise<Collection<Snowflake, ApplicationCommandScope>>; public set( commands: readonly ApplicationCommandDataResolvable[], ): Promise<Collection<Snowflake, ApplicationCommandScope>>; public set( commands: readonly ApplicationCommandDataResolvable[], guildId: Snowflake, ): Promise<Collection<Snowflake, ApplicationCommand>>; private static transformCommand(command: ApplicationCommandDataResolvable): RESTPostAPIApplicationCommandsJSONBody; } export class ApplicationCommandPermissionsManager< BaseOptions, FetchSingleOptions, GuildType, CommandIdType, > extends BaseManager { private constructor(manager: ApplicationCommandManager | GuildApplicationCommandManager | ApplicationCommand); private manager: ApplicationCommandManager | GuildApplicationCommandManager | ApplicationCommand; public commandId: CommandIdType; public guild: GuildType; public guildId: Snowflake | null; public add( options: FetchSingleOptions & EditApplicationCommandPermissionsMixin, ): Promise<ApplicationCommandPermissions[]>; public has( options: FetchSingleOptions & { permissionId: ApplicationCommandPermissionIdResolvable; permissionType?: ApplicationCommandPermissionType; }, ): Promise<boolean>; public fetch(options: FetchSingleOptions): Promise<ApplicationCommandPermissions[]>; public fetch(options: BaseOptions): Promise<Collection<Snowflake, ApplicationCommandPermissions[]>>; public remove( options: | (FetchSingleOptions & { token: string; channels?: readonly (GuildChannelResolvable | ChannelPermissionConstant)[]; roles?: readonly (RoleResolvable | RolePermissionConstant)[]; users: readonly UserResolvable[]; }) | (FetchSingleOptions & { token: string; channels?: readonly (GuildChannelResolvable | ChannelPermissionConstant)[]; roles: readonly (RoleResolvable | RolePermissionConstant)[]; users?: readonly UserResolvable[]; }) | (FetchSingleOptions & { token: string; channels: readonly (GuildChannelResolvable | ChannelPermissionConstant)[]; roles?: readonly (RoleResolvable | RolePermissionConstant)[]; users?: readonly UserResolvable[]; }), ): Promise<ApplicationCommandPermissions[]>; public set( options: FetchSingleOptions & EditApplicationCommandPermissionsMixin, ): Promise<ApplicationCommandPermissions[]>; private permissionsPath(guildId: Snowflake, commandId?: Snowflake): string; } export class AutoModerationRuleManager extends CachedManager< Snowflake, AutoModerationRule, AutoModerationRuleResolvable > { private constructor(guild: Guild, iterable: unknown); public guild: Guild; public create(options: AutoModerationRuleCreateOptions): Promise<AutoModerationRule>; public edit( autoModerationRule: AutoModerationRuleResolvable, options: AutoModerationRuleEditOptions, ): Promise<AutoModerationRule>; public fetch(options: AutoModerationRuleResolvable | FetchAutoModerationRuleOptions): Promise<AutoModerationRule>; public fetch(options?: FetchAutoModerationRulesOptions): Promise<Collection<Snowflake, AutoModerationRule>>; public delete(autoModerationRule: AutoModerationRuleResolvable, reason?: string): Promise<void>; } export class BaseGuildEmojiManager extends CachedManager<Snowflake, GuildEmoji, EmojiResolvable> { protected constructor(client: Client<true>, iterable?: Iterable<RawGuildEmojiData>); public resolveIdentifier(emoji: EmojiIdentifierResolvable): string | null; } export class CategoryChannelChildManager extends DataManager<Snowflake, CategoryChildChannel, GuildChannelResolvable> { private constructor(channel: CategoryChannel); public channel: CategoryChannel; public get guild(): Guild; public create<Type extends CategoryChannelType>( options: CategoryCreateChannelOptions & { type: Type }, ): Promise<MappedChannelCategoryTypes[Type]>; public create(options: CategoryCreateChannelOptions): Promise<TextChannel>; } export class ChannelManager extends CachedManager<Snowflake, Channel, ChannelResolvable> { private constructor(client: Client<true>, iterable: Iterable<RawChannelData>); public fetch(id: Snowflake, options?: FetchChannelOptions): Promise<Channel | null>; } export type EntitlementResolvable = Snowflake | Entitlement; export type SKUResolvable = Snowflake | SKU; export type SubscriptionResolvable = Snowflake | Subscription; export interface GuildEntitlementCreateOptions { sku: SKUResolvable; guild: GuildResolvable; } export interface UserEntitlementCreateOptions { sku: SKUResolvable; user: UserResolvable; } export interface FetchEntitlementOptions extends BaseFetchOptions { entitlement: EntitlementResolvable; } export interface FetchEntitlementsOptions { limit?: number; guild?: GuildResolvable; user?: UserResolvable; skus?: readonly SKUResolvable[]; excludeEnded?: boolean; excludeDeleted?: boolean; cache?: boolean; before?: Snowflake; after?: Snowflake; } export class EntitlementManager extends CachedManager<Snowflake, Entitlement, EntitlementResolvable> { private constructor(client: Client<true>, iterable: Iterable<APIEntitlement>); public fetch(options: EntitlementResolvable | FetchEntitlementOptions): Promise<Entitlement>; public fetch(options?: FetchEntitlementsOptions): Promise<Collection<Snowflake, Entitlement>>; public createTest(options: GuildEntitlementCreateOptions | UserEntitlementCreateOptions): Promise<Entitlement>; public deleteTest(entitlement: EntitlementResolvable): Promise<void>; public consume(entitlementId: Snowflake): Promise<void>; } export interface FetchSubscriptionOptions extends BaseFetchOptions { sku: SKUResolvable; subscriptionId: Snowflake; } export interface FetchSubscriptionsOptions { after?: Snowflake; before?: Snowflake; limit?: number; sku: SKUResolvable; user: UserResolvable; } export class SubscriptionManager extends CachedManager<Snowflake, Subscription, SubscriptionResolvable> { private constructor(client: Client<true>, iterable?: Iterable<APISubscription>); public fetch(options: FetchSubscriptionOptions): Promise<Subscription>; public fetch(options: FetchSubscriptionsOptions): Promise<Collection<Snowflake, Subscription>>; } export interface FetchGuildApplicationCommandFetchOptions extends Omit<FetchApplicationCommandOptions, 'guildId'> {} export class GuildApplicationCommandManager extends ApplicationCommandManager<ApplicationCommand, {}, Guild> { private constructor(guild: Guild, iterable?: Iterable<RawApplicationCommandData>); public guild: Guild; public create(command: ApplicationCommandDataResolvable): Promise<ApplicationCommand>; public delete(command: ApplicationCommandResolvable): Promise<ApplicationCommand | null>; public edit( command: ApplicationCommandResolvable, data: Partial<ApplicationCommandDataResolvable>, ): Promise<ApplicationCommand>; public fetch(id: Snowflake, options?: FetchGuildApplicationCommandFetchOptions): Promise<ApplicationCommand>; public fetch(options: FetchGuildApplicationCommandFetchOptions): Promise<Collection<Snowflake, ApplicationCommand>>; public fetch( id?: undefined, options?: FetchGuildApplicationCommandFetchOptions, ): Promise<Collection<Snowflake, ApplicationCommand>>; public set(commands: readonly ApplicationCommandDataResolvable[]): Promise<Collection<Snowflake, ApplicationCommand>>; } export type MappedGuildChannelTypes = { [ChannelType.GuildCategory]: CategoryChannel; } & MappedChannelCategoryTypes; export type GuildChannelTypes = CategoryChannelType | ChannelType.GuildCategory; export class GuildChannelManager extends CachedManager<Snowflake, GuildBasedChannel, GuildChannelResolvable> { private constructor(guild: Guild, iterable?: Iterable<RawGuildChannelData>); public get channelCountWithoutThreads(): number; public guild: Guild; public addFollower( channel: NewsChannelResolvable, targetChannel: TextChannelResolvable, reason?: string, ): Promise<Snowflake>; public create<Type extends GuildChannelTypes>( options: GuildChannelCreateOptions & { type: Type }, ): Promise<MappedGuildChannelTypes[Type]>; public create(options: GuildChannelCreateOptions): Promise<TextChannel>; public createWebhook(options: WebhookCreateOptions): Promise<Webhook<WebhookType.Incoming>>; public edit(channel: GuildChannelResolvable, data: GuildChannelEditOptions): Promise<GuildChannel>; public fetch(id: Snowflake, options?: BaseFetchOptions): Promise<GuildBasedChannel | null>; public fetch( id?: undefined, options?: BaseFetchOptions, ): Promise<Collection<Snowflake, NonThreadGuildBasedChannel | null>>; public fetchWebhooks( channel: GuildChannelResolvable, ): Promise<Collection<Snowflake, Webhook<WebhookType.ChannelFollower | WebhookType.Incoming>>>; public setPosition( channel: GuildChannelResolvable, position: number, options?: SetChannelPositionOptions, ): Promise<GuildChannel>; public setPositions(channelPositions: readonly ChannelPosition[]): Promise<Guild>; public fetchActiveThreads(cache?: boolean): Promise<FetchedThreads>; private rawFetchGuildActiveThreads(): Promise<RESTGetAPIGuildThreadsResult>; public delete(channel: GuildChannelResolvable, reason?: string): Promise<void>; } export class GuildEmojiManager extends BaseGuildEmojiManager { private constructor(guild: Guild, iterable?: Iterable<RawGuildEmojiData>); public guild: Guild; public create(options: GuildEmojiCreateOptions): Promise<GuildEmoji>; public fetch(id: Snowflake, options?: BaseFetchOptions): Promise<GuildEmoji>; public fetch(id?: undefined, options?: BaseFetchOptions): Promise<Collection<Snowflake, GuildEmoji>>; public fetchAuthor(emoji: EmojiResolvable): Promise<User>; public delete(emoji: EmojiResolvable, reason?: string): Promise<void>; public edit(emoji: EmojiResolvable, options: GuildEmojiEditOptions): Promise<GuildEmoji>; } export class GuildEmojiRoleManager extends DataManager<Snowflake, Role, RoleResolvable> { private constructor(emoji: GuildEmoji); public emoji: GuildEmoji; public guild: Guild; public add( roleOrRoles: RoleResolvable | readonly RoleResolvable[] | ReadonlyCollection<Snowflake, Role>, ): Promise<GuildEmoji>; public set(roles: readonly RoleResolvable[] | ReadonlyCollection<Snowflake, Role>): Promise<GuildEmoji>; public remove( roleOrRoles: RoleResolvable | readonly RoleResolvable[] | ReadonlyCollection<Snowflake, Role>, ): Promise<GuildEmoji>; } export interface FetchSoundboardSoundsOptions { guildIds: readonly Snowflake[]; time?: number; } export class GuildManager extends CachedManager<Snowflake, Guild, GuildResolvable> { private constructor(client: Client<true>, iterable?: Iterable<RawGuildData>); public create(options: GuildCreateOptions): Promise<Guild>; public fetch(options: Snowflake | FetchGuildOptions): Promise<Guild>; public fetch(options?: FetchGuildsOptions): Promise<Collection<Snowflake, OAuth2Guild>>; public fetchSoundboardSounds( options: FetchSoundboardSoundsOptions, ): Promise<Collection<Snowflake, Collection<Snowflake, GuildSoundboardSound>>>; public setIncidentActions( guild: GuildResolvable, incidentActions: IncidentActionsEditOptions, ): Promise<IncidentActions>; public widgetImageURL(guild: GuildResolvable, style?: GuildWidgetStyle): string; } export interface AddOrRemoveGuildMemberRoleOptions { user: GuildMemberResolvable; role: RoleResolvable; reason?: string; } export class GuildMemberManager extends CachedManager<Snowflake, GuildMember, GuildMemberResolvable> { private constructor(guild: Guild, iterable?: Iterable<RawGuildMemberData>); public guild: Guild; public get me(): GuildMember | null; public add( user: UserResolvable, options: AddGuildMemberOptions & { fetchWhenExisting: false }, ): Promise<GuildMember | null>; public add(user: UserResolvable, options: AddGuildMemberOptions): Promise<GuildMember>; public ban(user: UserResolvable, options?: BanOptions): Promise<GuildMember | User | Snowflake>; public bulkBan( users: ReadonlyCollection<Snowflake, UserResolvable> | readonly UserResolvable[], options?: BulkBanOptions, ): Promise<BulkBanResult>; public edit(user: UserResolvable, options: GuildMemberEditOptions): Promise<GuildMember>; public fetch( options: UserResolvable | FetchMemberOptions | (FetchMembersOptions & { user: UserResolvable }), ): Promise<GuildMember>; public fetch(options?: FetchMembersOptions): Promise<Collection<Snowflake, GuildMember>>; public fetchMe(options?: BaseFetchOptions): Promise<GuildMember>; public kick(user: UserResolvable, reason?: string): Promise<GuildMember | User | Snowflake>; public list(options?: GuildListMembersOptions): Promise<Collection<Snowflake, GuildMember>>; public prune(options: GuildPruneMembersOptions & { dry?: false; count: false }): Promise<null>; public prune(options?: GuildPruneMembersOptions): Promise<number>; public search(options: GuildSearchMembersOptions): Promise<Collection<Snowflake, GuildMember>>; public unban(user: UserResolvable, reason?: string): Promise<User | null>; public addRole(options: AddOrRemoveGuildMemberRoleOptions): Promise<GuildMember | User | Snowflake>; public removeRole(options: AddOrRemoveGuildMemberRoleOptions): Promise<GuildMember | User | Snowflake>; } export class GuildBanManager extends CachedManager<Snowflake, GuildBan, GuildBanResolvable> { private constructor(guild: Guild, iterable?: Iterable<RawGuildBanData>); public guild: Guild; public create(user: UserResolvable, options?: BanOptions): Promise<GuildMember | User | Snowflake>; public fetch(options: UserResolvable | FetchBanOptions): Promise<GuildBan>; public fetch(options?: FetchBansOptions): Promise<Collection<Snowflake, GuildBan>>; public remove(user: UserResolvable, reason?: string): Promise<User | null>; public bulkCreate( users: ReadonlyCollection<Snowflake, UserResolvable> | readonly UserResolvable[], options?: BulkBanOptions, ): Promise<BulkBanResult>; } export class GuildInviteManager extends DataManager<string, Invite, InviteResolvable> { private constructor(guild: Guild, iterable?: Iterable<RawInviteData>); public guild: Guild; public create(channel: GuildInvitableChannelResolvable, options?: InviteCreateOptions): Promise<Invite>; public fetch(options: InviteResolvable | FetchInviteOptions): Promise<Invite>; public fetch(options?: FetchInvitesOptions): Promise<Collection<string, Invite>>; public delete(invite: InviteResolvable, reason?: string): Promise<Invite>; } export class GuildScheduledEventManager extends CachedManager< Snowflake, GuildScheduledEvent, GuildScheduledEventResolvable > { private constructor(guild: Guild, iterable?: Iterable<RawGuildScheduledEventData>); public guild: Guild; public create(options: GuildScheduledEventCreateOptions): Promise<GuildScheduledEvent>; public fetch(): Promise<Collection<Snowflake, GuildScheduledEvent>>; public fetch< Options extends GuildScheduledEventResolvable | FetchGuildScheduledEventOptions | FetchGuildScheduledEventsOptions, >(options?: Options): Promise<GuildScheduledEventManagerFetchResult<Options>>; public edit< Status extends GuildScheduledEventStatus, AcceptableStatus extends GuildScheduledEventSetStatusArg<Status>, >( guildScheduledEvent: GuildScheduledEventResolvable, options: GuildScheduledEventEditOptions<Status, AcceptableStatus>, ): Promise<GuildScheduledEvent<AcceptableStatus>>; public delete(guildScheduledEvent: GuildScheduledEventResolvable): Promise<void>; public fetchSubscribers<Options extends FetchGuildScheduledEventSubscribersOptions>( guildScheduledEvent: GuildScheduledEventResolvable, options?: Options, ): Promise<GuildScheduledEventManagerFetchSubscribersResult<Options>>; } export interface GuildSoundboardSoundCreateOptions { file: BufferResolvable | Stream; name: string; contentType?: string; volume?: number; emojiId?: Snowflake; emojiName?: string; reason?: string; } export interface GuildSoundboardSoundEditOptions { name?: string; volume?: number | null; emojiId?: Snowflake | null; emojiName?: string | null; reason?: string; } export interface FetchGuildSoundboardSoundOptions extends BaseFetchOptions { soundboardSound: SoundboardSoundResolvable; } export interface FetchGuildSoundboardSoundsOptions extends Pick<BaseFetchOptions, 'cache'> {} export class GuildSoundboardSoundManager extends CachedManager<Snowflake, SoundboardSound, SoundboardSoundResolvable> { private constructor(guild: Guild, iterable?: Iterable<APISoundboardSound>); public guild: Guild; public create(options: GuildSoundboardSoundCreateOptions): Promise<GuildSoundboardSound>; public edit( soundboardSound: SoundboardSoundResolvable, options: GuildSoundboardSoundEditOptions, ): Promise<GuildSoundboardSound>; public delete(soundboardSound: SoundboardSoundResolvable): Promise<void>; public fetch(options: SoundboardSoundResolvable | FetchGuildSoundboardSoundOptions): Promise<GuildSoundboardSound>; public fetch(options?: FetchGuildSoundboardSoundsOptions): Promise<Collection<Snowflake, GuildSoundboardSound>>; } export class GuildStickerManager extends CachedManager<Snowflake, Sticker, StickerResolvable> { private constructor(guild: Guild, iterable?: Iterable<RawStickerData>); public guild: Guild; public create(options: GuildStickerCreateOptions): Promise<Sticker>; public edit(sticker: StickerResolvable, data?: GuildStickerEditOptions): Promise<Sticker>; public delete(sticker: StickerResolvable, reason?: string): Promise<void>; public fetch(id: Snowflake, options?: BaseFetchOptions): Promise<Sticker>; public fetch(id?: Snowflake, options?: BaseFetchOptions): Promise<Collection<Snowflake, Sticker>>; public fetchUser(sticker: StickerResolvable): Promise<User | null>; } export class GuildMemberRoleManager extends DataManager<Snowflake, Role, RoleResolvable> { private constructor(member: GuildMember); public get hoist(): Role | null; public get icon(): Role | null; public get color(): Role | null; public get highest(): Role; public get premiumSubscriberRole(): Role | null; public get botRole(): Role | null; public member: GuildMember; public guild: Guild; public add( roleOrRoles: RoleResolvable | readonly RoleResolvable[] | ReadonlyCollection<Snowflake, Role>, reason?: string, ): Promise<GuildMember>; public set( roles: readonly RoleResolvable[] | ReadonlyCollection<Snowflake, Role>, reason?: string, ): Promise<GuildMember>; public remove( roleOrRoles: RoleResolvable | readonly RoleResolvable[] | ReadonlyCollection<Snowflake, Role>, reason?: string, ): Promise<GuildMember>; } export interface FetchPollAnswerVotersOptions extends BaseFetchPollAnswerVotersOptions { messageId: Snowflake; answerId: number; } export abstract class MessageManager<InGuild extends boolean = boolean> extends CachedManager< Snowflake, Message<InGuild>, MessageResolvable > { protected constructor(channel: TextBasedChannel, iterable?: Iterable<RawMessageData>); public channel: TextBasedChannel; public delete(message: MessageResolvable): Promise<void>; public edit( message: MessageResolvable, options: string | MessagePayload | MessageEditOptions, ): Promise<Message<InGuild>>; public fetch(options: MessageResolvable | FetchMessageOptions): Promise<Message<InGuild>>; public fetch(options?: FetchMessagesOptions): Promise<Collection<Snowflake, Message<InGuild>>>; public fetchPinned(cache?: boolean): Promise<Collection<Snowflake, Message<InGuild>>>; public react(message: MessageResolvable, emoji: EmojiIdentifierResolvable): Promise<void>; public pin(message: MessageResolvable, reason?: string): Promise<void>; public unpin(message: MessageResolvable, reason?: string): Promise<void>; public endPoll(messageId: Snowflake): Promise<Message>; public fetchPollAnswerVoters(options: FetchPollAnswerVotersOptions): Promise<Collection<Snowflake, User>>; } export class DMMessageManager extends MessageManager { public channel: DMChannel; } export class PartialGroupDMMessageManager extends MessageManager { public channel: PartialGroupDMChannel; } export class GuildMessageManager extends MessageManager<true> { public channel: GuildTextBasedChannel; public crosspost(message: MessageResolvable): Promise<Message<true>>; } export class PermissionOverwriteManager extends CachedManager< Snowflake, PermissionOverwrites, PermissionOverwriteResolvable > { private constructor(client: Client<true>, iterable?: Iterable<RawPermissionOverwriteData>); public set( overwrites: readonly OverwriteResolvable[] | ReadonlyCollection<Snowflake, OverwriteResolvable>, reason?: string, ): Promise<NonThreadGuildBasedChannel>; private upsert( userOrRole: RoleResolvable | UserResolvable, options: PermissionOverwriteOptions, overwriteOptions?: GuildChannelOverwriteOptions, existing?: PermissionOverwrites, ): Promise<NonThreadGuildBasedChannel>; public create( userOrRole: RoleResolvable | UserResolvable, options: PermissionOverwriteOptions, overwriteOptions?: GuildChannelOverwriteOptions, ): Promise<NonThreadGuildBasedChannel>; public edit( userOrRole: RoleResolvable | UserResolvable, options: PermissionOverwriteOptions, overwriteOptions?: GuildChannelOverwriteOptions, ): Promise<NonThreadGuildBasedChannel>; public delete(userOrRole: RoleResolvable | UserResolvable, reason?: string): Promise<NonThreadGuildBasedChannel>; } export class PresenceManager extends CachedManager<Snowflake, Presence, PresenceResolvable> { private constructor(client: Client<true>, iterable?: Iterable<RawPresenceData>); } export class ReactionManager extends CachedManager<Snowflake | string, MessageReaction, MessageReactionResolvable> { private constructor(message: Message, iterable?: Iterable<RawMessageReactionData>); public message: Message; public removeAll(): Promise<Message>; } export class ReactionUserManager extends CachedManager<Snowflake, User, UserResolvable> { private constructor(reaction: MessageReaction, iterable?: Iterable<RawUserData>); public reaction: MessageReaction; public fetch(options?: FetchReactionUsersOptions): Promise<Collection<Snowflake, User>>; public remove(user?: UserResolvable): Promise<MessageReaction>; } export class RoleManager extends CachedManager<Snowflake, Role, RoleResolvable> { private constructor(guild: Guild, iterable?: Iterable<RawRoleData>); public get everyone(): Role; public get highest(): Role; public guild: Guild; public get premiumSubscriberRole(): Role | null; public botRoleFor(user: UserResolvable): Role | null; public fetch(id: Snowflake, options?: BaseFetchOptions): Promise<Role | null>; public fetch(id?: undefined, options?: BaseFetchOptions): Promise<Collection<Snowflake, Role>>; public create(options?: RoleCreateOptions): Promise<Role>; public edit(role: RoleResolvable, options: RoleEditOptions): Promise<Role>; public delete(role: RoleResolvable, reason?: string): Promise<void>; public setPosition(role: RoleResolvable, position: number, options?: SetRolePositionOptions): Promise<Role>; public setPositions(rolePositions: readonly RolePosition[]): Promise<Guild>; public comparePositions(role1: RoleResolvable, role2: RoleResolvable): number; } export class StageInstanceManager extends CachedManager<Snowflake, StageInstance, StageInstanceResolvable> { private constructor(guild: Guild, iterable?: Iterable<RawStageInstanceData>); public guild: Guild; public create(channel: StageChannelResolvable, options: StageInstanceCreateOptions): Promise<StageInstance>; public fetch(channel: StageChannelResolvable, options?: BaseFetchOptions): Promise<StageInstance>; public edit(channel: StageChannelResolvable, options: StageInstanceEditOptions): Promise<StageInstance>; public delete(channel: StageChannelResolvable): Promise<void>; } export class ThreadManager<ThreadOnly extends boolean = boolean> extends CachedManager< Snowflake, If<ThreadOnly, ForumThreadChannel, TextThreadChannel>, ThreadChannelResolvable > { protected constructor( channel: TextChannel | NewsChannel | ForumChannel | MediaChannel, iterable?: Iterable<RawThreadChannelData>, ); public channel: If<ThreadOnly, ForumChannel | MediaChannel, TextChannel | NewsChannel>; public fetch( options: ThreadChannelResolvable, cacheOptions?: BaseFetchOptions, ): Promise<If<ThreadOnly, ForumThreadChannel, TextThreadChannel> | null>; public fetch( options: FetchThreadsOptions & { archived: FetchArchivedThreadOptions }, cacheOptions?: { cache?: boolean }, ): Promise<FetchedThreadsMore>; public fetch(options?: FetchThreadsOptions, cacheOptions?: { cache?: boolean }): Promise<FetchedThreads>; public fetchArchived(options?: FetchArchivedThreadOptions, cache?: boolean): Promise<FetchedThreadsMore>; public fetchActive(cache?: boolean): Promise<FetchedThreads>; } export class GuildTextThreadManager<AllowedThreadType> extends ThreadManager<false> { public create( options: GuildTextThreadCreateOptions<AllowedThreadType>, ): Promise<AllowedThreadType extends ChannelType.PrivateThread ? PrivateThreadChannel : PublicThreadChannel<false>>; } export class GuildForumThreadManager extends ThreadManager<true> { public create(options: GuildForumThreadCreateOptions): Promise<ForumThreadChannel>; } export class ThreadMemberManager extends CachedManager<Snowflake, ThreadMember, ThreadMemberResolvable> { private constructor(thread: ThreadChannel, iterable?: Iterable<RawThreadMemberData>); public thread: AnyThreadChannel; public get me(): ThreadMember | null; /* tslint:disable:unified-signatures */ public add(member: UserResolvable | '@me'): Promise<Snowflake>; /** @deprecated The `reason` parameter is deprecated as Discord does not parse them. */ public add(member: UserResolvable | '@me', reason?: string): Promise<Snowflake>; /* tslint:enable:unified-signatures */ public fetch( options: ThreadMember<true> | ((FetchThreadMemberOptions & { withMember: true }) | { member: ThreadMember<true> }), ): Promise<ThreadMember<true>>; public fetch(options: ThreadMemberResolvable | FetchThreadMemberOptions): Promise<ThreadMember>; public fetch( options: FetchThreadMembersWithGuildMemberDataOptions, ): Promise<Collection<Snowflake, ThreadMember<true>>>; public fetch(options?: FetchThreadMembersWithoutGuildMemberDataOptions): Promise<Collection<Snowflake, ThreadMember>>; public fetchMe(options?: BaseFetchOptions): Promise<ThreadMember>; /* tslint:disable:unified-signatures */ public remove(member: UserResolvable | '@me'): Promise<Snowflake>; /** @deprecated The `reason` parameter is deprecated as Discord does not parse them. */ public remove(member: UserResolvable | '@me', reason?: string): Promise<Snowflake>; /* tslint:enable:unified-signatures */ } export class UserManager extends CachedManager<Snowflake, User, UserResolvable> { private constructor(client: Client<true>, iterable?: Iterable<RawUserData>); private dmChannel(userId: Snowflake): DMChannel | null; public createDM(user: UserResolvable, options?: BaseFetchOptions): Promise<DMChannel>; public deleteDM(user: UserResolvable): Promise<DMChannel>; public fetch(user: UserResolvable, options?: BaseFetchOptions): Promise<User>; /** @deprecated This method is deprecated and will be removed in the next major version. Flags may still be retrieved via {@link UserManager.fetch} */ public fetchFlags(user: UserResolvable, options?: BaseFetchOptions): Promise<UserFlagsBitField>; public send(user: UserResolvable, options: string | MessagePayload | MessageCreateOptions): Promise<Message>; } export class VoiceStateManager extends CachedManager<Snowflake, VoiceState, typeof VoiceState> { private constructor(guild: Guild, iterable?: Iterable<RawVoiceStateData>); public guild: Guild; public fetch(member: GuildMemberResolvable | '@me', options?: BaseFetchOptions): Promise<VoiceState>; } //#endregion //#region Mixins // Model the TextBasedChannel mixin system, allowing application of these fields // to the classes that use these methods without having to manually add them // to each of those classes export type Constructable<Entity> = abstract new (...args: any[]) => Entity; export interface PartialTextBasedChannelFields<InGuild extends boolean = boolean> { send(options: string | MessagePayload | MessageCreateOptions): Promise<Message<InGuild>>; } export interface TextBasedChannelFields<InGuild extends boolean = boolean, InDM extends boolean = boolean> extends PartialTextBasedChannelFields<InGuild> { lastMessageId: Snowflake | null; get lastMessage(): Message | null; lastPinTimestamp: number | null; get lastPinAt(): Date | null; messages: If<InGuild, GuildMessageManager, If<InDM, DMMessageManager, PartialGroupDMMessageManager>>; awaitMessageComponent<ComponentType extends MessageComponentType>( options?: AwaitMessageCollectorOptionsParams<ComponentType, true>, ): Promise<MappedInteractionTypes[ComponentType]>; awaitMessages(options?: AwaitMessagesOptions): Promise<Collection<Snowflake, Message>>; bulkDelete( messages: Collection<Snowflake, Message> | readonly MessageResolvable[] | number, filterOld?: boolean, ): Promise<Collection<Snowflake, Message | PartialMessage | undefined>>; createMessageComponentCollector<ComponentType extends MessageComponentType>( options?: MessageChannelCollectorOptionsParams<ComponentType, true>, ): InteractionCollector<MappedInteractionTypes[ComponentType]>; createMessageCollector(options?: MessageCollectorOptions): MessageCollector; createWebhook(options: ChannelWebhookCreateOptions): Promise<Webhook<WebhookType.Incoming>>; fetchWebhooks(): Promise<Collection<Snowflake, Webhook<WebhookType.ChannelFollower | WebhookType.Incoming>>>; sendTyping(): Promise<void>; setRateLimitPerUser(rateLimitPerUser: number, reason?: string): Promise<this>; setNSFW(nsfw?: boolean, reason?: string): Promise<this>; } /** @internal */ export interface PartialWebhookFields { id: Snowflake; get url(): string; deleteMessage(message: MessageResolvable | APIMessage | '@original', threadId?: Snowflake): Promise<void>; editMessage( message: MessageResolvable | '@original', options: string | MessagePayload | WebhookMessageEditOptions, ): Promise<APIMessage | Message>; fetchMessage(message: Snowflake | '@original', options?: WebhookFetchMessageOptions): Promise<APIMessage | Message>; send( options: string | MessagePayload | InteractionReplyOptions | WebhookMessageCreateOptions, ): Promise<APIMessage | Message>; } /** @internal */ export interface WebhookFields extends PartialWebhookFields { get createdAt(): Date; get createdTimestamp(): number; delete(reason?: string): Promise<void>; edit(options: WebhookEditOptions): Promise<this>; sendSlackMessage(body: unknown): Promise<boolean>; } //#endregion //#region Typedefs export interface ActivitiesOptions extends Omit<ActivityOptions, 'shardId'> {} export interface ActivityOptions { name: string; state?: string; url?: string; type?: ActivityType; shardId?: number | readonly number[]; } export interface AddGuildMemberOptions { accessToken: string; nick?: string; roles?: ReadonlyCollection<Snowflake, Role> | readonly RoleResolvable[]; mute?: boolean; deaf?: boolean; force?: boolean; fetchWhenExisting?: boolean; } export type AllowedPartial = | User | Channel | GuildMember | Message | MessageReaction | GuildScheduledEvent | ThreadMember | SoundboardSound; export type AllowedThreadTypeForNewsChannel = ChannelType.AnnouncementThread; export type AllowedThreadTypeForTextChannel = ChannelType.PublicThread | ChannelType.PrivateThread; export interface BaseApplicationCommandData { name: string; nameLocalizations?: LocalizationMap; dmPermission?: boolean; defaultMemberPermissions?: PermissionResolvable | null; nsfw?: boolean; contexts?: readonly InteractionContextType[]; integrationTypes?: readonly ApplicationIntegrationType[]; } export interface AttachmentData { name?: string; description?: string; } export type CommandOptionDataTypeResolvable = ApplicationCommandOptionType; export type CommandOptionChannelResolvableType = ApplicationCommandOptionType.Channel; export type CommandOptionChoiceResolvableType = | ApplicationCommandOptionType.String | CommandOptionNumericResolvableType; export type CommandOptionNumericResolvableType = | ApplicationCommandOptionType.Number | ApplicationCommandOptionType.Integer; export type CommandOptionSubOptionResolvableType = | ApplicationCommandOptionType.Subcommand | ApplicationCommandOptionType.SubcommandGroup; export type CommandOptionNonChoiceResolvableType = Exclude< CommandOptionDataTypeResolvable, CommandOptionChoiceResolvableType | CommandOptionSubOptionResolvableType | CommandOptionChannelResolvableType >; export interface BaseApplicationCommandOptionsData { name: string; nameLocalizations?: LocalizationMap; description: string; descriptionLocalizations?: LocalizationMap; required?: boolean; autocomplete?: never; } export interface UserApplicationCommandData extends BaseApplicationCommandData { type: ApplicationCommandType.User; } export interface MessageApplicationCommandData extends BaseApplicationCommandData { type: ApplicationCommandType.Message; } export interface ChatInputApplicationCommandData extends BaseApplicationCommandData { description: string; descriptionLocalizations?: LocalizationMap; type?: ApplicationCommandType.ChatInput; options?: readonly ApplicationCommandOptionData[]; } export interface PrimaryEntryPointCommandData extends BaseApplicationCommandData { description?: string; descriptionLocalizations?: LocalizationMap; type: ApplicationCommandType.PrimaryEntryPoint; handler?: EntryPointCommandHandlerType; } export type ApplicationCommandData = | UserApplicationCommandData | MessageApplicationCommandData | ChatInputApplicationCommandData | PrimaryEntryPointCommandData; export interface ApplicationCommandChannelOptionData extends BaseApplicationCommandOptionsData { type: CommandOptionChannelResolvableType; channelTypes?: readonly ApplicationCommandOptionAllowedChannelTypes[]; channel_types?: readonly ApplicationCommandOptionAllowedChannelTypes[]; } export interface ApplicationCommandChannelOption extends BaseApplicationCommandOptionsData { type: ApplicationCommandOptionType.Channel; channelTypes?: readonly ApplicationCommandOptionAllowedChannelTypes[]; } export interface ApplicationCommandRoleOptionData extends BaseApplicationCommandOptionsData { type: ApplicationCommandOptionType.Role; } export interface ApplicationCommandRoleOption extends BaseApplicationCommandOptionsData { type: ApplicationCommandOptionType.Role; } export interface ApplicationCommandUserOptionData extends BaseApplicationCommandOptionsData { type: ApplicationCommandOptionType.User; } export interface ApplicationCommandUserOption extends BaseApplicationCommandOptionsData { type: ApplicationCommandOptionType.User; } export interface ApplicationCommandMentionableOptionData extends BaseApplicationCommandOptionsData { type: ApplicationCommandOptionType.Mentionable; } export interface ApplicationCommandMentionableOption extends BaseApplicationCommandOptionsData { type: ApplicationCommandOptionType.Mentionable; } export interface ApplicationCommandAttachmentOption extends BaseApplicationCommandOptionsData { type: ApplicationCommandOptionType.Attachment; } export interface ApplicationCommandAutocompleteNumericOption extends Omit<BaseApplicationCommandOptionsData, 'autocomplete'> { type: CommandOptionNumericResolvableType; minValue?: number; maxValue?: number; autocomplete: true; } export interface ApplicationCommandAutocompleteStringOption extends Omit<BaseApplicationCommandOptionsData, 'autocomplete'> { type: ApplicationCommandOptionType.String; minLength?: number; maxLength?: number; autocomplete: true; } export interface ApplicationCommandAutocompleteNumericOptionData extends Omit<BaseApplicationCommandOptionsData, 'autocomplete'> { type: CommandOptionNumericResolvableType; minValue?: number; min_value?: number; maxValue?: number; max_value?: number; autocomplete: true; } export interface ApplicationCommandAutocompleteStringOptionData extends Omit<BaseApplicationCommandOptionsData, 'autocomplete'> { type: ApplicationCommandOptionType.String; minLength?: number; min_length?: number; maxLength?: number; max_length?: number; autocomplete: true; } export interface ApplicationCommandChoicesData<Type extends string | number = string | number> extends Omit<BaseApplicationCommandOptionsData, 'autocomplete'> { type: CommandOptionChoiceResolvableType; choices?: readonly ApplicationCommandOptionChoiceData<Type>[]; autocomplete?: false; } export interface ApplicationCommandChoicesOption<Type extends string | number = string | number> extends Omit<BaseApplicationCommandOptionsData, 'autocomplete'> { type: CommandOptionChoiceResolvableType; choices?: readonly ApplicationCommandOptionChoiceData<Type>[]; autocomplete?: false; } export interface ApplicationCommandNumericOptionData extends ApplicationCommandChoicesData<number> { type: CommandOptionNumericResolvableType; minValue?: number; min_value?: number; maxValue?: number; max_value?: number; } export interface ApplicationCommandStringOptionData extends ApplicationCommandChoicesData<string> { type: ApplicationCommandOptionType.String; minLength?: number; min_length?: number; maxLength?: number; max_length?: number; } export interface ApplicationCommandBooleanOptionData extends BaseApplicationCommandOptionsData { type: ApplicationCommandOptionType.Boolean; } export interface ApplicationCommandNumericOption extends ApplicationCommandChoicesOption<number> { type: CommandOptionNumericResolvableType; minValue?: number; maxValue?: number; } export interface ApplicationCommandStringOption extends ApplicationCommandChoicesOption<string> { type: ApplicationCommandOptionType.String; minLength?: number; maxLength?: number; } export interface ApplicationCommandBooleanOption extends BaseApplicationCommandOptionsData { type: ApplicationCommandOptionType.Boolean; } export interface ApplicationCommandSubGroupData extends Omit<BaseApplicationCommandOptionsData, 'required'> { type: ApplicationCommandOptionType.SubcommandGroup; options: readonly ApplicationCommandSubCommandData[]; } export interface ApplicationCommandSubGroup extends Omit<BaseApplicationCommandOptionsData, 'required'> { type: ApplicationCommandOptionType.SubcommandGroup; options?: readonly ApplicationCommandSubCommand[]; } export interface ApplicationCommandSubCommandData extends Omit<BaseApplicationCommandOptionsData, 'required'> { type: ApplicationCommandOptionType.Subcommand; options?: readonly Exclude< ApplicationCommandOptionData, ApplicationCommandSubGroupData | ApplicationCommandSubCommandData >[]; } export interface ApplicationCommandSubCommand extends Omit<BaseApplicationCommandOptionsData, 'required'> { type: ApplicationCommandOptionType.Subcommand; options?: readonly Exclude<ApplicationCommandOption, ApplicationCommandSubGroup | ApplicationCommandSubCommand>[]; } export interface ApplicationCommandNonOptionsData extends BaseApplicationCommandOptionsData { type: CommandOptionNonChoiceResolvableType; } export interface ApplicationCommandNonOptions extends BaseApplicationCommandOptionsData { type: Exclude<CommandOptionNonChoiceResolvableType, ApplicationCommandOptionType>; } export type ApplicationCommandOptionData = | ApplicationCommandSubGroupData | ApplicationCommandNonOptionsData | ApplicationCommandChannelOptionData | ApplicationCommandAutocompleteNumericOptionData | ApplicationCommandAutocompleteStringOptionData | ApplicationCommandNumericOptionData | ApplicationCommandStringOptionData | ApplicationCommandRoleOptionData | ApplicationCommandUserOptionData | ApplicationCommandMentionableOptionData | ApplicationCommandBooleanOptionData | ApplicationCommandSubCommandData; export type ApplicationCommandOption = | ApplicationCommandSubGroup | ApplicationCommandAutocompleteNumericOption | ApplicationCommandAutocompleteStringOption | ApplicationCommandNonOptions | ApplicationCommandChannelOption | ApplicationCommandNumericOption | ApplicationCommandStringOption | ApplicationCommandRoleOption | ApplicationCommandUserOption | ApplicationCommandMentionableOption | ApplicationCommandBooleanOption | ApplicationCommandAttachmentOption | ApplicationCommandSubCommand; export interface ApplicationCommandOptionChoiceData<Value extends string | number = string | number> { name: string; nameLocalizations?: LocalizationMap; value: Value; } export interface ApplicationCommandPermissions { id: Snowflake; type: ApplicationCommandPermissionType; permission: boolean; } export interface ApplicationCommandPermissionsUpdateData { id: Snowflake; guildId: Snowflake; applicationId: Snowflake; permissions: readonly ApplicationCommandPermissions[]; } export interface EditApplicationCommandPermissionsMixin { permissions: readonly ApplicationCommandPermissions[]; token: string; } export type ChannelPermissionConstant = Snowflake; export type RolePermissionConstant = Snowflake; export type ApplicationCommandPermissionIdResolvable = | GuildChannelResolvable | RoleResolvable | UserResolvable | ChannelPermissionConstant | RolePermissionConstant; export type ApplicationCommandResolvable = ApplicationCommand | Snowflake; export type ApplicationFlagsString = keyof typeof ApplicationFlags; export interface ApplicationRoleConnectionMetadataEditOptions { name: string; nameLocalizations?: LocalizationMap | null; description: string; descriptionLocalizations?: LocalizationMap | null; key: string; type: ApplicationRoleConnectionMetadataType; } export type AuditLogChange = { [SourceElement in APIAuditLogChange as SourceElement['key']]: { key: SourceElement['key']; old?: SourceElement['old_value']; new?: SourceElement['new_value']; }; }[APIAuditLogChange['key']]; export interface AutoModerationAction { type: AutoModerationActionType; metadata: AutoModerationActionMetadata; } export interface AutoModerationActionMetadata { channelId: Snowflake | null; durationSeconds: number | null; customMessage: string | null; } export interface AutoModerationTriggerMetadata { keywordFilter: readonly string[]; regexPatterns: readonly string[]; presets: readonly AutoModerationRuleKeywordPresetType[]; allowList: readonly string[]; mentionTotalLimit: number | null; mentionRaidProtectionEnabled: boolean; } export interface AwaitMessageComponentOptions<Interaction extends CollectedMessageInteraction> extends Omit<MessageComponentCollectorOptions<Interaction>, 'max' | 'maxComponents' | 'maxUsers'> {} export interface ModalSubmitInteractionCollectorOptions<Interaction extends ModalSubmitInteraction> extends Omit<InteractionCollectorOptions<Interaction>, 'channel' | 'message' | 'guild' | 'interactionType'> {} export interface AwaitModalSubmitOptions<Interaction extends ModalSubmitInteraction> extends Omit<ModalSubmitInteractionCollectorOptions<Interaction>, 'max' | 'maxComponents' | 'maxUsers'> { time: number; } export interface AwaitMessagesOptions extends MessageCollectorOptions { errors?: readonly string[]; } export interface AwaitReactionsOptions extends ReactionCollectorOptions { errors?: readonly string[]; } export interface BanOptions { /** @deprecated Use {@link BanOptions.deleteMessageSeconds} instead. */ deleteMessageDays?: number; deleteMessageSeconds?: number; reason?: string; } export interface BulkBanOptions extends Omit<BanOptions, 'deleteMessageDays'> {} export interface BulkBanResult { bannedUsers: readonly Snowflake[]; failedUsers: readonly Snowflake[]; } export interface PollData { question: PollQuestionMedia; answers: readonly PollAnswerData[]; duration: number; allowMultiselect: boolean; layoutType?: PollLayoutType; } export interface PollAnswerData { text: string; emoji?: EmojiIdentifierResolvable; } export type Base64Resolvable = Buffer | Base64String; export type Base64String = string; export interface BaseFetchOptions { cache?: boolean; force?: boolean; } export type BitFieldResolvable<Flags extends string, Type extends number | bigint> = | RecursiveReadonlyArray<Flags | Type | `${bigint}` | Readonly<BitField<Flags, Type>>> | Flags | Type | `${bigint}` | Readonly<BitField<Flags, Type>>; export type BufferResolvable = Buffer | string; export interface Caches { ApplicationCommandManager: [manager: typeof ApplicationCommandManager, holds: typeof ApplicationCommand]; ApplicationEmojiManager: [manager: typeof ApplicationEmojiManager, holds: typeof ApplicationEmoji]; AutoModerationRuleManager: [manager: typeof AutoModerationRuleManager, holds: typeof AutoModerationRule]; BaseGuildEmojiManager: [manager: typeof BaseGuildEmojiManager, holds: typeof GuildEmoji]; // TODO: ChannelManager: [manager: typeof ChannelManager, holds: typeof Channel]; DMMessageManager: [manager: typeof MessageManager, holds: typeof Message<false>]; EntitlementManager: [manager: typeof EntitlementManager, holds: typeof Entitlement]; GuildBanManager: [manager: typeof GuildBanManager, holds: typeof GuildBan]; // TODO: GuildChannelManager: [manager: typeof GuildChannelManager, holds: typeof GuildChannel]; GuildEmojiManager: [manager: typeof GuildEmojiManager, holds: typeof GuildEmoji]; GuildForumThreadManager: [manager: typeof GuildForumThreadManager, holds: typeof ThreadChannel<true>]; GuildInviteManager: [manager: typeof GuildInviteManager, holds: typeof Invite]; // TODO: GuildManager: [manager: typeof GuildManager, holds: typeof Guild]; GuildMemberManager: [manager: typeof GuildMemberManager, holds: typeof GuildMember]; GuildMessageManager: [manager: typeof GuildMessageManager, holds: typeof Message<true>]; GuildScheduledEventManager: [manager: typeof GuildScheduledEventManager, holds: typeof GuildScheduledEvent]; GuildStickerManager: [manager: typeof GuildStickerManager, holds: typeof Sticker]; GuildTextThreadManager: [manager: typeof GuildTextThreadManager, holds: typeof ThreadChannel<false>]; MessageManager: [manager: typeof MessageManager, holds: typeof Message]; // TODO: PermissionOverwriteManager: [manager: typeof PermissionOverwriteManager, holds: typeof PermissionOverwrites]; PresenceManager: [manager: typeof PresenceManager, holds: typeof Presence]; ReactionManager: [manager: typeof ReactionManager, holds: typeof MessageReaction]; ReactionUserManager: [manager: typeof ReactionUserManager, holds: typeof User]; // TODO: RoleManager: [manager: typeof RoleManager, holds: typeof Role]; StageInstanceManager: [manager: typeof StageInstanceManager, holds: typeof StageInstance]; ThreadManager: [manager: typeof ThreadManager, holds: typeof ThreadChannel]; ThreadMemberManager: [manager: typeof ThreadMemberManager, holds: typeof ThreadMember]; UserManager: [manager: typeof UserManager, holds: typeof User]; VoiceStateManager: [manager: typeof VoiceStateManager, holds: typeof VoiceState]; } export type CacheConstructors = { [Cache in keyof Caches]: Caches[Cache][0] & { name: Cache }; }; type OverriddenCaches = | 'DMMessageManager' | 'GuildForumThreadManager' | 'GuildMessageManager' | 'GuildTextThreadManager'; // This doesn't actually work the way it looks 😢. // Narrowing the type of `manager.name` doesn't propagate type information to `holds` and the return type. export type CacheFactory = ( managerType: CacheConstructors[Exclude<keyof Caches, OverriddenCaches>], holds: Caches[(typeof manager)['name']][1], manager: CacheConstructors[keyof Caches], ) => (typeof manager)['prototype'] extends DataManager<infer Key, infer Value, any> ? Collection<Key, Value> : never; export type CacheWithLimitsOptions = { [K in keyof Caches]?: Caches[K][0]['prototype'] extends DataManager<infer Key, infer Value, any> ? LimitedCollectionOptions<Key, Value> | number : never; }; export interface CategoryCreateChannelOptions { name: string; permissionOverwrites?: readonly OverwriteResolvable[] | ReadonlyCollection<Snowflake, OverwriteResolvable>; topic?: string; type?: CategoryChannelType; nsfw?: boolean; bitrate?: number; userLimit?: number; rateLimitPerUser?: number; position?: number; rtcRegion?: string; videoQualityMode?: VideoQualityMode; defaultThreadRateLimitPerUser?: number; availableTags?: readonly GuildForumTagData[]; defaultReactionEmoji?: DefaultReactionEmoji; defaultAutoArchiveDuration?: ThreadAutoArchiveDuration; defaultSortOrder?: SortOrderType; defaultForumLayout?: ForumLayoutType; reason?: string; } export interface ChannelCreationOverwrites { allow?: PermissionResolvable; deny?: PermissionResolvable; id: RoleResolvable | UserResolvable; } export type ChannelMention = `<#${Snowflake}>`; export interface ChannelPosition { channel: NonThreadGuildBasedChannel | Snowflake; lockPermissions?: boolean; parent?: CategoryChannelResolvable | null; position?: number; } export type GuildTextChannelResolvable = TextChannel | NewsChannel | Snowflake; export type ChannelResolvable = Channel | Snowflake; export interface ChannelWebhookCreateOptions { name: string; avatar?: BufferResolvable | Base64Resolvable | null; reason?: string; } export interface WebhookCreateOptions extends ChannelWebhookCreateOptions { channel: TextChannel | NewsChannel | VoiceChannel | StageChannel | ForumChannel | MediaChannel | Snowflake; } export interface GuildMembersChunk { index: number; count: number; notFound: readonly unknown[]; nonce: string | undefined; } export type OmitPartialGroupDMChannel<Structure extends { channel: Channel }> = Structure & { channel: Exclude<Structure['channel'], PartialGroupDMChannel>; }; export interface ClientEvents { applicationCommandPermissionsUpdate: [data: ApplicationCommandPermissionsUpdateData]; autoModerationActionExecution: [autoModerationActionExecution: AutoModerationActionExecution]; autoModerationRuleCreate: [autoModerationRule: AutoModerationRule]; autoModerationRuleDelete: [autoModerationRule: AutoModerationRule]; autoModerationRuleUpdate: [ oldAutoModerationRule: AutoModerationRule | null, newAutoModerationRule: AutoModerationRule, ]; cacheSweep: [message: string]; channelCreate: [channel: NonThreadGuildBasedChannel]; channelDelete: [channel: DMChannel | NonThreadGuildBasedChannel]; channelPinsUpdate: [channel: TextBasedChannel, date: Date]; channelUpdate: [ oldChannel: DMChannel | NonThreadGuildBasedChannel, newChannel: DMChannel | NonThreadGuildBasedChannel, ]; debug: [message: string]; warn: [message: string]; emojiCreate: [emoji: GuildEmoji]; emojiDelete: [emoji: GuildEmoji]; emojiUpdate: [oldEmoji: GuildEmoji, newEmoji: GuildEmoji]; entitlementCreate: [entitlement: Entitlement]; entitlementDelete: [entitlement: Entitlement]; entitlementUpdate: [oldEntitlement: Entitlement | null, newEntitlement: Entitlement]; error: [error: Error]; guildAuditLogEntryCreate: [auditLogEntry: GuildAuditLogsEntry, guild: Guild]; guildAvailable: [guild: Guild]; guildBanAdd: [ban: GuildBan]; guildBanRemove: [ban: GuildBan]; guildCreate: [guild: Guild]; guildDelete: [guild: Guild]; guildUnavailable: [guild: Guild]; guildIntegrationsUpdate: [guild: Guild]; guildMemberAdd: [member: GuildMember]; guildMemberAvailable: [member: GuildMember | PartialGuildMember]; guildMemberRemove: [member: GuildMember | PartialGuildMember]; guildMembersChunk: [members: ReadonlyCollection<Snowflake, GuildMember>, guild: Guild, data: GuildMembersChunk]; guildMemberUpdate: [oldMember: GuildMember | PartialGuildMember, newMember: GuildMember]; guildUpdate: [oldGuild: Guild, newGuild: Guild]; guildSoundboardSoundCreate: [soundboardSound: GuildSoundboardSound]; guildSoundboardSoundDelete: [soundboardSound: GuildSoundboardSound | PartialSoundboardSound]; guildSoundboardSoundUpdate: [ oldSoundboardSound: GuildSoundboardSound | null, newSoundboardSound: GuildSoundboardSound, ]; guildSoundboardSoundsUpdate: [soundboardSounds: ReadonlyCollection<Snowflake, GuildSoundboardSound>, guild: Guild]; inviteCreate: [invite: Invite]; inviteDelete: [invite: Invite]; messageCreate: [message: OmitPartialGroupDMChannel<Message>]; messageDelete: [message: OmitPartialGroupDMChannel<Message | PartialMessage>]; messagePollVoteAdd: [pollAnswer: PollAnswer, userId: Snowflake]; messagePollVoteRemove: [pollAnswer: PollAnswer, userId: Snowflake]; messageReactionRemoveAll: [ message: OmitPartialGroupDMChannel<Message | PartialMessage>, reactions: ReadonlyCollection<string | Snowflake, MessageReaction>, ]; messageReactionRemoveEmoji: [reaction: MessageReaction | PartialMessageReaction]; messageDeleteBulk: [ messages: ReadonlyCollection<Snowflake, OmitPartialGroupDMChannel<Message | PartialMessage>>, channel: GuildTextBasedChannel, ]; messageReactionAdd: [ reaction: MessageReaction | PartialMessageReaction, user: User | PartialUser, details: MessageReactionEventDetails, ]; messageReactionRemove: [ reaction: MessageReaction | PartialMessageReaction, user: User | PartialUser, details: MessageReactionEventDetails, ]; messageUpdate: [ oldMessage: OmitPartialGroupDMChannel<Message | PartialMessage>, newMessage: OmitPartialGroupDMChannel<Message>, ]; presenceUpdate: [oldPresence: Presence | null, newPresence: Presence]; ready: [client: Client<true>]; invalidated: []; roleCreate: [role: Role]; roleDelete: [role: Role]; roleUpdate: [oldRole: Role, newRole: Role]; threadCreate: [thread: AnyThreadChannel, newlyCreated: boolean]; threadDelete: [thread: AnyThreadChannel]; threadListSync: [threads: ReadonlyCollection<Snowflake, AnyThreadChannel>, guild: Guild]; threadMemberUpdate: [oldMember: ThreadMember, newMember: ThreadMember]; threadMembersUpdate: [ addedMembers: ReadonlyCollection<Snowflake, ThreadMember>, removedMembers: ReadonlyCollection<Snowflake, ThreadMember | PartialThreadMember>, thread: AnyThreadChannel, ]; threadUpdate: [oldThread: AnyThreadChannel, newThread: AnyThreadChannel]; typingStart: [typing: Typing]; userUpdate: [oldUser: User | PartialUser, newUser: User]; voiceChannelEffectSend: [voiceChannelEffect: VoiceChannelEffect]; voiceStateUpdate: [oldState: VoiceState, newState: VoiceState]; /** @deprecated Use {@link ClientEvents.webhooksUpdate} instead. */ webhookUpdate: ClientEvents['webhooksUpdate']; webhooksUpdate: [channel: TextChannel | NewsChannel | VoiceChannel | ForumChannel | MediaChannel]; interactionCreate: [interaction: Interaction]; shardDisconnect: [closeEvent: CloseEvent, shardId: number]; shardError: [error: Error, shardId: number]; shardReady: [shardId: number, unavailableGuilds: Set<Snowflake> | undefined]; shardReconnecting: [shardId: number]; shardResume: [shardId: number, replayedEvents: number]; stageInstanceCreate: [stageInstance: StageInstance]; stageInstanceUpdate: [oldStageInstance: StageInstance | null, newStageInstance: StageInstance]; stageInstanceDelete: [stageInstance: StageInstance]; stickerCreate: [sticker: Sticker]; stickerDelete: [sticker: Sticker]; stickerUpdate: [oldSticker: Sticker, newSticker: Sticker]; subscriptionCreate: [subscription: Subscription]; subscriptionDelete: [subscription: Subscription]; subscriptionUpdate: [oldSubscription: Subscription | null, newSubscription: Subscription]; guildScheduledEventCreate: [guildScheduledEvent: GuildScheduledEvent]; guildScheduledEventUpdate: [ oldGuildScheduledEvent: GuildScheduledEvent | PartialGuildScheduledEvent | null, newGuildScheduledEvent: GuildScheduledEvent, ]; guildScheduledEventDelete: [guildScheduledEvent: GuildScheduledEvent | PartialGuildScheduledEvent]; guildScheduledEventUserAdd: [guildScheduledEvent: GuildScheduledEvent | PartialGuildScheduledEvent, user: User]; guildScheduledEventUserRemove: [guildScheduledEvent: GuildScheduledEvent | PartialGuildScheduledEvent, user: User]; soundboardSounds: [soundboardSounds: ReadonlyCollection<Snowflake, GuildSoundboardSound>, guild: Guild]; } export interface ClientFetchInviteOptions { guildScheduledEventId?: Snowflake; } export interface ClientOptions { shards?: number | readonly number[] | 'auto'; shardCount?: number; closeTimeout?: number; makeCache?: CacheFactory; allowedMentions?: MessageMentionOptions; partials?: readonly Partials[]; failIfNotExists?: boolean; presence?: PresenceData; intents: BitFieldResolvable<GatewayIntentsString, number>; waitGuildTimeout?: number; sweepers?: SweeperOptions; ws?: WebSocketOptions; rest?: Partial<RESTOptions>; jsonTransformer?: (obj: unknown) => unknown; enforceNonce?: boolean; } export type ClientPresenceStatus = 'online' | 'idle' | 'dnd'; export interface ClientPresenceStatusData { web?: ClientPresenceStatus; mobile?: ClientPresenceStatus; desktop?: ClientPresenceStatus; } export interface ClientUserEditOptions { username?: string; avatar?: BufferResolvable | Base64Resolvable | null; banner?: BufferResolvable | Base64Resolvable | null; } export interface CloseEvent { /** @deprecated Not used anymore since using {@link @discordjs/ws#(WebSocketManager:class)} internally */ wasClean: boolean; code: number; /** @deprecated Not used anymore since using {@link @discordjs/ws#(WebSocketManager:class)} internally */ reason: string; } export type CollectorFilter<Arguments extends unknown[]> = (...args: Arguments) => Awaitable<boolean>; export interface CollectorOptions<FilterArguments extends unknown[]> { filter?: CollectorFilter<FilterArguments>; time?: number; idle?: number; dispose?: boolean; } export interface CollectorResetTimerOptions { time?: number; idle?: number; } export type ColorResolvable = | keyof typeof Colors | 'Random' | readonly [red: number, green: number, blue: number] | number | HexColorString; export interface CommandInteractionOption<Cached extends CacheType = CacheType> { name: string; type: ApplicationCommandOptionType; value?: string | number | boolean; focused?: boolean; autocomplete?: boolean; options?: readonly CommandInteractionOption[]; user?: User; member?: CacheTypeReducer<Cached, GuildMember, APIInteractionDataResolvedGuildMember>; channel?: CacheTypeReducer<Cached, GuildBasedChannel, APIInteractionDataResolvedChannel>; role?: CacheTypeReducer<Cached, Role, APIRole>; attachment?: Attachment; message?: Message<BooleanCache<Cached>>; } export interface CommandInteractionResolvedData<Cached extends CacheType = CacheType> { users?: ReadonlyCollection<Snowflake, User>; members?: ReadonlyCollection<Snowflake, CacheTypeReducer<Cached, GuildMember, APIInteractionDataResolvedGuildMember>>; roles?: ReadonlyCollection<Snowflake, CacheTypeReducer<Cached, Role, APIRole>>; channels?: ReadonlyCollection<Snowflake, CacheTypeReducer<Cached, Channel, APIInteractionDataResolvedChannel>>; messages?: ReadonlyCollection<Snowflake, CacheTypeReducer<Cached, Message, APIMessage>>; attachments?: ReadonlyCollection<Snowflake, Attachment>; } export interface AutocompleteFocusedOption extends Pick<CommandInteractionOption, 'name'> { focused: true; type: | ApplicationCommandOptionType.String | ApplicationCommandOptionType.Integer | ApplicationCommandOptionType.Number; value: string; } export declare const Colors: { Default: 0x000000; White: 0xffffff; Aqua: 0x1abc9c; Green: 0x57f287; Blue: 0x3498db; Yellow: 0xfee75c; Purple: 0x9b59b6; LuminousVividPink: 0xe91e63; Fuchsia: 0xeb459e; Gold: 0xf1c40f; Orange: 0xe67e22; Red: 0xed4245; Grey: 0x95a5a6; Navy: 0x34495e; DarkAqua: 0x11806a; DarkGreen: 0x1f8b4c; DarkBlue: 0x206694; DarkPurple: 0x71368a; DarkVividPink: 0xad1457; DarkGold: 0xc27c0e; DarkOrange: 0xa84300; DarkRed: 0x992d22; DarkGrey: 0x979c9f; DarkerGrey: 0x7f8c8d; LightGrey: 0xbcc0c0; DarkNavy: 0x2c3e50; Blurple: 0x5865f2; Greyple: 0x99aab5; DarkButNotBlack: 0x2c2f33; NotQuiteBlack: 0x23272a; }; export enum Events { ApplicationCommandPermissionsUpdate = 'applicationCommandPermissionsUpdate', AutoModerationActionExecution = 'autoModerationActionExecution', AutoModerationRuleCreate = 'autoModerationRuleCreate', AutoModerationRuleDelete = 'autoModerationRuleDelete', AutoModerationRuleUpdate = 'autoModerationRuleUpdate', ClientReady = 'ready', EntitlementCreate = 'entitlementCreate', EntitlementDelete = 'entitlementDelete', EntitlementUpdate = 'entitlementUpdate', GuildAuditLogEntryCreate = 'guildAuditLogEntryCreate', GuildAvailable = 'guildAvailable', GuildCreate = 'guildCreate', GuildDelete = 'guildDelete', GuildUpdate = 'guildUpdate', GuildUnavailable = 'guildUnavailable', GuildMemberAdd = 'guildMemberAdd', GuildMemberRemove = 'guildMemberRemove', GuildMemberUpdate = 'guildMemberUpdate', GuildMemberAvailable = 'guildMemberAvailable', GuildMembersChunk = 'guildMembersChunk', GuildIntegrationsUpdate = 'guildIntegrationsUpdate', GuildRoleCreate = 'roleCreate', GuildRoleDelete = 'roleDelete', InviteCreate = 'inviteCreate', InviteDelete = 'inviteDelete', GuildRoleUpdate = 'roleUpdate', GuildEmojiCreate = 'emojiCreate', GuildEmojiDelete = 'emojiDelete', GuildEmojiUpdate = 'emojiUpdate', GuildBanAdd = 'guildBanAdd', GuildBanRemove = 'guildBanRemove', ChannelCreate = 'channelCreate', ChannelDelete = 'channelDelete', ChannelUpdate = 'channelUpdate', ChannelPinsUpdate = 'channelPinsUpdate', MessageCreate = 'messageCreate', MessageDelete = 'messageDelete', MessageUpdate = 'messageUpdate', MessageBulkDelete = 'messageDeleteBulk', MessagePollVoteAdd = 'messagePollVoteAdd', MessagePollVoteRemove = 'messagePollVoteRemove', MessageReactionAdd = 'messageReactionAdd', MessageReactionRemove = 'messageReactionRemove', MessageReactionRemoveAll = 'messageReactionRemoveAll', MessageReactionRemoveEmoji = 'messageReactionRemoveEmoji', ThreadCreate = 'threadCreate', ThreadDelete = 'threadDelete', ThreadUpdate = 'threadUpdate', ThreadListSync = 'threadListSync', ThreadMemberUpdate = 'threadMemberUpdate', ThreadMembersUpdate = 'threadMembersUpdate', UserUpdate = 'userUpdate', PresenceUpdate = 'presenceUpdate', VoiceChannelEffectSend = 'voiceChannelEffectSend', VoiceServerUpdate = 'voiceServerUpdate', VoiceStateUpdate = 'voiceStateUpdate', TypingStart = 'typingStart', WebhooksUpdate = 'webhookUpdate', InteractionCreate = 'interactionCreate', Error = 'error', Warn = 'warn', Debug = 'debug', CacheSweep = 'cacheSweep', ShardDisconnect = 'shardDisconnect', ShardError = 'shardError', ShardReconnecting = 'shardReconnecting', ShardReady = 'shardReady', ShardResume = 'shardResume', Invalidated = 'invalidated', Raw = 'raw', StageInstanceCreate = 'stageInstanceCreate', StageInstanceUpdate = 'stageInstanceUpdate', StageInstanceDelete = 'stageInstanceDelete', SubscriptionCreate = 'subscriptionCreate', SubscriptionUpdate = 'subscriptionUpdate', SubscriptionDelete = 'subscriptionDelete', GuildStickerCreate = 'stickerCreate', GuildStickerDelete = 'stickerDelete', GuildStickerUpdate = 'stickerUpdate', GuildScheduledEventCreate = 'guildScheduledEventCreate', GuildScheduledEventUpdate = 'guildScheduledEventUpdate', GuildScheduledEventDelete = 'guildScheduledEventDelete', GuildScheduledEventUserAdd = 'guildScheduledEventUserAdd', GuildScheduledEventUserRemove = 'guildScheduledEventUserRemove', GuildSoundboardSoundCreate = 'guildSoundboardSoundCreate', GuildSoundboardSoundDelete = 'guildSoundboardSoundDelete', GuildSoundboardSoundUpdate = 'guildSoundboardSoundUpdate', GuildSoundboardSoundsUpdate = 'guildSoundboardSoundsUpdate', SoundboardSounds = 'soundboardSounds', } export enum ShardEvents { Death = 'death', Disconnect = 'disconnect', Error = 'error', Message = 'message', Ready = 'ready', Reconnecting = 'reconnecting', Resume = 'resume', Spawn = 'spawn', } export enum WebSocketShardEvents { Close = 'close', Destroyed = 'destroyed', InvalidSession = 'invalidSession', Ready = 'ready', Resumed = 'resumed', AllReady = 'allReady', } export enum Status { Ready = 0, Connecting = 1, Reconnecting = 2, Idle = 3, Nearly = 4, Disconnected = 5, WaitingForGuilds = 6, Identifying = 7, Resuming = 8, } export interface GuildScheduledEventInviteURLCreateOptions extends InviteCreateOptions { channel?: GuildInvitableChannelResolvable; } export interface RoleCreateOptions extends RoleData { reason?: string; } export interface RoleEditOptions extends RoleData { reason?: string; } export interface StageInstanceCreateOptions { topic: string; privacyLevel?: StageInstancePrivacyLevel; sendStartNotification?: boolean; guildScheduledEvent?: GuildScheduledEventResolvable; } export interface CrosspostedChannel { channelId: Snowflake; guildId: Snowflake; type: ChannelType; name: string; } export type DateResolvable = Date | number | string; export interface GuildTemplateEditOptions { name?: string; description?: string; } export interface EmbedField { name: string; value: string; inline: boolean; } export type EmojiIdentifierResolvable = | EmojiResolvable | `${'' | 'a:'}${string}:${Snowflake}` | `<${'' | 'a'}:${string}:${Snowflake}>` | string; export type EmojiResolvable = Snowflake | GuildEmoji | ReactionEmoji | ApplicationEmoji; export interface FetchApplicationCommandOptions extends BaseFetchOptions { guildId?: Snowflake; locale?: Locale; withLocalizations?: boolean; } export interface FetchArchivedThreadOptions { type?: 'public' | 'private'; fetchAll?: boolean; before?: ThreadChannelResolvable | DateResolvable; limit?: number; } export interface FetchAutoModerationRuleOptions extends BaseFetchOptions { autoModerationRule: AutoModerationRuleResolvable; } export interface FetchAutoModerationRulesOptions { cache?: boolean; } export interface FetchBanOptions extends BaseFetchOptions { user: UserResolvable; } export interface FetchBansOptions { limit?: number; before?: Snowflake; after?: Snowflake; cache?: boolean; } export interface FetchChannelOptions extends BaseFetchOptions { allowUnknownGuild?: boolean; } export interface FetchedThreads { threads: ReadonlyCollection<Snowflake, AnyThreadChannel>; members: ReadonlyCollection<Snowflake, ThreadMember>; } export interface FetchedThreadsMore extends FetchedThreads { hasMore: boolean; } export interface FetchGuildOptions extends BaseFetchOptions { guild: GuildResolvable; withCounts?: boolean; } export interface FetchGuildsOptions { before?: Snowflake; after?: Snowflake; limit?: number; } export interface FetchGuildScheduledEventOptions extends BaseFetchOptions { guildScheduledEvent: GuildScheduledEventResolvable; withUserCount?: boolean; } export interface FetchGuildScheduledEventsOptions { cache?: boolean; withUserCount?: boolean; } export interface FetchGuildScheduledEventSubscribersOptions { limit?: number; withMember?: boolean; } export interface FetchInviteOptions extends BaseFetchOptions { code: string; } export interface FetchInvitesOptions { channelId?: GuildInvitableChannelResolvable; cache?: boolean; } export interface FetchMemberOptions extends BaseFetchOptions { user: UserResolvable; } export interface FetchMembersOptions { user?: UserResolvable | readonly UserResolvable[]; query?: string; limit?: number; withPresences?: boolean; time?: number; nonce?: string; } export interface FetchMessageOptions extends BaseFetchOptions { message: MessageResolvable; } export interface FetchMessagesOptions { limit?: number; before?: Snowflake; after?: Snowflake; around?: Snowflake; cache?: boolean; } export interface FetchReactionUsersOptions { type?: ReactionType; limit?: number; after?: Snowflake; } export interface FetchThreadMemberOptions extends BaseFetchOptions { member: ThreadMemberResolvable; withMember?: boolean; } export interface FetchThreadOwnerOptions extends BaseFetchOptions { withMember?: boolean; } export interface FetchThreadMembersWithGuildMemberDataOptions { withMember: true; after?: Snowflake; limit?: number; cache?: boolean; } export interface FetchThreadMembersWithoutGuildMemberDataOptions { withMember?: false; cache?: boolean; } export type FetchThreadMembersOptions = | FetchThreadMembersWithGuildMemberDataOptions | FetchThreadMembersWithoutGuildMemberDataOptions; export interface FetchThreadsOptions { archived?: FetchArchivedThreadOptions; } export interface AttachmentPayload { attachment: BufferResolvable | Stream; name?: string; description?: string; } export type GlobalSweepFilter<Key, Value> = () => | ((value: Value, key: Key, collection: Collection<Key, Value>) => boolean) | null; interface GuildAuditLogsTypes { [AuditLogEvent.GuildUpdate]: ['Guild', 'Update']; [AuditLogEvent.ChannelCreate]: ['Channel', 'Create']; [AuditLogEvent.ChannelUpdate]: ['Channel', 'Update']; [AuditLogEvent.ChannelDelete]: ['Channel', 'Delete']; [AuditLogEvent.ChannelOverwriteCreate]: ['Channel', 'Create']; [AuditLogEvent.ChannelOverwriteUpdate]: ['Channel', 'Update']; [AuditLogEvent.ChannelOverwriteDelete]: ['Channel', 'Delete']; [AuditLogEvent.MemberKick]: ['User', 'Delete']; [AuditLogEvent.MemberPrune]: ['User', 'Delete']; [AuditLogEvent.MemberBanAdd]: ['User', 'Delete']; [AuditLogEvent.MemberBanRemove]: ['User', 'Create']; [AuditLogEvent.MemberUpdate]: ['User', 'Update']; [AuditLogEvent.MemberRoleUpdate]: ['User', 'Update']; [AuditLogEvent.MemberMove]: ['User', 'Update']; [AuditLogEvent.MemberDisconnect]: ['User', 'Delete']; [AuditLogEvent.BotAdd]: ['User', 'Create']; [AuditLogEvent.RoleCreate]: ['Role', 'Create']; [AuditLogEvent.RoleUpdate]: ['Role', 'Update']; [AuditLogEvent.RoleDelete]: ['Role', 'Delete']; [AuditLogEvent.InviteCreate]: ['Invite', 'Create']; [AuditLogEvent.InviteUpdate]: ['Invite', 'Update']; [AuditLogEvent.InviteDelete]: ['Invite', 'Delete']; [AuditLogEvent.WebhookCreate]: ['Webhook', 'Create']; [AuditLogEvent.WebhookUpdate]: ['Webhook', 'Update']; [AuditLogEvent.WebhookDelete]: ['Webhook', 'Delete']; [AuditLogEvent.EmojiCreate]: ['Emoji', 'Create']; [AuditLogEvent.EmojiUpdate]: ['Emoji', 'Update']; [AuditLogEvent.EmojiDelete]: ['Emoji', 'Delete']; [AuditLogEvent.MessageDelete]: ['Message', 'Delete']; [AuditLogEvent.MessageBulkDelete]: ['Message', 'Delete']; [AuditLogEvent.MessagePin]: ['Message', 'Create']; [AuditLogEvent.MessageUnpin]: ['Message', 'Delete']; [AuditLogEvent.IntegrationCreate]: ['Integration', 'Create']; [AuditLogEvent.IntegrationUpdate]: ['Integration', 'Update']; [AuditLogEvent.IntegrationDelete]: ['Integration', 'Delete']; [AuditLogEvent.StageInstanceCreate]: ['StageInstance', 'Create']; [AuditLogEvent.StageInstanceUpdate]: ['StageInstance', 'Update']; [AuditLogEvent.StageInstanceDelete]: ['StageInstance', 'Delete']; [AuditLogEvent.StickerCreate]: ['Sticker', 'Create']; [AuditLogEvent.StickerUpdate]: ['Sticker', 'Update']; [AuditLogEvent.StickerDelete]: ['Sticker', 'Delete']; [AuditLogEvent.GuildScheduledEventCreate]: ['GuildScheduledEvent', 'Create']; [AuditLogEvent.GuildScheduledEventUpdate]: ['GuildScheduledEvent', 'Update']; [AuditLogEvent.GuildScheduledEventDelete]: ['GuildScheduledEvent', 'Delete']; [AuditLogEvent.ThreadCreate]: ['Thread', 'Create']; [AuditLogEvent.ThreadUpdate]: ['Thread', 'Update']; [AuditLogEvent.ThreadDelete]: ['Thread', 'Delete']; [AuditLogEvent.ApplicationCommandPermissionUpdate]: ['ApplicationCommand', 'Update']; [AuditLogEvent.SoundboardSoundCreate]: ['SoundboardSound', 'Create']; [AuditLogEvent.SoundboardSoundUpdate]: ['SoundboardSound', 'Update']; [AuditLogEvent.SoundboardSoundDelete]: ['SoundboardSound', 'Delete']; [AuditLogEvent.AutoModerationRuleCreate]: ['AutoModeration', 'Create']; [AuditLogEvent.AutoModerationRuleUpdate]: ['AutoModeration', 'Update']; [AuditLogEvent.AutoModerationRuleDelete]: ['AutoModeration', 'Delete']; [AuditLogEvent.AutoModerationBlockMessage]: ['User', 'Update']; [AuditLogEvent.AutoModerationFlagToChannel]: ['User', 'Update']; [AuditLogEvent.AutoModerationUserCommunicationDisabled]: ['User', 'Update']; [AuditLogEvent.OnboardingPromptCreate]: ['GuildOnboardingPrompt', 'Create']; [AuditLogEvent.OnboardingPromptUpdate]: ['GuildOnboardingPrompt', 'Update']; [AuditLogEvent.OnboardingPromptDelete]: ['GuildOnboardingPrompt', 'Delete']; [AuditLogEvent.OnboardingCreate]: ['GuildOnboarding', 'Create']; [AuditLogEvent.OnboardingUpdate]: ['GuildOnboarding', 'Update']; } export type GuildAuditLogsActionType = GuildAuditLogsTypes[keyof GuildAuditLogsTypes][1] | 'All'; export interface GuildAuditLogsEntryExtraField { [AuditLogEvent.MemberKick]: { integrationType: string } | null; [AuditLogEvent.MemberRoleUpdate]: { integrationType: string } | null; [AuditLogEvent.MemberPrune]: { removed: number; days: number }; [AuditLogEvent.MemberMove]: { channel: VoiceBasedChannel | { id: Snowflake }; count: number }; [AuditLogEvent.MessageDelete]: { channel: GuildTextBasedChannel | { id: Snowflake }; count: number }; [AuditLogEvent.MessageBulkDelete]: { count: number }; [AuditLogEvent.MessagePin]: { channel: GuildTextBasedChannel | { id: Snowflake }; messageId: Snowflake }; [AuditLogEvent.MessageUnpin]: { channel: GuildTextBasedChannel | { id: Snowflake }; messageId: Snowflake }; [AuditLogEvent.MemberDisconnect]: { count: number }; [AuditLogEvent.ChannelOverwriteCreate]: | Role | GuildMember | { id: Snowflake; name: string; type: AuditLogOptionsType.Role } | { id: Snowflake; type: AuditLogOptionsType.Member }; [AuditLogEvent.ChannelOverwriteUpdate]: | Role | GuildMember | { id: Snowflake; name: string; type: AuditLogOptionsType.Role } | { id: Snowflake; type: AuditLogOptionsType.Member }; [AuditLogEvent.ChannelOverwriteDelete]: | Role | GuildMember | { id: Snowflake; name: string; type: AuditLogOptionsType.Role } | { id: Snowflake; type: AuditLogOptionsType.Member }; [AuditLogEvent.StageInstanceCreate]: StageChannel | { id: Snowflake }; [AuditLogEvent.StageInstanceDelete]: StageChannel | { id: Snowflake }; [AuditLogEvent.StageInstanceUpdate]: StageChannel | { id: Snowflake }; [AuditLogEvent.ApplicationCommandPermissionUpdate]: { applicationId: Snowflake }; [AuditLogEvent.AutoModerationBlockMessage]: { autoModerationRuleName: string; autoModerationRuleTriggerType: AuditLogRuleTriggerType; channel: GuildTextBasedChannel | { id: Snowflake }; }; [AuditLogEvent.AutoModerationFlagToChannel]: { autoModerationRuleName: string; autoModerationRuleTriggerType: AuditLogRuleTriggerType; channel: GuildTextBasedChannel | { id: Snowflake }; }; [AuditLogEvent.AutoModerationUserCommunicationDisabled]: { autoModerationRuleName: string; autoModerationRuleTriggerType: AuditLogRuleTriggerType; channel: GuildTextBasedChannel | { id: Snowflake }; }; } export interface GuildAuditLogsEntryTargetField<TAction extends AuditLogEvent> { User: User | PartialUser | null; Guild: Guild; Webhook: Webhook<WebhookType.ChannelFollower | WebhookType.Incoming>; Invite: Invite; Emoji: GuildEmoji | { id: Snowflake }; Role: Role | { id: Snowflake }; Message: TAction extends AuditLogEvent.MessageBulkDelete ? GuildTextBasedChannel | { id: Snowflake } : User | null; Integration: Integration; Channel: NonThreadGuildBasedChannel | { id: Snowflake; [x: string]: unknown }; Thread: AnyThreadChannel | { id: Snowflake; [x: string]: unknown }; StageInstance: StageInstance; Sticker: Sticker; GuildScheduledEvent: GuildScheduledEvent; ApplicationCommand: ApplicationCommand | { id: Snowflake }; AutoModerationRule: AutoModerationRule; GuildOnboardingPrompt: GuildOnboardingPrompt | { id: Snowflake; [x: string]: unknown }; SoundboardSound: SoundboardSound | { id: Snowflake }; } export interface GuildAuditLogsFetchOptions<Event extends GuildAuditLogsResolvable> { before?: Snowflake | GuildAuditLogsEntry; after?: Snowflake | GuildAuditLogsEntry; limit?: number; user?: UserResolvable; type?: Event; } export type GuildAuditLogsResolvable = AuditLogEvent | null; export type GuildAuditLogsTargetType = GuildAuditLogsTypes[keyof GuildAuditLogsTypes][0] | 'Unknown'; export type GuildAuditLogsTargets = { [Key in GuildAuditLogsTargetType]: Key; }; export type GuildBanResolvable = GuildBan | UserResolvable; export type GuildChannelResolvable = Snowflake | GuildBasedChannel; export interface AutoModerationRuleCreateOptions { name: string; eventType: AutoModerationRuleEventType; triggerType: AutoModerationRuleTriggerType; triggerMetadata?: AutoModerationTriggerMetadataOptions; actions: readonly AutoModerationActionOptions[]; enabled?: boolean; exemptRoles?: ReadonlyCollection<Snowflake, Role> | readonly RoleResolvable[]; exemptChannels?: ReadonlyCollection<Snowflake, GuildBasedChannel> | readonly GuildChannelResolvable[]; reason?: string; } export interface AutoModerationRuleEditOptions extends Partial<Omit<AutoModerationRuleCreateOptions, 'triggerType'>> {} export interface AutoModerationTriggerMetadataOptions extends Partial<AutoModerationTriggerMetadata> {} export interface AutoModerationActionOptions { type: AutoModerationActionType; metadata?: AutoModerationActionMetadataOptions; } export interface AutoModerationActionMetadataOptions extends Partial<Omit<AutoModerationActionMetadata, 'channelId'>> { channel?: GuildTextChannelResolvable | ThreadChannel; } export interface GuildChannelCreateOptions extends Omit<CategoryCreateChannelOptions, 'type'> { parent?: CategoryChannelResolvable | null; type?: Exclude< ChannelType, | ChannelType.DM | ChannelType.GroupDM | ChannelType.PublicThread | ChannelType.AnnouncementThread | ChannelType.PrivateThread >; } export interface GuildChannelCloneOptions extends Omit<GuildChannelCreateOptions, 'name'> { name?: string; } export interface GuildChannelEditOptions { name?: string; type?: ChannelType.GuildText | ChannelType.GuildAnnouncement; position?: number; topic?: string | null; nsfw?: boolean; bitrate?: number; userLimit?: number; parent?: CategoryChannelResolvable | null; rateLimitPerUser?: number; lockPermissions?: boolean; permissionOverwrites?: readonly OverwriteResolvable[] | ReadonlyCollection<Snowflake, OverwriteResolvable>; defaultAutoArchiveDuration?: ThreadAutoArchiveDuration; rtcRegion?: string | null; videoQualityMode?: VideoQualityMode | null; availableTags?: readonly GuildForumTagData[]; defaultReactionEmoji?: DefaultReactionEmoji | null; defaultThreadRateLimitPerUser?: number; flags?: ChannelFlagsResolvable; defaultSortOrder?: SortOrderType | null; defaultForumLayout?: ForumLayoutType; reason?: string; } export interface GuildChannelOverwriteOptions { reason?: string; type?: OverwriteType; } export interface GuildCreateOptions { name: string; icon?: BufferResolvable | Base64Resolvable | null; verificationLevel?: GuildVerificationLevel; defaultMessageNotifications?: GuildDefaultMessageNotifications; explicitContentFilter?: GuildExplicitContentFilter; roles?: readonly PartialRoleData[]; channels?: readonly PartialChannelData[]; afkChannelId?: Snowflake | number; afkTimeout?: number; systemChannelId?: Snowflake | number; systemChannelFlags?: SystemChannelFlagsResolvable; } export interface GuildWidgetSettings { enabled: boolean; channel: TextChannel | NewsChannel | VoiceBasedChannel | ForumChannel | MediaChannel | null; } export interface GuildEditOptions { name?: string; verificationLevel?: GuildVerificationLevel | null; defaultMessageNotifications?: GuildDefaultMessageNotifications | null; explicitContentFilter?: GuildExplicitContentFilter | null; afkTimeout?: number; afkChannel?: VoiceChannelResolvable | null; icon?: BufferResolvable | Base64Resolvable | null; owner?: GuildMemberResolvable; splash?: BufferResolvable | Base64Resolvable | null; discoverySplash?: BufferResolvable | Base64Resolvable | null; banner?: BufferResolvable | Base64Resolvable | null; systemChannel?: TextChannelResolvable | null; systemChannelFlags?: SystemChannelFlagsResolvable; rulesChannel?: TextChannelResolvable | null; publicUpdatesChannel?: TextChannelResolvable | null; safetyAlertsChannel?: TextChannelResolvable | null; preferredLocale?: Locale | null; features?: readonly `${GuildFeature}`[]; description?: string | null; premiumProgressBarEnabled?: boolean; reason?: string; } export interface GuildEmojiCreateOptions { attachment: BufferResolvable | Base64Resolvable; name: string; roles?: ReadonlyCollection<Snowflake, Role> | readonly RoleResolvable[]; reason?: string; } export interface GuildEmojiEditOptions { name?: string; roles?: ReadonlyCollection<Snowflake, Role> | readonly RoleResolvable[]; reason?: string; } export interface GuildStickerCreateOptions { file: BufferResolvable | Stream | AttachmentPayload | JSONEncodable<AttachmentBuilder>; name: string; tags: string; description?: string | null; reason?: string; } export interface GuildStickerEditOptions { name?: string; description?: string | null; tags?: string; reason?: string; } export interface GuildMemberEditOptions { nick?: string | null; roles?: ReadonlyCollection<Snowflake, Role> | readonly RoleResolvable[]; mute?: boolean; deaf?: boolean; channel?: GuildVoiceChannelResolvable | null; communicationDisabledUntil?: DateResolvable | null; flags?: GuildMemberFlagsResolvable; reason?: string; } export type GuildMemberResolvable = GuildMember | UserResolvable; export type GuildResolvable = Guild | NonThreadGuildBasedChannel | GuildMember | GuildEmoji | Invite | Role | Snowflake; export interface GuildPruneMembersOptions { count?: boolean; days?: number; dry?: boolean; reason?: string; roles?: readonly RoleResolvable[]; } export interface GuildWidgetSettingsData { enabled: boolean; channel: TextChannel | NewsChannel | VoiceBasedChannel | ForumChannel | MediaChannel | Snowflake | null; } export interface GuildSearchMembersOptions { query: string; limit?: number; cache?: boolean; } export interface GuildListMembersOptions { after?: Snowflake; limit?: number; cache?: boolean; } // TODO: use conditional types for better TS support export interface GuildScheduledEventCreateOptions { name: string; scheduledStartTime: DateResolvable; scheduledEndTime?: DateResolvable; privacyLevel: GuildScheduledEventPrivacyLevel; entityType: GuildScheduledEventEntityType; description?: string; channel?: GuildVoiceChannelResolvable; entityMetadata?: GuildScheduledEventEntityMetadataOptions; image?: BufferResolvable | Base64Resolvable | null; reason?: string; recurrenceRule?: GuildScheduledEventRecurrenceRuleOptions; } export type GuildScheduledEventRecurrenceRuleOptions = | BaseGuildScheduledEventRecurrenceRuleOptions< GuildScheduledEventRecurrenceRuleFrequency.Yearly, { byMonth: readonly GuildScheduledEventRecurrenceRuleMonth[]; byMonthDay: readonly number[]; } > | BaseGuildScheduledEventRecurrenceRuleOptions< GuildScheduledEventRecurrenceRuleFrequency.Monthly, { byNWeekday: readonly GuildScheduledEventRecurrenceRuleNWeekday[]; } > | BaseGuildScheduledEventRecurrenceRuleOptions< GuildScheduledEventRecurrenceRuleFrequency.Weekly | GuildScheduledEventRecurrenceRuleFrequency.Daily, { byWeekday: readonly GuildScheduledEventRecurrenceRuleWeekday[]; } >; type BaseGuildScheduledEventRecurrenceRuleOptions< Frequency extends GuildScheduledEventRecurrenceRuleFrequency, Extra extends {}, > = { startAt: DateResolvable; interval: number; frequency: Frequency; } & Extra; export interface GuildScheduledEventEditOptions< Status extends GuildScheduledEventStatus, AcceptableStatus extends GuildScheduledEventSetStatusArg<Status>, > extends Omit<Partial<GuildScheduledEventCreateOptions>, 'channel' | 'recurrenceRule'> { channel?: GuildVoiceChannelResolvable | null; status?: AcceptableStatus; recurrenceRule?: GuildScheduledEventRecurrenceRuleOptions | null; } export interface GuildScheduledEventEntityMetadata { location: string | null; } export interface GuildScheduledEventEntityMetadataOptions { location?: string; } export type GuildScheduledEventManagerFetchResult< Options extends GuildScheduledEventResolvable | FetchGuildScheduledEventOptions | FetchGuildScheduledEventsOptions, > = Options extends GuildScheduledEventResolvable | FetchGuildScheduledEventOptions ? GuildScheduledEvent : Collection<Snowflake, GuildScheduledEvent>; export type GuildScheduledEventManagerFetchSubscribersResult< Options extends FetchGuildScheduledEventSubscribersOptions, > = Options extends { withMember: true } ? Collection<Snowflake, GuildScheduledEventUser<true>> : Collection<Snowflake, GuildScheduledEventUser<false>>; export type GuildScheduledEventResolvable = Snowflake | GuildScheduledEvent; export type GuildScheduledEventSetStatusArg<Status extends GuildScheduledEventStatus> = Status extends GuildScheduledEventStatus.Scheduled ? GuildScheduledEventStatus.Active | GuildScheduledEventStatus.Canceled : Status extends GuildScheduledEventStatus.Active ? GuildScheduledEventStatus.Completed : never; export interface GuildScheduledEventUser<WithMember> { guildScheduledEventId: Snowflake; user: User; member: WithMember extends true ? GuildMember : null; } export type GuildTemplateResolvable = string; export type GuildVoiceChannelResolvable = VoiceBasedChannel | Snowflake; export interface GuildOnboardingEditOptions { prompts?: readonly GuildOnboardingPromptData[] | ReadonlyCollection<Snowflake, GuildOnboardingPrompt>; defaultChannels?: readonly ChannelResolvable[] | ReadonlyCollection<Snowflake, GuildChannel>; enabled?: boolean; mode?: GuildOnboardingMode; reason?: string; } export interface GuildOnboardingPromptData { id?: Snowflake; title: string; singleSelect?: boolean; required?: boolean; inOnboarding?: boolean; type?: GuildOnboardingPromptType; options: readonly GuildOnboardingPromptOptionData[] | ReadonlyCollection<Snowflake, GuildOnboardingPromptOption>; } export interface GuildOnboardingPromptOptionData { id?: Snowflake | null; channels?: readonly ChannelResolvable[] | ReadonlyCollection<Snowflake, GuildChannel>; roles?: readonly RoleResolvable[] | ReadonlyCollection<Snowflake, Role>; title: string; description?: string | null; emoji?: EmojiIdentifierResolvable | Emoji | null; } export type HexColorString = `#${string}`; export interface IncidentActions { invitesDisabledUntil: Date | null; dmsDisabledUntil: Date | null; dmSpamDetectedAt: Date | null; raidDetectedAt: Date | null; } export interface IncidentActionsEditOptions { invitesDisabledUntil?: DateResolvable | null | undefined; dmsDisabledUntil?: DateResolvable | null | undefined; } export interface IntegrationAccount { id: string | Snowflake; name: string; } export type IntegrationType = 'twitch' | 'youtube' | 'discord' | 'guild_subscription'; export type IntegrationTypesConfigurationParameters = ClientApplicationInstallParams; export interface IntegrationTypesConfigurationContext { oauth2InstallParams: IntegrationTypesConfigurationParameters | null; } export type IntegrationTypesConfiguration = Partial< Record<ApplicationIntegrationType, IntegrationTypesConfigurationContext> >; export type CollectedInteraction<Cached extends CacheType = CacheType> = | StringSelectMenuInteraction<Cached> | UserSelectMenuInteraction<Cached> | RoleSelectMenuInteraction<Cached> | MentionableSelectMenuInteraction<Cached> | ChannelSelectMenuInteraction<Cached> | ButtonInteraction<Cached> | ModalSubmitInteraction<Cached>; export interface InteractionCollectorOptions< Interaction extends CollectedInteraction, Cached extends CacheType = CacheType, > extends CollectorOptions<[Interaction, Collection<Snowflake, Interaction>]> { channel?: TextBasedChannelResolvable; componentType?: ComponentType; guild?: GuildResolvable; interactionType?: InteractionType; max?: number; maxComponents?: number; maxUsers?: number; message?: CacheTypeReducer<Cached, Message, APIMessage>; interactionResponse?: InteractionResponse<BooleanCache<Cached>>; } export interface InteractionDeferReplyOptions { /** @deprecated Use {@link InteractionDeferReplyOptions.flags} instead. */ ephemeral?: boolean; flags?: BitFieldResolvable<Extract<MessageFlagsString, 'Ephemeral'>, MessageFlags.Ephemeral> | undefined; withResponse?: boolean; /** @deprecated Use {@link InteractionDeferReplyOptions.withResponse} instead. */ fetchReply?: boolean; } export interface InteractionDeferUpdateOptions { withResponse?: boolean; /** @deprecated Use {@link InteractionDeferUpdateOptions.withResponse} instead. */ fetchReply?: boolean; } export interface InteractionReplyOptions extends BaseMessageOptionsWithPoll { /** @deprecated Use {@link InteractionReplyOptions.flags} instead. */ ephemeral?: boolean; tts?: boolean; withResponse?: boolean; /** @deprecated Use {@link InteractionReplyOptions.withResponse} instead. */ fetchReply?: boolean; flags?: | BitFieldResolvable< Extract<MessageFlagsString, 'Ephemeral' | 'SuppressEmbeds' | 'SuppressNotifications' | 'IsComponentsV2'>, | MessageFlags.Ephemeral | MessageFlags.SuppressEmbeds | MessageFlags.SuppressNotifications | MessageFlags.IsComponentsV2 > | undefined; } export interface InteractionUpdateOptions extends MessageEditOptions { withResponse?: boolean; /** @deprecated Use {@link InteractionUpdateOptions.withResponse} instead. */ fetchReply?: boolean; } export interface InviteGenerationOptions { permissions?: PermissionResolvable; guild?: GuildResolvable; disableGuildSelect?: boolean; scopes: readonly OAuth2Scopes[]; } export type GuildInvitableChannelResolvable = | TextChannel | VoiceChannel | NewsChannel | StageChannel | ForumChannel | MediaChannel | Snowflake; export interface InviteCreateOptions { temporary?: boolean; maxAge?: number; maxUses?: number; unique?: boolean; reason?: string; targetApplication?: ApplicationResolvable; targetUser?: UserResolvable; targetType?: InviteTargetType; } export type InviteResolvable = string; export interface LifetimeFilterOptions<Key, Value> { excludeFromSweep?: (value: Value, key: Key, collection: LimitedCollection<Key, Value>) => boolean; getComparisonTimestamp?: (value: Value, key: Key, collection: LimitedCollection<Key, Value>) => number; lifetime?: number; } /** @internal */ export interface MakeErrorOptions { name: string; message: string; stack: string; } export type ActionRowComponentOptions = | ButtonComponentData | StringSelectMenuComponentData | UserSelectMenuComponentData | RoleSelectMenuComponentData | MentionableSelectMenuComponentData | ChannelSelectMenuComponentData; export type MessageActionRowComponentResolvable = MessageActionRowComponent | ActionRowComponentOptions; export interface MessageActivity { partyId?: string; type: MessageActivityType; } export interface BaseButtonComponentData extends BaseComponentData { type: ComponentType.Button; style: ButtonStyle; disabled?: boolean; emoji?: ComponentEmojiResolvable; label?: string; } export interface LinkButtonComponentData extends BaseButtonComponentData { style: ButtonStyle.Link; url: string; } export interface InteractionButtonComponentData extends BaseButtonComponentData { style: Exclude<ButtonStyle, ButtonStyle.Link>; customId: string; } export type ButtonComponentData = InteractionButtonComponentData | LinkButtonComponentData; export interface MessageCollectorOptions extends CollectorOptions<[Message, Collection<Snowflake, Message>]> { max?: number; maxProcessed?: number; } export type MessageComponent = | Component | ActionRowBuilder<MessageActionRowComponentBuilder | ModalActionRowComponentBuilder> | ButtonComponent | StringSelectMenuComponent | UserSelectMenuComponent | RoleSelectMenuComponent | MentionableSelectMenuComponent | ChannelSelectMenuComponent; export type CollectedMessageInteraction<Cached extends CacheType = CacheType> = Exclude< CollectedInteraction<Cached>, ModalSubmitInteraction >; export interface MessageComponentCollectorOptions<Interaction extends CollectedMessageInteraction> extends Omit<InteractionCollectorOptions<Interaction>, 'channel' | 'message' | 'guild' | 'interactionType'> {} export interface MessageChannelComponentCollectorOptions<Interaction extends CollectedMessageInteraction> extends Omit<InteractionCollectorOptions<Interaction>, 'channel' | 'guild' | 'interactionType'> {} export interface MessageInteractionMetadata { id: Snowflake; type: InteractionType; user: User; authorizingIntegrationOwners: APIAuthorizingIntegrationOwnersMap; originalResponseMessageId: Snowflake | null; interactedMessageId: Snowflake | null; triggeringInteractionMetadata: MessageInteractionMetadata | null; } /** @deprecated Use {@link MessageInteractionMetadata} instead. */ export interface MessageInteraction { id: Snowflake; type: InteractionType; commandName: string; user: User; } export interface MessageMentionsHasOptions { ignoreDirect?: boolean; ignoreRoles?: boolean; ignoreRepliedUser?: boolean; ignoreEveryone?: boolean; } export interface MessageMentionOptions { parse?: readonly MessageMentionTypes[]; roles?: readonly Snowflake[]; users?: readonly Snowflake[]; repliedUser?: boolean; } export type MessageMentionTypes = 'roles' | 'users' | 'everyone'; export interface MessageSnapshot extends Partialize< Message, null, Exclude< keyof Message, | 'attachments' | 'client' | 'components' | 'content' | 'createdTimestamp' | 'editedTimestamp' | 'embeds' | 'flags' | 'mentions' | 'stickers' | 'type' > > {} export interface BaseMessageOptions { content?: string; embeds?: readonly (JSONEncodable<APIEmbed> | APIEmbed)[]; allowedMentions?: MessageMentionOptions; files?: readonly ( | BufferResolvable | Stream | JSONEncodable<APIAttachment> | Attachment | AttachmentBuilder | AttachmentPayload )[]; components?: readonly ( | JSONEncodable<APIMessageTopLevelComponent> | TopLevelComponentData | ActionRowData<MessageActionRowComponentData | MessageActionRowComponentBuilder> | APIMessageTopLevelComponent )[]; } export interface BaseMessageOptionsWithPoll extends BaseMessageOptions { poll?: PollData; } export interface MessageCreateOptions extends BaseMessageOptionsWithPoll { tts?: boolean; nonce?: string | number; enforceNonce?: boolean; reply?: ReplyOptions; forward?: ForwardOptions; stickers?: readonly StickerResolvable[]; flags?: | BitFieldResolvable< Extract<MessageFlagsString, 'SuppressEmbeds' | 'SuppressNotifications' | 'IsComponentsV2'>, MessageFlags.SuppressEmbeds | MessageFlags.SuppressNotifications | MessageFlags.IsComponentsV2 > | undefined; } export interface GuildForumThreadMessageCreateOptions extends BaseMessageOptions, Pick<MessageCreateOptions, 'flags' | 'stickers'> {} export interface MessageEditAttachmentData { id: Snowflake; } export interface MessageEditOptions extends Omit<BaseMessageOptions, 'content'> { content?: string | null; attachments?: readonly (Attachment | MessageEditAttachmentData)[]; flags?: | BitFieldResolvable< Extract<MessageFlagsString, 'SuppressEmbeds' | 'IsComponentsV2'>, MessageFlags.SuppressEmbeds | MessageFlags.IsComponentsV2 > | undefined; } export type MessageReactionResolvable = MessageReaction | Snowflake | string; export interface MessageReference { channelId: Snowflake; guildId: Snowflake | undefined; messageId: Snowflake | undefined; type: MessageReferenceType; } export type MessageResolvable = Message | Snowflake; export interface BaseSelectMenuComponentData extends BaseComponentData { customId: string; disabled?: boolean; maxValues?: number; minValues?: number; placeholder?: string; } export interface StringSelectMenuComponentData extends BaseSelectMenuComponentData { type: ComponentType.StringSelect; options: readonly SelectMenuComponentOptionData[]; } export interface UserSelectMenuComponentData extends BaseSelectMenuComponentData { type: ComponentType.UserSelect; defaultValues?: readonly APISelectMenuDefaultValue<SelectMenuDefaultValueType.User>[]; } export interface RoleSelectMenuComponentData extends BaseSelectMenuComponentData { type: ComponentType.RoleSelect; defaultValues?: readonly APISelectMenuDefaultValue<SelectMenuDefaultValueType.Role>[]; } export interface MentionableSelectMenuComponentData extends BaseSelectMenuComponentData { type: ComponentType.MentionableSelect; defaultValues?: readonly APISelectMenuDefaultValue< SelectMenuDefaultValueType.Role | SelectMenuDefaultValueType.User >[]; } export interface ChannelSelectMenuComponentData extends BaseSelectMenuComponentData { type: ComponentType.ChannelSelect; channelTypes?: readonly ChannelType[]; defaultValues?: readonly APISelectMenuDefaultValue<SelectMenuDefaultValueType.Channel>[]; } export interface MessageSelectOption { default: boolean; description: string | null; emoji: APIPartialEmoji | null; label: string; value: string; } export interface ReactionCountDetailsData { burst: number; normal: number; } export interface SelectMenuComponentOptionData { default?: boolean; description?: string; emoji?: ComponentEmojiResolvable; label: string; value: string; } export interface TextInputComponentData extends BaseComponentData { type: ComponentType.TextInput; customId: string; style: TextInputStyle; label: string; minLength?: number; maxLength?: number; required?: boolean; value?: string; placeholder?: string; } export type MessageTarget = | Interaction | InteractionWebhook | TextBasedChannel | User | GuildMember | Webhook<WebhookType.Incoming> | WebhookClient | Message | MessageManager; export interface MultipleShardRespawnOptions { shardDelay?: number; respawnDelay?: number; timeout?: number; } export interface MultipleShardSpawnOptions { amount?: number | 'auto'; delay?: number; timeout?: number; } export interface OverwriteData { allow?: PermissionResolvable; deny?: PermissionResolvable; id: GuildMemberResolvable | RoleResolvable; type?: OverwriteType; } export type OverwriteResolvable = PermissionOverwrites | OverwriteData; export type PermissionFlags = Record<keyof typeof PermissionFlagsBits, bigint>; export type PermissionOverwriteOptions = Partial<Record<keyof typeof PermissionFlagsBits, boolean | null>>; export type PermissionResolvable = BitFieldResolvable<keyof typeof PermissionFlagsBits, bigint>; export type PermissionOverwriteResolvable = UserResolvable | RoleResolvable | PermissionOverwrites; export interface RecursiveReadonlyArray<ItemType> extends ReadonlyArray<ItemType | RecursiveReadonlyArray<ItemType>> {} export interface PartialRecipient { username: string; } export interface PresenceData { status?: PresenceStatusData; afk?: boolean; activities?: readonly ActivitiesOptions[]; shardId?: number | readonly number[]; } export type PresenceResolvable = Presence | UserResolvable | Snowflake; export interface PartialChannelData { id?: Snowflake | number; parentId?: Snowflake | number; type?: ChannelType.GuildText | ChannelType.GuildVoice | ChannelType.GuildCategory; name: string; topic?: string | null; nsfw?: boolean; bitrate?: number; userLimit?: number; rtcRegion?: string | null; videoQualityMode?: VideoQualityMode; permissionOverwrites?: readonly PartialOverwriteData[]; rateLimitPerUser?: number; } export interface PartialEmoji { animated: boolean; id: Snowflake | undefined; name: string; } export interface PartialEmojiOnlyId { id: Snowflake; } export type Partialize< PartialType extends AllowedPartial, NulledKeys extends keyof PartialType | null = null, NullableKeys extends keyof PartialType | null = null, OverridableKeys extends keyof PartialType | '' = '', > = { [K in keyof Omit<PartialType, OverridableKeys>]: K extends 'partial' ? true : K extends NulledKeys ? null : K extends NullableKeys ? PartialType[K] | null : PartialType[K]; }; export interface PartialDMChannel extends Partialize<DMChannel, null, null, 'lastMessageId'> { lastMessageId: undefined; } export interface PartialGuildMember extends Partialize<GuildMember, 'joinedAt' | 'joinedTimestamp' | 'pending'> {} export interface PartialMessage extends Partialize<Message, 'type' | 'system' | 'pinned' | 'tts', 'content' | 'cleanContent' | 'author'> {} export interface PartialMessageReaction extends Partialize<MessageReaction, 'count'> {} export interface PartialGuildScheduledEvent extends Partialize<GuildScheduledEvent, 'userCount', 'status' | 'privacyLevel' | 'name' | 'entityType'> {} export interface PartialThreadMember extends Partialize<ThreadMember, 'flags' | 'joinedAt' | 'joinedTimestamp'> {} export interface PartialSoundboardSound extends Partialize<SoundboardSound, 'available' | 'name' | 'volume'> {} export interface PartialOverwriteData { id: Snowflake | number; type?: OverwriteType; allow?: PermissionResolvable; deny?: PermissionResolvable; } export interface PartialRoleData extends RoleData { id?: Snowflake | number; } export enum Partials { User, Channel, GuildMember, Message, Reaction, GuildScheduledEvent, ThreadMember, SoundboardSound, } export interface PartialUser extends Partialize<User, 'username' | 'tag' | 'discriminator'> {} export type PresenceStatusData = ClientPresenceStatus | 'invisible'; export type PresenceStatus = PresenceStatusData | 'offline'; export interface ReactionCollectorOptions extends CollectorOptions<[MessageReaction, User]> { max?: number; maxEmojis?: number; maxUsers?: number; } export interface ReplyOptions { messageReference: MessageResolvable; failIfNotExists?: boolean; } export interface BaseForwardOptions { message: MessageResolvable; channel?: Exclude<TextBasedChannelResolvable, PartialGroupDMChannel>; guild?: GuildResolvable; } export type ForwardOptionsWithMandatoryChannel = BaseForwardOptions & Required<Pick<BaseForwardOptions, 'channel'>>; export interface ForwardOptionsWithOptionalChannel extends BaseForwardOptions { message: Exclude<MessageResolvable, Snowflake>; } export type ForwardOptions = ForwardOptionsWithMandatoryChannel | ForwardOptionsWithOptionalChannel; export interface MessageReplyOptions extends Omit<MessageCreateOptions, 'reply' | 'forward'> { failIfNotExists?: boolean; } export interface ResolvedOverwriteOptions { allow: PermissionsBitField; deny: PermissionsBitField; } export interface RoleData { name?: string; color?: ColorResolvable; hoist?: boolean; position?: number; permissions?: PermissionResolvable; mentionable?: boolean; icon?: BufferResolvable | Base64Resolvable | EmojiResolvable | null; unicodeEmoji?: string | null; } export type RoleMention = '@everyone' | `<@&${Snowflake}>`; export interface RolePosition { role: RoleResolvable; position: number; } export type RoleResolvable = Role | Snowflake; export interface RoleSubscriptionData { roleSubscriptionListingId: Snowflake; tierName: string; totalMonthsSubscribed: number; isRenewal: boolean; } export interface RoleTagData { botId?: Snowflake; integrationId?: Snowflake; premiumSubscriberRole?: true; subscriptionListingId?: Snowflake; availableForPurchase?: true; guildConnections?: true; } export interface SetChannelPositionOptions { relative?: boolean; reason?: string; } export interface SetParentOptions { lockPermissions?: boolean; reason?: string; } export interface SetRolePositionOptions { relative?: boolean; reason?: string; } export type ShardingManagerMode = 'process' | 'worker'; export interface ShardingManagerOptions { totalShards?: number | 'auto'; shardList?: readonly number[] | 'auto'; mode?: ShardingManagerMode; respawn?: boolean; silent?: boolean; shardArgs?: readonly string[]; token?: string; execArgv?: readonly string[]; } export interface ShowModalOptions { withResponse?: boolean; } export interface LaunchActivityOptions { withResponse?: boolean; } export { Snowflake }; export type StageInstanceResolvable = StageInstance | Snowflake; export interface StartThreadOptions { name: string; autoArchiveDuration?: ThreadAutoArchiveDuration; reason?: string; rateLimitPerUser?: number; } export type ClientStatus = number; export type StickerResolvable = Sticker | Snowflake; export type SystemChannelFlagsResolvable = BitFieldResolvable<SystemChannelFlagsString, number>; export type StageChannelResolvable = StageChannel | Snowflake; export interface StageInstanceEditOptions { topic?: string; privacyLevel?: StageInstancePrivacyLevel; } /** @internal */ export interface SupportingInteractionResolvedData { client: Client; guild?: Guild; channel?: GuildTextBasedChannel; } export type SweeperKey = keyof SweeperDefinitions; export type CollectionSweepFilter<Key, Value> = (value: Value, key: Key, collection: Collection<Key, Value>) => boolean; export interface SweepOptions<Key, Value> { interval: number; filter: GlobalSweepFilter<Key, Value>; } export interface LifetimeSweepOptions { interval: number; lifetime: number; filter?: never; } export interface SweeperDefinitions { applicationCommands: [Snowflake, ApplicationCommand]; autoModerationRules: [Snowflake, AutoModerationRule]; bans: [Snowflake, GuildBan]; emojis: [Snowflake, GuildEmoji]; entitlements: [Snowflake, Entitlement]; invites: [string, Invite, true]; guildMembers: [Snowflake, GuildMember]; messages: [Snowflake, Message, true]; presences: [Snowflake, Presence]; reactions: [string | Snowflake, MessageReaction]; stageInstances: [Snowflake, StageInstance]; stickers: [Snowflake, Sticker]; threadMembers: [Snowflake, ThreadMember]; threads: [Snowflake, AnyThreadChannel, true]; users: [Snowflake, User]; voiceStates: [Snowflake, VoiceState]; } export type SweeperOptions = { [Key in keyof SweeperDefinitions]?: SweeperDefinitions[Key][2] extends true ? SweepOptions<SweeperDefinitions[Key][0], SweeperDefinitions[Key][1]> | LifetimeSweepOptions : SweepOptions<SweeperDefinitions[Key][0], SweeperDefinitions[Key][1]>; }; export interface LimitedCollectionOptions<Key, Value> { maxSize?: number; keepOverLimit?: (value: Value, key: Key, collection: LimitedCollection<Key, Value>) => boolean; } export type Channel = | CategoryChannel | DMChannel | PartialDMChannel | PartialGroupDMChannel | NewsChannel | StageChannel | TextChannel | PublicThreadChannel | PrivateThreadChannel | VoiceChannel | ForumChannel | MediaChannel; export type TextBasedChannel = Exclude<Extract<Channel, { type: TextChannelType }>, ForumChannel | MediaChannel>; export type SendableChannels = Extract<Channel, { send: (...args: any[]) => any }>; export type TextBasedChannels = TextBasedChannel; export type TextBasedChannelTypes = TextBasedChannel['type']; export type GuildTextBasedChannelTypes = Exclude<TextBasedChannelTypes, ChannelType.DM | ChannelType.GroupDM>; export type SendableChannelTypes = SendableChannels['type']; export type VoiceBasedChannel = Extract<Channel, { bitrate: number }>; export type GuildBasedChannel = Extract<Channel, { guild: Guild }>; export type CategoryChildChannel = Exclude<Extract<Channel, { parent: CategoryChannel | null }>, CategoryChannel>; export type NonThreadGuildBasedChannel = Exclude<GuildBasedChannel, AnyThreadChannel>; export type GuildTextBasedChannel = Extract<GuildBasedChannel, TextBasedChannel>; export type TextChannelResolvable = Snowflake | TextChannel; export type TextBasedChannelResolvable = Snowflake | TextBasedChannel; export type ThreadChannelResolvable = Snowflake | ThreadChannel; export type ThreadChannelType = ChannelType.AnnouncementThread | ChannelType.PublicThread | ChannelType.PrivateThread; export interface GuildTextThreadCreateOptions<AllowedThreadType> extends StartThreadOptions { startMessage?: MessageResolvable; type?: AllowedThreadType; invitable?: AllowedThreadType extends ChannelType.PrivateThread ? boolean : never; } export interface GuildForumThreadCreateOptions extends StartThreadOptions { message: GuildForumThreadMessageCreateOptions | MessagePayload; appliedTags?: readonly Snowflake[]; } export interface ThreadEditOptions { name?: string; archived?: boolean; autoArchiveDuration?: ThreadAutoArchiveDuration; rateLimitPerUser?: number; locked?: boolean; invitable?: boolean; appliedTags?: readonly Snowflake[]; flags?: ChannelFlagsResolvable; reason?: string; } export type ThreadMemberResolvable = ThreadMember | UserResolvable; export type UserMention = `<@${Snowflake}>`; export type UserResolvable = User | Snowflake | Message | GuildMember | ThreadMember; export interface Vanity { code: string | null; uses: number; } export type VoiceBasedChannelTypes = VoiceBasedChannel['type']; export type VoiceChannelResolvable = Snowflake | VoiceChannel; export interface VoiceStateEditOptions { requestToSpeak?: boolean; suppressed?: boolean; } export type WebhookClientData = WebhookClientDataIdWithToken | WebhookClientDataURL; export interface WebhookClientDataIdWithToken { id: Snowflake; token: string; } export interface WebhookClientDataURL { url: string; } export interface WebhookClientOptions extends Pick<ClientOptions, 'allowedMentions' | 'rest'> {} export interface WebhookDeleteOptions { token?: string; reason?: string; } export interface WebhookEditOptions { name?: string; avatar?: BufferResolvable | null; channel?: GuildTextChannelResolvable | VoiceChannel | StageChannel | ForumChannel | MediaChannel; reason?: string; } export interface WebhookMessageEditOptions extends MessageEditOptions { threadId?: Snowflake; withComponents?: boolean; } export interface InteractionEditReplyOptions extends WebhookMessageEditOptions, Pick<BaseMessageOptionsWithPoll, 'poll'> { message?: MessageResolvable | '@original'; } export interface WebhookFetchMessageOptions { threadId?: Snowflake; } export interface WebhookMessageCreateOptions extends Omit<MessageCreateOptions, 'nonce' | 'reply' | 'stickers' | 'forward'> { username?: string; avatarURL?: string; threadId?: Snowflake; threadName?: string; appliedTags?: readonly Snowflake[]; withComponents?: boolean; } export interface WebSocketOptions { large_threshold?: number; version?: number; buildStrategy?(manager: WSWebSocketManager): IShardingStrategy; buildIdentifyThrottler?(manager: WSWebSocketManager): Awaitable<IIdentifyThrottler>; } export interface WidgetActivity { name: string; } export interface WidgetChannel { id: Snowflake; name: string; position: number; } export interface WelcomeChannelData { description: string; channel: TextChannel | NewsChannel | ForumChannel | MediaChannel | Snowflake; emoji?: EmojiIdentifierResolvable; } export interface WelcomeScreenEditOptions { enabled?: boolean; description?: string; welcomeChannels?: readonly WelcomeChannelData[]; } export interface ClientApplicationEditOptions { customInstallURL?: string; description?: string; roleConnectionsVerificationURL?: string; installParams?: ClientApplicationInstallParams; flags?: ApplicationFlagsResolvable; icon?: BufferResolvable | Base64Resolvable | null; coverImage?: BufferResolvable | Base64Resolvable | null; interactionsEndpointURL?: string; eventWebhooksURL?: string; eventWebhooksStatus?: ApplicationWebhookEventStatus.Enabled | ApplicationWebhookEventStatus.Disabled; eventWebhooksTypes?: readonly ApplicationWebhookEventType[]; tags?: readonly string[]; } export interface ClientApplicationInstallParams { scopes: readonly OAuth2Scopes[]; permissions: Readonly<PermissionsBitField>; } export type Serialized<Value> = Value extends symbol | bigint | (() => any) ? never : Value extends number | string | boolean | undefined ? Value : Value extends JSONEncodable<infer JSONResult> ? JSONResult : Value extends ReadonlyArray<infer ItemType> ? Serialized<ItemType>[] : Value extends ReadonlyMap<unknown, unknown> | ReadonlySet<unknown> ? {} : { [K in keyof Value]: Serialized<Value[K]> }; //#endregion //#region Voice /** * @internal Use `DiscordGatewayAdapterLibraryMethods` from `@discordjs/voice` instead. */ export interface InternalDiscordGatewayAdapterLibraryMethods { onVoiceServerUpdate(data: GatewayVoiceServerUpdateDispatchData): void; onVoiceStateUpdate(data: GatewayVoiceStateUpdateDispatchData): void; destroy(): void; } /** * @internal Use `DiscordGatewayAdapterImplementerMethods` from `@discordjs/voice` instead. */ export interface InternalDiscordGatewayAdapterImplementerMethods { sendPayload(payload: unknown): boolean; destroy(): void; } /** * @internal Use `DiscordGatewayAdapterCreator` from `@discordjs/voice` instead. */ export type InternalDiscordGatewayAdapterCreator = ( methods: InternalDiscordGatewayAdapterLibraryMethods, ) => InternalDiscordGatewayAdapterImplementerMethods; //#endregion // External export * from 'discord-api-types/v10'; export * from '@discordjs/builders'; export * from '@discordjs/formatters'; export * from '@discordjs/rest'; export * from '@discordjs/util'; export * from '@discordjs/ws'; node_modules/discord.js/src/client/actions/TypingStart.js 0000664 00000001534 15114741631 0017626 0 ustar 00 'use strict'; const Action = require('./Action'); const Typing = require('../../structures/Typing'); const Events = require('../../util/Events'); class TypingStart extends Action { handle(data) { const channel = this.getChannel({ id: data.channel_id, ...('guild_id' in data && { guild_id: data.guild_id }) }); if (!channel) return; if (!channel.isTextBased()) { this.client.emit(Events.Warn, `Discord sent a typing packet to a ${channel.type} channel ${channel.id}`); return; } const user = this.getUserFromMember(data); if (user) { /** * Emitted whenever a user starts typing in a channel. * @event Client#typingStart * @param {Typing} typing The typing state */ this.client.emit(Events.TypingStart, new Typing(channel, user, data)); } } } module.exports = TypingStart; node_modules/discord.js/src/client/actions/GuildSoundboardSoundDelete.js 0000664 00000001476 15114741631 0022564 0 ustar 00 'use strict'; const Action = require('./Action.js'); const Events = require('../../util/Events.js'); class GuildSoundboardSoundDeleteAction extends Action { handle(data) { const guild = this.client.guilds.cache.get(data.guild_id); if (!guild) return {}; const soundboardSound = this.getSoundboardSound(data, guild); if (soundboardSound) { guild.soundboardSounds.cache.delete(soundboardSound.soundId); /** * Emitted whenever a soundboard sound is deleted in a guild. * @event Client#guildSoundboardSoundDelete * @param {SoundboardSound} soundboardSound The soundboard sound that was deleted */ this.client.emit(Events.GuildSoundboardSoundDelete, soundboardSound); } return { soundboardSound }; } } module.exports = GuildSoundboardSoundDeleteAction; node_modules/discord.js/src/client/actions/ApplicationCommandPermissionsUpdate.js 0000664 00000002641 15114741631 0024477 0 ustar 00 'use strict'; const Action = require('./Action'); const Events = require('../../util/Events'); /** * The data received in the {@link Client#event:applicationCommandPermissionsUpdate} event * @typedef {Object} ApplicationCommandPermissionsUpdateData * @property {Snowflake} id The id of the command or global entity that was updated * @property {Snowflake} guildId The id of the guild in which permissions were updated * @property {Snowflake} applicationId The id of the application that owns the command or entity being updated * @property {ApplicationCommandPermissions[]} permissions The updated permissions */ class ApplicationCommandPermissionsUpdateAction extends Action { handle(data) { const client = this.client; /** * Emitted whenever permissions for an application command in a guild were updated. * <warn>This includes permission updates for other applications in addition to the logged in client, * check `data.applicationId` to verify which application the update is for</warn> * @event Client#applicationCommandPermissionsUpdate * @param {ApplicationCommandPermissionsUpdateData} data The updated permissions */ client.emit(Events.ApplicationCommandPermissionsUpdate, { permissions: data.permissions, id: data.id, guildId: data.guild_id, applicationId: data.application_id, }); } } module.exports = ApplicationCommandPermissionsUpdateAction; node_modules/discord.js/src/client/actions/GuildEmojiCreate.js 0000664 00000001124 15114741631 0020505 0 ustar 00 'use strict'; const Action = require('./Action'); const Events = require('../../util/Events'); class GuildEmojiCreateAction extends Action { handle(guild, createdEmoji) { const already = guild.emojis.cache.has(createdEmoji.id); const emoji = guild.emojis._add(createdEmoji); /** * Emitted whenever a custom emoji is created in a guild. * @event Client#emojiCreate * @param {GuildEmoji} emoji The emoji that was created */ if (!already) this.client.emit(Events.GuildEmojiCreate, emoji); return { emoji }; } } module.exports = GuildEmojiCreateAction; node_modules/discord.js/src/client/actions/GuildStickersUpdate.js 0000664 00000001711 15114741631 0021252 0 ustar 00 'use strict'; const Action = require('./Action'); class GuildStickersUpdateAction extends Action { handle(data) { const guild = this.client.guilds.cache.get(data.guild_id); if (!guild?.stickers) return; const deletions = new Map(guild.stickers.cache); for (const sticker of data.stickers) { // Determine type of sticker event const cachedSticker = guild.stickers.cache.get(sticker.id); if (cachedSticker) { deletions.delete(sticker.id); if (!cachedSticker.equals(sticker)) { // Sticker updated this.client.actions.GuildStickerUpdate.handle(cachedSticker, sticker); } } else { // Sticker added this.client.actions.GuildStickerCreate.handle(guild, sticker); } } for (const sticker of deletions.values()) { // Sticker deleted this.client.actions.GuildStickerDelete.handle(sticker); } } } module.exports = GuildStickersUpdateAction; node_modules/discord.js/src/client/actions/GuildBanAdd.js 0000664 00000000771 15114741631 0017436 0 ustar 00 'use strict'; const Action = require('./Action'); const Events = require('../../util/Events'); class GuildBanAdd extends Action { handle(data) { const client = this.client; const guild = client.guilds.cache.get(data.guild_id); /** * Emitted whenever a member is banned from a guild. * @event Client#guildBanAdd * @param {GuildBan} ban The ban that occurred */ if (guild) client.emit(Events.GuildBanAdd, guild.bans._add(data)); } } module.exports = GuildBanAdd; node_modules/discord.js/src/client/actions/GuildStickerUpdate.js 0000664 00000001075 15114741631 0021072 0 ustar 00 'use strict'; const Action = require('./Action'); const Events = require('../../util/Events'); class GuildStickerUpdateAction extends Action { handle(current, data) { const old = current._update(data); /** * Emitted whenever a custom sticker is updated in a guild. * @event Client#stickerUpdate * @param {Sticker} oldSticker The old sticker * @param {Sticker} newSticker The new sticker */ this.client.emit(Events.GuildStickerUpdate, old, current); return { sticker: current }; } } module.exports = GuildStickerUpdateAction; node_modules/discord.js/src/client/actions/InviteCreate.js 0000664 00000001505 15114741631 0017716 0 ustar 00 'use strict'; const Action = require('./Action'); const Events = require('../../util/Events'); class InviteCreateAction extends Action { handle(data) { const client = this.client; const channel = client.channels.cache.get(data.channel_id); const guild = client.guilds.cache.get(data.guild_id); if (!channel) return false; const inviteData = Object.assign(data, { channel, guild }); const invite = guild.invites._add(inviteData); /** * Emitted when an invite is created. * <info>This event requires the {@link PermissionFlagsBits.ManageChannels} permission for the channel.</info> * @event Client#inviteCreate * @param {Invite} invite The invite that was created */ client.emit(Events.InviteCreate, invite); return { invite }; } } module.exports = InviteCreateAction; node_modules/discord.js/src/client/actions/GuildMemberRemove.js 0000664 00000001756 15114741631 0020716 0 ustar 00 'use strict'; const Action = require('./Action'); const Events = require('../../util/Events'); const Status = require('../../util/Status'); class GuildMemberRemoveAction extends Action { handle(data, shard) { const client = this.client; const guild = client.guilds.cache.get(data.guild_id); let member = null; if (guild) { member = this.getMember({ user: data.user }, guild); guild.memberCount--; if (member) { guild.members.cache.delete(member.id); /** * Emitted whenever a member leaves a guild, or is kicked. * @event Client#guildMemberRemove * @param {GuildMember} member The member that has left/been kicked from the guild */ if (shard.status === Status.Ready) client.emit(Events.GuildMemberRemove, member); } guild.presences.cache.delete(data.user.id); guild.voiceStates.cache.delete(data.user.id); } return { guild, member }; } } module.exports = GuildMemberRemoveAction; node_modules/discord.js/src/client/actions/ThreadMembersUpdate.js 0000664 00000003427 15114741631 0021226 0 ustar 00 'use strict'; const { Collection } = require('@discordjs/collection'); const Action = require('./Action'); const Events = require('../../util/Events'); class ThreadMembersUpdateAction extends Action { handle(data) { const client = this.client; const thread = client.channels.cache.get(data.id); if (thread) { thread.memberCount = data.member_count; const addedMembers = new Collection(); const removedMembers = new Collection(); data.added_members?.reduce( (_addedMembers, addedMember) => _addedMembers.set(addedMember.user_id, thread.members._add(addedMember)), addedMembers, ); data.removed_member_ids?.reduce((removedMembersIds, removedMembersId) => { const threadMember = this.getThreadMember(removedMembersId, thread.members); if (threadMember) removedMembersIds.set(threadMember.id, threadMember); thread.members.cache.delete(removedMembersId); return removedMembersIds; }, removedMembers); if (addedMembers.size === 0 && removedMembers.size === 0) { // Uncached thread member(s) left. return {}; } /** * Emitted whenever members are added or removed from a thread. * <info>This event requires the {@link GatewayIntentBits.GuildMembers} privileged gateway intent.</info> * @event Client#threadMembersUpdate * @param {Collection<Snowflake, ThreadMember>} addedMembers The members that were added * @param {Collection<Snowflake, ThreadMember>} removedMembers The members that were removed * @param {ThreadChannel} thread The thread where members got updated */ client.emit(Events.ThreadMembersUpdate, addedMembers, removedMembers, thread); } return {}; } } module.exports = ThreadMembersUpdateAction; node_modules/discord.js/src/client/actions/ThreadCreate.js 0000664 00000001374 15114741631 0017673 0 ustar 00 'use strict'; const Action = require('./Action'); const Events = require('../../util/Events'); class ThreadCreateAction extends Action { handle(data) { const client = this.client; const existing = client.channels.cache.has(data.id); const thread = client.channels._add(data); if (!existing && thread) { /** * Emitted whenever a thread is created or when the client user is added to a thread. * @event Client#threadCreate * @param {ThreadChannel} thread The thread that was created * @param {boolean} newlyCreated Whether the thread was newly created */ client.emit(Events.ThreadCreate, thread, data.newly_created ?? false); } return { thread }; } } module.exports = ThreadCreateAction; node_modules/discord.js/src/client/actions/GuildScheduledEventDelete.js 0000664 00000001567 15114741631 0022356 0 ustar 00 'use strict'; const Action = require('./Action'); const Events = require('../../util/Events'); class GuildScheduledEventDeleteAction extends Action { handle(data) { const client = this.client; const guild = client.guilds.cache.get(data.guild_id); if (guild) { const guildScheduledEvent = this.getScheduledEvent(data, guild); if (guildScheduledEvent) { guild.scheduledEvents.cache.delete(guildScheduledEvent.id); /** * Emitted whenever a guild scheduled event is deleted. * @event Client#guildScheduledEventDelete * @param {GuildScheduledEvent} guildScheduledEvent The deleted guild scheduled event */ client.emit(Events.GuildScheduledEventDelete, guildScheduledEvent); return { guildScheduledEvent }; } } return {}; } } module.exports = GuildScheduledEventDeleteAction; node_modules/discord.js/src/client/actions/GuildEmojisUpdate.js 0000664 00000001627 15114741631 0020717 0 ustar 00 'use strict'; const Action = require('./Action'); class GuildEmojisUpdateAction extends Action { handle(data) { const guild = this.client.guilds.cache.get(data.guild_id); if (!guild?.emojis) return; const deletions = new Map(guild.emojis.cache); for (const emoji of data.emojis) { // Determine type of emoji event const cachedEmoji = guild.emojis.cache.get(emoji.id); if (cachedEmoji) { deletions.delete(emoji.id); if (!cachedEmoji.equals(emoji)) { // Emoji updated this.client.actions.GuildEmojiUpdate.handle(cachedEmoji, emoji); } } else { // Emoji added this.client.actions.GuildEmojiCreate.handle(guild, emoji); } } for (const emoji of deletions.values()) { // Emoji deleted this.client.actions.GuildEmojiDelete.handle(emoji); } } } module.exports = GuildEmojisUpdateAction; node_modules/discord.js/src/client/actions/ChannelUpdate.js 0000664 00000001762 15114741631 0020054 0 ustar 00 'use strict'; const Action = require('./Action'); const { createChannel } = require('../../util/Channels'); class ChannelUpdateAction extends Action { handle(data) { const client = this.client; let channel = client.channels.cache.get(data.id); if (channel) { const old = channel._update(data); if (channel.type !== data.type) { const newChannel = createChannel(this.client, data, channel.guild); if (!newChannel) { this.client.channels.cache.delete(channel.id); return {}; } if (channel.isTextBased() && newChannel.isTextBased()) { for (const [id, message] of channel.messages.cache) newChannel.messages.cache.set(id, message); } channel = newChannel; this.client.channels.cache.set(channel.id, channel); } return { old, updated: channel, }; } else { client.channels._add(data); } return {}; } } module.exports = ChannelUpdateAction; node_modules/discord.js/src/client/actions/GuildStickerCreate.js 0000664 00000001157 15114741631 0021054 0 ustar 00 'use strict'; const Action = require('./Action'); const Events = require('../../util/Events'); class GuildStickerCreateAction extends Action { handle(guild, createdSticker) { const already = guild.stickers.cache.has(createdSticker.id); const sticker = guild.stickers._add(createdSticker); /** * Emitted whenever a custom sticker is created in a guild. * @event Client#stickerCreate * @param {Sticker} sticker The sticker that was created */ if (!already) this.client.emit(Events.GuildStickerCreate, sticker); return { sticker }; } } module.exports = GuildStickerCreateAction; node_modules/discord.js/src/client/actions/ThreadMemberUpdate.js 0000664 00000001651 15114741631 0021040 0 ustar 00 'use strict'; const Action = require('./Action'); const Events = require('../../util/Events'); class ThreadMemberUpdateAction extends Action { handle(data) { const client = this.client; // Discord sends the thread id as id in this object const thread = client.channels.cache.get(data.id); if (thread) { const member = thread.members.cache.get(data.user_id); if (!member) { const newMember = thread.members._add(data); return { newMember }; } const old = member._update(data); /** * Emitted whenever the client user's thread member is updated. * @event Client#threadMemberUpdate * @param {ThreadMember} oldMember The member before the update * @param {ThreadMember} newMember The member after the update */ client.emit(Events.ThreadMemberUpdate, old, member); } return {}; } } module.exports = ThreadMemberUpdateAction; node_modules/discord.js/src/client/actions/AutoModerationActionExecution.js 0000664 00000001606 15114741631 0023312 0 ustar 00 'use strict'; const Action = require('./Action'); const AutoModerationActionExecution = require('../../structures/AutoModerationActionExecution'); const Events = require('../../util/Events'); class AutoModerationActionExecutionAction extends Action { handle(data) { const { client } = this; const guild = client.guilds.cache.get(data.guild_id); if (guild) { /** * Emitted whenever an auto moderation rule is triggered. * <info>This event requires the {@link PermissionFlagsBits.ManageGuild} permission.</info> * @event Client#autoModerationActionExecution * @param {AutoModerationActionExecution} autoModerationActionExecution The data of the execution */ client.emit(Events.AutoModerationActionExecution, new AutoModerationActionExecution(data, guild)); } return {}; } } module.exports = AutoModerationActionExecutionAction; node_modules/discord.js/src/client/actions/MessageReactionAdd.js 0000664 00000004315 15114741631 0021020 0 ustar 00 'use strict'; const Action = require('./Action'); const Events = require('../../util/Events'); const Partials = require('../../util/Partials'); /* { user_id: 'id', message_id: 'id', emoji: { name: '�', id: null }, channel_id: 'id', burst: boolean // If originating from a guild guild_id: 'id', member: { ..., user: { ... } } } */ class MessageReactionAdd extends Action { handle(data, fromStructure = false) { if (!data.emoji) return false; const user = this.getUserFromMember(data); if (!user) return false; // Verify channel const channel = this.getChannel({ id: data.channel_id, ...('guild_id' in data && { guild_id: data.guild_id }), user_id: data.user_id, ...this.spreadInjectedData(data), }); if (!channel?.isTextBased()) return false; // Verify message const message = this.getMessage(data, channel); if (!message) return false; // Verify reaction const includePartial = this.client.options.partials.includes(Partials.Reaction); if (message.partial && !includePartial) return false; const reaction = message.reactions._add({ emoji: data.emoji, count: message.partial ? null : 0, me: user.id === this.client.user.id, burst_colors: data.burst_colors, }); if (!reaction) return false; reaction._add(user, data.burst); if (fromStructure) return { message, reaction, user }; /** * Provides additional information about altered reaction * @typedef {Object} MessageReactionEventDetails * @property {ReactionType} type The type of the reaction * @property {boolean} burst Determines whether a super reaction was used */ /** * Emitted whenever a reaction is added to a cached message. * @event Client#messageReactionAdd * @param {MessageReaction} messageReaction The reaction object * @param {User} user The user that applied the guild or reaction emoji * @param {MessageReactionEventDetails} details Details of adding the reaction */ this.client.emit(Events.MessageReactionAdd, reaction, user, { type: data.type, burst: data.burst }); return { message, reaction, user }; } } module.exports = MessageReactionAdd; node_modules/discord.js/src/client/actions/AutoModerationRuleUpdate.js 0000664 00000002042 15114741631 0022256 0 ustar 00 'use strict'; const Action = require('./Action'); const Events = require('../../util/Events'); class AutoModerationRuleUpdateAction extends Action { handle(data) { const { client } = this; const guild = client.guilds.cache.get(data.guild_id); if (guild) { const oldAutoModerationRule = guild.autoModerationRules.cache.get(data.id)?._clone() ?? null; const newAutoModerationRule = guild.autoModerationRules._add(data); /** * Emitted whenever an auto moderation rule gets updated. * <info>This event requires the {@link PermissionFlagsBits.ManageGuild} permission.</info> * @event Client#autoModerationRuleUpdate * @param {?AutoModerationRule} oldAutoModerationRule The auto moderation rule before the update * @param {AutoModerationRule} newAutoModerationRule The auto moderation rule after the update */ client.emit(Events.AutoModerationRuleUpdate, oldAutoModerationRule, newAutoModerationRule); } return {}; } } module.exports = AutoModerationRuleUpdateAction; node_modules/discord.js/src/client/actions/MessageUpdate.js 0000664 00000001252 15114741631 0020062 0 ustar 00 'use strict'; const Action = require('./Action'); class MessageUpdateAction extends Action { handle(data) { const channel = this.getChannel({ id: data.channel_id, ...('guild_id' in data && { guild_id: data.guild_id }) }); if (channel) { if (!channel.isTextBased()) return {}; const { id, channel_id, guild_id, author, timestamp, type } = data; const message = this.getMessage({ id, channel_id, guild_id, author, timestamp, type }, channel); if (message) { const old = message._update(data); return { old, updated: message, }; } } return {}; } } module.exports = MessageUpdateAction; node_modules/discord.js/src/client/actions/InteractionCreate.js 0000664 00000010536 15114741631 0020743 0 ustar 00 'use strict'; const { InteractionType, ComponentType, ApplicationCommandType } = require('discord-api-types/v10'); const Action = require('./Action'); const AutocompleteInteraction = require('../../structures/AutocompleteInteraction'); const ButtonInteraction = require('../../structures/ButtonInteraction'); const ChannelSelectMenuInteraction = require('../../structures/ChannelSelectMenuInteraction'); const ChatInputCommandInteraction = require('../../structures/ChatInputCommandInteraction'); const MentionableSelectMenuInteraction = require('../../structures/MentionableSelectMenuInteraction'); const MessageContextMenuCommandInteraction = require('../../structures/MessageContextMenuCommandInteraction'); const ModalSubmitInteraction = require('../../structures/ModalSubmitInteraction'); const PrimaryEntryPointCommandInteraction = require('../../structures/PrimaryEntryPointCommandInteraction'); const RoleSelectMenuInteraction = require('../../structures/RoleSelectMenuInteraction'); const StringSelectMenuInteraction = require('../../structures/StringSelectMenuInteraction'); const UserContextMenuCommandInteraction = require('../../structures/UserContextMenuCommandInteraction'); const UserSelectMenuInteraction = require('../../structures/UserSelectMenuInteraction'); const Events = require('../../util/Events'); class InteractionCreateAction extends Action { handle(data) { const client = this.client; // Resolve and cache partial channels for Interaction#channel getter const channel = data.channel && this.getChannel(data.channel); // Do not emit this for interactions that cache messages that are non-text-based. let InteractionClass; switch (data.type) { case InteractionType.ApplicationCommand: switch (data.data.type) { case ApplicationCommandType.ChatInput: InteractionClass = ChatInputCommandInteraction; break; case ApplicationCommandType.User: InteractionClass = UserContextMenuCommandInteraction; break; case ApplicationCommandType.Message: if (channel && !channel.isTextBased()) return; InteractionClass = MessageContextMenuCommandInteraction; break; case ApplicationCommandType.PrimaryEntryPoint: InteractionClass = PrimaryEntryPointCommandInteraction; break; default: client.emit( Events.Debug, `[INTERACTION] Received application command interaction with unknown type: ${data.data.type}`, ); return; } break; case InteractionType.MessageComponent: if (channel && !channel.isTextBased()) return; switch (data.data.component_type) { case ComponentType.Button: InteractionClass = ButtonInteraction; break; case ComponentType.StringSelect: InteractionClass = StringSelectMenuInteraction; break; case ComponentType.UserSelect: InteractionClass = UserSelectMenuInteraction; break; case ComponentType.RoleSelect: InteractionClass = RoleSelectMenuInteraction; break; case ComponentType.MentionableSelect: InteractionClass = MentionableSelectMenuInteraction; break; case ComponentType.ChannelSelect: InteractionClass = ChannelSelectMenuInteraction; break; default: client.emit( Events.Debug, `[INTERACTION] Received component interaction with unknown type: ${data.data.component_type}`, ); return; } break; case InteractionType.ApplicationCommandAutocomplete: InteractionClass = AutocompleteInteraction; break; case InteractionType.ModalSubmit: InteractionClass = ModalSubmitInteraction; break; default: client.emit(Events.Debug, `[INTERACTION] Received interaction with unknown type: ${data.type}`); return; } const interaction = new InteractionClass(client, data); /** * Emitted when an interaction is created. * @event Client#interactionCreate * @param {BaseInteraction} interaction The interaction which was created */ client.emit(Events.InteractionCreate, interaction); } } module.exports = InteractionCreateAction; node_modules/discord.js/src/client/actions/GuildBanRemove.js 0000664 00000001304 15114741631 0020174 0 ustar 00 'use strict'; const Action = require('./Action'); const GuildBan = require('../../structures/GuildBan'); const Events = require('../../util/Events'); class GuildBanRemove extends Action { handle(data) { const client = this.client; const guild = client.guilds.cache.get(data.guild_id); /** * Emitted whenever a member is unbanned from a guild. * @event Client#guildBanRemove * @param {GuildBan} ban The ban that was removed */ if (guild) { const ban = guild.bans.cache.get(data.user.id) ?? new GuildBan(client, data, guild); guild.bans.cache.delete(ban.user.id); client.emit(Events.GuildBanRemove, ban); } } } module.exports = GuildBanRemove; node_modules/discord.js/src/client/actions/MessageDeleteBulk.js 0000664 00000002477 15114741631 0020672 0 ustar 00 'use strict'; const { Collection } = require('@discordjs/collection'); const Action = require('./Action'); const Events = require('../../util/Events'); class MessageDeleteBulkAction extends Action { handle(data) { const client = this.client; const channel = client.channels.cache.get(data.channel_id); if (channel) { if (!channel.isTextBased()) return {}; if (channel.isThread()) channel.messageCount -= data.ids.length; const ids = data.ids; const messages = new Collection(); for (const id of ids) { const message = this.getMessage( { id, guild_id: data.guild_id, }, channel, false, ); if (message) { messages.set(message.id, message); channel.messages.cache.delete(id); } } /** * Emitted whenever messages are deleted in bulk. * @event Client#messageDeleteBulk * @param {Collection<Snowflake, Message>} messages The deleted messages, mapped by their id * @param {GuildTextBasedChannel} channel The channel that the messages were deleted in */ if (messages.size > 0) client.emit(Events.MessageBulkDelete, messages, channel); return { messages }; } return {}; } } module.exports = MessageDeleteBulkAction; node_modules/discord.js/src/client/actions/GuildScheduledEventCreate.js 0000664 00000001370 15114741631 0022347 0 ustar 00 'use strict'; const Action = require('./Action'); const Events = require('../../util/Events'); class GuildScheduledEventCreateAction extends Action { handle(data) { const client = this.client; const guild = client.guilds.cache.get(data.guild_id); if (guild) { const guildScheduledEvent = guild.scheduledEvents._add(data); /** * Emitted whenever a guild scheduled event is created. * @event Client#guildScheduledEventCreate * @param {GuildScheduledEvent} guildScheduledEvent The created guild scheduled event */ client.emit(Events.GuildScheduledEventCreate, guildScheduledEvent); return { guildScheduledEvent }; } return {}; } } module.exports = GuildScheduledEventCreateAction; node_modules/discord.js/src/client/actions/GuildIntegrationsUpdate.js 0000664 00000001051 15114741631 0022126 0 ustar 00 'use strict'; const Action = require('./Action'); const Events = require('../../util/Events'); class GuildIntegrationsUpdate extends Action { handle(data) { const client = this.client; const guild = client.guilds.cache.get(data.guild_id); /** * Emitted whenever a guild integration is updated * @event Client#guildIntegrationsUpdate * @param {Guild} guild The guild whose integrations were updated */ if (guild) client.emit(Events.GuildIntegrationsUpdate, guild); } } module.exports = GuildIntegrationsUpdate; node_modules/discord.js/src/client/actions/MessageDelete.js 0000664 00000001545 15114741631 0020047 0 ustar 00 'use strict'; const Action = require('./Action'); const Events = require('../../util/Events'); class MessageDeleteAction extends Action { handle(data) { const client = this.client; const channel = this.getChannel({ id: data.channel_id, ...('guild_id' in data && { guild_id: data.guild_id }) }); let message; if (channel) { if (!channel.isTextBased()) return {}; if (channel.isThread()) channel.messageCount--; message = this.getMessage(data, channel); if (message) { channel.messages.cache.delete(message.id); /** * Emitted whenever a message is deleted. * @event Client#messageDelete * @param {Message} message The deleted message */ client.emit(Events.MessageDelete, message); } } return { message }; } } module.exports = MessageDeleteAction; node_modules/discord.js/src/client/actions/GuildScheduledEventUserRemove.js 0000664 00000001673 15114741631 0023246 0 ustar 00 'use strict'; const Action = require('./Action'); const Events = require('../../util/Events'); class GuildScheduledEventUserRemoveAction extends Action { handle(data) { const client = this.client; const guild = client.guilds.cache.get(data.guild_id); if (guild) { const guildScheduledEvent = this.getScheduledEvent(data, guild); const user = this.getUser(data); if (guildScheduledEvent && user) { /** * Emitted whenever a user unsubscribes from a guild scheduled event * @event Client#guildScheduledEventUserRemove * @param {GuildScheduledEvent} guildScheduledEvent The guild scheduled event * @param {User} user The user who unsubscribed */ client.emit(Events.GuildScheduledEventUserRemove, guildScheduledEvent, user); return { guildScheduledEvent, user }; } } return {}; } } module.exports = GuildScheduledEventUserRemoveAction; node_modules/discord.js/src/client/actions/WebhooksUpdate.js 0000664 00000002367 15114741631 0020267 0 ustar 00 'use strict'; const process = require('node:process'); const Action = require('./Action'); let deprecationEmitted = false; class WebhooksUpdate extends Action { handle(data) { const client = this.client; const channel = client.channels.cache.get(data.channel_id); if (!channel) return; // TODO: change to Events.WebhooksUpdate in the next major version /** * Emitted whenever a channel has its webhooks changed. * @event Client#webhooksUpdate * @param {TextChannel|NewsChannel|VoiceChannel|StageChannel|ForumChannel|MediaChannel} channel * The channel that had a webhook update */ client.emit('webhooksUpdate', channel); /** * Emitted whenever a channel has its webhooks changed. * @event Client#webhookUpdate * @param {TextChannel|NewsChannel|VoiceChannel|StageChannel|ForumChannel|MediaChannel} channel * The channel that had a webhook update * @deprecated Use {@link Client#event:webhooksUpdate} instead. */ if (client.emit('webhookUpdate', channel) && !deprecationEmitted) { deprecationEmitted = true; process.emitWarning('The webhookUpdate event is deprecated. Use webhooksUpdate instead.', 'DeprecationWarning'); } } } module.exports = WebhooksUpdate; node_modules/discord.js/src/client/actions/ChannelDelete.js 0000664 00000001120 15114741631 0020020 0 ustar 00 'use strict'; const Action = require('./Action'); const Events = require('../../util/Events'); class ChannelDeleteAction extends Action { handle(data) { const client = this.client; const channel = client.channels.cache.get(data.id); if (channel) { client.channels._remove(channel.id); /** * Emitted whenever a channel is deleted. * @event Client#channelDelete * @param {DMChannel|GuildChannel} channel The channel that was deleted */ client.emit(Events.ChannelDelete, channel); } } } module.exports = ChannelDeleteAction; node_modules/discord.js/src/client/actions/EntitlementUpdate.js 0000664 00000001444 15114741631 0020771 0 ustar 00 'use strict'; const Action = require('./Action'); const Events = require('../../util/Events'); class EntitlementUpdateAction extends Action { handle(data) { const client = this.client; const oldEntitlement = client.application.entitlements.cache.get(data.id)?._clone() ?? null; const newEntitlement = client.application.entitlements._add(data); /** * Emitted whenever an entitlement is updated - i.e. when a user's subscription renews. * @event Client#entitlementUpdate * @param {?Entitlement} oldEntitlement The entitlement before the update * @param {Entitlement} newEntitlement The entitlement after the update */ client.emit(Events.EntitlementUpdate, oldEntitlement, newEntitlement); return {}; } } module.exports = EntitlementUpdateAction; node_modules/discord.js/src/client/actions/GuildRoleUpdate.js 0000664 00000001550 15114741631 0020365 0 ustar 00 'use strict'; const Action = require('./Action'); const Events = require('../../util/Events'); class GuildRoleUpdateAction extends Action { handle(data) { const client = this.client; const guild = client.guilds.cache.get(data.guild_id); if (guild) { let old = null; const role = guild.roles.cache.get(data.role.id); if (role) { old = role._update(data.role); /** * Emitted whenever a guild role is updated. * @event Client#roleUpdate * @param {Role} oldRole The role before the update * @param {Role} newRole The role after the update */ client.emit(Events.GuildRoleUpdate, old, role); } return { old, updated: role, }; } return { old: null, updated: null, }; } } module.exports = GuildRoleUpdateAction; node_modules/discord.js/src/client/actions/GuildScheduledEventUpdate.js 0000664 00000002031 15114741631 0022361 0 ustar 00 'use strict'; const Action = require('./Action'); const Events = require('../../util/Events'); class GuildScheduledEventUpdateAction extends Action { handle(data) { const client = this.client; const guild = client.guilds.cache.get(data.guild_id); if (guild) { const oldGuildScheduledEvent = guild.scheduledEvents.cache.get(data.id)?._clone() ?? null; const newGuildScheduledEvent = guild.scheduledEvents._add(data); /** * Emitted whenever a guild scheduled event gets updated. * @event Client#guildScheduledEventUpdate * @param {?GuildScheduledEvent} oldGuildScheduledEvent The guild scheduled event object before the update * @param {GuildScheduledEvent} newGuildScheduledEvent The guild scheduled event object after the update */ client.emit(Events.GuildScheduledEventUpdate, oldGuildScheduledEvent, newGuildScheduledEvent); return { oldGuildScheduledEvent, newGuildScheduledEvent }; } return {}; } } module.exports = GuildScheduledEventUpdateAction; node_modules/discord.js/src/client/actions/ChannelCreate.js 0000664 00000001166 15114741631 0020033 0 ustar 00 'use strict'; const Action = require('./Action'); const Events = require('../../util/Events'); class ChannelCreateAction extends Action { handle(data) { const client = this.client; const existing = client.channels.cache.has(data.id); const channel = client.channels._add(data); if (!existing && channel) { /** * Emitted whenever a guild channel is created. * @event Client#channelCreate * @param {GuildChannel} channel The channel that was created */ client.emit(Events.ChannelCreate, channel); } return { channel }; } } module.exports = ChannelCreateAction; node_modules/discord.js/src/client/actions/PresenceUpdate.js 0000664 00000003102 15114741631 0020236 0 ustar 00 'use strict'; const Action = require('./Action'); const Events = require('../../util/Events'); const Partials = require('../../util/Partials'); class PresenceUpdateAction extends Action { handle(data) { let user = this.client.users.cache.get(data.user.id); if (!user && ('username' in data.user || this.client.options.partials.includes(Partials.User))) { user = this.client.users._add(data.user); } if (!user) return; if (data.user.username) { if (!user._equals(data.user)) this.client.actions.UserUpdate.handle(data.user); } const guild = this.client.guilds.cache.get(data.guild_id); if (!guild) return; const oldPresence = guild.presences.cache.get(user.id)?._clone() ?? null; let member = guild.members.cache.get(user.id); if (!member && data.status !== 'offline') { member = guild.members._add({ user, deaf: false, mute: false, }); this.client.emit(Events.GuildMemberAvailable, member); } const newPresence = guild.presences._add(Object.assign(data, { guild })); if (this.client.listenerCount(Events.PresenceUpdate) && !newPresence.equals(oldPresence)) { /** * Emitted whenever a guild member's presence (e.g. status, activity) is changed. * @event Client#presenceUpdate * @param {?Presence} oldPresence The presence before the update, if one at all * @param {Presence} newPresence The presence after the update */ this.client.emit(Events.PresenceUpdate, oldPresence, newPresence); } } } module.exports = PresenceUpdateAction; node_modules/discord.js/src/client/actions/StageInstanceCreate.js 0000664 00000001333 15114741631 0021207 0 ustar 00 'use strict'; const Action = require('./Action'); const Events = require('../../util/Events'); class StageInstanceCreateAction extends Action { handle(data) { const client = this.client; const channel = this.getChannel({ id: data.channel_id, guild_id: data.guild_id }); if (channel) { const stageInstance = channel.guild.stageInstances._add(data); /** * Emitted whenever a stage instance is created. * @event Client#stageInstanceCreate * @param {StageInstance} stageInstance The created stage instance */ client.emit(Events.StageInstanceCreate, stageInstance); return { stageInstance }; } return {}; } } module.exports = StageInstanceCreateAction; node_modules/discord.js/src/client/actions/MessageReactionRemoveAll.js 0000664 00000002041 15114741631 0022210 0 ustar 00 'use strict'; const Action = require('./Action'); const Events = require('../../util/Events'); class MessageReactionRemoveAll extends Action { handle(data) { // Verify channel const channel = this.getChannel({ id: data.channel_id, ...('guild_id' in data && { guild_id: data.guild_id }) }); if (!channel?.isTextBased()) return false; // Verify message const message = this.getMessage(data, channel); if (!message) return false; // Copy removed reactions to emit for the event. const removed = message.reactions.cache.clone(); message.reactions.cache.clear(); this.client.emit(Events.MessageReactionRemoveAll, message, removed); return { message }; } } /** * Emitted whenever all reactions are removed from a cached message. * @event Client#messageReactionRemoveAll * @param {Message} message The message the reactions were removed from * @param {Collection<string|Snowflake, MessageReaction>} reactions The cached message reactions that were removed. */ module.exports = MessageReactionRemoveAll; node_modules/discord.js/src/client/actions/ThreadDelete.js 0000664 00000001125 15114741631 0017664 0 ustar 00 'use strict'; const Action = require('./Action'); const Events = require('../../util/Events'); class ThreadDeleteAction extends Action { handle(data) { const client = this.client; const thread = client.channels.cache.get(data.id); if (thread) { client.channels._remove(thread.id); /** * Emitted whenever a thread is deleted. * @event Client#threadDelete * @param {ThreadChannel} thread The thread that was deleted */ client.emit(Events.ThreadDelete, thread); } return { thread }; } } module.exports = ThreadDeleteAction; node_modules/discord.js/src/client/actions/ActionsManager.js 0000664 00000007645 15114741631 0020242 0 ustar 00 'use strict'; class ActionsManager { // These symbols represent fully built data that we inject at times when calling actions manually. // Action#getUser, for example, will return the injected data (which is assumed to be a built structure) // instead of trying to make it from provided data injectedUser = Symbol('djs.actions.injectedUser'); injectedChannel = Symbol('djs.actions.injectedChannel'); injectedMessage = Symbol('djs.actions.injectedMessage'); constructor(client) { this.client = client; this.register(require('./ApplicationCommandPermissionsUpdate')); this.register(require('./AutoModerationActionExecution')); this.register(require('./AutoModerationRuleCreate')); this.register(require('./AutoModerationRuleDelete')); this.register(require('./AutoModerationRuleUpdate')); this.register(require('./ChannelCreate')); this.register(require('./ChannelDelete')); this.register(require('./ChannelUpdate')); this.register(require('./EntitlementCreate')); this.register(require('./EntitlementDelete')); this.register(require('./EntitlementUpdate')); this.register(require('./GuildAuditLogEntryCreate')); this.register(require('./GuildBanAdd')); this.register(require('./GuildBanRemove')); this.register(require('./GuildChannelsPositionUpdate')); this.register(require('./GuildDelete')); this.register(require('./GuildEmojiCreate')); this.register(require('./GuildEmojiDelete')); this.register(require('./GuildEmojiUpdate')); this.register(require('./GuildEmojisUpdate')); this.register(require('./GuildIntegrationsUpdate')); this.register(require('./GuildMemberRemove')); this.register(require('./GuildMemberUpdate')); this.register(require('./GuildRoleCreate')); this.register(require('./GuildRoleDelete')); this.register(require('./GuildRoleUpdate')); this.register(require('./GuildRolesPositionUpdate')); this.register(require('./GuildScheduledEventCreate')); this.register(require('./GuildScheduledEventDelete')); this.register(require('./GuildScheduledEventUpdate')); this.register(require('./GuildScheduledEventUserAdd')); this.register(require('./GuildScheduledEventUserRemove')); this.register(require('./GuildSoundboardSoundDelete.js')); this.register(require('./GuildStickerCreate')); this.register(require('./GuildStickerDelete')); this.register(require('./GuildStickerUpdate')); this.register(require('./GuildStickersUpdate')); this.register(require('./GuildUpdate')); this.register(require('./InteractionCreate')); this.register(require('./InviteCreate')); this.register(require('./InviteDelete')); this.register(require('./MessageCreate')); this.register(require('./MessageDelete')); this.register(require('./MessageDeleteBulk')); this.register(require('./MessagePollVoteAdd')); this.register(require('./MessagePollVoteRemove')); this.register(require('./MessageReactionAdd')); this.register(require('./MessageReactionRemove')); this.register(require('./MessageReactionRemoveAll')); this.register(require('./MessageReactionRemoveEmoji')); this.register(require('./MessageUpdate')); this.register(require('./PresenceUpdate')); this.register(require('./StageInstanceCreate')); this.register(require('./StageInstanceDelete')); this.register(require('./StageInstanceUpdate')); this.register(require('./ThreadCreate')); this.register(require('./ThreadDelete')); this.register(require('./ThreadListSync')); this.register(require('./ThreadMemberUpdate')); this.register(require('./ThreadMembersUpdate')); this.register(require('./TypingStart')); this.register(require('./UserUpdate')); this.register(require('./VoiceStateUpdate')); this.register(require('./WebhooksUpdate')); } register(Action) { this[Action.name.replace(/Action$/, '')] = new Action(this.client); } } module.exports = ActionsManager; node_modules/discord.js/src/client/actions/GuildChannelsPositionUpdate.js 0000664 00000000773 15114741631 0022752 0 ustar 00 'use strict'; const Action = require('./Action'); class GuildChannelsPositionUpdate extends Action { handle(data) { const client = this.client; const guild = client.guilds.cache.get(data.guild_id); if (guild) { for (const partialChannel of data.channels) { const channel = guild.channels.cache.get(partialChannel.id); if (channel) channel.rawPosition = partialChannel.position; } } return { guild }; } } module.exports = GuildChannelsPositionUpdate; node_modules/discord.js/src/client/actions/EntitlementCreate.js 0000664 00000001063 15114741631 0020747 0 ustar 00 'use strict'; const Action = require('./Action'); const Events = require('../../util/Events'); class EntitlementCreateAction extends Action { handle(data) { const client = this.client; const entitlement = client.application.entitlements._add(data); /** * Emitted whenever an entitlement is created. * @event Client#entitlementCreate * @param {Entitlement} entitlement The entitlement that was created */ client.emit(Events.EntitlementCreate, entitlement); return {}; } } module.exports = EntitlementCreateAction; node_modules/discord.js/src/client/actions/MessagePollVoteAdd.js 0000664 00000001644 15114741631 0021022 0 ustar 00 'use strict'; const Action = require('./Action'); const Events = require('../../util/Events'); class MessagePollVoteAddAction extends Action { handle(data) { const channel = this.getChannel({ id: data.channel_id, ...('guild_id' in data && { guild_id: data.guild_id }) }); if (!channel?.isTextBased()) return false; const message = this.getMessage(data, channel); if (!message) return false; const { poll } = message; const answer = poll?.answers.get(data.answer_id); if (!answer) return false; answer.voteCount++; /** * Emitted whenever a user votes in a poll. * @event Client#messagePollVoteAdd * @param {PollAnswer} pollAnswer The answer that was voted on * @param {Snowflake} userId The id of the user that voted */ this.client.emit(Events.MessagePollVoteAdd, answer, data.user_id); return { poll }; } } module.exports = MessagePollVoteAddAction; node_modules/discord.js/src/client/actions/GuildScheduledEventUserAdd.js 0000664 00000001651 15114741631 0022475 0 ustar 00 'use strict'; const Action = require('./Action'); const Events = require('../../util/Events'); class GuildScheduledEventUserAddAction extends Action { handle(data) { const client = this.client; const guild = client.guilds.cache.get(data.guild_id); if (guild) { const guildScheduledEvent = this.getScheduledEvent(data, guild); const user = this.getUser(data); if (guildScheduledEvent && user) { /** * Emitted whenever a user subscribes to a guild scheduled event * @event Client#guildScheduledEventUserAdd * @param {GuildScheduledEvent} guildScheduledEvent The guild scheduled event * @param {User} user The user who subscribed */ client.emit(Events.GuildScheduledEventUserAdd, guildScheduledEvent, user); return { guildScheduledEvent, user }; } } return {}; } } module.exports = GuildScheduledEventUserAddAction; node_modules/discord.js/src/client/actions/GuildAuditLogEntryCreate.js 0000664 00000001561 15114741631 0022201 0 ustar 00 'use strict'; const Action = require('./Action'); const GuildAuditLogsEntry = require('../../structures/GuildAuditLogsEntry'); const Events = require('../../util/Events'); class GuildAuditLogEntryCreateAction extends Action { handle(data) { const client = this.client; const guild = client.guilds.cache.get(data.guild_id); let auditLogEntry; if (guild) { auditLogEntry = new GuildAuditLogsEntry(guild, data); /** * Emitted whenever a guild audit log entry is created. * @event Client#guildAuditLogEntryCreate * @param {GuildAuditLogsEntry} auditLogEntry The entry that was created * @param {Guild} guild The guild where the entry was created */ client.emit(Events.GuildAuditLogEntryCreate, auditLogEntry, guild); } return { auditLogEntry }; } } module.exports = GuildAuditLogEntryCreateAction; node_modules/discord.js/src/client/actions/MessageReactionRemove.js 0000664 00000002644 15114741631 0021570 0 ustar 00 'use strict'; const Action = require('./Action'); const Events = require('../../util/Events'); /* { user_id: 'id', message_id: 'id', emoji: { name: '�', id: null }, channel_id: 'id', guild_id: 'id' } */ class MessageReactionRemove extends Action { handle(data) { if (!data.emoji) return false; const user = this.getUser(data); if (!user) return false; // Verify channel const channel = this.getChannel({ id: data.channel_id, ...('guild_id' in data && { guild_id: data.guild_id }), user_id: data.user_id, }); if (!channel?.isTextBased()) return false; // Verify message const message = this.getMessage(data, channel); if (!message) return false; // Verify reaction const reaction = this.getReaction(data, message, user); if (!reaction) return false; reaction._remove(user, data.burst); /** * Emitted whenever a reaction is removed from a cached message. * @event Client#messageReactionRemove * @param {MessageReaction} messageReaction The reaction object * @param {User} user The user whose emoji or reaction emoji was removed * @param {MessageReactionEventDetails} details Details of removing the reaction */ this.client.emit(Events.MessageReactionRemove, reaction, user, { type: data.type, burst: data.burst }); return { message, reaction, user }; } } module.exports = MessageReactionRemove; node_modules/discord.js/src/client/actions/GuildUpdate.js 0000664 00000001365 15114741631 0017547 0 ustar 00 'use strict'; const Action = require('./Action'); const Events = require('../../util/Events'); class GuildUpdateAction extends Action { handle(data) { const client = this.client; const guild = client.guilds.cache.get(data.id); if (guild) { const old = guild._update(data); /** * Emitted whenever a guild is updated - e.g. name change. * @event Client#guildUpdate * @param {Guild} oldGuild The guild before the update * @param {Guild} newGuild The guild after the update */ client.emit(Events.GuildUpdate, old, guild); return { old, updated: guild, }; } return { old: null, updated: null, }; } } module.exports = GuildUpdateAction; node_modules/discord.js/src/client/actions/UserUpdate.js 0000664 00000001741 15114741631 0017417 0 ustar 00 'use strict'; const Action = require('./Action'); const Events = require('../../util/Events'); class UserUpdateAction extends Action { handle(data) { const client = this.client; const newUser = data.id === client.user.id ? client.user : client.users.cache.get(data.id); const oldUser = newUser._update(data); if (!oldUser.equals(newUser)) { /** * Emitted whenever a user's details (e.g. username) are changed. * Triggered by the Discord gateway events {@link Events.UserUpdate}, * {@link Events.GuildMemberUpdate}, and {@link Events.PresenceUpdate}. * @event Client#userUpdate * @param {User} oldUser The user before the update * @param {User} newUser The user after the update */ client.emit(Events.UserUpdate, oldUser, newUser); return { old: oldUser, updated: newUser, }; } return { old: null, updated: null, }; } } module.exports = UserUpdateAction; node_modules/discord.js/src/client/actions/MessageCreate.js 0000664 00000002100 15114741631 0020034 0 ustar 00 'use strict'; const Action = require('./Action'); const Events = require('../../util/Events'); class MessageCreateAction extends Action { handle(data) { const client = this.client; const channel = this.getChannel({ id: data.channel_id, author: data.author, ...('guild_id' in data && { guild_id: data.guild_id }), }); if (channel) { if (!channel.isTextBased()) return {}; if (channel.isThread()) { channel.messageCount++; channel.totalMessageSent++; } const existing = channel.messages.cache.get(data.id); if (existing && existing.author?.id !== this.client.user.id) return { message: existing }; const message = existing ?? channel.messages._add(data); channel.lastMessageId = data.id; /** * Emitted whenever a message is created. * @event Client#messageCreate * @param {Message} message The created message */ client.emit(Events.MessageCreate, message); return { message }; } return {}; } } module.exports = MessageCreateAction; node_modules/discord.js/src/client/actions/GuildRoleDelete.js 0000664 00000001274 15114741631 0020350 0 ustar 00 'use strict'; const Action = require('./Action'); const Events = require('../../util/Events'); class GuildRoleDeleteAction extends Action { handle(data) { const client = this.client; const guild = client.guilds.cache.get(data.guild_id); let role; if (guild) { role = guild.roles.cache.get(data.role_id); if (role) { guild.roles.cache.delete(data.role_id); /** * Emitted whenever a guild role is deleted. * @event Client#roleDelete * @param {Role} role The role that was deleted */ client.emit(Events.GuildRoleDelete, role); } } return { role }; } } module.exports = GuildRoleDeleteAction; node_modules/discord.js/src/client/actions/MessagePollVoteRemove.js 0000664 00000001723 15114741631 0021565 0 ustar 00 'use strict'; const Action = require('./Action'); const Events = require('../../util/Events'); class MessagePollVoteRemoveAction extends Action { handle(data) { const channel = this.getChannel({ id: data.channel_id, ...('guild_id' in data && { guild_id: data.guild_id }) }); if (!channel?.isTextBased()) return false; const message = this.getMessage(data, channel); if (!message) return false; const { poll } = message; const answer = poll?.answers.get(data.answer_id); if (!answer) return false; answer.voteCount--; /** * Emitted whenever a user removes their vote in a poll. * @event Client#messagePollVoteRemove * @param {PollAnswer} pollAnswer The answer where the vote was removed * @param {Snowflake} userId The id of the user that removed their vote */ this.client.emit(Events.MessagePollVoteRemove, answer, data.user_id); return { poll }; } } module.exports = MessagePollVoteRemoveAction; node_modules/discord.js/src/client/actions/GuildMemberUpdate.js 0000664 00000002751 15114741631 0020677 0 ustar 00 'use strict'; const Action = require('./Action'); const Events = require('../../util/Events'); const Status = require('../../util/Status'); class GuildMemberUpdateAction extends Action { handle(data, shard) { const { client } = this; if (data.user.username) { const user = client.users.cache.get(data.user.id); if (!user) { client.users._add(data.user); } else if (!user._equals(data.user)) { client.actions.UserUpdate.handle(data.user); } } const guild = client.guilds.cache.get(data.guild_id); if (guild) { const member = this.getMember({ user: data.user }, guild); if (member) { const old = member._update(data); /** * Emitted whenever a guild member changes - i.e. new role, removed role, nickname. * @event Client#guildMemberUpdate * @param {GuildMember} oldMember The member before the update * @param {GuildMember} newMember The member after the update */ if (shard.status === Status.Ready && !member.equals(old)) client.emit(Events.GuildMemberUpdate, old, member); } else { const newMember = guild.members._add(data); /** * Emitted whenever a member becomes available. * @event Client#guildMemberAvailable * @param {GuildMember} member The member that became available */ this.client.emit(Events.GuildMemberAvailable, newMember); } } } } module.exports = GuildMemberUpdateAction; node_modules/discord.js/src/client/actions/VoiceStateUpdate.js 0000664 00000002646 15114741631 0020554 0 ustar 00 'use strict'; const Action = require('./Action'); const VoiceState = require('../../structures/VoiceState'); const Events = require('../../util/Events'); class VoiceStateUpdate extends Action { handle(data) { const client = this.client; const guild = client.guilds.cache.get(data.guild_id); if (guild) { // Update the state const oldState = guild.voiceStates.cache.get(data.user_id)?._clone() ?? new VoiceState(guild, { user_id: data.user_id }); const newState = guild.voiceStates._add(data); // Get the member let member = guild.members.cache.get(data.user_id); if (member && data.member) { member._patch(data.member); } else if (data.member?.user && data.member.joined_at) { member = guild.members._add(data.member); } // Emit event if (member?.user.id === client.user.id) { client.emit('debug', `[VOICE] received voice state update: ${JSON.stringify(data)}`); client.voice.onVoiceStateUpdate(data); } /** * Emitted whenever a member changes voice state - e.g. joins/leaves a channel, mutes/unmutes. * @event Client#voiceStateUpdate * @param {VoiceState} oldState The voice state before the update * @param {VoiceState} newState The voice state after the update */ client.emit(Events.VoiceStateUpdate, oldState, newState); } } } module.exports = VoiceStateUpdate; node_modules/discord.js/src/client/actions/GuildRolesPositionUpdate.js 0000664 00000000735 15114741631 0022301 0 ustar 00 'use strict'; const Action = require('./Action'); class GuildRolesPositionUpdate extends Action { handle(data) { const client = this.client; const guild = client.guilds.cache.get(data.guild_id); if (guild) { for (const partialRole of data.roles) { const role = guild.roles.cache.get(partialRole.id); if (role) role.rawPosition = partialRole.position; } } return { guild }; } } module.exports = GuildRolesPositionUpdate; node_modules/discord.js/src/client/actions/GuildRoleCreate.js 0000664 00000001223 15114741631 0020343 0 ustar 00 'use strict'; const Action = require('./Action'); const Events = require('../../util/Events'); class GuildRoleCreate extends Action { handle(data) { const client = this.client; const guild = client.guilds.cache.get(data.guild_id); let role; if (guild) { const already = guild.roles.cache.has(data.role.id); role = guild.roles._add(data.role); /** * Emitted whenever a role is created. * @event Client#roleCreate * @param {Role} role The role that was created */ if (!already) client.emit(Events.GuildRoleCreate, role); } return { role }; } } module.exports = GuildRoleCreate; node_modules/discord.js/src/client/actions/Action.js 0000664 00000006424 15114741631 0016556 0 ustar 00 'use strict'; const Partials = require('../../util/Partials'); /* ABOUT ACTIONS Actions are similar to WebSocket Packet Handlers, but since introducing the REST API methods, in order to prevent rewriting code to handle data, "actions" have been introduced. They're basically what Packet Handlers used to be but they're strictly for manipulating data and making sure that WebSocket events don't clash with REST methods. */ class GenericAction { constructor(client) { this.client = client; } handle(data) { return data; } getPayload(data, manager, id, partialType, cache) { return this.client.options.partials.includes(partialType) ? manager._add(data, cache) : manager.cache.get(id); } getChannel(data) { const payloadData = {}; const id = data.channel_id ?? data.id; if (!('recipients' in data)) { // Try to resolve the recipient, but do not add the client user. const recipient = data.author ?? data.user ?? { id: data.user_id }; if (recipient.id !== this.client.user.id) payloadData.recipients = [recipient]; } if (id !== undefined) payloadData.id = id; return ( data[this.client.actions.injectedChannel] ?? this.getPayload({ ...data, ...payloadData }, this.client.channels, id, Partials.Channel) ); } getMessage(data, channel, cache) { const id = data.message_id ?? data.id; return ( data[this.client.actions.injectedMessage] ?? this.getPayload( { id, channel_id: channel.id, guild_id: data.guild_id ?? channel.guild?.id, }, channel.messages, id, Partials.Message, cache, ) ); } getReaction(data, message, user) { const id = data.emoji.id ?? decodeURIComponent(data.emoji.name); return this.getPayload( { emoji: data.emoji, count: message.partial ? null : 0, me: user?.id === this.client.user.id, }, message.reactions, id, Partials.Reaction, ); } getMember(data, guild) { return this.getPayload(data, guild.members, data.user.id, Partials.GuildMember); } getUser(data) { const id = data.user_id; return data[this.client.actions.injectedUser] ?? this.getPayload({ id }, this.client.users, id, Partials.User); } getUserFromMember(data) { if (data.guild_id && data.member?.user) { const guild = this.client.guilds.cache.get(data.guild_id); if (guild) { return guild.members._add(data.member).user; } else { return this.client.users._add(data.member.user); } } return this.getUser(data); } getScheduledEvent(data, guild) { const id = data.guild_scheduled_event_id ?? data.id; return this.getPayload( { id, guild_id: data.guild_id ?? guild.id }, guild.scheduledEvents, id, Partials.GuildScheduledEvent, ); } getThreadMember(id, manager) { return this.getPayload({ user_id: id }, manager, id, Partials.ThreadMember, false); } getSoundboardSound(data, guild) { return this.getPayload(data, guild.soundboardSounds, data.sound_id, Partials.SoundboardSound); } spreadInjectedData(data) { return Object.fromEntries(Object.getOwnPropertySymbols(data).map(symbol => [symbol, data[symbol]])); } } module.exports = GenericAction; node_modules/discord.js/src/client/actions/MessageReactionRemoveEmoji.js 0000664 00000001675 15114741631 0022557 0 ustar 00 'use strict'; const Action = require('./Action'); const Events = require('../../util/Events'); class MessageReactionRemoveEmoji extends Action { handle(data) { const channel = this.getChannel({ id: data.channel_id, ...('guild_id' in data && { guild_id: data.guild_id }) }); if (!channel?.isTextBased()) return false; const message = this.getMessage(data, channel); if (!message) return false; const reaction = this.getReaction(data, message); if (!reaction) return false; if (!message.partial) message.reactions.cache.delete(reaction.emoji.id ?? reaction.emoji.name); /** * Emitted when a bot removes an emoji reaction from a cached message. * @event Client#messageReactionRemoveEmoji * @param {MessageReaction} reaction The reaction that was removed */ this.client.emit(Events.MessageReactionRemoveEmoji, reaction); return { reaction }; } } module.exports = MessageReactionRemoveEmoji; node_modules/discord.js/src/client/actions/StageInstanceDelete.js 0000664 00000001521 15114741631 0021205 0 ustar 00 'use strict'; const Action = require('./Action'); const Events = require('../../util/Events'); class StageInstanceDeleteAction extends Action { handle(data) { const client = this.client; const channel = this.getChannel({ id: data.channel_id, guild_id: data.guild_id }); if (channel) { const stageInstance = channel.guild.stageInstances._add(data); if (stageInstance) { channel.guild.stageInstances.cache.delete(stageInstance.id); /** * Emitted whenever a stage instance is deleted. * @event Client#stageInstanceDelete * @param {StageInstance} stageInstance The deleted stage instance */ client.emit(Events.StageInstanceDelete, stageInstance); return { stageInstance }; } } return {}; } } module.exports = StageInstanceDeleteAction; node_modules/discord.js/src/client/actions/GuildDelete.js 0000664 00000002407 15114741631 0017525 0 ustar 00 'use strict'; const Action = require('./Action'); const Events = require('../../util/Events'); class GuildDeleteAction extends Action { handle(data) { const client = this.client; let guild = client.guilds.cache.get(data.id); if (guild) { if (data.unavailable) { // Guild is unavailable guild.available = false; /** * Emitted whenever a guild becomes unavailable, likely due to a server outage. * @event Client#guildUnavailable * @param {Guild} guild The guild that has become unavailable */ client.emit(Events.GuildUnavailable, guild); // Stops the GuildDelete packet thinking a guild was actually deleted, // handles emitting of event itself return; } for (const channel of guild.channels.cache.values()) this.client.channels._remove(channel.id); client.voice.adapters.get(data.id)?.destroy(); // Delete guild client.guilds.cache.delete(guild.id); /** * Emitted whenever a guild kicks the client or the guild is deleted/left. * @event Client#guildDelete * @param {Guild} guild The guild that was deleted */ client.emit(Events.GuildDelete, guild); } } } module.exports = GuildDeleteAction; node_modules/discord.js/src/client/actions/AutoModerationRuleCreate.js 0000664 00000001454 15114741631 0022245 0 ustar 00 'use strict'; const Action = require('./Action'); const Events = require('../../util/Events'); class AutoModerationRuleCreateAction extends Action { handle(data) { const { client } = this; const guild = client.guilds.cache.get(data.guild_id); if (guild) { const autoModerationRule = guild.autoModerationRules._add(data); /** * Emitted whenever an auto moderation rule is created. * <info>This event requires the {@link PermissionFlagsBits.ManageGuild} permission.</info> * @event Client#autoModerationRuleCreate * @param {AutoModerationRule} autoModerationRule The created auto moderation rule */ client.emit(Events.AutoModerationRuleCreate, autoModerationRule); } return {}; } } module.exports = AutoModerationRuleCreateAction; node_modules/discord.js/src/client/actions/InviteDelete.js 0000664 00000001645 15114741631 0017722 0 ustar 00 'use strict'; const Action = require('./Action'); const Invite = require('../../structures/Invite'); const Events = require('../../util/Events'); class InviteDeleteAction extends Action { handle(data) { const client = this.client; const channel = client.channels.cache.get(data.channel_id); const guild = client.guilds.cache.get(data.guild_id); if (!channel) return false; const inviteData = Object.assign(data, { channel, guild }); const invite = new Invite(client, inviteData); guild.invites.cache.delete(invite.code); /** * Emitted when an invite is deleted. * <info>This event requires the {@link PermissionFlagsBits.ManageChannels} permission for the channel.</info> * @event Client#inviteDelete * @param {Invite} invite The invite that was deleted */ client.emit(Events.InviteDelete, invite); return { invite }; } } module.exports = InviteDeleteAction; node_modules/discord.js/src/client/actions/GuildEmojiDelete.js 0000664 00000000767 15114741631 0020520 0 ustar 00 'use strict'; const Action = require('./Action'); const Events = require('../../util/Events'); class GuildEmojiDeleteAction extends Action { handle(emoji) { emoji.guild.emojis.cache.delete(emoji.id); /** * Emitted whenever a custom emoji is deleted in a guild. * @event Client#emojiDelete * @param {GuildEmoji} emoji The emoji that was deleted */ this.client.emit(Events.GuildEmojiDelete, emoji); return { emoji }; } } module.exports = GuildEmojiDeleteAction; node_modules/discord.js/src/client/actions/EntitlementDelete.js 0000664 00000001440 15114741631 0020745 0 ustar 00 'use strict'; const Action = require('./Action'); const Events = require('../../util/Events'); class EntitlementDeleteAction extends Action { handle(data) { const client = this.client; const entitlement = client.application.entitlements._add(data, false); client.application.entitlements.cache.delete(entitlement.id); /** * Emitted whenever an entitlement is deleted. * <warn>Entitlements are not deleted when they expire. * This is only triggered when Discord issues a refund or deletes the entitlement manually.</warn> * @event Client#entitlementDelete * @param {Entitlement} entitlement The entitlement that was deleted */ client.emit(Events.EntitlementDelete, entitlement); return {}; } } module.exports = EntitlementDeleteAction; node_modules/discord.js/src/client/actions/StageInstanceUpdate.js 0000664 00000001766 15114741631 0021240 0 ustar 00 'use strict'; const Action = require('./Action'); const Events = require('../../util/Events'); class StageInstanceUpdateAction extends Action { handle(data) { const client = this.client; const channel = this.getChannel({ id: data.channel_id, guild_id: data.guild_id }); if (channel) { const oldStageInstance = channel.guild.stageInstances.cache.get(data.id)?._clone() ?? null; const newStageInstance = channel.guild.stageInstances._add(data); /** * Emitted whenever a stage instance gets updated - e.g. change in topic or privacy level * @event Client#stageInstanceUpdate * @param {?StageInstance} oldStageInstance The stage instance before the update * @param {StageInstance} newStageInstance The stage instance after the update */ client.emit(Events.StageInstanceUpdate, oldStageInstance, newStageInstance); return { oldStageInstance, newStageInstance }; } return {}; } } module.exports = StageInstanceUpdateAction; node_modules/discord.js/src/client/actions/GuildEmojiUpdate.js 0000664 00000001057 15114741631 0020531 0 ustar 00 'use strict'; const Action = require('./Action'); const Events = require('../../util/Events'); class GuildEmojiUpdateAction extends Action { handle(current, data) { const old = current._update(data); /** * Emitted whenever a custom emoji is updated in a guild. * @event Client#emojiUpdate * @param {GuildEmoji} oldEmoji The old emoji * @param {GuildEmoji} newEmoji The new emoji */ this.client.emit(Events.GuildEmojiUpdate, old, current); return { emoji: current }; } } module.exports = GuildEmojiUpdateAction; node_modules/discord.js/src/client/actions/GuildStickerDelete.js 0000664 00000001016 15114741631 0021045 0 ustar 00 'use strict'; const Action = require('./Action'); const Events = require('../../util/Events'); class GuildStickerDeleteAction extends Action { handle(sticker) { sticker.guild.stickers.cache.delete(sticker.id); /** * Emitted whenever a custom sticker is deleted in a guild. * @event Client#stickerDelete * @param {Sticker} sticker The sticker that was deleted */ this.client.emit(Events.GuildStickerDelete, sticker); return { sticker }; } } module.exports = GuildStickerDeleteAction; node_modules/discord.js/src/client/actions/AutoModerationRuleDelete.js 0000664 00000001662 15114741631 0022245 0 ustar 00 'use strict'; const Action = require('./Action'); const Events = require('../../util/Events'); class AutoModerationRuleDeleteAction extends Action { handle(data) { const { client } = this; const guild = client.guilds.cache.get(data.guild_id); if (guild) { const autoModerationRule = guild.autoModerationRules.cache.get(data.id); if (autoModerationRule) { guild.autoModerationRules.cache.delete(autoModerationRule.id); /** * Emitted whenever an auto moderation rule is deleted. * <info>This event requires the {@link PermissionFlagsBits.ManageGuild} permission.</info> * @event Client#autoModerationRuleDelete * @param {AutoModerationRule} autoModerationRule The deleted auto moderation rule */ client.emit(Events.AutoModerationRuleDelete, autoModerationRule); } } return {}; } } module.exports = AutoModerationRuleDeleteAction; node_modules/discord.js/src/client/actions/ThreadListSync.js 0000664 00000003271 15114741631 0020236 0 ustar 00 'use strict'; const { Collection } = require('@discordjs/collection'); const Action = require('./Action'); const Events = require('../../util/Events'); class ThreadListSyncAction extends Action { handle(data) { const client = this.client; const guild = client.guilds.cache.get(data.guild_id); if (!guild) return {}; if (data.channel_ids) { for (const id of data.channel_ids) { const channel = client.channels.cache.get(id); if (channel) this.removeStale(channel); } } else { for (const channel of guild.channels.cache.values()) { this.removeStale(channel); } } const syncedThreads = data.threads.reduce((coll, rawThread) => { const thread = client.channels._add(rawThread); return coll.set(thread.id, thread); }, new Collection()); for (const rawMember of Object.values(data.members)) { // Discord sends the thread id as id in this object const thread = client.channels.cache.get(rawMember.id); if (thread) { thread.members._add(rawMember); } } /** * Emitted whenever the client user gains access to a text or news channel that contains threads * @event Client#threadListSync * @param {Collection<Snowflake, ThreadChannel>} threads The threads that were synced * @param {Guild} guild The guild that the threads were synced in */ client.emit(Events.ThreadListSync, syncedThreads, guild); return { syncedThreads, }; } removeStale(channel) { channel.threads?.cache.forEach(thread => { if (!thread.archived) { this.client.channels._remove(thread.id); } }); } } module.exports = ThreadListSyncAction; node_modules/discord.js/src/client/WebhookClient.js 0000664 00000006110 15114741631 0016426 0 ustar 00 'use strict'; const BaseClient = require('./BaseClient'); const { DiscordjsError, ErrorCodes } = require('../errors'); const Webhook = require('../structures/Webhook'); const { parseWebhookURL } = require('../util/Util'); /** * The webhook client. * @implements {Webhook} * @extends {BaseClient} */ class WebhookClient extends BaseClient { /** * Represents the credentials used for a webhook in the form of its id and token. * @typedef {Object} WebhookClientDataIdWithToken * @property {Snowflake} id The webhook's id * @property {string} token The webhook's token */ /** * Represents the credentials used for a webhook in the form of a URL. * @typedef {Object} WebhookClientDataURL * @property {string} url The full URL for the webhook */ /** * Represents the credentials used for a webhook. * @typedef {WebhookClientDataIdWithToken|WebhookClientDataURL} WebhookClientData */ /** * Options for a webhook client. * @typedef {Object} WebhookClientOptions * @property {MessageMentionOptions} [allowedMentions] Default value for {@link BaseMessageOptions#allowedMentions} * @property {RESTOptions} [rest] Options for the REST manager */ /** * @param {WebhookClientData} data The data of the webhook * @param {WebhookClientOptions} [options] Options for the webhook client */ constructor(data, options) { super(options); Object.defineProperty(this, 'client', { value: this }); let { id, token } = data; if ('url' in data) { const parsed = parseWebhookURL(data.url); if (!parsed) { throw new DiscordjsError(ErrorCodes.WebhookURLInvalid); } ({ id, token } = parsed); } this.id = id; Object.defineProperty(this, 'token', { value: token, writable: true, configurable: true }); } /** * The options the webhook client was instantiated with. * @type {WebhookClientOptions} * @name WebhookClient#options */ // These are here only for documentation purposes - they are implemented by Webhook /* eslint-disable no-empty-function, valid-jsdoc */ /** * Sends a message with this webhook. * @param {string|MessagePayload|WebhookMessageCreateOptions} options The content for the reply * @returns {Promise<APIMessage>} */ send() {} /** * Gets a message that was sent by this webhook. * @param {Snowflake} message The id of the message to fetch * @param {WebhookFetchMessageOptions} [options={}] The options to provide to fetch the message. * @returns {Promise<APIMessage>} Returns the message sent by this webhook */ fetchMessage() {} /** * Edits a message that was sent by this webhook. * @param {MessageResolvable} message The message to edit * @param {string|MessagePayload|WebhookMessageEditOptions} options The options to provide * @returns {Promise<APIMessage>} Returns the message edited by this webhook */ editMessage() {} sendSlackMessage() {} edit() {} delete() {} deleteMessage() {} get createdTimestamp() {} get createdAt() {} get url() {} } Webhook.applyToClass(WebhookClient); module.exports = WebhookClient; node_modules/discord.js/src/client/Client.js 0000664 00000054370 15114741631 0015122 0 ustar 00 'use strict'; const process = require('node:process'); const { Collection } = require('@discordjs/collection'); const { makeURLSearchParams } = require('@discordjs/rest'); const { OAuth2Scopes, Routes } = require('discord-api-types/v10'); const BaseClient = require('./BaseClient'); const ActionsManager = require('./actions/ActionsManager'); const ClientVoiceManager = require('./voice/ClientVoiceManager'); const WebSocketManager = require('./websocket/WebSocketManager'); const { DiscordjsError, DiscordjsTypeError, DiscordjsRangeError, ErrorCodes } = require('../errors'); const BaseGuildEmojiManager = require('../managers/BaseGuildEmojiManager'); const ChannelManager = require('../managers/ChannelManager'); const GuildManager = require('../managers/GuildManager'); const UserManager = require('../managers/UserManager'); const ShardClientUtil = require('../sharding/ShardClientUtil'); const ClientPresence = require('../structures/ClientPresence'); const GuildPreview = require('../structures/GuildPreview'); const GuildTemplate = require('../structures/GuildTemplate'); const Invite = require('../structures/Invite'); const { SoundboardSound } = require('../structures/SoundboardSound'); const { Sticker } = require('../structures/Sticker'); const StickerPack = require('../structures/StickerPack'); const VoiceRegion = require('../structures/VoiceRegion'); const Webhook = require('../structures/Webhook'); const Widget = require('../structures/Widget'); const { resolveInviteCode, resolveGuildTemplateCode } = require('../util/DataResolver'); const Events = require('../util/Events'); const IntentsBitField = require('../util/IntentsBitField'); const Options = require('../util/Options'); const PermissionsBitField = require('../util/PermissionsBitField'); const Status = require('../util/Status'); const Sweepers = require('../util/Sweepers'); let deprecationEmittedForPremiumStickerPacks = false; /** * The main hub for interacting with the Discord API, and the starting point for any bot. * @extends {BaseClient} */ class Client extends BaseClient { /** * @param {ClientOptions} options Options for the client */ constructor(options) { super(options); const data = require('node:worker_threads').workerData ?? process.env; const defaults = Options.createDefault(); if (this.options.shards === defaults.shards) { if ('SHARDS' in data) { this.options.shards = JSON.parse(data.SHARDS); } } if (this.options.shardCount === defaults.shardCount) { if ('SHARD_COUNT' in data) { this.options.shardCount = Number(data.SHARD_COUNT); } else if (Array.isArray(this.options.shards)) { this.options.shardCount = this.options.shards.length; } } const typeofShards = typeof this.options.shards; if (typeofShards === 'undefined' && typeof this.options.shardCount === 'number') { this.options.shards = Array.from({ length: this.options.shardCount }, (_, i) => i); } if (typeofShards === 'number') this.options.shards = [this.options.shards]; if (Array.isArray(this.options.shards)) { this.options.shards = [ ...new Set( this.options.shards.filter(item => !isNaN(item) && item >= 0 && item < Infinity && item === (item | 0)), ), ]; } this._validateOptions(); /** * The WebSocket manager of the client * @type {WebSocketManager} */ this.ws = new WebSocketManager(this); /** * The action manager of the client * @type {ActionsManager} * @private */ this.actions = new ActionsManager(this); /** * The voice manager of the client * @type {ClientVoiceManager} */ this.voice = new ClientVoiceManager(this); /** * Shard helpers for the client (only if the process was spawned from a {@link ShardingManager}) * @type {?ShardClientUtil} */ this.shard = process.env.SHARDING_MANAGER ? ShardClientUtil.singleton(this, process.env.SHARDING_MANAGER_MODE) : null; /** * The user manager of this client * @type {UserManager} */ this.users = new UserManager(this); /** * A manager of all the guilds the client is currently handling - * as long as sharding isn't being used, this will be *every* guild the bot is a member of * @type {GuildManager} */ this.guilds = new GuildManager(this); /** * All of the {@link BaseChannel}s that the client is currently handling - * as long as sharding isn't being used, this will be *every* channel in *every* guild the bot * is a member of. Note that DM channels will not be initially cached, and thus not be present * in the Manager without their explicit fetching or use. * @type {ChannelManager} */ this.channels = new ChannelManager(this); /** * The sweeping functions and their intervals used to periodically sweep caches * @type {Sweepers} */ this.sweepers = new Sweepers(this, this.options.sweepers); /** * The presence of the Client * @private * @type {ClientPresence} */ this.presence = new ClientPresence(this, this.options.presence); Object.defineProperty(this, 'token', { writable: true }); if (!this.token && 'DISCORD_TOKEN' in process.env) { /** * Authorization token for the logged in bot. * If present, this defaults to `process.env.DISCORD_TOKEN` when instantiating the client * <warn>This should be kept private at all times.</warn> * @type {?string} */ this.token = process.env.DISCORD_TOKEN; } else { this.token = null; } /** * User that the client is logged in as * @type {?ClientUser} */ this.user = null; /** * The application of this bot * @type {?ClientApplication} */ this.application = null; /** * Timestamp of the time the client was last {@link Status.Ready} at * @type {?number} */ this.readyTimestamp = null; } /** * A manager of all the custom emojis that the client has access to * @type {BaseGuildEmojiManager} * @readonly */ get emojis() { const emojis = new BaseGuildEmojiManager(this); for (const guild of this.guilds.cache.values()) { if (guild.available) for (const emoji of guild.emojis.cache.values()) emojis.cache.set(emoji.id, emoji); } return emojis; } /** * Time at which the client was last regarded as being in the {@link Status.Ready} state * (each time the client disconnects and successfully reconnects, this will be overwritten) * @type {?Date} * @readonly */ get readyAt() { return this.readyTimestamp && new Date(this.readyTimestamp); } /** * How long it has been since the client last entered the {@link Status.Ready} state in milliseconds * @type {?number} * @readonly */ get uptime() { return this.readyTimestamp && Date.now() - this.readyTimestamp; } /** * Logs the client in, establishing a WebSocket connection to Discord. * @param {string} [token=this.token] Token of the account to log in with * @returns {Promise<string>} Token of the account used * @example * client.login('my token'); */ async login(token = this.token) { if (!token || typeof token !== 'string') throw new DiscordjsError(ErrorCodes.TokenInvalid); this.token = token = token.replace(/^(Bot|Bearer)\s*/i, ''); this.rest.setToken(token); this.emit(Events.Debug, `Provided token: ${this._censoredToken}`); if (this.options.presence) { this.options.ws.presence = this.presence._parse(this.options.presence); } this.emit(Events.Debug, 'Preparing to connect to the gateway...'); try { await this.ws.connect(); return this.token; } catch (error) { await this.destroy(); throw error; } } /** * Returns whether the client has logged in, indicative of being able to access * properties such as `user` and `application`. * @returns {boolean} */ isReady() { return !this.ws.destroyed && this.ws.status === Status.Ready; } /** * Logs out, terminates the connection to Discord, and destroys the client. * @returns {Promise<void>} */ async destroy() { super.destroy(); this.sweepers.destroy(); await this.ws.destroy(); this.token = null; this.rest.setToken(null); } /** * Options used when fetching an invite from Discord. * @typedef {Object} ClientFetchInviteOptions * @property {Snowflake} [guildScheduledEventId] The id of the guild scheduled event to include with * the invite */ /** * Obtains an invite from Discord. * @param {InviteResolvable} invite Invite code or URL * @param {ClientFetchInviteOptions} [options] Options for fetching the invite * @returns {Promise<Invite>} * @example * client.fetchInvite('https://discord.gg/djs') * .then(invite => console.log(`Obtained invite with code: ${invite.code}`)) * .catch(console.error); */ async fetchInvite(invite, options) { const code = resolveInviteCode(invite); const query = makeURLSearchParams({ with_counts: true, guild_scheduled_event_id: options?.guildScheduledEventId, }); const data = await this.rest.get(Routes.invite(code), { query }); return new Invite(this, data); } /** * Obtains a template from Discord. * @param {GuildTemplateResolvable} template Template code or URL * @returns {Promise<GuildTemplate>} * @example * client.fetchGuildTemplate('https://discord.new/FKvmczH2HyUf') * .then(template => console.log(`Obtained template with code: ${template.code}`)) * .catch(console.error); */ async fetchGuildTemplate(template) { const code = resolveGuildTemplateCode(template); const data = await this.rest.get(Routes.template(code)); return new GuildTemplate(this, data); } /** * Obtains a webhook from Discord. * @param {Snowflake} id The webhook's id * @param {string} [token] Token for the webhook * @returns {Promise<Webhook>} * @example * client.fetchWebhook('id', 'token') * .then(webhook => console.log(`Obtained webhook with name: ${webhook.name}`)) * .catch(console.error); */ async fetchWebhook(id, token) { const data = await this.rest.get(Routes.webhook(id, token), { auth: token === undefined }); return new Webhook(this, { token, ...data }); } /** * Obtains the available voice regions from Discord. * @returns {Promise<Collection<string, VoiceRegion>>} * @example * client.fetchVoiceRegions() * .then(regions => console.log(`Available regions are: ${regions.map(region => region.name).join(', ')}`)) * .catch(console.error); */ async fetchVoiceRegions() { const apiRegions = await this.rest.get(Routes.voiceRegions()); const regions = new Collection(); for (const region of apiRegions) regions.set(region.id, new VoiceRegion(region)); return regions; } /** * Obtains a sticker from Discord. * @param {Snowflake} id The sticker's id * @returns {Promise<Sticker>} * @example * client.fetchSticker('id') * .then(sticker => console.log(`Obtained sticker with name: ${sticker.name}`)) * .catch(console.error); */ async fetchSticker(id) { const data = await this.rest.get(Routes.sticker(id)); return new Sticker(this, data); } /** * Options for fetching sticker packs. * @typedef {Object} StickerPackFetchOptions * @property {Snowflake} [packId] The id of the sticker pack to fetch */ /** * Obtains the list of available sticker packs. * @param {StickerPackFetchOptions} [options={}] Options for fetching sticker packs * @returns {Promise<Collection<Snowflake, StickerPack>|StickerPack>} * A collection of sticker packs, or a single sticker pack if a packId was provided * @example * client.fetchStickerPacks() * .then(packs => console.log(`Available sticker packs are: ${packs.map(pack => pack.name).join(', ')}`)) * .catch(console.error); * @example * client.fetchStickerPacks({ packId: '751604115435421716' }) * .then(pack => console.log(`Sticker pack name: ${pack.name}`)) * .catch(console.error); */ async fetchStickerPacks({ packId } = {}) { if (packId) { const data = await this.rest.get(Routes.stickerPack(packId)); return new StickerPack(this, data); } const data = await this.rest.get(Routes.stickerPacks()); return new Collection(data.sticker_packs.map(stickerPack => [stickerPack.id, new StickerPack(this, stickerPack)])); } /** * Obtains the list of available sticker packs. * @returns {Promise<Collection<Snowflake, StickerPack>>} * @deprecated Use {@link Client#fetchStickerPacks} instead. */ fetchPremiumStickerPacks() { if (!deprecationEmittedForPremiumStickerPacks) { process.emitWarning( 'The Client#fetchPremiumStickerPacks() method is deprecated. Use Client#fetchStickerPacks() instead.', 'DeprecationWarning', ); deprecationEmittedForPremiumStickerPacks = true; } return this.fetchStickerPacks(); } /** * Obtains the list of default soundboard sounds. * @returns {Promise<Collection<string, SoundboardSound>>} * @example * client.fetchDefaultSoundboardSounds() * .then(sounds => console.log(`Available soundboard sounds are: ${sounds.map(sound => sound.name).join(', ')}`)) * .catch(console.error); */ async fetchDefaultSoundboardSounds() { const data = await this.rest.get(Routes.soundboardDefaultSounds()); return new Collection(data.map(sound => [sound.sound_id, new SoundboardSound(this, sound)])); } /** * Obtains a guild preview from Discord, available for all guilds the bot is in and all Discoverable guilds. * @param {GuildResolvable} guild The guild to fetch the preview for * @returns {Promise<GuildPreview>} */ async fetchGuildPreview(guild) { const id = this.guilds.resolveId(guild); if (!id) throw new DiscordjsTypeError(ErrorCodes.InvalidType, 'guild', 'GuildResolvable'); const data = await this.rest.get(Routes.guildPreview(id)); return new GuildPreview(this, data); } /** * Obtains the widget data of a guild from Discord, available for guilds with the widget enabled. * @param {GuildResolvable} guild The guild to fetch the widget data for * @returns {Promise<Widget>} */ async fetchGuildWidget(guild) { const id = this.guilds.resolveId(guild); if (!id) throw new DiscordjsTypeError(ErrorCodes.InvalidType, 'guild', 'GuildResolvable'); const data = await this.rest.get(Routes.guildWidgetJSON(id)); return new Widget(this, data); } /** * Options for {@link Client#generateInvite}. * @typedef {Object} InviteGenerationOptions * @property {OAuth2Scopes[]} scopes Scopes that should be requested * @property {PermissionResolvable} [permissions] Permissions to request * @property {GuildResolvable} [guild] Guild to preselect * @property {boolean} [disableGuildSelect] Whether to disable the guild selection */ /** * Generates a link that can be used to invite the bot to a guild. * @param {InviteGenerationOptions} [options={}] Options for the invite * @returns {string} * @example * const link = client.generateInvite({ * scopes: [OAuth2Scopes.ApplicationsCommands], * }); * console.log(`Generated application invite link: ${link}`); * @example * const link = client.generateInvite({ * permissions: [ * PermissionFlagsBits.SendMessages, * PermissionFlagsBits.ManageGuild, * PermissionFlagsBits.MentionEveryone, * ], * scopes: [OAuth2Scopes.Bot], * }); * console.log(`Generated bot invite link: ${link}`); */ generateInvite(options = {}) { if (typeof options !== 'object') throw new DiscordjsTypeError(ErrorCodes.InvalidType, 'options', 'object', true); if (!this.application) throw new DiscordjsError(ErrorCodes.ClientNotReady, 'generate an invite link'); const { scopes } = options; if (scopes === undefined) { throw new DiscordjsTypeError(ErrorCodes.InvalidMissingScopes); } if (!Array.isArray(scopes)) { throw new DiscordjsTypeError(ErrorCodes.InvalidType, 'scopes', 'Array of Invite Scopes', true); } if (!scopes.some(scope => [OAuth2Scopes.Bot, OAuth2Scopes.ApplicationsCommands].includes(scope))) { throw new DiscordjsTypeError(ErrorCodes.InvalidMissingScopes); } if (!scopes.includes(OAuth2Scopes.Bot) && options.permissions) { throw new DiscordjsTypeError(ErrorCodes.InvalidScopesWithPermissions); } const validScopes = Object.values(OAuth2Scopes); const invalidScope = scopes.find(scope => !validScopes.includes(scope)); if (invalidScope) { throw new DiscordjsTypeError(ErrorCodes.InvalidElement, 'Array', 'scopes', invalidScope); } const query = makeURLSearchParams({ client_id: this.application.id, scope: scopes.join(' '), disable_guild_select: options.disableGuildSelect, }); if (options.permissions) { const permissions = PermissionsBitField.resolve(options.permissions); if (permissions) query.set('permissions', permissions.toString()); } if (options.guild) { const guildId = this.guilds.resolveId(options.guild); if (!guildId) throw new DiscordjsTypeError(ErrorCodes.InvalidType, 'options.guild', 'GuildResolvable'); query.set('guild_id', guildId); } return `${this.options.rest.api}${Routes.oauth2Authorization()}?${query}`; } toJSON() { return super.toJSON({ actions: false, presence: false, }); } /** * Partially censored client token for debug logging purposes. * @type {?string} * @readonly * @private */ get _censoredToken() { if (!this.token) return null; return this.token .split('.') .map((val, i) => (i > 1 ? val.replace(/./g, '*') : val)) .join('.'); } /** * Calls {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/eval} on a script * with the client as `this`. * @param {string} script Script to eval * @returns {*} * @private */ _eval(script) { return eval(script); } /** * Validates the client options. * @param {ClientOptions} [options=this.options] Options to validate * @private */ _validateOptions(options = this.options) { if (options.intents === undefined) { throw new DiscordjsTypeError(ErrorCodes.ClientMissingIntents); } else { options.intents = new IntentsBitField(options.intents).freeze(); } if (typeof options.shardCount !== 'number' || isNaN(options.shardCount) || options.shardCount < 1) { throw new DiscordjsTypeError(ErrorCodes.ClientInvalidOption, 'shardCount', 'a number greater than or equal to 1'); } if (options.shards && !(options.shards === 'auto' || Array.isArray(options.shards))) { throw new DiscordjsTypeError(ErrorCodes.ClientInvalidOption, 'shards', "'auto', a number or array of numbers"); } if (options.shards && !options.shards.length) throw new DiscordjsRangeError(ErrorCodes.ClientInvalidProvidedShards); if (typeof options.makeCache !== 'function') { throw new DiscordjsTypeError(ErrorCodes.ClientInvalidOption, 'makeCache', 'a function'); } if (typeof options.sweepers !== 'object' || options.sweepers === null) { throw new DiscordjsTypeError(ErrorCodes.ClientInvalidOption, 'sweepers', 'an object'); } if (!Array.isArray(options.partials)) { throw new DiscordjsTypeError(ErrorCodes.ClientInvalidOption, 'partials', 'an Array'); } if (typeof options.waitGuildTimeout !== 'number' || isNaN(options.waitGuildTimeout)) { throw new DiscordjsTypeError(ErrorCodes.ClientInvalidOption, 'waitGuildTimeout', 'a number'); } if (typeof options.failIfNotExists !== 'boolean') { throw new DiscordjsTypeError(ErrorCodes.ClientInvalidOption, 'failIfNotExists', 'a boolean'); } if (typeof options.enforceNonce !== 'boolean') { throw new DiscordjsTypeError(ErrorCodes.ClientInvalidOption, 'enforceNonce', 'a boolean'); } if ( (typeof options.allowedMentions !== 'object' && options.allowedMentions !== undefined) || options.allowedMentions === null ) { throw new DiscordjsTypeError(ErrorCodes.ClientInvalidOption, 'allowedMentions', 'an object'); } if (typeof options.presence !== 'object' || options.presence === null) { throw new DiscordjsTypeError(ErrorCodes.ClientInvalidOption, 'presence', 'an object'); } if (typeof options.ws !== 'object' || options.ws === null) { throw new DiscordjsTypeError(ErrorCodes.ClientInvalidOption, 'ws', 'an object'); } if (typeof options.rest !== 'object' || options.rest === null) { throw new DiscordjsTypeError(ErrorCodes.ClientInvalidOption, 'rest', 'an object'); } if (typeof options.jsonTransformer !== 'function') { throw new DiscordjsTypeError(ErrorCodes.ClientInvalidOption, 'jsonTransformer', 'a function'); } } } module.exports = Client; /** * @class SnowflakeUtil * @classdesc This class is an alias for {@link https://www.npmjs.com/package/@sapphire/snowflake @sapphire/snowflake}'s * `DiscordSnowflake` class. * * Check their documentation * {@link https://www.sapphirejs.dev/docs/Documentation/api-utilities/classes/sapphire_snowflake.Snowflake here} * ({@link https://www.sapphirejs.dev/docs/Guide/utilities/snowflake guide}) * to see what you can do. * @hideconstructor */ /** * A {@link https://developer.twitter.com/en/docs/twitter-ids Twitter snowflake}, * except the epoch is 2015-01-01T00:00:00.000Z. * * If we have a snowflake '266241948824764416' we can represent it as binary: * ``` * 64 22 17 12 0 * 000000111011000111100001101001000101000000 00001 00000 000000000000 * number of milliseconds since Discord epoch worker pid increment * ``` * @typedef {string} Snowflake */ /** * Emitted for general debugging information. * @event Client#debug * @param {string} info The debug information */ /** * Emitted for general warnings. * @event Client#warn * @param {string} info The warning */ /** * @external Collection * @see {@link https://discord.js.org/docs/packages/collection/stable/Collection:Class} */ /** * @external ImageURLOptions * @see {@link https://discord.js.org/docs/packages/rest/stable/ImageURLOptions:Interface} */ /** * @external BaseImageURLOptions * @see {@link https://discord.js.org/docs/packages/rest/stable/BaseImageURLOptions:Interface} */ node_modules/discord.js/src/client/websocket/WebSocketShard.js 0000664 00000015347 15114741631 0020543 0 ustar 00 'use strict'; const EventEmitter = require('node:events'); const process = require('node:process'); const { setTimeout, clearTimeout } = require('node:timers'); const { GatewayIntentBits } = require('discord-api-types/v10'); const Status = require('../../util/Status'); const WebSocketShardEvents = require('../../util/WebSocketShardEvents'); let deprecationEmittedForImportant = false; /** * Represents a Shard's WebSocket connection * @extends {EventEmitter} */ class WebSocketShard extends EventEmitter { constructor(manager, id) { super(); /** * The WebSocketManager of the shard * @type {WebSocketManager} */ this.manager = manager; /** * The shard's id * @type {number} */ this.id = id; /** * The current status of the shard * @type {Status} */ this.status = Status.Idle; /** * The sequence of the shard after close * @type {number} * @private */ this.closeSequence = 0; /** * The previous heartbeat ping of the shard * @type {number} */ this.ping = -1; /** * The last time a ping was sent (a timestamp) * @type {number} */ this.lastPingTimestamp = -1; /** * A set of guild ids this shard expects to receive * @name WebSocketShard#expectedGuilds * @type {?Set<string>} * @private */ Object.defineProperty(this, 'expectedGuilds', { value: null, writable: true }); /** * The ready timeout * @name WebSocketShard#readyTimeout * @type {?NodeJS.Timeout} * @private */ Object.defineProperty(this, 'readyTimeout', { value: null, writable: true }); /** * @external SessionInfo * @see {@link https://discord.js.org/docs/packages/ws/stable/SessionInfo:Interface} */ /** * The session info used by `@discordjs/ws` package. * @name WebSocketShard#sessionInfo * @type {?SessionInfo} * @private */ Object.defineProperty(this, 'sessionInfo', { value: null, writable: true }); } /** * Emits a debug event. * @param {string[]} messages The debug message * @private */ debug(messages) { this.manager.debug(messages, this.id); } /** * @external CloseEvent * @see {@link https://developer.mozilla.org/en-US/docs/Web/API/CloseEvent} */ /** * This method is responsible to emit close event for this shard. * This method helps the shard reconnect. * @param {CloseEvent} [event] Close event that was received * @deprecated */ emitClose( event = { code: 1011, reason: 'INTERNAL_ERROR', wasClean: false, }, ) { this.debug([ '[CLOSE]', `Event Code: ${event.code}`, `Clean : ${event.wasClean}`, `Reason : ${event.reason ?? 'No reason received'}`, ]); /** * Emitted when a shard's WebSocket closes. * @private * @event WebSocketShard#close * @param {CloseEvent} event The received event */ this.emit(WebSocketShardEvents.Close, event); } /** * Called when the shard receives the READY payload. * @param {Object} packet The received packet * @private */ onReadyPacket(packet) { if (!packet) { this.debug([`Received broken packet: '${packet}'.`]); return; } /** * Emitted when the shard receives the READY payload and is now waiting for guilds * @event WebSocketShard#ready */ this.emit(WebSocketShardEvents.Ready); this.expectedGuilds = new Set(packet.guilds.map(guild => guild.id)); this.status = Status.WaitingForGuilds; } /** * Called when a GuildCreate or GuildDelete for this shard was sent after READY payload was received, * but before we emitted the READY event. * @param {Snowflake} guildId the id of the Guild sent in the payload * @private */ gotGuild(guildId) { this.expectedGuilds.delete(guildId); this.checkReady(); } /** * Checks if the shard can be marked as ready * @private */ checkReady() { // Step 0. Clear the ready timeout, if it exists if (this.readyTimeout) { clearTimeout(this.readyTimeout); this.readyTimeout = null; } // Step 1. If we don't have any other guilds pending, we are ready if (!this.expectedGuilds.size) { this.debug(['Shard received all its guilds. Marking as fully ready.']); this.status = Status.Ready; /** * Emitted when the shard is fully ready. * This event is emitted if: * * all guilds were received by this shard * * the ready timeout expired, and some guilds are unavailable * @event WebSocketShard#allReady * @param {?Set<string>} unavailableGuilds Set of unavailable guilds, if any */ this.emit(WebSocketShardEvents.AllReady); return; } const hasGuildsIntent = this.manager.client.options.intents.has(GatewayIntentBits.Guilds); // Step 2. Create a timeout that will mark the shard as ready if there are still unavailable guilds // * The timeout is 15 seconds by default // * This can be optionally changed in the client options via the `waitGuildTimeout` option // * a timeout time of zero will skip this timeout, which potentially could cause the Client to miss guilds. const { waitGuildTimeout } = this.manager.client.options; this.readyTimeout = setTimeout( () => { this.debug([ hasGuildsIntent ? `Shard did not receive any guild packets in ${waitGuildTimeout} ms.` : 'Shard will not receive anymore guild packets.', `Unavailable guild count: ${this.expectedGuilds.size}`, ]); this.readyTimeout = null; this.status = Status.Ready; this.emit(WebSocketShardEvents.AllReady, this.expectedGuilds); }, hasGuildsIntent ? waitGuildTimeout : 0, ).unref(); } /** * Adds a packet to the queue to be sent to the gateway. * <warn>If you use this method, make sure you understand that you need to provide * a full [Payload](https://discord.com/developers/docs/topics/gateway#commands-and-events-gateway-commands). * Do not use this method if you don't know what you're doing.</warn> * @param {Object} data The full packet to send * @param {boolean} [important=false] If this packet should be added first in queue * <warn>This parameter is **deprecated**. Important payloads are determined by their opcode instead.</warn> */ send(data, important = false) { if (important && !deprecationEmittedForImportant) { process.emitWarning( 'Sending important payloads explicitly is deprecated. They are determined by their opcode implicitly now.', 'DeprecationWarning', ); deprecationEmittedForImportant = true; } this.manager._ws.send(this.id, data); } } module.exports = WebSocketShard; node_modules/discord.js/src/client/websocket/WebSocketManager.js 0000664 00000031015 15114741631 0021042 0 ustar 00 'use strict'; const EventEmitter = require('node:events'); const process = require('node:process'); const { setImmediate } = require('node:timers'); const { Collection } = require('@discordjs/collection'); const { WebSocketManager: WSWebSocketManager, WebSocketShardEvents: WSWebSocketShardEvents, CompressionMethod, CloseCodes, } = require('@discordjs/ws'); const { GatewayCloseCodes, GatewayDispatchEvents } = require('discord-api-types/v10'); const WebSocketShard = require('./WebSocketShard'); const PacketHandlers = require('./handlers'); const { DiscordjsError, ErrorCodes } = require('../../errors'); const Events = require('../../util/Events'); const Status = require('../../util/Status'); const WebSocketShardEvents = require('../../util/WebSocketShardEvents'); let zlib; try { zlib = require('zlib-sync'); } catch {} // eslint-disable-line no-empty const BeforeReadyWhitelist = [ GatewayDispatchEvents.Ready, GatewayDispatchEvents.Resumed, GatewayDispatchEvents.GuildCreate, GatewayDispatchEvents.GuildDelete, GatewayDispatchEvents.GuildMembersChunk, GatewayDispatchEvents.GuildMemberAdd, GatewayDispatchEvents.GuildMemberRemove, ]; const WaitingForGuildEvents = [GatewayDispatchEvents.GuildCreate, GatewayDispatchEvents.GuildDelete]; const UNRECOVERABLE_CLOSE_CODES = [ GatewayCloseCodes.AuthenticationFailed, GatewayCloseCodes.InvalidShard, GatewayCloseCodes.ShardingRequired, GatewayCloseCodes.InvalidAPIVersion, GatewayCloseCodes.InvalidIntents, GatewayCloseCodes.DisallowedIntents, ]; const reasonIsDeprecated = 'the reason property is deprecated, use the code property to determine the reason'; let deprecationEmittedForInvalidSessionEvent = false; let deprecationEmittedForDestroyedEvent = false; /** * The WebSocket manager for this client. * <info>This class forwards raw dispatch events, * read more about it here {@link https://discord.com/developers/docs/topics/gateway}</info> * @extends {EventEmitter} */ class WebSocketManager extends EventEmitter { constructor(client) { super(); /** * The client that instantiated this WebSocketManager * @type {Client} * @readonly * @name WebSocketManager#client */ Object.defineProperty(this, 'client', { value: client }); /** * The gateway this manager uses * @type {?string} */ this.gateway = null; /** * A collection of all shards this manager handles * @type {Collection<number, WebSocketShard>} */ this.shards = new Collection(); /** * An array of queued events before this WebSocketManager became ready * @type {Object[]} * @private * @name WebSocketManager#packetQueue */ Object.defineProperty(this, 'packetQueue', { value: [] }); /** * The current status of this WebSocketManager * @type {Status} */ this.status = Status.Idle; /** * If this manager was destroyed. It will prevent shards from reconnecting * @type {boolean} * @private */ this.destroyed = false; /** * The internal WebSocketManager from `@discordjs/ws`. * @type {WSWebSocketManager} * @private */ this._ws = null; } /** * The average ping of all WebSocketShards * @type {number} * @readonly */ get ping() { const sum = this.shards.reduce((a, b) => a + b.ping, 0); return sum / this.shards.size; } /** * Emits a debug message. * @param {string[]} messages The debug message * @param {?number} [shardId] The id of the shard that emitted this message, if any * @private */ debug(messages, shardId) { this.client.emit( Events.Debug, `[WS => ${typeof shardId === 'number' ? `Shard ${shardId}` : 'Manager'}] ${messages.join('\n\t')}`, ); } /** * Connects this manager to the gateway. * @private */ async connect() { const invalidToken = new DiscordjsError(ErrorCodes.TokenInvalid); const { shards, shardCount, intents, ws } = this.client.options; if (this._ws && this._ws.options.token !== this.client.token) { await this._ws.destroy({ code: CloseCodes.Normal, reason: 'Login with differing token requested' }); this._ws = null; } if (!this._ws) { const wsOptions = { intents: intents.bitfield, rest: this.client.rest, token: this.client.token, largeThreshold: ws.large_threshold, version: ws.version, shardIds: shards === 'auto' ? null : shards, shardCount: shards === 'auto' ? null : shardCount, initialPresence: ws.presence, retrieveSessionInfo: shardId => this.shards.get(shardId).sessionInfo, updateSessionInfo: (shardId, sessionInfo) => { this.shards.get(shardId).sessionInfo = sessionInfo; }, compression: zlib ? CompressionMethod.ZlibStream : null, }; if (ws.buildIdentifyThrottler) wsOptions.buildIdentifyThrottler = ws.buildIdentifyThrottler; if (ws.buildStrategy) wsOptions.buildStrategy = ws.buildStrategy; this._ws = new WSWebSocketManager(wsOptions); this.attachEvents(); } const { url: gatewayURL, shards: recommendedShards, session_start_limit: sessionStartLimit, } = await this._ws.fetchGatewayInformation().catch(error => { throw error.status === 401 ? invalidToken : error; }); const { total, remaining } = sessionStartLimit; this.debug(['Fetched Gateway Information', `URL: ${gatewayURL}`, `Recommended Shards: ${recommendedShards}`]); this.debug(['Session Limit Information', `Total: ${total}`, `Remaining: ${remaining}`]); this.gateway = `${gatewayURL}/`; this.client.options.shardCount = await this._ws.getShardCount(); this.client.options.shards = await this._ws.getShardIds(); this.totalShards = this.client.options.shards.length; for (const id of this.client.options.shards) { if (!this.shards.has(id)) { const shard = new WebSocketShard(this, id); this.shards.set(id, shard); shard.on(WebSocketShardEvents.AllReady, unavailableGuilds => { /** * Emitted when a shard turns ready. * @event Client#shardReady * @param {number} id The shard id that turned ready * @param {?Set<Snowflake>} unavailableGuilds Set of unavailable guild ids, if any */ this.client.emit(Events.ShardReady, shard.id, unavailableGuilds); this.checkShardsReady(); }); shard.status = Status.Connecting; } } await this._ws.connect(); this.shards.forEach(shard => { if (shard.listenerCount(WebSocketShardEvents.InvalidSession) > 0 && !deprecationEmittedForInvalidSessionEvent) { process.emitWarning( 'The WebSocketShard#invalidSession event is deprecated and will never emit.', 'DeprecationWarning', ); deprecationEmittedForInvalidSessionEvent = true; } if (shard.listenerCount(WebSocketShardEvents.Destroyed) > 0 && !deprecationEmittedForDestroyedEvent) { process.emitWarning( 'The WebSocketShard#destroyed event is deprecated and will never emit.', 'DeprecationWarning', ); deprecationEmittedForDestroyedEvent = true; } }); } /** * Attaches event handlers to the internal WebSocketShardManager from `@discordjs/ws`. * @private */ attachEvents() { this._ws.on(WSWebSocketShardEvents.Debug, ({ message, shardId }) => this.debug([message], shardId)); this._ws.on(WSWebSocketShardEvents.Dispatch, ({ data, shardId }) => { this.client.emit(Events.Raw, data, shardId); this.emit(data.t, data.d, shardId); const shard = this.shards.get(shardId); this.handlePacket(data, shard); if (shard.status === Status.WaitingForGuilds && WaitingForGuildEvents.includes(data.t)) { shard.gotGuild(data.d.id); } }); this._ws.on(WSWebSocketShardEvents.Ready, ({ data, shardId }) => { this.shards.get(shardId).onReadyPacket(data); }); this._ws.on(WSWebSocketShardEvents.Closed, ({ code, shardId }) => { const shard = this.shards.get(shardId); shard.emit(WebSocketShardEvents.Close, { code, reason: reasonIsDeprecated, wasClean: true }); if (UNRECOVERABLE_CLOSE_CODES.includes(code)) { shard.status = Status.Disconnected; /** * Emitted when a shard's WebSocket disconnects and will no longer reconnect. * @event Client#shardDisconnect * @param {CloseEvent} event The WebSocket close event * @param {number} id The shard id that disconnected */ this.client.emit(Events.ShardDisconnect, { code, reason: reasonIsDeprecated, wasClean: true }, shardId); this.debug([`Shard not recoverable: ${code} (${GatewayCloseCodes[code] ?? CloseCodes[code]})`], shardId); return; } this.shards.get(shardId).status = Status.Connecting; /** * Emitted when a shard is attempting to reconnect or re-identify. * @event Client#shardReconnecting * @param {number} id The shard id that is attempting to reconnect */ this.client.emit(Events.ShardReconnecting, shardId); }); this._ws.on(WSWebSocketShardEvents.Hello, ({ shardId }) => { const shard = this.shards.get(shardId); if (shard.sessionInfo) { shard.closeSequence = shard.sessionInfo.sequence; shard.status = Status.Resuming; } else { shard.status = Status.Identifying; } }); this._ws.on(WSWebSocketShardEvents.Resumed, ({ shardId }) => { const shard = this.shards.get(shardId); shard.status = Status.Ready; /** * Emitted when the shard resumes successfully * @event WebSocketShard#resumed */ shard.emit(WebSocketShardEvents.Resumed); }); this._ws.on(WSWebSocketShardEvents.HeartbeatComplete, ({ heartbeatAt, latency, shardId }) => { this.debug([`Heartbeat acknowledged, latency of ${latency}ms.`], shardId); const shard = this.shards.get(shardId); shard.lastPingTimestamp = heartbeatAt; shard.ping = latency; }); this._ws.on(WSWebSocketShardEvents.Error, ({ error, shardId }) => { /** * Emitted whenever a shard's WebSocket encounters a connection error. * @event Client#shardError * @param {Error} error The encountered error * @param {number} shardId The shard that encountered this error */ this.client.emit(Events.ShardError, error, shardId); }); } /** * Broadcasts a packet to every shard this manager handles. * @param {Object} packet The packet to send * @private */ broadcast(packet) { for (const shardId of this.shards.keys()) this._ws.send(shardId, packet); } /** * Destroys this manager and all its shards. * @private */ async destroy() { if (this.destroyed) return; // TODO: Make a util for getting a stack this.debug([Object.assign(new Error(), { name: 'Manager was destroyed:' }).stack]); this.destroyed = true; await this._ws?.destroy({ code: CloseCodes.Normal, reason: 'Manager was destroyed' }); } /** * Processes a packet and queues it if this WebSocketManager is not ready. * @param {Object} [packet] The packet to be handled * @param {WebSocketShard} [shard] The shard that will handle this packet * @returns {boolean} * @private */ handlePacket(packet, shard) { if (packet && this.status !== Status.Ready) { if (!BeforeReadyWhitelist.includes(packet.t)) { this.packetQueue.push({ packet, shard }); return false; } } if (this.packetQueue.length) { const item = this.packetQueue.shift(); setImmediate(() => { this.handlePacket(item.packet, item.shard); }).unref(); } if (packet && PacketHandlers[packet.t]) { PacketHandlers[packet.t](this.client, packet, shard); } return true; } /** * Checks whether the client is ready to be marked as ready. * @private */ checkShardsReady() { if (this.status === Status.Ready) return; if (this.shards.size !== this.totalShards || this.shards.some(shard => shard.status !== Status.Ready)) { return; } this.triggerClientReady(); } /** * Causes the client to be marked as ready and emits the ready event. * @private */ triggerClientReady() { this.status = Status.Ready; this.client.readyTimestamp = Date.now(); /** * Emitted when the client becomes ready to start working. * @event Client#ready * @param {Client} client The client */ this.client.emit(Events.ClientReady, this.client); this.handlePacket(); } } module.exports = WebSocketManager; node_modules/discord.js/src/client/websocket/handlers/INVITE_DELETE.js 0000664 00000000151 15114741631 0021476 0 ustar 00 'use strict'; module.exports = (client, packet) => { client.actions.InviteDelete.handle(packet.d); }; node_modules/discord.js/src/client/websocket/handlers/MESSAGE_CREATE.js 0000664 00000000152 15114741631 0021566 0 ustar 00 'use strict'; module.exports = (client, packet) => { client.actions.MessageCreate.handle(packet.d); }; node_modules/discord.js/src/client/websocket/handlers/VOICE_CHANNEL_EFFECT_SEND.js 0000664 00000001134 15114741631 0023302 0 ustar 00 'use strict'; const VoiceChannelEffect = require('../../../structures/VoiceChannelEffect'); const Events = require('../../../util/Events'); module.exports = (client, { d: data }) => { const guild = client.guilds.cache.get(data.guild_id); if (!guild) return; /** * Emitted when someone sends an effect, such as an emoji reaction, in a voice channel the client is connected to. * @event Client#voiceChannelEffectSend * @param {VoiceChannelEffect} voiceChannelEffect The sent voice channel effect */ client.emit(Events.VoiceChannelEffectSend, new VoiceChannelEffect(data, guild)); }; node_modules/discord.js/src/client/websocket/handlers/GUILD_MEMBERS_CHUNK.js 0000664 00000002702 15114741631 0022430 0 ustar 00 'use strict'; const { Collection } = require('@discordjs/collection'); const Events = require('../../../util/Events'); module.exports = (client, { d: data }) => { const guild = client.guilds.cache.get(data.guild_id); if (!guild) return; const members = new Collection(); for (const member of data.members) members.set(member.user.id, guild.members._add(member)); if (data.presences) { for (const presence of data.presences) guild.presences._add(Object.assign(presence, { guild })); } /** * Represents the properties of a guild members chunk * @typedef {Object} GuildMembersChunk * @property {number} index Index of the received chunk * @property {number} count Number of chunks the client should receive * @property {Array<*>} notFound An array of whatever could not be found * when using {@link GatewayOpcodes.RequestGuildMembers} * @property {?string} nonce Nonce for this chunk */ /** * Emitted whenever a chunk of guild members is received (all members come from the same guild). * @event Client#guildMembersChunk * @param {Collection<Snowflake, GuildMember>} members The members in the chunk * @param {Guild} guild The guild related to the member chunk * @param {GuildMembersChunk} chunk Properties of the received chunk */ client.emit(Events.GuildMembersChunk, members, guild, { index: data.chunk_index, count: data.chunk_count, notFound: data.not_found, nonce: data.nonce, }); }; node_modules/discord.js/src/client/websocket/handlers/INVITE_CREATE.js 0000664 00000000151 15114741631 0021477 0 ustar 00 'use strict'; module.exports = (client, packet) => { client.actions.InviteCreate.handle(packet.d); }; node_modules/discord.js/src/client/websocket/handlers/READY.js 0000664 00000001272 15114741631 0020327 0 ustar 00 'use strict'; const ClientApplication = require('../../../structures/ClientApplication'); let ClientUser; module.exports = (client, { d: data }, shard) => { if (client.user) { client.user._patch(data.user); } else { ClientUser ??= require('../../../structures/ClientUser'); client.user = new ClientUser(client, data.user); client.users.cache.set(client.user.id, client.user); } for (const guild of data.guilds) { guild.shardId = shard.id; client.guilds._add(guild); } if (client.application) { client.application._patch(data.application); } else { client.application = new ClientApplication(client, data.application); } shard.checkReady(); }; node_modules/discord.js/src/client/websocket/handlers/PRESENCE_UPDATE.js 0000664 00000000153 15114741631 0021726 0 ustar 00 'use strict'; module.exports = (client, packet) => { client.actions.PresenceUpdate.handle(packet.d); }; node_modules/discord.js/src/client/websocket/handlers/MESSAGE_REACTION_ADD.js 0000664 00000000157 15114741631 0022504 0 ustar 00 'use strict'; module.exports = (client, packet) => { client.actions.MessageReactionAdd.handle(packet.d); }; node_modules/discord.js/src/client/websocket/handlers/ENTITLEMENT_CREATE.js 0000664 00000000156 15114741631 0022276 0 ustar 00 'use strict'; module.exports = (client, packet) => { client.actions.EntitlementCreate.handle(packet.d); }; node_modules/discord.js/src/client/websocket/handlers/AUTO_MODERATION_ACTION_EXECUTION.js 0000664 00000000172 15114741631 0024432 0 ustar 00 'use strict'; module.exports = (client, packet) => { client.actions.AutoModerationActionExecution.handle(packet.d); }; node_modules/discord.js/src/client/websocket/handlers/GUILD_SOUNDBOARD_SOUND_UPDATE.js 0000664 00000001414 15114741631 0024057 0 ustar 00 'use strict'; const Events = require('../../../util/Events.js'); module.exports = (client, { d: data }) => { const guild = client.guilds.cache.get(data.guild_id); if (!guild) return; const oldGuildSoundboardSound = guild.soundboardSounds.cache.get(data.sound_id)?._clone() ?? null; const newGuildSoundboardSound = guild.soundboardSounds._add(data); /** * Emitted whenever a guild soundboard sound is updated. * @event Client#guildSoundboardSoundUpdate * @param {?SoundboardSound} oldGuildSoundboardSound The guild soundboard sound before the update * @param {SoundboardSound} newGuildSoundboardSound The guild soundboard sound after the update */ client.emit(Events.GuildSoundboardSoundUpdate, oldGuildSoundboardSound, newGuildSoundboardSound); }; node_modules/discord.js/src/client/websocket/handlers/AUTO_MODERATION_RULE_CREATE.js 0000664 00000000165 15114741631 0023626 0 ustar 00 'use strict'; module.exports = (client, packet) => { client.actions.AutoModerationRuleCreate.handle(packet.d); }; node_modules/discord.js/src/client/websocket/handlers/RESUMED.js 0000664 00000000674 15114741631 0020574 0 ustar 00 'use strict'; const Events = require('../../../util/Events'); module.exports = (client, packet, shard) => { const replayed = shard.sessionInfo.sequence - shard.closeSequence; /** * Emitted when a shard resumes successfully. * @event Client#shardResume * @param {number} id The shard id that resumed * @param {number} replayedEvents The amount of replayed events */ client.emit(Events.ShardResume, shard.id, replayed); }; node_modules/discord.js/src/client/websocket/handlers/ENTITLEMENT_DELETE.js 0000664 00000000156 15114741631 0022275 0 ustar 00 'use strict'; module.exports = (client, packet) => { client.actions.EntitlementDelete.handle(packet.d); }; node_modules/discord.js/src/client/websocket/handlers/GUILD_AUDIT_LOG_ENTRY_CREATE.js 0000664 00000000165 15114741631 0023762 0 ustar 00 'use strict'; module.exports = (client, packet) => { client.actions.GuildAuditLogEntryCreate.handle(packet.d); }; node_modules/discord.js/src/client/websocket/handlers/MESSAGE_DELETE.js 0000664 00000000152 15114741631 0021565 0 ustar 00 'use strict'; module.exports = (client, packet) => { client.actions.MessageDelete.handle(packet.d); }; node_modules/discord.js/src/client/websocket/handlers/THREAD_UPDATE.js 0000664 00000001052 15114741631 0021470 0 ustar 00 'use strict'; const Events = require('../../../util/Events'); module.exports = (client, packet) => { const { old, updated } = client.actions.ChannelUpdate.handle(packet.d); if (old && updated) { /** * Emitted whenever a thread is updated - e.g. name change, archive state change, locked state change. * @event Client#threadUpdate * @param {ThreadChannel} oldThread The thread before the update * @param {ThreadChannel} newThread The thread after the update */ client.emit(Events.ThreadUpdate, old, updated); } }; node_modules/discord.js/src/client/websocket/handlers/WEBHOOKS_UPDATE.js 0000664 00000000153 15114741631 0021743 0 ustar 00 'use strict'; module.exports = (client, packet) => { client.actions.WebhooksUpdate.handle(packet.d); }; node_modules/discord.js/src/client/websocket/handlers/ENTITLEMENT_UPDATE.js 0000664 00000000156 15114741631 0022315 0 ustar 00 'use strict'; module.exports = (client, packet) => { client.actions.EntitlementUpdate.handle(packet.d); }; node_modules/discord.js/src/client/websocket/handlers/GUILD_SCHEDULED_EVENT_CREATE.js 0000664 00000000166 15114741631 0023674 0 ustar 00 'use strict'; module.exports = (client, packet) => { client.actions.GuildScheduledEventCreate.handle(packet.d); }; node_modules/discord.js/src/client/websocket/handlers/APPLICATION_COMMAND_PERMISSIONS_UPDATE.js 0000664 00000000200 15114741631 0025307 0 ustar 00 'use strict'; module.exports = (client, packet) => { client.actions.ApplicationCommandPermissionsUpdate.handle(packet.d); }; node_modules/discord.js/src/client/websocket/handlers/STAGE_INSTANCE_UPDATE.js 0000664 00000000160 15114741631 0022647 0 ustar 00 'use strict'; module.exports = (client, packet) => { client.actions.StageInstanceUpdate.handle(packet.d); }; node_modules/discord.js/src/client/websocket/handlers/VOICE_STATE_UPDATE.js 0000664 00000000155 15114741631 0022331 0 ustar 00 'use strict'; module.exports = (client, packet) => { client.actions.VoiceStateUpdate.handle(packet.d); }; node_modules/discord.js/src/client/websocket/handlers/TYPING_START.js 0000664 00000000150 15114741631 0021444 0 ustar 00 'use strict'; module.exports = (client, packet) => { client.actions.TypingStart.handle(packet.d); }; node_modules/discord.js/src/client/websocket/handlers/THREAD_DELETE.js 0000664 00000000151 15114741631 0021447 0 ustar 00 'use strict'; module.exports = (client, packet) => { client.actions.ThreadDelete.handle(packet.d); }; node_modules/discord.js/src/client/websocket/handlers/AUTO_MODERATION_RULE_DELETE.js 0000664 00000000165 15114741631 0023625 0 ustar 00 'use strict'; module.exports = (client, packet) => { client.actions.AutoModerationRuleDelete.handle(packet.d); }; node_modules/discord.js/src/client/websocket/handlers/GUILD_BAN_REMOVE.js 0000664 00000000153 15114741631 0022061 0 ustar 00 'use strict'; module.exports = (client, packet) => { client.actions.GuildBanRemove.handle(packet.d); }; node_modules/discord.js/src/client/websocket/handlers/THREAD_MEMBER_UPDATE.js 0000664 00000000157 15114741631 0022524 0 ustar 00 'use strict'; module.exports = (client, packet) => { client.actions.ThreadMemberUpdate.handle(packet.d); }; node_modules/discord.js/src/client/websocket/handlers/SUBSCRIPTION_DELETE.js 0000664 00000000743 15114741631 0022433 0 ustar 00 'use strict'; const Events = require('../../../util/Events'); module.exports = (client, { d: data }) => { const subscription = client.application.subscriptions._add(data, false); client.application.subscriptions.cache.delete(subscription.id); /** * Emitted whenever a subscription is deleted. * @event Client#subscriptionDelete * @param {Subscription} subscription The subscription that was deleted */ client.emit(Events.SubscriptionDelete, subscription); }; node_modules/discord.js/src/client/websocket/handlers/AUTO_MODERATION_RULE_UPDATE.js 0000664 00000000165 15114741631 0023645 0 ustar 00 'use strict'; module.exports = (client, packet) => { client.actions.AutoModerationRuleUpdate.handle(packet.d); }; node_modules/discord.js/src/client/websocket/handlers/GUILD_MEMBER_UPDATE.js 0000664 00000000174 15114741631 0022420 0 ustar 00 'use strict'; module.exports = (client, packet, shard) => { client.actions.GuildMemberUpdate.handle(packet.d, shard); }; node_modules/discord.js/src/client/websocket/handlers/CHANNEL_CREATE.js 0000664 00000000152 15114741631 0021552 0 ustar 00 'use strict'; module.exports = (client, packet) => { client.actions.ChannelCreate.handle(packet.d); }; node_modules/discord.js/src/client/websocket/handlers/GUILD_EMOJIS_UPDATE.js 0000664 00000000156 15114741631 0022437 0 ustar 00 'use strict'; module.exports = (client, packet) => { client.actions.GuildEmojisUpdate.handle(packet.d); }; node_modules/discord.js/src/client/websocket/handlers/MESSAGE_REACTION_REMOVE_ALL.js 0000664 00000000165 15114741631 0023600 0 ustar 00 'use strict'; module.exports = (client, packet) => { client.actions.MessageReactionRemoveAll.handle(packet.d); }; node_modules/discord.js/src/client/websocket/handlers/GUILD_SCHEDULED_EVENT_USER_ADD.js 0000664 00000000167 15114741631 0024160 0 ustar 00 'use strict'; module.exports = (client, packet) => { client.actions.GuildScheduledEventUserAdd.handle(packet.d); }; node_modules/discord.js/src/client/websocket/handlers/GUILD_UPDATE.js 0000664 00000000150 15114741631 0021363 0 ustar 00 'use strict'; module.exports = (client, packet) => { client.actions.GuildUpdate.handle(packet.d); }; node_modules/discord.js/src/client/websocket/handlers/SUBSCRIPTION_UPDATE.js 0000664 00000001214 15114741631 0022445 0 ustar 00 'use strict'; const Events = require('../../../util/Events'); module.exports = (client, { d: data }) => { const oldSubscription = client.application.subscriptions.cache.get(data.id)?._clone() ?? null; const newSubscription = client.application.subscriptions._add(data); /** * Emitted whenever a subscription is updated - i.e. when a user's subscription renews. * @event Client#subscriptionUpdate * @param {?Subscription} oldSubscription The subscription before the update * @param {Subscription} newSubscription The subscription after the update */ client.emit(Events.SubscriptionUpdate, oldSubscription, newSubscription); }; node_modules/discord.js/src/client/websocket/handlers/GUILD_ROLE_UPDATE.js 0000664 00000000154 15114741631 0022210 0 ustar 00 'use strict'; module.exports = (client, packet) => { client.actions.GuildRoleUpdate.handle(packet.d); }; node_modules/discord.js/src/client/websocket/handlers/THREAD_CREATE.js 0000664 00000000151 15114741631 0021450 0 ustar 00 'use strict'; module.exports = (client, packet) => { client.actions.ThreadCreate.handle(packet.d); }; node_modules/discord.js/src/client/websocket/handlers/GUILD_SOUNDBOARD_SOUND_DELETE.js 0000664 00000000170 15114741631 0024035 0 ustar 00 'use strict'; module.exports = (client, { d: data }) => { client.actions.GuildSoundboardSoundDelete.handle(data); }; node_modules/discord.js/src/client/websocket/handlers/MESSAGE_REACTION_REMOVE_EMOJI.js 0000664 00000000167 15114741631 0024035 0 ustar 00 'use strict'; module.exports = (client, packet) => { client.actions.MessageReactionRemoveEmoji.handle(packet.d); }; node_modules/discord.js/src/client/websocket/handlers/SOUNDBOARD_SOUNDS.js 0000664 00000001504 15114741631 0022214 0 ustar 00 'use strict'; const { Collection } = require('@discordjs/collection'); const Events = require('../../../util/Events.js'); module.exports = (client, { d: data }) => { const guild = client.guilds.cache.get(data.guild_id); if (!guild) return; const soundboardSounds = new Collection(); for (const soundboardSound of data.soundboard_sounds) { soundboardSounds.set(soundboardSound.sound_id, guild.soundboardSounds._add(soundboardSound)); } /** * Emitted whenever soundboard sounds are received (all soundboard sounds come from the same guild). * @event Client#soundboardSounds * @param {Collection<Snowflake, SoundboardSound>} soundboardSounds The sounds received * @param {Guild} guild The guild that the soundboard sounds are from */ client.emit(Events.SoundboardSounds, soundboardSounds, guild); }; node_modules/discord.js/src/client/websocket/handlers/GUILD_BAN_ADD.js 0000664 00000000150 15114741631 0021451 0 ustar 00 'use strict'; module.exports = (client, packet) => { client.actions.GuildBanAdd.handle(packet.d); }; node_modules/discord.js/src/client/websocket/handlers/MESSAGE_POLL_VOTE_REMOVE.js 0000664 00000000162 15114741631 0023304 0 ustar 00 'use strict'; module.exports = (client, packet) => { client.actions.MessagePollVoteRemove.handle(packet.d); }; node_modules/discord.js/src/client/websocket/handlers/GUILD_INTEGRATIONS_UPDATE.js 0000664 00000000164 15114741631 0023356 0 ustar 00 'use strict'; module.exports = (client, packet) => { client.actions.GuildIntegrationsUpdate.handle(packet.d); }; node_modules/discord.js/src/client/websocket/handlers/THREAD_LIST_SYNC.js 0000664 00000000153 15114741631 0022116 0 ustar 00 'use strict'; module.exports = (client, packet) => { client.actions.ThreadListSync.handle(packet.d); }; node_modules/discord.js/src/client/websocket/handlers/GUILD_SCHEDULED_EVENT_DELETE.js 0000664 00000000166 15114741631 0023673 0 ustar 00 'use strict'; module.exports = (client, packet) => { client.actions.GuildScheduledEventDelete.handle(packet.d); }; node_modules/discord.js/src/client/websocket/handlers/GUILD_MEMBER_REMOVE.js 0000664 00000000174 15114741631 0022433 0 ustar 00 'use strict'; module.exports = (client, packet, shard) => { client.actions.GuildMemberRemove.handle(packet.d, shard); }; node_modules/discord.js/src/client/websocket/handlers/MESSAGE_REACTION_REMOVE.js 0000664 00000000162 15114741631 0023105 0 ustar 00 'use strict'; module.exports = (client, packet) => { client.actions.MessageReactionRemove.handle(packet.d); }; node_modules/discord.js/src/client/websocket/handlers/index.js 0000664 00000010766 15114741631 0020602 0 ustar 00 'use strict'; const handlers = Object.fromEntries([ ['APPLICATION_COMMAND_PERMISSIONS_UPDATE', require('./APPLICATION_COMMAND_PERMISSIONS_UPDATE')], ['AUTO_MODERATION_ACTION_EXECUTION', require('./AUTO_MODERATION_ACTION_EXECUTION')], ['AUTO_MODERATION_RULE_CREATE', require('./AUTO_MODERATION_RULE_CREATE')], ['AUTO_MODERATION_RULE_DELETE', require('./AUTO_MODERATION_RULE_DELETE')], ['AUTO_MODERATION_RULE_UPDATE', require('./AUTO_MODERATION_RULE_UPDATE')], ['CHANNEL_CREATE', require('./CHANNEL_CREATE')], ['CHANNEL_DELETE', require('./CHANNEL_DELETE')], ['CHANNEL_PINS_UPDATE', require('./CHANNEL_PINS_UPDATE')], ['CHANNEL_UPDATE', require('./CHANNEL_UPDATE')], ['ENTITLEMENT_CREATE', require('./ENTITLEMENT_CREATE')], ['ENTITLEMENT_DELETE', require('./ENTITLEMENT_DELETE')], ['ENTITLEMENT_UPDATE', require('./ENTITLEMENT_UPDATE')], ['GUILD_AUDIT_LOG_ENTRY_CREATE', require('./GUILD_AUDIT_LOG_ENTRY_CREATE')], ['GUILD_BAN_ADD', require('./GUILD_BAN_ADD')], ['GUILD_BAN_REMOVE', require('./GUILD_BAN_REMOVE')], ['GUILD_CREATE', require('./GUILD_CREATE')], ['GUILD_DELETE', require('./GUILD_DELETE')], ['GUILD_EMOJIS_UPDATE', require('./GUILD_EMOJIS_UPDATE')], ['GUILD_INTEGRATIONS_UPDATE', require('./GUILD_INTEGRATIONS_UPDATE')], ['GUILD_MEMBERS_CHUNK', require('./GUILD_MEMBERS_CHUNK')], ['GUILD_MEMBER_ADD', require('./GUILD_MEMBER_ADD')], ['GUILD_MEMBER_REMOVE', require('./GUILD_MEMBER_REMOVE')], ['GUILD_MEMBER_UPDATE', require('./GUILD_MEMBER_UPDATE')], ['GUILD_ROLE_CREATE', require('./GUILD_ROLE_CREATE')], ['GUILD_ROLE_DELETE', require('./GUILD_ROLE_DELETE')], ['GUILD_ROLE_UPDATE', require('./GUILD_ROLE_UPDATE')], ['GUILD_SCHEDULED_EVENT_CREATE', require('./GUILD_SCHEDULED_EVENT_CREATE')], ['GUILD_SCHEDULED_EVENT_DELETE', require('./GUILD_SCHEDULED_EVENT_DELETE')], ['GUILD_SCHEDULED_EVENT_UPDATE', require('./GUILD_SCHEDULED_EVENT_UPDATE')], ['GUILD_SCHEDULED_EVENT_USER_ADD', require('./GUILD_SCHEDULED_EVENT_USER_ADD')], ['GUILD_SCHEDULED_EVENT_USER_REMOVE', require('./GUILD_SCHEDULED_EVENT_USER_REMOVE')], ['GUILD_SOUNDBOARD_SOUNDS_UPDATE', require('./GUILD_SOUNDBOARD_SOUNDS_UPDATE.js')], ['GUILD_SOUNDBOARD_SOUND_CREATE', require('./GUILD_SOUNDBOARD_SOUND_CREATE.js')], ['GUILD_SOUNDBOARD_SOUND_DELETE', require('./GUILD_SOUNDBOARD_SOUND_DELETE.js')], ['GUILD_SOUNDBOARD_SOUND_UPDATE', require('./GUILD_SOUNDBOARD_SOUND_UPDATE.js')], ['GUILD_STICKERS_UPDATE', require('./GUILD_STICKERS_UPDATE')], ['GUILD_UPDATE', require('./GUILD_UPDATE')], ['INTERACTION_CREATE', require('./INTERACTION_CREATE')], ['INVITE_CREATE', require('./INVITE_CREATE')], ['INVITE_DELETE', require('./INVITE_DELETE')], ['MESSAGE_CREATE', require('./MESSAGE_CREATE')], ['MESSAGE_DELETE', require('./MESSAGE_DELETE')], ['MESSAGE_DELETE_BULK', require('./MESSAGE_DELETE_BULK')], ['MESSAGE_POLL_VOTE_ADD', require('./MESSAGE_POLL_VOTE_ADD')], ['MESSAGE_POLL_VOTE_REMOVE', require('./MESSAGE_POLL_VOTE_REMOVE')], ['MESSAGE_REACTION_ADD', require('./MESSAGE_REACTION_ADD')], ['MESSAGE_REACTION_REMOVE', require('./MESSAGE_REACTION_REMOVE')], ['MESSAGE_REACTION_REMOVE_ALL', require('./MESSAGE_REACTION_REMOVE_ALL')], ['MESSAGE_REACTION_REMOVE_EMOJI', require('./MESSAGE_REACTION_REMOVE_EMOJI')], ['MESSAGE_UPDATE', require('./MESSAGE_UPDATE')], ['PRESENCE_UPDATE', require('./PRESENCE_UPDATE')], ['READY', require('./READY')], ['RESUMED', require('./RESUMED')], ['SOUNDBOARD_SOUNDS', require('./SOUNDBOARD_SOUNDS.js')], ['STAGE_INSTANCE_CREATE', require('./STAGE_INSTANCE_CREATE')], ['STAGE_INSTANCE_DELETE', require('./STAGE_INSTANCE_DELETE')], ['STAGE_INSTANCE_UPDATE', require('./STAGE_INSTANCE_UPDATE')], ['SUBSCRIPTION_CREATE', require('./SUBSCRIPTION_CREATE')], ['SUBSCRIPTION_DELETE', require('./SUBSCRIPTION_DELETE')], ['SUBSCRIPTION_UPDATE', require('./SUBSCRIPTION_UPDATE')], ['THREAD_CREATE', require('./THREAD_CREATE')], ['THREAD_DELETE', require('./THREAD_DELETE')], ['THREAD_LIST_SYNC', require('./THREAD_LIST_SYNC')], ['THREAD_MEMBERS_UPDATE', require('./THREAD_MEMBERS_UPDATE')], ['THREAD_MEMBER_UPDATE', require('./THREAD_MEMBER_UPDATE')], ['THREAD_UPDATE', require('./THREAD_UPDATE')], ['TYPING_START', require('./TYPING_START')], ['USER_UPDATE', require('./USER_UPDATE')], ['VOICE_CHANNEL_EFFECT_SEND', require('./VOICE_CHANNEL_EFFECT_SEND')], ['VOICE_SERVER_UPDATE', require('./VOICE_SERVER_UPDATE')], ['VOICE_STATE_UPDATE', require('./VOICE_STATE_UPDATE')], ['WEBHOOKS_UPDATE', require('./WEBHOOKS_UPDATE')], ]); module.exports = handlers; node_modules/discord.js/src/client/websocket/handlers/GUILD_ROLE_DELETE.js 0000664 00000000154 15114741631 0022170 0 ustar 00 'use strict'; module.exports = (client, packet) => { client.actions.GuildRoleDelete.handle(packet.d); }; node_modules/discord.js/src/client/websocket/handlers/THREAD_MEMBERS_UPDATE.js 0000664 00000000160 15114741631 0022641 0 ustar 00 'use strict'; module.exports = (client, packet) => { client.actions.ThreadMembersUpdate.handle(packet.d); }; node_modules/discord.js/src/client/websocket/handlers/STAGE_INSTANCE_CREATE.js 0000664 00000000160 15114741631 0022630 0 ustar 00 'use strict'; module.exports = (client, packet) => { client.actions.StageInstanceCreate.handle(packet.d); }; node_modules/discord.js/src/client/websocket/handlers/USER_UPDATE.js 0000664 00000000147 15114741631 0021303 0 ustar 00 'use strict'; module.exports = (client, packet) => { client.actions.UserUpdate.handle(packet.d); }; node_modules/discord.js/src/client/websocket/handlers/GUILD_CREATE.js 0000664 00000001627 15114741631 0021356 0 ustar 00 'use strict'; const Events = require('../../../util/Events'); const Status = require('../../../util/Status'); module.exports = (client, { d: data }, shard) => { let guild = client.guilds.cache.get(data.id); if (guild) { if (!guild.available && !data.unavailable) { // A newly available guild guild._patch(data); /** * Emitted whenever a guild becomes available. * @event Client#guildAvailable * @param {Guild} guild The guild that became available */ client.emit(Events.GuildAvailable, guild); } } else { // A new guild data.shardId = shard.id; guild = client.guilds._add(data); if (client.ws.status === Status.Ready) { /** * Emitted whenever the client joins a guild. * @event Client#guildCreate * @param {Guild} guild The created guild */ client.emit(Events.GuildCreate, guild); } } }; node_modules/discord.js/src/client/websocket/handlers/GUILD_STICKERS_UPDATE.js 0000664 00000000160 15114741631 0022673 0 ustar 00 'use strict'; module.exports = (client, packet) => { client.actions.GuildStickersUpdate.handle(packet.d); }; node_modules/discord.js/src/client/websocket/handlers/CHANNEL_UPDATE.js 0000664 00000001073 15114741631 0021574 0 ustar 00 'use strict'; const Events = require('../../../util/Events'); module.exports = (client, packet) => { const { old, updated } = client.actions.ChannelUpdate.handle(packet.d); if (old && updated) { /** * Emitted whenever a channel is updated - e.g. name change, topic change, channel type change. * @event Client#channelUpdate * @param {DMChannel|GuildChannel} oldChannel The channel before the update * @param {DMChannel|GuildChannel} newChannel The channel after the update */ client.emit(Events.ChannelUpdate, old, updated); } }; node_modules/discord.js/src/client/websocket/handlers/CHANNEL_DELETE.js 0000664 00000000152 15114741631 0021551 0 ustar 00 'use strict'; module.exports = (client, packet) => { client.actions.ChannelDelete.handle(packet.d); }; node_modules/discord.js/src/client/websocket/handlers/MESSAGE_DELETE_BULK.js 0000664 00000000156 15114741631 0022406 0 ustar 00 'use strict'; module.exports = (client, packet) => { client.actions.MessageDeleteBulk.handle(packet.d); }; node_modules/discord.js/src/client/websocket/handlers/SUBSCRIPTION_CREATE.js 0000664 00000000631 15114741631 0022430 0 ustar 00 'use strict'; const Events = require('../../../util/Events'); module.exports = (client, { d: data }) => { const subscription = client.application.subscriptions._add(data); /** * Emitted whenever a subscription is created. * @event Client#subscriptionCreate * @param {Subscription} subscription The subscription that was created */ client.emit(Events.SubscriptionCreate, subscription); }; node_modules/discord.js/src/client/websocket/handlers/GUILD_DELETE.js 0000664 00000000150 15114741631 0021343 0 ustar 00 'use strict'; module.exports = (client, packet) => { client.actions.GuildDelete.handle(packet.d); }; node_modules/discord.js/src/client/websocket/handlers/VOICE_SERVER_UPDATE.js 0000664 00000000265 15114741631 0022461 0 ustar 00 'use strict'; module.exports = (client, packet) => { client.emit('debug', `[VOICE] received voice server: ${JSON.stringify(packet)}`); client.voice.onVoiceServer(packet.d); }; node_modules/discord.js/src/client/websocket/handlers/GUILD_SCHEDULED_EVENT_USER_REMOVE.js 0000664 00000000172 15114741631 0024561 0 ustar 00 'use strict'; module.exports = (client, packet) => { client.actions.GuildScheduledEventUserRemove.handle(packet.d); }; node_modules/discord.js/src/client/websocket/handlers/STAGE_INSTANCE_DELETE.js 0000664 00000000160 15114741631 0022627 0 ustar 00 'use strict'; module.exports = (client, packet) => { client.actions.StageInstanceDelete.handle(packet.d); }; node_modules/discord.js/src/client/websocket/handlers/MESSAGE_UPDATE.js 0000664 00000001006 15114741631 0021604 0 ustar 00 'use strict'; const Events = require('../../../util/Events'); module.exports = (client, packet) => { const { old, updated } = client.actions.MessageUpdate.handle(packet.d); if (old && updated) { /** * Emitted whenever a message is updated - e.g. embed or content change. * @event Client#messageUpdate * @param {Message} oldMessage The message before the update * @param {Message} newMessage The message after the update */ client.emit(Events.MessageUpdate, old, updated); } }; node_modules/discord.js/src/client/websocket/handlers/GUILD_SCHEDULED_EVENT_UPDATE.js 0000664 00000000166 15114741631 0023713 0 ustar 00 'use strict'; module.exports = (client, packet) => { client.actions.GuildScheduledEventUpdate.handle(packet.d); }; node_modules/discord.js/src/client/websocket/handlers/MESSAGE_POLL_VOTE_ADD.js 0000664 00000000157 15114741631 0022703 0 ustar 00 'use strict'; module.exports = (client, packet) => { client.actions.MessagePollVoteAdd.handle(packet.d); }; node_modules/discord.js/src/client/websocket/handlers/GUILD_SOUNDBOARD_SOUND_CREATE.js 0000664 00000001011 15114741631 0024031 0 ustar 00 'use strict'; const Events = require('../../../util/Events.js'); module.exports = (client, { d: data }) => { const guild = client.guilds.cache.get(data.guild_id); if (!guild) return; const soundboardSound = guild.soundboardSounds._add(data); /** * Emitted whenever a guild soundboard sound is created. * @event Client#guildSoundboardSoundCreate * @param {SoundboardSound} soundboardSound The created guild soundboard sound */ client.emit(Events.GuildSoundboardSoundCreate, soundboardSound); }; node_modules/discord.js/src/client/websocket/handlers/GUILD_SOUNDBOARD_SOUNDS_UPDATE.js 0000664 00000001501 15114741631 0024177 0 ustar 00 'use strict'; const { Collection } = require('@discordjs/collection'); const Events = require('../../../util/Events.js'); module.exports = (client, { d: data }) => { const guild = client.guilds.cache.get(data.guild_id); if (!guild) return; const soundboardSounds = new Collection(); for (const soundboardSound of data.soundboard_sounds) { soundboardSounds.set(soundboardSound.sound_id, guild.soundboardSounds._add(soundboardSound)); } /** * Emitted whenever multiple guild soundboard sounds are updated. * @event Client#guildSoundboardSoundsUpdate * @param {Collection<Snowflake, SoundboardSound>} soundboardSounds The updated soundboard sounds * @param {Guild} guild The guild that the soundboard sounds are from */ client.emit(Events.GuildSoundboardSoundsUpdate, soundboardSounds, guild); }; node_modules/discord.js/src/client/websocket/handlers/CHANNEL_PINS_UPDATE.js 0000664 00000001541 15114741631 0022425 0 ustar 00 'use strict'; const Events = require('../../../util/Events'); module.exports = (client, { d: data }) => { const channel = client.channels.cache.get(data.channel_id); const time = data.last_pin_timestamp ? Date.parse(data.last_pin_timestamp) : null; if (channel) { // Discord sends null for last_pin_timestamp if the last pinned message was removed channel.lastPinTimestamp = time; /** * Emitted whenever the pins of a channel are updated. Due to the nature of the WebSocket event, * not much information can be provided easily here - you need to manually check the pins yourself. * @event Client#channelPinsUpdate * @param {TextBasedChannels} channel The channel that the pins update occurred in * @param {Date} time The time of the pins update */ client.emit(Events.ChannelPinsUpdate, channel, time); } }; node_modules/discord.js/src/client/websocket/handlers/GUILD_MEMBER_ADD.js 0000664 00000001112 15114741631 0022017 0 ustar 00 'use strict'; const Events = require('../../../util/Events'); const Status = require('../../../util/Status'); module.exports = (client, { d: data }, shard) => { const guild = client.guilds.cache.get(data.guild_id); if (guild) { guild.memberCount++; const member = guild.members._add(data); if (shard.status === Status.Ready) { /** * Emitted whenever a user joins a guild. * @event Client#guildMemberAdd * @param {GuildMember} member The member that has joined a guild */ client.emit(Events.GuildMemberAdd, member); } } }; node_modules/discord.js/src/client/websocket/handlers/INTERACTION_CREATE.js 0000664 00000000156 15114741631 0022265 0 ustar 00 'use strict'; module.exports = (client, packet) => { client.actions.InteractionCreate.handle(packet.d); }; node_modules/discord.js/src/client/websocket/handlers/GUILD_ROLE_CREATE.js 0000664 00000000154 15114741631 0022171 0 ustar 00 'use strict'; module.exports = (client, packet) => { client.actions.GuildRoleCreate.handle(packet.d); }; node_modules/discord.js/src/client/voice/ClientVoiceManager.js 0000664 00000002171 15114741631 0020500 0 ustar 00 'use strict'; const Events = require('../../util/Events'); /** * Manages voice connections for the client */ class ClientVoiceManager { constructor(client) { /** * The client that instantiated this voice manager * @type {Client} * @readonly * @name ClientVoiceManager#client */ Object.defineProperty(this, 'client', { value: client }); /** * Maps guild ids to voice adapters created for use with `@discordjs/voice`. * @type {Map<Snowflake, Object>} */ this.adapters = new Map(); client.on(Events.ShardDisconnect, (_, shardId) => { for (const [guildId, adapter] of this.adapters.entries()) { if (client.guilds.cache.get(guildId)?.shardId === shardId) { adapter.destroy(); } } }); } onVoiceServer(payload) { this.adapters.get(payload.guild_id)?.onVoiceServerUpdate(payload); } onVoiceStateUpdate(payload) { if (payload.guild_id && payload.session_id && payload.user_id === this.client.user?.id) { this.adapters.get(payload.guild_id)?.onVoiceStateUpdate(payload); } } } module.exports = ClientVoiceManager; node_modules/discord.js/src/client/BaseClient.js 0000664 00000005652 15114741631 0015714 0 ustar 00 'use strict'; const EventEmitter = require('node:events'); const { REST } = require('@discordjs/rest'); const { Routes } = require('discord-api-types/v10'); const { DiscordjsTypeError, ErrorCodes } = require('../errors'); const Options = require('../util/Options'); const { flatten } = require('../util/Util'); /** * The base class for all clients. * @extends {EventEmitter} */ class BaseClient extends EventEmitter { constructor(options = {}) { super({ captureRejections: true }); if (typeof options !== 'object' || options === null) { throw new DiscordjsTypeError(ErrorCodes.InvalidType, 'options', 'object', true); } const defaultOptions = Options.createDefault(); /** * The options the client was instantiated with * @type {ClientOptions} */ this.options = { ...defaultOptions, ...options, presence: { ...defaultOptions.presence, ...options.presence, }, sweepers: { ...defaultOptions.sweepers, ...options.sweepers, }, ws: { ...defaultOptions.ws, ...options.ws, }, rest: { ...defaultOptions.rest, ...options.rest, userAgentAppendix: options.rest?.userAgentAppendix ? `${Options.userAgentAppendix} ${options.rest.userAgentAppendix}` : Options.userAgentAppendix, }, }; /** * The REST manager of the client * @type {REST} */ this.rest = new REST(this.options.rest); } /** * Destroys all assets used by the base client. * @returns {void} */ destroy() { this.rest.clearHashSweeper(); this.rest.clearHandlerSweeper(); } /** * Options used for deleting a webhook. * @typedef {Object} WebhookDeleteOptions * @property {string} [token] Token of the webhook * @property {string} [reason] The reason for deleting the webhook */ /** * Deletes a webhook. * @param {Snowflake} id The webhook's id * @param {WebhookDeleteOptions} [options] Options for deleting the webhook * @returns {Promise<void>} */ async deleteWebhook(id, { token, reason } = {}) { await this.rest.delete(Routes.webhook(id, token), { auth: !token, reason }); } /** * Increments max listeners by one, if they are not zero. * @private */ incrementMaxListeners() { const maxListeners = this.getMaxListeners(); if (maxListeners !== 0) { this.setMaxListeners(maxListeners + 1); } } /** * Decrements max listeners by one, if they are not zero. * @private */ decrementMaxListeners() { const maxListeners = this.getMaxListeners(); if (maxListeners !== 0) { this.setMaxListeners(maxListeners - 1); } } toJSON(...props) { return flatten(this, ...props); } async [Symbol.asyncDispose]() { await this.destroy(); } } module.exports = BaseClient; /** * @external REST * @see {@link https://discord.js.org/docs/packages/rest/stable/REST:Class} */ node_modules/discord.js/src/sharding/ShardingManager.js 0000664 00000031573 15114741631 0017257 0 ustar 00 'use strict'; const EventEmitter = require('node:events'); const fs = require('node:fs'); const path = require('node:path'); const process = require('node:process'); const { setTimeout: sleep } = require('node:timers/promises'); const { Collection } = require('@discordjs/collection'); const Shard = require('./Shard'); const { DiscordjsError, DiscordjsTypeError, DiscordjsRangeError, ErrorCodes } = require('../errors'); const { fetchRecommendedShardCount } = require('../util/Util'); /** * This is a utility class that makes multi-process sharding of a bot an easy and painless experience. * It works by spawning a self-contained {@link ChildProcess} or {@link Worker} for each individual shard, each * containing its own instance of your bot's {@link Client}. They all have a line of communication with the master * process, and there are several useful methods that utilize it in order to simplify tasks that are normally difficult * with sharding. It can spawn a specific number of shards or the amount that Discord suggests for the bot, and takes a * path to your main bot script to launch for each one. * @extends {EventEmitter} */ class ShardingManager extends EventEmitter { /** * The mode to spawn shards with for a {@link ShardingManager}. Can be either one of: * * 'process' to use child processes * * 'worker' to use {@link Worker} threads * @typedef {string} ShardingManagerMode */ /** * The options to spawn shards with for a {@link ShardingManager}. * @typedef {Object} ShardingManagerOptions * @property {string|number} [totalShards='auto'] Number of total shards of all shard managers or "auto" * @property {string|number[]} [shardList='auto'] List of shards to spawn or "auto" * @property {ShardingManagerMode} [mode='process'] Which mode to use for shards * @property {boolean} [respawn=true] Whether shards should automatically respawn upon exiting * @property {boolean} [silent=false] Whether to pass the silent flag to child process * (only available when mode is set to 'process') * @property {string[]} [shardArgs=[]] Arguments to pass to the shard script when spawning * @property {string[]} [execArgv=[]] Arguments to pass to the shard script executable when spawning * @property {string} [token] Token to use for automatic shard count and passing to shards */ /** * @param {string} file Path to your shard script file * @param {ShardingManagerOptions} [options] Options for the sharding manager */ constructor(file, options) { super(); const _options = { totalShards: 'auto', mode: 'process', respawn: true, silent: false, shardArgs: [], execArgv: [], token: process.env.DISCORD_TOKEN, ...options, }; /** * Path to the shard script file * @type {string} */ this.file = file; if (!file) throw new DiscordjsError(ErrorCodes.ClientInvalidOption, 'File', 'specified.'); if (!path.isAbsolute(file)) this.file = path.resolve(process.cwd(), file); const stats = fs.statSync(this.file); if (!stats.isFile()) throw new DiscordjsError(ErrorCodes.ClientInvalidOption, 'File', 'a file'); /** * List of shards this sharding manager spawns * @type {string|number[]} */ this.shardList = _options.shardList ?? 'auto'; if (this.shardList !== 'auto') { if (!Array.isArray(this.shardList)) { throw new DiscordjsTypeError(ErrorCodes.ClientInvalidOption, 'shardList', 'an array.'); } this.shardList = [...new Set(this.shardList)]; if (this.shardList.length < 1) { throw new DiscordjsRangeError(ErrorCodes.ClientInvalidOption, 'shardList', 'at least 1 id.'); } if ( this.shardList.some( shardId => typeof shardId !== 'number' || isNaN(shardId) || !Number.isInteger(shardId) || shardId < 0, ) ) { throw new DiscordjsTypeError(ErrorCodes.ClientInvalidOption, 'shardList', 'an array of positive integers.'); } } /** * Amount of shards that all sharding managers spawn in total * @type {number} */ this.totalShards = _options.totalShards || 'auto'; if (this.totalShards !== 'auto') { if (typeof this.totalShards !== 'number' || isNaN(this.totalShards)) { throw new DiscordjsTypeError(ErrorCodes.ClientInvalidOption, 'Amount of shards', 'a number.'); } if (this.totalShards < 1) { throw new DiscordjsRangeError(ErrorCodes.ClientInvalidOption, 'Amount of shards', 'at least 1.'); } if (!Number.isInteger(this.totalShards)) { throw new DiscordjsRangeError(ErrorCodes.ClientInvalidOption, 'Amount of shards', 'an integer.'); } } /** * Mode for shards to spawn with * @type {ShardingManagerMode} */ this.mode = _options.mode; if (this.mode !== 'process' && this.mode !== 'worker') { throw new DiscordjsRangeError(ErrorCodes.ClientInvalidOption, 'Sharding mode', '"process" or "worker"'); } /** * Whether shards should automatically respawn upon exiting * @type {boolean} */ this.respawn = _options.respawn; /** * Whether to pass the silent flag to child process (only when {@link ShardingManager#mode} is `process`) * @type {boolean} */ this.silent = _options.silent; /** * An array of arguments to pass to shards (only when {@link ShardingManager#mode} is `process`) * @type {string[]} */ this.shardArgs = _options.shardArgs; /** * An array of arguments to pass to the executable (only when {@link ShardingManager#mode} is `process`) * @type {string[]} */ this.execArgv = _options.execArgv; /** * Token to use for obtaining the automatic shard count, and passing to shards * @type {?string} */ this.token = _options.token?.replace(/^Bot\s*/i, '') ?? null; /** * A collection of shards that this manager has spawned * @type {Collection<number, Shard>} */ this.shards = new Collection(); process.env.SHARDING_MANAGER = true; process.env.SHARDING_MANAGER_MODE = this.mode; process.env.DISCORD_TOKEN = this.token; } /** * Creates a single shard. * <warn>Using this method is usually not necessary if you use the spawn method.</warn> * @param {number} [id=this.shards.size] Id of the shard to create * <info>This is usually not necessary to manually specify.</info> * @returns {Shard} Note that the created shard needs to be explicitly spawned using its spawn method. */ createShard(id = this.shards.size) { const shard = new Shard(this, id); this.shards.set(id, shard); /** * Emitted upon creating a shard. * @event ShardingManager#shardCreate * @param {Shard} shard Shard that was created */ this.emit('shardCreate', shard); return shard; } /** * Options used to spawn multiple shards. * @typedef {Object} MultipleShardSpawnOptions * @property {number|string} [amount=this.totalShards] Number of shards to spawn * @property {number} [delay=5500] How long to wait in between spawning each shard (in milliseconds) * @property {number} [timeout=30000] The amount in milliseconds to wait until the {@link Client} has become ready */ /** * Spawns multiple shards. * @param {MultipleShardSpawnOptions} [options] Options for spawning shards * @returns {Promise<Collection<number, Shard>>} */ async spawn({ amount = this.totalShards, delay = 5500, timeout = 30_000 } = {}) { // Obtain/verify the number of shards to spawn if (amount === 'auto') { amount = await fetchRecommendedShardCount(this.token); } else { if (typeof amount !== 'number' || isNaN(amount)) { throw new DiscordjsTypeError(ErrorCodes.ClientInvalidOption, 'Amount of shards', 'a number.'); } if (amount < 1) throw new DiscordjsRangeError(ErrorCodes.ClientInvalidOption, 'Amount of shards', 'at least 1.'); if (!Number.isInteger(amount)) { throw new DiscordjsTypeError(ErrorCodes.ClientInvalidOption, 'Amount of shards', 'an integer.'); } } // Make sure this many shards haven't already been spawned if (this.shards.size >= amount) throw new DiscordjsError(ErrorCodes.ShardingAlreadySpawned, this.shards.size); if (this.shardList === 'auto' || this.totalShards === 'auto' || this.totalShards !== amount) { this.shardList = [...Array(amount).keys()]; } if (this.totalShards === 'auto' || this.totalShards !== amount) { this.totalShards = amount; } if (this.shardList.some(shardId => shardId >= amount)) { throw new DiscordjsRangeError( ErrorCodes.ClientInvalidOption, 'Amount of shards', 'bigger than the highest shardId in the shardList option.', ); } // Spawn the shards for (const shardId of this.shardList) { const promises = []; const shard = this.createShard(shardId); promises.push(shard.spawn(timeout)); if (delay > 0 && this.shards.size !== this.shardList.length) promises.push(sleep(delay)); await Promise.all(promises); // eslint-disable-line no-await-in-loop } return this.shards; } /** * Sends a message to all shards. * @param {*} message Message to be sent to the shards * @returns {Promise<Shard[]>} */ broadcast(message) { const promises = []; for (const shard of this.shards.values()) promises.push(shard.send(message)); return Promise.all(promises); } /** * Options for {@link ShardingManager#broadcastEval} and {@link ShardClientUtil#broadcastEval}. * @typedef {Object} BroadcastEvalOptions * @property {number} [shard] Shard to run script on, all if undefined * @property {*} [context] The JSON-serializable values to call the script with */ /** * Evaluates a script on all shards, or a given shard, in the context of the {@link Client}s. * @param {Function} script JavaScript to run on each shard * @param {BroadcastEvalOptions} [options={}] The options for the broadcast * @returns {Promise<*|Array<*>>} Results of the script execution */ async broadcastEval(script, options = {}) { if (typeof script !== 'function') { throw new DiscordjsTypeError(ErrorCodes.ShardingInvalidEvalBroadcast); } return this._performOnShards('eval', [`(${script})(this, ${JSON.stringify(options.context)})`], options.shard); } /** * Fetches a client property value of each shard, or a given shard. * @param {string} prop Name of the client property to get, using periods for nesting * @param {number} [shard] Shard to fetch property from, all if undefined * @returns {Promise<*|Array<*>>} * @example * manager.fetchClientValues('guilds.cache.size') * .then(results => console.log(`${results.reduce((prev, val) => prev + val, 0)} total guilds`)) * .catch(console.error); */ fetchClientValues(prop, shard) { return this._performOnShards('fetchClientValue', [prop], shard); } /** * Runs a method with given arguments on all shards, or a given shard. * @param {string} method Method name to run on each shard * @param {Array<*>} args Arguments to pass through to the method call * @param {number} [shard] Shard to run on, all if undefined * @returns {Promise<*|Array<*>>} Results of the method execution * @private */ async _performOnShards(method, args, shard) { if (this.shards.size === 0) throw new DiscordjsError(ErrorCodes.ShardingNoShards); if (typeof shard === 'number') { if (this.shards.has(shard)) return this.shards.get(shard)[method](...args); throw new DiscordjsError(ErrorCodes.ShardingShardNotFound, shard); } if (this.shards.size !== this.shardList.length) { throw new DiscordjsError(ErrorCodes.ShardingInProcess); } const promises = []; for (const sh of this.shards.values()) promises.push(sh[method](...args)); return Promise.all(promises); } /** * Options used to respawn all shards. * @typedef {Object} MultipleShardRespawnOptions * @property {number} [shardDelay=5000] How long to wait between shards (in milliseconds) * @property {number} [respawnDelay=500] How long to wait between killing a shard's process and restarting it * (in milliseconds) * @property {number} [timeout=30000] The amount in milliseconds to wait for a shard to become ready before * continuing to another (`-1` or `Infinity` for no wait) */ /** * Kills all running shards and respawns them. * @param {MultipleShardRespawnOptions} [options] Options for respawning shards * @returns {Promise<Collection<number, Shard>>} */ async respawnAll({ shardDelay = 5_000, respawnDelay = 500, timeout = 30_000 } = {}) { let s = 0; for (const shard of this.shards.values()) { const promises = [shard.respawn({ delay: respawnDelay, timeout })]; if (++s < this.shards.size && shardDelay > 0) promises.push(sleep(shardDelay)); await Promise.all(promises); // eslint-disable-line no-await-in-loop } return this.shards; } } module.exports = ShardingManager; node_modules/discord.js/src/sharding/Shard.js 0000664 00000034557 15114741631 0015273 0 ustar 00 'use strict'; const EventEmitter = require('node:events'); const path = require('node:path'); const process = require('node:process'); const { setTimeout, clearTimeout } = require('node:timers'); const { setTimeout: sleep } = require('node:timers/promises'); const { SHARE_ENV } = require('node:worker_threads'); const { DiscordjsError, ErrorCodes } = require('../errors'); const ShardEvents = require('../util/ShardEvents'); const { makeError, makePlainError } = require('../util/Util'); let childProcess = null; let Worker = null; /** * A self-contained shard created by the {@link ShardingManager}. Each one has a {@link ChildProcess} that contains * an instance of the bot and its {@link Client}. When its child process/worker exits for any reason, the shard will * spawn a new one to replace it as necessary. * @extends {EventEmitter} */ class Shard extends EventEmitter { constructor(manager, id) { super(); switch (manager.mode) { case 'process': childProcess = require('node:child_process'); break; case 'worker': Worker = require('node:worker_threads').Worker; break; } /** * Manager that created the shard * @type {ShardingManager} */ this.manager = manager; /** * The shard's id in the manager * @type {number} */ this.id = id; /** * Whether to pass silent flag to the shard's process (only when {@link ShardingManager#mode} is `process`) * @type {boolean} */ this.silent = manager.silent; /** * Arguments for the shard's process/worker * @type {string[]} */ this.args = manager.shardArgs ?? []; /** * Arguments for the shard's process/worker executable * @type {string[]} */ this.execArgv = manager.execArgv; /** * Environment variables for the shard's process, or workerData for the shard's worker * @type {Object} */ this.env = Object.assign({}, process.env, { SHARDING_MANAGER: true, SHARDS: this.id, SHARD_COUNT: this.manager.totalShards, DISCORD_TOKEN: this.manager.token, }); /** * Whether the shard's {@link Client} is ready * @type {boolean} */ this.ready = false; /** * Process of the shard (if {@link ShardingManager#mode} is `process`) * @type {?ChildProcess} */ this.process = null; /** * Worker of the shard (if {@link ShardingManager#mode} is `worker`) * @type {?Worker} */ this.worker = null; /** * Ongoing promises for calls to {@link Shard#eval}, mapped by the `script` they were called with * @type {Map<string, Promise>} * @private */ this._evals = new Map(); /** * Ongoing promises for calls to {@link Shard#fetchClientValue}, mapped by the `prop` they were called with * @type {Map<string, Promise>} * @private */ this._fetches = new Map(); /** * Listener function for the {@link ChildProcess}' `exit` event * @type {Function} * @private */ this._exitListener = null; } /** * Forks a child process or creates a worker thread for the shard. * <warn>You should not need to call this manually.</warn> * @param {number} [timeout=30000] The amount in milliseconds to wait until the {@link Client} has become ready * before resolving (`-1` or `Infinity` for no wait) * @returns {Promise<ChildProcess>} */ async spawn(timeout = 30_000) { if (this.process) throw new DiscordjsError(ErrorCodes.ShardingProcessExists, this.id); if (this.worker) throw new DiscordjsError(ErrorCodes.ShardingWorkerExists, this.id); this._exitListener = this._handleExit.bind(this, undefined, timeout); switch (this.manager.mode) { case 'process': this.process = childProcess .fork(path.resolve(this.manager.file), this.args, { env: this.env, execArgv: this.execArgv, silent: this.silent, }) .on('message', this._handleMessage.bind(this)) .on('exit', this._exitListener); break; case 'worker': this.worker = new Worker(path.resolve(this.manager.file), { workerData: this.env, env: SHARE_ENV, execArgv: this.execArgv, argv: this.args, }) .on('message', this._handleMessage.bind(this)) .on('exit', this._exitListener); break; } this._evals.clear(); this._fetches.clear(); const child = this.process ?? this.worker; /** * Emitted upon the creation of the shard's child process/worker. * @event Shard#spawn * @param {ChildProcess|Worker} process Child process/worker that was created */ this.emit(ShardEvents.Spawn, child); if (timeout === -1 || timeout === Infinity) return child; return new Promise((resolve, reject) => { const cleanup = () => { clearTimeout(spawnTimeoutTimer); this.off('ready', onReady); this.off('disconnect', onDisconnect); this.off('death', onDeath); }; const onReady = () => { cleanup(); resolve(child); }; const onDisconnect = () => { cleanup(); reject(new DiscordjsError(ErrorCodes.ShardingReadyDisconnected, this.id)); }; const onDeath = () => { cleanup(); reject(new DiscordjsError(ErrorCodes.ShardingReadyDied, this.id)); }; const onTimeout = () => { cleanup(); reject(new DiscordjsError(ErrorCodes.ShardingReadyTimeout, this.id)); }; const spawnTimeoutTimer = setTimeout(onTimeout, timeout); this.once('ready', onReady); this.once('disconnect', onDisconnect); this.once('death', onDeath); }); } /** * Immediately kills the shard's process/worker and does not restart it. */ kill() { if (this.process) { this.process.removeListener('exit', this._exitListener); this.process.kill(); } else { this.worker.removeListener('exit', this._exitListener); this.worker.terminate(); } this._handleExit(false); } /** * Options used to respawn a shard. * @typedef {Object} ShardRespawnOptions * @property {number} [delay=500] How long to wait between killing the process/worker and * restarting it (in milliseconds) * @property {number} [timeout=30000] The amount in milliseconds to wait until the {@link Client} * has become ready before resolving (`-1` or `Infinity` for no wait) */ /** * Kills and restarts the shard's process/worker. * @param {ShardRespawnOptions} [options] Options for respawning the shard * @returns {Promise<ChildProcess>} */ async respawn({ delay = 500, timeout = 30_000 } = {}) { this.kill(); if (delay > 0) await sleep(delay); return this.spawn(timeout); } /** * Sends a message to the shard's process/worker. * @param {*} message Message to send to the shard * @returns {Promise<Shard>} */ send(message) { return new Promise((resolve, reject) => { if (this.process) { this.process.send(message, err => { if (err) reject(err); else resolve(this); }); } else { this.worker.postMessage(message); resolve(this); } }); } /** * Fetches a client property value of the shard. * @param {string} prop Name of the client property to get, using periods for nesting * @returns {Promise<*>} * @example * shard.fetchClientValue('guilds.cache.size') * .then(count => console.log(`${count} guilds in shard ${shard.id}`)) * .catch(console.error); */ async fetchClientValue(prop) { // Shard is dead (maybe respawning), don't cache anything and error immediately if (!this.process && !this.worker) { throw new DiscordjsError(ErrorCodes.ShardingNoChildExists, this.id); } // Cached promise from previous call if (this._fetches.has(prop)) return this._fetches.get(prop); const promise = new Promise((resolve, reject) => { const child = this.process ?? this.worker; const listener = message => { if (message?._fetchProp !== prop) return; child.removeListener('message', listener); this.decrementMaxListeners(child); this._fetches.delete(prop); if (!message._error) resolve(message._result); else reject(makeError(message._error)); }; this.incrementMaxListeners(child); child.on('message', listener); this.send({ _fetchProp: prop }).catch(err => { child.removeListener('message', listener); this.decrementMaxListeners(child); this._fetches.delete(prop); reject(err); }); }); this._fetches.set(prop, promise); return promise; } /** * Evaluates a script or function on the shard, in the context of the {@link Client}. * @param {string|Function} script JavaScript to run on the shard * @param {*} [context] The context for the eval * @returns {Promise<*>} Result of the script execution */ async eval(script, context) { // Stringify the script if it's a Function const _eval = typeof script === 'function' ? `(${script})(this, ${JSON.stringify(context)})` : script; // Shard is dead (maybe respawning), don't cache anything and error immediately if (!this.process && !this.worker) { throw new DiscordjsError(ErrorCodes.ShardingNoChildExists, this.id); } // Cached promise from previous call if (this._evals.has(_eval)) return this._evals.get(_eval); const promise = new Promise((resolve, reject) => { const child = this.process ?? this.worker; const listener = message => { if (message?._eval !== _eval) return; child.removeListener('message', listener); this.decrementMaxListeners(child); this._evals.delete(_eval); if (!message._error) resolve(message._result); else reject(makeError(message._error)); }; this.incrementMaxListeners(child); child.on('message', listener); this.send({ _eval }).catch(err => { child.removeListener('message', listener); this.decrementMaxListeners(child); this._evals.delete(_eval); reject(err); }); }); this._evals.set(_eval, promise); return promise; } /** * Handles a message received from the child process/worker. * @param {*} message Message received * @private */ _handleMessage(message) { if (message) { // Shard is ready if (message._ready) { this.ready = true; /** * Emitted upon the shard's {@link Client#event:shardReady} event. * @event Shard#ready */ this.emit(ShardEvents.Ready); return; } // Shard has disconnected if (message._disconnect) { this.ready = false; /** * Emitted upon the shard's {@link Client#event:shardDisconnect} event. * @event Shard#disconnect */ this.emit(ShardEvents.Disconnect); return; } // Shard is attempting to reconnect if (message._reconnecting) { this.ready = false; /** * Emitted upon the shard's {@link Client#event:shardReconnecting} event. * @event Shard#reconnecting */ this.emit(ShardEvents.Reconnecting); return; } // Shard has resumed if (message._resume) { this.ready = true; /** * Emitted upon the shard's {@link Client#event:shardResume} event. * @event Shard#resume */ this.emit(ShardEvents.Resume); return; } // Shard is requesting a property fetch if (message._sFetchProp) { const resp = { _sFetchProp: message._sFetchProp, _sFetchPropShard: message._sFetchPropShard }; this.manager.fetchClientValues(message._sFetchProp, message._sFetchPropShard).then( results => this.send({ ...resp, _result: results }), err => this.send({ ...resp, _error: makePlainError(err) }), ); return; } // Shard is requesting an eval broadcast if (message._sEval) { const resp = { _sEval: message._sEval, _sEvalShard: message._sEvalShard }; this.manager._performOnShards('eval', [message._sEval], message._sEvalShard).then( results => this.send({ ...resp, _result: results }), err => this.send({ ...resp, _error: makePlainError(err) }), ); return; } // Shard is requesting a respawn of all shards if (message._sRespawnAll) { const { shardDelay, respawnDelay, timeout } = message._sRespawnAll; this.manager.respawnAll({ shardDelay, respawnDelay, timeout }).catch(() => { // Do nothing }); return; } } /** * Emitted upon receiving a message from the child process/worker. * @event Shard#message * @param {*} message Message that was received */ this.emit(ShardEvents.Message, message); } /** * Handles the shard's process/worker exiting. * @param {boolean} [respawn=this.manager.respawn] Whether to spawn the shard again * @param {number} [timeout] The amount in milliseconds to wait until the {@link Client} * has become ready (`-1` or `Infinity` for no wait) * @private */ _handleExit(respawn = this.manager.respawn, timeout) { /** * Emitted upon the shard's child process/worker exiting. * @event Shard#death * @param {ChildProcess|Worker} process Child process/worker that exited */ this.emit(ShardEvents.Death, this.process ?? this.worker); this.ready = false; this.process = null; this.worker = null; this._evals.clear(); this._fetches.clear(); if (respawn) this.spawn(timeout).catch(err => this.emit(ShardEvents.Error, err)); } /** * Increments max listeners by one for a given emitter, if they are not zero. * @param {EventEmitter|process} emitter The emitter that emits the events. * @private */ incrementMaxListeners(emitter) { const maxListeners = emitter.getMaxListeners(); if (maxListeners !== 0) { emitter.setMaxListeners(maxListeners + 1); } } /** * Decrements max listeners by one for a given emitter, if they are not zero. * @param {EventEmitter|process} emitter The emitter that emits the events. * @private */ decrementMaxListeners(emitter) { const maxListeners = emitter.getMaxListeners(); if (maxListeners !== 0) { emitter.setMaxListeners(maxListeners - 1); } } } module.exports = Shard; node_modules/discord.js/src/sharding/ShardClientUtil.js 0000664 00000023004 15114741631 0017251 0 ustar 00 'use strict'; const process = require('node:process'); const { calculateShardId } = require('@discordjs/util'); const { DiscordjsError, DiscordjsTypeError, ErrorCodes } = require('../errors'); const Events = require('../util/Events'); const { makeError, makePlainError } = require('../util/Util'); /** * Helper class for sharded clients spawned as a child process/worker, such as from a {@link ShardingManager}. * Utilizes IPC to send and receive data to/from the master process and other shards. */ class ShardClientUtil { constructor(client, mode) { /** * Client for the shard * @type {Client} */ this.client = client; /** * Mode the shard was spawned with * @type {ShardingManagerMode} */ this.mode = mode; /** * Message port for the master process (only when {@link ShardClientUtil#mode} is `worker`) * @type {?MessagePort} */ this.parentPort = null; switch (mode) { case 'process': process.on('message', this._handleMessage.bind(this)); client.on(Events.ShardReady, () => { process.send({ _ready: true }); }); client.on(Events.ShardDisconnect, () => { process.send({ _disconnect: true }); }); client.on(Events.ShardReconnecting, () => { process.send({ _reconnecting: true }); }); client.on(Events.ShardResume, () => { process.send({ _resume: true }); }); break; case 'worker': this.parentPort = require('node:worker_threads').parentPort; this.parentPort.on('message', this._handleMessage.bind(this)); client.on(Events.ShardReady, () => { this.parentPort.postMessage({ _ready: true }); }); client.on(Events.ShardDisconnect, () => { this.parentPort.postMessage({ _disconnect: true }); }); client.on(Events.ShardReconnecting, () => { this.parentPort.postMessage({ _reconnecting: true }); }); client.on(Events.ShardResume, () => { this.parentPort.postMessage({ _resume: true }); }); break; } } /** * Array of shard ids of this client * @type {number[]} * @readonly */ get ids() { return this.client.options.shards; } /** * Total number of shards * @type {number} * @readonly */ get count() { return this.client.options.shardCount; } /** * Sends a message to the master process. * @param {*} message Message to send * @returns {Promise<void>} * @emits Shard#message */ send(message) { return new Promise((resolve, reject) => { switch (this.mode) { case 'process': process.send(message, err => { if (err) reject(err); else resolve(); }); break; case 'worker': this.parentPort.postMessage(message); resolve(); break; } }); } /** * Fetches a client property value of each shard, or a given shard. * @param {string} prop Name of the client property to get, using periods for nesting * @param {number} [shard] Shard to fetch property from, all if undefined * @returns {Promise<*|Array<*>>} * @example * client.shard.fetchClientValues('guilds.cache.size') * .then(results => console.log(`${results.reduce((prev, val) => prev + val, 0)} total guilds`)) * .catch(console.error); * @see {@link ShardingManager#fetchClientValues} */ fetchClientValues(prop, shard) { return new Promise((resolve, reject) => { const parent = this.parentPort ?? process; const listener = message => { if (message?._sFetchProp !== prop || message._sFetchPropShard !== shard) return; parent.removeListener('message', listener); this.decrementMaxListeners(parent); if (!message._error) resolve(message._result); else reject(makeError(message._error)); }; this.incrementMaxListeners(parent); parent.on('message', listener); this.send({ _sFetchProp: prop, _sFetchPropShard: shard }).catch(err => { parent.removeListener('message', listener); this.decrementMaxListeners(parent); reject(err); }); }); } /** * Evaluates a script or function on all shards, or a given shard, in the context of the {@link Client}s. * @param {Function} script JavaScript to run on each shard * @param {BroadcastEvalOptions} [options={}] The options for the broadcast * @returns {Promise<*|Array<*>>} Results of the script execution * @example * client.shard.broadcastEval(client => client.guilds.cache.size) * .then(results => console.log(`${results.reduce((prev, val) => prev + val, 0)} total guilds`)) * .catch(console.error); * @see {@link ShardingManager#broadcastEval} */ broadcastEval(script, options = {}) { return new Promise((resolve, reject) => { const parent = this.parentPort ?? process; if (typeof script !== 'function') { reject(new DiscordjsTypeError(ErrorCodes.ShardingInvalidEvalBroadcast)); return; } script = `(${script})(this, ${JSON.stringify(options.context)})`; const listener = message => { if (message?._sEval !== script || message._sEvalShard !== options.shard) return; parent.removeListener('message', listener); this.decrementMaxListeners(parent); if (!message._error) resolve(message._result); else reject(makeError(message._error)); }; this.incrementMaxListeners(parent); parent.on('message', listener); this.send({ _sEval: script, _sEvalShard: options.shard }).catch(err => { parent.removeListener('message', listener); this.decrementMaxListeners(parent); reject(err); }); }); } /** * Requests a respawn of all shards. * @param {MultipleShardRespawnOptions} [options] Options for respawning shards * @returns {Promise<void>} Resolves upon the message being sent * @see {@link ShardingManager#respawnAll} */ respawnAll({ shardDelay = 5_000, respawnDelay = 500, timeout = 30_000 } = {}) { return this.send({ _sRespawnAll: { shardDelay, respawnDelay, timeout } }); } /** * Handles an IPC message. * @param {*} message Message received * @private */ async _handleMessage(message) { if (!message) return; if (message._fetchProp) { try { const props = message._fetchProp.split('.'); let value = this.client; for (const prop of props) value = value[prop]; this._respond('fetchProp', { _fetchProp: message._fetchProp, _result: value }); } catch (err) { this._respond('fetchProp', { _fetchProp: message._fetchProp, _error: makePlainError(err) }); } } else if (message._eval) { try { this._respond('eval', { _eval: message._eval, _result: await this.client._eval(message._eval) }); } catch (err) { this._respond('eval', { _eval: message._eval, _error: makePlainError(err) }); } } } /** * Sends a message to the master process, emitting an error from the client upon failure. * @param {string} type Type of response to send * @param {*} message Message to send * @private */ _respond(type, message) { this.send(message).catch(err => { const error = new Error(`Error when sending ${type} response to master process: ${err.message}`); error.stack = err.stack; /** * Emitted when the client encounters an error. * <warn>Errors thrown within this event do not have a catch handler, it is * recommended to not use async functions as `error` event handlers. See the * {@link https://nodejs.org/api/events.html#capture-rejections-of-promises Node.js documentation} * for details.)</warn> * @event Client#error * @param {Error} error The error encountered */ this.client.emit(Events.Error, error); }); } /** * Creates/gets the singleton of this class. * @param {Client} client The client to use * @param {ShardingManagerMode} mode Mode the shard was spawned with * @returns {ShardClientUtil} */ static singleton(client, mode) { if (!this._singleton) { this._singleton = new this(client, mode); } else { client.emit( Events.Warn, 'Multiple clients created in child process/worker; only the first will handle sharding helpers.', ); } return this._singleton; } /** * Get the shard id for a given guild id. * @param {Snowflake} guildId Snowflake guild id to get shard id for * @param {number} shardCount Number of shards * @returns {number} */ static shardIdForGuildId(guildId, shardCount) { const shard = calculateShardId(guildId, shardCount); if (shard < 0) throw new DiscordjsError(ErrorCodes.ShardingShardMiscalculation, shard, guildId, shardCount); return shard; } /** * Increments max listeners by one for a given emitter, if they are not zero. * @param {EventEmitter|process} emitter The emitter that emits the events. * @private */ incrementMaxListeners(emitter) { const maxListeners = emitter.getMaxListeners(); if (maxListeners !== 0) { emitter.setMaxListeners(maxListeners + 1); } } /** * Decrements max listeners by one for a given emitter, if they are not zero. * @param {EventEmitter|process} emitter The emitter that emits the events. * @private */ decrementMaxListeners(emitter) { const maxListeners = emitter.getMaxListeners(); if (maxListeners !== 0) { emitter.setMaxListeners(maxListeners - 1); } } } module.exports = ShardClientUtil; node_modules/discord.js/src/structures/ApplicationEmoji.js 0000664 00000005207 15114741631 0020073 0 ustar 00 'use strict'; const { Emoji } = require('./Emoji'); /** * Represents a custom emoji. * @extends {Emoji} */ class ApplicationEmoji extends Emoji { constructor(client, data, application) { super(client, data); /** * The application this emoji originates from * @type {ClientApplication} */ this.application = application; /** * The user who created this emoji * @type {?User} */ this.author = null; this.managed = null; this.requiresColons = null; this._patch(data); } _patch(data) { if ('name' in data) this.name = data.name; if (data.user) this.author = this.client.users._add(data.user); if ('managed' in data) { /** * Whether this emoji is managed by an external service * @type {?boolean} */ this.managed = data.managed; } if ('require_colons' in data) { /** * Whether or not this emoji requires colons surrounding it * @type {?boolean} */ this.requiresColons = data.require_colons; } } /** * Fetches the author for this emoji * @returns {Promise<User>} */ fetchAuthor() { return this.application.emojis.fetchAuthor(this); } /** * Data for editing an emoji. * @typedef {Object} ApplicationEmojiEditOptions * @property {string} [name] The name of the emoji */ /** * Edits the emoji. * @param {ApplicationEmojiEditOptions} options The options to provide * @returns {Promise<ApplicationEmoji>} * @example * // Edit an emoji * emoji.edit({ name: 'newemoji' }) * .then(emoji => console.log(`Edited emoji ${emoji}`)) * .catch(console.error); */ edit(options) { return this.application.emojis.edit(this.id, options); } /** * Sets the name of the emoji. * @param {string} name The new name for the emoji * @returns {Promise<ApplicationEmoji>} */ setName(name) { return this.edit({ name }); } /** * Deletes the emoji. * @returns {Promise<ApplicationEmoji>} */ async delete() { await this.application.emojis.delete(this.id); return this; } /** * Whether this emoji is the same as another one. * @param {ApplicationEmoji|APIEmoji} other The emoji to compare it to * @returns {boolean} */ equals(other) { if (other instanceof ApplicationEmoji) { return ( other.animated === this.animated && other.id === this.id && other.name === this.name && other.managed === this.managed && other.requiresColons === this.requiresColons ); } return other.id === this.id && other.name === this.name; } } module.exports = ApplicationEmoji; node_modules/discord.js/src/structures/MessageContextMenuCommandInteraction.js 0000664 00000001013 15114741631 0024110 0 ustar 00 'use strict'; const ContextMenuCommandInteraction = require('./ContextMenuCommandInteraction'); /** * Represents a message context menu interaction. * @extends {ContextMenuCommandInteraction} */ class MessageContextMenuCommandInteraction extends ContextMenuCommandInteraction { /** * The message this interaction was sent from * @type {Message|APIMessage} * @readonly */ get targetMessage() { return this.options.getMessage('message'); } } module.exports = MessageContextMenuCommandInteraction; node_modules/discord.js/src/structures/Attachment.js 0000664 00000007342 15114741631 0016736 0 ustar 00 'use strict'; const AttachmentFlagsBitField = require('../util/AttachmentFlagsBitField.js'); const { basename, flatten } = require('../util/Util'); /** * @typedef {Object} AttachmentPayload * @property {?string} name The name of the attachment * @property {Stream|BufferResolvable} attachment The attachment in this payload * @property {?string} description The description of the attachment */ /** * Represents an attachment */ class Attachment { constructor(data) { this.attachment = data.url; /** * The name of this attachment * @type {string} */ this.name = data.filename; this._patch(data); } _patch(data) { /** * The attachment's id * @type {Snowflake} */ this.id = data.id; if ('size' in data) { /** * The size of this attachment in bytes * @type {number} */ this.size = data.size; } if ('url' in data) { /** * The URL to this attachment * @type {string} */ this.url = data.url; } if ('proxy_url' in data) { /** * The Proxy URL to this attachment * @type {string} */ this.proxyURL = data.proxy_url; } if ('height' in data) { /** * The height of this attachment (if an image or video) * @type {?number} */ this.height = data.height; } else { this.height ??= null; } if ('width' in data) { /** * The width of this attachment (if an image or video) * @type {?number} */ this.width = data.width; } else { this.width ??= null; } if ('content_type' in data) { /** * The media (MIME) type of this attachment * @type {?string} * @see {@link https://developer.mozilla.org/docs/Web/HTTP/Basics_of_HTTP/MIME_types/Common_types} */ this.contentType = data.content_type; } else { this.contentType ??= null; } if ('description' in data) { /** * The description (alt text) of this attachment * @type {?string} */ this.description = data.description; } else { this.description ??= null; } /** * Whether this attachment is ephemeral * @type {boolean} */ this.ephemeral = data.ephemeral ?? false; if ('duration_secs' in data) { /** * The duration of this attachment in seconds * <info>This will only be available if the attachment is an audio file.</info> * @type {?number} */ this.duration = data.duration_secs; } else { this.duration ??= null; } if ('waveform' in data) { /** * The base64 encoded byte array representing a sampled waveform * <info>This will only be available if the attachment is an audio file.</info> * @type {?string} */ this.waveform = data.waveform; } else { this.waveform ??= null; } if ('flags' in data) { /** * The flags of this attachment * @type {Readonly<AttachmentFlagsBitField>} */ this.flags = new AttachmentFlagsBitField(data.flags).freeze(); } else { this.flags ??= new AttachmentFlagsBitField().freeze(); } if ('title' in data) { /** * The title of this attachment * <info>This will only be available if the attachment name contains special characters.</info> * @type {?string} */ this.title = data.title; } else { this.title ??= null; } } /** * Whether or not this attachment has been marked as a spoiler * @type {boolean} * @readonly */ get spoiler() { return basename(this.url ?? this.name).startsWith('SPOILER_'); } toJSON() { return flatten(this); } } module.exports = Attachment; node_modules/discord.js/src/structures/ClientPresence.js 0000664 00000005112 15114741631 0017542 0 ustar 00 'use strict'; const { GatewayOpcodes, ActivityType } = require('discord-api-types/v10'); const { Presence } = require('./Presence'); const { DiscordjsTypeError, ErrorCodes } = require('../errors'); /** * Represents the client's presence. * @extends {Presence} */ class ClientPresence extends Presence { constructor(client, data = {}) { super(client, Object.assign(data, { status: data.status ?? 'online', user: { id: null } })); } /** * Sets the client's presence * @param {PresenceData} presence The data to set the presence to * @returns {ClientPresence} */ set(presence) { const packet = this._parse(presence); this._patch(packet); if (presence.shardId === undefined) { this.client.ws.broadcast({ op: GatewayOpcodes.PresenceUpdate, d: packet }); } else if (Array.isArray(presence.shardId)) { for (const shardId of presence.shardId) { this.client.ws.shards.get(shardId).send({ op: GatewayOpcodes.PresenceUpdate, d: packet }); } } else { this.client.ws.shards.get(presence.shardId).send({ op: GatewayOpcodes.PresenceUpdate, d: packet }); } return this; } /** * Parses presence data into a packet ready to be sent to Discord * @param {PresenceData} presence The data to parse * @returns {GatewayPresenceUpdateData} * @private */ _parse({ status, since, afk, activities }) { const data = { activities: [], afk: typeof afk === 'boolean' ? afk : false, since: typeof since === 'number' && !Number.isNaN(since) ? since : null, status: status ?? this.status, }; if (activities?.length) { for (const [i, activity] of activities.entries()) { if (typeof activity.name !== 'string') { throw new DiscordjsTypeError(ErrorCodes.InvalidType, `activities[${i}].name`, 'string'); } activity.type ??= ActivityType.Playing; if (activity.type === ActivityType.Custom && !activity.state) { activity.state = activity.name; activity.name = 'Custom Status'; } data.activities.push({ type: activity.type, name: activity.name, state: activity.state, url: activity.url, }); } } else if (!activities && (status || afk || since) && this.activities.length) { data.activities.push( ...this.activities.map(activity => ({ name: activity.name, state: activity.state ?? undefined, type: activity.type, url: activity.url ?? undefined, })), ); } return data; } } module.exports = ClientPresence; node_modules/discord.js/src/structures/Poll.js 0000664 00000004640 15114741631 0015552 0 ustar 00 'use strict'; const { Collection } = require('@discordjs/collection'); const Base = require('./Base'); const { PollAnswer } = require('./PollAnswer'); const { DiscordjsError } = require('../errors/DJSError'); const { ErrorCodes } = require('../errors/index'); /** * Represents a Poll * @extends {Base} */ class Poll extends Base { constructor(client, data, message) { super(client); /** * The message that started this poll * @name Poll#message * @type {Message} * @readonly */ Object.defineProperty(this, 'message', { value: message }); /** * The media for a poll's question * @typedef {Object} PollQuestionMedia * @property {string} text The text of this question */ /** * The media for this poll's question * @type {PollQuestionMedia} */ this.question = { text: data.question.text, }; /** * The answers of this poll * @type {Collection<number, PollAnswer>} */ this.answers = data.answers.reduce( (acc, answer) => acc.set(answer.answer_id, new PollAnswer(this.client, answer, this)), new Collection(), ); /** * The timestamp when this poll expires * @type {number} */ this.expiresTimestamp = Date.parse(data.expiry); /** * Whether this poll allows multiple answers * @type {boolean} */ this.allowMultiselect = data.allow_multiselect; /** * The layout type of this poll * @type {PollLayoutType} */ this.layoutType = data.layout_type; this._patch(data); } _patch(data) { if (data.results) { /** * Whether this poll's results have been precisely counted * @type {boolean} */ this.resultsFinalized = data.results.is_finalized; for (const answerResult of data.results.answer_counts) { const answer = this.answers.get(answerResult.id); answer?._patch(answerResult); } } else { this.resultsFinalized ??= false; } } /** * The date when this poll expires * @type {Date} * @readonly */ get expiresAt() { return new Date(this.expiresTimestamp); } /** * Ends this poll. * @returns {Promise<Message>} */ async end() { if (Date.now() > this.expiresTimestamp) { throw new DiscordjsError(ErrorCodes.PollAlreadyExpired); } return this.message.channel.messages.endPoll(this.message.id); } } exports.Poll = Poll; node_modules/discord.js/src/structures/UserSelectMenuInteraction.js 0000664 00000002672 15114741631 0021752 0 ustar 00 'use strict'; const { Collection } = require('@discordjs/collection'); const MessageComponentInteraction = require('./MessageComponentInteraction'); const Events = require('../util/Events'); /** * Represents a {@link ComponentType.UserSelect} select menu interaction. * @extends {MessageComponentInteraction} */ class UserSelectMenuInteraction extends MessageComponentInteraction { constructor(client, data) { super(client, data); const { resolved, values } = data.data; /** * An array of the selected user ids * @type {Snowflake[]} */ this.values = values ?? []; /** * Collection of the selected users * @type {Collection<Snowflake, User>} */ this.users = new Collection(); /** * Collection of the selected members * @type {Collection<Snowflake, GuildMember|APIGuildMember>} */ this.members = new Collection(); for (const user of Object.values(resolved?.users ?? {})) { this.users.set(user.id, this.client.users._add(user)); } for (const [id, member] of Object.entries(resolved?.members ?? {})) { const user = resolved.users[id]; if (!user) { this.client.emit(Events.Debug, `[UserSelectMenuInteraction] Received a member without a user, skipping ${id}`); continue; } this.members.set(id, this.guild?.members._add({ user, ...member }) ?? { user, ...member }); } } } module.exports = UserSelectMenuInteraction; node_modules/discord.js/src/structures/SelectMenuInteraction.js 0000664 00000001250 15114741631 0021102 0 ustar 00 'use strict'; const process = require('node:process'); const StringSelectMenuInteraction = require('./StringSelectMenuInteraction'); let deprecationEmitted = false; /** * @deprecated Use {@link StringSelectMenuInteraction} instead. * @extends {StringSelectMenuInteraction} */ class SelectMenuInteraction extends StringSelectMenuInteraction { constructor(...params) { super(...params); if (!deprecationEmitted) { process.emitWarning( 'The SelectMenuInteraction class is deprecated. Use StringSelectMenuInteraction instead.', 'DeprecationWarning', ); deprecationEmitted = true; } } } module.exports = SelectMenuInteraction; node_modules/discord.js/src/structures/SectionComponent.js 0000664 00000001662 15114741631 0020134 0 ustar 00 'use strict'; const Component = require('./Component'); const { createComponent } = require('../util/Components'); /** * Represents a section component * @extends {Component} */ class SectionComponent extends Component { constructor({ accessory, components, ...data }) { super(data); /** * The components in this section * @type {Component[]} * @readonly */ this.components = components.map(component => createComponent(component)); /** * The accessory component of this section * @type {Component} * @readonly */ this.accessory = createComponent(accessory); } /** * Returns the API-compatible JSON for this component * @returns {APISectionComponent} */ toJSON() { return { ...this.data, accessory: this.accessory.toJSON(), components: this.components.map(component => component.toJSON()), }; } } module.exports = SectionComponent; node_modules/discord.js/src/structures/VoiceState.js 0000664 00000021320 15114741631 0016704 0 ustar 00 'use strict'; const { ChannelType, Routes } = require('discord-api-types/v10'); const Base = require('./Base'); const { DiscordjsError, DiscordjsTypeError, ErrorCodes } = require('../errors'); /** * Represents the voice state for a Guild Member. * @extends {Base} */ class VoiceState extends Base { constructor(guild, data) { super(guild.client); /** * The guild of this voice state * @type {Guild} */ this.guild = guild; /** * The id of the member of this voice state * @type {Snowflake} */ this.id = data.user_id; this._patch(data); } _patch(data) { if ('deaf' in data) { /** * Whether this member is deafened server-wide * @type {?boolean} */ this.serverDeaf = data.deaf; } else { this.serverDeaf ??= null; } if ('mute' in data) { /** * Whether this member is muted server-wide * @type {?boolean} */ this.serverMute = data.mute; } else { this.serverMute ??= null; } if ('self_deaf' in data) { /** * Whether this member is self-deafened * @type {?boolean} */ this.selfDeaf = data.self_deaf; } else { this.selfDeaf ??= null; } if ('self_mute' in data) { /** * Whether this member is self-muted * @type {?boolean} */ this.selfMute = data.self_mute; } else { this.selfMute ??= null; } if ('self_video' in data) { /** * Whether this member's camera is enabled * @type {?boolean} */ this.selfVideo = data.self_video; } else { this.selfVideo ??= null; } if ('session_id' in data) { /** * The session id for this member's connection * @type {?string} */ this.sessionId = data.session_id; } else { this.sessionId ??= null; } // The self_stream is property is omitted if false, check for another property // here to avoid incorrectly clearing this when partial data is specified if ('self_video' in data) { /** * Whether this member is streaming using "Screen Share" * @type {?boolean} */ this.streaming = data.self_stream ?? false; } else { this.streaming ??= null; } if ('channel_id' in data) { /** * The {@link VoiceChannel} or {@link StageChannel} id the member is in * @type {?Snowflake} */ this.channelId = data.channel_id; } else { this.channelId ??= null; } if ('suppress' in data) { /** * Whether this member is suppressed from speaking. This property is specific to stage channels only. * @type {?boolean} */ this.suppress = data.suppress; } else { this.suppress ??= null; } if ('request_to_speak_timestamp' in data) { /** * The time at which the member requested to speak. This property is specific to stage channels only. * @type {?number} */ this.requestToSpeakTimestamp = data.request_to_speak_timestamp && Date.parse(data.request_to_speak_timestamp); } else { this.requestToSpeakTimestamp ??= null; } return this; } /** * The member that this voice state belongs to * @type {?GuildMember} * @readonly */ get member() { return this.guild.members.cache.get(this.id) ?? null; } /** * The channel that the member is connected to * @type {?(VoiceChannel|StageChannel)} * @readonly */ get channel() { return this.guild.channels.cache.get(this.channelId) ?? null; } /** * Whether this member is either self-deafened or server-deafened * @type {?boolean} * @readonly */ get deaf() { return this.serverDeaf || this.selfDeaf; } /** * Whether this member is either self-muted or server-muted * @type {?boolean} * @readonly */ get mute() { return this.serverMute || this.selfMute; } /** * Mutes/unmutes the member of this voice state. * @param {boolean} [mute=true] Whether or not the member should be muted * @param {string} [reason] Reason for muting or unmuting * @returns {Promise<GuildMember>} */ setMute(mute = true, reason) { return this.guild.members.edit(this.id, { mute, reason }); } /** * Deafens/undeafens the member of this voice state. * @param {boolean} [deaf=true] Whether or not the member should be deafened * @param {string} [reason] Reason for deafening or undeafening * @returns {Promise<GuildMember>} */ setDeaf(deaf = true, reason) { return this.guild.members.edit(this.id, { deaf, reason }); } /** * Disconnects the member from the channel. * @param {string} [reason] Reason for disconnecting the member from the channel * @returns {Promise<GuildMember>} */ disconnect(reason) { return this.setChannel(null, reason); } /** * Moves the member to a different channel, or disconnects them from the one they're in. * @param {?GuildVoiceChannelResolvable} channel Channel to move the member to, or `null` if you want to * disconnect them from voice. * @param {string} [reason] Reason for moving member to another channel or disconnecting * @returns {Promise<GuildMember>} */ setChannel(channel, reason) { return this.guild.members.edit(this.id, { channel, reason }); } /** * Data to edit the logged in user's own voice state with, when in a stage channel * @typedef {Object} VoiceStateEditOptions * @property {boolean} [requestToSpeak] Whether or not the client is requesting to become a speaker. * <info>Only available to the logged in user's own voice state.</info> * @property {boolean} [suppressed] Whether or not the user should be suppressed. */ /** * Edits this voice state. Currently only available when in a stage channel * @param {VoiceStateEditOptions} options The options to provide * @returns {Promise<VoiceState>} */ async edit(options) { if (this.channel?.type !== ChannelType.GuildStageVoice) throw new DiscordjsError(ErrorCodes.VoiceNotStageChannel); const target = this.client.user.id === this.id ? '@me' : this.id; if (target !== '@me' && options.requestToSpeak !== undefined) { throw new DiscordjsError(ErrorCodes.VoiceStateNotOwn); } if (!['boolean', 'undefined'].includes(typeof options.requestToSpeak)) { throw new DiscordjsTypeError(ErrorCodes.VoiceStateInvalidType, 'requestToSpeak'); } if (!['boolean', 'undefined'].includes(typeof options.suppressed)) { throw new DiscordjsTypeError(ErrorCodes.VoiceStateInvalidType, 'suppressed'); } await this.client.rest.patch(Routes.guildVoiceState(this.guild.id, target), { body: { channel_id: this.channelId, request_to_speak_timestamp: options.requestToSpeak ? new Date().toISOString() : options.requestToSpeak === false ? null : undefined, suppress: options.suppressed, }, }); return this; } /** * Fetches this voice state. * @param {boolean} [force=true] Whether to skip the cache check and request the API * @returns {Promise<VoiceState>} */ fetch(force = true) { return this.guild.voiceStates.fetch(this.id, { force }); } /** * Toggles the request to speak in the channel. * Only applicable for stage channels and for the client's own voice state. * @param {boolean} [requestToSpeak=true] Whether or not the client is requesting to become a speaker. * @example * // Making the client request to speak in a stage channel (raise its hand) * guild.members.me.voice.setRequestToSpeak(true); * @example * // Making the client cancel a request to speak * guild.members.me.voice.setRequestToSpeak(false); * @returns {Promise<VoiceState>} */ setRequestToSpeak(requestToSpeak = true) { return this.edit({ requestToSpeak }); } /** * Suppress/unsuppress the user. Only applicable for stage channels. * @param {boolean} [suppressed=true] Whether or not the user should be suppressed. * @example * // Making the client a speaker * guild.members.me.voice.setSuppressed(false); * @example * // Making the client an audience member * guild.members.me.voice.setSuppressed(true); * @example * // Inviting another user to speak * voiceState.setSuppressed(false); * @example * // Moving another user to the audience, or cancelling their invite to speak * voiceState.setSuppressed(true); * @returns {Promise<VoiceState>} */ setSuppressed(suppressed = true) { return this.edit({ suppressed }); } toJSON() { return super.toJSON({ id: true, serverDeaf: true, serverMute: true, selfDeaf: true, selfMute: true, sessionId: true, channelId: 'channel', }); } } module.exports = VoiceState; node_modules/discord.js/src/structures/UserSelectMenuBuilder.js 0000664 00000001666 15114741631 0021063 0 ustar 00 'use strict'; const { UserSelectMenuBuilder: BuildersUserSelectMenu } = require('@discordjs/builders'); const { isJSONEncodable } = require('@discordjs/util'); const { toSnakeCase } = require('../util/Transformers'); /** * Class used to build select menu components to be sent through the API * @extends {BuildersUserSelectMenu} */ class UserSelectMenuBuilder extends BuildersUserSelectMenu { constructor(data = {}) { super(toSnakeCase(data)); } /** * Creates a new select menu builder from JSON data * @param {UserSelectMenuBuilder|UserSelectMenuComponent|APIUserSelectComponent} other The other data * @returns {UserSelectMenuBuilder} */ static from(other) { return new this(isJSONEncodable(other) ? other.toJSON() : other); } } module.exports = UserSelectMenuBuilder; /** * @external BuildersUserSelectMenu * @see {@link https://discord.js.org/docs/packages/builders/stable/UserSelectMenuBuilder:Class} */ node_modules/discord.js/src/structures/InviteGuild.js 0000664 00000001115 15114741631 0017061 0 ustar 00 'use strict'; const AnonymousGuild = require('./AnonymousGuild'); const WelcomeScreen = require('./WelcomeScreen'); /** * Represents a guild received from an invite, includes welcome screen data if available. * @extends {AnonymousGuild} */ class InviteGuild extends AnonymousGuild { constructor(client, data) { super(client, data); /** * The welcome screen for this invite guild * @type {?WelcomeScreen} */ this.welcomeScreen = data.welcome_screen !== undefined ? new WelcomeScreen(this, data.welcome_screen) : null; } } module.exports = InviteGuild; node_modules/discord.js/src/structures/Invite.js 0000664 00000021521 15114741631 0016077 0 ustar 00 'use strict'; const { RouteBases, Routes, PermissionFlagsBits } = require('discord-api-types/v10'); const Base = require('./Base'); const { GuildScheduledEvent } = require('./GuildScheduledEvent'); const IntegrationApplication = require('./IntegrationApplication'); const InviteStageInstance = require('./InviteStageInstance'); const { DiscordjsError, ErrorCodes } = require('../errors'); /** * Represents an invitation to a guild channel. * @extends {Base} */ class Invite extends Base { /** * A regular expression that matches Discord invite links. * The `code` group property is present on the `exec()` result of this expression. * @type {RegExp} * @memberof Invite */ static InvitesPattern = /discord(?:(?:app)?\.com\/invite|\.gg(?:\/invite)?)\/(?<code>[\w-]{2,255})/i; constructor(client, data) { super(client); /** * The type of this invite * @type {InviteType} */ this.type = data.type; this._patch(data); } _patch(data) { const InviteGuild = require('./InviteGuild'); /** * The guild the invite is for including welcome screen data if present * @type {?(Guild|InviteGuild)} */ this.guild ??= null; if (data.guild) { this.guild = this.client.guilds.cache.get(data.guild.id) ?? new InviteGuild(this.client, data.guild); } if ('code' in data) { /** * The code for this invite * @type {string} */ this.code = data.code; } if ('approximate_presence_count' in data) { /** * The approximate number of online members of the guild this invite is for * <info>This is only available when the invite was fetched through {@link Client#fetchInvite}.</info> * @type {?number} */ this.presenceCount = data.approximate_presence_count; } else { this.presenceCount ??= null; } if ('approximate_member_count' in data) { /** * The approximate total number of members of the guild this invite is for * <info>This is only available when the invite was fetched through {@link Client#fetchInvite}.</info> * @type {?number} */ this.memberCount = data.approximate_member_count; } else { this.memberCount ??= null; } if ('temporary' in data) { /** * Whether or not this invite only grants temporary membership * <info>This is only available when the invite was fetched through {@link GuildInviteManager#fetch} * or created through {@link GuildInviteManager#create}.</info> * @type {?boolean} */ this.temporary = data.temporary ?? null; } else { this.temporary ??= null; } if ('max_age' in data) { /** * The maximum age of the invite, in seconds, 0 if never expires * <info>This is only available when the invite was fetched through {@link GuildInviteManager#fetch} * or created through {@link GuildInviteManager#create}.</info> * @type {?number} */ this.maxAge = data.max_age; } else { this.maxAge ??= null; } if ('uses' in data) { /** * How many times this invite has been used * <info>This is only available when the invite was fetched through {@link GuildInviteManager#fetch} * or created through {@link GuildInviteManager#create}.</info> * @type {?number} */ this.uses = data.uses; } else { this.uses ??= null; } if ('max_uses' in data) { /** * The maximum uses of this invite * <info>This is only available when the invite was fetched through {@link GuildInviteManager#fetch} * or created through {@link GuildInviteManager#create}.</info> * @type {?number} */ this.maxUses = data.max_uses; } else { this.maxUses ??= null; } if ('inviter_id' in data) { /** * The user's id who created this invite * @type {?Snowflake} */ this.inviterId = data.inviter_id; } else { this.inviterId ??= null; } if ('inviter' in data) { this.client.users._add(data.inviter); this.inviterId = data.inviter.id; } if ('target_user' in data) { /** * The user whose stream to display for this voice channel stream invite * @type {?User} */ this.targetUser = this.client.users._add(data.target_user); } else { this.targetUser ??= null; } if ('target_application' in data) { /** * The embedded application to open for this voice channel embedded application invite * @type {?IntegrationApplication} */ this.targetApplication = new IntegrationApplication(this.client, data.target_application); } else { this.targetApplication ??= null; } if ('target_type' in data) { /** * The target type * @type {?InviteTargetType} */ this.targetType = data.target_type; } else { this.targetType ??= null; } if ('channel_id' in data) { /** * The id of the channel this invite is for * @type {?Snowflake} */ this.channelId = data.channel_id; } if ('channel' in data) { /** * The channel this invite is for * @type {?BaseChannel} */ this.channel = this.client.channels._add(data.channel, this.guild, { cache: false }) ?? this.client.channels.resolve(this.channelId); this.channelId ??= data.channel.id; } if ('created_at' in data) { /** * The timestamp this invite was created at * @type {?number} */ this.createdTimestamp = Date.parse(data.created_at); } else { this.createdTimestamp ??= null; } if ('expires_at' in data) { this._expiresTimestamp = data.expires_at && Date.parse(data.expires_at); } else { this._expiresTimestamp ??= null; } if ('stage_instance' in data) { /** * The stage instance data if there is a public {@link StageInstance} in the stage channel this invite is for * @type {?InviteStageInstance} * @deprecated */ this.stageInstance = new InviteStageInstance(this.client, data.stage_instance, this.channel.id, this.guild.id); } else { this.stageInstance ??= null; } if ('guild_scheduled_event' in data) { /** * The guild scheduled event data if there is a {@link GuildScheduledEvent} in the channel this invite is for * @type {?GuildScheduledEvent} */ this.guildScheduledEvent = new GuildScheduledEvent(this.client, data.guild_scheduled_event); } else { this.guildScheduledEvent ??= null; } } /** * The time the invite was created at * @type {?Date} * @readonly */ get createdAt() { return this.createdTimestamp && new Date(this.createdTimestamp); } /** * Whether the invite is deletable by the client user * @type {boolean} * @readonly */ get deletable() { const guild = this.guild; if (!guild || !this.client.guilds.cache.has(guild.id)) return false; if (!guild.members.me) throw new DiscordjsError(ErrorCodes.GuildUncachedMe); return Boolean( this.channel?.permissionsFor(this.client.user).has(PermissionFlagsBits.ManageChannels, false) || guild.members.me.permissions.has(PermissionFlagsBits.ManageGuild), ); } /** * The timestamp the invite will expire at * @type {?number} * @readonly */ get expiresTimestamp() { return ( this._expiresTimestamp ?? (this.createdTimestamp && this.maxAge ? this.createdTimestamp + this.maxAge * 1_000 : null) ); } /** * The time the invite will expire at * @type {?Date} * @readonly */ get expiresAt() { return this.expiresTimestamp && new Date(this.expiresTimestamp); } /** * The user who created this invite * @type {?User} * @readonly */ get inviter() { return this.inviterId && this.client.users.resolve(this.inviterId); } /** * The URL to the invite * @type {string} * @readonly */ get url() { return `${RouteBases.invite}/${this.code}`; } /** * Deletes this invite. * @param {string} [reason] Reason for deleting this invite * @returns {Promise<Invite>} */ async delete(reason) { await this.client.rest.delete(Routes.invite(this.code), { reason }); return this; } /** * When concatenated with a string, this automatically concatenates the invite's URL instead of the object. * @returns {string} * @example * // Logs: Invite: https://discord.gg/A1b2C3 * console.log(`Invite: ${invite}`); */ toString() { return this.url; } toJSON() { return super.toJSON({ url: true, expiresTimestamp: true, presenceCount: false, memberCount: false, uses: false, channel: 'channelId', inviter: 'inviterId', guild: 'guildId', }); } valueOf() { return this.code; } } module.exports = Invite; node_modules/discord.js/src/structures/AnonymousGuild.js 0000664 00000004453 15114741631 0017623 0 ustar 00 'use strict'; const BaseGuild = require('./BaseGuild'); /** * Bundles common attributes and methods between {@link Guild} and {@link InviteGuild} * @extends {BaseGuild} * @abstract */ class AnonymousGuild extends BaseGuild { constructor(client, data, immediatePatch = true) { super(client, data); if (immediatePatch) this._patch(data); } _patch(data) { if ('features' in data) this.features = data.features; if ('splash' in data) { /** * The hash of the guild invite splash image * @type {?string} */ this.splash = data.splash; } if ('banner' in data) { /** * The hash of the guild banner * @type {?string} */ this.banner = data.banner; } if ('description' in data) { /** * The description of the guild, if any * @type {?string} */ this.description = data.description; } if ('verification_level' in data) { /** * The verification level of the guild * @type {GuildVerificationLevel} */ this.verificationLevel = data.verification_level; } if ('vanity_url_code' in data) { /** * The vanity invite code of the guild, if any * @type {?string} */ this.vanityURLCode = data.vanity_url_code; } if ('nsfw_level' in data) { /** * The NSFW level of this guild * @type {GuildNSFWLevel} */ this.nsfwLevel = data.nsfw_level; } if ('premium_subscription_count' in data) { /** * The total number of boosts for this server * @type {?number} */ this.premiumSubscriptionCount = data.premium_subscription_count; } else { this.premiumSubscriptionCount ??= null; } } /** * The URL to this guild's banner. * @param {ImageURLOptions} [options={}] Options for the image URL * @returns {?string} */ bannerURL(options = {}) { return this.banner && this.client.rest.cdn.banner(this.id, this.banner, options); } /** * The URL to this guild's invite splash image. * @param {ImageURLOptions} [options={}] Options for the image URL * @returns {?string} */ splashURL(options = {}) { return this.splash && this.client.rest.cdn.splash(this.id, this.splash, options); } } module.exports = AnonymousGuild; node_modules/discord.js/src/structures/BaseGuildTextChannel.js 0000664 00000015007 15114741631 0020640 0 ustar 00 'use strict'; const GuildChannel = require('./GuildChannel'); const TextBasedChannel = require('./interfaces/TextBasedChannel'); const GuildMessageManager = require('../managers/GuildMessageManager'); const GuildTextThreadManager = require('../managers/GuildTextThreadManager'); /** * Represents a text-based guild channel on Discord. * @extends {GuildChannel} * @implements {TextBasedChannel} */ class BaseGuildTextChannel extends GuildChannel { constructor(guild, data, client) { super(guild, data, client, false); /** * A manager of the messages sent to this channel * @type {GuildMessageManager} */ this.messages = new GuildMessageManager(this); /** * A manager of the threads belonging to this channel * @type {GuildTextThreadManager} */ this.threads = new GuildTextThreadManager(this); /** * If the guild considers this channel NSFW * @type {boolean} */ this.nsfw = Boolean(data.nsfw); this._patch(data); } _patch(data) { super._patch(data); if ('topic' in data) { /** * The topic of the text channel * @type {?string} */ this.topic = data.topic; } if ('nsfw' in data) { this.nsfw = Boolean(data.nsfw); } if ('last_message_id' in data) { /** * The last message id sent in the channel, if one was sent * @type {?Snowflake} */ this.lastMessageId = data.last_message_id; } if ('last_pin_timestamp' in data) { /** * The timestamp when the last pinned message was pinned, if there was one * @type {?number} */ this.lastPinTimestamp = data.last_pin_timestamp ? Date.parse(data.last_pin_timestamp) : null; } if ('default_auto_archive_duration' in data) { /** * The default auto archive duration for newly created threads in this channel * @type {?ThreadAutoArchiveDuration} */ this.defaultAutoArchiveDuration = data.default_auto_archive_duration; } if ('default_thread_rate_limit_per_user' in data) { /** * The initial rate limit per user (slowmode) to set on newly created threads in a channel. * @type {?number} */ this.defaultThreadRateLimitPerUser = data.default_thread_rate_limit_per_user; } else { this.defaultThreadRateLimitPerUser ??= null; } if ('messages' in data) { for (const message of data.messages) this.messages._add(message); } } /** * Sets the default auto archive duration for all newly created threads in this channel. * @param {ThreadAutoArchiveDuration} defaultAutoArchiveDuration The new default auto archive duration * @param {string} [reason] Reason for changing the channel's default auto archive duration * @returns {Promise<TextChannel>} */ setDefaultAutoArchiveDuration(defaultAutoArchiveDuration, reason) { return this.edit({ defaultAutoArchiveDuration, reason }); } /** * Sets the type of this channel. * <info>Only conversion between {@link TextChannel} and {@link NewsChannel} is supported.</info> * @param {ChannelType.GuildText|ChannelType.GuildAnnouncement} type The new channel type * @param {string} [reason] Reason for changing the channel's type * @returns {Promise<GuildChannel>} */ setType(type, reason) { return this.edit({ type, reason }); } /** * Sets a new topic for the guild channel. * @param {?string} topic The new topic for the guild channel * @param {string} [reason] Reason for changing the guild channel's topic * @returns {Promise<GuildChannel>} * @example * // Set a new channel topic * channel.setTopic('needs more rate limiting') * .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`)) * .catch(console.error); */ setTopic(topic, reason) { return this.edit({ topic, reason }); } /** * Data that can be resolved to an Application. This can be: * * An Application * * An Activity with associated Application * * A Snowflake * @typedef {Application|Snowflake} ApplicationResolvable */ /** * Options used to create an invite to a guild channel. * @typedef {Object} InviteCreateOptions * @property {boolean} [temporary] Whether members that joined via the invite should be automatically * kicked after 24 hours if they have not yet received a role * @property {number} [maxAge] How long the invite should last (in seconds, 0 for forever) * @property {number} [maxUses] Maximum number of uses * @property {boolean} [unique] Create a unique invite, or use an existing one with similar settings * @property {UserResolvable} [targetUser] The user whose stream to display for this invite, * required if `targetType` is {@link InviteTargetType.Stream}, the user must be streaming in the channel * @property {ApplicationResolvable} [targetApplication] The embedded application to open for this invite, * required if `targetType` is {@link InviteTargetType.Stream}, the application must have the * {@link InviteTargetType.EmbeddedApplication} flag * @property {InviteTargetType} [targetType] The type of the target for this voice channel invite * @property {string} [reason] The reason for creating the invite */ /** * Creates an invite to this guild channel. * @param {InviteCreateOptions} [options={}] The options for creating the invite * @returns {Promise<Invite>} * @example * // Create an invite to a channel * channel.createInvite() * .then(invite => console.log(`Created an invite with a code of ${invite.code}`)) * .catch(console.error); */ createInvite(options) { return this.guild.invites.create(this.id, options); } /** * Fetches a collection of invites to this guild channel. * Resolves with a collection mapping invites by their codes. * @param {boolean} [cache=true] Whether or not to cache the fetched invites * @returns {Promise<Collection<string, Invite>>} */ fetchInvites(cache = true) { return this.guild.invites.fetch({ channelId: this.id, cache }); } // These are here only for documentation purposes - they are implemented by TextBasedChannel /* eslint-disable no-empty-function */ get lastMessage() {} get lastPinAt() {} send() {} sendTyping() {} createMessageCollector() {} awaitMessages() {} createMessageComponentCollector() {} awaitMessageComponent() {} bulkDelete() {} fetchWebhooks() {} createWebhook() {} setRateLimitPerUser() {} setNSFW() {} } TextBasedChannel.applyToClass(BaseGuildTextChannel, true); module.exports = BaseGuildTextChannel; node_modules/discord.js/src/structures/User.js 0000664 00000026353 15114741631 0015567 0 ustar 00 'use strict'; const { userMention } = require('@discordjs/formatters'); const { calculateUserDefaultAvatarIndex } = require('@discordjs/rest'); const { DiscordSnowflake } = require('@sapphire/snowflake'); const Base = require('./Base'); const TextBasedChannel = require('./interfaces/TextBasedChannel'); const UserFlagsBitField = require('../util/UserFlagsBitField'); const { emitDeprecationWarningForUserFetchFlags } = require('../util/Util'); /** * Represents a user on Discord. * @implements {TextBasedChannel} * @extends {Base} */ class User extends Base { constructor(client, data) { super(client); /** * The user's id * @type {Snowflake} */ this.id = data.id; this.bot = null; this.system = null; this.flags = null; this._patch(data); } _patch(data) { if ('username' in data) { /** * The username of the user * @type {?string} */ this.username = data.username; } else { this.username ??= null; } if ('global_name' in data) { /** * The global name of this user * @type {?string} */ this.globalName = data.global_name; } else { this.globalName ??= null; } if ('bot' in data) { /** * Whether or not the user is a bot * @type {?boolean} */ this.bot = Boolean(data.bot); } else if (!this.partial && typeof this.bot !== 'boolean') { this.bot = false; } if ('discriminator' in data) { /** * The discriminator of this user * <info>`'0'`, or a 4-digit stringified number if they're using the legacy username system</info> * @type {?string} */ this.discriminator = data.discriminator; } else { this.discriminator ??= null; } if ('avatar' in data) { /** * The user avatar's hash * @type {?string} */ this.avatar = data.avatar; } else { this.avatar ??= null; } if ('banner' in data) { /** * The user banner's hash * <info>The user must be force fetched for this property to be present or be updated</info> * @type {?string} */ this.banner = data.banner; } else if (this.banner !== null) { this.banner ??= undefined; } if ('accent_color' in data) { /** * The base 10 accent color of the user's banner * <info>The user must be force fetched for this property to be present or be updated</info> * @type {?number} */ this.accentColor = data.accent_color; } else if (this.accentColor !== null) { this.accentColor ??= undefined; } if ('system' in data) { /** * Whether the user is an Official Discord System user (part of the urgent message system) * @type {?boolean} */ this.system = Boolean(data.system); } else if (!this.partial && typeof this.system !== 'boolean') { this.system = false; } if ('public_flags' in data) { /** * The flags for this user * @type {?UserFlagsBitField} */ this.flags = new UserFlagsBitField(data.public_flags); } if ('avatar_decoration' in data) { /** * The user avatar decoration's hash * @type {?string} * @deprecated Use `avatarDecorationData` instead */ this.avatarDecoration = data.avatar_decoration; } else { this.avatarDecoration ??= null; } /** * @typedef {Object} AvatarDecorationData * @property {string} asset The avatar decoration hash * @property {Snowflake} skuId The id of the avatar decoration's SKU */ if (data.avatar_decoration_data) { /** * The user avatar decoration's data * @type {?AvatarDecorationData} */ this.avatarDecorationData = { asset: data.avatar_decoration_data.asset, skuId: data.avatar_decoration_data.sku_id, }; } else { this.avatarDecorationData = null; } } /** * Whether this User is a partial * @type {boolean} * @readonly */ get partial() { return typeof this.username !== 'string'; } /** * The timestamp the user was created at * @type {number} * @readonly */ get createdTimestamp() { return DiscordSnowflake.timestampFrom(this.id); } /** * The time the user was created at * @type {Date} * @readonly */ get createdAt() { return new Date(this.createdTimestamp); } /** * A link to the user's avatar. * @param {ImageURLOptions} [options={}] Options for the image URL * @returns {?string} */ avatarURL(options = {}) { return this.avatar && this.client.rest.cdn.avatar(this.id, this.avatar, options); } /** * A link to the user's avatar decoration. * @param {BaseImageURLOptions} [options={}] Options for the image URL * @returns {?string} */ avatarDecorationURL(options = {}) { if (this.avatarDecorationData) { return this.client.rest.cdn.avatarDecoration(this.avatarDecorationData.asset); } return this.avatarDecoration && this.client.rest.cdn.avatarDecoration(this.id, this.avatarDecoration, options); } /** * A link to the user's default avatar * @type {string} * @readonly */ get defaultAvatarURL() { const index = this.discriminator === '0' ? calculateUserDefaultAvatarIndex(this.id) : this.discriminator % 5; return this.client.rest.cdn.defaultAvatar(index); } /** * A link to the user's avatar if they have one. * Otherwise a link to their default avatar will be returned. * @param {ImageURLOptions} [options={}] Options for the image URL * @returns {string} */ displayAvatarURL(options) { return this.avatarURL(options) ?? this.defaultAvatarURL; } /** * The hexadecimal version of the user accent color, with a leading hash * <info>The user must be force fetched for this property to be present</info> * @type {?string} * @readonly */ get hexAccentColor() { if (typeof this.accentColor !== 'number') return this.accentColor; return `#${this.accentColor.toString(16).padStart(6, '0')}`; } /** * A link to the user's banner. See {@link User#banner} for more info * @param {ImageURLOptions} [options={}] Options for the image URL * @returns {?string} */ bannerURL(options = {}) { return this.banner && this.client.rest.cdn.banner(this.id, this.banner, options); } /** * The tag of this user * <info>This user's username, or their legacy tag (e.g. `hydrabolt#0001`) * if they're using the legacy username system</info> * @type {?string} * @readonly */ get tag() { return typeof this.username === 'string' ? this.discriminator === '0' ? this.username : `${this.username}#${this.discriminator}` : null; } /** * The global name of this user, or their username if they don't have one * @type {?string} * @readonly */ get displayName() { return this.globalName ?? this.username; } /** * The DM between the client's user and this user * @type {?DMChannel} * @readonly */ get dmChannel() { return this.client.users.dmChannel(this.id); } /** * Creates a DM channel between the client and the user. * @param {boolean} [force=false] Whether to skip the cache check and request the API * @returns {Promise<DMChannel>} */ createDM(force = false) { return this.client.users.createDM(this.id, { force }); } /** * Deletes a DM channel (if one exists) between the client and the user. Resolves with the channel if successful. * @returns {Promise<DMChannel>} */ deleteDM() { return this.client.users.deleteDM(this.id); } /** * Checks if the user is equal to another. * It compares id, username, discriminator, avatar, banner, accent color, and bot flags. * It is recommended to compare equality by using `user.id === user2.id` unless you want to compare all properties. * @param {User} user User to compare with * @returns {boolean} */ equals(user) { return ( user && this.id === user.id && this.username === user.username && this.discriminator === user.discriminator && this.globalName === user.globalName && this.avatar === user.avatar && this.flags?.bitfield === user.flags?.bitfield && this.banner === user.banner && this.accentColor === user.accentColor && this.avatarDecoration === user.avatarDecoration && this.avatarDecorationData?.asset === user.avatarDecorationData?.asset && this.avatarDecorationData?.skuId === user.avatarDecorationData?.skuId ); } /** * Compares the user with an API user object * @param {APIUser} user The API user object to compare * @returns {boolean} * @private */ _equals(user) { return ( user && this.id === user.id && this.username === user.username && this.discriminator === user.discriminator && this.globalName === user.global_name && this.avatar === user.avatar && this.flags?.bitfield === user.public_flags && ('banner' in user ? this.banner === user.banner : true) && ('accent_color' in user ? this.accentColor === user.accent_color : true) && ('avatar_decoration' in user ? this.avatarDecoration === user.avatar_decoration : true) && ('avatar_decoration_data' in user ? this.avatarDecorationData?.asset === user.avatar_decoration_data?.asset && this.avatarDecorationData?.skuId === user.avatar_decoration_data?.sku_id : true) ); } /** * Fetches this user's flags. * @param {boolean} [force=false] Whether to skip the cache check and request the API * @returns {Promise<UserFlagsBitField>} * @deprecated <warn>This method is deprecated and will be removed in the next major version. * Flags may still be retrieved via {@link User#fetch}.</warn> */ fetchFlags(force = false) { emitDeprecationWarningForUserFetchFlags(this.constructor.name); return this.client.users.fetchFlags(this.id, { force }); } /** * Fetches this user. * @param {boolean} [force=true] Whether to skip the cache check and request the API * @returns {Promise<User>} */ fetch(force = true) { return this.client.users.fetch(this.id, { force }); } /** * When concatenated with a string, this automatically returns the user's mention instead of the User object. * @returns {string} * @example * // Logs: Hello from <@123456789012345678>! * console.log(`Hello from ${user}!`); */ toString() { return userMention(this.id); } toJSON(...props) { const json = super.toJSON( { createdTimestamp: true, defaultAvatarURL: true, hexAccentColor: true, tag: true, }, ...props, ); json.avatarURL = this.avatarURL(); json.displayAvatarURL = this.displayAvatarURL(); json.bannerURL = this.banner ? this.bannerURL() : this.banner; return json; } } /** * Sends a message to this user. * @method send * @memberof User * @instance * @param {string|MessagePayload|MessageCreateOptions} options The options to provide * @returns {Promise<Message>} * @example * // Send a direct message * user.send('Hello!') * .then(message => console.log(`Sent message: ${message.content} to ${user.tag}`)) * .catch(console.error); */ TextBasedChannel.applyToClass(User); module.exports = User; node_modules/discord.js/src/structures/ApplicationRoleConnectionMetadata.js 0000664 00000002061 15114741631 0023405 0 ustar 00 'use strict'; /** * Role connection metadata object for an application. */ class ApplicationRoleConnectionMetadata { constructor(data) { /** * The name of this metadata field * @type {string} */ this.name = data.name; /** * The name localizations for this metadata field * @type {?Object<Locale, string>} */ this.nameLocalizations = data.name_localizations ?? null; /** * The description of this metadata field * @type {string} */ this.description = data.description; /** * The description localizations for this metadata field * @type {?Object<Locale, string>} */ this.descriptionLocalizations = data.description_localizations ?? null; /** * The dictionary key for this metadata field * @type {string} */ this.key = data.key; /** * The type of this metadata field * @type {ApplicationRoleConnectionMetadataType} */ this.type = data.type; } } exports.ApplicationRoleConnectionMetadata = ApplicationRoleConnectionMetadata; node_modules/discord.js/src/structures/GuildChannel.js 0000664 00000036433 15114741631 0017206 0 ustar 00 'use strict'; const { Snowflake } = require('@sapphire/snowflake'); const { PermissionFlagsBits, ChannelType } = require('discord-api-types/v10'); const { BaseChannel } = require('./BaseChannel'); const { DiscordjsError, ErrorCodes } = require('../errors'); const PermissionOverwriteManager = require('../managers/PermissionOverwriteManager'); const { VoiceBasedChannelTypes } = require('../util/Constants'); const PermissionsBitField = require('../util/PermissionsBitField'); const { getSortableGroupTypes } = require('../util/Util'); /** * Represents a guild channel from any of the following: * - {@link TextChannel} * - {@link VoiceChannel} * - {@link CategoryChannel} * - {@link NewsChannel} * - {@link StageChannel} * - {@link ForumChannel} * - {@link MediaChannel} * @extends {BaseChannel} * @abstract */ class GuildChannel extends BaseChannel { constructor(guild, data, client, immediatePatch = true) { super(client, data, false); /** * The guild the channel is in * @type {Guild} */ this.guild = guild; /** * The id of the guild the channel is in * @type {Snowflake} */ this.guildId = guild?.id ?? data.guild_id; /** * A manager of permission overwrites that belong to this channel * @type {PermissionOverwriteManager} */ this.permissionOverwrites = new PermissionOverwriteManager(this); if (data && immediatePatch) this._patch(data); } _patch(data) { super._patch(data); if ('name' in data) { /** * The name of the guild channel * @type {string} */ this.name = data.name; } if ('position' in data) { /** * The raw position of the channel from Discord * @type {number} */ this.rawPosition = data.position; } if ('guild_id' in data) { this.guildId = data.guild_id; } if ('parent_id' in data) { /** * The id of the category parent of this channel * @type {?Snowflake} */ this.parentId = data.parent_id; } else { this.parentId ??= null; } if ('permission_overwrites' in data) { this.permissionOverwrites.cache.clear(); for (const overwrite of data.permission_overwrites) { this.permissionOverwrites._add(overwrite); } } } _clone() { const clone = super._clone(); clone.permissionOverwrites = new PermissionOverwriteManager(clone, this.permissionOverwrites.cache.values()); return clone; } /** * The category parent of this channel * @type {?CategoryChannel} * @readonly */ get parent() { return this.guild.channels.resolve(this.parentId); } /** * If the permissionOverwrites match the parent channel, null if no parent * @type {?boolean} * @readonly */ get permissionsLocked() { if (!this.parent) return null; // Get all overwrites const overwriteIds = new Set([ ...this.permissionOverwrites.cache.keys(), ...this.parent.permissionOverwrites.cache.keys(), ]); // Compare all overwrites return [...overwriteIds].every(key => { const channelVal = this.permissionOverwrites.cache.get(key); const parentVal = this.parent.permissionOverwrites.cache.get(key); // Handle empty overwrite if ( (!channelVal && parentVal.deny.bitfield === PermissionsBitField.DefaultBit && parentVal.allow.bitfield === PermissionsBitField.DefaultBit) || (!parentVal && channelVal.deny.bitfield === PermissionsBitField.DefaultBit && channelVal.allow.bitfield === PermissionsBitField.DefaultBit) ) { return true; } // Compare overwrites return ( channelVal !== undefined && parentVal !== undefined && channelVal.deny.bitfield === parentVal.deny.bitfield && channelVal.allow.bitfield === parentVal.allow.bitfield ); }); } /** * The position of the channel * @type {number} * @readonly */ get position() { const selfIsCategory = this.type === ChannelType.GuildCategory; const types = getSortableGroupTypes(this.type); let count = 0; for (const channel of this.guild.channels.cache.values()) { if (!types.includes(channel.type)) continue; if (!selfIsCategory && channel.parentId !== this.parentId) continue; if (this.rawPosition === channel.rawPosition) { if (Snowflake.compare(channel.id, this.id) === -1) count++; } else if (this.rawPosition > channel.rawPosition) { count++; } } return count; } /** * Gets the overall set of permissions for a member or role in this channel, taking into account channel overwrites. * @param {GuildMemberResolvable|RoleResolvable} memberOrRole The member or role to obtain the overall permissions for * @param {boolean} [checkAdmin=true] Whether having the {@link PermissionFlagsBits.Administrator} permission * will return all permissions * @returns {?Readonly<PermissionsBitField>} */ permissionsFor(memberOrRole, checkAdmin = true) { const member = this.guild.members.resolve(memberOrRole); if (member) return this.memberPermissions(member, checkAdmin); const role = this.guild.roles.resolve(memberOrRole); return role && this.rolePermissions(role, checkAdmin); } overwritesFor(member, verified = false, roles = null) { if (!verified) member = this.guild.members.resolve(member); if (!member) return []; roles ??= member.roles.cache; const roleOverwrites = []; let memberOverwrites; let everyoneOverwrites; for (const overwrite of this.permissionOverwrites.cache.values()) { if (overwrite.id === this.guild.id) { everyoneOverwrites = overwrite; } else if (roles.has(overwrite.id)) { roleOverwrites.push(overwrite); } else if (overwrite.id === member.id) { memberOverwrites = overwrite; } } return { everyone: everyoneOverwrites, roles: roleOverwrites, member: memberOverwrites, }; } /** * Gets the overall set of permissions for a member in this channel, taking into account channel overwrites. * @param {GuildMember} member The member to obtain the overall permissions for * @param {boolean} checkAdmin Whether having the {@link PermissionFlagsBits.Administrator} permission * will return all permissions * @returns {Readonly<PermissionsBitField>} * @private */ memberPermissions(member, checkAdmin) { if (checkAdmin && member.id === this.guild.ownerId) { return new PermissionsBitField(PermissionsBitField.All).freeze(); } const roles = member.roles.cache; const permissions = new PermissionsBitField(roles.map(role => role.permissions)); if (checkAdmin && permissions.has(PermissionFlagsBits.Administrator)) { return new PermissionsBitField(PermissionsBitField.All).freeze(); } const overwrites = this.overwritesFor(member, true, roles); return permissions .remove(overwrites.everyone?.deny ?? PermissionsBitField.DefaultBit) .add(overwrites.everyone?.allow ?? PermissionsBitField.DefaultBit) .remove(overwrites.roles.length > 0 ? overwrites.roles.map(role => role.deny) : PermissionsBitField.DefaultBit) .add(overwrites.roles.length > 0 ? overwrites.roles.map(role => role.allow) : PermissionsBitField.DefaultBit) .remove(overwrites.member?.deny ?? PermissionsBitField.DefaultBit) .add(overwrites.member?.allow ?? PermissionsBitField.DefaultBit) .freeze(); } /** * Gets the overall set of permissions for a role in this channel, taking into account channel overwrites. * @param {Role} role The role to obtain the overall permissions for * @param {boolean} checkAdmin Whether having the {@link PermissionFlagsBits.Administrator} permission * will return all permissions * @returns {Readonly<PermissionsBitField>} * @private */ rolePermissions(role, checkAdmin) { if (checkAdmin && role.permissions.has(PermissionFlagsBits.Administrator)) { return new PermissionsBitField(PermissionsBitField.All).freeze(); } const everyoneOverwrites = this.permissionOverwrites.cache.get(this.guild.id); const roleOverwrites = this.permissionOverwrites.cache.get(role.id); return role.permissions .remove(everyoneOverwrites?.deny ?? PermissionsBitField.DefaultBit) .add(everyoneOverwrites?.allow ?? PermissionsBitField.DefaultBit) .remove(roleOverwrites?.deny ?? PermissionsBitField.DefaultBit) .add(roleOverwrites?.allow ?? PermissionsBitField.DefaultBit) .freeze(); } /** * Locks in the permission overwrites from the parent channel. * @returns {Promise<GuildChannel>} */ async lockPermissions() { if (!this.parent) throw new DiscordjsError(ErrorCodes.GuildChannelOrphan); const permissionOverwrites = this.parent.permissionOverwrites.cache.map(overwrite => overwrite.toJSON()); return this.edit({ permissionOverwrites }); } /** * A collection of cached members of this channel, mapped by their ids. * Members that can view this channel, if the channel is text-based. * Members in the channel, if the channel is voice-based. * @type {Collection<Snowflake, GuildMember>} * @readonly */ get members() { return this.guild.members.cache.filter(member => this.permissionsFor(member).has(PermissionFlagsBits.ViewChannel, false), ); } /** * Edits the channel. * @param {GuildChannelEditOptions} options The options to provide * @returns {Promise<GuildChannel>} * @example * // Edit a channel * channel.edit({ name: 'new-channel' }) * .then(console.log) * .catch(console.error); */ edit(options) { return this.guild.channels.edit(this, options); } /** * Sets a new name for the guild channel. * @param {string} name The new name for the guild channel * @param {string} [reason] Reason for changing the guild channel's name * @returns {Promise<GuildChannel>} * @example * // Set a new channel name * channel.setName('not_general') * .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`)) * .catch(console.error); */ setName(name, reason) { return this.edit({ name, reason }); } /** * Options used to set the parent of a channel. * @typedef {Object} SetParentOptions * @property {boolean} [lockPermissions=true] Whether to lock the permissions to what the parent's permissions are * @property {string} [reason] The reason for modifying the parent of the channel */ /** * Sets the parent of this channel. * @param {?CategoryChannelResolvable} channel The category channel to set as the parent * @param {SetParentOptions} [options={}] The options for setting the parent * @returns {Promise<GuildChannel>} * @example * // Add a parent to a channel * message.channel.setParent('355908108431917066', { lockPermissions: false }) * .then(channel => console.log(`New parent of ${message.channel.name}: ${channel.name}`)) * .catch(console.error); */ setParent(channel, { lockPermissions = true, reason } = {}) { return this.edit({ parent: channel ?? null, lockPermissions, reason, }); } /** * Options used to set the position of a channel. * @typedef {Object} SetChannelPositionOptions * @property {boolean} [relative=false] Whether or not to change the position relative to its current value * @property {string} [reason] The reason for changing the position */ /** * Sets a new position for the guild channel. * @param {number} position The new position for the guild channel * @param {SetChannelPositionOptions} [options] Options for setting position * @returns {Promise<GuildChannel>} * @example * // Set a new channel position * channel.setPosition(2) * .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`)) * .catch(console.error); */ setPosition(position, options = {}) { return this.guild.channels.setPosition(this, position, options); } /** * Options used to clone a guild channel. * @typedef {GuildChannelCreateOptions} GuildChannelCloneOptions * @property {string} [name=this.name] Name of the new channel */ /** * Clones this channel. * @param {GuildChannelCloneOptions} [options] The options for cloning this channel * @returns {Promise<GuildChannel>} */ clone(options = {}) { return this.guild.channels.create({ name: options.name ?? this.name, permissionOverwrites: this.permissionOverwrites.cache, topic: this.topic, type: this.type, nsfw: this.nsfw, parent: this.parent, bitrate: this.bitrate, userLimit: this.userLimit, rateLimitPerUser: this.rateLimitPerUser, position: this.rawPosition, reason: null, ...options, }); } /** * Checks if this channel has the same type, topic, position, name, overwrites, and id as another channel. * In most cases, a simple `channel.id === channel2.id` will do, and is much faster too. * @param {GuildChannel} channel Channel to compare with * @returns {boolean} */ equals(channel) { let equal = channel && this.id === channel.id && this.type === channel.type && this.topic === channel.topic && this.position === channel.position && this.name === channel.name; if (equal) { if (this.permissionOverwrites && channel.permissionOverwrites) { equal = this.permissionOverwrites.cache.equals(channel.permissionOverwrites.cache); } else { equal = !this.permissionOverwrites && !channel.permissionOverwrites; } } return equal; } /** * Whether the channel is deletable by the client user * @type {boolean} * @readonly */ get deletable() { return this.manageable && this.guild.rulesChannelId !== this.id && this.guild.publicUpdatesChannelId !== this.id; } /** * Whether the channel is manageable by the client user * @type {boolean} * @readonly */ get manageable() { if (this.client.user.id === this.guild.ownerId) return true; const permissions = this.permissionsFor(this.client.user); if (!permissions) return false; // This flag allows managing even if timed out if (permissions.has(PermissionFlagsBits.Administrator, false)) return true; if (this.guild.members.me.communicationDisabledUntilTimestamp > Date.now()) return false; const bitfield = VoiceBasedChannelTypes.includes(this.type) ? PermissionFlagsBits.ManageChannels | PermissionFlagsBits.Connect : PermissionFlagsBits.ViewChannel | PermissionFlagsBits.ManageChannels; return permissions.has(bitfield, false); } /** * Whether the channel is viewable by the client user * @type {boolean} * @readonly */ get viewable() { if (this.client.user.id === this.guild.ownerId) return true; const permissions = this.permissionsFor(this.client.user); if (!permissions) return false; return permissions.has(PermissionFlagsBits.ViewChannel, false); } /** * Deletes this channel. * @param {string} [reason] Reason for deleting this channel * @returns {Promise<GuildChannel>} * @example * // Delete the channel * channel.delete('making room for new channels') * .then(console.log) * .catch(console.error); */ async delete(reason) { await this.guild.channels.delete(this.id, reason); return this; } } module.exports = GuildChannel; node_modules/discord.js/src/structures/ModalBuilder.js 0000664 00000001722 15114741631 0017205 0 ustar 00 'use strict'; const { ModalBuilder: BuildersModal, ComponentBuilder } = require('@discordjs/builders'); const { isJSONEncodable } = require('@discordjs/util'); const { toSnakeCase } = require('../util/Transformers'); /** * Represents a modal builder. * @extends {BuildersModal} */ class ModalBuilder extends BuildersModal { constructor({ components, ...data } = {}) { super({ ...toSnakeCase(data), components: components?.map(component => component instanceof ComponentBuilder ? component : toSnakeCase(component), ), }); } /** * Creates a new modal builder from JSON data * @param {ModalBuilder|APIModalComponent} other The other data * @returns {ModalBuilder} */ static from(other) { return new this(isJSONEncodable(other) ? other.toJSON() : other); } } module.exports = ModalBuilder; /** * @external BuildersModal * @see {@link https://discord.js.org/docs/packages/builders/stable/ModalBuilder:Class} */ node_modules/discord.js/src/structures/WidgetMember.js 0000664 00000003600 15114741631 0017212 0 ustar 00 'use strict'; const Base = require('./Base'); /** * Represents a WidgetMember. * @extends {Base} */ class WidgetMember extends Base { /** * Activity sent in a {@link WidgetMember}. * @typedef {Object} WidgetActivity * @property {string} name The name of the activity */ constructor(client, data) { super(client); /** * The id of the user. It's an arbitrary number. * @type {string} */ this.id = data.id; /** * The username of the member. * @type {string} */ this.username = data.username; /** * The discriminator of the member. * @type {string} */ this.discriminator = data.discriminator; /** * The avatar of the member. * @type {?string} */ this.avatar = data.avatar; /** * The status of the member. * @type {PresenceStatus} */ this.status = data.status; /** * If the member is server deafened * @type {?boolean} */ this.deaf = data.deaf ?? null; /** * If the member is server muted * @type {?boolean} */ this.mute = data.mute ?? null; /** * If the member is self deafened * @type {?boolean} */ this.selfDeaf = data.self_deaf ?? null; /** * If the member is self muted * @type {?boolean} */ this.selfMute = data.self_mute ?? null; /** * If the member is suppressed * @type {?boolean} */ this.suppress = data.suppress ?? null; /** * The id of the voice channel the member is in, if any * @type {?Snowflake} */ this.channelId = data.channel_id ?? null; /** * The avatar URL of the member. * @type {string} */ this.avatarURL = data.avatar_url; /** * The activity of the member. * @type {?WidgetActivity} */ this.activity = data.activity ?? null; } } module.exports = WidgetMember; node_modules/discord.js/src/structures/StageInstance.js 0000664 00000007724 15114741631 0017402 0 ustar 00 'use strict'; const { DiscordSnowflake } = require('@sapphire/snowflake'); const Base = require('./Base'); /** * Represents a stage instance. * @extends {Base} */ class StageInstance extends Base { constructor(client, data) { super(client); /** * The stage instance's id * @type {Snowflake} */ this.id = data.id; this._patch(data); } _patch(data) { if ('guild_id' in data) { /** * The id of the guild associated with the stage channel * @type {Snowflake} */ this.guildId = data.guild_id; } if ('channel_id' in data) { /** * The id of the channel associated with the stage channel * @type {Snowflake} */ this.channelId = data.channel_id; } if ('topic' in data) { /** * The topic of the stage instance * @type {string} */ this.topic = data.topic; } if ('privacy_level' in data) { /** * The privacy level of the stage instance * @type {StageInstancePrivacyLevel} */ this.privacyLevel = data.privacy_level; } if ('discoverable_disabled' in data) { /** * Whether or not stage discovery is disabled * @type {?boolean} * @deprecated See https://github.com/discord/discord-api-docs/pull/4296 for more information */ this.discoverableDisabled = data.discoverable_disabled; } else { this.discoverableDisabled ??= null; } if ('guild_scheduled_event_id' in data) { /** * The associated guild scheduled event id of this stage instance * @type {?Snowflake} */ this.guildScheduledEventId = data.guild_scheduled_event_id; } else { this.guildScheduledEventId ??= null; } } /** * The stage channel associated with this stage instance * @type {?StageChannel} * @readonly */ get channel() { return this.client.channels.resolve(this.channelId); } /** * The guild this stage instance belongs to * @type {?Guild} * @readonly */ get guild() { return this.client.guilds.resolve(this.guildId); } /** * The associated guild scheduled event of this stage instance * @type {?GuildScheduledEvent} * @readonly */ get guildScheduledEvent() { return this.guild?.scheduledEvents.resolve(this.guildScheduledEventId) ?? null; } /** * Edits this stage instance. * @param {StageInstanceEditOptions} options The options to edit the stage instance * @returns {Promise<StageInstance>} * @example * // Edit a stage instance * stageInstance.edit({ topic: 'new topic' }) * .then(stageInstance => console.log(stageInstance)) * .catch(console.error) */ edit(options) { return this.guild.stageInstances.edit(this.channelId, options); } /** * Deletes this stage instance. * @returns {Promise<StageInstance>} * @example * // Delete a stage instance * stageInstance.delete() * .then(stageInstance => console.log(stageInstance)) * .catch(console.error); */ async delete() { await this.guild.stageInstances.delete(this.channelId); const clone = this._clone(); return clone; } /** * Sets the topic of this stage instance. * @param {string} topic The topic for the stage instance * @returns {Promise<StageInstance>} * @example * // Set topic of a stage instance * stageInstance.setTopic('new topic') * .then(stageInstance => console.log(`Set the topic to: ${stageInstance.topic}`)) * .catch(console.error); */ setTopic(topic) { return this.guild.stageInstances.edit(this.channelId, { topic }); } /** * The timestamp this stage instances was created at * @type {number} * @readonly */ get createdTimestamp() { return DiscordSnowflake.timestampFrom(this.id); } /** * The time this stage instance was created at * @type {Date} * @readonly */ get createdAt() { return new Date(this.createdTimestamp); } } exports.StageInstance = StageInstance; node_modules/discord.js/src/structures/InteractionWebhook.js 0000664 00000003342 15114741631 0020440 0 ustar 00 'use strict'; const Webhook = require('./Webhook'); /** * Represents a webhook for an Interaction * @implements {Webhook} */ class InteractionWebhook { /** * @param {Client} client The instantiating client * @param {Snowflake} id The application's id * @param {string} token The interaction's token */ constructor(client, id, token) { /** * The client that instantiated the interaction webhook * @name InteractionWebhook#client * @type {Client} * @readonly */ Object.defineProperty(this, 'client', { value: client }); this.id = id; Object.defineProperty(this, 'token', { value: token, writable: true, configurable: true }); } // These are here only for documentation purposes - they are implemented by Webhook /* eslint-disable no-empty-function */ /** * Sends a message with this webhook. * @param {string|MessagePayload|InteractionReplyOptions} options The content for the reply * @returns {Promise<Message>} */ send() {} /** * Gets a message that was sent by this webhook. * @param {Snowflake|'@original'} message The id of the message to fetch * @returns {Promise<Message>} Returns the message sent by this webhook */ fetchMessage() {} /** * Edits a message that was sent by this webhook. * @param {MessageResolvable|'@original'} message The message to edit * @param {string|MessagePayload|WebhookMessageEditOptions} options The options to provide * @returns {Promise<Message>} Returns the message edited by this webhook */ editMessage() {} deleteMessage() {} get url() {} } Webhook.applyToClass(InteractionWebhook, ['sendSlackMessage', 'edit', 'delete', 'createdTimestamp', 'createdAt']); module.exports = InteractionWebhook; node_modules/discord.js/src/structures/WelcomeChannel.js 0000664 00000002305 15114741631 0017524 0 ustar 00 'use strict'; const Base = require('./Base'); const { Emoji } = require('./Emoji'); /** * Represents a channel link in a guild's welcome screen. * @extends {Base} */ class WelcomeChannel extends Base { constructor(guild, data) { super(guild.client); /** * The guild for this welcome channel * @type {Guild|InviteGuild} */ this.guild = guild; /** * The description of this welcome channel * @type {string} */ this.description = data.description; /** * The raw emoji data * @type {Object} * @private */ this._emoji = { name: data.emoji_name, id: data.emoji_id, }; /** * The id of this welcome channel * @type {Snowflake} */ this.channelId = data.channel_id; } /** * The channel of this welcome channel * @type {?(TextChannel|NewsChannel|ForumChannel|MediaChannel)} */ get channel() { return this.client.channels.resolve(this.channelId); } /** * The emoji of this welcome channel * @type {GuildEmoji|Emoji} */ get emoji() { return this.client.emojis.cache.get(this._emoji.id) ?? new Emoji(this.client, this._emoji); } } module.exports = WelcomeChannel; node_modules/discord.js/src/structures/TextInputComponent.js 0000664 00000000744 15114741631 0020474 0 ustar 00 'use strict'; const Component = require('./Component'); /** * Represents a text input component. * @extends {Component} */ class TextInputComponent extends Component { /** * The custom id of this text input * @type {string} * @readonly */ get customId() { return this.data.custom_id; } /** * The value for this text input * @type {string} * @readonly */ get value() { return this.data.value; } } module.exports = TextInputComponent; node_modules/discord.js/src/structures/ThreadChannel.js 0000664 00000047352 15114741631 0017353 0 ustar 00 'use strict'; const { DiscordAPIError } = require('@discordjs/rest'); const { lazy } = require('@discordjs/util'); const { RESTJSONErrorCodes, ChannelFlags, ChannelType, PermissionFlagsBits, Routes } = require('discord-api-types/v10'); const { BaseChannel } = require('./BaseChannel'); const getThreadOnlyChannel = lazy(() => require('./ThreadOnlyChannel')); const TextBasedChannel = require('./interfaces/TextBasedChannel'); const { DiscordjsRangeError, ErrorCodes } = require('../errors'); const GuildMessageManager = require('../managers/GuildMessageManager'); const ThreadMemberManager = require('../managers/ThreadMemberManager'); const ChannelFlagsBitField = require('../util/ChannelFlagsBitField'); /** * Represents a thread channel on Discord. * @extends {BaseChannel} * @implements {TextBasedChannel} */ class ThreadChannel extends BaseChannel { constructor(guild, data, client) { super(guild?.client ?? client, data, false); /** * The guild the thread is in * @type {Guild} */ this.guild = guild; /** * The id of the guild the channel is in * @type {Snowflake} */ this.guildId = guild?.id ?? data.guild_id; /** * The id of the member who created this thread * @type {Snowflake} */ this.ownerId = data.owner_id; /** * A manager of the messages sent to this thread * @type {GuildMessageManager} */ this.messages = new GuildMessageManager(this); /** * A manager of the members that are part of this thread * @type {ThreadMemberManager} */ this.members = new ThreadMemberManager(this); if (data) this._patch(data); } _patch(data) { super._patch(data); if ('message' in data) this.messages._add(data.message); if ('name' in data) { /** * The name of the thread * @type {string} */ this.name = data.name; } if ('guild_id' in data) { this.guildId = data.guild_id; } if ('parent_id' in data) { /** * The id of the parent channel of this thread * @type {?Snowflake} */ this.parentId = data.parent_id; } else { this.parentId ??= null; } if ('thread_metadata' in data) { /** * Whether the thread is locked * @type {?boolean} */ this.locked = data.thread_metadata.locked ?? false; /** * Whether members without the {@link PermissionFlagsBits.ManageThreads} permission * can invite other members to this thread. * <info>This property is always `null` in public threads.</info> * @type {?boolean} */ this.invitable = this.type === ChannelType.PrivateThread ? (data.thread_metadata.invitable ?? false) : null; /** * Whether the thread is archived * @type {?boolean} */ this.archived = data.thread_metadata.archived; /** * The amount of time (in minutes) after which the thread will automatically archive in case of no recent activity * @type {?ThreadAutoArchiveDuration} */ this.autoArchiveDuration = data.thread_metadata.auto_archive_duration; /** * The timestamp when the thread's archive status was last changed * <info>If the thread was never archived or unarchived, this is the timestamp at which the thread was * created</info> * @type {?number} */ this.archiveTimestamp = Date.parse(data.thread_metadata.archive_timestamp); if ('create_timestamp' in data.thread_metadata) { // Note: this is needed because we can't assign directly to getters this._createdTimestamp = Date.parse(data.thread_metadata.create_timestamp); } } else { this.locked ??= null; this.archived ??= null; this.autoArchiveDuration ??= null; this.archiveTimestamp ??= null; this.invitable ??= null; } this._createdTimestamp ??= this.type === ChannelType.PrivateThread ? super.createdTimestamp : null; if ('last_message_id' in data) { /** * The last message id sent in this thread, if one was sent * @type {?Snowflake} */ this.lastMessageId = data.last_message_id; } else { this.lastMessageId ??= null; } if ('last_pin_timestamp' in data) { /** * The timestamp when the last pinned message was pinned, if there was one * @type {?number} */ this.lastPinTimestamp = data.last_pin_timestamp ? Date.parse(data.last_pin_timestamp) : null; } else { this.lastPinTimestamp ??= null; } if ('rate_limit_per_user' in data) { /** * The rate limit per user (slowmode) for this thread in seconds * @type {?number} */ this.rateLimitPerUser = data.rate_limit_per_user ?? 0; } else { this.rateLimitPerUser ??= null; } if ('message_count' in data) { /** * The approximate count of messages in this thread * <info>Threads created before July 1, 2022 may have an inaccurate count. * If you need an approximate value higher than that, use `ThreadChannel#messages.cache.size`</info> * @type {?number} */ this.messageCount = data.message_count; } else { this.messageCount ??= null; } if ('member_count' in data) { /** * The approximate count of users in this thread * <info>This stops counting at 50. If you need an approximate value higher than that, use * `ThreadChannel#members.cache.size`</info> * @type {?number} */ this.memberCount = data.member_count; } else { this.memberCount ??= null; } if ('total_message_sent' in data) { /** * The number of messages ever sent in a thread, similar to {@link ThreadChannel#messageCount} except it * will not decrement whenever a message is deleted * @type {?number} */ this.totalMessageSent = data.total_message_sent; } else { this.totalMessageSent ??= null; } if (data.member && this.client.user) this.members._add({ user_id: this.client.user.id, ...data.member }); if (data.messages) for (const message of data.messages) this.messages._add(message); if ('applied_tags' in data) { /** * The tags applied to this thread * @type {Snowflake[]} */ this.appliedTags = data.applied_tags; } else { this.appliedTags ??= []; } } /** * The timestamp when this thread was created. This isn't available for threads * created before 2022-01-09 * @type {?number} * @readonly */ get createdTimestamp() { return this._createdTimestamp; } /** * A collection of associated guild member objects of this thread's members * @type {Collection<Snowflake, GuildMember>} * @readonly */ get guildMembers() { return this.members.cache.mapValues(member => member.guildMember); } /** * The time at which this thread's archive status was last changed * <info>If the thread was never archived or unarchived, this is the time at which the thread was created</info> * @type {?Date} * @readonly */ get archivedAt() { return this.archiveTimestamp && new Date(this.archiveTimestamp); } /** * The time the thread was created at * @type {?Date} * @readonly */ get createdAt() { return this.createdTimestamp && new Date(this.createdTimestamp); } /** * The parent channel of this thread * @type {?(NewsChannel|TextChannel|ForumChannel|MediaChannel)} * @readonly */ get parent() { return this.guild.channels.resolve(this.parentId); } /** * Makes the client user join the thread. * @returns {Promise<ThreadChannel>} */ async join() { await this.members.add('@me'); return this; } /** * Makes the client user leave the thread. * @returns {Promise<ThreadChannel>} */ async leave() { await this.members.remove('@me'); return this; } /** * Gets the overall set of permissions for a member or role in this thread's parent channel, taking overwrites into * account. * @param {GuildMemberResolvable|RoleResolvable} memberOrRole The member or role to obtain the overall permissions for * @param {boolean} [checkAdmin=true] Whether having the {@link PermissionFlagsBits.Administrator} permission * will return all permissions * @returns {?Readonly<PermissionsBitField>} */ permissionsFor(memberOrRole, checkAdmin) { return this.parent?.permissionsFor(memberOrRole, checkAdmin) ?? null; } /** * Options used to fetch a thread owner. * @typedef {BaseFetchOptions} FetchThreadOwnerOptions * @property {boolean} [withMember] Whether to also return the guild member associated with this thread member */ /** * Fetches the owner of this thread. If the thread member object isn't needed, * use {@link ThreadChannel#ownerId} instead. * @param {FetchThreadOwnerOptions} [options] Options for fetching the owner * @returns {Promise<?ThreadMember>} */ async fetchOwner(options) { // TODO: Remove that catch in the next major version const member = await this.members._fetchSingle({ ...options, member: this.ownerId }).catch(error => { if (error instanceof DiscordAPIError && error.code === RESTJSONErrorCodes.UnknownMember) { return null; } throw error; }); return member; } /** * Fetches the message that started this thread, if any. * <info>The `Promise` will reject if the original message in a forum post is deleted * or when the original message in the parent channel is deleted. * If you just need the id of that message, use {@link BaseChannel#id} instead.</info> * @param {BaseFetchOptions} [options] Additional options for this fetch * @returns {Promise<?Message<true>>} */ async fetchStarterMessage(options) { const channel = this.parent instanceof getThreadOnlyChannel() ? this : this.parent; return channel?.messages.fetch({ message: this.id, ...options }) ?? null; } /** * The options used to edit a thread channel * @typedef {Object} ThreadEditOptions * @property {string} [name] The new name for the thread * @property {boolean} [archived] Whether the thread is archived * @property {ThreadAutoArchiveDuration} [autoArchiveDuration] The amount of time after which the thread * should automatically archive in case of no recent activity * @property {number} [rateLimitPerUser] The rate limit per user (slowmode) for the thread in seconds * @property {boolean} [locked] Whether the thread is locked * @property {boolean} [invitable] Whether non-moderators can add other non-moderators to a thread * <info>Can only be edited on {@link ChannelType.PrivateThread}</info> * @property {Snowflake[]} [appliedTags] The tags to apply to the thread * @property {ChannelFlagsResolvable} [flags] The flags to set on the channel * @property {string} [reason] Reason for editing the thread */ /** * Edits this thread. * @param {ThreadEditOptions} options The options to provide * @returns {Promise<ThreadChannel>} * @example * // Edit a thread * thread.edit({ name: 'new-thread' }) * .then(editedThread => console.log(editedThread)) * .catch(console.error); */ async edit(options) { const newData = await this.client.rest.patch(Routes.channel(this.id), { body: { name: (options.name ?? this.name).trim(), archived: options.archived, auto_archive_duration: options.autoArchiveDuration, rate_limit_per_user: options.rateLimitPerUser, locked: options.locked, invitable: this.type === ChannelType.PrivateThread ? options.invitable : undefined, applied_tags: options.appliedTags, flags: 'flags' in options ? ChannelFlagsBitField.resolve(options.flags) : undefined, }, reason: options.reason, }); return this.client.actions.ChannelUpdate.handle(newData).updated; } /** * Sets whether the thread is archived. * @param {boolean} [archived=true] Whether the thread is archived * @param {string} [reason] Reason for archiving or unarchiving * @returns {Promise<ThreadChannel>} * @example * // Archive the thread * thread.setArchived(true) * .then(newThread => console.log(`Thread is now ${newThread.archived ? 'archived' : 'active'}`)) * .catch(console.error); */ setArchived(archived = true, reason) { return this.edit({ archived, reason }); } /** * Sets the duration after which the thread will automatically archive in case of no recent activity. * @param {ThreadAutoArchiveDuration} autoArchiveDuration The amount of time after which the thread * should automatically archive in case of no recent activity * @param {string} [reason] Reason for changing the auto archive duration * @returns {Promise<ThreadChannel>} * @example * // Set the thread's auto archive time to 1 hour * thread.setAutoArchiveDuration(ThreadAutoArchiveDuration.OneHour) * .then(newThread => { * console.log(`Thread will now archive after ${newThread.autoArchiveDuration} minutes of inactivity`); * }); * .catch(console.error); */ setAutoArchiveDuration(autoArchiveDuration, reason) { return this.edit({ autoArchiveDuration, reason }); } /** * Sets whether members without the {@link PermissionFlagsBits.ManageThreads} permission * can invite other members to this thread. * @param {boolean} [invitable=true] Whether non-moderators can invite non-moderators to this thread * @param {string} [reason] Reason for changing invite * @returns {Promise<ThreadChannel>} */ async setInvitable(invitable = true, reason) { if (this.type !== ChannelType.PrivateThread) { throw new DiscordjsRangeError(ErrorCodes.ThreadInvitableType, this.type); } return this.edit({ invitable, reason }); } /** * Sets whether the thread can be **unarchived** by anyone with the * {@link PermissionFlagsBits.SendMessages} permission. When a thread is locked, only members with the * {@link PermissionFlagsBits.ManageThreads} permission can unarchive it. * @param {boolean} [locked=true] Whether the thread is locked * @param {string} [reason] Reason for locking or unlocking the thread * @returns {Promise<ThreadChannel>} * @example * // Set the thread to locked * thread.setLocked(true) * .then(newThread => console.log(`Thread is now ${newThread.locked ? 'locked' : 'unlocked'}`)) * .catch(console.error); */ setLocked(locked = true, reason) { return this.edit({ locked, reason }); } /** * Sets a new name for this thread. * @param {string} name The new name for the thread * @param {string} [reason] Reason for changing the thread's name * @returns {Promise<ThreadChannel>} * @example * // Change the thread's name * thread.setName('not_general') * .then(newThread => console.log(`Thread's new name is ${newThread.name}`)) * .catch(console.error); */ setName(name, reason) { return this.edit({ name, reason }); } /** * Sets the rate limit per user (slowmode) for this thread. * @param {number} rateLimitPerUser The new rate limit in seconds * @param {string} [reason] Reason for changing the thread's rate limit * @returns {Promise<ThreadChannel>} */ setRateLimitPerUser(rateLimitPerUser, reason) { return this.edit({ rateLimitPerUser, reason }); } /** * Set the applied tags for this channel (only applicable to forum threads) * @param {Snowflake[]} appliedTags The tags to set for this channel * @param {string} [reason] Reason for changing the thread's applied tags * @returns {Promise<ThreadChannel>} */ setAppliedTags(appliedTags, reason) { return this.edit({ appliedTags, reason }); } /** * Pins this thread from the forum channel (only applicable to forum threads). * @param {string} [reason] Reason for pinning * @returns {Promise<ThreadChannel>} */ pin(reason) { return this.edit({ flags: this.flags.add(ChannelFlags.Pinned), reason }); } /** * Unpins this thread from the forum channel (only applicable to forum threads). * @param {string} [reason] Reason for unpinning * @returns {Promise<ThreadChannel>} */ unpin(reason) { return this.edit({ flags: this.flags.remove(ChannelFlags.Pinned), reason }); } /** * Whether the client user is a member of the thread. * @type {boolean} * @readonly */ get joined() { return this.members.cache.has(this.client.user?.id); } /** * Whether the thread is editable by the client user (name, archived, autoArchiveDuration) * @type {boolean} * @readonly */ get editable() { return ( (this.ownerId === this.client.user.id && (this.type !== ChannelType.PrivateThread || this.joined)) || this.manageable ); } /** * Whether the thread is joinable by the client user * @type {boolean} * @readonly */ get joinable() { return ( !this.archived && !this.joined && this.permissionsFor(this.client.user)?.has( this.type === ChannelType.PrivateThread ? PermissionFlagsBits.ManageThreads : PermissionFlagsBits.ViewChannel, false, ) ); } /** * Whether the thread is manageable by the client user, for deleting or editing rateLimitPerUser or locked. * @type {boolean} * @readonly */ get manageable() { const permissions = this.permissionsFor(this.client.user); if (!permissions) return false; // This flag allows managing even if timed out if (permissions.has(PermissionFlagsBits.Administrator, false)) return true; return ( this.guild.members.me.communicationDisabledUntilTimestamp < Date.now() && permissions.has(PermissionFlagsBits.ManageThreads, false) ); } /** * Whether the thread is viewable by the client user * @type {boolean} * @readonly */ get viewable() { if (this.client.user.id === this.guild.ownerId) return true; const permissions = this.permissionsFor(this.client.user); if (!permissions) return false; return permissions.has(PermissionFlagsBits.ViewChannel, false); } /** * Whether the client user can send messages in this thread * @type {boolean} * @readonly */ get sendable() { const permissions = this.permissionsFor(this.client.user); if (!permissions) return false; // This flag allows sending even if timed out if (permissions.has(PermissionFlagsBits.Administrator, false)) return true; return ( !(this.archived && this.locked && !this.manageable) && (this.type !== ChannelType.PrivateThread || this.joined || this.manageable) && permissions.has(PermissionFlagsBits.SendMessagesInThreads, false) && this.guild.members.me.communicationDisabledUntilTimestamp < Date.now() ); } /** * Whether the thread is unarchivable by the client user * @type {boolean} * @readonly */ get unarchivable() { return this.archived && this.sendable && (!this.locked || this.manageable); } /** * Deletes this thread. * @param {string} [reason] Reason for deleting this thread * @returns {Promise<ThreadChannel>} * @example * // Delete the thread * thread.delete('cleaning out old threads') * .then(deletedThread => console.log(deletedThread)) * .catch(console.error); */ async delete(reason) { await this.guild.channels.delete(this.id, reason); return this; } // These are here only for documentation purposes - they are implemented by TextBasedChannel /* eslint-disable no-empty-function */ get lastMessage() {} get lastPinAt() {} send() {} sendTyping() {} createMessageCollector() {} awaitMessages() {} createMessageComponentCollector() {} awaitMessageComponent() {} bulkDelete() {} // Doesn't work on Thread channels; setRateLimitPerUser() {} // Doesn't work on Thread channels; setNSFW() {} } TextBasedChannel.applyToClass(ThreadChannel, true, ['fetchWebhooks', 'setRateLimitPerUser', 'setNSFW']); module.exports = ThreadChannel; node_modules/discord.js/src/structures/Component.js 0000664 00000001770 15114741631 0016607 0 ustar 00 'use strict'; const isEqual = require('fast-deep-equal'); /** * Represents a component */ class Component { constructor(data) { /** * The API data associated with this component * @type {APIMessageComponent} */ this.data = data; } /** * The id of this component * @type {number} * @readonly */ get id() { return this.data.id; } /** * The type of the component * @type {ComponentType} * @readonly */ get type() { return this.data.type; } /** * Whether or not the given components are equal * @param {Component|APIMessageComponent} other The component to compare against * @returns {boolean} */ equals(other) { if (other instanceof Component) { return isEqual(other.data, this.data); } return isEqual(other, this.data); } /** * Returns the API-compatible JSON for this component * @returns {APIMessageComponent} */ toJSON() { return { ...this.data }; } } module.exports = Component; node_modules/discord.js/src/structures/MessageReaction.js 0000664 00000012777 15114741631 0017727 0 ustar 00 'use strict'; const { Routes } = require('discord-api-types/v10'); const ApplicationEmoji = require('./ApplicationEmoji'); const GuildEmoji = require('./GuildEmoji'); const ReactionEmoji = require('./ReactionEmoji'); const ReactionUserManager = require('../managers/ReactionUserManager'); const { flatten } = require('../util/Util'); /** * Represents a reaction to a message. */ class MessageReaction { constructor(client, data, message) { /** * The client that instantiated this message reaction * @name MessageReaction#client * @type {Client} * @readonly */ Object.defineProperty(this, 'client', { value: client }); /** * The message that this reaction refers to * @type {Message} */ this.message = message; /** * Whether the client has given this reaction * @type {boolean} */ this.me = data.me; /** * Whether the client has super-reacted using this emoji * @type {boolean} */ this.meBurst = Boolean(data.me_burst); /** * A manager of the users that have given this reaction * @type {ReactionUserManager} */ this.users = new ReactionUserManager(this, this.me ? [client.user] : []); this._emoji = new ReactionEmoji(this, data.emoji); this.burstColors = null; this._patch(data); } _patch(data) { if (data.burst_colors) { /** * Hexadecimal colors used for this super reaction * @type {?string[]} */ this.burstColors = data.burst_colors; } if ('count' in data) { /** * The number of people that have given the same reaction * @type {?number} */ this.count ??= data.count; } if ('count_details' in data) { /** * The reaction count details object contains information about super and normal reaction counts. * @typedef {Object} ReactionCountDetailsData * @property {number} burst Count of super reactions * @property {number} normal Count of normal reactions */ /** * The reaction count details object contains information about super and normal reaction counts. * @type {ReactionCountDetailsData} */ this.countDetails = { burst: data.count_details.burst, normal: data.count_details.normal, }; } else { this.countDetails ??= { burst: 0, normal: 0 }; } } /** * Makes the client user react with this reaction * @returns {Promise<MessageReaction>} */ react() { return this.message.react(this.emoji); } /** * Removes all users from this reaction. * @returns {Promise<MessageReaction>} */ async remove() { await this.client.rest.delete( Routes.channelMessageReaction(this.message.channelId, this.message.id, this._emoji.identifier), ); return this; } /** * The emoji of this reaction. Either a {@link GuildEmoji} object for known custom emojis, * {@link ApplicationEmoji} for application emojis, or a {@link ReactionEmoji} object * which has fewer properties. Whatever the prototype of the emoji, it will still have * `name`, `id`, `identifier` and `toString()` * @type {GuildEmoji|ReactionEmoji|ApplicationEmoji} * @readonly */ get emoji() { if (this._emoji instanceof GuildEmoji) return this._emoji; if (this._emoji instanceof ApplicationEmoji) return this._emoji; // Check to see if the emoji has become known to the client if (this._emoji.id) { const applicationEmojis = this.message.client.application.emojis.cache; if (applicationEmojis.has(this._emoji.id)) { const emoji = applicationEmojis.get(this._emoji.id); this._emoji = emoji; return emoji; } const emojis = this.message.client.emojis.cache; if (emojis.has(this._emoji.id)) { const emoji = emojis.get(this._emoji.id); this._emoji = emoji; return emoji; } } return this._emoji; } /** * Whether or not this reaction is a partial * @type {boolean} * @readonly */ get partial() { return this.count === null; } /** * Fetch this reaction. * @returns {Promise<MessageReaction>} */ async fetch() { const message = await this.message.fetch(); const existing = message.reactions.cache.get(this.emoji.id ?? this.emoji.name); // The reaction won't get set when it has been completely removed this._patch(existing ?? { count: 0 }); return this; } toJSON() { return flatten(this, { emoji: 'emojiId', message: 'messageId' }); } valueOf() { return this._emoji.id ?? this._emoji.name; } _add(user, burst) { if (this.partial) return; this.users.cache.set(user.id, user); if (!this.me || user.id !== this.message.client.user.id || this.count === 0) { this.count++; if (burst) this.countDetails.burst++; else this.countDetails.normal++; } if (user.id === this.message.client.user.id) { if (burst) this.meBurst = true; else this.me = true; } } _remove(user, burst) { if (this.partial) return; this.users.cache.delete(user.id); if (!this.me || user.id !== this.message.client.user.id) { this.count--; if (burst) this.countDetails.burst--; else this.countDetails.normal--; } if (user.id === this.message.client.user.id) { if (burst) this.meBurst = false; else this.me = false; } if (this.count <= 0 && this.users.cache.size === 0) { this.message.reactions.cache.delete(this.emoji.id ?? this.emoji.name); } } } module.exports = MessageReaction; node_modules/discord.js/src/structures/StringSelectMenuComponent.js 0000664 00000000671 15114741631 0021762 0 ustar 00 'use strict'; const BaseSelectMenuComponent = require('./BaseSelectMenuComponent'); /** * Represents a string select menu component * @extends {BaseSelectMenuComponent} */ class StringSelectMenuComponent extends BaseSelectMenuComponent { /** * The options in this select menu * @type {APISelectMenuOption[]} * @readonly */ get options() { return this.data.options; } } module.exports = StringSelectMenuComponent; node_modules/discord.js/src/structures/MentionableSelectMenuInteraction.js 0000664 00000003574 15114741631 0023273 0 ustar 00 'use strict'; const { Collection } = require('@discordjs/collection'); const MessageComponentInteraction = require('./MessageComponentInteraction'); const Events = require('../util/Events'); /** * Represents a {@link ComponentType.MentionableSelect} select menu interaction. * @extends {MessageComponentInteraction} */ class MentionableSelectMenuInteraction extends MessageComponentInteraction { constructor(client, data) { super(client, data); const { resolved, values } = data.data; const { members, users, roles } = resolved ?? {}; /** * An array of the selected user and role ids * @type {Snowflake[]} */ this.values = values ?? []; /** * Collection of the selected users * @type {Collection<Snowflake, User>} */ this.users = new Collection(); /** * Collection of the selected users * @type {Collection<Snowflake, GuildMember|APIGuildMember>} */ this.members = new Collection(); /** * Collection of the selected roles * @type {Collection<Snowflake, Role|APIRole>} */ this.roles = new Collection(); if (members) { for (const [id, member] of Object.entries(members)) { const user = users[id]; if (!user) { this.client.emit( Events.Debug, `[MentionableSelectMenuInteraction] Received a member without a user, skipping ${id}`, ); continue; } this.members.set(id, this.guild?.members._add({ user, ...member }) ?? { user, ...member }); } } if (users) { for (const user of Object.values(users)) { this.users.set(user.id, this.client.users._add(user)); } } if (roles) { for (const role of Object.values(roles)) { this.roles.set(role.id, this.guild?.roles._add(role) ?? role); } } } } module.exports = MentionableSelectMenuInteraction; node_modules/discord.js/src/structures/SoundboardSound.js 0000664 00000011613 15114741631 0017753 0 ustar 00 'use strict'; const { DiscordSnowflake } = require('@sapphire/snowflake'); const Base = require('./Base.js'); const { Emoji } = require('./Emoji.js'); const { DiscordjsError, ErrorCodes } = require('../errors/index.js'); /** * Represents a soundboard sound. * @extends {Base} */ class SoundboardSound extends Base { constructor(client, data) { super(client); /** * The id of this soundboard sound * @type {Snowflake|string} */ this.soundId = data.sound_id; this._patch(data); } _patch(data) { if ('available' in data) { /** * Whether this soundboard sound is available * @type {?boolean} */ this.available = data.available; } else { this.available ??= null; } if ('name' in data) { /** * The name of this soundboard sound * @type {?string} */ this.name = data.name; } else { this.name ??= null; } if ('volume' in data) { /** * The volume (a double) of this soundboard sound, from 0 to 1 * @type {?number} */ this.volume = data.volume; } else { this.volume ??= null; } if ('emoji_id' in data) { /** * The raw emoji data of this soundboard sound * @type {?Object} * @private */ this._emoji = { id: data.emoji_id, name: data.emoji_name, }; } else { this._emoji ??= null; } if ('guild_id' in data) { /** * The guild id of this soundboard sound * @type {?Snowflake} */ this.guildId = data.guild_id; } else { this.guildId ??= null; } if ('user' in data) { /** * The user who created this soundboard sound * @type {?User} */ this.user = this.client.users._add(data.user); } else { this.user ??= null; } } /** * The timestamp this soundboard sound was created at * @type {number} * @readonly */ get createdTimestamp() { return DiscordSnowflake.timestampFrom(this.soundId); } /** * The time this soundboard sound was created at * @type {Date} * @readonly */ get createdAt() { return new Date(this.createdTimestamp); } /** * The emoji of this soundboard sound * @type {?Emoji} * @readonly */ get emoji() { if (!this._emoji) return null; return this.guild?.emojis.cache.get(this._emoji.id) ?? new Emoji(this.client, this._emoji); } /** * The guild this soundboard sound is part of * @type {?Guild} * @readonly */ get guild() { return this.client.guilds.resolve(this.guildId); } /** * A link to this soundboard sound * @type {string} * @readonly */ get url() { return this.client.rest.cdn.soundboardSound(this.soundId); } /** * Edits this soundboard sound. * @param {GuildSoundboardSoundEditOptions} options The options to provide * @returns {Promise<SoundboardSound>} * @example * // Update the name of a soundboard sound * soundboardSound.edit({ name: 'new name' }) * .then(sound => console.log(`Updated the name of the soundboard sound to ${sound.name}`)) * .catch(console.error); */ async edit(options) { if (!this.guildId) throw new DiscordjsError(ErrorCodes.NotGuildSoundboardSound, 'edited'); return this.guild.soundboardSounds.edit(this, options); } /** * Deletes this soundboard sound. * @param {string} [reason] Reason for deleting this soundboard sound * @returns {Promise<SoundboardSound>} * @example * // Delete a soundboard sound * soundboardSound.delete() * .then(sound => console.log(`Deleted soundboard sound ${sound.name}`)) * .catch(console.error); */ async delete(reason) { if (!this.guildId) throw new DiscordjsError(ErrorCodes.NotGuildSoundboardSound, 'deleted'); await this.guild.soundboardSounds.delete(this, reason); return this; } /** * Whether this soundboard sound is the same as another one. * @param {SoundboardSound|APISoundboardSound} other The soundboard sound to compare it to * @returns {boolean} */ equals(other) { if (other instanceof SoundboardSound) { return ( this.soundId === other.soundId && this.available === other.available && this.name === other.name && this.volume === other.volume && this._emoji?.id === other._emoji?.id && this._emoji?.name === other._emoji?.name && this.guildId === other.guildId && this.user?.id === other.user?.id ); } return ( this.soundId === other.sound_id && this.available === other.available && this.name === other.name && this.volume === other.volume && (this._emoji?.id ?? null) === other.emoji_id && (this._emoji?.name ?? null) === other.emoji_name && this.guildId === other.guild_id && this.user?.id === other.user?.id ); } } exports.SoundboardSound = SoundboardSound; node_modules/discord.js/src/structures/StringSelectMenuInteraction.js 0000664 00000000776 15114741631 0022305 0 ustar 00 'use strict'; const MessageComponentInteraction = require('./MessageComponentInteraction'); /** * Represents a {@link ComponentType.StringSelect} select menu interaction. * @extends {MessageComponentInteraction} */ class StringSelectMenuInteraction extends MessageComponentInteraction { constructor(client, data) { super(client, data); /** * The values selected * @type {string[]} */ this.values = data.data.values ?? []; } } module.exports = StringSelectMenuInteraction; node_modules/discord.js/src/structures/BaseGuildVoiceChannel.js 0000664 00000015231 15114741631 0020760 0 ustar 00 'use strict'; const { Collection } = require('@discordjs/collection'); const { PermissionFlagsBits } = require('discord-api-types/v10'); const GuildChannel = require('./GuildChannel'); const TextBasedChannel = require('./interfaces/TextBasedChannel'); const GuildMessageManager = require('../managers/GuildMessageManager'); /** * Represents a voice-based guild channel on Discord. * @extends {GuildChannel} * @implements {TextBasedChannel} */ class BaseGuildVoiceChannel extends GuildChannel { constructor(guild, data, client) { super(guild, data, client, false); /** * A manager of the messages sent to this channel * @type {GuildMessageManager} */ this.messages = new GuildMessageManager(this); /** * If the guild considers this channel NSFW * @type {boolean} */ this.nsfw = Boolean(data.nsfw); this._patch(data); } _patch(data) { super._patch(data); if ('rtc_region' in data) { /** * The RTC region for this voice-based channel. This region is automatically selected if `null`. * @type {?string} */ this.rtcRegion = data.rtc_region; } if ('bitrate' in data) { /** * The bitrate of this voice-based channel * @type {number} */ this.bitrate = data.bitrate; } if ('user_limit' in data) { /** * The maximum amount of users allowed in this channel. * @type {number} */ this.userLimit = data.user_limit; } if ('video_quality_mode' in data) { /** * The camera video quality mode of the channel. * @type {?VideoQualityMode} */ this.videoQualityMode = data.video_quality_mode; } else { this.videoQualityMode ??= null; } if ('last_message_id' in data) { /** * The last message id sent in the channel, if one was sent * @type {?Snowflake} */ this.lastMessageId = data.last_message_id; } if ('messages' in data) { for (const message of data.messages) this.messages._add(message); } if ('rate_limit_per_user' in data) { /** * The rate limit per user (slowmode) for this channel in seconds * @type {number} */ this.rateLimitPerUser = data.rate_limit_per_user; } if ('nsfw' in data) { this.nsfw = data.nsfw; } } /** * The members in this voice-based channel * @type {Collection<Snowflake, GuildMember>} * @readonly */ get members() { const coll = new Collection(); for (const state of this.guild.voiceStates.cache.values()) { if (state.channelId === this.id && state.member) { coll.set(state.id, state.member); } } return coll; } /** * Checks if the voice-based channel is full * @type {boolean} * @readonly */ get full() { return this.userLimit > 0 && this.members.size >= this.userLimit; } /** * Whether the channel is joinable by the client user * @type {boolean} * @readonly */ get joinable() { if (!this.viewable) return false; const permissions = this.permissionsFor(this.client.user); if (!permissions) return false; // This flag allows joining even if timed out if (permissions.has(PermissionFlagsBits.Administrator, false)) return true; return ( this.guild.members.me.communicationDisabledUntilTimestamp < Date.now() && permissions.has(PermissionFlagsBits.Connect, false) ); } /** * Creates an invite to this guild channel. * @param {InviteCreateOptions} [options={}] The options for creating the invite * @returns {Promise<Invite>} * @example * // Create an invite to a channel * channel.createInvite() * .then(invite => console.log(`Created an invite with a code of ${invite.code}`)) * .catch(console.error); */ createInvite(options) { return this.guild.invites.create(this.id, options); } /** * Fetches a collection of invites to this guild channel. * @param {boolean} [cache=true] Whether to cache the fetched invites * @returns {Promise<Collection<string, Invite>>} */ fetchInvites(cache = true) { return this.guild.invites.fetch({ channelId: this.id, cache }); } /** * Sets the bitrate of the channel. * @param {number} bitrate The new bitrate * @param {string} [reason] Reason for changing the channel's bitrate * @returns {Promise<BaseGuildVoiceChannel>} * @example * // Set the bitrate of a voice channel * channel.setBitrate(48_000) * .then(channel => console.log(`Set bitrate to ${channel.bitrate}bps for ${channel.name}`)) * .catch(console.error); */ setBitrate(bitrate, reason) { return this.edit({ bitrate, reason }); } /** * Sets the RTC region of the channel. * @param {?string} rtcRegion The new region of the channel. Set to `null` to remove a specific region for the channel * @param {string} [reason] The reason for modifying this region. * @returns {Promise<BaseGuildVoiceChannel>} * @example * // Set the RTC region to sydney * channel.setRTCRegion('sydney'); * @example * // Remove a fixed region for this channel - let Discord decide automatically * channel.setRTCRegion(null, 'We want to let Discord decide.'); */ setRTCRegion(rtcRegion, reason) { return this.edit({ rtcRegion, reason }); } /** * Sets the user limit of the channel. * @param {number} userLimit The new user limit * @param {string} [reason] Reason for changing the user limit * @returns {Promise<BaseGuildVoiceChannel>} * @example * // Set the user limit of a voice channel * channel.setUserLimit(42) * .then(channel => console.log(`Set user limit to ${channel.userLimit} for ${channel.name}`)) * .catch(console.error); */ setUserLimit(userLimit, reason) { return this.edit({ userLimit, reason }); } /** * Sets the camera video quality mode of the channel. * @param {VideoQualityMode} videoQualityMode The new camera video quality mode. * @param {string} [reason] Reason for changing the camera video quality mode. * @returns {Promise<BaseGuildVoiceChannel>} */ setVideoQualityMode(videoQualityMode, reason) { return this.edit({ videoQualityMode, reason }); } // These are here only for documentation purposes - they are implemented by TextBasedChannel /* eslint-disable no-empty-function */ get lastMessage() {} send() {} sendTyping() {} createMessageCollector() {} awaitMessages() {} createMessageComponentCollector() {} awaitMessageComponent() {} bulkDelete() {} fetchWebhooks() {} createWebhook() {} setRateLimitPerUser() {} setNSFW() {} } TextBasedChannel.applyToClass(BaseGuildVoiceChannel, true, ['lastPinAt']); module.exports = BaseGuildVoiceChannel; node_modules/discord.js/src/structures/GuildOnboardingPromptOption.js 0000664 00000004006 15114741631 0022302 0 ustar 00 'use strict'; const { Collection } = require('@discordjs/collection'); const Base = require('./Base'); const { Emoji } = require('./Emoji.js'); /** * Represents the data of an option from a prompt of a guilds onboarding. * @extends {Base} */ class GuildOnboardingPromptOption extends Base { constructor(client, data, guildId) { super(client); /** * The id of the guild this onboarding prompt option is from * @type {Snowflake} */ this.guildId = guildId; const guild = this.guild; /** * The id of the option * @type {Snowflake} */ this.id = data.id; /** * The channels a member is added to when the option is selected * @type {Collection<Snowflake, GuildChannel>} */ this.channels = data.channel_ids.reduce( (channels, channelId) => channels.set(channelId, guild.channels.cache.get(channelId)), new Collection(), ); /** * The roles assigned to a member when the option is selected * @type {Collection<Snowflake, Role>} */ this.roles = data.role_ids.reduce( (roles, roleId) => roles.set(roleId, guild.roles.cache.get(roleId)), new Collection(), ); /** * The raw emoji of the option * @type {APIPartialEmoji} * @private */ this._emoji = data.emoji; /** * The title of the option * @type {string} */ this.title = data.title; /** * The description of the option * @type {?string} */ this.description = data.description; } /** * The guild this onboarding prompt option is from * @type {Guild} * @readonly */ get guild() { return this.client.guilds.cache.get(this.guildId); } /** * The emoji of this onboarding prompt option * @type {?(GuildEmoji|Emoji)} */ get emoji() { if (!this._emoji.id && !this._emoji.name) return null; return this.client.emojis.cache.get(this._emoji.id) ?? new Emoji(this.client, this._emoji); } } exports.GuildOnboardingPromptOption = GuildOnboardingPromptOption; node_modules/discord.js/src/structures/ChannelSelectMenuBuilder.js 0000664 00000001732 15114741631 0021507 0 ustar 00 'use strict'; const { ChannelSelectMenuBuilder: BuildersChannelSelectMenu } = require('@discordjs/builders'); const { isJSONEncodable } = require('@discordjs/util'); const { toSnakeCase } = require('../util/Transformers'); /** * Class used to build select menu components to be sent through the API * @extends {BuildersChannelSelectMenu} */ class ChannelSelectMenuBuilder extends BuildersChannelSelectMenu { constructor(data = {}) { super(toSnakeCase(data)); } /** * Creates a new select menu builder from JSON data * @param {ChannelSelectMenuBuilder|ChannelSelectMenuComponent|APIChannelSelectComponent} other The other data * @returns {ChannelSelectMenuBuilder} */ static from(other) { return new this(isJSONEncodable(other) ? other.toJSON() : other); } } module.exports = ChannelSelectMenuBuilder; /** * @external BuildersChannelSelectMenu * @see {@link https://discord.js.org/docs/packages/builders/stable/ChannelSelectMenuBuilder:Class} */ node_modules/discord.js/src/structures/FileComponent.js 0000664 00000001426 15114741631 0017405 0 ustar 00 'use strict'; const Component = require('./Component'); const UnfurledMediaItem = require('./UnfurledMediaItem'); /** * Represents a file component * @extends {Component} */ class FileComponent extends Component { constructor({ file, ...data }) { super(data); /** * The media associated with this file * @type {UnfurledMediaItem} * @readonly */ this.file = new UnfurledMediaItem(file); } /** * Whether this thumbnail is spoilered * @type {boolean} * @readonly */ get spoiler() { return this.data.spoiler ?? false; } /** * Returns the API-compatible JSON for this component * @returns {APIFileComponent} */ toJSON() { return { ...this.data, file: this.file.toJSON() }; } } module.exports = FileComponent; node_modules/discord.js/src/structures/MentionableSelectMenuBuilder.js 0000664 00000002017 15114741631 0022371 0 ustar 00 'use strict'; const { MentionableSelectMenuBuilder: BuildersMentionableSelectMenu } = require('@discordjs/builders'); const { isJSONEncodable } = require('@discordjs/util'); const { toSnakeCase } = require('../util/Transformers'); /** * Class used to build select menu components to be sent through the API * @extends {BuildersMentionableSelectMenu} */ class MentionableSelectMenuBuilder extends BuildersMentionableSelectMenu { constructor(data = {}) { super(toSnakeCase(data)); } /** * Creates a new select menu builder from JSON data * @param {MentionableSelectMenuBuilder|MentionableSelectMenuComponent|APIMentionableSelectComponent} other * The other data * @returns {MentionableSelectMenuBuilder} */ static from(other) { return new this(isJSONEncodable(other) ? other.toJSON() : other); } } module.exports = MentionableSelectMenuBuilder; /** * @external BuildersMentionableSelectMenu * @see {@link https://discord.js.org/docs/packages/builders/stable/MentionableSelectMenuBuilder:Class} */ node_modules/discord.js/src/structures/CommandInteraction.js 0000664 00000012535 15114741631 0020424 0 ustar 00 'use strict'; const Attachment = require('./Attachment'); const BaseInteraction = require('./BaseInteraction'); const InteractionWebhook = require('./InteractionWebhook'); const InteractionResponses = require('./interfaces/InteractionResponses'); /** * Represents a command interaction. * @extends {BaseInteraction} * @implements {InteractionResponses} * @abstract */ class CommandInteraction extends BaseInteraction { constructor(client, data) { super(client, data); /** * The id of the channel this interaction was sent in * @type {Snowflake} * @name CommandInteraction#channelId */ /** * The invoked application command's id * @type {Snowflake} */ this.commandId = data.data.id; /** * The invoked application command's name * @type {string} */ this.commandName = data.data.name; /** * The invoked application command's type * @type {ApplicationCommandType} */ this.commandType = data.data.type; /** * The id of the guild the invoked application command is registered to * @type {?Snowflake} */ this.commandGuildId = data.data.guild_id ?? null; /** * Whether the reply to this interaction has been deferred * @type {boolean} */ this.deferred = false; /** * Whether this interaction has already been replied to * @type {boolean} */ this.replied = false; /** * Whether the reply to this interaction is ephemeral * @type {?boolean} */ this.ephemeral = null; /** * An associated interaction webhook, can be used to further interact with this interaction * @type {InteractionWebhook} */ this.webhook = new InteractionWebhook(this.client, this.applicationId, this.token); } /** * The invoked application command, if it was fetched before * @type {?ApplicationCommand} */ get command() { const id = this.commandId; return this.guild?.commands.cache.get(id) ?? this.client.application.commands.cache.get(id) ?? null; } /** * Represents the resolved data of a received command interaction. * @typedef {Object} CommandInteractionResolvedData * @property {Collection<Snowflake, User>} [users] The resolved users * @property {Collection<Snowflake, GuildMember|APIGuildMember>} [members] The resolved guild members * @property {Collection<Snowflake, Role|APIRole>} [roles] The resolved roles * @property {Collection<Snowflake, BaseChannel|APIChannel>} [channels] The resolved channels * @property {Collection<Snowflake, Message|APIMessage>} [messages] The resolved messages * @property {Collection<Snowflake, Attachment>} [attachments] The resolved attachments */ /** * Represents an option of a received command interaction. * @typedef {Object} CommandInteractionOption * @property {string} name The name of the option * @property {ApplicationCommandOptionType} type The type of the option * @property {boolean} [autocomplete] Whether the autocomplete interaction is enabled for a * {@link ApplicationCommandOptionType.String}, {@link ApplicationCommandOptionType.Integer} or * {@link ApplicationCommandOptionType.Number} option * @property {string|number|boolean} [value] The value of the option * @property {CommandInteractionOption[]} [options] Additional options if this option is a * subcommand (group) * @property {User} [user] The resolved user * @property {GuildMember|APIGuildMember} [member] The resolved member * @property {GuildChannel|ThreadChannel|APIChannel} [channel] The resolved channel * @property {Role|APIRole} [role] The resolved role * @property {Attachment} [attachment] The resolved attachment */ /** * Transforms an option received from the API. * @param {APIApplicationCommandOption} option The received option * @param {APIInteractionDataResolved} resolved The resolved interaction data * @returns {CommandInteractionOption} * @private */ transformOption(option, resolved) { const result = { name: option.name, type: option.type, }; if ('value' in option) result.value = option.value; if ('options' in option) result.options = option.options.map(opt => this.transformOption(opt, resolved)); if (resolved) { const user = resolved.users?.[option.value]; if (user) result.user = this.client.users._add(user); const member = resolved.members?.[option.value]; if (member) result.member = this.guild?.members._add({ user, ...member }) ?? member; const channel = resolved.channels?.[option.value]; if (channel) result.channel = this.client.channels._add(channel, this.guild) ?? channel; const role = resolved.roles?.[option.value]; if (role) result.role = this.guild?.roles._add(role) ?? role; const attachment = resolved.attachments?.[option.value]; if (attachment) result.attachment = new Attachment(attachment); } return result; } // These are here only for documentation purposes - they are implemented by InteractionResponses /* eslint-disable no-empty-function */ deferReply() {} reply() {} fetchReply() {} editReply() {} deleteReply() {} followUp() {} launchActivity() {} showModal() {} sendPremiumRequired() {} awaitModalSubmit() {} } InteractionResponses.applyToClass(CommandInteraction, ['deferUpdate', 'update']); module.exports = CommandInteraction; node_modules/discord.js/src/structures/ActionRowBuilder.js 0000664 00000002012 15114741631 0020047 0 ustar 00 'use strict'; const { ActionRowBuilder: BuildersActionRow } = require('@discordjs/builders'); const { isJSONEncodable } = require('@discordjs/util'); const { createComponentBuilder } = require('../util/Components'); const { toSnakeCase } = require('../util/Transformers'); /** * Represents an action row builder. * @extends {BuildersActionRow} */ class ActionRowBuilder extends BuildersActionRow { constructor({ components, ...data } = {}) { super({ ...toSnakeCase(data), components: components?.map(component => createComponentBuilder(component)), }); } /** * Creates a new action row builder from JSON data * @param {ActionRow|ActionRowBuilder|APIActionRowComponent} other The other data * @returns {ActionRowBuilder} */ static from(other) { return new this(isJSONEncodable(other) ? other.toJSON() : other); } } module.exports = ActionRowBuilder; /** * @external BuildersActionRow * @see {@link https://discord.js.org/docs/packages/builders/stable/ActionRowBuilder:Class} */ node_modules/discord.js/src/structures/Widget.js 0000664 00000004325 15114741631 0016067 0 ustar 00 'use strict'; const { Collection } = require('@discordjs/collection'); const { Routes } = require('discord-api-types/v10'); const Base = require('./Base'); const WidgetMember = require('./WidgetMember'); /** * Represents a Widget. * @extends {Base} */ class Widget extends Base { constructor(client, data) { super(client); this._patch(data); } /** * Represents a channel in a Widget * @typedef {Object} WidgetChannel * @property {Snowflake} id Id of the channel * @property {string} name Name of the channel * @property {number} position Position of the channel */ _patch(data) { /** * The id of the guild. * @type {Snowflake} */ this.id = data.id; if ('name' in data) { /** * The name of the guild. * @type {string} */ this.name = data.name; } if ('instant_invite' in data) { /** * The invite of the guild. * @type {?string} */ this.instantInvite = data.instant_invite; } /** * The list of channels in the guild. * @type {Collection<Snowflake, WidgetChannel>} */ this.channels = new Collection(); for (const channel of data.channels) { this.channels.set(channel.id, channel); } /** * The list of members in the guild. * These strings are just arbitrary numbers, they aren't Snowflakes. * @type {Collection<string, WidgetMember>} */ this.members = new Collection(); for (const member of data.members) { this.members.set(member.id, new WidgetMember(this.client, member)); } if ('presence_count' in data) { /** * The number of members online. * @type {number} */ this.presenceCount = data.presence_count; } } /** * Update the Widget. * @returns {Promise<Widget>} */ async fetch() { const data = await this.client.rest.get(Routes.guildWidgetJSON(this.id)); this._patch(data); return this; } /** * Returns a URL for the PNG widget of the guild. * @param {GuildWidgetStyle} [style] The style for the widget image * @returns {string} */ imageURL(style) { return this.client.guilds.widgetImageURL(this.id, style); } } module.exports = Widget; node_modules/discord.js/src/structures/TeamMember.js 0000664 00000003203 15114741631 0016654 0 ustar 00 'use strict'; const Base = require('./Base'); /** * Represents a Client OAuth2 Application Team Member. * @extends {Base} */ class TeamMember extends Base { constructor(team, data) { super(team.client); /** * The Team this member is part of * @type {Team} */ this.team = team; this._patch(data); } _patch(data) { if ('permissions' in data) { /** * The permissions this Team Member has with regard to the team * @type {string[]} * @deprecated Use {@link TeamMember#role} instead. */ this.permissions = data.permissions; } if ('membership_state' in data) { /** * The permissions this Team Member has with regard to the team * @type {TeamMemberMembershipState} */ this.membershipState = data.membership_state; } if ('user' in data) { /** * The user for this Team Member * @type {User} */ this.user = this.client.users._add(data.user); } if ('role' in data) { /** * The role of this Team Member * @type {TeamMemberRole} */ this.role = data.role; } } /** * The Team Member's id * @type {Snowflake} * @readonly */ get id() { return this.user.id; } /** * When concatenated with a string, this automatically returns the team member's mention instead of the * TeamMember object. * @returns {string} * @example * // Logs: Team Member's mention: <@123456789012345678> * console.log(`Team Member's mention: ${teamMember}`); */ toString() { return this.user.toString(); } } module.exports = TeamMember; node_modules/discord.js/src/structures/MessageCollector.js 0000664 00000011432 15114741631 0020074 0 ustar 00 'use strict'; const Collector = require('./interfaces/Collector'); const Events = require('../util/Events'); /** * @typedef {CollectorOptions} MessageCollectorOptions * @property {number} max The maximum amount of messages to collect * @property {number} maxProcessed The maximum amount of messages to process */ /** * Collects messages on a channel. * Will automatically stop if the channel ({@link Client#event:channelDelete channelDelete}), * thread ({@link Client#event:threadDelete threadDelete}), or * guild ({@link Client#event:guildDelete guildDelete}) is deleted. * @extends {Collector} */ class MessageCollector extends Collector { /** * @param {TextBasedChannels} channel The channel * @param {MessageCollectorOptions} options The options to be applied to this collector * @emits MessageCollector#message */ constructor(channel, options = {}) { super(channel.client, options); /** * The channel * @type {TextBasedChannels} */ this.channel = channel; /** * Total number of messages that were received in the channel during message collection * @type {number} */ this.received = 0; const bulkDeleteListener = messages => { for (const message of messages.values()) this.handleDispose(message); }; this._handleChannelDeletion = this._handleChannelDeletion.bind(this); this._handleThreadDeletion = this._handleThreadDeletion.bind(this); this._handleGuildDeletion = this._handleGuildDeletion.bind(this); this.client.incrementMaxListeners(); this.client.on(Events.MessageCreate, this.handleCollect); this.client.on(Events.MessageDelete, this.handleDispose); this.client.on(Events.MessageBulkDelete, bulkDeleteListener); this.client.on(Events.ChannelDelete, this._handleChannelDeletion); this.client.on(Events.ThreadDelete, this._handleThreadDeletion); this.client.on(Events.GuildDelete, this._handleGuildDeletion); this.once('end', () => { this.client.removeListener(Events.MessageCreate, this.handleCollect); this.client.removeListener(Events.MessageDelete, this.handleDispose); this.client.removeListener(Events.MessageBulkDelete, bulkDeleteListener); this.client.removeListener(Events.ChannelDelete, this._handleChannelDeletion); this.client.removeListener(Events.ThreadDelete, this._handleThreadDeletion); this.client.removeListener(Events.GuildDelete, this._handleGuildDeletion); this.client.decrementMaxListeners(); }); } /** * Handles a message for possible collection. * @param {Message} message The message that could be collected * @returns {?Snowflake} * @private */ collect(message) { /** * Emitted whenever a message is collected. * @event MessageCollector#collect * @param {Message} message The message that was collected */ if (message.channelId !== this.channel.id) return null; this.received++; return message.id; } /** * Handles a message for possible disposal. * @param {Message} message The message that could be disposed of * @returns {?Snowflake} */ dispose(message) { /** * Emitted whenever a message is disposed of. * @event MessageCollector#dispose * @param {Message} message The message that was disposed of */ return message.channelId === this.channel.id ? message.id : null; } /** * The reason this collector has ended with, or null if it hasn't ended yet * @type {?string} * @readonly */ get endReason() { if (this.options.max && this.collected.size >= this.options.max) return 'limit'; if (this.options.maxProcessed && this.received === this.options.maxProcessed) return 'processedLimit'; return super.endReason; } /** * Handles checking if the channel has been deleted, and if so, stops the collector with the reason 'channelDelete'. * @private * @param {GuildChannel} channel The channel that was deleted * @returns {void} */ _handleChannelDeletion(channel) { if (channel.id === this.channel.id || channel.id === this.channel.parentId) { this.stop('channelDelete'); } } /** * Handles checking if the thread has been deleted, and if so, stops the collector with the reason 'threadDelete'. * @private * @param {ThreadChannel} thread The thread that was deleted * @returns {void} */ _handleThreadDeletion(thread) { if (thread.id === this.channel.id) { this.stop('threadDelete'); } } /** * Handles checking if the guild has been deleted, and if so, stops the collector with the reason 'guildDelete'. * @private * @param {Guild} guild The guild that was deleted * @returns {void} */ _handleGuildDeletion(guild) { if (guild.id === this.channel.guild?.id) { this.stop('guildDelete'); } } } module.exports = MessageCollector; node_modules/discord.js/src/structures/InteractionCallbackResponse.js 0000664 00000001700 15114741631 0022251 0 ustar 00 'use strict'; const InteractionCallback = require('./InteractionCallback'); const InteractionCallbackResource = require('./InteractionCallbackResource'); /** * Represents an interaction's response */ class InteractionCallbackResponse { constructor(client, data) { /** * The client that instantiated this * @name InteractionCallbackResponse#client * @type {Client} * @readonly */ Object.defineProperty(this, 'client', { value: client }); /** * The interaction object associated with the interaction callback response * @type {InteractionCallback} */ this.interaction = new InteractionCallback(client, data.interaction); /** * The resource that was created by the interaction response * @type {?InteractionCallbackResource} */ this.resource = data.resource ? new InteractionCallbackResource(client, data.resource) : null; } } module.exports = InteractionCallbackResponse; node_modules/discord.js/src/structures/GuildOnboarding.js 0000664 00000003062 15114741631 0017710 0 ustar 00 'use strict'; const { Collection } = require('@discordjs/collection'); const Base = require('./Base'); const { GuildOnboardingPrompt } = require('./GuildOnboardingPrompt'); /** * Represents the onboarding data of a guild. * @extends {Base} */ class GuildOnboarding extends Base { constructor(client, data) { super(client); /** * The id of the guild this onboarding data is for * @type {Snowflake} */ this.guildId = data.guild_id; const guild = this.guild; /** * The prompts shown during onboarding and in customize community * @type {Collection<Snowflake, GuildOnboardingPrompt>} */ this.prompts = data.prompts.reduce( (prompts, prompt) => prompts.set(prompt.id, new GuildOnboardingPrompt(client, prompt, this.guildId)), new Collection(), ); /** * The ids of the channels that new members get opted into automatically * @type {Collection<Snowflake, GuildChannel>} */ this.defaultChannels = data.default_channel_ids.reduce( (channels, channelId) => channels.set(channelId, guild.channels.cache.get(channelId)), new Collection(), ); /** * Whether onboarding is enabled * @type {boolean} */ this.enabled = data.enabled; /** * The mode of this onboarding * @type {GuildOnboardingMode} */ this.mode = data.mode; } /** * The guild this onboarding is from * @type {Guild} * @readonly */ get guild() { return this.client.guilds.cache.get(this.guildId); } } exports.GuildOnboarding = GuildOnboarding; node_modules/discord.js/src/structures/AutoModerationActionExecution.js 0000664 00000005752 15114741631 0022625 0 ustar 00 'use strict'; const { _transformAPIAutoModerationAction } = require('../util/Transformers'); /** * Represents the structure of an executed action when an {@link AutoModerationRule} is triggered. */ class AutoModerationActionExecution { constructor(data, guild) { /** * The guild where this action was executed from. * @type {Guild} */ this.guild = guild; /** * The action that was executed. * @type {AutoModerationAction} */ this.action = _transformAPIAutoModerationAction(data.action); /** * The id of the auto moderation rule this action belongs to. * @type {Snowflake} */ this.ruleId = data.rule_id; /** * The trigger type of the auto moderation rule which was triggered. * @type {AutoModerationRuleTriggerType} */ this.ruleTriggerType = data.rule_trigger_type; /** * The id of the user that triggered this action. * @type {Snowflake} */ this.userId = data.user_id; /** * The id of the channel where this action was triggered from. * @type {?Snowflake} */ this.channelId = data.channel_id ?? null; /** * The id of the message that triggered this action. * <info>This will not be present if the message was blocked or the content was not part of any message.</info> * @type {?Snowflake} */ this.messageId = data.message_id ?? null; /** * The id of any system auto moderation messages posted as a result of this action. * @type {?Snowflake} */ this.alertSystemMessageId = data.alert_system_message_id ?? null; /** * The content that triggered this action. * <info>This property requires the {@link GatewayIntentBits.MessageContent} privileged gateway intent.</info> * @type {string} */ this.content = data.content; /** * The word or phrase configured in the rule that triggered this action. * @type {?string} */ this.matchedKeyword = data.matched_keyword ?? null; /** * The substring in content that triggered this action. * @type {?string} */ this.matchedContent = data.matched_content ?? null; } /** * The auto moderation rule this action belongs to. * @type {?AutoModerationRule} * @readonly */ get autoModerationRule() { return this.guild.autoModerationRules.cache.get(this.ruleId) ?? null; } /** * The channel where this action was triggered from. * @type {?(GuildTextBasedChannel|ForumChannel|MediaChannel)} * @readonly */ get channel() { return this.guild.channels.cache.get(this.channelId) ?? null; } /** * The user that triggered this action. * @type {?User} * @readonly */ get user() { return this.guild.client.users.cache.get(this.userId) ?? null; } /** * The guild member that triggered this action. * @type {?GuildMember} * @readonly */ get member() { return this.guild.members.cache.get(this.userId) ?? null; } } module.exports = AutoModerationActionExecution; node_modules/discord.js/src/structures/GuildPreview.js 0000664 00000011007 15114741631 0017245 0 ustar 00 'use strict'; const { Collection } = require('@discordjs/collection'); const { DiscordSnowflake } = require('@sapphire/snowflake'); const { Routes } = require('discord-api-types/v10'); const Base = require('./Base'); const GuildPreviewEmoji = require('./GuildPreviewEmoji'); const { Sticker } = require('./Sticker'); /** * Represents the data about the guild any bot can preview, connected to the specified guild. * @extends {Base} */ class GuildPreview extends Base { constructor(client, data) { super(client); if (!data) return; this._patch(data); } _patch(data) { /** * The id of this guild * @type {string} */ this.id = data.id; if ('name' in data) { /** * The name of this guild * @type {string} */ this.name = data.name; } if ('icon' in data) { /** * The icon of this guild * @type {?string} */ this.icon = data.icon; } if ('splash' in data) { /** * The splash icon of this guild * @type {?string} */ this.splash = data.splash; } if ('discovery_splash' in data) { /** * The discovery splash icon of this guild * @type {?string} */ this.discoverySplash = data.discovery_splash; } if ('features' in data) { /** * An array of enabled guild features * @type {GuildFeature[]} */ this.features = data.features; } if ('approximate_member_count' in data) { /** * The approximate count of members in this guild * @type {number} */ this.approximateMemberCount = data.approximate_member_count; } if ('approximate_presence_count' in data) { /** * The approximate count of online members in this guild * @type {number} */ this.approximatePresenceCount = data.approximate_presence_count; } if ('description' in data) { /** * The description for this guild * @type {?string} */ this.description = data.description; } else { this.description ??= null; } if (!this.emojis) { /** * Collection of emojis belonging to this guild * @type {Collection<Snowflake, GuildPreviewEmoji>} */ this.emojis = new Collection(); } else { this.emojis.clear(); } for (const emoji of data.emojis) { this.emojis.set(emoji.id, new GuildPreviewEmoji(this.client, emoji, this)); } /** * Collection of stickers belonging to this guild * @type {Collection<Snowflake, Sticker>} */ this.stickers = data.stickers.reduce( (stickers, sticker) => stickers.set(sticker.id, new Sticker(this.client, sticker)), new Collection(), ); } /** * The timestamp this guild was created at * @type {number} * @readonly */ get createdTimestamp() { return DiscordSnowflake.timestampFrom(this.id); } /** * The time this guild was created at * @type {Date} * @readonly */ get createdAt() { return new Date(this.createdTimestamp); } /** * The URL to this guild's splash. * @param {ImageURLOptions} [options={}] Options for the image URL * @returns {?string} */ splashURL(options = {}) { return this.splash && this.client.rest.cdn.splash(this.id, this.splash, options); } /** * The URL to this guild's discovery splash. * @param {ImageURLOptions} [options={}] Options for the image URL * @returns {?string} */ discoverySplashURL(options = {}) { return this.discoverySplash && this.client.rest.cdn.discoverySplash(this.id, this.discoverySplash, options); } /** * The URL to this guild's icon. * @param {ImageURLOptions} [options={}] Options for the image URL * @returns {?string} */ iconURL(options = {}) { return this.icon && this.client.rest.cdn.icon(this.id, this.icon, options); } /** * Fetches this guild. * @returns {Promise<GuildPreview>} */ async fetch() { const data = await this.client.rest.get(Routes.guildPreview(this.id)); this._patch(data); return this; } /** * When concatenated with a string, this automatically returns the guild's name instead of the Guild object. * @returns {string} * @example * // Logs: Hello from My Guild! * console.log(`Hello from ${previewGuild}!`); */ toString() { return this.name; } toJSON() { const json = super.toJSON(); json.iconURL = this.iconURL(); json.splashURL = this.splashURL(); return json; } } module.exports = GuildPreview; node_modules/discord.js/src/structures/WelcomeScreen.js 0000664 00000002301 15114741631 0017367 0 ustar 00 'use strict'; const { Collection } = require('@discordjs/collection'); const { GuildFeature } = require('discord-api-types/v10'); const Base = require('./Base'); const WelcomeChannel = require('./WelcomeChannel'); /** * Represents a welcome screen. * @extends {Base} */ class WelcomeScreen extends Base { constructor(guild, data) { super(guild.client); /** * The guild for this welcome screen * @type {Guild} */ this.guild = guild; /** * The description of this welcome screen * @type {?string} */ this.description = data.description ?? null; /** * Collection of welcome channels belonging to this welcome screen * @type {Collection<Snowflake, WelcomeChannel>} */ this.welcomeChannels = new Collection(); for (const channel of data.welcome_channels) { const welcomeChannel = new WelcomeChannel(this.guild, channel); this.welcomeChannels.set(welcomeChannel.channelId, welcomeChannel); } } /** * Whether the welcome screen is enabled on the guild * @type {boolean} */ get enabled() { return this.guild.features.includes(GuildFeature.WelcomeScreenEnabled); } } module.exports = WelcomeScreen; node_modules/discord.js/src/structures/AttachmentBuilder.js 0000664 00000005164 15114741631 0020245 0 ustar 00 'use strict'; const { basename, flatten } = require('../util/Util'); /** * Represents an attachment builder */ class AttachmentBuilder { /** * @param {BufferResolvable|Stream} attachment The file * @param {AttachmentData} [data] Extra data */ constructor(attachment, data = {}) { /** * The file associated with this attachment. * @type {BufferResolvable|Stream} */ this.attachment = attachment; /** * The name of this attachment * @type {?string} */ this.name = data.name; /** * The description of the attachment * @type {?string} */ this.description = data.description; } /** * Sets the description of this attachment. * @param {string} description The description of the file * @returns {AttachmentBuilder} This attachment */ setDescription(description) { this.description = description; return this; } /** * Sets the file of this attachment. * @param {BufferResolvable|Stream} attachment The file * @returns {AttachmentBuilder} This attachment */ setFile(attachment) { this.attachment = attachment; return this; } /** * Sets the name of this attachment. * @param {string} name The name of the file * @returns {AttachmentBuilder} This attachment */ setName(name) { this.name = name; return this; } /** * Sets whether this attachment is a spoiler * @param {boolean} [spoiler=true] Whether the attachment should be marked as a spoiler * @returns {AttachmentBuilder} This attachment */ setSpoiler(spoiler = true) { if (spoiler === this.spoiler) return this; if (!spoiler) { while (this.spoiler) { this.name = this.name.slice('SPOILER_'.length); } return this; } this.name = `SPOILER_${this.name}`; return this; } /** * Whether or not this attachment has been marked as a spoiler * @type {boolean} * @readonly */ get spoiler() { return basename(this.name).startsWith('SPOILER_'); } toJSON() { return flatten(this); } /** * Makes a new builder instance from a preexisting attachment structure. * @param {AttachmentBuilder|Attachment|AttachmentPayload} other The builder to construct a new instance from * @returns {AttachmentBuilder} */ static from(other) { return new AttachmentBuilder(other.attachment, { name: other.name, description: other.description, }); } } module.exports = AttachmentBuilder; /** * @typedef {Object} AttachmentData * @property {string} [name] The name of the attachment * @property {string} [description] The description of the attachment */ node_modules/discord.js/src/structures/InteractionResponse.js 0000664 00000005417 15114741631 0020645 0 ustar 00 'use strict'; const { DiscordSnowflake } = require('@sapphire/snowflake'); const { InteractionType } = require('discord-api-types/v10'); const { DiscordjsError, ErrorCodes } = require('../errors'); /** * Represents an interaction's response */ class InteractionResponse { constructor(interaction, id) { /** * The interaction associated with the interaction response * @type {BaseInteraction} */ this.interaction = interaction; /** * The id of the original interaction response * @type {Snowflake} */ this.id = id ?? interaction.id; this.client = interaction.client; } /** * The timestamp the interaction response was created at * @type {number} * @readonly */ get createdTimestamp() { return DiscordSnowflake.timestampFrom(this.id); } /** * The time the interaction response was created at * @type {Date} * @readonly */ get createdAt() { return new Date(this.createdTimestamp); } /** * Collects a single component interaction that passes the filter. * The Promise will reject if the time expires. * @param {AwaitMessageComponentOptions} [options={}] Options to pass to the internal collector * @returns {Promise<MessageComponentInteraction>} */ awaitMessageComponent(options = {}) { const _options = { ...options, max: 1 }; return new Promise((resolve, reject) => { const collector = this.createMessageComponentCollector(_options); collector.once('end', (interactions, reason) => { const interaction = interactions.first(); if (interaction) resolve(interaction); else reject(new DiscordjsError(ErrorCodes.InteractionCollectorError, reason)); }); }); } /** * Creates a message component interaction collector * @param {MessageComponentCollectorOptions} [options={}] Options to send to the collector * @returns {InteractionCollector} */ createMessageComponentCollector(options = {}) { return new InteractionCollector(this.client, { ...options, interactionResponse: this, interactionType: InteractionType.MessageComponent, }); } /** * Fetches the response as a {@link Message} object. * @returns {Promise<Message>} */ fetch() { return this.interaction.fetchReply(); } /** * Deletes the response. * @returns {Promise<void>} */ delete() { return this.interaction.deleteReply(); } /** * Edits the response. * @param {string|MessagePayload|WebhookMessageEditOptions} options The new options for the response. * @returns {Promise<Message>} */ edit(options) { return this.interaction.editReply(options); } } // eslint-disable-next-line import/order const InteractionCollector = require('./InteractionCollector'); module.exports = InteractionResponse; node_modules/discord.js/src/structures/MediaChannel.js 0000664 00000000341 15114741631 0017146 0 ustar 00 'use strict'; const ThreadOnlyChannel = require('./ThreadOnlyChannel'); /** * Represents a media channel. * @extends {ThreadOnlyChannel} */ class MediaChannel extends ThreadOnlyChannel {} module.exports = MediaChannel; node_modules/discord.js/src/structures/VoiceChannelEffect.js 0000664 00000003305 15114741631 0020314 0 ustar 00 'use strict'; const { Emoji } = require('./Emoji'); /** * Represents an effect used in a {@link VoiceChannel}. */ class VoiceChannelEffect { constructor(data, guild) { /** * The guild where the effect was sent from. * @type {Guild} */ this.guild = guild; /** * The id of the channel the effect was sent in. * @type {Snowflake} */ this.channelId = data.channel_id; /** * The id of the user that sent the effect. * @type {Snowflake} */ this.userId = data.user_id; /** * The emoji of the effect. * @type {?Emoji} */ this.emoji = data.emoji ? new Emoji(guild.client, data.emoji) : null; /** * The animation type of the effect. * @type {?VoiceChannelEffectSendAnimationType} */ this.animationType = data.animation_type ?? null; /** * The animation id of the effect. * @type {?number} */ this.animationId = data.animation_id ?? null; /** * The id of the soundboard sound for soundboard effects. * @type {?(Snowflake|number)} */ this.soundId = data.sound_id ?? null; /** * The volume of the soundboard sound [0-1] for soundboard effects. * @type {?number} */ this.soundVolume = data.sound_volume ?? null; } /** * The channel the effect was sent in. * @type {?VoiceChannel} * @readonly */ get channel() { return this.guild.channels.cache.get(this.channelId) ?? null; } /** * The soundboard sound for soundboard effects. * @type {?SoundboardSound} * @readonly */ get soundboardSound() { return this.guild.soundboardSounds.cache.get(this.soundId) ?? null; } } module.exports = VoiceChannelEffect; node_modules/discord.js/src/structures/PermissionOverwrites.js 0000664 00000013766 15114741631 0021077 0 ustar 00 'use strict'; const { OverwriteType } = require('discord-api-types/v10'); const Base = require('./Base'); const { Role } = require('./Role'); const { DiscordjsTypeError, ErrorCodes } = require('../errors'); const PermissionsBitField = require('../util/PermissionsBitField'); /** * Represents a permission overwrite for a role or member in a guild channel. * @extends {Base} */ class PermissionOverwrites extends Base { constructor(client, data, channel) { super(client); /** * The GuildChannel this overwrite is for * @name PermissionOverwrites#channel * @type {GuildChannel} * @readonly */ Object.defineProperty(this, 'channel', { value: channel }); if (data) this._patch(data); } _patch(data) { /** * The overwrite's id, either a {@link User} or a {@link Role} id * @type {Snowflake} */ this.id = data.id; if ('type' in data) { /** * The type of this overwrite * @type {OverwriteType} */ this.type = data.type; } if ('deny' in data) { /** * The permissions that are denied for the user or role. * @type {Readonly<PermissionsBitField>} */ this.deny = new PermissionsBitField(BigInt(data.deny)).freeze(); } if ('allow' in data) { /** * The permissions that are allowed for the user or role. * @type {Readonly<PermissionsBitField>} */ this.allow = new PermissionsBitField(BigInt(data.allow)).freeze(); } } /** * Edits this Permission Overwrite. * @param {PermissionOverwriteOptions} options The options for the update * @param {string} [reason] Reason for creating/editing this overwrite * @returns {Promise<PermissionOverwrites>} * @example * // Update permission overwrites * permissionOverwrites.edit({ * SendMessages: false * }) * .then(channel => console.log(channel.permissionOverwrites.get(message.author.id))) * .catch(console.error); */ async edit(options, reason) { await this.channel.permissionOverwrites.upsert(this.id, options, { type: this.type, reason }, this); return this; } /** * Deletes this Permission Overwrite. * @param {string} [reason] Reason for deleting this overwrite * @returns {Promise<PermissionOverwrites>} */ async delete(reason) { await this.channel.permissionOverwrites.delete(this.id, reason); return this; } toJSON() { return { id: this.id, type: this.type, allow: this.allow, deny: this.deny, }; } /** * An object mapping permission flags to `true` (enabled), `null` (unset) or `false` (disabled). * ```js * { * 'SendMessages': true, * 'EmbedLinks': null, * 'AttachFiles': false, * } * ``` * @typedef {Object} PermissionOverwriteOptions */ /** * @typedef {Object} ResolvedOverwriteOptions * @property {PermissionsBitField} allow The allowed permissions * @property {PermissionsBitField} deny The denied permissions */ /** * Resolves bitfield permissions overwrites from an object. * @param {PermissionOverwriteOptions} options The options for the update * @param {ResolvedOverwriteOptions} initialPermissions The initial permissions * @returns {ResolvedOverwriteOptions} */ static resolveOverwriteOptions(options, { allow, deny } = {}) { allow = new PermissionsBitField(allow); deny = new PermissionsBitField(deny); for (const [perm, value] of Object.entries(options)) { if (value === true) { allow.add(perm); deny.remove(perm); } else if (value === false) { allow.remove(perm); deny.add(perm); } else if (value === null) { allow.remove(perm); deny.remove(perm); } } return { allow, deny }; } /** * The raw data for a permission overwrite * @typedef {Object} RawOverwriteData * @property {Snowflake} id The id of the {@link Role} or {@link User} this overwrite belongs to * @property {string} allow The permissions to allow * @property {string} deny The permissions to deny * @property {number} type The type of this OverwriteData */ /** * Data that can be resolved into {@link APIOverwrite}. This can be: * * PermissionOverwrites * * OverwriteData * @typedef {PermissionOverwrites|OverwriteData} OverwriteResolvable */ /** * Data that can be used for a permission overwrite * @typedef {Object} OverwriteData * @property {GuildMemberResolvable|RoleResolvable} id Member or role this overwrite is for * @property {PermissionResolvable} [allow] The permissions to allow * @property {PermissionResolvable} [deny] The permissions to deny * @property {OverwriteType} [type] The type of this OverwriteData */ /** * Resolves an overwrite into {@link APIOverwrite}. * @param {OverwriteResolvable} overwrite The overwrite-like data to resolve * @param {Guild} [guild] The guild to resolve from * @returns {RawOverwriteData} */ static resolve(overwrite, guild) { if (overwrite instanceof this) return overwrite.toJSON(); if (typeof overwrite.id === 'string' && overwrite.type in OverwriteType) { return { id: overwrite.id, type: overwrite.type, allow: PermissionsBitField.resolve(overwrite.allow ?? PermissionsBitField.DefaultBit).toString(), deny: PermissionsBitField.resolve(overwrite.deny ?? PermissionsBitField.DefaultBit).toString(), }; } const userOrRole = guild.roles.resolve(overwrite.id) ?? guild.client.users.resolve(overwrite.id); if (!userOrRole) { throw new DiscordjsTypeError(ErrorCodes.InvalidType, 'parameter', 'cached User or Role'); } const type = userOrRole instanceof Role ? OverwriteType.Role : OverwriteType.Member; return { id: userOrRole.id, type, allow: PermissionsBitField.resolve(overwrite.allow ?? PermissionsBitField.DefaultBit).toString(), deny: PermissionsBitField.resolve(overwrite.deny ?? PermissionsBitField.DefaultBit).toString(), }; } } module.exports = PermissionOverwrites; node_modules/discord.js/src/structures/UnfurledMediaItem.js 0000664 00000001067 15114741631 0020207 0 ustar 00 'use strict'; /** * Represents a media item in a component */ class UnfurledMediaItem { constructor(data) { /** * The API data associated with this media item * @type {APIUnfurledMediaItem} */ this.data = data; } /** * The URL of this media gallery item * @type {string} * @readonly */ get url() { return this.data.url; } /** * Returns the API-compatible JSON for this media item * @returns {APIUnfurledMediaItem} */ toJSON() { return { ...this.data }; } } module.exports = UnfurledMediaItem; node_modules/discord.js/src/structures/BaseInteraction.js 0000664 00000023053 15114741631 0017715 0 ustar 00 'use strict'; const { deprecate } = require('node:util'); const { Collection } = require('@discordjs/collection'); const { DiscordSnowflake } = require('@sapphire/snowflake'); const { InteractionType, ApplicationCommandType, ComponentType } = require('discord-api-types/v10'); const Base = require('./Base'); const { SelectMenuTypes } = require('../util/Constants'); const PermissionsBitField = require('../util/PermissionsBitField'); /** * Represents an interaction. * @extends {Base} * @abstract */ class BaseInteraction extends Base { constructor(client, data) { super(client); /** * The interaction's type * @type {InteractionType} */ this.type = data.type; /** * The interaction's id * @type {Snowflake} */ this.id = data.id; /** * The interaction's token * @type {string} * @name BaseInteraction#token * @readonly */ Object.defineProperty(this, 'token', { value: data.token }); /** * The application's id * @type {Snowflake} */ this.applicationId = data.application_id; /** * The id of the channel this interaction was sent in * @type {?Snowflake} */ this.channelId = data.channel?.id ?? null; /** * The id of the guild this interaction was sent in * @type {?Snowflake} */ this.guildId = data.guild_id ?? null; /** * The user who created this interaction * @type {User} */ this.user = this.client.users._add(data.user ?? data.member.user); /** * If this interaction was sent in a guild, the member which sent it * @type {?(GuildMember|APIInteractionGuildMember)} */ this.member = data.member ? (this.guild?.members._add(data.member) ?? data.member) : null; /** * The version * @type {number} */ this.version = data.version; /** * Set of permissions the application or bot has within the channel the interaction was sent from * @type {Readonly<PermissionsBitField>} */ this.appPermissions = new PermissionsBitField(data.app_permissions).freeze(); /** * The permissions of the member, if one exists, in the channel this interaction was executed in * @type {?Readonly<PermissionsBitField>} */ this.memberPermissions = data.member?.permissions ? new PermissionsBitField(data.member.permissions).freeze() : null; /** * The locale of the user who invoked this interaction * @type {Locale} */ this.locale = data.locale; /** * The preferred locale from the guild this interaction was sent in * @type {?Locale} */ this.guildLocale = data.guild_locale ?? null; /** * The entitlements for the invoking user, representing access to premium SKUs * @type {Collection<Snowflake, Entitlement>} */ this.entitlements = data.entitlements.reduce( (coll, entitlement) => coll.set(entitlement.id, this.client.application.entitlements._add(entitlement)), new Collection(), ); /* eslint-disable max-len */ /** * Mapping of installation contexts that the interaction was authorized for the related user or guild ids * @type {APIAuthorizingIntegrationOwnersMap} * @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object-authorizing-integration-owners-object} */ this.authorizingIntegrationOwners = data.authorizing_integration_owners; /* eslint-enable max-len */ /** * Context where the interaction was triggered from * @type {?InteractionContextType} */ this.context = data.context ?? null; /** * Attachment size limit in bytes * @type {number} */ this.attachmentSizeLimit = data.attachment_size_limit; } /** * The timestamp the interaction was created at * @type {number} * @readonly */ get createdTimestamp() { return DiscordSnowflake.timestampFrom(this.id); } /** * The time the interaction was created at * @type {Date} * @readonly */ get createdAt() { return new Date(this.createdTimestamp); } /** * The channel this interaction was sent in * @type {?TextBasedChannels} * @readonly */ get channel() { return this.client.channels.cache.get(this.channelId) ?? null; } /** * The guild this interaction was sent in * @type {?Guild} * @readonly */ get guild() { return this.client.guilds.cache.get(this.guildId) ?? null; } /** * Indicates whether this interaction is received from a guild. * @returns {boolean} */ inGuild() { return Boolean(this.guildId && this.member); } /** * Indicates whether this interaction is received from a cached guild. * @returns {boolean} */ inCachedGuild() { return Boolean(this.guild && this.member); } /** * Indicates whether or not this interaction is received from an uncached guild. * @returns {boolean} */ inRawGuild() { return Boolean(this.guildId && !this.guild && this.member); } /** * Indicates whether this interaction is an {@link AutocompleteInteraction} * @returns {boolean} */ isAutocomplete() { return this.type === InteractionType.ApplicationCommandAutocomplete; } /** * Indicates whether this interaction is a {@link CommandInteraction} * @returns {boolean} */ isCommand() { return this.type === InteractionType.ApplicationCommand; } /** * Indicates whether this interaction is a {@link ChatInputCommandInteraction}. * @returns {boolean} */ isChatInputCommand() { return this.type === InteractionType.ApplicationCommand && this.commandType === ApplicationCommandType.ChatInput; } /** * Indicates whether this interaction is a {@link ContextMenuCommandInteraction} * @returns {boolean} */ isContextMenuCommand() { return ( this.type === InteractionType.ApplicationCommand && [ApplicationCommandType.User, ApplicationCommandType.Message].includes(this.commandType) ); } /** * Indicates whether this interaction is a {@link PrimaryEntryPointCommandInteraction} * @returns {boolean} */ isPrimaryEntryPointCommand() { return ( this.type === InteractionType.ApplicationCommand && this.commandType === ApplicationCommandType.PrimaryEntryPoint ); } /** * Indicates whether this interaction is a {@link MessageComponentInteraction} * @returns {boolean} */ isMessageComponent() { return this.type === InteractionType.MessageComponent; } /** * Indicates whether this interaction is a {@link ModalSubmitInteraction} * @returns {boolean} */ isModalSubmit() { return this.type === InteractionType.ModalSubmit; } /** * Indicates whether this interaction is a {@link UserContextMenuCommandInteraction} * @returns {boolean} */ isUserContextMenuCommand() { return this.isContextMenuCommand() && this.commandType === ApplicationCommandType.User; } /** * Indicates whether this interaction is a {@link MessageContextMenuCommandInteraction} * @returns {boolean} */ isMessageContextMenuCommand() { return this.isContextMenuCommand() && this.commandType === ApplicationCommandType.Message; } /** * Indicates whether this interaction is a {@link ButtonInteraction}. * @returns {boolean} */ isButton() { return this.type === InteractionType.MessageComponent && this.componentType === ComponentType.Button; } /** * Indicates whether this interaction is a {@link StringSelectMenuInteraction}. * @returns {boolean} * @deprecated Use {@link BaseInteraction#isStringSelectMenu} instead. */ isSelectMenu() { return this.isStringSelectMenu(); } /** * Indicates whether this interaction is a select menu of any known type. * @returns {boolean} */ isAnySelectMenu() { return this.type === InteractionType.MessageComponent && SelectMenuTypes.includes(this.componentType); } /** * Indicates whether this interaction is a {@link StringSelectMenuInteraction}. * @returns {boolean} */ isStringSelectMenu() { return this.type === InteractionType.MessageComponent && this.componentType === ComponentType.StringSelect; } /** * Indicates whether this interaction is a {@link UserSelectMenuInteraction} * @returns {boolean} */ isUserSelectMenu() { return this.type === InteractionType.MessageComponent && this.componentType === ComponentType.UserSelect; } /** * Indicates whether this interaction is a {@link RoleSelectMenuInteraction} * @returns {boolean} */ isRoleSelectMenu() { return this.type === InteractionType.MessageComponent && this.componentType === ComponentType.RoleSelect; } /** * Indicates whether this interaction is a {@link ChannelSelectMenuInteraction} * @returns {boolean} */ isChannelSelectMenu() { return this.type === InteractionType.MessageComponent && this.componentType === ComponentType.ChannelSelect; } /** * Indicates whether this interaction is a {@link MentionableSelectMenuInteraction} * @returns {boolean} */ isMentionableSelectMenu() { return this.type === InteractionType.MessageComponent && this.componentType === ComponentType.MentionableSelect; } /** * Indicates whether this interaction can be replied to. * @returns {boolean} */ isRepliable() { return ![InteractionType.Ping, InteractionType.ApplicationCommandAutocomplete].includes(this.type); } } BaseInteraction.prototype.isSelectMenu = deprecate( BaseInteraction.prototype.isSelectMenu, 'BaseInteraction#isSelectMenu() is deprecated. Use BaseInteraction#isStringSelectMenu() instead.', ); module.exports = BaseInteraction; node_modules/discord.js/src/structures/BaseGuild.js 0000664 00000004707 15114741631 0016507 0 ustar 00 'use strict'; const { makeURLSearchParams } = require('@discordjs/rest'); const { DiscordSnowflake } = require('@sapphire/snowflake'); const { Routes, GuildFeature } = require('discord-api-types/v10'); const Base = require('./Base'); /** * The base class for {@link Guild}, {@link OAuth2Guild} and {@link InviteGuild}. * @extends {Base} * @abstract */ class BaseGuild extends Base { constructor(client, data) { super(client); /** * The guild's id * @type {Snowflake} */ this.id = data.id; /** * The name of this guild * @type {string} */ this.name = data.name; /** * The icon hash of this guild * @type {?string} */ this.icon = data.icon; /** * An array of features available to this guild * @type {GuildFeature[]} */ this.features = data.features; } /** * The timestamp this guild was created at * @type {number} * @readonly */ get createdTimestamp() { return DiscordSnowflake.timestampFrom(this.id); } /** * The time this guild was created at * @type {Date} * @readonly */ get createdAt() { return new Date(this.createdTimestamp); } /** * The acronym that shows up in place of a guild icon * @type {string} * @readonly */ get nameAcronym() { return this.name .replace(/'s /g, ' ') .replace(/\w+/g, e => e[0]) .replace(/\s/g, ''); } /** * Whether this guild is partnered * @type {boolean} * @readonly */ get partnered() { return this.features.includes(GuildFeature.Partnered); } /** * Whether this guild is verified * @type {boolean} * @readonly */ get verified() { return this.features.includes(GuildFeature.Verified); } /** * The URL to this guild's icon. * @param {ImageURLOptions} [options={}] Options for the image URL * @returns {?string} */ iconURL(options = {}) { return this.icon && this.client.rest.cdn.icon(this.id, this.icon, options); } /** * Fetches this guild. * @returns {Promise<Guild>} */ async fetch() { const data = await this.client.rest.get(Routes.guild(this.id), { query: makeURLSearchParams({ with_counts: true }), }); return this.client.guilds._add(data); } /** * When concatenated with a string, this automatically returns the guild's name instead of the Guild object. * @returns {string} */ toString() { return this.name; } } module.exports = BaseGuild; node_modules/discord.js/src/structures/interfaces/Application.js 0000664 00000006624 15114741631 0021236 0 ustar 00 'use strict'; const { DiscordSnowflake } = require('@sapphire/snowflake'); const Base = require('../Base'); /** * Represents an OAuth2 Application. * @extends {Base} * @abstract */ class Application extends Base { constructor(client, data) { super(client); this._patch(data); } _patch(data) { /** * The application's id * @type {Snowflake} */ this.id = data.id; if ('name' in data) { /** * The name of the application * @type {?string} */ this.name = data.name; } else { this.name ??= null; } if ('description' in data) { /** * The application's description * @type {?string} */ this.description = data.description; } else { this.description ??= null; } if ('icon' in data) { /** * The application's icon hash * @type {?string} */ this.icon = data.icon; } else { this.icon ??= null; } if ('terms_of_service_url' in data) { /** * The URL of the application's terms of service * @type {?string} */ this.termsOfServiceURL = data.terms_of_service_url; } else { this.termsOfServiceURL ??= null; } if ('privacy_policy_url' in data) { /** * The URL of the application's privacy policy * @type {?string} */ this.privacyPolicyURL = data.privacy_policy_url; } else { this.privacyPolicyURL ??= null; } if ('rpc_origins' in data) { /** * The application's RPC origins, if enabled * @type {string[]} */ this.rpcOrigins = data.rpc_origins; } else { this.rpcOrigins ??= []; } if ('cover_image' in data) { /** * The hash of the application's cover image * @type {?string} */ this.cover = data.cover_image; } else { this.cover ??= null; } if ('verify_key' in data) { /** * The hex-encoded key for verification in interactions and the GameSDK's GetTicket * @type {?string} */ this.verifyKey = data.verify_key; } else { this.verifyKey ??= null; } } /** * The timestamp the application was created at * @type {number} * @readonly */ get createdTimestamp() { return DiscordSnowflake.timestampFrom(this.id); } /** * The time the application was created at * @type {Date} * @readonly */ get createdAt() { return new Date(this.createdTimestamp); } /** * A link to the application's icon. * @param {ImageURLOptions} [options={}] Options for the image URL * @returns {?string} */ iconURL(options = {}) { return this.icon && this.client.rest.cdn.appIcon(this.id, this.icon, options); } /** * A link to this application's cover image. * @param {ImageURLOptions} [options={}] Options for the image URL * @returns {?string} */ coverURL(options = {}) { return this.cover && this.client.rest.cdn.appIcon(this.id, this.cover, options); } /** * When concatenated with a string, this automatically returns the application's name instead of the * Application object. * @returns {?string} * @example * // Logs: Application name: My App * console.log(`Application name: ${application}`); */ toString() { return this.name; } toJSON() { return super.toJSON({ createdTimestamp: true }); } } module.exports = Application; node_modules/discord.js/src/structures/interfaces/TextBasedChannel.js 0000664 00000040605 15114741631 0022144 0 ustar 00 'use strict'; const { Collection } = require('@discordjs/collection'); const { DiscordSnowflake } = require('@sapphire/snowflake'); const { InteractionType, Routes } = require('discord-api-types/v10'); const { DiscordjsTypeError, DiscordjsError, ErrorCodes } = require('../../errors'); const { MaxBulkDeletableMessageAge } = require('../../util/Constants'); const InteractionCollector = require('../InteractionCollector'); const MessageCollector = require('../MessageCollector'); const MessagePayload = require('../MessagePayload'); /** * Interface for classes that have text-channel-like features. * @interface */ class TextBasedChannel { constructor() { /** * A manager of the messages sent to this channel * @type {GuildMessageManager} */ this.messages = new GuildMessageManager(this); /** * The channel's last message id, if one was sent * @type {?Snowflake} */ this.lastMessageId = null; /** * The timestamp when the last pinned message was pinned, if there was one * @type {?number} */ this.lastPinTimestamp = null; } /** * The Message object of the last message in the channel, if one was sent * @type {?Message} * @readonly */ get lastMessage() { return this.messages.resolve(this.lastMessageId); } /** * The date when the last pinned message was pinned, if there was one * @type {?Date} * @readonly */ get lastPinAt() { return this.lastPinTimestamp && new Date(this.lastPinTimestamp); } /** * Represents the data for a poll answer. * @typedef {Object} PollAnswerData * @property {string} text The text for the poll answer * @property {EmojiIdentifierResolvable} [emoji] The emoji for the poll answer */ /** * Represents the data for a poll. * @typedef {Object} PollData * @property {PollQuestionMedia} question The question for the poll * @property {PollAnswerData[]} answers The answers for the poll * @property {number} duration The duration in hours for the poll * @property {boolean} allowMultiselect Whether the poll allows multiple answers * @property {PollLayoutType} [layoutType] The layout type for the poll */ /** * The base message options for messages. * @typedef {Object} BaseMessageOptions * @property {?string} [content=''] The content for the message. This can only be `null` when editing a message. * @property {Array<(EmbedBuilder|Embed|APIEmbed)>} [embeds] The embeds for the message * @property {MessageMentionOptions} [allowedMentions] Which mentions should be parsed from the message content * (see {@link https://discord.com/developers/docs/resources/message#allowed-mentions-object here} for more details) * @property {Array<(AttachmentBuilder|Attachment|AttachmentPayload|BufferResolvable)>} [files] * The files to send with the message. * @property {Array<(ActionRowBuilder|MessageTopLevelComponent|APIMessageTopLevelComponent)>} [components] * Action rows containing interactive components for the message (buttons, select menus) and other * top-level components. * <info>When using components v2, the flag {@link MessageFlags.IsComponentsV2} needs to be set * and `content`, `embeds`, `stickers`, and `poll` cannot be used.</info> */ /** * The base message options for messages including a poll. * @typedef {BaseMessageOptions} BaseMessageOptionsWithPoll * @property {PollData} [poll] The poll to send with the message */ /** * Options for sending a message with a reply. * @typedef {Object} ReplyOptions * @property {MessageResolvable} messageReference The message to reply to (must be in the same channel and not system) * @property {boolean} [failIfNotExists=this.client.options.failIfNotExists] Whether to error if the referenced * message does not exist (creates a standard message in this case when false) */ /** * The options for sending a message. * @typedef {BaseMessageOptionsWithPoll} BaseMessageCreateOptions * @property {boolean} [tts=false] Whether the message should be spoken aloud * @property {string} [nonce] The nonce for the message * <info>This property is required if `enforceNonce` set to `true`.</info> * @property {boolean} [enforceNonce] Whether the nonce should be checked for uniqueness in the past few minutes. * If another message was created by the same author with the same nonce, * that message will be returned and no new message will be created * @property {StickerResolvable[]} [stickers=[]] The stickers to send in the message * @property {MessageFlags} [flags] Which flags to set for the message. * <info>Only {@link MessageFlags.SuppressEmbeds}, {@link MessageFlags.SuppressNotifications} and * {@link MessageFlags.IsComponentsV2} can be set.</info> * <info>{@link MessageFlags.IsComponentsV2} is required if passing components that aren't action rows</info> */ /** * @typedef {Object} ForwardOptions * @property {MessageResolvable} message The originating message * @property {TextBasedChannelResolvable} [channel] The channel of the originating message * @property {GuildResolvable} [guild] The guild of the originating message */ /** * The options for sending a message. * @typedef {BaseMessageCreateOptions} MessageCreateOptions * @property {ReplyOptions} [reply] The options for replying to a message * @property {ForwardOptions} [forward] The options for forwarding a message */ /** * Options provided to control parsing of mentions by Discord * @typedef {Object} MessageMentionOptions * @property {MessageMentionTypes[]} [parse] Types of mentions to be parsed * @property {Snowflake[]} [users] Snowflakes of Users to be parsed as mentions * @property {Snowflake[]} [roles] Snowflakes of Roles to be parsed as mentions * @property {boolean} [repliedUser=true] Whether the author of the Message being replied to should be pinged */ /** * Types of mentions to enable in MessageMentionOptions. * - `roles` * - `users` * - `everyone` * @typedef {string} MessageMentionTypes */ /** * Sends a message to this channel. * @param {string|MessagePayload|MessageCreateOptions} options The options to provide * @returns {Promise<Message>} * @example * // Send a basic message * channel.send('hello!') * .then(message => console.log(`Sent message: ${message.content}`)) * .catch(console.error); * @example * // Send a remote file * channel.send({ * files: ['https://cdn.discordapp.com/icons/222078108977594368/6e1019b3179d71046e463a75915e7244.png?size=2048'] * }) * .then(console.log) * .catch(console.error); * @example * // Send a local file * channel.send({ * files: [{ * attachment: 'entire/path/to/file.jpg', * name: 'file.jpg', * description: 'A description of the file' * }] * }) * .then(console.log) * .catch(console.error); */ async send(options) { const User = require('../User'); const { GuildMember } = require('../GuildMember'); if (this instanceof User || this instanceof GuildMember) { const dm = await this.createDM(); return dm.send(options); } let messagePayload; if (options instanceof MessagePayload) { messagePayload = options.resolveBody(); } else { messagePayload = MessagePayload.create(this, options).resolveBody(); } const { body, files } = await messagePayload.resolveFiles(); const d = await this.client.rest.post(Routes.channelMessages(this.id), { body, files }); return this.messages.cache.get(d.id) ?? this.messages._add(d); } /** * Sends a typing indicator in the channel. * @returns {Promise<void>} Resolves upon the typing status being sent * @example * // Start typing in a channel * channel.sendTyping(); */ async sendTyping() { await this.client.rest.post(Routes.channelTyping(this.id)); } /** * Creates a Message Collector. * @param {MessageCollectorOptions} [options={}] The options to pass to the collector * @returns {MessageCollector} * @example * // Create a message collector * const filter = message => message.content.includes('discord'); * const collector = channel.createMessageCollector({ filter, time: 15_000 }); * collector.on('collect', message => console.log(`Collected ${message.content}`)); * collector.on('end', collected => console.log(`Collected ${collected.size} items`)); */ createMessageCollector(options = {}) { return new MessageCollector(this, options); } /** * An object containing the same properties as CollectorOptions, but a few more: * @typedef {MessageCollectorOptions} AwaitMessagesOptions * @property {string[]} [errors] Stop/end reasons that cause the promise to reject */ /** * Similar to createMessageCollector but in promise form. * Resolves with a collection of messages that pass the specified filter. * @param {AwaitMessagesOptions} [options={}] Optional options to pass to the internal collector * @returns {Promise<Collection<Snowflake, Message>>} * @example * // Await !vote messages * const filter = m => m.content.startsWith('!vote'); * // Errors: ['time'] treats ending because of the time limit as an error * channel.awaitMessages({ filter, max: 4, time: 60_000, errors: ['time'] }) * .then(collected => console.log(collected.size)) * .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`)); */ awaitMessages(options = {}) { return new Promise((resolve, reject) => { const collector = this.createMessageCollector(options); collector.once('end', (collection, reason) => { if (options.errors?.includes(reason)) { reject(collection); } else { resolve(collection); } }); }); } /** * Creates a component interaction collector. * @param {MessageComponentCollectorOptions} [options={}] Options to send to the collector * @returns {InteractionCollector} * @example * // Create a button interaction collector * const filter = (interaction) => interaction.customId === 'button' && interaction.user.id === 'someId'; * const collector = channel.createMessageComponentCollector({ filter, time: 15_000 }); * collector.on('collect', interaction => console.log(`Collected ${interaction.customId}`)); * collector.on('end', collected => console.log(`Collected ${collected.size} items`)); */ createMessageComponentCollector(options = {}) { return new InteractionCollector(this.client, { ...options, interactionType: InteractionType.MessageComponent, channel: this, }); } /** * Collects a single component interaction that passes the filter. * The Promise will reject if the time expires. * @param {AwaitMessageComponentOptions} [options={}] Options to pass to the internal collector * @returns {Promise<MessageComponentInteraction>} * @example * // Collect a message component interaction * const filter = (interaction) => interaction.customId === 'button' && interaction.user.id === 'someId'; * channel.awaitMessageComponent({ filter, time: 15_000 }) * .then(interaction => console.log(`${interaction.customId} was clicked!`)) * .catch(console.error); */ awaitMessageComponent(options = {}) { const _options = { ...options, max: 1 }; return new Promise((resolve, reject) => { const collector = this.createMessageComponentCollector(_options); collector.once('end', (interactions, reason) => { const interaction = interactions.first(); if (interaction) resolve(interaction); else reject(new DiscordjsError(ErrorCodes.InteractionCollectorError, reason)); }); }); } /** * Bulk deletes given messages that are newer than two weeks. * @param {Collection<Snowflake, Message>|MessageResolvable[]|number} messages * Messages or number of messages to delete * @param {boolean} [filterOld=false] Filter messages to remove those which are older than two weeks automatically * @returns {Promise<Collection<Snowflake, Message|undefined>>} Returns the deleted messages * @example * // Bulk delete messages * channel.bulkDelete(5) * .then(messages => console.log(`Bulk deleted ${messages.size} messages`)) * .catch(console.error); */ async bulkDelete(messages, filterOld = false) { if (Array.isArray(messages) || messages instanceof Collection) { let messageIds = messages instanceof Collection ? [...messages.keys()] : messages.map(message => message.id ?? message); if (filterOld) { messageIds = messageIds.filter( id => Date.now() - DiscordSnowflake.timestampFrom(id) < MaxBulkDeletableMessageAge, ); } if (messageIds.length === 0) return new Collection(); if (messageIds.length === 1) { const message = this.client.actions.MessageDelete.getMessage( { message_id: messageIds[0], }, this, ); await this.client.rest.delete(Routes.channelMessage(this.id, messageIds[0])); return message ? new Collection([[message.id, message]]) : new Collection(); } await this.client.rest.post(Routes.channelBulkDelete(this.id), { body: { messages: messageIds } }); return messageIds.reduce( (col, id) => col.set( id, this.client.actions.MessageDeleteBulk.getMessage( { message_id: id, }, this, ), ), new Collection(), ); } if (!isNaN(messages)) { const msgs = await this.messages.fetch({ limit: messages }); return this.bulkDelete(msgs, filterOld); } throw new DiscordjsTypeError(ErrorCodes.MessageBulkDeleteType); } /** * Fetches all webhooks for the channel. * @returns {Promise<Collection<Snowflake, Webhook>>} * @example * // Fetch webhooks * channel.fetchWebhooks() * .then(hooks => console.log(`This channel has ${hooks.size} hooks`)) * .catch(console.error); */ fetchWebhooks() { return this.guild.channels.fetchWebhooks(this.id); } /** * Options used to create a {@link Webhook}. * @typedef {Object} ChannelWebhookCreateOptions * @property {string} name The name of the webhook * @property {?(BufferResolvable|Base64Resolvable)} [avatar] Avatar for the webhook * @property {string} [reason] Reason for creating the webhook */ /** * Creates a webhook for the channel. * @param {ChannelWebhookCreateOptions} [options] Options for creating the webhook * @returns {Promise<Webhook>} Returns the created Webhook * @example * // Create a webhook for the current channel * channel.createWebhook({ * name: 'Snek', * avatar: 'https://i.imgur.com/mI8XcpG.jpg', * reason: 'Needed a cool new Webhook' * }) * .then(console.log) * .catch(console.error) */ createWebhook(options) { return this.guild.channels.createWebhook({ channel: this.id, ...options }); } /** * Sets the rate limit per user (slowmode) for this channel. * @param {number} rateLimitPerUser The new rate limit in seconds * @param {string} [reason] Reason for changing the channel's rate limit * @returns {Promise<this>} */ setRateLimitPerUser(rateLimitPerUser, reason) { return this.edit({ rateLimitPerUser, reason }); } /** * Sets whether this channel is flagged as NSFW. * @param {boolean} [nsfw=true] Whether the channel should be considered NSFW * @param {string} [reason] Reason for changing the channel's NSFW flag * @returns {Promise<this>} */ setNSFW(nsfw = true, reason) { return this.edit({ nsfw, reason }); } static applyToClass(structure, full = false, ignore = []) { const props = ['send']; if (full) { props.push( 'lastMessage', 'lastPinAt', 'bulkDelete', 'sendTyping', 'createMessageCollector', 'awaitMessages', 'createMessageComponentCollector', 'awaitMessageComponent', 'fetchWebhooks', 'createWebhook', 'setRateLimitPerUser', 'setNSFW', ); } for (const prop of props) { if (ignore.includes(prop)) continue; Object.defineProperty( structure.prototype, prop, Object.getOwnPropertyDescriptor(TextBasedChannel.prototype, prop), ); } } } module.exports = TextBasedChannel; // Fixes Circular // eslint-disable-next-line import/order const GuildMessageManager = require('../../managers/GuildMessageManager'); node_modules/discord.js/src/structures/interfaces/Collector.js 0000664 00000022607 15114741631 0020720 0 ustar 00 'use strict'; const EventEmitter = require('node:events'); const { setTimeout, clearTimeout } = require('node:timers'); const { Collection } = require('@discordjs/collection'); const { DiscordjsTypeError, ErrorCodes } = require('../../errors'); const { flatten } = require('../../util/Util'); /** * Filter to be applied to the collector. * @typedef {Function} CollectorFilter * @param {...*} args Any arguments received by the listener * @param {Collection} collection The items collected by this collector * @returns {boolean|Promise<boolean>} */ /** * Options to be applied to the collector. * @typedef {Object} CollectorOptions * @property {CollectorFilter} [filter] The filter applied to this collector * @property {number} [time] How long to run the collector for in milliseconds * @property {number} [idle] How long to stop the collector after inactivity in milliseconds * @property {boolean} [dispose=false] Whether to dispose data when it's deleted */ /** * Abstract class for defining a new Collector. * @extends {EventEmitter} * @abstract */ class Collector extends EventEmitter { constructor(client, options = {}) { super(); /** * The client that instantiated this Collector * @name Collector#client * @type {Client} * @readonly */ Object.defineProperty(this, 'client', { value: client }); /** * The filter applied to this collector * @type {CollectorFilter} * @returns {boolean|Promise<boolean>} */ this.filter = options.filter ?? (() => true); /** * The options of this collector * @type {CollectorOptions} */ this.options = options; /** * The items collected by this collector * @type {Collection} */ this.collected = new Collection(); /** * Whether this collector has finished collecting * @type {boolean} */ this.ended = false; /** * Timeout for cleanup * @type {?Timeout} * @private */ this._timeout = null; /** * Timeout for cleanup due to inactivity * @type {?Timeout} * @private */ this._idletimeout = null; /** * The reason the collector ended * @type {?string} * @private */ this._endReason = null; if (typeof this.filter !== 'function') { throw new DiscordjsTypeError(ErrorCodes.InvalidType, 'options.filter', 'function'); } this.handleCollect = this.handleCollect.bind(this); this.handleDispose = this.handleDispose.bind(this); if (options.time) this._timeout = setTimeout(() => this.stop('time'), options.time).unref(); if (options.idle) this._idletimeout = setTimeout(() => this.stop('idle'), options.idle).unref(); /** * The timestamp at which this collector last collected an item * @type {?number} */ this.lastCollectedTimestamp = null; } /** * The Date at which this collector last collected an item * @type {?Date} */ get lastCollectedAt() { return this.lastCollectedTimestamp && new Date(this.lastCollectedTimestamp); } /** * Call this to handle an event as a collectable element. Accepts any event data as parameters. * @param {...*} args The arguments emitted by the listener * @returns {Promise<void>} * @emits Collector#collect */ async handleCollect(...args) { const collectedId = await this.collect(...args); if (collectedId) { const filterResult = await this.filter(...args, this.collected); if (filterResult) { this.collected.set(collectedId, args[0]); /** * Emitted whenever an element is collected. * @event Collector#collect * @param {...*} args The arguments emitted by the listener */ this.emit('collect', ...args); this.lastCollectedTimestamp = Date.now(); if (this._idletimeout) { clearTimeout(this._idletimeout); this._idletimeout = setTimeout(() => this.stop('idle'), this.options.idle).unref(); } } else { /** * Emitted whenever an element is not collected by the collector. * @event Collector#ignore * @param {...*} args The arguments emitted by the listener */ this.emit('ignore', ...args); } } this.checkEnd(); } /** * Call this to remove an element from the collection. Accepts any event data as parameters. * @param {...*} args The arguments emitted by the listener * @returns {Promise<void>} * @emits Collector#dispose */ async handleDispose(...args) { if (!this.options.dispose) return; const dispose = this.dispose(...args); if (!dispose || !(await this.filter(...args)) || !this.collected.has(dispose)) return; this.collected.delete(dispose); /** * Emitted whenever an element is disposed of. * @event Collector#dispose * @param {...*} args The arguments emitted by the listener */ this.emit('dispose', ...args); this.checkEnd(); } /** * Returns a promise that resolves with the next collected element; * rejects with collected elements if the collector finishes without receiving a next element * @type {Promise} * @readonly */ get next() { return new Promise((resolve, reject) => { if (this.ended) { reject(this.collected); return; } const cleanup = () => { this.removeListener('collect', onCollect); this.removeListener('end', onEnd); }; const onCollect = item => { cleanup(); resolve(item); }; const onEnd = () => { cleanup(); reject(this.collected); }; this.on('collect', onCollect); this.on('end', onEnd); }); } /** * Stops this collector and emits the `end` event. * @param {string} [reason='user'] The reason this collector is ending * @emits Collector#end */ stop(reason = 'user') { if (this.ended) return; if (this._timeout) { clearTimeout(this._timeout); this._timeout = null; } if (this._idletimeout) { clearTimeout(this._idletimeout); this._idletimeout = null; } this._endReason = reason; this.ended = true; /** * Emitted when the collector is finished collecting. * @event Collector#end * @param {Collection} collected The elements collected by the collector * @param {string} reason The reason the collector ended */ this.emit('end', this.collected, reason); } /** * Options used to reset the timeout and idle timer of a {@link Collector}. * @typedef {Object} CollectorResetTimerOptions * @property {number} [time] How long to run the collector for (in milliseconds) * @property {number} [idle] How long to wait to stop the collector after inactivity (in milliseconds) */ /** * Resets the collector's timeout and idle timer. * @param {CollectorResetTimerOptions} [options] Options for resetting */ resetTimer({ time, idle } = {}) { if (this._timeout) { clearTimeout(this._timeout); this._timeout = setTimeout(() => this.stop('time'), time ?? this.options.time).unref(); } if (this._idletimeout) { clearTimeout(this._idletimeout); this._idletimeout = setTimeout(() => this.stop('idle'), idle ?? this.options.idle).unref(); } } /** * Checks whether the collector should end, and if so, ends it. * @returns {boolean} Whether the collector ended or not */ checkEnd() { const reason = this.endReason; if (reason) this.stop(reason); return Boolean(reason); } /** * Allows collectors to be consumed with for-await-of loops * @see {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/for-await...of} */ async *[Symbol.asyncIterator]() { const queue = []; const onCollect = (...item) => queue.push(item); this.on('collect', onCollect); try { while (queue.length || !this.ended) { if (queue.length) { yield queue.shift(); } else { // eslint-disable-next-line no-await-in-loop await new Promise(resolve => { const tick = () => { this.removeListener('collect', tick); this.removeListener('end', tick); return resolve(); }; this.on('collect', tick); this.on('end', tick); }); } } } finally { this.removeListener('collect', onCollect); } } toJSON() { return flatten(this); } /* eslint-disable no-empty-function */ /** * The reason this collector has ended with, or null if it hasn't ended yet * @type {?string} * @readonly */ get endReason() { return this._endReason; } /** * Handles incoming events from the `handleCollect` function. Returns null if the event should not * be collected, or returns an object describing the data that should be stored. * @see Collector#handleCollect * @param {...*} args Any args the event listener emits * @returns {?(*|Promise<?*>)} Data to insert into collection, if any * @abstract */ collect() {} /** * Handles incoming events from the `handleDispose`. Returns null if the event should not * be disposed, or returns the key that should be removed. * @see Collector#handleDispose * @param {...*} args Any args the event listener emits * @returns {?*} Key to remove from the collection, if any * @abstract */ dispose() {} /* eslint-enable no-empty-function */ } module.exports = Collector; node_modules/discord.js/src/structures/interfaces/InteractionResponses.js 0000664 00000045736 15114741631 0023163 0 ustar 00 'use strict'; const process = require('node:process'); const { deprecate } = require('node:util'); const { makeURLSearchParams } = require('@discordjs/rest'); const { isJSONEncodable } = require('@discordjs/util'); const { InteractionResponseType, MessageFlags, Routes, InteractionType } = require('discord-api-types/v10'); const { DiscordjsError, ErrorCodes } = require('../../errors'); const MessageFlagsBitField = require('../../util/MessageFlagsBitField'); const InteractionCallbackResponse = require('../InteractionCallbackResponse'); const InteractionCollector = require('../InteractionCollector'); const InteractionResponse = require('../InteractionResponse'); const MessagePayload = require('../MessagePayload'); let deprecationEmittedForEphemeralOption = false; let deprecationEmittedForFetchReplyOption = false; /** * @typedef {Object} ModalComponentData * @property {string} title The title of the modal * @property {string} customId The custom id of the modal * @property {ActionRow[]} components The components within this modal */ /** * Interface for classes that support shared interaction response types. * @interface */ class InteractionResponses { /** * Options for deferring the reply to an {@link BaseInteraction}. * @typedef {Object} InteractionDeferReplyOptions * @property {boolean} [ephemeral] Whether the reply should be ephemeral. * <warn>This option is deprecated. Use `flags` instead.</warn> * @property {MessageFlagsResolvable} [flags] Flags for the reply. * <info>Only `MessageFlags.Ephemeral` can be set.</info> * @property {boolean} [withResponse] Whether to return an {@link InteractionCallbackResponse} as the response * @property {boolean} [fetchReply] Whether to fetch the reply * <warn>This option is deprecated. Use `withResponse` or fetch the response instead.</warn> */ /** * Options for deferring and updating the reply to a {@link MessageComponentInteraction}. * @typedef {Object} InteractionDeferUpdateOptions * @property {boolean} [withResponse] Whether to return an {@link InteractionCallbackResponse} as the response * @property {boolean} [fetchReply] Whether to fetch the reply * <warn>This option is deprecated. Use `withResponse` or fetch the response instead.</warn> */ /** * Options for a reply to a {@link BaseInteraction}. * @typedef {BaseMessageOptionsWithPoll} InteractionReplyOptions * @property {boolean} [ephemeral] Whether the reply should be ephemeral. * <warn>This option is deprecated. Use `flags` instead.</warn> * @property {boolean} [tts=false] Whether the message should be spoken aloud * @property {boolean} [withResponse] Whether to return an {@link InteractionCallbackResponse} as the response * @property {boolean} [fetchReply] Whether to fetch the reply * <warn>This option is deprecated. Use `withResponse` or fetch the response instead.</warn> * @property {MessageFlagsResolvable} [flags] Which flags to set for the message. * <info>Only `MessageFlags.Ephemeral`, `MessageFlags.SuppressEmbeds`, and `MessageFlags.SuppressNotifications` * can be set.</info> */ /** * Options for updating the message received from a {@link MessageComponentInteraction}. * @typedef {MessageEditOptions} InteractionUpdateOptions * @property {boolean} [withResponse] Whether to return an {@link InteractionCallbackResponse} as the response * @property {boolean} [fetchReply] Whether to fetch the reply * <warn>This option is deprecated. Use `withResponse` or fetch the response instead.</warn> */ /** * Options for launching activity in response to a {@link BaseInteraction} * @typedef {Object} LaunchActivityOptions * @property {boolean} [withResponse] Whether to return an {@link InteractionCallbackResponse} as the response */ /** * Options for showing a modal in response to a {@link BaseInteraction} * @typedef {Object} ShowModalOptions * @property {boolean} [withResponse] Whether to return an {@link InteractionCallbackResponse} as the response */ /** * Defers the reply to this interaction. * @param {InteractionDeferReplyOptions} [options] Options for deferring the reply to this interaction * @returns {Promise<InteractionCallbackResponse|Message|InteractionResponse>} * @example * // Defer the reply to this interaction * interaction.deferReply() * .then(console.log) * .catch(console.error) * @example * // Defer to send an ephemeral reply later * interaction.deferReply({ flags: MessageFlags.Ephemeral }) * .then(console.log) * .catch(console.error); */ async deferReply(options = {}) { if (this.deferred || this.replied) throw new DiscordjsError(ErrorCodes.InteractionAlreadyReplied); if ('ephemeral' in options) { if (!deprecationEmittedForEphemeralOption) { process.emitWarning( `Supplying "ephemeral" for interaction response options is deprecated. Utilize flags instead.`, ); deprecationEmittedForEphemeralOption = true; } } if ('fetchReply' in options) { if (!deprecationEmittedForFetchReplyOption) { process.emitWarning( // eslint-disable-next-line max-len `Supplying "fetchReply" for interaction response options is deprecated. Utilize "withResponse" instead or fetch the response after using the method.`, ); deprecationEmittedForFetchReplyOption = true; } } const flags = new MessageFlagsBitField(options.flags); if (options.ephemeral) { flags.add(MessageFlags.Ephemeral); } const response = await this.client.rest.post(Routes.interactionCallback(this.id, this.token), { body: { type: InteractionResponseType.DeferredChannelMessageWithSource, data: { flags: flags.bitfield, }, }, auth: false, query: makeURLSearchParams({ with_response: options.withResponse ?? false }), }); this.deferred = true; this.ephemeral = flags.has(MessageFlags.Ephemeral); return options.withResponse ? new InteractionCallbackResponse(this.client, response) : options.fetchReply ? this.fetchReply() : new InteractionResponse(this); } /** * Creates a reply to this interaction. * <info>Use the `withResponse` option to get the interaction callback response.</info> * @param {string|MessagePayload|InteractionReplyOptions} options The options for the reply * @returns {Promise<InteractionCallbackResponse|Message|InteractionResponse>} * @example * // Reply to the interaction and fetch the response * interaction.reply({ content: 'Pong!', withResponse: true }) * .then((response) => console.log(`Reply sent with content ${response.resource.message.content}`)) * .catch(console.error); * @example * // Create an ephemeral reply with an embed * const embed = new EmbedBuilder().setDescription('Pong!'); * * interaction.reply({ embeds: [embed], flags: MessageFlags.Ephemeral }) * .then(() => console.log('Reply sent.')) * .catch(console.error); */ async reply(options) { if (this.deferred || this.replied) throw new DiscordjsError(ErrorCodes.InteractionAlreadyReplied); if (typeof options !== 'string') { if ('ephemeral' in options) { if (!deprecationEmittedForEphemeralOption) { process.emitWarning( `Supplying "ephemeral" for interaction response options is deprecated. Utilize flags instead.`, ); deprecationEmittedForEphemeralOption = true; } } if ('fetchReply' in options) { if (!deprecationEmittedForFetchReplyOption) { process.emitWarning( // eslint-disable-next-line max-len `Supplying "fetchReply" for interaction response options is deprecated. Utilize "withResponse" instead or fetch the response after using the method.`, ); deprecationEmittedForFetchReplyOption = true; } } } let messagePayload; if (options instanceof MessagePayload) messagePayload = options; else messagePayload = MessagePayload.create(this, options); const { body: data, files } = await messagePayload.resolveBody().resolveFiles(); const response = await this.client.rest.post(Routes.interactionCallback(this.id, this.token), { body: { type: InteractionResponseType.ChannelMessageWithSource, data, }, files, auth: false, query: makeURLSearchParams({ with_response: options.withResponse ?? false }), }); this.ephemeral = Boolean(data.flags & MessageFlags.Ephemeral); this.replied = true; return options.withResponse ? new InteractionCallbackResponse(this.client, response) : options.fetchReply ? this.fetchReply() : new InteractionResponse(this); } /** * Fetches a reply to this interaction. * @see Webhook#fetchMessage * @param {Snowflake|'@original'} [message='@original'] The response to fetch * @returns {Promise<Message>} * @example * // Fetch the initial reply to this interaction * interaction.fetchReply() * .then(reply => console.log(`Replied with ${reply.content}`)) * .catch(console.error); */ fetchReply(message = '@original') { return this.webhook.fetchMessage(message); } /** * Options that can be passed into {@link InteractionResponses#editReply}. * @typedef {WebhookMessageEditOptions} InteractionEditReplyOptions * @property {MessageResolvable|'@original'} [message='@original'] The response to edit */ /** * Edits a reply to this interaction. * @see Webhook#editMessage * @param {string|MessagePayload|InteractionEditReplyOptions} options The new options for the message * @returns {Promise<Message>} * @example * // Edit the initial reply to this interaction * interaction.editReply('New content') * .then(console.log) * .catch(console.error); */ async editReply(options) { if (!this.deferred && !this.replied) throw new DiscordjsError(ErrorCodes.InteractionNotReplied); const msg = await this.webhook.editMessage(options.message ?? '@original', options); this.replied = true; return msg; } /** * Deletes a reply to this interaction. * @see Webhook#deleteMessage * @param {MessageResolvable|'@original'} [message='@original'] The response to delete * @returns {Promise<void>} * @example * // Delete the initial reply to this interaction * interaction.deleteReply() * .then(console.log) * .catch(console.error); */ async deleteReply(message = '@original') { if (!this.deferred && !this.replied) throw new DiscordjsError(ErrorCodes.InteractionNotReplied); await this.webhook.deleteMessage(message); } /** * Send a follow-up message to this interaction. * @param {string|MessagePayload|InteractionReplyOptions} options The options for the reply * @returns {Promise<Message>} */ async followUp(options) { if (!this.deferred && !this.replied) throw new DiscordjsError(ErrorCodes.InteractionNotReplied); const msg = await this.webhook.send(options); this.replied = true; return msg; } /** * Defers an update to the message to which the component was attached. * @param {InteractionDeferUpdateOptions} [options] Options for deferring the update to this interaction * @returns {Promise<InteractionCallbackResponse|Message|InteractionResponse>} * @example * // Defer updating and reset the component's loading state * interaction.deferUpdate() * .then(console.log) * .catch(console.error); */ async deferUpdate(options = {}) { if (this.deferred || this.replied) throw new DiscordjsError(ErrorCodes.InteractionAlreadyReplied); if ('fetchReply' in options) { if (!deprecationEmittedForFetchReplyOption) { process.emitWarning( // eslint-disable-next-line max-len `Supplying "fetchReply" for interaction response options is deprecated. Utilize "withResponse" instead or fetch the response after using the method.`, ); deprecationEmittedForFetchReplyOption = true; } } const response = await this.client.rest.post(Routes.interactionCallback(this.id, this.token), { body: { type: InteractionResponseType.DeferredMessageUpdate, }, auth: false, query: makeURLSearchParams({ with_response: options.withResponse ?? false }), }); this.deferred = true; return options.withResponse ? new InteractionCallbackResponse(this.client, response) : options.fetchReply ? this.fetchReply() : new InteractionResponse(this, this.message?.interactionMetadata?.id); } /** * Updates the original message of the component on which the interaction was received on. * @param {string|MessagePayload|InteractionUpdateOptions} options The options for the updated message * @returns {Promise<InteractionCallbackResponse|Message|void>} * @example * // Remove the components from the message * interaction.update({ * content: "A component interaction was received", * components: [] * }) * .then(console.log) * .catch(console.error); */ async update(options) { if (this.deferred || this.replied) throw new DiscordjsError(ErrorCodes.InteractionAlreadyReplied); if (typeof options !== 'string' && 'fetchReply' in options) { if (!deprecationEmittedForFetchReplyOption) { process.emitWarning( // eslint-disable-next-line max-len `Supplying "fetchReply" for interaction response options is deprecated. Utilize "withResponse" instead or fetch the response after using the method.`, ); deprecationEmittedForFetchReplyOption = true; } } let messagePayload; if (options instanceof MessagePayload) messagePayload = options; else messagePayload = MessagePayload.create(this, options); const { body: data, files } = await messagePayload.resolveBody().resolveFiles(); const response = await this.client.rest.post(Routes.interactionCallback(this.id, this.token), { body: { type: InteractionResponseType.UpdateMessage, data, }, files, auth: false, query: makeURLSearchParams({ with_response: options.withResponse ?? false }), }); this.replied = true; return options.withResponse ? new InteractionCallbackResponse(this.client, response) : options.fetchReply ? this.fetchReply() : new InteractionResponse(this, this.message.interactionMetadata?.id); } /** * Launches this application's activity, if enabled * @param {LaunchActivityOptions} [options={}] Options for launching the activity * @returns {Promise<InteractionCallbackResponse|undefined>} */ async launchActivity({ withResponse } = {}) { if (this.deferred || this.replied) throw new DiscordjsError(ErrorCodes.InteractionAlreadyReplied); const response = await this.client.rest.post(Routes.interactionCallback(this.id, this.token), { query: makeURLSearchParams({ with_response: withResponse ?? false }), body: { type: InteractionResponseType.LaunchActivity, }, auth: false, }); this.replied = true; return withResponse ? new InteractionCallbackResponse(this.client, response) : undefined; } /** * Shows a modal component * @param {ModalBuilder|ModalComponentData|APIModalInteractionResponseCallbackData} modal The modal to show * @param {ShowModalOptions} [options={}] The options for sending this interaction response * @returns {Promise<InteractionCallbackResponse|undefined>} */ async showModal(modal, options = {}) { if (this.deferred || this.replied) throw new DiscordjsError(ErrorCodes.InteractionAlreadyReplied); const response = await this.client.rest.post(Routes.interactionCallback(this.id, this.token), { body: { type: InteractionResponseType.Modal, data: isJSONEncodable(modal) ? modal.toJSON() : this.client.options.jsonTransformer(modal), }, auth: false, query: makeURLSearchParams({ with_response: options.withResponse ?? false }), }); this.replied = true; return options.withResponse ? new InteractionCallbackResponse(this.client, response) : undefined; } /** * Responds to the interaction with an upgrade button. * <info>Only available for applications with monetization enabled.</info> * @deprecated Sending a premium-style button is the new Discord behaviour. * @returns {Promise<void>} */ async sendPremiumRequired() { if (this.deferred || this.replied) throw new DiscordjsError(ErrorCodes.InteractionAlreadyReplied); await this.client.rest.post(Routes.interactionCallback(this.id, this.token), { body: { type: InteractionResponseType.PremiumRequired, }, auth: false, }); this.replied = true; } /** * An object containing the same properties as {@link CollectorOptions}, but a few less: * @typedef {Object} AwaitModalSubmitOptions * @property {CollectorFilter} [filter] The filter applied to this collector * @property {number} time Time in milliseconds to wait for an interaction before rejecting */ /** * Collects a single modal submit interaction that passes the filter. * The Promise will reject if the time expires. * @param {AwaitModalSubmitOptions} options Options to pass to the internal collector * @returns {Promise<ModalSubmitInteraction>} * @example * // Collect a modal submit interaction * const filter = (interaction) => interaction.customId === 'modal'; * interaction.awaitModalSubmit({ filter, time: 15_000 }) * .then(interaction => console.log(`${interaction.customId} was submitted!`)) * .catch(console.error); */ async awaitModalSubmit(options) { if (typeof options.time !== 'number') throw new DiscordjsError(ErrorCodes.InvalidType, 'time', 'number'); const _options = { ...options, max: 1, interactionType: InteractionType.ModalSubmit }; return new Promise((resolve, reject) => { const collector = new InteractionCollector(this.client, _options); collector.once('end', (interactions, reason) => { const interaction = interactions.first(); if (interaction) resolve(interaction); else reject(new DiscordjsError(ErrorCodes.InteractionCollectorError, reason)); }); }); } static applyToClass(structure, ignore = []) { const props = [ 'deferReply', 'reply', 'fetchReply', 'editReply', 'deleteReply', 'followUp', 'deferUpdate', 'update', 'launchActivity', 'showModal', 'sendPremiumRequired', 'awaitModalSubmit', ]; for (const prop of props) { if (ignore.includes(prop)) continue; Object.defineProperty( structure.prototype, prop, Object.getOwnPropertyDescriptor(InteractionResponses.prototype, prop), ); } } } InteractionResponses.prototype.sendPremiumRequired = deprecate( InteractionResponses.prototype.sendPremiumRequired, // eslint-disable-next-line max-len 'InteractionResponses#sendPremiumRequired() is deprecated. Sending a premium-style button is the new Discord behaviour.', ); module.exports = InteractionResponses; node_modules/discord.js/src/structures/MediaGalleryComponent.js 0000664 00000001303 15114741631 0021057 0 ustar 00 'use strict'; const Component = require('./Component'); const MediaGalleryItem = require('./MediaGalleryItem'); /** * Represents a media gallery component * @extends {Component} */ class MediaGalleryComponent extends Component { constructor({ items, ...data }) { super(data); /** * The items in this media gallery * @type {MediaGalleryItem[]} * @readonly */ this.items = items.map(item => new MediaGalleryItem(item)); } /** * Returns the API-compatible JSON for this component * @returns {APIMediaGalleryComponent} */ toJSON() { return { ...this.data, items: this.items.map(item => item.toJSON()) }; } } module.exports = MediaGalleryComponent; node_modules/discord.js/src/structures/PrimaryEntryPointCommandInteraction.js 0000664 00000000460 15114741631 0024016 0 ustar 00 'use strict'; const CommandInteraction = require('./CommandInteraction.js'); /** * Represents a primary entry point command interaction. * @extends {CommandInteraction} */ class PrimaryEntryPointCommandInteraction extends CommandInteraction {} module.exports = PrimaryEntryPointCommandInteraction; node_modules/discord.js/src/structures/ChatInputCommandInteraction.js 0000664 00000002506 15114741631 0022241 0 ustar 00 'use strict'; const CommandInteraction = require('./CommandInteraction'); const CommandInteractionOptionResolver = require('./CommandInteractionOptionResolver'); const { transformResolved } = require('../util/Util'); /** * Represents a command interaction. * @extends {CommandInteraction} */ class ChatInputCommandInteraction extends CommandInteraction { constructor(client, data) { super(client, data); /** * The options passed to the command. * @type {CommandInteractionOptionResolver} */ this.options = new CommandInteractionOptionResolver( this.client, data.data.options?.map(option => this.transformOption(option, data.data.resolved)) ?? [], transformResolved({ client: this.client, guild: this.guild, channel: this.channel }, data.data.resolved), ); } /** * Returns a string representation of the command interaction. * This can then be copied by a user and executed again in a new command while keeping the option order. * @returns {string} */ toString() { const properties = [ this.commandName, this.options._group, this.options._subcommand, ...this.options._hoistedOptions.map(option => `${option.name}:${option.value}`), ]; return `/${properties.filter(Boolean).join(' ')}`; } } module.exports = ChatInputCommandInteraction; node_modules/discord.js/src/structures/StickerPack.js 0000664 00000004143 15114741631 0017045 0 ustar 00 'use strict'; const { Collection } = require('@discordjs/collection'); const { DiscordSnowflake } = require('@sapphire/snowflake'); const Base = require('./Base'); const { Sticker } = require('./Sticker'); /** * Represents a pack of standard stickers. * @extends {Base} */ class StickerPack extends Base { constructor(client, pack) { super(client); /** * The Sticker pack's id * @type {Snowflake} */ this.id = pack.id; /** * The stickers in the pack * @type {Collection<Snowflake, Sticker>} */ this.stickers = new Collection(pack.stickers.map(sticker => [sticker.id, new Sticker(client, sticker)])); /** * The name of the sticker pack * @type {string} */ this.name = pack.name; /** * The id of the pack's SKU * @type {Snowflake} */ this.skuId = pack.sku_id; /** * The id of a sticker in the pack which is shown as the pack's icon * @type {?Snowflake} */ this.coverStickerId = pack.cover_sticker_id ?? null; /** * The description of the sticker pack * @type {string} */ this.description = pack.description; /** * The id of the sticker pack's banner image * @type {?Snowflake} */ this.bannerId = pack.banner_asset_id ?? null; } /** * The timestamp the sticker was created at * @type {number} * @readonly */ get createdTimestamp() { return DiscordSnowflake.timestampFrom(this.id); } /** * The time the sticker was created at * @type {Date} * @readonly */ get createdAt() { return new Date(this.createdTimestamp); } /** * The sticker which is shown as the pack's icon * @type {?Sticker} * @readonly */ get coverSticker() { return this.coverStickerId && this.stickers.get(this.coverStickerId); } /** * The URL to this sticker pack's banner. * @param {ImageURLOptions} [options={}] Options for the image URL * @returns {?string} */ bannerURL(options = {}) { return this.bannerId && this.client.rest.cdn.stickerPackBanner(this.bannerId, options); } } module.exports = StickerPack; node_modules/discord.js/src/structures/IntegrationApplication.js 0000664 00000003567 15114741631 0021322 0 ustar 00 'use strict'; const Application = require('./interfaces/Application'); /** * Represents an Integration's OAuth2 Application. * @extends {Application} */ class IntegrationApplication extends Application { _patch(data) { super._patch(data); if ('bot' in data) { /** * The bot user for this application * @type {?User} */ this.bot = this.client.users._add(data.bot); } else { this.bot ??= null; } if ('terms_of_service_url' in data) { /** * The URL of the application's terms of service * @type {?string} */ this.termsOfServiceURL = data.terms_of_service_url; } else { this.termsOfServiceURL ??= null; } if ('privacy_policy_url' in data) { /** * The URL of the application's privacy policy * @type {?string} */ this.privacyPolicyURL = data.privacy_policy_url; } else { this.privacyPolicyURL ??= null; } if ('rpc_origins' in data) { /** * The Array of RPC origin URLs * @type {string[]} */ this.rpcOrigins = data.rpc_origins; } else { this.rpcOrigins ??= []; } if ('hook' in data) { /** * Whether the application can be default hooked by the client * @type {?boolean} */ this.hook = data.hook; } else { this.hook ??= null; } if ('cover_image' in data) { /** * The hash of the application's cover image * @type {?string} */ this.cover = data.cover_image; } else { this.cover ??= null; } if ('verify_key' in data) { /** * The hex-encoded key for verification in interactions and the GameSDK's GetTicket * @type {?string} */ this.verifyKey = data.verify_key; } else { this.verifyKey ??= null; } } } module.exports = IntegrationApplication; node_modules/discord.js/src/structures/CategoryChannel.js 0000664 00000002167 15114741631 0017714 0 ustar 00 'use strict'; const GuildChannel = require('./GuildChannel'); const CategoryChannelChildManager = require('../managers/CategoryChannelChildManager'); /** * Represents a guild category channel on Discord. * @extends {GuildChannel} */ class CategoryChannel extends GuildChannel { /** * The id of the parent of this channel. * @name CategoryChannel#parentId * @type {null} */ /** * The parent of this channel. * @name CategoryChannel#parent * @type {null} * @readonly */ /** * Sets the category parent of this channel. * <warn>It is not possible to set the parent of a CategoryChannel.</warn> * @method setParent * @memberof CategoryChannel * @instance * @param {?CategoryChannelResolvable} channel The channel to set as parent * @param {SetParentOptions} [options={}] The options for setting the parent * @returns {Promise<GuildChannel>} */ /** * A manager of the channels belonging to this category * @type {CategoryChannelChildManager} * @readonly */ get children() { return new CategoryChannelChildManager(this); } } module.exports = CategoryChannel; node_modules/discord.js/src/structures/MessagePayload.js 0000664 00000024551 15114741631 0017545 0 ustar 00 'use strict'; const { Buffer } = require('node:buffer'); const { lazy, isJSONEncodable } = require('@discordjs/util'); const { DiscordSnowflake } = require('@sapphire/snowflake'); const { MessageFlags, MessageReferenceType } = require('discord-api-types/v10'); const { DiscordjsError, DiscordjsRangeError, ErrorCodes } = require('../errors'); const { resolveFile } = require('../util/DataResolver'); const MessageFlagsBitField = require('../util/MessageFlagsBitField'); const { basename, verifyString, resolvePartialEmoji } = require('../util/Util'); const getBaseInteraction = lazy(() => require('./BaseInteraction')); /** * Represents a message to be sent to the API. */ class MessagePayload { /** * @param {MessageTarget} target The target for this message to be sent to * @param {MessagePayloadOption} options The payload of this message */ constructor(target, options) { /** * The target for this message to be sent to * @type {MessageTarget} */ this.target = target; /** * The payload of this message. * @type {MessagePayloadOption} */ this.options = options; /** * Body sendable to the API * @type {?APIMessage} */ this.body = null; /** * Files sendable to the API * @type {?RawFile[]} */ this.files = null; } /** * Whether or not the target is a {@link Webhook} or a {@link WebhookClient} * @type {boolean} * @readonly */ get isWebhook() { const Webhook = require('./Webhook'); const WebhookClient = require('../client/WebhookClient'); return this.target instanceof Webhook || this.target instanceof WebhookClient; } /** * Whether or not the target is a {@link User} * @type {boolean} * @readonly */ get isUser() { const User = require('./User'); const { GuildMember } = require('./GuildMember'); return this.target instanceof User || this.target instanceof GuildMember; } /** * Whether or not the target is a {@link Message} * @type {boolean} * @readonly */ get isMessage() { const { Message } = require('./Message'); return this.target instanceof Message; } /** * Whether or not the target is a {@link MessageManager} * @type {boolean} * @readonly */ get isMessageManager() { const MessageManager = require('../managers/MessageManager'); return this.target instanceof MessageManager; } /** * Whether or not the target is an {@link BaseInteraction} or an {@link InteractionWebhook} * @type {boolean} * @readonly * @deprecated This will no longer serve a purpose in the next major version. */ get isInteraction() { const BaseInteraction = getBaseInteraction(); const InteractionWebhook = require('./InteractionWebhook'); return this.target instanceof BaseInteraction || this.target instanceof InteractionWebhook; } /** * Makes the content of this message. * @returns {?string} */ makeContent() { let content; if (this.options.content === null) { content = ''; } else if (this.options.content !== undefined) { content = verifyString(this.options.content, DiscordjsRangeError, ErrorCodes.MessageContentType, true); } return content; } /** * Resolves the body. * @returns {MessagePayload} */ resolveBody() { if (this.body) return this; const isInteraction = this.isInteraction; const isWebhook = this.isWebhook; const content = this.makeContent(); const tts = Boolean(this.options.tts); let nonce; if (this.options.nonce !== undefined) { nonce = this.options.nonce; if (typeof nonce === 'number' ? !Number.isInteger(nonce) : typeof nonce !== 'string') { throw new DiscordjsRangeError(ErrorCodes.MessageNonceType); } } let enforce_nonce = Boolean(this.options.enforceNonce); // If `nonce` isn't provided, generate one & set `enforceNonce` // Unless `enforceNonce` is explicitly set to `false`(not just falsy) if (nonce === undefined) { if (this.options.enforceNonce !== false && this.target.client.options.enforceNonce) { nonce = DiscordSnowflake.generate().toString(); enforce_nonce = true; } else if (enforce_nonce) { throw new DiscordjsError(ErrorCodes.MessageNonceRequired); } } const components = this.options.components?.map(component => isJSONEncodable(component) ? component.toJSON() : this.target.client.options.jsonTransformer(component), ); let username; let avatarURL; let threadName; let appliedTags; if (isWebhook) { username = this.options.username ?? this.target.name; if (this.options.avatarURL) avatarURL = this.options.avatarURL; if (this.options.threadName) threadName = this.options.threadName; if (this.options.appliedTags) appliedTags = this.options.appliedTags; } let flags; if ( // eslint-disable-next-line eqeqeq this.options.flags != null ) { flags = new MessageFlagsBitField(this.options.flags).bitfield; } if (isInteraction && this.options.ephemeral) { flags |= MessageFlags.Ephemeral; } let allowedMentions = this.options.allowedMentions === undefined ? this.target.client.options.allowedMentions : this.options.allowedMentions; if (allowedMentions?.repliedUser !== undefined) { allowedMentions = { ...allowedMentions, replied_user: allowedMentions.repliedUser }; delete allowedMentions.repliedUser; } let message_reference; if (typeof this.options.reply === 'object') { const reference = this.options.reply.messageReference; const message_id = this.isMessage ? (reference.id ?? reference) : this.target.messages.resolveId(reference); if (message_id) { message_reference = { message_id, fail_if_not_exists: this.options.reply.failIfNotExists ?? this.target.client.options.failIfNotExists, }; } } if (typeof this.options.forward === 'object') { const reference = this.options.forward.message; const channel_id = reference.channelId ?? this.target.client.channels.resolveId(this.options.forward.channel); const guild_id = reference.guildId ?? this.target.client.guilds.resolveId(this.options.forward.guild); const message_id = this.target.messages.resolveId(reference); if (message_id) { if (!channel_id) throw new DiscordjsError(ErrorCodes.InvalidType, 'channelId', 'TextBasedChannelResolvable'); message_reference = { type: MessageReferenceType.Forward, message_id, channel_id, guild_id: guild_id ?? undefined, }; } } const attachments = this.options.files?.map((file, index) => ({ id: index.toString(), description: file.description, })); if (Array.isArray(this.options.attachments)) { this.options.attachments.push(...(attachments ?? [])); } else { this.options.attachments = attachments; } let poll; if (this.options.poll) { poll = { question: { text: this.options.poll.question.text, }, answers: this.options.poll.answers.map(answer => ({ poll_media: { text: answer.text, emoji: resolvePartialEmoji(answer.emoji) }, })), duration: this.options.poll.duration, allow_multiselect: this.options.poll.allowMultiselect, layout_type: this.options.poll.layoutType, }; } this.body = { content, tts, nonce, enforce_nonce, embeds: this.options.embeds?.map(embed => isJSONEncodable(embed) ? embed.toJSON() : this.target.client.options.jsonTransformer(embed), ), components, username, avatar_url: avatarURL, allowed_mentions: this.isMessage && message_reference === undefined && this.target.author.id !== this.target.client.user.id ? undefined : allowedMentions, flags, message_reference, attachments: this.options.attachments, sticker_ids: this.options.stickers?.map(sticker => sticker.id ?? sticker), thread_name: threadName, applied_tags: appliedTags, poll, }; return this; } /** * Resolves files. * @returns {Promise<MessagePayload>} */ async resolveFiles() { if (this.files) return this; this.files = await Promise.all(this.options.files?.map(file => this.constructor.resolveFile(file)) ?? []); return this; } /** * Resolves a single file into an object sendable to the API. * @param {AttachmentPayload|BufferResolvable|Stream} fileLike Something that could be resolved to a file * @returns {Promise<RawFile>} */ static async resolveFile(fileLike) { let attachment; let name; const findName = thing => { if (typeof thing === 'string') { return basename(thing); } if (thing.path) { return basename(thing.path); } return 'file.jpg'; }; const ownAttachment = typeof fileLike === 'string' || fileLike instanceof Buffer || typeof fileLike.pipe === 'function'; if (ownAttachment) { attachment = fileLike; name = findName(attachment); } else { attachment = fileLike.attachment; name = fileLike.name ?? findName(attachment); } const { data, contentType } = await resolveFile(attachment); return { data, name, contentType }; } /** * Creates a {@link MessagePayload} from user-level arguments. * @param {MessageTarget} target Target to send to * @param {string|MessagePayloadOption} options Options or content to use * @param {MessagePayloadOption} [extra={}] Extra options to add onto specified options * @returns {MessagePayload} */ static create(target, options, extra = {}) { return new this( target, typeof options !== 'object' || options === null ? { content: options, ...extra } : { ...options, ...extra }, ); } } module.exports = MessagePayload; /** * A target for a message. * @typedef {TextBasedChannels|User|GuildMember|Webhook|WebhookClient|BaseInteraction|InteractionWebhook| * Message|MessageManager} MessageTarget */ /** * A possible payload option. * @typedef {MessageCreateOptions|MessageEditOptions|WebhookMessageCreateOptions|WebhookMessageEditOptions| * InteractionReplyOptions|InteractionUpdateOptions} MessagePayloadOption */ /** * @external RawFile * @see {@link https://discord.js.org/docs/packages/rest/stable/RawFile:Interface} */ node_modules/discord.js/src/structures/ReactionEmoji.js 0000664 00000001307 15114741631 0017371 0 ustar 00 'use strict'; const { Emoji } = require('./Emoji'); const { flatten } = require('../util/Util'); /** * Represents a limited emoji set used for both custom and unicode emojis. Custom emojis * will use this class opposed to the Emoji class when the client doesn't know enough * information about them. * @extends {Emoji} */ class ReactionEmoji extends Emoji { constructor(reaction, emoji) { super(reaction.message.client, emoji); /** * The message reaction this emoji refers to * @type {MessageReaction} */ this.reaction = reaction; } toJSON() { return flatten(this, { identifier: true }); } valueOf() { return this.id; } } module.exports = ReactionEmoji; node_modules/discord.js/src/structures/Message.js 0000664 00000112065 15114741631 0016231 0 ustar 00 'use strict'; const { Collection } = require('@discordjs/collection'); const { messageLink } = require('@discordjs/formatters'); const { DiscordSnowflake } = require('@sapphire/snowflake'); const { InteractionType, ChannelType, MessageType, MessageFlags, PermissionFlagsBits, MessageReferenceType, } = require('discord-api-types/v10'); const Attachment = require('./Attachment'); const Base = require('./Base'); const ClientApplication = require('./ClientApplication'); const Embed = require('./Embed'); const InteractionCollector = require('./InteractionCollector'); const Mentions = require('./MessageMentions'); const MessagePayload = require('./MessagePayload'); const { Poll } = require('./Poll.js'); const ReactionCollector = require('./ReactionCollector'); const { Sticker } = require('./Sticker'); const { DiscordjsError, ErrorCodes } = require('../errors'); const ReactionManager = require('../managers/ReactionManager'); const { createComponent, findComponentByCustomId } = require('../util/Components'); const { NonSystemMessageTypes, MaxBulkDeletableMessageAge, UndeletableMessageTypes } = require('../util/Constants'); const MessageFlagsBitField = require('../util/MessageFlagsBitField'); const PermissionsBitField = require('../util/PermissionsBitField'); const { _transformAPIMessageInteractionMetadata } = require('../util/Transformers.js'); const { cleanContent, resolvePartialEmoji, transformResolved } = require('../util/Util'); /** * Represents a message on Discord. * @extends {Base} */ class Message extends Base { constructor(client, data) { super(client); /** * The id of the channel the message was sent in * @type {Snowflake} */ this.channelId = data.channel_id; /** * The id of the guild the message was sent in, if any * @type {?Snowflake} */ this.guildId = data.guild_id ?? this.channel?.guild?.id ?? null; this._patch(data); } _patch(data) { /** * The message's id * @type {Snowflake} */ this.id = data.id; /** * The timestamp the message was sent at * @type {number} */ this.createdTimestamp = DiscordSnowflake.timestampFrom(this.id); if ('type' in data) { /** * The type of the message * @type {?MessageType} */ this.type = data.type; /** * Whether or not this message was sent by Discord, not actually a user (e.g. pin notifications) * @type {?boolean} */ this.system = !NonSystemMessageTypes.includes(this.type); } else { this.system ??= null; this.type ??= null; } if ('content' in data) { /** * The content of the message. * <info>This property requires the {@link GatewayIntentBits.MessageContent} privileged intent * in a guild for messages that do not mention the client.</info> * @type {?string} */ this.content = data.content; } else { this.content ??= null; } if ('author' in data) { /** * The author of the message * @type {?User} */ this.author = this.client.users._add(data.author, !data.webhook_id); } else { this.author ??= null; } if ('pinned' in data) { /** * Whether or not this message is pinned * @type {?boolean} */ this.pinned = Boolean(data.pinned); } else { this.pinned ??= null; } if ('tts' in data) { /** * Whether or not the message was Text-To-Speech * @type {?boolean} */ this.tts = data.tts; } else { this.tts ??= null; } if ('nonce' in data) { /** * A random number or string used for checking message delivery * <warn>This is only received after the message was sent successfully, and * lost if re-fetched</warn> * @type {?string} */ this.nonce = data.nonce; } else { this.nonce ??= null; } if ('embeds' in data) { /** * An array of embeds in the message - e.g. YouTube Player. * <info>This property requires the {@link GatewayIntentBits.MessageContent} privileged intent * in a guild for messages that do not mention the client.</info> * @type {Embed[]} */ this.embeds = data.embeds.map(embed => new Embed(embed)); } else { this.embeds = this.embeds?.slice() ?? []; } if ('components' in data) { /** * An array of components in the message. * <info>This property requires the {@link GatewayIntentBits.MessageContent} privileged intent * in a guild for messages that do not mention the client.</info> * @type {Component[]} */ this.components = data.components.map(component => createComponent(component)); } else { this.components = this.components?.slice() ?? []; } if ('attachments' in data) { /** * A collection of attachments in the message - e.g. Pictures - mapped by their ids. * <info>This property requires the {@link GatewayIntentBits.MessageContent} privileged intent * in a guild for messages that do not mention the client.</info> * @type {Collection<Snowflake, Attachment>} */ this.attachments = new Collection(); if (data.attachments) { for (const attachment of data.attachments) { this.attachments.set(attachment.id, new Attachment(attachment)); } } } else { this.attachments = new Collection(this.attachments); } if ('sticker_items' in data || 'stickers' in data) { /** * A collection of stickers in the message * @type {Collection<Snowflake, Sticker>} */ this.stickers = new Collection( (data.sticker_items ?? data.stickers)?.map(sticker => [sticker.id, new Sticker(this.client, sticker)]), ); } else { this.stickers = new Collection(this.stickers); } if ('position' in data) { /** * A generally increasing integer (there may be gaps or duplicates) that represents * the approximate position of the message in a thread. * @type {?number} */ this.position = data.position; } else { this.position ??= null; } if ('role_subscription_data' in data) { /** * Role subscription data found on {@link MessageType.RoleSubscriptionPurchase} messages. * @typedef {Object} RoleSubscriptionData * @property {Snowflake} roleSubscriptionListingId The id of the SKU and listing the user is subscribed to * @property {string} tierName The name of the tier the user is subscribed to * @property {number} totalMonthsSubscribed The total number of months the user has been subscribed for * @property {boolean} isRenewal Whether this notification is a renewal */ /** * The data of the role subscription purchase or renewal. * <info>This is present on {@link MessageType.RoleSubscriptionPurchase} messages.</info> * @type {?RoleSubscriptionData} */ this.roleSubscriptionData = { roleSubscriptionListingId: data.role_subscription_data.role_subscription_listing_id, tierName: data.role_subscription_data.tier_name, totalMonthsSubscribed: data.role_subscription_data.total_months_subscribed, isRenewal: data.role_subscription_data.is_renewal, }; } else { this.roleSubscriptionData ??= null; } if ('resolved' in data) { /** * Resolved data from auto-populated select menus. * @typedef {Object} CommandInteractionResolvedData */ this.resolved = transformResolved( { client: this.client, guild: this.guild, channel: this.channel }, data.resolved, ); } else { this.resolved ??= null; } // Discord sends null if the message has not been edited if (data.edited_timestamp) { /** * The timestamp the message was last edited at (if applicable) * @type {?number} */ this.editedTimestamp = Date.parse(data.edited_timestamp); } else { this.editedTimestamp ??= null; } if ('reactions' in data) { /** * A manager of the reactions belonging to this message * @type {ReactionManager} */ this.reactions = new ReactionManager(this); if (data.reactions?.length > 0) { for (const reaction of data.reactions) { this.reactions._add(reaction); } } } else { this.reactions ??= new ReactionManager(this); } if (!this.mentions) { /** * All valid mentions that the message contains * @type {MessageMentions} */ this.mentions = new Mentions( this, data.mentions, data.mention_roles, data.mention_everyone, data.mention_channels, data.referenced_message?.author, ); } else { this.mentions = new Mentions( this, data.mentions ?? this.mentions.users, data.mention_roles ?? this.mentions.roles, data.mention_everyone ?? this.mentions.everyone, data.mention_channels ?? this.mentions.crosspostedChannels, data.referenced_message?.author ?? this.mentions.repliedUser, ); } if ('webhook_id' in data) { /** * The id of the webhook that sent the message, if applicable * @type {?Snowflake} */ this.webhookId = data.webhook_id; } else { this.webhookId ??= null; } if ('application' in data) { /** * Supplemental application information for group activities * @type {?ClientApplication} */ this.groupActivityApplication = new ClientApplication(this.client, data.application); } else { this.groupActivityApplication ??= null; } if ('application_id' in data) { /** * The id of the application of the interaction that sent this message, if any * @type {?Snowflake} */ this.applicationId = data.application_id; } else { this.applicationId ??= null; } if ('activity' in data) { /** * Group activity * @type {?MessageActivity} */ this.activity = { partyId: data.activity.party_id, type: data.activity.type, }; } else { this.activity ??= null; } if ('thread' in data) { this.client.channels._add(data.thread, this.guild); } if (this.member && data.member) { this.member._patch(data.member); } else if (data.member && this.guild && this.author) { this.guild.members._add(Object.assign(data.member, { user: this.author })); } if ('flags' in data) { /** * Flags that are applied to the message * @type {Readonly<MessageFlagsBitField>} */ this.flags = new MessageFlagsBitField(data.flags).freeze(); } else { this.flags = new MessageFlagsBitField(this.flags).freeze(); } /** * Reference data sent in a message that contains ids identifying the referenced message. * This can be present in the following types of message: * * Crossposted messages (`MessageFlags.Crossposted`) * * {@link MessageType.ChannelPinnedMessage} * * {@link MessageType.ChannelFollowAdd} * * {@link MessageType.Reply} * * {@link MessageType.ThreadStarterMessage} * @see {@link https://discord.com/developers/docs/resources/message#message-object-message-types} * @typedef {Object} MessageReference * @property {Snowflake} channelId The channel id that was referenced * @property {Snowflake|undefined} guildId The guild id that was referenced * @property {Snowflake|undefined} messageId The message id that was referenced * @property {MessageReferenceType} type The type of message reference */ if ('message_reference' in data) { /** * Message reference data * @type {?MessageReference} */ this.reference = { channelId: data.message_reference.channel_id, guildId: data.message_reference.guild_id, messageId: data.message_reference.message_id, type: data.message_reference.type, }; } else { this.reference ??= null; } if (data.referenced_message) { this.channel?.messages._add({ guild_id: data.message_reference?.guild_id, ...data.referenced_message }); } if (data.interaction_metadata) { /** * Partial data of the interaction that a message is a result of * @typedef {Object} MessageInteractionMetadata * @property {Snowflake} id The interaction's id * @property {InteractionType} type The type of the interaction * @property {User} user The user that invoked the interaction * @property {APIAuthorizingIntegrationOwnersMap} authorizingIntegrationOwners * Ids for installation context(s) related to an interaction * @property {?Snowflake} originalResponseMessageId * Id of the original response message. Present only on follow-up messages * @property {?Snowflake} interactedMessageId * Id of the message that contained interactive component. * Present only on messages created from component interactions * @property {?MessageInteractionMetadata} triggeringInteractionMetadata * Metadata for the interaction that was used to open the modal. Present only on modal submit interactions */ /** * Partial data of the interaction that this message is a result of * @type {?MessageInteractionMetadata} */ this.interactionMetadata = _transformAPIMessageInteractionMetadata(this.client, data.interaction_metadata); } else { this.interactionMetadata ??= null; } /** * Partial data of the interaction that a message is a reply to * @typedef {Object} MessageInteraction * @property {Snowflake} id The interaction's id * @property {InteractionType} type The type of the interaction * @property {string} commandName The name of the interaction's application command, * as well as the subcommand and subcommand group, where applicable * @property {User} user The user that invoked the interaction * @deprecated Use {@link Message#interactionMetadata} instead. */ if (data.interaction) { /** * Partial data of the interaction that this message is a reply to * @type {?MessageInteraction} * @deprecated Use {@link Message#interactionMetadata} instead. */ this.interaction = { id: data.interaction.id, type: data.interaction.type, commandName: data.interaction.name, user: this.client.users._add(data.interaction.user), }; } else { this.interaction ??= null; } if (data.poll) { /** * The poll that was sent with the message * @type {?Poll} */ this.poll = new Poll(this.client, data.poll, this); } else { this.poll ??= null; } if (data.message_snapshots) { /** * The message snapshots associated with the message reference * @type {Collection<Snowflake, Message>} */ this.messageSnapshots = data.message_snapshots.reduce((coll, snapshot) => { const channel = this.client.channels.resolve(this.reference.channelId); const snapshotData = { ...snapshot.message, id: this.reference.messageId, channel_id: this.reference.channelId, guild_id: this.reference.guildId, }; return coll.set( this.reference.messageId, channel ? channel.messages._add(snapshotData) : new this.constructor(this.client, snapshotData), ); }, new Collection()); } else { this.messageSnapshots ??= new Collection(); } /** * A call associated with a message * @typedef {Object} MessageCall * @property {Readonly<?Date>} endedAt The time the call ended * @property {?number} endedTimestamp The timestamp the call ended * @property {Snowflake[]} participants The ids of the users that participated in the call */ if (data.call) { /** * The call associated with the message * @type {?MessageCall} */ this.call = { endedTimestamp: data.call.ended_timestamp ? Date.parse(data.call.ended_timestamp) : null, participants: data.call.participants, get endedAt() { return this.endedTimestamp && new Date(this.endedTimestamp); }, }; } else { this.call ??= null; } } /** * The channel that the message was sent in * @type {TextBasedChannels} * @readonly */ get channel() { return this.client.channels.resolve(this.channelId); } /** * Whether or not this message is a partial * @type {boolean} * @readonly */ get partial() { return typeof this.content !== 'string' || !this.author; } /** * Represents the author of the message as a guild member. * Only available if the message comes from a guild where the author is still a member * @type {?GuildMember} * @readonly */ get member() { return this.guild?.members.resolve(this.author) ?? null; } /** * The time the message was sent at * @type {Date} * @readonly */ get createdAt() { return new Date(this.createdTimestamp); } /** * The time the message was last edited at (if applicable) * @type {?Date} * @readonly */ get editedAt() { return this.editedTimestamp && new Date(this.editedTimestamp); } /** * The guild the message was sent in (if in a guild channel) * @type {?Guild} * @readonly */ get guild() { return this.client.guilds.resolve(this.guildId) ?? this.channel?.guild ?? null; } /** * Whether this message has a thread associated with it * @type {boolean} * @readonly */ get hasThread() { return this.flags.has(MessageFlags.HasThread); } /** * The thread started by this message * <info>This property is not suitable for checking whether a message has a thread, * use {@link Message#hasThread} instead.</info> * @type {?ThreadChannel} * @readonly */ get thread() { return this.channel?.threads?.cache.get(this.id) ?? null; } /** * The URL to jump to this message * @type {string} * @readonly */ get url() { return this.inGuild() ? messageLink(this.channelId, this.id, this.guildId) : messageLink(this.channelId, this.id); } /** * The message contents with all mentions replaced by the equivalent text. * If mentions cannot be resolved to a name, the relevant mention in the message content will not be converted. * @type {?string} * @readonly */ get cleanContent() { // eslint-disable-next-line eqeqeq return this.content != null && this.channel ? cleanContent(this.content, this.channel) : null; } /** * Creates a reaction collector. * @param {ReactionCollectorOptions} [options={}] Options to send to the collector * @returns {ReactionCollector} * @example * // Create a reaction collector * const filter = (reaction, user) => reaction.emoji.name === '👌' && user.id === 'someId'; * const collector = message.createReactionCollector({ filter, time: 15_000 }); * collector.on('collect', r => console.log(`Collected ${r.emoji.name}`)); * collector.on('end', collected => console.log(`Collected ${collected.size} items`)); */ createReactionCollector(options = {}) { return new ReactionCollector(this, options); } /** * An object containing the same properties as CollectorOptions, but a few more: * @typedef {ReactionCollectorOptions} AwaitReactionsOptions * @property {string[]} [errors] Stop/end reasons that cause the promise to reject */ /** * Similar to createReactionCollector but in promise form. * Resolves with a collection of reactions that pass the specified filter. * @param {AwaitReactionsOptions} [options={}] Optional options to pass to the internal collector * @returns {Promise<Collection<string | Snowflake, MessageReaction>>} * @example * // Create a reaction collector * const filter = (reaction, user) => reaction.emoji.name === '👌' && user.id === 'someId' * message.awaitReactions({ filter, time: 15_000 }) * .then(collected => console.log(`Collected ${collected.size} reactions`)) * .catch(console.error); */ awaitReactions(options = {}) { return new Promise((resolve, reject) => { const collector = this.createReactionCollector(options); collector.once('end', (reactions, reason) => { if (options.errors?.includes(reason)) reject(reactions); else resolve(reactions); }); }); } /** * @typedef {CollectorOptions} MessageComponentCollectorOptions * @property {ComponentType} [componentType] The type of component to listen for * @property {number} [max] The maximum total amount of interactions to collect * @property {number} [maxComponents] The maximum number of components to collect * @property {number} [maxUsers] The maximum number of users to interact */ /** * Creates a message component interaction collector. * @param {MessageComponentCollectorOptions} [options={}] Options to send to the collector * @returns {InteractionCollector} * @example * // Create a message component interaction collector * const filter = (interaction) => interaction.customId === 'button' && interaction.user.id === 'someId'; * const collector = message.createMessageComponentCollector({ filter, time: 15_000 }); * collector.on('collect', i => console.log(`Collected ${i.customId}`)); * collector.on('end', collected => console.log(`Collected ${collected.size} items`)); */ createMessageComponentCollector(options = {}) { return new InteractionCollector(this.client, { ...options, interactionType: InteractionType.MessageComponent, message: this, }); } /** * An object containing the same properties as CollectorOptions, but a few more: * @typedef {Object} AwaitMessageComponentOptions * @property {CollectorFilter} [filter] The filter applied to this collector * @property {number} [time] Time to wait for an interaction before rejecting * @property {ComponentType} [componentType] The type of component interaction to collect * @property {number} [idle] Time to wait without another message component interaction before ending the collector * @property {boolean} [dispose] Whether to remove the message component interaction after collecting * @property {InteractionResponse} [interactionResponse] The interaction response to collect interactions from */ /** * Collects a single component interaction that passes the filter. * The Promise will reject if the time expires. * @param {AwaitMessageComponentOptions} [options={}] Options to pass to the internal collector * @returns {Promise<MessageComponentInteraction>} * @example * // Collect a message component interaction * const filter = (interaction) => interaction.customId === 'button' && interaction.user.id === 'someId'; * message.awaitMessageComponent({ filter, time: 15_000 }) * .then(interaction => console.log(`${interaction.customId} was clicked!`)) * .catch(console.error); */ awaitMessageComponent(options = {}) { const _options = { ...options, max: 1 }; return new Promise((resolve, reject) => { const collector = this.createMessageComponentCollector(_options); collector.once('end', (interactions, reason) => { const interaction = interactions.first(); if (interaction) resolve(interaction); else reject(new DiscordjsError(ErrorCodes.InteractionCollectorError, reason)); }); }); } /** * Whether the message is editable by the client user * @type {boolean} * @readonly */ get editable() { const precheck = Boolean( this.author.id === this.client.user.id && (!this.guild || this.channel?.viewable) && this.reference?.type !== MessageReferenceType.Forward, ); // Regardless of permissions thread messages cannot be edited if // the thread is archived or the thread is locked and the bot does not have permission to manage threads. if (this.channel?.isThread()) { if (this.channel.archived) return false; if (this.channel.locked) { const permissions = this.channel.permissionsFor(this.client.user); if (!permissions?.has(PermissionFlagsBits.ManageThreads, true)) return false; } } return precheck; } /** * Whether the message is deletable by the client user * @type {boolean} * @readonly */ get deletable() { if (UndeletableMessageTypes.includes(this.type)) return false; if (!this.guild) { return this.author.id === this.client.user.id; } // DMChannel does not have viewable property, so check viewable after proved that message is on a guild. if (!this.channel?.viewable) { return false; } const permissions = this.channel?.permissionsFor(this.client.user); if (!permissions) return false; // This flag allows deleting even if timed out if (permissions.has(PermissionFlagsBits.Administrator, false)) return true; // The auto moderation action message author is the reference message author return ( (this.type !== MessageType.AutoModerationAction && this.author.id === this.client.user.id) || (permissions.has(PermissionFlagsBits.ManageMessages, false) && !this.guild.members.me.isCommunicationDisabled()) ); } /** * Whether the message is bulk deletable by the client user * @type {boolean} * @readonly * @example * // Filter for bulk deletable messages * channel.bulkDelete(messages.filter(message => message.bulkDeletable)); */ get bulkDeletable() { return ( (this.inGuild() && Date.now() - this.createdTimestamp < MaxBulkDeletableMessageAge && this.deletable && this.channel?.permissionsFor(this.client.user).has(PermissionFlagsBits.ManageMessages, false)) ?? false ); } /** * Whether the message is pinnable by the client user * @type {boolean} * @readonly */ get pinnable() { const { channel } = this; return Boolean( !this.system && (!this.guild || (channel?.viewable && channel?.permissionsFor(this.client.user)?.has(PermissionFlagsBits.ManageMessages, false))), ); } /** * Fetches the Message this crosspost/reply/pin-add references, if available to the client * @returns {Promise<Message>} */ async fetchReference() { if (!this.reference) throw new DiscordjsError(ErrorCodes.MessageReferenceMissing); const { channelId, messageId } = this.reference; if (!messageId) throw new DiscordjsError(ErrorCodes.MessageReferenceMissing); const channel = this.client.channels.resolve(channelId); if (!channel) throw new DiscordjsError(ErrorCodes.GuildChannelResolve); const message = await channel.messages.fetch(messageId); return message; } /** * Whether the message is crosspostable by the client user * @type {boolean} * @readonly */ get crosspostable() { const bitfield = PermissionFlagsBits.SendMessages | (this.author.id === this.client.user.id ? PermissionsBitField.DefaultBit : PermissionFlagsBits.ManageMessages); const { channel } = this; return Boolean( channel?.type === ChannelType.GuildAnnouncement && !this.flags.has(MessageFlags.Crossposted) && this.type === MessageType.Default && !this.poll && channel.viewable && channel.permissionsFor(this.client.user)?.has(bitfield, false), ); } /** * Edits the content of the message. * @param {string|MessagePayload|MessageEditOptions} options The options to provide * @returns {Promise<Message>} * @example * // Update the content of a message * message.edit('This is my new content!') * .then(msg => console.log(`Updated the content of a message to ${msg.content}`)) * .catch(console.error); */ async edit(options) { if (!this.channel) throw new DiscordjsError(ErrorCodes.ChannelNotCached); return this.channel.messages.edit(this, options); } /** * Publishes a message in an announcement channel to all channels following it. * @returns {Promise<Message>} * @example * // Crosspost a message * if (message.channel.type === ChannelType.GuildAnnouncement) { * message.crosspost() * .then(() => console.log('Crossposted message')) * .catch(console.error); * } */ async crosspost() { if (!this.channel) throw new DiscordjsError(ErrorCodes.ChannelNotCached); return this.channel.messages.crosspost(this.id); } /** * Pins this message to the channel's pinned messages. * @param {string} [reason] Reason for pinning * @returns {Promise<Message>} * @example * // Pin a message * message.pin() * .then(console.log) * .catch(console.error) */ async pin(reason) { if (!this.channel) throw new DiscordjsError(ErrorCodes.ChannelNotCached); await this.channel.messages.pin(this.id, reason); return this; } /** * Unpins this message from the channel's pinned messages. * @param {string} [reason] Reason for unpinning * @returns {Promise<Message>} * @example * // Unpin a message * message.unpin() * .then(console.log) * .catch(console.error) */ async unpin(reason) { if (!this.channel) throw new DiscordjsError(ErrorCodes.ChannelNotCached); await this.channel.messages.unpin(this.id, reason); return this; } /** * Adds a reaction to the message. * @param {EmojiIdentifierResolvable} emoji The emoji to react with * @returns {Promise<MessageReaction>} * @example * // React to a message with a unicode emoji * message.react('🤔') * .then(console.log) * .catch(console.error); * @example * // React to a message with a custom emoji * message.react(message.guild.emojis.cache.get('123456789012345678')) * .then(console.log) * .catch(console.error); */ async react(emoji) { if (!this.channel) throw new DiscordjsError(ErrorCodes.ChannelNotCached); await this.channel.messages.react(this.id, emoji); return this.client.actions.MessageReactionAdd.handle( { [this.client.actions.injectedUser]: this.client.user, [this.client.actions.injectedChannel]: this.channel, [this.client.actions.injectedMessage]: this, emoji: resolvePartialEmoji(emoji), }, true, ).reaction; } /** * Deletes the message. * @returns {Promise<Message>} * @example * // Delete a message * message.delete() * .then(msg => console.log(`Deleted message from ${msg.author.username}`)) * .catch(console.error); */ async delete() { if (!this.channel) throw new DiscordjsError(ErrorCodes.ChannelNotCached); await this.channel.messages.delete(this.id); return this; } /** * Options provided when sending a message as an inline reply. * @typedef {BaseMessageCreateOptions} MessageReplyOptions * @property {boolean} [failIfNotExists=this.client.options.failIfNotExists] Whether to error if the referenced * message does not exist (creates a standard message in this case when false) */ /** * Send an inline reply to this message. * @param {string|MessagePayload|MessageReplyOptions} options The options to provide * @returns {Promise<Message>} * @example * // Reply to a message * message.reply('This is a reply!') * .then(() => console.log(`Replied to message "${message.content}"`)) * .catch(console.error); */ async reply(options) { if (!this.channel) throw new DiscordjsError(ErrorCodes.ChannelNotCached); let data; if (options instanceof MessagePayload) { data = options; } else { data = MessagePayload.create(this, options, { reply: { messageReference: this, failIfNotExists: options?.failIfNotExists ?? this.client.options.failIfNotExists, }, }); } return this.channel.send(data); } /** * Forwards this message * * @param {TextBasedChannelResolvable} channel The channel to forward this message to. * @returns {Promise<Message>} */ forward(channel) { const resolvedChannel = this.client.channels.resolve(channel); if (!resolvedChannel) throw new DiscordjsError(ErrorCodes.InvalidType, 'channel', 'TextBasedChannelResolvable'); return resolvedChannel.send({ forward: { message: this.id, channel: this.channelId, guild: this.guildId, }, }); } /** * Options for starting a thread on a message. * @typedef {Object} StartThreadOptions * @property {string} name The name of the new thread * @property {ThreadAutoArchiveDuration} [autoArchiveDuration=this.channel.defaultAutoArchiveDuration] The amount of * time after which the thread should automatically archive in case of no recent activity * @property {string} [reason] Reason for creating the thread * @property {number} [rateLimitPerUser] The rate limit per user (slowmode) for the thread in seconds */ /** * Create a new public thread from this message * @see GuildTextThreadManager#create * @param {StartThreadOptions} [options] Options for starting a thread on this message * @returns {Promise<ThreadChannel>} */ async startThread(options = {}) { if (!this.channel) throw new DiscordjsError(ErrorCodes.ChannelNotCached); if (![ChannelType.GuildText, ChannelType.GuildAnnouncement].includes(this.channel.type)) { throw new DiscordjsError(ErrorCodes.MessageThreadParent); } if (this.hasThread) throw new DiscordjsError(ErrorCodes.MessageExistingThread); return this.channel.threads.create({ ...options, startMessage: this }); } /** * Fetch this message. * @param {boolean} [force=true] Whether to skip the cache check and request the API * @returns {Promise<Message>} */ async fetch(force = true) { if (!this.channel) throw new DiscordjsError(ErrorCodes.ChannelNotCached); return this.channel.messages.fetch({ message: this.id, force }); } /** * Fetches the webhook used to create this message. * @returns {Promise<?Webhook>} */ async fetchWebhook() { if (!this.webhookId) throw new DiscordjsError(ErrorCodes.WebhookMessage); if (this.webhookId === this.applicationId) throw new DiscordjsError(ErrorCodes.WebhookApplication); return this.client.fetchWebhook(this.webhookId); } /** * Suppresses or unsuppresses embeds on a message. * @param {boolean} [suppress=true] If the embeds should be suppressed or not * @returns {Promise<Message>} */ suppressEmbeds(suppress = true) { const flags = new MessageFlagsBitField(this.flags.bitfield); if (suppress) { flags.add(MessageFlags.SuppressEmbeds); } else { flags.remove(MessageFlags.SuppressEmbeds); } return this.edit({ flags }); } /** * Removes the attachments from this message. * @returns {Promise<Message>} */ removeAttachments() { return this.edit({ attachments: [] }); } /** * Resolves a component by a custom id. * @param {string} customId The custom id to resolve against * @returns {?MessageActionRowComponent} */ resolveComponent(customId) { return findComponentByCustomId(this.components, customId); } /** * Used mainly internally. Whether two messages are identical in properties. If you want to compare messages * without checking all the properties, use `message.id === message2.id`, which is much more efficient. This * method allows you to see if there are differences in content, embeds, attachments, nonce and tts properties. * @param {Message} message The message to compare it to * @param {APIMessage} rawData Raw data passed through the WebSocket about this message * @returns {boolean} */ equals(message, rawData) { if (!message) return false; const embedUpdate = !message.author && !message.attachments; if (embedUpdate) return this.id === message.id && this.embeds.length === message.embeds.length; let equal = this.id === message.id && this.author.id === message.author.id && this.content === message.content && this.nonce === message.nonce && this.tts === message.tts && this.attachments.size === message.attachments.size && this.embeds.length === message.embeds.length && this.attachments.every(attachment => message.attachments.has(attachment.id)) && this.embeds.every((embed, index) => embed.equals(message.embeds[index])); if (equal && rawData) { equal = this.mentions.everyone === message.mentions.everyone && this.createdTimestamp === Date.parse(rawData.timestamp) && this.editedTimestamp === Date.parse(rawData.edited_timestamp); } return equal; } /** * Whether this message is from a guild. * @returns {boolean} */ inGuild() { return Boolean(this.guildId); } /** * When concatenated with a string, this automatically concatenates the message's content instead of the object. * @returns {string} * @example * // Logs: Message: This is a message! * console.log(`Message: ${message}`); */ toString() { return this.content; } toJSON() { return super.toJSON({ channel: 'channelId', author: 'authorId', groupActivityApplication: 'groupActivityApplicationId', guild: 'guildId', cleanContent: true, member: false, reactions: false, }); } } exports.Message = Message; node_modules/discord.js/src/structures/ButtonInteraction.js 0000664 00000000430 15114741631 0020310 0 ustar 00 'use strict'; const MessageComponentInteraction = require('./MessageComponentInteraction'); /** * Represents a button interaction. * @extends {MessageComponentInteraction} */ class ButtonInteraction extends MessageComponentInteraction {} module.exports = ButtonInteraction; node_modules/discord.js/src/structures/ModalSubmitFields.js 0000664 00000003200 15114741631 0020202 0 ustar 00 'use strict'; const { Collection } = require('@discordjs/collection'); const { ComponentType } = require('discord-api-types/v10'); const { DiscordjsTypeError, ErrorCodes } = require('../errors'); /** * Represents the serialized fields from a modal submit interaction */ class ModalSubmitFields { constructor(components) { /** * The components within the modal * @type {ActionRowModalData[]} */ this.components = components; /** * The extracted fields from the modal * @type {Collection<string, ModalData>} */ this.fields = components.reduce((accumulator, next) => { next.components.forEach(component => accumulator.set(component.customId, component)); return accumulator; }, new Collection()); } /** * Gets a field given a custom id from a component * @param {string} customId The custom id of the component * @param {ComponentType} [type] The type of the component * @returns {ModalData} */ getField(customId, type) { const field = this.fields.get(customId); if (!field) throw new DiscordjsTypeError(ErrorCodes.ModalSubmitInteractionFieldNotFound, customId); if (type !== undefined && type !== field.type) { throw new DiscordjsTypeError(ErrorCodes.ModalSubmitInteractionFieldType, customId, field.type, type); } return field; } /** * Gets the value of a text input component given a custom id * @param {string} customId The custom id of the text input component * @returns {string} */ getTextInputValue(customId) { return this.getField(customId, ComponentType.TextInput).value; } } module.exports = ModalSubmitFields; node_modules/discord.js/src/structures/Integration.js 0000664 00000011551 15114741631 0017126 0 ustar 00 'use strict'; const { Routes } = require('discord-api-types/v10'); const Base = require('./Base'); const IntegrationApplication = require('./IntegrationApplication'); /** * The information account for an integration * @typedef {Object} IntegrationAccount * @property {Snowflake|string} id The id of the account * @property {string} name The name of the account */ /** * The type of an {@link Integration}. This can be: * * `twitch` * * `youtube` * * `discord` * * `guild_subscription` * @typedef {string} IntegrationType */ /** * Represents a guild integration. * @extends {Base} */ class Integration extends Base { constructor(client, data, guild) { super(client); /** * The guild this integration belongs to * @type {Guild} */ this.guild = guild; /** * The integration id * @type {Snowflake|string} */ this.id = data.id; /** * The integration name * @type {string} */ this.name = data.name; /** * The integration type * @type {IntegrationType} */ this.type = data.type; /** * Whether this integration is enabled * @type {?boolean} */ this.enabled = data.enabled ?? null; if ('syncing' in data) { /** * Whether this integration is syncing * @type {?boolean} */ this.syncing = data.syncing; } else { this.syncing ??= null; } /** * The role that this integration uses for subscribers * @type {?Role} */ this.role = this.guild.roles.resolve(data.role_id); if ('enable_emoticons' in data) { /** * Whether emoticons should be synced for this integration (twitch only currently) * @type {?boolean} */ this.enableEmoticons = data.enable_emoticons; } else { this.enableEmoticons ??= null; } if (data.user) { /** * The user for this integration * @type {?User} */ this.user = this.client.users._add(data.user); } else { this.user ??= null; } /** * The account integration information * @type {IntegrationAccount} */ this.account = data.account; if ('synced_at' in data) { /** * The timestamp at which this integration was last synced at * @type {?number} */ this.syncedTimestamp = Date.parse(data.synced_at); } else { this.syncedTimestamp ??= null; } if ('subscriber_count' in data) { /** * How many subscribers this integration has * @type {?number} */ this.subscriberCount = data.subscriber_count; } else { this.subscriberCount ??= null; } if ('revoked' in data) { /** * Whether this integration has been revoked * @type {?boolean} */ this.revoked = data.revoked; } else { this.revoked ??= null; } this._patch(data); } /** * The date at which this integration was last synced at * @type {?Date} * @readonly */ get syncedAt() { return this.syncedTimestamp && new Date(this.syncedTimestamp); } /** * All roles that are managed by this integration * @type {Collection<Snowflake, Role>} * @readonly */ get roles() { const roles = this.guild.roles.cache; return roles.filter(role => role.tags?.integrationId === this.id); } _patch(data) { if ('expire_behavior' in data) { /** * The behavior of expiring subscribers * @type {?IntegrationExpireBehavior} */ this.expireBehavior = data.expire_behavior; } else { this.expireBehavior ??= null; } if ('expire_grace_period' in data) { /** * The grace period (in days) before expiring subscribers * @type {?number} */ this.expireGracePeriod = data.expire_grace_period; } else { this.expireGracePeriod ??= null; } if ('application' in data) { if (this.application) { this.application._patch(data.application); } else { /** * The application for this integration * @type {?IntegrationApplication} */ this.application = new IntegrationApplication(this.client, data.application); } } else { this.application ??= null; } if ('scopes' in data) { /** * The scopes this application has been authorized for * @type {OAuth2Scopes[]} */ this.scopes = data.scopes; } else { this.scopes ??= []; } } /** * Deletes this integration. * @returns {Promise<Integration>} * @param {string} [reason] Reason for deleting this integration */ async delete(reason) { await this.client.rest.delete(Routes.guildIntegration(this.guild.id, this.id), { reason }); return this; } toJSON() { return super.toJSON({ role: 'roleId', guild: 'guildId', user: 'userId', }); } } module.exports = Integration; node_modules/discord.js/src/structures/Presence.js 0000664 00000022653 15114741631 0016414 0 ustar 00 'use strict'; const Base = require('./Base'); const { Emoji } = require('./Emoji'); const ActivityFlagsBitField = require('../util/ActivityFlagsBitField'); const { flatten } = require('../util/Util'); /** * Activity sent in a message. * @typedef {Object} MessageActivity * @property {string} [partyId] Id of the party represented in activity * @property {MessageActivityType} type Type of activity sent */ /** * The status of this presence: * * **`online`** - user is online * * **`idle`** - user is AFK * * **`offline`** - user is offline or invisible * * **`dnd`** - user is in Do Not Disturb * @typedef {string} PresenceStatus */ /** * The status of this presence: * * **`online`** - user is online * * **`idle`** - user is AFK * * **`dnd`** - user is in Do Not Disturb * @typedef {string} ClientPresenceStatus */ /** * Represents a user's presence. * @extends {Base} */ class Presence extends Base { constructor(client, data = {}) { super(client); /** * The presence's user id * @type {Snowflake} */ this.userId = data.user.id; /** * The guild this presence is in * @type {?Guild} */ this.guild = data.guild ?? null; this._patch(data); } /** * The user of this presence * @type {?User} * @readonly */ get user() { return this.client.users.resolve(this.userId); } /** * The member of this presence * @type {?GuildMember} * @readonly */ get member() { return this.guild.members.resolve(this.userId); } _patch(data) { if ('status' in data) { /** * The status of this presence * @type {PresenceStatus} */ this.status = data.status; } else { this.status ??= 'offline'; } if ('activities' in data) { /** * The activities of this presence * @type {Activity[]} */ this.activities = data.activities.map(activity => new Activity(this, activity)); } else { this.activities ??= []; } if ('client_status' in data) { /** * The devices this presence is on * @type {?Object} * @property {?ClientPresenceStatus} web The current presence in the web application * @property {?ClientPresenceStatus} mobile The current presence in the mobile application * @property {?ClientPresenceStatus} desktop The current presence in the desktop application */ this.clientStatus = data.client_status; } else { this.clientStatus ??= null; } return this; } _clone() { const clone = Object.assign(Object.create(this), this); clone.activities = this.activities.map(activity => activity._clone()); return clone; } /** * Whether this presence is equal to another. * @param {Presence} presence The presence to compare with * @returns {boolean} */ equals(presence) { return ( this === presence || (presence && this.status === presence.status && this.clientStatus?.web === presence.clientStatus?.web && this.clientStatus?.mobile === presence.clientStatus?.mobile && this.clientStatus?.desktop === presence.clientStatus?.desktop && this.activities.length === presence.activities.length && this.activities.every((activity, index) => activity.equals(presence.activities[index]))) ); } toJSON() { return flatten(this); } } /** * Represents an activity that is part of a user's presence. */ class Activity { constructor(presence, data) { /** * The presence of the Activity * @type {Presence} * @readonly * @name Activity#presence */ Object.defineProperty(this, 'presence', { value: presence }); /** * The activity's name * @type {string} */ this.name = data.name; /** * The activity status's type * @type {ActivityType} */ this.type = data.type; /** * If the activity is being streamed, a link to the stream * @type {?string} */ this.url = data.url ?? null; /** * Details about the activity * @type {?string} */ this.details = data.details ?? null; /** * State of the activity * @type {?string} */ this.state = data.state ?? null; /** * The id of the application associated with this activity * @type {?Snowflake} */ this.applicationId = data.application_id ?? null; /** * Represents timestamps of an activity * @typedef {Object} ActivityTimestamps * @property {?Date} start When the activity started * @property {?Date} end When the activity will end */ /** * Timestamps for the activity * @type {?ActivityTimestamps} */ this.timestamps = data.timestamps ? { start: data.timestamps.start ? new Date(Number(data.timestamps.start)) : null, end: data.timestamps.end ? new Date(Number(data.timestamps.end)) : null, } : null; /** * Represents a party of an activity * @typedef {Object} ActivityParty * @property {?string} id The party's id * @property {number[]} size Size of the party as `[current, max]` */ /** * Party of the activity * @type {?ActivityParty} */ this.party = data.party ?? null; /** * The sync id of the activity * <info>This property is not documented by Discord and represents the track id in spotify activities.</info> * @type {?string} */ this.syncId = data.sync_id ?? null; /** * Assets for rich presence * @type {?RichPresenceAssets} */ this.assets = data.assets ? new RichPresenceAssets(this, data.assets) : null; /** * Flags that describe the activity * @type {Readonly<ActivityFlagsBitField>} */ this.flags = new ActivityFlagsBitField(data.flags).freeze(); /** * Emoji for a custom activity * @type {?Emoji} */ this.emoji = data.emoji ? new Emoji(presence.client, data.emoji) : null; /** * The labels of the buttons of this rich presence * @type {string[]} */ this.buttons = data.buttons ?? []; /** * Creation date of the activity * @type {number} */ this.createdTimestamp = data.created_at; } /** * Whether this activity is equal to another activity. * @param {Activity} activity The activity to compare with * @returns {boolean} */ equals(activity) { return ( this === activity || (activity && this.name === activity.name && this.type === activity.type && this.url === activity.url && this.state === activity.state && this.details === activity.details && this.emoji?.id === activity.emoji?.id && this.emoji?.name === activity.emoji?.name) ); } /** * The time the activity was created at * @type {Date} * @readonly */ get createdAt() { return new Date(this.createdTimestamp); } /** * When concatenated with a string, this automatically returns the activity's name instead of the Activity object. * @returns {string} */ toString() { return this.name; } _clone() { return Object.assign(Object.create(this), this); } } /** * Assets for a rich presence */ class RichPresenceAssets { constructor(activity, assets) { /** * The activity of the RichPresenceAssets * @type {Activity} * @readonly * @name RichPresenceAssets#activity */ Object.defineProperty(this, 'activity', { value: activity }); /** * Hover text for the large image * @type {?string} */ this.largeText = assets.large_text ?? null; /** * Hover text for the small image * @type {?string} */ this.smallText = assets.small_text ?? null; /** * The large image asset's id * @type {?Snowflake} */ this.largeImage = assets.large_image ?? null; /** * The small image asset's id * @type {?Snowflake} */ this.smallImage = assets.small_image ?? null; } /** * Gets the URL of the small image asset * @param {ImageURLOptions} [options={}] Options for the image URL * @returns {?string} */ smallImageURL(options = {}) { if (!this.smallImage) return null; if (this.smallImage.includes(':')) { const [platform, id] = this.smallImage.split(':'); switch (platform) { case 'mp': return `https://media.discordapp.net/${id}`; default: return null; } } return this.activity.presence.client.rest.cdn.appAsset(this.activity.applicationId, this.smallImage, options); } /** * Gets the URL of the large image asset * @param {ImageURLOptions} [options={}] Options for the image URL * @returns {?string} */ largeImageURL(options = {}) { if (!this.largeImage) return null; if (this.largeImage.includes(':')) { const [platform, id] = this.largeImage.split(':'); switch (platform) { case 'mp': return `https://media.discordapp.net/${id}`; case 'spotify': return `https://i.scdn.co/image/${id}`; case 'youtube': return `https://i.ytimg.com/vi/${id}/hqdefault_live.jpg`; case 'twitch': return `https://static-cdn.jtvnw.net/previews-ttv/live_user_${id}.png`; default: return null; } } return this.activity.presence.client.rest.cdn.appAsset(this.activity.applicationId, this.largeImage, options); } } exports.Presence = Presence; exports.Activity = Activity; exports.RichPresenceAssets = RichPresenceAssets; node_modules/discord.js/src/structures/ContextMenuCommandInteraction.js 0000664 00000003724 15114741631 0022616 0 ustar 00 'use strict'; const { lazy } = require('@discordjs/util'); const { ApplicationCommandOptionType } = require('discord-api-types/v10'); const CommandInteraction = require('./CommandInteraction'); const CommandInteractionOptionResolver = require('./CommandInteractionOptionResolver'); const { transformResolved } = require('../util/Util'); const getMessage = lazy(() => require('./Message').Message); /** * Represents a context menu interaction. * @extends {CommandInteraction} */ class ContextMenuCommandInteraction extends CommandInteraction { constructor(client, data) { super(client, data); /** * The target of the interaction, parsed into options * @type {CommandInteractionOptionResolver} */ this.options = new CommandInteractionOptionResolver( this.client, this.resolveContextMenuOptions(data.data), transformResolved({ client: this.client, guild: this.guild, channel: this.channel }, data.data.resolved), ); /** * The id of the target of this interaction * @type {Snowflake} */ this.targetId = data.data.target_id; } /** * Resolves and transforms options received from the API for a context menu interaction. * @param {APIApplicationCommandInteractionData} data The interaction data * @returns {CommandInteractionOption[]} * @private */ resolveContextMenuOptions({ target_id, resolved }) { const result = []; if (resolved.users?.[target_id]) { result.push( this.transformOption({ name: 'user', type: ApplicationCommandOptionType.User, value: target_id }, resolved), ); } if (resolved.messages?.[target_id]) { result.push({ name: 'message', type: '_MESSAGE', value: target_id, message: this.channel?.messages._add(resolved.messages[target_id]) ?? new (getMessage())(this.client, resolved.messages[target_id]), }); } return result; } } module.exports = ContextMenuCommandInteraction; node_modules/discord.js/src/structures/SeparatorComponent.js 0000664 00000001136 15114741631 0020464 0 ustar 00 'use strict'; const { SeparatorSpacingSize } = require('discord-api-types/v10'); const Component = require('./Component'); /** * Represents a separator component * @extends {Component} */ class SeparatorComponent extends Component { /** * The spacing of this separator * @type {SeparatorSpacingSize} * @readonly */ get spacing() { return this.data.spacing ?? SeparatorSpacingSize.Small; } /** * Whether this separator is a divider * @type {boolean} * @readonly */ get divider() { return this.data.divider ?? true; } } module.exports = SeparatorComponent; node_modules/discord.js/src/structures/ThumbnailComponent.js 0000664 00000001720 15114741631 0020446 0 ustar 00 'use strict'; const Component = require('./Component'); const UnfurledMediaItem = require('./UnfurledMediaItem'); /** * Represents a thumbnail component * @extends {Component} */ class ThumbnailComponent extends Component { constructor({ media, ...data }) { super(data); /** * The media associated with this thumbnail * @type {UnfurledMediaItem} * @readonly */ this.media = new UnfurledMediaItem(media); } /** * The description of this thumbnail * @type {?string} * @readonly */ get description() { return this.data.description ?? null; } /** * Whether this thumbnail is spoilered * @type {boolean} * @readonly */ get spoiler() { return this.data.spoiler ?? false; } /** * Returns the API-compatible JSON for this component * @returns {APIThumbnailComponent} */ toJSON() { return { ...this.data, media: this.media.toJSON() }; } } module.exports = ThumbnailComponent; node_modules/discord.js/src/structures/PartialGroupDMChannel.js 0000664 00000006570 15114741631 0020773 0 ustar 00 'use strict'; const { BaseChannel } = require('./BaseChannel'); const TextBasedChannel = require('./interfaces/TextBasedChannel'); const { DiscordjsError, ErrorCodes } = require('../errors'); const PartialGroupDMMessageManager = require('../managers/PartialGroupDMMessageManager'); /** * Represents a Partial Group DM Channel on Discord. * @extends {BaseChannel} * @implements {TextBasedChannel} */ class PartialGroupDMChannel extends BaseChannel { constructor(client, data) { super(client, data); // No flags are present when fetching partial group DM channels. this.flags = null; /** * The name of this Group DM Channel * @type {?string} */ this.name = data.name; /** * The hash of the channel icon * @type {?string} */ this.icon = data.icon ?? null; /** * Recipient data received in a {@link PartialGroupDMChannel}. * @typedef {Object} PartialRecipient * @property {string} username The username of the recipient */ /** * The recipients of this Group DM Channel. * @type {PartialRecipient[]} */ this.recipients = data.recipients ?? []; /** * A manager of the messages belonging to this channel * @type {PartialGroupDMMessageManager} */ this.messages = new PartialGroupDMMessageManager(this); if ('owner_id' in data) { /** * The user id of the owner of this Group DM Channel * @type {?Snowflake} */ this.ownerId = data.owner_id; } else { this.ownerId ??= null; } if ('last_message_id' in data) { /** * The channel's last message id, if one was sent * @type {?Snowflake} */ this.lastMessageId = data.last_message_id; } else { this.lastMessageId ??= null; } if ('last_pin_timestamp' in data) { /** * The timestamp when the last pinned message was pinned, if there was one * @type {?number} */ this.lastPinTimestamp = data.last_pin_timestamp ? Date.parse(data.last_pin_timestamp) : null; } else { this.lastPinTimestamp ??= null; } } /** * The URL to this channel's icon. * @param {ImageURLOptions} [options={}] Options for the image URL * @returns {?string} */ iconURL(options = {}) { return this.icon && this.client.rest.cdn.channelIcon(this.id, this.icon, options); } /** * Fetches the owner of this Group DM Channel. * @param {BaseFetchOptions} [options] The options for fetching the user * @returns {Promise<User>} */ async fetchOwner(options) { if (!this.ownerId) { throw new DiscordjsError(ErrorCodes.FetchOwnerId, 'group DM'); } return this.client.users.fetch(this.ownerId, options); } async delete() { throw new DiscordjsError(ErrorCodes.DeleteGroupDMChannel); } async fetch() { throw new DiscordjsError(ErrorCodes.FetchGroupDMChannel); } // These are here only for documentation purposes - they are implemented by TextBasedChannel /* eslint-disable no-empty-function */ get lastMessage() {} get lastPinAt() {} createMessageComponentCollector() {} awaitMessageComponent() {} } TextBasedChannel.applyToClass(PartialGroupDMChannel, true, [ 'bulkDelete', 'send', 'sendTyping', 'createMessageCollector', 'awaitMessages', 'fetchWebhooks', 'createWebhook', 'setRateLimitPerUser', 'setNSFW', ]); module.exports = PartialGroupDMChannel; node_modules/discord.js/src/structures/RoleSelectMenuComponent.js 0000664 00000000433 15114741631 0021411 0 ustar 00 'use strict'; const BaseSelectMenuComponent = require('./BaseSelectMenuComponent'); /** * Represents a role select menu component * @extends {BaseSelectMenuComponent} */ class RoleSelectMenuComponent extends BaseSelectMenuComponent {} module.exports = RoleSelectMenuComponent; node_modules/discord.js/src/structures/SelectMenuComponent.js 0000664 00000001226 15114741631 0020570 0 ustar 00 'use strict'; const process = require('node:process'); const StringSelectMenuComponent = require('./StringSelectMenuComponent'); let deprecationEmitted = false; /** * @deprecated Use {@link StringSelectMenuComponent} instead. * @extends {StringSelectMenuComponent} */ class SelectMenuComponent extends StringSelectMenuComponent { constructor(...params) { super(...params); if (!deprecationEmitted) { process.emitWarning( 'The SelectMenuComponent class is deprecated. Use StringSelectMenuComponent instead.', 'DeprecationWarning', ); deprecationEmitted = true; } } } module.exports = SelectMenuComponent; node_modules/discord.js/src/structures/GuildAuditLogs.js 0000664 00000005473 15114741631 0017531 0 ustar 00 'use strict'; const { Collection } = require('@discordjs/collection'); const ApplicationCommand = require('./ApplicationCommand'); const GuildAuditLogsEntry = require('./GuildAuditLogsEntry'); const Integration = require('./Integration'); const Webhook = require('./Webhook'); const { flatten } = require('../util/Util'); /** * Audit logs entries are held in this class. */ class GuildAuditLogs { constructor(guild, data) { if (data.users) for (const user of data.users) guild.client.users._add(user); if (data.threads) for (const thread of data.threads) guild.client.channels._add(thread, guild); /** * Cached webhooks * @type {Collection<Snowflake, Webhook>} * @private */ this.webhooks = new Collection(); if (data.webhooks) { for (const hook of data.webhooks) { this.webhooks.set(hook.id, new Webhook(guild.client, hook)); } } /** * Cached integrations * @type {Collection<Snowflake|string, Integration>} * @private */ this.integrations = new Collection(); if (data.integrations) { for (const integration of data.integrations) { this.integrations.set(integration.id, new Integration(guild.client, integration, guild)); } } /** * Cached {@link GuildScheduledEvent}s. * @type {Collection<Snowflake, GuildScheduledEvent>} * @private */ this.guildScheduledEvents = data.guild_scheduled_events.reduce( (guildScheduledEvents, guildScheduledEvent) => guildScheduledEvents.set(guildScheduledEvent.id, guild.scheduledEvents._add(guildScheduledEvent)), new Collection(), ); /** * Cached application commands, includes application commands from other applications * @type {Collection<Snowflake, ApplicationCommand>} * @private */ this.applicationCommands = new Collection(); if (data.application_commands) { for (const command of data.application_commands) { this.applicationCommands.set(command.id, new ApplicationCommand(guild.client, command, guild)); } } /** * Cached auto moderation rules. * @type {Collection<Snowflake, AutoModerationRule>} * @private */ this.autoModerationRules = data.auto_moderation_rules.reduce( (autoModerationRules, autoModerationRule) => autoModerationRules.set(autoModerationRule.id, guild.autoModerationRules._add(autoModerationRule)), new Collection(), ); /** * The entries for this guild's audit logs * @type {Collection<Snowflake, GuildAuditLogsEntry>} */ this.entries = new Collection(); for (const item of data.audit_log_entries) { const entry = new GuildAuditLogsEntry(guild, item, this); this.entries.set(entry.id, entry); } } toJSON() { return flatten(this); } } module.exports = GuildAuditLogs; node_modules/discord.js/src/structures/OAuth2Guild.js 0000664 00000001311 15114741631 0016723 0 ustar 00 'use strict'; const BaseGuild = require('./BaseGuild'); const PermissionsBitField = require('../util/PermissionsBitField'); /** * A partial guild received when using {@link GuildManager#fetch} to fetch multiple guilds. * @extends {BaseGuild} */ class OAuth2Guild extends BaseGuild { constructor(client, data) { super(client, data); /** * Whether the client user is the owner of the guild * @type {boolean} */ this.owner = data.owner; /** * The permissions that the client user has in this guild * @type {Readonly<PermissionsBitField>} */ this.permissions = new PermissionsBitField(BigInt(data.permissions)).freeze(); } } module.exports = OAuth2Guild; node_modules/discord.js/src/structures/StringSelectMenuOptionBuilder.js 0000664 00000002721 15114741631 0022575 0 ustar 00 'use strict'; const { SelectMenuOptionBuilder: BuildersSelectMenuOption } = require('@discordjs/builders'); const { isJSONEncodable } = require('@discordjs/util'); const { toSnakeCase } = require('../util/Transformers'); const { resolvePartialEmoji } = require('../util/Util'); /** * Represents a select menu option builder. * @extends {BuildersSelectMenuOption} */ class StringSelectMenuOptionBuilder extends BuildersSelectMenuOption { constructor({ emoji, ...data } = {}) { super( toSnakeCase({ ...data, emoji: emoji && typeof emoji === 'string' ? resolvePartialEmoji(emoji) : emoji, }), ); } /** * Sets the emoji to display on this option * @param {ComponentEmojiResolvable} emoji The emoji to display on this option * @returns {StringSelectMenuOptionBuilder} */ setEmoji(emoji) { if (typeof emoji === 'string') { return super.setEmoji(resolvePartialEmoji(emoji)); } return super.setEmoji(emoji); } /** * Creates a new select menu option builder from JSON data * @param {StringSelectMenuOptionBuilder|APISelectMenuOption} other The other data * @returns {StringSelectMenuOptionBuilder} */ static from(other) { return new this(isJSONEncodable(other) ? other.toJSON() : other); } } module.exports = StringSelectMenuOptionBuilder; /** * @external BuildersSelectMenuOption * @see {@link https://discord.js.org/docs/packages/builders/stable/StringSelectMenuOptionBuilder:Class} */ node_modules/discord.js/src/structures/StageChannel.js 0000664 00000006471 15114741631 0017204 0 ustar 00 'use strict'; const BaseGuildVoiceChannel = require('./BaseGuildVoiceChannel'); /** * Represents a guild stage channel on Discord. * @extends {BaseGuildVoiceChannel} */ class StageChannel extends BaseGuildVoiceChannel { _patch(data) { super._patch(data); if ('topic' in data) { /** * The topic of the stage channel * @type {?string} */ this.topic = data.topic; } } /** * The stage instance of this stage channel, if it exists * @type {?StageInstance} * @readonly */ get stageInstance() { return this.guild.stageInstances.cache.find(stageInstance => stageInstance.channelId === this.id) ?? null; } /** * Creates a stage instance associated with this stage channel. * @param {StageInstanceCreateOptions} options The options to create the stage instance * @returns {Promise<StageInstance>} */ createStageInstance(options) { return this.guild.stageInstances.create(this.id, options); } /** * Sets a new topic for the guild channel. * @param {?string} topic The new topic for the guild channel * @param {string} [reason] Reason for changing the guild channel's topic * @returns {Promise<StageChannel>} * @example * // Set a new channel topic * stageChannel.setTopic('needs more rate limiting') * .then(channel => console.log(`Channel's new topic is ${channel.topic}`)) * .catch(console.error); */ setTopic(topic, reason) { return this.edit({ topic, reason }); } } /** * Sets the bitrate of the channel. * @method setBitrate * @memberof StageChannel * @instance * @param {number} bitrate The new bitrate * @param {string} [reason] Reason for changing the channel's bitrate * @returns {Promise<StageChannel>} * @example * // Set the bitrate of a voice channel * stageChannel.setBitrate(48_000) * .then(channel => console.log(`Set bitrate to ${channel.bitrate}bps for ${channel.name}`)) * .catch(console.error); */ /** * Sets the RTC region of the channel. * @method setRTCRegion * @memberof StageChannel * @instance * @param {?string} rtcRegion The new region of the channel. Set to `null` to remove a specific region for the channel * @param {string} [reason] The reason for modifying this region. * @returns {Promise<StageChannel>} * @example * // Set the RTC region to sydney * stageChannel.setRTCRegion('sydney'); * @example * // Remove a fixed region for this channel - let Discord decide automatically * stageChannel.setRTCRegion(null, 'We want to let Discord decide.'); */ /** * Sets the user limit of the channel. * @method setUserLimit * @memberof StageChannel * @instance * @param {number} userLimit The new user limit * @param {string} [reason] Reason for changing the user limit * @returns {Promise<StageChannel>} * @example * // Set the user limit of a voice channel * stageChannel.setUserLimit(42) * .then(channel => console.log(`Set user limit to ${channel.userLimit} for ${channel.name}`)) * .catch(console.error); */ /** * Sets the camera video quality mode of the channel. * @method setVideoQualityMode * @memberof StageChannel * @instance * @param {VideoQualityMode} videoQualityMode The new camera video quality mode. * @param {string} [reason] Reason for changing the camera video quality mode. * @returns {Promise<StageChannel>} */ module.exports = StageChannel; node_modules/discord.js/src/structures/BaseChannel.js 0000664 00000007630 15114741631 0017011 0 ustar 00 'use strict'; const { channelLink, channelMention } = require('@discordjs/formatters'); const { DiscordSnowflake } = require('@sapphire/snowflake'); const { ChannelType, Routes } = require('discord-api-types/v10'); const Base = require('./Base'); const ChannelFlagsBitField = require('../util/ChannelFlagsBitField'); const { ThreadChannelTypes } = require('../util/Constants'); /** * Represents any channel on Discord. * @extends {Base} * @abstract */ class BaseChannel extends Base { constructor(client, data, immediatePatch = true) { super(client); /** * The type of the channel * @type {ChannelType} */ this.type = data.type; if (data && immediatePatch) this._patch(data); } _patch(data) { if ('flags' in data) { /** * The flags that are applied to the channel. * <info>This is only `null` in a {@link PartialGroupDMChannel}. In all other cases, it is not `null`.</info> * @type {?Readonly<ChannelFlagsBitField>} */ this.flags = new ChannelFlagsBitField(data.flags).freeze(); } else { this.flags ??= new ChannelFlagsBitField().freeze(); } /** * The channel's id * @type {Snowflake} */ this.id = data.id; } /** * The timestamp the channel was created at * @type {number} * @readonly */ get createdTimestamp() { return DiscordSnowflake.timestampFrom(this.id); } /** * The time the channel was created at * @type {Date} * @readonly */ get createdAt() { return new Date(this.createdTimestamp); } /** * The URL to the channel * @type {string} * @readonly */ get url() { return this.isDMBased() ? channelLink(this.id) : channelLink(this.id, this.guildId); } /** * Whether this Channel is a partial * <info>This is always false outside of DM channels.</info> * @type {boolean} * @readonly */ get partial() { return false; } /** * When concatenated with a string, this automatically returns the channel's mention instead of the Channel object. * @returns {string} * @example * // Logs: Hello from <#123456789012345678>! * console.log(`Hello from ${channel}!`); */ toString() { return channelMention(this.id); } /** * Deletes this channel. * @returns {Promise<BaseChannel>} * @example * // Delete the channel * channel.delete() * .then(console.log) * .catch(console.error); */ async delete() { await this.client.rest.delete(Routes.channel(this.id)); return this; } /** * Fetches this channel. * @param {boolean} [force=true] Whether to skip the cache check and request the API * @returns {Promise<BaseChannel>} */ fetch(force = true) { return this.client.channels.fetch(this.id, { force }); } /** * Indicates whether this channel is a {@link ThreadChannel}. * @returns {boolean} */ isThread() { return ThreadChannelTypes.includes(this.type); } /** * Indicates whether this channel is {@link TextBasedChannels text-based}. * @returns {boolean} */ isTextBased() { return 'messages' in this; } /** * Indicates whether this channel is DM-based (either a {@link DMChannel} or a {@link PartialGroupDMChannel}). * @returns {boolean} */ isDMBased() { return [ChannelType.DM, ChannelType.GroupDM].includes(this.type); } /** * Indicates whether this channel is {@link BaseGuildVoiceChannel voice-based}. * @returns {boolean} */ isVoiceBased() { return 'bitrate' in this; } /** * Indicates whether this channel is {@link ThreadOnlyChannel thread-only}. * @returns {boolean} */ isThreadOnly() { return 'availableTags' in this; } /** * Indicates whether this channel is sendable. * @returns {boolean} */ isSendable() { return 'send' in this; } toJSON(...props) { return super.toJSON({ createdTimestamp: true }, ...props); } } exports.BaseChannel = BaseChannel; node_modules/discord.js/src/structures/GuildBan.js 0000664 00000002202 15114741631 0016321 0 ustar 00 'use strict'; const Base = require('./Base'); /** * Represents a ban in a guild on Discord. * @extends {Base} */ class GuildBan extends Base { constructor(client, data, guild) { super(client); /** * The guild in which the ban is * @type {Guild} */ this.guild = guild; this._patch(data); } _patch(data) { if ('user' in data) { /** * The user this ban applies to * @type {User} */ this.user = this.client.users._add(data.user, true); } if ('reason' in data) { /** * The reason for the ban * @type {?string} */ this.reason = data.reason; } } /** * Whether this GuildBan is partial. If the reason is not provided the value is null * @type {boolean} * @readonly */ get partial() { return !('reason' in this); } /** * Fetches this GuildBan. * @param {boolean} [force=true] Whether to skip the cache check and request the API * @returns {Promise<GuildBan>} */ fetch(force = true) { return this.guild.bans.fetch({ user: this.user, cache: true, force }); } } module.exports = GuildBan; node_modules/discord.js/src/structures/GuildAuditLogsEntry.js 0000664 00000041743 15114741631 0020553 0 ustar 00 'use strict'; const { DiscordSnowflake } = require('@sapphire/snowflake'); const { AuditLogOptionsType, AuditLogEvent } = require('discord-api-types/v10'); const AutoModerationRule = require('./AutoModerationRule'); const { GuildOnboardingPrompt } = require('./GuildOnboardingPrompt'); const { GuildScheduledEvent } = require('./GuildScheduledEvent'); const Integration = require('./Integration'); const Invite = require('./Invite'); const { StageInstance } = require('./StageInstance'); const { Sticker } = require('./Sticker'); const Webhook = require('./Webhook'); const Partials = require('../util/Partials'); const { flatten } = require('../util/Util'); const Targets = { All: 'All', Guild: 'Guild', GuildScheduledEvent: 'GuildScheduledEvent', Channel: 'Channel', User: 'User', Role: 'Role', Invite: 'Invite', Webhook: 'Webhook', Emoji: 'Emoji', Message: 'Message', Integration: 'Integration', StageInstance: 'StageInstance', Sticker: 'Sticker', Thread: 'Thread', ApplicationCommand: 'ApplicationCommand', AutoModeration: 'AutoModeration', GuildOnboarding: 'GuildOnboarding', GuildOnboardingPrompt: 'GuildOnboardingPrompt', SoundboardSound: 'SoundboardSound', Unknown: 'Unknown', }; /** * The target of a guild audit log entry. It can be one of: * * A guild * * A channel * * A user * * A role * * An invite * * A webhook * * An emoji * * A message * * An integration * * A stage instance * * A sticker * * A guild scheduled event * * A thread * * An application command * * An auto moderation rule * * A guild onboarding prompt * * A soundboard sound * * An object with an id key if target was deleted or fake entity * * An object where the keys represent either the new value or the old value * @typedef {?(Object|Guild|BaseChannel|User|Role|Invite|Webhook|GuildEmoji|Message|Integration|StageInstance|Sticker| * GuildScheduledEvent|ApplicationCommand|AutoModerationRule|GuildOnboardingPrompt|SoundboardSound)} AuditLogEntryTarget */ /** * The action type of an entry, e.g. `Create`. Here are the available types: * * Create * * Delete * * Update * * All * @typedef {string} AuditLogActionType */ /** * The target type of an entry. Here are the available types: * * Guild * * Channel * * User * * Role * * Invite * * Webhook * * Emoji * * Message * * Integration * * StageInstance * * Sticker * * Thread * * GuildScheduledEvent * * ApplicationCommandPermission * * GuildOnboarding * * GuildOnboardingPrompt * * SoundboardSound * * AutoModeration * * Unknown * @typedef {string} AuditLogTargetType */ /** * Constructs an object of known properties for a structure from an array of changes. * @param {AuditLogChange[]} changes The array of changes * @param {Object} [initialData={}] The initial data passed to the function * @returns {Object} * @ignore */ function changesReduce(changes, initialData = {}) { return changes.reduce((accumulator, change) => { accumulator[change.key] = change.new ?? change.old; return accumulator; }, initialData); } /** * Audit logs entry. */ class GuildAuditLogsEntry { /** * Key mirror of all available audit log targets. * @type {Object<string, string>} * @memberof GuildAuditLogsEntry */ static Targets = Targets; constructor(guild, data, logs) { /** * The target type of this entry * @type {AuditLogTargetType} */ this.targetType = GuildAuditLogsEntry.targetType(data.action_type); const targetType = this.targetType; /** * The action type of this entry * @type {AuditLogActionType} */ this.actionType = GuildAuditLogsEntry.actionType(data.action_type); /** * The type of action that occurred. * @type {AuditLogEvent} */ this.action = data.action_type; /** * The reason of this entry * @type {?string} */ this.reason = data.reason ?? null; /** * The id of the user that executed this entry * @type {?Snowflake} */ this.executorId = data.user_id; /** * The user that executed this entry * @type {?User} */ this.executor = data.user_id ? guild.client.options.partials.includes(Partials.User) ? guild.client.users._add({ id: data.user_id }) : (guild.client.users.cache.get(data.user_id) ?? null) : null; /** * An entry in the audit log representing a specific change. * @typedef {Object} AuditLogChange * @property {string} key The property that was changed, e.g. `nick` for nickname changes * <warn>For application command permissions updates the key is the id of the user, channel, * role, or a permission constant that was updated instead of an actual property name</warn> * @property {*} [old] The old value of the change, e.g. for nicknames, the old nickname * @property {*} [new] The new value of the change, e.g. for nicknames, the new nickname */ /** * Specific property changes * @type {AuditLogChange[]} */ this.changes = data.changes?.map(change => ({ key: change.key, ...('old_value' in change ? { old: change.old_value } : {}), ...('new_value' in change ? { new: change.new_value } : {}), })) ?? []; /** * The entry's id * @type {Snowflake} */ this.id = data.id; /** * Any extra data from the entry * @type {?(Object|Role|GuildMember)} */ this.extra = null; switch (data.action_type) { case AuditLogEvent.MemberPrune: this.extra = { removed: Number(data.options.members_removed), days: Number(data.options.delete_member_days), }; break; case AuditLogEvent.MemberMove: case AuditLogEvent.MessageDelete: this.extra = { channel: guild.channels.cache.get(data.options.channel_id) ?? { id: data.options.channel_id }, count: Number(data.options.count), }; break; case AuditLogEvent.MessagePin: case AuditLogEvent.MessageUnpin: this.extra = { channel: guild.client.channels.cache.get(data.options.channel_id) ?? { id: data.options.channel_id }, messageId: data.options.message_id, }; break; case AuditLogEvent.MessageBulkDelete: case AuditLogEvent.MemberDisconnect: this.extra = { count: Number(data.options.count), }; break; case AuditLogEvent.ChannelOverwriteCreate: case AuditLogEvent.ChannelOverwriteUpdate: case AuditLogEvent.ChannelOverwriteDelete: switch (data.options.type) { case AuditLogOptionsType.Role: this.extra = guild.roles.cache.get(data.options.id) ?? { id: data.options.id, name: data.options.role_name, type: AuditLogOptionsType.Role, }; break; case AuditLogOptionsType.Member: this.extra = guild.members.cache.get(data.options.id) ?? { id: data.options.id, type: AuditLogOptionsType.Member, }; break; default: break; } break; case AuditLogEvent.StageInstanceCreate: case AuditLogEvent.StageInstanceDelete: case AuditLogEvent.StageInstanceUpdate: this.extra = { channel: guild.client.channels.cache.get(data.options?.channel_id) ?? { id: data.options?.channel_id }, }; break; case AuditLogEvent.ApplicationCommandPermissionUpdate: this.extra = { applicationId: data.options.application_id, }; break; case AuditLogEvent.AutoModerationBlockMessage: case AuditLogEvent.AutoModerationFlagToChannel: case AuditLogEvent.AutoModerationUserCommunicationDisabled: this.extra = { autoModerationRuleName: data.options.auto_moderation_rule_name, autoModerationRuleTriggerType: data.options.auto_moderation_rule_trigger_type, channel: guild.client.channels.cache.get(data.options?.channel_id) ?? { id: data.options?.channel_id }, }; break; case AuditLogEvent.MemberKick: case AuditLogEvent.MemberRoleUpdate: { if (data.integration_type) { this.extra = { integrationType: data.integration_type, }; } break; } default: break; } /** * The id of the target of this entry * @type {?Snowflake} */ this.targetId = data.target_id; /** * The target of this entry * @type {?AuditLogEntryTarget} */ this.target = null; if (targetType === Targets.Unknown) { this.target = changesReduce(this.changes); this.target.id = data.target_id; // MemberDisconnect and similar types do not provide a target_id. } else if (targetType === Targets.User && data.target_id) { this.target = guild.client.options.partials.includes(Partials.User) ? guild.client.users._add({ id: data.target_id }) : (guild.client.users.cache.get(data.target_id) ?? null); } else if (targetType === Targets.Guild) { this.target = guild.client.guilds.cache.get(data.target_id); } else if (targetType === Targets.Webhook) { this.target = logs?.webhooks.get(data.target_id) ?? new Webhook( guild.client, changesReduce(this.changes, { id: data.target_id, guild_id: guild.id, }), ); } else if (targetType === Targets.Invite) { const inviteChange = this.changes.find(({ key }) => key === 'code'); this.target = guild.invites.cache.get(inviteChange.new ?? inviteChange.old) ?? new Invite(guild.client, changesReduce(this.changes, { guild })); } else if (targetType === Targets.Message) { // Discord sends a channel id for the MessageBulkDelete action type. this.target = data.action_type === AuditLogEvent.MessageBulkDelete ? (guild.channels.cache.get(data.target_id) ?? { id: data.target_id }) : (guild.client.users.cache.get(data.target_id) ?? null); } else if (targetType === Targets.Integration) { this.target = logs?.integrations.get(data.target_id) ?? new Integration(guild.client, changesReduce(this.changes, { id: data.target_id }), guild); } else if (targetType === Targets.Channel || targetType === Targets.Thread) { this.target = guild.channels.cache.get(data.target_id) ?? changesReduce(this.changes, { id: data.target_id }); } else if (targetType === Targets.StageInstance) { this.target = guild.stageInstances.cache.get(data.target_id) ?? new StageInstance( guild.client, changesReduce(this.changes, { id: data.target_id, channel_id: data.options?.channel_id, guild_id: guild.id, }), ); } else if (targetType === Targets.Sticker) { this.target = guild.stickers.cache.get(data.target_id) ?? new Sticker(guild.client, changesReduce(this.changes, { id: data.target_id })); } else if (targetType === Targets.GuildScheduledEvent) { this.target = guild.scheduledEvents.cache.get(data.target_id) ?? new GuildScheduledEvent(guild.client, changesReduce(this.changes, { id: data.target_id, guild_id: guild.id })); } else if (targetType === Targets.ApplicationCommand) { this.target = logs?.applicationCommands.get(data.target_id) ?? { id: data.target_id }; } else if (targetType === Targets.AutoModeration) { this.target = guild.autoModerationRules.cache.get(data.target_id) ?? new AutoModerationRule( guild.client, changesReduce(this.changes, { id: data.target_id, guild_id: guild.id }), guild, ); } else if (targetType === Targets.GuildOnboardingPrompt) { this.target = data.action_type === AuditLogEvent.OnboardingPromptCreate ? new GuildOnboardingPrompt(guild.client, changesReduce(this.changes, { id: data.target_id }), guild.id) : changesReduce(this.changes, { id: data.target_id }); } else if (targetType === Targets.Role) { this.target = guild.roles.cache.get(data.target_id) ?? { id: data.target_id }; } else if (targetType === Targets.Emoji) { this.target = guild.emojis.cache.get(data.target_id) ?? { id: data.target_id }; } else if (targetType === Targets.SoundboardSound) { this.target = guild.soundboardSounds.cache.get(data.target_id) ?? { id: data.target_id }; } else if (data.target_id) { this.target = { id: data.target_id }; } } /** * Finds the target type of a guild audit log entry. * @param {AuditLogEvent} target The action target * @returns {AuditLogTargetType} */ static targetType(target) { if (target < 10) return Targets.Guild; if (target < 20) return Targets.Channel; if (target < 30) return Targets.User; if (target < 40) return Targets.Role; if (target < 50) return Targets.Invite; if (target < 60) return Targets.Webhook; if (target < 70) return Targets.Emoji; if (target < 80) return Targets.Message; if (target < 83) return Targets.Integration; if (target < 86) return Targets.StageInstance; if (target < 100) return Targets.Sticker; if (target < 110) return Targets.GuildScheduledEvent; if (target < 120) return Targets.Thread; if (target < 130) return Targets.ApplicationCommand; if (target < 140) return Targets.SoundboardSound; if (target < 143) return Targets.AutoModeration; if (target < 146) return Targets.User; if (target >= 163 && target <= 165) return Targets.GuildOnboardingPrompt; if (target >= 160 && target < 170) return Targets.GuildOnboarding; return Targets.Unknown; } /** * Finds the action type from the guild audit log entry action. * @param {AuditLogEvent} action The action target * @returns {AuditLogActionType} */ static actionType(action) { if ( [ AuditLogEvent.ChannelCreate, AuditLogEvent.ChannelOverwriteCreate, AuditLogEvent.MemberBanRemove, AuditLogEvent.BotAdd, AuditLogEvent.RoleCreate, AuditLogEvent.InviteCreate, AuditLogEvent.WebhookCreate, AuditLogEvent.EmojiCreate, AuditLogEvent.MessagePin, AuditLogEvent.IntegrationCreate, AuditLogEvent.StageInstanceCreate, AuditLogEvent.StickerCreate, AuditLogEvent.GuildScheduledEventCreate, AuditLogEvent.ThreadCreate, AuditLogEvent.SoundboardSoundCreate, AuditLogEvent.AutoModerationRuleCreate, AuditLogEvent.AutoModerationBlockMessage, AuditLogEvent.OnboardingPromptCreate, AuditLogEvent.OnboardingCreate, ].includes(action) ) { return 'Create'; } if ( [ AuditLogEvent.ChannelDelete, AuditLogEvent.ChannelOverwriteDelete, AuditLogEvent.MemberKick, AuditLogEvent.MemberPrune, AuditLogEvent.MemberBanAdd, AuditLogEvent.MemberDisconnect, AuditLogEvent.RoleDelete, AuditLogEvent.InviteDelete, AuditLogEvent.WebhookDelete, AuditLogEvent.EmojiDelete, AuditLogEvent.MessageDelete, AuditLogEvent.MessageBulkDelete, AuditLogEvent.MessageUnpin, AuditLogEvent.IntegrationDelete, AuditLogEvent.StageInstanceDelete, AuditLogEvent.StickerDelete, AuditLogEvent.GuildScheduledEventDelete, AuditLogEvent.ThreadDelete, AuditLogEvent.SoundboardSoundDelete, AuditLogEvent.AutoModerationRuleDelete, AuditLogEvent.OnboardingPromptDelete, ].includes(action) ) { return 'Delete'; } if ( [ AuditLogEvent.GuildUpdate, AuditLogEvent.ChannelUpdate, AuditLogEvent.ChannelOverwriteUpdate, AuditLogEvent.MemberUpdate, AuditLogEvent.MemberRoleUpdate, AuditLogEvent.MemberMove, AuditLogEvent.RoleUpdate, AuditLogEvent.InviteUpdate, AuditLogEvent.WebhookUpdate, AuditLogEvent.EmojiUpdate, AuditLogEvent.IntegrationUpdate, AuditLogEvent.StageInstanceUpdate, AuditLogEvent.StickerUpdate, AuditLogEvent.GuildScheduledEventUpdate, AuditLogEvent.ThreadUpdate, AuditLogEvent.SoundboardSoundUpdate, AuditLogEvent.ApplicationCommandPermissionUpdate, AuditLogEvent.AutoModerationRuleUpdate, AuditLogEvent.AutoModerationBlockMessage, AuditLogEvent.AutoModerationFlagToChannel, AuditLogEvent.AutoModerationUserCommunicationDisabled, AuditLogEvent.OnboardingPromptUpdate, AuditLogEvent.OnboardingUpdate, ].includes(action) ) { return 'Update'; } return 'All'; } /** * The timestamp this entry was created at * @type {number} * @readonly */ get createdTimestamp() { return DiscordSnowflake.timestampFrom(this.id); } /** * The time this entry was created at * @type {Date} * @readonly */ get createdAt() { return new Date(this.createdTimestamp); } toJSON() { return flatten(this, { createdTimestamp: true }); } } module.exports = GuildAuditLogsEntry; node_modules/discord.js/src/structures/Webhook.js 0000664 00000034704 15114741631 0016246 0 ustar 00 'use strict'; const { makeURLSearchParams } = require('@discordjs/rest'); const { lazy } = require('@discordjs/util'); const { DiscordSnowflake } = require('@sapphire/snowflake'); const { Routes, WebhookType } = require('discord-api-types/v10'); const MessagePayload = require('./MessagePayload'); const { DiscordjsError, ErrorCodes } = require('../errors'); const { resolveImage } = require('../util/DataResolver'); const getMessage = lazy(() => require('./Message').Message); /** * Represents a webhook. */ class Webhook { constructor(client, data) { /** * The client that instantiated the webhook * @name Webhook#client * @type {Client} * @readonly */ Object.defineProperty(this, 'client', { value: client }); if (data) this._patch(data); } _patch(data) { if ('name' in data) { /** * The name of the webhook * @type {string} */ this.name = data.name; } /** * The token for the webhook, unavailable for follower webhooks and webhooks owned by another application. * @name Webhook#token * @type {?string} */ Object.defineProperty(this, 'token', { value: data.token ?? null, writable: true, configurable: true, }); if ('avatar' in data) { /** * The avatar for the webhook * @type {?string} */ this.avatar = data.avatar; } /** * The webhook's id * @type {Snowflake} */ this.id = data.id; if ('type' in data) { /** * The type of the webhook * @type {WebhookType} */ this.type = data.type; } if ('guild_id' in data) { /** * The guild the webhook belongs to * @type {Snowflake} */ this.guildId = data.guild_id; } if ('channel_id' in data) { /** * The id of the channel the webhook belongs to * @type {Snowflake} */ this.channelId = data.channel_id; } if ('user' in data) { /** * The owner of the webhook * @type {?(User|APIUser)} */ this.owner = this.client.users?._add(data.user) ?? data.user; } else { this.owner ??= null; } if ('application_id' in data) { /** * The application that created this webhook * @type {?Snowflake} */ this.applicationId = data.application_id; } else { this.applicationId ??= null; } if ('source_guild' in data) { /** * The source guild of the webhook * @type {?(Guild|APIGuild)} */ this.sourceGuild = this.client.guilds?.cache.get(data.source_guild.id) ?? data.source_guild; } else { this.sourceGuild ??= null; } if ('source_channel' in data) { /** * The source channel of the webhook * @type {?(NewsChannel|APIChannel)} */ this.sourceChannel = this.client.channels?.cache.get(data.source_channel?.id) ?? data.source_channel; } else { this.sourceChannel ??= null; } } /** * Options that can be passed into send. * @typedef {BaseMessageOptionsWithPoll} WebhookMessageCreateOptions * @property {boolean} [tts=false] Whether the message should be spoken aloud * @property {MessageFlags} [flags] Which flags to set for the message. * <info>Only the {@link MessageFlags.SuppressEmbeds} flag can be set.</info> * @property {string} [username=this.name] Username override for the message * @property {string} [avatarURL] Avatar URL override for the message * @property {Snowflake} [threadId] The id of the thread in the channel to send to. * <info>For interaction webhooks, this property is ignored</info> * @property {string} [threadName] Name of the thread to create (only available if the webhook is in a forum channel) * @property {Snowflake[]} [appliedTags] * The tags to apply to the created thread (only available if the webhook is in a forum channel) * @property {boolean} [withComponents] Whether to allow sending non-interactive components in the message. * <info>For application-owned webhooks, this property is ignored</info> */ /** * Options that can be passed into editMessage. * @typedef {MessageEditOptions} WebhookMessageEditOptions * @property {Snowflake} [threadId] The id of the thread this message belongs to * <info>For interaction webhooks, this property is ignored</info> */ /** * The channel the webhook belongs to * @type {?(TextChannel|VoiceChannel|StageChannel|NewsChannel|ForumChannel|MediaChannel)} * @readonly */ get channel() { return this.client.channels.resolve(this.channelId); } /** * Sends a message with this webhook. * @param {string|MessagePayload|WebhookMessageCreateOptions} options The options to provide * @returns {Promise<Message>} * @example * // Send a basic message * webhook.send('hello!') * .then(message => console.log(`Sent message: ${message.content}`)) * .catch(console.error); * @example * // Send a basic message in a thread * webhook.send({ content: 'hello!', threadId: '836856309672348295' }) * .then(message => console.log(`Sent message: ${message.content}`)) * .catch(console.error); * @example * // Send a remote file * webhook.send({ * files: ['https://cdn.discordapp.com/icons/222078108977594368/6e1019b3179d71046e463a75915e7244.png?size=2048'] * }) * .then(console.log) * .catch(console.error); * @example * // Send a local file * webhook.send({ * files: [{ * attachment: 'entire/path/to/file.jpg', * name: 'file.jpg' * }] * }) * .then(console.log) * .catch(console.error); * @example * // Send an embed with a local image inside * webhook.send({ * content: 'This is an embed', * embeds: [{ * thumbnail: { * url: 'attachment://file.jpg' * } * }], * files: [{ * attachment: 'entire/path/to/file.jpg', * name: 'file.jpg' * }] * }) * .then(console.log) * .catch(console.error); */ async send(options) { if (!this.token) throw new DiscordjsError(ErrorCodes.WebhookTokenUnavailable); let messagePayload; if (options instanceof MessagePayload) { messagePayload = options.resolveBody(); } else { messagePayload = MessagePayload.create(this, options).resolveBody(); } const { body, files } = await messagePayload.resolveFiles(); const query = makeURLSearchParams({ wait: true, thread_id: messagePayload.options.threadId, with_components: messagePayload.options.withComponents, }); const d = await this.client.rest.post(Routes.webhook(this.id, this.token), { body, files, query, auth: false, }); if (!this.client.channels) return d; return this.client.channels.cache.get(d.channel_id)?.messages._add(d, false) ?? new (getMessage())(this.client, d); } /** * Sends a raw slack message with this webhook. * @param {Object} body The raw body to send * @returns {Promise<boolean>} * @example * // Send a slack message * webhook.sendSlackMessage({ * 'username': 'Wumpus', * 'attachments': [{ * 'pretext': 'this looks pretty cool', * 'color': '#F0F', * 'footer_icon': 'http://snek.s3.amazonaws.com/topSnek.png', * 'footer': 'Powered by sneks', * 'ts': Date.now() / 1_000 * }] * }).catch(console.error); * @see {@link https://api.slack.com/messaging/webhooks} */ async sendSlackMessage(body) { if (!this.token) throw new DiscordjsError(ErrorCodes.WebhookTokenUnavailable); const data = await this.client.rest.post(Routes.webhookPlatform(this.id, this.token, 'slack'), { query: makeURLSearchParams({ wait: true }), auth: false, body, }); return data.toString() === 'ok'; } /** * Options used to edit a {@link Webhook}. * @typedef {Object} WebhookEditOptions * @property {string} [name=this.name] The new name for the webhook * @property {?(BufferResolvable)} [avatar] The new avatar for the webhook * @property {GuildTextChannelResolvable|VoiceChannel|StageChannel|ForumChannel|MediaChannel} [channel] * The new channel for the webhook * @property {string} [reason] Reason for editing the webhook */ /** * Edits this webhook. * @param {WebhookEditOptions} options Options for editing the webhook * @returns {Promise<Webhook>} */ async edit({ name = this.name, avatar, channel, reason }) { if (avatar && !(typeof avatar === 'string' && avatar.startsWith('data:'))) { avatar = await resolveImage(avatar); } channel &&= channel.id ?? channel; const data = await this.client.rest.patch(Routes.webhook(this.id, channel ? undefined : this.token), { body: { name, avatar, channel_id: channel }, reason, auth: !this.token || Boolean(channel), }); this.name = data.name; this.avatar = data.avatar; this.channelId = data.channel_id; return this; } /** * Options that can be passed into fetchMessage. * @typedef {options} WebhookFetchMessageOptions * @property {boolean} [cache=true] Whether to cache the message. * @property {Snowflake} [threadId] The id of the thread this message belongs to. * <info>For interaction webhooks, this property is ignored</info> * @property {boolean} [withComponents] Whether to allow sending non-interactive components in the message. * <info>For application-owned webhooks, this property is ignored</info> */ /** * Gets a message that was sent by this webhook. * @param {Snowflake|'@original'} message The id of the message to fetch * @param {WebhookFetchMessageOptions} [options={}] The options to provide to fetch the message. * @returns {Promise<Message>} Returns the message sent by this webhook */ async fetchMessage(message, { threadId } = {}) { if (!this.token) throw new DiscordjsError(ErrorCodes.WebhookTokenUnavailable); const data = await this.client.rest.get(Routes.webhookMessage(this.id, this.token, message), { query: threadId ? makeURLSearchParams({ thread_id: threadId }) : undefined, auth: false, }); if (!this.client.channels) return data; return ( this.client.channels.cache.get(data.channel_id)?.messages._add(data, false) ?? new (getMessage())(this.client, data) ); } /** * Edits a message that was sent by this webhook. * @param {MessageResolvable|'@original'} message The message to edit * @param {string|MessagePayload|WebhookMessageEditOptions} options The options to provide * @returns {Promise<Message>} Returns the message edited by this webhook */ async editMessage(message, options) { if (!this.token) throw new DiscordjsError(ErrorCodes.WebhookTokenUnavailable); let messagePayload; if (options instanceof MessagePayload) messagePayload = options; else messagePayload = MessagePayload.create(this, options); const { body, files } = await messagePayload.resolveBody().resolveFiles(); const query = makeURLSearchParams({ thread_id: messagePayload.options.threadId, with_components: messagePayload.options.withComponents, }); const d = await this.client.rest.patch( Routes.webhookMessage(this.id, this.token, typeof message === 'string' ? message : message.id), { body, files, query, auth: false, }, ); const channelManager = this.client.channels; if (!channelManager) return d; const messageManager = channelManager.cache.get(d.channel_id)?.messages; if (!messageManager) return new (getMessage())(this.client, d); const existing = messageManager.cache.get(d.id); if (!existing) return messageManager._add(d); const clone = existing._clone(); clone._patch(d); return clone; } /** * Deletes the webhook. * @param {string} [reason] Reason for deleting this webhook * @returns {Promise<void>} */ delete(reason) { return this.client.deleteWebhook(this.id, { token: this.token, reason }); } /** * Delete a message that was sent by this webhook. * @param {MessageResolvable|'@original'} message The message to delete * @param {Snowflake} [threadId] The id of the thread this message belongs to * @returns {Promise<void>} */ async deleteMessage(message, threadId) { if (!this.token) throw new DiscordjsError(ErrorCodes.WebhookTokenUnavailable); await this.client.rest.delete( Routes.webhookMessage(this.id, this.token, typeof message === 'string' ? message : message.id), { query: threadId ? makeURLSearchParams({ thread_id: threadId }) : undefined, auth: false, }, ); } /** * The timestamp the webhook was created at * @type {number} * @readonly */ get createdTimestamp() { return DiscordSnowflake.timestampFrom(this.id); } /** * The time the webhook was created at * @type {Date} * @readonly */ get createdAt() { return new Date(this.createdTimestamp); } /** * The URL of this webhook * @type {string} * @readonly */ get url() { return this.client.options.rest.api + Routes.webhook(this.id, this.token); } /** * A link to the webhook's avatar. * @param {ImageURLOptions} [options={}] Options for the image URL * @returns {?string} */ avatarURL(options = {}) { return this.avatar && this.client.rest.cdn.avatar(this.id, this.avatar, options); } /** * Whether this webhook is created by a user. * @returns {boolean} */ isUserCreated() { return Boolean(this.type === WebhookType.Incoming && this.owner && !this.owner.bot); } /** * Whether this webhook is created by an application. * @returns {boolean} */ isApplicationCreated() { return this.type === WebhookType.Application; } /** * Whether or not this webhook is a channel follower webhook. * @returns {boolean} */ isChannelFollower() { return this.type === WebhookType.ChannelFollower; } /** * Whether or not this webhook is an incoming webhook. * @returns {boolean} */ isIncoming() { return this.type === WebhookType.Incoming; } static applyToClass(structure, ignore = []) { for (const prop of [ 'send', 'sendSlackMessage', 'fetchMessage', 'edit', 'editMessage', 'delete', 'deleteMessage', 'createdTimestamp', 'createdAt', 'url', ]) { if (ignore.includes(prop)) continue; Object.defineProperty(structure.prototype, prop, Object.getOwnPropertyDescriptor(Webhook.prototype, prop)); } } } module.exports = Webhook; node_modules/discord.js/src/structures/Base.js 0000664 00000001337 15114741631 0015516 0 ustar 00 'use strict'; const { flatten } = require('../util/Util'); /** * Represents a data model that is identifiable by a Snowflake (i.e. Discord API data models). * @abstract */ class Base { constructor(client) { /** * The client that instantiated this * @name Base#client * @type {Client} * @readonly */ Object.defineProperty(this, 'client', { value: client }); } _clone() { return Object.assign(Object.create(this), this); } _patch(data) { return data; } _update(data) { const clone = this._clone(); this._patch(data); return clone; } toJSON(...props) { return flatten(this, ...props); } valueOf() { return this.id; } } module.exports = Base; node_modules/discord.js/src/structures/Team.js 0000664 00000004527 15114741631 0015536 0 ustar 00 'use strict'; const { Collection } = require('@discordjs/collection'); const { DiscordSnowflake } = require('@sapphire/snowflake'); const Base = require('./Base'); const TeamMember = require('./TeamMember'); /** * Represents a Client OAuth2 Application Team. * @extends {Base} */ class Team extends Base { constructor(client, data) { super(client); this._patch(data); } _patch(data) { /** * The Team's id * @type {Snowflake} */ this.id = data.id; if ('name' in data) { /** * The name of the Team * @type {string} */ this.name = data.name; } if ('icon' in data) { /** * The Team's icon hash * @type {?string} */ this.icon = data.icon; } else { this.icon ??= null; } if ('owner_user_id' in data) { /** * The Team's owner id * @type {?Snowflake} */ this.ownerId = data.owner_user_id; } else { this.ownerId ??= null; } /** * The Team's members * @type {Collection<Snowflake, TeamMember>} */ this.members = new Collection(); for (const memberData of data.members) { const member = new TeamMember(this, memberData); this.members.set(member.id, member); } } /** * The owner of this team * @type {?TeamMember} * @readonly */ get owner() { return this.members.get(this.ownerId) ?? null; } /** * The timestamp the team was created at * @type {number} * @readonly */ get createdTimestamp() { return DiscordSnowflake.timestampFrom(this.id); } /** * The time the team was created at * @type {Date} * @readonly */ get createdAt() { return new Date(this.createdTimestamp); } /** * A link to the team's icon. * @param {ImageURLOptions} [options={}] Options for the image URL * @returns {?string} */ iconURL(options = {}) { return this.icon && this.client.rest.cdn.teamIcon(this.id, this.icon, options); } /** * When concatenated with a string, this automatically returns the Team's name instead of the * Team object. * @returns {string} * @example * // Logs: Team name: My Team * console.log(`Team name: ${team}`); */ toString() { return this.name; } toJSON() { return super.toJSON({ createdTimestamp: true }); } } module.exports = Team; node_modules/discord.js/src/structures/UserContextMenuCommandInteraction.js 0000664 00000001240 15114741631 0023444 0 ustar 00 'use strict'; const ContextMenuCommandInteraction = require('./ContextMenuCommandInteraction'); /** * Represents a user context menu interaction. * @extends {ContextMenuCommandInteraction} */ class UserContextMenuCommandInteraction extends ContextMenuCommandInteraction { /** * The target user from this interaction * @type {User} * @readonly */ get targetUser() { return this.options.getUser('user'); } /** * The target member from this interaction * @type {?(GuildMember|APIGuildMember)} * @readonly */ get targetMember() { return this.options.getMember('user'); } } module.exports = UserContextMenuCommandInteraction; node_modules/discord.js/src/structures/VoiceChannel.js 0000664 00000007124 15114741631 0017202 0 ustar 00 'use strict'; const { PermissionFlagsBits, Routes } = require('discord-api-types/v10'); const BaseGuildVoiceChannel = require('./BaseGuildVoiceChannel'); /** * Represents a guild voice channel on Discord. * @extends {BaseGuildVoiceChannel} */ class VoiceChannel extends BaseGuildVoiceChannel { /** * Whether the channel is joinable by the client user * @type {boolean} * @readonly */ get joinable() { if (!super.joinable) return false; if (this.full && !this.permissionsFor(this.client.user).has(PermissionFlagsBits.MoveMembers, false)) return false; return true; } /** * Checks if the client has permission to send audio to the voice channel * @type {boolean} * @readonly */ get speakable() { const permissions = this.permissionsFor(this.client.user); if (!permissions) return false; // This flag allows speaking even if timed out if (permissions.has(PermissionFlagsBits.Administrator, false)) return true; return ( this.guild.members.me.communicationDisabledUntilTimestamp < Date.now() && permissions.has(PermissionFlagsBits.Speak, false) ); } /** * @typedef {Object} SendSoundboardSoundOptions * @property {string} soundId The id of the soundboard sound to send * @property {string} [guildId] The id of the guild the soundboard sound is a part of */ /** * Send a soundboard sound to a voice channel the user is connected to. * @param {SoundboardSound|SendSoundboardSoundOptions} sound The sound to send * @returns {Promise<void>} */ async sendSoundboardSound(sound) { await this.client.rest.post(Routes.sendSoundboardSound(this.id), { body: { sound_id: sound.soundId, source_guild_id: sound.guildId ?? undefined, }, }); } } /** * Sets the bitrate of the channel. * @method setBitrate * @memberof VoiceChannel * @instance * @param {number} bitrate The new bitrate * @param {string} [reason] Reason for changing the channel's bitrate * @returns {Promise<VoiceChannel>} * @example * // Set the bitrate of a voice channel * voiceChannel.setBitrate(48_000) * .then(channel => console.log(`Set bitrate to ${channel.bitrate}bps for ${channel.name}`)) * .catch(console.error); */ /** * Sets the RTC region of the channel. * @method setRTCRegion * @memberof VoiceChannel * @instance * @param {?string} rtcRegion The new region of the channel. Set to `null` to remove a specific region for the channel * @param {string} [reason] The reason for modifying this region. * @returns {Promise<VoiceChannel>} * @example * // Set the RTC region to sydney * voiceChannel.setRTCRegion('sydney'); * @example * // Remove a fixed region for this channel - let Discord decide automatically * voiceChannel.setRTCRegion(null, 'We want to let Discord decide.'); */ /** * Sets the user limit of the channel. * @method setUserLimit * @memberof VoiceChannel * @instance * @param {number} userLimit The new user limit * @param {string} [reason] Reason for changing the user limit * @returns {Promise<VoiceChannel>} * @example * // Set the user limit of a voice channel * voiceChannel.setUserLimit(42) * .then(channel => console.log(`Set user limit to ${channel.userLimit} for ${channel.name}`)) * .catch(console.error); */ /** * Sets the camera video quality mode of the channel. * @method setVideoQualityMode * @memberof VoiceChannel * @instance * @param {VideoQualityMode} videoQualityMode The new camera video quality mode. * @param {string} [reason] Reason for changing the camera video quality mode. * @returns {Promise<VoiceChannel>} */ module.exports = VoiceChannel; node_modules/discord.js/src/structures/ThreadMember.js 0000664 00000005373 15114741631 0017207 0 ustar 00 'use strict'; const Base = require('./Base'); const ThreadMemberFlagsBitField = require('../util/ThreadMemberFlagsBitField'); const { emitDeprecationWarningForRemoveThreadMember } = require('../util/Util'); /** * Represents a Member for a Thread. * @extends {Base} */ class ThreadMember extends Base { constructor(thread, data, extra = {}) { super(thread.client); /** * The thread that this member is a part of * @type {ThreadChannel} */ this.thread = thread; /** * The timestamp the member last joined the thread at * @type {?number} */ this.joinedTimestamp = null; /** * The flags for this thread member. This will be `null` if partial. * @type {?ThreadMemberFlagsBitField} */ this.flags = null; /** * The id of the thread member * @type {Snowflake} */ this.id = data.user_id; this._patch(data, extra); } _patch(data, extra = {}) { if ('join_timestamp' in data) this.joinedTimestamp = Date.parse(data.join_timestamp); if ('flags' in data) this.flags = new ThreadMemberFlagsBitField(data.flags).freeze(); if ('member' in data) { /** * The guild member associated with this thread member. * @type {?GuildMember} * @private */ this.member = this.thread.guild.members._add(data.member, extra.cache); } else { this.member ??= null; } } /** * Whether this thread member is a partial * @type {boolean} * @readonly */ get partial() { return this.flags === null; } /** * The guild member associated with this thread member * @type {?GuildMember} * @readonly */ get guildMember() { return this.member ?? this.thread.guild.members.cache.get(this.id) ?? null; } /** * The last time this member joined the thread * @type {?Date} * @readonly */ get joinedAt() { return this.joinedTimestamp && new Date(this.joinedTimestamp); } /** * The user associated with this thread member * @type {?User} * @readonly */ get user() { return this.client.users.cache.get(this.id) ?? null; } /** * Whether the client user can manage this thread member * @type {boolean} * @readonly */ get manageable() { return !this.thread.archived && this.thread.editable; } /** * Removes this member from the thread. * @param {string} [reason] Reason for removing the member * <warn>This parameter is **deprecated**. Reasons cannot be used.</warn> * @returns {Promise<ThreadMember>} */ async remove(reason) { if (reason !== undefined) { emitDeprecationWarningForRemoveThreadMember(this.constructor.name); } await this.thread.members.remove(this.id, reason); return this; } } module.exports = ThreadMember; node_modules/discord.js/src/structures/InteractionCallbackResource.js 0000664 00000002453 15114741631 0022250 0 ustar 00 'use strict'; const { lazy } = require('@discordjs/util'); const getMessage = lazy(() => require('./Message').Message); /** * Represents the resource that was created by the interaction response. */ class InteractionCallbackResource { constructor(client, data) { /** * The client that instantiated this * @name InteractionCallbackResource#client * @type {Client} * @readonly */ Object.defineProperty(this, 'client', { value: client }); /** * The interaction callback type * @type {InteractionResponseType} */ this.type = data.type; /** * The Activity launched by an interaction * @typedef {Object} ActivityInstance * @property {string} id The instance id of the Activity */ /** * Represents the Activity launched by this interaction * @type {?ActivityInstance} */ this.activityInstance = data.activity_instance ?? null; if ('message' in data) { /** * The message created by the interaction * @type {?Message} */ this.message = this.client.channels.cache.get(data.message.channel_id)?.messages._add(data.message) ?? new (getMessage())(client, data.message); } else { this.message = null; } } } module.exports = InteractionCallbackResource; node_modules/discord.js/src/structures/SelectMenuOptionBuilder.js 0000664 00000001272 15114741631 0021406 0 ustar 00 'use strict'; const process = require('node:process'); const StringSelectMenuOptionBuilder = require('./StringSelectMenuOptionBuilder'); let deprecationEmitted = false; /** * @deprecated Use {@link StringSelectMenuOptionBuilder} instead. * @extends {StringSelectMenuOptionBuilder} */ class SelectMenuOptionBuilder extends StringSelectMenuOptionBuilder { constructor(...params) { super(...params); if (!deprecationEmitted) { process.emitWarning( 'The SelectMenuOptionBuilder class is deprecated. Use StringSelectMenuOptionBuilder instead.', 'DeprecationWarning', ); deprecationEmitted = true; } } } module.exports = SelectMenuOptionBuilder; node_modules/discord.js/src/structures/ContainerComponent.js 0000664 00000002455 15114741631 0020453 0 ustar 00 'use strict'; const Component = require('./Component'); const { createComponent } = require('../util/Components'); /** * Represents a container component * @extends {Component} */ class ContainerComponent extends Component { constructor({ components, ...data }) { super(data); /** * The components in this container * @type {Component[]} * @readonly */ this.components = components.map(component => createComponent(component)); } /** * The accent color of this container * @type {?number} * @readonly */ get accentColor() { return this.data.accent_color ?? null; } /** * The hex accent color of this container * @type {?string} * @readonly */ get hexAccentColor() { return typeof this.data.accent_color === 'number' ? `#${this.data.accent_color.toString(16).padStart(6, '0')}` : (this.data.accent_color ?? null); } /** * Whether this container is spoilered * @type {boolean} * @readonly */ get spoiler() { return this.data.spoiler ?? false; } /** * Returns the API-compatible JSON for this component * @returns {APIContainerComponent} */ toJSON() { return { ...this.data, components: this.components.map(component => component.toJSON()) }; } } module.exports = ContainerComponent; node_modules/discord.js/src/structures/ForumChannel.js 0000664 00000001477 15114741631 0017232 0 ustar 00 'use strict'; const ThreadOnlyChannel = require('./ThreadOnlyChannel'); /** * Represents a forum channel. * @extends {ThreadOnlyChannel} */ class ForumChannel extends ThreadOnlyChannel { _patch(data) { super._patch(data); /** * The default layout type used to display posts * @type {ForumLayoutType} */ this.defaultForumLayout = data.default_forum_layout; } /** * Sets the default forum layout type used to display posts * @param {ForumLayoutType} defaultForumLayout The default forum layout type to set on this channel * @param {string} [reason] Reason for changing the default forum layout * @returns {Promise<ForumChannel>} */ setDefaultForumLayout(defaultForumLayout, reason) { return this.edit({ defaultForumLayout, reason }); } } module.exports = ForumChannel; node_modules/discord.js/src/structures/InteractionCollector.js 0000664 00000022527 15114741631 0020776 0 ustar 00 'use strict'; const { Collection } = require('@discordjs/collection'); const Collector = require('./interfaces/Collector'); const Events = require('../util/Events'); /** * @typedef {CollectorOptions} InteractionCollectorOptions * @property {TextBasedChannelsResolvable} [channel] The channel to listen to interactions from * @property {ComponentType} [componentType] The type of component to listen for * @property {GuildResolvable} [guild] The guild to listen to interactions from * @property {InteractionType} [interactionType] The type of interaction to listen for * @property {number} [max] The maximum total amount of interactions to collect * @property {number} [maxComponents] The maximum number of components to collect * @property {number} [maxUsers] The maximum number of users to interact * @property {Message|APIMessage} [message] The message to listen to interactions from * @property {InteractionResponse} [interactionResponse] The interaction response to listen * to message component interactions from */ /** * Collects interactions. * Will automatically stop if the message ({@link Client#event:messageDelete messageDelete} or * {@link Client#event:messageDeleteBulk messageDeleteBulk}), * channel ({@link Client#event:channelDelete channelDelete}), or * guild ({@link Client#event:guildDelete guildDelete}) is deleted. * <info>Interaction collectors that do not specify `time` or `idle` may be prone to always running. * Ensure your interaction collectors end via either of these options or manual cancellation.</info> * @extends {Collector} */ class InteractionCollector extends Collector { /** * @param {Client} client The client on which to collect interactions * @param {InteractionCollectorOptions} [options={}] The options to apply to this collector */ constructor(client, options = {}) { super(client, options); /** * The message from which to collect interactions, if provided * @type {?Snowflake} */ this.messageId = options.message?.id ?? options.interactionResponse?.interaction.message?.id ?? null; /** * The message interaction id from which to collect interactions, if provided * @type {?Snowflake} */ this.messageInteractionId = options.interactionResponse?.id ?? null; /** * The channel from which to collect interactions, if provided * @type {?Snowflake} */ this.channelId = options.interactionResponse?.interaction.channelId ?? options.message?.channelId ?? options.message?.channel_id ?? this.client.channels.resolveId(options.channel); /** * The guild from which to collect interactions, if provided * @type {?Snowflake} */ this.guildId = options.interactionResponse?.interaction.guildId ?? options.message?.guildId ?? options.message?.guild_id ?? this.client.guilds.resolveId(options.channel?.guild) ?? this.client.guilds.resolveId(options.guild); /** * The type of interaction to collect * @type {?InteractionType} */ this.interactionType = options.interactionType ?? null; /** * The type of component to collect * @type {?ComponentType} */ this.componentType = options.componentType ?? null; /** * The users that have interacted with this collector * @type {Collection<Snowflake, User>} */ this.users = new Collection(); /** * The total number of interactions collected * @type {number} */ this.total = 0; this.client.incrementMaxListeners(); const bulkDeleteListener = messages => { if (messages.has(this.messageId)) this.stop('messageDelete'); }; if (this.messageId || this.messageInteractionId) { this._handleMessageDeletion = this._handleMessageDeletion.bind(this); this.client.on(Events.MessageDelete, this._handleMessageDeletion); this.client.on(Events.MessageBulkDelete, bulkDeleteListener); } if (this.channelId) { this._handleChannelDeletion = this._handleChannelDeletion.bind(this); this._handleThreadDeletion = this._handleThreadDeletion.bind(this); this.client.on(Events.ChannelDelete, this._handleChannelDeletion); this.client.on(Events.ThreadDelete, this._handleThreadDeletion); } if (this.guildId) { this._handleGuildDeletion = this._handleGuildDeletion.bind(this); this.client.on(Events.GuildDelete, this._handleGuildDeletion); } this.client.on(Events.InteractionCreate, this.handleCollect); this.once('end', () => { this.client.removeListener(Events.InteractionCreate, this.handleCollect); this.client.removeListener(Events.MessageDelete, this._handleMessageDeletion); this.client.removeListener(Events.MessageBulkDelete, bulkDeleteListener); this.client.removeListener(Events.ChannelDelete, this._handleChannelDeletion); this.client.removeListener(Events.ThreadDelete, this._handleThreadDeletion); this.client.removeListener(Events.GuildDelete, this._handleGuildDeletion); this.client.decrementMaxListeners(); }); this.on('collect', interaction => { this.total++; this.users.set(interaction.user.id, interaction.user); }); } /** * Handles an incoming interaction for possible collection. * @param {BaseInteraction} interaction The interaction to possibly collect * @returns {?Snowflake} * @private */ collect(interaction) { /** * Emitted whenever an interaction is collected. * @event InteractionCollector#collect * @param {BaseInteraction} interaction The interaction that was collected */ if (this.interactionType && interaction.type !== this.interactionType) return null; if (this.componentType && interaction.componentType !== this.componentType) return null; if (this.messageId && interaction.message?.id !== this.messageId) return null; if ( this.messageInteractionId && interaction.message?.interactionMetadata?.id && interaction.message.interactionMetadata.id !== this.messageInteractionId ) { return null; } if (this.channelId && interaction.channelId !== this.channelId) return null; if (this.guildId && interaction.guildId !== this.guildId) return null; return interaction.id; } /** * Handles an interaction for possible disposal. * @param {BaseInteraction} interaction The interaction that could be disposed of * @returns {?Snowflake} */ dispose(interaction) { /** * Emitted whenever an interaction is disposed of. * @event InteractionCollector#dispose * @param {BaseInteraction} interaction The interaction that was disposed of */ if (this.type && interaction.type !== this.type) return null; if (this.componentType && interaction.componentType !== this.componentType) return null; if (this.messageId && interaction.message?.id !== this.messageId) return null; if ( this.messageInteractionId && interaction.message?.interactionMetadata?.id && interaction.message.interactionMetadata.id !== this.messageInteractionId ) { return null; } if (this.channelId && interaction.channelId !== this.channelId) return null; if (this.guildId && interaction.guildId !== this.guildId) return null; return interaction.id; } /** * Empties this interaction collector. */ empty() { this.total = 0; this.collected.clear(); this.users.clear(); this.checkEnd(); } /** * The reason this collector has ended with, or null if it hasn't ended yet * @type {?string} * @readonly */ get endReason() { if (this.options.max && this.total >= this.options.max) return 'limit'; if (this.options.maxComponents && this.collected.size >= this.options.maxComponents) return 'componentLimit'; if (this.options.maxUsers && this.users.size >= this.options.maxUsers) return 'userLimit'; return super.endReason; } /** * Handles checking if the message has been deleted, and if so, stops the collector with the reason 'messageDelete'. * @private * @param {Message} message The message that was deleted * @returns {void} */ _handleMessageDeletion(message) { if (message.id === this.messageId) { this.stop('messageDelete'); } if (message.interactionMetadata?.id === this.messageInteractionId) { this.stop('messageDelete'); } } /** * Handles checking if the channel has been deleted, and if so, stops the collector with the reason 'channelDelete'. * @private * @param {GuildChannel} channel The channel that was deleted * @returns {void} */ _handleChannelDeletion(channel) { if (channel.id === this.channelId || channel.threads?.cache.has(this.channelId)) { this.stop('channelDelete'); } } /** * Handles checking if the thread has been deleted, and if so, stops the collector with the reason 'threadDelete'. * @private * @param {ThreadChannel} thread The thread that was deleted * @returns {void} */ _handleThreadDeletion(thread) { if (thread.id === this.channelId) { this.stop('threadDelete'); } } /** * Handles checking if the guild has been deleted, and if so, stops the collector with the reason 'guildDelete'. * @private * @param {Guild} guild The guild that was deleted * @returns {void} */ _handleGuildDeletion(guild) { if (guild.id === this.guildId) { this.stop('guildDelete'); } } } module.exports = InteractionCollector; node_modules/discord.js/src/structures/Guild.js 0000664 00000142471 15114741631 0015715 0 ustar 00 'use strict'; const { Collection } = require('@discordjs/collection'); const { makeURLSearchParams } = require('@discordjs/rest'); const { DiscordSnowflake } = require('@sapphire/snowflake'); const { ChannelType, GuildPremiumTier, Routes, GuildFeature } = require('discord-api-types/v10'); const AnonymousGuild = require('./AnonymousGuild'); const GuildAuditLogs = require('./GuildAuditLogs'); const { GuildOnboarding } = require('./GuildOnboarding'); const GuildPreview = require('./GuildPreview'); const GuildTemplate = require('./GuildTemplate'); const Integration = require('./Integration'); const Webhook = require('./Webhook'); const WelcomeScreen = require('./WelcomeScreen'); const { DiscordjsError, DiscordjsTypeError, ErrorCodes } = require('../errors'); const AutoModerationRuleManager = require('../managers/AutoModerationRuleManager'); const GuildApplicationCommandManager = require('../managers/GuildApplicationCommandManager'); const GuildBanManager = require('../managers/GuildBanManager'); const GuildChannelManager = require('../managers/GuildChannelManager'); const GuildEmojiManager = require('../managers/GuildEmojiManager'); const GuildInviteManager = require('../managers/GuildInviteManager'); const GuildMemberManager = require('../managers/GuildMemberManager'); const GuildScheduledEventManager = require('../managers/GuildScheduledEventManager'); const { GuildSoundboardSoundManager } = require('../managers/GuildSoundboardSoundManager'); const GuildStickerManager = require('../managers/GuildStickerManager'); const PresenceManager = require('../managers/PresenceManager'); const RoleManager = require('../managers/RoleManager'); const StageInstanceManager = require('../managers/StageInstanceManager'); const VoiceStateManager = require('../managers/VoiceStateManager'); const { resolveImage } = require('../util/DataResolver'); const Status = require('../util/Status'); const SystemChannelFlagsBitField = require('../util/SystemChannelFlagsBitField'); const { _transformAPIIncidentsData } = require('../util/Transformers.js'); const { discordSort, getSortableGroupTypes, resolvePartialEmoji } = require('../util/Util'); /** * Represents a guild (or a server) on Discord. * <info>It's recommended to see if a guild is available before performing operations or reading data from it. You can * check this with {@link Guild#available}.</info> * @extends {AnonymousGuild} */ class Guild extends AnonymousGuild { constructor(client, data) { super(client, data, false); /** * A manager of the application commands belonging to this guild * @type {GuildApplicationCommandManager} */ this.commands = new GuildApplicationCommandManager(this); /** * A manager of the members belonging to this guild * @type {GuildMemberManager} */ this.members = new GuildMemberManager(this); /** * A manager of the channels belonging to this guild * @type {GuildChannelManager} */ this.channels = new GuildChannelManager(this); /** * A manager of the bans belonging to this guild * @type {GuildBanManager} */ this.bans = new GuildBanManager(this); /** * A manager of the roles belonging to this guild * @type {RoleManager} */ this.roles = new RoleManager(this); /** * A manager of the presences belonging to this guild * @type {PresenceManager} */ this.presences = new PresenceManager(this.client); /** * A manager of the voice states of this guild * @type {VoiceStateManager} */ this.voiceStates = new VoiceStateManager(this); /** * A manager of the stage instances of this guild * @type {StageInstanceManager} */ this.stageInstances = new StageInstanceManager(this); /** * A manager of the invites of this guild * @type {GuildInviteManager} */ this.invites = new GuildInviteManager(this); /** * A manager of the scheduled events of this guild * @type {GuildScheduledEventManager} */ this.scheduledEvents = new GuildScheduledEventManager(this); /** * A manager of the auto moderation rules of this guild. * @type {AutoModerationRuleManager} */ this.autoModerationRules = new AutoModerationRuleManager(this); /** * A manager of the soundboard sounds of this guild. * @type {GuildSoundboardSoundManager} */ this.soundboardSounds = new GuildSoundboardSoundManager(this); if (!data) return; if (data.unavailable) { /** * Whether the guild is available to access. If it is not available, it indicates a server outage * @type {boolean} */ this.available = false; } else { this._patch(data); if (!data.channels) this.available = false; } /** * The id of the shard this Guild belongs to. * @type {number} */ this.shardId = data.shardId; } /** * The Shard this Guild belongs to. * @type {WebSocketShard} * @readonly */ get shard() { return this.client.ws.shards.get(this.shardId); } _patch(data) { super._patch(data); this.id = data.id; if ('name' in data) this.name = data.name; if ('icon' in data) this.icon = data.icon; if ('unavailable' in data) { this.available = !data.unavailable; } else { this.available ??= true; } if ('discovery_splash' in data) { /** * The hash of the guild discovery splash image * @type {?string} */ this.discoverySplash = data.discovery_splash; } if ('member_count' in data) { /** * The full amount of members in this guild * @type {number} */ this.memberCount = data.member_count; } if ('large' in data) { /** * Whether the guild is "large" (has more than {@link WebSocketOptions large_threshold} members, 50 by default) * @type {boolean} */ this.large = Boolean(data.large); } if ('premium_progress_bar_enabled' in data) { /** * Whether this guild has its premium (boost) progress bar enabled * @type {boolean} */ this.premiumProgressBarEnabled = data.premium_progress_bar_enabled; } if ('application_id' in data) { /** * The id of the application that created this guild (if applicable) * @type {?Snowflake} */ this.applicationId = data.application_id; } if ('afk_timeout' in data) { /** * The time in seconds before a user is counted as "away from keyboard" * @type {?number} */ this.afkTimeout = data.afk_timeout; } if ('afk_channel_id' in data) { /** * The id of the voice channel where AFK members are moved * @type {?Snowflake} */ this.afkChannelId = data.afk_channel_id; } if ('system_channel_id' in data) { /** * The system channel's id * @type {?Snowflake} */ this.systemChannelId = data.system_channel_id; } if ('premium_tier' in data) { /** * The premium tier of this guild * @type {GuildPremiumTier} */ this.premiumTier = data.premium_tier; } if ('widget_enabled' in data) { /** * Whether widget images are enabled on this guild * @type {?boolean} */ this.widgetEnabled = data.widget_enabled; } else { this.widgetEnabled ??= null; } if ('widget_channel_id' in data) { /** * The widget channel's id, if enabled * @type {?string} */ this.widgetChannelId = data.widget_channel_id; } else { this.widgetChannelId ??= null; } if ('explicit_content_filter' in data) { /** * The explicit content filter level of the guild * @type {GuildExplicitContentFilter} */ this.explicitContentFilter = data.explicit_content_filter; } if ('mfa_level' in data) { /** * The required MFA level for this guild * @type {GuildMFALevel} */ this.mfaLevel = data.mfa_level; } if ('joined_at' in data) { /** * The timestamp the client user joined the guild at * @type {number} */ this.joinedTimestamp = Date.parse(data.joined_at); } if ('default_message_notifications' in data) { /** * The default message notification level of the guild * @type {GuildDefaultMessageNotifications} */ this.defaultMessageNotifications = data.default_message_notifications; } if ('system_channel_flags' in data) { /** * The value set for the guild's system channel flags * @type {Readonly<SystemChannelFlagsBitField>} */ this.systemChannelFlags = new SystemChannelFlagsBitField(data.system_channel_flags).freeze(); } if ('max_members' in data) { /** * The maximum amount of members the guild can have * @type {?number} */ this.maximumMembers = data.max_members; } else { this.maximumMembers ??= null; } if ('max_presences' in data) { /** * The maximum amount of presences the guild can have (this is `null` for all but the largest of guilds) * <info>You will need to fetch the guild using {@link BaseGuild#fetch} if you want to receive * this parameter</info> * @type {?number} */ this.maximumPresences = data.max_presences; } else { this.maximumPresences ??= null; } if ('max_video_channel_users' in data) { /** * The maximum amount of users allowed in a video channel. * @type {?number} */ this.maxVideoChannelUsers = data.max_video_channel_users; } else { this.maxVideoChannelUsers ??= null; } if ('max_stage_video_channel_users' in data) { /** * The maximum amount of users allowed in a stage video channel. * @type {?number} */ this.maxStageVideoChannelUsers = data.max_stage_video_channel_users; } else { this.maxStageVideoChannelUsers ??= null; } if ('approximate_member_count' in data) { /** * The approximate amount of members the guild has * <info>You will need to fetch the guild using {@link BaseGuild#fetch} if you want to receive * this parameter</info> * @type {?number} */ this.approximateMemberCount = data.approximate_member_count; } else { this.approximateMemberCount ??= null; } if ('approximate_presence_count' in data) { /** * The approximate amount of presences the guild has * <info>You will need to fetch the guild using {@link BaseGuild#fetch} if you want to receive * this parameter</info> * @type {?number} */ this.approximatePresenceCount = data.approximate_presence_count; } else { this.approximatePresenceCount ??= null; } /** * The use count of the vanity URL code of the guild, if any * <info>You will need to fetch this parameter using {@link Guild#fetchVanityData} if you want to receive it</info> * @type {?number} */ this.vanityURLUses ??= null; if ('rules_channel_id' in data) { /** * The rules channel's id for the guild * @type {?Snowflake} */ this.rulesChannelId = data.rules_channel_id; } if ('public_updates_channel_id' in data) { /** * The community updates channel's id for the guild * @type {?Snowflake} */ this.publicUpdatesChannelId = data.public_updates_channel_id; } if ('preferred_locale' in data) { /** * The preferred locale of the guild, defaults to `en-US` * @type {Locale} */ this.preferredLocale = data.preferred_locale; } if ('safety_alerts_channel_id' in data) { /** * The safety alerts channel's id for the guild * @type {?Snowflake} */ this.safetyAlertsChannelId = data.safety_alerts_channel_id; } else { this.safetyAlertsChannelId ??= null; } if (data.channels) { this.channels.cache.clear(); for (const rawChannel of data.channels) { this.client.channels._add(rawChannel, this); } } if (data.threads) { for (const rawThread of data.threads) { this.client.channels._add(rawThread, this); } } if (data.roles) { this.roles.cache.clear(); for (const role of data.roles) this.roles._add(role); } if (data.members) { this.members.cache.clear(); for (const guildUser of data.members) this.members._add(guildUser); } if ('owner_id' in data) { /** * The user id of this guild's owner * @type {Snowflake} */ this.ownerId = data.owner_id; } if (data.presences) { for (const presence of data.presences) { this.presences._add(Object.assign(presence, { guild: this })); } } if (data.stage_instances) { this.stageInstances.cache.clear(); for (const stageInstance of data.stage_instances) { this.stageInstances._add(stageInstance); } } if (data.guild_scheduled_events) { this.scheduledEvents.cache.clear(); for (const scheduledEvent of data.guild_scheduled_events) { this.scheduledEvents._add(scheduledEvent); } } if (data.voice_states) { this.voiceStates.cache.clear(); for (const voiceState of data.voice_states) { this.voiceStates._add(voiceState); } } if (!this.emojis) { /** * A manager of the emojis belonging to this guild * @type {GuildEmojiManager} */ this.emojis = new GuildEmojiManager(this); if (data.emojis) for (const emoji of data.emojis) this.emojis._add(emoji); } else if (data.emojis) { this.client.actions.GuildEmojisUpdate.handle({ guild_id: this.id, emojis: data.emojis, }); } if (!this.stickers) { /** * A manager of the stickers belonging to this guild * @type {GuildStickerManager} */ this.stickers = new GuildStickerManager(this); if (data.stickers) for (const sticker of data.stickers) this.stickers._add(sticker); } else if (data.stickers) { this.client.actions.GuildStickersUpdate.handle({ guild_id: this.id, stickers: data.stickers, }); } if ('incidents_data' in data) { /** * Incident actions of a guild. * @typedef {Object} IncidentActions * @property {?Date} invitesDisabledUntil When invites would be enabled again * @property {?Date} dmsDisabledUntil When direct messages would be enabled again * @property {?Date} dmSpamDetectedAt When direct message spam was detected * @property {?Date} raidDetectedAt When a raid was detected */ /** * The incidents data of this guild. * <info>You will need to fetch the guild using {@link BaseGuild#fetch} if you want to receive * this property.</info> * @type {?IncidentActions} */ this.incidentsData = data.incidents_data && _transformAPIIncidentsData(data.incidents_data); } else { this.incidentsData ??= null; } if (data.soundboard_sounds) { this.soundboardSounds.cache.clear(); for (const soundboardSound of data.soundboard_sounds) { this.soundboardSounds._add(soundboardSound); } } } /** * The time the client user joined the guild * @type {Date} * @readonly */ get joinedAt() { return new Date(this.joinedTimestamp); } /** * The URL to this guild's discovery splash image. * @param {ImageURLOptions} [options={}] Options for the image URL * @returns {?string} */ discoverySplashURL(options = {}) { return this.discoverySplash && this.client.rest.cdn.discoverySplash(this.id, this.discoverySplash, options); } /** * Fetches the owner of the guild. * If the member object isn't needed, use {@link Guild#ownerId} instead. * @param {BaseFetchOptions} [options] The options for fetching the member * @returns {Promise<GuildMember>} */ async fetchOwner(options) { if (!this.ownerId) { throw new DiscordjsError(ErrorCodes.FetchOwnerId, 'guild'); } const member = await this.members.fetch({ ...options, user: this.ownerId }); return member; } /** * AFK voice channel for this guild * @type {?VoiceChannel} * @readonly */ get afkChannel() { return this.client.channels.resolve(this.afkChannelId); } /** * System channel for this guild * @type {?TextChannel} * @readonly */ get systemChannel() { return this.client.channels.resolve(this.systemChannelId); } /** * Widget channel for this guild * @type {?(TextChannel|NewsChannel|VoiceChannel|StageChannel|ForumChannel|MediaChannel)} * @readonly */ get widgetChannel() { return this.client.channels.resolve(this.widgetChannelId); } /** * Rules channel for this guild * @type {?TextChannel} * @readonly */ get rulesChannel() { return this.client.channels.resolve(this.rulesChannelId); } /** * Public updates channel for this guild * @type {?TextChannel} * @readonly */ get publicUpdatesChannel() { return this.client.channels.resolve(this.publicUpdatesChannelId); } /** * Safety alerts channel for this guild * @type {?TextChannel} * @readonly */ get safetyAlertsChannel() { return this.client.channels.resolve(this.safetyAlertsChannelId); } /** * The maximum bitrate available for this guild * @type {number} * @readonly */ get maximumBitrate() { if (this.features.includes(GuildFeature.VIPRegions)) { return 384_000; } switch (this.premiumTier) { case GuildPremiumTier.Tier1: return 128_000; case GuildPremiumTier.Tier2: return 256_000; case GuildPremiumTier.Tier3: return 384_000; default: return 96_000; } } /** * Fetches a collection of integrations to this guild. * Resolves with a collection mapping integrations by their ids. * @returns {Promise<Collection<Snowflake|string, Integration>>} * @example * // Fetch integrations * guild.fetchIntegrations() * .then(integrations => console.log(`Fetched ${integrations.size} integrations`)) * .catch(console.error); */ async fetchIntegrations() { const data = await this.client.rest.get(Routes.guildIntegrations(this.id)); return data.reduce( (collection, integration) => collection.set(integration.id, new Integration(this.client, integration, this)), new Collection(), ); } /** * Fetches a collection of templates from this guild. * Resolves with a collection mapping templates by their codes. * @returns {Promise<Collection<string, GuildTemplate>>} */ async fetchTemplates() { const templates = await this.client.rest.get(Routes.guildTemplates(this.id)); return templates.reduce((col, data) => col.set(data.code, new GuildTemplate(this.client, data)), new Collection()); } /** * Fetches the welcome screen for this guild. * @returns {Promise<WelcomeScreen>} */ async fetchWelcomeScreen() { const data = await this.client.rest.get(Routes.guildWelcomeScreen(this.id)); return new WelcomeScreen(this, data); } /** * Creates a template for the guild. * @param {string} name The name for the template * @param {string} [description] The description for the template * @returns {Promise<GuildTemplate>} */ async createTemplate(name, description) { const data = await this.client.rest.post(Routes.guildTemplates(this.id), { body: { name, description } }); return new GuildTemplate(this.client, data); } /** * Obtains a guild preview for this guild from Discord. * @returns {Promise<GuildPreview>} */ async fetchPreview() { const data = await this.client.rest.get(Routes.guildPreview(this.id)); return new GuildPreview(this.client, data); } /** * An object containing information about a guild's vanity invite. * @typedef {Object} Vanity * @property {?string} code Vanity invite code * @property {number} uses How many times this invite has been used */ /** * Fetches the vanity URL invite object to this guild. * Resolves with an object containing the vanity URL invite code and the use count * @returns {Promise<Vanity>} * @example * // Fetch invite data * guild.fetchVanityData() * .then(res => { * console.log(`Vanity URL: https://discord.gg/${res.code} with ${res.uses} uses`); * }) * .catch(console.error); */ async fetchVanityData() { const data = await this.client.rest.get(Routes.guildVanityUrl(this.id)); this.vanityURLCode = data.code; this.vanityURLUses = data.uses; return data; } /** * Fetches all webhooks for the guild. * @returns {Promise<Collection<Snowflake, Webhook>>} * @example * // Fetch webhooks * guild.fetchWebhooks() * .then(webhooks => console.log(`Fetched ${webhooks.size} webhooks`)) * .catch(console.error); */ async fetchWebhooks() { const apiHooks = await this.client.rest.get(Routes.guildWebhooks(this.id)); const hooks = new Collection(); for (const hook of apiHooks) hooks.set(hook.id, new Webhook(this.client, hook)); return hooks; } /** * Fetches the guild widget data, requires the widget to be enabled. * @returns {Promise<Widget>} * @example * // Fetches the guild widget data * guild.fetchWidget() * .then(widget => console.log(`The widget shows ${widget.channels.size} channels`)) * .catch(console.error); */ fetchWidget() { return this.client.fetchGuildWidget(this.id); } /** * Data for the Guild Widget Settings object * @typedef {Object} GuildWidgetSettings * @property {boolean} enabled Whether the widget is enabled * @property {?(TextChannel|NewsChannel|VoiceChannel|StageChannel|ForumChannel|MediaChannel)} channel * The widget invite channel */ /** * The Guild Widget Settings object * @typedef {Object} GuildWidgetSettingsData * @property {boolean} enabled Whether the widget is enabled * @property {?(TextChannel|NewsChannel|VoiceChannel|StageChannel|ForumChannel|MediaChannel|Snowflake)} channel * The widget invite channel */ /** * Fetches the guild widget settings. * @returns {Promise<GuildWidgetSettings>} * @example * // Fetches the guild widget settings * guild.fetchWidgetSettings() * .then(widget => console.log(`The widget is ${widget.enabled ? 'enabled' : 'disabled'}`)) * .catch(console.error); */ async fetchWidgetSettings() { const data = await this.client.rest.get(Routes.guildWidgetSettings(this.id)); this.widgetEnabled = data.enabled; this.widgetChannelId = data.channel_id; return { enabled: data.enabled, channel: data.channel_id ? this.channels.cache.get(data.channel_id) : null, }; } /** * Returns a URL for the PNG widget of the guild. * @param {GuildWidgetStyle} [style] The style for the widget image * @returns {string} */ widgetImageURL(style) { return this.client.guilds.widgetImageURL(this.id, style); } /** * Options used to fetch audit logs. * @typedef {Object} GuildAuditLogsFetchOptions * @property {Snowflake|GuildAuditLogsEntry} [before] Consider only entries before this entry * @property {Snowflake|GuildAuditLogsEntry} [after] Consider only entries after this entry * @property {number} [limit] The number of entries to return * @property {UserResolvable} [user] Only return entries for actions made by this user * @property {?AuditLogEvent} [type] Only return entries for this action type */ /** * Fetches audit logs for this guild. * @param {GuildAuditLogsFetchOptions} [options={}] Options for fetching audit logs * @returns {Promise<GuildAuditLogs>} * @example * // Output audit log entries * guild.fetchAuditLogs() * .then(audit => console.log(audit.entries.first())) * .catch(console.error); */ async fetchAuditLogs({ before, after, limit, user, type } = {}) { const query = makeURLSearchParams({ before: before?.id ?? before, after: after?.id ?? after, limit, action_type: type, }); if (user) { const userId = this.client.users.resolveId(user); if (!userId) throw new DiscordjsTypeError(ErrorCodes.InvalidType, 'user', 'UserResolvable'); query.set('user_id', userId); } const data = await this.client.rest.get(Routes.guildAuditLog(this.id), { query }); return new GuildAuditLogs(this, data); } /** * Fetches the guild onboarding data for this guild. * @returns {Promise<GuildOnboarding>} */ async fetchOnboarding() { const data = await this.client.rest.get(Routes.guildOnboarding(this.id)); return new GuildOnboarding(this.client, data); } /** * The data for editing a guild. * @typedef {Object} GuildEditOptions * @property {string} [name] The name of the guild * @property {?GuildVerificationLevel} [verificationLevel] The verification level of the guild * @property {?GuildDefaultMessageNotifications} [defaultMessageNotifications] The default message * notification level of the guild * @property {?GuildExplicitContentFilter} [explicitContentFilter] The level of the explicit content filter * @property {?VoiceChannelResolvable} [afkChannel] The AFK channel of the guild * @property {number} [afkTimeout] The AFK timeout of the guild * @property {?(BufferResolvable|Base64Resolvable)} [icon] The icon of the guild * @property {GuildMemberResolvable} [owner] The owner of the guild * @property {?(BufferResolvable|Base64Resolvable)} [splash] The invite splash image of the guild * @property {?(BufferResolvable|Base64Resolvable)} [discoverySplash] The discovery splash image of the guild * @property {?(BufferResolvable|Base64Resolvable)} [banner] The banner of the guild * @property {?TextChannelResolvable} [systemChannel] The system channel of the guild * @property {SystemChannelFlagsResolvable} [systemChannelFlags] The system channel flags of the guild * @property {?TextChannelResolvable} [rulesChannel] The rules channel of the guild * @property {?TextChannelResolvable} [publicUpdatesChannel] The community updates channel of the guild * @property {?TextChannelResolvable} [safetyAlertsChannel] The safety alerts channel of the guild * @property {?string} [preferredLocale] The preferred locale of the guild * @property {GuildFeature[]} [features] The features of the guild * @property {?string} [description] The discovery description of the guild * @property {boolean} [premiumProgressBarEnabled] Whether the guild's premium progress bar is enabled * @property {string} [reason] Reason for editing this guild */ /** * Data that can be resolved to a Text Channel object. This can be: * * A TextChannel * * A Snowflake * @typedef {TextChannel|Snowflake} TextChannelResolvable */ /** * Data that can be resolved to a Voice Channel object. This can be: * * A VoiceChannel * * A Snowflake * @typedef {VoiceChannel|Snowflake} VoiceChannelResolvable */ /** * Updates the guild with new information - e.g. a new name. * @param {GuildEditOptions} options The options to provide * @returns {Promise<Guild>} * @example * // Set the guild name * guild.edit({ * name: 'Discord Guild', * }) * .then(updated => console.log(`New guild name ${updated}`)) * .catch(console.error); */ async edit({ verificationLevel, defaultMessageNotifications, explicitContentFilter, afkChannel, afkTimeout, icon, owner, splash, discoverySplash, banner, systemChannel, systemChannelFlags, rulesChannel, publicUpdatesChannel, preferredLocale, premiumProgressBarEnabled, safetyAlertsChannel, ...options }) { const data = await this.client.rest.patch(Routes.guild(this.id), { body: { ...options, verification_level: verificationLevel, default_message_notifications: defaultMessageNotifications, explicit_content_filter: explicitContentFilter, afk_channel_id: afkChannel && this.client.channels.resolveId(afkChannel), afk_timeout: afkTimeout, icon: icon && (await resolveImage(icon)), owner_id: owner && this.client.users.resolveId(owner), splash: splash && (await resolveImage(splash)), discovery_splash: discoverySplash && (await resolveImage(discoverySplash)), banner: banner && (await resolveImage(banner)), system_channel_id: systemChannel && this.client.channels.resolveId(systemChannel), system_channel_flags: systemChannelFlags === undefined ? undefined : SystemChannelFlagsBitField.resolve(systemChannelFlags), rules_channel_id: rulesChannel && this.client.channels.resolveId(rulesChannel), public_updates_channel_id: publicUpdatesChannel && this.client.channels.resolveId(publicUpdatesChannel), preferred_locale: preferredLocale, premium_progress_bar_enabled: premiumProgressBarEnabled, safety_alerts_channel_id: safetyAlertsChannel && this.client.channels.resolveId(safetyAlertsChannel), }, reason: options.reason, }); return this.client.actions.GuildUpdate.handle(data).updated; } /** * Options used to edit the guild onboarding. * @typedef {Object} GuildOnboardingEditOptions * @property {GuildOnboardingPromptData[]|Collection<Snowflake, GuildOnboardingPrompt>} [prompts] * The prompts shown during onboarding and in customize community * @property {ChannelResolvable[]|Collection<Snowflake, GuildChannel>} [defaultChannels] * The channels that new members get opted into automatically * @property {boolean} [enabled] Whether the onboarding is enabled * @property {GuildOnboardingMode} [mode] The mode to edit the guild onboarding with * @property {string} [reason] The reason for editing the guild onboarding */ /** * Data for editing a guild onboarding prompt. * @typedef {Object} GuildOnboardingPromptData * @property {Snowflake} [id] The id of the prompt * @property {string} title The title for the prompt * @property {boolean} [singleSelect] Whether users are limited to selecting one option for the prompt * @property {boolean} [required] Whether the prompt is required before a user completes the onboarding flow * @property {boolean} [inOnboarding] Whether the prompt is present in the onboarding flow * @property {GuildOnboardingPromptType} [type] The type of the prompt * @property {GuildOnboardingPromptOptionData[]|Collection<Snowflake, GuildOnboardingPrompt>} options * The options available within the prompt */ /** * Data for editing a guild onboarding prompt option. * @typedef {Object} GuildOnboardingPromptOptionData * @property {?Snowflake} [id] The id of the option * @property {ChannelResolvable[]|Collection<Snowflake, GuildChannel>} [channels] * The channels a member is added to when the option is selected * @property {RoleResolvable[]|Collection<Snowflake, Role>} [roles] * The roles assigned to a member when the option is selected * @property {string} title The title of the option * @property {?string} [description] The description of the option * @property {?(EmojiIdentifierResolvable|Emoji)} [emoji] The emoji of the option */ /** * Edits the guild onboarding data for this guild. * @param {GuildOnboardingEditOptions} options The options to provide * @returns {Promise<GuildOnboarding>} */ async editOnboarding(options) { const newData = await this.client.rest.put(Routes.guildOnboarding(this.id), { body: { prompts: options.prompts?.map(prompt => ({ // Currently, the prompt ids are required even for new ones (which won't be used) id: prompt.id ?? DiscordSnowflake.generate().toString(), title: prompt.title, single_select: prompt.singleSelect, required: prompt.required, in_onboarding: prompt.inOnboarding, type: prompt.type, options: prompt.options.map(option => { const emoji = resolvePartialEmoji(option.emoji); return { id: option.id, channel_ids: option.channels?.map(channel => this.channels.resolveId(channel)), role_ids: option.roles?.map(role => this.roles.resolveId(role)), title: option.title, description: option.description, emoji_animated: emoji?.animated, emoji_id: emoji?.id, emoji_name: emoji?.name, }; }), })), default_channel_ids: options.defaultChannels?.map(channel => this.channels.resolveId(channel)), enabled: options.enabled, mode: options.mode, }, reason: options.reason, }); return new GuildOnboarding(this.client, newData); } /** * Welcome channel data * @typedef {Object} WelcomeChannelData * @property {string} description The description to show for this welcome channel * @property {TextChannel|NewsChannel|ForumChannel|MediaChannel|Snowflake} channel * The channel to link for this welcome channel * @property {EmojiIdentifierResolvable} [emoji] The emoji to display for this welcome channel */ /** * Welcome screen edit data * @typedef {Object} WelcomeScreenEditOptions * @property {boolean} [enabled] Whether the welcome screen is enabled * @property {string} [description] The description for the welcome screen * @property {WelcomeChannelData[]} [welcomeChannels] The welcome channel data for the welcome screen */ /** * Data that can be resolved to a GuildTextChannel object. This can be: * * A TextChannel * * A NewsChannel * * A Snowflake * @typedef {TextChannel|NewsChannel|Snowflake} GuildTextChannelResolvable */ /** * Data that can be resolved to a GuildVoiceChannel object. This can be: * * A VoiceChannel * * A StageChannel * * A Snowflake * @typedef {VoiceChannel|StageChannel|Snowflake} GuildVoiceChannelResolvable */ /** * Updates the guild's welcome screen * @param {WelcomeScreenEditOptions} options The options to provide * @returns {Promise<WelcomeScreen>} * @example * guild.editWelcomeScreen({ * description: 'Hello World', * enabled: true, * welcomeChannels: [ * { * description: 'foobar', * channel: '222197033908436994', * } * ], * }) */ async editWelcomeScreen(options) { const { enabled, description, welcomeChannels } = options; const welcome_channels = welcomeChannels?.map(welcomeChannelData => { const emoji = this.emojis.resolve(welcomeChannelData.emoji); return { emoji_id: emoji?.id, emoji_name: emoji?.name ?? welcomeChannelData.emoji, channel_id: this.channels.resolveId(welcomeChannelData.channel), description: welcomeChannelData.description, }; }); const patchData = await this.client.rest.patch(Routes.guildWelcomeScreen(this.id), { body: { welcome_channels, description, enabled, }, }); return new WelcomeScreen(this, patchData); } /** * Edits the level of the explicit content filter. * @param {?GuildExplicitContentFilter} explicitContentFilter The new level of the explicit content filter * @param {string} [reason] Reason for changing the level of the guild's explicit content filter * @returns {Promise<Guild>} */ setExplicitContentFilter(explicitContentFilter, reason) { return this.edit({ explicitContentFilter, reason }); } /** * Edits the setting of the default message notifications of the guild. * @param {?GuildDefaultMessageNotifications} defaultMessageNotifications * The new default message notification level of the guild * @param {string} [reason] Reason for changing the setting of the default message notifications * @returns {Promise<Guild>} */ setDefaultMessageNotifications(defaultMessageNotifications, reason) { return this.edit({ defaultMessageNotifications, reason }); } /** * Edits the flags of the default message notifications of the guild. * @param {SystemChannelFlagsResolvable} systemChannelFlags The new flags for the default message notifications * @param {string} [reason] Reason for changing the flags of the default message notifications * @returns {Promise<Guild>} */ setSystemChannelFlags(systemChannelFlags, reason) { return this.edit({ systemChannelFlags, reason }); } /** * Edits the name of the guild. * @param {string} name The new name of the guild * @param {string} [reason] Reason for changing the guild's name * @returns {Promise<Guild>} * @example * // Edit the guild name * guild.setName('Discord Guild') * .then(updated => console.log(`Updated guild name to ${updated.name}`)) * .catch(console.error); */ setName(name, reason) { return this.edit({ name, reason }); } /** * Edits the verification level of the guild. * @param {?GuildVerificationLevel} verificationLevel The new verification level of the guild * @param {string} [reason] Reason for changing the guild's verification level * @returns {Promise<Guild>} * @example * // Edit the guild verification level * guild.setVerificationLevel(1) * .then(updated => console.log(`Updated guild verification level to ${guild.verificationLevel}`)) * .catch(console.error); */ setVerificationLevel(verificationLevel, reason) { return this.edit({ verificationLevel, reason }); } /** * Edits the AFK channel of the guild. * @param {?VoiceChannelResolvable} afkChannel The new AFK channel * @param {string} [reason] Reason for changing the guild's AFK channel * @returns {Promise<Guild>} * @example * // Edit the guild AFK channel * guild.setAFKChannel(channel) * .then(updated => console.log(`Updated guild AFK channel to ${guild.afkChannel.name}`)) * .catch(console.error); */ setAFKChannel(afkChannel, reason) { return this.edit({ afkChannel, reason }); } /** * Edits the system channel of the guild. * @param {?TextChannelResolvable} systemChannel The new system channel * @param {string} [reason] Reason for changing the guild's system channel * @returns {Promise<Guild>} * @example * // Edit the guild system channel * guild.setSystemChannel(channel) * .then(updated => console.log(`Updated guild system channel to ${guild.systemChannel.name}`)) * .catch(console.error); */ setSystemChannel(systemChannel, reason) { return this.edit({ systemChannel, reason }); } /** * Edits the AFK timeout of the guild. * @param {number} afkTimeout The time in seconds that a user must be idle to be considered AFK * @param {string} [reason] Reason for changing the guild's AFK timeout * @returns {Promise<Guild>} * @example * // Edit the guild AFK channel * guild.setAFKTimeout(60) * .then(updated => console.log(`Updated guild AFK timeout to ${guild.afkTimeout}`)) * .catch(console.error); */ setAFKTimeout(afkTimeout, reason) { return this.edit({ afkTimeout, reason }); } /** * Sets a new guild icon. * @param {?(Base64Resolvable|BufferResolvable)} icon The new icon of the guild * @param {string} [reason] Reason for changing the guild's icon * @returns {Promise<Guild>} * @example * // Edit the guild icon * guild.setIcon('./icon.png') * .then(updated => console.log('Updated the guild icon')) * .catch(console.error); */ setIcon(icon, reason) { return this.edit({ icon, reason }); } /** * Sets a new owner of the guild. * @param {GuildMemberResolvable} owner The new owner of the guild * @param {string} [reason] Reason for setting the new owner * @returns {Promise<Guild>} * @example * // Edit the guild owner * guild.setOwner(guild.members.cache.first()) * .then(guild => guild.fetchOwner()) * .then(owner => console.log(`Updated the guild owner to ${owner.displayName}`)) * .catch(console.error); */ setOwner(owner, reason) { return this.edit({ owner, reason }); } /** * Sets a new guild invite splash image. * @param {?(Base64Resolvable|BufferResolvable)} splash The new invite splash image of the guild * @param {string} [reason] Reason for changing the guild's invite splash image * @returns {Promise<Guild>} * @example * // Edit the guild splash * guild.setSplash('./splash.png') * .then(updated => console.log('Updated the guild splash')) * .catch(console.error); */ setSplash(splash, reason) { return this.edit({ splash, reason }); } /** * Sets a new guild discovery splash image. * @param {?(Base64Resolvable|BufferResolvable)} discoverySplash The new discovery splash image of the guild * @param {string} [reason] Reason for changing the guild's discovery splash image * @returns {Promise<Guild>} * @example * // Edit the guild discovery splash * guild.setDiscoverySplash('./discoverysplash.png') * .then(updated => console.log('Updated the guild discovery splash')) * .catch(console.error); */ setDiscoverySplash(discoverySplash, reason) { return this.edit({ discoverySplash, reason }); } /** * Sets a new guild banner. * @param {?(Base64Resolvable|BufferResolvable)} banner The new banner of the guild * @param {string} [reason] Reason for changing the guild's banner * @returns {Promise<Guild>} * @example * guild.setBanner('./banner.png') * .then(updated => console.log('Updated the guild banner')) * .catch(console.error); */ setBanner(banner, reason) { return this.edit({ banner, reason }); } /** * Edits the rules channel of the guild. * @param {?TextChannelResolvable} rulesChannel The new rules channel * @param {string} [reason] Reason for changing the guild's rules channel * @returns {Promise<Guild>} * @example * // Edit the guild rules channel * guild.setRulesChannel(channel) * .then(updated => console.log(`Updated guild rules channel to ${guild.rulesChannel.name}`)) * .catch(console.error); */ setRulesChannel(rulesChannel, reason) { return this.edit({ rulesChannel, reason }); } /** * Edits the community updates channel of the guild. * @param {?TextChannelResolvable} publicUpdatesChannel The new community updates channel * @param {string} [reason] Reason for changing the guild's community updates channel * @returns {Promise<Guild>} * @example * // Edit the guild community updates channel * guild.setPublicUpdatesChannel(channel) * .then(updated => console.log(`Updated guild community updates channel to ${guild.publicUpdatesChannel.name}`)) * .catch(console.error); */ setPublicUpdatesChannel(publicUpdatesChannel, reason) { return this.edit({ publicUpdatesChannel, reason }); } /** * Edits the preferred locale of the guild. * @param {?Locale} preferredLocale The new preferred locale of the guild * @param {string} [reason] Reason for changing the guild's preferred locale * @returns {Promise<Guild>} * @example * // Edit the guild preferred locale * guild.setPreferredLocale('en-US') * .then(updated => console.log(`Updated guild preferred locale to ${guild.preferredLocale}`)) * .catch(console.error); */ setPreferredLocale(preferredLocale, reason) { return this.edit({ preferredLocale, reason }); } /** * Edits the enabled state of the guild's premium progress bar * @param {boolean} [enabled=true] The new enabled state of the guild's premium progress bar * @param {string} [reason] Reason for changing the state of the guild's premium progress bar * @returns {Promise<Guild>} */ setPremiumProgressBarEnabled(enabled = true, reason) { return this.edit({ premiumProgressBarEnabled: enabled, reason }); } /** * Edits the safety alerts channel of the guild. * @param {?TextChannelResolvable} safetyAlertsChannel The new safety alerts channel * @param {string} [reason] Reason for changing the guild's safety alerts channel * @returns {Promise<Guild>} * @example * // Edit the guild safety alerts channel * guild.setSafetyAlertsChannel(channel) * .then(updated => console.log(`Updated guild safety alerts channel to ${updated.safetyAlertsChannel.name}`)) * .catch(console.error); */ setSafetyAlertsChannel(safetyAlertsChannel, reason) { return this.edit({ safetyAlertsChannel, reason }); } /** * Edits the guild's widget settings. * @param {GuildWidgetSettingsData} settings The widget settings for the guild * @param {string} [reason] Reason for changing the guild's widget settings * @returns {Promise<Guild>} */ async setWidgetSettings(settings, reason) { await this.client.rest.patch(Routes.guildWidgetSettings(this.id), { body: { enabled: settings.enabled, channel_id: this.channels.resolveId(settings.channel), }, reason, }); return this; } /** * Sets the guild's MFA level * <info>An elevated MFA level requires guild moderators to have 2FA enabled.</info> * @param {GuildMFALevel} level The MFA level * @param {string} [reason] Reason for changing the guild's MFA level * @returns {Promise<Guild>} * @example * // Set the MFA level of the guild to Elevated * guild.setMFALevel(GuildMFALevel.Elevated) * .then(guild => console.log("Set guild's MFA level to Elevated")) * .catch(console.error); */ async setMFALevel(level, reason) { await this.client.rest.post(Routes.guildMFA(this.id), { body: { level, }, reason, }); return this; } /** * Leaves the guild. * @returns {Promise<Guild>} * @example * // Leave a guild * guild.leave() * .then(guild => console.log(`Left the guild: ${guild.name}`)) * .catch(console.error); */ async leave() { if (this.ownerId === this.client.user.id) throw new DiscordjsError(ErrorCodes.GuildOwned); await this.client.rest.delete(Routes.userGuild(this.id)); return this; } /** * Deletes the guild. * @returns {Promise<Guild>} * @example * // Delete a guild * guild.delete() * .then(guild => console.log(`Deleted the guild ${guild}`)) * .catch(console.error); */ async delete() { await this.client.rest.delete(Routes.guild(this.id)); return this; } /** * Sets whether this guild's invites are disabled. * @param {boolean} [disabled=true] Whether the invites are disabled * @returns {Promise<Guild>} */ async disableInvites(disabled = true) { const features = this.features.filter(feature => feature !== GuildFeature.InvitesDisabled); if (disabled) features.push(GuildFeature.InvitesDisabled); return this.edit({ features }); } /** * Sets the incident actions for a guild. * @param {IncidentActionsEditOptions} incidentActions The incident actions to set * @returns {Promise<IncidentActions>} */ async setIncidentActions(incidentActions) { return this.client.guilds.setIncidentActions(this.id, incidentActions); } /** * Whether this guild equals another guild. It compares all properties, so for most operations * it is advisable to just compare `guild.id === guild2.id` as it is much faster and is often * what most users need. * @param {Guild} guild The guild to compare with * @returns {boolean} */ equals(guild) { return ( guild && guild instanceof this.constructor && this.id === guild.id && this.available === guild.available && this.splash === guild.splash && this.discoverySplash === guild.discoverySplash && this.name === guild.name && this.memberCount === guild.memberCount && this.large === guild.large && this.icon === guild.icon && this.ownerId === guild.ownerId && this.verificationLevel === guild.verificationLevel && (this.features === guild.features || (this.features.length === guild.features.length && this.features.every((feat, i) => feat === guild.features[i]))) ); } toJSON() { const json = super.toJSON({ available: false, createdTimestamp: true, nameAcronym: true, presences: false, voiceStates: false, }); json.iconURL = this.iconURL(); json.splashURL = this.splashURL(); json.discoverySplashURL = this.discoverySplashURL(); json.bannerURL = this.bannerURL(); return json; } /** * The voice state adapter for this guild that can be used with `@discordjs/voice` to play audio in voice * and stage channels. * @type {Function} * @readonly */ get voiceAdapterCreator() { return methods => { this.client.voice.adapters.set(this.id, methods); return { sendPayload: data => { if (this.shard.status !== Status.Ready) return false; this.shard.send(data); return true; }, destroy: () => { this.client.voice.adapters.delete(this.id); }, }; }; } /** * Creates a collection of this guild's roles, sorted by their position and ids. * @returns {Collection<Snowflake, Role>} * @private */ _sortedRoles() { return discordSort(this.roles.cache); } /** * Creates a collection of this guild's or a specific category's channels, sorted by their position and ids. * @param {GuildChannel} [channel] Category to get the channels of * @returns {Collection<Snowflake, GuildChannel>} * @private */ _sortedChannels(channel) { const channelIsCategory = channel.type === ChannelType.GuildCategory; const types = getSortableGroupTypes(channel.type); return discordSort( this.channels.cache.filter( ({ parentId, type }) => types.includes(type) && (channelIsCategory || parentId === channel.parentId), ), ); } } exports.Guild = Guild; node_modules/discord.js/src/structures/StringSelectMenuBuilder.js 0000664 00000004656 15114741631 0021415 0 ustar 00 'use strict'; const { SelectMenuBuilder: BuildersSelectMenu, normalizeArray } = require('@discordjs/builders'); const { isJSONEncodable } = require('@discordjs/util'); const { toSnakeCase } = require('../util/Transformers'); const { resolvePartialEmoji } = require('../util/Util'); /** * Class used to build select menu components to be sent through the API * @extends {BuildersSelectMenu} */ class StringSelectMenuBuilder extends BuildersSelectMenu { constructor({ options, ...data } = {}) { super( toSnakeCase({ ...data, options: options?.map(({ emoji, ...option }) => ({ ...option, emoji: emoji && typeof emoji === 'string' ? resolvePartialEmoji(emoji) : emoji, })), }), ); } /** * Normalizes a select menu option emoji * @param {SelectMenuOptionData|APISelectMenuOption} selectMenuOption The option to normalize * @returns {SelectMenuOptionBuilder|APISelectMenuOption} * @private */ static normalizeEmoji(selectMenuOption) { if (isJSONEncodable(selectMenuOption)) { return selectMenuOption; } const { emoji, ...option } = selectMenuOption; return { ...option, emoji: typeof emoji === 'string' ? resolvePartialEmoji(emoji) : emoji, }; } /** * Adds options to this select menu * @param {RestOrArray<APISelectMenuOption>} options The options to add to this select menu * @returns {StringSelectMenuBuilder} */ addOptions(...options) { return super.addOptions(normalizeArray(options).map(option => StringSelectMenuBuilder.normalizeEmoji(option))); } /** * Sets the options on this select menu * @param {RestOrArray<APISelectMenuOption>} options The options to set on this select menu * @returns {StringSelectMenuBuilder} */ setOptions(...options) { return super.setOptions(normalizeArray(options).map(option => StringSelectMenuBuilder.normalizeEmoji(option))); } /** * Creates a new select menu builder from json data * @param {StringSelectMenuBuilder|StringSelectMenuComponent|APIStringSelectComponent} other The other data * @returns {StringSelectMenuBuilder} */ static from(other) { if (isJSONEncodable(other)) { return new this(other.toJSON()); } return new this(other); } } module.exports = StringSelectMenuBuilder; /** * @external BuildersSelectMenu * @see {@link https://discord.js.org/docs/packages/builders/stable/StringSelectMenuBuilder:Class} */ node_modules/discord.js/src/structures/ButtonComponent.js 0000664 00000002133 15114741631 0017775 0 ustar 00 'use strict'; const Component = require('./Component'); /** * Represents a button component * @extends {Component} */ class ButtonComponent extends Component { /** * The style of this button * @type {ButtonStyle} * @readonly */ get style() { return this.data.style; } /** * The label of this button * @type {?string} * @readonly */ get label() { return this.data.label ?? null; } /** * The emoji used in this button * @type {?APIMessageComponentEmoji} * @readonly */ get emoji() { return this.data.emoji ?? null; } /** * Whether this button is disabled * @type {boolean} * @readonly */ get disabled() { return this.data.disabled ?? false; } /** * The custom id of this button (only defined on non-link buttons) * @type {?string} * @readonly */ get customId() { return this.data.custom_id ?? null; } /** * The URL of this button (only defined on link buttons) * @type {?string} * @readonly */ get url() { return this.data.url ?? null; } } module.exports = ButtonComponent; node_modules/discord.js/src/structures/Role.js 0000664 00000034244 15114741631 0015550 0 ustar 00 'use strict'; const { roleMention } = require('@discordjs/formatters'); const { DiscordSnowflake } = require('@sapphire/snowflake'); const { PermissionFlagsBits } = require('discord-api-types/v10'); const Base = require('./Base'); const { DiscordjsError, ErrorCodes } = require('../errors'); const PermissionsBitField = require('../util/PermissionsBitField'); const RoleFlagsBitField = require('../util/RoleFlagsBitField'); /** * Represents a role on Discord. * @extends {Base} */ class Role extends Base { constructor(client, data, guild) { super(client); /** * The guild that the role belongs to * @type {Guild} */ this.guild = guild; /** * The icon hash of the role * @type {?string} */ this.icon = null; /** * The unicode emoji for the role * @type {?string} */ this.unicodeEmoji = null; if (data) this._patch(data); } _patch(data) { /** * The role's id (unique to the guild it is part of) * @type {Snowflake} */ this.id = data.id; if ('name' in data) { /** * The name of the role * @type {string} */ this.name = data.name; } if ('color' in data) { /** * The base 10 color of the role * @type {number} */ this.color = data.color; } if ('hoist' in data) { /** * If true, users that are part of this role will appear in a separate category in the users list * @type {boolean} */ this.hoist = data.hoist; } if ('position' in data) { /** * The raw position of the role from the API * @type {number} */ this.rawPosition = data.position; } if ('permissions' in data) { /** * The permissions of the role * @type {Readonly<PermissionsBitField>} */ this.permissions = new PermissionsBitField(BigInt(data.permissions)).freeze(); } if ('managed' in data) { /** * Whether or not the role is managed by an external service * @type {boolean} */ this.managed = data.managed; } if ('mentionable' in data) { /** * Whether or not the role can be mentioned by anyone * @type {boolean} */ this.mentionable = data.mentionable; } if ('icon' in data) this.icon = data.icon; if ('unicode_emoji' in data) this.unicodeEmoji = data.unicode_emoji; if ('flags' in data) { /** * The flags of this role * @type {Readonly<RoleFlagsBitField>} */ this.flags = new RoleFlagsBitField(data.flags).freeze(); } else { this.flags ??= new RoleFlagsBitField().freeze(); } /** * The tags this role has * @type {?Object} * @property {Snowflake} [botId] The id of the bot this role belongs to * @property {Snowflake|string} [integrationId] The id of the integration this role belongs to * @property {true} [premiumSubscriberRole] Whether this is the guild's premium subscription role * @property {Snowflake} [subscriptionListingId] The id of this role's subscription SKU and listing * @property {true} [availableForPurchase] Whether this role is available for purchase * @property {true} [guildConnections] Whether this role is a guild's linked role */ this.tags = data.tags ? {} : null; if (data.tags) { if ('bot_id' in data.tags) { this.tags.botId = data.tags.bot_id; } if ('integration_id' in data.tags) { this.tags.integrationId = data.tags.integration_id; } if ('premium_subscriber' in data.tags) { this.tags.premiumSubscriberRole = true; } if ('subscription_listing_id' in data.tags) { this.tags.subscriptionListingId = data.tags.subscription_listing_id; } if ('available_for_purchase' in data.tags) { this.tags.availableForPurchase = true; } if ('guild_connections' in data.tags) { this.tags.guildConnections = true; } } } /** * The timestamp the role was created at * @type {number} * @readonly */ get createdTimestamp() { return DiscordSnowflake.timestampFrom(this.id); } /** * The time the role was created at * @type {Date} * @readonly */ get createdAt() { return new Date(this.createdTimestamp); } /** * The hexadecimal version of the role color, with a leading hashtag * @type {string} * @readonly */ get hexColor() { return `#${this.color.toString(16).padStart(6, '0')}`; } /** * The cached guild members that have this role * @type {Collection<Snowflake, GuildMember>} * @readonly */ get members() { return this.id === this.guild.id ? this.guild.members.cache.clone() : this.guild.members.cache.filter(member => member._roles.includes(this.id)); } /** * Whether the role is editable by the client user * @type {boolean} * @readonly */ get editable() { if (this.managed) return false; const clientMember = this.guild.members.resolve(this.client.user); if (!clientMember.permissions.has(PermissionFlagsBits.ManageRoles)) return false; return clientMember.roles.highest.comparePositionTo(this) > 0; } /** * The position of the role in the role manager * @type {number} * @readonly */ get position() { return this.guild.roles.cache.reduce( (acc, role) => acc + (this.rawPosition === role.rawPosition ? BigInt(this.id) < BigInt(role.id) : this.rawPosition > role.rawPosition), 0, ); } /** * Compares this role's position to another role's. * @param {RoleResolvable} role Role to compare to this one * @returns {number} Negative number if this role's position is lower (other role's is higher), * positive number if this one is higher (other's is lower), 0 if equal * @example * // Compare the position of a role to another * const roleCompare = role.comparePositionTo(otherRole); * if (roleCompare >= 1) console.log(`${role.name} is higher than ${otherRole.name}`); */ comparePositionTo(role) { return this.guild.roles.comparePositions(this, role); } /** * The data for a role. * @typedef {Object} RoleData * @property {string} [name] The name of the role * @property {ColorResolvable} [color] The color of the role, either a hex string or a base 10 number * @property {boolean} [hoist] Whether or not the role should be hoisted * @property {number} [position] The position of the role * @property {PermissionResolvable} [permissions] The permissions of the role * @property {boolean} [mentionable] Whether or not the role should be mentionable * @property {?(BufferResolvable|Base64Resolvable|EmojiResolvable)} [icon] The icon for the role * <warn>The `EmojiResolvable` should belong to the same guild as the role. * If not, pass the emoji's URL directly</warn> * @property {?string} [unicodeEmoji] The unicode emoji for the role */ /** * Edits the role. * @param {RoleEditOptions} options The options to provide * @returns {Promise<Role>} * @example * // Edit a role * role.edit({ name: 'new role' }) * .then(updated => console.log(`Edited role name to ${updated.name}`)) * .catch(console.error); */ edit(options) { return this.guild.roles.edit(this, options); } /** * Returns `channel.permissionsFor(role)`. Returns permissions for a role in a guild channel, * taking into account permission overwrites. * @param {GuildChannel|Snowflake} channel The guild channel to use as context * @param {boolean} [checkAdmin=true] Whether having the {@link PermissionFlagsBits.Administrator} permission * will return all permissions * @returns {Readonly<PermissionsBitField>} */ permissionsIn(channel, checkAdmin = true) { channel = this.guild.channels.resolve(channel); if (!channel) throw new DiscordjsError(ErrorCodes.GuildChannelResolve); return channel.rolePermissions(this, checkAdmin); } /** * Sets a new name for the role. * @param {string} name The new name of the role * @param {string} [reason] Reason for changing the role's name * @returns {Promise<Role>} * @example * // Set the name of the role * role.setName('new role') * .then(updated => console.log(`Updated role name to ${updated.name}`)) * .catch(console.error); */ setName(name, reason) { return this.edit({ name, reason }); } /** * Sets a new color for the role. * @param {ColorResolvable} color The color of the role * @param {string} [reason] Reason for changing the role's color * @returns {Promise<Role>} * @example * // Set the color of a role * role.setColor('#FF0000') * .then(updated => console.log(`Set color of role to ${updated.color}`)) * .catch(console.error); */ setColor(color, reason) { return this.edit({ color, reason }); } /** * Sets whether or not the role should be hoisted. * @param {boolean} [hoist=true] Whether or not to hoist the role * @param {string} [reason] Reason for setting whether or not the role should be hoisted * @returns {Promise<Role>} * @example * // Set the hoist of the role * role.setHoist(true) * .then(updated => console.log(`Role hoisted: ${updated.hoist}`)) * .catch(console.error); */ setHoist(hoist = true, reason) { return this.edit({ hoist, reason }); } /** * Sets the permissions of the role. * @param {PermissionResolvable} permissions The permissions of the role * @param {string} [reason] Reason for changing the role's permissions * @returns {Promise<Role>} * @example * // Set the permissions of the role * role.setPermissions([PermissionFlagsBits.KickMembers, PermissionFlagsBits.BanMembers]) * .then(updated => console.log(`Updated permissions to ${updated.permissions.bitfield}`)) * .catch(console.error); * @example * // Remove all permissions from a role * role.setPermissions(0n) * .then(updated => console.log(`Updated permissions to ${updated.permissions.bitfield}`)) * .catch(console.error); */ setPermissions(permissions, reason) { return this.edit({ permissions, reason }); } /** * Sets whether this role is mentionable. * @param {boolean} [mentionable=true] Whether this role should be mentionable * @param {string} [reason] Reason for setting whether or not this role should be mentionable * @returns {Promise<Role>} * @example * // Make the role mentionable * role.setMentionable(true) * .then(updated => console.log(`Role updated ${updated.name}`)) * .catch(console.error); */ setMentionable(mentionable = true, reason) { return this.edit({ mentionable, reason }); } /** * Sets a new icon for the role. * @param {?(BufferResolvable|Base64Resolvable|EmojiResolvable)} icon The icon for the role * <warn>The `EmojiResolvable` should belong to the same guild as the role. * If not, pass the emoji's URL directly</warn> * @param {string} [reason] Reason for changing the role's icon * @returns {Promise<Role>} */ setIcon(icon, reason) { return this.edit({ icon, reason }); } /** * Sets a new unicode emoji for the role. * @param {?string} unicodeEmoji The new unicode emoji for the role * @param {string} [reason] Reason for changing the role's unicode emoji * @returns {Promise<Role>} * @example * // Set a new unicode emoji for the role * role.setUnicodeEmoji('🤖') * .then(updated => console.log(`Set unicode emoji for the role to ${updated.unicodeEmoji}`)) * .catch(console.error); */ setUnicodeEmoji(unicodeEmoji, reason) { return this.edit({ unicodeEmoji, reason }); } /** * Options used to set the position of a role. * @typedef {Object} SetRolePositionOptions * @property {boolean} [relative=false] Whether to change the position relative to its current value or not * @property {string} [reason] The reason for changing the position */ /** * Sets the new position of the role. * @param {number} position The new position for the role * @param {SetRolePositionOptions} [options] Options for setting the position * @returns {Promise<Role>} * @example * // Set the position of the role * role.setPosition(1) * .then(updated => console.log(`Role position: ${updated.position}`)) * .catch(console.error); */ setPosition(position, options = {}) { return this.guild.roles.setPosition(this, position, options); } /** * Deletes the role. * @param {string} [reason] Reason for deleting this role * @returns {Promise<Role>} * @example * // Delete a role * role.delete('The role needed to go') * .then(deleted => console.log(`Deleted role ${deleted.name}`)) * .catch(console.error); */ async delete(reason) { await this.guild.roles.delete(this.id, reason); return this; } /** * A link to the role's icon * @param {ImageURLOptions} [options={}] Options for the image URL * @returns {?string} */ iconURL(options = {}) { return this.icon && this.client.rest.cdn.roleIcon(this.id, this.icon, options); } /** * Whether this role equals another role. It compares all properties, so for most operations * it is advisable to just compare `role.id === role2.id` as it is much faster and is often * what most users need. * @param {Role} role Role to compare with * @returns {boolean} */ equals(role) { return ( role && this.id === role.id && this.name === role.name && this.color === role.color && this.hoist === role.hoist && this.position === role.position && this.permissions.bitfield === role.permissions.bitfield && this.managed === role.managed && this.icon === role.icon && this.unicodeEmoji === role.unicodeEmoji ); } /** * When concatenated with a string, this automatically returns the role's mention instead of the Role object. * @returns {string} * @example * // Logs: Role: <@&123456789012345678> * console.log(`Role: ${role}`); */ toString() { if (this.id === this.guild.id) return '@everyone'; return roleMention(this.id); } toJSON() { return { ...super.toJSON({ createdTimestamp: true }), permissions: this.permissions.toJSON(), }; } } exports.Role = Role; node_modules/discord.js/src/structures/GuildPreviewEmoji.js 0000664 00000001142 15114741631 0020230 0 ustar 00 'use strict'; const BaseGuildEmoji = require('./BaseGuildEmoji'); /** * Represents an instance of an emoji belonging to a public guild obtained through Discord's preview endpoint. * @extends {BaseGuildEmoji} */ class GuildPreviewEmoji extends BaseGuildEmoji { /** * The public guild this emoji is part of * @type {GuildPreview} * @name GuildPreviewEmoji#guild */ constructor(client, data, guild) { super(client, data, guild); /** * The roles this emoji is active for * @type {Snowflake[]} */ this.roles = data.roles; } } module.exports = GuildPreviewEmoji; node_modules/discord.js/src/structures/TextInputBuilder.js 0000664 00000001523 15114741631 0020114 0 ustar 00 'use strict'; const { TextInputBuilder: BuildersTextInput } = require('@discordjs/builders'); const { isJSONEncodable } = require('@discordjs/util'); const { toSnakeCase } = require('../util/Transformers'); /** * Represents a text input builder. * @extends {BuildersTextInput} */ class TextInputBuilder extends BuildersTextInput { constructor(data) { super(toSnakeCase(data)); } /** * Creates a new text input builder from JSON data * @param {TextInputBuilder|TextInputComponent|APITextInputComponent} other The other data * @returns {TextInputBuilder} */ static from(other) { return new this(isJSONEncodable(other) ? other.toJSON() : other); } } module.exports = TextInputBuilder; /** * @external BuildersTextInput * @see {@link https://discord.js.org/docs/packages/builders/stable/TextInputBuilder:Class} */ node_modules/discord.js/src/structures/NewsChannel.js 0000664 00000002233 15114741631 0017045 0 ustar 00 'use strict'; const { Routes } = require('discord-api-types/v10'); const BaseGuildTextChannel = require('./BaseGuildTextChannel'); const { DiscordjsError, ErrorCodes } = require('../errors'); /** * Represents a guild news channel on Discord. * @extends {BaseGuildTextChannel} */ class NewsChannel extends BaseGuildTextChannel { /** * Adds the target to this channel's followers. * @param {TextChannelResolvable} channel The channel where the webhook should be created * @param {string} [reason] Reason for creating the webhook * @returns {Promise<NewsChannel>} * @example * if (channel.type === ChannelType.GuildAnnouncement) { * channel.addFollower('222197033908436994', 'Important announcements') * .then(() => console.log('Added follower')) * .catch(console.error); * } */ async addFollower(channel, reason) { const channelId = this.guild.channels.resolveId(channel); if (!channelId) throw new DiscordjsError(ErrorCodes.GuildChannelResolve); await this.client.rest.post(Routes.channelFollowers(this.id), { body: { webhook_channel_id: channelId }, reason }); return this; } } module.exports = NewsChannel; node_modules/discord.js/src/structures/Entitlement.js 0000664 00000007461 15114741631 0017140 0 ustar 00 'use strict'; const Base = require('./Base'); /** * Represents an Entitlement * @extends {Base} */ class Entitlement extends Base { constructor(client, data) { super(client); /** * The id of the entitlement * @type {Snowflake} */ this.id = data.id; this._patch(data); } _patch(data) { if ('sku_id' in data) { /** * The id of the associated SKU * @type {Snowflake} */ this.skuId = data.sku_id; } if ('user_id' in data) { /** * The id of the user that is granted access to this entitlement's SKU * @type {Snowflake} */ this.userId = data.user_id; } if ('guild_id' in data) { /** * The id of the guild that is granted access to this entitlement's SKU * @type {?Snowflake} */ this.guildId = data.guild_id; } else { this.guildId ??= null; } if ('application_id' in data) { /** * The id of the parent application * @type {Snowflake} */ this.applicationId = data.application_id; } if ('type' in data) { /** * The type of this entitlement * @type {EntitlementType} */ this.type = data.type; } if ('deleted' in data) { /** * Whether this entitlement was deleted * @type {boolean} */ this.deleted = data.deleted; } if ('starts_at' in data) { /** * The timestamp at which this entitlement is valid * @type {?number} */ this.startsTimestamp = data.starts_at ? Date.parse(data.starts_at) : null; } else { this.startsTimestamp ??= null; } if ('ends_at' in data) { /** * The timestamp at which this entitlement is no longer valid * @type {?number} */ this.endsTimestamp = data.ends_at ? Date.parse(data.ends_at) : null; } else { this.endsTimestamp ??= null; } if ('consumed' in data) { /** * Whether this entitlement has been consumed * @type {boolean} */ this.consumed = data.consumed; } else { this.consumed ??= false; } } /** * The guild that is granted access to this entitlement's SKU * @type {?Guild} */ get guild() { if (!this.guildId) return null; return this.client.guilds.cache.get(this.guildId) ?? null; } /** * The start date at which this entitlement is valid * @type {?Date} */ get startsAt() { return this.startsTimestamp && new Date(this.startsTimestamp); } /** * The end date at which this entitlement is no longer valid * @type {?Date} */ get endsAt() { return this.endsTimestamp && new Date(this.endsTimestamp); } /** * Indicates whether this entitlement is active * @returns {boolean} */ isActive() { return !this.deleted && (!this.endsTimestamp || this.endsTimestamp > Date.now()); } /** * Indicates whether this entitlement is a test entitlement * @returns {boolean} */ isTest() { return this.startsTimestamp === null; } /** * Indicates whether this entitlement is a user subscription * @returns {boolean} */ isUserSubscription() { return this.guildId === null; } /** * Indicates whether this entitlement is a guild subscription * @returns {boolean} */ isGuildSubscription() { return this.guildId !== null; } /** * Fetches the user that is granted access to this entitlement's SKU * @returns {Promise<User>} */ fetchUser() { return this.client.users.fetch(this.userId); } /** * Marks this entitlement as consumed * <info>Only available for One-Time Purchase consumable SKUs.</info> * @returns {Promise<void>} */ async consume() { await this.client.application.entitlements.consume(this.id); } } exports.Entitlement = Entitlement; node_modules/discord.js/src/structures/MentionableSelectMenuComponent.js 0000664 00000000460 15114741631 0022745 0 ustar 00 'use strict'; const BaseSelectMenuComponent = require('./BaseSelectMenuComponent'); /** * Represents a mentionable select menu component * @extends {BaseSelectMenuComponent} */ class MentionableSelectMenuComponent extends BaseSelectMenuComponent {} module.exports = MentionableSelectMenuComponent; node_modules/discord.js/src/structures/ButtonBuilder.js 0000664 00000002431 15114741631 0017422 0 ustar 00 'use strict'; const { ButtonBuilder: BuildersButton } = require('@discordjs/builders'); const { isJSONEncodable } = require('@discordjs/util'); const { toSnakeCase } = require('../util/Transformers'); const { resolvePartialEmoji } = require('../util/Util'); /** * Represents a button builder. * @extends {BuildersButton} */ class ButtonBuilder extends BuildersButton { constructor({ emoji, ...data } = {}) { super(toSnakeCase({ ...data, emoji: emoji && typeof emoji === 'string' ? resolvePartialEmoji(emoji) : emoji })); } /** * Sets the emoji to display on this button * @param {string|APIMessageComponentEmoji} emoji The emoji to display on this button * @returns {ButtonBuilder} */ setEmoji(emoji) { if (typeof emoji === 'string') { return super.setEmoji(resolvePartialEmoji(emoji)); } return super.setEmoji(emoji); } /** * Creates a new button builder from JSON data * @param {ButtonBuilder|ButtonComponent|APIButtonComponent} other The other data * @returns {ButtonBuilder} */ static from(other) { return new this(isJSONEncodable(other) ? other.toJSON() : other); } } module.exports = ButtonBuilder; /** * @external BuildersButton * @see {@link https://discord.js.org/docs/packages/builders/stable/ButtonBuilder:Class} */ node_modules/discord.js/src/structures/ChannelSelectMenuComponent.js 0000664 00000000712 15114741631 0022060 0 ustar 00 'use strict'; const BaseSelectMenuComponent = require('./BaseSelectMenuComponent'); /** * Represents a channel select menu component * @extends {BaseSelectMenuComponent} */ class ChannelSelectMenuComponent extends BaseSelectMenuComponent { /** * The options in this select menu * @type {?(ChannelType[])} * @readonly */ get channelTypes() { return this.data.channel_types ?? null; } } module.exports = ChannelSelectMenuComponent; node_modules/discord.js/src/structures/VoiceRegion.js 0000664 00000001361 15114741631 0017052 0 ustar 00 'use strict'; const { flatten } = require('../util/Util'); /** * Represents a Discord voice region for guilds. */ class VoiceRegion { constructor(data) { /** * The region's id * @type {string} */ this.id = data.id; /** * Name of the region * @type {string} */ this.name = data.name; /** * Whether the region is deprecated * @type {boolean} */ this.deprecated = data.deprecated; /** * Whether the region is optimal * @type {boolean} */ this.optimal = data.optimal; /** * Whether the region is custom * @type {boolean} */ this.custom = data.custom; } toJSON() { return flatten(this); } } module.exports = VoiceRegion; node_modules/discord.js/src/structures/Typing.js 0000664 00000002445 15114741631 0016117 0 ustar 00 'use strict'; const Base = require('./Base'); /** * Represents a typing state for a user in a channel. * @extends {Base} */ class Typing extends Base { constructor(channel, user, data) { super(channel.client); /** * The channel the status is from * @type {TextBasedChannels} */ this.channel = channel; /** * The user who is typing * @type {User} */ this.user = user; this._patch(data); } _patch(data) { if ('timestamp' in data) { /** * The UNIX timestamp in milliseconds the user started typing at * @type {number} */ this.startedTimestamp = data.timestamp * 1_000; } } /** * Indicates whether the status is received from a guild. * @returns {boolean} */ inGuild() { return this.guild !== null; } /** * The time the user started typing at * @type {Date} * @readonly */ get startedAt() { return new Date(this.startedTimestamp); } /** * The guild the status is from * @type {?Guild} * @readonly */ get guild() { return this.channel.guild ?? null; } /** * The member who is typing * @type {?GuildMember} * @readonly */ get member() { return this.guild?.members.resolve(this.user) ?? null; } } module.exports = Typing; node_modules/discord.js/src/structures/CommandInteractionOptionResolver.js 0000664 00000025747 15114741631 0023350 0 ustar 00 'use strict'; const { ApplicationCommandOptionType } = require('discord-api-types/v10'); const { DiscordjsTypeError, ErrorCodes } = require('../errors'); /** * A resolver for command interaction options. */ class CommandInteractionOptionResolver { constructor(client, options, resolved) { /** * The client that instantiated this. * @name CommandInteractionOptionResolver#client * @type {Client} * @readonly */ Object.defineProperty(this, 'client', { value: client }); /** * The name of the subcommand group. * @type {?string} * @private */ this._group = null; /** * The name of the subcommand. * @type {?string} * @private */ this._subcommand = null; /** * The bottom-level options for the interaction. * If there is a subcommand (or subcommand and group), this is the options for the subcommand. * @type {CommandInteractionOption[]} * @private */ this._hoistedOptions = options; // Hoist subcommand group if present if (this._hoistedOptions[0]?.type === ApplicationCommandOptionType.SubcommandGroup) { this._group = this._hoistedOptions[0].name; this._hoistedOptions = this._hoistedOptions[0].options ?? []; } // Hoist subcommand if present if (this._hoistedOptions[0]?.type === ApplicationCommandOptionType.Subcommand) { this._subcommand = this._hoistedOptions[0].name; this._hoistedOptions = this._hoistedOptions[0].options ?? []; } /** * The interaction options array. * @name CommandInteractionOptionResolver#data * @type {ReadonlyArray<CommandInteractionOption>} * @readonly */ Object.defineProperty(this, 'data', { value: Object.freeze([...options]) }); /** * The interaction resolved data * @name CommandInteractionOptionResolver#resolved * @type {?Readonly<CommandInteractionResolvedData>} */ Object.defineProperty(this, 'resolved', { value: resolved ? Object.freeze(resolved) : null }); } /** * Gets an option by its name. * @param {string} name The name of the option. * @param {boolean} [required=false] Whether to throw an error if the option is not found. * @returns {?CommandInteractionOption} The option, if found. */ get(name, required = false) { const option = this._hoistedOptions.find(opt => opt.name === name); if (!option) { if (required) { throw new DiscordjsTypeError(ErrorCodes.CommandInteractionOptionNotFound, name); } return null; } return option; } /** * Gets an option by name and property and checks its type. * @param {string} name The name of the option. * @param {ApplicationCommandOptionType[]} allowedTypes The allowed types of the option. * @param {string[]} properties The properties to check for for `required`. * @param {boolean} required Whether to throw an error if the option is not found. * @returns {?CommandInteractionOption} The option, if found. * @private */ _getTypedOption(name, allowedTypes, properties, required) { const option = this.get(name, required); if (!option) { return null; } else if (!allowedTypes.includes(option.type)) { throw new DiscordjsTypeError(ErrorCodes.CommandInteractionOptionType, name, option.type, allowedTypes.join(', ')); } else if (required && properties.every(prop => option[prop] === null || option[prop] === undefined)) { throw new DiscordjsTypeError(ErrorCodes.CommandInteractionOptionEmpty, name, option.type); } return option; } /** * Gets the selected subcommand. * @param {boolean} [required=true] Whether to throw an error if there is no subcommand. * @returns {?string} The name of the selected subcommand, or null if not set and not required. */ getSubcommand(required = true) { if (required && !this._subcommand) { throw new DiscordjsTypeError(ErrorCodes.CommandInteractionOptionNoSubcommand); } return this._subcommand; } /** * Gets the selected subcommand group. * @param {boolean} [required=false] Whether to throw an error if there is no subcommand group. * @returns {?string} The name of the selected subcommand group, or null if not set and not required. */ getSubcommandGroup(required = false) { if (required && !this._group) { throw new DiscordjsTypeError(ErrorCodes.CommandInteractionOptionNoSubcommandGroup); } return this._group; } /** * Gets a boolean option. * @param {string} name The name of the option. * @param {boolean} [required=false] Whether to throw an error if the option is not found. * @returns {?boolean} The value of the option, or null if not set and not required. */ getBoolean(name, required = false) { const option = this._getTypedOption(name, [ApplicationCommandOptionType.Boolean], ['value'], required); return option?.value ?? null; } /** * Gets a channel option. * @param {string} name The name of the option. * @param {boolean} [required=false] Whether to throw an error if the option is not found. * @param {ChannelType[]} [channelTypes=[]] The allowed types of channels. If empty, all channel types are allowed. * @returns {?(GuildChannel|ThreadChannel|APIChannel)} * The value of the option, or null if not set and not required. */ getChannel(name, required = false, channelTypes = []) { const option = this._getTypedOption(name, [ApplicationCommandOptionType.Channel], ['channel'], required); const channel = option?.channel ?? null; if (channel && channelTypes.length > 0 && !channelTypes.includes(channel.type)) { throw new DiscordjsTypeError( ErrorCodes.CommandInteractionOptionInvalidChannelType, name, channel.type, channelTypes.join(', '), ); } return channel; } /** * Gets a string option. * @param {string} name The name of the option. * @param {boolean} [required=false] Whether to throw an error if the option is not found. * @returns {?string} The value of the option, or null if not set and not required. */ getString(name, required = false) { const option = this._getTypedOption(name, [ApplicationCommandOptionType.String], ['value'], required); return option?.value ?? null; } /** * Gets an integer option. * @param {string} name The name of the option. * @param {boolean} [required=false] Whether to throw an error if the option is not found. * @returns {?number} The value of the option, or null if not set and not required. */ getInteger(name, required = false) { const option = this._getTypedOption(name, [ApplicationCommandOptionType.Integer], ['value'], required); return option?.value ?? null; } /** * Gets a number option. * @param {string} name The name of the option. * @param {boolean} [required=false] Whether to throw an error if the option is not found. * @returns {?number} The value of the option, or null if not set and not required. */ getNumber(name, required = false) { const option = this._getTypedOption(name, [ApplicationCommandOptionType.Number], ['value'], required); return option?.value ?? null; } /** * Gets a user option. * @param {string} name The name of the option. * @param {boolean} [required=false] Whether to throw an error if the option is not found. * @returns {?User} The value of the option, or null if not set and not required. */ getUser(name, required = false) { const option = this._getTypedOption( name, [ApplicationCommandOptionType.User, ApplicationCommandOptionType.Mentionable], ['user'], required, ); return option?.user ?? null; } /** * Gets a member option. * @param {string} name The name of the option. * @returns {?(GuildMember|APIGuildMember)} * The value of the option, or null if the user is not present in the guild or the option is not set. */ getMember(name) { const option = this._getTypedOption( name, [ApplicationCommandOptionType.User, ApplicationCommandOptionType.Mentionable], ['member'], false, ); return option?.member ?? null; } /** * Gets a role option. * @param {string} name The name of the option. * @param {boolean} [required=false] Whether to throw an error if the option is not found. * @returns {?(Role|APIRole)} The value of the option, or null if not set and not required. */ getRole(name, required = false) { const option = this._getTypedOption( name, [ApplicationCommandOptionType.Role, ApplicationCommandOptionType.Mentionable], ['role'], required, ); return option?.role ?? null; } /** * Gets an attachment option. * @param {string} name The name of the option. * @param {boolean} [required=false] Whether to throw an error if the option is not found. * @returns {?Attachment} The value of the option, or null if not set and not required. */ getAttachment(name, required = false) { const option = this._getTypedOption(name, [ApplicationCommandOptionType.Attachment], ['attachment'], required); return option?.attachment ?? null; } /** * Gets a mentionable option. * @param {string} name The name of the option. * @param {boolean} [required=false] Whether to throw an error if the option is not found. * @returns {?(User|GuildMember|APIGuildMember|Role|APIRole)} * The value of the option, or null if not set and not required. */ getMentionable(name, required = false) { const option = this._getTypedOption( name, [ApplicationCommandOptionType.Mentionable], ['user', 'member', 'role'], required, ); return option?.member ?? option?.user ?? option?.role ?? null; } /** * Gets a message option. * @param {string} name The name of the option. * @param {boolean} [required=false] Whether to throw an error if the option is not found. * @returns {?Message} * The value of the option, or null if not set and not required. */ getMessage(name, required = false) { const option = this._getTypedOption(name, ['_MESSAGE'], ['message'], required); return option?.message ?? null; } /** * The full autocomplete option object. * @typedef {Object} AutocompleteFocusedOption * @property {string} name The name of the option * @property {ApplicationCommandOptionType} type The type of the application command option * @property {string} value The value of the option * @property {boolean} focused Whether this option is currently in focus for autocomplete */ /** * Gets the focused option. * @param {boolean} [getFull=false] Whether to get the full option object * @returns {string|AutocompleteFocusedOption} * The value of the option, or the whole option if getFull is true */ getFocused(getFull = false) { const focusedOption = this._hoistedOptions.find(option => option.focused); if (!focusedOption) throw new DiscordjsTypeError(ErrorCodes.AutocompleteInteractionOptionNoFocusedOption); return getFull ? focusedOption : focusedOption.value; } } module.exports = CommandInteractionOptionResolver; node_modules/discord.js/src/structures/TextDisplayComponent.js 0000664 00000000543 15114741631 0020777 0 ustar 00 'use strict'; const Component = require('./Component'); /** * Represents a text display component * @extends {Component} */ class TextDisplayComponent extends Component { /** * The content of this text display * @type {string} * @readonly */ get content() { return this.data.content; } } module.exports = TextDisplayComponent; node_modules/discord.js/src/structures/RoleSelectMenuInteraction.js 0000664 00000001576 15114741631 0021737 0 ustar 00 'use strict'; const { Collection } = require('@discordjs/collection'); const MessageComponentInteraction = require('./MessageComponentInteraction'); /** * Represents a {@link ComponentType.RoleSelect} select menu interaction. * @extends {MessageComponentInteraction} */ class RoleSelectMenuInteraction extends MessageComponentInteraction { constructor(client, data) { super(client, data); const { resolved, values } = data.data; /** * An array of the selected role ids * @type {Snowflake[]} */ this.values = values ?? []; /** * Collection of the selected roles * @type {Collection<Snowflake, Role|APIRole>} */ this.roles = new Collection(); for (const role of Object.values(resolved?.roles ?? {})) { this.roles.set(role.id, this.guild?.roles._add(role) ?? role); } } } module.exports = RoleSelectMenuInteraction; node_modules/discord.js/src/structures/AutocompleteInteraction.js 0000664 00000005524 15114741631 0021507 0 ustar 00 'use strict'; const { InteractionResponseType, Routes } = require('discord-api-types/v10'); const BaseInteraction = require('./BaseInteraction'); const CommandInteractionOptionResolver = require('./CommandInteractionOptionResolver'); const { DiscordjsError, ErrorCodes } = require('../errors'); /** * Represents an autocomplete interaction. * @extends {BaseInteraction} */ class AutocompleteInteraction extends BaseInteraction { constructor(client, data) { super(client, data); /** * The id of the channel this interaction was sent in * @type {Snowflake} * @name AutocompleteInteraction#channelId */ /** * The invoked application command's id * @type {Snowflake} */ this.commandId = data.data.id; /** * The invoked application command's name * @type {string} */ this.commandName = data.data.name; /** * The invoked application command's type * @type {ApplicationCommandType} */ this.commandType = data.data.type; /** * The id of the guild the invoked application command is registered to * @type {?Snowflake} */ this.commandGuildId = data.data.guild_id ?? null; /** * Whether this interaction has already received a response * @type {boolean} */ this.responded = false; /** * The options passed to the command * @type {CommandInteractionOptionResolver} */ this.options = new CommandInteractionOptionResolver(this.client, data.data.options ?? []); } /** * The invoked application command, if it was fetched before * @type {?ApplicationCommand} */ get command() { const id = this.commandId; return this.guild?.commands.cache.get(id) ?? this.client.application.commands.cache.get(id) ?? null; } /** * Sends results for the autocomplete of this interaction. * @param {ApplicationCommandOptionChoiceData[]} options The options for the autocomplete * @returns {Promise<void>} * @example * // respond to autocomplete interaction * interaction.respond([ * { * name: 'Option 1', * value: 'option1', * }, * ]) * .then(() => console.log('Successfully responded to the autocomplete interaction')) * .catch(console.error); */ async respond(options) { if (this.responded) throw new DiscordjsError(ErrorCodes.InteractionAlreadyReplied); await this.client.rest.post(Routes.interactionCallback(this.id, this.token), { body: { type: InteractionResponseType.ApplicationCommandAutocompleteResult, data: { choices: options.map(({ nameLocalizations, ...option }) => ({ ...this.client.options.jsonTransformer(option), name_localizations: nameLocalizations, })), }, }, auth: false, }); this.responded = true; } } module.exports = AutocompleteInteraction; node_modules/discord.js/src/structures/DirectoryChannel.js 0000664 00000001232 15114741631 0020073 0 ustar 00 'use strict'; const { BaseChannel } = require('./BaseChannel'); /** * Represents a channel that displays a directory of guilds. * @extends {BaseChannel} */ class DirectoryChannel extends BaseChannel { constructor(guild, data, client) { super(client, data); /** * The guild the channel is in * @type {InviteGuild} */ this.guild = guild; /** * The id of the guild the channel is in * @type {Snowflake} */ this.guildId = guild.id; } _patch(data) { super._patch(data); /** * The channel's name * @type {string} */ this.name = data.name; } } module.exports = DirectoryChannel; node_modules/discord.js/src/structures/RoleSelectMenuBuilder.js 0000664 00000001666 15114741631 0021046 0 ustar 00 'use strict'; const { RoleSelectMenuBuilder: BuildersRoleSelectMenu } = require('@discordjs/builders'); const { isJSONEncodable } = require('@discordjs/util'); const { toSnakeCase } = require('../util/Transformers'); /** * Class used to build select menu components to be sent through the API * @extends {BuildersRoleSelectMenu} */ class RoleSelectMenuBuilder extends BuildersRoleSelectMenu { constructor(data = {}) { super(toSnakeCase(data)); } /** * Creates a new select menu builder from JSON data * @param {RoleSelectMenuBuilder|RoleSelectMenuComponent|APIRoleSelectComponent} other The other data * @returns {RoleSelectMenuBuilder} */ static from(other) { return new this(isJSONEncodable(other) ? other.toJSON() : other); } } module.exports = RoleSelectMenuBuilder; /** * @external BuildersRoleSelectMenu * @see {@link https://discord.js.org/docs/packages/builders/stable/RoleSelectMenuBuilder:Class} */ node_modules/discord.js/src/structures/SelectMenuBuilder.js 0000664 00000001204 15114741631 0020210 0 ustar 00 'use strict'; const process = require('node:process'); const StringSelectMenuBuilder = require('./StringSelectMenuBuilder'); let deprecationEmitted = false; /** * @deprecated Use {@link StringSelectMenuBuilder} instead. * @extends {StringSelectMenuBuilder} */ class SelectMenuBuilder extends StringSelectMenuBuilder { constructor(...params) { super(...params); if (!deprecationEmitted) { process.emitWarning( 'The SelectMenuBuilder class is deprecated. Use StringSelectMenuBuilder instead.', 'DeprecationWarning', ); deprecationEmitted = true; } } } module.exports = SelectMenuBuilder; node_modules/discord.js/src/structures/BaseSelectMenuComponent.js 0000664 00000001772 15114741631 0021371 0 ustar 00 'use strict'; const Component = require('./Component'); /** * Represents a select menu component * @extends {Component} */ class BaseSelectMenuComponent extends Component { /** * The placeholder for this select menu * @type {?string} * @readonly */ get placeholder() { return this.data.placeholder ?? null; } /** * The maximum amount of options that can be selected * @type {?number} * @readonly */ get maxValues() { return this.data.max_values ?? null; } /** * The minimum amount of options that must be selected * @type {?number} * @readonly */ get minValues() { return this.data.min_values ?? null; } /** * The custom id of this select menu * @type {string} * @readonly */ get customId() { return this.data.custom_id; } /** * Whether this select menu is disabled * @type {boolean} * @readonly */ get disabled() { return this.data.disabled ?? false; } } module.exports = BaseSelectMenuComponent; node_modules/discord.js/src/structures/InteractionCallback.js 0000664 00000003264 15114741631 0020541 0 ustar 00 'use strict'; const { DiscordSnowflake } = require('@sapphire/snowflake'); /** * Represents an interaction callback response from Discord */ class InteractionCallback { constructor(client, data) { /** * The client that instantiated this. * @name InteractionCallback#client * @type {Client} * @readonly */ Object.defineProperty(this, 'client', { value: client }); /** * The id of the original interaction response * @type {Snowflake} */ this.id = data.id; /** * The type of the original interaction * @type {InteractionType} */ this.type = data.type; /** * The instance id of the Activity if one was launched or joined * @type {?string} */ this.activityInstanceId = data.activity_instance_id ?? null; /** * The id of the message that was created by the interaction * @type {?Snowflake} */ this.responseMessageId = data.response_message_id ?? null; /** * Whether the message is in a loading state * @type {?boolean} */ this.responseMessageLoading = data.response_message_loading ?? null; /** * Whether the response message was ephemeral * @type {?boolean} */ this.responseMessageEphemeral = data.response_message_ephemeral ?? null; } /** * The timestamp the original interaction was created at * @type {number} * @readonly */ get createdTimestamp() { return DiscordSnowflake.timestampFrom(this.id); } /** * The time the original interaction was created at * @type {Date} * @readonly */ get createdAt() { return new Date(this.createdTimestamp); } } module.exports = InteractionCallback; node_modules/discord.js/src/structures/MessageMentions.js 0000664 00000022624 15114741631 0017747 0 ustar 00 'use strict'; const { Collection } = require('@discordjs/collection'); const { FormattingPatterns } = require('discord-api-types/v10'); const { flatten } = require('../util/Util'); /** * Keeps track of mentions in a {@link Message}. */ class MessageMentions { /** * A regular expression that matches `@everyone` and `@here`. * The `mention` group property is present on the `exec` result of this expression. * @type {RegExp} * @memberof MessageMentions */ static EveryonePattern = /@(?<mention>everyone|here)/; /** * A regular expression that matches user mentions like `<@81440962496172032>`. * The `id` group property is present on the `exec` result of this expression. * @type {RegExp} * @memberof MessageMentions */ static UsersPattern = FormattingPatterns.UserWithOptionalNickname; /** * A regular expression that matches role mentions like `<@&297577916114403338>`. * The `id` group property is present on the `exec` result of this expression. * @type {RegExp} * @memberof MessageMentions */ static RolesPattern = FormattingPatterns.Role; /** * A regular expression that matches channel mentions like `<#222079895583457280>`. * The `id` group property is present on the `exec` result of this expression. * @type {RegExp} * @memberof MessageMentions */ static ChannelsPattern = FormattingPatterns.Channel; /** * A global regular expression variant of {@link MessageMentions.ChannelsPattern}. * @type {RegExp} * @memberof MessageMentions * @private */ static GlobalChannelsPattern = new RegExp(this.ChannelsPattern.source, 'g'); /** * A global regular expression variant of {@link MessageMentions.UsersPattern}. * @type {RegExp} * @memberof MessageMentions * @private */ static GlobalUsersPattern = new RegExp(this.UsersPattern.source, 'g'); constructor(message, users, roles, everyone, crosspostedChannels, repliedUser) { /** * The client the message is from * @type {Client} * @readonly */ Object.defineProperty(this, 'client', { value: message.client }); /** * The guild the message is in * @type {?Guild} * @readonly */ Object.defineProperty(this, 'guild', { value: message.guild }); /** * The initial message content * @type {string} * @readonly * @private */ Object.defineProperty(this, '_content', { value: message.content }); /** * Whether `@everyone` or `@here` were mentioned * @type {boolean} */ this.everyone = Boolean(everyone); if (users) { if (users instanceof Collection) { /** * Any users that were mentioned * <info>Order as received from the API, not as they appear in the message content</info> * @type {Collection<Snowflake, User>} */ this.users = new Collection(users); } else { this.users = new Collection(); for (const mention of users) { if (mention.member && message.guild) { message.guild.members._add(Object.assign(mention.member, { user: mention })); } const user = message.client.users._add(mention); this.users.set(user.id, user); } } } else { this.users = new Collection(); } if (roles instanceof Collection) { /** * Any roles that were mentioned * <info>Order as received from the API, not as they appear in the message content</info> * @type {Collection<Snowflake, Role>} */ this.roles = new Collection(roles); } else if (roles) { this.roles = new Collection(); const guild = message.guild; if (guild) { for (const mention of roles) { const role = guild.roles.cache.get(mention); if (role) this.roles.set(role.id, role); } } } else { this.roles = new Collection(); } /** * Cached members for {@link MessageMentions#members} * @type {?Collection<Snowflake, GuildMember>} * @private */ this._members = null; /** * Cached channels for {@link MessageMentions#channels} * @type {?Collection<Snowflake, BaseChannel>} * @private */ this._channels = null; /** * Cached users for {@link MessageMentions#parsedUsers} * @type {?Collection<Snowflake, User>} * @private */ this._parsedUsers = null; /** * Crossposted channel data. * @typedef {Object} CrosspostedChannel * @property {Snowflake} channelId The mentioned channel's id * @property {Snowflake} guildId The id of the guild that has the channel * @property {ChannelType} type The channel's type * @property {string} name The channel's name */ if (crosspostedChannels) { if (crosspostedChannels instanceof Collection) { /** * A collection of crossposted channels * <info>Order as received from the API, not as they appear in the message content</info> * @type {Collection<Snowflake, CrosspostedChannel>} */ this.crosspostedChannels = new Collection(crosspostedChannels); } else { this.crosspostedChannels = new Collection(); for (const crosspostedChannel of crosspostedChannels) { this.crosspostedChannels.set(crosspostedChannel.id, { channelId: crosspostedChannel.id, guildId: crosspostedChannel.guild_id, type: crosspostedChannel.type, name: crosspostedChannel.name, }); } } } else { this.crosspostedChannels = new Collection(); } /** * The author of the message that this message is a reply to * @type {?User} */ this.repliedUser = repliedUser ? this.client.users._add(repliedUser) : null; } /** * Any members that were mentioned (only in {@link Guild}s) * <info>Order as received from the API, not as they appear in the message content</info> * @type {?Collection<Snowflake, GuildMember>} * @readonly */ get members() { if (this._members) return this._members; if (!this.guild) return null; this._members = new Collection(); this.users.forEach(user => { const member = this.guild.members.resolve(user); if (member) this._members.set(member.user.id, member); }); return this._members; } /** * Any channels that were mentioned * <info>Order as they appear first in the message content</info> * @type {Collection<Snowflake, BaseChannel>} * @readonly */ get channels() { if (this._channels) return this._channels; this._channels = new Collection(); let matches; while ((matches = this.constructor.GlobalChannelsPattern.exec(this._content)) !== null) { const channel = this.client.channels.cache.get(matches.groups.id); if (channel) this._channels.set(channel.id, channel); } return this._channels; } /** * Any user mentions that were included in the message content * <info>Order as they appear first in the message content</info> * @type {Collection<Snowflake, User>} * @readonly */ get parsedUsers() { if (this._parsedUsers) return this._parsedUsers; this._parsedUsers = new Collection(); let matches; while ((matches = this.constructor.GlobalUsersPattern.exec(this._content)) !== null) { const user = this.client.users.cache.get(matches[1]); if (user) this._parsedUsers.set(user.id, user); } return this._parsedUsers; } /** * Options used to check for a mention. * @typedef {Object} MessageMentionsHasOptions * @property {boolean} [ignoreDirect=false] Whether to ignore direct mentions to the item * @property {boolean} [ignoreRoles=false] Whether to ignore role mentions to a guild member * @property {boolean} [ignoreRepliedUser=false] Whether to ignore replied user mention to an user * @property {boolean} [ignoreEveryone=false] Whether to ignore `@everyone`/`@here` mentions */ /** * Checks if a user, guild member, thread member, role, or channel is mentioned. * Takes into account user mentions, role mentions, channel mentions, * replied user mention, and `@everyone`/`@here` mentions. * @param {UserResolvable|RoleResolvable|ChannelResolvable} data The User/Role/Channel to check for * @param {MessageMentionsHasOptions} [options] The options for the check * @returns {boolean} */ has(data, { ignoreDirect = false, ignoreRoles = false, ignoreRepliedUser = false, ignoreEveryone = false } = {}) { const user = this.client.users.resolve(data); if (!ignoreEveryone && user && this.everyone) return true; const userWasRepliedTo = user && this.repliedUser?.id === user.id; if (!ignoreRepliedUser && userWasRepliedTo && this.users.has(user.id)) return true; if (!ignoreDirect) { if (user && (!ignoreRepliedUser || this.parsedUsers.has(user.id)) && this.users.has(user.id)) return true; const role = this.guild?.roles.resolve(data); if (role && this.roles.has(role.id)) return true; const channel = this.client.channels.resolve(data); if (channel && this.channels.has(channel.id)) return true; } if (!ignoreRoles) { const member = this.guild?.members.resolve(data); if (member) { for (const mentionedRole of this.roles.values()) if (member.roles.cache.has(mentionedRole.id)) return true; } } return false; } toJSON() { return flatten(this, { members: true, channels: true, }); } } module.exports = MessageMentions; node_modules/discord.js/src/structures/GuildMember.js 0000664 00000041337 15114741631 0017044 0 ustar 00 'use strict'; const { PermissionFlagsBits } = require('discord-api-types/v10'); const Base = require('./Base'); const VoiceState = require('./VoiceState'); const TextBasedChannel = require('./interfaces/TextBasedChannel'); const { DiscordjsError, ErrorCodes } = require('../errors'); const GuildMemberRoleManager = require('../managers/GuildMemberRoleManager'); const { GuildMemberFlagsBitField } = require('../util/GuildMemberFlagsBitField'); const PermissionsBitField = require('../util/PermissionsBitField'); /** * Represents a member of a guild on Discord. * @implements {TextBasedChannel} * @extends {Base} */ class GuildMember extends Base { constructor(client, data, guild) { super(client); /** * The guild that this member is part of * @type {Guild} */ this.guild = guild; /** * The timestamp the member joined the guild at * @type {?number} */ this.joinedTimestamp = null; /** * The last timestamp this member started boosting the guild * @type {?number} */ this.premiumSinceTimestamp = null; /** * The nickname of this member, if they have one * @type {?string} */ this.nickname = null; /** * Whether this member has yet to pass the guild's membership gate * @type {?boolean} */ this.pending = null; /** * The timestamp this member's timeout will be removed * @type {?number} */ this.communicationDisabledUntilTimestamp = null; /** * The role ids of the member * @name GuildMember#_roles * @type {Snowflake[]} * @private */ Object.defineProperty(this, '_roles', { value: [], writable: true }); if (data) this._patch(data); } _patch(data) { if ('user' in data) { /** * The user that this guild member instance represents * @type {?User} */ this.user = this.client.users._add(data.user, true); } if ('nick' in data) this.nickname = data.nick; if ('avatar' in data) { /** * The guild member's avatar hash * @type {?string} */ this.avatar = data.avatar; } else if (typeof this.avatar !== 'string') { this.avatar = null; } if ('banner' in data) { /** * The guild member's banner hash. * @type {?string} */ this.banner = data.banner; } else { this.banner ??= null; } if ('joined_at' in data) this.joinedTimestamp = Date.parse(data.joined_at); if ('premium_since' in data) { this.premiumSinceTimestamp = data.premium_since ? Date.parse(data.premium_since) : null; } if ('roles' in data) this._roles = data.roles; if ('pending' in data) { this.pending = data.pending; } else if (!this.partial) { // See https://github.com/discordjs/discord.js/issues/6546 for more info. this.pending ??= false; } if ('communication_disabled_until' in data) { this.communicationDisabledUntilTimestamp = data.communication_disabled_until && Date.parse(data.communication_disabled_until); } if ('flags' in data) { /** * The flags of this member * @type {Readonly<GuildMemberFlagsBitField>} */ this.flags = new GuildMemberFlagsBitField(data.flags).freeze(); } else { this.flags ??= new GuildMemberFlagsBitField().freeze(); } if (data.avatar_decoration_data) { /** * The member avatar decoration's data * * @type {?AvatarDecorationData} */ this.avatarDecorationData = { asset: data.avatar_decoration_data.asset, skuId: data.avatar_decoration_data.sku_id, }; } else { this.avatarDecorationData = null; } } _clone() { const clone = super._clone(); clone._roles = this._roles.slice(); return clone; } /** * Whether this GuildMember is a partial * @type {boolean} * @readonly */ get partial() { return this.joinedTimestamp === null; } /** * A manager for the roles belonging to this member * @type {GuildMemberRoleManager} * @readonly */ get roles() { return new GuildMemberRoleManager(this); } /** * The voice state of this member * @type {VoiceState} * @readonly */ get voice() { return this.guild.voiceStates.cache.get(this.id) ?? new VoiceState(this.guild, { user_id: this.id }); } /** * A link to the member's guild avatar. * @param {ImageURLOptions} [options={}] Options for the image URL * @returns {?string} */ avatarURL(options = {}) { return this.avatar && this.client.rest.cdn.guildMemberAvatar(this.guild.id, this.id, this.avatar, options); } /** * A link to the member's avatar decoration. * * @returns {?string} */ avatarDecorationURL() { return this.avatarDecorationData ? this.client.rest.cdn.avatarDecoration(this.avatarDecorationData.asset) : null; } /** * A link to the member's banner. * @param {ImageURLOptions} [options={}] Options for the banner URL * @returns {?string} */ bannerURL(options = {}) { return this.banner && this.client.rest.cdn.guildMemberBanner(this.guild.id, this.id, this.banner, options); } /** * A link to the member's guild avatar if they have one. * Otherwise, a link to their {@link User#displayAvatarURL} will be returned. * @param {ImageURLOptions} [options={}] Options for the image URL * @returns {string} */ displayAvatarURL(options) { return this.avatarURL(options) ?? this.user.displayAvatarURL(options); } /** * A link to the member's guild banner if they have one. * Otherwise, a link to their {@link User#bannerURL} will be returned. * @param {ImageURLOptions} [options={}] Options for the image URL * @returns {?string} */ displayBannerURL(options) { return this.bannerURL(options) ?? this.user.bannerURL(options); } /** * A link to the member's guild avatar decoration if they have one. * Otherwise, a link to their {@link User#avatarDecorationURL} will be returned. * * @returns {?string} */ displayAvatarDecorationURL() { return this.avatarDecorationURL() ?? this.user.avatarDecorationURL(); } /** * The time this member joined the guild * @type {?Date} * @readonly */ get joinedAt() { return this.joinedTimestamp && new Date(this.joinedTimestamp); } /** * The time this member's timeout will be removed * @type {?Date} * @readonly */ get communicationDisabledUntil() { return this.communicationDisabledUntilTimestamp && new Date(this.communicationDisabledUntilTimestamp); } /** * The last time this member started boosting the guild * @type {?Date} * @readonly */ get premiumSince() { return this.premiumSinceTimestamp && new Date(this.premiumSinceTimestamp); } /** * The presence of this guild member * @type {?Presence} * @readonly */ get presence() { return this.guild.presences.cache.get(this.id) ?? null; } /** * The displayed role color of this member in base 10 * @type {number} * @readonly */ get displayColor() { return this.roles.color?.color ?? 0; } /** * The displayed role color of this member in hexadecimal * @type {string} * @readonly */ get displayHexColor() { return this.roles.color?.hexColor ?? '#000000'; } /** * The member's id * @type {Snowflake} * @readonly */ get id() { return this.user.id; } /** * The DM between the client's user and this member * @type {?DMChannel} * @readonly */ get dmChannel() { return this.client.users.dmChannel(this.id); } /** * The nickname of this member, or their user display name if they don't have one * @type {?string} * @readonly */ get displayName() { return this.nickname ?? this.user.displayName; } /** * The overall set of permissions for this member, taking only roles and owner status into account * @type {Readonly<PermissionsBitField>} * @readonly */ get permissions() { if (this.user.id === this.guild.ownerId) return new PermissionsBitField(PermissionsBitField.All).freeze(); return new PermissionsBitField(this.roles.cache.map(role => role.permissions)).freeze(); } /** * Whether the client user is above this user in the hierarchy, according to role position and guild ownership. * This is a prerequisite for many moderative actions. * @type {boolean} * @readonly */ get manageable() { if (this.user.id === this.guild.ownerId) return false; if (this.user.id === this.client.user.id) return false; if (this.client.user.id === this.guild.ownerId) return true; if (!this.guild.members.me) throw new DiscordjsError(ErrorCodes.GuildUncachedMe); return this.guild.members.me.roles.highest.comparePositionTo(this.roles.highest) > 0; } /** * Whether this member is kickable by the client user * @type {boolean} * @readonly */ get kickable() { if (!this.guild.members.me) throw new DiscordjsError(ErrorCodes.GuildUncachedMe); return this.manageable && this.guild.members.me.permissions.has(PermissionFlagsBits.KickMembers); } /** * Whether this member is bannable by the client user * @type {boolean} * @readonly */ get bannable() { if (!this.guild.members.me) throw new DiscordjsError(ErrorCodes.GuildUncachedMe); return this.manageable && this.guild.members.me.permissions.has(PermissionFlagsBits.BanMembers); } /** * Whether this member is moderatable by the client user * @type {boolean} * @readonly */ get moderatable() { return ( !this.permissions.has(PermissionFlagsBits.Administrator) && this.manageable && (this.guild.members.me?.permissions.has(PermissionFlagsBits.ModerateMembers) ?? false) ); } /** * Whether this member is currently timed out * @returns {boolean} */ isCommunicationDisabled() { return this.communicationDisabledUntilTimestamp > Date.now(); } /** * Returns `channel.permissionsFor(guildMember)`. Returns permissions for a member in a guild channel, * taking into account roles and permission overwrites. * @param {GuildChannelResolvable} channel The guild channel to use as context * @returns {Readonly<PermissionsBitField>} */ permissionsIn(channel) { channel = this.guild.channels.resolve(channel); if (!channel) throw new DiscordjsError(ErrorCodes.GuildChannelResolve); return channel.permissionsFor(this); } /** * Edits this member. * @param {GuildMemberEditOptions} options The options to provide * @returns {Promise<GuildMember>} */ edit(options) { return this.guild.members.edit(this, options); } /** * Sets the flags for this member. * @param {GuildMemberFlagsResolvable} flags The flags to set * @param {string} [reason] Reason for setting the flags * @returns {Promise<GuildMember>} */ setFlags(flags, reason) { return this.edit({ flags, reason }); } /** * Sets the nickname for this member. * @param {?string} nick The nickname for the guild member, or `null` if you want to reset their nickname * @param {string} [reason] Reason for setting the nickname * @returns {Promise<GuildMember>} * @example * // Set a nickname for a guild member * guildMember.setNickname('cool nickname', 'Needed a new nickname') * .then(member => console.log(`Set nickname of ${member.user.username}`)) * .catch(console.error); * @example * // Remove a nickname for a guild member * guildMember.setNickname(null, 'No nicknames allowed!') * .then(member => console.log(`Removed nickname for ${member.user.username}`)) * .catch(console.error); */ setNickname(nick, reason) { return this.edit({ nick, reason }); } /** * Creates a DM channel between the client and this member. * @param {boolean} [force=false] Whether to skip the cache check and request the API * @returns {Promise<DMChannel>} */ createDM(force = false) { return this.user.createDM(force); } /** * Deletes any DMs with this member. * @returns {Promise<DMChannel>} */ deleteDM() { return this.user.deleteDM(); } /** * Kicks this member from the guild. * @param {string} [reason] Reason for kicking user * @returns {Promise<GuildMember>} */ kick(reason) { return this.guild.members.kick(this, reason); } /** * Bans this guild member. * @param {BanOptions} [options] Options for the ban * @returns {Promise<GuildMember>} * @example * // Ban a guild member, deleting a week's worth of messages * guildMember.ban({ deleteMessageSeconds: 60 * 60 * 24 * 7, reason: 'They deserved it' }) * .then(console.log) * .catch(console.error); */ ban(options) { return this.guild.bans.create(this, options); } /** * Times this guild member out. * @param {?DateResolvable} communicationDisabledUntil The date or timestamp * for the member's communication to be disabled until. Provide `null` to remove the timeout. * @param {string} [reason] The reason for this timeout. * @returns {Promise<GuildMember>} * @example * // Time a guild member out for 5 minutes * guildMember.disableCommunicationUntil(Date.now() + (5 * 60 * 1000), 'They deserved it') * .then(console.log) * .catch(console.error); * @example * // Remove the timeout of a guild member * guildMember.disableCommunicationUntil(null) * .then(member => console.log(`Removed timeout for ${member.displayName}`)) * .catch(console.error); */ disableCommunicationUntil(communicationDisabledUntil, reason) { return this.edit({ communicationDisabledUntil, reason }); } /** * Times this guild member out. * @param {?number} timeout The duration in milliseconds * for the member's communication to be disabled. Provide `null` to remove the timeout. * @param {string} [reason] The reason for this timeout. * @returns {Promise<GuildMember>} * @example * // Time a guild member out for 5 minutes * guildMember.timeout(5 * 60 * 1000, 'They deserved it') * .then(console.log) * .catch(console.error); */ timeout(timeout, reason) { return this.disableCommunicationUntil(timeout && Date.now() + timeout, reason); } /** * Fetches this GuildMember. * @param {boolean} [force=true] Whether to skip the cache check and request the API * @returns {Promise<GuildMember>} */ fetch(force = true) { return this.guild.members.fetch({ user: this.id, cache: true, force }); } /** * Whether this guild member equals another guild member. It compares all properties, so for most * comparison it is advisable to just compare `member.id === member2.id` as it is significantly faster * and is often what most users need. * @param {GuildMember} member The member to compare with * @returns {boolean} */ equals(member) { return ( member instanceof this.constructor && this.id === member.id && this.partial === member.partial && this.guild.id === member.guild.id && this.joinedTimestamp === member.joinedTimestamp && this.nickname === member.nickname && this.avatar === member.avatar && this.banner === member.banner && this.pending === member.pending && this.communicationDisabledUntilTimestamp === member.communicationDisabledUntilTimestamp && this.flags.bitfield === member.flags.bitfield && (this._roles === member._roles || (this._roles.length === member._roles.length && this._roles.every((role, index) => role === member._roles[index]))) && this.avatarDecorationData?.asset === member.avatarDecorationData?.asset && this.avatarDecorationData?.skuId === member.avatarDecorationData?.skuId ); } /** * When concatenated with a string, this automatically returns the user's mention instead of the GuildMember object. * @returns {string} * @example * // Logs: Hello from <@123456789012345678>! * console.log(`Hello from ${member}!`); */ toString() { return this.user.toString(); } toJSON() { const json = super.toJSON({ guild: 'guildId', user: 'userId', displayName: true, roles: true, }); json.avatarURL = this.avatarURL(); json.bannerURL = this.bannerURL(); json.displayAvatarURL = this.displayAvatarURL(); json.displayBannerURL = this.displayBannerURL(); json.avatarDecorationURL = this.avatarDecorationURL(); return json; } } /** * Sends a message to this user. * @method send * @memberof GuildMember * @instance * @param {string|MessagePayload|MessageCreateOptions} options The options to provide * @returns {Promise<Message>} * @example * // Send a direct message * guildMember.send('Hello!') * .then(message => console.log(`Sent message: ${message.content} to ${guildMember.displayName}`)) * .catch(console.error); */ TextBasedChannel.applyToClass(GuildMember); exports.GuildMember = GuildMember; node_modules/discord.js/src/structures/EmbedBuilder.js 0000664 00000002354 15114741631 0017167 0 ustar 00 'use strict'; const { EmbedBuilder: BuildersEmbed, embedLength } = require('@discordjs/builders'); const { isJSONEncodable } = require('@discordjs/util'); const { toSnakeCase } = require('../util/Transformers'); const { resolveColor } = require('../util/Util'); /** * Represents an embed builder. * @extends {BuildersEmbed} */ class EmbedBuilder extends BuildersEmbed { constructor(data) { super(toSnakeCase(data)); } /** * Sets the color of this embed * @param {?ColorResolvable} color The color of the embed * @returns {EmbedBuilder} */ setColor(color) { return super.setColor(color && resolveColor(color)); } /** * Creates a new embed builder from JSON data * @param {EmbedBuilder|Embed|APIEmbed} other The other data * @returns {EmbedBuilder} */ static from(other) { return new this(isJSONEncodable(other) ? other.toJSON() : other); } /** * The accumulated length for the embed title, description, fields, footer text, and author name. * @type {number} * @readonly */ get length() { return embedLength(this.data); } } module.exports = EmbedBuilder; /** * @external BuildersEmbed * @see {@link https://discord.js.org/docs/packages/builders/stable/EmbedBuilder:Class} */ node_modules/discord.js/src/structures/TextChannel.js 0000664 00000001557 15114741631 0017065 0 ustar 00 'use strict'; const BaseGuildTextChannel = require('./BaseGuildTextChannel'); /** * Represents a guild text channel on Discord. * @extends {BaseGuildTextChannel} */ class TextChannel extends BaseGuildTextChannel { _patch(data) { super._patch(data); if ('rate_limit_per_user' in data) { /** * The rate limit per user (slowmode) for this channel in seconds * @type {number} */ this.rateLimitPerUser = data.rate_limit_per_user; } } /** * Sets the rate limit per user (slowmode) for this channel. * @param {number} rateLimitPerUser The new rate limit in seconds * @param {string} [reason] Reason for changing the channel's rate limit * @returns {Promise<TextChannel>} */ setRateLimitPerUser(rateLimitPerUser, reason) { return this.edit({ rateLimitPerUser, reason }); } } module.exports = TextChannel; node_modules/discord.js/src/structures/ReactionCollector.js 0000664 00000020054 15114741631 0020254 0 ustar 00 'use strict'; const { Collection } = require('@discordjs/collection'); const Collector = require('./interfaces/Collector'); const Events = require('../util/Events'); /** * @typedef {CollectorOptions} ReactionCollectorOptions * @property {number} max The maximum total amount of reactions to collect * @property {number} maxEmojis The maximum number of emojis to collect * @property {number} maxUsers The maximum number of users to react */ /** * Collects reactions on messages. * Will automatically stop if the message ({@link Client#event:messageDelete messageDelete} or * {@link Client#event:messageDeleteBulk messageDeleteBulk}), * channel ({@link Client#event:channelDelete channelDelete}), * thread ({@link Client#event:threadDelete threadDelete}), or * guild ({@link Client#event:guildDelete guildDelete}) is deleted. * @extends {Collector} */ class ReactionCollector extends Collector { /** * @param {Message} message The message upon which to collect reactions * @param {ReactionCollectorOptions} [options={}] The options to apply to this collector */ constructor(message, options = {}) { super(message.client, options); /** * The message upon which to collect reactions * @type {Message} */ this.message = message; /** * The users that have reacted to this message * @type {Collection} */ this.users = new Collection(); /** * The total number of reactions collected * @type {number} */ this.total = 0; this.empty = this.empty.bind(this); this._handleChannelDeletion = this._handleChannelDeletion.bind(this); this._handleThreadDeletion = this._handleThreadDeletion.bind(this); this._handleGuildDeletion = this._handleGuildDeletion.bind(this); this._handleMessageDeletion = this._handleMessageDeletion.bind(this); const bulkDeleteListener = messages => { if (messages.has(this.message.id)) this.stop('messageDelete'); }; this.client.incrementMaxListeners(); this.client.on(Events.MessageReactionAdd, this.handleCollect); this.client.on(Events.MessageReactionRemove, this.handleDispose); this.client.on(Events.MessageReactionRemoveAll, this.empty); this.client.on(Events.MessageDelete, this._handleMessageDeletion); this.client.on(Events.MessageBulkDelete, bulkDeleteListener); this.client.on(Events.ChannelDelete, this._handleChannelDeletion); this.client.on(Events.ThreadDelete, this._handleThreadDeletion); this.client.on(Events.GuildDelete, this._handleGuildDeletion); this.once('end', () => { this.client.removeListener(Events.MessageReactionAdd, this.handleCollect); this.client.removeListener(Events.MessageReactionRemove, this.handleDispose); this.client.removeListener(Events.MessageReactionRemoveAll, this.empty); this.client.removeListener(Events.MessageDelete, this._handleMessageDeletion); this.client.removeListener(Events.MessageBulkDelete, bulkDeleteListener); this.client.removeListener(Events.ChannelDelete, this._handleChannelDeletion); this.client.removeListener(Events.ThreadDelete, this._handleThreadDeletion); this.client.removeListener(Events.GuildDelete, this._handleGuildDeletion); this.client.decrementMaxListeners(); }); this.on('collect', (reaction, user) => { /** * Emitted whenever a reaction is newly created on a message. Will emit only when a new reaction is * added to the message, as opposed to {@link Collector#event:collect} which will * be emitted even when a reaction has already been added to the message. * @event ReactionCollector#create * @param {MessageReaction} reaction The reaction that was added * @param {User} user The user that added the reaction */ if (reaction.count === 1) { this.emit('create', reaction, user); } this.total++; this.users.set(user.id, user); }); this.on('remove', (_reaction, user) => { this.total--; if (!this.collected.some(reaction => reaction.users.cache.has(user.id))) this.users.delete(user.id); }); } /** * Handles an incoming reaction for possible collection. * @param {MessageReaction} reaction The reaction to possibly collect * @param {User} user The user that added the reaction * @returns {?(Snowflake|string)} * @private */ collect(reaction) { /** * Emitted whenever a reaction is collected. * @event ReactionCollector#collect * @param {MessageReaction} reaction The reaction that was collected * @param {User} user The user that added the reaction */ if (reaction.message.id !== this.message.id) return null; return ReactionCollector.key(reaction); } /** * Handles a reaction deletion for possible disposal. * @param {MessageReaction} reaction The reaction to possibly dispose of * @param {User} user The user that removed the reaction * @returns {?(Snowflake|string)} */ dispose(reaction, user) { /** * Emitted when the reaction had all the users removed and the `dispose` option is set to true. * @event ReactionCollector#dispose * @param {MessageReaction} reaction The reaction that was disposed of * @param {User} user The user that removed the reaction */ if (reaction.message.id !== this.message.id) return null; /** * Emitted when the reaction had one user removed and the `dispose` option is set to true. * @event ReactionCollector#remove * @param {MessageReaction} reaction The reaction that was removed * @param {User} user The user that removed the reaction */ if (this.collected.has(ReactionCollector.key(reaction)) && this.users.has(user.id)) { this.emit('remove', reaction, user); } return reaction.count ? null : ReactionCollector.key(reaction); } /** * Empties this reaction collector. */ empty() { this.total = 0; this.collected.clear(); this.users.clear(); this.checkEnd(); } /** * The reason this collector has ended with, or null if it hasn't ended yet * @type {?string} * @readonly */ get endReason() { if (this.options.max && this.total >= this.options.max) return 'limit'; if (this.options.maxEmojis && this.collected.size >= this.options.maxEmojis) return 'emojiLimit'; if (this.options.maxUsers && this.users.size >= this.options.maxUsers) return 'userLimit'; return super.endReason; } /** * Handles checking if the message has been deleted, and if so, stops the collector with the reason 'messageDelete'. * @private * @param {Message} message The message that was deleted * @returns {void} */ _handleMessageDeletion(message) { if (message.id === this.message.id) { this.stop('messageDelete'); } } /** * Handles checking if the channel has been deleted, and if so, stops the collector with the reason 'channelDelete'. * @private * @param {GuildChannel} channel The channel that was deleted * @returns {void} */ _handleChannelDeletion(channel) { if (channel.id === this.message.channelId || channel.threads?.cache.has(this.message.channelId)) { this.stop('channelDelete'); } } /** * Handles checking if the thread has been deleted, and if so, stops the collector with the reason 'threadDelete'. * @private * @param {ThreadChannel} thread The thread that was deleted * @returns {void} */ _handleThreadDeletion(thread) { if (thread.id === this.message.channelId) { this.stop('threadDelete'); } } /** * Handles checking if the guild has been deleted, and if so, stops the collector with the reason 'guildDelete'. * @private * @param {Guild} guild The guild that was deleted * @returns {void} */ _handleGuildDeletion(guild) { if (guild.id === this.message.guild?.id) { this.stop('guildDelete'); } } /** * Gets the collector key for a reaction. * @param {MessageReaction} reaction The message reaction to get the key for * @returns {Snowflake|string} */ static key(reaction) { return reaction.emoji.id ?? reaction.emoji.name; } } module.exports = ReactionCollector; node_modules/discord.js/src/structures/AutoModerationRule.js 0000664 00000025300 15114741631 0020422 0 ustar 00 'use strict'; const { Collection } = require('@discordjs/collection'); const Base = require('./Base'); const { _transformAPIAutoModerationAction } = require('../util/Transformers'); /** * Represents an auto moderation rule. * @extends {Base} */ class AutoModerationRule extends Base { constructor(client, data, guild) { super(client); /** * The id of this auto moderation rule. * @type {Snowflake} */ this.id = data.id; /** * The guild this auto moderation rule is for. * @type {Guild} */ this.guild = guild; /** * The user that created this auto moderation rule. * @type {Snowflake} */ this.creatorId = data.creator_id; /** * The trigger type of this auto moderation rule. * @type {AutoModerationRuleTriggerType} */ this.triggerType = data.trigger_type; this._patch(data); } _patch(data) { if ('name' in data) { /** * The name of this auto moderation rule. * @type {string} */ this.name = data.name; } if ('event_type' in data) { /** * The event type of this auto moderation rule. * @type {AutoModerationRuleEventType} */ this.eventType = data.event_type; } if ('trigger_metadata' in data) { /** * Additional data used to determine whether an auto moderation rule should be triggered. * @typedef {Object} AutoModerationTriggerMetadata * @property {string[]} keywordFilter The substrings that will be searched for in the content * @property {string[]} regexPatterns The regular expression patterns which will be matched against the content * <info>Only Rust-flavored regular expressions are supported.</info> * @property {AutoModerationRuleKeywordPresetType[]} presets * The internally pre-defined wordsets which will be searched for in the content * @property {string[]} allowList The substrings that will be exempt from triggering * {@link AutoModerationRuleTriggerType.Keyword}, * {@link AutoModerationRuleTriggerType.KeywordPreset}, * and {@link AutoModerationRuleTriggerType.MemberProfile} * @property {?number} mentionTotalLimit The total number of role & user mentions allowed per message * @property {boolean} mentionRaidProtectionEnabled Whether mention raid protection is enabled */ /** * The trigger metadata of the rule. * @type {AutoModerationTriggerMetadata} */ this.triggerMetadata = { keywordFilter: data.trigger_metadata.keyword_filter ?? [], regexPatterns: data.trigger_metadata.regex_patterns ?? [], presets: data.trigger_metadata.presets ?? [], allowList: data.trigger_metadata.allow_list ?? [], mentionTotalLimit: data.trigger_metadata.mention_total_limit ?? null, mentionRaidProtectionEnabled: data.trigger_metadata.mention_raid_protection_enabled ?? false, }; } if ('actions' in data) { /** * An object containing information about an auto moderation rule action. * @typedef {Object} AutoModerationAction * @property {AutoModerationActionType} type The type of this auto moderation rule action * @property {AutoModerationActionMetadata} metadata Additional metadata needed during execution */ /** * Additional data used when an auto moderation rule is executed. * @typedef {Object} AutoModerationActionMetadata * @property {?Snowflake} channelId The id of the channel to which content will be logged * @property {?number} durationSeconds The timeout duration in seconds * @property {?string} customMessage The custom message that is shown whenever a message is blocked */ /** * The actions of this auto moderation rule. * @type {AutoModerationAction[]} */ this.actions = data.actions.map(action => _transformAPIAutoModerationAction(action)); } if ('enabled' in data) { /** * Whether this auto moderation rule is enabled. * @type {boolean} */ this.enabled = data.enabled; } if ('exempt_roles' in data) { /** * The roles exempt by this auto moderation rule. * @type {Collection<Snowflake, Role>} */ this.exemptRoles = new Collection( data.exempt_roles.map(exemptRole => [exemptRole, this.guild.roles.cache.get(exemptRole)]), ); } if ('exempt_channels' in data) { /** * The channels exempt by this auto moderation rule. * @type {Collection<Snowflake, GuildChannel|ThreadChannel>} */ this.exemptChannels = new Collection( data.exempt_channels.map(exemptChannel => [exemptChannel, this.guild.channels.cache.get(exemptChannel)]), ); } } /** * Edits this auto moderation rule. * @param {AutoModerationRuleEditOptions} options Options for editing this auto moderation rule * @returns {Promise<AutoModerationRule>} */ edit(options) { return this.guild.autoModerationRules.edit(this.id, options); } /** * Deletes this auto moderation rule. * @param {string} [reason] The reason for deleting this auto moderation rule * @returns {Promise<void>} */ delete(reason) { return this.guild.autoModerationRules.delete(this.id, reason); } /** * Sets the name for this auto moderation rule. * @param {string} name The name of this auto moderation rule * @param {string} [reason] The reason for changing the name of this auto moderation rule * @returns {Promise<AutoModerationRule>} */ setName(name, reason) { return this.edit({ name, reason }); } /** * Sets the event type for this auto moderation rule. * @param {AutoModerationRuleEventType} eventType The event type of this auto moderation rule * @param {string} [reason] The reason for changing the event type of this auto moderation rule * @returns {Promise<AutoModerationRule>} */ setEventType(eventType, reason) { return this.edit({ eventType, reason }); } /** * Sets the keyword filter for this auto moderation rule. * @param {string[]} keywordFilter The keyword filter of this auto moderation rule * @param {string} [reason] The reason for changing the keyword filter of this auto moderation rule * @returns {Promise<AutoModerationRule>} */ setKeywordFilter(keywordFilter, reason) { return this.edit({ triggerMetadata: { ...this.triggerMetadata, keywordFilter }, reason }); } /** * Sets the regular expression patterns for this auto moderation rule. * @param {string[]} regexPatterns The regular expression patterns of this auto moderation rule * <info>Only Rust-flavored regular expressions are supported.</info> * @param {string} [reason] The reason for changing the regular expression patterns of this auto moderation rule * @returns {Promise<AutoModerationRule>} */ setRegexPatterns(regexPatterns, reason) { return this.edit({ triggerMetadata: { ...this.triggerMetadata, regexPatterns }, reason }); } /** * Sets the presets for this auto moderation rule. * @param {AutoModerationRuleKeywordPresetType[]} presets The presets of this auto moderation rule * @param {string} [reason] The reason for changing the presets of this auto moderation rule * @returns {Promise<AutoModerationRule>} */ setPresets(presets, reason) { return this.edit({ triggerMetadata: { ...this.triggerMetadata, presets }, reason }); } /** * Sets the allow list for this auto moderation rule. * @param {string[]} allowList The substrings that will be exempt from triggering * {@link AutoModerationRuleTriggerType.Keyword}, * {@link AutoModerationRuleTriggerType.KeywordPreset}, * and {@link AutoModerationRuleTriggerType.MemberProfile} * @param {string} [reason] The reason for changing the allow list of this auto moderation rule * @returns {Promise<AutoModerationRule>} */ setAllowList(allowList, reason) { return this.edit({ triggerMetadata: { ...this.triggerMetadata, allowList }, reason }); } /** * Sets the mention total limit for this auto moderation rule. * @param {number} mentionTotalLimit The total number of unique role and user mentions allowed per message * @param {string} [reason] The reason for changing the mention total limit of this auto moderation rule * @returns {Promise<AutoModerationRule>} */ setMentionTotalLimit(mentionTotalLimit, reason) { return this.edit({ triggerMetadata: { ...this.triggerMetadata, mentionTotalLimit }, reason }); } /** * Sets whether to enable mention raid protection for this auto moderation rule. * @param {boolean} mentionRaidProtectionEnabled * Whether to enable mention raid protection for this auto moderation rule * @param {string} [reason] The reason for changing the mention raid protection of this auto moderation rule * @returns {Promise<AutoModerationRule>} */ setMentionRaidProtectionEnabled(mentionRaidProtectionEnabled, reason) { return this.edit({ triggerMetadata: { ...this.triggerMetadata, mentionRaidProtectionEnabled }, reason }); } /** * Sets the actions for this auto moderation rule. * @param {AutoModerationActionOptions[]} actions The actions of this auto moderation rule * @param {string} [reason] The reason for changing the actions of this auto moderation rule * @returns {Promise<AutoModerationRule>} */ setActions(actions, reason) { return this.edit({ actions, reason }); } /** * Sets whether this auto moderation rule should be enabled. * @param {boolean} [enabled=true] Whether to enable this auto moderation rule * @param {string} [reason] The reason for enabling or disabling this auto moderation rule * @returns {Promise<AutoModerationRule>} */ setEnabled(enabled = true, reason) { return this.edit({ enabled, reason }); } /** * Sets the exempt roles for this auto moderation rule. * @param {Collection<Snowflake, Role>|RoleResolvable[]} [exemptRoles] * The roles that should not be affected by the auto moderation rule * @param {string} [reason] The reason for changing the exempt roles of this auto moderation rule * @returns {Promise<AutoModerationRule>} */ setExemptRoles(exemptRoles, reason) { return this.edit({ exemptRoles, reason }); } /** * Sets the exempt channels for this auto moderation rule. * @param {Collection<Snowflake, GuildChannel|ThreadChannel>|GuildChannelResolvable[]} [exemptChannels] * The channels that should not be affected by the auto moderation rule * @param {string} [reason] The reason for changing the exempt channels of this auto moderation rule * @returns {Promise<AutoModerationRule>} */ setExemptChannels(exemptChannels, reason) { return this.edit({ exemptChannels, reason }); } } module.exports = AutoModerationRule; node_modules/discord.js/src/structures/ThreadOnlyChannel.js 0000664 00000017517 15114741631 0020215 0 ustar 00 'use strict'; const GuildChannel = require('./GuildChannel'); const TextBasedChannel = require('./interfaces/TextBasedChannel'); const GuildForumThreadManager = require('../managers/GuildForumThreadManager'); const { transformAPIGuildForumTag, transformAPIGuildDefaultReaction } = require('../util/Channels'); /** * @typedef {Object} GuildForumTagEmoji * @property {?Snowflake} id The id of a guild's custom emoji * @property {?string} name The unicode character of the emoji */ /** * @typedef {Object} GuildForumTag * @property {Snowflake} id The id of the tag * @property {string} name The name of the tag * @property {boolean} moderated Whether this tag can only be added to or removed from threads * by a member with the `ManageThreads` permission * @property {?GuildForumTagEmoji} emoji The emoji of this tag */ /** * @typedef {Object} GuildForumTagData * @property {Snowflake} [id] The id of the tag * @property {string} name The name of the tag * @property {boolean} [moderated] Whether this tag can only be added to or removed from threads * by a member with the `ManageThreads` permission * @property {?GuildForumTagEmoji} [emoji] The emoji of this tag */ /** * @typedef {Object} DefaultReactionEmoji * @property {?Snowflake} id The id of a guild's custom emoji * @property {?string} name The unicode character of the emoji */ /** * Represents symbols utilized by thread-only channels. * @extends {GuildChannel} * @implements {TextBasedChannel} * @abstract */ class ThreadOnlyChannel extends GuildChannel { constructor(guild, data, client) { super(guild, data, client, false); /** * A manager of the threads belonging to this channel * @type {GuildForumThreadManager} */ this.threads = new GuildForumThreadManager(this); this._patch(data); } _patch(data) { super._patch(data); if ('available_tags' in data) { /** * The set of tags that can be used in this channel. * @type {GuildForumTag[]} */ this.availableTags = data.available_tags.map(tag => transformAPIGuildForumTag(tag)); } else { this.availableTags ??= []; } if ('default_reaction_emoji' in data) { /** * The emoji to show in the add reaction button on a thread in a guild forum channel * @type {?DefaultReactionEmoji} */ this.defaultReactionEmoji = data.default_reaction_emoji ? transformAPIGuildDefaultReaction(data.default_reaction_emoji) : null; } else { this.defaultReactionEmoji ??= null; } if ('default_thread_rate_limit_per_user' in data) { /** * The initial rate limit per user (slowmode) to set on newly created threads in a channel. * @type {?number} */ this.defaultThreadRateLimitPerUser = data.default_thread_rate_limit_per_user; } else { this.defaultThreadRateLimitPerUser ??= null; } if ('rate_limit_per_user' in data) { /** * The rate limit per user (slowmode) for this channel. * @type {?number} */ this.rateLimitPerUser = data.rate_limit_per_user; } else { this.rateLimitPerUser ??= null; } if ('default_auto_archive_duration' in data) { /** * The default auto archive duration for newly created threads in this channel. * @type {?ThreadAutoArchiveDuration} */ this.defaultAutoArchiveDuration = data.default_auto_archive_duration; } else { this.defaultAutoArchiveDuration ??= null; } if ('nsfw' in data) { /** * If this channel is considered NSFW. * @type {boolean} */ this.nsfw = data.nsfw; } else { this.nsfw ??= false; } if ('topic' in data) { /** * The topic of this channel. * @type {?string} */ this.topic = data.topic; } if ('default_sort_order' in data) { /** * The default sort order mode used to order posts * @type {?SortOrderType} */ this.defaultSortOrder = data.default_sort_order; } else { this.defaultSortOrder ??= null; } } /** * Sets the available tags for this forum channel * @param {GuildForumTagData[]} availableTags The tags to set as available in this channel * @param {string} [reason] Reason for changing the available tags * @returns {Promise<this>} */ setAvailableTags(availableTags, reason) { return this.edit({ availableTags, reason }); } /** * Sets the default reaction emoji for this channel * @param {?DefaultReactionEmoji} defaultReactionEmoji The emoji to set as the default reaction emoji * @param {string} [reason] Reason for changing the default reaction emoji * @returns {Promise<this>} */ setDefaultReactionEmoji(defaultReactionEmoji, reason) { return this.edit({ defaultReactionEmoji, reason }); } /** * Sets the default rate limit per user (slowmode) for new threads in this channel * @param {number} defaultThreadRateLimitPerUser The rate limit to set on newly created threads in this channel * @param {string} [reason] Reason for changing the default rate limit * @returns {Promise<this>} */ setDefaultThreadRateLimitPerUser(defaultThreadRateLimitPerUser, reason) { return this.edit({ defaultThreadRateLimitPerUser, reason }); } /** * Creates an invite to this guild channel. * @param {InviteCreateOptions} [options={}] The options for creating the invite * @returns {Promise<Invite>} * @example * // Create an invite to a channel * channel.createInvite() * .then(invite => console.log(`Created an invite with a code of ${invite.code}`)) * .catch(console.error); */ createInvite(options) { return this.guild.invites.create(this.id, options); } /** * Fetches a collection of invites to this guild channel. * Resolves with a collection mapping invites by their codes. * @param {boolean} [cache=true] Whether to cache the fetched invites * @returns {Promise<Collection<string, Invite>>} */ fetchInvites(cache) { return this.guild.invites.fetch({ channelId: this.id, cache }); } /** * Sets the default auto archive duration for all newly created threads in this channel. * @param {ThreadAutoArchiveDuration} defaultAutoArchiveDuration The new default auto archive duration * @param {string} [reason] Reason for changing the channel's default auto archive duration * @returns {Promise<this>} */ setDefaultAutoArchiveDuration(defaultAutoArchiveDuration, reason) { return this.edit({ defaultAutoArchiveDuration, reason }); } /** * Sets a new topic for the guild channel. * @param {?string} topic The new topic for the guild channel * @param {string} [reason] Reason for changing the guild channel's topic * @returns {Promise<this>} * @example * // Set a new channel topic * channel.setTopic('needs more rate limiting') * .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`)) * .catch(console.error); */ setTopic(topic, reason) { return this.edit({ topic, reason }); } /** * Sets the default sort order mode used to order posts * @param {?SortOrderType} defaultSortOrder The default sort order mode to set on this channel * @param {string} [reason] Reason for changing the default sort order * @returns {Promise<this>} */ setDefaultSortOrder(defaultSortOrder, reason) { return this.edit({ defaultSortOrder, reason }); } // These are here only for documentation purposes - they are implemented by TextBasedChannel /* eslint-disable no-empty-function */ createWebhook() {} fetchWebhooks() {} setNSFW() {} setRateLimitPerUser() {} } TextBasedChannel.applyToClass(ThreadOnlyChannel, true, [ 'send', 'lastMessage', 'lastPinAt', 'bulkDelete', 'sendTyping', 'createMessageCollector', 'awaitMessages', 'createMessageComponentCollector', 'awaitMessageComponent', ]); module.exports = ThreadOnlyChannel; node_modules/discord.js/src/structures/InviteStageInstance.js 0000664 00000003530 15114741631 0020550 0 ustar 00 'use strict'; const { Collection } = require('@discordjs/collection'); const Base = require('./Base'); /** * Represents the data about a public {@link StageInstance} in an {@link Invite}. * @extends {Base} * @deprecated */ class InviteStageInstance extends Base { constructor(client, data, channelId, guildId) { super(client); /** * The id of the stage channel this invite is for * @type {Snowflake} */ this.channelId = channelId; /** * The stage channel's guild id * @type {Snowflake} */ this.guildId = guildId; /** * The members speaking in the stage channel * @type {Collection<Snowflake, GuildMember>} */ this.members = new Collection(); this._patch(data); } _patch(data) { if ('topic' in data) { /** * The topic of the stage instance * @type {string} */ this.topic = data.topic; } if ('participant_count' in data) { /** * The number of users in the stage channel * @type {number} */ this.participantCount = data.participant_count; } if ('speaker_count' in data) { /** * The number of users speaking in the stage channel * @type {number} */ this.speakerCount = data.speaker_count; } this.members.clear(); for (const rawMember of data.members) { const member = this.guild.members._add(rawMember); this.members.set(member.id, member); } } /** * The stage channel this invite is for * @type {?StageChannel} * @readonly */ get channel() { return this.client.channels.resolve(this.channelId); } /** * The guild of the stage channel this invite is for * @type {?Guild} * @readonly */ get guild() { return this.client.guilds.resolve(this.guildId); } } module.exports = InviteStageInstance; node_modules/discord.js/src/structures/SKU.js 0000664 00000001746 15114741631 0015312 0 ustar 00 'use strict'; const Base = require('./Base'); const { SKUFlagsBitField } = require('../util/SKUFlagsBitField'); /** * Represents a premium application SKU. * @extends {Base} */ class SKU extends Base { constructor(client, data) { super(client); /** * The id of the SKU * @type {Snowflake} */ this.id = data.id; /** * The type of the SKU * @type {SKUType} */ this.type = data.type; /** * The id of the parent application * @type {Snowflake} */ this.applicationId = data.application_id; /** * The customer-facing name of the premium offering * @type {string} */ this.name = data.name; /** * The system-generated URL slug based on this SKU's name * @type {string} */ this.slug = data.slug; /** * Flags that describe the SKU * @type {Readonly<SKUFlagsBitField>} */ this.flags = new SKUFlagsBitField(data.flags).freeze(); } } exports.SKU = SKU; node_modules/discord.js/src/structures/GuildEmoji.js 0000664 00000007405 15114741631 0016676 0 ustar 00 'use strict'; const { PermissionFlagsBits } = require('discord-api-types/v10'); const BaseGuildEmoji = require('./BaseGuildEmoji'); const { DiscordjsError, ErrorCodes } = require('../errors'); const GuildEmojiRoleManager = require('../managers/GuildEmojiRoleManager'); /** * Represents a custom emoji. * @extends {BaseGuildEmoji} */ class GuildEmoji extends BaseGuildEmoji { constructor(client, data, guild) { super(client, data, guild); /** * The user who created this emoji * @type {?User} */ this.author = null; /** * Array of role ids this emoji is active for * @name GuildEmoji#_roles * @type {Snowflake[]} * @private */ Object.defineProperty(this, '_roles', { value: [], writable: true }); this._patch(data); } /** * The guild this emoji is part of * @type {Guild} * @name GuildEmoji#guild */ _clone() { const clone = super._clone(); clone._roles = this._roles.slice(); return clone; } _patch(data) { super._patch(data); if (data.user) this.author = this.client.users._add(data.user); if (data.roles) this._roles = data.roles; } /** * Whether the emoji is deletable by the client user * @type {boolean} * @readonly */ get deletable() { if (!this.guild.members.me) throw new DiscordjsError(ErrorCodes.GuildUncachedMe); return !this.managed && this.guild.members.me.permissions.has(PermissionFlagsBits.ManageGuildExpressions); } /** * A manager for roles this emoji is active for. * @type {GuildEmojiRoleManager} * @readonly */ get roles() { return new GuildEmojiRoleManager(this); } /** * Fetches the author for this emoji * @returns {Promise<User>} */ fetchAuthor() { return this.guild.emojis.fetchAuthor(this); } /** * Data for editing an emoji. * @typedef {Object} GuildEmojiEditOptions * @property {string} [name] The name of the emoji * @property {Collection<Snowflake, Role>|RoleResolvable[]} [roles] Roles to restrict emoji to * @property {string} [reason] Reason for editing this emoji */ /** * Edits the emoji. * @param {GuildEmojiEditOptions} options The options to provide * @returns {Promise<GuildEmoji>} * @example * // Edit an emoji * emoji.edit({ name: 'newemoji' }) * .then(emoji => console.log(`Edited emoji ${emoji}`)) * .catch(console.error); */ edit(options) { return this.guild.emojis.edit(this.id, options); } /** * Sets the name of the emoji. * @param {string} name The new name for the emoji * @param {string} [reason] Reason for changing the emoji's name * @returns {Promise<GuildEmoji>} */ setName(name, reason) { return this.edit({ name, reason }); } /** * Deletes the emoji. * @param {string} [reason] Reason for deleting the emoji * @returns {Promise<GuildEmoji>} */ async delete(reason) { await this.guild.emojis.delete(this.id, reason); return this; } /** * Whether this emoji is the same as another one. * @param {GuildEmoji|APIEmoji} other The emoji to compare it to * @returns {boolean} */ equals(other) { if (other instanceof GuildEmoji) { return ( other.id === this.id && other.name === this.name && other.managed === this.managed && other.available === this.available && other.requiresColons === this.requiresColons && other.roles.cache.size === this.roles.cache.size && other.roles.cache.every(role => this.roles.cache.has(role.id)) ); } else { return ( other.id === this.id && other.name === this.name && other.roles.length === this.roles.cache.size && other.roles.every(role => this.roles.cache.has(role)) ); } } } module.exports = GuildEmoji; node_modules/discord.js/src/structures/ApplicationCommand.js 0000664 00000061652 15114741631 0020414 0 ustar 00 'use strict'; const { DiscordSnowflake } = require('@sapphire/snowflake'); const { ApplicationCommandOptionType } = require('discord-api-types/v10'); const isEqual = require('fast-deep-equal'); const Base = require('./Base'); const ApplicationCommandPermissionsManager = require('../managers/ApplicationCommandPermissionsManager'); const PermissionsBitField = require('../util/PermissionsBitField'); /** * Represents an application command. * @extends {Base} */ class ApplicationCommand extends Base { constructor(client, data, guild, guildId) { super(client); /** * The command's id * @type {Snowflake} */ this.id = data.id; /** * The parent application's id * @type {Snowflake} */ this.applicationId = data.application_id; /** * The guild this command is part of * @type {?Guild} */ this.guild = guild ?? null; /** * The guild's id this command is part of, this may be non-null when `guild` is `null` if the command * was fetched from the `ApplicationCommandManager` * @type {?Snowflake} */ this.guildId = guild?.id ?? guildId ?? null; /** * The manager for permissions of this command on its guild or arbitrary guilds when the command is global * @type {ApplicationCommandPermissionsManager} */ this.permissions = new ApplicationCommandPermissionsManager(this); /** * The type of this application command * @type {ApplicationCommandType} */ this.type = data.type; /** * Whether this command is age-restricted (18+) * @type {boolean} */ this.nsfw = data.nsfw ?? false; this._patch(data); } _patch(data) { if ('name' in data) { /** * The name of this command * @type {string} */ this.name = data.name; } if ('name_localizations' in data) { /** * The name localizations for this command * @type {?Object<Locale, string>} */ this.nameLocalizations = data.name_localizations; } else { this.nameLocalizations ??= null; } if ('name_localized' in data) { /** * The localized name for this command * @type {?string} */ this.nameLocalized = data.name_localized; } else { this.nameLocalized ??= null; } if ('description' in data) { /** * The description of this command * @type {string} */ this.description = data.description; } if ('description_localizations' in data) { /** * The description localizations for this command * @type {?Object<Locale, string>} */ this.descriptionLocalizations = data.description_localizations; } else { this.descriptionLocalizations ??= null; } if ('description_localized' in data) { /** * The localized description for this command * @type {?string} */ this.descriptionLocalized = data.description_localized; } else { this.descriptionLocalized ??= null; } if ('options' in data) { /** * The options of this command * @type {ApplicationCommandOption[]} */ this.options = data.options.map(option => this.constructor.transformOption(option, true)); } else { this.options ??= []; } if ('default_member_permissions' in data) { /** * The default bitfield used to determine whether this command be used in a guild * @type {?Readonly<PermissionsBitField>} */ this.defaultMemberPermissions = data.default_member_permissions ? new PermissionsBitField(BigInt(data.default_member_permissions)).freeze() : null; } else { this.defaultMemberPermissions ??= null; } if ('dm_permission' in data) { /** * Whether the command can be used in DMs * <info>This property is always `null` on guild commands</info> * @type {?boolean} * @deprecated Use {@link ApplicationCommand#contexts} instead. */ this.dmPermission = data.dm_permission; } else { this.dmPermission ??= null; } if ('integration_types' in data) { /** * Installation context(s) where the command is available * <info>Only for globally-scoped commands</info> * @type {?ApplicationIntegrationType[]} */ this.integrationTypes = data.integration_types; } else { this.integrationTypes ??= null; } if ('contexts' in data) { /** * Interaction context(s) where the command can be used * <info>Only for globally-scoped commands</info> * @type {?InteractionContextType[]} */ this.contexts = data.contexts; } else { this.contexts ??= null; } if ('handler' in data) { /** * Determines whether the interaction is handled by the app's interactions handler or by Discord. * <info>Only available for {@link ApplicationCommandType.PrimaryEntryPoint} commands on * applications with the {@link ApplicationFlags.Embedded} flag (i.e, those that have an Activity)</info> * @type {?EntryPointCommandHandlerType} */ this.handler = data.handler; } else { this.handler ??= null; } if ('version' in data) { /** * Autoincrementing version identifier updated during substantial record changes * @type {Snowflake} */ this.version = data.version; } } /** * The timestamp the command was created at * @type {number} * @readonly */ get createdTimestamp() { return DiscordSnowflake.timestampFrom(this.id); } /** * The time the command was created at * @type {Date} * @readonly */ get createdAt() { return new Date(this.createdTimestamp); } /** * The manager that this command belongs to * @type {ApplicationCommandManager} * @readonly */ get manager() { return (this.guild ?? this.client.application).commands; } /** * Data for creating or editing an application command. * @typedef {Object} ApplicationCommandData * @property {string} name The name of the command, must be in all lowercase if type is * {@link ApplicationCommandType.ChatInput} * @property {Object<Locale, string>} [nameLocalizations] The localizations for the command name * @property {string} description The description of the command, * if type is {@link ApplicationCommandType.ChatInput} or {@link ApplicationCommandType.PrimaryEntryPoint} * @property {boolean} [nsfw] Whether the command is age-restricted * @property {Object<Locale, string>} [descriptionLocalizations] The localizations for the command description, * if type is {@link ApplicationCommandType.ChatInput} or {@link ApplicationCommandType.PrimaryEntryPoint} * @property {ApplicationCommandType} [type=ApplicationCommandType.ChatInput] The type of the command * @property {ApplicationCommandOptionData[]} [options] Options for the command * @property {?PermissionResolvable} [defaultMemberPermissions] The bitfield used to determine the default permissions * a member needs in order to run the command * @property {boolean} [dmPermission] Whether the command is enabled in DMs * @property {ApplicationIntegrationType[]} [integrationTypes] Installation contexts where the command is available * @property {InteractionContextType[]} [contexts] Interaction contexts where the command can be used * @property {EntryPointCommandHandlerType} [handler] Whether the interaction is handled by the app's * interactions handler or by Discord. */ /** * An option for an application command or subcommand. * <info>In addition to the listed properties, when used as a parameter, * API style `snake_case` properties can be used for compatibility with generators like `@discordjs/builders`.</info> * <warn>Note that providing a value for the `camelCase` counterpart for any `snake_case` property * will discard the provided `snake_case` property.</warn> * @typedef {Object} ApplicationCommandOptionData * @property {ApplicationCommandOptionType} type The type of the option * @property {string} name The name of the option * @property {Object<Locale, string>} [nameLocalizations] The name localizations for the option * @property {string} description The description of the option * @property {Object<Locale, string>} [descriptionLocalizations] The description localizations for the option * @property {boolean} [autocomplete] Whether the autocomplete interaction is enabled for a * {@link ApplicationCommandOptionType.String}, {@link ApplicationCommandOptionType.Integer} or * {@link ApplicationCommandOptionType.Number} option * @property {boolean} [required] Whether the option is required * @property {ApplicationCommandOptionChoiceData[]} [choices] The choices of the option for the user to pick from * @property {ApplicationCommandOptionData[]} [options] Additional options if this option is a subcommand (group) * @property {ChannelType[]} [channelTypes] When the option type is channel, * the allowed types of channels that can be selected * @property {number} [minValue] The minimum value for an {@link ApplicationCommandOptionType.Integer} or * {@link ApplicationCommandOptionType.Number} option * @property {number} [maxValue] The maximum value for an {@link ApplicationCommandOptionType.Integer} or * {@link ApplicationCommandOptionType.Number} option * @property {number} [minLength] The minimum length for an {@link ApplicationCommandOptionType.String} option * (maximum of `6000`) * @property {number} [maxLength] The maximum length for an {@link ApplicationCommandOptionType.String} option * (maximum of `6000`) */ /** * @typedef {Object} ApplicationCommandOptionChoiceData * @property {string} name The name of the choice * @property {Object<Locale, string>} [nameLocalizations] The localized names for this choice * @property {string|number} value The value of the choice */ /** * Edits this application command. * @param {Partial<ApplicationCommandData>} data The data to update the command with * @returns {Promise<ApplicationCommand>} * @example * // Edit the description of this command * command.edit({ * description: 'New description', * }) * .then(console.log) * .catch(console.error); */ edit(data) { return this.manager.edit(this, data, this.guildId); } /** * Edits the name of this ApplicationCommand * @param {string} name The new name of the command * @returns {Promise<ApplicationCommand>} */ setName(name) { return this.edit({ name }); } /** * Edits the localized names of this ApplicationCommand * @param {Object<Locale, string>} nameLocalizations The new localized names for the command * @returns {Promise<ApplicationCommand>} * @example * // Edit the name localizations of this command * command.setLocalizedNames({ * 'en-GB': 'test', * 'pt-BR': 'teste', * }) * .then(console.log) * .catch(console.error) */ setNameLocalizations(nameLocalizations) { return this.edit({ nameLocalizations }); } /** * Edits the description of this ApplicationCommand * @param {string} description The new description of the command * @returns {Promise<ApplicationCommand>} */ setDescription(description) { return this.edit({ description }); } /** * Edits the localized descriptions of this ApplicationCommand * @param {Object<Locale, string>} descriptionLocalizations The new localized descriptions for the command * @returns {Promise<ApplicationCommand>} * @example * // Edit the description localizations of this command * command.setDescriptionLocalizations({ * 'en-GB': 'A test command', * 'pt-BR': 'Um comando de teste', * }) * .then(console.log) * .catch(console.error) */ setDescriptionLocalizations(descriptionLocalizations) { return this.edit({ descriptionLocalizations }); } /** * Edits the default member permissions of this ApplicationCommand * @param {?PermissionResolvable} defaultMemberPermissions The default member permissions required to run this command * @returns {Promise<ApplicationCommand>} */ setDefaultMemberPermissions(defaultMemberPermissions) { return this.edit({ defaultMemberPermissions }); } /** * Edits the DM permission of this ApplicationCommand * @param {boolean} [dmPermission=true] Whether the command can be used in DMs * @returns {Promise<ApplicationCommand>} */ setDMPermission(dmPermission = true) { return this.edit({ dmPermission }); } /** * Edits the options of this ApplicationCommand * @param {ApplicationCommandOptionData[]} options The options to set for this command * @returns {Promise<ApplicationCommand>} */ setOptions(options) { return this.edit({ options }); } /** * Deletes this command. * @returns {Promise<ApplicationCommand>} * @example * // Delete this command * command.delete() * .then(console.log) * .catch(console.error); */ delete() { return this.manager.delete(this, this.guildId); } /** * Whether this command equals another command. It compares all properties, so for most operations * it is advisable to just compare `command.id === command2.id` as it is much faster and is often * what most users need. * @param {ApplicationCommand|ApplicationCommandData|APIApplicationCommand} command The command to compare with * @param {boolean} [enforceOptionOrder=false] Whether to strictly check that options and choices are in the same * order in the array <info>The client may not always respect this ordering!</info> * @returns {boolean} */ equals(command, enforceOptionOrder = false) { // If given an id, check if the id matches if (command.id && this.id !== command.id) return false; let defaultMemberPermissions = null; let dmPermission = command.dmPermission ?? command.dm_permission; if ('default_member_permissions' in command) { defaultMemberPermissions = command.default_member_permissions ? new PermissionsBitField(BigInt(command.default_member_permissions)).bitfield : null; } if ('defaultMemberPermissions' in command) { defaultMemberPermissions = command.defaultMemberPermissions !== null ? new PermissionsBitField(command.defaultMemberPermissions).bitfield : null; } // Check top level parameters if ( command.name !== this.name || ('description' in command && command.description !== this.description) || ('version' in command && command.version !== this.version) || (command.type && command.type !== this.type) || ('nsfw' in command && command.nsfw !== this.nsfw) || // Future proof for options being nullable // TODO: remove ?? 0 on each when nullable (command.options?.length ?? 0) !== (this.options?.length ?? 0) || defaultMemberPermissions !== (this.defaultMemberPermissions?.bitfield ?? null) || (dmPermission !== undefined && dmPermission !== this.dmPermission) || !isEqual(command.nameLocalizations ?? command.name_localizations ?? {}, this.nameLocalizations ?? {}) || !isEqual( command.descriptionLocalizations ?? command.description_localizations ?? {}, this.descriptionLocalizations ?? {}, ) || !isEqual(command.integrationTypes ?? command.integration_types ?? [], this.integrationTypes ?? []) || !isEqual(command.contexts ?? [], this.contexts ?? []) || ('handler' in command && command.handler !== this.handler) ) { return false; } if (command.options) { return this.constructor.optionsEqual(this.options, command.options, enforceOptionOrder); } return true; } /** * Recursively checks that all options for an {@link ApplicationCommand} are equal to the provided options. * In most cases it is better to compare using {@link ApplicationCommand#equals} * @param {ApplicationCommandOptionData[]} existing The options on the existing command, * should be {@link ApplicationCommand#options} * @param {ApplicationCommandOptionData[]|APIApplicationCommandOption[]} options The options to compare against * @param {boolean} [enforceOptionOrder=false] Whether to strictly check that options and choices are in the same * order in the array <info>The client may not always respect this ordering!</info> * @returns {boolean} */ static optionsEqual(existing, options, enforceOptionOrder = false) { if (existing.length !== options.length) return false; if (enforceOptionOrder) { return existing.every((option, index) => this._optionEquals(option, options[index], enforceOptionOrder)); } const newOptions = new Map(options.map(option => [option.name, option])); for (const option of existing) { const foundOption = newOptions.get(option.name); if (!foundOption || !this._optionEquals(option, foundOption)) return false; } return true; } /** * Checks that an option for an {@link ApplicationCommand} is equal to the provided option * In most cases it is better to compare using {@link ApplicationCommand#equals} * @param {ApplicationCommandOptionData} existing The option on the existing command, * should be from {@link ApplicationCommand#options} * @param {ApplicationCommandOptionData|APIApplicationCommandOption} option The option to compare against * @param {boolean} [enforceOptionOrder=false] Whether to strictly check that options or choices are in the same * order in their array <info>The client may not always respect this ordering!</info> * @returns {boolean} * @private */ static _optionEquals(existing, option, enforceOptionOrder = false) { if ( option.name !== existing.name || option.type !== existing.type || option.description !== existing.description || option.autocomplete !== existing.autocomplete || (option.required ?? ([ApplicationCommandOptionType.Subcommand, ApplicationCommandOptionType.SubcommandGroup].includes(option.type) ? undefined : false)) !== existing.required || option.choices?.length !== existing.choices?.length || option.options?.length !== existing.options?.length || (option.channelTypes ?? option.channel_types)?.length !== existing.channelTypes?.length || (option.minValue ?? option.min_value) !== existing.minValue || (option.maxValue ?? option.max_value) !== existing.maxValue || (option.minLength ?? option.min_length) !== existing.minLength || (option.maxLength ?? option.max_length) !== existing.maxLength || !isEqual(option.nameLocalizations ?? option.name_localizations ?? {}, existing.nameLocalizations ?? {}) || !isEqual( option.descriptionLocalizations ?? option.description_localizations ?? {}, existing.descriptionLocalizations ?? {}, ) ) { return false; } if (existing.choices) { if ( enforceOptionOrder && !existing.choices.every( (choice, index) => choice.name === option.choices[index].name && choice.value === option.choices[index].value && isEqual( choice.nameLocalizations ?? {}, option.choices[index].nameLocalizations ?? option.choices[index].name_localizations ?? {}, ), ) ) { return false; } if (!enforceOptionOrder) { const newChoices = new Map(option.choices.map(choice => [choice.name, choice])); for (const choice of existing.choices) { const foundChoice = newChoices.get(choice.name); if (!foundChoice || foundChoice.value !== choice.value) return false; } } } if (existing.channelTypes) { const newTypes = option.channelTypes ?? option.channel_types; for (const type of existing.channelTypes) { if (!newTypes.includes(type)) return false; } } if (existing.options) { return this.optionsEqual(existing.options, option.options, enforceOptionOrder); } return true; } /** * An option for an application command or subcommand. * @typedef {Object} ApplicationCommandOption * @property {ApplicationCommandOptionType} type The type of the option * @property {string} name The name of the option * @property {Object<Locale, string>} [nameLocalizations] The localizations for the option name * @property {string} [nameLocalized] The localized name for this option * @property {string} description The description of the option * @property {Object<Locale, string>} [descriptionLocalizations] The localizations for the option description * @property {string} [descriptionLocalized] The localized description for this option * @property {boolean} [required] Whether the option is required * @property {boolean} [autocomplete] Whether the autocomplete interaction is enabled for a * {@link ApplicationCommandOptionType.String}, {@link ApplicationCommandOptionType.Integer} or * {@link ApplicationCommandOptionType.Number} option * @property {ApplicationCommandOptionChoice[]} [choices] The choices of the option for the user to pick from * @property {ApplicationCommandOption[]} [options] Additional options if this option is a subcommand (group) * @property {ApplicationCommandOptionAllowedChannelTypes[]} [channelTypes] When the option type is channel, * the allowed types of channels that can be selected * @property {number} [minValue] The minimum value for an {@link ApplicationCommandOptionType.Integer} or * {@link ApplicationCommandOptionType.Number} option * @property {number} [maxValue] The maximum value for an {@link ApplicationCommandOptionType.Integer} or * {@link ApplicationCommandOptionType.Number} option * @property {number} [minLength] The minimum length for an {@link ApplicationCommandOptionType.String} option * (maximum of `6000`) * @property {number} [maxLength] The maximum length for an {@link ApplicationCommandOptionType.String} option * (maximum of `6000`) */ /** * A choice for an application command option. * @typedef {Object} ApplicationCommandOptionChoice * @property {string} name The name of the choice * @property {?string} nameLocalized The localized name of the choice in the provided locale, if any * @property {?Object<string, string>} [nameLocalizations] The localized names for this choice * @property {string|number} value The value of the choice */ /** * Transforms an {@link ApplicationCommandOptionData} object into something that can be used with the API. * @param {ApplicationCommandOptionData|ApplicationCommandOption} option The option to transform * @param {boolean} [received] Whether this option has been received from Discord * @returns {APIApplicationCommandOption} * @private */ static transformOption(option, received) { const channelTypesKey = received ? 'channelTypes' : 'channel_types'; const minValueKey = received ? 'minValue' : 'min_value'; const maxValueKey = received ? 'maxValue' : 'max_value'; const minLengthKey = received ? 'minLength' : 'min_length'; const maxLengthKey = received ? 'maxLength' : 'max_length'; const nameLocalizationsKey = received ? 'nameLocalizations' : 'name_localizations'; const nameLocalizedKey = received ? 'nameLocalized' : 'name_localized'; const descriptionLocalizationsKey = received ? 'descriptionLocalizations' : 'description_localizations'; const descriptionLocalizedKey = received ? 'descriptionLocalized' : 'description_localized'; return { type: option.type, name: option.name, [nameLocalizationsKey]: option.nameLocalizations ?? option.name_localizations, [nameLocalizedKey]: option.nameLocalized ?? option.name_localized, description: option.description, [descriptionLocalizationsKey]: option.descriptionLocalizations ?? option.description_localizations, [descriptionLocalizedKey]: option.descriptionLocalized ?? option.description_localized, required: option.required ?? (option.type === ApplicationCommandOptionType.Subcommand || option.type === ApplicationCommandOptionType.SubcommandGroup ? undefined : false), autocomplete: option.autocomplete, choices: option.choices?.map(choice => ({ name: choice.name, [nameLocalizedKey]: choice.nameLocalized ?? choice.name_localized, [nameLocalizationsKey]: choice.nameLocalizations ?? choice.name_localizations, value: choice.value, })), options: option.options?.map(opt => this.transformOption(opt, received)), [channelTypesKey]: option.channelTypes ?? option.channel_types, [minValueKey]: option.minValue ?? option.min_value, [maxValueKey]: option.maxValue ?? option.max_value, [minLengthKey]: option.minLength ?? option.min_length, [maxLengthKey]: option.maxLength ?? option.max_length, }; } } module.exports = ApplicationCommand; /* eslint-disable max-len */ /** * @external ApplicationCommandOptionAllowedChannelTypes * @see {@link https://discord.js.org/docs/packages/builders/stable/ApplicationCommandOptionAllowedChannelTypes:TypeAlias} */ node_modules/discord.js/src/structures/GuildScheduledEvent.js 0000664 00000042077 15114741631 0020541 0 ustar 00 'use strict'; const { DiscordSnowflake } = require('@sapphire/snowflake'); const { GuildScheduledEventStatus, GuildScheduledEventEntityType, RouteBases } = require('discord-api-types/v10'); const Base = require('./Base'); const { DiscordjsError, ErrorCodes } = require('../errors'); /** * Represents a scheduled event in a {@link Guild}. * @extends {Base} */ class GuildScheduledEvent extends Base { constructor(client, data) { super(client); /** * The id of the guild scheduled event * @type {Snowflake} */ this.id = data.id; /** * The id of the guild this guild scheduled event belongs to * @type {Snowflake} */ this.guildId = data.guild_id; this._patch(data); } _patch(data) { if ('channel_id' in data) { /** * The channel id in which the scheduled event will be hosted, * or `null` if entity type is {@link GuildScheduledEventEntityType.External} * @type {?Snowflake} */ this.channelId = data.channel_id; } else { this.channelId ??= null; } if ('creator_id' in data) { /** * The id of the user that created this guild scheduled event * @type {?Snowflake} */ this.creatorId = data.creator_id; } else { this.creatorId ??= null; } if ('name' in data) { /** * The name of the guild scheduled event * @type {?string} */ this.name = data.name; } else { // Only if partial. this.name ??= null; } if ('description' in data) { /** * The description of the guild scheduled event * @type {?string} */ this.description = data.description; } else { this.description ??= null; } if ('scheduled_start_time' in data) { /** * The timestamp the guild scheduled event will start at * @type {?number} */ this.scheduledStartTimestamp = Date.parse(data.scheduled_start_time); } else { this.scheduledStartTimestamp ??= null; } if ('scheduled_end_time' in data) { /** * The timestamp the guild scheduled event will end at * or `null` if the event does not have a scheduled time to end * @type {?number} */ this.scheduledEndTimestamp = data.scheduled_end_time ? Date.parse(data.scheduled_end_time) : null; } else { this.scheduledEndTimestamp ??= null; } if ('privacy_level' in data) { /** * The privacy level of the guild scheduled event * @type {?GuildScheduledEventPrivacyLevel} */ this.privacyLevel = data.privacy_level; } else { // Only if partial. this.privacyLevel ??= null; } if ('status' in data) { /** * The status of the guild scheduled event * @type {?GuildScheduledEventStatus} */ this.status = data.status; } else { // Only if partial. this.status ??= null; } if ('entity_type' in data) { /** * The type of hosting entity associated with the scheduled event * @type {?GuildScheduledEventEntityType} */ this.entityType = data.entity_type; } else { // Only if partial. this.entityType ??= null; } if ('entity_id' in data) { /** * The id of the hosting entity associated with the scheduled event * @type {?Snowflake} */ this.entityId = data.entity_id; } else { this.entityId ??= null; } if ('user_count' in data) { /** * The number of users who are subscribed to this guild scheduled event * @type {?number} */ this.userCount = data.user_count; } else { this.userCount ??= null; } if ('creator' in data) { /** * The user that created this guild scheduled event * @type {?User} */ this.creator = this.client.users._add(data.creator); } else { this.creator ??= this.client.users.resolve(this.creatorId); } /* eslint-disable max-len */ /** * Represents the additional metadata for a {@link GuildScheduledEvent} * @see {@link https://discord.com/developers/docs/resources/guild-scheduled-event#guild-scheduled-event-object-guild-scheduled-event-entity-metadata} * @typedef {Object} GuildScheduledEventEntityMetadata * @property {?string} location The location of the guild scheduled event */ /* eslint-enable max-len */ if ('entity_metadata' in data) { if (data.entity_metadata) { /** * Additional metadata * @type {?GuildScheduledEventEntityMetadata} */ this.entityMetadata = { location: data.entity_metadata.location ?? this.entityMetadata?.location ?? null, }; } else { this.entityMetadata = null; } } else { this.entityMetadata ??= null; } if ('image' in data) { /** * The cover image hash for this scheduled event * @type {?string} */ this.image = data.image; } else { this.image ??= null; } /** * Represents the recurrence rule for a {@link GuildScheduledEvent}. * @typedef {Object} GuildScheduledEventRecurrenceRule * @property {number} startTimestamp The timestamp the recurrence rule interval starts at * @property {Date} startAt The time the recurrence rule interval starts at * @property {?number} endTimestamp The timestamp the recurrence rule interval ends at * @property {?Date} endAt The time the recurrence rule interval ends at * @property {GuildScheduledEventRecurrenceRuleFrequency} frequency How often the event occurs * @property {number} interval The spacing between the events * @property {?GuildScheduledEventRecurrenceRuleWeekday[]} byWeekday The days within a week to recur on * @property {?GuildScheduledEventRecurrenceRuleNWeekday[]} byNWeekday The days within a week to recur on * @property {?GuildScheduledEventRecurrenceRuleMonth[]} byMonth The months to recur on * @property {?number[]} byMonthDay The days within a month to recur on * @property {?number[]} byYearDay The days within a year to recur on * @property {?number} count The total amount of times the event is allowed to recur before stopping */ /** * @typedef {Object} GuildScheduledEventRecurrenceRuleNWeekday * @property {number} n The week to recur on * @property {GuildScheduledEventRecurrenceRuleWeekday} day The day within the week to recur on */ if ('recurrence_rule' in data) { /** * The recurrence rule for this scheduled event * @type {?GuildScheduledEventRecurrenceRule} */ this.recurrenceRule = data.recurrence_rule && { startTimestamp: Date.parse(data.recurrence_rule.start), get startAt() { return new Date(this.startTimestamp); }, endTimestamp: data.recurrence_rule.end && Date.parse(data.recurrence_rule.end), get endAt() { return this.endTimestamp && new Date(this.endTimestamp); }, frequency: data.recurrence_rule.frequency, interval: data.recurrence_rule.interval, byWeekday: data.recurrence_rule.by_weekday, byNWeekday: data.recurrence_rule.by_n_weekday, byMonth: data.recurrence_rule.by_month, byMonthDay: data.recurrence_rule.by_month_day, byYearDay: data.recurrence_rule.by_year_day, count: data.recurrence_rule.count, }; } else { this.recurrenceRule ??= null; } } /** * Whether this guild scheduled event is partial. * @type {boolean} * @readonly */ get partial() { return this.name === null; } /** * The URL of this scheduled event's cover image * @param {BaseImageURLOptions} [options={}] Options for image URL * @returns {?string} */ coverImageURL(options = {}) { return this.image && this.client.rest.cdn.guildScheduledEventCover(this.id, this.image, options); } /** * The timestamp the guild scheduled event was created at * @type {number} * @readonly */ get createdTimestamp() { return DiscordSnowflake.timestampFrom(this.id); } /** * The time the guild scheduled event was created at * @type {Date} * @readonly */ get createdAt() { return new Date(this.createdTimestamp); } /** * The time the guild scheduled event will start at * <info>This can be potentially `null` only when it's an {@link GuildAuditLogsEntry#target}</info> * @type {?Date} * @readonly */ get scheduledStartAt() { return this.scheduledStartTimestamp && new Date(this.scheduledStartTimestamp); } /** * The time the guild scheduled event will end at, * or `null` if the event does not have a scheduled time to end * @type {?Date} * @readonly */ get scheduledEndAt() { return this.scheduledEndTimestamp && new Date(this.scheduledEndTimestamp); } /** * The channel associated with this scheduled event * @type {?(VoiceChannel|StageChannel)} * @readonly */ get channel() { return this.client.channels.resolve(this.channelId); } /** * The guild this scheduled event belongs to * @type {?Guild} * @readonly */ get guild() { return this.client.guilds.resolve(this.guildId); } /** * The URL to the guild scheduled event * @type {string} * @readonly */ get url() { return `${RouteBases.scheduledEvent}/${this.guildId}/${this.id}`; } /** * Options used to create an invite URL to a {@link GuildScheduledEvent} * @typedef {InviteCreateOptions} GuildScheduledEventInviteURLCreateOptions * @property {GuildInvitableChannelResolvable} [channel] The channel to create the invite in. * <warn>This is required when the `entityType` of `GuildScheduledEvent` is * {@link GuildScheduledEventEntityType.External}, gets ignored otherwise</warn> */ /** * Creates an invite URL to this guild scheduled event. * @param {GuildScheduledEventInviteURLCreateOptions} [options] The options to create the invite * @returns {Promise<string>} */ async createInviteURL(options) { let channelId = this.channelId; if (this.entityType === GuildScheduledEventEntityType.External) { if (!options?.channel) throw new DiscordjsError(ErrorCodes.InviteOptionsMissingChannel); channelId = this.guild.channels.resolveId(options.channel); if (!channelId) throw new DiscordjsError(ErrorCodes.GuildChannelResolve); } const invite = await this.guild.invites.create(channelId, options); return `${RouteBases.invite}/${invite.code}?event=${this.id}`; } /** * Edits this guild scheduled event. * @param {GuildScheduledEventEditOptions} options The options to edit the guild scheduled event * @returns {Promise<GuildScheduledEvent>} * @example * // Edit a guild scheduled event * guildScheduledEvent.edit({ name: 'Party' }) * .then(guildScheduledEvent => console.log(guildScheduledEvent)) * .catch(console.error); */ edit(options) { return this.guild.scheduledEvents.edit(this.id, options); } /** * Fetches this guild scheduled event. * @param {boolean} [force=true] Whether to skip the cache check and request the API * @returns {Promise<GuildScheduledEvent>} */ fetch(force = true) { return this.guild.scheduledEvents.fetch({ guildScheduledEvent: this.id, force }); } /** * Deletes this guild scheduled event. * @returns {Promise<GuildScheduledEvent>} * @example * // Delete a guild scheduled event * guildScheduledEvent.delete() * .then(guildScheduledEvent => console.log(guildScheduledEvent)) * .catch(console.error); */ async delete() { await this.guild.scheduledEvents.delete(this.id); return this; } /** * Sets a new name for the guild scheduled event. * @param {string} name The new name of the guild scheduled event * @param {string} [reason] The reason for changing the name * @returns {Promise<GuildScheduledEvent>} * @example * // Set name of a guild scheduled event * guildScheduledEvent.setName('Birthday Party') * .then(guildScheduledEvent => console.log(`Set the name to: ${guildScheduledEvent.name}`)) * .catch(console.error); */ setName(name, reason) { return this.edit({ name, reason }); } /** * Sets a new time to schedule the event at. * @param {DateResolvable} scheduledStartTime The time to schedule the event at * @param {string} [reason] The reason for changing the scheduled start time * @returns {Promise<GuildScheduledEvent>} * @example * // Set start time of a guild scheduled event * guildScheduledEvent.setScheduledStartTime('2022-09-24T00:00:00+05:30') * .then(guildScheduledEvent => console.log(`Set the start time to: ${guildScheduledEvent.scheduledStartTime}`)) * .catch(console.error); */ setScheduledStartTime(scheduledStartTime, reason) { return this.edit({ scheduledStartTime, reason }); } // TODO: scheduledEndTime gets reset on passing null but it hasn't been documented /** * Sets a new time to end the event at. * @param {DateResolvable} scheduledEndTime The time to end the event at * @param {string} [reason] The reason for changing the scheduled end time * @returns {Promise<GuildScheduledEvent>} * @example * // Set end time of a guild scheduled event * guildScheduledEvent.setScheduledEndTime('2022-09-25T00:00:00+05:30') * .then(guildScheduledEvent => console.log(`Set the end time to: ${guildScheduledEvent.scheduledEndTime}`)) * .catch(console.error); */ setScheduledEndTime(scheduledEndTime, reason) { return this.edit({ scheduledEndTime, reason }); } /** * Sets the new description of the guild scheduled event. * @param {string} description The description of the guild scheduled event * @param {string} [reason] The reason for changing the description * @returns {Promise<GuildScheduledEvent>} * @example * // Set description of a guild scheduled event * guildScheduledEvent.setDescription('A virtual birthday party') * .then(guildScheduledEvent => console.log(`Set the description to: ${guildScheduledEvent.description}`)) * .catch(console.error); */ setDescription(description, reason) { return this.edit({ description, reason }); } /** * Sets the new status of the guild scheduled event. * <info>If you're working with TypeScript, use this method in conjunction with status type-guards * like {@link GuildScheduledEvent#isScheduled} to get only valid status as suggestion</info> * @param {GuildScheduledEventStatus} status The status of the guild scheduled event * @param {string} [reason] The reason for changing the status * @returns {Promise<GuildScheduledEvent>} * @example * // Set status of a guild scheduled event * guildScheduledEvent.setStatus(GuildScheduledEventStatus.Active) * .then(guildScheduledEvent => console.log(`Set the status to: ${guildScheduledEvent.status}`)) * .catch(console.error); */ setStatus(status, reason) { return this.edit({ status, reason }); } /** * Sets the new location of the guild scheduled event. * @param {string} location The location of the guild scheduled event * @param {string} [reason] The reason for changing the location * @returns {Promise<GuildScheduledEvent>} * @example * // Set location of a guild scheduled event * guildScheduledEvent.setLocation('Earth') * .then(guildScheduledEvent => console.log(`Set the location to: ${guildScheduledEvent.entityMetadata.location}`)) * .catch(console.error); */ setLocation(location, reason) { return this.edit({ entityMetadata: { location }, reason }); } /** * Fetches subscribers of this guild scheduled event. * @param {FetchGuildScheduledEventSubscribersOptions} [options] Options for fetching the subscribers * @returns {Promise<Collection<Snowflake, GuildScheduledEventUser>>} */ fetchSubscribers(options) { return this.guild.scheduledEvents.fetchSubscribers(this.id, options); } /** * When concatenated with a string, this automatically concatenates the event's URL instead of the object. * @returns {string} * @example * // Logs: Event: https://discord.com/events/412345678901234567/499876543211234567 * console.log(`Event: ${guildScheduledEvent}`); */ toString() { return this.url; } /** * Indicates whether this guild scheduled event has an {@link GuildScheduledEventStatus.Active} status. * @returns {boolean} */ isActive() { return this.status === GuildScheduledEventStatus.Active; } /** * Indicates whether this guild scheduled event has a {@link GuildScheduledEventStatus.Canceled} status. * @returns {boolean} */ isCanceled() { return this.status === GuildScheduledEventStatus.Canceled; } /** * Indicates whether this guild scheduled event has a {@link GuildScheduledEventStatus.Completed} status. * @returns {boolean} */ isCompleted() { return this.status === GuildScheduledEventStatus.Completed; } /** * Indicates whether this guild scheduled event has a {@link GuildScheduledEventStatus.Scheduled} status. * @returns {boolean} */ isScheduled() { return this.status === GuildScheduledEventStatus.Scheduled; } } exports.GuildScheduledEvent = GuildScheduledEvent; node_modules/discord.js/src/structures/Sticker.js 0000664 00000014503 15114741631 0016247 0 ustar 00 'use strict'; const { DiscordSnowflake } = require('@sapphire/snowflake'); const { Routes } = require('discord-api-types/v10'); const Base = require('./Base'); const { DiscordjsError, ErrorCodes } = require('../errors'); const { StickerFormatExtensionMap } = require('../util/Constants'); /** * Represents a Sticker. * @extends {Base} */ class Sticker extends Base { constructor(client, sticker) { super(client); this._patch(sticker); } _patch(sticker) { /** * The sticker's id * @type {Snowflake} */ this.id = sticker.id; if ('description' in sticker) { /** * The description of the sticker * @type {?string} */ this.description = sticker.description; } else { this.description ??= null; } if ('type' in sticker) { /** * The type of the sticker * @type {?StickerType} */ this.type = sticker.type; } else { this.type ??= null; } if ('format_type' in sticker) { /** * The format of the sticker * @type {StickerFormatType} */ this.format = sticker.format_type; } if ('name' in sticker) { /** * The name of the sticker * @type {string} */ this.name = sticker.name; } if ('pack_id' in sticker) { /** * The id of the pack the sticker is from, for standard stickers * @type {?Snowflake} */ this.packId = sticker.pack_id; } else { this.packId ??= null; } if ('tags' in sticker) { /** * Autocomplete/suggestions for the sticker * @type {?string} */ this.tags = sticker.tags; } else { this.tags ??= null; } if ('available' in sticker) { /** * Whether or not the guild sticker is available * @type {?boolean} */ this.available = sticker.available; } else { this.available ??= null; } if ('guild_id' in sticker) { /** * The id of the guild that owns this sticker * @type {?Snowflake} */ this.guildId = sticker.guild_id; } else { this.guildId ??= null; } if ('user' in sticker) { /** * The user that uploaded the guild sticker * @type {?User} */ this.user = this.client.users._add(sticker.user); } else { this.user ??= null; } if ('sort_value' in sticker) { /** * The standard sticker's sort order within its pack * @type {?number} */ this.sortValue = sticker.sort_value; } else { this.sortValue ??= null; } } /** * The timestamp the sticker was created at * @type {number} * @readonly */ get createdTimestamp() { return DiscordSnowflake.timestampFrom(this.id); } /** * The time the sticker was created at * @type {Date} * @readonly */ get createdAt() { return new Date(this.createdTimestamp); } /** * Whether this sticker is partial * @type {boolean} * @readonly */ get partial() { return !this.type; } /** * The guild that owns this sticker * @type {?Guild} * @readonly */ get guild() { return this.client.guilds.resolve(this.guildId); } /** * A link to the sticker * <info>If the sticker's format is {@link StickerFormatType.Lottie}, it returns * the URL of the Lottie JSON file.</info> * @type {string} * @readonly */ get url() { return this.client.rest.cdn.sticker(this.id, StickerFormatExtensionMap[this.format]); } /** * Fetches this sticker. * @returns {Promise<Sticker>} */ async fetch() { const data = await this.client.rest.get(Routes.sticker(this.id)); this._patch(data); return this; } /** * Fetches the pack that contains this sticker. * @returns {Promise<?StickerPack>} The sticker pack or `null` if this sticker does not belong to one. */ async fetchPack() { if (!this.packId) return null; return this.client.fetchStickerPacks({ packId: this.packId }); } /** * Fetches the user who uploaded this sticker, if this is a guild sticker. * @returns {Promise<?User>} */ async fetchUser() { if (this.partial) await this.fetch(); if (!this.guildId) throw new DiscordjsError(ErrorCodes.NotGuildSticker); return this.guild.stickers.fetchUser(this); } /** * Data for editing a sticker. * @typedef {Object} GuildStickerEditOptions * @property {string} [name] The name of the sticker * @property {?string} [description] The description of the sticker * @property {string} [tags] The Discord name of a unicode emoji representing the sticker's expression * @property {string} [reason] Reason for editing this sticker */ /** * Edits the sticker. * @param {GuildStickerEditOptions} options The options to provide * @returns {Promise<Sticker>} * @example * // Update the name of a sticker * sticker.edit({ name: 'new name' }) * .then(sticker => console.log(`Updated the name of the sticker to ${sticker.name}`)) * .catch(console.error); */ edit(options) { return this.guild.stickers.edit(this, options); } /** * Deletes the sticker. * @returns {Promise<Sticker>} * @param {string} [reason] Reason for deleting this sticker * @example * // Delete a sticker * sticker.delete() * .then(sticker => console.log(`Deleted sticker ${sticker.name}`)) * .catch(console.error); */ async delete(reason) { await this.guild.stickers.delete(this, reason); return this; } /** * Whether this sticker is the same as another one. * @param {Sticker|APISticker} other The sticker to compare it to * @returns {boolean} */ equals(other) { if (other instanceof Sticker) { return ( other.id === this.id && other.description === this.description && other.type === this.type && other.format === this.format && other.name === this.name && other.packId === this.packId && other.tags === this.tags && other.available === this.available && other.guildId === this.guildId && other.sortValue === this.sortValue ); } else { return ( other.id === this.id && other.description === this.description && other.name === this.name && other.tags === this.tags ); } } } exports.Sticker = Sticker; node_modules/discord.js/src/structures/Embed.js 0000664 00000012564 15114741631 0015664 0 ustar 00 'use strict'; const { embedLength } = require('@discordjs/builders'); const isEqual = require('fast-deep-equal'); /** * Represents an embed. */ class Embed { constructor(data) { /** * The API embed data. * @type {APIEmbed} * @readonly */ this.data = { ...data }; } /** * An array of fields of this embed. * @type {Array<APIEmbedField>} * @readonly */ get fields() { return this.data.fields ?? []; } /** * The title of this embed. * @type {?string} * @readonly */ get title() { return this.data.title ?? null; } /** * The description of this embed. * @type {?string} * @readonly */ get description() { return this.data.description ?? null; } /** * The URL of this embed. * @type {?string} * @readonly */ get url() { return this.data.url ?? null; } /** * The color of this embed. * @type {?number} * @readonly */ get color() { return this.data.color ?? null; } /** * The timestamp of this embed. This is in an ISO 8601 format. * @type {?string} * @readonly */ get timestamp() { return this.data.timestamp ?? null; } /** * @typedef {Object} EmbedAssetData * @property {?string} url The URL of the image * @property {?string} proxyURL The proxy URL of the image * @property {?number} height The height of the image * @property {?number} width The width of the image */ /** * The thumbnail of this embed. * @type {?EmbedAssetData} * @readonly */ get thumbnail() { if (!this.data.thumbnail) return null; return { url: this.data.thumbnail.url, proxyURL: this.data.thumbnail.proxy_url, height: this.data.thumbnail.height, width: this.data.thumbnail.width, }; } /** * The image of this embed. * @type {?EmbedAssetData} * @readonly */ get image() { if (!this.data.image) return null; return { url: this.data.image.url, proxyURL: this.data.image.proxy_url, height: this.data.image.height, width: this.data.image.width, }; } /** * The video of this embed. * @type {?EmbedAssetData} * @readonly */ get video() { if (!this.data.video) return null; return { url: this.data.video.url, proxyURL: this.data.video.proxy_url, height: this.data.video.height, width: this.data.video.width, }; } /** * @typedef {Object} EmbedAuthorData * @property {string} name The name of the author * @property {?string} url The URL of the author * @property {?string} iconURL The icon URL of the author * @property {?string} proxyIconURL The proxy icon URL of the author */ /** * The author of this embed. * @type {?EmbedAuthorData} * @readonly */ get author() { if (!this.data.author) return null; return { name: this.data.author.name, url: this.data.author.url, iconURL: this.data.author.icon_url, proxyIconURL: this.data.author.proxy_icon_url, }; } /** * The provider of this embed. * @type {?APIEmbedProvider} * @readonly */ get provider() { return this.data.provider ?? null; } /** * @typedef {Object} EmbedFooterData * @property {string} text The text of the footer * @property {?string} iconURL The URL of the icon * @property {?string} proxyIconURL The proxy URL of the icon */ /** * The footer of this embed. * @type {?EmbedFooterData} * @readonly */ get footer() { if (!this.data.footer) return null; return { text: this.data.footer.text, iconURL: this.data.footer.icon_url, proxyIconURL: this.data.footer.proxy_icon_url, }; } /** * The accumulated length for the embed title, description, fields, footer text, and author name. * @type {number} * @readonly */ get length() { return embedLength(this.data); } /** * The hex color of this embed. * @type {?string} * @readonly */ get hexColor() { return typeof this.data.color === 'number' ? `#${this.data.color.toString(16).padStart(6, '0')}` : (this.data.color ?? null); } /** * Returns the API-compatible JSON for this embed. * @returns {APIEmbed} */ toJSON() { return { ...this.data }; } /** * Whether the given embeds are equal. * @param {Embed|APIEmbed} other The embed to compare against * @returns {boolean} */ equals(other) { if (other instanceof Embed) { return isEqual(this.data, other.data); } return ( this.author?.iconURL === other.author?.icon_url && this.author?.name === other.author?.name && this.author?.url === other.author?.url && this.color === (other.color ?? null) && this.description === (other.description ?? null) && this.footer?.iconURL === other.footer?.icon_url && this.footer?.text === other.footer?.text && this.image?.url === other.image?.url && this.thumbnail?.url === other.thumbnail?.url && (this.timestamp && Date.parse(this.timestamp)) === (other.timestamp ? Date.parse(other.timestamp) : null) && this.title === (other.title ?? null) && this.url === (other.url ?? null) && this.video?.url === other.video?.url && isEqual(this.fields, other.fields?.map(field => ({ ...field, inline: field.inline ?? false })) ?? []) && isEqual(this.provider, other.provider ?? null) ); } } module.exports = Embed; node_modules/discord.js/src/structures/UserSelectMenuComponent.js 0000664 00000000433 15114741631 0021426 0 ustar 00 'use strict'; const BaseSelectMenuComponent = require('./BaseSelectMenuComponent'); /** * Represents a user select menu component * @extends {BaseSelectMenuComponent} */ class UserSelectMenuComponent extends BaseSelectMenuComponent {} module.exports = UserSelectMenuComponent; node_modules/discord.js/src/structures/ChannelSelectMenuInteraction.js 0000664 00000001673 15114741631 0022404 0 ustar 00 'use strict'; const { Collection } = require('@discordjs/collection'); const MessageComponentInteraction = require('./MessageComponentInteraction'); /** * Represents a {@link ComponentType.ChannelSelect} select menu interaction. * @extends {MessageComponentInteraction} */ class ChannelSelectMenuInteraction extends MessageComponentInteraction { constructor(client, data) { super(client, data); const { resolved, values } = data.data; /** * An array of the selected channel ids * @type {Snowflake[]} */ this.values = values ?? []; /** * Collection of the selected channels * @type {Collection<Snowflake, BaseChannel|APIChannel>} */ this.channels = new Collection(); for (const channel of Object.values(resolved?.channels ?? {})) { this.channels.set(channel.id, this.client.channels._add(channel, this.guild) ?? channel); } } } module.exports = ChannelSelectMenuInteraction; node_modules/discord.js/src/structures/Subscription.js 0000664 00000005100 15114741631 0017320 0 ustar 00 'use strict'; const Base = require('./Base'); /** * Represents a Subscription * @extends {Base} */ class Subscription extends Base { constructor(client, data) { super(client); /** * The id of the subscription * @type {Snowflake} */ this.id = data.id; /** * The id of the user who subscribed * @type {Snowflake} */ this.userId = data.user_id; this._patch(data); } _patch(data) { /** * The SKU ids subscribed to * @type {Snowflake[]} */ this.skuIds = data.sku_ids; /** * The entitlement ids granted for this subscription * @type {Snowflake[]} */ this.entitlementIds = data.entitlement_ids; /** * The timestamp the current subscription period will start at * @type {number} */ this.currentPeriodStartTimestamp = Date.parse(data.current_period_start); /** * The timestamp the current subscription period will end at * @type {number} */ this.currentPeriodEndTimestamp = Date.parse(data.current_period_end); /** * The current status of the subscription * @type {SubscriptionStatus} */ this.status = data.status; if ('renewal_sku_ids' in data) { /** * The SKU ids that this user will be subscribed to at renewal * @type {?Snowflake[]} */ this.renewalSkuIds = data.renewal_sku_ids; } if ('canceled_at' in data) { /** * The timestamp of when the subscription was canceled * @type {?number} */ this.canceledTimestamp = data.canceled_at ? Date.parse(data.canceled_at) : null; } else { this.canceledTimestamp ??= null; } if ('country' in data) { /** * ISO 3166-1 alpha-2 country code of the payment source used to purchase the subscription. * Missing unless queried with a private OAuth scope. * @type {?string} */ this.country = data.country; } else { this.country ??= null; } } /** * The time the subscription was canceled * @type {?Date} * @readonly */ get canceledAt() { return this.canceledTimestamp && new Date(this.canceledTimestamp); } /** * The time the current subscription period will start at * @type {Date} * @readonly */ get currentPeriodStartAt() { return new Date(this.currentPeriodStartTimestamp); } /** * The time the current subscription period will end at * @type {Date} * @readonly */ get currentPeriodEndAt() { return new Date(this.currentPeriodEndTimestamp); } } exports.Subscription = Subscription; node_modules/discord.js/src/structures/PollAnswer.js 0000664 00000004165 15114741631 0016734 0 ustar 00 'use strict'; const Base = require('./Base'); const { Emoji } = require('./Emoji'); /** * Represents an answer to a {@link Poll} * @extends {Base} */ class PollAnswer extends Base { constructor(client, data, poll) { super(client); /** * The {@link Poll} this answer is part of * @name PollAnswer#poll * @type {Poll} * @readonly */ Object.defineProperty(this, 'poll', { value: poll }); /** * The id of this answer * @type {number} */ this.id = data.answer_id; /** * The text of this answer * @type {?string} */ this.text = data.poll_media.text ?? null; /** * The raw emoji of this answer * @name PollAnswer#_emoji * @type {?APIPartialEmoji} * @private */ Object.defineProperty(this, '_emoji', { value: data.poll_media.emoji ?? null }); this._patch(data); } _patch(data) { // This `count` field comes from `poll.results.answer_counts` if ('count' in data) { /** * The amount of votes this answer has * @type {number} */ this.voteCount = data.count; } else { this.voteCount ??= 0; } } /** * The emoji of this answer * @type {?(GuildEmoji|Emoji)} */ get emoji() { if (!this._emoji || (!this._emoji.id && !this._emoji.name)) return null; return this.client.emojis.cache.get(this._emoji.id) ?? new Emoji(this.client, this._emoji); } /** * Options used for fetching voters of a poll answer. * @typedef {Object} BaseFetchPollAnswerVotersOptions * @property {number} [limit] The maximum number of voters to fetch * @property {Snowflake} [after] The user id to fetch voters after */ /** * Fetches the users that voted for this answer. * @param {BaseFetchPollAnswerVotersOptions} [options={}] The options for fetching voters * @returns {Promise<Collection<Snowflake, User>>} */ fetchVoters({ after, limit } = {}) { return this.poll.message.channel.messages.fetchPollAnswerVoters({ messageId: this.poll.message.id, answerId: this.id, after, limit, }); } } exports.PollAnswer = PollAnswer; node_modules/discord.js/src/structures/MessageComponentInteraction.js 0000664 00000006001 15114741631 0022304 0 ustar 00 'use strict'; const { lazy } = require('@discordjs/util'); const BaseInteraction = require('./BaseInteraction'); const InteractionWebhook = require('./InteractionWebhook'); const InteractionResponses = require('./interfaces/InteractionResponses'); const { findComponentByCustomId } = require('../util/Components'); const getMessage = lazy(() => require('./Message').Message); /** * Represents a message component interaction. * @extends {BaseInteraction} * @implements {InteractionResponses} */ class MessageComponentInteraction extends BaseInteraction { constructor(client, data) { super(client, data); /** * The id of the channel this interaction was sent in * @type {Snowflake} * @name MessageComponentInteraction#channelId */ /** * The message to which the component was attached * @type {Message} */ this.message = this.channel?.messages._add(data.message) ?? new (getMessage())(client, data.message); /** * The custom id of the component which was interacted with * @type {string} */ this.customId = data.data.custom_id; /** * The type of component which was interacted with * @type {ComponentType} */ this.componentType = data.data.component_type; /** * Whether the reply to this interaction has been deferred * @type {boolean} */ this.deferred = false; /** * Whether the reply to this interaction is ephemeral * @type {?boolean} */ this.ephemeral = null; /** * Whether this interaction has already been replied to * @type {boolean} */ this.replied = false; /** * An associated interaction webhook, can be used to further interact with this interaction * @type {InteractionWebhook} */ this.webhook = new InteractionWebhook(this.client, this.applicationId, this.token); } /** * Components that can be placed in an action row for messages. * * ButtonComponent * * StringSelectMenuComponent * * UserSelectMenuComponent * * RoleSelectMenuComponent * * MentionableSelectMenuComponent * * ChannelSelectMenuComponent * @typedef {ButtonComponent|StringSelectMenuComponent|UserSelectMenuComponent| * RoleSelectMenuComponent|MentionableSelectMenuComponent|ChannelSelectMenuComponent} MessageActionRowComponent */ /** * The component which was interacted with * @type {MessageActionRowComponent|APIComponentInMessageActionRow} * @readonly */ get component() { return findComponentByCustomId(this.message.components, this.customId); } // These are here only for documentation purposes - they are implemented by InteractionResponses /* eslint-disable no-empty-function */ deferReply() {} reply() {} fetchReply() {} editReply() {} deleteReply() {} followUp() {} deferUpdate() {} update() {} launchActivity() {} showModal() {} sendPremiumRequired() {} awaitModalSubmit() {} } InteractionResponses.applyToClass(MessageComponentInteraction); module.exports = MessageComponentInteraction; node_modules/discord.js/src/structures/Emoji.js 0000664 00000005711 15114741631 0015707 0 ustar 00 'use strict'; const process = require('node:process'); const { formatEmoji } = require('@discordjs/formatters'); const { DiscordSnowflake } = require('@sapphire/snowflake'); const Base = require('./Base'); let deprecationEmittedForURL = false; /** * Represents an emoji, see {@link ApplicationEmoji}, {@link GuildEmoji} and {@link ReactionEmoji}. * @extends {Base} */ class Emoji extends Base { constructor(client, emoji) { super(client); /** * Whether or not the emoji is animated * @type {?boolean} */ this.animated = emoji.animated ?? null; /** * The emoji's name * @type {?string} */ this.name = emoji.name ?? null; /** * The emoji's id * @type {?Snowflake} */ this.id = emoji.id ?? null; } /** * The identifier of this emoji, used for message reactions * @type {string} * @readonly */ get identifier() { if (this.id) return `${this.animated ? 'a:' : ''}${this.name}:${this.id}`; return encodeURIComponent(this.name); } /** * Returns a URL for the emoji or `null` if this is not a custom emoji. * @param {BaseImageURLOptions} [options] Options for the image URL * @returns {?string} */ imageURL(options) { return this.id && this.client.rest.cdn.emoji(this.id, options); } /** * Returns a URL for the emoji or `null` if this is not a custom emoji. * @type {?string} * @readonly * @deprecated Use {@link Emoji#imageURL} instead. */ get url() { if (!deprecationEmittedForURL) { process.emitWarning('The Emoji#url getter is deprecated. Use Emoji#imageURL() instead.', 'DeprecationWarning'); deprecationEmittedForURL = true; } return this.imageURL({ extension: this.animated ? 'gif' : 'png' }); } /** * The timestamp the emoji was created at, or null if unicode * @type {?number} * @readonly */ get createdTimestamp() { return this.id && DiscordSnowflake.timestampFrom(this.id); } /** * The time the emoji was created at, or null if unicode * @type {?Date} * @readonly */ get createdAt() { return this.id && new Date(this.createdTimestamp); } /** * When concatenated with a string, this automatically returns the text required to form a graphical emoji on Discord * instead of the Emoji object. * @returns {string} * @example * // Send a custom emoji from a guild: * const emoji = guild.emojis.cache.first(); * msg.channel.send(`Hello! ${emoji}`); * @example * // Send the emoji used in a reaction to the channel the reaction is part of * reaction.message.channel.send(`The emoji used was: ${reaction.emoji}`); */ toString() { return this.id ? formatEmoji({ animated: this.animated, id: this.id, name: this.name }) : this.name; } toJSON() { const json = super.toJSON({ guild: 'guildId', createdTimestamp: true, identifier: true, }); json.imageURL = this.imageURL(); return json; } } exports.Emoji = Emoji; node_modules/discord.js/src/structures/ModalSubmitInteraction.js 0000664 00000006655 15114741631 0021274 0 ustar 00 'use strict'; const { lazy } = require('@discordjs/util'); const BaseInteraction = require('./BaseInteraction'); const InteractionWebhook = require('./InteractionWebhook'); const ModalSubmitFields = require('./ModalSubmitFields'); const InteractionResponses = require('./interfaces/InteractionResponses'); const getMessage = lazy(() => require('./Message').Message); /** * @typedef {Object} ModalData * @property {string} value The value of the field * @property {ComponentType} type The component type of the field * @property {string} customId The custom id of the field */ /** * @typedef {Object} ActionRowModalData * @property {ModalData[]} components The components of this action row * @property {ComponentType} type The component type of the action row */ /** * Represents a modal interaction * @extends {BaseInteraction} * @implements {InteractionResponses} */ class ModalSubmitInteraction extends BaseInteraction { constructor(client, data) { super(client, data); /** * The custom id of the modal. * @type {string} */ this.customId = data.data.custom_id; if ('message' in data) { /** * The message associated with this interaction * @type {?Message} */ this.message = this.channel?.messages._add(data.message) ?? new (getMessage())(this.client, data.message); } else { this.message = null; } /** * The components within the modal * @type {ActionRowModalData[]} */ this.components = data.data.components?.map(component => ModalSubmitInteraction.transformComponent(component)); /** * The fields within the modal * @type {ModalSubmitFields} */ this.fields = new ModalSubmitFields(this.components); /** * Whether the reply to this interaction has been deferred * @type {boolean} */ this.deferred = false; /** * Whether this interaction has already been replied to * @type {boolean} */ this.replied = false; /** * Whether the reply to this interaction is ephemeral * @type {?boolean} */ this.ephemeral = null; /** * An associated interaction webhook, can be used to further interact with this interaction * @type {InteractionWebhook} */ this.webhook = new InteractionWebhook(this.client, this.applicationId, this.token); } /** * Transforms component data to discord.js-compatible data * @param {*} rawComponent The data to transform * @returns {ModalData[]} */ static transformComponent(rawComponent) { return rawComponent.components ? { type: rawComponent.type, components: rawComponent.components.map(component => this.transformComponent(component)), } : { value: rawComponent.value, type: rawComponent.type, customId: rawComponent.custom_id, }; } /** * Whether this is from a {@link MessageComponentInteraction}. * @returns {boolean} */ isFromMessage() { return Boolean(this.message); } // These are here only for documentation purposes - they are implemented by InteractionResponses /* eslint-disable no-empty-function */ deferReply() {} reply() {} fetchReply() {} editReply() {} deleteReply() {} followUp() {} deferUpdate() {} update() {} sendPremiumRequired() {} launchActivity() {} } InteractionResponses.applyToClass(ModalSubmitInteraction, 'showModal'); module.exports = ModalSubmitInteraction; node_modules/discord.js/src/structures/BaseGuildEmoji.js 0000664 00000002762 15114741631 0017472 0 ustar 00 'use strict'; const { Emoji } = require('./Emoji'); /** * Parent class for {@link GuildEmoji} and {@link GuildPreviewEmoji}. * @extends {Emoji} * @abstract */ class BaseGuildEmoji extends Emoji { constructor(client, data, guild) { super(client, data); /** * The guild this emoji is a part of * @type {Guild|GuildPreview} */ this.guild = guild; this.requiresColons = null; this.managed = null; this.available = null; this._patch(data); } _patch(data) { if ('name' in data) this.name = data.name; if ('require_colons' in data) { /** * Whether or not this emoji requires colons surrounding it * @type {?boolean} */ this.requiresColons = data.require_colons; } if ('managed' in data) { /** * Whether this emoji is managed by an external service * @type {?boolean} */ this.managed = data.managed; } if ('available' in data) { /** * Whether this emoji is available * @type {?boolean} */ this.available = data.available; } } } /** * Returns a URL for the emoji. * @method imageURL * @memberof BaseGuildEmoji * @instance * @param {BaseImageURLOptions} [options] Options for the image URL * @returns {string} */ /** * Returns a URL for the emoji. * @name url * @memberof BaseGuildEmoji * @instance * @type {string} * @readonly * @deprecated Use {@link BaseGuildEmoji#imageURL} instead. */ module.exports = BaseGuildEmoji; node_modules/discord.js/src/structures/ClientUser.js 0000664 00000014075 15114741631 0016724 0 ustar 00 'use strict'; const { Routes } = require('discord-api-types/v10'); const User = require('./User'); const { resolveImage } = require('../util/DataResolver'); /** * Represents the logged in client's Discord user. * @extends {User} */ class ClientUser extends User { _patch(data) { super._patch(data); if ('verified' in data) { /** * Whether or not this account has been verified * @type {boolean} */ this.verified = data.verified; } if ('mfa_enabled' in data) { /** * If the bot's {@link ClientApplication#owner Owner} has MFA enabled on their account * @type {?boolean} */ this.mfaEnabled = typeof data.mfa_enabled === 'boolean' ? data.mfa_enabled : null; } else { this.mfaEnabled ??= null; } if ('token' in data) this.client.token = data.token; } /** * Represents the client user's presence * @type {ClientPresence} * @readonly */ get presence() { return this.client.presence; } /** * Data used to edit the logged in client * @typedef {Object} ClientUserEditOptions * @property {string} [username] The new username * @property {?(BufferResolvable|Base64Resolvable)} [avatar] The new avatar * @property {?(BufferResolvable|Base64Resolvable)} [banner] The new banner */ /** * Edits the logged in client. * @param {ClientUserEditOptions} options The options to provide * @returns {Promise<ClientUser>} */ async edit({ username, avatar, banner }) { const data = await this.client.rest.patch(Routes.user(), { body: { username, avatar: avatar && (await resolveImage(avatar)), banner: banner && (await resolveImage(banner)), }, }); const { updated } = this.client.actions.UserUpdate.handle(data); return updated ?? this; } /** * Sets the username of the logged in client. * <info>Changing usernames in Discord is heavily rate limited, with only 2 requests * every hour. Use this sparingly!</info> * @param {string} username The new username * @returns {Promise<ClientUser>} * @example * // Set username * client.user.setUsername('discordjs') * .then(user => console.log(`My new username is ${user.username}`)) * .catch(console.error); */ setUsername(username) { return this.edit({ username }); } /** * Sets the avatar of the logged in client. * @param {?(BufferResolvable|Base64Resolvable)} avatar The new avatar * @returns {Promise<ClientUser>} * @example * // Set avatar * client.user.setAvatar('./avatar.png') * .then(user => console.log(`New avatar set!`)) * .catch(console.error); */ setAvatar(avatar) { return this.edit({ avatar }); } /** * Sets the banner of the logged in client. * @param {?(BufferResolvable|Base64Resolvable)} banner The new banner * @returns {Promise<ClientUser>} * @example * // Set banner * client.user.setBanner('./banner.png') * .then(user => console.log(`New banner set!`)) * .catch(console.error); */ setBanner(banner) { return this.edit({ banner }); } /** * Options for setting activities * @typedef {Object} ActivitiesOptions * @property {string} name Name of the activity * @property {string} [state] State of the activity * @property {ActivityType} [type] Type of the activity * @property {string} [url] Twitch / YouTube stream URL */ /** * Data resembling a raw Discord presence. * @typedef {Object} PresenceData * @property {PresenceStatusData} [status] Status of the user * @property {boolean} [afk] Whether the user is AFK * @property {ActivitiesOptions[]} [activities] Activity the user is playing * @property {number|number[]} [shardId] Shard id(s) to have the activity set on */ /** * Sets the full presence of the client user. * @param {PresenceData} data Data for the presence * @returns {ClientPresence} * @example * // Set the client user's presence * client.user.setPresence({ activities: [{ name: 'with discord.js' }], status: 'idle' }); */ setPresence(data) { return this.client.presence.set(data); } /** * A user's status. Must be one of: * * `online` * * `idle` * * `invisible` * * `dnd` (do not disturb) * @typedef {string} PresenceStatusData */ /** * Sets the status of the client user. * @param {PresenceStatusData} status Status to change to * @param {number|number[]} [shardId] Shard id(s) to have the activity set on * @returns {ClientPresence} * @example * // Set the client user's status * client.user.setStatus('idle'); */ setStatus(status, shardId) { return this.setPresence({ status, shardId }); } /** * Options for setting an activity. * @typedef {Object} ActivityOptions * @property {string} name Name of the activity * @property {string} [state] State of the activity * @property {string} [url] Twitch / YouTube stream URL * @property {ActivityType} [type] Type of the activity * @property {number|number[]} [shardId] Shard Id(s) to have the activity set on */ /** * Sets the activity the client user is playing. * @param {string|ActivityOptions} name Activity being played, or options for setting the activity * @param {ActivityOptions} [options] Options for setting the activity * @returns {ClientPresence} * @example * // Set the client user's activity * client.user.setActivity('discord.js', { type: ActivityType.Watching }); */ setActivity(name, options = {}) { if (!name) return this.setPresence({ activities: [], shardId: options.shardId }); const activity = Object.assign({}, options, typeof name === 'object' ? name : { name }); return this.setPresence({ activities: [activity], shardId: activity.shardId }); } /** * Sets/removes the AFK flag for the client user. * @param {boolean} [afk=true] Whether or not the user is AFK * @param {number|number[]} [shardId] Shard Id(s) to have the AFK flag set on * @returns {ClientPresence} */ setAFK(afk = true, shardId) { return this.setPresence({ afk, shardId }); } } module.exports = ClientUser; node_modules/discord.js/src/structures/GuildOnboardingPrompt.js 0000664 00000003532 15114741631 0021114 0 ustar 00 'use strict'; const { Collection } = require('@discordjs/collection'); const Base = require('./Base'); const { GuildOnboardingPromptOption } = require('./GuildOnboardingPromptOption'); /** * Represents the data of a prompt of a guilds onboarding. * @extends {Base} */ class GuildOnboardingPrompt extends Base { constructor(client, data, guildId) { super(client); /** * The id of the guild this onboarding prompt is from * @type {Snowflake} */ this.guildId = guildId; /** * The id of the prompt * @type {Snowflake} */ this.id = data.id; /** * The options available within the prompt * @type {Collection<Snowflake, GuildOnboardingPromptOption>} */ this.options = data.options.reduce( (options, option) => options.set(option.id, new GuildOnboardingPromptOption(client, option, guildId)), new Collection(), ); /** * The title of the prompt * @type {string} */ this.title = data.title; /** * Whether users are limited to selecting one option for the prompt * @type {boolean} */ this.singleSelect = data.single_select; /** * Whether the prompt is required before a user completes the onboarding flow * @type {boolean} */ this.required = data.required; /** * Whether the prompt is present in the onboarding flow. * If `false`, the prompt will only appear in the Channels & Roles tab * @type {boolean} */ this.inOnboarding = data.in_onboarding; /** * The type of the prompt * @type {GuildOnboardingPromptType} */ this.type = data.type; } /** * The guild this onboarding prompt is from * @type {Guild} * @readonly */ get guild() { return this.client.guilds.cache.get(this.guildId); } } exports.GuildOnboardingPrompt = GuildOnboardingPrompt; node_modules/discord.js/src/structures/ActionRow.js 0000664 00000002420 15114741631 0016543 0 ustar 00 'use strict'; const { deprecate } = require('node:util'); const { isJSONEncodable } = require('@discordjs/util'); const Component = require('./Component'); const { createComponent } = require('../util/Components'); /** * Represents an action row * @extends {Component} */ class ActionRow extends Component { constructor({ components, ...data }) { super(data); /** * The components in this action row * @type {Component[]} * @readonly */ this.components = components.map(component => createComponent(component)); } /** * Creates a new action row builder from JSON data * @method from * @memberof ActionRow * @param {ActionRowBuilder|ActionRow|APIActionRowComponent} other The other data * @returns {ActionRowBuilder} * @deprecated Use {@link ActionRowBuilder.from | ActionRowBuilder#from} instead. */ static from = deprecate( other => new this(isJSONEncodable(other) ? other.toJSON() : other), 'ActionRow.from() is deprecated. Use ActionRowBuilder.from() instead.', ); /** * Returns the API-compatible JSON for this component * @returns {APIActionRowComponent} */ toJSON() { return { ...this.data, components: this.components.map(component => component.toJSON()) }; } } module.exports = ActionRow; node_modules/discord.js/src/structures/MediaGalleryItem.js 0000664 00000002001 15114741631 0020007 0 ustar 00 'use strict'; const UnfurledMediaItem = require('./UnfurledMediaItem'); /** * Represents an item in a media gallery */ class MediaGalleryItem { constructor({ media, ...data }) { /** * The API data associated with this component * @type {APIMediaGalleryItem} */ this.data = data; /** * The media associated with this media gallery item * @type {UnfurledMediaItem} * @readonly */ this.media = new UnfurledMediaItem(media); } /** * The description of this media gallery item * @type {?string} * @readonly */ get description() { return this.data.description ?? null; } /** * Whether this media gallery item is spoilered * @type {boolean} * @readonly */ get spoiler() { return this.data.spoiler ?? false; } /** * Returns the API-compatible JSON for this component * @returns {APIMediaGalleryItem} */ toJSON() { return { ...this.data, media: this.media.toJSON() }; } } module.exports = MediaGalleryItem; node_modules/discord.js/src/structures/ClientApplication.js 0000664 00000032724 15114741631 0020252 0 ustar 00 'use strict'; const { Collection } = require('@discordjs/collection'); const { Routes } = require('discord-api-types/v10'); const { ApplicationRoleConnectionMetadata } = require('./ApplicationRoleConnectionMetadata'); const { SKU } = require('./SKU'); const Team = require('./Team'); const Application = require('./interfaces/Application'); const ApplicationCommandManager = require('../managers/ApplicationCommandManager'); const ApplicationEmojiManager = require('../managers/ApplicationEmojiManager'); const { EntitlementManager } = require('../managers/EntitlementManager'); const { SubscriptionManager } = require('../managers/SubscriptionManager'); const ApplicationFlagsBitField = require('../util/ApplicationFlagsBitField'); const { resolveImage } = require('../util/DataResolver'); const PermissionsBitField = require('../util/PermissionsBitField'); /** * @typedef {Object} ClientApplicationInstallParams * @property {OAuth2Scopes[]} scopes Scopes that will be set upon adding this application * @property {Readonly<PermissionsBitField>} permissions Permissions that will be requested for the integrated role */ /** * Represents a client application. * @extends {Application} */ class ClientApplication extends Application { constructor(client, data) { super(client, data); /** * The application command manager for this application * @type {ApplicationCommandManager} */ this.commands = new ApplicationCommandManager(this.client); /** * The application emoji manager for this application * @type {ApplicationEmojiManager} */ this.emojis = new ApplicationEmojiManager(this); /** * The entitlement manager for this application * @type {EntitlementManager} */ this.entitlements = new EntitlementManager(this.client); /** * The subscription manager for this application * @type {SubscriptionManager} */ this.subscriptions = new SubscriptionManager(this.client); } _patch(data) { super._patch(data); /** * The tags this application has (max of 5) * @type {string[]} */ this.tags = data.tags ?? []; if ('install_params' in data) { /** * Settings for this application's default in-app authorization * @type {?ClientApplicationInstallParams} */ this.installParams = { scopes: data.install_params.scopes, permissions: new PermissionsBitField(data.install_params.permissions).freeze(), }; } else { this.installParams ??= null; } /** * OAuth2 installation parameters. * @typedef {Object} IntegrationTypesConfigurationParameters * @property {OAuth2Scopes[]} scopes Scopes that will be set upon adding this application * @property {Readonly<PermissionsBitField>} permissions Permissions that will be requested for the integrated role */ /** * The application's supported installation context data. * @typedef {Object} IntegrationTypesConfigurationContext * @property {?IntegrationTypesConfigurationParameters} oauth2InstallParams * Scopes and permissions regarding the installation context */ /** * The application's supported installation context data. * @typedef {Object} IntegrationTypesConfiguration * @property {IntegrationTypesConfigurationContext} [0] Scopes and permissions * regarding the guild-installation context * @property {IntegrationTypesConfigurationContext} [1] Scopes and permissions * regarding the user-installation context */ if ('integration_types_config' in data) { /** * Default scopes and permissions for each supported installation context. * The keys are stringified variants of {@link ApplicationIntegrationType}. * @type {?IntegrationTypesConfiguration} */ this.integrationTypesConfig = Object.fromEntries( Object.entries(data.integration_types_config).map(([key, config]) => { let oauth2InstallParams = null; if (config.oauth2_install_params) { oauth2InstallParams = { scopes: config.oauth2_install_params.scopes, permissions: new PermissionsBitField(config.oauth2_install_params.permissions).freeze(), }; } const context = { oauth2InstallParams, }; return [key, context]; }), ); } else { this.integrationTypesConfig ??= null; } if ('custom_install_url' in data) { /** * This application's custom installation URL * @type {?string} */ this.customInstallURL = data.custom_install_url; } else { this.customInstallURL = null; } if ('flags' in data) { /** * The flags this application has * @type {ApplicationFlagsBitField} */ this.flags = new ApplicationFlagsBitField(data.flags).freeze(); } if ('approximate_guild_count' in data) { /** * An approximate amount of guilds this application is in. * @type {?number} */ this.approximateGuildCount = data.approximate_guild_count; } else { this.approximateGuildCount ??= null; } if ('approximate_user_install_count' in data) { /** * An approximate amount of users that have installed this application. * @type {?number} */ this.approximateUserInstallCount = data.approximate_user_install_count; } else { this.approximateUserInstallCount ??= null; } if ('approximate_user_authorization_count' in data) { /** * An approximate amount of users that have OAuth2 authorizations for this application. * * @type {?number} */ this.approximateUserAuthorizationCount = data.approximate_user_authorization_count; } else { this.approximateUserAuthorizationCount ??= null; } if ('guild_id' in data) { /** * The id of the guild associated with this application. * @type {?Snowflake} */ this.guildId = data.guild_id; } else { this.guildId ??= null; } if ('bot_require_code_grant' in data) { /** * If this application's bot requires a code grant when using the OAuth2 flow * @type {?boolean} */ this.botRequireCodeGrant = data.bot_require_code_grant; } else { this.botRequireCodeGrant ??= null; } if ('bot' in data) { /** * The bot associated with this application. * @type {?User} */ this.bot = this.client.users._add(data.bot); } else { this.bot ??= null; } if ('bot_public' in data) { /** * If this application's bot is public * @type {?boolean} */ this.botPublic = data.bot_public; } else { this.botPublic ??= null; } if ('interactions_endpoint_url' in data) { /** * This application's interaction endpoint URL. * @type {?string} */ this.interactionsEndpointURL = data.interactions_endpoint_url; } else { this.interactionsEndpointURL ??= null; } if ('role_connections_verification_url' in data) { /** * This application's role connection verification entry point URL * @type {?string} */ this.roleConnectionsVerificationURL = data.role_connections_verification_url; } else { this.roleConnectionsVerificationURL ??= null; } if ('event_webhooks_url' in data) { /** * This application's URL to receive event webhooks * @type {?string} */ this.eventWebhooksURL = data.event_webhooks_url; } else { this.eventWebhooksURL ??= null; } if ('event_webhooks_status' in data) { /** * This application's event webhooks status * @type {?ApplicationWebhookEventStatus} */ this.eventWebhooksStatus = data.event_webhooks_status; } else { this.eventWebhooksStatus ??= null; } if ('event_webhooks_types' in data) { /** * List of event webhooks types this application subscribes to * @type {?ApplicationWebhookEventType[]} */ this.eventWebhooksTypes = data.event_webhooks_types; } else { this.eventWebhooksTypes ??= null; } /** * The owner of this OAuth application * @type {?(User|Team)} */ this.owner = data.team ? new Team(this.client, data.team) : data.owner ? this.client.users._add(data.owner) : (this.owner ?? null); } /** * The guild associated with this application. * @type {?Guild} * @readonly */ get guild() { return this.client.guilds.cache.get(this.guildId) ?? null; } /** * Whether this application is partial * @type {boolean} * @readonly */ get partial() { return !this.name; } /** * Options used for editing an application. * @typedef {Object} ClientApplicationEditOptions * @property {string} [customInstallURL] The application's custom installation URL * @property {string} [description] The application's description * @property {string} [roleConnectionsVerificationURL] The application's role connection verification URL * @property {ClientApplicationInstallParams} [installParams] * Settings for the application's default in-app authorization * @property {ApplicationFlagsResolvable} [flags] The flags for the application * @property {?(BufferResolvable|Base64Resolvable)} [icon] The application's icon * @property {?(BufferResolvable|Base64Resolvable)} [coverImage] The application's cover image * @property {string} [interactionsEndpointURL] The application's interaction endpoint URL * @property {string} [eventWebhooksURL] The application's event webhooks URL * @property {ApplicationWebhookEventStatus.Enabled|ApplicationWebhookEventStatus.Disabled} [eventWebhooksStatus] * The application's event webhooks status. * @property {ApplicationWebhookEventType[]} [eventWebhooksTypes] The application's event webhooks types * @property {string[]} [tags] The application's tags */ /** * Edits this application. * @param {ClientApplicationEditOptions} [options] The options for editing this application * @returns {Promise<ClientApplication>} */ async edit({ customInstallURL, description, roleConnectionsVerificationURL, installParams, flags, icon, coverImage, interactionsEndpointURL, eventWebhooksURL, eventWebhooksStatus, eventWebhooksTypes, tags, } = {}) { const data = await this.client.rest.patch(Routes.currentApplication(), { body: { custom_install_url: customInstallURL, description, role_connections_verification_url: roleConnectionsVerificationURL, install_params: installParams, flags: flags === undefined ? undefined : ApplicationFlagsBitField.resolve(flags), icon: icon && (await resolveImage(icon)), cover_image: coverImage && (await resolveImage(coverImage)), interactions_endpoint_url: interactionsEndpointURL, event_webhooks_url: eventWebhooksURL, event_webhooks_status: eventWebhooksStatus, event_webhooks_types: eventWebhooksTypes, tags, }, }); this._patch(data); return this; } /** * Obtains this application from Discord. * @returns {Promise<ClientApplication>} */ async fetch() { const data = await this.client.rest.get(Routes.currentApplication()); this._patch(data); return this; } /** * Gets this application's role connection metadata records * @returns {Promise<ApplicationRoleConnectionMetadata[]>} */ async fetchRoleConnectionMetadataRecords() { const metadata = await this.client.rest.get(Routes.applicationRoleConnectionMetadata(this.client.user.id)); return metadata.map(data => new ApplicationRoleConnectionMetadata(data)); } /** * Data for creating or editing an application role connection metadata. * @typedef {Object} ApplicationRoleConnectionMetadataEditOptions * @property {string} name The name of the metadata field * @property {?Object<Locale, string>} [nameLocalizations] The name localizations for the metadata field * @property {string} description The description of the metadata field * @property {?Object<Locale, string>} [descriptionLocalizations] The description localizations for the metadata field * @property {string} key The dictionary key of the metadata field * @property {ApplicationRoleConnectionMetadataType} type The type of the metadata field */ /** * Updates this application's role connection metadata records * @param {ApplicationRoleConnectionMetadataEditOptions[]} records The new role connection metadata records * @returns {Promise<ApplicationRoleConnectionMetadata[]>} */ async editRoleConnectionMetadataRecords(records) { const newRecords = await this.client.rest.put(Routes.applicationRoleConnectionMetadata(this.client.user.id), { body: records.map(record => ({ type: record.type, key: record.key, name: record.name, name_localizations: record.nameLocalizations, description: record.description, description_localizations: record.descriptionLocalizations, })), }); return newRecords.map(data => new ApplicationRoleConnectionMetadata(data)); } /** * Gets this application's SKUs * @returns {Promise<Collection<Snowflake, SKU>>} */ async fetchSKUs() { const skus = await this.client.rest.get(Routes.skus(this.id)); return skus.reduce((coll, sku) => coll.set(sku.id, new SKU(this.client, sku)), new Collection()); } } module.exports = ClientApplication; node_modules/discord.js/src/structures/DMChannel.js 0000664 00000006503 15114741631 0016435 0 ustar 00 'use strict'; const { userMention } = require('@discordjs/formatters'); const { ChannelType } = require('discord-api-types/v10'); const { BaseChannel } = require('./BaseChannel'); const TextBasedChannel = require('./interfaces/TextBasedChannel'); const DMMessageManager = require('../managers/DMMessageManager'); const Partials = require('../util/Partials'); /** * Represents a direct message channel between two users. * @extends {BaseChannel} * @implements {TextBasedChannel} */ class DMChannel extends BaseChannel { constructor(client, data) { super(client, data); // Override the channel type so partials have a known type this.type = ChannelType.DM; /** * A manager of the messages belonging to this channel * @type {DMMessageManager} */ this.messages = new DMMessageManager(this); } _patch(data) { super._patch(data); if (data.recipients) { const recipient = data.recipients[0]; /** * The recipient's id * @type {Snowflake} */ this.recipientId = recipient.id; if ('username' in recipient || this.client.options.partials.includes(Partials.User)) { this.client.users._add(recipient); } } if ('last_message_id' in data) { /** * The channel's last message id, if one was sent * @type {?Snowflake} */ this.lastMessageId = data.last_message_id; } if ('last_pin_timestamp' in data) { /** * The timestamp when the last pinned message was pinned, if there was one * @type {?number} */ this.lastPinTimestamp = Date.parse(data.last_pin_timestamp); } else { this.lastPinTimestamp ??= null; } } /** * Whether this DMChannel is a partial * @type {boolean} * @readonly */ get partial() { return this.lastMessageId === undefined; } /** * The recipient on the other end of the DM * @type {?User} * @readonly */ get recipient() { return this.client.users.resolve(this.recipientId); } /** * Fetch this DMChannel. * @param {boolean} [force=true] Whether to skip the cache check and request the API * @returns {Promise<DMChannel>} */ fetch(force = true) { return this.client.users.createDM(this.recipientId, { force }); } /** * When concatenated with a string, this automatically returns the recipient's mention instead of the * DMChannel object. * @returns {string} * @example * // Logs: Hello from <@123456789012345678>! * console.log(`Hello from ${channel}!`); */ toString() { return userMention(this.recipientId); } // These are here only for documentation purposes - they are implemented by TextBasedChannel /* eslint-disable no-empty-function */ get lastMessage() {} get lastPinAt() {} send() {} sendTyping() {} createMessageCollector() {} awaitMessages() {} createMessageComponentCollector() {} awaitMessageComponent() {} // Doesn't work on DM channels; bulkDelete() {} // Doesn't work on DM channels; fetchWebhooks() {} // Doesn't work on DM channels; createWebhook() {} // Doesn't work on DM channels; setRateLimitPerUser() {} // Doesn't work on DM channels; setNSFW() {} } TextBasedChannel.applyToClass(DMChannel, true, [ 'bulkDelete', 'fetchWebhooks', 'createWebhook', 'setRateLimitPerUser', 'setNSFW', ]); module.exports = DMChannel; node_modules/discord.js/src/structures/GuildTemplate.js 0000664 00000013566 15114741631 0017413 0 ustar 00 'use strict'; const { setTimeout, clearTimeout } = require('node:timers'); const { RouteBases, Routes } = require('discord-api-types/v10'); const Base = require('./Base'); const { resolveImage } = require('../util/DataResolver'); const Events = require('../util/Events'); /** * Represents the template for a guild. * @extends {Base} */ class GuildTemplate extends Base { /** * A regular expression that matches guild template links. * The `code` group property is present on the `exec()` result of this expression. * @type {RegExp} * @memberof GuildTemplate */ static GuildTemplatesPattern = /discord(?:app)?\.(?:com\/template|new)\/(?<code>[\w-]{2,255})/i; constructor(client, data) { super(client); this._patch(data); } _patch(data) { if ('code' in data) { /** * The unique code of this template * @type {string} */ this.code = data.code; } if ('name' in data) { /** * The name of this template * @type {string} */ this.name = data.name; } if ('description' in data) { /** * The description of this template * @type {?string} */ this.description = data.description; } if ('usage_count' in data) { /** * The amount of times this template has been used * @type {number} */ this.usageCount = data.usage_count; } if ('creator_id' in data) { /** * The id of the user that created this template * @type {Snowflake} */ this.creatorId = data.creator_id; } if ('creator' in data) { /** * The user that created this template * @type {User} */ this.creator = this.client.users._add(data.creator); } if ('created_at' in data) { /** * The timestamp of when this template was created at * @type {number} */ this.createdTimestamp = Date.parse(data.created_at); } if ('updated_at' in data) { /** * The timestamp of when this template was last synced to the guild * @type {number} */ this.updatedTimestamp = Date.parse(data.updated_at); } if ('source_guild_id' in data) { /** * The id of the guild that this template belongs to * @type {Snowflake} */ this.guildId = data.source_guild_id; } if ('serialized_source_guild' in data) { /** * The data of the guild that this template would create * @type {APIGuild} */ this.serializedGuild = data.serialized_source_guild; } /** * Whether this template has unsynced changes * @type {?boolean} */ this.unSynced = 'is_dirty' in data ? Boolean(data.is_dirty) : null; return this; } /** * Creates a guild based on this template. * <warn>This is only available to bots in fewer than 10 guilds.</warn> * @param {string} name The name of the guild * @param {BufferResolvable|Base64Resolvable} [icon] The icon for the guild * @returns {Promise<Guild>} */ async createGuild(name, icon) { const { client } = this; const data = await client.rest.post(Routes.template(this.code), { body: { name, icon: await resolveImage(icon), }, }); if (client.guilds.cache.has(data.id)) return client.guilds.cache.get(data.id); return new Promise(resolve => { const resolveGuild = guild => { client.off(Events.GuildCreate, handleGuild); client.decrementMaxListeners(); resolve(guild); }; const handleGuild = guild => { if (guild.id === data.id) { clearTimeout(timeout); resolveGuild(guild); } }; client.incrementMaxListeners(); client.on(Events.GuildCreate, handleGuild); const timeout = setTimeout(() => resolveGuild(client.guilds._add(data)), 10_000).unref(); }); } /** * Options used to edit a guild template. * @typedef {Object} GuildTemplateEditOptions * @property {string} [name] The name of this template * @property {string} [description] The description of this template */ /** * Updates the metadata of this template. * @param {GuildTemplateEditOptions} [options] Options for editing the template * @returns {Promise<GuildTemplate>} */ async edit({ name, description } = {}) { const data = await this.client.rest.patch(Routes.guildTemplate(this.guildId, this.code), { body: { name, description }, }); return this._patch(data); } /** * Deletes this template. * @returns {Promise<GuildTemplate>} */ async delete() { await this.client.rest.delete(Routes.guildTemplate(this.guildId, this.code)); return this; } /** * Syncs this template to the current state of the guild. * @returns {Promise<GuildTemplate>} */ async sync() { const data = await this.client.rest.put(Routes.guildTemplate(this.guildId, this.code)); return this._patch(data); } /** * The time when this template was created at * @type {Date} * @readonly */ get createdAt() { return new Date(this.createdTimestamp); } /** * The time when this template was last synced to the guild * @type {Date} * @readonly */ get updatedAt() { return new Date(this.updatedTimestamp); } /** * The guild that this template belongs to * @type {?Guild} * @readonly */ get guild() { return this.client.guilds.resolve(this.guildId); } /** * The URL of this template * @type {string} * @readonly */ get url() { return `${RouteBases.template}/${this.code}`; } /** * When concatenated with a string, this automatically returns the template's code instead of the template object. * @returns {string} * @example * // Logs: Template: FKvmczH2HyUf * console.log(`Template: ${guildTemplate}!`); */ toString() { return this.code; } } module.exports = GuildTemplate; node_modules/discord.js/src/managers/ReactionUserManager.js 0000664 00000005460 15114741631 0020115 0 ustar 00 'use strict'; const { Collection } = require('@discordjs/collection'); const { makeURLSearchParams } = require('@discordjs/rest'); const { ReactionType, Routes } = require('discord-api-types/v10'); const CachedManager = require('./CachedManager'); const { DiscordjsError, ErrorCodes } = require('../errors'); const User = require('../structures/User'); /** * Manages API methods for users who reacted to a reaction and stores their cache. * @extends {CachedManager} */ class ReactionUserManager extends CachedManager { constructor(reaction, iterable) { super(reaction.client, User, iterable); /** * The reaction that this manager belongs to * @type {MessageReaction} */ this.reaction = reaction; } /** * The cache of this manager * @type {Collection<Snowflake, User>} * @name ReactionUserManager#cache */ /** * Options used to fetch users who gave a reaction. * @typedef {Object} FetchReactionUsersOptions * @property {ReactionType} [type=ReactionType.Normal] The reaction type to fetch * @property {number} [limit=100] The maximum amount of users to fetch, defaults to `100` * @property {Snowflake} [after] Limit fetching users to those with an id greater than the supplied id */ /** * Fetches all the users that gave this reaction. Resolves with a collection of users, mapped by their ids. * @param {FetchReactionUsersOptions} [options] Options for fetching the users * @returns {Promise<Collection<Snowflake, User>>} */ async fetch({ type = ReactionType.Normal, limit = 100, after } = {}) { const message = this.reaction.message; const query = makeURLSearchParams({ limit, after, type }); const data = await this.client.rest.get( Routes.channelMessageReaction(message.channelId, message.id, this.reaction.emoji.identifier), { query }, ); const users = new Collection(); for (const rawUser of data) { const user = this.client.users._add(rawUser); this.cache.set(user.id, user); users.set(user.id, user); } return users; } /** * Removes a user from this reaction. * @param {UserResolvable} [user=this.client.user] The user to remove the reaction of * @returns {Promise<MessageReaction>} */ async remove(user = this.client.user) { const userId = this.client.users.resolveId(user); if (!userId) throw new DiscordjsError(ErrorCodes.ReactionResolveUser); const message = this.reaction.message; const route = userId === this.client.user.id ? Routes.channelMessageOwnReaction(message.channelId, message.id, this.reaction.emoji.identifier) : Routes.channelMessageUserReaction(message.channelId, message.id, this.reaction.emoji.identifier, userId); await this.client.rest.delete(route); return this.reaction; } } module.exports = ReactionUserManager; node_modules/discord.js/src/managers/GuildEmojiRoleManager.js 0000664 00000006624 15114741631 0020367 0 ustar 00 'use strict'; const { Collection } = require('@discordjs/collection'); const DataManager = require('./DataManager'); const { DiscordjsTypeError, ErrorCodes } = require('../errors'); const { Role } = require('../structures/Role'); /** * Manages API methods for roles belonging to emojis and stores their cache. * @extends {DataManager} */ class GuildEmojiRoleManager extends DataManager { constructor(emoji) { super(emoji.client, Role); /** * The emoji belonging to this manager * @type {GuildEmoji} */ this.emoji = emoji; /** * The guild belonging to this manager * @type {Guild} */ this.guild = emoji.guild; } /** * The cache of roles belonging to this emoji * @type {Collection<Snowflake, Role>} * @readonly */ get cache() { return this.guild.roles.cache.filter(role => this.emoji._roles.includes(role.id)); } /** * Adds a role (or multiple roles) to the list of roles that can use this emoji. * @param {RoleResolvable|RoleResolvable[]|Collection<Snowflake, Role>} roleOrRoles The role or roles to add * @returns {Promise<GuildEmoji>} */ async add(roleOrRoles) { if (!Array.isArray(roleOrRoles) && !(roleOrRoles instanceof Collection)) roleOrRoles = [roleOrRoles]; const resolvedRoles = []; for (const role of roleOrRoles.values()) { const resolvedRole = this.guild.roles.resolveId(role); if (!resolvedRole) { throw new DiscordjsTypeError(ErrorCodes.InvalidElement, 'Array or Collection', 'roles', role); } resolvedRoles.push(resolvedRole); } const newRoles = [...new Set(resolvedRoles.concat(...this.cache.keys()))]; return this.set(newRoles); } /** * Removes a role (or multiple roles) from the list of roles that can use this emoji. * @param {RoleResolvable|RoleResolvable[]|Collection<Snowflake, Role>} roleOrRoles The role or roles to remove * @returns {Promise<GuildEmoji>} */ async remove(roleOrRoles) { if (!Array.isArray(roleOrRoles) && !(roleOrRoles instanceof Collection)) roleOrRoles = [roleOrRoles]; const resolvedRoleIds = []; for (const role of roleOrRoles.values()) { const roleId = this.guild.roles.resolveId(role); if (!roleId) { throw new DiscordjsTypeError(ErrorCodes.InvalidElement, 'Array or Collection', 'roles', role); } resolvedRoleIds.push(roleId); } const newRoles = [...this.cache.keys()].filter(id => !resolvedRoleIds.includes(id)); return this.set(newRoles); } /** * Sets the role(s) that can use this emoji. * @param {Collection<Snowflake, Role>|RoleResolvable[]} roles The roles or role ids to apply * @returns {Promise<GuildEmoji>} * @example * // Set the emoji's roles to a single role * guildEmoji.roles.set(['391156570408615936']) * .then(console.log) * .catch(console.error); * @example * // Remove all roles from an emoji * guildEmoji.roles.set([]) * .then(console.log) * .catch(console.error); */ set(roles) { return this.emoji.edit({ roles }); } clone() { const clone = new this.constructor(this.emoji); clone._patch([...this.cache.keys()]); return clone; } /** * Patches the roles for this manager's cache * @param {Snowflake[]} roles The new roles * @private */ _patch(roles) { this.emoji._roles = roles; } valueOf() { return this.cache; } } module.exports = GuildEmojiRoleManager; node_modules/discord.js/src/managers/StageInstanceManager.js 0000664 00000013172 15114741631 0020241 0 ustar 00 'use strict'; const { Routes } = require('discord-api-types/v10'); const CachedManager = require('./CachedManager'); const { DiscordjsTypeError, DiscordjsError, ErrorCodes } = require('../errors'); const { StageInstance } = require('../structures/StageInstance'); /** * Manages API methods for {@link StageInstance} objects and holds their cache. * @extends {CachedManager} */ class StageInstanceManager extends CachedManager { constructor(guild, iterable) { super(guild.client, StageInstance, iterable); /** * The guild this manager belongs to * @type {Guild} */ this.guild = guild; } /** * The cache of this Manager * @type {Collection<Snowflake, StageInstance>} * @name StageInstanceManager#cache */ /** * Options used to create a stage instance. * @typedef {Object} StageInstanceCreateOptions * @property {string} topic The topic of the stage instance * @property {StageInstancePrivacyLevel} [privacyLevel] The privacy level of the stage instance * @property {boolean} [sendStartNotification] Whether to notify `@everyone` that the stage instance has started * @property {GuildScheduledEventResolvable} [guildScheduledEvent] * The guild scheduled event associated with the stage instance */ /** * Data that can be resolved to a Stage Channel object. This can be: * * A StageChannel * * A Snowflake * @typedef {StageChannel|Snowflake} StageChannelResolvable */ /** * Creates a new stage instance. * @param {StageChannelResolvable} channel The stage channel to associate the created stage instance to * @param {StageInstanceCreateOptions} options The options to create the stage instance * @returns {Promise<StageInstance>} * @example * // Create a stage instance * guild.stageInstances.create('1234567890123456789', { * topic: 'A very creative topic', * privacyLevel: GuildPrivacyLevel.GuildOnly * }) * .then(stageInstance => console.log(stageInstance)) * .catch(console.error); */ async create(channel, options) { const channelId = this.guild.channels.resolveId(channel); if (!channelId) throw new DiscordjsError(ErrorCodes.StageChannelResolve); if (typeof options !== 'object') throw new DiscordjsTypeError(ErrorCodes.InvalidType, 'options', 'object', true); const { guildScheduledEvent, topic, privacyLevel, sendStartNotification } = options; const guildScheduledEventId = guildScheduledEvent && this.resolveId(guildScheduledEvent); const data = await this.client.rest.post(Routes.stageInstances(), { body: { channel_id: channelId, topic, privacy_level: privacyLevel, send_start_notification: sendStartNotification, guild_scheduled_event_id: guildScheduledEventId, }, }); return this._add(data); } /** * Fetches the stage instance associated with a stage channel, if it exists. * @param {StageChannelResolvable} channel The stage channel whose associated stage instance is to be fetched * @param {BaseFetchOptions} [options] Additional options for this fetch * @returns {Promise<StageInstance>} * @example * // Fetch a stage instance * guild.stageInstances.fetch('1234567890123456789') * .then(stageInstance => console.log(stageInstance)) * .catch(console.error); */ async fetch(channel, { cache = true, force = false } = {}) { const channelId = this.guild.channels.resolveId(channel); if (!channelId) throw new DiscordjsError(ErrorCodes.StageChannelResolve); if (!force) { const existing = this.cache.find(stageInstance => stageInstance.channelId === channelId); if (existing) return existing; } const data = await this.client.rest.get(Routes.stageInstance(channelId)); return this._add(data, cache); } /** * Options used to edit an existing stage instance. * @typedef {Object} StageInstanceEditOptions * @property {string} [topic] The new topic of the stage instance * @property {StageInstancePrivacyLevel} [privacyLevel] The new privacy level of the stage instance */ /** * Edits an existing stage instance. * @param {StageChannelResolvable} channel The stage channel whose associated stage instance is to be edited * @param {StageInstanceEditOptions} options The options to edit the stage instance * @returns {Promise<StageInstance>} * @example * // Edit a stage instance * guild.stageInstances.edit('1234567890123456789', { topic: 'new topic' }) * .then(stageInstance => console.log(stageInstance)) * .catch(console.error); */ async edit(channel, options) { if (typeof options !== 'object') throw new DiscordjsTypeError(ErrorCodes.InvalidType, 'options', 'object', true); const channelId = this.guild.channels.resolveId(channel); if (!channelId) throw new DiscordjsError(ErrorCodes.StageChannelResolve); let { topic, privacyLevel } = options; const data = await this.client.rest.patch(Routes.stageInstance(channelId), { body: { topic, privacy_level: privacyLevel, }, }); if (this.cache.has(data.id)) { const clone = this.cache.get(data.id)._clone(); clone._patch(data); return clone; } return this._add(data); } /** * Deletes an existing stage instance. * @param {StageChannelResolvable} channel The stage channel whose associated stage instance is to be deleted * @returns {Promise<void>} */ async delete(channel) { const channelId = this.guild.channels.resolveId(channel); if (!channelId) throw new DiscordjsError(ErrorCodes.StageChannelResolve); await this.client.rest.delete(Routes.stageInstance(channelId)); } } module.exports = StageInstanceManager; node_modules/discord.js/src/managers/SubscriptionManager.js 0000664 00000005545 15114741631 0020202 0 ustar 00 'use strict'; const { Collection } = require('@discordjs/collection'); const { makeURLSearchParams } = require('@discordjs/rest'); const { Routes } = require('discord-api-types/v10'); const CachedManager = require('./CachedManager'); const { DiscordjsTypeError, ErrorCodes } = require('../errors/index'); const { Subscription } = require('../structures/Subscription'); const { resolveSKUId } = require('../util/Util'); /** * Manages API methods for subscriptions and stores their cache. * @extends {CachedManager} */ class SubscriptionManager extends CachedManager { constructor(client, iterable) { super(client, Subscription, iterable); } /** * The cache of this manager * @type {Collection<Snowflake, Subscription>} * @name SubscriptionManager#cache */ /** * Options used to fetch a subscription * @typedef {BaseFetchOptions} FetchSubscriptionOptions * @property {SKUResolvable} sku The SKU to fetch the subscription for * @property {Snowflake} subscriptionId The id of the subscription to fetch */ /** * Options used to fetch subscriptions * @typedef {Object} FetchSubscriptionsOptions * @property {Snowflake} [after] Consider only subscriptions after this subscription id * @property {Snowflake} [before] Consider only subscriptions before this subscription id * @property {number} [limit] The maximum number of subscriptions to fetch * @property {SKUResolvable} sku The SKU to fetch subscriptions for * @property {UserResolvable} user The user to fetch entitlements for * <warn>If both `before` and `after` are provided, only `before` is respected</warn> */ /** * Fetches subscriptions for this application * @param {FetchSubscriptionOptions|FetchSubscriptionsOptions} [options={}] Options for fetching the subscriptions * @returns {Promise<Subscription|Collection<Snowflake, Subscription>>} */ async fetch(options = {}) { if (typeof options !== 'object') throw new DiscordjsTypeError(ErrorCodes.InvalidType, 'options', 'object', true); const { after, before, cache, limit, sku, subscriptionId, user } = options; const skuId = resolveSKUId(sku); if (!skuId) throw new DiscordjsTypeError(ErrorCodes.InvalidType, 'sku', 'SKUResolvable'); if (subscriptionId) { const subscription = await this.client.rest.get(Routes.skuSubscription(skuId, subscriptionId)); return this._add(subscription, cache); } const query = makeURLSearchParams({ limit, user_id: this.client.users.resolveId(user) ?? undefined, sku_id: skuId, before, after, }); const subscriptions = await this.client.rest.get(Routes.skuSubscriptions(skuId), { query }); return subscriptions.reduce( (coll, subscription) => coll.set(subscription.id, this._add(subscription, cache)), new Collection(), ); } } exports.SubscriptionManager = SubscriptionManager; node_modules/discord.js/src/managers/VoiceStateManager.js 0000664 00000003423 15114741631 0017555 0 ustar 00 'use strict'; const { Routes } = require('discord-api-types/v10'); const CachedManager = require('./CachedManager'); const VoiceState = require('../structures/VoiceState'); /** * Manages API methods for VoiceStates and stores their cache. * @extends {CachedManager} */ class VoiceStateManager extends CachedManager { constructor(guild, iterable) { super(guild.client, VoiceState, iterable); /** * The guild this manager belongs to * @type {Guild} */ this.guild = guild; } /** * The cache of this manager * @type {Collection<Snowflake, VoiceState>} * @name VoiceStateManager#cache */ _add(data, cache = true) { const existing = this.cache.get(data.user_id); if (existing) return existing._patch(data); const entry = new this.holds(this.guild, data); if (cache) this.cache.set(data.user_id, entry); return entry; } /** * Obtains a user's voice state from discord or from the cache if it's already available. * @param {GuildMemberResolvable|'@me'} member The member whose voice state is to be fetched * @param {BaseFetchOptions} [options] Additional options for this fetch * @returns {Promise<VoiceState>} * @example * // Fetch a member's voice state * guild.voiceStates.fetch("66564597481480192") * .then(console.log) * .catch(console.error); */ async fetch(member, { cache = true, force = false } = {}) { const id = member === '@me' ? member : this.guild.members.resolveId(member); if (!force) { const existing = this.cache.get(id === '@me' ? this.client.user.id : id); if (existing) return existing; } const data = await this.client.rest.get(Routes.guildVoiceState(this.guild.id, id)); return this._add(data, cache); } } module.exports = VoiceStateManager; node_modules/discord.js/src/managers/GuildApplicationCommandManager.js 0000664 00000001447 15114741631 0022242 0 ustar 00 'use strict'; const ApplicationCommandManager = require('./ApplicationCommandManager'); const ApplicationCommandPermissionsManager = require('./ApplicationCommandPermissionsManager'); /** * An extension for guild-specific application commands. * @extends {ApplicationCommandManager} */ class GuildApplicationCommandManager extends ApplicationCommandManager { constructor(guild, iterable) { super(guild.client, iterable); /** * The guild that this manager belongs to * @type {Guild} */ this.guild = guild; /** * The manager for permissions of arbitrary commands on this guild * @type {ApplicationCommandPermissionsManager} */ this.permissions = new ApplicationCommandPermissionsManager(this); } } module.exports = GuildApplicationCommandManager; node_modules/discord.js/src/managers/UserManager.js 0000664 00000011405 15114741631 0016424 0 ustar 00 'use strict'; const { ChannelType, Routes } = require('discord-api-types/v10'); const CachedManager = require('./CachedManager'); const { DiscordjsError, ErrorCodes } = require('../errors'); const { GuildMember } = require('../structures/GuildMember'); const { Message } = require('../structures/Message'); const ThreadMember = require('../structures/ThreadMember'); const User = require('../structures/User'); const { emitDeprecationWarningForUserFetchFlags } = require('../util/Util'); /** * Manages API methods for users and stores their cache. * @extends {CachedManager} */ class UserManager extends CachedManager { constructor(client, iterable) { super(client, User, iterable); } /** * The cache of this manager * @type {Collection<Snowflake, User>} * @name UserManager#cache */ /** * Data that resolves to give a User object. This can be: * * A User object * * A Snowflake * * A Message object (resolves to the message author) * * A GuildMember object * * A ThreadMember object * @typedef {User|Snowflake|Message|GuildMember|ThreadMember} UserResolvable */ /** * The DM between the client's user and a user * @param {Snowflake} userId The user id * @returns {?DMChannel} * @private */ dmChannel(userId) { return ( this.client.channels.cache.find(channel => channel.type === ChannelType.DM && channel.recipientId === userId) ?? null ); } /** * Creates a {@link DMChannel} between the client and a user. * @param {UserResolvable} user The UserResolvable to identify * @param {BaseFetchOptions} [options] Additional options for this fetch * @returns {Promise<DMChannel>} */ async createDM(user, { cache = true, force = false } = {}) { const id = this.resolveId(user); if (!force) { const dmChannel = this.dmChannel(id); if (dmChannel && !dmChannel.partial) return dmChannel; } const data = await this.client.rest.post(Routes.userChannels(), { body: { recipient_id: id } }); return this.client.channels._add(data, null, { cache }); } /** * Deletes a {@link DMChannel} (if one exists) between the client and a user. Resolves with the channel if successful. * @param {UserResolvable} user The UserResolvable to identify * @returns {Promise<DMChannel>} */ async deleteDM(user) { const id = this.resolveId(user); const dmChannel = this.dmChannel(id); if (!dmChannel) throw new DiscordjsError(ErrorCodes.UserNoDMChannel); await this.client.rest.delete(Routes.channel(dmChannel.id)); this.client.channels._remove(dmChannel.id); return dmChannel; } /** * Obtains a user from Discord, or the user cache if it's already available. * @param {UserResolvable} user The user to fetch * @param {BaseFetchOptions} [options] Additional options for this fetch * @returns {Promise<User>} */ async fetch(user, { cache = true, force = false } = {}) { const id = this.resolveId(user); if (!force) { const existing = this.cache.get(id); if (existing && !existing.partial) return existing; } const data = await this.client.rest.get(Routes.user(id)); return this._add(data, cache); } /** * Fetches a user's flags. * @param {UserResolvable} user The UserResolvable to identify * @param {BaseFetchOptions} [options] Additional options for this fetch * @returns {Promise<UserFlagsBitField>} * @deprecated <warn>This method is deprecated and will be removed in the next major version. * Flags may still be retrieved via {@link UserManager#fetch}.</warn> */ async fetchFlags(user, options) { emitDeprecationWarningForUserFetchFlags(this.constructor.name); return (await this.fetch(user, options)).flags; } /** * Sends a message to a user. * @param {UserResolvable} user The UserResolvable to identify * @param {string|MessagePayload|MessageCreateOptions} options The options to provide * @returns {Promise<Message>} */ async send(user, options) { return (await this.createDM(user)).send(options); } /** * Resolves a {@link UserResolvable} to a {@link User} object. * @param {UserResolvable} user The UserResolvable to identify * @returns {?User} */ resolve(user) { if (user instanceof GuildMember || user instanceof ThreadMember) return user.user; if (user instanceof Message) return user.author; return super.resolve(user); } /** * Resolves a {@link UserResolvable} to a {@link User} id. * @param {UserResolvable} user The UserResolvable to identify * @returns {?Snowflake} */ resolveId(user) { if (user instanceof ThreadMember) return user.id; if (user instanceof GuildMember) return user.user.id; if (user instanceof Message) return user.author.id; return super.resolveId(user); } } module.exports = UserManager; node_modules/discord.js/src/managers/PresenceManager.js 0000664 00000003167 15114741631 0017260 0 ustar 00 'use strict'; const CachedManager = require('./CachedManager'); const { Presence } = require('../structures/Presence'); /** * Manages API methods for Presences and holds their cache. * @extends {CachedManager} */ class PresenceManager extends CachedManager { constructor(client, iterable) { super(client, Presence, iterable); } /** * The cache of Presences * @type {Collection<Snowflake, Presence>} * @name PresenceManager#cache */ _add(data, cache) { return super._add(data, cache, { id: data.user.id }); } /** * Data that can be resolved to a Presence object. This can be: * * A Presence * * A UserResolvable * * A Snowflake * @typedef {Presence|UserResolvable|Snowflake} PresenceResolvable */ /** * Resolves a {@link PresenceResolvable} to a {@link Presence} object. * @param {PresenceResolvable} presence The presence resolvable to resolve * @returns {?Presence} */ resolve(presence) { const presenceResolvable = super.resolve(presence); if (presenceResolvable) return presenceResolvable; const userId = this.client.users.resolveId(presence); return super.cache.get(userId) ?? null; } /** * Resolves a {@link PresenceResolvable} to a {@link Presence} id. * @param {PresenceResolvable} presence The presence resolvable to resolve * @returns {?Snowflake} */ resolveId(presence) { const presenceResolvable = super.resolveId(presence); if (presenceResolvable) return presenceResolvable; const userId = this.client.users.resolveId(presence); return this.cache.has(userId) ? userId : null; } } module.exports = PresenceManager; node_modules/discord.js/src/managers/GuildMemberRoleManager.js 0000664 00000015207 15114741631 0020530 0 ustar 00 'use strict'; const { Collection } = require('@discordjs/collection'); const { Routes } = require('discord-api-types/v10'); const DataManager = require('./DataManager'); const { DiscordjsTypeError, ErrorCodes } = require('../errors'); const { Role } = require('../structures/Role'); /** * Manages API methods for roles of a GuildMember and stores their cache. * @extends {DataManager} */ class GuildMemberRoleManager extends DataManager { constructor(member) { super(member.client, Role); /** * The GuildMember this manager belongs to * @type {GuildMember} */ this.member = member; /** * The Guild this manager belongs to * @type {Guild} */ this.guild = member.guild; } /** * The roles of this member * @type {Collection<Snowflake, Role>} * @readonly */ get cache() { const everyone = this.guild.roles.everyone; return this.guild.roles.cache.filter(role => this.member._roles.includes(role.id)).set(everyone.id, everyone); } /** * The role of the member used to hoist them in a separate category in the users list * @type {?Role} * @readonly */ get hoist() { const hoistedRoles = this.cache.filter(role => role.hoist); if (!hoistedRoles.size) return null; return hoistedRoles.reduce((prev, role) => (role.comparePositionTo(prev) > 0 ? role : prev)); } /** * The role of the member used to set their role icon * @type {?Role} * @readonly */ get icon() { const iconRoles = this.cache.filter(role => role.icon || role.unicodeEmoji); if (!iconRoles.size) return null; return iconRoles.reduce((prev, role) => (role.comparePositionTo(prev) > 0 ? role : prev)); } /** * The role of the member used to set their color * @type {?Role} * @readonly */ get color() { const coloredRoles = this.cache.filter(role => role.color); if (!coloredRoles.size) return null; return coloredRoles.reduce((prev, role) => (role.comparePositionTo(prev) > 0 ? role : prev)); } /** * The role of the member with the highest position * @type {Role} * @readonly */ get highest() { return this.cache.reduce((prev, role) => (role.comparePositionTo(prev) > 0 ? role : prev), this.cache.first()); } /** * The premium subscriber role of the guild, if present on the member * @type {?Role} * @readonly */ get premiumSubscriberRole() { return this.cache.find(role => role.tags?.premiumSubscriberRole) ?? null; } /** * The managed role this member created when joining the guild, if any * <info>Only ever available on bots</info> * @type {?Role} * @readonly */ get botRole() { if (!this.member.user.bot) return null; return this.cache.find(role => role.tags?.botId === this.member.user.id) ?? null; } /** * Adds a role (or multiple roles) to the member. * * <info>Uses the idempotent PUT route for singular roles, otherwise PATCHes the underlying guild member</info> * @param {RoleResolvable|RoleResolvable[]|Collection<Snowflake, Role>} roleOrRoles The role or roles to add * @param {string} [reason] Reason for adding the role(s) * @returns {Promise<GuildMember>} */ async add(roleOrRoles, reason) { if (roleOrRoles instanceof Collection || Array.isArray(roleOrRoles)) { const resolvedRoles = []; for (const role of roleOrRoles.values()) { const resolvedRole = this.guild.roles.resolveId(role); if (!resolvedRole) { throw new DiscordjsTypeError(ErrorCodes.InvalidElement, 'Array or Collection', 'roles', role); } resolvedRoles.push(resolvedRole); } const newRoles = [...new Set(resolvedRoles.concat(...this.cache.keys()))]; return this.set(newRoles, reason); } else { roleOrRoles = this.guild.roles.resolveId(roleOrRoles); if (roleOrRoles === null) { throw new DiscordjsTypeError( ErrorCodes.InvalidType, 'roles', 'Role, Snowflake or Array or Collection of Roles or Snowflakes', ); } await this.client.rest.put(Routes.guildMemberRole(this.guild.id, this.member.id, roleOrRoles), { reason }); const clone = this.member._clone(); clone._roles = [...this.cache.keys(), roleOrRoles]; return clone; } } /** * Removes a role (or multiple roles) from the member. * * <info>Uses the idempotent DELETE route for singular roles, otherwise PATCHes the underlying guild member</info> * @param {RoleResolvable|RoleResolvable[]|Collection<Snowflake, Role>} roleOrRoles The role or roles to remove * @param {string} [reason] Reason for removing the role(s) * @returns {Promise<GuildMember>} */ async remove(roleOrRoles, reason) { if (roleOrRoles instanceof Collection || Array.isArray(roleOrRoles)) { const resolvedRoles = []; for (const role of roleOrRoles.values()) { const resolvedRole = this.guild.roles.resolveId(role); if (!resolvedRole) { throw new DiscordjsTypeError(ErrorCodes.InvalidElement, 'Array or Collection', 'roles', role); } resolvedRoles.push(resolvedRole); } const newRoles = this.cache.filter(role => !resolvedRoles.includes(role.id)); return this.set(newRoles, reason); } else { roleOrRoles = this.guild.roles.resolveId(roleOrRoles); if (roleOrRoles === null) { throw new DiscordjsTypeError( ErrorCodes.InvalidType, 'roles', 'Role, Snowflake or Array or Collection of Roles or Snowflakes', ); } await this.client.rest.delete(Routes.guildMemberRole(this.guild.id, this.member.id, roleOrRoles), { reason }); const clone = this.member._clone(); const newRoles = this.cache.filter(role => role.id !== roleOrRoles); clone._roles = [...newRoles.keys()]; return clone; } } /** * Sets the roles applied to the member. * @param {Collection<Snowflake, Role>|RoleResolvable[]} roles The roles or role ids to apply * @param {string} [reason] Reason for applying the roles * @returns {Promise<GuildMember>} * @example * // Set the member's roles to a single role * guildMember.roles.set(['391156570408615936']) * .then(console.log) * .catch(console.error); * @example * // Remove all the roles from a member * guildMember.roles.set([]) * .then(member => console.log(`Member roles is now of ${member.roles.cache.size} size`)) * .catch(console.error); */ set(roles, reason) { return this.member.edit({ roles, reason }); } clone() { const clone = new this.constructor(this.member); clone.member._roles = [...this.cache.keys()]; return clone; } } module.exports = GuildMemberRoleManager; node_modules/discord.js/src/managers/GuildMemberManager.js 0000664 00000054332 15114741631 0017710 0 ustar 00 'use strict'; const { setTimeout, clearTimeout } = require('node:timers'); const { Collection } = require('@discordjs/collection'); const { makeURLSearchParams } = require('@discordjs/rest'); const { DiscordSnowflake } = require('@sapphire/snowflake'); const { Routes, GatewayOpcodes } = require('discord-api-types/v10'); const CachedManager = require('./CachedManager'); const { DiscordjsError, DiscordjsTypeError, DiscordjsRangeError, ErrorCodes } = require('../errors'); const BaseGuildVoiceChannel = require('../structures/BaseGuildVoiceChannel'); const { GuildMember } = require('../structures/GuildMember'); const { Role } = require('../structures/Role'); const Events = require('../util/Events'); const { GuildMemberFlagsBitField } = require('../util/GuildMemberFlagsBitField'); const Partials = require('../util/Partials'); /** * Manages API methods for GuildMembers and stores their cache. * @extends {CachedManager} */ class GuildMemberManager extends CachedManager { constructor(guild, iterable) { super(guild.client, GuildMember, iterable); /** * The guild this manager belongs to * @type {Guild} */ this.guild = guild; } /** * The cache of this Manager * @type {Collection<Snowflake, GuildMember>} * @name GuildMemberManager#cache */ _add(data, cache = true) { return super._add(data, cache, { id: data.user.id, extras: [this.guild] }); } /** * Data that resolves to give a GuildMember object. This can be: * * A GuildMember object * * A User resolvable * @typedef {GuildMember|UserResolvable} GuildMemberResolvable */ /** * Resolves a {@link GuildMemberResolvable} to a {@link GuildMember} object. * @param {GuildMemberResolvable} member The user that is part of the guild * @returns {?GuildMember} */ resolve(member) { const memberResolvable = super.resolve(member); if (memberResolvable) return memberResolvable; const userId = this.client.users.resolveId(member); if (userId) return this.cache.get(userId) ?? null; return null; } /** * Resolves a {@link GuildMemberResolvable} to a member id. * @param {GuildMemberResolvable} member The user that is part of the guild * @returns {?Snowflake} */ resolveId(member) { const memberResolvable = super.resolveId(member); if (memberResolvable) return memberResolvable; const userId = this.client.users.resolveId(member); return this.cache.has(userId) ? userId : null; } /** * Options used to add a user to a guild using OAuth2. * @typedef {Object} AddGuildMemberOptions * @property {string} accessToken An OAuth2 access token for the user with the {@link OAuth2Scopes.GuildsJoin} * scope granted to the bot's application * @property {string} [nick] The nickname to give to the member * <info>This property requires the {@link PermissionFlagsBits.ManageNicknames} permission.</info> * @property {Collection<Snowflake, Role>|RoleResolvable[]} [roles] The roles to add to the member * <info>This property requires the {@link PermissionFlagsBits.ManageRoles} permission.</info> * @property {boolean} [mute] Whether the member should be muted * <info>This property requires the {@link PermissionFlagsBits.MuteMembers} permission.</info> * @property {boolean} [deaf] Whether the member should be deafened * <info>This property requires the {@link PermissionFlagsBits.MuteMembers} permission.</info> * @property {boolean} [force] Whether to skip the cache check and request the API directly * @property {boolean} [fetchWhenExisting=true] Whether to fetch the user if not cached and already a member */ /** * Adds a user to the guild using OAuth2. * <info>This method requires the {@link PermissionFlagsBits.CreateInstantInvite} permission. * @param {UserResolvable} user The user to add to the guild * @param {AddGuildMemberOptions} options Options for adding the user to the guild * @returns {Promise<?GuildMember>} */ async add(user, options) { const userId = this.client.users.resolveId(user); if (!userId) throw new DiscordjsTypeError(ErrorCodes.InvalidType, 'user', 'UserResolvable'); if (!options.force) { const cachedUser = this.cache.get(userId); if (cachedUser) return cachedUser; } const resolvedOptions = { access_token: options.accessToken, nick: options.nick, mute: options.mute, deaf: options.deaf, }; if (options.roles) { if (!Array.isArray(options.roles) && !(options.roles instanceof Collection)) { throw new DiscordjsTypeError( ErrorCodes.InvalidType, 'options.roles', 'Array or Collection of Roles or Snowflakes', true, ); } const resolvedRoles = []; for (const role of options.roles.values()) { const resolvedRole = this.guild.roles.resolveId(role); if (!resolvedRole) { throw new DiscordjsTypeError(ErrorCodes.InvalidElement, 'Array or Collection', 'options.roles', role); } resolvedRoles.push(resolvedRole); } resolvedOptions.roles = resolvedRoles; } const data = await this.client.rest.put(Routes.guildMember(this.guild.id, userId), { body: resolvedOptions }); // Data is an empty array buffer if the member is already part of the guild. return data instanceof ArrayBuffer ? options.fetchWhenExisting === false ? null : this.fetch(userId) : this._add(data); } /** * The client user as a GuildMember of this guild * @type {?GuildMember} * @readonly */ get me() { return ( this.cache.get(this.client.user.id) ?? (this.client.options.partials.includes(Partials.GuildMember) ? this._add({ user: { id: this.client.user.id } }, true) : null) ); } /** * Options used to fetch a single member from a guild. * @typedef {BaseFetchOptions} FetchMemberOptions * @property {UserResolvable} user The user to fetch */ /** * Options used to fetch multiple members from a guild. * @typedef {Object} FetchMembersOptions * @property {UserResolvable|UserResolvable[]} [user] The user(s) to fetch * @property {?string} [query] Limit fetch to members with similar usernames * @property {number} [limit=0] Maximum number of members to request * @property {boolean} [withPresences=false] Whether to include the presences * @property {number} [time=120e3] Timeout for receipt of members * @property {?string} [nonce] Nonce for this request (32 characters max - default to base 16 now timestamp) */ /** * Fetches member(s) from a guild. * @param {UserResolvable|FetchMemberOptions|FetchMembersOptions} [options] Options for fetching member(s). * Omitting the parameter or providing `undefined` will fetch all members. * @returns {Promise<GuildMember|Collection<Snowflake, GuildMember>>} * @example * // Fetch all members from a guild * guild.members.fetch() * .then(console.log) * .catch(console.error); * @example * // Fetch a single member * guild.members.fetch('66564597481480192') * .then(console.log) * .catch(console.error); * @example * // Fetch a single member without checking cache * guild.members.fetch({ user, force: true }) * .then(console.log) * .catch(console.error) * @example * // Fetch a single member without caching * guild.members.fetch({ user, cache: false }) * .then(console.log) * .catch(console.error); * @example * // Fetch by an array of users including their presences * guild.members.fetch({ user: ['66564597481480192', '191615925336670208'], withPresences: true }) * .then(console.log) * .catch(console.error); * @example * // Fetch by query * guild.members.fetch({ query: 'hydra', limit: 1 }) * .then(console.log) * .catch(console.error); */ fetch(options) { if (!options) return this._fetchMany(); const { user: users, limit, withPresences, cache, force } = options; const resolvedUser = this.client.users.resolveId(users ?? options); if (resolvedUser && !limit && !withPresences) return this._fetchSingle({ user: resolvedUser, cache, force }); const resolvedUsers = users?.map?.(user => this.client.users.resolveId(user)) ?? resolvedUser ?? undefined; return this._fetchMany({ ...options, users: resolvedUsers }); } async _fetchSingle({ user, cache, force = false }) { if (!force) { const existing = this.cache.get(user); if (existing && !existing.partial) return existing; } const data = await this.client.rest.get(Routes.guildMember(this.guild.id, user)); return this._add(data, cache); } async _fetchMany({ limit = 0, withPresences: presences, users, query, time = 120e3, nonce = DiscordSnowflake.generate().toString(), } = {}) { if (nonce.length > 32) throw new DiscordjsRangeError(ErrorCodes.MemberFetchNonceLength); return new Promise((resolve, reject) => { if (!query && !users) query = ''; this.guild.shard.send({ op: GatewayOpcodes.RequestGuildMembers, d: { guild_id: this.guild.id, presences, user_ids: users, query, nonce, limit, }, }); const fetchedMembers = new Collection(); let i = 0; const handler = (members, _, chunk) => { if (chunk.nonce !== nonce) return; timeout.refresh(); i++; for (const member of members.values()) { fetchedMembers.set(member.id, member); } if (members.size < 1_000 || (limit && fetchedMembers.size >= limit) || i === chunk.count) { clearTimeout(timeout); this.client.removeListener(Events.GuildMembersChunk, handler); this.client.decrementMaxListeners(); resolve(users && !Array.isArray(users) && fetchedMembers.size ? fetchedMembers.first() : fetchedMembers); } }; const timeout = setTimeout(() => { this.client.removeListener(Events.GuildMembersChunk, handler); this.client.decrementMaxListeners(); reject(new DiscordjsError(ErrorCodes.GuildMembersTimeout)); }, time).unref(); this.client.incrementMaxListeners(); this.client.on(Events.GuildMembersChunk, handler); }); } /** * Fetches the client user as a GuildMember of the guild. * @param {BaseFetchOptions} [options] The options for fetching the member * @returns {Promise<GuildMember>} */ fetchMe(options) { return this.fetch({ ...options, user: this.client.user.id }); } /** * Options used for searching guild members. * @typedef {Object} GuildSearchMembersOptions * @property {string} query Filter members whose username or nickname start with this query * @property {number} [limit] Maximum number of members to search * @property {boolean} [cache=true] Whether or not to cache the fetched member(s) */ /** * Searches for members in the guild based on a query. * @param {GuildSearchMembersOptions} options Options for searching members * @returns {Promise<Collection<Snowflake, GuildMember>>} */ async search({ query, limit, cache = true } = {}) { const data = await this.client.rest.get(Routes.guildMembersSearch(this.guild.id), { query: makeURLSearchParams({ query, limit }), }); return data.reduce((col, member) => col.set(member.user.id, this._add(member, cache)), new Collection()); } /** * Options used for listing guild members. * @typedef {Object} GuildListMembersOptions * @property {Snowflake} [after] Limit fetching members to those with an id greater than the supplied id * @property {number} [limit] Maximum number of members to list * @property {boolean} [cache=true] Whether or not to cache the fetched member(s) */ /** * Lists up to 1000 members of the guild. * @param {GuildListMembersOptions} [options] Options for listing members * @returns {Promise<Collection<Snowflake, GuildMember>>} */ async list({ after, limit, cache = true } = {}) { const query = makeURLSearchParams({ limit, after }); const data = await this.client.rest.get(Routes.guildMembers(this.guild.id), { query }); return data.reduce((col, member) => col.set(member.user.id, this._add(member, cache)), new Collection()); } /** * The data for editing a guild member. * @typedef {Object} GuildMemberEditOptions * @property {?string} [nick] The nickname to set for the member * @property {Collection<Snowflake, Role>|RoleResolvable[]} [roles] The roles or role ids to apply * @property {boolean} [mute] Whether or not the member should be muted * @property {boolean} [deaf] Whether or not the member should be deafened * @property {?GuildVoiceChannelResolvable} [channel] Channel to move the member to * (if they are connected to voice), or `null` if you want to disconnect them from voice * @property {?DateResolvable} [communicationDisabledUntil] The date or timestamp * for the member's communication to be disabled until. Provide `null` to enable communication again. * @property {GuildMemberFlagsResolvable} [flags] The flags to set for the member * @property {string} [reason] Reason for editing this user */ /** * Edits a member of the guild. * <info>The user must be a member of the guild</info> * @param {UserResolvable} user The member to edit * @param {GuildMemberEditOptions} options The options to provide * @returns {Promise<GuildMember>} */ async edit(user, { reason, ...options }) { const id = this.client.users.resolveId(user); if (!id) throw new DiscordjsTypeError(ErrorCodes.InvalidType, 'user', 'UserResolvable'); if (options.channel) { options.channel = this.guild.channels.resolve(options.channel); if (!(options.channel instanceof BaseGuildVoiceChannel)) { throw new DiscordjsError(ErrorCodes.GuildVoiceChannelResolve); } options.channel_id = options.channel.id; options.channel = undefined; } else if (options.channel === null) { options.channel_id = null; options.channel = undefined; } options.roles &&= options.roles.map(role => (role instanceof Role ? role.id : role)); if (options.communicationDisabledUntil !== undefined) { options.communication_disabled_until = // eslint-disable-next-line eqeqeq options.communicationDisabledUntil != null ? new Date(options.communicationDisabledUntil).toISOString() : options.communicationDisabledUntil; } if (options.flags !== undefined) { options.flags = GuildMemberFlagsBitField.resolve(options.flags); } let endpoint; if (id === this.client.user.id) { const keys = Object.keys(options); if (keys.length === 1 && keys[0] === 'nick') endpoint = Routes.guildMember(this.guild.id); else endpoint = Routes.guildMember(this.guild.id, id); } else { endpoint = Routes.guildMember(this.guild.id, id); } const d = await this.client.rest.patch(endpoint, { body: options, reason }); const clone = this.cache.get(id)?._clone(); clone?._patch(d); return clone ?? this._add(d, false); } /** * Options used for pruning guild members. * <info>It's recommended to set {@link GuildPruneMembersOptions#count options.count} * to `false` for large guilds.</info> * @typedef {Object} GuildPruneMembersOptions * @property {number} [days] Number of days of inactivity required to kick * @property {boolean} [dry=false] Get the number of users that will be kicked, without actually kicking them * @property {boolean} [count] Whether or not to return the number of users that have been kicked. * @property {RoleResolvable[]} [roles] Array of roles to bypass the "...and no roles" constraint when pruning * @property {string} [reason] Reason for this prune */ /** * Prunes members from the guild based on how long they have been inactive. * @param {GuildPruneMembersOptions} [options] Options for pruning * @returns {Promise<?number>} The number of members that were/will be kicked * @example * // See how many members will be pruned * guild.members.prune({ dry: true }) * .then(pruned => console.log(`This will prune ${pruned} people!`)) * .catch(console.error); * @example * // Actually prune the members * guild.members.prune({ days: 1, reason: 'too many people!' }) * .then(pruned => console.log(`I just pruned ${pruned} people!`)) * .catch(console.error); * @example * // Include members with a specified role * guild.members.prune({ days: 7, roles: ['657259391652855808'] }) * .then(pruned => console.log(`I just pruned ${pruned} people!`)) * .catch(console.error); */ async prune({ days, dry = false, count: compute_prune_count, roles = [], reason } = {}) { if (typeof days !== 'number') throw new DiscordjsTypeError(ErrorCodes.PruneDaysType); const query = { days }; const resolvedRoles = []; for (const role of roles) { const resolvedRole = this.guild.roles.resolveId(role); if (!resolvedRole) { throw new DiscordjsTypeError(ErrorCodes.InvalidElement, 'Array', 'options.roles', role); } resolvedRoles.push(resolvedRole); } if (resolvedRoles.length) { query.include_roles = dry ? resolvedRoles.join(',') : resolvedRoles; } const endpoint = Routes.guildPrune(this.guild.id); const { pruned } = await (dry ? this.client.rest.get(endpoint, { query: makeURLSearchParams(query), reason }) : this.client.rest.post(endpoint, { body: { ...query, compute_prune_count }, reason })); return pruned; } /** * Kicks a user from the guild. * <info>The user must be a member of the guild</info> * @param {UserResolvable} user The member to kick * @param {string} [reason] Reason for kicking * @returns {Promise<GuildMember|User|Snowflake>} Result object will be resolved as specifically as possible. * If the GuildMember cannot be resolved, the User will instead be attempted to be resolved. If that also cannot * be resolved, the user's id will be the result. * @example * // Kick a user by id (or with a user/guild member object) * guild.members.kick('84484653687267328') * .then(kickInfo => console.log(`Kicked ${kickInfo.user?.tag ?? kickInfo.tag ?? kickInfo}`)) * .catch(console.error); */ async kick(user, reason) { const id = this.client.users.resolveId(user); if (!id) throw new DiscordjsTypeError(ErrorCodes.InvalidType, 'user', 'UserResolvable'); await this.client.rest.delete(Routes.guildMember(this.guild.id, id), { reason }); return this.resolve(user) ?? this.client.users.resolve(user) ?? id; } /** * Bans a user from the guild. * @param {UserResolvable} user The user to ban * @param {BanOptions} [options] Options for the ban * @returns {Promise<GuildMember|User|Snowflake>} Result object will be resolved as specifically as possible. * If the GuildMember cannot be resolved, the User will instead be attempted to be resolved. If that also cannot * be resolved, the user id will be the result. * Internally calls the GuildBanManager#create method. * @example * // Ban a user by id (or with a user/guild member object) * guild.members.ban('84484653687267328') * .then(banInfo => console.log(`Banned ${banInfo.user?.tag ?? banInfo.tag ?? banInfo}`)) * .catch(console.error); */ ban(user, options) { return this.guild.bans.create(user, options); } /** * Unbans a user from the guild. Internally calls the {@link GuildBanManager#remove} method. * @param {UserResolvable} user The user to unban * @param {string} [reason] Reason for unbanning user * @returns {Promise<?User>} The user that was unbanned * @example * // Unban a user by id (or with a user/guild member object) * guild.members.unban('84484653687267328') * .then(user => console.log(`Unbanned ${user.username} from ${guild.name}`)) * .catch(console.error); */ unban(user, reason) { return this.guild.bans.remove(user, reason); } /** * Bulk ban users from a guild, and optionally delete previous messages sent by them. * @param {Collection<Snowflake, UserResolvable>|UserResolvable[]} users The users to ban * @param {BulkBanOptions} [options] The options for bulk banning users * @returns {Promise<BulkBanResult>} Returns an object with `bannedUsers` key containing the IDs of the banned users * and the key `failedUsers` with the IDs that could not be banned or were already banned. * Internally calls the GuildBanManager#bulkCreate method. * @example * // Bulk ban users by ids (or with user/guild member objects) and delete all their messages from the past 7 days * guild.members.bulkBan(['84484653687267328'], { deleteMessageSeconds: 7 * 24 * 60 * 60 }) * .then(result => { * console.log(`Banned ${result.bannedUsers.length} users, failed to ban ${result.failedUsers.length} users.`) * }) * .catch(console.error); */ bulkBan(users, options = {}) { return this.guild.bans.bulkCreate(users, options); } /** * Options used for adding or removing a role from a member. * @typedef {Object} AddOrRemoveGuildMemberRoleOptions * @property {GuildMemberResolvable} user The user to add/remove the role from * @property {RoleResolvable} role The role to add/remove * @property {string} [reason] Reason for adding/removing the role */ /** * Adds a role to a member. * @param {AddOrRemoveGuildMemberRoleOptions} options Options for adding the role * @returns {Promise<GuildMember|User|Snowflake>} */ async addRole(options) { const { user, role, reason } = options; const userId = this.resolveId(user); const roleId = this.guild.roles.resolveId(role); await this.client.rest.put(Routes.guildMemberRole(this.guild.id, userId, roleId), { reason }); return this.resolve(user) ?? this.client.users.resolve(user) ?? userId; } /** * Removes a role from a member. * @param {AddOrRemoveGuildMemberRoleOptions} options Options for removing the role * @returns {Promise<GuildMember|User|Snowflake>} */ async removeRole(options) { const { user, role, reason } = options; const userId = this.resolveId(user); const roleId = this.guild.roles.resolveId(role); await this.client.rest.delete(Routes.guildMemberRole(this.guild.id, userId, roleId), { reason }); return this.resolve(user) ?? this.client.users.resolve(user) ?? userId; } } module.exports = GuildMemberManager; node_modules/discord.js/src/managers/PartialGroupDMMessageManager.js 0000664 00000000677 15114741631 0021656 0 ustar 00 'use strict'; const MessageManager = require('./MessageManager'); /** * Manages API methods for messages in group direct message channels and holds their cache. * @extends {MessageManager} */ class PartialGroupDMMessageManager extends MessageManager { /** * The channel that the messages belong to * @name PartialGroupDMMessageManager#channel * @type {PartialGroupDMChannel} */ } module.exports = PartialGroupDMMessageManager; node_modules/discord.js/src/managers/CachedManager.js 0000664 00000002711 15114741631 0016655 0 ustar 00 'use strict'; const DataManager = require('./DataManager'); const { MakeCacheOverrideSymbol } = require('../util/Symbols'); /** * Manages the API methods of a data model with a mutable cache of instances. * @extends {DataManager} * @abstract */ class CachedManager extends DataManager { constructor(client, holds, iterable) { super(client, holds); /** * The private cache of items for this manager. * @type {Collection} * @private * @readonly * @name CachedManager#_cache */ Object.defineProperty(this, '_cache', { value: this.client.options.makeCache( this.constructor[MakeCacheOverrideSymbol] ?? this.constructor, this.holds, this.constructor, ), }); if (iterable) { for (const item of iterable) { this._add(item); } } } /** * The cache of items for this manager. * @type {Collection} * @abstract */ get cache() { return this._cache; } _add(data, cache = true, { id, extras = [] } = {}) { const existing = this.cache.get(id ?? data.id); if (existing) { if (cache) { existing._patch(data); return existing; } const clone = existing._clone(); clone._patch(data); return clone; } const entry = this.holds ? new this.holds(this.client, data, ...extras) : data; if (cache) this.cache.set(id ?? entry.id, entry); return entry; } } module.exports = CachedManager; node_modules/discord.js/src/managers/GuildStickerManager.js 0000664 00000014322 15114741631 0020100 0 ustar 00 'use strict'; const { Collection } = require('@discordjs/collection'); const { Routes } = require('discord-api-types/v10'); const CachedManager = require('./CachedManager'); const { DiscordjsTypeError, ErrorCodes } = require('../errors'); const MessagePayload = require('../structures/MessagePayload'); const { Sticker } = require('../structures/Sticker'); /** * Manages API methods for Guild Stickers and stores their cache. * @extends {CachedManager} */ class GuildStickerManager extends CachedManager { constructor(guild, iterable) { super(guild.client, Sticker, iterable); /** * The guild this manager belongs to * @type {Guild} */ this.guild = guild; } /** * The cache of Guild Stickers * @type {Collection<Snowflake, Sticker>} * @name GuildStickerManager#cache */ _add(data, cache) { return super._add(data, cache, { extras: [this.guild] }); } /** * Options used to create a guild sticker. * @typedef {Object} GuildStickerCreateOptions * @property {AttachmentPayload|BufferResolvable|Stream} file The file for the sticker * @property {string} name The name for the sticker * @property {string} tags The Discord name of a unicode emoji representing the sticker's expression * @property {?string} [description] The description for the sticker * @property {string} [reason] Reason for creating the sticker */ /** * Creates a new custom sticker in the guild. * @param {GuildStickerCreateOptions} options Options for creating a guild sticker * @returns {Promise<Sticker>} The created sticker * @example * // Create a new sticker from a URL * guild.stickers.create({ file: 'https://i.imgur.com/w3duR07.png', name: 'rip', tags: 'headstone' }) * .then(sticker => console.log(`Created new sticker with name ${sticker.name}!`)) * .catch(console.error); * @example * // Create a new sticker from a file on your computer * guild.stickers.create({ file: './memes/banana.png', name: 'banana', tags: 'banana' }) * .then(sticker => console.log(`Created new sticker with name ${sticker.name}!`)) * .catch(console.error); */ async create({ file, name, tags, description, reason } = {}) { const resolvedFile = await MessagePayload.resolveFile(file); if (!resolvedFile) throw new DiscordjsTypeError(ErrorCodes.ReqResourceType); file = { ...resolvedFile, key: 'file' }; const body = { name, tags, description: description ?? '' }; const sticker = await this.client.rest.post(Routes.guildStickers(this.guild.id), { appendToFormData: true, body, files: [file], reason, }); return this.client.actions.GuildStickerCreate.handle(this.guild, sticker).sticker; } /** * Data that resolves to give a Sticker object. This can be: * * A Sticker object * * A Snowflake * @typedef {Sticker|Snowflake} StickerResolvable */ /** * Resolves a StickerResolvable to a Sticker object. * @method resolve * @memberof GuildStickerManager * @instance * @param {StickerResolvable} sticker The Sticker resolvable to identify * @returns {?Sticker} */ /** * Resolves a StickerResolvable to a Sticker id string. * @method resolveId * @memberof GuildStickerManager * @instance * @param {StickerResolvable} sticker The Sticker resolvable to identify * @returns {?Snowflake} */ /** * Edits a sticker. * @param {StickerResolvable} sticker The sticker to edit * @param {GuildStickerEditOptions} [options={}] The new data for the sticker * @returns {Promise<Sticker>} */ async edit(sticker, options = {}) { const stickerId = this.resolveId(sticker); if (!stickerId) throw new DiscordjsTypeError(ErrorCodes.InvalidType, 'sticker', 'StickerResolvable'); const d = await this.client.rest.patch(Routes.guildSticker(this.guild.id, stickerId), { body: options, reason: options.reason, }); const existing = this.cache.get(stickerId); if (existing) { const clone = existing._clone(); clone._patch(d); return clone; } return this._add(d); } /** * Deletes a sticker. * @param {StickerResolvable} sticker The sticker to delete * @param {string} [reason] Reason for deleting this sticker * @returns {Promise<void>} */ async delete(sticker, reason) { sticker = this.resolveId(sticker); if (!sticker) throw new DiscordjsTypeError(ErrorCodes.InvalidType, 'sticker', 'StickerResolvable'); await this.client.rest.delete(Routes.guildSticker(this.guild.id, sticker), { reason }); } /** * Obtains one or more stickers from Discord, or the sticker cache if they're already available. * @param {Snowflake} [id] The Sticker's id * @param {BaseFetchOptions} [options] Additional options for this fetch * @returns {Promise<Sticker|Collection<Snowflake, Sticker>>} * @example * // Fetch all stickers from the guild * message.guild.stickers.fetch() * .then(stickers => console.log(`There are ${stickers.size} stickers.`)) * .catch(console.error); * @example * // Fetch a single sticker * message.guild.stickers.fetch('222078108977594368') * .then(sticker => console.log(`The sticker name is: ${sticker.name}`)) * .catch(console.error); */ async fetch(id, { cache = true, force = false } = {}) { if (id) { if (!force) { const existing = this.cache.get(id); if (existing) return existing; } const sticker = await this.client.rest.get(Routes.guildSticker(this.guild.id, id)); return this._add(sticker, cache); } const data = await this.client.rest.get(Routes.guildStickers(this.guild.id)); return new Collection(data.map(sticker => [sticker.id, this._add(sticker, cache)])); } /** * Fetches the user who uploaded this sticker, if this is a guild sticker. * @param {StickerResolvable} sticker The sticker to fetch the user for * @returns {Promise<?User>} */ async fetchUser(sticker) { sticker = this.resolve(sticker); if (!sticker) throw new DiscordjsTypeError(ErrorCodes.InvalidType, 'sticker', 'StickerResolvable'); const data = await this.client.rest.get(Routes.guildSticker(this.guild.id, sticker.id)); sticker._patch(data); return sticker.user; } } module.exports = GuildStickerManager; node_modules/discord.js/src/managers/GuildManager.js 0000664 00000036042 15114741631 0016556 0 ustar 00 'use strict'; const process = require('node:process'); const { setTimeout, clearTimeout } = require('node:timers'); const { Collection } = require('@discordjs/collection'); const { makeURLSearchParams } = require('@discordjs/rest'); const { GatewayOpcodes, Routes, RouteBases } = require('discord-api-types/v10'); const CachedManager = require('./CachedManager'); const { ErrorCodes, DiscordjsError } = require('../errors/index.js'); const ShardClientUtil = require('../sharding/ShardClientUtil'); const { Guild } = require('../structures/Guild'); const GuildChannel = require('../structures/GuildChannel'); const GuildEmoji = require('../structures/GuildEmoji'); const { GuildMember } = require('../structures/GuildMember'); const Invite = require('../structures/Invite'); const OAuth2Guild = require('../structures/OAuth2Guild'); const { Role } = require('../structures/Role'); const { resolveImage } = require('../util/DataResolver'); const Events = require('../util/Events'); const PermissionsBitField = require('../util/PermissionsBitField'); const SystemChannelFlagsBitField = require('../util/SystemChannelFlagsBitField'); const { _transformAPIIncidentsData } = require('../util/Transformers.js'); const { resolveColor } = require('../util/Util'); let cacheWarningEmitted = false; /** * Manages API methods for Guilds and stores their cache. * @extends {CachedManager} */ class GuildManager extends CachedManager { constructor(client, iterable) { super(client, Guild, iterable); if (!cacheWarningEmitted && this._cache.constructor.name !== 'Collection') { cacheWarningEmitted = true; process.emitWarning( `Overriding the cache handling for ${this.constructor.name} is unsupported and breaks functionality.`, 'UnsupportedCacheOverwriteWarning', ); } } /** * The cache of this Manager * @type {Collection<Snowflake, Guild>} * @name GuildManager#cache */ /** * Data that resolves to give a Guild object. This can be: * * A Guild object * * A GuildChannel object * * A GuildEmoji object * * A Role object * * A Snowflake * * An Invite object * @typedef {Guild|GuildChannel|GuildMember|GuildEmoji|Role|Snowflake|Invite} GuildResolvable */ /** * Partial data for a Role. * @typedef {Object} PartialRoleData * @property {Snowflake|number} [id] The role's id, used to set channel overrides. * This is a placeholder and will be replaced by the API after consumption * @property {string} [name] The name of the role * @property {ColorResolvable} [color] The color of the role, either a hex string or a base 10 number * @property {boolean} [hoist] Whether the role should be hoisted * @property {number} [position] The position of the role * @property {PermissionResolvable} [permissions] The permissions of the role * @property {boolean} [mentionable] Whether the role should be mentionable */ /** * Partial overwrite data. * @typedef {Object} PartialOverwriteData * @property {Snowflake|number} id The id of the {@link Role} or {@link User} this overwrite belongs to * @property {OverwriteType} [type] The type of this overwrite * @property {PermissionResolvable} [allow] The permissions to allow * @property {PermissionResolvable} [deny] The permissions to deny */ /** * Partial data for a Channel. * @typedef {Object} PartialChannelData * @property {Snowflake|number} [id] The channel's id, used to set its parent. * This is a placeholder and will be replaced by the API after consumption * @property {Snowflake|number} [parentId] The parent id for this channel * @property {ChannelType.GuildText|ChannelType.GuildVoice|ChannelType.GuildCategory} [type] The type of the channel * @property {string} name The name of the channel * @property {?string} [topic] The topic of the text channel * @property {boolean} [nsfw] Whether the channel is NSFW * @property {number} [bitrate] The bitrate of the voice channel * @property {number} [userLimit] The user limit of the channel * @property {?string} [rtcRegion] The RTC region of the channel * @property {VideoQualityMode} [videoQualityMode] The camera video quality mode of the channel * @property {PartialOverwriteData[]} [permissionOverwrites] * Overwrites of the channel * @property {number} [rateLimitPerUser] The rate limit per user (slowmode) of the channel in seconds */ /** * Resolves a {@link GuildResolvable} to a {@link Guild} object. * @method resolve * @memberof GuildManager * @instance * @param {GuildResolvable} guild The guild resolvable to identify * @returns {?Guild} */ resolve(guild) { if ( guild instanceof GuildChannel || guild instanceof GuildMember || guild instanceof GuildEmoji || guild instanceof Role || (guild instanceof Invite && guild.guild) ) { return super.resolve(guild.guild); } return super.resolve(guild); } /** * Resolves a {@link GuildResolvable} to a {@link Guild} id string. * @method resolveId * @memberof GuildManager * @instance * @param {GuildResolvable} guild The guild resolvable to identify * @returns {?Snowflake} */ resolveId(guild) { if ( guild instanceof GuildChannel || guild instanceof GuildMember || guild instanceof GuildEmoji || guild instanceof Role || (guild instanceof Invite && guild.guild) ) { return super.resolveId(guild.guild.id); } return super.resolveId(guild); } /** * Options used to create a guild. * @typedef {Object} GuildCreateOptions * @property {string} name The name of the guild * @property {?(BufferResolvable|Base64Resolvable)} [icon=null] The icon for the guild * @property {GuildVerificationLevel} [verificationLevel] The verification level for the guild * @property {GuildDefaultMessageNotifications} [defaultMessageNotifications] The default message notifications * for the guild * @property {GuildExplicitContentFilter} [explicitContentFilter] The explicit content filter level for the guild * @property {PartialRoleData[]} [roles=[]] The roles for this guild, * @property {PartialChannelData[]} [channels=[]] The channels for this guild * @property {Snowflake|number} [afkChannelId] The AFK channel's id * @property {number} [afkTimeout] The AFK timeout in seconds * the first element of this array is used to change properties of the guild's everyone role. * @property {Snowflake|number} [systemChannelId] The system channel's id * @property {SystemChannelFlagsResolvable} [systemChannelFlags] The flags of the system channel */ /* eslint-enable max-len */ /** * Creates a guild. * <warn>This is only available to bots in fewer than 10 guilds.</warn> * @param {GuildCreateOptions} options Options for creating the guild * @returns {Promise<Guild>} The guild that was created */ async create({ name, icon = null, verificationLevel, defaultMessageNotifications, explicitContentFilter, roles = [], channels = [], afkChannelId, afkTimeout, systemChannelId, systemChannelFlags, }) { const data = await this.client.rest.post(Routes.guilds(), { body: { name, icon: icon && (await resolveImage(icon)), verification_level: verificationLevel, default_message_notifications: defaultMessageNotifications, explicit_content_filter: explicitContentFilter, roles: roles.map(({ color, permissions, ...options }) => ({ ...options, color: color && resolveColor(color), permissions: permissions === undefined ? undefined : PermissionsBitField.resolve(permissions).toString(), })), channels: channels.map( ({ parentId, userLimit, rtcRegion, videoQualityMode, permissionOverwrites, rateLimitPerUser, ...options }) => ({ ...options, parent_id: parentId, user_limit: userLimit, rtc_region: rtcRegion, video_quality_mode: videoQualityMode, permission_overwrites: permissionOverwrites?.map(({ allow, deny, ...permissionOverwriteOptions }) => ({ ...permissionOverwriteOptions, allow: allow === undefined ? undefined : PermissionsBitField.resolve(allow).toString(), deny: deny === undefined ? undefined : PermissionsBitField.resolve(deny).toString(), })), rate_limit_per_user: rateLimitPerUser, }), ), afk_channel_id: afkChannelId, afk_timeout: afkTimeout, system_channel_id: systemChannelId, system_channel_flags: systemChannelFlags === undefined ? undefined : SystemChannelFlagsBitField.resolve(systemChannelFlags), }, }); return ( this.client.guilds.cache.get(data.id) ?? new Promise(resolve => { const handleGuild = guild => { if (guild.id === data.id) { clearTimeout(timeout); this.client.decrementMaxListeners(); resolve(guild); } }; this.client.incrementMaxListeners(); this.client.once(Events.GuildCreate, handleGuild); const timeout = setTimeout(() => { this.client.removeListener(Events.GuildCreate, handleGuild); this.client.decrementMaxListeners(); resolve(this.client.guilds._add(data)); }, 10_000).unref(); }) ); } /** * Options used to fetch a single guild. * @typedef {BaseFetchOptions} FetchGuildOptions * @property {GuildResolvable} guild The guild to fetch * @property {boolean} [withCounts=true] Whether the approximate member and presence counts should be returned */ /** * Options used to fetch multiple guilds. * @typedef {Object} FetchGuildsOptions * @property {Snowflake} [before] Get guilds before this guild id * @property {Snowflake} [after] Get guilds after this guild id * @property {number} [limit] Maximum number of guilds to request (1-200) */ /** * Obtains one or multiple guilds from Discord, or the guild cache if it's already available. * @param {GuildResolvable|FetchGuildOptions|FetchGuildsOptions} [options] The guild's id or options * @returns {Promise<Guild|Collection<Snowflake, OAuth2Guild>>} */ async fetch(options = {}) { const id = this.resolveId(options) ?? this.resolveId(options.guild); if (id) { if (!options.force) { const existing = this.cache.get(id); if (existing) return existing; } const data = await this.client.rest.get(Routes.guild(id), { query: makeURLSearchParams({ with_counts: options.withCounts ?? true }), }); data.shardId = ShardClientUtil.shardIdForGuildId(id, this.client.options.shardCount); return this._add(data, options.cache); } const data = await this.client.rest.get(Routes.userGuilds(), { query: makeURLSearchParams(options) }); return data.reduce((coll, guild) => coll.set(guild.id, new OAuth2Guild(this.client, guild)), new Collection()); } /** * @typedef {Object} FetchSoundboardSoundsOptions * @param {Snowflake[]} guildIds The ids of the guilds to fetch soundboard sounds for * @param {number} [time=10_000] The timeout for receipt of the soundboard sounds */ /** * Fetches soundboard sounds for the specified guilds. * @param {FetchSoundboardSoundsOptions} options The options for fetching soundboard sounds * @returns {Promise<Collection<Snowflake, Collection<Snowflake, SoundboardSound>>>} * @example * // Fetch soundboard sounds for multiple guilds * const soundboardSounds = await client.guilds.fetchSoundboardSounds({ * guildIds: ['123456789012345678', '987654321098765432'], * }) * * console.log(soundboardSounds.get('123456789012345678')); */ async fetchSoundboardSounds({ guildIds, time = 10_000 }) { const shardCount = this.client.options.shardCount; const shardIds = new Map(); for (const guildId of guildIds) { const shardId = ShardClientUtil.shardIdForGuildId(guildId, shardCount); const group = shardIds.get(shardId); if (group) group.push(guildId); else shardIds.set(shardId, [guildId]); } for (const [shardId, shardGuildIds] of shardIds) { this.client.ws.shards.get(shardId).send({ op: GatewayOpcodes.RequestSoundboardSounds, d: { guild_ids: shardGuildIds, }, }); } return new Promise((resolve, reject) => { const remainingGuildIds = new Set(guildIds); const fetchedSoundboardSounds = new Collection(); const handler = (soundboardSounds, guild) => { timeout.refresh(); if (!remainingGuildIds.has(guild.id)) return; fetchedSoundboardSounds.set(guild.id, soundboardSounds); remainingGuildIds.delete(guild.id); if (remainingGuildIds.size === 0) { clearTimeout(timeout); this.client.removeListener(Events.SoundboardSounds, handler); this.client.decrementMaxListeners(); resolve(fetchedSoundboardSounds); } }; const timeout = setTimeout(() => { this.client.removeListener(Events.SoundboardSounds, handler); this.client.decrementMaxListeners(); reject(new DiscordjsError(ErrorCodes.GuildSoundboardSoundsTimeout)); }, time).unref(); this.client.incrementMaxListeners(); this.client.on(Events.SoundboardSounds, handler); }); } /** * Options used to set incident actions. Supplying `null` to any option will disable the action. * @typedef {Object} IncidentActionsEditOptions * @property {?DateResolvable} [invitesDisabledUntil] When invites should be enabled again * @property {?DateResolvable} [dmsDisabledUntil] When direct messages should be enabled again */ /** * Sets the incident actions for a guild. * @param {GuildResolvable} guild The guild * @param {IncidentActionsEditOptions} incidentActions The incident actions to set * @returns {Promise<IncidentActions>} */ async setIncidentActions(guild, { invitesDisabledUntil, dmsDisabledUntil }) { const guildId = this.resolveId(guild); const data = await this.client.rest.put(Routes.guildIncidentActions(guildId), { body: { invites_disabled_until: invitesDisabledUntil && new Date(invitesDisabledUntil).toISOString(), dms_disabled_until: dmsDisabledUntil && new Date(dmsDisabledUntil).toISOString(), }, }); const parsedData = _transformAPIIncidentsData(data); const resolvedGuild = this.resolve(guild); if (resolvedGuild) { resolvedGuild.incidentsData = parsedData; } return parsedData; } /** * Returns a URL for the PNG widget of a guild. * @param {GuildResolvable} guild The guild of the widget image * @param {GuildWidgetStyle} [style] The style for the widget image * @returns {string} */ widgetImageURL(guild, style) { const urlSearchParams = String(makeURLSearchParams({ style })); return `${RouteBases.api}${Routes.guildWidgetImage(this.resolveId(guild))}${ urlSearchParams ? `?${urlSearchParams}` : '' }`; } } module.exports = GuildManager; node_modules/discord.js/src/managers/GuildSoundboardSoundManager.js 0000664 00000017742 15114741631 0021616 0 ustar 00 'use strict'; const { Collection } = require('@discordjs/collection'); const { lazy } = require('@discordjs/util'); const { Routes } = require('discord-api-types/v10'); const CachedManager = require('./CachedManager.js'); const { DiscordjsTypeError, ErrorCodes } = require('../errors/index.js'); const { SoundboardSound } = require('../structures/SoundboardSound.js'); const { resolveBase64, resolveFile } = require('../util/DataResolver.js'); const fileTypeMime = lazy(() => require('magic-bytes.js').filetypemime); /** * Manages API methods for Soundboard Sounds and stores their cache. * @extends {CachedManager} */ class GuildSoundboardSoundManager extends CachedManager { constructor(guild, iterable) { super(guild.client, SoundboardSound, iterable); /** * The guild this manager belongs to * @type {Guild} */ this.guild = guild; } /** * The cache of Soundboard Sounds * @type {Collection<Snowflake, SoundboardSound>} * @name GuildSoundboardSoundManager#cache */ _add(data, cache) { return super._add(data, cache, { extras: [this.guild], id: data.sound_id }); } /** * Data that resolves to give a SoundboardSound object. This can be: * * A SoundboardSound object * * A Snowflake * @typedef {SoundboardSound|Snowflake} SoundboardSoundResolvable */ /** * Resolves a SoundboardSoundResolvable to a SoundboardSound object. * @method resolve * @memberof GuildSoundboardSoundManager * @instance * @param {SoundboardSoundResolvable} soundboardSound The SoundboardSound resolvable to identify * @returns {?SoundboardSound} */ /** * Resolves a {@link SoundboardSoundResolvable} to a {@link SoundboardSound} id. * @param {SoundboardSoundResolvable} soundboardSound The soundboard sound resolvable to resolve * @returns {?Snowflake} */ resolveId(soundboardSound) { if (soundboardSound instanceof this.holds) return soundboardSound.soundId; if (typeof soundboardSound === 'string') return soundboardSound; return null; } /** * Options used to create a soundboard sound in a guild. * @typedef {Object} GuildSoundboardSoundCreateOptions * @property {BufferResolvable|Stream} file The file for the soundboard sound * @property {string} name The name for the soundboard sound * @property {string} [contentType] The content type for the soundboard sound file * @property {number} [volume] The volume (a double) for the soundboard sound, from 0 (inclusive) to 1. Defaults to 1 * @property {Snowflake} [emojiId] The emoji id for the soundboard sound * @property {string} [emojiName] The emoji name for the soundboard sound * @property {string} [reason] The reason for creating the soundboard sound */ /** * Creates a new guild soundboard sound. * @param {GuildSoundboardSoundCreateOptions} options Options for creating a guild soundboard sound * @returns {Promise<SoundboardSound>} The created soundboard sound * @example * // Create a new soundboard sound from a file on your computer * guild.soundboardSounds.create({ file: './sound.mp3', name: 'sound' }) * .then(sound => console.log(`Created new soundboard sound with name ${sound.name}!`)) * .catch(console.error); */ async create({ contentType, emojiId, emojiName, file, name, reason, volume }) { const resolvedFile = await resolveFile(file); const resolvedContentType = contentType ?? resolvedFile.contentType ?? fileTypeMime()(resolvedFile.data)[0]; const sound = resolveBase64(resolvedFile.data, resolvedContentType); const body = { emoji_id: emojiId, emoji_name: emojiName, name, sound, volume }; const soundboardSound = await this.client.rest.post(Routes.guildSoundboardSounds(this.guild.id), { body, reason, }); return this._add(soundboardSound); } /** * Data for editing a soundboard sound. * @typedef {Object} GuildSoundboardSoundEditOptions * @property {string} [name] The name of the soundboard sound * @property {?number} [volume] The volume (a double) of the soundboard sound, from 0 (inclusive) to 1 * @property {?Snowflake} [emojiId] The emoji id of the soundboard sound * @property {?string} [emojiName] The emoji name of the soundboard sound * @property {string} [reason] The reason for editing the soundboard sound */ /** * Edits a soundboard sound. * @param {SoundboardSoundResolvable} soundboardSound The soundboard sound to edit * @param {GuildSoundboardSoundEditOptions} [options={}] The new data for the soundboard sound * @returns {Promise<SoundboardSound>} */ async edit(soundboardSound, options = {}) { const soundId = this.resolveId(soundboardSound); if (!soundId) throw new DiscordjsTypeError(ErrorCodes.InvalidType, 'soundboardSound', 'SoundboardSoundResolvable'); const { emojiId, emojiName, name, reason, volume } = options; const body = { emoji_id: emojiId, emoji_name: emojiName, name, volume }; const data = await this.client.rest.patch(Routes.guildSoundboardSound(this.guild.id, soundId), { body, reason, }); const existing = this.cache.get(soundId); if (existing) { const clone = existing._clone(); clone._patch(data); return clone; } return this._add(data); } /** * Deletes a soundboard sound. * @param {SoundboardSoundResolvable} soundboardSound The soundboard sound to delete * @param {string} [reason] Reason for deleting this soundboard sound * @returns {Promise<void>} */ async delete(soundboardSound, reason) { const soundId = this.resolveId(soundboardSound); if (!soundId) throw new DiscordjsTypeError(ErrorCodes.InvalidType, 'soundboardSound', 'SoundboardSoundResolvable'); await this.client.rest.delete(Routes.guildSoundboardSound(this.guild.id, soundId), { reason }); } /** * Options used to fetch a soundboard sound. * @typedef {BaseFetchOptions} FetchSoundboardSoundOptions * @property {SoundboardSoundResolvable} soundboardSound The soundboard sound to fetch */ /** * Options used to fetch soundboard sounds from Discord * @typedef {Object} FetchGuildSoundboardSoundsOptions * @property {boolean} [cache] Whether to cache the fetched soundboard sounds */ /* eslint-disable max-len */ /** * Obtains one or more soundboard sounds from Discord, or the soundboard sound cache if they're already available. * @param {SoundboardSoundResolvable|FetchSoundboardSoundOptions|FetchGuildSoundboardSoundsOptions} [options] Options for fetching soundboard sound(s) * @returns {Promise<SoundboardSound|Collection<Snowflake, SoundboardSound>>} * @example * // Fetch a single soundboard sound * guild.soundboardSounds.fetch('222078108977594368') * .then(sound => console.log(`The soundboard sound name is: ${sound.name}`)) * .catch(console.error); * @example * // Fetch all soundboard sounds from the guild * guild.soundboardSounds.fetch() * .then(sounds => console.log(`There are ${sounds.size} soundboard sounds.`)) * .catch(console.error); */ /* eslint-enable max-len */ async fetch(options) { if (!options) return this._fetchMany(); const { cache, force, soundboardSound } = options; const resolvedSoundboardSound = this.resolveId(soundboardSound ?? options); if (resolvedSoundboardSound) return this._fetchSingle({ cache, force, soundboardSound: resolvedSoundboardSound }); return this._fetchMany({ cache }); } async _fetchSingle({ cache, force, soundboardSound } = {}) { if (!force) { const existing = this.cache.get(soundboardSound); if (existing) return existing; } const data = await this.client.rest.get(Routes.guildSoundboardSound(this.guild.id, soundboardSound)); return this._add(data, cache); } async _fetchMany({ cache } = {}) { const data = await this.client.rest.get(Routes.guildSoundboardSounds(this.guild.id)); return data.items.reduce((coll, sound) => coll.set(sound.sound_id, this._add(sound, cache)), new Collection()); } } exports.GuildSoundboardSoundManager = GuildSoundboardSoundManager; node_modules/discord.js/src/managers/CategoryChannelChildManager.js 0000664 00000006303 15114741631 0021521 0 ustar 00 'use strict'; const DataManager = require('./DataManager'); const GuildChannel = require('../structures/GuildChannel'); /** * Manages API methods for CategoryChannels' children. * @extends {DataManager} */ class CategoryChannelChildManager extends DataManager { constructor(channel) { super(channel.client, GuildChannel); /** * The category channel this manager belongs to * @type {CategoryChannel} */ this.channel = channel; } /** * The channels that are a part of this category * @type {Collection<Snowflake, GuildChannel>} * @readonly */ get cache() { return this.guild.channels.cache.filter(channel => channel.parentId === this.channel.id); } /** * The guild this manager belongs to * @type {Guild} * @readonly */ get guild() { return this.channel.guild; } /** * Options for creating a channel using {@link CategoryChannelChildManager#create}. * @typedef {Object} CategoryCreateChannelOptions * @property {string} name The name for the new channel * @property {ChannelType} [type=ChannelType.GuildText] The type of the new channel. * @property {string} [topic] The topic for the new channel * @property {boolean} [nsfw] Whether the new channel is NSFW * @property {number} [bitrate] Bitrate of the new channel in bits (only voice) * @property {number} [userLimit] Maximum amount of users allowed in the new channel (only voice) * @property {OverwriteResolvable[]|Collection<Snowflake, OverwriteResolvable>} [permissionOverwrites] * Permission overwrites of the new channel * @property {number} [position] Position of the new channel * @property {number} [rateLimitPerUser] The rate limit per user (slowmode) for the new channel in seconds * @property {string} [rtcRegion] The specific region of the new channel. * @property {VideoQualityMode} [videoQualityMode] The camera video quality mode of the voice channel * @property {number} [defaultThreadRateLimitPerUser] The initial rate limit per user (slowmode) * to set on newly created threads in a channel. * @property {GuildForumTagData[]} [availableTags] The tags that can be used in this channel (forum only). * @property {DefaultReactionEmoji} [defaultReactionEmoji] * The emoji to show in the add reaction button on a thread in a guild forum channel. * @property {ThreadAutoArchiveDuration} [defaultAutoArchiveDuration] * The default auto archive duration for all new threads in this channel * @property {SortOrderType} [defaultSortOrder] The default sort order mode used to order posts (forum only). * @property {ForumLayoutType} [defaultForumLayout] The default layout used to display posts (forum only). * @property {string} [reason] Reason for creating the new channel */ /** * Creates a new channel within this category. * <info>You cannot create a channel of type {@link ChannelType.GuildCategory} inside a CategoryChannel.</info> * @param {CategoryCreateChannelOptions} options Options for creating the new channel * @returns {Promise<GuildChannel>} */ create(options) { return this.guild.channels.create({ ...options, parent: this.channel.id, }); } } module.exports = CategoryChannelChildManager; node_modules/discord.js/src/managers/GuildChannelManager.js 0000664 00000047225 15114741631 0020054 0 ustar 00 'use strict'; const process = require('node:process'); const { Collection } = require('@discordjs/collection'); const { ChannelType, Routes } = require('discord-api-types/v10'); const CachedManager = require('./CachedManager'); const GuildTextThreadManager = require('./GuildTextThreadManager'); const { DiscordjsError, DiscordjsTypeError, ErrorCodes } = require('../errors'); const GuildChannel = require('../structures/GuildChannel'); const PermissionOverwrites = require('../structures/PermissionOverwrites'); const ThreadChannel = require('../structures/ThreadChannel'); const Webhook = require('../structures/Webhook'); const ChannelFlagsBitField = require('../util/ChannelFlagsBitField'); const { transformGuildForumTag, transformGuildDefaultReaction } = require('../util/Channels'); const { ThreadChannelTypes } = require('../util/Constants'); const { resolveImage } = require('../util/DataResolver'); const { setPosition } = require('../util/Util'); let cacheWarningEmitted = false; /** * Manages API methods for GuildChannels and stores their cache. * @extends {CachedManager} */ class GuildChannelManager extends CachedManager { constructor(guild, iterable) { super(guild.client, GuildChannel, iterable); const defaultCaching = this._cache.constructor.name === 'Collection' || this._cache.maxSize === undefined || this._cache.maxSize === Infinity; if (!cacheWarningEmitted && !defaultCaching) { cacheWarningEmitted = true; process.emitWarning( `Overriding the cache handling for ${this.constructor.name} is unsupported and breaks functionality.`, 'UnsupportedCacheOverwriteWarning', ); } /** * The guild this Manager belongs to * @type {Guild} */ this.guild = guild; } /** * The number of channels in this managers cache excluding thread channels * that do not count towards a guild's maximum channels restriction. * @type {number} * @readonly */ get channelCountWithoutThreads() { return this.cache.reduce((acc, channel) => { if (ThreadChannelTypes.includes(channel.type)) return acc; return ++acc; }, 0); } /** * The cache of this Manager * @type {Collection<Snowflake, GuildChannel|ThreadChannel>} * @name GuildChannelManager#cache */ _add(channel) { const existing = this.cache.get(channel.id); if (existing) return existing; this.cache.set(channel.id, channel); return channel; } /** * Data that can be resolved to give a Guild Channel object. This can be: * * A GuildChannel object * * A ThreadChannel object * * A Snowflake * @typedef {GuildChannel|ThreadChannel|Snowflake} GuildChannelResolvable */ /** * Resolves a GuildChannelResolvable to a Channel object. * @param {GuildChannelResolvable} channel The GuildChannel resolvable to resolve * @returns {?(GuildChannel|ThreadChannel)} */ resolve(channel) { if (channel instanceof ThreadChannel) return this.cache.get(channel.id) ?? null; return super.resolve(channel); } /** * Resolves a GuildChannelResolvable to a channel id. * @param {GuildChannelResolvable} channel The GuildChannel resolvable to resolve * @returns {?Snowflake} */ resolveId(channel) { if (channel instanceof ThreadChannel) return super.resolveId(channel.id); return super.resolveId(channel); } /** * Data that can be resolved to a News Channel object. This can be: * * A NewsChannel object * * A Snowflake * @typedef {NewsChannel|Snowflake} NewsChannelResolvable */ /** * Adds the target channel to a channel's followers. * @param {NewsChannelResolvable} channel The channel to follow * @param {TextChannelResolvable} targetChannel The channel where published announcements will be posted at * @param {string} [reason] Reason for creating the webhook * @returns {Promise<Snowflake>} Returns created target webhook id. */ async addFollower(channel, targetChannel, reason) { const channelId = this.resolveId(channel); if (!channelId) { throw new DiscordjsTypeError(ErrorCodes.InvalidType, 'channel', 'NewsChannelResolvable'); } const targetChannelId = this.resolveId(targetChannel); if (!targetChannelId) { throw new DiscordjsTypeError(ErrorCodes.InvalidType, 'targetChannel', 'TextChannelResolvable'); } const { webhook_id } = await this.client.rest.post(Routes.channelFollowers(channelId), { body: { webhook_channel_id: targetChannelId }, reason, }); return webhook_id; } /** * Options used to create a new channel in a guild. * @typedef {CategoryCreateChannelOptions} GuildChannelCreateOptions * @property {?CategoryChannelResolvable} [parent] Parent of the new channel */ /** * Creates a new channel in the guild. * @param {GuildChannelCreateOptions} options Options for creating the new channel * @returns {Promise<GuildChannel>} * @example * // Create a new text channel * guild.channels.create({ name: 'new-general', reason: 'Needed a cool new channel' }) * .then(console.log) * .catch(console.error); * @example * // Create a new channel with permission overwrites * guild.channels.create({ * name: 'new-general', * type: ChannelType.GuildVoice, * permissionOverwrites: [ * { * id: message.author.id, * deny: [PermissionFlagsBits.ViewChannel], * }, * ], * }) */ async create({ name, type, topic, nsfw, bitrate, userLimit, parent, permissionOverwrites, position, rateLimitPerUser, rtcRegion, videoQualityMode, defaultThreadRateLimitPerUser, availableTags, defaultReactionEmoji, defaultAutoArchiveDuration, defaultSortOrder, defaultForumLayout, reason, }) { parent &&= this.client.channels.resolveId(parent); permissionOverwrites &&= permissionOverwrites.map(overwrite => PermissionOverwrites.resolve(overwrite, this.guild)); const data = await this.client.rest.post(Routes.guildChannels(this.guild.id), { body: { name, topic, type, nsfw, bitrate, user_limit: userLimit, parent_id: parent, position, permission_overwrites: permissionOverwrites, rate_limit_per_user: rateLimitPerUser, rtc_region: rtcRegion, video_quality_mode: videoQualityMode, default_thread_rate_limit_per_user: defaultThreadRateLimitPerUser, available_tags: availableTags?.map(availableTag => transformGuildForumTag(availableTag)), default_reaction_emoji: defaultReactionEmoji && transformGuildDefaultReaction(defaultReactionEmoji), default_auto_archive_duration: defaultAutoArchiveDuration, default_sort_order: defaultSortOrder, default_forum_layout: defaultForumLayout, }, reason, }); return this.client.actions.ChannelCreate.handle(data).channel; } /** * @typedef {ChannelWebhookCreateOptions} WebhookCreateOptions * @property {TextChannel|NewsChannel|VoiceChannel|StageChannel|ForumChannel|MediaChannel|Snowflake} channel * The channel to create the webhook for */ /** * Creates a webhook for the channel. * @param {WebhookCreateOptions} options Options for creating the webhook * @returns {Promise<Webhook>} Returns the created Webhook * @example * // Create a webhook for the current channel * guild.channels.createWebhook({ * channel: '222197033908436994', * name: 'Snek', * avatar: 'https://i.imgur.com/mI8XcpG.jpg', * reason: 'Needed a cool new Webhook' * }) * .then(console.log) * .catch(console.error) */ async createWebhook({ channel, name, avatar, reason }) { const id = this.resolveId(channel); if (!id) throw new DiscordjsTypeError(ErrorCodes.InvalidType, 'channel', 'GuildChannelResolvable'); if (typeof avatar === 'string' && !avatar.startsWith('data:')) { avatar = await resolveImage(avatar); } const data = await this.client.rest.post(Routes.channelWebhooks(id), { body: { name, avatar, }, reason, }); return new Webhook(this.client, data); } /** * Options used to edit a guild channel. * @typedef {Object} GuildChannelEditOptions * @property {string} [name] The name of the channel * @property {ChannelType} [type] The type of the channel (only conversion between text and news is supported) * @property {number} [position] The position of the channel * @property {?string} [topic] The topic of the text channel * @property {boolean} [nsfw] Whether the channel is NSFW * @property {number} [bitrate] The bitrate of the voice channel * @property {number} [userLimit] The user limit of the voice channel * @property {?CategoryChannelResolvable} [parent] The parent of the channel * @property {boolean} [lockPermissions] * Lock the permissions of the channel to what the parent's permissions are * @property {OverwriteResolvable[]|Collection<Snowflake, OverwriteResolvable>} [permissionOverwrites] * Permission overwrites for the channel * @property {number} [rateLimitPerUser] The rate limit per user (slowmode) for the channel in seconds * @property {ThreadAutoArchiveDuration} [defaultAutoArchiveDuration] * The default auto archive duration for all new threads in this channel * @property {?string} [rtcRegion] The RTC region of the channel * @property {?VideoQualityMode} [videoQualityMode] The camera video quality mode of the channel * @property {GuildForumTagData[]} [availableTags] The tags to set as available in a forum channel * @property {?DefaultReactionEmoji} [defaultReactionEmoji] The emoji to set as the default reaction emoji * @property {number} [defaultThreadRateLimitPerUser] The rate limit per user (slowmode) to set on forum posts * @property {ChannelFlagsResolvable} [flags] The flags to set on the channel * @property {?SortOrderType} [defaultSortOrder] The default sort order mode to set on the channel * @property {ForumLayoutType} [defaultForumLayout] The default forum layout to set on the channel * @property {string} [reason] Reason for editing this channel */ /** * Edits the channel. * @param {GuildChannelResolvable} channel The channel to edit * @param {GuildChannelEditOptions} options Options for editing the channel * @returns {Promise<GuildChannel>} * @example * // Edit a channel * guild.channels.edit('222197033908436994', { name: 'new-channel' }) * .then(console.log) * .catch(console.error); */ async edit(channel, options) { const resolvedChannel = this.resolve(channel); if (!resolvedChannel) throw new DiscordjsTypeError(ErrorCodes.InvalidType, 'channel', 'GuildChannelResolvable'); const parentId = options.parent && this.client.channels.resolveId(options.parent); if (options.position !== undefined) { await this.setPosition(resolvedChannel, options.position, { position: options.position, reason: options.reason }); } let permission_overwrites = options.permissionOverwrites?.map(overwrite => PermissionOverwrites.resolve(overwrite, this.guild), ); if (options.lockPermissions) { if (parentId) { const newParent = this.cache.get(parentId); if (newParent?.type === ChannelType.GuildCategory) { permission_overwrites = newParent.permissionOverwrites.cache.map(overwrite => PermissionOverwrites.resolve(overwrite, this.guild), ); } } else if (resolvedChannel.parent) { permission_overwrites = resolvedChannel.parent.permissionOverwrites.cache.map(overwrite => PermissionOverwrites.resolve(overwrite, this.guild), ); } } const newData = await this.client.rest.patch(Routes.channel(resolvedChannel.id), { body: { name: options.name, type: options.type, topic: options.topic, nsfw: options.nsfw, bitrate: options.bitrate, user_limit: options.userLimit, rtc_region: options.rtcRegion, video_quality_mode: options.videoQualityMode, parent_id: parentId, lock_permissions: options.lockPermissions, rate_limit_per_user: options.rateLimitPerUser, default_auto_archive_duration: options.defaultAutoArchiveDuration, permission_overwrites, available_tags: options.availableTags?.map(availableTag => transformGuildForumTag(availableTag)), default_reaction_emoji: options.defaultReactionEmoji && transformGuildDefaultReaction(options.defaultReactionEmoji), default_thread_rate_limit_per_user: options.defaultThreadRateLimitPerUser, flags: 'flags' in options ? ChannelFlagsBitField.resolve(options.flags) : undefined, default_sort_order: options.defaultSortOrder, default_forum_layout: options.defaultForumLayout, }, reason: options.reason, }); return this.client.actions.ChannelUpdate.handle(newData).updated; } /** * Sets a new position for the guild channel. * @param {GuildChannelResolvable} channel The channel to set the position for * @param {number} position The new position for the guild channel * @param {SetChannelPositionOptions} options Options for setting position * @returns {Promise<GuildChannel>} * @example * // Set a new channel position * guild.channels.setPosition('222078374472843266', 2) * .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`)) * .catch(console.error); */ async setPosition(channel, position, { relative, reason } = {}) { channel = this.resolve(channel); if (!channel) throw new DiscordjsTypeError(ErrorCodes.InvalidType, 'channel', 'GuildChannelResolvable'); const updatedChannels = await setPosition( channel, position, relative, this.guild._sortedChannels(channel), this.client, Routes.guildChannels(this.guild.id), reason, ); this.client.actions.GuildChannelsPositionUpdate.handle({ guild_id: this.guild.id, channels: updatedChannels, }); return channel; } /** * Obtains one or more guild channels from Discord, or the channel cache if they're already available. * @param {Snowflake} [id] The channel's id * @param {BaseFetchOptions} [options] Additional options for this fetch * @returns {Promise<?GuildChannel|ThreadChannel|Collection<Snowflake, ?GuildChannel>>} * @example * // Fetch all channels from the guild (excluding threads) * message.guild.channels.fetch() * .then(channels => console.log(`There are ${channels.size} channels.`)) * .catch(console.error); * @example * // Fetch a single channel * message.guild.channels.fetch('222197033908436994') * .then(channel => console.log(`The channel name is: ${channel.name}`)) * .catch(console.error); */ async fetch(id, { cache = true, force = false } = {}) { if (id && !force) { const existing = this.cache.get(id); if (existing) return existing; } if (id) { const data = await this.client.rest.get(Routes.channel(id)); // Since this is the guild manager, throw if on a different guild if (this.guild.id !== data.guild_id) throw new DiscordjsError(ErrorCodes.GuildChannelUnowned); return this.client.channels._add(data, this.guild, { cache }); } const data = await this.client.rest.get(Routes.guildChannels(this.guild.id)); const channels = new Collection(); for (const channel of data) channels.set(channel.id, this.client.channels._add(channel, this.guild, { cache })); return channels; } /** * Fetches all webhooks for the channel. * @param {GuildChannelResolvable} channel The channel to fetch webhooks for * @returns {Promise<Collection<Snowflake, Webhook>>} * @example * // Fetch webhooks * guild.channels.fetchWebhooks('769862166131245066') * .then(hooks => console.log(`This channel has ${hooks.size} hooks`)) * .catch(console.error); */ async fetchWebhooks(channel) { const id = this.resolveId(channel); if (!id) throw new DiscordjsTypeError(ErrorCodes.InvalidType, 'channel', 'GuildChannelResolvable'); const data = await this.client.rest.get(Routes.channelWebhooks(id)); return data.reduce((hooks, hook) => hooks.set(hook.id, new Webhook(this.client, hook)), new Collection()); } /** * Data that can be resolved to give a Category Channel object. This can be: * * A CategoryChannel object * * A Snowflake * @typedef {CategoryChannel|Snowflake} CategoryChannelResolvable */ /** * The data needed for updating a channel's position. * @typedef {Object} ChannelPosition * @property {GuildChannel|Snowflake} channel Channel to update * @property {number} [position] New position for the channel * @property {CategoryChannelResolvable} [parent] Parent channel for this channel * @property {boolean} [lockPermissions] If the overwrites should be locked to the parents overwrites */ /** * Batch-updates the guild's channels' positions. * <info>Only one channel's parent can be changed at a time</info> * @param {ChannelPosition[]} channelPositions Channel positions to update * @returns {Promise<Guild>} * @example * guild.channels.setPositions([{ channel: channelId, position: newChannelIndex }]) * .then(guild => console.log(`Updated channel positions for ${guild}`)) * .catch(console.error); */ async setPositions(channelPositions) { channelPositions = channelPositions.map(channelPosition => ({ id: this.client.channels.resolveId(channelPosition.channel), position: channelPosition.position, lock_permissions: channelPosition.lockPermissions, parent_id: channelPosition.parent !== undefined ? this.resolveId(channelPosition.parent) : undefined, })); await this.client.rest.patch(Routes.guildChannels(this.guild.id), { body: channelPositions }); return this.client.actions.GuildChannelsPositionUpdate.handle({ guild_id: this.guild.id, channels: channelPositions, }).guild; } /** * Data returned from fetching threads. * @typedef {Object} FetchedThreads * @property {Collection<Snowflake, ThreadChannel>} threads The threads that were fetched * @property {Collection<Snowflake, ThreadMember>} members The thread members in the received threads */ /** * Obtains all active thread channels in the guild. * @param {boolean} [cache=true] Whether to cache the fetched data * @returns {Promise<FetchedThreads>} * @example * // Fetch all threads from the guild * message.guild.channels.fetchActiveThreads() * .then(fetched => console.log(`There are ${fetched.threads.size} threads.`)) * .catch(console.error); */ async fetchActiveThreads(cache = true) { const data = await this.rawFetchGuildActiveThreads(); return GuildTextThreadManager._mapThreads(data, this.client, { guild: this.guild, cache }); } /** * `GET /guilds/{guild.id}/threads/active` * @private * @returns {Promise<RESTGetAPIGuildThreadsResult>} */ rawFetchGuildActiveThreads() { return this.client.rest.get(Routes.guildActiveThreads(this.guild.id)); } /** * Deletes the channel. * @param {GuildChannelResolvable} channel The channel to delete * @param {string} [reason] Reason for deleting this channel * @returns {Promise<void>} * @example * // Delete the channel * guild.channels.delete('858850993013260338', 'making room for new channels') * .then(console.log) * .catch(console.error); */ async delete(channel, reason) { const id = this.resolveId(channel); if (!id) throw new DiscordjsTypeError(ErrorCodes.InvalidType, 'channel', 'GuildChannelResolvable'); await this.client.rest.delete(Routes.channel(id), { reason }); this.client.actions.ChannelDelete.handle({ id }); } } module.exports = GuildChannelManager; node_modules/discord.js/src/managers/ChannelManager.js 0000664 00000010245 15114741631 0017057 0 ustar 00 'use strict'; const process = require('node:process'); const { Routes } = require('discord-api-types/v10'); const CachedManager = require('./CachedManager'); const { BaseChannel } = require('../structures/BaseChannel'); const { createChannel } = require('../util/Channels'); const { ThreadChannelTypes } = require('../util/Constants'); const Events = require('../util/Events'); let cacheWarningEmitted = false; /** * A manager of channels belonging to a client * @extends {CachedManager} */ class ChannelManager extends CachedManager { constructor(client, iterable) { super(client, BaseChannel, iterable); const defaultCaching = this._cache.constructor.name === 'Collection' || this._cache.maxSize === undefined || this._cache.maxSize === Infinity; if (!cacheWarningEmitted && !defaultCaching) { cacheWarningEmitted = true; process.emitWarning( `Overriding the cache handling for ${this.constructor.name} is unsupported and breaks functionality.`, 'UnsupportedCacheOverwriteWarning', ); } } /** * The cache of Channels * @type {Collection<Snowflake, BaseChannel>} * @name ChannelManager#cache */ _add(data, guild, { cache = true, allowUnknownGuild = false } = {}) { const existing = this.cache.get(data.id); if (existing) { if (cache) existing._patch(data); guild?.channels?._add(existing); if (ThreadChannelTypes.includes(existing.type)) { existing.parent?.threads?._add(existing); } return existing; } const channel = createChannel(this.client, data, guild, { allowUnknownGuild }); if (!channel) { this.client.emit(Events.Debug, `Failed to find guild, or unknown type for channel ${data.id} ${data.type}`); return null; } if (cache && !allowUnknownGuild) this.cache.set(channel.id, channel); return channel; } _remove(id) { const channel = this.cache.get(id); channel?.guild?.channels.cache.delete(id); for (const [code, invite] of channel?.guild?.invites.cache ?? []) { if (invite.channelId === id) channel.guild.invites.cache.delete(code); } channel?.parent?.threads?.cache.delete(id); this.cache.delete(id); if (channel?.threads) { for (const threadId of channel.threads.cache.keys()) { this.cache.delete(threadId); channel.guild?.channels.cache.delete(threadId); } } } /** * Data that can be resolved to give a Channel object. This can be: * * A Channel object * * A Snowflake * @typedef {BaseChannel|Snowflake} ChannelResolvable */ /** * Resolves a ChannelResolvable to a Channel object. * @method resolve * @memberof ChannelManager * @instance * @param {ChannelResolvable} channel The channel resolvable to resolve * @returns {?BaseChannel} */ /** * Resolves a ChannelResolvable to a channel id string. * @method resolveId * @memberof ChannelManager * @instance * @param {ChannelResolvable} channel The channel resolvable to resolve * @returns {?Snowflake} */ /** * Options for fetching a channel from Discord * @typedef {BaseFetchOptions} FetchChannelOptions * @property {boolean} [allowUnknownGuild=false] Allows the channel to be returned even if the guild is not in cache, * it will not be cached. <warn>Many of the properties and methods on the returned channel will throw errors</warn> */ /** * Obtains a channel from Discord, or the channel cache if it's already available. * @param {Snowflake} id The channel's id * @param {FetchChannelOptions} [options] Additional options for this fetch * @returns {Promise<?BaseChannel>} * @example * // Fetch a channel by its id * client.channels.fetch('222109930545610754') * .then(channel => console.log(channel.name)) * .catch(console.error); */ async fetch(id, { allowUnknownGuild = false, cache = true, force = false } = {}) { if (!force) { const existing = this.cache.get(id); if (existing && !existing.partial) return existing; } const data = await this.client.rest.get(Routes.channel(id)); return this._add(data, null, { cache, allowUnknownGuild }); } } module.exports = ChannelManager; node_modules/discord.js/src/managers/EntitlementManager.js 0000664 00000014304 15114741631 0017777 0 ustar 00 'use strict'; const { Collection } = require('@discordjs/collection'); const { makeURLSearchParams } = require('@discordjs/rest'); const { Routes, EntitlementOwnerType } = require('discord-api-types/v10'); const CachedManager = require('./CachedManager'); const { ErrorCodes, DiscordjsTypeError } = require('../errors/index'); const { Entitlement } = require('../structures/Entitlement'); const { resolveSKUId } = require('../util/Util'); /** * Manages API methods for entitlements and stores their cache. * @extends {CachedManager} */ class EntitlementManager extends CachedManager { constructor(client, iterable) { super(client, Entitlement, iterable); } /** * The cache of this manager * @type {Collection<Snowflake, Entitlement>} * @name EntitlementManager#cache */ /** * Data that resolves to give an Entitlement object. This can be: * * An Entitlement object * * A Snowflake * @typedef {Entitlement|Snowflake} EntitlementResolvable */ /** * Data that resolves to give a SKU object. This can be: * * A SKU object * * A Snowflake * @typedef {SKU|Snowflake} SKUResolvable */ /** * Options used to fetch an entitlement * @typedef {BaseFetchOptions} FetchEntitlementOptions * @property {EntitlementResolvable} entitlement The entitlement to fetch */ /** * Options used to fetch entitlements * @typedef {Object} FetchEntitlementsOptions * @property {number} [limit] The maximum number of entitlements to fetch * @property {GuildResolvable} [guild] The guild to fetch entitlements for * @property {UserResolvable} [user] The user to fetch entitlements for * @property {SKUResolvable[]} [skus] The SKUs to fetch entitlements for * @property {boolean} [excludeEnded] Whether to exclude ended entitlements * @property {boolean} [excludeDeleted] Whether to exclude deleted entitlements * @property {boolean} [cache=true] Whether to cache the fetched entitlements * @property {Snowflake} [before] Consider only entitlements before this entitlement id * @property {Snowflake} [after] Consider only entitlements after this entitlement id * <warn>If both `before` and `after` are provided, only `before` is respected</warn> */ /** * Fetches entitlements for this application * @param {EntitlementResolvable|FetchEntitlementOptions|FetchEntitlementsOptions} [options] * Options for fetching the entitlements * @returns {Promise<Entitlement|Collection<Snowflake, Entitlement>>} */ async fetch(options) { if (!options) return this._fetchMany(options); const { entitlement, cache, force } = options; const resolvedEntitlement = this.resolveId(entitlement ?? options); if (resolvedEntitlement) { return this._fetchSingle({ entitlement: resolvedEntitlement, cache, force }); } return this._fetchMany(options); } async _fetchSingle({ entitlement, cache, force = false }) { if (!force) { const existing = this.cache.get(entitlement); if (existing) { return existing; } } const data = await this.client.rest.get(Routes.entitlement(this.client.application.id, entitlement)); return this._add(data, cache); } async _fetchMany({ limit, guild, user, skus, excludeEnded, excludeDeleted, cache, before, after } = {}) { const query = makeURLSearchParams({ limit, guild_id: guild && this.client.guilds.resolveId(guild), user_id: user && this.client.users.resolveId(user), sku_ids: skus?.map(sku => resolveSKUId(sku)).join(','), exclude_ended: excludeEnded, exclude_deleted: excludeDeleted, before, after, }); const entitlements = await this.client.rest.get(Routes.entitlements(this.client.application.id), { query }); return entitlements.reduce( (coll, entitlement) => coll.set(entitlement.id, this._add(entitlement, cache)), new Collection(), ); } /** * Options used to create a test entitlement * <info>Either `guild` or `user` must be provided, but not both</info> * @typedef {Object} EntitlementCreateOptions * @property {SKUResolvable} sku The id of the SKU to create the entitlement for * @property {GuildResolvable} [guild] The guild to create the entitlement for * @property {UserResolvable} [user] The user to create the entitlement for */ /** * Creates a test entitlement * @param {EntitlementCreateOptions} options Options for creating the test entitlement * @returns {Promise<Entitlement>} */ async createTest({ sku, guild, user }) { const skuId = resolveSKUId(sku); if (!skuId) throw new DiscordjsTypeError(ErrorCodes.InvalidType, 'sku', 'SKUResolvable'); if ((guild && user) || (!guild && !user)) { throw new DiscordjsTypeError(ErrorCodes.EntitlementCreateInvalidOwner); } const resolved = guild ? this.client.guilds.resolveId(guild) : this.client.users.resolveId(user); if (!resolved) { const name = guild ? 'guild' : 'user'; const type = guild ? 'GuildResolvable' : 'UserResolvable'; throw new DiscordjsTypeError(ErrorCodes.InvalidType, name, type); } const entitlement = await this.client.rest.post(Routes.entitlements(this.client.application.id), { body: { sku_id: skuId, owner_id: resolved, owner_type: guild ? EntitlementOwnerType.Guild : EntitlementOwnerType.User, }, }); return new Entitlement(this.client, entitlement); } /** * Deletes a test entitlement * @param {EntitlementResolvable} entitlement The entitlement to delete * @returns {Promise<void>} */ async deleteTest(entitlement) { const resolved = this.resolveId(entitlement); if (!resolved) throw new DiscordjsTypeError(ErrorCodes.InvalidType, 'entitlement', 'EntitlementResolvable'); await this.client.rest.delete(Routes.entitlement(this.client.application.id, resolved)); } /** * Marks an entitlement as consumed * <info>Only available for One-Time Purchase consumable SKUs.</info> * @param {Snowflake} entitlementId The id of the entitlement to consume * @returns {Promise<void>} */ async consume(entitlementId) { await this.client.rest.post(Routes.consumeEntitlement(this.client.application.id, entitlementId)); } } exports.EntitlementManager = EntitlementManager; node_modules/discord.js/src/managers/GuildTextThreadManager.js 0000664 00000006542 15114741631 0020555 0 ustar 00 'use strict'; const { ChannelType, Routes } = require('discord-api-types/v10'); const ThreadManager = require('./ThreadManager'); const { DiscordjsTypeError, ErrorCodes } = require('../errors'); /** * Manages API methods for {@link ThreadChannel} objects and stores their cache. * @extends {ThreadManager} */ class GuildTextThreadManager extends ThreadManager { /** * The channel this Manager belongs to * @name GuildTextThreadManager#channel * @type {TextChannel|NewsChannel} */ /** * Options for creating a thread. <warn>Only one of `startMessage` or `type` can be defined.</warn> * @typedef {StartThreadOptions} GuildTextThreadCreateOptions * @property {MessageResolvable} [startMessage] The message to start a thread from. * <warn>If this is defined, then the `type` of thread gets inferred automatically and cannot be changed.</warn> * @property {ThreadChannelTypes} [type] The type of thread to create. * Defaults to {@link ChannelType.PublicThread} if created in a {@link TextChannel} * <warn>When creating threads in a {@link NewsChannel}, this is ignored and is always * {@link ChannelType.AnnouncementThread}</warn> * @property {boolean} [invitable] Whether non-moderators can add other non-moderators to the thread * <info>Can only be set when type will be {@link ChannelType.PrivateThread}</info> */ /** * Creates a new thread in the channel. * @param {GuildTextThreadCreateOptions} [options] Options to create a new thread * @returns {Promise<ThreadChannel>} * @example * // Create a new public thread * channel.threads * .create({ * name: 'food-talk', * autoArchiveDuration: ThreadAutoArchiveDuration.OneHour, * reason: 'Needed a separate thread for food', * }) * .then(threadChannel => console.log(threadChannel)) * .catch(console.error); * @example * // Create a new private thread * channel.threads * .create({ * name: 'mod-talk', * autoArchiveDuration: ThreadAutoArchiveDuration.OneHour, * type: ChannelType.PrivateThread, * reason: 'Needed a separate thread for moderation', * }) * .then(threadChannel => console.log(threadChannel)) * .catch(console.error); */ async create({ name, autoArchiveDuration = this.channel.defaultAutoArchiveDuration, startMessage, type, invitable, reason, rateLimitPerUser, } = {}) { let resolvedType = this.channel.type === ChannelType.GuildAnnouncement ? ChannelType.AnnouncementThread : ChannelType.PublicThread; let startMessageId; if (startMessage) { startMessageId = this.channel.messages.resolveId(startMessage); if (!startMessageId) throw new DiscordjsTypeError(ErrorCodes.InvalidType, 'startMessage', 'MessageResolvable'); } else if (this.channel.type !== ChannelType.GuildAnnouncement) { resolvedType = type ?? resolvedType; } const data = await this.client.rest.post(Routes.threads(this.channel.id, startMessageId), { body: { name, auto_archive_duration: autoArchiveDuration, type: resolvedType, invitable: resolvedType === ChannelType.PrivateThread ? invitable : undefined, rate_limit_per_user: rateLimitPerUser, }, reason, }); return this.client.actions.ThreadCreate.handle(data).thread; } } module.exports = GuildTextThreadManager; node_modules/discord.js/src/managers/BaseGuildEmojiManager.js 0000664 00000005341 15114741631 0020333 0 ustar 00 'use strict'; const CachedManager = require('./CachedManager'); const ApplicationEmoji = require('../structures/ApplicationEmoji'); const GuildEmoji = require('../structures/GuildEmoji'); const ReactionEmoji = require('../structures/ReactionEmoji'); const { parseEmoji } = require('../util/Util'); /** * Holds methods to resolve GuildEmojis and stores their cache. * @extends {CachedManager} */ class BaseGuildEmojiManager extends CachedManager { constructor(client, iterable) { super(client, GuildEmoji, iterable); } /** * The cache of GuildEmojis * @type {Collection<Snowflake, GuildEmoji>} * @name BaseGuildEmojiManager#cache */ /** * Data that can be resolved into a GuildEmoji object. This can be: * * A Snowflake * * A GuildEmoji object * * A ReactionEmoji object * * An ApplicationEmoji object * @typedef {Snowflake|GuildEmoji|ReactionEmoji|ApplicationEmoji} EmojiResolvable */ /** * Resolves an EmojiResolvable to an Emoji object. * @param {EmojiResolvable} emoji The Emoji resolvable to identify * @returns {?GuildEmoji} */ resolve(emoji) { if (emoji instanceof ReactionEmoji) return this.cache.get(emoji.id) ?? null; if (emoji instanceof ApplicationEmoji) return this.cache.get(emoji.id) ?? null; return super.resolve(emoji); } /** * Resolves an EmojiResolvable to an Emoji id string. * @param {EmojiResolvable} emoji The Emoji resolvable to identify * @returns {?Snowflake} */ resolveId(emoji) { if (emoji instanceof ReactionEmoji) return emoji.id; if (emoji instanceof ApplicationEmoji) return emoji.id; return super.resolveId(emoji); } /** * Data that can be resolved to give an emoji identifier. This can be: * * An EmojiResolvable * * The `<a:name:id>`, `<:name:id>`, `a:name:id` or `name:id` emoji identifier string of an emoji * * The Unicode representation of an emoji * @typedef {string|EmojiResolvable} EmojiIdentifierResolvable */ /** * Resolves an EmojiResolvable to an emoji identifier. * @param {EmojiIdentifierResolvable} emoji The emoji resolvable to resolve * @returns {?string} */ resolveIdentifier(emoji) { const emojiResolvable = this.resolve(emoji); if (emojiResolvable) return emojiResolvable.identifier; if (emoji instanceof ReactionEmoji) return emoji.identifier; if (emoji instanceof ApplicationEmoji) return emoji.identifier; if (typeof emoji === 'string') { const res = parseEmoji(emoji); if (res?.name.length) { emoji = `${res.animated ? 'a:' : ''}${res.name}${res.id ? `:${res.id}` : ''}`; } if (!emoji.includes('%')) return encodeURIComponent(emoji); return emoji; } return null; } } module.exports = BaseGuildEmojiManager; node_modules/discord.js/src/managers/GuildInviteManager.js 0000664 00000015422 15114741631 0017734 0 ustar 00 'use strict'; const { Collection } = require('@discordjs/collection'); const { Routes } = require('discord-api-types/v10'); const CachedManager = require('./CachedManager'); const { DiscordjsError, ErrorCodes } = require('../errors'); const Invite = require('../structures/Invite'); const { resolveInviteCode } = require('../util/DataResolver'); /** * Manages API methods for GuildInvites and stores their cache. * @extends {CachedManager} */ class GuildInviteManager extends CachedManager { constructor(guild, iterable) { super(guild.client, Invite, iterable); /** * The guild this Manager belongs to * @type {Guild} */ this.guild = guild; } /** * The cache of this Manager * @type {Collection<string, Invite>} * @name GuildInviteManager#cache */ _add(data, cache) { return super._add(data, cache, { id: data.code, extras: [this.guild] }); } /** * Data that resolves to give an Invite object. This can be: * * An invite code * * An invite URL * @typedef {string} InviteResolvable */ /** * Data that can be resolved to a channel that an invite can be created on. This can be: * * TextChannel * * VoiceChannel * * NewsChannel * * StageChannel * * ForumChannel * * MediaChannel * * Snowflake * @typedef {TextChannel|VoiceChannel|NewsChannel|StageChannel|ForumChannel|MediaChannel|Snowflake} * GuildInvitableChannelResolvable */ /** * Resolves an InviteResolvable to an Invite object. * @method resolve * @memberof GuildInviteManager * @instance * @param {InviteResolvable} invite The invite resolvable to resolve * @returns {?Invite} */ /** * Resolves an InviteResolvable to an invite code string. * @method resolveId * @memberof GuildInviteManager * @instance * @param {InviteResolvable} invite The invite resolvable to resolve * @returns {?string} */ /** * Options used to fetch a single invite from a guild. * @typedef {Object} FetchInviteOptions * @property {InviteResolvable} code The invite to fetch * @property {boolean} [cache=true] Whether or not to cache the fetched invite * @property {boolean} [force=false] Whether to skip the cache check and request the API */ /** * Options used to fetch all invites from a guild. * @typedef {Object} FetchInvitesOptions * @property {GuildInvitableChannelResolvable} [channelId] * The channel to fetch all invites from * @property {boolean} [cache=true] Whether or not to cache the fetched invites */ /** * Fetches invite(s) from Discord. * @param {InviteResolvable|FetchInviteOptions|FetchInvitesOptions} [options] Options for fetching guild invite(s) * @returns {Promise<Invite|Collection<string, Invite>>} * @example * // Fetch all invites from a guild * guild.invites.fetch() * .then(console.log) * .catch(console.error); * @example * // Fetch all invites from a guild without caching * guild.invites.fetch({ cache: false }) * .then(console.log) * .catch(console.error); * @example * // Fetch all invites from a channel * guild.invites.fetch({ channelId: '222197033908436994' }) * .then(console.log) * .catch(console.error); * @example * // Fetch a single invite * guild.invites.fetch('bRCvFy9') * .then(console.log) * .catch(console.error); * @example * // Fetch a single invite without checking cache * guild.invites.fetch({ code: 'bRCvFy9', force: true }) * .then(console.log) * .catch(console.error) * @example * // Fetch a single invite without caching * guild.invites.fetch({ code: 'bRCvFy9', cache: false }) * .then(console.log) * .catch(console.error); */ async fetch(options) { if (!options) return this._fetchMany(); if (typeof options === 'string') { const code = resolveInviteCode(options); if (!code) throw new DiscordjsError(ErrorCodes.InviteResolveCode); return this._fetchSingle({ code, cache: true }); } if (!options.code) { if (options.channelId) { const id = this.guild.channels.resolveId(options.channelId); if (!id) throw new DiscordjsError(ErrorCodes.GuildChannelResolve); return this._fetchChannelMany(id, options.cache); } if ('cache' in options) return this._fetchMany(options.cache); throw new DiscordjsError(ErrorCodes.InviteResolveCode); } return this._fetchSingle({ ...options, code: resolveInviteCode(options.code), }); } async _fetchSingle({ code, cache, force = false }) { if (!force) { const existing = this.cache.get(code); if (existing) return existing; } const invites = await this._fetchMany(cache); const invite = invites.get(code); if (!invite) throw new DiscordjsError(ErrorCodes.InviteNotFound); return invite; } async _fetchMany(cache) { const data = await this.client.rest.get(Routes.guildInvites(this.guild.id)); return data.reduce((col, invite) => col.set(invite.code, this._add(invite, cache)), new Collection()); } async _fetchChannelMany(channelId, cache) { const data = await this.client.rest.get(Routes.channelInvites(channelId)); return data.reduce((col, invite) => col.set(invite.code, this._add(invite, cache)), new Collection()); } /** * Create an invite to the guild from the provided channel. * @param {GuildInvitableChannelResolvable} channel The options for creating the invite from a channel. * @param {InviteCreateOptions} [options={}] The options for creating the invite from a channel. * @returns {Promise<Invite>} * @example * // Create an invite to a selected channel * guild.invites.create('599942732013764608') * .then(console.log) * .catch(console.error); */ async create( channel, { temporary, maxAge, maxUses, unique, targetUser, targetApplication, targetType, reason } = {}, ) { const id = this.guild.channels.resolveId(channel); if (!id) throw new DiscordjsError(ErrorCodes.GuildChannelResolve); const invite = await this.client.rest.post(Routes.channelInvites(id), { body: { temporary, max_age: maxAge, max_uses: maxUses, unique, target_user_id: this.client.users.resolveId(targetUser), target_application_id: targetApplication?.id ?? targetApplication?.applicationId ?? targetApplication, target_type: targetType, }, reason, }); return new Invite(this.client, invite); } /** * Deletes an invite. * @param {InviteResolvable} invite The invite to delete * @param {string} [reason] Reason for deleting the invite * @returns {Promise<void>} */ async delete(invite, reason) { const code = resolveInviteCode(invite); await this.client.rest.delete(Routes.invite(code), { reason }); } } module.exports = GuildInviteManager; node_modules/discord.js/src/managers/ApplicationCommandPermissionsManager.js 0000664 00000040471 15114741631 0023511 0 ustar 00 'use strict'; const { Collection } = require('@discordjs/collection'); const { ApplicationCommandPermissionType, RESTJSONErrorCodes, Routes } = require('discord-api-types/v10'); const BaseManager = require('./BaseManager'); const { DiscordjsError, DiscordjsTypeError, ErrorCodes } = require('../errors'); /** * Manages API methods for permissions of Application Commands. * @extends {BaseManager} */ class ApplicationCommandPermissionsManager extends BaseManager { constructor(manager) { super(manager.client); /** * The manager or command that this manager belongs to * @type {ApplicationCommandManager|ApplicationCommand} * @private */ this.manager = manager; /** * The guild that this manager acts on * @type {?Guild} */ this.guild = manager.guild ?? null; /** * The id of the guild that this manager acts on * @type {?Snowflake} */ this.guildId = manager.guildId ?? manager.guild?.id ?? null; /** * The id of the command this manager acts on * @type {?Snowflake} */ this.commandId = manager.id ?? null; } /** * The APIRouter path to the commands * @param {Snowflake} guildId The guild's id to use in the path, * @param {Snowflake} [commandId] The application command's id * @returns {string} * @private */ permissionsPath(guildId, commandId) { if (commandId) { return Routes.applicationCommandPermissions(this.client.application.id, guildId, commandId); } return Routes.guildApplicationCommandsPermissions(this.client.application.id, guildId); } /* eslint-disable max-len */ /** * The object returned when fetching permissions for an application command. * @typedef {Object} ApplicationCommandPermissions * @property {Snowflake} id The role, user, or channel's id. Can also be a * {@link https://discord.com/developers/docs/interactions/application-commands#application-command-permissions-object-application-command-permissions-constants permission constant}. * @property {ApplicationCommandPermissionType} type Whether this permission is for a role or a user * @property {boolean} permission Whether the role or user has the permission to use this command */ /* eslint-enable max-len */ /** * Options for managing permissions for one or more Application Commands * <warn>When passing these options to a manager where `guildId` is `null`, * `guild` is a required parameter</warn> * @typedef {Object} BaseApplicationCommandPermissionsOptions * @property {GuildResolvable} [guild] The guild to modify / check permissions for * <warn>Ignored when the manager has a non-null `guildId` property</warn> * @property {ApplicationCommandResolvable} [command] The command to modify / check permissions for * <warn>Ignored when the manager has a non-null `commandId` property</warn> */ /** * Fetches the permissions for one or multiple commands. Providing the client's id as the "command id" will fetch * *only* the guild level permissions * @param {BaseApplicationCommandPermissionsOptions} [options] Options used to fetch permissions * @returns {Promise<ApplicationCommandPermissions[]|Collection<Snowflake, ApplicationCommandPermissions[]>>} * @example * // Fetch permissions for one command * guild.commands.permissions.fetch({ command: '123456789012345678' }) * .then(perms => console.log(`Fetched ${perms.length} overwrites`)) * .catch(console.error); * @example * // Fetch permissions for all commands in a guild * client.application.commands.permissions.fetch({ guild: '123456789012345678' }) * .then(perms => console.log(`Fetched permissions for ${perms.size} commands`)) * .catch(console.error); * @example * // Fetch guild level permissions * guild.commands.permissions.fetch({ command: client.user.id }) * .then(perms => console.log(`Fetched ${perms.length} guild level permissions`)) * .catch(console.error); */ async fetch({ guild, command } = {}) { const { guildId, commandId } = this._validateOptions(guild, command); if (commandId) { const data = await this.client.rest.get(this.permissionsPath(guildId, commandId)); return data.permissions; } const data = await this.client.rest.get(this.permissionsPath(guildId)); return data.reduce((coll, perm) => coll.set(perm.id, perm.permissions), new Collection()); } /** * Options used to set permissions for one or more Application Commands in a guild * <warn>Omitting the `command` parameter edits the guild wide permissions * when the manager's `commandId` is `null`</warn> * @typedef {BaseApplicationCommandPermissionsOptions} ApplicationCommandPermissionsEditOptions * @property {ApplicationCommandPermissions[]} permissions The new permissions for the guild or overwrite * @property {string} token The bearer token to use that authorizes the permission edit */ /** * Sets the permissions for the guild or a command overwrite. * @param {ApplicationCommandPermissionsEditOptions} options Options used to set permissions * @returns {Promise<ApplicationCommandPermissions[]|Collection<Snowflake, ApplicationCommandPermissions[]>>} * @example * // Set a permission overwrite for a command * client.application.commands.permissions.set({ * guild: '892455839386304532', * command: '123456789012345678', * token: 'TotallyRealToken', * permissions: [ * { * id: '876543210987654321', * type: ApplicationCommandPermissionType.User, * permission: false, * }, * ]}) * .then(console.log) * .catch(console.error); * @example * // Set the permissions used for the guild (commands without overwrites) * guild.commands.permissions.set({ token: 'TotallyRealToken', permissions: [ * { * id: '123456789012345678', * permissions: [{ * id: '876543210987654321', * type: ApplicationCommandPermissionType.User, * permission: false, * }], * }, * ]}) * .then(console.log) * .catch(console.error); */ async set({ guild, command, permissions, token } = {}) { if (!token) { throw new DiscordjsError(ErrorCodes.ApplicationCommandPermissionsTokenMissing); } let { guildId, commandId } = this._validateOptions(guild, command); if (!Array.isArray(permissions)) { throw new DiscordjsTypeError( ErrorCodes.InvalidType, 'permissions', 'Array of ApplicationCommandPermissions', true, ); } if (!commandId) { commandId = this.client.user.id; } const data = await this.client.rest.put(this.permissionsPath(guildId, commandId), { body: { permissions }, auth: false, headers: { Authorization: `Bearer ${token}` }, }); return data.permissions; } /** * Add permissions to a command. * @param {ApplicationCommandPermissionsEditOptions} options Options used to add permissions * @returns {Promise<ApplicationCommandPermissions[]>} * @example * // Add a rule to block a role from using a command * guild.commands.permissions.add({ command: '123456789012345678', token: 'TotallyRealToken', permissions: [ * { * id: '876543211234567890', * type: ApplicationCommandPermissionType.Role, * permission: false * }, * ]}) * .then(console.log) * .catch(console.error); */ async add({ guild, command, permissions, token } = {}) { if (!token) { throw new DiscordjsError(ErrorCodes.ApplicationCommandPermissionsTokenMissing); } let { guildId, commandId } = this._validateOptions(guild, command); if (!commandId) { commandId = this.client.user.id; } if (!Array.isArray(permissions)) { throw new DiscordjsTypeError( ErrorCodes.InvalidType, 'permissions', 'Array of ApplicationCommandPermissions', true, ); } let existingPermissions = []; try { existingPermissions = await this.fetch({ guild: guildId, command: commandId }); } catch (error) { if (error.code !== RESTJSONErrorCodes.UnknownApplicationCommandPermissions) throw error; } const newPermissions = permissions.slice(); for (const existingPermission of existingPermissions) { if (!newPermissions.some(newPermission => newPermission.id === existingPermission.id)) { newPermissions.push(existingPermission); } } return this.set({ guild: guildId, command: commandId, permissions: newPermissions, token }); } /** * A static snowflake that identifies the everyone role for application command permissions. * It is the same as the guild id * @typedef {Snowflake} RolePermissionConstant */ /** * A static snowflake that identifies the "all channels" entity for application command permissions. * It will be the result of the calculation `guildId - 1` * @typedef {Snowflake} ChannelPermissionConstant */ /** * Options used to remove permissions from a command * <warn>Omitting the `command` parameter removes from the guild wide permissions * when the managers `commandId` is `null`</warn> * <warn>At least one of `users`, `roles`, and `channels` is required</warn> * @typedef {BaseApplicationCommandPermissionsOptions} RemoveApplicationCommandPermissionsOptions * @property {string} token The bearer token to use that authorizes the permission removal * @property {UserResolvable[]} [users] The user(s) to remove * @property {Array<RoleResolvable|RolePermissionConstant>} [roles] The role(s) to remove * @property {Array<GuildChannelResolvable|ChannelPermissionConstant>} [channels] The channel(s) to remove */ /** * Remove permissions from a command. * @param {RemoveApplicationCommandPermissionsOptions} options Options used to remove permissions * @returns {Promise<ApplicationCommandPermissions[]>} * @example * // Remove a user permission from this command * guild.commands.permissions.remove({ * command: '123456789012345678', users: '876543210123456789', token: 'TotallyRealToken', * }) * .then(console.log) * .catch(console.error); * @example * // Remove multiple roles from this command * guild.commands.permissions.remove({ * command: '123456789012345678', roles: ['876543210123456789', '765432101234567890'], token: 'TotallyRealToken', * }) * .then(console.log) * .catch(console.error); */ async remove({ guild, command, users, roles, channels, token } = {}) { if (!token) { throw new DiscordjsError(ErrorCodes.ApplicationCommandPermissionsTokenMissing); } let { guildId, commandId } = this._validateOptions(guild, command); if (!commandId) { commandId = this.client.user.id; } if (!users && !roles && !channels) { throw new DiscordjsTypeError(ErrorCodes.InvalidType, 'users OR roles OR channels', 'Array or Resolvable', true); } let resolvedUserIds = []; if (Array.isArray(users)) { for (const user of users) { const userId = this.client.users.resolveId(user); if (!userId) throw new DiscordjsTypeError(ErrorCodes.InvalidElement, 'Array', 'users', user); resolvedUserIds.push(userId); } } let resolvedRoleIds = []; if (Array.isArray(roles)) { for (const role of roles) { if (typeof role === 'string') { resolvedRoleIds.push(role); continue; } if (!this.guild) throw new DiscordjsError(ErrorCodes.GuildUncachedEntityResolve, 'roles'); const roleId = this.guild.roles.resolveId(role); if (!roleId) throw new DiscordjsTypeError(ErrorCodes.InvalidElement, 'Array', 'users', role); resolvedRoleIds.push(roleId); } } let resolvedChannelIds = []; if (Array.isArray(channels)) { for (const channel of channels) { if (typeof channel === 'string') { resolvedChannelIds.push(channel); continue; } if (!this.guild) throw new DiscordjsError(ErrorCodes.GuildUncachedEntityResolve, 'channels'); const channelId = this.guild.channels.resolveId(channel); if (!channelId) throw new DiscordjsTypeError(ErrorCodes.InvalidElement, 'Array', 'channels', channel); resolvedChannelIds.push(channelId); } } let existing = []; try { existing = await this.fetch({ guild: guildId, command: commandId }); } catch (error) { if (error.code !== RESTJSONErrorCodes.UnknownApplicationCommandPermissions) throw error; } const permissions = existing.filter(perm => { switch (perm.type) { case ApplicationCommandPermissionType.Role: return !resolvedRoleIds.includes(perm.id); case ApplicationCommandPermissionType.User: return !resolvedUserIds.includes(perm.id); case ApplicationCommandPermissionType.Channel: return !resolvedChannelIds.includes(perm.id); } return true; }); return this.set({ guild: guildId, command: commandId, permissions, token }); } /** * Options used to check the existence of permissions on a command * <warn>The `command` parameter is not optional when the managers `commandId` is `null`</warn> * @typedef {BaseApplicationCommandPermissionsOptions} HasApplicationCommandPermissionsOptions * @property {ApplicationCommandPermissionIdResolvable} permissionId The entity to check if a permission exists for * on this command. * @property {ApplicationCommandPermissionType} [permissionType] Check for a specific type of permission */ /** * Check whether a permission exists for a user, role, or channel * @param {HasApplicationCommandPermissionsOptions} options Options used to check permissions * @returns {Promise<boolean>} * @example * guild.commands.permissions.has({ command: '123456789012345678', permissionId: '876543210123456789' }) * .then(console.log) * .catch(console.error); */ async has({ guild, command, permissionId, permissionType }) { const { guildId, commandId } = this._validateOptions(guild, command); if (!commandId) throw new DiscordjsTypeError(ErrorCodes.InvalidType, 'command', 'ApplicationCommandResolvable'); if (!permissionId) { throw new DiscordjsTypeError( ErrorCodes.InvalidType, 'permissionId', 'UserResolvable, RoleResolvable, ChannelResolvable, or Permission Constant', ); } let resolvedId = permissionId; if (typeof permissionId !== 'string') { resolvedId = this.client.users.resolveId(permissionId); if (!resolvedId) { if (!this.guild) throw new DiscordjsError(ErrorCodes.GuildUncachedEntityResolve, 'roles'); resolvedId = this.guild.roles.resolveId(permissionId); } if (!resolvedId) { resolvedId = this.guild.channels.resolveId(permissionId); } if (!resolvedId) { throw new DiscordjsTypeError( ErrorCodes.InvalidType, 'permissionId', 'UserResolvable, RoleResolvable, ChannelResolvable, or Permission Constant', ); } } let existing = []; try { existing = await this.fetch({ guild: guildId, command: commandId }); } catch (error) { if (error.code !== RESTJSONErrorCodes.UnknownApplicationCommandPermissions) throw error; } // Check permission type if provided for the single edge case where a channel id is the same as the everyone role id return existing.some(perm => perm.id === resolvedId && (permissionType ?? perm.type) === perm.type); } _validateOptions(guild, command) { const guildId = this.guildId ?? this.client.guilds.resolveId(guild); if (!guildId) throw new DiscordjsError(ErrorCodes.GlobalCommandPermissions); let commandId = this.commandId; if (command && !commandId) { commandId = this.manager.resolveId?.(command); if (!commandId && this.guild) { commandId = this.guild.commands.resolveId(command); } commandId ??= this.client.application?.commands.resolveId(command); if (!commandId) { throw new DiscordjsTypeError(ErrorCodes.InvalidType, 'command', 'ApplicationCommandResolvable', true); } } return { guildId, commandId }; } } module.exports = ApplicationCommandPermissionsManager; /* eslint-disable max-len */ /** * Data that resolves to an id used for an application command permission * @typedef {UserResolvable|RoleResolvable|GuildChannelResolvable|RolePermissionConstant|ChannelPermissionConstant} ApplicationCommandPermissionIdResolvable */ node_modules/discord.js/src/managers/BaseManager.js 0000664 00000000547 15114741631 0016365 0 ustar 00 'use strict'; /** * Manages the API methods of a data model. * @abstract */ class BaseManager { constructor(client) { /** * The client that instantiated this Manager * @name BaseManager#client * @type {Client} * @readonly */ Object.defineProperty(this, 'client', { value: client }); } } module.exports = BaseManager; node_modules/discord.js/src/managers/ApplicationEmojiManager.js 0000664 00000011665 15114741631 0020745 0 ustar 00 'use strict'; const { Collection } = require('@discordjs/collection'); const { Routes } = require('discord-api-types/v10'); const CachedManager = require('./CachedManager'); const { DiscordjsTypeError, ErrorCodes } = require('../errors'); const ApplicationEmoji = require('../structures/ApplicationEmoji'); const { resolveImage } = require('../util/DataResolver'); /** * Manages API methods for ApplicationEmojis and stores their cache. * @extends {CachedManager} */ class ApplicationEmojiManager extends CachedManager { constructor(application, iterable) { super(application.client, ApplicationEmoji, iterable); /** * The application this manager belongs to * @type {ClientApplication} */ this.application = application; } _add(data, cache) { return super._add(data, cache, { extras: [this.application] }); } /** * Options used for creating an emoji of the application * @typedef {Object} ApplicationEmojiCreateOptions * @property {BufferResolvable|Base64Resolvable} attachment The image for the emoji * @property {string} name The name for the emoji */ /** * Creates a new custom emoji of the application. * @param {ApplicationEmojiCreateOptions} options Options for creating the emoji * @returns {Promise<Emoji>} The created emoji * @example * // Create a new emoji from a URL * application.emojis.create({ attachment: 'https://i.imgur.com/w3duR07.png', name: 'rip' }) * .then(emoji => console.log(`Created new emoji with name ${emoji.name}!`)) * .catch(console.error); * @example * // Create a new emoji from a file on your computer * application.emojis.create({ attachment: './memes/banana.png', name: 'banana' }) * .then(emoji => console.log(`Created new emoji with name ${emoji.name}!`)) * .catch(console.error); */ async create({ attachment, name }) { attachment = await resolveImage(attachment); if (!attachment) throw new DiscordjsTypeError(ErrorCodes.ReqResourceType); const body = { image: attachment, name }; const emoji = await this.client.rest.post(Routes.applicationEmojis(this.application.id), { body }); return this._add(emoji); } /** * Obtains one or more emojis from Discord, or the emoji cache if they're already available. * @param {Snowflake} [id] The emoji's id * @param {BaseFetchOptions} [options] Additional options for this fetch * @returns {Promise<ApplicationEmoji|Collection<Snowflake, ApplicationEmoji>>} * @example * // Fetch all emojis from the application * application.emojis.fetch() * .then(emojis => console.log(`There are ${emojis.size} emojis.`)) * .catch(console.error); * @example * // Fetch a single emoji * application.emojis.fetch('222078108977594368') * .then(emoji => console.log(`The emoji name is: ${emoji.name}`)) * .catch(console.error); */ async fetch(id, { cache = true, force = false } = {}) { if (id) { if (!force) { const existing = this.cache.get(id); if (existing) return existing; } const emoji = await this.client.rest.get(Routes.applicationEmoji(this.application.id, id)); return this._add(emoji, cache); } const { items: data } = await this.client.rest.get(Routes.applicationEmojis(this.application.id)); const emojis = new Collection(); for (const emoji of data) emojis.set(emoji.id, this._add(emoji, cache)); return emojis; } /** * Deletes an emoji. * @param {EmojiResolvable} emoji The Emoji resolvable to delete * @returns {Promise<void>} */ async delete(emoji) { const id = this.resolveId(emoji); if (!id) throw new DiscordjsTypeError(ErrorCodes.InvalidType, 'emoji', 'EmojiResolvable', true); await this.client.rest.delete(Routes.applicationEmoji(this.application.id, id)); } /** * Edits an emoji. * @param {EmojiResolvable} emoji The Emoji resolvable to edit * @param {ApplicationEmojiEditOptions} options The options to provide * @returns {Promise<ApplicationEmoji>} */ async edit(emoji, options) { const id = this.resolveId(emoji); if (!id) throw new DiscordjsTypeError(ErrorCodes.InvalidType, 'emoji', 'EmojiResolvable', true); const newData = await this.client.rest.patch(Routes.applicationEmoji(this.application.id, id), { body: { name: options.name, }, }); const existing = this.cache.get(id); if (existing) { existing._patch(newData); return existing; } return this._add(newData); } /** * Fetches the author for this emoji * @param {EmojiResolvable} emoji The emoji to fetch the author of * @returns {Promise<User>} */ async fetchAuthor(emoji) { const id = this.resolveId(emoji); if (!id) throw new DiscordjsTypeError(ErrorCodes.InvalidType, 'emoji', 'EmojiResolvable', true); const data = await this.client.rest.get(Routes.applicationEmoji(this.application.id, id)); return this._add(data).author; } } module.exports = ApplicationEmojiManager; node_modules/discord.js/src/managers/GuildMessageManager.js 0000664 00000000616 15114741631 0020061 0 ustar 00 'use strict'; const MessageManager = require('./MessageManager'); /** * Manages API methods for messages in a guild and holds their cache. * @extends {MessageManager} */ class GuildMessageManager extends MessageManager { /** * The channel that the messages belong to * @name GuildMessageManager#channel * @type {GuildTextBasedChannel} */ } module.exports = GuildMessageManager; node_modules/discord.js/src/managers/RoleManager.js 0000664 00000030202 15114741631 0016403 0 ustar 00 'use strict'; const process = require('node:process'); const { Collection } = require('@discordjs/collection'); const { DiscordAPIError } = require('@discordjs/rest'); const { RESTJSONErrorCodes, Routes } = require('discord-api-types/v10'); const CachedManager = require('./CachedManager'); const { DiscordjsTypeError, ErrorCodes } = require('../errors'); const { Role } = require('../structures/Role'); const { resolveImage } = require('../util/DataResolver'); const PermissionsBitField = require('../util/PermissionsBitField'); const { setPosition, resolveColor } = require('../util/Util'); let cacheWarningEmitted = false; /** * Manages API methods for roles and stores their cache. * @extends {CachedManager} */ class RoleManager extends CachedManager { constructor(guild, iterable) { super(guild.client, Role, iterable); if (!cacheWarningEmitted && this._cache.constructor.name !== 'Collection') { cacheWarningEmitted = true; process.emitWarning( `Overriding the cache handling for ${this.constructor.name} is unsupported and breaks functionality.`, 'UnsupportedCacheOverwriteWarning', ); } /** * The guild belonging to this manager * @type {Guild} */ this.guild = guild; } /** * The role cache of this manager * @type {Collection<Snowflake, Role>} * @name RoleManager#cache */ _add(data, cache) { return super._add(data, cache, { extras: [this.guild] }); } /** * Obtains a role from Discord, or the role cache if they're already available. * @param {Snowflake} [id] The role's id * @param {BaseFetchOptions} [options] Additional options for this fetch * @returns {Promise<?Role|Collection<Snowflake, Role>>} * @example * // Fetch all roles from the guild * message.guild.roles.fetch() * .then(roles => console.log(`There are ${roles.size} roles.`)) * .catch(console.error); * @example * // Fetch a single role * message.guild.roles.fetch('222078108977594368') * .then(role => console.log(`The role color is: ${role.color}`)) * .catch(console.error); */ async fetch(id, { cache = true, force = false } = {}) { if (!id) { const data = await this.client.rest.get(Routes.guildRoles(this.guild.id)); const roles = new Collection(); for (const role of data) roles.set(role.id, this._add(role, cache)); return roles; } if (!force) { const existing = this.cache.get(id); if (existing) return existing; } try { const data = await this.client.rest.get(Routes.guildRole(this.guild.id, id)); return this._add(data, cache); } catch (error) { // TODO: Remove this catch in the next major version if (error instanceof DiscordAPIError && error.code === RESTJSONErrorCodes.UnknownRole) { return null; } throw error; } } /** * Data that can be resolved to a Role object. This can be: * * A Role * * A Snowflake * @typedef {Role|Snowflake} RoleResolvable */ /** * Resolves a {@link RoleResolvable} to a {@link Role} object. * @method resolve * @memberof RoleManager * @instance * @param {RoleResolvable} role The role resolvable to resolve * @returns {?Role} */ /** * Resolves a {@link RoleResolvable} to a {@link Role} id. * @method resolveId * @memberof RoleManager * @instance * @param {RoleResolvable} role The role resolvable to resolve * @returns {?Snowflake} */ /** * Options used to create a new role. * @typedef {Object} RoleCreateOptions * @property {string} [name] The name of the new role * @property {ColorResolvable} [color] The data to create the role with * @property {boolean} [hoist] Whether or not the new role should be hoisted * @property {PermissionResolvable} [permissions] The permissions for the new role * @property {number} [position] The position of the new role * @property {boolean} [mentionable] Whether or not the new role should be mentionable * @property {?(BufferResolvable|Base64Resolvable|EmojiResolvable)} [icon] The icon for the role * <warn>The `EmojiResolvable` should belong to the same guild as the role. * If not, pass the emoji's URL directly</warn> * @property {?string} [unicodeEmoji] The unicode emoji for the role * @property {string} [reason] The reason for creating this role */ /** * Creates a new role in the guild with given information. * <warn>The position will silently reset to 1 if an invalid one is provided, or none.</warn> * @param {RoleCreateOptions} [options] Options for creating the new role * @returns {Promise<Role>} * @example * // Create a new role * guild.roles.create() * .then(console.log) * .catch(console.error); * @example * // Create a new role with data and a reason * guild.roles.create({ * name: 'Super Cool Blue People', * color: Colors.Blue, * reason: 'we needed a role for Super Cool People', * }) * .then(console.log) * .catch(console.error); */ async create(options = {}) { let { name, color, hoist, permissions, position, mentionable, reason, icon, unicodeEmoji } = options; color &&= resolveColor(color); if (permissions !== undefined) permissions = new PermissionsBitField(permissions); if (icon) { const guildEmojiURL = this.guild.emojis.resolve(icon)?.imageURL(); icon = guildEmojiURL ? await resolveImage(guildEmojiURL) : await resolveImage(icon); if (typeof icon !== 'string') icon = undefined; } const data = await this.client.rest.post(Routes.guildRoles(this.guild.id), { body: { name, color, hoist, permissions, mentionable, icon, unicode_emoji: unicodeEmoji, }, reason, }); const { role } = this.client.actions.GuildRoleCreate.handle({ guild_id: this.guild.id, role: data, }); if (position) return this.setPosition(role, position, { reason }); return role; } /** * Options for editing a role * @typedef {RoleData} RoleEditOptions * @property {string} [reason] The reason for editing this role */ /** * Edits a role of the guild. * @param {RoleResolvable} role The role to edit * @param {RoleEditOptions} options The options to provide * @returns {Promise<Role>} * @example * // Edit a role * guild.roles.edit('222079219327434752', { name: 'buddies' }) * .then(updated => console.log(`Edited role name to ${updated.name}`)) * .catch(console.error); */ async edit(role, options) { role = this.resolve(role); if (!role) throw new DiscordjsTypeError(ErrorCodes.InvalidType, 'role', 'RoleResolvable'); if (typeof options.position === 'number') { await this.setPosition(role, options.position, { reason: options.reason }); } let icon = options.icon; if (icon) { const guildEmojiURL = this.guild.emojis.resolve(icon)?.imageURL(); icon = guildEmojiURL ? await resolveImage(guildEmojiURL) : await resolveImage(icon); if (typeof icon !== 'string') icon = undefined; } const body = { name: options.name, color: options.color === undefined ? undefined : resolveColor(options.color), hoist: options.hoist, permissions: options.permissions === undefined ? undefined : new PermissionsBitField(options.permissions), mentionable: options.mentionable, icon, unicode_emoji: options.unicodeEmoji, }; const d = await this.client.rest.patch(Routes.guildRole(this.guild.id, role.id), { body, reason: options.reason }); const clone = role._clone(); clone._patch(d); return clone; } /** * Deletes a role. * @param {RoleResolvable} role The role to delete * @param {string} [reason] Reason for deleting the role * @returns {Promise<void>} * @example * // Delete a role * guild.roles.delete('222079219327434752', 'The role needed to go') * .then(() => console.log('Deleted the role')) * .catch(console.error); */ async delete(role, reason) { const id = this.resolveId(role); await this.client.rest.delete(Routes.guildRole(this.guild.id, id), { reason }); this.client.actions.GuildRoleDelete.handle({ guild_id: this.guild.id, role_id: id }); } /** * Sets the new position of the role. * @param {RoleResolvable} role The role to change the position of * @param {number} position The new position for the role * @param {SetRolePositionOptions} [options] Options for setting the position * @returns {Promise<Role>} * @example * // Set the position of the role * guild.roles.setPosition('222197033908436994', 1) * .then(updated => console.log(`Role position: ${updated.position}`)) * .catch(console.error); */ async setPosition(role, position, { relative, reason } = {}) { role = this.resolve(role); if (!role) throw new DiscordjsTypeError(ErrorCodes.InvalidType, 'role', 'RoleResolvable'); const updatedRoles = await setPosition( role, position, relative, this.guild._sortedRoles(), this.client, Routes.guildRoles(this.guild.id), reason, ); this.client.actions.GuildRolesPositionUpdate.handle({ guild_id: this.guild.id, roles: updatedRoles, }); return role; } /** * The data needed for updating a guild role's position * @typedef {Object} GuildRolePosition * @property {RoleResolvable} role The role's id * @property {number} position The position to update */ /** * Batch-updates the guild's role positions * @param {GuildRolePosition[]} rolePositions Role positions to update * @returns {Promise<Guild>} * @example * guild.roles.setPositions([{ role: roleId, position: updatedRoleIndex }]) * .then(guild => console.log(`Role positions updated for ${guild}`)) * .catch(console.error); */ async setPositions(rolePositions) { // Make sure rolePositions are prepared for API rolePositions = rolePositions.map(rolePosition => ({ id: this.resolveId(rolePosition.role), position: rolePosition.position, })); // Call the API to update role positions await this.client.rest.patch(Routes.guildRoles(this.guild.id), { body: rolePositions }); return this.client.actions.GuildRolesPositionUpdate.handle({ guild_id: this.guild.id, roles: rolePositions, }).guild; } /** * Compares the positions of two roles. * @param {RoleResolvable} role1 First role to compare * @param {RoleResolvable} role2 Second role to compare * @returns {number} Negative number if the first role's position is lower (second role's is higher), * positive number if the first's is higher (second's is lower), 0 if equal */ comparePositions(role1, role2) { const resolvedRole1 = this.resolve(role1); const resolvedRole2 = this.resolve(role2); if (!resolvedRole1 || !resolvedRole2) { throw new DiscordjsTypeError(ErrorCodes.InvalidType, 'role', 'Role nor a Snowflake'); } const role1Position = resolvedRole1.position; const role2Position = resolvedRole2.position; if (role1Position === role2Position) { return Number(BigInt(resolvedRole2.id) - BigInt(resolvedRole1.id)); } return role1Position - role2Position; } /** * Gets the managed role a user created when joining the guild, if any * <info>Only ever available for bots</info> * @param {UserResolvable} user The user to access the bot role for * @returns {?Role} */ botRoleFor(user) { const userId = this.client.users.resolveId(user); if (!userId) return null; return this.cache.find(role => role.tags?.botId === userId) ?? null; } /** * The `@everyone` role of the guild * @type {Role} * @readonly */ get everyone() { return this.cache.get(this.guild.id); } /** * The premium subscriber role of the guild, if any * @type {?Role} * @readonly */ get premiumSubscriberRole() { return this.cache.find(role => role.tags?.premiumSubscriberRole) ?? null; } /** * The role with the highest position in the cache * @type {Role} * @readonly */ get highest() { return this.cache.reduce((prev, role) => (role.comparePositionTo(prev) > 0 ? role : prev), this.cache.first()); } } module.exports = RoleManager; node_modules/discord.js/src/managers/ReactionManager.js 0000664 00000003546 15114741631 0017261 0 ustar 00 'use strict'; const { Routes } = require('discord-api-types/v10'); const CachedManager = require('./CachedManager'); const MessageReaction = require('../structures/MessageReaction'); /** * Manages API methods for reactions and holds their cache. * @extends {CachedManager} */ class ReactionManager extends CachedManager { constructor(message, iterable) { super(message.client, MessageReaction, iterable); /** * The message that this manager belongs to * @type {Message} */ this.message = message; } _add(data, cache) { return super._add(data, cache, { id: data.emoji.id ?? data.emoji.name, extras: [this.message] }); } /** * The reaction cache of this manager * @type {Collection<string|Snowflake, MessageReaction>} * @name ReactionManager#cache */ /** * Data that can be resolved to a MessageReaction object. This can be: * * A MessageReaction * * A Snowflake * * The Unicode representation of an emoji * @typedef {MessageReaction|Snowflake} MessageReactionResolvable */ /** * Resolves a {@link MessageReactionResolvable} to a {@link MessageReaction} object. * @method resolve * @memberof ReactionManager * @instance * @param {MessageReactionResolvable} reaction The MessageReaction to resolve * @returns {?MessageReaction} */ /** * Resolves a {@link MessageReactionResolvable} to a {@link MessageReaction} id. * @method resolveId * @memberof ReactionManager * @instance * @param {MessageReactionResolvable} reaction The MessageReaction to resolve * @returns {?Snowflake} */ /** * Removes all reactions from a message. * @returns {Promise<Message>} */ async removeAll() { await this.client.rest.delete(Routes.channelMessageAllReactions(this.message.channelId, this.message.id)); return this.message; } } module.exports = ReactionManager; node_modules/discord.js/src/managers/DataManager.js 0000664 00000003100 15114741631 0016350 0 ustar 00 'use strict'; const BaseManager = require('./BaseManager'); const { DiscordjsError, ErrorCodes } = require('../errors'); /** * Manages the API methods of a data model along with a collection of instances. * @extends {BaseManager} * @abstract */ class DataManager extends BaseManager { constructor(client, holds) { super(client); /** * The data structure belonging to this manager. * @name DataManager#holds * @type {Function} * @private * @readonly */ Object.defineProperty(this, 'holds', { value: holds }); } /** * The cache of items for this manager. * @type {Collection} * @abstract */ get cache() { throw new DiscordjsError(ErrorCodes.NotImplemented, 'get cache', this.constructor.name); } /** * Resolves a data entry to a data Object. * @param {string|Object} idOrInstance The id or instance of something in this Manager * @returns {?Object} An instance from this Manager */ resolve(idOrInstance) { if (idOrInstance instanceof this.holds) return idOrInstance; if (typeof idOrInstance === 'string') return this.cache.get(idOrInstance) ?? null; return null; } /** * Resolves a data entry to an instance id. * @param {string|Object} idOrInstance The id or instance of something in this Manager * @returns {?Snowflake} */ resolveId(idOrInstance) { if (idOrInstance instanceof this.holds) return idOrInstance.id; if (typeof idOrInstance === 'string') return idOrInstance; return null; } valueOf() { return this.cache; } } module.exports = DataManager; node_modules/discord.js/src/managers/ThreadMemberManager.js 0000664 00000016465 15114741631 0020060 0 ustar 00 'use strict'; const process = require('node:process'); const { Collection } = require('@discordjs/collection'); const { makeURLSearchParams } = require('@discordjs/rest'); const { Routes } = require('discord-api-types/v10'); const CachedManager = require('./CachedManager'); const { DiscordjsTypeError, ErrorCodes } = require('../errors'); const ThreadMember = require('../structures/ThreadMember'); const { emitDeprecationWarningForRemoveThreadMember } = require('../util/Util'); let deprecationEmittedForAdd = false; /** * Manages API methods for GuildMembers and stores their cache. * @extends {CachedManager} */ class ThreadMemberManager extends CachedManager { constructor(thread, iterable) { super(thread.client, ThreadMember, iterable); /** * The thread this manager belongs to * @type {ThreadChannel} */ this.thread = thread; } /** * The cache of this Manager * @type {Collection<Snowflake, ThreadMember>} * @name ThreadMemberManager#cache */ _add(data, cache = true) { const existing = this.cache.get(data.user_id); if (cache) existing?._patch(data, { cache }); if (existing) return existing; const member = new ThreadMember(this.thread, data, { cache }); if (cache) this.cache.set(data.user_id, member); return member; } /** * Fetches the client user as a ThreadMember of the thread. * @param {BaseFetchOptions} [options] The options for fetching the member * @returns {Promise<ThreadMember>} */ fetchMe(options) { return this.fetch({ ...options, member: this.client.user.id }); } /** * The client user as a ThreadMember of this ThreadChannel * @type {?ThreadMember} * @readonly */ get me() { return this.cache.get(this.client.user.id) ?? null; } /** * Data that resolves to give a ThreadMember object. This can be: * * A ThreadMember object * * A User resolvable * @typedef {ThreadMember|UserResolvable} ThreadMemberResolvable */ /** * Resolves a {@link ThreadMemberResolvable} to a {@link ThreadMember} object. * @param {ThreadMemberResolvable} member The user that is part of the thread * @returns {?GuildMember} */ resolve(member) { const memberResolvable = super.resolve(member); if (memberResolvable) return memberResolvable; const userId = this.client.users.resolveId(member); if (userId) return super.cache.get(userId) ?? null; return null; } /** * Resolves a {@link ThreadMemberResolvable} to a {@link ThreadMember} id string. * @param {ThreadMemberResolvable} member The user that is part of the guild * @returns {?Snowflake} */ resolveId(member) { const memberResolvable = super.resolveId(member); if (memberResolvable) return memberResolvable; const userResolvable = this.client.users.resolveId(member); return this.cache.has(userResolvable) ? userResolvable : null; } /** * Adds a member to the thread. * @param {UserResolvable|'@me'} member The member to add * @param {string} [reason] The reason for adding this member * <warn>This parameter is **deprecated**. Reasons cannot be used.</warn> * @returns {Promise<Snowflake>} */ async add(member, reason) { if (reason !== undefined && !deprecationEmittedForAdd) { process.emitWarning( // eslint-disable-next-line max-len 'The reason parameter of ThreadMemberManager#add() is deprecated as Discord does not parse them. It will be removed in the next major version.', 'DeprecationWarning', ); deprecationEmittedForAdd = true; } const id = member === '@me' ? member : this.client.users.resolveId(member); if (!id) throw new DiscordjsTypeError(ErrorCodes.InvalidType, 'member', 'UserResolvable'); await this.client.rest.put(Routes.threadMembers(this.thread.id, id), { reason }); return id; } /** * Remove a user from the thread. * @param {UserResolvable|'@me'} member The member to remove * @param {string} [reason] The reason for removing this member from the thread * <warn>This parameter is **deprecated**. Reasons cannot be used.</warn> * @returns {Promise<Snowflake>} */ async remove(member, reason) { if (reason !== undefined) { emitDeprecationWarningForRemoveThreadMember(this.constructor.name); } const id = member === '@me' ? member : this.client.users.resolveId(member); if (!id) throw new DiscordjsTypeError(ErrorCodes.InvalidType, 'member', 'UserResolvable'); await this.client.rest.delete(Routes.threadMembers(this.thread.id, id), { reason }); return id; } /** * Options used to fetch a thread member. * @typedef {BaseFetchOptions} FetchThreadMemberOptions * @property {ThreadMemberResolvable} member The thread member to fetch * @property {boolean} [withMember] Whether to also return the guild member associated with this thread member */ /** * Options used to fetch multiple thread members with guild member data. * <info>With `withMember` set to `true`, pagination is enabled.</info> * @typedef {Object} FetchThreadMembersWithGuildMemberDataOptions * @property {true} withMember Whether to also return the guild member data * @property {Snowflake} [after] Consider only thread members after this id * @property {number} [limit] The maximum number of thread members to return * @property {boolean} [cache] Whether to cache the fetched thread members and guild members */ /** * Options used to fetch multiple thread members without guild member data. * @typedef {Object} FetchThreadMembersWithoutGuildMemberDataOptions * @property {false} [withMember] Whether to also return the guild member data * @property {boolean} [cache] Whether to cache the fetched thread members */ /** * Options used to fetch multiple thread members. * @typedef {FetchThreadMembersWithGuildMemberDataOptions| * FetchThreadMembersWithoutGuildMemberDataOptions} FetchThreadMembersOptions */ /** * Fetches thread member(s) from Discord. * <info>This method requires the {@link GatewayIntentBits.GuildMembers} privileged gateway intent.</info> * @param {ThreadMemberResolvable|FetchThreadMemberOptions|FetchThreadMembersOptions} [options] * Options for fetching thread member(s) * @returns {Promise<ThreadMember|Collection<Snowflake, ThreadMember>>} */ fetch(options) { if (!options) return this._fetchMany(); const { member, withMember, cache, force } = options; const resolvedMember = this.resolveId(member ?? options); if (resolvedMember) return this._fetchSingle({ member: resolvedMember, withMember, cache, force }); return this._fetchMany(options); } async _fetchSingle({ member, withMember, cache, force = false }) { if (!force) { const existing = this.cache.get(member); if (existing) return existing; } const data = await this.client.rest.get(Routes.threadMembers(this.thread.id, member), { query: makeURLSearchParams({ with_member: withMember }), }); return this._add(data, cache); } async _fetchMany({ withMember, after, limit, cache } = {}) { const data = await this.client.rest.get(Routes.threadMembers(this.thread.id), { query: makeURLSearchParams({ with_member: withMember, after, limit }), }); return data.reduce((col, member) => col.set(member.user_id, this._add(member, cache)), new Collection()); } } module.exports = ThreadMemberManager; node_modules/discord.js/src/managers/PermissionOverwriteManager.js 0000664 00000015030 15114741631 0021543 0 ustar 00 'use strict'; const process = require('node:process'); const { Collection } = require('@discordjs/collection'); const { OverwriteType, Routes } = require('discord-api-types/v10'); const CachedManager = require('./CachedManager'); const { DiscordjsTypeError, ErrorCodes } = require('../errors'); const PermissionOverwrites = require('../structures/PermissionOverwrites'); const { Role } = require('../structures/Role'); let cacheWarningEmitted = false; /** * Manages API methods for guild channel permission overwrites and stores their cache. * @extends {CachedManager} */ class PermissionOverwriteManager extends CachedManager { constructor(channel, iterable) { super(channel.client, PermissionOverwrites); if (!cacheWarningEmitted && this._cache.constructor.name !== 'Collection') { cacheWarningEmitted = true; process.emitWarning( `Overriding the cache handling for ${this.constructor.name} is unsupported and breaks functionality.`, 'UnsupportedCacheOverwriteWarning', ); } /** * The channel of the permission overwrite this manager belongs to * @type {GuildChannel} */ this.channel = channel; if (iterable) { for (const item of iterable) { this._add(item); } } } /** * The cache of this Manager * @type {Collection<Snowflake, PermissionOverwrites>} * @name PermissionOverwriteManager#cache */ _add(data, cache) { return super._add(data, cache, { extras: [this.channel] }); } /** * Replaces the permission overwrites in this channel. * @param {OverwriteResolvable[]|Collection<Snowflake, OverwriteResolvable>} overwrites * Permission overwrites the channel gets updated with * @param {string} [reason] Reason for updating the channel overwrites * @returns {Promise<GuildChannel>} * @example * message.channel.permissionOverwrites.set([ * { * id: message.author.id, * deny: [PermissionFlagsBits.ViewChannel], * }, * ], 'Needed to change permissions'); */ async set(overwrites, reason) { if (!Array.isArray(overwrites) && !(overwrites instanceof Collection)) { throw new DiscordjsTypeError( ErrorCodes.InvalidType, 'overwrites', 'Array or Collection of Permission Overwrites', true, ); } return this.channel.edit({ permissionOverwrites: overwrites, reason }); } /** * Extra information about the overwrite. * @typedef {Object} GuildChannelOverwriteOptions * @property {string} [reason] The reason for creating/editing this overwrite * @property {OverwriteType} [type] The type of overwrite. Use this to bypass automatic resolution of `type` * that results in an error for an uncached structure */ /** * Creates or edits permission overwrites for a user or role in this channel. * @param {RoleResolvable|UserResolvable} userOrRole The user or role to update * @param {PermissionOverwriteOptions} options The options for the update * @param {GuildChannelOverwriteOptions} [overwriteOptions] The extra information for the update * @param {PermissionOverwrites} [existing] The existing overwrites to merge with this update * @returns {Promise<GuildChannel>} * @private */ async upsert(userOrRole, options, overwriteOptions = {}, existing) { let userOrRoleId = this.channel.guild.roles.resolveId(userOrRole) ?? this.client.users.resolveId(userOrRole); let { type, reason } = overwriteOptions; if (typeof type !== 'number') { userOrRole = this.channel.guild.roles.resolve(userOrRole) ?? this.client.users.resolve(userOrRole); if (!userOrRole) throw new DiscordjsTypeError(ErrorCodes.InvalidType, 'parameter', 'User nor a Role'); type = userOrRole instanceof Role ? OverwriteType.Role : OverwriteType.Member; } const { allow, deny } = PermissionOverwrites.resolveOverwriteOptions(options, existing); await this.client.rest.put(Routes.channelPermission(this.channel.id, userOrRoleId), { body: { id: userOrRoleId, type, allow, deny }, reason, }); return this.channel; } /** * Creates permission overwrites for a user or role in this channel, or replaces them if already present. * @param {RoleResolvable|UserResolvable} userOrRole The user or role to update * @param {PermissionOverwriteOptions} options The options for the update * @param {GuildChannelOverwriteOptions} [overwriteOptions] The extra information for the update * @returns {Promise<GuildChannel>} * @example * // Create or Replace permission overwrites for a message author * message.channel.permissionOverwrites.create(message.author, { * SendMessages: false * }) * .then(channel => console.log(channel.permissionOverwrites.cache.get(message.author.id))) * .catch(console.error); */ create(userOrRole, options, overwriteOptions) { return this.upsert(userOrRole, options, overwriteOptions); } /** * Edits permission overwrites for a user or role in this channel, or creates an entry if not already present. * @param {RoleResolvable|UserResolvable} userOrRole The user or role to update * @param {PermissionOverwriteOptions} options The options for the update * @param {GuildChannelOverwriteOptions} [overwriteOptions] The extra information for the update * @returns {Promise<GuildChannel>} * @example * // Edit or Create permission overwrites for a message author * message.channel.permissionOverwrites.edit(message.author, { * SendMessages: false * }) * .then(channel => console.log(channel.permissionOverwrites.cache.get(message.author.id))) * .catch(console.error); */ edit(userOrRole, options, overwriteOptions) { const existing = this.cache.get( this.channel.guild.roles.resolveId(userOrRole) ?? this.client.users.resolveId(userOrRole), ); return this.upsert(userOrRole, options, overwriteOptions, existing); } /** * Deletes permission overwrites for a user or role in this channel. * @param {UserResolvable|RoleResolvable} userOrRole The user or role to delete * @param {string} [reason] The reason for deleting the overwrite * @returns {Promise<GuildChannel>} */ async delete(userOrRole, reason) { const userOrRoleId = this.channel.guild.roles.resolveId(userOrRole) ?? this.client.users.resolveId(userOrRole); if (!userOrRoleId) throw new DiscordjsTypeError(ErrorCodes.InvalidType, 'parameter', 'User nor a Role'); await this.client.rest.delete(Routes.channelPermission(this.channel.id, userOrRoleId), { reason }); return this.channel; } } module.exports = PermissionOverwriteManager; node_modules/discord.js/src/managers/ApplicationCommandManager.js 0000664 00000023427 15114741631 0021257 0 ustar 00 'use strict'; const { Collection } = require('@discordjs/collection'); const { makeURLSearchParams } = require('@discordjs/rest'); const { isJSONEncodable } = require('@discordjs/util'); const { Routes } = require('discord-api-types/v10'); const ApplicationCommandPermissionsManager = require('./ApplicationCommandPermissionsManager'); const CachedManager = require('./CachedManager'); const { DiscordjsTypeError, ErrorCodes } = require('../errors'); const ApplicationCommand = require('../structures/ApplicationCommand'); const PermissionsBitField = require('../util/PermissionsBitField'); /** * Manages API methods for application commands and stores their cache. * @extends {CachedManager} */ class ApplicationCommandManager extends CachedManager { constructor(client, iterable) { super(client, ApplicationCommand, iterable); /** * The manager for permissions of arbitrary commands on arbitrary guilds * @type {ApplicationCommandPermissionsManager} */ this.permissions = new ApplicationCommandPermissionsManager(this); } /** * The cache of this manager * @type {Collection<Snowflake, ApplicationCommand>} * @name ApplicationCommandManager#cache */ _add(data, cache, guildId) { return super._add(data, cache, { extras: [this.guild, guildId] }); } /** * The APIRouter path to the commands * @param {Snowflake} [options.id] The application command's id * @param {Snowflake} [options.guildId] The guild's id to use in the path, * ignored when using a {@link GuildApplicationCommandManager} * @returns {string} * @private */ commandPath({ id, guildId } = {}) { if (this.guild ?? guildId) { if (id) { return Routes.applicationGuildCommand(this.client.application.id, this.guild?.id ?? guildId, id); } return Routes.applicationGuildCommands(this.client.application.id, this.guild?.id ?? guildId); } if (id) { return Routes.applicationCommand(this.client.application.id, id); } return Routes.applicationCommands(this.client.application.id); } /** * Data that resolves to give an ApplicationCommand object. This can be: * * An ApplicationCommand object * * A Snowflake * @typedef {ApplicationCommand|Snowflake} ApplicationCommandResolvable */ /** * Data that resolves to the data of an ApplicationCommand * @typedef {ApplicationCommandData|APIApplicationCommand} ApplicationCommandDataResolvable */ /** * Options used to fetch data from Discord * @typedef {Object} BaseFetchOptions * @property {boolean} [cache=true] Whether to cache the fetched data if it wasn't already * @property {boolean} [force=false] Whether to skip the cache check and request the API */ /** * Options used to fetch Application Commands from Discord * @typedef {BaseFetchOptions} FetchApplicationCommandOptions * @property {Snowflake} [guildId] The guild's id to fetch commands for, for when the guild is not cached * @property {Locale} [locale] The locale to use when fetching this command * @property {boolean} [withLocalizations] Whether to fetch all localization data */ /** * Obtains one or multiple application commands from Discord, or the cache if it's already available. * @param {Snowflake|FetchApplicationCommandOptions} [id] Options for fetching application command(s) * @param {FetchApplicationCommandOptions} [options] Additional options for this fetch * @returns {Promise<ApplicationCommand|Collection<Snowflake, ApplicationCommand>>} * @example * // Fetch a single command * client.application.commands.fetch('123456789012345678') * .then(command => console.log(`Fetched command ${command.name}`)) * .catch(console.error); * @example * // Fetch all commands * guild.commands.fetch() * .then(commands => console.log(`Fetched ${commands.size} commands`)) * .catch(console.error); */ async fetch(id, { guildId, cache = true, force = false, locale, withLocalizations } = {}) { if (typeof id === 'object') { ({ guildId, cache = true, locale, withLocalizations } = id); } else if (id) { if (!force) { const existing = this.cache.get(id); if (existing) return existing; } const command = await this.client.rest.get(this.commandPath({ id, guildId })); return this._add(command, cache); } const data = await this.client.rest.get(this.commandPath({ guildId }), { headers: { 'X-Discord-Locale': locale, }, query: makeURLSearchParams({ with_localizations: withLocalizations }), }); return data.reduce((coll, command) => coll.set(command.id, this._add(command, cache, guildId)), new Collection()); } /** * Creates an application command. * @param {ApplicationCommandDataResolvable} command The command * @param {Snowflake} [guildId] The guild's id to create this command in, * ignored when using a {@link GuildApplicationCommandManager} * @returns {Promise<ApplicationCommand>} * @example * // Create a new command * client.application.commands.create({ * name: 'test', * description: 'A test command', * }) * .then(console.log) * .catch(console.error); */ async create(command, guildId) { const data = await this.client.rest.post(this.commandPath({ guildId }), { body: this.constructor.transformCommand(command), }); return this._add(data, true, guildId); } /** * Sets all the commands for this application or guild. * @param {ApplicationCommandDataResolvable[]} commands The commands * @param {Snowflake} [guildId] The guild's id to create the commands in, * ignored when using a {@link GuildApplicationCommandManager} * @returns {Promise<Collection<Snowflake, ApplicationCommand>>} * @example * // Set all commands to just this one * client.application.commands.set([ * { * name: 'test', * description: 'A test command', * }, * ]) * .then(console.log) * .catch(console.error); * @example * // Remove all commands * guild.commands.set([]) * .then(console.log) * .catch(console.error); */ async set(commands, guildId) { const data = await this.client.rest.put(this.commandPath({ guildId }), { body: commands.map(command => this.constructor.transformCommand(command)), }); return data.reduce( (collection, command) => collection.set(command.id, this._add(command, true, guildId)), new Collection(), ); } /** * Edits an application command. * @param {ApplicationCommandResolvable} command The command to edit * @param {Partial<ApplicationCommandDataResolvable>} data The data to update the command with * @param {Snowflake} [guildId] The guild's id where the command registered, * ignored when using a {@link GuildApplicationCommandManager} * @returns {Promise<ApplicationCommand>} * @example * // Edit an existing command * client.application.commands.edit('123456789012345678', { * description: 'New description', * }) * .then(console.log) * .catch(console.error); */ async edit(command, data, guildId) { const id = this.resolveId(command); if (!id) throw new DiscordjsTypeError(ErrorCodes.InvalidType, 'command', 'ApplicationCommandResolvable'); const patched = await this.client.rest.patch(this.commandPath({ id, guildId }), { body: this.constructor.transformCommand(data), }); return this._add(patched, true, guildId); } /** * Deletes an application command. * @param {ApplicationCommandResolvable} command The command to delete * @param {Snowflake} [guildId] The guild's id where the command is registered, * ignored when using a {@link GuildApplicationCommandManager} * @returns {Promise<?ApplicationCommand>} * @example * // Delete a command * guild.commands.delete('123456789012345678') * .then(console.log) * .catch(console.error); */ async delete(command, guildId) { const id = this.resolveId(command); if (!id) throw new DiscordjsTypeError(ErrorCodes.InvalidType, 'command', 'ApplicationCommandResolvable'); await this.client.rest.delete(this.commandPath({ id, guildId })); const cached = this.cache.get(id); this.cache.delete(id); return cached ?? null; } /** * Transforms an {@link ApplicationCommandData} object into something that can be used with the API. * @param {ApplicationCommandDataResolvable} command The command to transform * @returns {APIApplicationCommand} * @private */ static transformCommand(command) { if (isJSONEncodable(command)) return command.toJSON(); let default_member_permissions; if ('default_member_permissions' in command) { default_member_permissions = command.default_member_permissions ? new PermissionsBitField(BigInt(command.default_member_permissions)).bitfield.toString() : command.default_member_permissions; } if ('defaultMemberPermissions' in command) { default_member_permissions = command.defaultMemberPermissions !== null ? new PermissionsBitField(command.defaultMemberPermissions).bitfield.toString() : command.defaultMemberPermissions; } return { name: command.name, name_localizations: command.nameLocalizations ?? command.name_localizations, description: command.description, nsfw: command.nsfw, description_localizations: command.descriptionLocalizations ?? command.description_localizations, type: command.type, options: command.options?.map(option => ApplicationCommand.transformOption(option)), default_member_permissions, dm_permission: command.dmPermission ?? command.dm_permission, integration_types: command.integrationTypes ?? command.integration_types, contexts: command.contexts, handler: command.handler, }; } } module.exports = ApplicationCommandManager; node_modules/discord.js/src/managers/GuildForumThreadManager.js 0000664 00000005130 15114741631 0020711 0 ustar 00 'use strict'; const { Routes } = require('discord-api-types/v10'); const ThreadManager = require('./ThreadManager'); const { DiscordjsTypeError, ErrorCodes } = require('../errors'); const MessagePayload = require('../structures/MessagePayload'); /** * Manages API methods for threads in forum channels and stores their cache. * @extends {ThreadManager} */ class GuildForumThreadManager extends ThreadManager { /** * The channel this Manager belongs to * @name GuildForumThreadManager#channel * @type {ForumChannel} */ /** * @typedef {BaseMessageOptions} GuildForumThreadMessageCreateOptions * @property {StickerResolvable} [stickers] The stickers to send with the message * @property {BitFieldResolvable} [flags] The flags to send with the message * <info>Only `MessageFlags.SuppressEmbeds` and `MessageFlags.SuppressNotifications` can be set.</info> */ /** * Options for creating a thread. * @typedef {StartThreadOptions} GuildForumThreadCreateOptions * @property {GuildForumThreadMessageCreateOptions|MessagePayload} message The message associated with the thread post * @property {Snowflake[]} [appliedTags] The tags to apply to the thread */ /** * Creates a new thread in the channel. * @param {GuildForumThreadCreateOptions} [options] Options to create a new thread * @returns {Promise<ThreadChannel>} * @example * // Create a new forum post * forum.threads * .create({ * name: 'Food Talk', * autoArchiveDuration: ThreadAutoArchiveDuration.OneHour, * message: { * content: 'Discuss your favorite food!', * }, * reason: 'Needed a separate thread for food', * }) * .then(threadChannel => console.log(threadChannel)) * .catch(console.error); */ async create({ name, autoArchiveDuration = this.channel.defaultAutoArchiveDuration, message, reason, rateLimitPerUser, appliedTags, } = {}) { if (!message) { throw new DiscordjsTypeError(ErrorCodes.GuildForumMessageRequired); } const { body, files } = await (message instanceof MessagePayload ? message : MessagePayload.create(this, message)) .resolveBody() .resolveFiles(); const data = await this.client.rest.post(Routes.threads(this.channel.id), { body: { name, auto_archive_duration: autoArchiveDuration, rate_limit_per_user: rateLimitPerUser, applied_tags: appliedTags, message: body, }, files, reason, }); return this.client.actions.ThreadCreate.handle(data).thread; } } module.exports = GuildForumThreadManager; node_modules/discord.js/src/managers/GuildEmojiManager.js 0000664 00000014230 15114741631 0017535 0 ustar 00 'use strict'; const { Collection } = require('@discordjs/collection'); const { Routes, PermissionFlagsBits } = require('discord-api-types/v10'); const BaseGuildEmojiManager = require('./BaseGuildEmojiManager'); const { DiscordjsError, DiscordjsTypeError, ErrorCodes } = require('../errors'); const { resolveImage } = require('../util/DataResolver'); /** * Manages API methods for GuildEmojis and stores their cache. * @extends {BaseGuildEmojiManager} */ class GuildEmojiManager extends BaseGuildEmojiManager { constructor(guild, iterable) { super(guild.client, iterable); /** * The guild this manager belongs to * @type {Guild} */ this.guild = guild; } _add(data, cache) { return super._add(data, cache, { extras: [this.guild] }); } /** * Options used for creating an emoji in a guild. * @typedef {Object} GuildEmojiCreateOptions * @property {BufferResolvable|Base64Resolvable} attachment The image for the emoji * @property {string} name The name for the emoji * @property {Collection<Snowflake, Role>|RoleResolvable[]} [roles] The roles to limit the emoji to * @property {string} [reason] The reason for creating the emoji */ /** * Creates a new custom emoji in the guild. * @param {GuildEmojiCreateOptions} options Options for creating the emoji * @returns {Promise<Emoji>} The created emoji * @example * // Create a new emoji from a URL * guild.emojis.create({ attachment: 'https://i.imgur.com/w3duR07.png', name: 'rip' }) * .then(emoji => console.log(`Created new emoji with name ${emoji.name}!`)) * .catch(console.error); * @example * // Create a new emoji from a file on your computer * guild.emojis.create({ attachment: './memes/banana.png', name: 'banana' }) * .then(emoji => console.log(`Created new emoji with name ${emoji.name}!`)) * .catch(console.error); */ async create({ attachment, name, roles, reason }) { attachment = await resolveImage(attachment); if (!attachment) throw new DiscordjsTypeError(ErrorCodes.ReqResourceType); const body = { image: attachment, name }; if (roles) { if (!Array.isArray(roles) && !(roles instanceof Collection)) { throw new DiscordjsTypeError( ErrorCodes.InvalidType, 'options.roles', 'Array or Collection of Roles or Snowflakes', true, ); } body.roles = []; for (const role of roles.values()) { const resolvedRole = this.guild.roles.resolveId(role); if (!resolvedRole) { throw new DiscordjsTypeError(ErrorCodes.InvalidElement, 'Array or Collection', 'options.roles', role); } body.roles.push(resolvedRole); } } const emoji = await this.client.rest.post(Routes.guildEmojis(this.guild.id), { body, reason }); return this.client.actions.GuildEmojiCreate.handle(this.guild, emoji).emoji; } /** * Obtains one or more emojis from Discord, or the emoji cache if they're already available. * @param {Snowflake} [id] The emoji's id * @param {BaseFetchOptions} [options] Additional options for this fetch * @returns {Promise<GuildEmoji|Collection<Snowflake, GuildEmoji>>} * @example * // Fetch all emojis from the guild * message.guild.emojis.fetch() * .then(emojis => console.log(`There are ${emojis.size} emojis.`)) * .catch(console.error); * @example * // Fetch a single emoji * message.guild.emojis.fetch('222078108977594368') * .then(emoji => console.log(`The emoji name is: ${emoji.name}`)) * .catch(console.error); */ async fetch(id, { cache = true, force = false } = {}) { if (id) { if (!force) { const existing = this.cache.get(id); if (existing) return existing; } const emoji = await this.client.rest.get(Routes.guildEmoji(this.guild.id, id)); return this._add(emoji, cache); } const data = await this.client.rest.get(Routes.guildEmojis(this.guild.id)); const emojis = new Collection(); for (const emoji of data) emojis.set(emoji.id, this._add(emoji, cache)); return emojis; } /** * Deletes an emoji. * @param {EmojiResolvable} emoji The Emoji resolvable to delete * @param {string} [reason] Reason for deleting the emoji * @returns {Promise<void>} */ async delete(emoji, reason) { const id = this.resolveId(emoji); if (!id) throw new DiscordjsTypeError(ErrorCodes.InvalidType, 'emoji', 'EmojiResolvable', true); await this.client.rest.delete(Routes.guildEmoji(this.guild.id, id), { reason }); } /** * Edits an emoji. * @param {EmojiResolvable} emoji The Emoji resolvable to edit * @param {GuildEmojiEditOptions} options The options to provide * @returns {Promise<GuildEmoji>} */ async edit(emoji, options) { const id = this.resolveId(emoji); if (!id) throw new DiscordjsTypeError(ErrorCodes.InvalidType, 'emoji', 'EmojiResolvable', true); const roles = options.roles?.map(role => this.guild.roles.resolveId(role)); const newData = await this.client.rest.patch(Routes.guildEmoji(this.guild.id, id), { body: { name: options.name, roles, }, reason: options.reason, }); const existing = this.cache.get(id); if (existing) { const clone = existing._clone(); clone._patch(newData); return clone; } return this._add(newData); } /** * Fetches the author for this emoji * @param {EmojiResolvable} emoji The emoji to fetch the author of * @returns {Promise<User>} */ async fetchAuthor(emoji) { emoji = this.resolve(emoji); if (!emoji) throw new DiscordjsTypeError(ErrorCodes.InvalidType, 'emoji', 'EmojiResolvable', true); if (emoji.managed) { throw new DiscordjsError(ErrorCodes.EmojiManaged); } const { me } = this.guild.members; if (!me) throw new DiscordjsError(ErrorCodes.GuildUncachedMe); if (!me.permissions.has(PermissionFlagsBits.ManageGuildExpressions)) { throw new DiscordjsError(ErrorCodes.MissingManageGuildExpressionsPermission, this.guild); } const data = await this.client.rest.get(Routes.guildEmoji(this.guild.id, emoji.id)); emoji._patch(data); return emoji.author; } } module.exports = GuildEmojiManager; node_modules/discord.js/src/managers/MessageManager.js 0000664 00000025542 15114741631 0017101 0 ustar 00 'use strict'; const { Collection } = require('@discordjs/collection'); const { makeURLSearchParams } = require('@discordjs/rest'); const { Routes } = require('discord-api-types/v10'); const CachedManager = require('./CachedManager'); const { DiscordjsTypeError, ErrorCodes } = require('../errors'); const { Message } = require('../structures/Message'); const MessagePayload = require('../structures/MessagePayload'); const { MakeCacheOverrideSymbol } = require('../util/Symbols'); const { resolvePartialEmoji } = require('../util/Util'); /** * Manages API methods for Messages and holds their cache. * @extends {CachedManager} * @abstract */ class MessageManager extends CachedManager { static [MakeCacheOverrideSymbol] = MessageManager; constructor(channel, iterable) { super(channel.client, Message, iterable); /** * The channel that the messages belong to * @type {TextBasedChannels} */ this.channel = channel; } /** * The cache of Messages * @type {Collection<Snowflake, Message>} * @name MessageManager#cache */ _add(data, cache) { return super._add(data, cache); } /** * Data that can be resolved to a Message object. This can be: * * A Message * * A Snowflake * @typedef {Message|Snowflake} MessageResolvable */ /** * Options used to fetch a message. * @typedef {BaseFetchOptions} FetchMessageOptions * @property {MessageResolvable} message The message to fetch */ /** * Options used to fetch multiple messages. * <info>The `before`, `after`, and `around` parameters are mutually exclusive.</info> * @typedef {Object} FetchMessagesOptions * @property {number} [limit] The maximum number of messages to return * @property {Snowflake} [before] Consider only messages before this id * @property {Snowflake} [after] Consider only messages after this id * @property {Snowflake} [around] Consider only messages around this id * @property {boolean} [cache] Whether to cache the fetched messages */ /** * Fetches message(s) from a channel. * <info>The returned Collection does not contain reaction users of the messages if they were not cached. * Those need to be fetched separately in such a case.</info> * @param {MessageResolvable|FetchMessageOptions|FetchMessagesOptions} [options] Options for fetching message(s) * @returns {Promise<Message|Collection<Snowflake, Message>>} * @example * // Fetch a message * channel.messages.fetch('99539446449315840') * .then(message => console.log(message.content)) * .catch(console.error); * @example * // Fetch a maximum of 10 messages without caching * channel.messages.fetch({ limit: 10, cache: false }) * .then(messages => console.log(`Received ${messages.size} messages`)) * .catch(console.error); * @example * // Fetch a maximum of 10 messages without caching around a message id * channel.messages.fetch({ limit: 10, cache: false, around: '99539446449315840' }) * .then(messages => console.log(`Received ${messages.size} messages`)) * .catch(console.error); * @example * // Fetch messages and filter by a user id * channel.messages.fetch() * .then(messages => console.log(`${messages.filter(message => * message.author.id === '84484653687267328').size} messages`)) * .catch(console.error); */ fetch(options) { if (!options) return this._fetchMany(); const { message, cache, force } = options; const resolvedMessage = this.resolveId(message ?? options); if (resolvedMessage) return this._fetchSingle({ message: resolvedMessage, cache, force }); return this._fetchMany(options); } async _fetchSingle({ message, cache, force = false }) { if (!force) { const existing = this.cache.get(message); if (existing && !existing.partial) return existing; } const data = await this.client.rest.get(Routes.channelMessage(this.channel.id, message)); return this._add(data, cache); } async _fetchMany(options = {}) { const data = await this.client.rest.get(Routes.channelMessages(this.channel.id), { query: makeURLSearchParams(options), }); return data.reduce((_data, message) => _data.set(message.id, this._add(message, options.cache)), new Collection()); } /** * Fetches the pinned messages of this channel and returns a collection of them. * <info>The returned Collection does not contain any reaction data of the messages. * Those need to be fetched separately.</info> * @param {boolean} [cache=true] Whether to cache the message(s) * @returns {Promise<Collection<Snowflake, Message>>} * @example * // Get pinned messages * channel.messages.fetchPinned() * .then(messages => console.log(`Received ${messages.size} messages`)) * .catch(console.error); */ async fetchPinned(cache = true) { const data = await this.client.rest.get(Routes.channelPins(this.channel.id)); const messages = new Collection(); for (const message of data) messages.set(message.id, this._add(message, cache)); return messages; } /** * Resolves a {@link MessageResolvable} to a {@link Message} object. * @method resolve * @memberof MessageManager * @instance * @param {MessageResolvable} message The message resolvable to resolve * @returns {?Message} */ /** * Resolves a {@link MessageResolvable} to a {@link Message} id. * @method resolveId * @memberof MessageManager * @instance * @param {MessageResolvable} message The message resolvable to resolve * @returns {?Snowflake} */ /** * Data used to reference an attachment. * @typedef {Object} MessageEditAttachmentData * @property {Snowflake} id The id of the attachment */ /** * Options that can be passed to edit a message. * @typedef {BaseMessageOptions} MessageEditOptions * @property {Array<Attachment|MessageEditAttachmentData>} [attachments] An array of attachments to keep. * All attachments will be kept if omitted * @property {MessageFlags} [flags] Which flags to set for the message * <info>Only the {@link MessageFlags.SuppressEmbeds} flag can be modified.</info> */ /** * Edits a message, even if it's not cached. * @param {MessageResolvable} message The message to edit * @param {string|MessageEditOptions|MessagePayload} options The options to edit the message * @returns {Promise<Message>} */ async edit(message, options) { const messageId = this.resolveId(message); if (!messageId) throw new DiscordjsTypeError(ErrorCodes.InvalidType, 'message', 'MessageResolvable'); const { body, files } = await ( options instanceof MessagePayload ? options : MessagePayload.create(message instanceof Message ? message : this, options) ) .resolveBody() .resolveFiles(); const d = await this.client.rest.patch(Routes.channelMessage(this.channel.id, messageId), { body, files }); const existing = this.cache.get(messageId); if (existing) { const clone = existing._clone(); clone._patch(d); return clone; } return this._add(d); } /** * Publishes a message in an announcement channel to all channels following it, even if it's not cached. * @param {MessageResolvable} message The message to publish * @returns {Promise<Message>} */ async crosspost(message) { message = this.resolveId(message); if (!message) throw new DiscordjsTypeError(ErrorCodes.InvalidType, 'message', 'MessageResolvable'); const data = await this.client.rest.post(Routes.channelMessageCrosspost(this.channel.id, message)); return this.cache.get(data.id) ?? this._add(data); } /** * Pins a message to the channel's pinned messages, even if it's not cached. * @param {MessageResolvable} message The message to pin * @param {string} [reason] Reason for pinning * @returns {Promise<void>} */ async pin(message, reason) { message = this.resolveId(message); if (!message) throw new DiscordjsTypeError(ErrorCodes.InvalidType, 'message', 'MessageResolvable'); await this.client.rest.put(Routes.channelPin(this.channel.id, message), { reason }); } /** * Unpins a message from the channel's pinned messages, even if it's not cached. * @param {MessageResolvable} message The message to unpin * @param {string} [reason] Reason for unpinning * @returns {Promise<void>} */ async unpin(message, reason) { message = this.resolveId(message); if (!message) throw new DiscordjsTypeError(ErrorCodes.InvalidType, 'message', 'MessageResolvable'); await this.client.rest.delete(Routes.channelPin(this.channel.id, message), { reason }); } /** * Adds a reaction to a message, even if it's not cached. * @param {MessageResolvable} message The message to react to * @param {EmojiIdentifierResolvable} emoji The emoji to react with * @returns {Promise<void>} */ async react(message, emoji) { message = this.resolveId(message); if (!message) throw new DiscordjsTypeError(ErrorCodes.InvalidType, 'message', 'MessageResolvable'); emoji = resolvePartialEmoji(emoji); if (!emoji) throw new DiscordjsTypeError(ErrorCodes.EmojiType, 'emoji', 'EmojiIdentifierResolvable'); const emojiId = emoji.id ? `${emoji.animated ? 'a:' : ''}${emoji.name}:${emoji.id}` : encodeURIComponent(emoji.name); await this.client.rest.put(Routes.channelMessageOwnReaction(this.channel.id, message, emojiId)); } /** * Deletes a message, even if it's not cached. * @param {MessageResolvable} message The message to delete * @returns {Promise<void>} */ async delete(message) { message = this.resolveId(message); if (!message) throw new DiscordjsTypeError(ErrorCodes.InvalidType, 'message', 'MessageResolvable'); await this.client.rest.delete(Routes.channelMessage(this.channel.id, message)); } /** * Ends a poll. * @param {Snowflake} messageId The id of the message * @returns {Promise<Message>} */ async endPoll(messageId) { const message = await this.client.rest.post(Routes.expirePoll(this.channel.id, messageId)); return this._add(message, false); } /** * Options used for fetching voters of an answer in a poll. * @typedef {BaseFetchPollAnswerVotersOptions} FetchPollAnswerVotersOptions * @param {Snowflake} messageId The id of the message * @param {number} answerId The id of the answer */ /** * Fetches the users that voted for a poll answer. * @param {FetchPollAnswerVotersOptions} options The options for fetching the poll answer voters * @returns {Promise<Collection<Snowflake, User>>} */ async fetchPollAnswerVoters({ messageId, answerId, after, limit }) { const voters = await this.client.rest.get(Routes.pollAnswerVoters(this.channel.id, messageId, answerId), { query: makeURLSearchParams({ limit, after }), }); return voters.users.reduce((acc, user) => acc.set(user.id, this.client.users._add(user, false)), new Collection()); } } module.exports = MessageManager; node_modules/discord.js/src/managers/GuildBanManager.js 0000664 00000022420 15114741631 0017172 0 ustar 00 'use strict'; const process = require('node:process'); const { Collection } = require('@discordjs/collection'); const { makeURLSearchParams } = require('@discordjs/rest'); const { Routes } = require('discord-api-types/v10'); const CachedManager = require('./CachedManager'); const { DiscordjsTypeError, DiscordjsError, ErrorCodes } = require('../errors'); const GuildBan = require('../structures/GuildBan'); const { GuildMember } = require('../structures/GuildMember'); let deprecationEmittedForDeleteMessageDays = false; /** * Manages API methods for guild bans and stores their cache. * @extends {CachedManager} */ class GuildBanManager extends CachedManager { constructor(guild, iterable) { super(guild.client, GuildBan, iterable); /** * The guild this Manager belongs to * @type {Guild} */ this.guild = guild; } /** * The cache of this Manager * @type {Collection<Snowflake, GuildBan>} * @name GuildBanManager#cache */ _add(data, cache) { return super._add(data, cache, { id: data.user.id, extras: [this.guild] }); } /** * Data that resolves to give a GuildBan object. This can be: * * A GuildBan object * * A User resolvable * @typedef {GuildBan|UserResolvable} GuildBanResolvable */ /** * Resolves a GuildBanResolvable to a GuildBan object. * @param {GuildBanResolvable} ban The ban that is in the guild * @returns {?GuildBan} */ resolve(ban) { return super.resolve(ban) ?? super.resolve(this.client.users.resolveId(ban)); } /** * Options used to fetch a single ban from a guild. * @typedef {BaseFetchOptions} FetchBanOptions * @property {UserResolvable} user The ban to fetch */ /** * Options used to fetch multiple bans from a guild. * @typedef {Object} FetchBansOptions * @property {number} [limit] The maximum number of bans to return * @property {Snowflake} [before] Consider only bans before this id * @property {Snowflake} [after] Consider only bans after this id * @property {boolean} [cache] Whether to cache the fetched bans */ /** * Fetches ban(s) from Discord. * @param {UserResolvable|FetchBanOptions|FetchBansOptions} [options] Options for fetching guild ban(s) * @returns {Promise<GuildBan|Collection<Snowflake, GuildBan>>} * @example * // Fetch multiple bans from a guild * guild.bans.fetch() * .then(console.log) * .catch(console.error); * @example * // Fetch a maximum of 5 bans from a guild without caching * guild.bans.fetch({ limit: 5, cache: false }) * .then(console.log) * .catch(console.error); * @example * // Fetch a single ban * guild.bans.fetch('351871113346809860') * .then(console.log) * .catch(console.error); * @example * // Fetch a single ban without checking cache * guild.bans.fetch({ user, force: true }) * .then(console.log) * .catch(console.error) * @example * // Fetch a single ban without caching * guild.bans.fetch({ user, cache: false }) * .then(console.log) * .catch(console.error); */ async fetch(options) { if (!options) return this._fetchMany(); const { user, cache, force, limit, before, after } = options; const resolvedUser = this.client.users.resolveId(user ?? options); if (resolvedUser) return this._fetchSingle({ user: resolvedUser, cache, force }); if (!before && !after && !limit && cache === undefined) { throw new DiscordjsError(ErrorCodes.FetchBanResolveId); } return this._fetchMany(options); } async _fetchSingle({ user, cache, force = false }) { if (!force) { const existing = this.cache.get(user); if (existing && !existing.partial) return existing; } const data = await this.client.rest.get(Routes.guildBan(this.guild.id, user)); return this._add(data, cache); } async _fetchMany(options = {}) { const data = await this.client.rest.get(Routes.guildBans(this.guild.id), { query: makeURLSearchParams(options), }); return data.reduce((col, ban) => col.set(ban.user.id, this._add(ban, options.cache)), new Collection()); } /** * Options used to ban a user from a guild. * @typedef {Object} BanOptions * @property {number} [deleteMessageDays] Number of days of messages to delete, must be between 0 and 7, inclusive * <warn>This property is deprecated. Use `deleteMessageSeconds` instead.</warn> * @property {number} [deleteMessageSeconds] Number of seconds of messages to delete, * must be between 0 and 604800 (7 days), inclusive * @property {string} [reason] The reason for the ban */ /** * Bans a user from the guild. * @param {UserResolvable} user The user to ban * @param {BanOptions} [options] Options for the ban * @returns {Promise<GuildMember|User|Snowflake>} Result object will be resolved as specifically as possible. * If the GuildMember cannot be resolved, the User will instead be attempted to be resolved. If that also cannot * be resolved, the user id will be the result. * @example * // Ban a user by id (or with a user/guild member object) * guild.bans.create('84484653687267328') * .then(banInfo => console.log(`Banned ${banInfo.user?.tag ?? banInfo.tag ?? banInfo}`)) * .catch(console.error); */ async create(user, options = {}) { if (typeof options !== 'object') throw new DiscordjsTypeError(ErrorCodes.InvalidType, 'options', 'object', true); const id = this.client.users.resolveId(user); if (!id) throw new DiscordjsError(ErrorCodes.BanResolveId, true); if (options.deleteMessageDays !== undefined && !deprecationEmittedForDeleteMessageDays) { process.emitWarning( // eslint-disable-next-line max-len 'The deleteMessageDays option for GuildBanManager#create() is deprecated. Use the deleteMessageSeconds option instead.', 'DeprecationWarning', ); deprecationEmittedForDeleteMessageDays = true; } await this.client.rest.put(Routes.guildBan(this.guild.id, id), { body: { delete_message_seconds: options.deleteMessageSeconds ?? (options.deleteMessageDays ? options.deleteMessageDays * 24 * 60 * 60 : undefined), }, reason: options.reason, }); if (user instanceof GuildMember) return user; const _user = this.client.users.cache.get(id); if (_user) { return this.guild.members.resolve(_user) ?? _user; } return id; } /** * Unbans a user from the guild. * @param {UserResolvable} user The user to unban * @param {string} [reason] Reason for unbanning user * @returns {Promise<?User>} * @example * // Unban a user by id (or with a user/guild member object) * guild.bans.remove('84484653687267328') * .then(user => console.log(`Unbanned ${user.username} from ${guild.name}`)) * .catch(console.error); */ async remove(user, reason) { const id = this.client.users.resolveId(user); if (!id) throw new DiscordjsError(ErrorCodes.BanResolveId); await this.client.rest.delete(Routes.guildBan(this.guild.id, id), { reason }); return this.client.users.resolve(user); } /** * Options used for bulk banning users from a guild. * @typedef {Object} BulkBanOptions * @property {number} [deleteMessageSeconds] Number of seconds of messages to delete, * must be between 0 and 604800 (7 days), inclusive * @property {string} [reason] The reason for the bans */ /** * Result of bulk banning users from a guild. * @typedef {Object} BulkBanResult * @property {Snowflake[]} bannedUsers IDs of the banned users * @property {Snowflake[]} failedUsers IDs of the users that could not be banned or were already banned */ /** * Bulk ban users from a guild, and optionally delete previous messages sent by them. * @param {Collection<Snowflake, UserResolvable>|UserResolvable[]} users The users to ban * @param {BulkBanOptions} [options] The options for bulk banning users * @returns {Promise<BulkBanResult>} Returns an object with `bannedUsers` key containing the IDs of the banned users * and the key `failedUsers` with the IDs that could not be banned or were already banned. * @example * // Bulk ban users by ids (or with user/guild member objects) and delete all their messages from the past 7 days * guild.bans.bulkCreate(['84484653687267328'], { deleteMessageSeconds: 7 * 24 * 60 * 60 }) * .then(result => { * console.log(`Banned ${result.bannedUsers.length} users, failed to ban ${result.failedUsers.length} users.`) * }) * .catch(console.error); */ async bulkCreate(users, options = {}) { if (!users || !(Array.isArray(users) || users instanceof Collection)) { throw new DiscordjsTypeError(ErrorCodes.InvalidType, 'users', 'Array or Collection of UserResolvable', true); } if (typeof options !== 'object') throw new DiscordjsTypeError(ErrorCodes.InvalidType, 'options', 'object', true); const userIds = users.map(user => this.client.users.resolveId(user)); if (userIds.length === 0) throw new DiscordjsError(ErrorCodes.BulkBanUsersOptionEmpty); const result = await this.client.rest.post(Routes.guildBulkBan(this.guild.id), { body: { delete_message_seconds: options.deleteMessageSeconds, user_ids: userIds }, reason: options.reason, }); return { bannedUsers: result.banned_users, failedUsers: result.failed_users }; } } module.exports = GuildBanManager; node_modules/discord.js/src/managers/GuildScheduledEventManager.js 0000664 00000032514 15114741631 0021401 0 ustar 00 'use strict'; const { Collection } = require('@discordjs/collection'); const { makeURLSearchParams } = require('@discordjs/rest'); const { GuildScheduledEventEntityType, Routes } = require('discord-api-types/v10'); const CachedManager = require('./CachedManager'); const { DiscordjsTypeError, DiscordjsError, ErrorCodes } = require('../errors'); const { GuildScheduledEvent } = require('../structures/GuildScheduledEvent'); const { resolveImage } = require('../util/DataResolver'); const { _transformGuildScheduledEventRecurrenceRule } = require('../util/Transformers'); /** * Manages API methods for GuildScheduledEvents and stores their cache. * @extends {CachedManager} */ class GuildScheduledEventManager extends CachedManager { constructor(guild, iterable) { super(guild.client, GuildScheduledEvent, iterable); /** * The guild this manager belongs to * @type {Guild} */ this.guild = guild; } /** * The cache of this manager * @type {Collection<Snowflake, GuildScheduledEvent>} * @name GuildScheduledEventManager#cache */ /** * Data that resolves to give a GuildScheduledEvent object. This can be: * * A Snowflake * * A GuildScheduledEvent object * @typedef {Snowflake|GuildScheduledEvent} GuildScheduledEventResolvable */ /** * Options for setting a recurrence rule for a guild scheduled event. * @typedef {Object} GuildScheduledEventRecurrenceRuleOptions * @property {DateResolvable} startAt The time the recurrence rule interval starts at * @property {GuildScheduledEventRecurrenceRuleFrequency} frequency How often the event occurs * @property {number} interval The spacing between the events * @property {?GuildScheduledEventRecurrenceRuleWeekday[]} byWeekday The days within a week to recur on * @property {?GuildScheduledEventRecurrenceRuleNWeekday[]} byNWeekday The days within a week to recur on * @property {?GuildScheduledEventRecurrenceRuleMonth[]} byMonth The months to recur on * @property {?number[]} byMonthDay The days within a month to recur on */ /** * Options used to create a guild scheduled event. * @typedef {Object} GuildScheduledEventCreateOptions * @property {string} name The name of the guild scheduled event * @property {DateResolvable} scheduledStartTime The time to schedule the event at * @property {DateResolvable} [scheduledEndTime] The time to end the event at * <warn>This is required if `entityType` is {@link GuildScheduledEventEntityType.External}</warn> * @property {GuildScheduledEventPrivacyLevel} privacyLevel The privacy level of the guild scheduled event * @property {GuildScheduledEventEntityType} entityType The scheduled entity type of the event * @property {string} [description] The description of the guild scheduled event * @property {GuildVoiceChannelResolvable} [channel] The channel of the guild scheduled event * <warn>This is required if `entityType` is {@link GuildScheduledEventEntityType.StageInstance} or * {@link GuildScheduledEventEntityType.Voice}</warn> * @property {GuildScheduledEventEntityMetadataOptions} [entityMetadata] The entity metadata of the * guild scheduled event * <warn>This is required if `entityType` is {@link GuildScheduledEventEntityType.External}</warn> * @property {?(BufferResolvable|Base64Resolvable)} [image] The cover image of the guild scheduled event * @property {string} [reason] The reason for creating the guild scheduled event * @property {GuildScheduledEventRecurrenceRuleOptions} [recurrenceRule] * The recurrence rule of the guild scheduled event */ /** * Options used to set entity metadata of a guild scheduled event. * @typedef {Object} GuildScheduledEventEntityMetadataOptions * @property {string} [location] The location of the guild scheduled event * <warn>This is required if `entityType` is {@link GuildScheduledEventEntityType.External}</warn> */ /** * Creates a new guild scheduled event. * @param {GuildScheduledEventCreateOptions} options Options for creating the guild scheduled event * @returns {Promise<GuildScheduledEvent>} */ async create(options) { if (typeof options !== 'object') throw new DiscordjsTypeError(ErrorCodes.InvalidType, 'options', 'object', true); let { privacyLevel, entityType, channel, name, scheduledStartTime, description, scheduledEndTime, entityMetadata, reason, image, recurrenceRule, } = options; let entity_metadata, channel_id; if (entityType === GuildScheduledEventEntityType.External) { channel_id = channel === undefined ? channel : null; entity_metadata = { location: entityMetadata?.location }; } else { channel_id = this.guild.channels.resolveId(channel); if (!channel_id) throw new DiscordjsError(ErrorCodes.GuildVoiceChannelResolve); entity_metadata = entityMetadata === undefined ? entityMetadata : null; } const data = await this.client.rest.post(Routes.guildScheduledEvents(this.guild.id), { body: { channel_id, name, privacy_level: privacyLevel, scheduled_start_time: new Date(scheduledStartTime).toISOString(), scheduled_end_time: scheduledEndTime ? new Date(scheduledEndTime).toISOString() : scheduledEndTime, description, entity_type: entityType, entity_metadata, image: image && (await resolveImage(image)), recurrence_rule: recurrenceRule && _transformGuildScheduledEventRecurrenceRule(recurrenceRule), }, reason, }); return this._add(data); } /** * Options used to fetch a single guild scheduled event from a guild. * @typedef {BaseFetchOptions} FetchGuildScheduledEventOptions * @property {GuildScheduledEventResolvable} guildScheduledEvent The guild scheduled event to fetch * @property {boolean} [withUserCount=true] Whether to fetch the number of users subscribed to the scheduled event */ /** * Options used to fetch multiple guild scheduled events from a guild. * @typedef {Object} FetchGuildScheduledEventsOptions * @property {boolean} [cache] Whether or not to cache the fetched guild scheduled events * @property {boolean} [withUserCount=true] Whether to fetch the number of users subscribed to each scheduled event * should be returned */ /** * Obtains one or more guild scheduled events from Discord, or the guild cache if it's already available. * @param {GuildScheduledEventResolvable|FetchGuildScheduledEventOptions|FetchGuildScheduledEventsOptions} [options] * The id of the guild scheduled event or options * @returns {Promise<GuildScheduledEvent|Collection<Snowflake, GuildScheduledEvent>>} */ async fetch(options = {}) { const id = this.resolveId(options.guildScheduledEvent ?? options); if (id) { if (!options.force) { const existing = this.cache.get(id); if (existing) return existing; } const data = await this.client.rest.get(Routes.guildScheduledEvent(this.guild.id, id), { query: makeURLSearchParams({ with_user_count: options.withUserCount ?? true }), }); return this._add(data, options.cache); } const data = await this.client.rest.get(Routes.guildScheduledEvents(this.guild.id), { query: makeURLSearchParams({ with_user_count: options.withUserCount ?? true }), }); return data.reduce( (coll, rawGuildScheduledEventData) => coll.set(rawGuildScheduledEventData.id, this._add(rawGuildScheduledEventData, options.cache)), new Collection(), ); } /** * Options used to edit a guild scheduled event. * @typedef {Object} GuildScheduledEventEditOptions * @property {string} [name] The name of the guild scheduled event * @property {DateResolvable} [scheduledStartTime] The time to schedule the event at * @property {DateResolvable} [scheduledEndTime] The time to end the event at * @property {GuildScheduledEventPrivacyLevel} [privacyLevel] The privacy level of the guild scheduled event * @property {GuildScheduledEventEntityType} [entityType] The scheduled entity type of the event * @property {string} [description] The description of the guild scheduled event * @property {?GuildVoiceChannelResolvable} [channel] The channel of the guild scheduled event * @property {GuildScheduledEventStatus} [status] The status of the guild scheduled event * @property {GuildScheduledEventEntityMetadataOptions} [entityMetadata] The entity metadata of the * guild scheduled event * <warn>This can be modified only if `entityType` of the `GuildScheduledEvent` to be edited is * {@link GuildScheduledEventEntityType.External}</warn> * @property {?(BufferResolvable|Base64Resolvable)} [image] The cover image of the guild scheduled event * @property {string} [reason] The reason for editing the guild scheduled event * @property {?GuildScheduledEventRecurrenceRuleOptions} [recurrenceRule] * The recurrence rule of the guild scheduled event */ /** * Edits a guild scheduled event. * @param {GuildScheduledEventResolvable} guildScheduledEvent The guild scheduled event to edit * @param {GuildScheduledEventEditOptions} options Options to edit the guild scheduled event * @returns {Promise<GuildScheduledEvent>} */ async edit(guildScheduledEvent, options) { const guildScheduledEventId = this.resolveId(guildScheduledEvent); if (!guildScheduledEventId) throw new DiscordjsError(ErrorCodes.GuildScheduledEventResolve); if (typeof options !== 'object') throw new DiscordjsTypeError(ErrorCodes.InvalidType, 'options', 'object', true); let { privacyLevel, entityType, channel, status, name, scheduledStartTime, description, scheduledEndTime, entityMetadata, reason, image, recurrenceRule, } = options; let entity_metadata; if (entityMetadata) { entity_metadata = { location: entityMetadata.location, }; } const data = await this.client.rest.patch(Routes.guildScheduledEvent(this.guild.id, guildScheduledEventId), { body: { channel_id: channel === undefined ? channel : this.guild.channels.resolveId(channel), name, privacy_level: privacyLevel, scheduled_start_time: scheduledStartTime ? new Date(scheduledStartTime).toISOString() : undefined, scheduled_end_time: scheduledEndTime ? new Date(scheduledEndTime).toISOString() : scheduledEndTime, description, entity_type: entityType, status, image: image && (await resolveImage(image)), entity_metadata, recurrence_rule: recurrenceRule && _transformGuildScheduledEventRecurrenceRule(recurrenceRule), }, reason, }); return this._add(data); } /** * Deletes a guild scheduled event. * @param {GuildScheduledEventResolvable} guildScheduledEvent The guild scheduled event to delete * @returns {Promise<void>} */ async delete(guildScheduledEvent) { const guildScheduledEventId = this.resolveId(guildScheduledEvent); if (!guildScheduledEventId) throw new DiscordjsError(ErrorCodes.GuildScheduledEventResolve); await this.client.rest.delete(Routes.guildScheduledEvent(this.guild.id, guildScheduledEventId)); } /** * Options used to fetch subscribers of a guild scheduled event * @typedef {Object} FetchGuildScheduledEventSubscribersOptions * @property {number} [limit] The maximum numbers of users to fetch * @property {boolean} [withMember] Whether to fetch guild member data of the users * @property {Snowflake} [before] Consider only users before this user id * @property {Snowflake} [after] Consider only users after this user id * <warn>If both `before` and `after` are provided, only `before` is respected</warn> */ /** * Represents a subscriber of a {@link GuildScheduledEvent} * @typedef {Object} GuildScheduledEventUser * @property {Snowflake} guildScheduledEventId The id of the guild scheduled event which the user subscribed to * @property {User} user The user that subscribed to the guild scheduled event * @property {?GuildMember} member The guild member associated with the user, if any */ /** * Fetches subscribers of a guild scheduled event. * @param {GuildScheduledEventResolvable} guildScheduledEvent The guild scheduled event to fetch subscribers of * @param {FetchGuildScheduledEventSubscribersOptions} [options={}] Options for fetching the subscribers * @returns {Promise<Collection<Snowflake, GuildScheduledEventUser>>} */ async fetchSubscribers(guildScheduledEvent, options = {}) { const guildScheduledEventId = this.resolveId(guildScheduledEvent); if (!guildScheduledEventId) throw new DiscordjsError(ErrorCodes.GuildScheduledEventResolve); const query = makeURLSearchParams({ limit: options.limit, with_member: options.withMember, before: options.before, after: options.after, }); const data = await this.client.rest.get(Routes.guildScheduledEventUsers(this.guild.id, guildScheduledEventId), { query, }); return data.reduce( (coll, rawData) => coll.set(rawData.user.id, { guildScheduledEventId: rawData.guild_scheduled_event_id, user: this.client.users._add(rawData.user), member: rawData.member ? this.guild.members._add({ ...rawData.member, user: rawData.user }) : null, }), new Collection(), ); } } module.exports = GuildScheduledEventManager; node_modules/discord.js/src/managers/DMMessageManager.js 0000664 00000000611 15114741631 0017310 0 ustar 00 'use strict'; const MessageManager = require('./MessageManager'); /** * Manages API methods for messages in direct message channels and holds their cache. * @extends {MessageManager} */ class DMMessageManager extends MessageManager { /** * The channel that the messages belong to * @name DMMessageManager#channel * @type {DMChannel} */ } module.exports = DMMessageManager; node_modules/discord.js/src/managers/ThreadManager.js 0000664 00000016453 15114741631 0016725 0 ustar 00 'use strict'; const { Collection } = require('@discordjs/collection'); const { makeURLSearchParams } = require('@discordjs/rest'); const { Routes } = require('discord-api-types/v10'); const CachedManager = require('./CachedManager'); const { DiscordjsTypeError, ErrorCodes } = require('../errors'); const ThreadChannel = require('../structures/ThreadChannel'); const { MakeCacheOverrideSymbol } = require('../util/Symbols'); /** * Manages API methods for thread-based channels and stores their cache. * @extends {CachedManager} */ class ThreadManager extends CachedManager { static [MakeCacheOverrideSymbol] = ThreadManager; constructor(channel, iterable) { super(channel.client, ThreadChannel, iterable); /** * The channel this Manager belongs to * @type {TextChannel|NewsChannel|ForumChannel|MediaChannel} */ this.channel = channel; } /** * Data that can be resolved to a Thread Channel object. This can be: * * A ThreadChannel object * * A Snowflake * @typedef {ThreadChannel|Snowflake} ThreadChannelResolvable */ /** * The cache of this Manager * @type {Collection<Snowflake, ThreadChannel>} * @name ThreadManager#cache */ _add(thread) { const existing = this.cache.get(thread.id); if (existing) return existing; this.cache.set(thread.id, thread); return thread; } /** * Resolves a {@link ThreadChannelResolvable} to a {@link ThreadChannel} object. * @method resolve * @memberof ThreadManager * @instance * @param {ThreadChannelResolvable} thread The ThreadChannel resolvable to resolve * @returns {?ThreadChannel} */ /** * Resolves a {@link ThreadChannelResolvable} to a {@link ThreadChannel} id. * @method resolveId * @memberof ThreadManager * @instance * @param {ThreadChannelResolvable} thread The ThreadChannel resolvable to resolve * @returns {?Snowflake} */ /** * Options for fetching multiple threads. * @typedef {Object} FetchThreadsOptions * @property {FetchArchivedThreadOptions} [archived] Options used to fetch archived threads */ /** * Obtains a thread from Discord, or the channel cache if it's already available. * @param {ThreadChannelResolvable|FetchThreadsOptions} [options] The options to fetch threads. If it is a * ThreadChannelResolvable then the specified thread will be fetched. Fetches all active threads if `undefined` * @param {BaseFetchOptions} [cacheOptions] Additional options for this fetch. <warn>The `force` field gets ignored * if `options` is not a {@link ThreadChannelResolvable}</warn> * @returns {Promise<?(ThreadChannel|FetchedThreads|FetchedThreadsMore)>} * {@link FetchedThreads} if active & {@link FetchedThreadsMore} if archived. * @example * // Fetch a thread by its id * channel.threads.fetch('831955138126104859') * .then(channel => console.log(channel.name)) * .catch(console.error); */ fetch(options, { cache, force } = {}) { if (!options) return this.fetchActive(cache); const channel = this.client.channels.resolveId(options); if (channel) return this.client.channels.fetch(channel, { cache, force }); if (options.archived) { return this.fetchArchived(options.archived, cache); } return this.fetchActive(cache); } /** * Data that can be resolved to a Date object. This can be: * * A Date object * * A number representing a timestamp * * An {@link https://en.wikipedia.org/wiki/ISO_8601 ISO 8601} string * @typedef {Date|number|string} DateResolvable */ /** * The options used to fetch archived threads. * @typedef {Object} FetchArchivedThreadOptions * @property {string} [type='public'] The type of threads to fetch (`public` or `private`) * @property {boolean} [fetchAll=false] Whether to fetch **all** archived threads when `type` is `private` * <info>This property requires the {@link PermissionFlagsBits.ManageThreads} permission if `true`.</info> * @property {DateResolvable|ThreadChannelResolvable} [before] Only return threads that were archived before this Date * or Snowflake * <warn>Must be a {@link ThreadChannelResolvable} when `type` is `private` and `fetchAll` is `false`.</warn> * @property {number} [limit] Maximum number of threads to return */ /** * Data returned from fetching multiple threads. * @typedef {FetchedThreads} FetchedThreadsMore * @property {?boolean} hasMore Whether there are potentially additional threads that require a subsequent call */ /** * Obtains a set of archived threads from Discord. * <info>This method requires the {@link PermissionFlagsBits.ReadMessageHistory} permission * in the parent channel.</info> * @param {FetchArchivedThreadOptions} [options] The options to fetch archived threads * @param {boolean} [cache=true] Whether to cache the new thread objects if they aren't already * @returns {Promise<FetchedThreadsMore>} */ async fetchArchived({ type = 'public', fetchAll = false, before, limit } = {}, cache = true) { let path = Routes.channelThreads(this.channel.id, type); if (type === 'private' && !fetchAll) { path = Routes.channelJoinedArchivedThreads(this.channel.id); } let timestamp; let id; const query = makeURLSearchParams({ limit }); if (before !== undefined) { if (before instanceof ThreadChannel || /^\d{17,19}$/.test(String(before))) { id = this.resolveId(before); timestamp = this.resolve(before)?.archivedAt?.toISOString(); const toUse = type === 'private' && !fetchAll ? id : timestamp; if (toUse) { query.set('before', toUse); } } else { try { timestamp = new Date(before).toISOString(); if (type === 'public' || fetchAll) { query.set('before', timestamp); } } catch { throw new DiscordjsTypeError(ErrorCodes.InvalidType, 'before', 'DateResolvable or ThreadChannelResolvable'); } } } const raw = await this.client.rest.get(path, { query }); return this.constructor._mapThreads(raw, this.client, { parent: this.channel, cache }); } /** * Obtains all active threads in the channel. * @param {boolean} [cache=true] Whether to cache the fetched data * @returns {Promise<FetchedThreads>} */ async fetchActive(cache = true) { const data = await this.channel.guild.channels.rawFetchGuildActiveThreads(); return this.constructor._mapThreads(data, this.client, { parent: this.channel, cache }); } static _mapThreads(rawThreads, client, { parent, guild, cache }) { const threads = rawThreads.threads.reduce((coll, raw) => { const thread = client.channels._add(raw, guild ?? parent?.guild, { cache }); if (parent && thread.parentId !== parent.id) return coll; return coll.set(thread.id, thread); }, new Collection()); // Discord sends the thread id as id in this object const threadMembers = rawThreads.members.reduce((coll, raw) => { const thread = threads.get(raw.id); return thread ? coll.set(raw.user_id, thread.members._add(raw)) : coll; }, new Collection()); const response = { threads, members: threadMembers }; // The GET `/guilds/{guild.id}/threads/active` route does not return `has_more`. if ('has_more' in rawThreads) response.hasMore = rawThreads.has_more; return response; } } module.exports = ThreadManager; node_modules/discord.js/src/managers/AutoModerationRuleManager.js 0000664 00000030272 15114741631 0021273 0 ustar 00 'use strict'; const { Collection } = require('@discordjs/collection'); const { Routes } = require('discord-api-types/v10'); const CachedManager = require('./CachedManager'); const AutoModerationRule = require('../structures/AutoModerationRule'); /** * Manages API methods for auto moderation rules and stores their cache. * @extends {CachedManager} */ class AutoModerationRuleManager extends CachedManager { constructor(guild, iterable) { super(guild.client, AutoModerationRule, iterable); /** * The guild this manager belongs to. * @type {Guild} */ this.guild = guild; } /** * The cache of this manager * @type {Collection<Snowflake, AutoModerationRule>} * @name AutoModerationRuleManager#cache */ /** * Resolves an {@link AutoModerationRuleResolvable} to an {@link AutoModerationRule} object. * @method resolve * @memberof AutoModerationRuleManager * @instance * @param {AutoModerationRuleResolvable} autoModerationRule The AutoModerationRule resolvable to resolve * @returns {?AutoModerationRule} */ /** * Resolves an {@link AutoModerationRuleResolvable} to a {@link AutoModerationRule} id. * @method resolveId * @memberof AutoModerationRuleManager * @instance * @param {AutoModerationRuleResolvable} autoModerationRule The AutoModerationRule resolvable to resolve * @returns {?Snowflake} */ _add(data, cache) { return super._add(data, cache, { extras: [this.guild] }); } /** * Options used to set the trigger metadata of an auto moderation rule. * @typedef {Object} AutoModerationTriggerMetadataOptions * @property {string[]} [keywordFilter] The substrings that will be searched for in the content * @property {string[]} [regexPatterns] The regular expression patterns which will be matched against the content * <info>Only Rust-flavored regular expressions are supported.</info> * @property {AutoModerationRuleKeywordPresetType[]} [presets] * The internally pre-defined wordsets which will be searched for in the content * @property {string[]} [allowList] The substrings that will be exempt from triggering * {@link AutoModerationRuleTriggerType.Keyword}, * {@link AutoModerationRuleTriggerType.KeywordPreset}, * and {@link AutoModerationRuleTriggerType.MemberProfile} * @property {?number} [mentionTotalLimit] The total number of role & user mentions allowed per message * @property {boolean} [mentionRaidProtectionEnabled] Whether to automatically detect mention raids */ /** * Options used to set the actions of an auto moderation rule. * @typedef {Object} AutoModerationActionOptions * @property {AutoModerationActionType} type The type of this auto moderation rule action * @property {AutoModerationActionMetadataOptions} [metadata] Additional metadata needed during execution * <info>This property is required if using a `type` of * {@link AutoModerationActionType.SendAlertMessage} or {@link AutoModerationActionType.Timeout}.</info> */ /** * Options used to set the metadata of an auto moderation rule action. * @typedef {Object} AutoModerationActionMetadataOptions * @property {GuildTextChannelResolvable|ThreadChannel} [channel] The channel to which content will be logged * @property {number} [durationSeconds] The timeout duration in seconds * @property {string} [customMessage] The custom message that is shown whenever a message is blocked */ /** * Options used to create an auto moderation rule. * @typedef {Object} AutoModerationRuleCreateOptions * @property {string} name The name of the auto moderation rule * @property {AutoModerationRuleEventType} eventType The event type of the auto moderation rule * @property {AutoModerationRuleTriggerType} triggerType The trigger type of the auto moderation rule * @property {AutoModerationTriggerMetadataOptions} [triggerMetadata] The trigger metadata of the auto moderation rule * <info>This property is required if using a `triggerType` of * {@link AutoModerationRuleTriggerType.Keyword}, * {@link AutoModerationRuleTriggerType.KeywordPreset}, * {@link AutoModerationRuleTriggerType.MentionSpam}, * or {@link AutoModerationRuleTriggerType.MemberProfile}.</info> * @property {AutoModerationActionOptions[]} actions * The actions that will execute when the auto moderation rule is triggered * @property {boolean} [enabled] Whether the auto moderation rule should be enabled * @property {Collection<Snowflake, Role>|RoleResolvable[]} [exemptRoles] * The roles that should not be affected by the auto moderation rule * @property {Collection<Snowflake, GuildChannel|ThreadChannel>|GuildChannelResolvable[]} [exemptChannels] * The channels that should not be affected by the auto moderation rule * @property {string} [reason] The reason for creating the auto moderation rule */ /** * Creates a new auto moderation rule. * @param {AutoModerationRuleCreateOptions} options Options for creating the auto moderation rule * @returns {Promise<AutoModerationRule>} */ async create({ name, eventType, triggerType, triggerMetadata, actions, enabled, exemptRoles, exemptChannels, reason, }) { const data = await this.client.rest.post(Routes.guildAutoModerationRules(this.guild.id), { body: { name, event_type: eventType, trigger_type: triggerType, trigger_metadata: triggerMetadata && { keyword_filter: triggerMetadata.keywordFilter, regex_patterns: triggerMetadata.regexPatterns, presets: triggerMetadata.presets, allow_list: triggerMetadata.allowList, mention_total_limit: triggerMetadata.mentionTotalLimit, mention_raid_protection_enabled: triggerMetadata.mentionRaidProtectionEnabled, }, actions: actions.map(action => ({ type: action.type, metadata: { duration_seconds: action.metadata?.durationSeconds, channel_id: action.metadata?.channel && this.guild.channels.resolveId(action.metadata.channel), custom_message: action.metadata?.customMessage, }, })), enabled, exempt_roles: exemptRoles?.map(exemptRole => this.guild.roles.resolveId(exemptRole)), exempt_channels: exemptChannels?.map(exemptChannel => this.guild.channels.resolveId(exemptChannel)), }, reason, }); return this._add(data); } /** * Options used to edit an auto moderation rule. * @typedef {Object} AutoModerationRuleEditOptions * @property {string} [name] The name of the auto moderation rule * @property {AutoModerationRuleEventType} [eventType] The event type of the auto moderation rule * @property {AutoModerationTriggerMetadataOptions} [triggerMetadata] The trigger metadata of the auto moderation rule * @property {AutoModerationActionOptions[]} [actions] * The actions that will execute when the auto moderation rule is triggered * @property {boolean} [enabled] Whether the auto moderation rule should be enabled * @property {Collection<Snowflake, Role>|RoleResolvable[]} [exemptRoles] * The roles that should not be affected by the auto moderation rule * @property {Collection<Snowflake, GuildChannel|ThreadChannel>|GuildChannelResolvable[]} [exemptChannels] * The channels that should not be affected by the auto moderation rule * @property {string} [reason] The reason for creating the auto moderation rule */ /** * Edits an auto moderation rule. * @param {AutoModerationRuleResolvable} autoModerationRule The auto moderation rule to edit * @param {AutoModerationRuleEditOptions} options Options for editing the auto moderation rule * @returns {Promise<AutoModerationRule>} */ async edit( autoModerationRule, { name, eventType, triggerMetadata, actions, enabled, exemptRoles, exemptChannels, reason }, ) { const autoModerationRuleId = this.resolveId(autoModerationRule); const data = await this.client.rest.patch(Routes.guildAutoModerationRule(this.guild.id, autoModerationRuleId), { body: { name, event_type: eventType, trigger_metadata: triggerMetadata && { keyword_filter: triggerMetadata.keywordFilter, regex_patterns: triggerMetadata.regexPatterns, presets: triggerMetadata.presets, allow_list: triggerMetadata.allowList, mention_total_limit: triggerMetadata.mentionTotalLimit, mention_raid_protection_enabled: triggerMetadata.mentionRaidProtectionEnabled, }, actions: actions?.map(action => ({ type: action.type, metadata: { duration_seconds: action.metadata?.durationSeconds, channel_id: action.metadata?.channel && this.guild.channels.resolveId(action.metadata.channel), custom_message: action.metadata?.customMessage, }, })), enabled, exempt_roles: exemptRoles?.map(exemptRole => this.guild.roles.resolveId(exemptRole)), exempt_channels: exemptChannels?.map(exemptChannel => this.guild.channels.resolveId(exemptChannel)), }, reason, }); return this._add(data); } /** * Data that can be resolved to give an AutoModerationRule object. This can be: * * An AutoModerationRule * * A Snowflake * @typedef {AutoModerationRule|Snowflake} AutoModerationRuleResolvable */ /** * Options used to fetch a single auto moderation rule from a guild. * @typedef {BaseFetchOptions} FetchAutoModerationRuleOptions * @property {AutoModerationRuleResolvable} autoModerationRule The auto moderation rule to fetch */ /** * Options used to fetch all auto moderation rules from a guild. * @typedef {Object} FetchAutoModerationRulesOptions * @property {boolean} [cache] Whether to cache the fetched auto moderation rules */ /** * Fetches auto moderation rules from Discord. * @param {AutoModerationRuleResolvable|FetchAutoModerationRuleOptions|FetchAutoModerationRulesOptions} [options] * Options for fetching auto moderation rule(s) * @returns {Promise<AutoModerationRule|Collection<Snowflake, AutoModerationRule>>} * @example * // Fetch all auto moderation rules from a guild without caching * guild.autoModerationRules.fetch({ cache: false }) * .then(console.log) * .catch(console.error); * @example * // Fetch a single auto moderation rule * guild.autoModerationRules.fetch('979083472868098119') * .then(console.log) * .catch(console.error); * @example * // Fetch a single auto moderation rule without checking cache and without caching * guild.autoModerationRules.fetch({ autoModerationRule: '979083472868098119', cache: false, force: true }) * .then(console.log) * .catch(console.error) */ fetch(options) { if (!options) return this._fetchMany(); const { autoModerationRule, cache, force } = options; const resolvedAutoModerationRule = this.resolveId(autoModerationRule ?? options); if (resolvedAutoModerationRule) { return this._fetchSingle({ autoModerationRule: resolvedAutoModerationRule, cache, force }); } return this._fetchMany(options); } async _fetchSingle({ autoModerationRule, cache, force = false }) { if (!force) { const existing = this.cache.get(autoModerationRule); if (existing) return existing; } const data = await this.client.rest.get(Routes.guildAutoModerationRule(this.guild.id, autoModerationRule)); return this._add(data, cache); } async _fetchMany(options = {}) { const data = await this.client.rest.get(Routes.guildAutoModerationRules(this.guild.id)); return data.reduce( (col, autoModerationRule) => col.set(autoModerationRule.id, this._add(autoModerationRule, options.cache)), new Collection(), ); } /** * Deletes an auto moderation rule. * @param {AutoModerationRuleResolvable} autoModerationRule The auto moderation rule to delete * @param {string} [reason] The reason for deleting the auto moderation rule * @returns {Promise<void>} */ async delete(autoModerationRule, reason) { const autoModerationRuleId = this.resolveId(autoModerationRule); await this.client.rest.delete(Routes.guildAutoModerationRule(this.guild.id, autoModerationRuleId), { reason }); } } module.exports = AutoModerationRuleManager; node_modules/discord.js/src/util/WebSocketShardEvents.js 0000664 00000001056 15114741631 0017431 0 ustar 00 'use strict'; /** * @typedef {Object} WebSocketShardEvents * @property {string} Close close * @property {string} Destroyed destroyed * @property {string} InvalidSession invalidSession * @property {string} Ready ready * @property {string} Resumed resumed * @property {string} AllReady allReady */ // JSDoc for IntelliSense purposes /** * @type {WebSocketShardEvents} * @ignore */ module.exports = { Close: 'close', Destroyed: 'destroyed', InvalidSession: 'invalidSession', Ready: 'ready', Resumed: 'resumed', AllReady: 'allReady', }; node_modules/discord.js/src/util/DataResolver.js 0000664 00000010235 15114741631 0015766 0 ustar 00 'use strict'; const { Buffer } = require('node:buffer'); const fs = require('node:fs/promises'); const path = require('node:path'); const { fetch } = require('undici'); const { DiscordjsError, DiscordjsTypeError, ErrorCodes } = require('../errors'); const Invite = require('../structures/Invite'); /** * Data that can be resolved to give an invite code. This can be: * * An invite code * * An invite URL * @typedef {string} InviteResolvable */ /** * Data that can be resolved to give a template code. This can be: * * A template code * * A template URL * @typedef {string} GuildTemplateResolvable */ /** * Resolves the string to a code based on the passed regex. * @param {string} data The string to resolve * @param {RegExp} regex The RegExp used to extract the code * @returns {string} * @private */ function resolveCode(data, regex) { return regex.exec(data)?.[1] ?? data; } /** * Resolves InviteResolvable to an invite code. * @param {InviteResolvable} data The invite resolvable to resolve * @returns {string} * @private */ function resolveInviteCode(data) { return resolveCode(data, Invite.InvitesPattern); } /** * Resolves GuildTemplateResolvable to a template code. * @param {GuildTemplateResolvable} data The template resolvable to resolve * @returns {string} * @private */ function resolveGuildTemplateCode(data) { const GuildTemplate = require('../structures/GuildTemplate'); return resolveCode(data, GuildTemplate.GuildTemplatesPattern); } /** * Data that can be resolved to give a Buffer. This can be: * * A Buffer * * The path to a local file * * A URL <warn>When provided a URL, discord.js will fetch the URL internally in order to create a Buffer. * This can pose a security risk when the URL has not been sanitized</warn> * @typedef {string|Buffer} BufferResolvable */ /** * @external Stream * @see {@link https://nodejs.org/api/stream.html} */ /** * @typedef {Object} ResolvedFile * @property {Buffer} data Buffer containing the file data * @property {string} [contentType] Content-Type of the file * @private */ /** * Resolves a BufferResolvable to a Buffer. * @param {BufferResolvable|Stream} resource The buffer or stream resolvable to resolve * @returns {Promise<ResolvedFile>} * @private */ async function resolveFile(resource) { if (Buffer.isBuffer(resource)) return { data: resource }; if (typeof resource[Symbol.asyncIterator] === 'function') { const buffers = []; for await (const data of resource) buffers.push(Buffer.from(data)); return { data: Buffer.concat(buffers) }; } if (typeof resource === 'string') { if (/^https?:\/\//.test(resource)) { const res = await fetch(resource); return { data: Buffer.from(await res.arrayBuffer()), contentType: res.headers.get('content-type') }; } const file = path.resolve(resource); const stats = await fs.stat(file); if (!stats.isFile()) throw new DiscordjsError(ErrorCodes.FileNotFound, file); return { data: await fs.readFile(file) }; } throw new DiscordjsTypeError(ErrorCodes.ReqResourceType); } /** * Data that resolves to give a Base64 string, typically for image uploading. This can be: * * A Buffer * * A base64 string * @typedef {Buffer|string} Base64Resolvable */ /** * Resolves a Base64Resolvable to a Base 64 string. * @param {Base64Resolvable} data The base 64 resolvable you want to resolve * @param {string} [contentType='image/jpg'] The content type of the data * @returns {?string} * @private */ function resolveBase64(data, contentType = 'image/jpg') { if (Buffer.isBuffer(data)) return `data:${contentType};base64,${data.toString('base64')}`; return data; } /** * Resolves a Base64Resolvable, a string, or a BufferResolvable to a Base 64 image. * @param {BufferResolvable|Base64Resolvable} image The image to be resolved * @returns {Promise<?string>} * @private */ async function resolveImage(image) { if (!image) return null; if (typeof image === 'string' && image.startsWith('data:')) { return image; } const file = await resolveFile(image); return resolveBase64(file.data); } module.exports = { resolveCode, resolveInviteCode, resolveGuildTemplateCode, resolveImage, resolveBase64, resolveFile }; node_modules/discord.js/src/util/RoleFlagsBitField.js 0000664 00000001103 15114741631 0016646 0 ustar 00 'use strict'; const { RoleFlags } = require('discord-api-types/v10'); const BitField = require('./BitField'); /** * Data structure that makes it easy to interact with a {@link Role#flags} bitfield. * @extends {BitField} */ class RoleFlagsBitField extends BitField { /** * Numeric role flags. * @type {RoleFlags} * @memberof RoleFlagsBitField */ static Flags = RoleFlags; } /** * @name RoleFlagsBitField * @kind constructor * @memberof RoleFlagsBitField * @param {BitFieldResolvable} [bits=0] Bit(s) to read from */ module.exports = RoleFlagsBitField; node_modules/discord.js/src/util/SystemChannelFlagsBitField.js 0000664 00000002463 15114741631 0020534 0 ustar 00 'use strict'; const { GuildSystemChannelFlags } = require('discord-api-types/v10'); const BitField = require('./BitField'); /** * Data structure that makes it easy to interact with a {@link Guild#systemChannelFlags} bitfield. * <info>Note that all event message types are enabled by default, * and by setting their corresponding flags you are disabling them</info> * @extends {BitField} */ class SystemChannelFlagsBitField extends BitField { /** * Numeric system channel flags. * @type {GuildSystemChannelFlags} * @memberof SystemChannelFlagsBitField */ static Flags = GuildSystemChannelFlags; } /** * @name SystemChannelFlagsBitField * @kind constructor * @memberof SystemChannelFlagsBitField * @param {SystemChannelFlagsResolvable} [bits=0] Bit(s) to read from */ /** * Bitfield of the packed bits * @type {number} * @name SystemChannelFlagsBitField#bitfield */ /** * Data that can be resolved to give a system channel flag bitfield. This can be: * * A string (see {@link SystemChannelFlagsBitField.Flags}) * * A system channel flag * * An instance of SystemChannelFlagsBitField * * An Array of SystemChannelFlagsResolvable * @typedef {string|number|SystemChannelFlagsBitField|SystemChannelFlagsResolvable[]} SystemChannelFlagsResolvable */ module.exports = SystemChannelFlagsBitField; node_modules/discord.js/src/util/IntentsBitField.js 0000664 00000001563 15114741631 0016426 0 ustar 00 'use strict'; const { GatewayIntentBits } = require('discord-api-types/v10'); const BitField = require('./BitField'); /** * Data structure that makes it easy to calculate intents. * @extends {BitField} */ class IntentsBitField extends BitField { /** * Numeric WebSocket intents * @type {GatewayIntentBits} * @memberof IntentsBitField */ static Flags = GatewayIntentBits; } /** * @name IntentsBitField * @kind constructor * @memberof IntentsBitField * @param {IntentsResolvable} [bits=0] Bit(s) to read from */ /** * Data that can be resolved to give a permission number. This can be: * * A string (see {@link IntentsBitField.Flags}) * * An intents flag * * An instance of {@link IntentsBitField} * * An array of IntentsResolvable * @typedef {string|number|IntentsBitField|IntentsResolvable[]} IntentsResolvable */ module.exports = IntentsBitField; node_modules/discord.js/src/util/ThreadMemberFlagsBitField.js 0000664 00000001353 15114741631 0020313 0 ustar 00 'use strict'; const BitField = require('./BitField'); /** * Data structure that makes it easy to interact with a {@link ThreadMember#flags} bitfield. * @extends {BitField} */ class ThreadMemberFlagsBitField extends BitField { /** * Numeric thread member flags. There are currently no bitflags relevant to bots for this. * @type {Object<string, number>} * @memberof ThreadMemberFlagsBitField */ static Flags = {}; } /** * @name ThreadMemberFlagsBitField * @kind constructor * @memberof ThreadMemberFlagsBitField * @param {BitFieldResolvable} [bits=0] Bit(s) to read from */ /** * Bitfield of the packed bits * @type {number} * @name ThreadMemberFlagsBitField#bitfield */ module.exports = ThreadMemberFlagsBitField; node_modules/discord.js/src/util/ShardEvents.js 0000664 00000001170 15114741631 0015617 0 ustar 00 'use strict'; /** * @typedef {Object} ShardEvents * @property {string} Death death * @property {string} Disconnect disconnect * @property {string} Error error * @property {string} Message message * @property {string} Ready ready * @property {string} Reconnecting reconnecting * @property {string} Resume resume * @property {string} Spawn spawn */ // JSDoc for IntelliSense purposes /** * @type {ShardEvents} * @ignore */ module.exports = { Death: 'death', Disconnect: 'disconnect', Error: 'error', Message: 'message', Ready: 'ready', Reconnecting: 'reconnecting', Resume: 'resume', Spawn: 'spawn', }; node_modules/discord.js/src/util/LimitedCollection.js 0000664 00000004156 15114741631 0017003 0 ustar 00 'use strict'; const { Collection } = require('@discordjs/collection'); const { DiscordjsTypeError, ErrorCodes } = require('../errors'); /** * Options for defining the behavior of a LimitedCollection * @typedef {Object} LimitedCollectionOptions * @property {?number} [maxSize=Infinity] The maximum size of the Collection * @property {?Function} [keepOverLimit=null] A function, which is passed the value and key of an entry, ran to decide * to keep an entry past the maximum size */ /** * A Collection which holds a max amount of entries. * @extends {Collection} * @param {LimitedCollectionOptions} [options={}] Options for constructing the Collection. * @param {Iterable} [iterable=null] Optional entries passed to the Map constructor. */ class LimitedCollection extends Collection { constructor(options = {}, iterable) { if (typeof options !== 'object' || options === null) { throw new DiscordjsTypeError(ErrorCodes.InvalidType, 'options', 'object', true); } const { maxSize = Infinity, keepOverLimit = null } = options; if (typeof maxSize !== 'number') { throw new DiscordjsTypeError(ErrorCodes.InvalidType, 'maxSize', 'number'); } if (keepOverLimit !== null && typeof keepOverLimit !== 'function') { throw new DiscordjsTypeError(ErrorCodes.InvalidType, 'keepOverLimit', 'function'); } super(iterable); /** * The max size of the Collection. * @type {number} */ this.maxSize = maxSize; /** * A function called to check if an entry should be kept when the Collection is at max size. * @type {?Function} */ this.keepOverLimit = keepOverLimit; } set(key, value) { if (this.maxSize === 0 && !this.keepOverLimit?.(value, key, this)) return this; if (this.size >= this.maxSize && !this.has(key)) { for (const [k, v] of this.entries()) { const keep = this.keepOverLimit?.(v, k, this) ?? false; if (!keep) { this.delete(k); break; } } } return super.set(key, value); } static get [Symbol.species]() { return Collection; } } module.exports = LimitedCollection; node_modules/discord.js/src/util/UserFlagsBitField.js 0000664 00000001241 15114741631 0016666 0 ustar 00 'use strict'; const { UserFlags } = require('discord-api-types/v10'); const BitField = require('./BitField'); /** * Data structure that makes it easy to interact with a {@link User#flags} bitfield. * @extends {BitField} */ class UserFlagsBitField extends BitField { /** * Numeric user flags. * @type {UserFlags} * @memberof UserFlagsBitField */ static Flags = UserFlags; } /** * @name UserFlagsBitField * @kind constructor * @memberof UserFlagsBitField * @param {BitFieldResolvable} [bits=0] Bit(s) to read from */ /** * Bitfield of the packed bits * @type {number} * @name UserFlagsBitField#bitfield */ module.exports = UserFlagsBitField; node_modules/discord.js/src/util/BitField.js 0000664 00000011715 15114741631 0015061 0 ustar 00 'use strict'; const { DiscordjsRangeError, ErrorCodes } = require('../errors'); /** * Data structure that makes it easy to interact with a bitfield. */ class BitField { /** * Numeric bitfield flags. * <info>Defined in extension classes</info> * @type {Object} * @memberof BitField * @abstract */ static Flags = {}; /** * @type {number|bigint} * @memberof BitField * @private */ static DefaultBit = 0; /** * @param {BitFieldResolvable} [bits=this.constructor.DefaultBit] Bit(s) to read from */ constructor(bits = this.constructor.DefaultBit) { /** * Bitfield of the packed bits * @type {number|bigint} */ this.bitfield = this.constructor.resolve(bits); } /** * Checks whether the bitfield has a bit, or any of multiple bits. * @param {BitFieldResolvable} bit Bit(s) to check for * @returns {boolean} */ any(bit) { return (this.bitfield & this.constructor.resolve(bit)) !== this.constructor.DefaultBit; } /** * Checks if this bitfield equals another * @param {BitFieldResolvable} bit Bit(s) to check for * @returns {boolean} */ equals(bit) { return this.bitfield === this.constructor.resolve(bit); } /** * Checks whether the bitfield has a bit, or multiple bits. * @param {BitFieldResolvable} bit Bit(s) to check for * @returns {boolean} */ has(bit) { bit = this.constructor.resolve(bit); return (this.bitfield & bit) === bit; } /** * Gets all given bits that are missing from the bitfield. * @param {BitFieldResolvable} bits Bit(s) to check for * @param {...*} hasParams Additional parameters for the has method, if any * @returns {string[]} */ missing(bits, ...hasParams) { return new this.constructor(bits).remove(this).toArray(...hasParams); } /** * Freezes these bits, making them immutable. * @returns {Readonly<BitField>} */ freeze() { return Object.freeze(this); } /** * Adds bits to these ones. * @param {...BitFieldResolvable} [bits] Bits to add * @returns {BitField} These bits or new BitField if the instance is frozen. */ add(...bits) { let total = this.constructor.DefaultBit; for (const bit of bits) { total |= this.constructor.resolve(bit); } if (Object.isFrozen(this)) return new this.constructor(this.bitfield | total); this.bitfield |= total; return this; } /** * Removes bits from these. * @param {...BitFieldResolvable} [bits] Bits to remove * @returns {BitField} These bits or new BitField if the instance is frozen. */ remove(...bits) { let total = this.constructor.DefaultBit; for (const bit of bits) { total |= this.constructor.resolve(bit); } if (Object.isFrozen(this)) return new this.constructor(this.bitfield & ~total); this.bitfield &= ~total; return this; } /** * Gets an object mapping field names to a {@link boolean} indicating whether the * bit is available. * @param {...*} hasParams Additional parameters for the has method, if any * @returns {Object} */ serialize(...hasParams) { const serialized = {}; for (const [flag, bit] of Object.entries(this.constructor.Flags)) { if (isNaN(flag)) serialized[flag] = this.has(bit, ...hasParams); } return serialized; } /** * Gets an {@link Array} of bitfield names based on the bits available. * @param {...*} hasParams Additional parameters for the has method, if any * @returns {string[]} */ toArray(...hasParams) { return [...this[Symbol.iterator](...hasParams)]; } toJSON() { return typeof this.bitfield === 'number' ? this.bitfield : this.bitfield.toString(); } valueOf() { return this.bitfield; } *[Symbol.iterator](...hasParams) { for (const bitName of Object.keys(this.constructor.Flags)) { if (isNaN(bitName) && this.has(bitName, ...hasParams)) yield bitName; } } /** * Data that can be resolved to give a bitfield. This can be: * * A bit number (this can be a number literal or a value taken from {@link BitField.Flags}) * * A string bit number * * An instance of BitField * * An Array of BitFieldResolvable * @typedef {number|string|bigint|BitField|BitFieldResolvable[]} BitFieldResolvable */ /** * Resolves bitfields to their numeric form. * @param {BitFieldResolvable} [bit] bit(s) to resolve * @returns {number|bigint} */ static resolve(bit) { const { DefaultBit } = this; if (typeof DefaultBit === typeof bit && bit >= DefaultBit) return bit; if (bit instanceof BitField) return bit.bitfield; if (Array.isArray(bit)) { return bit.map(bit_ => this.resolve(bit_)).reduce((prev, bit_) => prev | bit_, DefaultBit); } if (typeof bit === 'string') { if (!isNaN(bit)) return typeof DefaultBit === 'bigint' ? BigInt(bit) : Number(bit); if (this.Flags[bit] !== undefined) return this.Flags[bit]; } throw new DiscordjsRangeError(ErrorCodes.BitFieldInvalid, bit); } } module.exports = BitField; node_modules/discord.js/src/util/Enums.js 0000664 00000000356 15114741631 0014465 0 ustar 00 'use strict'; function createEnum(keys) { const obj = {}; for (const [index, key] of keys.entries()) { if (key === null) continue; obj[key] = index; obj[index] = key; } return obj; } module.exports = { createEnum }; node_modules/discord.js/src/util/Events.js 0000664 00000021234 15114741631 0014640 0 ustar 00 'use strict'; /** * @typedef {Object} Events * @property {string} ApplicationCommandPermissionsUpdate applicationCommandPermissionsUpdate * @property {string} AutoModerationActionExecution autoModerationActionExecution * @property {string} AutoModerationRuleCreate autoModerationRuleCreate * @property {string} AutoModerationRuleDelete autoModerationRuleDelete * @property {string} AutoModerationRuleUpdate autoModerationRuleUpdate * @property {string} CacheSweep cacheSweep * @property {string} ChannelCreate channelCreate * @property {string} ChannelDelete channelDelete * @property {string} ChannelPinsUpdate channelPinsUpdate * @property {string} ChannelUpdate channelUpdate * @property {string} ClientReady ready * @property {string} Debug debug * @property {string} EntitlementCreate entitlementCreate * @property {string} EntitlementUpdate entitlementUpdate * @property {string} EntitlementDelete entitlementDelete * @property {string} Error error * @property {string} GuildAuditLogEntryCreate guildAuditLogEntryCreate * @property {string} GuildAvailable guildAvailable * @property {string} GuildBanAdd guildBanAdd * @property {string} GuildBanRemove guildBanRemove * @property {string} GuildCreate guildCreate * @property {string} GuildDelete guildDelete * @property {string} GuildEmojiCreate emojiCreate * @property {string} GuildEmojiDelete emojiDelete * @property {string} GuildEmojiUpdate emojiUpdate * @property {string} GuildIntegrationsUpdate guildIntegrationsUpdate * @property {string} GuildMemberAdd guildMemberAdd * @property {string} GuildMemberAvailable guildMemberAvailable * @property {string} GuildMemberRemove guildMemberRemove * @property {string} GuildMembersChunk guildMembersChunk * @property {string} GuildMemberUpdate guildMemberUpdate * @property {string} GuildRoleCreate roleCreate * @property {string} GuildRoleDelete roleDelete * @property {string} GuildRoleUpdate roleUpdate * @property {string} GuildScheduledEventCreate guildScheduledEventCreate * @property {string} GuildScheduledEventDelete guildScheduledEventDelete * @property {string} GuildScheduledEventUpdate guildScheduledEventUpdate * @property {string} GuildScheduledEventUserAdd guildScheduledEventUserAdd * @property {string} GuildScheduledEventUserRemove guildScheduledEventUserRemove * @property {string} GuildSoundboardSoundCreate guildSoundboardSoundCreate * @property {string} GuildSoundboardSoundDelete guildSoundboardSoundDelete * @property {string} GuildSoundboardSoundsUpdate guildSoundboardSoundsUpdate * @property {string} GuildSoundboardSoundUpdate guildSoundboardSoundUpdate * @property {string} GuildStickerCreate stickerCreate * @property {string} GuildStickerDelete stickerDelete * @property {string} GuildStickerUpdate stickerUpdate * @property {string} GuildUnavailable guildUnavailable * @property {string} GuildUpdate guildUpdate * @property {string} InteractionCreate interactionCreate * @property {string} Invalidated invalidated * @property {string} InviteCreate inviteCreate * @property {string} InviteDelete inviteDelete * @property {string} MessageBulkDelete messageDeleteBulk * @property {string} MessageCreate messageCreate * @property {string} MessageDelete messageDelete * @property {string} MessagePollVoteAdd messagePollVoteAdd * @property {string} MessagePollVoteRemove messagePollVoteRemove * @property {string} MessageReactionAdd messageReactionAdd * @property {string} MessageReactionRemove messageReactionRemove * @property {string} MessageReactionRemoveAll messageReactionRemoveAll * @property {string} MessageReactionRemoveEmoji messageReactionRemoveEmoji * @property {string} MessageUpdate messageUpdate * @property {string} PresenceUpdate presenceUpdate * @property {string} SoundboardSounds soundboardSounds * @property {string} ShardDisconnect shardDisconnect * @property {string} ShardError shardError * @property {string} ShardReady shardReady * @property {string} ShardReconnecting shardReconnecting * @property {string} ShardResume shardResume * @property {string} StageInstanceCreate stageInstanceCreate * @property {string} StageInstanceDelete stageInstanceDelete * @property {string} StageInstanceUpdate stageInstanceUpdate * @property {string} SubscriptionCreate subscriptionCreate * @property {string} SubscriptionUpdate subscriptionUpdate * @property {string} SubscriptionDelete subscriptionDelete * @property {string} ThreadCreate threadCreate * @property {string} ThreadDelete threadDelete * @property {string} ThreadListSync threadListSync * @property {string} ThreadMembersUpdate threadMembersUpdate * @property {string} ThreadMemberUpdate threadMemberUpdate * @property {string} ThreadUpdate threadUpdate * @property {string} TypingStart typingStart * @property {string} UserUpdate userUpdate * @property {string} VoiceChannelEffectSend voiceChannelEffectSend * @property {string} VoiceServerUpdate voiceServerUpdate * @property {string} VoiceStateUpdate voiceStateUpdate * @property {string} Warn warn * @property {string} WebhooksUpdate webhookUpdate */ // JSDoc for IntelliSense purposes /** * @type {Events} * @ignore */ module.exports = { ApplicationCommandPermissionsUpdate: 'applicationCommandPermissionsUpdate', AutoModerationActionExecution: 'autoModerationActionExecution', AutoModerationRuleCreate: 'autoModerationRuleCreate', AutoModerationRuleDelete: 'autoModerationRuleDelete', AutoModerationRuleUpdate: 'autoModerationRuleUpdate', CacheSweep: 'cacheSweep', ChannelCreate: 'channelCreate', ChannelDelete: 'channelDelete', ChannelPinsUpdate: 'channelPinsUpdate', ChannelUpdate: 'channelUpdate', ClientReady: 'ready', Debug: 'debug', EntitlementCreate: 'entitlementCreate', EntitlementUpdate: 'entitlementUpdate', EntitlementDelete: 'entitlementDelete', Error: 'error', GuildAuditLogEntryCreate: 'guildAuditLogEntryCreate', GuildAvailable: 'guildAvailable', GuildBanAdd: 'guildBanAdd', GuildBanRemove: 'guildBanRemove', GuildCreate: 'guildCreate', GuildDelete: 'guildDelete', GuildEmojiCreate: 'emojiCreate', GuildEmojiDelete: 'emojiDelete', GuildEmojiUpdate: 'emojiUpdate', GuildIntegrationsUpdate: 'guildIntegrationsUpdate', GuildMemberAdd: 'guildMemberAdd', GuildMemberAvailable: 'guildMemberAvailable', GuildMemberRemove: 'guildMemberRemove', GuildMembersChunk: 'guildMembersChunk', GuildMemberUpdate: 'guildMemberUpdate', GuildRoleCreate: 'roleCreate', GuildRoleDelete: 'roleDelete', GuildRoleUpdate: 'roleUpdate', GuildScheduledEventCreate: 'guildScheduledEventCreate', GuildScheduledEventDelete: 'guildScheduledEventDelete', GuildScheduledEventUpdate: 'guildScheduledEventUpdate', GuildScheduledEventUserAdd: 'guildScheduledEventUserAdd', GuildScheduledEventUserRemove: 'guildScheduledEventUserRemove', GuildSoundboardSoundCreate: 'guildSoundboardSoundCreate', GuildSoundboardSoundDelete: 'guildSoundboardSoundDelete', GuildSoundboardSoundsUpdate: 'guildSoundboardSoundsUpdate', GuildSoundboardSoundUpdate: 'guildSoundboardSoundUpdate', GuildStickerCreate: 'stickerCreate', GuildStickerDelete: 'stickerDelete', GuildStickerUpdate: 'stickerUpdate', GuildUnavailable: 'guildUnavailable', GuildUpdate: 'guildUpdate', InteractionCreate: 'interactionCreate', Invalidated: 'invalidated', InviteCreate: 'inviteCreate', InviteDelete: 'inviteDelete', MessageBulkDelete: 'messageDeleteBulk', MessageCreate: 'messageCreate', MessageDelete: 'messageDelete', MessagePollVoteAdd: 'messagePollVoteAdd', MessagePollVoteRemove: 'messagePollVoteRemove', MessageReactionAdd: 'messageReactionAdd', MessageReactionRemove: 'messageReactionRemove', MessageReactionRemoveAll: 'messageReactionRemoveAll', MessageReactionRemoveEmoji: 'messageReactionRemoveEmoji', MessageUpdate: 'messageUpdate', PresenceUpdate: 'presenceUpdate', SoundboardSounds: 'soundboardSounds', Raw: 'raw', ShardDisconnect: 'shardDisconnect', ShardError: 'shardError', ShardReady: 'shardReady', ShardReconnecting: 'shardReconnecting', ShardResume: 'shardResume', StageInstanceCreate: 'stageInstanceCreate', StageInstanceDelete: 'stageInstanceDelete', StageInstanceUpdate: 'stageInstanceUpdate', SubscriptionCreate: 'subscriptionCreate', SubscriptionUpdate: 'subscriptionUpdate', SubscriptionDelete: 'subscriptionDelete', ThreadCreate: 'threadCreate', ThreadDelete: 'threadDelete', ThreadListSync: 'threadListSync', ThreadMembersUpdate: 'threadMembersUpdate', ThreadMemberUpdate: 'threadMemberUpdate', ThreadUpdate: 'threadUpdate', TypingStart: 'typingStart', UserUpdate: 'userUpdate', VoiceChannelEffectSend: 'voiceChannelEffectSend', VoiceServerUpdate: 'voiceServerUpdate', VoiceStateUpdate: 'voiceStateUpdate', Warn: 'warn', WebhooksUpdate: 'webhookUpdate', }; node_modules/discord.js/src/util/Transformers.js 0000664 00000007577 15114741631 0016077 0 ustar 00 'use strict'; const { isJSONEncodable } = require('@discordjs/util'); const snakeCase = require('lodash.snakecase'); const { resolvePartialEmoji } = require('./Util'); /** * Transforms camel-cased keys into snake cased keys * @param {*} obj The object to transform * @returns {*} */ function toSnakeCase(obj) { if (typeof obj !== 'object' || !obj) return obj; if (obj instanceof Date) return obj; if (isJSONEncodable(obj)) return toSnakeCase(obj.toJSON()); if (Array.isArray(obj)) return obj.map(toSnakeCase); return Object.fromEntries( Object.entries(obj).map(([key, value]) => [ snakeCase(key), // TODO: The special handling of 'emoji' is just a temporary fix for v14, will be dropped in v15. // See https://github.com/discordjs/discord.js/issues/10909 key === 'emoji' && typeof value === 'string' ? resolvePartialEmoji(value) : toSnakeCase(value), ]), ); } /** * Transforms an API auto moderation action object to a camel-cased variant. * @param {APIAutoModerationAction} autoModerationAction The action to transform * @returns {AutoModerationAction} * @ignore */ function _transformAPIAutoModerationAction(autoModerationAction) { return { type: autoModerationAction.type, metadata: { durationSeconds: autoModerationAction.metadata.duration_seconds ?? null, channelId: autoModerationAction.metadata.channel_id ?? null, customMessage: autoModerationAction.metadata.custom_message ?? null, }, }; } /** * Transforms an API message interaction metadata object to a camel-cased variant. * @param {Client} client The client * @param {APIMessageInteractionMetadata} messageInteractionMetadata The metadata to transform * @returns {MessageInteractionMetadata} * @ignore */ function _transformAPIMessageInteractionMetadata(client, messageInteractionMetadata) { return { id: messageInteractionMetadata.id, type: messageInteractionMetadata.type, user: client.users._add(messageInteractionMetadata.user), authorizingIntegrationOwners: messageInteractionMetadata.authorizing_integration_owners, originalResponseMessageId: messageInteractionMetadata.original_response_message_id ?? null, interactedMessageId: messageInteractionMetadata.interacted_message_id ?? null, triggeringInteractionMetadata: messageInteractionMetadata.triggering_interaction_metadata ? _transformAPIMessageInteractionMetadata(client, messageInteractionMetadata.triggering_interaction_metadata) : null, }; } /** * Transforms a guild scheduled event recurrence rule object to a snake-cased variant. * @param {GuildScheduledEventRecurrenceRuleOptions} recurrenceRule The recurrence rule to transform * @returns {APIGuildScheduledEventRecurrenceRule} * @ignore */ function _transformGuildScheduledEventRecurrenceRule(recurrenceRule) { return { start: new Date(recurrenceRule.startAt).toISOString(), frequency: recurrenceRule.frequency, interval: recurrenceRule.interval, by_weekday: recurrenceRule.byWeekday, by_n_weekday: recurrenceRule.byNWeekday, by_month: recurrenceRule.byMonth, by_month_day: recurrenceRule.byMonthDay, }; } /** * Transforms API incidents data to a camel-cased variant. * @param {APIIncidentsData} data The incidents data to transform * @returns {IncidentActions} * @ignore */ function _transformAPIIncidentsData(data) { return { invitesDisabledUntil: data.invites_disabled_until ? new Date(data.invites_disabled_until) : null, dmsDisabledUntil: data.dms_disabled_until ? new Date(data.dms_disabled_until) : null, dmSpamDetectedAt: data.dm_spam_detected_at ? new Date(data.dm_spam_detected_at) : null, raidDetectedAt: data.raid_detected_at ? new Date(data.raid_detected_at) : null, }; } module.exports = { toSnakeCase, _transformAPIAutoModerationAction, _transformAPIMessageInteractionMetadata, _transformGuildScheduledEventRecurrenceRule, _transformAPIIncidentsData, }; node_modules/discord.js/src/util/Options.js 0000664 00000023652 15114741631 0015035 0 ustar 00 'use strict'; const { DefaultRestOptions, DefaultUserAgentAppendix } = require('@discordjs/rest'); const { toSnakeCase } = require('./Transformers'); const { version } = require('../../package.json'); // TODO(ckohen): switch order of params so full manager is first and "type" is optional /** * @typedef {Function} CacheFactory * @param {Function} managerType The base manager class the cache is being requested from. * @param {Function} holds The class that the cache will hold. * @param {Function} manager The fully extended manager class the cache is being requested from. * @returns {Collection} A Collection used to store the cache of the manager. */ /** * Options for a client. * @typedef {Object} ClientOptions * @property {number|number[]|string} [shards] The shard's id to run, or an array of shard ids. If not specified, * the client will spawn {@link ClientOptions#shardCount} shards. If set to `auto`, it will fetch the * recommended amount of shards from Discord and spawn that amount * @property {number} [closeTimeout=5_000] The amount of time in milliseconds to wait for the close frame to be received * from the WebSocket. Don't have this too high/low. It's best to have it between 2_000-6_000 ms. * @property {number} [shardCount=1] The total amount of shards used by all processes of this bot * (e.g. recommended shard count, shard count of the ShardingManager) * @property {CacheFactory} [makeCache] Function to create a cache. * You can use your own function, or the {@link Options} class to customize the Collection used for the cache. * <warn>Overriding the cache used in `GuildManager`, `ChannelManager`, `GuildChannelManager`, `RoleManager`, * and `PermissionOverwriteManager` is unsupported and **will** break functionality</warn> * @property {MessageMentionOptions} [allowedMentions] The default value for {@link BaseMessageOptions#allowedMentions} * @property {Partials[]} [partials] Structures allowed to be partial. This means events can be emitted even when * they're missing all the data for a particular structure. See the "Partial Structures" topic on the * {@link https://discordjs.guide/popular-topics/partials.html guide} for some * important usage information, as partials require you to put checks in place when handling data. * @property {boolean} [failIfNotExists=true] The default value for {@link MessageReplyOptions#failIfNotExists} * @property {PresenceData} [presence={}] Presence data to use upon login * @property {IntentsResolvable} intents Intents to enable for this connection * @property {number} [waitGuildTimeout=15_000] Time in milliseconds that clients with the * {@link GatewayIntentBits.Guilds} gateway intent should wait for missing guilds to be received before being ready. * @property {SweeperOptions} [sweepers=this.DefaultSweeperSettings] Options for cache sweeping * @property {WebsocketOptions} [ws] Options for the WebSocket * @property {RESTOptions} [rest] Options for the REST manager * @property {Function} [jsonTransformer] A function used to transform outgoing json data * @property {boolean} [enforceNonce=false] The default value for {@link MessageCreateOptions#enforceNonce} */ /** * Options for {@link Sweepers} defining the behavior of cache sweeping * @typedef {Object<SweeperKey, SweepOptions>} SweeperOptions */ /** * Options for sweeping a single type of item from cache * @typedef {Object} SweepOptions * @property {number} interval The interval (in seconds) at which to perform sweeping of the item * @property {number} [lifetime] How long an item should stay in cache until it is considered sweepable. * <warn>This property is only valid for the `invites`, `messages`, and `threads` keys. The `filter` property * is mutually exclusive to this property and takes priority</warn> * @property {GlobalSweepFilter} filter The function used to determine the function passed to the sweep method * <info>This property is optional when the key is `invites`, `messages`, or `threads` and `lifetime` is set</info> */ /** * A function to determine what strategy to use for sharding internally. * ```js * (manager) => new WorkerShardingStrategy(manager, { shardsPerWorker: 2 }) * ``` * @typedef {Function} BuildStrategyFunction * @param {WSWebSocketManager} manager The WebSocketManager that is going to initiate the sharding * @returns {IShardingStrategy} The strategy to use for sharding */ /** * A function to change the concurrency handling for shard identifies of this manager * ```js * async (manager) => { * const gateway = await manager.fetchGatewayInformation(); * return new SimpleIdentifyThrottler(gateway.session_start_limit.max_concurrency); * } * ``` * @typedef {Function} IdentifyThrottlerFunction * @param {WSWebSocketManager} manager The WebSocketManager that is going to initiate the sharding * @returns {Awaitable<IIdentifyThrottler>} The identify throttler that this ws manager will use */ /** * WebSocket options (these are left as snake_case to match the API) * @typedef {Object} WebsocketOptions * @property {number} [large_threshold=50] Number of members in a guild after which offline users will no longer be * sent in the initial guild member list, must be between 50 and 250 * @property {number} [version=10] The Discord gateway version to use <warn>Changing this can break the library; * only set this if you know what you are doing</warn> * @property {BuildStrategyFunction} [buildStrategy] Builds the strategy to use for sharding * @property {IdentifyThrottlerFunction} [buildIdentifyThrottler] Builds the identify throttler to use for sharding */ /** * Contains various utilities for client options. */ class Options extends null { /** * The default user agent appendix. * @type {string} * @memberof Options * @private */ static userAgentAppendix = `discord.js/${version} ${DefaultUserAgentAppendix}`.trimEnd(); /** * The default client options. * @returns {ClientOptions} */ static createDefault() { return { closeTimeout: 5_000, waitGuildTimeout: 15_000, shardCount: 1, makeCache: this.cacheWithLimits(this.DefaultMakeCacheSettings), partials: [], failIfNotExists: true, enforceNonce: false, presence: {}, sweepers: this.DefaultSweeperSettings, ws: { large_threshold: 50, version: 10, }, rest: { ...DefaultRestOptions, userAgentAppendix: this.userAgentAppendix, }, jsonTransformer: toSnakeCase, }; } /** * Create a cache factory using predefined settings to sweep or limit. * @param {Object<string, LimitedCollectionOptions|number>} [settings={}] Settings passed to the relevant constructor. * If no setting is provided for a manager, it uses Collection. * If a number is provided for a manager, it uses that number as the max size for a LimitedCollection. * If LimitedCollectionOptions are provided for a manager, it uses those settings to form a LimitedCollection. * @returns {CacheFactory} * @example * // Store up to 200 messages per channel and 200 members per guild, always keeping the client member. * Options.cacheWithLimits({ * MessageManager: 200, * GuildMemberManager: { * maxSize: 200, * keepOverLimit: (member) => member.id === client.user.id, * }, * }); */ static cacheWithLimits(settings = {}) { const { Collection } = require('@discordjs/collection'); const LimitedCollection = require('./LimitedCollection'); return (managerType, _, manager) => { const setting = settings[manager.name] ?? settings[managerType.name]; /* eslint-disable-next-line eqeqeq */ if (setting == null) { return new Collection(); } if (typeof setting === 'number') { if (setting === Infinity) { return new Collection(); } return new LimitedCollection({ maxSize: setting }); } /* eslint-disable-next-line eqeqeq */ const noLimit = setting.maxSize == null || setting.maxSize === Infinity; if (noLimit) { return new Collection(); } return new LimitedCollection(setting); }; } /** * Create a cache factory that always caches everything. * @returns {CacheFactory} */ static cacheEverything() { const { Collection } = require('@discordjs/collection'); return () => new Collection(); } /** * The default settings passed to {@link ClientOptions.makeCache}. * The caches that this changes are: * * `MessageManager` - Limit to 200 messages * <info>If you want to keep default behavior and add on top of it you can use this object and add on to it, e.g. * `makeCache: Options.cacheWithLimits({ ...Options.DefaultMakeCacheSettings, ReactionManager: 0 })`</info> * @type {Object<string, LimitedCollectionOptions|number>} */ static get DefaultMakeCacheSettings() { return { MessageManager: 200, }; } /** * The default settings passed to {@link ClientOptions.sweepers}. * The sweepers that this changes are: * * `threads` - Sweep archived threads every hour, removing those archived more than 4 hours ago * <info>If you want to keep default behavior and add on top of it you can use this object and add on to it, e.g. * `sweepers: { ...Options.DefaultSweeperSettings, messages: { interval: 300, lifetime: 600 } }`</info> * @type {SweeperOptions} */ static get DefaultSweeperSettings() { return { threads: { interval: 3600, lifetime: 14400, }, }; } } module.exports = Options; /** * @external RESTOptions * @see {@link https://discord.js.org/docs/packages/rest/stable/RESTOptions:Interface} */ /** * @external WSWebSocketManager * @see {@link https://discord.js.org/docs/packages/ws/stable/WebSocketManager:Class} */ /** * @external IShardingStrategy * @see {@link https://discord.js.org/docs/packages/ws/stable/IShardingStrategy:Interface} */ /** * @external IIdentifyThrottler * @see {@link https://discord.js.org/docs/packages/ws/stable/IIdentifyThrottler:Interface} */ node_modules/discord.js/src/util/Components.js 0000664 00000024014 15114741631 0015520 0 ustar 00 'use strict'; const { ComponentBuilder } = require('@discordjs/builders'); const { ComponentType } = require('discord-api-types/v10'); /** * @typedef {Object} BaseComponentData * @property {number} [id] the id of this component * @property {ComponentType} type The type of component */ /** * @typedef {BaseComponentData} ActionRowData * @property {ComponentData[]} components The components in this action row */ /** * @typedef {BaseComponentData} ButtonComponentData * @property {ButtonStyle} style The style of the button * @property {boolean} [disabled] Whether this button is disabled * @property {string} label The label of this button * @property {APIMessageComponentEmoji} [emoji] The emoji on this button * @property {string} [customId] The custom id of the button * @property {string} [url] The URL of the button */ /** * @typedef {object} SelectMenuComponentOptionData * @property {string} label The label of the option * @property {string} value The value of the option * @property {string} [description] The description of the option * @property {APIMessageComponentEmoji} [emoji] The emoji on the option * @property {boolean} [default] Whether this option is selected by default */ /** * @typedef {BaseComponentData} SelectMenuComponentData * @property {string} customId The custom id of the select menu * @property {boolean} [disabled] Whether the select menu is disabled or not * @property {number} [maxValues] The maximum amount of options that can be selected * @property {number} [minValues] The minimum amount of options that can be selected * @property {SelectMenuComponentOptionData[]} [options] The options in this select menu * @property {string} [placeholder] The placeholder of the select menu */ /** * @typedef {ActionRowData|ButtonComponentData|SelectMenuComponentData} MessageComponentData */ /** * @typedef {BaseComponentData} TextInputComponentData * @property {string} customId The custom id of the text input * @property {TextInputStyle} style The style of the text input * @property {string} label The text that appears on top of the text input field * @property {number} [minLength] The minimum number of characters that can be entered in the text input * @property {number} [maxLength] The maximum number of characters that can be entered in the text input * @property {boolean} [required] Whether or not the text input is required or not * @property {string} [value] The pre-filled text in the text input * @property {string} [placeholder] Placeholder for the text input */ /** * @typedef {Object} UnfurledMediaItemData * @property {string} url The url of this media item. Accepts either http:, https: or attachment: protocol */ /** * @typedef {BaseComponentData} ThumbnailComponentData * @property {UnfurledMediaItemData} media The media for the thumbnail * @property {string} [description] The description of the thumbnail * @property {boolean} [spoiler] Whether the thumbnail should be spoilered */ /** * @typedef {BaseComponentData} FileComponentData * @property {UnfurledMediaItemData} file The file media in this component * @property {boolean} [spoiler] Whether the file should be spoilered */ /** * @typedef {Object} MediaGalleryItemData * @property {UnfurledMediaItemData} media The media for the media gallery item * @property {string} [description] The description of the media gallery item * @property {boolean} [spoiler] Whether the media gallery item should be spoilered */ /** * @typedef {BaseComponentData} MediaGalleryComponentData * @property {MediaGalleryItemData[]} items The media gallery items in this media gallery component */ /** * @typedef {BaseComponentData} SeparatorComponentData * @property {SeparatorSpacingSize} [spacing] The spacing size of this component * @property {boolean} [divider] Whether the separator shows as a divider */ /** * @typedef {BaseComponentData} SectionComponentData * @property {Components[]} components The components in this section * @property {ButtonComponentData|ThumbnailComponentData} accessory The accessory shown next to this section */ /** * @typedef {BaseComponentData} TextDisplayComponentData * @property {string} content The content displayed in this component */ /** * @typedef {ActionRowData|FileComponentData|MediaGalleryComponentData|SectionComponentData| * SeparatorComponentData|TextDisplayComponentData} ComponentInContainerData */ /** * @typedef {BaseComponentData} ContainerComponentData * @property {ComponentInContainerData} components The components in this container * @property {?number} [accentColor] The accent color of this container * @property {boolean} [spoiler] Whether the container should be spoilered */ /** * @typedef {ActionRowData|ButtonComponentData|SelectMenuComponentData|TextInputComponentData| * ThumbnailComponentData|FileComponentData|MediaGalleryComponentData|SeparatorComponentData| * SectionComponentData|TextDisplayComponentData|ContainerComponentData} ComponentData */ /** * Any emoji data that can be used within a button * @typedef {APIMessageComponentEmoji|string} ComponentEmojiResolvable */ /** * @typedef {ActionRow|ContainerComponent|FileComponent|MediaGalleryComponent| * SectionComponent|SeparatorComponent|TextDisplayComponent} MessageTopLevelComponent */ /** * Transforms API data into a component * @param {APIMessageComponent|Component} data The data to create the component from * @returns {Component} * @ignore */ function createComponent(data) { return data instanceof Component ? data : new (ComponentTypeToComponent[data.type] ?? Component)(data); } /** * Transforms API data into a component builder * @param {APIMessageComponent|ComponentBuilder} data The data to create the component from * @returns {ComponentBuilder} * @ignore */ function createComponentBuilder(data) { return data instanceof ComponentBuilder ? data : new (ComponentTypeToBuilder[data.type] ?? ComponentBuilder)(data); } /** * Extracts all interactive components from the component tree * @param {Component|APIMessageComponent} component The component to find all interactive components in * @returns {Array<Component|APIMessageComponent>} * @ignore */ function extractInteractiveComponents(component) { switch (component.type) { case ComponentType.ActionRow: return component.components; case ComponentType.Section: return [...component.components, component.accessory]; case ComponentType.Container: return component.components.flatMap(extractInteractiveComponents); default: return [component]; } } /** * Finds a component by customId in nested components * @param {Array<Component|APIMessageComponent>} components The components to search in * @param {string} customId The customId to search for * @returns {Component|APIMessageComponent} * @ignore */ function findComponentByCustomId(components, customId) { return ( components .flatMap(extractInteractiveComponents) .find(component => (component.customId ?? component.custom_id) === customId) ?? null ); } module.exports = { createComponent, createComponentBuilder, findComponentByCustomId }; const ActionRow = require('../structures/ActionRow'); const ActionRowBuilder = require('../structures/ActionRowBuilder'); const ButtonBuilder = require('../structures/ButtonBuilder'); const ButtonComponent = require('../structures/ButtonComponent'); const ChannelSelectMenuBuilder = require('../structures/ChannelSelectMenuBuilder'); const ChannelSelectMenuComponent = require('../structures/ChannelSelectMenuComponent'); const Component = require('../structures/Component'); const ContainerComponent = require('../structures/ContainerComponent'); const FileComponent = require('../structures/FileComponent'); const MediaGalleryComponent = require('../structures/MediaGalleryComponent'); const MentionableSelectMenuBuilder = require('../structures/MentionableSelectMenuBuilder'); const MentionableSelectMenuComponent = require('../structures/MentionableSelectMenuComponent'); const RoleSelectMenuBuilder = require('../structures/RoleSelectMenuBuilder'); const RoleSelectMenuComponent = require('../structures/RoleSelectMenuComponent'); const SectionComponent = require('../structures/SectionComponent'); const SeparatorComponent = require('../structures/SeparatorComponent'); const StringSelectMenuBuilder = require('../structures/StringSelectMenuBuilder'); const StringSelectMenuComponent = require('../structures/StringSelectMenuComponent'); const TextDisplayComponent = require('../structures/TextDisplayComponent'); const TextInputBuilder = require('../structures/TextInputBuilder'); const TextInputComponent = require('../structures/TextInputComponent'); const ThumbnailComponent = require('../structures/ThumbnailComponent'); const UserSelectMenuBuilder = require('../structures/UserSelectMenuBuilder'); const UserSelectMenuComponent = require('../structures/UserSelectMenuComponent'); const ComponentTypeToComponent = { [ComponentType.ActionRow]: ActionRow, [ComponentType.Button]: ButtonComponent, [ComponentType.StringSelect]: StringSelectMenuComponent, [ComponentType.TextInput]: TextInputComponent, [ComponentType.UserSelect]: UserSelectMenuComponent, [ComponentType.RoleSelect]: RoleSelectMenuComponent, [ComponentType.MentionableSelect]: MentionableSelectMenuComponent, [ComponentType.ChannelSelect]: ChannelSelectMenuComponent, [ComponentType.Container]: ContainerComponent, [ComponentType.TextDisplay]: TextDisplayComponent, [ComponentType.File]: FileComponent, [ComponentType.MediaGallery]: MediaGalleryComponent, [ComponentType.Section]: SectionComponent, [ComponentType.Separator]: SeparatorComponent, [ComponentType.Thumbnail]: ThumbnailComponent, }; const ComponentTypeToBuilder = { [ComponentType.ActionRow]: ActionRowBuilder, [ComponentType.Button]: ButtonBuilder, [ComponentType.StringSelect]: StringSelectMenuBuilder, [ComponentType.TextInput]: TextInputBuilder, [ComponentType.UserSelect]: UserSelectMenuBuilder, [ComponentType.RoleSelect]: RoleSelectMenuBuilder, [ComponentType.MentionableSelect]: MentionableSelectMenuBuilder, [ComponentType.ChannelSelect]: ChannelSelectMenuBuilder, }; node_modules/discord.js/src/util/Util.js 0000664 00000043034 15114741631 0014313 0 ustar 00 'use strict'; const { parse } = require('node:path'); const process = require('node:process'); const { Collection } = require('@discordjs/collection'); const { ChannelType, RouteBases, Routes } = require('discord-api-types/v10'); const { fetch } = require('undici'); const Colors = require('./Colors'); const { DiscordjsError, DiscordjsRangeError, DiscordjsTypeError, ErrorCodes } = require('../errors'); const isObject = d => typeof d === 'object' && d !== null; let deprecationEmittedForUserFetchFlags = false; let deprecationEmittedForRemoveThreadMember = false; /** * Flatten an object. Any properties that are collections will get converted to an array of keys. * @param {Object} obj The object to flatten. * @param {...Object<string, boolean|string>} [props] Specific properties to include/exclude. * @returns {Object} */ function flatten(obj, ...props) { if (!isObject(obj)) return obj; const objProps = Object.keys(obj) .filter(key => !key.startsWith('_')) .map(key => ({ [key]: true })); props = objProps.length ? Object.assign(...objProps, ...props) : Object.assign({}, ...props); const out = {}; for (let [prop, newProp] of Object.entries(props)) { if (!newProp) continue; newProp = newProp === true ? prop : newProp; const element = obj[prop]; const elemIsObj = isObject(element); const valueOf = elemIsObj && typeof element.valueOf === 'function' ? element.valueOf() : null; const hasToJSON = elemIsObj && typeof element.toJSON === 'function'; // If it's a Collection, make the array of keys if (element instanceof Collection) out[newProp] = Array.from(element.keys()); // If the valueOf is a Collection, use its array of keys else if (valueOf instanceof Collection) out[newProp] = Array.from(valueOf.keys()); // If it's an array, call toJSON function on each element if present, otherwise flatten each element else if (Array.isArray(element)) out[newProp] = element.map(elm => elm.toJSON?.() ?? flatten(elm)); // If it's an object with a primitive `valueOf`, use that value else if (typeof valueOf !== 'object') out[newProp] = valueOf; // If it's an object with a toJSON function, use the return value of it else if (hasToJSON) out[newProp] = element.toJSON(); // If element is an object, use the flattened version of it else if (typeof element === 'object') out[newProp] = flatten(element); // If it's a primitive else if (!elemIsObj) out[newProp] = element; } return out; } /** * @typedef {Object} FetchRecommendedShardCountOptions * @property {number} [guildsPerShard=1000] Number of guilds assigned per shard * @property {number} [multipleOf=1] The multiple the shard count should round up to. (16 for large bot sharding) */ /** * Gets the recommended shard count from Discord. * @param {string} token Discord auth token * @param {FetchRecommendedShardCountOptions} [options] Options for fetching the recommended shard count * @returns {Promise<number>} The recommended number of shards */ async function fetchRecommendedShardCount(token, { guildsPerShard = 1_000, multipleOf = 1 } = {}) { if (!token) throw new DiscordjsError(ErrorCodes.TokenMissing); const response = await fetch(RouteBases.api + Routes.gatewayBot(), { method: 'GET', headers: { Authorization: `Bot ${token.replace(/^Bot\s*/i, '')}` }, }); if (!response.ok) { if (response.status === 401) throw new DiscordjsError(ErrorCodes.TokenInvalid); throw response; } const { shards } = await response.json(); return Math.ceil((shards * (1_000 / guildsPerShard)) / multipleOf) * multipleOf; } /** * A partial emoji object. * @typedef {Object} PartialEmoji * @property {boolean} animated Whether the emoji is animated * @property {Snowflake|undefined} id The id of the emoji * @property {string} name The name of the emoji */ /** * Parses emoji info out of a string. The string must be one of: * * A UTF-8 emoji (no id) * * A URL-encoded UTF-8 emoji (no id) * * A Discord custom emoji (`<:name:id>` or `<a:name:id>`) * @param {string} text Emoji string to parse * @returns {?PartialEmoji} */ function parseEmoji(text) { if (text.includes('%')) text = decodeURIComponent(text); if (!text.includes(':')) return { animated: false, name: text, id: undefined }; const match = text.match(/<?(?:(a):)?(\w{2,32}):(\d{17,19})?>?/); return match && { animated: Boolean(match[1]), name: match[2], id: match[3] }; } /** * A partial emoji object with only an id. * @typedef {Object} PartialEmojiOnlyId * @property {Snowflake} id The id of the emoji */ /** * Resolves a partial emoji object from an {@link EmojiIdentifierResolvable}, without checking a Client. * @param {Emoji|EmojiIdentifierResolvable} emoji Emoji identifier to resolve * @returns {?(PartialEmoji|PartialEmojiOnlyId)} Supplying a snowflake yields `PartialEmojiOnlyId`. * @private */ function resolvePartialEmoji(emoji) { if (!emoji) return null; if (typeof emoji === 'string') return /^\d{17,19}$/.test(emoji) ? { id: emoji } : parseEmoji(emoji); const { id, name, animated } = emoji; if (!id && !name) return null; return { id, name, animated: Boolean(animated) }; } /** * Options used to make an error object. * @typedef {Object} MakeErrorOptions * @property {string} name Error type * @property {string} message Message for the error * @property {string} stack Stack for the error * @private */ /** * Makes an Error from a plain info object. * @param {MakeErrorOptions} obj Error info * @returns {Error} * @private */ function makeError(obj) { const err = new Error(obj.message); err.name = obj.name; err.stack = obj.stack; return err; } /** * Makes a plain error info object from an Error. * @param {Error} err Error to get info from * @returns {MakeErrorOptions} * @private */ function makePlainError(err) { return { name: err.name, message: err.message, stack: err.stack, }; } const TextSortableGroupTypes = [ ChannelType.GuildText, ChannelType.GuildAnnouncement, ChannelType.GuildForum, ChannelType.GuildMedia, ]; const VoiceSortableGroupTypes = [ChannelType.GuildVoice, ChannelType.GuildStageVoice]; const CategorySortableGroupTypes = [ChannelType.GuildCategory]; /** * Gets an array of the channel types that can be moved in the channel group. For example, a GuildText channel would * return an array containing the types that can be ordered within the text channels (always at the top), and a voice * channel would return an array containing the types that can be ordered within the voice channels (always at the * bottom). * @param {ChannelType} type The type of the channel * @returns {ChannelType[]} * @private */ function getSortableGroupTypes(type) { switch (type) { case ChannelType.GuildText: case ChannelType.GuildAnnouncement: case ChannelType.GuildForum: case ChannelType.GuildMedia: return TextSortableGroupTypes; case ChannelType.GuildVoice: case ChannelType.GuildStageVoice: return VoiceSortableGroupTypes; case ChannelType.GuildCategory: return CategorySortableGroupTypes; default: return [type]; } } /** * Moves an element in an array *in place*. * @param {Array<*>} array Array to modify * @param {*} element Element to move * @param {number} newIndex Index or offset to move the element to * @param {boolean} [offset=false] Move the element by an offset amount rather than to a set index * @returns {number} * @private */ function moveElementInArray(array, element, newIndex, offset = false) { const index = array.indexOf(element); newIndex = (offset ? index : 0) + newIndex; if (newIndex > -1 && newIndex < array.length) { const removedElement = array.splice(index, 1)[0]; array.splice(newIndex, 0, removedElement); } return array.indexOf(element); } /** * Verifies the provided data is a string, otherwise throws provided error. * @param {string} data The string resolvable to resolve * @param {Function} [error] The Error constructor to instantiate. Defaults to Error * @param {string} [errorMessage] The error message to throw with. Defaults to "Expected string, got <data> instead." * @param {boolean} [allowEmpty=true] Whether an empty string should be allowed * @returns {string} */ function verifyString( data, error = Error, errorMessage = `Expected a string, got ${data} instead.`, allowEmpty = true, ) { if (typeof data !== 'string') throw new error(errorMessage); if (!allowEmpty && data.length === 0) throw new error(errorMessage); return data; } /** * Can be a number, hex string, an RGB array like: * ```js * [255, 0, 255] // purple * ``` * or one of the following strings: * - `Default` * - `White` * - `Aqua` * - `Green` * - `Blue` * - `Yellow` * - `Purple` * - `LuminousVividPink` * - `Fuchsia` * - `Gold` * - `Orange` * - `Red` * - `Grey` * - `Navy` * - `DarkAqua` * - `DarkGreen` * - `DarkBlue` * - `DarkPurple` * - `DarkVividPink` * - `DarkGold` * - `DarkOrange` * - `DarkRed` * - `DarkGrey` * - `DarkerGrey` * - `LightGrey` * - `DarkNavy` * - `Blurple` * - `Greyple` * - `DarkButNotBlack` * - `NotQuiteBlack` * - `Random` * @typedef {string|number|number[]} ColorResolvable */ /** * Resolves a ColorResolvable into a color number. * @param {ColorResolvable} color Color to resolve * @returns {number} A color */ function resolveColor(color) { let resolvedColor; if (typeof color === 'string') { if (color === 'Random') return Math.floor(Math.random() * (0xffffff + 1)); if (color === 'Default') return 0; if (/^#?[\da-f]{6}$/i.test(color)) return parseInt(color.replace('#', ''), 16); resolvedColor = Colors[color]; } else if (Array.isArray(color)) { resolvedColor = (color[0] << 16) + (color[1] << 8) + color[2]; } else { resolvedColor = color; } if (!Number.isInteger(resolvedColor)) { throw new DiscordjsTypeError(ErrorCodes.ColorConvert, color); } if (resolvedColor < 0 || resolvedColor > 0xffffff) { throw new DiscordjsRangeError(ErrorCodes.ColorRange); } return resolvedColor; } /** * Sorts by Discord's position and id. * @param {Collection} collection Collection of objects to sort * @returns {Collection} */ function discordSort(collection) { const isGuildChannel = collection.first() instanceof GuildChannel; return collection.sorted( isGuildChannel ? (a, b) => a.rawPosition - b.rawPosition || Number(BigInt(a.id) - BigInt(b.id)) : (a, b) => a.rawPosition - b.rawPosition || Number(BigInt(b.id) - BigInt(a.id)), ); } /** * Sets the position of a Channel or Role. * @param {BaseChannel|Role} item Object to set the position of * @param {number} position New position for the object * @param {boolean} relative Whether `position` is relative to its current position * @param {Collection<string, BaseChannel|Role>} sorted A collection of the objects sorted properly * @param {Client} client The client to use to patch the data * @param {string} route Route to call PATCH on * @param {string} [reason] Reason for the change * @returns {Promise<BaseChannel[]|Role[]>} Updated item list, with `id` and `position` properties * @private */ async function setPosition(item, position, relative, sorted, client, route, reason) { let updatedItems = [...sorted.values()]; moveElementInArray(updatedItems, item, position, relative); updatedItems = updatedItems.map((r, i) => ({ id: r.id, position: i })); await client.rest.patch(route, { body: updatedItems, reason }); return updatedItems; } /** * Alternative to Node's `path.basename`, removing query string after the extension if it exists. * @param {string} path Path to get the basename of * @param {string} [ext] File extension to remove * @returns {string} Basename of the path * @private */ function basename(path, ext) { const res = parse(path); return ext && res.ext.startsWith(ext) ? res.name : res.base.split('?')[0]; } /** * The content to have all mentions replaced by the equivalent text. * @param {string} str The string to be converted * @param {TextBasedChannels} channel The channel the string was sent in * @returns {string} */ function cleanContent(str, channel) { return str.replaceAll( /* eslint-disable max-len */ /<(?:(?<type>@[!&]?|#)|(?:\/(?<commandName>[-_\p{L}\p{N}\p{sc=Deva}\p{sc=Thai} ]+):)|(?:a?:(?<emojiName>[\w]+):))(?<id>\d{17,19})>/gu, (match, type, commandName, emojiName, id) => { if (commandName) return `/${commandName}`; if (emojiName) return `:${emojiName}:`; switch (type) { case '@': case '@!': { const member = channel.guild?.members.cache.get(id); if (member) { return `@${member.displayName}`; } const user = channel.client.users.cache.get(id); return user ? `@${user.displayName}` : match; } case '@&': { if (channel.type === ChannelType.DM) return match; const role = channel.guild.roles.cache.get(id); return role ? `@${role.name}` : match; } case '#': { const mentionedChannel = channel.client.channels.cache.get(id); return mentionedChannel ? `#${mentionedChannel.name}` : match; } default: { return match; } } }, ); } /** * The content to put in a code block with all code block fences replaced by the equivalent backticks. * @param {string} text The string to be converted * @returns {string} */ function cleanCodeBlockContent(text) { return text.replaceAll('```', '`\u200b``'); } /** * Parses a webhook URL for the id and token. * @param {string} url The URL to parse * @returns {?WebhookClientDataIdWithToken} `null` if the URL is invalid, otherwise the id and the token */ function parseWebhookURL(url) { const matches = url.match( /https?:\/\/(?:ptb\.|canary\.)?discord\.com\/api(?:\/v\d{1,2})?\/webhooks\/(\d{17,19})\/([\w-]{68})/i, ); if (!matches || matches.length <= 2) return null; const [, id, token] = matches; return { id, token, }; } /** * Supportive data for interaction resolved data. * @typedef {Object} SupportingInteractionResolvedData * @property {Client} client The client * @property {Guild} [guild] A guild * @property {GuildTextBasedChannel} [channel] A channel * @private */ /** * Transforms the resolved data received from the API. * @param {SupportingInteractionResolvedData} supportingData Data to support the transformation * @param {APIInteractionDataResolved} [data] The received resolved objects * @returns {CommandInteractionResolvedData} * @private */ function transformResolved( { client, guild, channel }, { members, users, channels, roles, messages, attachments } = {}, ) { const result = {}; if (members) { result.members = new Collection(); for (const [id, member] of Object.entries(members)) { const user = users[id]; result.members.set(id, guild?.members._add({ user, ...member }) ?? member); } } if (users) { result.users = new Collection(); for (const user of Object.values(users)) { result.users.set(user.id, client.users._add(user)); } } if (roles) { result.roles = new Collection(); for (const role of Object.values(roles)) { result.roles.set(role.id, guild?.roles._add(role) ?? role); } } if (channels) { result.channels = new Collection(); for (const apiChannel of Object.values(channels)) { result.channels.set(apiChannel.id, client.channels._add(apiChannel, guild) ?? apiChannel); } } if (messages) { result.messages = new Collection(); for (const message of Object.values(messages)) { result.messages.set(message.id, channel?.messages?._add(message) ?? message); } } if (attachments) { result.attachments = new Collection(); for (const attachment of Object.values(attachments)) { const patched = new Attachment(attachment); result.attachments.set(attachment.id, patched); } } return result; } /** * Resolves a SKU id from a SKU resolvable. * @param {SKUResolvable} resolvable The SKU resolvable to resolve * @returns {?Snowflake} The resolved SKU id, or `null` if the resolvable was invalid */ function resolveSKUId(resolvable) { if (typeof resolvable === 'string') return resolvable; if (resolvable instanceof SKU) return resolvable.id; return null; } /** * Deprecation function for fetching user flags. * @param {string} name Name of the class * @private */ function emitDeprecationWarningForUserFetchFlags(name) { if (deprecationEmittedForUserFetchFlags) return; process.emitWarning(`${name}#fetchFlags() is deprecated. Use ${name}#fetch() instead.`); deprecationEmittedForUserFetchFlags = true; } /** * Deprecation function for the reason parameter of removing thread members. * @param {string} name Name of the class * @private */ function emitDeprecationWarningForRemoveThreadMember(name) { if (deprecationEmittedForRemoveThreadMember) return; process.emitWarning( `The reason parameter of ${name}#remove() is deprecated as Discord does not parse them. It will be removed in the next major version.`, ); deprecationEmittedForRemoveThreadMember = true; } module.exports = { flatten, fetchRecommendedShardCount, parseEmoji, resolvePartialEmoji, makeError, makePlainError, getSortableGroupTypes, moveElementInArray, verifyString, resolveColor, discordSort, setPosition, basename, cleanContent, cleanCodeBlockContent, parseWebhookURL, transformResolved, resolveSKUId, emitDeprecationWarningForUserFetchFlags, emitDeprecationWarningForRemoveThreadMember, }; // Fixes Circular const Attachment = require('../structures/Attachment'); const GuildChannel = require('../structures/GuildChannel'); const { SKU } = require('../structures/SKU.js'); node_modules/discord.js/src/util/Partials.js 0000664 00000002527 15114741631 0015157 0 ustar 00 'use strict'; const { createEnum } = require('./Enums'); /** * The enumeration for partials. * ```js * import { Client, Partials } from 'discord.js'; * * const client = new Client({ * intents: [ * // Intents... * ], * partials: [ * Partials.User, // We want to receive uncached users! * Partials.Message // We want to receive uncached messages! * ] * }); * ``` * @typedef {Object} Partials * @property {number} User The partial to receive uncached users. * @property {number} Channel The partial to receive uncached channels. * <info>This is required to receive direct messages!</info> * @property {number} GuildMember The partial to receive uncached guild members. * @property {number} Message The partial to receive uncached messages. * @property {number} Reaction The partial to receive uncached reactions. * @property {number} GuildScheduledEvent The partial to receive uncached guild scheduled events. * @property {number} ThreadMember The partial to receive uncached thread members. * @property {number} SoundboardSound The partial to receive uncached soundboard sounds. */ // JSDoc for IntelliSense purposes /** * @type {Partials} * @ignore */ module.exports = createEnum([ 'User', 'Channel', 'GuildMember', 'Message', 'Reaction', 'GuildScheduledEvent', 'ThreadMember', 'SoundboardSound', ]); node_modules/discord.js/src/util/Colors.js 0000664 00000004724 15114741631 0014642 0 ustar 00 'use strict'; /** * @typedef {Object} Colors * @property {number} Default 0x000000 | rgb(0,0,0) * @property {number} White 0xFFFFFF | rgb(255,255,255) * @property {number} Aqua 0x1ABC9C | rgb(26,188,156) * @property {number} Green 0x57F287 | rgb(87,242,135) * @property {number} Blue 0x3498DB | rgb(52,152,219) * @property {number} Yellow 0xFEE75C | rgb(254,231,92) * @property {number} Purple 0x9B59B6 | rgb(155,89,182) * @property {number} LuminousVividPink 0xE91E63 | rgb(233,30,99) * @property {number} Fuchsia 0xEB459E | rgb(235,69,158) * @property {number} Gold 0xF1C40F | rgb(241,196,15) * @property {number} Orange 0xE67E22 | rgb(230,126,34) * @property {number} Red 0xED4245 | rgb(237,66,69) * @property {number} Grey 0x95A5A6 | rgb(149,165,166) * @property {number} Navy 0x34495E | rgb(52,73,94) * @property {number} DarkAqua 0x11806A | rgb(17,128,106) * @property {number} DarkGreen 0x1F8B4C | rgb(31,139,76) * @property {number} DarkBlue 0x206694 | rgb(32,102,148) * @property {number} DarkPurple 0x71368A | rgb(113,54,138) * @property {number} DarkVividPink 0xAD1457 | rgb(173,20,87) * @property {number} DarkGold 0xC27C0E | rgb(194,124,14) * @property {number} DarkOrange 0xA84300 | rgb(168,67,0) * @property {number} DarkRed 0x992D22 | rgb(153,45,34) * @property {number} DarkGrey 0x979C9F | rgb(151,156,159) * @property {number} DarkerGrey 0x7F8C8D | rgb(127,140,141) * @property {number} LightGrey 0xBCC0C0 | rgb(188,192,192) * @property {number} DarkNavy 0x2C3E50 | rgb(44,62,80) * @property {number} Blurple 0x5865F2 | rgb(88,101,242) * @property {number} Greyple 0x99AAb5 | rgb(153,170,181) * @property {number} DarkButNotBlack 0x2C2F33 | rgb(44,47,51) * @property {number} NotQuiteBlack 0x23272A | rgb(35,39,42) */ // JSDoc for IntelliSense purposes /** * @type {Colors} * @ignore */ module.exports = { Default: 0x000000, White: 0xffffff, Aqua: 0x1abc9c, Green: 0x57f287, Blue: 0x3498db, Yellow: 0xfee75c, Purple: 0x9b59b6, LuminousVividPink: 0xe91e63, Fuchsia: 0xeb459e, Gold: 0xf1c40f, Orange: 0xe67e22, Red: 0xed4245, Grey: 0x95a5a6, Navy: 0x34495e, DarkAqua: 0x11806a, DarkGreen: 0x1f8b4c, DarkBlue: 0x206694, DarkPurple: 0x71368a, DarkVividPink: 0xad1457, DarkGold: 0xc27c0e, DarkOrange: 0xa84300, DarkRed: 0x992d22, DarkGrey: 0x979c9f, DarkerGrey: 0x7f8c8d, LightGrey: 0xbcc0c0, DarkNavy: 0x2c3e50, Blurple: 0x5865f2, Greyple: 0x99aab5, DarkButNotBlack: 0x2c2f33, NotQuiteBlack: 0x23272a, }; node_modules/discord.js/src/util/ActivityFlagsBitField.js 0000664 00000001154 15114741631 0017547 0 ustar 00 'use strict'; const { ActivityFlags } = require('discord-api-types/v10'); const BitField = require('./BitField'); /** * Data structure that makes it easy to interact with an {@link Activity#flags} bitfield. * @extends {BitField} */ class ActivityFlagsBitField extends BitField { /** * Numeric activity flags. * @type {ActivityFlags} * @memberof ActivityFlagsBitField */ static Flags = ActivityFlags; } /** * @name ActivityFlagsBitField * @kind constructor * @memberof ActivityFlagsBitField * @param {BitFieldResolvable} [bits=0] Bit(s) to read from */ module.exports = ActivityFlagsBitField; node_modules/discord.js/src/util/Sweepers.js 0000664 00000044263 15114741631 0015200 0 ustar 00 'use strict'; const { setInterval, clearInterval } = require('node:timers'); const { ThreadChannelTypes, SweeperKeys } = require('./Constants'); const Events = require('./Events'); const { DiscordjsTypeError, ErrorCodes } = require('../errors'); /** * @typedef {Function} GlobalSweepFilter * @returns {?Function} Return `null` to skip sweeping, otherwise a function passed to `sweep()`, * See {@link https://discord.js.org/docs/packages/collection/stable/Collection:Class#sweep Collection#sweep} * for the definition of this function. */ /** * A container for all cache sweeping intervals and their associated sweep methods. */ class Sweepers { constructor(client, options) { /** * The client that instantiated this * @type {Client} * @readonly */ Object.defineProperty(this, 'client', { value: client }); /** * The options the sweepers were instantiated with * @type {SweeperOptions} */ this.options = options; /** * A record of interval timeout that is used to sweep the indicated items, or null if not being swept * @type {Object<SweeperKey, ?Timeout>} */ this.intervals = Object.fromEntries(SweeperKeys.map(key => [key, null])); for (const key of SweeperKeys) { if (!(key in options)) continue; this._validateProperties(key); const clonedOptions = { ...this.options[key] }; // Handle cases that have a "lifetime" if (!('filter' in clonedOptions)) { switch (key) { case 'invites': clonedOptions.filter = this.constructor.expiredInviteSweepFilter(clonedOptions.lifetime); break; case 'messages': clonedOptions.filter = this.constructor.outdatedMessageSweepFilter(clonedOptions.lifetime); break; case 'threads': clonedOptions.filter = this.constructor.archivedThreadSweepFilter(clonedOptions.lifetime); } } this._initInterval(key, `sweep${key[0].toUpperCase()}${key.slice(1)}`, clonedOptions); } } /** * Sweeps all guild and global application commands and removes the ones which are indicated by the filter. * @param {Function} filter The function used to determine which commands will be removed from the caches. * @returns {number} Amount of commands that were removed from the caches */ sweepApplicationCommands(filter) { const { guilds, items: guildCommands } = this._sweepGuildDirectProp('commands', filter, { emit: false }); const globalCommands = this.client.application?.commands.cache.sweep(filter) ?? 0; this.client.emit( Events.CacheSweep, `Swept ${globalCommands} global application commands and ${guildCommands} guild commands in ${guilds} guilds.`, ); return guildCommands + globalCommands; } /** * Sweeps all auto moderation rules and removes the ones which are indicated by the filter. * @param {Function} filter The function used to determine * which auto moderation rules will be removed from the caches * @returns {number} Amount of auto moderation rules that were removed from the caches */ sweepAutoModerationRules(filter) { return this._sweepGuildDirectProp('autoModerationRules', filter).items; } /** * Sweeps all guild bans and removes the ones which are indicated by the filter. * @param {Function} filter The function used to determine which bans will be removed from the caches. * @returns {number} Amount of bans that were removed from the caches */ sweepBans(filter) { return this._sweepGuildDirectProp('bans', filter).items; } /** * Sweeps all guild emojis and removes the ones which are indicated by the filter. * @param {Function} filter The function used to determine which emojis will be removed from the caches. * @returns {number} Amount of emojis that were removed from the caches */ sweepEmojis(filter) { return this._sweepGuildDirectProp('emojis', filter).items; } /** * Sweeps all client application entitlements and removes the ones which are indicated by the filter. * @param {Function} filter The function used to determine which entitlements will be removed from the caches. * @returns {number} Amount of entitlements that were removed from the caches */ sweepEntitlements(filter) { if (typeof filter !== 'function') { throw new DiscordjsTypeError(ErrorCodes.InvalidType, 'filter', 'function'); } const entitlements = this.client.application.entitlements.cache.sweep(filter); this.client.emit(Events.CacheSweep, `Swept ${entitlements} entitlements.`); return entitlements; } /** * Sweeps all guild invites and removes the ones which are indicated by the filter. * @param {Function} filter The function used to determine which invites will be removed from the caches. * @returns {number} Amount of invites that were removed from the caches */ sweepInvites(filter) { return this._sweepGuildDirectProp('invites', filter).items; } /** * Sweeps all guild members and removes the ones which are indicated by the filter. * <info>It is highly recommended to keep the client guild member cached</info> * @param {Function} filter The function used to determine which guild members will be removed from the caches. * @returns {number} Amount of guild members that were removed from the caches */ sweepGuildMembers(filter) { return this._sweepGuildDirectProp('members', filter, { outputName: 'guild members' }).items; } /** * Sweeps all text-based channels' messages and removes the ones which are indicated by the filter. * @param {Function} filter The function used to determine which messages will be removed from the caches. * @returns {number} Amount of messages that were removed from the caches * @example * // Remove all messages older than 1800 seconds from the messages cache * const amount = sweepers.sweepMessages( * Sweepers.filterByLifetime({ * lifetime: 1800, * getComparisonTimestamp: m => m.editedTimestamp ?? m.createdTimestamp, * })(), * ); * console.log(`Successfully removed ${amount} messages from the cache.`); */ sweepMessages(filter) { if (typeof filter !== 'function') { throw new DiscordjsTypeError(ErrorCodes.InvalidType, 'filter', 'function'); } let channels = 0; let messages = 0; for (const channel of this.client.channels.cache.values()) { if (!channel.isTextBased()) continue; channels++; messages += channel.messages.cache.sweep(filter); } this.client.emit(Events.CacheSweep, `Swept ${messages} messages in ${channels} text-based channels.`); return messages; } /** * Sweeps all presences and removes the ones which are indicated by the filter. * @param {Function} filter The function used to determine which presences will be removed from the caches. * @returns {number} Amount of presences that were removed from the caches */ sweepPresences(filter) { return this._sweepGuildDirectProp('presences', filter).items; } /** * Sweeps all message reactions and removes the ones which are indicated by the filter. * @param {Function} filter The function used to determine which reactions will be removed from the caches. * @returns {number} Amount of reactions that were removed from the caches */ sweepReactions(filter) { if (typeof filter !== 'function') { throw new DiscordjsTypeError(ErrorCodes.InvalidType, 'filter', 'function'); } let channels = 0; let messages = 0; let reactions = 0; for (const channel of this.client.channels.cache.values()) { if (!channel.isTextBased()) continue; channels++; for (const message of channel.messages.cache.values()) { messages++; reactions += message.reactions.cache.sweep(filter); } } this.client.emit( Events.CacheSweep, `Swept ${reactions} reactions on ${messages} messages in ${channels} text-based channels.`, ); return reactions; } /** * Sweeps all guild stage instances and removes the ones which are indicated by the filter. * @param {Function} filter The function used to determine which stage instances will be removed from the caches. * @returns {number} Amount of stage instances that were removed from the caches */ sweepStageInstances(filter) { return this._sweepGuildDirectProp('stageInstances', filter, { outputName: 'stage instances' }).items; } /** * Sweeps all guild stickers and removes the ones which are indicated by the filter. * @param {Function} filter The function used to determine which stickers will be removed from the caches. * @returns {number} Amount of stickers that were removed from the caches */ sweepStickers(filter) { return this._sweepGuildDirectProp('stickers', filter).items; } /** * Sweeps all thread members and removes the ones which are indicated by the filter. * <info>It is highly recommended to keep the client thread member cached</info> * @param {Function} filter The function used to determine which thread members will be removed from the caches. * @returns {number} Amount of thread members that were removed from the caches */ sweepThreadMembers(filter) { if (typeof filter !== 'function') { throw new DiscordjsTypeError(ErrorCodes.InvalidType, 'filter', 'function'); } let threads = 0; let members = 0; for (const channel of this.client.channels.cache.values()) { if (!ThreadChannelTypes.includes(channel.type)) continue; threads++; members += channel.members.cache.sweep(filter); } this.client.emit(Events.CacheSweep, `Swept ${members} thread members in ${threads} threads.`); return members; } /** * Sweeps all threads and removes the ones which are indicated by the filter. * @param {Function} filter The function used to determine which threads will be removed from the caches. * @returns {number} filter Amount of threads that were removed from the caches * @example * // Remove all threads archived greater than 1 day ago from all the channel caches * const amount = sweepers.sweepThreads( * Sweepers.filterByLifetime({ * getComparisonTimestamp: t => t.archivedTimestamp, * excludeFromSweep: t => !t.archived, * })(), * ); * console.log(`Successfully removed ${amount} threads from the cache.`); */ sweepThreads(filter) { if (typeof filter !== 'function') { throw new DiscordjsTypeError(ErrorCodes.InvalidType, 'filter', 'function'); } let threads = 0; for (const [key, val] of this.client.channels.cache.entries()) { if (!ThreadChannelTypes.includes(val.type)) continue; if (filter(val, key, this.client.channels.cache)) { threads++; this.client.channels._remove(key); } } this.client.emit(Events.CacheSweep, `Swept ${threads} threads.`); return threads; } /** * Sweeps all users and removes the ones which are indicated by the filter. * @param {Function} filter The function used to determine which users will be removed from the caches. * @returns {number} Amount of users that were removed from the caches */ sweepUsers(filter) { if (typeof filter !== 'function') { throw new DiscordjsTypeError(ErrorCodes.InvalidType, 'filter', 'function'); } const users = this.client.users.cache.sweep(filter); this.client.emit(Events.CacheSweep, `Swept ${users} users.`); return users; } /** * Sweeps all guild voice states and removes the ones which are indicated by the filter. * @param {Function} filter The function used to determine which voice states will be removed from the caches. * @returns {number} Amount of voice states that were removed from the caches */ sweepVoiceStates(filter) { return this._sweepGuildDirectProp('voiceStates', filter, { outputName: 'voice states' }).items; } /** * Cancels all sweeping intervals * @returns {void} */ destroy() { for (const key of SweeperKeys) { if (this.intervals[key]) clearInterval(this.intervals[key]); } } /** * Options for generating a filter function based on lifetime * @typedef {Object} LifetimeFilterOptions * @property {number} [lifetime=14400] How long, in seconds, an entry should stay in the collection * before it is considered sweepable. * @property {Function} [getComparisonTimestamp=e => e?.createdTimestamp] A function that takes an entry, key, * and the collection and returns a timestamp to compare against in order to determine the lifetime of the entry. * @property {Function} [excludeFromSweep=() => false] A function that takes an entry, key, and the collection * and returns a boolean, `true` when the entry should not be checked for sweepability. */ /** * Create a sweepFilter function that uses a lifetime to determine sweepability. * @param {LifetimeFilterOptions} [options={}] The options used to generate the filter function * @returns {GlobalSweepFilter} */ static filterByLifetime({ lifetime = 14400, getComparisonTimestamp = e => e?.createdTimestamp, excludeFromSweep = () => false, } = {}) { if (typeof lifetime !== 'number') { throw new DiscordjsTypeError(ErrorCodes.InvalidType, 'lifetime', 'number'); } if (typeof getComparisonTimestamp !== 'function') { throw new DiscordjsTypeError(ErrorCodes.InvalidType, 'getComparisonTimestamp', 'function'); } if (typeof excludeFromSweep !== 'function') { throw new DiscordjsTypeError(ErrorCodes.InvalidType, 'excludeFromSweep', 'function'); } return () => { if (lifetime <= 0) return null; const lifetimeMs = lifetime * 1_000; const now = Date.now(); return (entry, key, coll) => { if (excludeFromSweep(entry, key, coll)) { return false; } const comparisonTimestamp = getComparisonTimestamp(entry, key, coll); if (!comparisonTimestamp || typeof comparisonTimestamp !== 'number') return false; return now - comparisonTimestamp > lifetimeMs; }; }; } /** * Creates a sweep filter that sweeps archived threads * @param {number} [lifetime=14400] How long a thread has to be archived to be valid for sweeping * @returns {GlobalSweepFilter} */ static archivedThreadSweepFilter(lifetime = 14400) { return this.filterByLifetime({ lifetime, getComparisonTimestamp: e => e.archiveTimestamp, excludeFromSweep: e => !e.archived, }); } /** * Creates a sweep filter that sweeps expired invites * @param {number} [lifetime=14400] How long ago an invite has to have expired to be valid for sweeping * @returns {GlobalSweepFilter} */ static expiredInviteSweepFilter(lifetime = 14400) { return this.filterByLifetime({ lifetime, getComparisonTimestamp: i => i.expiresTimestamp, }); } /** * Creates a sweep filter that sweeps outdated messages (edits taken into account) * @param {number} [lifetime=3600] How long ago a message has to have been sent or edited to be valid for sweeping * @returns {GlobalSweepFilter} */ static outdatedMessageSweepFilter(lifetime = 3600) { return this.filterByLifetime({ lifetime, getComparisonTimestamp: m => m.editedTimestamp ?? m.createdTimestamp, }); } /** * Configuration options for emitting the cache sweep client event * @typedef {Object} SweepEventOptions * @property {boolean} [emit=true] Whether to emit the client event in this method * @property {string} [outputName] A name to output in the client event if it should differ from the key * @private */ /** * Sweep a direct sub property of all guilds * @param {string} key The name of the property * @param {Function} filter Filter function passed to sweep * @param {SweepEventOptions} [eventOptions={}] Options for the Client event emitted here * @returns {Object} Object containing the number of guilds swept and the number of items swept * @private */ _sweepGuildDirectProp(key, filter, { emit = true, outputName } = {}) { if (typeof filter !== 'function') { throw new DiscordjsTypeError(ErrorCodes.InvalidType, 'filter', 'function'); } let guilds = 0; let items = 0; for (const guild of this.client.guilds.cache.values()) { // We may be unable to sweep the cache if the guild is unavailable and was never patched if (!guild.available) continue; const { cache } = guild[key]; guilds++; items += cache.sweep(filter); } if (emit) { this.client.emit(Events.CacheSweep, `Swept ${items} ${outputName ?? key} in ${guilds} guilds.`); } return { guilds, items }; } /** * Validates a set of properties * @param {string} key Key of the options object to check * @private */ _validateProperties(key) { const props = this.options[key]; if (typeof props !== 'object') { throw new DiscordjsTypeError(ErrorCodes.InvalidType, `sweepers.${key}`, 'object', true); } if (typeof props.interval !== 'number') { throw new DiscordjsTypeError(ErrorCodes.InvalidType, `sweepers.${key}.interval`, 'number'); } // Invites, Messages, and Threads can be provided a lifetime parameter, which we use to generate the filter if (['invites', 'messages', 'threads'].includes(key) && !('filter' in props)) { if (typeof props.lifetime !== 'number') { throw new DiscordjsTypeError(ErrorCodes.InvalidType, `sweepers.${key}.lifetime`, 'number'); } return; } if (typeof props.filter !== 'function') { throw new DiscordjsTypeError(ErrorCodes.InvalidType, `sweepers.${key}.filter`, 'function'); } } /** * Initialize an interval for sweeping * @param {string} intervalKey The name of the property that stores the interval for this sweeper * @param {string} sweepKey The name of the function that sweeps the desired caches * @param {Object} opts Validated options for a sweep * @private */ _initInterval(intervalKey, sweepKey, opts) { if (opts.interval <= 0 || opts.interval === Infinity) return; this.intervals[intervalKey] = setInterval(() => { const sweepFn = opts.filter(); if (sweepFn === null) return; if (typeof sweepFn !== 'function') throw new DiscordjsTypeError(ErrorCodes.SweepFilterReturn); this[sweepKey](sweepFn); }, opts.interval * 1_000).unref(); } } module.exports = Sweepers; node_modules/discord.js/src/util/GuildMemberFlagsBitField.js 0000664 00000002172 15114741631 0020150 0 ustar 00 'use strict'; const { GuildMemberFlags } = require('discord-api-types/v10'); const BitField = require('./BitField'); /** * Data structure that makes it easy to interact with a {@link GuildMember#flags} bitfield. * @extends {BitField} */ class GuildMemberFlagsBitField extends BitField { /** * Numeric guild guild member flags. * @type {GuildMemberFlags} * @memberof GuildMemberFlagsBitField */ static Flags = GuildMemberFlags; } /** * @name GuildMemberFlagsBitField * @kind constructor * @memberof GuildMemberFlagsBitField * @param {BitFieldResolvable} [bits=0] Bit(s) to read from */ /** * Bitfield of the packed bits * @type {number} * @name GuildMemberFlagsBitField#bitfield */ /** * Data that can be resolved to give a guild member flag bitfield. This can be: * * A string (see {@link GuildMemberFlagsBitField.Flags}) * * A guild member flag * * An instance of GuildMemberFlagsBitField * * An Array of GuildMemberFlagsResolvable * @typedef {string|number|GuildMemberFlagsBitField|GuildMemberFlagsResolvable[]} GuildMemberFlagsResolvable */ exports.GuildMemberFlagsBitField = GuildMemberFlagsBitField; node_modules/discord.js/src/util/ApplicationFlagsBitField.js 0000664 00000002202 15114741631 0020211 0 ustar 00 'use strict'; const { ApplicationFlags } = require('discord-api-types/v10'); const BitField = require('./BitField'); /** * Data structure that makes it easy to interact with a {@link ClientApplication#flags} bitfield. * @extends {BitField} */ class ApplicationFlagsBitField extends BitField { /** * Numeric application flags. All available properties: * @type {ApplicationFlags} * @memberof ApplicationFlagsBitField */ static Flags = ApplicationFlags; } /** * @name ApplicationFlagsBitField * @kind constructor * @memberof ApplicationFlagsBitField * @param {BitFieldResolvable} [bits=0] Bit(s) to read from */ /** * Bitfield of the packed bits * @type {number} * @name ApplicationFlagsBitField#bitfield */ /** * Data that can be resolved to give an application flag bit field. This can be: * * A string (see {@link ApplicationFlagsBitField.Flags}) * * An application flag * * An instance of ApplicationFlagsBitField * * An Array of ApplicationFlagsResolvable * @typedef {string|number|ApplicationFlagsBitField|ApplicationFlagsResolvable[]} ApplicationFlagsResolvable */ module.exports = ApplicationFlagsBitField; node_modules/discord.js/src/util/ChannelFlagsBitField.js 0000664 00000002035 15114741631 0017322 0 ustar 00 'use strict'; const { ChannelFlags } = require('discord-api-types/v10'); const BitField = require('./BitField'); /** * Data structure that makes it easy to interact with a {@link BaseChannel#flags} bitfield. * @extends {BitField} */ class ChannelFlagsBitField extends BitField { /** * Numeric guild channel flags. * @type {ChannelFlags} * @memberof ChannelFlagsBitField */ static Flags = ChannelFlags; } /** * @name ChannelFlagsBitField * @kind constructor * @memberof ChannelFlagsBitField * @param {BitFieldResolvable} [bits=0] Bit(s) to read from */ /** * Bitfield of the packed bits * @type {number} * @name ChannelFlagsBitField#bitfield */ /** * Data that can be resolved to give a channel flag bitfield. This can be: * * A string (see {@link ChannelFlagsBitField.Flags}) * * A channel flag * * An instance of ChannelFlagsBitField * * An Array of ChannelFlagsResolvable * @typedef {string|number|ChannelFlagsBitField|ChannelFlagsResolvable[]} ChannelFlagsResolvable */ module.exports = ChannelFlagsBitField; node_modules/discord.js/src/util/Constants.js 0000664 00000021563 15114741631 0015355 0 ustar 00 'use strict'; const { ChannelType, MessageType, ComponentType, ImageFormat, StickerFormatType } = require('discord-api-types/v10'); /** * Max bulk deletable message age * @typedef {number} MaxBulkDeletableMessageAge */ exports.MaxBulkDeletableMessageAge = 1_209_600_000; /** * The name of an item to be swept in Sweepers * * `autoModerationRules` * * `applicationCommands` - both global and guild commands * * `bans` * * `emojis` * * `entitlements` * * `invites` - accepts the `lifetime` property, using it will sweep based on expires timestamp * * `guildMembers` * * `messages` - accepts the `lifetime` property, using it will sweep based on edited or created timestamp * * `presences` * * `reactions` * * `stageInstances` * * `stickers` * * `threadMembers` * * `threads` - accepts the `lifetime` property, using it will sweep archived threads based on archived timestamp * * `users` * * `voiceStates` * @typedef {string} SweeperKey */ exports.SweeperKeys = [ 'autoModerationRules', 'applicationCommands', 'bans', 'emojis', 'entitlements', 'invites', 'guildMembers', 'messages', 'presences', 'reactions', 'stageInstances', 'stickers', 'threadMembers', 'threads', 'users', 'voiceStates', ]; /** * The types of messages that are not `System`. The available types are: * * {@link MessageType.Default} * * {@link MessageType.Reply} * * {@link MessageType.ChatInputCommand} * * {@link MessageType.ContextMenuCommand} * @typedef {MessageType[]} NonSystemMessageTypes */ exports.NonSystemMessageTypes = [ MessageType.Default, MessageType.Reply, MessageType.ChatInputCommand, MessageType.ContextMenuCommand, ]; /** * The guild channels that are text-based. * * TextChannel * * NewsChannel * * ThreadChannel * * VoiceChannel * * StageChannel * @typedef {TextChannel|NewsChannel|ThreadChannel|VoiceChannel|StageChannel} GuildTextBasedChannel */ /** * The types of guild channels that are text-based. The available types are: * * {@link ChannelType.GuildText} * * {@link ChannelType.GuildAnnouncement} * * {@link ChannelType.AnnouncementThread} * * {@link ChannelType.PublicThread} * * {@link ChannelType.PrivateThread} * * {@link ChannelType.GuildVoice} * * {@link ChannelType.GuildStageVoice} * @typedef {ChannelType[]} GuildTextBasedChannelTypes */ exports.GuildTextBasedChannelTypes = [ ChannelType.GuildText, ChannelType.GuildAnnouncement, ChannelType.AnnouncementThread, ChannelType.PublicThread, ChannelType.PrivateThread, ChannelType.GuildVoice, ChannelType.GuildStageVoice, ]; /** * The channels that are text-based. * * {@link DMChannel} * * {@link GuildTextBasedChannel} * @typedef {DMChannel|GuildTextBasedChannel} TextBasedChannels */ /** * Data that resolves to give a text-based channel. This can be: * * A {@link TextBasedChannel} * * A {@link Snowflake} * @typedef {TextBasedChannels|Snowflake} TextBasedChannelsResolvable */ /** * The types of channels that are text-based. The available types are: * * {@link ChannelType.DM} * * {@link ChannelType.GuildText} * * {@link ChannelType.GuildAnnouncement} * * {@link ChannelType.AnnouncementThread} * * {@link ChannelType.PublicThread} * * {@link ChannelType.PrivateThread} * * {@link ChannelType.GuildVoice} * * {@link ChannelType.GuildStageVoice} * * {@link ChannelType.GroupDM} * @typedef {ChannelType[]} TextBasedChannelTypes */ exports.TextBasedChannelTypes = [...exports.GuildTextBasedChannelTypes, ChannelType.DM, ChannelType.GroupDM]; /** * The types of channels that are text-based and can have messages sent into. The available types are: * * {@link ChannelType.DM} * * {@link ChannelType.GuildText} * * {@link ChannelType.GuildAnnouncement} * * {@link ChannelType.AnnouncementThread} * * {@link ChannelType.PublicThread} * * {@link ChannelType.PrivateThread} * * {@link ChannelType.GuildVoice} * * {@link ChannelType.GuildStageVoice} * @typedef {ChannelType[]} SendableChannels */ exports.SendableChannels = [...exports.GuildTextBasedChannelTypes, ChannelType.DM]; /** * The types of channels that are threads. The available types are: * * {@link ChannelType.AnnouncementThread} * * {@link ChannelType.PublicThread} * * {@link ChannelType.PrivateThread} * @typedef {ChannelType[]} ThreadChannelTypes */ exports.ThreadChannelTypes = [ChannelType.AnnouncementThread, ChannelType.PublicThread, ChannelType.PrivateThread]; /** * The types of channels that are voice-based. The available types are: * * {@link ChannelType.GuildVoice} * * {@link ChannelType.GuildStageVoice} * @typedef {ChannelType[]} VoiceBasedChannelTypes */ exports.VoiceBasedChannelTypes = [ChannelType.GuildVoice, ChannelType.GuildStageVoice]; /** * The types of select menus. The available types are: * * {@link ComponentType.StringSelect} * * {@link ComponentType.UserSelect} * * {@link ComponentType.RoleSelect} * * {@link ComponentType.MentionableSelect} * * {@link ComponentType.ChannelSelect} * @typedef {ComponentType[]} SelectMenuTypes */ exports.SelectMenuTypes = [ ComponentType.StringSelect, ComponentType.UserSelect, ComponentType.RoleSelect, ComponentType.MentionableSelect, ComponentType.ChannelSelect, ]; /** * The types of messages that cannot be deleted. The available types are: * * {@link MessageType.RecipientAdd} * * {@link MessageType.RecipientRemove} * * {@link MessageType.Call} * * {@link MessageType.ChannelNameChange} * * {@link MessageType.ChannelIconChange} * * {@link MessageType.ThreadStarterMessage} * @typedef {MessageType[]} UndeletableMessageTypes */ exports.UndeletableMessageTypes = [ MessageType.RecipientAdd, MessageType.RecipientRemove, MessageType.Call, MessageType.ChannelNameChange, MessageType.ChannelIconChange, MessageType.ThreadStarterMessage, ]; /** * The types of messages that can be deleted. The available types are: * * {@link MessageType.AutoModerationAction} * * {@link MessageType.ChannelFollowAdd} * * {@link MessageType.ChannelPinnedMessage} * * {@link MessageType.ChatInputCommand} * * {@link MessageType.ContextMenuCommand} * * {@link MessageType.Default} * * {@link MessageType.GuildBoost} * * {@link MessageType.GuildBoostTier1} * * {@link MessageType.GuildBoostTier2} * * {@link MessageType.GuildBoostTier3} * * {@link MessageType.GuildInviteReminder} * * {@link MessageType.InteractionPremiumUpsell} * * {@link MessageType.Reply} * * {@link MessageType.RoleSubscriptionPurchase} * * {@link MessageType.StageEnd} * * {@link MessageType.StageRaiseHand} * * {@link MessageType.StageSpeaker} * * {@link MessageType.StageStart} * * {@link MessageType.StageTopic} * * {@link MessageType.ThreadCreated} * * {@link MessageType.UserJoin} * @typedef {MessageType[]} DeletableMessageTypes * @deprecated This list will no longer be updated. Use {@link UndeletableMessageTypes} instead. */ exports.DeletableMessageTypes = [ MessageType.AutoModerationAction, MessageType.ChannelFollowAdd, MessageType.ChannelPinnedMessage, MessageType.ChatInputCommand, MessageType.ContextMenuCommand, MessageType.Default, MessageType.GuildBoost, MessageType.GuildBoostTier1, MessageType.GuildBoostTier2, MessageType.GuildBoostTier3, MessageType.GuildInviteReminder, MessageType.InteractionPremiumUpsell, MessageType.Reply, MessageType.RoleSubscriptionPurchase, MessageType.StageEnd, MessageType.StageRaiseHand, MessageType.StageSpeaker, MessageType.StageStart, MessageType.StageTopic, MessageType.ThreadCreated, MessageType.UserJoin, ]; /** * A mapping between sticker formats and their respective image formats. * * {@link StickerFormatType.PNG} -> {@link ImageFormat.PNG} * * {@link StickerFormatType.APNG} -> {@link ImageFormat.PNG} * * {@link StickerFormatType.Lottie} -> {@link ImageFormat.Lottie} * * {@link StickerFormatType.GIF} -> {@link ImageFormat.GIF} * @typedef {Object} StickerFormatExtensionMap */ exports.StickerFormatExtensionMap = { [StickerFormatType.PNG]: ImageFormat.PNG, [StickerFormatType.APNG]: ImageFormat.PNG, [StickerFormatType.Lottie]: ImageFormat.Lottie, [StickerFormatType.GIF]: ImageFormat.GIF, }; /** * @typedef {Object} Constants Constants that can be used in an enum or object-like way. * @property {number} MaxBulkDeletableMessageAge Max bulk deletable message age * @property {SweeperKey[]} SweeperKeys The possible names of items that can be swept in sweepers * @property {NonSystemMessageTypes} NonSystemMessageTypes The types of messages that are not deemed a system type * @property {TextBasedChannelTypes} TextBasedChannelTypes The types of channels that are text-based * @property {ThreadChannelTypes} ThreadChannelTypes The types of channels that are threads * @property {VoiceBasedChannelTypes} VoiceBasedChannelTypes The types of channels that are voice-based * @property {SelectMenuTypes} SelectMenuTypes The types of components that are select menus. * @property {Object} StickerFormatExtensionMap A mapping between sticker formats and their respective image formats. */ node_modules/discord.js/src/util/Status.js 0000664 00000001167 15114741631 0014662 0 ustar 00 'use strict'; const { createEnum } = require('./Enums'); /** * @typedef {Object} Status * @property {number} Ready * @property {number} Connecting * @property {number} Reconnecting * @property {number} Idle * @property {number} Nearly * @property {number} Disconnected * @property {number} WaitingForGuilds * @property {number} Identifying * @property {number} Resuming */ // JSDoc for IntelliSense purposes /** * @type {Status} * @ignore */ module.exports = createEnum([ 'Ready', 'Connecting', 'Reconnecting', 'Idle', 'Nearly', 'Disconnected', 'WaitingForGuilds', 'Identifying', 'Resuming', ]); node_modules/discord.js/src/util/SKUFlagsBitField.js 0000664 00000001104 15114741631 0016410 0 ustar 00 'use strict'; const { SKUFlags } = require('discord-api-types/v10'); const BitField = require('./BitField'); /** * Data structure that makes it easy to interact with an {@link SKU#flags} bitfield. * @extends {BitField} */ class SKUFlagsBitField extends BitField { /** * Numeric SKU flags. * @type {SKUFlags} * @memberof SKUFlagsBitField */ static Flags = SKUFlags; } /** * @name SKUFlagsBitField * @kind constructor * @memberof SKUFlagsBitField * @param {BitFieldResolvable} [bits=0] Bit(s) to read from */ exports.SKUFlagsBitField = SKUFlagsBitField; node_modules/discord.js/src/util/AttachmentFlagsBitField.js 0000664 00000001200 15114741631 0020033 0 ustar 00 'use strict'; const { AttachmentFlags } = require('discord-api-types/v10'); const BitField = require('./BitField'); /** * Data structure that makes it easy to interact with an {@link Attachment#flags} bitfield. * @extends {BitField} */ class AttachmentFlagsBitField extends BitField { /** * Numeric attachment flags. * @type {AttachmentFlags} * @memberof AttachmentFlagsBitField */ static Flags = AttachmentFlags; } /** * @name AttachmentFlagsBitField * @kind constructor * @memberof AttachmentFlagsBitField * @param {BitFieldResolvable} [bits=0] Bit(s) to read from */ module.exports = AttachmentFlagsBitField; node_modules/discord.js/src/util/Channels.js 0000664 00000012417 15114741631 0015132 0 ustar 00 'use strict'; const { lazy } = require('@discordjs/util'); const { ChannelType } = require('discord-api-types/v10'); const getCategoryChannel = lazy(() => require('../structures/CategoryChannel')); const getDMChannel = lazy(() => require('../structures/DMChannel')); const getNewsChannel = lazy(() => require('../structures/NewsChannel')); const getStageChannel = lazy(() => require('../structures/StageChannel')); const getTextChannel = lazy(() => require('../structures/TextChannel')); const getThreadChannel = lazy(() => require('../structures/ThreadChannel')); const getVoiceChannel = lazy(() => require('../structures/VoiceChannel')); const getDirectoryChannel = lazy(() => require('../structures/DirectoryChannel')); const getPartialGroupDMChannel = lazy(() => require('../structures/PartialGroupDMChannel')); const getForumChannel = lazy(() => require('../structures/ForumChannel')); const getMediaChannel = lazy(() => require('../structures/MediaChannel')); /** * Extra options for creating a channel. * @typedef {Object} CreateChannelOptions * @property {boolean} [allowFromUnknownGuild] Whether to allow creating a channel from an unknown guild * @private */ /** * Creates a discord.js channel from data received from the API. * @param {Client} client The client * @param {APIChannel} data The data of the channel to create * @param {Guild} [guild] The guild where this channel belongs * @param {CreateChannelOptions} [extras] Extra information to supply for creating this channel * @returns {BaseChannel} Any kind of channel. * @ignore */ function createChannel(client, data, guild, { allowUnknownGuild } = {}) { let channel; if (!data.guild_id && !guild) { if ((data.recipients && data.type !== ChannelType.GroupDM) || data.type === ChannelType.DM) { channel = new (getDMChannel())(client, data); } else if (data.type === ChannelType.GroupDM) { channel = new (getPartialGroupDMChannel())(client, data); } } else { guild ??= client.guilds.cache.get(data.guild_id); if (guild || allowUnknownGuild) { switch (data.type) { case ChannelType.GuildText: { channel = new (getTextChannel())(guild, data, client); break; } case ChannelType.GuildVoice: { channel = new (getVoiceChannel())(guild, data, client); break; } case ChannelType.GuildCategory: { channel = new (getCategoryChannel())(guild, data, client); break; } case ChannelType.GuildAnnouncement: { channel = new (getNewsChannel())(guild, data, client); break; } case ChannelType.GuildStageVoice: { channel = new (getStageChannel())(guild, data, client); break; } case ChannelType.AnnouncementThread: case ChannelType.PublicThread: case ChannelType.PrivateThread: { channel = new (getThreadChannel())(guild, data, client); if (!allowUnknownGuild) channel.parent?.threads.cache.set(channel.id, channel); break; } case ChannelType.GuildDirectory: channel = new (getDirectoryChannel())(guild, data, client); break; case ChannelType.GuildForum: channel = new (getForumChannel())(guild, data, client); break; case ChannelType.GuildMedia: channel = new (getMediaChannel())(guild, data, client); break; } if (channel && !allowUnknownGuild) guild.channels?.cache.set(channel.id, channel); } } return channel; } /** * Transforms an API guild forum tag to camel-cased guild forum tag. * @param {APIGuildForumTag} tag The tag to transform * @returns {GuildForumTag} * @ignore */ function transformAPIGuildForumTag(tag) { return { id: tag.id, name: tag.name, moderated: tag.moderated, emoji: (tag.emoji_id ?? tag.emoji_name) ? { id: tag.emoji_id, name: tag.emoji_name, } : null, }; } /** * Transforms a camel-cased guild forum tag to an API guild forum tag. * @param {GuildForumTag} tag The tag to transform * @returns {APIGuildForumTag} * @ignore */ function transformGuildForumTag(tag) { return { id: tag.id, name: tag.name, moderated: tag.moderated, emoji_id: tag.emoji?.id ?? null, emoji_name: tag.emoji?.name ?? null, }; } /** * Transforms an API guild forum default reaction object to a * camel-cased guild forum default reaction object. * @param {APIGuildForumDefaultReactionEmoji} defaultReaction The default reaction to transform * @returns {DefaultReactionEmoji} * @ignore */ function transformAPIGuildDefaultReaction(defaultReaction) { return { id: defaultReaction.emoji_id, name: defaultReaction.emoji_name, }; } /** * Transforms a camel-cased guild forum default reaction object to an * API guild forum default reaction object. * @param {DefaultReactionEmoji} defaultReaction The default reaction to transform * @returns {APIGuildForumDefaultReactionEmoji} * @ignore */ function transformGuildDefaultReaction(defaultReaction) { return { emoji_id: defaultReaction.id, emoji_name: defaultReaction.name, }; } module.exports = { createChannel, transformAPIGuildForumTag, transformGuildForumTag, transformAPIGuildDefaultReaction, transformGuildDefaultReaction, }; node_modules/discord.js/src/util/MessageFlagsBitField.js 0000664 00000002037 15114741631 0017340 0 ustar 00 'use strict'; const { MessageFlags } = require('discord-api-types/v10'); const BitField = require('./BitField'); /** * Data structure that makes it easy to interact with a {@link Message#flags} bitfield. * @extends {BitField} */ class MessageFlagsBitField extends BitField { /** * Numeric message flags. * @type {MessageFlags} * @memberof MessageFlagsBitField */ static Flags = MessageFlags; } /** * @name MessageFlagsBitField * @kind constructor * @memberof MessageFlagsBitField * @param {BitFieldResolvable} [bits=0] Bit(s) to read from */ /** * Data that can be resolved to give a message flags bit field. This can be: * * A string (see {@link MessageFlagsBitField.Flags}) * * A message flag * * An instance of {@link MessageFlagsBitField} * * An array of `MessageFlagsResolvable` * @typedef {string|number|MessageFlagsBitField|MessageFlagsResolvable[]} MessageFlagsResolvable */ /** * Bitfield of the packed bits * @type {number} * @name MessageFlagsBitField#bitfield */ module.exports = MessageFlagsBitField; node_modules/discord.js/src/util/PermissionsBitField.js 0000664 00000006545 15114741631 0017322 0 ustar 00 'use strict'; const { PermissionFlagsBits } = require('discord-api-types/v10'); const BitField = require('./BitField'); /** * Data structure that makes it easy to interact with a permission bitfield. All {@link GuildMember}s have a set of * permissions in their guild, and each channel in the guild may also have {@link PermissionOverwrites} for the member * that override their default permissions. * @extends {BitField} */ class PermissionsBitField extends BitField { /** * Numeric permission flags. * @type {PermissionFlagsBits} * @memberof PermissionsBitField * @see {@link https://discord.com/developers/docs/topics/permissions#permissions-bitwise-permission-flags} */ static Flags = PermissionFlagsBits; /** * Bitfield representing every permission combined * @type {bigint} * @memberof PermissionsBitField */ static All = Object.values(PermissionFlagsBits).reduce((all, p) => all | p, 0n); /** * Bitfield representing the default permissions for users * @type {bigint} * @memberof PermissionsBitField */ static Default = BigInt(104324673); /** * Bitfield representing the permissions required for moderators of stage channels * @type {bigint} * @memberof PermissionsBitField */ static StageModerator = PermissionFlagsBits.ManageChannels | PermissionFlagsBits.MuteMembers | PermissionFlagsBits.MoveMembers; /** * @type {bigint} * @memberof PermissionsBitField * @private */ static DefaultBit = BigInt(0); /** * Bitfield of the packed bits * @type {bigint} * @name PermissionsBitField#bitfield */ /** * Data that can be resolved to give a permission number. This can be: * * A string (see {@link PermissionsBitField.Flags}) * * A permission number * * An instance of {@link PermissionsBitField} * * An Array of PermissionResolvable * @typedef {string|bigint|PermissionsBitField|PermissionResolvable[]} PermissionResolvable */ /** * Gets all given bits that are missing from the bitfield. * @param {BitFieldResolvable} bits Bit(s) to check for * @param {boolean} [checkAdmin=true] Whether to allow the administrator permission to override * @returns {string[]} */ missing(bits, checkAdmin = true) { return checkAdmin && this.has(PermissionFlagsBits.Administrator) ? [] : super.missing(bits); } /** * Checks whether the bitfield has a permission, or any of multiple permissions. * @param {PermissionResolvable} permission Permission(s) to check for * @param {boolean} [checkAdmin=true] Whether to allow the administrator permission to override * @returns {boolean} */ any(permission, checkAdmin = true) { return (checkAdmin && super.has(PermissionFlagsBits.Administrator)) || super.any(permission); } /** * Checks whether the bitfield has a permission, or multiple permissions. * @param {PermissionResolvable} permission Permission(s) to check for * @param {boolean} [checkAdmin=true] Whether to allow the administrator permission to override * @returns {boolean} */ has(permission, checkAdmin = true) { return (checkAdmin && super.has(PermissionFlagsBits.Administrator)) || super.has(permission); } /** * Gets an {@link Array} of bitfield names based on the permissions available. * @returns {string[]} */ toArray() { return super.toArray(false); } } module.exports = PermissionsBitField; node_modules/discord.js/src/util/Symbols.js 0000664 00000000133 15114741631 0015017 0 ustar 00 'use strict'; exports.MakeCacheOverrideSymbol = Symbol('djs.managers.makeCacheOverride'); node_modules/discord.js/src/util/APITypes.js 0000664 00000044527 15114741631 0015044 0 ustar 00 /* eslint-disable max-len */ /** * @external ActivityFlags * @see {@link https://discord-api-types.dev/api/discord-api-types-v10/enum/ActivityFlags} */ /** * @external ActivityType * @see {@link https://discord-api-types.dev/api/discord-api-types-v10/enum/ActivityType} */ /** * @external APIActionRowComponent * @see {@link https://discord-api-types.dev/api/discord-api-types-v10/interface/APIActionRowComponent} */ /** * @external APIApplication * @see {@link https://discord-api-types.dev/api/discord-api-types-v10/interface/APIApplication} */ /** * @external APIApplicationCommand * @see {@link https://discord-api-types.dev/api/discord-api-types-v10/interface/APIApplicationCommand} */ /** * @external APIApplicationCommandOption * @see {@link https://discord-api-types.dev/api/discord-api-types-v10#APIApplicationCommandOption} */ /** * @external ApplicationIntegrationType * @see {@link https://discord-api-types.dev/api/discord-api-types-v10/enum/ApplicationIntegrationType} */ /** * @external APIAuthorizingIntegrationOwnersMap * @see {@link https://discord-api-types.dev/api/discord-api-types-v10#APIAuthorizingIntegrationOwnersMap} */ /** * @external APIAutoModerationAction * @see {@link https://discord-api-types.dev/api/discord-api-types-v10/interface/APIAutoModerationAction} */ /** * @external APIButtonComponent * @see {@link https://discord-api-types.dev/api/discord-api-types-v10#APIButtonComponent} */ /** * @external APIChannel * @see {@link https://discord-api-types.dev/api/discord-api-types-v10#APIChannel} */ /** * @external APIChannelSelectComponent * @see {@link https://discord-api-types.dev/api/discord-api-types-v10#APIChannelSelectComponent} */ /** * @external APIContainerComponent * @see {@link https://discord-api-types.dev/api/discord-api-types-v10/interface/APIContainerComponent} */ /** * @external APIEmbed * @see {@link https://discord-api-types.dev/api/discord-api-types-v10/interface/APIEmbed} */ /** * @external APIEmbedField * @see {@link https://discord-api-types.dev/api/discord-api-types-v10/interface/APIEmbedField} */ /** * @external APIEmbedProvider * @see {@link https://discord-api-types.dev/api/discord-api-types-v10/interface/APIEmbedProvider} */ /** * @external APIEmoji * @see {@link https://discord-api-types.dev/api/discord-api-types-v10/interface/APIEmoji} */ /** * @external APIFileComponent * @see {@link https://discord-api-types.dev/api/discord-api-types-v10/interface/APIFileComponent} */ /** * @external APIGuild * @see {@link https://discord-api-types.dev/api/discord-api-types-v10/interface/APIGuild} */ /** * @external APIGuildForumDefaultReactionEmoji * @see {@link https://discord-api-types.dev/api/discord-api-types-v10/interface/APIGuildForumDefaultReactionEmoji} */ /** * @external APIGuildForumTag * @see {@link https://discord-api-types.dev/api/discord-api-types-v10/interface/APIGuildForumTag} */ /** * @external APIGuildMember * @see {@link https://discord-api-types.dev/api/discord-api-types-v10/interface/APIGuildMember} */ /** * @external APIGuildScheduledEventRecurrenceRule * @see {@link https://discord-api-types.dev/api/discord-api-types-v10/interface/APIGuildScheduledEventRecurrenceRule} */ /** * @external APIIncidentsData * @see {@link https://discord-api-types.dev/api/discord-api-types-v10/interface/APIIncidentsData} */ /** * @external APIInteraction * @see {@link https://discord-api-types.dev/api/discord-api-types-v10#APIInteraction} */ /** * @external APIInteractionDataResolved * @see {@link https://discord-api-types.dev/api/discord-api-types-v10/interface/APIInteractionDataResolved} */ /** * @external APIInteractionDataResolvedChannel * @see {@link https://discord-api-types.dev/api/discord-api-types-v10/interface/APIInteractionDataResolvedChannel} */ /** * @external APIInteractionDataResolvedGuildMember * @see {@link https://discord-api-types.dev/api/discord-api-types-v10/interface/APIInteractionDataResolvedGuildMember} */ /** * @external APIInteractionGuildMember * @see {@link https://discord-api-types.dev/api/discord-api-types-v10/interface/APIInteractionGuildMember} */ /** * @external APIMediaGalleryComponent * @see {@link https://discord-api-types.dev/api/discord-api-types-v10/interface/APIMediaGalleryComponent} */ /** * @external APIMediaGalleryItem * @see {@link https://discord-api-types.dev/api/discord-api-types-v10/interface/APIMediaGalleryItem} */ /** * @external APIMentionableSelectComponent * @see {@link https://discord-api-types.dev/api/discord-api-types-v10#APIMentionableSelectComponent} */ /** * @external APIMessage * @see {@link https://discord-api-types.dev/api/discord-api-types-v10/interface/APIMessage} */ /** * @external APIComponentInMessageActionRow * @see {@link https://discord-api-types.dev/api/discord-api-types-v10#APIComponentInMessageActionRow} */ /** * @external APIMessageComponent * @see {@link https://discord-api-types.dev/api/discord-api-types-v10#APIMessageComponent} */ /** * @external APIMessageComponentEmoji * @see {@link https://discord-api-types.dev/api/discord-api-types-v10/interface/APIMessageComponentEmoji} */ /** * @external APIMessageInteractionMetadata * @see {@link https://discord-api-types.dev/api/discord-api-types-v10/interface/APIMessageInteractionMetadata} */ /** * @external APIMessageTopLevelComponent * @see {@link https://discord-api-types.dev/api/discord-api-types-v10#APIMessageTopLevelComponent} */ /** * @external APIModalInteractionResponse * @see {@link https://discord-api-types.dev/api/discord-api-types-v10/interface/APIModalInteractionResponse} */ /** * @external APIModalInteractionResponseCallbackData * @see {@link https://discord-api-types.dev/api/discord-api-types-v10/interface/APIModalInteractionResponseCallbackData} */ /** * @external APIModalComponent * @see {@link https://discord-api-types.dev/api/discord-api-types-v10#APIModalComponent} */ /** * @external APIModalSubmission * @see {@link https://discord-api-types.dev/api/discord-api-types-v10/interface/APIModalSubmission} */ /** * @external APIOverwrite * @see {@link https://discord-api-types.dev/api/discord-api-types-v10/interface/APIOverwrite} */ /** * @external APIPartialEmoji * @see {@link https://discord-api-types.dev/api/discord-api-types-v10/interface/APIPartialEmoji} */ /** * @external APIRole * @see {@link https://discord-api-types.dev/api/discord-api-types-v10/interface/APIRole} */ /** * @external APIRoleSelectComponent * @see {@link https://discord-api-types.dev/api/discord-api-types-v10#APIRoleSelectComponent} */ /** * @external APISectionComponent * @see {@link https://discord-api-types.dev/api/discord-api-types-v10/interface/APISectionComponent} */ /** * @external APISeparatorComponent * @see {@link https://discord-api-types.dev/api/discord-api-types-v10/interface/APISeparatorComponent} */ /** * @external APISelectMenuOption * @see {@link https://discord-api-types.dev/api/discord-api-types-v10/interface/APISelectMenuOption} */ /** * @external APISticker * @see {@link https://discord-api-types.dev/api/discord-api-types-v10/interface/APISticker} */ /** * @external APIStringSelectComponent * @see {@link https://discord-api-types.dev/api/discord-api-types-v10/interface/APIStringSelectComponent} */ /** * @external APITextInputComponent * @see {@link https://discord-api-types.dev/api/discord-api-types-v10/interface/APITextInputComponent} */ /** * @external APIThumbnailComponent * @see {@link https://discord-api-types.dev/api/discord-api-types-v10/interface/APIThumbnailComponent} */ /** * @external APIUnfurledMediaItem * @see {@link https://discord-api-types.dev/api/discord-api-types-v10/interface/APIUnfurledMediaItem} */ /** * @external APIUser * @see {@link https://discord-api-types.dev/api/discord-api-types-v10/interface/APIUser} */ /** * @external APIUserSelectComponent * @see {@link https://discord-api-types.dev/api/discord-api-types-v10#APIUserSelectComponent} */ /** * @external ApplicationCommandType * @see {@link https://discord-api-types.dev/api/discord-api-types-v10/enum/ApplicationCommandType} */ /** * @external ApplicationCommandOptionType * @see {@link https://discord-api-types.dev/api/discord-api-types-v10/enum/ApplicationCommandOptionType} */ /** * @external ApplicationCommandPermissionType * @see {@link https://discord-api-types.dev/api/discord-api-types-v10/enum/ApplicationCommandPermissionType} */ /** * @external ApplicationFlags * @see {@link https://discord-api-types.dev/api/discord-api-types-v10/enum/ApplicationFlags} */ /** * @external ApplicationRoleConnectionMetadataType * @see {@link https://discord-api-types.dev/api/discord-api-types-v10/enum/ApplicationRoleConnectionMetadataType} */ /** * @external ApplicationWebhookEventStatus * @see {@link https://discord-api-types.dev/api/discord-api-types-v10/enum/ApplicationWebhookEventStatus} */ /** * @external ApplicationWebhookEventType * @see {@link https://discord-api-types.dev/api/discord-api-types-v10/enum/ApplicationWebhookEventType} */ /** * @external AttachmentFlags * @see {@link https://discord-api-types.dev/api/discord-api-types-v10/enum/AttachmentFlags} */ /** * @external AutoModerationActionType * @see {@link https://discord-api-types.dev/api/discord-api-types-v10/enum/AutoModerationActionType} */ /** * @external AutoModerationRuleEventType * @see {@link https://discord-api-types.dev/api/discord-api-types-v10/enum/AutoModerationRuleEventType} */ /** * @external AutoModerationRuleTriggerType * @see {@link https://discord-api-types.dev/api/discord-api-types-v10/enum/AutoModerationRuleTriggerType} */ /** * @external AutoModerationRuleKeywordPresetType * @see {@link https://discord-api-types.dev/api/discord-api-types-v10/enum/AutoModerationRuleKeywordPresetType} */ /** * @external AuditLogEvent * @see {@link https://discord-api-types.dev/api/discord-api-types-v10/enum/AuditLogEvent} */ /** * @external ButtonStyle * @see {@link https://discord-api-types.dev/api/discord-api-types-v10/enum/ButtonStyle} */ /** * @external ChannelFlags * @see {@link https://discord-api-types.dev/api/discord-api-types-v10/enum/ChannelFlags} */ /** * @external ChannelType * @see {@link https://discord-api-types.dev/api/discord-api-types-v10/enum/ChannelType} */ /** * @external ComponentType * @see {@link https://discord-api-types.dev/api/discord-api-types-v10/enum/ComponentType} */ /** * @external EntitlementType * @see {@link https://discord-api-types.dev/api/discord-api-types-v10/enum/EntitlementType} */ /** * @external EntryPointCommandHandlerType * @see {@link https://discord-api-types.dev/api/discord-api-types-v10/enum/EntryPointCommandHandlerType} */ /** * @external ForumLayoutType * @see {@link https://discord-api-types.dev/api/discord-api-types-v10/enum/ForumLayoutType} */ /** * @external GatewayCloseCodes * @see {@link https://discord-api-types.dev/api/discord-api-types-v10/enum/GatewayCloseCodes} */ /** * @external GatewayDispatchEvents * @see {@link https://discord-api-types.dev/api/discord-api-types-v10/enum/GatewayDispatchEvents} */ /** * @external GatewayIntentBits * @see {@link https://discord-api-types.dev/api/discord-api-types-v10/enum/GatewayIntentBits} */ /** * @external GatewayOpcodes * @see {@link https://discord-api-types.dev/api/discord-api-types-v10/enum/GatewayOpcodes} */ /** * @external GatewayPresenceUpdateData * @see {@link https://discord-api-types.dev/api/discord-api-types-v10/interface/GatewayPresenceUpdateData} */ /** * @external GuildDefaultMessageNotifications * @see {@link https://discord-api-types.dev/api/discord-api-types-v10/enum/GuildDefaultMessageNotifications} */ /** * @external GuildExplicitContentFilter * @see {@link https://discord-api-types.dev/api/discord-api-types-v10/enum/GuildExplicitContentFilter} */ /** * @external GuildFeature * @see {@link https://discord-api-types.dev/api/discord-api-types-v10/enum/GuildFeature} */ /** * @external GuildMFALevel * @see {@link https://discord-api-types.dev/api/discord-api-types-v10/enum/GuildMFALevel} */ /** * @external GuildMemberFlags * @see {@link https://discord-api-types.dev/api/discord-api-types-v10/enum/GuildMemberFlags} */ /** * @external GuildNSFWLevel * @see {@link https://discord-api-types.dev/api/discord-api-types-v10/enum/GuildNSFWLevel} */ /** * @external GuildOnboardingMode * @see {@link https://discord-api-types.dev/api/discord-api-types-v10/enum/GuildOnboardingMode} */ /** * @external GuildOnboardingPromptType * @see {@link https://discord-api-types.dev/api/discord-api-types-v10/enum/GuildOnboardingPromptType} */ /** * @external GuildPremiumTier * @see {@link https://discord-api-types.dev/api/discord-api-types-v10/enum/GuildPremiumTier} */ /** * @external GuildScheduledEventEntityType * @see {@link https://discord-api-types.dev/api/discord-api-types-v10/enum/GuildScheduledEventEntityType} */ /** * @external GuildScheduledEventPrivacyLevel * @see {@link https://discord-api-types.dev/api/discord-api-types-v10/enum/GuildScheduledEventPrivacyLevel} */ /** * @external GuildScheduledEventRecurrenceRuleFrequency * @see {@link https://discord-api-types.dev/api/discord-api-types-v10/enum/GuildScheduledEventRecurrenceRuleFrequency} */ /** * @external GuildScheduledEventRecurrenceRuleMonth * @see {@link https://discord-api-types.dev/api/discord-api-types-v10/enum/GuildScheduledEventRecurrenceRuleMonth} */ /** * @external GuildScheduledEventRecurrenceRuleWeekday * @see {@link https://discord-api-types.dev/api/discord-api-types-v10/enum/GuildScheduledEventRecurrenceRuleWeekday} */ /** * @external GuildScheduledEventStatus * @see {@link https://discord-api-types.dev/api/discord-api-types-v10/enum/GuildScheduledEventStatus} */ /** * @external GuildSystemChannelFlags * @see {@link https://discord-api-types.dev/api/discord-api-types-v10/enum/GuildSystemChannelFlags} */ /** * @external GuildVerificationLevel * @see {@link https://discord-api-types.dev/api/discord-api-types-v10/enum/GuildVerificationLevel} */ /** * @external GuildWidgetStyle * @see {@link https://discord-api-types.dev/api/discord-api-types-v10/enum/GuildWidgetStyle} */ /** * @external IntegrationExpireBehavior * @see {@link https://discord-api-types.dev/api/discord-api-types-v10/enum/IntegrationExpireBehavior} */ /** * @external InteractionContextType * @see {@link https://discord-api-types.dev/api/discord-api-types-v10/enum/InteractionContextType} */ /** * @external InteractionType * @see {@link https://discord-api-types.dev/api/discord-api-types-v10/enum/InteractionType} */ /** * @external InteractionResponseType * @see {@link https://discord-api-types.dev/api/discord-api-types-v10/enum/InteractionResponseType} */ /** * @external InviteType * @see {@link https://discord-api-types.dev/api/discord-api-types-v10/enum/InviteType} */ /** * @external InviteTargetType * @see {@link https://discord-api-types.dev/api/discord-api-types-v10/enum/InviteTargetType} */ /** * @external Locale * @see {@link https://discord-api-types.dev/api/discord-api-types-v10/enum/Locale} */ /** * @external MessageActivityType * @see {@link https://discord-api-types.dev/api/discord-api-types-v10/enum/MessageActivityType} */ /** * @external MessageReferenceType * @see {@link https://discord-api-types.dev/api/discord-api-types-v10/enum/MessageReferenceType} */ /** * @external MessageType * @see {@link https://discord-api-types.dev/api/discord-api-types-v10/enum/MessageType} */ /** * @external MessageFlags * @see {@link https://discord-api-types.dev/api/discord-api-types-v10/enum/MessageFlags} */ /** * @external OAuth2Scopes * @see {@link https://discord-api-types.dev/api/discord-api-types-v10/enum/OAuth2Scopes} */ /** * @external OverwriteType * @see {@link https://discord-api-types.dev/api/discord-api-types-v10/enum/OverwriteType} */ /** * @external PermissionFlagsBits * @see {@link https://discord-api-types.dev/api/discord-api-types-v10#PermissionFlagsBits} */ /** * @external PollLayoutType * @see {@link https://discord-api-types.dev/api/discord-api-types-v10/enum/PollLayoutType} */ /** * @external ReactionType * @see {@link https://discord-api-types.dev/api/discord-api-types-v10/enum/ReactionType} */ /** * @external RoleFlags * @see {@link https://discord-api-types.dev/api/discord-api-types-v10/enum/RoleFlags} */ /** * @external RESTGetAPIGuildThreadsResult * @see {@link https://discord-api-types.dev/api/discord-api-types-v10#RESTGetAPIGuildThreadsResult} */ /** * @external RESTJSONErrorCodes * @see {@link https://discord-api-types.dev/api/discord-api-types-v10/enum/RESTJSONErrorCodes} */ /** * @external SKUFlags * @see {@link https://discord-api-types.dev/api/discord-api-types-v10/enum/SKUFlags} */ /** * @external SKUType * @see {@link https://discord-api-types.dev/api/discord-api-types-v10/enum/SKUType} */ /** * @external SortOrderType * @see {@link https://discord-api-types.dev/api/discord-api-types-v10/enum/SortOrderType} */ /** * @external StageInstancePrivacyLevel * @see {@link https://discord-api-types.dev/api/discord-api-types-v10/enum/StageInstancePrivacyLevel} */ /** * @external StickerType * @see {@link https://discord-api-types.dev/api/discord-api-types-v10/enum/StickerType} */ /** * @external StickerFormatType * @see {@link https://discord-api-types.dev/api/discord-api-types-v10/enum/StickerFormatType} */ /** * @external TeamMemberMembershipState * @see {@link https://discord-api-types.dev/api/discord-api-types-v10/enum/TeamMemberMembershipState} */ /** * @external TeamMemberRole * @see {@link https://discord-api-types.dev/api/discord-api-types-v10/enum/TeamMemberRole} */ /** * @external TextInputStyle * @see {@link https://discord-api-types.dev/api/discord-api-types-v10/enum/TextInputStyle} */ /** * @external ThreadAutoArchiveDuration * @see {@link https://discord-api-types.dev/api/discord-api-types-v10/enum/ThreadAutoArchiveDuration} */ /** * @external UserFlags * @see {@link https://discord-api-types.dev/api/discord-api-types-v10/enum/UserFlags} */ /** * @external VideoQualityMode * @see {@link https://discord-api-types.dev/api/discord-api-types-v10/enum/VideoQualityMode} */ /** * @external VoiceChannelEffectSendAnimationType * @see {@link https://discord-api-types.dev/api/discord-api-types-v10/enum/VoiceChannelEffectSendAnimationType} */ /** * @external WebhookType * @see {@link https://discord-api-types.dev/api/discord-api-types-v10/enum/WebhookType} */ node_modules/discord.js/src/util/Formatters.js 0000664 00000030775 15114741631 0015534 0 ustar 00 'use strict'; const { deprecate } = require('node:util'); const { blockQuote, bold, channelMention, codeBlock, formatEmoji, hideLinkEmbed, hyperlink, inlineCode, italic, quote, roleMention, spoiler, strikethrough, time, TimestampStyles, underscore, userMention, } = require('@discordjs/formatters'); /** * Formats an application command name and id into an application command mention. * @method chatInputApplicationCommandMention * @param {string} commandName The name of the application command * @param {string|Snowflake} subcommandGroupOrSubOrId * The subcommand group name, subcommand name, or application command id * @param {string|Snowflake} [subcommandNameOrId] The subcommand name or application command id * @param {string} [commandId] The id of the application command * @returns {string} */ /** * Wraps the content inside a code block with an optional language. * @method codeBlock * @param {string} contentOrLanguage The language to use or content if a second parameter isn't provided * @param {string} [content] The content to wrap * @returns {string} */ /** * Wraps the content inside \`backticks\`, which formats it as inline code. * @method inlineCode * @param {string} content The content to wrap * @returns {string} */ /** * Formats the content into italic text. * @method italic * @param {string} content The content to wrap * @returns {string} */ /** * Formats the content into bold text. * @method bold * @param {string} content The content to wrap * @returns {string} */ /** * Formats the content into underscored text. * @method underscore * @param {string} content The content to wrap * @returns {string} */ /** * Formats the content into strike-through text. * @method strikethrough * @param {string} content The content to wrap * @returns {string} */ /** * Formats the content into a quote. * <info>This needs to be at the start of the line for Discord to format it.</info> * @method quote * @param {string} content The content to wrap * @returns {string} */ /** * Formats the content into a block quote. * <info>This needs to be at the start of the line for Discord to format it.</info> * @method blockQuote * @param {string} content The content to wrap * @returns {string} */ /** * Wraps the URL into `<>`, which stops it from embedding. * @method hideLinkEmbed * @param {string} content The content to wrap * @returns {string} */ /** * Formats the content and the URL into a masked URL with an optional title. * @method hyperlink * @param {string} content The content to display * @param {string} url The URL the content links to * @param {string} [title] The title shown when hovering on the masked link * @returns {string} */ /** * Formats the content into spoiler text. * @method spoiler * @param {string} content The content to spoiler * @returns {string} */ /** * Formats a user id into a user mention. * @method userMention * @param {Snowflake} userId The user id to format * @returns {string} */ /** * Formats a channel id into a channel mention. * @method channelMention * @param {Snowflake} channelId The channel id to format * @returns {string} */ /** * Formats a role id into a role mention. * @method roleMention * @param {Snowflake} roleId The role id to format * @returns {string} */ /** * Formats an emoji id into a fully qualified emoji identifier. * @method formatEmoji * @param {Snowflake} emojiId The emoji id to format * @param {boolean} [animated=false] Whether the emoji is animated * @returns {string} */ /** * Formats a channel link for a channel. * @method channelLink * @param {Snowflake} channelId The id of the channel * @param {Snowflake} [guildId] The id of the guild * @returns {string} */ /** * Formats a message link for a channel. * @method messageLink * @param {Snowflake} channelId The id of the channel * @param {Snowflake} messageId The id of the message * @param {Snowflake} [guildId] The id of the guild * @returns {string} */ /** * A message formatting timestamp style, as defined in * [here](https://discord.com/developers/docs/reference#message-formatting-timestamp-styles). * * `t` Short time format, consisting of hours and minutes, e.g. 16:20. * * `T` Long time format, consisting of hours, minutes, and seconds, e.g. 16:20:30. * * `d` Short date format, consisting of day, month, and year, e.g. 20/04/2021. * * `D` Long date format, consisting of day, month, and year, e.g. 20 April 2021. * * `f` Short date-time format, consisting of short date and short time formats, e.g. 20 April 2021 16:20. * * `F` Long date-time format, consisting of long date and short time formats, e.g. Tuesday, 20 April 2021 16:20. * * `R` Relative time format, consisting of a relative duration format, e.g. 2 months ago. * @typedef {string} TimestampStylesString */ /** * Formats a date into a short date-time string. * @method time * @param {number|Date} [date] The date to format * @param {TimestampStylesString} [style] The style to use * @returns {string} */ /** * Contains various Discord-specific functions for formatting messages. * @deprecated This class is redundant as all methods of the class can be imported from discord.js directly. */ class Formatters extends null { /** * Formats the content into a block quote. * <info>This needs to be at the start of the line for Discord to format it.</info> * @method blockQuote * @memberof Formatters * @param {string} content The content to wrap * @returns {string} * @deprecated Import this method directly from discord.js instead. */ static blockQuote = deprecate( blockQuote, 'Formatters.blockQuote() is deprecated. Import this method directly from discord.js instead.', ); /** * Formats the content into bold text. * @method bold * @memberof Formatters * @param {string} content The content to wrap * @returns {string} * @deprecated Import this method directly from discord.js instead. */ static bold = deprecate( bold, 'Formatters.bold() is deprecated. Import this method directly from discord.js instead.', ); /** * Formats a channel id into a channel mention. * @method channelMention * @memberof Formatters * @param {Snowflake} channelId The channel id to format * @returns {string} * @deprecated Import this method directly from discord.js instead. */ static channelMention = deprecate( channelMention, 'Formatters.channelMention() is deprecated. Import this method directly from discord.js instead.', ); /** * Wraps the content inside a code block with an optional language. * @method codeBlock * @memberof Formatters * @param {string} contentOrLanguage The language to use or content if a second parameter isn't provided * @param {string} [content] The content to wrap * @returns {string} * @deprecated Import this method directly from discord.js instead. */ static codeBlock = deprecate( codeBlock, 'Formatters.codeBlock() is deprecated. Import this method directly from discord.js instead.', ); /** * Formats an emoji id into a fully qualified emoji identifier. * @method formatEmoji * @memberof Formatters * @param {string} emojiId The emoji id to format * @param {boolean} [animated=false] Whether the emoji is animated * @returns {string} * @deprecated Import this method directly from discord.js instead. */ static formatEmoji = deprecate( formatEmoji, 'Formatters.formatEmoji() is deprecated. Import this method directly from discord.js instead.', ); /** * Wraps the URL into `<>`, which stops it from embedding. * @method hideLinkEmbed * @memberof Formatters * @param {string} content The content to wrap * @returns {string} * @deprecated Import this method directly from discord.js instead. */ static hideLinkEmbed = deprecate( hideLinkEmbed, 'Formatters.hideLinkEmbed() is deprecated. Import this method directly from discord.js instead.', ); /** * Formats the content and the URL into a masked URL with an optional title. * @method hyperlink * @memberof Formatters * @param {string} content The content to display * @param {string} url The URL the content links to * @param {string} [title] The title shown when hovering on the masked link * @returns {string} * @deprecated Import this method directly from discord.js instead. */ static hyperlink = deprecate( hyperlink, 'Formatters.hyperlink() is deprecated. Import this method directly from discord.js instead.', ); /** * Wraps the content inside \`backticks\`, which formats it as inline code. * @method inlineCode * @memberof Formatters * @param {string} content The content to wrap * @returns {string} * @deprecated Import this method directly from discord.js instead. */ static inlineCode = deprecate( inlineCode, 'Formatters.inlineCode() is deprecated. Import this method directly from discord.js instead.', ); /** * Formats the content into italic text. * @method italic * @memberof Formatters * @param {string} content The content to wrap * @returns {string} * @deprecated Import this method directly from discord.js instead. */ static italic = deprecate( italic, 'Formatters.italic() is deprecated. Import this method directly from discord.js instead.', ); /** * Formats the content into a quote. This needs to be at the start of the line for Discord to format it. * @method quote * @memberof Formatters * @param {string} content The content to wrap * @returns {string} * @deprecated Import this method directly from discord.js instead. */ static quote = deprecate( quote, 'Formatters.quote() is deprecated. Import this method directly from discord.js instead.', ); /** * Formats a role id into a role mention. * @method roleMention * @memberof Formatters * @param {Snowflake} roleId The role id to format * @returns {string} * @deprecated Import this method directly from discord.js instead. */ static roleMention = deprecate( roleMention, 'Formatters.roleMention() is deprecated. Import this method directly from discord.js instead.', ); /** * Formats the content into spoiler text. * @method spoiler * @memberof Formatters * @param {string} content The content to spoiler * @returns {string} * @deprecated Import this method directly from discord.js instead. */ static spoiler = deprecate( spoiler, 'Formatters.spoiler() is deprecated. Import this method directly from discord.js instead.', ); /** * Formats the content into strike-through text. * @method strikethrough * @memberof Formatters * @param {string} content The content to wrap * @returns {string} * @deprecated Import this method directly from discord.js instead. */ static strikethrough = deprecate( strikethrough, 'Formatters.strikethrough() is deprecated. Import this method directly from discord.js instead.', ); /** * Formats a date into a short date-time string. * @method time * @memberof Formatters * @param {number|Date} [date] The date to format * @param {TimestampStylesString} [style] The style to use * @returns {string} * @deprecated Import this method directly from discord.js instead. */ static time = deprecate( time, 'Formatters.time() is deprecated. Import this method directly from discord.js instead.', ); /** * The message formatting timestamp * [styles](https://discord.com/developers/docs/reference#message-formatting-timestamp-styles) supported by Discord. * @type {Object<string, TimestampStylesString>} * @memberof Formatters * @deprecated Import this property directly from discord.js instead. */ static TimestampStyles = TimestampStyles; /** * Formats the content into underscored text. * @method underscore * @memberof Formatters * @param {string} content The content to wrap * @returns {string} * @deprecated Import this method directly from discord.js instead. */ static underscore = deprecate( underscore, 'Formatters.underscore() is deprecated. Import this method directly from discord.js instead.', ); /** * Formats a user id into a user mention. * @method userMention * @memberof Formatters * @param {Snowflake} userId The user id to format * @returns {string} * @deprecated Import this method directly from discord.js instead. */ static userMention = deprecate( userMention, 'Formatters.userMention() is deprecated. Import this method directly from discord.js instead.', ); } module.exports = Formatters; node_modules/discord.js/src/errors/Messages.js 0000664 00000026376 15114741631 0015516 0 ustar 00 'use strict'; const DjsErrorCodes = require('./ErrorCodes'); const Messages = { [DjsErrorCodes.ClientInvalidOption]: (prop, must) => `The ${prop} option must be ${must}`, [DjsErrorCodes.ClientInvalidProvidedShards]: 'None of the provided shards were valid.', [DjsErrorCodes.ClientMissingIntents]: 'Valid intents must be provided for the Client.', [DjsErrorCodes.ClientNotReady]: action => `The client needs to be logged in to ${action}.`, [DjsErrorCodes.TokenInvalid]: 'An invalid token was provided.', [DjsErrorCodes.TokenMissing]: 'Request to use token, but token was unavailable to the client.', [DjsErrorCodes.ApplicationCommandPermissionsTokenMissing]: 'Editing application command permissions requires an OAuth2 bearer token, but none was provided.', [DjsErrorCodes.WSCloseRequested]: 'WebSocket closed due to user request.', [DjsErrorCodes.WSConnectionExists]: 'There is already an existing WebSocket connection.', [DjsErrorCodes.WSNotOpen]: (data = 'data') => `WebSocket not open to send ${data}`, [DjsErrorCodes.ManagerDestroyed]: 'Manager was destroyed.', [DjsErrorCodes.BitFieldInvalid]: bit => `Invalid bitfield flag or number: ${bit}.`, [DjsErrorCodes.ShardingInvalid]: 'Invalid shard settings were provided.', [DjsErrorCodes.ShardingRequired]: 'This session would have handled too many guilds - Sharding is required.', [DjsErrorCodes.InvalidIntents]: 'Invalid intent provided for WebSocket intents.', [DjsErrorCodes.DisallowedIntents]: 'Privileged intent provided is not enabled or whitelisted.', [DjsErrorCodes.ShardingNoShards]: 'No shards have been spawned.', [DjsErrorCodes.ShardingInProcess]: 'Shards are still being spawned.', [DjsErrorCodes.ShardingInvalidEvalBroadcast]: 'Script to evaluate must be a function', [DjsErrorCodes.ShardingShardNotFound]: id => `Shard ${id} could not be found.`, [DjsErrorCodes.ShardingAlreadySpawned]: count => `Already spawned ${count} shards.`, [DjsErrorCodes.ShardingProcessExists]: id => `Shard ${id} already has an active process.`, [DjsErrorCodes.ShardingWorkerExists]: id => `Shard ${id} already has an active worker.`, [DjsErrorCodes.ShardingReadyTimeout]: id => `Shard ${id}'s Client took too long to become ready.`, [DjsErrorCodes.ShardingReadyDisconnected]: id => `Shard ${id}'s Client disconnected before becoming ready.`, [DjsErrorCodes.ShardingReadyDied]: id => `Shard ${id}'s process exited before its Client became ready.`, [DjsErrorCodes.ShardingNoChildExists]: id => `Shard ${id} has no active process or worker.`, [DjsErrorCodes.ShardingShardMiscalculation]: (shard, guild, count) => `Calculated invalid shard ${shard} for guild ${guild} with ${count} shards.`, [DjsErrorCodes.ColorRange]: 'Color must be within the range 0 - 16777215 (0xFFFFFF).', [DjsErrorCodes.ColorConvert]: color => `Unable to convert "${color}" to a number.`, [DjsErrorCodes.InviteOptionsMissingChannel]: 'A valid guild channel must be provided when GuildScheduledEvent is EXTERNAL.', [DjsErrorCodes.ButtonLabel]: 'MessageButton label must be a string', [DjsErrorCodes.ButtonURL]: 'MessageButton URL must be a string', [DjsErrorCodes.ButtonCustomId]: 'MessageButton customId must be a string', [DjsErrorCodes.SelectMenuCustomId]: 'MessageSelectMenu customId must be a string', [DjsErrorCodes.SelectMenuPlaceholder]: 'MessageSelectMenu placeholder must be a string', [DjsErrorCodes.SelectOptionLabel]: 'MessageSelectOption label must be a string', [DjsErrorCodes.SelectOptionValue]: 'MessageSelectOption value must be a string', [DjsErrorCodes.SelectOptionDescription]: 'MessageSelectOption description must be a string', [DjsErrorCodes.InteractionCollectorError]: reason => `Collector received no interactions before ending with reason: ${reason}`, [DjsErrorCodes.FileNotFound]: file => `File could not be found: ${file}`, [DjsErrorCodes.UserBannerNotFetched]: "You must fetch this user's banner before trying to generate its URL!", [DjsErrorCodes.UserNoDMChannel]: 'No DM Channel exists!', [DjsErrorCodes.VoiceNotStageChannel]: 'You are only allowed to do this in stage channels.', [DjsErrorCodes.VoiceStateNotOwn]: 'You cannot self-deafen/mute/request to speak on VoiceStates that do not belong to the ClientUser.', [DjsErrorCodes.VoiceStateInvalidType]: name => `${name} must be a boolean.`, [DjsErrorCodes.ReqResourceType]: 'The resource must be a string, Buffer or a valid file stream.', [DjsErrorCodes.ImageFormat]: format => `Invalid image format: ${format}`, [DjsErrorCodes.ImageSize]: size => `Invalid image size: ${size}`, [DjsErrorCodes.MessageBulkDeleteType]: 'The messages must be an Array, Collection, or number.', [DjsErrorCodes.MessageContentType]: 'Message content must be a string.', [DjsErrorCodes.MessageNonceRequired]: 'Message nonce is required when enforceNonce is true.', [DjsErrorCodes.MessageNonceType]: 'Message nonce must be an integer or a string.', [DjsErrorCodes.SplitMaxLen]: 'Chunk exceeds the max length and contains no split characters.', [DjsErrorCodes.BanResolveId]: (ban = false) => `Couldn't resolve the user id to ${ban ? 'ban' : 'unban'}.`, [DjsErrorCodes.FetchBanResolveId]: "Couldn't resolve the user id to fetch the ban.", [DjsErrorCodes.PruneDaysType]: 'Days must be a number', [DjsErrorCodes.GuildChannelResolve]: 'Could not resolve channel to a guild channel.', [DjsErrorCodes.GuildVoiceChannelResolve]: 'Could not resolve channel to a guild voice channel.', [DjsErrorCodes.GuildChannelOrphan]: 'Could not find a parent to this guild channel.', [DjsErrorCodes.GuildChannelUnowned]: "The fetched channel does not belong to this manager's guild.", [DjsErrorCodes.GuildOwned]: 'Guild is owned by the client.', [DjsErrorCodes.GuildMembersTimeout]: "Members didn't arrive in time.", [DjsErrorCodes.GuildSoundboardSoundsTimeout]: "Soundboard sounds didn't arrive in time.", [DjsErrorCodes.GuildUncachedMe]: 'The client user as a member of this guild is uncached.', [DjsErrorCodes.ChannelNotCached]: 'Could not find the channel where this message came from in the cache!', [DjsErrorCodes.StageChannelResolve]: 'Could not resolve channel to a stage channel.', [DjsErrorCodes.GuildScheduledEventResolve]: 'Could not resolve the guild scheduled event.', [DjsErrorCodes.FetchOwnerId]: type => `Couldn't resolve the ${type} ownerId to fetch the ${type} ${type === 'group DM' ? 'owner' : 'member'}.`, [DjsErrorCodes.InvalidType]: (name, expected, an = false) => `Supplied ${name} is not a${an ? 'n' : ''} ${expected}.`, [DjsErrorCodes.InvalidElement]: (type, name, elem) => `Supplied ${type} ${name} includes an invalid element: ${elem}`, [DjsErrorCodes.MessageThreadParent]: 'The message was not sent in a guild text or news channel', [DjsErrorCodes.MessageExistingThread]: 'The message already has a thread', [DjsErrorCodes.ThreadInvitableType]: type => `Invitable cannot be edited on ${type}`, [DjsErrorCodes.WebhookMessage]: 'The message was not sent by a webhook.', [DjsErrorCodes.WebhookTokenUnavailable]: 'This action requires a webhook token, but none is available.', [DjsErrorCodes.WebhookURLInvalid]: 'The provided webhook URL is not valid.', [DjsErrorCodes.WebhookApplication]: 'This message webhook belongs to an application and cannot be fetched.', [DjsErrorCodes.MessageReferenceMissing]: 'The message does not reference another message', [DjsErrorCodes.EmojiType]: 'Emoji must be a string or GuildEmoji/ReactionEmoji', [DjsErrorCodes.EmojiManaged]: 'Emoji is managed and has no Author.', [DjsErrorCodes.MissingManageGuildExpressionsPermission]: guild => `Client must have Manage Guild Expressions permission in guild ${guild} to see emoji authors.`, [DjsErrorCodes.MissingManageEmojisAndStickersPermission]: guild => `Client must have Manage Emojis and Stickers permission in guild ${guild} to see emoji authors.`, [DjsErrorCodes.NotGuildSoundboardSound]: action => `Soundboard sound is a default (non-guild) soundboard sound and can't be ${action}.`, [DjsErrorCodes.NotGuildSticker]: 'Sticker is a standard (non-guild) sticker and has no author.', [DjsErrorCodes.ReactionResolveUser]: "Couldn't resolve the user id to remove from the reaction.", [DjsErrorCodes.VanityURL]: 'This guild does not have the vanity URL feature enabled.', [DjsErrorCodes.InviteResolveCode]: 'Could not resolve the code to fetch the invite.', [DjsErrorCodes.InviteNotFound]: 'Could not find the requested invite.', [DjsErrorCodes.DeleteGroupDMChannel]: "Bots don't have access to Group DM Channels and cannot delete them", [DjsErrorCodes.FetchGroupDMChannel]: "Bots don't have access to Group DM Channels and cannot fetch them", [DjsErrorCodes.MemberFetchNonceLength]: 'Nonce length must not exceed 32 characters.', [DjsErrorCodes.GlobalCommandPermissions]: 'Permissions for global commands may only be fetched or modified by providing a GuildResolvable ' + "or from a guild's application command manager.", [DjsErrorCodes.GuildUncachedEntityResolve]: type => `Cannot resolve ${type} from an arbitrary guild, provide an id instead`, [DjsErrorCodes.InteractionAlreadyReplied]: 'The reply to this interaction has already been sent or deferred.', [DjsErrorCodes.InteractionNotReplied]: 'The reply to this interaction has not been sent or deferred.', [DjsErrorCodes.InteractionEphemeralReplied]: 'Ephemeral responses cannot be deleted.', [DjsErrorCodes.CommandInteractionOptionNotFound]: name => `Required option "${name}" not found.`, [DjsErrorCodes.CommandInteractionOptionType]: (name, type, expected) => `Option "${name}" is of type: ${type}; expected ${expected}.`, [DjsErrorCodes.CommandInteractionOptionEmpty]: (name, type) => `Required option "${name}" is of type: ${type}; expected a non-empty value.`, [DjsErrorCodes.CommandInteractionOptionNoSubcommand]: 'No subcommand specified for interaction.', [DjsErrorCodes.CommandInteractionOptionNoSubcommandGroup]: 'No subcommand group specified for interaction.', [DjsErrorCodes.CommandInteractionOptionInvalidChannelType]: (name, type, expected) => `The type of channel of the option "${name}" is: ${type}; expected ${expected}.`, [DjsErrorCodes.AutocompleteInteractionOptionNoFocusedOption]: 'No focused option for autocomplete interaction.', [DjsErrorCodes.ModalSubmitInteractionFieldNotFound]: customId => `Required field with custom id "${customId}" not found.`, [DjsErrorCodes.ModalSubmitInteractionFieldType]: (customId, type, expected) => `Field with custom id "${customId}" is of type: ${type}; expected ${expected}.`, [DjsErrorCodes.InvalidMissingScopes]: 'At least one valid scope must be provided for the invite', [DjsErrorCodes.InvalidScopesWithPermissions]: 'Permissions cannot be set without the bot scope.', [DjsErrorCodes.NotImplemented]: (what, name) => `Method ${what} not implemented on ${name}.`, [DjsErrorCodes.SweepFilterReturn]: 'The return value of the sweepFilter function was not false or a Function', [DjsErrorCodes.GuildForumMessageRequired]: 'You must provide a message to create a guild forum thread', [DjsErrorCodes.EntitlementCreateInvalidOwner]: 'You must provide either a guild or a user to create an entitlement, but not both', [DjsErrorCodes.BulkBanUsersOptionEmpty]: 'Option "users" array or collection is empty', [DjsErrorCodes.PollAlreadyExpired]: 'This poll has already expired.', }; module.exports = Messages; node_modules/discord.js/src/errors/DJSError.js 0000664 00000002535 15114741631 0015370 0 ustar 00 'use strict'; // Heavily inspired by node's `internal/errors` module const ErrorCodes = require('./ErrorCodes'); const Messages = require('./Messages'); /** * Extend an error of some sort into a DiscordjsError. * @param {Error} Base Base error to extend * @returns {DiscordjsError} * @ignore */ function makeDiscordjsError(Base) { return class DiscordjsError extends Base { constructor(code, ...args) { super(message(code, args)); this.code = code; Error.captureStackTrace?.(this, DiscordjsError); } get name() { return `${super.name} [${this.code}]`; } }; } /** * Format the message for an error. * @param {string} code The error code * @param {Array<*>} args Arguments to pass for util format or as function args * @returns {string} Formatted string * @ignore */ function message(code, args) { if (!(code in ErrorCodes)) throw new Error('Error code must be a valid DiscordjsErrorCodes'); const msg = Messages[code]; if (!msg) throw new Error(`No message associated with error code: ${code}.`); if (typeof msg === 'function') return msg(...args); if (!args?.length) return msg; args.unshift(msg); return String(...args); } module.exports = { DiscordjsError: makeDiscordjsError(Error), DiscordjsTypeError: makeDiscordjsError(TypeError), DiscordjsRangeError: makeDiscordjsError(RangeError), }; node_modules/discord.js/src/errors/ErrorCodes.js 0000664 00000025553 15114741631 0016012 0 ustar 00 'use strict'; /** * @typedef {Object} DiscordjsErrorCodes * @property {'ClientInvalidOption'} ClientInvalidOption * @property {'ClientInvalidProvidedShards'} ClientInvalidProvidedShards * @property {'ClientMissingIntents'} ClientMissingIntents * @property {'ClientNotReady'} ClientNotReady * @property {'TokenInvalid'} TokenInvalid * @property {'TokenMissing'} TokenMissing * @property {'ApplicationCommandPermissionsTokenMissing'} ApplicationCommandPermissionsTokenMissing * @property {'WSCloseRequested'} WSCloseRequested * <warn>This property is deprecated.</warn> * @property {'WSConnectionExists'} WSConnectionExists * <warn>This property is deprecated.</warn> * @property {'WSNotOpen'} WSNotOpen * <warn>This property is deprecated.</warn> * @property {'ManagerDestroyed'} ManagerDestroyed * <warn>This property is deprecated.</warn> * @property {'BitFieldInvalid'} BitFieldInvalid * @property {'ShardingInvalid'} ShardingInvalid * <warn>This property is deprecated.</warn> * @property {'ShardingRequired'} ShardingRequired * <warn>This property is deprecated.</warn> * @property {'InvalidIntents'} InvalidIntents * <warn>This property is deprecated.</warn> * @property {'DisallowedIntents'} DisallowedIntents * <warn>This property is deprecated.</warn> * @property {'ShardingNoShards'} ShardingNoShards * @property {'ShardingInProcess'} ShardingInProcess * @property {'ShardingInvalidEvalBroadcast'} ShardingInvalidEvalBroadcast * @property {'ShardingShardNotFound'} ShardingShardNotFound * @property {'ShardingAlreadySpawned'} ShardingAlreadySpawned * @property {'ShardingProcessExists'} ShardingProcessExists * @property {'ShardingWorkerExists'} ShardingWorkerExists * @property {'ShardingReadyTimeout'} ShardingReadyTimeout * @property {'ShardingReadyDisconnected'} ShardingReadyDisconnected * @property {'ShardingReadyDied'} ShardingReadyDied * @property {'ShardingNoChildExists'} ShardingNoChildExists * @property {'ShardingShardMiscalculation'} ShardingShardMiscalculation * @property {'ColorRange'} ColorRange * @property {'ColorConvert'} ColorConvert * @property {'InviteOptionsMissingChannel'} InviteOptionsMissingChannel * @property {'ButtonLabel'} ButtonLabel * <warn>This property is deprecated.</warn> * @property {'ButtonURL'} ButtonURL * <warn>This property is deprecated.</warn> * @property {'ButtonCustomId'} ButtonCustomId * <warn>This property is deprecated.</warn> * @property {'SelectMenuCustomId'} SelectMenuCustomId * <warn>This property is deprecated.</warn> * @property {'SelectMenuPlaceholder'} SelectMenuPlaceholder * <warn>This property is deprecated.</warn> * @property {'SelectOptionLabel'} SelectOptionLabel * <warn>This property is deprecated.</warn> * @property {'SelectOptionValue'} SelectOptionValue * <warn>This property is deprecated.</warn> * @property {'SelectOptionDescription'} SelectOptionDescription * <warn>This property is deprecated.</warn> * @property {'InteractionCollectorError'} InteractionCollectorError * @property {'FileNotFound'} FileNotFound * @property {'UserBannerNotFetched'} UserBannerNotFetched * <warn>This property is deprecated.</warn> * @property {'UserNoDMChannel'} UserNoDMChannel * @property {'VoiceNotStageChannel'} VoiceNotStageChannel * @property {'VoiceStateNotOwn'} VoiceStateNotOwn * @property {'VoiceStateInvalidType'} VoiceStateInvalidType * @property {'ReqResourceType'} ReqResourceType * @property {'ImageFormat'} ImageFormat * <warn>This property is deprecated.</warn> * @property {'ImageSize'} ImageSize * <warn>This property is deprecated.</warn> * @property {'MessageBulkDeleteType'} MessageBulkDeleteType * @property {'MessageContentType'} MessageContentType * @property {'MessageNonceRequired'} MessageNonceRequired * @property {'MessageNonceType'} MessageNonceType * @property {'SplitMaxLen'} SplitMaxLen * <warn>This property is deprecated.</warn> * @property {'BanResolveId'} BanResolveId * @property {'FetchBanResolveId'} FetchBanResolveId * @property {'PruneDaysType'} PruneDaysType * @property {'GuildChannelResolve'} GuildChannelResolve * @property {'GuildVoiceChannelResolve'} GuildVoiceChannelResolve * @property {'GuildChannelOrphan'} GuildChannelOrphan * @property {'GuildChannelUnowned'} GuildChannelUnowned * @property {'GuildOwned'} GuildOwned * @property {'GuildMembersTimeout'} GuildMembersTimeout * @property {'GuildSoundboardSoundsTimeout'} GuildSoundboardSoundsTimeout * @property {'GuildUncachedMe'} GuildUncachedMe * @property {'ChannelNotCached'} ChannelNotCached * @property {'StageChannelResolve'} StageChannelResolve * @property {'GuildScheduledEventResolve'} GuildScheduledEventResolve * @property {'FetchOwnerId'} FetchOwnerId * @property {'InvalidType'} InvalidType * @property {'InvalidElement'} InvalidElement * @property {'MessageThreadParent'} MessageThreadParent * @property {'MessageExistingThread'} MessageExistingThread * @property {'ThreadInvitableType'} ThreadInvitableType * @property {'WebhookMessage'} WebhookMessage * @property {'WebhookTokenUnavailable'} WebhookTokenUnavailable * @property {'WebhookURLInvalid'} WebhookURLInvalid * @property {'WebhookApplication'} WebhookApplication * @property {'MessageReferenceMissing'} MessageReferenceMissing * @property {'EmojiType'} EmojiType * @property {'EmojiManaged'} EmojiManaged * @property {'MissingManageGuildExpressionsPermission'} MissingManageGuildExpressionsPermission * @property {'MissingManageEmojisAndStickersPermission'} MissingManageEmojisAndStickersPermission * <warn>This property is deprecated. Use `MissingManageGuildExpressionsPermission` instead.</warn> * * @property {'NotGuildSoundboardSound'} NotGuildSoundboardSound * @property {'NotGuildSticker'} NotGuildSticker * @property {'ReactionResolveUser'} ReactionResolveUser * @property {'VanityURL'} VanityURL * <warn>This property is deprecated.</warn> * @property {'InviteResolveCode'} InviteResolveCode * @property {'InviteNotFound'} InviteNotFound * @property {'DeleteGroupDMChannel'} DeleteGroupDMChannel * @property {'FetchGroupDMChannel'} FetchGroupDMChannel * @property {'MemberFetchNonceLength'} MemberFetchNonceLength * @property {'GlobalCommandPermissions'} GlobalCommandPermissions * @property {'GuildUncachedEntityResolve'} GuildUncachedEntityResolve * @property {'InteractionAlreadyReplied'} InteractionAlreadyReplied * @property {'InteractionNotReplied'} InteractionNotReplied * @property {'InteractionEphemeralReplied'} InteractionEphemeralReplied * <warn>This property is deprecated.</warn> * @property {'CommandInteractionOptionNotFound'} CommandInteractionOptionNotFound * @property {'CommandInteractionOptionType'} CommandInteractionOptionType * @property {'CommandInteractionOptionEmpty'} CommandInteractionOptionEmpty * @property {'CommandInteractionOptionNoSubcommand'} CommandInteractionOptionNoSubcommand * @property {'CommandInteractionOptionNoSubcommandGroup'} CommandInteractionOptionNoSubcommandGroup * @property {'CommandInteractionOptionInvalidChannelType'} CommandInteractionOptionInvalidChannelType * @property {'AutocompleteInteractionOptionNoFocusedOption'} AutocompleteInteractionOptionNoFocusedOption * @property {'ModalSubmitInteractionFieldNotFound'} ModalSubmitInteractionFieldNotFound * @property {'ModalSubmitInteractionFieldType'} ModalSubmitInteractionFieldType * @property {'InvalidMissingScopes'} InvalidMissingScopes * @property {'InvalidScopesWithPermissions'} InvalidScopesWithPermissions * @property {'NotImplemented'} NotImplemented * @property {'GuildForumMessageRequired'} GuildForumMessageRequired * @property {'SweepFilterReturn'} SweepFilterReturn * @property {'EntitlementCreateInvalidOwner'} EntitlementCreateInvalidOwner * @property {'BulkBanUsersOptionEmpty'} BulkBanUsersOptionEmpty * @property {'PollAlreadyExpired'} PollAlreadyExpired */ const keys = [ 'ClientInvalidOption', 'ClientInvalidProvidedShards', 'ClientMissingIntents', 'ClientNotReady', 'TokenInvalid', 'TokenMissing', 'ApplicationCommandPermissionsTokenMissing', 'WSCloseRequested', 'WSConnectionExists', 'WSNotOpen', 'ManagerDestroyed', 'BitFieldInvalid', 'ShardingInvalid', 'ShardingRequired', 'InvalidIntents', 'DisallowedIntents', 'ShardingNoShards', 'ShardingInProcess', 'ShardingInvalidEvalBroadcast', 'ShardingShardNotFound', 'ShardingAlreadySpawned', 'ShardingProcessExists', 'ShardingWorkerExists', 'ShardingReadyTimeout', 'ShardingReadyDisconnected', 'ShardingReadyDied', 'ShardingNoChildExists', 'ShardingShardMiscalculation', 'ColorRange', 'ColorConvert', 'InviteOptionsMissingChannel', 'ButtonLabel', 'ButtonURL', 'ButtonCustomId', 'SelectMenuCustomId', 'SelectMenuPlaceholder', 'SelectOptionLabel', 'SelectOptionValue', 'SelectOptionDescription', 'InteractionCollectorError', 'FileNotFound', 'UserBannerNotFetched', 'UserNoDMChannel', 'VoiceNotStageChannel', 'VoiceStateNotOwn', 'VoiceStateInvalidType', 'ReqResourceType', 'ImageFormat', 'ImageSize', 'MessageBulkDeleteType', 'MessageContentType', 'MessageNonceRequired', 'MessageNonceType', 'SplitMaxLen', 'BanResolveId', 'FetchBanResolveId', 'PruneDaysType', 'GuildChannelResolve', 'GuildVoiceChannelResolve', 'GuildChannelOrphan', 'GuildChannelUnowned', 'GuildOwned', 'GuildMembersTimeout', 'GuildSoundboardSoundsTimeout', 'GuildUncachedMe', 'ChannelNotCached', 'StageChannelResolve', 'GuildScheduledEventResolve', 'FetchOwnerId', 'InvalidType', 'InvalidElement', 'MessageThreadParent', 'MessageExistingThread', 'ThreadInvitableType', 'WebhookMessage', 'WebhookTokenUnavailable', 'WebhookURLInvalid', 'WebhookApplication', 'MessageReferenceMissing', 'EmojiType', 'EmojiManaged', 'MissingManageGuildExpressionsPermission', 'MissingManageEmojisAndStickersPermission', 'NotGuildSoundboardSound', 'NotGuildSticker', 'ReactionResolveUser', 'VanityURL', 'InviteResolveCode', 'InviteNotFound', 'DeleteGroupDMChannel', 'FetchGroupDMChannel', 'MemberFetchNonceLength', 'GlobalCommandPermissions', 'GuildUncachedEntityResolve', 'InteractionAlreadyReplied', 'InteractionNotReplied', 'InteractionEphemeralReplied', 'CommandInteractionOptionNotFound', 'CommandInteractionOptionType', 'CommandInteractionOptionEmpty', 'CommandInteractionOptionNoSubcommand', 'CommandInteractionOptionNoSubcommandGroup', 'CommandInteractionOptionInvalidChannelType', 'AutocompleteInteractionOptionNoFocusedOption', 'ModalSubmitInteractionFieldNotFound', 'ModalSubmitInteractionFieldType', 'InvalidMissingScopes', 'InvalidScopesWithPermissions', 'NotImplemented', 'SweepFilterReturn', 'GuildForumMessageRequired', 'EntitlementCreateInvalidOwner', 'BulkBanUsersOptionEmpty', 'PollAlreadyExpired', ]; // JSDoc for IntelliSense purposes /** * @type {DiscordjsErrorCodes} * @ignore */ module.exports = Object.fromEntries(keys.map(key => [key, key])); node_modules/discord.js/src/errors/index.js 0000664 00000000235 15114741631 0015040 0 ustar 00 'use strict'; module.exports = require('./DJSError'); module.exports.ErrorCodes = require('./ErrorCodes'); module.exports.Messages = require('./Messages'); node_modules/discord.js/src/index.js 0000664 00000040171 15114741631 0013527 0 ustar 00 'use strict'; const { polyfillDispose } = require('@discordjs/util'); const { __exportStar } = require('tslib'); polyfillDispose(); // "Root" classes (starting points) exports.BaseClient = require('./client/BaseClient'); exports.Client = require('./client/Client'); exports.Shard = require('./sharding/Shard'); exports.ShardClientUtil = require('./sharding/ShardClientUtil'); exports.ShardingManager = require('./sharding/ShardingManager'); exports.WebhookClient = require('./client/WebhookClient'); // Errors exports.DiscordjsError = require('./errors/DJSError').DiscordjsError; exports.DiscordjsTypeError = require('./errors/DJSError').DiscordjsTypeError; exports.DiscordjsRangeError = require('./errors/DJSError').DiscordjsRangeError; exports.DiscordjsErrorCodes = require('./errors/ErrorCodes'); // Utilities exports.ActivityFlagsBitField = require('./util/ActivityFlagsBitField'); exports.ApplicationFlagsBitField = require('./util/ApplicationFlagsBitField'); exports.AttachmentFlagsBitField = require('./util/AttachmentFlagsBitField'); exports.BaseManager = require('./managers/BaseManager'); exports.BitField = require('./util/BitField'); exports.ChannelFlagsBitField = require('./util/ChannelFlagsBitField'); exports.Collection = require('@discordjs/collection').Collection; exports.Constants = require('./util/Constants'); exports.Colors = require('./util/Colors'); exports.Events = require('./util/Events'); exports.Formatters = require('./util/Formatters'); exports.GuildMemberFlagsBitField = require('./util/GuildMemberFlagsBitField').GuildMemberFlagsBitField; exports.IntentsBitField = require('./util/IntentsBitField'); exports.LimitedCollection = require('./util/LimitedCollection'); exports.MessageFlagsBitField = require('./util/MessageFlagsBitField'); exports.Options = require('./util/Options'); exports.Partials = require('./util/Partials'); exports.PermissionsBitField = require('./util/PermissionsBitField'); exports.RoleFlagsBitField = require('./util/RoleFlagsBitField'); exports.ShardEvents = require('./util/ShardEvents'); exports.SKUFlagsBitField = require('./util/SKUFlagsBitField').SKUFlagsBitField; exports.Status = require('./util/Status'); exports.SnowflakeUtil = require('@sapphire/snowflake').DiscordSnowflake; exports.Sweepers = require('./util/Sweepers'); exports.SystemChannelFlagsBitField = require('./util/SystemChannelFlagsBitField'); exports.ThreadMemberFlagsBitField = require('./util/ThreadMemberFlagsBitField'); exports.UserFlagsBitField = require('./util/UserFlagsBitField'); __exportStar(require('./util/Util.js'), exports); exports.WebSocketShardEvents = require('./util/WebSocketShardEvents'); exports.version = require('../package.json').version; // Managers exports.ApplicationCommandManager = require('./managers/ApplicationCommandManager'); exports.ApplicationEmojiManager = require('./managers/ApplicationEmojiManager'); exports.ApplicationCommandPermissionsManager = require('./managers/ApplicationCommandPermissionsManager'); exports.AutoModerationRuleManager = require('./managers/AutoModerationRuleManager'); exports.BaseGuildEmojiManager = require('./managers/BaseGuildEmojiManager'); exports.CachedManager = require('./managers/CachedManager'); exports.ChannelManager = require('./managers/ChannelManager'); exports.ClientVoiceManager = require('./client/voice/ClientVoiceManager'); exports.DataManager = require('./managers/DataManager'); exports.DMMessageManager = require('./managers/DMMessageManager'); exports.EntitlementManager = require('./managers/EntitlementManager').EntitlementManager; exports.GuildApplicationCommandManager = require('./managers/GuildApplicationCommandManager'); exports.GuildBanManager = require('./managers/GuildBanManager'); exports.GuildChannelManager = require('./managers/GuildChannelManager'); exports.GuildEmojiManager = require('./managers/GuildEmojiManager'); exports.GuildEmojiRoleManager = require('./managers/GuildEmojiRoleManager'); exports.GuildForumThreadManager = require('./managers/GuildForumThreadManager'); exports.GuildInviteManager = require('./managers/GuildInviteManager'); exports.GuildManager = require('./managers/GuildManager'); exports.GuildMemberManager = require('./managers/GuildMemberManager'); exports.GuildMemberRoleManager = require('./managers/GuildMemberRoleManager'); exports.GuildMessageManager = require('./managers/GuildMessageManager'); exports.GuildScheduledEventManager = require('./managers/GuildScheduledEventManager'); exports.GuildSoundboardSoundManager = require('./managers/GuildSoundboardSoundManager.js').GuildSoundboardSoundManager; exports.GuildStickerManager = require('./managers/GuildStickerManager'); exports.GuildTextThreadManager = require('./managers/GuildTextThreadManager'); exports.MessageManager = require('./managers/MessageManager'); exports.PermissionOverwriteManager = require('./managers/PermissionOverwriteManager'); exports.PresenceManager = require('./managers/PresenceManager'); exports.ReactionManager = require('./managers/ReactionManager'); exports.ReactionUserManager = require('./managers/ReactionUserManager'); exports.RoleManager = require('./managers/RoleManager'); exports.StageInstanceManager = require('./managers/StageInstanceManager'); exports.SubscriptionManager = require('./managers/SubscriptionManager').SubscriptionManager; exports.ThreadManager = require('./managers/ThreadManager'); exports.ThreadMemberManager = require('./managers/ThreadMemberManager'); exports.UserManager = require('./managers/UserManager'); exports.VoiceStateManager = require('./managers/VoiceStateManager'); exports.WebSocketManager = require('./client/websocket/WebSocketManager'); exports.WebSocketShard = require('./client/websocket/WebSocketShard'); // Structures exports.ActionRow = require('./structures/ActionRow'); exports.ActionRowBuilder = require('./structures/ActionRowBuilder'); exports.Activity = require('./structures/Presence').Activity; exports.AnonymousGuild = require('./structures/AnonymousGuild'); exports.Application = require('./structures/interfaces/Application'); exports.ApplicationCommand = require('./structures/ApplicationCommand'); exports.ApplicationEmoji = require('./structures/ApplicationEmoji'); exports.ApplicationRoleConnectionMetadata = require('./structures/ApplicationRoleConnectionMetadata').ApplicationRoleConnectionMetadata; exports.AutocompleteInteraction = require('./structures/AutocompleteInteraction'); exports.AutoModerationActionExecution = require('./structures/AutoModerationActionExecution'); exports.AutoModerationRule = require('./structures/AutoModerationRule'); exports.Base = require('./structures/Base'); exports.BaseGuild = require('./structures/BaseGuild'); exports.BaseGuildEmoji = require('./structures/BaseGuildEmoji'); exports.BaseGuildTextChannel = require('./structures/BaseGuildTextChannel'); exports.BaseGuildVoiceChannel = require('./structures/BaseGuildVoiceChannel'); exports.ButtonBuilder = require('./structures/ButtonBuilder'); exports.ButtonComponent = require('./structures/ButtonComponent'); exports.ButtonInteraction = require('./structures/ButtonInteraction'); exports.CategoryChannel = require('./structures/CategoryChannel'); exports.BaseChannel = require('./structures/BaseChannel').BaseChannel; exports.ChatInputCommandInteraction = require('./structures/ChatInputCommandInteraction'); exports.ClientApplication = require('./structures/ClientApplication'); exports.ClientPresence = require('./structures/ClientPresence'); exports.ClientUser = require('./structures/ClientUser'); exports.CommandInteraction = require('./structures/CommandInteraction'); exports.Collector = require('./structures/interfaces/Collector'); exports.CommandInteractionOptionResolver = require('./structures/CommandInteractionOptionResolver'); exports.Component = require('./structures/Component'); exports.ContainerComponent = require('./structures/ContainerComponent'); exports.ContextMenuCommandInteraction = require('./structures/ContextMenuCommandInteraction'); exports.DMChannel = require('./structures/DMChannel'); exports.Embed = require('./structures/Embed'); exports.EmbedBuilder = require('./structures/EmbedBuilder'); exports.Emoji = require('./structures/Emoji').Emoji; exports.Entitlement = require('./structures/Entitlement').Entitlement; exports.FileComponent = require('./structures/FileComponent'); exports.ForumChannel = require('./structures/ForumChannel'); exports.Guild = require('./structures/Guild').Guild; exports.GuildAuditLogs = require('./structures/GuildAuditLogs'); exports.GuildAuditLogsEntry = require('./structures/GuildAuditLogsEntry'); exports.GuildBan = require('./structures/GuildBan'); exports.GuildChannel = require('./structures/GuildChannel'); exports.GuildEmoji = require('./structures/GuildEmoji'); exports.GuildMember = require('./structures/GuildMember').GuildMember; exports.GuildOnboarding = require('./structures/GuildOnboarding').GuildOnboarding; exports.GuildOnboardingPrompt = require('./structures/GuildOnboardingPrompt').GuildOnboardingPrompt; exports.GuildOnboardingPromptOption = require('./structures/GuildOnboardingPromptOption').GuildOnboardingPromptOption; exports.GuildPreview = require('./structures/GuildPreview'); exports.GuildPreviewEmoji = require('./structures/GuildPreviewEmoji'); exports.GuildScheduledEvent = require('./structures/GuildScheduledEvent').GuildScheduledEvent; exports.GuildTemplate = require('./structures/GuildTemplate'); exports.Integration = require('./structures/Integration'); exports.IntegrationApplication = require('./structures/IntegrationApplication'); exports.InteractionCallback = require('./structures/InteractionCallback'); exports.InteractionCallbackResource = require('./structures/InteractionCallbackResource'); exports.InteractionCallbackResponse = require('./structures/InteractionCallbackResponse'); exports.BaseInteraction = require('./structures/BaseInteraction'); exports.InteractionCollector = require('./structures/InteractionCollector'); exports.InteractionResponse = require('./structures/InteractionResponse'); exports.InteractionWebhook = require('./structures/InteractionWebhook'); exports.Invite = require('./structures/Invite'); exports.InviteStageInstance = require('./structures/InviteStageInstance'); exports.InviteGuild = require('./structures/InviteGuild'); exports.Message = require('./structures/Message').Message; exports.Attachment = require('./structures/Attachment'); exports.AttachmentBuilder = require('./structures/AttachmentBuilder'); exports.ModalBuilder = require('./structures/ModalBuilder'); exports.MediaChannel = require('./structures/MediaChannel'); exports.MediaGalleryComponent = require('./structures/MediaGalleryComponent'); exports.MediaGalleryItem = require('./structures/MediaGalleryItem'); exports.MessageCollector = require('./structures/MessageCollector'); exports.MessageComponentInteraction = require('./structures/MessageComponentInteraction'); exports.MessageContextMenuCommandInteraction = require('./structures/MessageContextMenuCommandInteraction'); exports.MessageMentions = require('./structures/MessageMentions'); exports.MessagePayload = require('./structures/MessagePayload'); exports.MessageReaction = require('./structures/MessageReaction'); exports.ModalSubmitInteraction = require('./structures/ModalSubmitInteraction'); exports.ModalSubmitFields = require('./structures/ModalSubmitFields'); exports.NewsChannel = require('./structures/NewsChannel'); exports.OAuth2Guild = require('./structures/OAuth2Guild'); exports.PartialGroupDMChannel = require('./structures/PartialGroupDMChannel'); exports.PermissionOverwrites = require('./structures/PermissionOverwrites'); exports.Poll = require('./structures/Poll').Poll; exports.PollAnswer = require('./structures/PollAnswer').PollAnswer; exports.PrimaryEntryPointCommandInteraction = require('./structures/PrimaryEntryPointCommandInteraction'); exports.Presence = require('./structures/Presence').Presence; exports.ReactionCollector = require('./structures/ReactionCollector'); exports.ReactionEmoji = require('./structures/ReactionEmoji'); exports.RichPresenceAssets = require('./structures/Presence').RichPresenceAssets; exports.Role = require('./structures/Role').Role; exports.SectionComponent = require('./structures/SectionComponent'); exports.SelectMenuBuilder = require('./structures/SelectMenuBuilder'); exports.ChannelSelectMenuBuilder = require('./structures/ChannelSelectMenuBuilder'); exports.MentionableSelectMenuBuilder = require('./structures/MentionableSelectMenuBuilder'); exports.RoleSelectMenuBuilder = require('./structures/RoleSelectMenuBuilder'); exports.StringSelectMenuBuilder = require('./structures/StringSelectMenuBuilder'); exports.UserSelectMenuBuilder = require('./structures/UserSelectMenuBuilder'); exports.BaseSelectMenuComponent = require('./structures/BaseSelectMenuComponent'); exports.SelectMenuComponent = require('./structures/SelectMenuComponent'); exports.ChannelSelectMenuComponent = require('./structures/ChannelSelectMenuComponent'); exports.MentionableSelectMenuComponent = require('./structures/MentionableSelectMenuComponent'); exports.RoleSelectMenuComponent = require('./structures/RoleSelectMenuComponent'); exports.StringSelectMenuComponent = require('./structures/StringSelectMenuComponent'); exports.UserSelectMenuComponent = require('./structures/UserSelectMenuComponent'); exports.SelectMenuInteraction = require('./structures/SelectMenuInteraction'); exports.ChannelSelectMenuInteraction = require('./structures/ChannelSelectMenuInteraction'); exports.MentionableSelectMenuInteraction = require('./structures/MentionableSelectMenuInteraction'); exports.MentionableSelectMenuInteraction = require('./structures/MentionableSelectMenuInteraction'); exports.RoleSelectMenuInteraction = require('./structures/RoleSelectMenuInteraction'); exports.StringSelectMenuInteraction = require('./structures/StringSelectMenuInteraction'); exports.UserSelectMenuInteraction = require('./structures/UserSelectMenuInteraction'); exports.SelectMenuOptionBuilder = require('./structures/SelectMenuOptionBuilder'); exports.SeparatorComponent = require('./structures/SeparatorComponent'); exports.SKU = require('./structures/SKU').SKU; exports.SoundboardSound = require('./structures/SoundboardSound.js').SoundboardSound; exports.StringSelectMenuOptionBuilder = require('./structures/StringSelectMenuOptionBuilder'); exports.StageChannel = require('./structures/StageChannel'); exports.StageInstance = require('./structures/StageInstance').StageInstance; exports.Subscription = require('./structures/Subscription').Subscription; exports.Sticker = require('./structures/Sticker').Sticker; exports.StickerPack = require('./structures/StickerPack'); exports.Team = require('./structures/Team'); exports.TeamMember = require('./structures/TeamMember'); exports.TextChannel = require('./structures/TextChannel'); exports.TextDisplayComponent = require('./structures/TextDisplayComponent'); exports.TextInputBuilder = require('./structures/TextInputBuilder'); exports.TextInputComponent = require('./structures/TextInputComponent'); exports.ThreadChannel = require('./structures/ThreadChannel'); exports.ThreadMember = require('./structures/ThreadMember'); exports.ThreadOnlyChannel = require('./structures/ThreadOnlyChannel'); exports.ThumbnailComponent = require('./structures/ThumbnailComponent'); exports.Typing = require('./structures/Typing'); exports.UnfurledMediaItem = require('./structures/UnfurledMediaItem'); exports.User = require('./structures/User'); exports.UserContextMenuCommandInteraction = require('./structures/UserContextMenuCommandInteraction'); exports.VoiceChannelEffect = require('./structures/VoiceChannelEffect'); exports.VoiceChannel = require('./structures/VoiceChannel'); exports.VoiceRegion = require('./structures/VoiceRegion'); exports.VoiceState = require('./structures/VoiceState'); exports.Webhook = require('./structures/Webhook'); exports.Widget = require('./structures/Widget'); exports.WidgetMember = require('./structures/WidgetMember'); exports.WelcomeChannel = require('./structures/WelcomeChannel'); exports.WelcomeScreen = require('./structures/WelcomeScreen'); // External __exportStar(require('discord-api-types/v10'), exports); __exportStar(require('@discordjs/builders'), exports); __exportStar(require('@discordjs/formatters'), exports); __exportStar(require('@discordjs/rest'), exports); __exportStar(require('@discordjs/util'), exports); __exportStar(require('@discordjs/ws'), exports); node_modules/discord.js/README.md 0000664 00000012327 15114741631 0012554 0 ustar 00 <div align="center"> <br /> <p> <a href="https://discord.js.org"><img src="https://discord.js.org/static/logo.svg" width="546" alt="discord.js" /></a> </p> <br /> <p> <a href="https://discord.gg/djs"><img src="https://img.shields.io/discord/222078108977594368?color=5865F2&logo=discord&logoColor=white" alt="Discord server" /></a> <a href="https://www.npmjs.com/package/discord.js"><img src="https://img.shields.io/npm/v/discord.js.svg?maxAge=3600" alt="npm version" /></a> <a href="https://www.npmjs.com/package/discord.js"><img src="https://img.shields.io/npm/dt/discord.js.svg?maxAge=3600" alt="npm downloads" /></a> <a href="https://github.com/discordjs/discord.js/actions"><img src="https://github.com/discordjs/discord.js/actions/workflows/test.yml/badge.svg" alt="Tests status" /></a> <a href="https://github.com/discordjs/discord.js/commits/main/packages/discord.js"><img alt="Last commit." src="https://img.shields.io/github/last-commit/discordjs/discord.js?logo=github&logoColor=ffffff&path=packages%2Fdiscord.js"></a> <a href="https://codecov.io/gh/discordjs/discord.js"><img src="https://codecov.io/gh/discordjs/discord.js/branch/main/graph/badge.svg?precision=2" alt="Code coverage" /></a> </p> <p> <a href="https://vercel.com/?utm_source=discordjs&utm_campaign=oss"><img src="https://raw.githubusercontent.com/discordjs/discord.js/main/.github/powered-by-vercel.svg" alt="Vercel" /></a> <a href="https://www.cloudflare.com"><img src="https://raw.githubusercontent.com/discordjs/discord.js/main/.github/powered-by-workers.png" alt="Cloudflare Workers" height="44" /></a> </p> </div> ## About discord.js is a powerful [Node.js](https://nodejs.org) module that allows you to easily interact with the [Discord API](https://discord.com/developers/docs/intro). - Object-oriented - Predictable abstractions - Performant - 100% coverage of the Discord API ## Installation **Node.js 18 or newer is required.** ```sh npm install discord.js yarn add discord.js pnpm add discord.js bun add discord.js ``` ### Optional packages - [zlib-sync](https://www.npmjs.com/package/zlib-sync) for WebSocket data compression and inflation (`npm install zlib-sync`) - [bufferutil](https://www.npmjs.com/package/bufferutil) for a much faster WebSocket connection (`npm install bufferutil`) - [@discordjs/voice](https://www.npmjs.com/package/@discordjs/voice) for interacting with the Discord Voice API (`npm install @discordjs/voice`) ## Example usage Install discord.js: ```sh npm install discord.js yarn add discord.js pnpm add discord.js bun add discord.js ``` Register a slash command against the Discord API: ```js import { REST, Routes } from 'discord.js'; const commands = [ { name: 'ping', description: 'Replies with Pong!', }, ]; const rest = new REST({ version: '10' }).setToken(TOKEN); try { console.log('Started refreshing application (/) commands.'); await rest.put(Routes.applicationCommands(CLIENT_ID), { body: commands }); console.log('Successfully reloaded application (/) commands.'); } catch (error) { console.error(error); } ``` Afterwards we can create a quite simple example bot: ```js import { Client, GatewayIntentBits } from 'discord.js'; const client = new Client({ intents: [GatewayIntentBits.Guilds] }); client.on('ready', () => { console.log(`Logged in as ${client.user.tag}!`); }); client.on('interactionCreate', async interaction => { if (!interaction.isChatInputCommand()) return; if (interaction.commandName === 'ping') { await interaction.reply('Pong!'); } }); client.login(TOKEN); ``` ## Links - [Website][website] ([source][website-source]) - [Documentation][documentation] - [Guide][guide] ([source][guide-source]) Also see the v13 to v14 [Update Guide][guide-update], which includes updated and removed items from the library. - [discord.js Discord server][discord] - [Discord API Discord server][discord-api] - [GitHub][source] - [npm][npm] - [Related libraries][related-libs] ### Extensions - [RPC][rpc] ([source][rpc-source]) ## Contributing Before creating an issue, please ensure that it hasn't already been reported/suggested, and double-check the [documentation][documentation]. See [the contribution guide][contributing] if you'd like to submit a PR. ## Help If you don't understand something in the documentation, you are experiencing problems, or you just need a gentle nudge in the right direction, please don't hesitate to join our official [discord.js Server][discord]. [website]: https://discord.js.org [website-source]: https://github.com/discordjs/discord.js/tree/main/apps/website [documentation]: https://discord.js.org/docs/packages/discord.js/stable [guide]: https://discordjs.guide/ [guide-source]: https://github.com/discordjs/guide [guide-update]: https://discordjs.guide/additional-info/changes-in-v14.html [discord]: https://discord.gg/djs [discord-api]: https://discord.gg/discord-api [source]: https://github.com/discordjs/discord.js/tree/main/packages/discord.js [npm]: https://www.npmjs.com/package/discord.js [related-libs]: https://discord.com/developers/docs/topics/community-resources#libraries [rpc]: https://www.npmjs.com/package/discord-rpc [rpc-source]: https://github.com/discordjs/RPC [contributing]: https://github.com/discordjs/discord.js/blob/main/.github/CONTRIBUTING.md node_modules/es-errors/.eslintrc 0000664 00000000053 15114741631 0012771 0 ustar 00 { "root": true, "extends": "@ljharb", } node_modules/es-errors/package.json 0000664 00000004176 15114741631 0013445 0 ustar 00 { "name": "es-errors", "version": "1.3.0", "description": "A simple cache for a few of the JS Error constructors.", "main": "index.js", "exports": { ".": "./index.js", "./eval": "./eval.js", "./range": "./range.js", "./ref": "./ref.js", "./syntax": "./syntax.js", "./type": "./type.js", "./uri": "./uri.js", "./package.json": "./package.json" }, "sideEffects": false, "scripts": { "prepack": "npmignore --auto --commentLines=autogenerated", "prepublishOnly": "safe-publish-latest", "prepublish": "not-in-publish || npm run prepublishOnly", "pretest": "npm run lint", "test": "npm run tests-only", "tests-only": "nyc tape 'test/**/*.js'", "posttest": "aud --production", "prelint": "evalmd README.md", "lint": "eslint --ext=js,mjs .", "postlint": "tsc -p . && eclint check $(git ls-files | xargs find 2> /dev/null | grep -vE 'node_modules|\\.git' | grep -v dist/)", "version": "auto-changelog && git add CHANGELOG.md", "postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\"" }, "repository": { "type": "git", "url": "git+https://github.com/ljharb/es-errors.git" }, "keywords": [ "javascript", "ecmascript", "error", "typeerror", "syntaxerror", "rangeerror" ], "author": "Jordan Harband <ljharb@gmail.com>", "license": "MIT", "bugs": { "url": "https://github.com/ljharb/es-errors/issues" }, "homepage": "https://github.com/ljharb/es-errors#readme", "devDependencies": { "@ljharb/eslint-config": "^21.1.0", "@types/tape": "^5.6.4", "aud": "^2.0.4", "auto-changelog": "^2.4.0", "eclint": "^2.8.1", "eslint": "^8.8.0", "evalmd": "^0.0.19", "in-publish": "^2.0.1", "npmignore": "^0.3.1", "nyc": "^10.3.2", "safe-publish-latest": "^2.0.0", "tape": "^5.7.4", "typescript": "next" }, "auto-changelog": { "output": "CHANGELOG.md", "template": "keepachangelog", "unreleased": false, "commitLimit": false, "backfillLimit": false, "hideCredit": true }, "publishConfig": { "ignore": [ ".github/workflows" ] }, "engines": { "node": ">= 0.4" } } node_modules/es-errors/range.d.ts 0000664 00000000107 15114741631 0013033 0 ustar 00 declare const RangeError: RangeErrorConstructor; export = RangeError; node_modules/es-errors/eval.d.ts 0000664 00000000104 15114741631 0012663 0 ustar 00 declare const EvalError: EvalErrorConstructor; export = EvalError; node_modules/es-errors/LICENSE 0000664 00000002057 15114741631 0012160 0 ustar 00 MIT License Copyright (c) 2024 Jordan Harband Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. node_modules/es-errors/range.js 0000664 00000000115 15114741631 0012576 0 ustar 00 'use strict'; /** @type {import('./range')} */ module.exports = RangeError; node_modules/es-errors/ref.js 0000664 00000000117 15114741631 0012260 0 ustar 00 'use strict'; /** @type {import('./ref')} */ module.exports = ReferenceError; node_modules/es-errors/uri.d.ts 0000664 00000000101 15114741631 0012530 0 ustar 00 declare const URIError: URIErrorConstructor; export = URIError; node_modules/es-errors/ref.d.ts 0000664 00000000123 15114741631 0012511 0 ustar 00 declare const ReferenceError: ReferenceErrorConstructor; export = ReferenceError; node_modules/es-errors/index.d.ts 0000664 00000000070 15114741631 0013045 0 ustar 00 declare const Error: ErrorConstructor; export = Error; node_modules/es-errors/type.d.ts 0000664 00000000103 15114741631 0012714 0 ustar 00 declare const TypeError: TypeErrorConstructor export = TypeError; node_modules/es-errors/type.js 0000664 00000000113 15114741631 0012461 0 ustar 00 'use strict'; /** @type {import('./type')} */ module.exports = TypeError; node_modules/es-errors/syntax.d.ts 0000664 00000000112 15114741631 0013261 0 ustar 00 declare const SyntaxError: SyntaxErrorConstructor; export = SyntaxError; node_modules/es-errors/test/index.js 0000664 00000000544 15114741631 0013576 0 ustar 00 'use strict'; var test = require('tape'); var E = require('../'); var R = require('../range'); var Ref = require('../ref'); var S = require('../syntax'); var T = require('../type'); test('errors', function (t) { t.equal(E, Error); t.equal(R, RangeError); t.equal(Ref, ReferenceError); t.equal(S, SyntaxError); t.equal(T, TypeError); t.end(); }); node_modules/es-errors/eval.js 0000664 00000000113 15114741631 0012427 0 ustar 00 'use strict'; /** @type {import('./eval')} */ module.exports = EvalError; node_modules/es-errors/uri.js 0000664 00000000111 15114741631 0012275 0 ustar 00 'use strict'; /** @type {import('./uri')} */ module.exports = URIError; node_modules/es-errors/index.js 0000664 00000000102 15114741631 0012605 0 ustar 00 'use strict'; /** @type {import('.')} */ module.exports = Error; node_modules/es-errors/syntax.js 0000664 00000000117 15114741631 0013032 0 ustar 00 'use strict'; /** @type {import('./syntax')} */ module.exports = SyntaxError; node_modules/es-errors/tsconfig.json 0000664 00000006142 15114741631 0013661 0 ustar 00 { "compilerOptions": { /* Visit https://aka.ms/tsconfig.json to read more about this file */ /* Projects */ /* Language and Environment */ "target": "es5", /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */ // "lib": [], /* Specify a set of bundled library declaration files that describe the target runtime environment. */ // "noLib": true, /* Disable including any library files, including the default lib.d.ts. */ "useDefineForClassFields": true, /* Emit ECMAScript-standard-compliant class fields. */ // "moduleDetection": "auto", /* Control what method is used to detect module-format JS files. */ /* Modules */ "module": "commonjs", /* Specify what module code is generated. */ // "rootDir": "./", /* Specify the root folder within your source files. */ // "moduleResolution": "node", /* Specify how TypeScript looks up a file from a given module specifier. */ // "baseUrl": "./", /* Specify the base directory to resolve non-relative module names. */ // "paths": {}, /* Specify a set of entries that re-map imports to additional lookup locations. */ // "rootDirs": [], /* Allow multiple folders to be treated as one when resolving modules. */ // "typeRoots": ["types"], /* Specify multiple folders that act like `./node_modules/@types`. */ "resolveJsonModule": true, /* Enable importing .json files. */ // "allowArbitraryExtensions": true, /* Enable importing files with any extension, provided a declaration file is present. */ /* JavaScript Support */ "allowJs": true, /* Allow JavaScript files to be a part of your program. Use the `checkJS` option to get errors from these files. */ "checkJs": true, /* Enable error reporting in type-checked JavaScript files. */ "maxNodeModuleJsDepth": 1, /* Specify the maximum folder depth used for checking JavaScript files from `node_modules`. Only applicable with `allowJs`. */ /* Emit */ "declaration": true, /* Generate .d.ts files from TypeScript and JavaScript files in your project. */ "declarationMap": true, /* Create sourcemaps for d.ts files. */ "noEmit": true, /* Disable emitting files from a compilation. */ /* Interop Constraints */ "allowSyntheticDefaultImports": true, /* Allow `import x from y` when a module doesn't have a default export. */ "esModuleInterop": true, /* Emit additional JavaScript to ease support for importing CommonJS modules. This enables `allowSyntheticDefaultImports` for type compatibility. */ "forceConsistentCasingInFileNames": true, /* Ensure that casing is correct in imports. */ /* Type Checking */ "strict": true, /* Enable all strict type-checking options. */ /* Completeness */ // "skipLibCheck": true /* Skip type checking all .d.ts files. */ }, "exclude": [ "coverage", ], } node_modules/es-errors/.github/FUNDING.yml 0000664 00000001053 15114741631 0014323 0 ustar 00 # These are supported funding model platforms github: [ljharb] patreon: # Replace with a single Patreon username open_collective: # Replace with a single Open Collective username ko_fi: # Replace with a single Ko-fi username tidelift: npm/es-errors community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry liberapay: # Replace with a single Liberapay username issuehunt: # Replace with a single IssueHunt username otechie: # Replace with a single Otechie username custom: # Replace with a single custom sponsorship URL node_modules/es-errors/CHANGELOG.md 0000664 00000003451 15114741631 0012763 0 ustar 00 # Changelog All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). ## [v1.3.0](https://github.com/ljharb/es-errors/compare/v1.2.1...v1.3.0) - 2024-02-05 ### Commits - [New] add `EvalError` and `URIError` [`1927627`](https://github.com/ljharb/es-errors/commit/1927627ba68cb6c829d307231376c967db53acdf) ## [v1.2.1](https://github.com/ljharb/es-errors/compare/v1.2.0...v1.2.1) - 2024-02-04 ### Commits - [Fix] add missing `exports` entry [`5bb5f28`](https://github.com/ljharb/es-errors/commit/5bb5f280f98922701109d6ebb82eea2257cecc7e) ## [v1.2.0](https://github.com/ljharb/es-errors/compare/v1.1.0...v1.2.0) - 2024-02-04 ### Commits - [New] add `ReferenceError` [`6d8cf5b`](https://github.com/ljharb/es-errors/commit/6d8cf5bbb6f3f598d02cf6f30e468ba2caa8e143) ## [v1.1.0](https://github.com/ljharb/es-errors/compare/v1.0.0...v1.1.0) - 2024-02-04 ### Commits - [New] add base Error [`2983ab6`](https://github.com/ljharb/es-errors/commit/2983ab65f7bc5441276cb021dc3aa03c78881698) ## v1.0.0 - 2024-02-03 ### Commits - Initial implementation, tests, readme, type [`8f47631`](https://github.com/ljharb/es-errors/commit/8f476317e9ad76f40ad648081829b1a1a3a1288b) - Initial commit [`ea5d099`](https://github.com/ljharb/es-errors/commit/ea5d099ef18e550509ab9e2be000526afd81c385) - npm init [`6f5ebf9`](https://github.com/ljharb/es-errors/commit/6f5ebf9cead474dadd72b9e63dad315820a089ae) - Only apps should have lockfiles [`e1a0aeb`](https://github.com/ljharb/es-errors/commit/e1a0aeb7b80f5cfc56be54d6b2100e915d47def8) - [meta] add `sideEffects` flag [`a9c7d46`](https://github.com/ljharb/es-errors/commit/a9c7d460a492f1d8a241c836bc25a322a19cc043) node_modules/es-errors/README.md 0000664 00000004102 15114741631 0012423 0 ustar 00 # es-errors <sup>[![Version Badge][npm-version-svg]][package-url]</sup> [![github actions][actions-image]][actions-url] [![coverage][codecov-image]][codecov-url] [![License][license-image]][license-url] [![Downloads][downloads-image]][downloads-url] [![npm badge][npm-badge-png]][package-url] A simple cache for a few of the JS Error constructors. ## Example ```js const assert = require('assert'); const Base = require('es-errors'); const Eval = require('es-errors/eval'); const Range = require('es-errors/range'); const Ref = require('es-errors/ref'); const Syntax = require('es-errors/syntax'); const Type = require('es-errors/type'); const URI = require('es-errors/uri'); assert.equal(Base, Error); assert.equal(Eval, EvalError); assert.equal(Range, RangeError); assert.equal(Ref, ReferenceError); assert.equal(Syntax, SyntaxError); assert.equal(Type, TypeError); assert.equal(URI, URIError); ``` ## Tests Simply clone the repo, `npm install`, and run `npm test` ## Security Please email [@ljharb](https://github.com/ljharb) or see https://tidelift.com/security if you have a potential security vulnerability to report. [package-url]: https://npmjs.org/package/es-errors [npm-version-svg]: https://versionbadg.es/ljharb/es-errors.svg [deps-svg]: https://david-dm.org/ljharb/es-errors.svg [deps-url]: https://david-dm.org/ljharb/es-errors [dev-deps-svg]: https://david-dm.org/ljharb/es-errors/dev-status.svg [dev-deps-url]: https://david-dm.org/ljharb/es-errors#info=devDependencies [npm-badge-png]: https://nodei.co/npm/es-errors.png?downloads=true&stars=true [license-image]: https://img.shields.io/npm/l/es-errors.svg [license-url]: LICENSE [downloads-image]: https://img.shields.io/npm/dm/es-errors.svg [downloads-url]: https://npm-stat.com/charts.html?package=es-errors [codecov-image]: https://codecov.io/gh/ljharb/es-errors/branch/main/graphs/badge.svg [codecov-url]: https://app.codecov.io/gh/ljharb/es-errors/ [actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/ljharb/es-errors [actions-url]: https://github.com/ljharb/es-errors/actions node_modules/minimatch/package.json 0000664 00000001274 15114741631 0013471 0 ustar 00 { "author": "Isaac Z. Schlueter <i@izs.me> (http://blog.izs.me)", "name": "minimatch", "description": "a glob matcher in javascript", "version": "3.1.2", "publishConfig": { "tag": "v3-legacy" }, "repository": { "type": "git", "url": "git://github.com/isaacs/minimatch.git" }, "main": "minimatch.js", "scripts": { "test": "tap", "preversion": "npm test", "postversion": "npm publish", "postpublish": "git push origin --all; git push origin --tags" }, "engines": { "node": "*" }, "dependencies": { "brace-expansion": "^1.1.7" }, "devDependencies": { "tap": "^15.1.6" }, "license": "ISC", "files": [ "minimatch.js" ] } node_modules/minimatch/LICENSE 0000664 00000001375 15114741631 0012212 0 ustar 00 The ISC License Copyright (c) Isaac Z. Schlueter and Contributors Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies. THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. node_modules/minimatch/minimatch.js 0000664 00000063232 15114741631 0013514 0 ustar 00 module.exports = minimatch minimatch.Minimatch = Minimatch var path = (function () { try { return require('path') } catch (e) {}}()) || { sep: '/' } minimatch.sep = path.sep var GLOBSTAR = minimatch.GLOBSTAR = Minimatch.GLOBSTAR = {} var expand = require('brace-expansion') var plTypes = { '!': { open: '(?:(?!(?:', close: '))[^/]*?)'}, '?': { open: '(?:', close: ')?' }, '+': { open: '(?:', close: ')+' }, '*': { open: '(?:', close: ')*' }, '@': { open: '(?:', close: ')' } } // any single thing other than / // don't need to escape / when using new RegExp() var qmark = '[^/]' // * => any number of characters var star = qmark + '*?' // ** when dots are allowed. Anything goes, except .. and . // not (^ or / followed by one or two dots followed by $ or /), // followed by anything, any number of times. var twoStarDot = '(?:(?!(?:\\\/|^)(?:\\.{1,2})($|\\\/)).)*?' // not a ^ or / followed by a dot, // followed by anything, any number of times. var twoStarNoDot = '(?:(?!(?:\\\/|^)\\.).)*?' // characters that need to be escaped in RegExp. var reSpecials = charSet('().*{}+?[]^$\\!') // "abc" -> { a:true, b:true, c:true } function charSet (s) { return s.split('').reduce(function (set, c) { set[c] = true return set }, {}) } // normalizes slashes. var slashSplit = /\/+/ minimatch.filter = filter function filter (pattern, options) { options = options || {} return function (p, i, list) { return minimatch(p, pattern, options) } } function ext (a, b) { b = b || {} var t = {} Object.keys(a).forEach(function (k) { t[k] = a[k] }) Object.keys(b).forEach(function (k) { t[k] = b[k] }) return t } minimatch.defaults = function (def) { if (!def || typeof def !== 'object' || !Object.keys(def).length) { return minimatch } var orig = minimatch var m = function minimatch (p, pattern, options) { return orig(p, pattern, ext(def, options)) } m.Minimatch = function Minimatch (pattern, options) { return new orig.Minimatch(pattern, ext(def, options)) } m.Minimatch.defaults = function defaults (options) { return orig.defaults(ext(def, options)).Minimatch } m.filter = function filter (pattern, options) { return orig.filter(pattern, ext(def, options)) } m.defaults = function defaults (options) { return orig.defaults(ext(def, options)) } m.makeRe = function makeRe (pattern, options) { return orig.makeRe(pattern, ext(def, options)) } m.braceExpand = function braceExpand (pattern, options) { return orig.braceExpand(pattern, ext(def, options)) } m.match = function (list, pattern, options) { return orig.match(list, pattern, ext(def, options)) } return m } Minimatch.defaults = function (def) { return minimatch.defaults(def).Minimatch } function minimatch (p, pattern, options) { assertValidPattern(pattern) if (!options) options = {} // shortcut: comments match nothing. if (!options.nocomment && pattern.charAt(0) === '#') { return false } return new Minimatch(pattern, options).match(p) } function Minimatch (pattern, options) { if (!(this instanceof Minimatch)) { return new Minimatch(pattern, options) } assertValidPattern(pattern) if (!options) options = {} pattern = pattern.trim() // windows support: need to use /, not \ if (!options.allowWindowsEscape && path.sep !== '/') { pattern = pattern.split(path.sep).join('/') } this.options = options this.set = [] this.pattern = pattern this.regexp = null this.negate = false this.comment = false this.empty = false this.partial = !!options.partial // make the set of regexps etc. this.make() } Minimatch.prototype.debug = function () {} Minimatch.prototype.make = make function make () { var pattern = this.pattern var options = this.options // empty patterns and comments match nothing. if (!options.nocomment && pattern.charAt(0) === '#') { this.comment = true return } if (!pattern) { this.empty = true return } // step 1: figure out negation, etc. this.parseNegate() // step 2: expand braces var set = this.globSet = this.braceExpand() if (options.debug) this.debug = function debug() { console.error.apply(console, arguments) } this.debug(this.pattern, set) // step 3: now we have a set, so turn each one into a series of path-portion // matching patterns. // These will be regexps, except in the case of "**", which is // set to the GLOBSTAR object for globstar behavior, // and will not contain any / characters set = this.globParts = set.map(function (s) { return s.split(slashSplit) }) this.debug(this.pattern, set) // glob --> regexps set = set.map(function (s, si, set) { return s.map(this.parse, this) }, this) this.debug(this.pattern, set) // filter out everything that didn't compile properly. set = set.filter(function (s) { return s.indexOf(false) === -1 }) this.debug(this.pattern, set) this.set = set } Minimatch.prototype.parseNegate = parseNegate function parseNegate () { var pattern = this.pattern var negate = false var options = this.options var negateOffset = 0 if (options.nonegate) return for (var i = 0, l = pattern.length ; i < l && pattern.charAt(i) === '!' ; i++) { negate = !negate negateOffset++ } if (negateOffset) this.pattern = pattern.substr(negateOffset) this.negate = negate } // Brace expansion: // a{b,c}d -> abd acd // a{b,}c -> abc ac // a{0..3}d -> a0d a1d a2d a3d // a{b,c{d,e}f}g -> abg acdfg acefg // a{b,c}d{e,f}g -> abdeg acdeg abdeg abdfg // // Invalid sets are not expanded. // a{2..}b -> a{2..}b // a{b}c -> a{b}c minimatch.braceExpand = function (pattern, options) { return braceExpand(pattern, options) } Minimatch.prototype.braceExpand = braceExpand function braceExpand (pattern, options) { if (!options) { if (this instanceof Minimatch) { options = this.options } else { options = {} } } pattern = typeof pattern === 'undefined' ? this.pattern : pattern assertValidPattern(pattern) // Thanks to Yeting Li <https://github.com/yetingli> for // improving this regexp to avoid a ReDOS vulnerability. if (options.nobrace || !/\{(?:(?!\{).)*\}/.test(pattern)) { // shortcut. no need to expand. return [pattern] } return expand(pattern) } var MAX_PATTERN_LENGTH = 1024 * 64 var assertValidPattern = function (pattern) { if (typeof pattern !== 'string') { throw new TypeError('invalid pattern') } if (pattern.length > MAX_PATTERN_LENGTH) { throw new TypeError('pattern is too long') } } // parse a component of the expanded set. // At this point, no pattern may contain "/" in it // so we're going to return a 2d array, where each entry is the full // pattern, split on '/', and then turned into a regular expression. // A regexp is made at the end which joins each array with an // escaped /, and another full one which joins each regexp with |. // // Following the lead of Bash 4.1, note that "**" only has special meaning // when it is the *only* thing in a path portion. Otherwise, any series // of * is equivalent to a single *. Globstar behavior is enabled by // default, and can be disabled by setting options.noglobstar. Minimatch.prototype.parse = parse var SUBPARSE = {} function parse (pattern, isSub) { assertValidPattern(pattern) var options = this.options // shortcuts if (pattern === '**') { if (!options.noglobstar) return GLOBSTAR else pattern = '*' } if (pattern === '') return '' var re = '' var hasMagic = !!options.nocase var escaping = false // ? => one single character var patternListStack = [] var negativeLists = [] var stateChar var inClass = false var reClassStart = -1 var classStart = -1 // . and .. never match anything that doesn't start with ., // even when options.dot is set. var patternStart = pattern.charAt(0) === '.' ? '' // anything // not (start or / followed by . or .. followed by / or end) : options.dot ? '(?!(?:^|\\\/)\\.{1,2}(?:$|\\\/))' : '(?!\\.)' var self = this function clearStateChar () { if (stateChar) { // we had some state-tracking character // that wasn't consumed by this pass. switch (stateChar) { case '*': re += star hasMagic = true break case '?': re += qmark hasMagic = true break default: re += '\\' + stateChar break } self.debug('clearStateChar %j %j', stateChar, re) stateChar = false } } for (var i = 0, len = pattern.length, c ; (i < len) && (c = pattern.charAt(i)) ; i++) { this.debug('%s\t%s %s %j', pattern, i, re, c) // skip over any that are escaped. if (escaping && reSpecials[c]) { re += '\\' + c escaping = false continue } switch (c) { /* istanbul ignore next */ case '/': { // completely not allowed, even escaped. // Should already be path-split by now. return false } case '\\': clearStateChar() escaping = true continue // the various stateChar values // for the "extglob" stuff. case '?': case '*': case '+': case '@': case '!': this.debug('%s\t%s %s %j <-- stateChar', pattern, i, re, c) // all of those are literals inside a class, except that // the glob [!a] means [^a] in regexp if (inClass) { this.debug(' in class') if (c === '!' && i === classStart + 1) c = '^' re += c continue } // if we already have a stateChar, then it means // that there was something like ** or +? in there. // Handle the stateChar, then proceed with this one. self.debug('call clearStateChar %j', stateChar) clearStateChar() stateChar = c // if extglob is disabled, then +(asdf|foo) isn't a thing. // just clear the statechar *now*, rather than even diving into // the patternList stuff. if (options.noext) clearStateChar() continue case '(': if (inClass) { re += '(' continue } if (!stateChar) { re += '\\(' continue } patternListStack.push({ type: stateChar, start: i - 1, reStart: re.length, open: plTypes[stateChar].open, close: plTypes[stateChar].close }) // negation is (?:(?!js)[^/]*) re += stateChar === '!' ? '(?:(?!(?:' : '(?:' this.debug('plType %j %j', stateChar, re) stateChar = false continue case ')': if (inClass || !patternListStack.length) { re += '\\)' continue } clearStateChar() hasMagic = true var pl = patternListStack.pop() // negation is (?:(?!js)[^/]*) // The others are (?:<pattern>)<type> re += pl.close if (pl.type === '!') { negativeLists.push(pl) } pl.reEnd = re.length continue case '|': if (inClass || !patternListStack.length || escaping) { re += '\\|' escaping = false continue } clearStateChar() re += '|' continue // these are mostly the same in regexp and glob case '[': // swallow any state-tracking char before the [ clearStateChar() if (inClass) { re += '\\' + c continue } inClass = true classStart = i reClassStart = re.length re += c continue case ']': // a right bracket shall lose its special // meaning and represent itself in // a bracket expression if it occurs // first in the list. -- POSIX.2 2.8.3.2 if (i === classStart + 1 || !inClass) { re += '\\' + c escaping = false continue } // handle the case where we left a class open. // "[z-a]" is valid, equivalent to "\[z-a\]" // split where the last [ was, make sure we don't have // an invalid re. if so, re-walk the contents of the // would-be class to re-translate any characters that // were passed through as-is // TODO: It would probably be faster to determine this // without a try/catch and a new RegExp, but it's tricky // to do safely. For now, this is safe and works. var cs = pattern.substring(classStart + 1, i) try { RegExp('[' + cs + ']') } catch (er) { // not a valid class! var sp = this.parse(cs, SUBPARSE) re = re.substr(0, reClassStart) + '\\[' + sp[0] + '\\]' hasMagic = hasMagic || sp[1] inClass = false continue } // finish up the class. hasMagic = true inClass = false re += c continue default: // swallow any state char that wasn't consumed clearStateChar() if (escaping) { // no need escaping = false } else if (reSpecials[c] && !(c === '^' && inClass)) { re += '\\' } re += c } // switch } // for // handle the case where we left a class open. // "[abc" is valid, equivalent to "\[abc" if (inClass) { // split where the last [ was, and escape it // this is a huge pita. We now have to re-walk // the contents of the would-be class to re-translate // any characters that were passed through as-is cs = pattern.substr(classStart + 1) sp = this.parse(cs, SUBPARSE) re = re.substr(0, reClassStart) + '\\[' + sp[0] hasMagic = hasMagic || sp[1] } // handle the case where we had a +( thing at the *end* // of the pattern. // each pattern list stack adds 3 chars, and we need to go through // and escape any | chars that were passed through as-is for the regexp. // Go through and escape them, taking care not to double-escape any // | chars that were already escaped. for (pl = patternListStack.pop(); pl; pl = patternListStack.pop()) { var tail = re.slice(pl.reStart + pl.open.length) this.debug('setting tail', re, pl) // maybe some even number of \, then maybe 1 \, followed by a | tail = tail.replace(/((?:\\{2}){0,64})(\\?)\|/g, function (_, $1, $2) { if (!$2) { // the | isn't already escaped, so escape it. $2 = '\\' } // need to escape all those slashes *again*, without escaping the // one that we need for escaping the | character. As it works out, // escaping an even number of slashes can be done by simply repeating // it exactly after itself. That's why this trick works. // // I am sorry that you have to see this. return $1 + $1 + $2 + '|' }) this.debug('tail=%j\n %s', tail, tail, pl, re) var t = pl.type === '*' ? star : pl.type === '?' ? qmark : '\\' + pl.type hasMagic = true re = re.slice(0, pl.reStart) + t + '\\(' + tail } // handle trailing things that only matter at the very end. clearStateChar() if (escaping) { // trailing \\ re += '\\\\' } // only need to apply the nodot start if the re starts with // something that could conceivably capture a dot var addPatternStart = false switch (re.charAt(0)) { case '[': case '.': case '(': addPatternStart = true } // Hack to work around lack of negative lookbehind in JS // A pattern like: *.!(x).!(y|z) needs to ensure that a name // like 'a.xyz.yz' doesn't match. So, the first negative // lookahead, has to look ALL the way ahead, to the end of // the pattern. for (var n = negativeLists.length - 1; n > -1; n--) { var nl = negativeLists[n] var nlBefore = re.slice(0, nl.reStart) var nlFirst = re.slice(nl.reStart, nl.reEnd - 8) var nlLast = re.slice(nl.reEnd - 8, nl.reEnd) var nlAfter = re.slice(nl.reEnd) nlLast += nlAfter // Handle nested stuff like *(*.js|!(*.json)), where open parens // mean that we should *not* include the ) in the bit that is considered // "after" the negated section. var openParensBefore = nlBefore.split('(').length - 1 var cleanAfter = nlAfter for (i = 0; i < openParensBefore; i++) { cleanAfter = cleanAfter.replace(/\)[+*?]?/, '') } nlAfter = cleanAfter var dollar = '' if (nlAfter === '' && isSub !== SUBPARSE) { dollar = '$' } var newRe = nlBefore + nlFirst + nlAfter + dollar + nlLast re = newRe } // if the re is not "" at this point, then we need to make sure // it doesn't match against an empty path part. // Otherwise a/* will match a/, which it should not. if (re !== '' && hasMagic) { re = '(?=.)' + re } if (addPatternStart) { re = patternStart + re } // parsing just a piece of a larger pattern. if (isSub === SUBPARSE) { return [re, hasMagic] } // skip the regexp for non-magical patterns // unescape anything in it, though, so that it'll be // an exact match against a file etc. if (!hasMagic) { return globUnescape(pattern) } var flags = options.nocase ? 'i' : '' try { var regExp = new RegExp('^' + re + '$', flags) } catch (er) /* istanbul ignore next - should be impossible */ { // If it was an invalid regular expression, then it can't match // anything. This trick looks for a character after the end of // the string, which is of course impossible, except in multi-line // mode, but it's not a /m regex. return new RegExp('$.') } regExp._glob = pattern regExp._src = re return regExp } minimatch.makeRe = function (pattern, options) { return new Minimatch(pattern, options || {}).makeRe() } Minimatch.prototype.makeRe = makeRe function makeRe () { if (this.regexp || this.regexp === false) return this.regexp // at this point, this.set is a 2d array of partial // pattern strings, or "**". // // It's better to use .match(). This function shouldn't // be used, really, but it's pretty convenient sometimes, // when you just want to work with a regex. var set = this.set if (!set.length) { this.regexp = false return this.regexp } var options = this.options var twoStar = options.noglobstar ? star : options.dot ? twoStarDot : twoStarNoDot var flags = options.nocase ? 'i' : '' var re = set.map(function (pattern) { return pattern.map(function (p) { return (p === GLOBSTAR) ? twoStar : (typeof p === 'string') ? regExpEscape(p) : p._src }).join('\\\/') }).join('|') // must match entire pattern // ending in a * or ** will make it less strict. re = '^(?:' + re + ')$' // can match anything, as long as it's not this. if (this.negate) re = '^(?!' + re + ').*$' try { this.regexp = new RegExp(re, flags) } catch (ex) /* istanbul ignore next - should be impossible */ { this.regexp = false } return this.regexp } minimatch.match = function (list, pattern, options) { options = options || {} var mm = new Minimatch(pattern, options) list = list.filter(function (f) { return mm.match(f) }) if (mm.options.nonull && !list.length) { list.push(pattern) } return list } Minimatch.prototype.match = function match (f, partial) { if (typeof partial === 'undefined') partial = this.partial this.debug('match', f, this.pattern) // short-circuit in the case of busted things. // comments, etc. if (this.comment) return false if (this.empty) return f === '' if (f === '/' && partial) return true var options = this.options // windows: need to use /, not \ if (path.sep !== '/') { f = f.split(path.sep).join('/') } // treat the test path as a set of pathparts. f = f.split(slashSplit) this.debug(this.pattern, 'split', f) // just ONE of the pattern sets in this.set needs to match // in order for it to be valid. If negating, then just one // match means that we have failed. // Either way, return on the first hit. var set = this.set this.debug(this.pattern, 'set', set) // Find the basename of the path by looking for the last non-empty segment var filename var i for (i = f.length - 1; i >= 0; i--) { filename = f[i] if (filename) break } for (i = 0; i < set.length; i++) { var pattern = set[i] var file = f if (options.matchBase && pattern.length === 1) { file = [filename] } var hit = this.matchOne(file, pattern, partial) if (hit) { if (options.flipNegate) return true return !this.negate } } // didn't get any hits. this is success if it's a negative // pattern, failure otherwise. if (options.flipNegate) return false return this.negate } // set partial to true to test if, for example, // "/a/b" matches the start of "/*/b/*/d" // Partial means, if you run out of file before you run // out of pattern, then that's fine, as long as all // the parts match. Minimatch.prototype.matchOne = function (file, pattern, partial) { var options = this.options this.debug('matchOne', { 'this': this, file: file, pattern: pattern }) this.debug('matchOne', file.length, pattern.length) for (var fi = 0, pi = 0, fl = file.length, pl = pattern.length ; (fi < fl) && (pi < pl) ; fi++, pi++) { this.debug('matchOne loop') var p = pattern[pi] var f = file[fi] this.debug(pattern, p, f) // should be impossible. // some invalid regexp stuff in the set. /* istanbul ignore if */ if (p === false) return false if (p === GLOBSTAR) { this.debug('GLOBSTAR', [pattern, p, f]) // "**" // a/**/b/**/c would match the following: // a/b/x/y/z/c // a/x/y/z/b/c // a/b/x/b/x/c // a/b/c // To do this, take the rest of the pattern after // the **, and see if it would match the file remainder. // If so, return success. // If not, the ** "swallows" a segment, and try again. // This is recursively awful. // // a/**/b/**/c matching a/b/x/y/z/c // - a matches a // - doublestar // - matchOne(b/x/y/z/c, b/**/c) // - b matches b // - doublestar // - matchOne(x/y/z/c, c) -> no // - matchOne(y/z/c, c) -> no // - matchOne(z/c, c) -> no // - matchOne(c, c) yes, hit var fr = fi var pr = pi + 1 if (pr === pl) { this.debug('** at the end') // a ** at the end will just swallow the rest. // We have found a match. // however, it will not swallow /.x, unless // options.dot is set. // . and .. are *never* matched by **, for explosively // exponential reasons. for (; fi < fl; fi++) { if (file[fi] === '.' || file[fi] === '..' || (!options.dot && file[fi].charAt(0) === '.')) return false } return true } // ok, let's see if we can swallow whatever we can. while (fr < fl) { var swallowee = file[fr] this.debug('\nglobstar while', file, fr, pattern, pr, swallowee) // XXX remove this slice. Just pass the start index. if (this.matchOne(file.slice(fr), pattern.slice(pr), partial)) { this.debug('globstar found match!', fr, fl, swallowee) // found a match. return true } else { // can't swallow "." or ".." ever. // can only swallow ".foo" when explicitly asked. if (swallowee === '.' || swallowee === '..' || (!options.dot && swallowee.charAt(0) === '.')) { this.debug('dot detected!', file, fr, pattern, pr) break } // ** swallows a segment, and continue. this.debug('globstar swallow a segment, and continue') fr++ } } // no match was found. // However, in partial mode, we can't say this is necessarily over. // If there's more *pattern* left, then /* istanbul ignore if */ if (partial) { // ran out of file this.debug('\n>>> no match, partial?', file, fr, pattern, pr) if (fr === fl) return true } return false } // something other than ** // non-magic patterns just have to match exactly // patterns with magic have been turned into regexps. var hit if (typeof p === 'string') { hit = f === p this.debug('string match', p, f, hit) } else { hit = f.match(p) this.debug('pattern match', p, f, hit) } if (!hit) return false } // Note: ending in / means that we'll get a final "" // at the end of the pattern. This can only match a // corresponding "" at the end of the file. // If the file ends in /, then it can only match a // a pattern that ends in /, unless the pattern just // doesn't have any more for it. But, a/b/ should *not* // match "a/b/*", even though "" matches against the // [^/]*? pattern, except in partial mode, where it might // simply not be reached yet. // However, a/b/ should still satisfy a/* // now either we fell off the end of the pattern, or we're done. if (fi === fl && pi === pl) { // ran out of pattern and filename at the same time. // an exact hit! return true } else if (fi === fl) { // ran out of file, but still had pattern left. // this is ok if we're doing the match as part of // a glob fs traversal. return partial } else /* istanbul ignore else */ if (pi === pl) { // ran out of pattern, still have file left. // this is only acceptable if we're on the very last // empty segment of a file with a trailing slash. // a/* should match a/b/ return (fi === fl - 1) && (file[fi] === '') } // should be unreachable. /* istanbul ignore next */ throw new Error('wtf?') } // replace stuff like \* with * function globUnescape (s) { return s.replace(/\\(.)/g, '$1') } function regExpEscape (s) { return s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, '\\$&') } node_modules/minimatch/README.md 0000664 00000016003 15114741631 0012456 0 ustar 00 # minimatch A minimal matching utility. [](http://travis-ci.org/isaacs/minimatch) This is the matching library used internally by npm. It works by converting glob expressions into JavaScript `RegExp` objects. ## Usage ```javascript var minimatch = require("minimatch") minimatch("bar.foo", "*.foo") // true! minimatch("bar.foo", "*.bar") // false! minimatch("bar.foo", "*.+(bar|foo)", { debug: true }) // true, and noisy! ``` ## Features Supports these glob features: * Brace Expansion * Extended glob matching * "Globstar" `**` matching See: * `man sh` * `man bash` * `man 3 fnmatch` * `man 5 gitignore` ## Minimatch Class Create a minimatch object by instantiating the `minimatch.Minimatch` class. ```javascript var Minimatch = require("minimatch").Minimatch var mm = new Minimatch(pattern, options) ``` ### Properties * `pattern` The original pattern the minimatch object represents. * `options` The options supplied to the constructor. * `set` A 2-dimensional array of regexp or string expressions. Each row in the array corresponds to a brace-expanded pattern. Each item in the row corresponds to a single path-part. For example, the pattern `{a,b/c}/d` would expand to a set of patterns like: [ [ a, d ] , [ b, c, d ] ] If a portion of the pattern doesn't have any "magic" in it (that is, it's something like `"foo"` rather than `fo*o?`), then it will be left as a string rather than converted to a regular expression. * `regexp` Created by the `makeRe` method. A single regular expression expressing the entire pattern. This is useful in cases where you wish to use the pattern somewhat like `fnmatch(3)` with `FNM_PATH` enabled. * `negate` True if the pattern is negated. * `comment` True if the pattern is a comment. * `empty` True if the pattern is `""`. ### Methods * `makeRe` Generate the `regexp` member if necessary, and return it. Will return `false` if the pattern is invalid. * `match(fname)` Return true if the filename matches the pattern, or false otherwise. * `matchOne(fileArray, patternArray, partial)` Take a `/`-split filename, and match it against a single row in the `regExpSet`. This method is mainly for internal use, but is exposed so that it can be used by a glob-walker that needs to avoid excessive filesystem calls. All other methods are internal, and will be called as necessary. ### minimatch(path, pattern, options) Main export. Tests a path against the pattern using the options. ```javascript var isJS = minimatch(file, "*.js", { matchBase: true }) ``` ### minimatch.filter(pattern, options) Returns a function that tests its supplied argument, suitable for use with `Array.filter`. Example: ```javascript var javascripts = fileList.filter(minimatch.filter("*.js", {matchBase: true})) ``` ### minimatch.match(list, pattern, options) Match against the list of files, in the style of fnmatch or glob. If nothing is matched, and options.nonull is set, then return a list containing the pattern itself. ```javascript var javascripts = minimatch.match(fileList, "*.js", {matchBase: true})) ``` ### minimatch.makeRe(pattern, options) Make a regular expression object from the pattern. ## Options All options are `false` by default. ### debug Dump a ton of stuff to stderr. ### nobrace Do not expand `{a,b}` and `{1..3}` brace sets. ### noglobstar Disable `**` matching against multiple folder names. ### dot Allow patterns to match filenames starting with a period, even if the pattern does not explicitly have a period in that spot. Note that by default, `a/**/b` will **not** match `a/.d/b`, unless `dot` is set. ### noext Disable "extglob" style patterns like `+(a|b)`. ### nocase Perform a case-insensitive match. ### nonull When a match is not found by `minimatch.match`, return a list containing the pattern itself if this option is set. When not set, an empty list is returned if there are no matches. ### matchBase If set, then patterns without slashes will be matched against the basename of the path if it contains slashes. For example, `a?b` would match the path `/xyz/123/acb`, but not `/xyz/acb/123`. ### nocomment Suppress the behavior of treating `#` at the start of a pattern as a comment. ### nonegate Suppress the behavior of treating a leading `!` character as negation. ### flipNegate Returns from negate expressions the same as if they were not negated. (Ie, true on a hit, false on a miss.) ### partial Compare a partial path to a pattern. As long as the parts of the path that are present are not contradicted by the pattern, it will be treated as a match. This is useful in applications where you're walking through a folder structure, and don't yet have the full path, but want to ensure that you do not walk down paths that can never be a match. For example, ```js minimatch('/a/b', '/a/*/c/d', { partial: true }) // true, might be /a/b/c/d minimatch('/a/b', '/**/d', { partial: true }) // true, might be /a/b/.../d minimatch('/x/y/z', '/a/**/z', { partial: true }) // false, because x !== a ``` ### allowWindowsEscape Windows path separator `\` is by default converted to `/`, which prohibits the usage of `\` as a escape character. This flag skips that behavior and allows using the escape character. ## Comparisons to other fnmatch/glob implementations While strict compliance with the existing standards is a worthwhile goal, some discrepancies exist between minimatch and other implementations, and are intentional. If the pattern starts with a `!` character, then it is negated. Set the `nonegate` flag to suppress this behavior, and treat leading `!` characters normally. This is perhaps relevant if you wish to start the pattern with a negative extglob pattern like `!(a|B)`. Multiple `!` characters at the start of a pattern will negate the pattern multiple times. If a pattern starts with `#`, then it is treated as a comment, and will not match anything. Use `\#` to match a literal `#` at the start of a line, or set the `nocomment` flag to suppress this behavior. The double-star character `**` is supported by default, unless the `noglobstar` flag is set. This is supported in the manner of bsdglob and bash 4.1, where `**` only has special significance if it is the only thing in a path part. That is, `a/**/b` will match `a/x/y/b`, but `a/**b` will not. If an escaped pattern has no matches, and the `nonull` flag is set, then minimatch.match returns the pattern as-provided, rather than interpreting the character escapes. For example, `minimatch.match([], "\\*a\\?")` will return `"\\*a\\?"` rather than `"*a?"`. This is akin to setting the `nullglob` option in bash, except that it does not resolve escaped pattern characters. If brace expansion is not disabled, then it is performed before any other interpretation of the glob pattern. Thus, a pattern like `+(a|{b),c)}`, which would not be valid in bash or zsh, is expanded **first** into the set of `+(a|b)` and `+(a|c)`, and those patterns are checked for validity. Since those two are valid, matching proceeds. node_modules/discord-api-types/globals.d.ts 0000664 00000007401 15114741631 0015005 0 ustar 00 /** * @see {@link https://discord.com/developers/docs/reference#snowflakes} */ export type Snowflake = string; /** * @see {@link https://discord.com/developers/docs/topics/permissions} */ export type Permissions = string; /** * @see {@link https://discord.com/developers/docs/reference#message-formatting-formats} */ export declare const FormattingPatterns: { /** * Regular expression for matching a user mention, strictly without a nickname * * The `id` group property is present on the `exec` result of this expression */ readonly User: RegExp; /** * Regular expression for matching a user mention, strictly with a nickname * * The `id` group property is present on the `exec` result of this expression * * @deprecated Passing `!` in user mentions is no longer necessary / supported, and future message contents won't have it */ readonly UserWithNickname: RegExp; /** * Regular expression for matching a user mention, with or without a nickname * * The `id` group property is present on the `exec` result of this expression * * @deprecated Passing `!` in user mentions is no longer necessary / supported, and future message contents won't have it */ readonly UserWithOptionalNickname: RegExp; /** * Regular expression for matching a channel mention * * The `id` group property is present on the `exec` result of this expression */ readonly Channel: RegExp; /** * Regular expression for matching a role mention * * The `id` group property is present on the `exec` result of this expression */ readonly Role: RegExp; /** * Regular expression for matching a application command mention * * The `fullName` (possibly including `name`, `subcommandOrGroup` and `subcommand`) and `id` group properties are present on the `exec` result of this expression */ readonly SlashCommand: RegExp; /** * Regular expression for matching a custom emoji, either static or animated * * The `animated`, `name` and `id` group properties are present on the `exec` result of this expression */ readonly Emoji: RegExp; /** * Regular expression for matching strictly an animated custom emoji * * The `animated`, `name` and `id` group properties are present on the `exec` result of this expression */ readonly AnimatedEmoji: RegExp; /** * Regular expression for matching strictly a static custom emoji * * The `name` and `id` group properties are present on the `exec` result of this expression */ readonly StaticEmoji: RegExp; /** * Regular expression for matching a timestamp, either default or custom styled * * The `timestamp` and `style` group properties are present on the `exec` result of this expression */ readonly Timestamp: RegExp; /** * Regular expression for matching strictly default styled timestamps * * The `timestamp` group property is present on the `exec` result of this expression */ readonly DefaultStyledTimestamp: RegExp; /** * Regular expression for matching strictly custom styled timestamps * * The `timestamp` and `style` group properties are present on the `exec` result of this expression */ readonly StyledTimestamp: RegExp; /** * Regular expression for matching a guild navigation mention * * The `type` group property is present on the `exec` result of this expression */ readonly GuildNavigation: RegExp; /** * Regular expression for matching a linked role mention * * The `id` group property is present on the `exec` result of this expression */ readonly LinkedRole: RegExp; }; //# sourceMappingURL=globals.d.ts.map node_modules/discord-api-types/globals.js.map 0000664 00000001327 15114741631 0015326 0 ustar 00 {"version":3,"file":"globals.js","sourceRoot":"","sources":["globals.ts"],"names":[],"mappings":";;;AAUA;;GAEG;AACU,QAAA,kBAAkB,GAAG;IACjC;;;;OAIG;IACH,IAAI,EAAE,qBAAqB;IAC3B;;;;;;OAMG;IACH,gBAAgB,EAAE,sBAAsB;IACxC;;;;;;OAMG;IACH,wBAAwB,EAAE,uBAAuB;IACjD;;;;OAIG;IACH,OAAO,EAAE,qBAAqB;IAC9B;;;;OAIG;IACH,IAAI,EAAE,sBAAsB;IAC5B;;;;OAIG;IACH,YAAY,EACX,2PAA2P;IAC5P;;;;OAIG;IACH,KAAK,EAAE,sDAAsD;IAC7D;;;;OAIG;IACH,aAAa,EAAE,qDAAqD;IACpE;;;;OAIG;IACH,WAAW,EAAE,uCAAuC;IACpD;;;;OAIG;IACH,sDAAsD;IACtD,SAAS,EAAE,qDAAqD;IAChE;;;;OAIG;IACH,sBAAsB,EAAE,8BAA8B;IACtD;;;;OAIG;IACH,eAAe,EAAE,kDAAkD;IACnE;;;;OAIG;IACH,eAAe,EAAE,mDAAmD;IACpE;;;;OAIG;IACH,UAAU,EAAE,oCAAoC;CACvC,CAAC;AAEX;;;;GAIG;AACH,MAAM,CAAC,MAAM,CAAC,0BAAkB,CAAC,CAAC"} node_modules/discord-api-types/v10.d.ts.map 0000664 00000000403 15114741631 0014537 0 ustar 00 {"version":3,"file":"v10.d.ts","sourceRoot":"","sources":["v10.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAC;AAC9B,cAAc,WAAW,CAAC;AAC1B,cAAc,sBAAsB,CAAC;AACrC,cAAc,kBAAkB,CAAC;AACjC,cAAc,WAAW,CAAC;AAC1B,cAAc,mBAAmB,CAAC;AAClC,OAAO,KAAK,KAAK,MAAM,aAAa,CAAC"} node_modules/discord-api-types/v9.d.ts 0000664 00000000401 15114741631 0013711 0 ustar 00 export * from './gateway/v9'; export * from './globals'; export * from './payloads/v9/index'; export * from './rest/v9/index'; export * from './rpc/v9'; export * from './utils/internals'; export * as Utils from './utils/v9'; //# sourceMappingURL=v9.d.ts.map node_modules/discord-api-types/utils/v10.d.ts.map 0000664 00000002616 15114741631 0015707 0 ustar 00 {"version":3,"file":"v10.d.ts","sourceRoot":"","sources":["v10.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACX,kCAAkC,EAClC,qCAAqC,EACrC,gCAAgC,EAChC,kBAAkB,EAClB,8BAA8B,EAC9B,yBAAyB,EACzB,yCAAyC,EACzC,yBAAyB,EACzB,gBAAgB,EAChB,mBAAmB,EACnB,cAAc,EACd,oCAAoC,EACpC,gCAAgC,EAChC,mCAAmC,EACnC,8BAA8B,EAC9B,wCAAwC,EACxC,MAAM,uBAAuB,CAAC;AAK/B;;;;;GAKG;AACH,wBAAgB,eAAe,CAAC,WAAW,EAAE,cAAc,GAAG,WAAW,IAAI,gBAAgB,CAE5F;AAED;;;;;GAKG;AACH,wBAAgB,kBAAkB,CAAC,WAAW,EAAE,cAAc,GAAG,WAAW,IAAI,mBAAmB,CAElG;AAID;;;;;GAKG;AACH,wBAAgB,iCAAiC,CAChD,WAAW,EAAE,gCAAgC,GAC3C,WAAW,IAAI,kCAAkC,CAEnD;AAED;;;;;GAKG;AACH,wBAAgB,oCAAoC,CACnD,WAAW,EAAE,gCAAgC,GAC3C,WAAW,IAAI,qCAAqC,CAEtD;AAID;;;;;GAKG;AACH,wBAAgB,+BAA+B,CAC9C,WAAW,EAAE,8BAA8B,GACzC,WAAW,IAAI,gCAAgC,CAEjD;AAED;;;;;GAKG;AACH,wBAAgB,kCAAkC,CACjD,WAAW,EAAE,8BAA8B,GACzC,WAAW,IAAI,mCAAmC,CAEpD;AAID;;;;;GAKG;AACH,wBAAgB,YAAY,CAAC,SAAS,EAAE,kBAAkB,GAAG,SAAS,IAAI,yBAAyB,CAElG;AAED;;;;;GAKG;AACH,wBAAgB,mBAAmB,CAAC,SAAS,EAAE,kBAAkB,GAAG,SAAS,IAAI,8BAA8B,CAE9G;AAID;;;;;GAKG;AACH,wBAAgB,6BAA6B,CAC5C,WAAW,EAAE,cAAc,GACzB,WAAW,IAAI,8BAA8B,CAE/C;AAED;;;;;GAKG;AACH,wBAAgB,mCAAmC,CAClD,WAAW,EAAE,8BAA8B,GACzC,WAAW,IAAI,oCAAoC,CAErD;AAED;;;;;GAKG;AACH,wBAAgB,uCAAuC,CACtD,WAAW,EAAE,8BAA8B,GACzC,WAAW,IAAI,wCAAwC,CAQzD;AAID;;;;;GAKG;AACH,wBAAgB,wCAAwC,CACvD,WAAW,EAAE,gCAAgC,GAC3C,WAAW,IAAI,yCAAyC,CAE1D;AAED;;;;;GAKG;AACH,wBAAgB,0CAA0C,CACzD,WAAW,EAAE,gCAAgC,GAC3C,WAAW,IAAI,yBAAyB,CAK1C"} node_modules/discord-api-types/utils/index.d.ts.map 0000664 00000000164 15114741631 0016404 0 ustar 00 {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":"AAGA,cAAc,OAAO,CAAC"} node_modules/discord-api-types/utils/v9.d.ts 0000664 00000012303 15114741631 0015055 0 ustar 00 import type { APIApplicationCommandDMInteraction, APIApplicationCommandGuildInteraction, APIApplicationCommandInteraction, APIButtonComponent, APIButtonComponentWithCustomId, APIButtonComponentWithURL, APIChatInputApplicationCommandInteraction, APIContextMenuInteraction, APIDMInteraction, APIGuildInteraction, APIInteraction, APIMessageComponentButtonInteraction, APIMessageComponentDMInteraction, APIMessageComponentGuildInteraction, APIMessageComponentInteraction, APIMessageComponentSelectMenuInteraction } from '../payloads/v9/index'; /** * A type-guard check for DM interactions * * @param interaction - The interaction to check against * @returns A boolean that indicates if the interaction was received in a DM channel */ export declare function isDMInteraction(interaction: APIInteraction): interaction is APIDMInteraction; /** * A type-guard check for guild interactions * * @param interaction - The interaction to check against * @returns A boolean that indicates if the interaction was received in a guild */ export declare function isGuildInteraction(interaction: APIInteraction): interaction is APIGuildInteraction; /** * A type-guard check for DM application command interactions * * @param interaction - The application command interaction to check against * @returns A boolean that indicates if the application command interaction was received in a DM channel */ export declare function isApplicationCommandDMInteraction(interaction: APIApplicationCommandInteraction): interaction is APIApplicationCommandDMInteraction; /** * A type-guard check for guild application command interactions * * @param interaction - The interaction to check against * @returns A boolean that indicates if the application command interaction was received in a guild */ export declare function isApplicationCommandGuildInteraction(interaction: APIApplicationCommandInteraction): interaction is APIApplicationCommandGuildInteraction; /** * A type-guard check for DM message component interactions * * @param interaction - The message component interaction to check against * @returns A boolean that indicates if the message component interaction was received in a DM channel */ export declare function isMessageComponentDMInteraction(interaction: APIMessageComponentInteraction): interaction is APIMessageComponentDMInteraction; /** * A type-guard check for guild message component interactions * * @param interaction - The interaction to check against * @returns A boolean that indicates if the message component interaction was received in a guild */ export declare function isMessageComponentGuildInteraction(interaction: APIMessageComponentInteraction): interaction is APIMessageComponentGuildInteraction; /** * A type-guard check for buttons that have a `url` attached to them. * * @param component - The button to check against * @returns A boolean that indicates if the button has a `url` attached to it */ export declare function isLinkButton(component: APIButtonComponent): component is APIButtonComponentWithURL; /** * A type-guard check for buttons that have a `custom_id` attached to them. * * @param component - The button to check against * @returns A boolean that indicates if the button has a `custom_id` attached to it */ export declare function isInteractionButton(component: APIButtonComponent): component is APIButtonComponentWithCustomId; /** * A type-guard check for message component interactions * * @param interaction - The interaction to check against * @returns A boolean that indicates if the interaction is a message component */ export declare function isMessageComponentInteraction(interaction: APIInteraction): interaction is APIMessageComponentInteraction; /** * A type-guard check for button message component interactions * * @param interaction - The message component interaction to check against * @returns A boolean that indicates if the message component is a button */ export declare function isMessageComponentButtonInteraction(interaction: APIMessageComponentInteraction): interaction is APIMessageComponentButtonInteraction; /** * A type-guard check for select menu message component interactions * * @param interaction - The message component interaction to check against * @returns A boolean that indicates if the message component is a select menu */ export declare function isMessageComponentSelectMenuInteraction(interaction: APIMessageComponentInteraction): interaction is APIMessageComponentSelectMenuInteraction; /** * A type-guard check for chat input application commands. * * @param interaction - The interaction to check against * @returns A boolean that indicates if the interaction is a chat input application command */ export declare function isChatInputApplicationCommandInteraction(interaction: APIApplicationCommandInteraction): interaction is APIChatInputApplicationCommandInteraction; /** * A type-guard check for context menu application commands. * * @param interaction - The interaction to check against * @returns A boolean that indicates if the interaction is a context menu application command */ export declare function isContextMenuApplicationCommandInteraction(interaction: APIApplicationCommandInteraction): interaction is APIContextMenuInteraction; //# sourceMappingURL=v9.d.ts.map node_modules/discord-api-types/utils/internals.d.ts 0000664 00000003031 15114741631 0016514 0 ustar 00 export type _Nullable<T> = { [P in keyof T]: T[P] | null; }; export type _NonNullableFields<T> = { [P in keyof T]: NonNullable<T[P]>; }; export type _AddUndefinedToPossiblyUndefinedPropertiesOfInterface<Base> = { [K in keyof Base]: Base[K] extends Exclude<Base[K], undefined> ? _AddUndefinedToPossiblyUndefinedPropertiesOfInterface<Base[K]> : _AddUndefinedToPossiblyUndefinedPropertiesOfInterface<Base[K]> | undefined; }; export type _StrictPartial<Base> = _AddUndefinedToPossiblyUndefinedPropertiesOfInterface<Partial<Base>>; export type _StrictRequired<Base> = Required<{ [K in keyof Base]: Exclude<Base[K], undefined>; }>; export type _UnionToIntersection<U> = (U extends any ? (k: U) => void : never) extends (k: infer I) => void ? I : never; export type _Keys<T> = keyof T; export type _DistributiveKeys<T> = T extends unknown ? _Keys<T> : never; /** * Allows picking of keys from unions that are disjoint */ export type _DistributivePick<T, K extends _DistributiveKeys<T>> = T extends unknown ? keyof _Pick<T, K> extends never ? never : { [P in keyof _Pick<T, K>]: _Pick<T, K>[P]; } : never; export type _Pick<T, K> = Pick<T, Extract<keyof T, K>>; /** * Allows omitting of keys from unions that are disjoint */ export type _DistributiveOmit<T, K extends _DistributiveKeys<T>> = T extends unknown ? { [P in keyof _Omit<T, K>]: _Omit<T, K>[P]; } : never; export type _Omit<T, K> = Omit<T, Extract<keyof T, K>>; export declare const urlSafeCharacters: { test(input: string): boolean; }; //# sourceMappingURL=internals.d.ts.map node_modules/discord-api-types/utils/v10.js 0000664 00000013454 15114741631 0014701 0 ustar 00 "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.isDMInteraction = isDMInteraction; exports.isGuildInteraction = isGuildInteraction; exports.isApplicationCommandDMInteraction = isApplicationCommandDMInteraction; exports.isApplicationCommandGuildInteraction = isApplicationCommandGuildInteraction; exports.isMessageComponentDMInteraction = isMessageComponentDMInteraction; exports.isMessageComponentGuildInteraction = isMessageComponentGuildInteraction; exports.isLinkButton = isLinkButton; exports.isInteractionButton = isInteractionButton; exports.isMessageComponentInteraction = isMessageComponentInteraction; exports.isMessageComponentButtonInteraction = isMessageComponentButtonInteraction; exports.isMessageComponentSelectMenuInteraction = isMessageComponentSelectMenuInteraction; exports.isChatInputApplicationCommandInteraction = isChatInputApplicationCommandInteraction; exports.isContextMenuApplicationCommandInteraction = isContextMenuApplicationCommandInteraction; const index_1 = require("../payloads/v10/index"); // Interactions /** * A type-guard check for DM interactions * * @param interaction - The interaction to check against * @returns A boolean that indicates if the interaction was received in a DM channel */ function isDMInteraction(interaction) { return Reflect.has(interaction, 'user'); } /** * A type-guard check for guild interactions * * @param interaction - The interaction to check against * @returns A boolean that indicates if the interaction was received in a guild */ function isGuildInteraction(interaction) { return Reflect.has(interaction, 'guild_id'); } // ApplicationCommandInteractions /** * A type-guard check for DM application command interactions * * @param interaction - The application command interaction to check against * @returns A boolean that indicates if the application command interaction was received in a DM channel */ function isApplicationCommandDMInteraction(interaction) { return isDMInteraction(interaction); } /** * A type-guard check for guild application command interactions * * @param interaction - The interaction to check against * @returns A boolean that indicates if the application command interaction was received in a guild */ function isApplicationCommandGuildInteraction(interaction) { return isGuildInteraction(interaction); } // MessageComponentInteractions /** * A type-guard check for DM message component interactions * * @param interaction - The message component interaction to check against * @returns A boolean that indicates if the message component interaction was received in a DM channel */ function isMessageComponentDMInteraction(interaction) { return isDMInteraction(interaction); } /** * A type-guard check for guild message component interactions * * @param interaction - The interaction to check against * @returns A boolean that indicates if the message component interaction was received in a guild */ function isMessageComponentGuildInteraction(interaction) { return isGuildInteraction(interaction); } // Buttons /** * A type-guard check for buttons that have a `url` attached to them. * * @param component - The button to check against * @returns A boolean that indicates if the button has a `url` attached to it */ function isLinkButton(component) { return component.style === index_1.ButtonStyle.Link; } /** * A type-guard check for buttons that have a `custom_id` attached to them. * * @param component - The button to check against * @returns A boolean that indicates if the button has a `custom_id` attached to it */ function isInteractionButton(component) { return ![index_1.ButtonStyle.Link, index_1.ButtonStyle.Premium].includes(component.style); } // Message Components /** * A type-guard check for message component interactions * * @param interaction - The interaction to check against * @returns A boolean that indicates if the interaction is a message component */ function isMessageComponentInteraction(interaction) { return interaction.type === index_1.InteractionType.MessageComponent; } /** * A type-guard check for button message component interactions * * @param interaction - The message component interaction to check against * @returns A boolean that indicates if the message component is a button */ function isMessageComponentButtonInteraction(interaction) { return interaction.data.component_type === index_1.ComponentType.Button; } /** * A type-guard check for select menu message component interactions * * @param interaction - The message component interaction to check against * @returns A boolean that indicates if the message component is a select menu */ function isMessageComponentSelectMenuInteraction(interaction) { return [ index_1.ComponentType.StringSelect, index_1.ComponentType.UserSelect, index_1.ComponentType.RoleSelect, index_1.ComponentType.MentionableSelect, index_1.ComponentType.ChannelSelect, ].includes(interaction.data.component_type); } // Application Commands /** * A type-guard check for chat input application commands. * * @param interaction - The interaction to check against * @returns A boolean that indicates if the interaction is a chat input application command */ function isChatInputApplicationCommandInteraction(interaction) { return interaction.data.type === index_1.ApplicationCommandType.ChatInput; } /** * A type-guard check for context menu application commands. * * @param interaction - The interaction to check against * @returns A boolean that indicates if the interaction is a context menu application command */ function isContextMenuApplicationCommandInteraction(interaction) { return (interaction.data.type === index_1.ApplicationCommandType.Message || interaction.data.type === index_1.ApplicationCommandType.User); } //# sourceMappingURL=v10.js.map node_modules/discord-api-types/utils/internals.js 0000664 00000000610 15114741631 0016260 0 ustar 00 "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.urlSafeCharacters = void 0; // eslint-disable-next-line unicorn/better-regex const pattern = /^[\d%A-Za-z-_]+$/g; exports.urlSafeCharacters = { test(input) { const result = pattern.test(input); pattern.lastIndex = 0; return result; }, }; //# sourceMappingURL=internals.js.map node_modules/discord-api-types/utils/v8.d.ts.map 0000664 00000001671 15114741631 0015636 0 ustar 00 {"version":3,"file":"v8.d.ts","sourceRoot":"","sources":["v8.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACX,kCAAkC,EAClC,qCAAqC,EACrC,gCAAgC,EAChC,kBAAkB,EAClB,8BAA8B,EAC9B,yBAAyB,EACzB,gBAAgB,EAChB,mBAAmB,EACnB,cAAc,EACd,gCAAgC,EAChC,mCAAmC,EACnC,8BAA8B,EAC9B,MAAM,sBAAsB,CAAC;AAK9B;;;;;;GAMG;AACH,wBAAgB,eAAe,CAAC,WAAW,EAAE,cAAc,GAAG,WAAW,IAAI,gBAAgB,CAE5F;AAED;;;;;;GAMG;AACH,wBAAgB,kBAAkB,CAAC,WAAW,EAAE,cAAc,GAAG,WAAW,IAAI,mBAAmB,CAElG;AAID;;;;;;GAMG;AACH,wBAAgB,iCAAiC,CAChD,WAAW,EAAE,gCAAgC,GAC3C,WAAW,IAAI,kCAAkC,CAEnD;AAED;;;;;;GAMG;AACH,wBAAgB,oCAAoC,CACnD,WAAW,EAAE,gCAAgC,GAC3C,WAAW,IAAI,qCAAqC,CAEtD;AAID;;;;;;GAMG;AACH,wBAAgB,+BAA+B,CAC9C,WAAW,EAAE,8BAA8B,GACzC,WAAW,IAAI,gCAAgC,CAEjD;AAED;;;;;;GAMG;AACH,wBAAgB,kCAAkC,CACjD,WAAW,EAAE,8BAA8B,GACzC,WAAW,IAAI,mCAAmC,CAEpD;AAID;;;;;;GAMG;AACH,wBAAgB,YAAY,CAAC,SAAS,EAAE,kBAAkB,GAAG,SAAS,IAAI,yBAAyB,CAElG;AAED;;;;;;GAMG;AACH,wBAAgB,mBAAmB,CAAC,SAAS,EAAE,kBAAkB,GAAG,SAAS,IAAI,8BAA8B,CAE9G"} node_modules/discord-api-types/utils/v8.js 0000664 00000010261 15114741631 0014621 0 ustar 00 "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.isDMInteraction = isDMInteraction; exports.isGuildInteraction = isGuildInteraction; exports.isApplicationCommandDMInteraction = isApplicationCommandDMInteraction; exports.isApplicationCommandGuildInteraction = isApplicationCommandGuildInteraction; exports.isMessageComponentDMInteraction = isMessageComponentDMInteraction; exports.isMessageComponentGuildInteraction = isMessageComponentGuildInteraction; exports.isLinkButton = isLinkButton; exports.isInteractionButton = isInteractionButton; const index_1 = require("../payloads/v8/index"); // Interactions /** * A type-guard check for DM interactions * * @param interaction - The interaction to check against * @returns A boolean that indicates if the interaction was received in a DM channel * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ function isDMInteraction(interaction) { return Reflect.has(interaction, 'user'); } /** * A type-guard check for guild interactions * * @param interaction - The interaction to check against * @returns A boolean that indicates if the interaction was received in a guild * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ function isGuildInteraction(interaction) { return Reflect.has(interaction, 'guild_id'); } // ApplicationCommandInteractions /** * A type-guard check for DM application command interactions * * @param interaction - The application command interaction to check against * @returns A boolean that indicates if the application command interaction was received in a DM channel * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ function isApplicationCommandDMInteraction(interaction) { return isDMInteraction(interaction); } /** * A type-guard check for guild application command interactions * * @param interaction - The interaction to check against * @returns A boolean that indicates if the application command interaction was received in a guild * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ function isApplicationCommandGuildInteraction(interaction) { return isGuildInteraction(interaction); } // MessageComponentInteractions /** * A type-guard check for DM message component interactions * * @param interaction - The message component interaction to check against * @returns A boolean that indicates if the message component interaction was received in a DM channel * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ function isMessageComponentDMInteraction(interaction) { return isDMInteraction(interaction); } /** * A type-guard check for guild message component interactions * * @param interaction - The interaction to check against * @returns A boolean that indicates if the message component interaction was received in a guild * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ function isMessageComponentGuildInteraction(interaction) { return isGuildInteraction(interaction); } // Buttons /** * A type-guard check for buttons that have a `url` attached to them. * * @param component - The button to check against * @returns A boolean that indicates if the button has a `url` attached to it * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ function isLinkButton(component) { return component.style === index_1.ButtonStyle.Link; } /** * A type-guard check for buttons that have a `custom_id` attached to them. * * @param component - The button to check against * @returns A boolean that indicates if the button has a `custom_id` attached to it * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ function isInteractionButton(component) { return component.style !== index_1.ButtonStyle.Link; } //# sourceMappingURL=v8.js.map node_modules/discord-api-types/utils/v9.js.map 0000664 00000003605 15114741631 0015402 0 ustar 00 {"version":3,"file":"v9.js","sourceRoot":"","sources":["v9.ts"],"names":[],"mappings":";;AA4BA,0CAEC;AAQD,gDAEC;AAUD,8EAIC;AAQD,oFAIC;AAUD,0EAIC;AAQD,gFAIC;AAUD,oCAEC;AAQD,kDAEC;AAUD,sEAIC;AAQD,kFAIC;AAQD,0FAUC;AAUD,4FAIC;AAQD,gGAOC;AAzKD,gDAA2G;AAE3G,eAAe;AAEf;;;;;GAKG;AACH,SAAgB,eAAe,CAAC,WAA2B;IAC1D,OAAO,OAAO,CAAC,GAAG,CAAC,WAAW,EAAE,MAAM,CAAC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uCAAuC,CACtD,WAA2C;IAE3C,OAAO;QACN,qBAAa,CAAC,YAAY;QAC1B,qBAAa,CAAC,UAAU;QACxB,qBAAa,CAAC,UAAU;QACxB,qBAAa,CAAC,iBAAiB;QAC/B,qBAAa,CAAC,aAAa;KAC3B,CAAC,QAAQ,CAAC,WAAW,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC;AAC7C,CAAC;AAED,uBAAuB;AAEvB;;;;;GAKG;AACH,SAAgB,wCAAwC,CACvD,WAA6C;IAE7C,OAAO,WAAW,CAAC,IAAI,CAAC,IAAI,KAAK,8BAAsB,CAAC,SAAS,CAAC;AACnE,CAAC;AAED;;;;;GAKG;AACH,SAAgB,0CAA0C,CACzD,WAA6C;IAE7C,OAAO,CACN,WAAW,CAAC,IAAI,CAAC,IAAI,KAAK,8BAAsB,CAAC,OAAO;QACxD,WAAW,CAAC,IAAI,CAAC,IAAI,KAAK,8BAAsB,CAAC,IAAI,CACrD,CAAC;AACH,CAAC"} node_modules/discord-api-types/utils/v10.d.ts 0000664 00000012305 15114741631 0015127 0 ustar 00 import type { APIApplicationCommandDMInteraction, APIApplicationCommandGuildInteraction, APIApplicationCommandInteraction, APIButtonComponent, APIButtonComponentWithCustomId, APIButtonComponentWithURL, APIChatInputApplicationCommandInteraction, APIContextMenuInteraction, APIDMInteraction, APIGuildInteraction, APIInteraction, APIMessageComponentButtonInteraction, APIMessageComponentDMInteraction, APIMessageComponentGuildInteraction, APIMessageComponentInteraction, APIMessageComponentSelectMenuInteraction } from '../payloads/v10/index'; /** * A type-guard check for DM interactions * * @param interaction - The interaction to check against * @returns A boolean that indicates if the interaction was received in a DM channel */ export declare function isDMInteraction(interaction: APIInteraction): interaction is APIDMInteraction; /** * A type-guard check for guild interactions * * @param interaction - The interaction to check against * @returns A boolean that indicates if the interaction was received in a guild */ export declare function isGuildInteraction(interaction: APIInteraction): interaction is APIGuildInteraction; /** * A type-guard check for DM application command interactions * * @param interaction - The application command interaction to check against * @returns A boolean that indicates if the application command interaction was received in a DM channel */ export declare function isApplicationCommandDMInteraction(interaction: APIApplicationCommandInteraction): interaction is APIApplicationCommandDMInteraction; /** * A type-guard check for guild application command interactions * * @param interaction - The interaction to check against * @returns A boolean that indicates if the application command interaction was received in a guild */ export declare function isApplicationCommandGuildInteraction(interaction: APIApplicationCommandInteraction): interaction is APIApplicationCommandGuildInteraction; /** * A type-guard check for DM message component interactions * * @param interaction - The message component interaction to check against * @returns A boolean that indicates if the message component interaction was received in a DM channel */ export declare function isMessageComponentDMInteraction(interaction: APIMessageComponentInteraction): interaction is APIMessageComponentDMInteraction; /** * A type-guard check for guild message component interactions * * @param interaction - The interaction to check against * @returns A boolean that indicates if the message component interaction was received in a guild */ export declare function isMessageComponentGuildInteraction(interaction: APIMessageComponentInteraction): interaction is APIMessageComponentGuildInteraction; /** * A type-guard check for buttons that have a `url` attached to them. * * @param component - The button to check against * @returns A boolean that indicates if the button has a `url` attached to it */ export declare function isLinkButton(component: APIButtonComponent): component is APIButtonComponentWithURL; /** * A type-guard check for buttons that have a `custom_id` attached to them. * * @param component - The button to check against * @returns A boolean that indicates if the button has a `custom_id` attached to it */ export declare function isInteractionButton(component: APIButtonComponent): component is APIButtonComponentWithCustomId; /** * A type-guard check for message component interactions * * @param interaction - The interaction to check against * @returns A boolean that indicates if the interaction is a message component */ export declare function isMessageComponentInteraction(interaction: APIInteraction): interaction is APIMessageComponentInteraction; /** * A type-guard check for button message component interactions * * @param interaction - The message component interaction to check against * @returns A boolean that indicates if the message component is a button */ export declare function isMessageComponentButtonInteraction(interaction: APIMessageComponentInteraction): interaction is APIMessageComponentButtonInteraction; /** * A type-guard check for select menu message component interactions * * @param interaction - The message component interaction to check against * @returns A boolean that indicates if the message component is a select menu */ export declare function isMessageComponentSelectMenuInteraction(interaction: APIMessageComponentInteraction): interaction is APIMessageComponentSelectMenuInteraction; /** * A type-guard check for chat input application commands. * * @param interaction - The interaction to check against * @returns A boolean that indicates if the interaction is a chat input application command */ export declare function isChatInputApplicationCommandInteraction(interaction: APIApplicationCommandInteraction): interaction is APIChatInputApplicationCommandInteraction; /** * A type-guard check for context menu application commands. * * @param interaction - The interaction to check against * @returns A boolean that indicates if the interaction is a context menu application command */ export declare function isContextMenuApplicationCommandInteraction(interaction: APIApplicationCommandInteraction): interaction is APIContextMenuInteraction; //# sourceMappingURL=v10.d.ts.map node_modules/discord-api-types/utils/v8.d.ts 0000664 00000010204 15114741631 0015052 0 ustar 00 import type { APIApplicationCommandDMInteraction, APIApplicationCommandGuildInteraction, APIApplicationCommandInteraction, APIButtonComponent, APIButtonComponentWithCustomId, APIButtonComponentWithURL, APIDMInteraction, APIGuildInteraction, APIInteraction, APIMessageComponentDMInteraction, APIMessageComponentGuildInteraction, APIMessageComponentInteraction } from '../payloads/v8/index'; /** * A type-guard check for DM interactions * * @param interaction - The interaction to check against * @returns A boolean that indicates if the interaction was received in a DM channel * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export declare function isDMInteraction(interaction: APIInteraction): interaction is APIDMInteraction; /** * A type-guard check for guild interactions * * @param interaction - The interaction to check against * @returns A boolean that indicates if the interaction was received in a guild * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export declare function isGuildInteraction(interaction: APIInteraction): interaction is APIGuildInteraction; /** * A type-guard check for DM application command interactions * * @param interaction - The application command interaction to check against * @returns A boolean that indicates if the application command interaction was received in a DM channel * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export declare function isApplicationCommandDMInteraction(interaction: APIApplicationCommandInteraction): interaction is APIApplicationCommandDMInteraction; /** * A type-guard check for guild application command interactions * * @param interaction - The interaction to check against * @returns A boolean that indicates if the application command interaction was received in a guild * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export declare function isApplicationCommandGuildInteraction(interaction: APIApplicationCommandInteraction): interaction is APIApplicationCommandGuildInteraction; /** * A type-guard check for DM message component interactions * * @param interaction - The message component interaction to check against * @returns A boolean that indicates if the message component interaction was received in a DM channel * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export declare function isMessageComponentDMInteraction(interaction: APIMessageComponentInteraction): interaction is APIMessageComponentDMInteraction; /** * A type-guard check for guild message component interactions * * @param interaction - The interaction to check against * @returns A boolean that indicates if the message component interaction was received in a guild * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export declare function isMessageComponentGuildInteraction(interaction: APIMessageComponentInteraction): interaction is APIMessageComponentGuildInteraction; /** * A type-guard check for buttons that have a `url` attached to them. * * @param component - The button to check against * @returns A boolean that indicates if the button has a `url` attached to it * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export declare function isLinkButton(component: APIButtonComponent): component is APIButtonComponentWithURL; /** * A type-guard check for buttons that have a `custom_id` attached to them. * * @param component - The button to check against * @returns A boolean that indicates if the button has a `custom_id` attached to it * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export declare function isInteractionButton(component: APIButtonComponent): component is APIButtonComponentWithCustomId; //# sourceMappingURL=v8.d.ts.map node_modules/discord-api-types/utils/index.d.ts 0000664 00000000072 15114741631 0015626 0 ustar 00 export * from './v10'; //# sourceMappingURL=index.d.ts.map node_modules/discord-api-types/utils/v9.js 0000664 00000013452 15114741631 0014627 0 ustar 00 "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.isDMInteraction = isDMInteraction; exports.isGuildInteraction = isGuildInteraction; exports.isApplicationCommandDMInteraction = isApplicationCommandDMInteraction; exports.isApplicationCommandGuildInteraction = isApplicationCommandGuildInteraction; exports.isMessageComponentDMInteraction = isMessageComponentDMInteraction; exports.isMessageComponentGuildInteraction = isMessageComponentGuildInteraction; exports.isLinkButton = isLinkButton; exports.isInteractionButton = isInteractionButton; exports.isMessageComponentInteraction = isMessageComponentInteraction; exports.isMessageComponentButtonInteraction = isMessageComponentButtonInteraction; exports.isMessageComponentSelectMenuInteraction = isMessageComponentSelectMenuInteraction; exports.isChatInputApplicationCommandInteraction = isChatInputApplicationCommandInteraction; exports.isContextMenuApplicationCommandInteraction = isContextMenuApplicationCommandInteraction; const index_1 = require("../payloads/v9/index"); // Interactions /** * A type-guard check for DM interactions * * @param interaction - The interaction to check against * @returns A boolean that indicates if the interaction was received in a DM channel */ function isDMInteraction(interaction) { return Reflect.has(interaction, 'user'); } /** * A type-guard check for guild interactions * * @param interaction - The interaction to check against * @returns A boolean that indicates if the interaction was received in a guild */ function isGuildInteraction(interaction) { return Reflect.has(interaction, 'guild_id'); } // ApplicationCommandInteractions /** * A type-guard check for DM application command interactions * * @param interaction - The application command interaction to check against * @returns A boolean that indicates if the application command interaction was received in a DM channel */ function isApplicationCommandDMInteraction(interaction) { return isDMInteraction(interaction); } /** * A type-guard check for guild application command interactions * * @param interaction - The interaction to check against * @returns A boolean that indicates if the application command interaction was received in a guild */ function isApplicationCommandGuildInteraction(interaction) { return isGuildInteraction(interaction); } // MessageComponentInteractions /** * A type-guard check for DM message component interactions * * @param interaction - The message component interaction to check against * @returns A boolean that indicates if the message component interaction was received in a DM channel */ function isMessageComponentDMInteraction(interaction) { return isDMInteraction(interaction); } /** * A type-guard check for guild message component interactions * * @param interaction - The interaction to check against * @returns A boolean that indicates if the message component interaction was received in a guild */ function isMessageComponentGuildInteraction(interaction) { return isGuildInteraction(interaction); } // Buttons /** * A type-guard check for buttons that have a `url` attached to them. * * @param component - The button to check against * @returns A boolean that indicates if the button has a `url` attached to it */ function isLinkButton(component) { return component.style === index_1.ButtonStyle.Link; } /** * A type-guard check for buttons that have a `custom_id` attached to them. * * @param component - The button to check against * @returns A boolean that indicates if the button has a `custom_id` attached to it */ function isInteractionButton(component) { return ![index_1.ButtonStyle.Link, index_1.ButtonStyle.Premium].includes(component.style); } // Message Components /** * A type-guard check for message component interactions * * @param interaction - The interaction to check against * @returns A boolean that indicates if the interaction is a message component */ function isMessageComponentInteraction(interaction) { return interaction.type === index_1.InteractionType.MessageComponent; } /** * A type-guard check for button message component interactions * * @param interaction - The message component interaction to check against * @returns A boolean that indicates if the message component is a button */ function isMessageComponentButtonInteraction(interaction) { return interaction.data.component_type === index_1.ComponentType.Button; } /** * A type-guard check for select menu message component interactions * * @param interaction - The message component interaction to check against * @returns A boolean that indicates if the message component is a select menu */ function isMessageComponentSelectMenuInteraction(interaction) { return [ index_1.ComponentType.StringSelect, index_1.ComponentType.UserSelect, index_1.ComponentType.RoleSelect, index_1.ComponentType.MentionableSelect, index_1.ComponentType.ChannelSelect, ].includes(interaction.data.component_type); } // Application Commands /** * A type-guard check for chat input application commands. * * @param interaction - The interaction to check against * @returns A boolean that indicates if the interaction is a chat input application command */ function isChatInputApplicationCommandInteraction(interaction) { return interaction.data.type === index_1.ApplicationCommandType.ChatInput; } /** * A type-guard check for context menu application commands. * * @param interaction - The interaction to check against * @returns A boolean that indicates if the interaction is a context menu application command */ function isContextMenuApplicationCommandInteraction(interaction) { return (interaction.data.type === index_1.ApplicationCommandType.Message || interaction.data.type === index_1.ApplicationCommandType.User); } //# sourceMappingURL=v9.js.map node_modules/discord-api-types/utils/v10.mjs 0000664 00000002115 15114741631 0015046 0 ustar 00 import mod from "./v10.js"; export default mod; export const isApplicationCommandDMInteraction = mod.isApplicationCommandDMInteraction; export const isApplicationCommandGuildInteraction = mod.isApplicationCommandGuildInteraction; export const isChatInputApplicationCommandInteraction = mod.isChatInputApplicationCommandInteraction; export const isContextMenuApplicationCommandInteraction = mod.isContextMenuApplicationCommandInteraction; export const isDMInteraction = mod.isDMInteraction; export const isGuildInteraction = mod.isGuildInteraction; export const isInteractionButton = mod.isInteractionButton; export const isLinkButton = mod.isLinkButton; export const isMessageComponentButtonInteraction = mod.isMessageComponentButtonInteraction; export const isMessageComponentDMInteraction = mod.isMessageComponentDMInteraction; export const isMessageComponentGuildInteraction = mod.isMessageComponentGuildInteraction; export const isMessageComponentInteraction = mod.isMessageComponentInteraction; export const isMessageComponentSelectMenuInteraction = mod.isMessageComponentSelectMenuInteraction; node_modules/discord-api-types/utils/v8.js.map 0000664 00000002023 15114741631 0015372 0 ustar 00 {"version":3,"file":"v8.js","sourceRoot":"","sources":["v8.ts"],"names":[],"mappings":";;AAyBA,0CAEC;AASD,gDAEC;AAWD,8EAIC;AASD,oFAIC;AAWD,0EAIC;AASD,gFAIC;AAWD,oCAEC;AASD,kDAEC;AAxGD,gDAAmD;AAEnD,eAAe;AAEf;;;;;;GAMG;AACH,SAAgB,eAAe,CAAC,WAA2B;IAC1D,OAAO,OAAO,CAAC,GAAG,CAAC,WAAW,EAAE,MAAM,CAAC,CAAC;AACzC,CAAC;AAED;;;;;;GAMG;AACH,SAAgB,kBAAkB,CAAC,WAA2B;IAC7D,OAAO,OAAO,CAAC,GAAG,CAAC,WAAW,EAAE,UAAU,CAAC,CAAC;AAC7C,CAAC;AAED,iCAAiC;AAEjC;;;;;;GAMG;AACH,SAAgB,iCAAiC,CAChD,WAA6C;IAE7C,OAAO,eAAe,CAAC,WAAW,CAAC,CAAC;AACrC,CAAC;AAED;;;;;;GAMG;AACH,SAAgB,oCAAoC,CACnD,WAA6C;IAE7C,OAAO,kBAAkB,CAAC,WAAW,CAAC,CAAC;AACxC,CAAC;AAED,+BAA+B;AAE/B;;;;;;GAMG;AACH,SAAgB,+BAA+B,CAC9C,WAA2C;IAE3C,OAAO,eAAe,CAAC,WAAW,CAAC,CAAC;AACrC,CAAC;AAED;;;;;;GAMG;AACH,SAAgB,kCAAkC,CACjD,WAA2C;IAE3C,OAAO,kBAAkB,CAAC,WAAW,CAAC,CAAC;AACxC,CAAC;AAED,UAAU;AAEV;;;;;;GAMG;AACH,SAAgB,YAAY,CAAC,SAA6B;IACzD,OAAO,SAAS,CAAC,KAAK,KAAK,mBAAW,CAAC,IAAI,CAAC;AAC7C,CAAC;AAED;;;;;;GAMG;AACH,SAAgB,mBAAmB,CAAC,SAA6B;IAChE,OAAO,SAAS,CAAC,KAAK,KAAK,mBAAW,CAAC,IAAI,CAAC;AAC7C,CAAC"} node_modules/discord-api-types/utils/v9.d.ts.map 0000664 00000002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;;GAKG;AACH,wBAAgB,mCAAmC,CAClD,WAAW,EAAE,8BAA8B,GACzC,WAAW,IAAI,oCAAoC,CAErD;AAED;;;;;GAKG;AACH,wBAAgB,uCAAuC,CACtD,WAAW,EAAE,8BAA8B,GACzC,WAAW,IAAI,wCAAwC,CAQzD;AAID;;;;;GAKG;AACH,wBAAgB,wCAAwC,CACvD,WAAW,EAAE,gCAAgC,GAC3C,WAAW,IAAI,yCAAyC,CAE1D;AAED;;;;;GAKG;AACH,wBAAgB,0CAA0C,CACzD,WAAW,EAAE,gCAAgC,GAC3C,WAAW,IAAI,yBAAyB,CAK1C"} node_modules/discord-api-types/utils/v8.mjs 0000664 00000001154 15114741631 0014777 0 ustar 00 import mod from "./v8.js"; export default mod; export const isApplicationCommandDMInteraction = mod.isApplicationCommandDMInteraction; export const isApplicationCommandGuildInteraction = mod.isApplicationCommandGuildInteraction; export const isDMInteraction = mod.isDMInteraction; export const isGuildInteraction = mod.isGuildInteraction; export const isInteractionButton = mod.isInteractionButton; export const isLinkButton = mod.isLinkButton; export const isMessageComponentDMInteraction = mod.isMessageComponentDMInteraction; export const isMessageComponentGuildInteraction = mod.isMessageComponentGuildInteraction; node_modules/discord-api-types/utils/internals.d.ts.map 0000664 00000003534 15114741631 0017300 0 ustar 00 {"version":3,"file":"internals.d.ts","sourceRoot":"","sources":["internals.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,SAAS,CAAC,CAAC,IAAI;KACzB,CAAC,IAAI,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,IAAI;CAC3B,CAAC;AAEF,MAAM,MAAM,kBAAkB,CAAC,CAAC,IAAI;KAClC,CAAC,IAAI,MAAM,CAAC,GAAG,WAAW,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;CACjC,CAAC;AAEF,MAAM,MAAM,qDAAqD,CAAC,IAAI,IAAI;KACxE,CAAC,IAAI,MAAM,IAAI,GAAG,IAAI,CAAC,CAAC,CAAC,SAAS,OAAO,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AE,OAAO,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;AAEvD;;GAEG;AACH,MAAM,MAAM,iBAAiB,CAAC,CAAC,EAAE,CAAC,SAAS,iBAAiB,CAAC,CAAC,CAAC,IAC9D,CAAC,SAAS,OAAO,GAAG;KAAG,CAAC,IAAI,MAAM,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,GAAG,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC;CAAE,GAAG,KAAK,CAAC;AAE1E,MAAM,MAAM,KAAK,CAAC,CAAC,EAAE,CAAC,IAAI,IAAI,CAAC,CAAC,EAAE,OAAO,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;AAKvD,eAAO,MAAM,iBAAiB;gBACjB,MAAM;CAOlB,CAAC"} node_modules/discord-api-types/utils/v10.js.map 0000664 00000003607 15114741631 0015454 0 ustar 00 {"version":3,"file":"v10.js","sourceRoot":"","sources":["v10.ts"],"names":[],"mappings":";;AA4BA,0CAEC;AAQD,gDAEC;AAUD,8EAIC;AAQD,oFAIC;AAUD,0EAIC;AAQD,gFAIC;AAUD,oCAEC;AAQD,kDAEC;AAUD,sEAIC;AAQD,kFAIC;AAQD,0FAUC;AAUD,4FAIC;AAQD,gGAOC;AAzKD,iDAA4G;AAE5G,eAAe;AAEf;;;;;GAKG;AACH,SAAgB,eAAe,CAAC,WAA2B;IAC1D,OAAO,OAAO,CAAC,GAAG,CAAC,WAAW,EAAE,MAAM,CAAC,CAAC;AACzC,CAAC;AAED;;;;;GAKG;AACH,SAAgB,kBAAkB,CAAC,WAA2B;IAC7D,OAAO,OAAO,CAAC,GAAG,CAAC,WAAW,EAAE,UAAU,CAAC,CAAC;AAC7C,CAAC;AAED,iCAAiC;AAEjC;;;;;GAKG;AACH,SAAgB,iCAAiC,CAChD,WAA6C;IAE7C,OAAO,eAAe,CAAC,WAAW,CAAC,CAAC;AACrC,CAAC;AAED;;;;;GAKG;AACH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,wCAAwC,CACvD,WAA6C;IAE7C,OAAO,WAAW,CAAC,IAAI,CAAC,IAAI,KAAK,8BAAsB,CAAC,SAAS,CAAC;AACnE,CAAC;AAED;;;;;GAKG;AACH,SAAgB,0CAA0C,CACzD,WAA6C;IAE7C,OAAO,CACN,WAAW,CAAC,IAAI,CAAC,IAAI,KAAK,8BAAsB,CAAC,OAAO;QACxD,WAAW,CAAC,IAAI,CAAC,IAAI,KAAK,8BAAsB,CAAC,IAAI,CACrD,CAAC;AACH,CAAC"} node_modules/discord-api-types/utils/index.mjs 0000664 00000002117 15114741631 0015551 0 ustar 00 import mod from "./index.js"; export default mod; export const isApplicationCommandDMInteraction = mod.isApplicationCommandDMInteraction; export const isApplicationCommandGuildInteraction = mod.isApplicationCommandGuildInteraction; export const isChatInputApplicationCommandInteraction = mod.isChatInputApplicationCommandInteraction; export const isContextMenuApplicationCommandInteraction = mod.isContextMenuApplicationCommandInteraction; export const isDMInteraction = mod.isDMInteraction; export const isGuildInteraction = mod.isGuildInteraction; export const isInteractionButton = mod.isInteractionButton; export const isLinkButton = mod.isLinkButton; export const isMessageComponentButtonInteraction = mod.isMessageComponentButtonInteraction; export const isMessageComponentDMInteraction = mod.isMessageComponentDMInteraction; export const isMessageComponentGuildInteraction = mod.isMessageComponentGuildInteraction; export const isMessageComponentInteraction = mod.isMessageComponentInteraction; export const isMessageComponentSelectMenuInteraction = mod.isMessageComponentSelectMenuInteraction; node_modules/discord-api-types/utils/index.js.map 0000664 00000000224 15114741631 0016145 0 ustar 00 {"version":3,"file":"index.js","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":";AAAA,iGAAiG;AACjG,2FAA2F;;;;;;;;;;;;;;;;AAE3F,wCAAsB"} node_modules/discord-api-types/utils/v9.mjs 0000664 00000002114 15114741631 0014775 0 ustar 00 import mod from "./v9.js"; export default mod; export const isApplicationCommandDMInteraction = mod.isApplicationCommandDMInteraction; export const isApplicationCommandGuildInteraction = mod.isApplicationCommandGuildInteraction; export const isChatInputApplicationCommandInteraction = mod.isChatInputApplicationCommandInteraction; export const isContextMenuApplicationCommandInteraction = mod.isContextMenuApplicationCommandInteraction; export const isDMInteraction = mod.isDMInteraction; export const isGuildInteraction = mod.isGuildInteraction; export const isInteractionButton = mod.isInteractionButton; export const isLinkButton = mod.isLinkButton; export const isMessageComponentButtonInteraction = mod.isMessageComponentButtonInteraction; export const isMessageComponentDMInteraction = mod.isMessageComponentDMInteraction; export const isMessageComponentGuildInteraction = mod.isMessageComponentGuildInteraction; export const isMessageComponentInteraction = mod.isMessageComponentInteraction; export const isMessageComponentSelectMenuInteraction = mod.isMessageComponentSelectMenuInteraction; node_modules/discord-api-types/utils/internals.js.map 0000664 00000000510 15114741631 0017033 0 ustar 00 {"version":3,"file":"internals.js","sourceRoot":"","sources":["internals.ts"],"names":[],"mappings":";;;AA0CA,gDAAgD;AAChD,MAAM,OAAO,GAAG,mBAAmB,CAAC;AAEvB,QAAA,iBAAiB,GAAG;IAChC,IAAI,CAAC,KAAa;QACjB,MAAM,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;QAEnC,OAAO,CAAC,SAAS,GAAG,CAAC,CAAC;QAEtB,OAAO,MAAM,CAAC;IACf,CAAC;CACD,CAAC"} node_modules/discord-api-types/utils/index.js 0000664 00000001775 15114741631 0015405 0 ustar 00 "use strict"; // This file exports all the utility functions available in the recommended API / Gateway version // Thereby, things MAY break in the future. Try sticking to imports from a specific version var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { if (k2 === undefined) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { return m[k]; } }; } Object.defineProperty(o, k2, desc); }) : (function(o, m, k, k2) { if (k2 === undefined) k2 = k; o[k2] = m[k]; })); var __exportStar = (this && this.__exportStar) || function(m, exports) { for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); }; Object.defineProperty(exports, "__esModule", { value: true }); __exportStar(require("./v10"), exports); //# sourceMappingURL=index.js.map node_modules/discord-api-types/v10.js 0000664 00000002200 15114741631 0013524 0 ustar 00 "use strict"; var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { if (k2 === undefined) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { return m[k]; } }; } Object.defineProperty(o, k2, desc); }) : (function(o, m, k, k2) { if (k2 === undefined) k2 = k; o[k2] = m[k]; })); var __exportStar = (this && this.__exportStar) || function(m, exports) { for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); }; Object.defineProperty(exports, "__esModule", { value: true }); exports.Utils = void 0; __exportStar(require("./gateway/v10"), exports); __exportStar(require("./globals"), exports); __exportStar(require("./payloads/v10/index"), exports); __exportStar(require("./rest/v10/index"), exports); __exportStar(require("./rpc/v10"), exports); __exportStar(require("./utils/internals"), exports); exports.Utils = require("./utils/v10"); //# sourceMappingURL=v10.js.map node_modules/discord-api-types/globals.d.ts.map 0000664 00000000666 15114741631 0015567 0 ustar 00 {"version":3,"file":"globals.d.ts","sourceRoot":"","sources":["globals.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,MAAM,SAAS,GAAG,MAAM,CAAC;AAE/B;;GAEG;AACH,MAAM,MAAM,WAAW,GAAG,MAAM,CAAC;AAEjC;;GAEG;AACH,eAAO,MAAM,kBAAkB;IAC9B;;;;OAIG;;IAEH;;;;;;OAMG;;IAEH;;;;;;OAMG;;IAEH;;;;OAIG;;IAEH;;;;OAIG;;IAEH;;;;OAIG;;IAGH;;;;OAIG;;IAEH;;;;OAIG;;IAEH;;;;OAIG;;IAEH;;;;OAIG;;IAGH;;;;OAIG;;IAEH;;;;OAIG;;IAEH;;;;OAIG;;IAEH;;;;OAIG;;CAEM,CAAC"} node_modules/discord-api-types/package.json 0000664 00000014316 15114741631 0015061 0 ustar 00 { "name": "discord-api-types", "version": "0.38.13", "description": "Discord API typings that are kept up to date for use in bot library creation.", "homepage": "https://discord-api-types.dev", "workspaces": [ "scripts/actions/documentation" ], "exports": { "./globals": { "types": "./globals.d.ts", "require": "./globals.js", "import": "./globals.mjs" }, "./v6": { "types": "./v6.d.ts", "require": "./v6.js", "import": "./v6.mjs" }, "./v8": { "types": "./v8.d.ts", "require": "./v8.js", "import": "./v8.mjs" }, "./v9": { "types": "./v9.d.ts", "require": "./v9.js", "import": "./v9.mjs" }, "./v10": { "types": "./v10.d.ts", "require": "./v10.js", "import": "./v10.mjs" }, "./gateway": { "types": "./gateway/index.d.ts", "require": "./gateway/index.js", "import": "./gateway/index.mjs" }, "./gateway/v*": { "types": "./gateway/v*.d.ts", "require": "./gateway/v*.js", "import": "./gateway/v*.mjs" }, "./payloads": { "types": "./payloads/index.d.ts", "require": "./payloads/index.js", "import": "./payloads/index.mjs" }, "./payloads/v*": { "types": "./payloads/v*/index.d.ts", "require": "./payloads/v*/index.js", "import": "./payloads/v*/index.mjs" }, "./rest": { "types": "./rest/index.d.ts", "require": "./rest/index.js", "import": "./rest/index.mjs" }, "./rest/v*": { "types": "./rest/v*/index.d.ts", "require": "./rest/v*/index.js", "import": "./rest/v*/index.mjs" }, "./rpc": { "types": "./rpc/index.d.ts", "require": "./rpc/index.js", "import": "./rpc/index.mjs" }, "./rpc/v*": { "types": "./rpc/v*.d.ts", "require": "./rpc/v*.js", "import": "./rpc/v*.mjs" }, "./voice": { "types": "./voice/index.d.ts", "require": "./voice/index.js", "import": "./voice/index.mjs" }, "./voice/v*": { "types": "./voice/v*.d.ts", "require": "./voice/v*.js", "import": "./voice/v*.mjs" }, "./utils": { "types": "./utils/index.d.ts", "require": "./utils/index.js", "import": "./utils/index.mjs" }, "./utils/v*": { "types": "./utils/v*.d.ts", "require": "./utils/v*.js", "import": "./utils/v*.mjs" } }, "scripts": { "build:ci": "tsc --noEmit --incremental false", "build:deno": "node ./scripts/deno.mjs", "build:node": "tsc && run-p 'esm:*'", "changelog": "conventional-changelog -p angular -i CHANGELOG.md -s", "ci:pr": "run-s changelog lint build:deno && node ./scripts/bump-website-version.mjs", "clean:deno": "rimraf deno/", "clean:node": "rimraf --glob \"{gateway,payloads,rest,rpc,voice,utils}/**/*.{js,mjs,d.ts,*map}\" \"{globals,v*}.{js,mjs,d.ts,*map}\"", "clean": "run-p 'clean:*'", "esm:gateway": "gen-esm-wrapper ./gateway/index.js ./gateway/index.mjs", "esm:globals": "gen-esm-wrapper ./globals.js ./globals.mjs", "esm:payloads": "gen-esm-wrapper ./payloads/index.js ./payloads/index.mjs", "esm:rest": "gen-esm-wrapper ./rest/index.js ./rest/index.mjs", "esm:rpc": "gen-esm-wrapper ./rpc/index.js ./rpc/index.mjs", "esm:utils": "gen-esm-wrapper ./utils/index.js ./utils/index.mjs", "esm:versions": "node ./scripts/versions.mjs", "esm:voice": "gen-esm-wrapper ./voice/index.js ./voice/index.mjs", "lint": "prettier --write . && eslint --format=pretty --fix --ext mjs,ts \"{gateway,payloads,rest,rpc,voice,utils}/**/*.ts\" \"{globals,v*}.ts\" \"scripts/**/*.mjs\"", "postinstallDev": "is-ci || husky", "prepack": "run-s clean test:lint build:node", "postpack": "run-s clean:node build:deno", "test:lint": "prettier --check . && eslint --format=pretty --ext mjs,ts \"{gateway,payloads,rest,rpc,voice,utils}/**/*.ts\" \"{globals,v*}.ts\" \"scripts/**/*.mjs\"", "test:types": "tsc -p tests" }, "keywords": [ "discord", "discord api", "types", "discordjs" ], "author": "Vlad Frangu <me@vladfrangu.dev>", "license": "MIT", "files": [ "{gateway,payloads,rest,rpc,voice,utils}/**/*.{js,js.map,d.ts,d.ts.map,mjs}", "{globals,v*}.{js,js.map,d.ts,d.ts.map,mjs}" ], "devDependencies": { "@commitlint/cli": "^19.8.1", "@commitlint/config-angular": "^19.8.1", "@favware/npm-deprecate": "^2.0.0", "@octokit/action": "^8.0.2", "@octokit/webhooks-types": "^7.6.1", "@sapphire/prettier-config": "^2.0.0", "@types/lodash.merge": "^4", "@types/node": "^22.15.29", "@typescript-eslint/utils": "^8.33.0", "conventional-changelog": "^7.0.2", "conventional-changelog-angular": "^8.0.0", "conventional-recommended-bump": "^11.1.0", "eslint": "^9.28.0", "eslint-config-neon": "^0.2.7", "eslint-formatter-pretty": "^6.0.1", "eslint-import-resolver-typescript": "^4.4.2", "gen-esm-wrapper": "^1.1.3", "husky": "^9.1.7", "is-ci": "^4.1.0", "lint-staged": "^16.1.0", "lodash.merge": "^4.6.2", "npm-run-all2": "^8.0.4", "prettier": "^3.5.3", "pretty-quick": "^4.1.1", "rimraf": "^6.0.1", "tsutils": "^3.21.0", "tsx": "^4.19.4", "typescript": "^5.8.3", "typescript-eslint": "^8.33.0" }, "publishConfig": { "provenance": true, "access": "public", "registry": "https://registry.npmjs.org" }, "repository": { "type": "git", "url": "https://github.com/discordjs/discord-api-types" }, "lint-staged": { "{gateway,payloads,rest,rpc,voice,utils}/**/*.{mjs,js,ts}": "eslint --fix --ext mjs,js,ts", "{globals,v*}.ts": "eslint --fix --ext mjs,js,ts" }, "commitlint": { "extends": [ "@commitlint/config-angular" ], "rules": { "type-enum": [ 2, "always", [ "chore", "build", "ci", "docs", "feat", "fix", "perf", "refactor", "revert", "style", "test", "types", "wip" ] ], "scope-case": [ 1, "always", "pascal-case" ] } }, "packageManager": "yarn@4.9.2", "volta": { "node": "24.2.0", "yarn": "4.9.2" } } node_modules/discord-api-types/v6.mjs 0000664 00000004250 15114741631 0013635 0 ustar 00 import mod from "./v6.js"; export default mod; export const APIVersion = mod.APIVersion; export const ActivityFlags = mod.ActivityFlags; export const ActivityType = mod.ActivityType; export const AllowedMentionsTypes = mod.AllowedMentionsTypes; export const AuditLogEvent = mod.AuditLogEvent; export const AuditLogOptionsType = mod.AuditLogOptionsType; export const ChannelType = mod.ChannelType; export const ConnectionVisibility = mod.ConnectionVisibility; export const EmbedType = mod.EmbedType; export const FormattingPatterns = mod.FormattingPatterns; export const GatewayCloseCodes = mod.GatewayCloseCodes; export const GatewayDispatchEvents = mod.GatewayDispatchEvents; export const GatewayIntentBits = mod.GatewayIntentBits; export const GatewayOPCodes = mod.GatewayOPCodes; export const GatewayVersion = mod.GatewayVersion; export const GuildDefaultMessageNotifications = mod.GuildDefaultMessageNotifications; export const GuildExplicitContentFilter = mod.GuildExplicitContentFilter; export const GuildFeature = mod.GuildFeature; export const GuildMFALevel = mod.GuildMFALevel; export const GuildPremiumTier = mod.GuildPremiumTier; export const GuildSystemChannelFlags = mod.GuildSystemChannelFlags; export const GuildVerificationLevel = mod.GuildVerificationLevel; export const GuildWidgetStyle = mod.GuildWidgetStyle; export const IntegrationExpireBehavior = mod.IntegrationExpireBehavior; export const InviteTargetUserType = mod.InviteTargetUserType; export const Locale = mod.Locale; export const MessageActivityType = mod.MessageActivityType; export const MessageFlags = mod.MessageFlags; export const MessageType = mod.MessageType; export const OverwriteType = mod.OverwriteType; export const PermissionFlagsBits = mod.PermissionFlagsBits; export const PresenceUpdateStatus = mod.PresenceUpdateStatus; export const RESTJSONErrorCodes = mod.RESTJSONErrorCodes; export const Routes = mod.Routes; export const TeamMemberMembershipState = mod.TeamMemberMembershipState; export const UserFlags = mod.UserFlags; export const UserPremiumType = mod.UserPremiumType; export const VoiceCloseCodes = mod.VoiceCloseCodes; export const VoiceOPCodes = mod.VoiceOPCodes; export const WebhookType = mod.WebhookType; node_modules/discord-api-types/gateway/common.d.ts.map 0000664 00000000343 15114741631 0017065 0 ustar 00 {"version":3,"file":"common.d.ts","sourceRoot":"","sources":["common.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,WAAW,eAAe;IAC/B,CAAC,EAAE,MAAM,CAAC;IACV,QAAQ,EAAE,KAAK,GAAG,MAAM,CAAC;IACzB,QAAQ,CAAC,EAAE,aAAa,CAAC;CACzB"} node_modules/discord-api-types/gateway/common.js.map 0000664 00000000141 15114741631 0016625 0 ustar 00 {"version":3,"file":"common.js","sourceRoot":"","sources":["common.ts"],"names":[],"mappings":""} node_modules/discord-api-types/gateway/v10.d.ts.map 0000664 00000062570 15114741631 0016215 0 ustar 00 {"version":3,"file":"v10.d.ts","sourceRoot":"","sources":["v10.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAC5C,OAAO,KAAK,EACX,cAAc,EACd,+BAA+B,EAC/B,qBAAqB,EACrB,uBAAuB,EACvB,UAAU,EACV,QAAQ,EACR,QAAQ,EACR,mBAAmB,EACnB,cAAc,EACd,sBAAsB,EACtB,cAAc,EACd,OAAO,EACP,gBAAgB,EAChB,UAAU,EACV,gBAAgB,EAChB,eAAe,EACf,mBAAmB,EACnB,OAAO,EACP,eAAe,EACf,qBAAqB,EACrB,qBAAqB,EACrB,0BAA0B,IAAI,6BAA6B,EAC3D,aAAa,EACb,gBAAgB,EAChB,oBAAoB,EACpB,6BAA6B,EAC7B,gBAAgB,EAChB,cAAc,EACd,WAAW,EACX,eAAe,EACf,kBAAkB,EAClB,gBAAgB,EAChB,iBAAiB,EACjB,YAAY,EACZ,kBAAkB,EAClB,iBAAiB,EACjB,uBAAuB,EACvB,oBAAoB,EACpB,qBAAqB,EACrB,oBAAoB,EACpB,kBAAkB,EAClB,gCAAgC,EAChC,cAAc,EACd,MAAM,uBAAuB,CAAC;AAC/B,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACtD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAEpD,mBAAmB,UAAU,CAAC;AAE9B,eAAO,MAAM,cAAc,OAAO,CAAC;AAEnC;;GAEG;AACH,oBAAY,cAAc;IACzB;;OAEG;IACH,QAAQ,IAAA;IACR;;;OAGG;IACH,SAAS,IAAA;IACT;;OAEG;IACH,QAAQ,IAAA;IACR;;OAEG;IACH,cAAc,IAAA;IACd;;OAEG;IACH,gBAAg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AM,WAAW,mBAAoB,SAAQ,gBAAgB;IAC5D,CAAC,EAAE,IAAI,CAAC;IACR,CAAC,EAAE,IAAI,CAAC;CACR;AAED,MAAM,WAAW,YAAY,CAAC,KAAK,SAAS,qBAAqB,EAAE,CAAC,GAAG,OAAO,CAAE,SAAQ,YAAY;IACnG,EAAE,EAAE,cAAc,CAAC,QAAQ,CAAC;IAC5B,CAAC,EAAE,KAAK,CAAC;IACT,CAAC,EAAE,CAAC,CAAC;CACL;AAGD,MAAM,MAAM,0BAA0B,CAAC,CAAC,SAAS,qBAAqB,EAAE,CAAC,SAAS,MAAM,GAAG,KAAK,IAAI,YAAY,CAC/G,CAAC,EACD,IAAI,CAAC,qCAAqC,EAAE,CAAC,CAAC,CAC9C,CAAC;AAEF,MAAM,WAAW,gCAAgC;IAChD;;OAEG;IACH,UAAU,EAAE,SAAS,CAAC;IACtB;;OAEG;IACH,UAAU,EAAE,SAAS,CAAC;IACtB;;OAEG;IACH,QAAQ,CAAC,EAAE,SAAS,CAAC;CACrB"} node_modules/discord-api-types/gateway/index.d.ts.map 0000664 00000000164 15114741631 0016705 0 ustar 00 {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":"AAGA,cAAc,OAAO,CAAC"} node_modules/discord-api-types/gateway/v9.d.ts 0000664 00000231047 15114741631 0015366 0 ustar 00 /** * Types extracted from https://discord.com/developers/docs/topics/gateway */ import type { Snowflake } from '../globals'; import type { APIApplication, APIApplicationCommandPermission, APIAutoModerationRule, APIAutoModerationAction, APIChannel, APIEmoji, APIGuild, APIGuildIntegration, APIGuildMember, APIGuildScheduledEvent, APIInteraction, APIRole, APIStageInstance, APISticker, APIThreadChannel, APIThreadMember, APIUnavailableGuild, APIUser, GatewayActivity, GatewayPresenceUpdate, GatewayThreadListSync, GatewayThreadMembersUpdate as RawGatewayThreadMembersUpdate, APIVoiceState, InviteTargetType, PresenceUpdateStatus, AutoModerationRuleTriggerType, APIAuditLogEntry, ChannelType, APISubscription, APISoundboardSound, GuildChannelType, ThreadChannelType, APIEntitlement, APIBaseGuild, APIBaseGuildMember, APIBaseVoiceState, APIBaseVoiceGuildMember, APIFlaggedGuildMember, APIGuildMemberUser, APIGuildMemberAvatar, GatewayGuildMembersChunkPresence, APIBaseMessage, APIGuildMemberJoined } from '../payloads/v9/index'; import type { ReactionType } from '../rest/v9/index'; import type { _Nullable } from '../utils/internals'; export type * from './common'; export declare const GatewayVersion = "9"; /** * @see {@link https://discord.com/developers/docs/topics/opcodes-and-status-codes#gateway-gateway-opcodes} */ export declare enum GatewayOpcodes { /** * An event was dispatched */ Dispatch = 0, /** * A bidirectional opcode to maintain an active gateway connection. * Fired periodically by the client, or fired by the gateway to request an immediate heartbeat from the client. */ Heartbeat = 1, /** * Starts a new session during the initial handshake */ Identify = 2, /** * Update the client's presence */ PresenceUpdate = 3, /** * Used to join/leave or move between voice channels */ VoiceStateUpdate = 4, /** * Resume a previous session that was disconnected */ Resume = 6, /** * You should attempt to reconnect and resume immediately */ Reconnect = 7, /** * Request information about offline guild members in a large guild */ RequestGuildMembers = 8, /** * The session has been invalidated. You should reconnect and identify/resume accordingly */ InvalidSession = 9, /** * Sent immediately after connecting, contains the `heartbeat_interval` to use */ Hello = 10, /** * Sent in response to receiving a heartbeat to acknowledge that it has been received */ HeartbeatAck = 11, /** * Request information about soundboard sounds in a set of guilds */ RequestSoundboardSounds = 31 } /** * @see {@link https://discord.com/developers/docs/topics/opcodes-and-status-codes#gateway-gateway-close-event-codes} */ export declare enum GatewayCloseCodes { /** * We're not sure what went wrong. Try reconnecting? */ UnknownError = 4000, /** * You sent an invalid Gateway opcode or an invalid payload for an opcode. Don't do that! * * @see {@link https://discord.com/developers/docs/topics/gateway-events#payload-structure} */ UnknownOpcode = 4001, /** * You sent an invalid payload to us. Don't do that! * * @see {@link https://discord.com/developers/docs/topics/gateway#sending-events} */ DecodeError = 4002, /** * You sent us a payload prior to identifying * * @see {@link https://discord.com/developers/docs/topics/gateway-events#identify} */ NotAuthenticated = 4003, /** * The account token sent with your identify payload is incorrect * * @see {@link https://discord.com/developers/docs/topics/gateway-events#identify} */ AuthenticationFailed = 4004, /** * You sent more than one identify payload. Don't do that! */ AlreadyAuthenticated = 4005, /** * The sequence sent when resuming the session was invalid. Reconnect and start a new session * * @see {@link https://discord.com/developers/docs/topics/gateway-events#resume} */ InvalidSeq = 4007, /** * Woah nelly! You're sending payloads to us too quickly. Slow it down! You will be disconnected on receiving this */ RateLimited = 4008, /** * Your session timed out. Reconnect and start a new one */ SessionTimedOut = 4009, /** * You sent us an invalid shard when identifying * * @see {@link https://discord.com/developers/docs/topics/gateway#sharding} */ InvalidShard = 4010, /** * The session would have handled too many guilds - you are required to shard your connection in order to connect * * @see {@link https://discord.com/developers/docs/topics/gateway#sharding} */ ShardingRequired = 4011, /** * You sent an invalid version for the gateway */ InvalidAPIVersion = 4012, /** * You sent an invalid intent for a Gateway Intent. You may have incorrectly calculated the bitwise value * * @see {@link https://discord.com/developers/docs/topics/gateway#gateway-intents} */ InvalidIntents = 4013, /** * You sent a disallowed intent for a Gateway Intent. You may have tried to specify an intent that you have not * enabled or are not whitelisted for * * @see {@link https://discord.com/developers/docs/topics/gateway#gateway-intents} * @see {@link https://discord.com/developers/docs/topics/gateway#privileged-intents} */ DisallowedIntents = 4014 } /** * @see {@link https://discord.com/developers/docs/topics/gateway#list-of-intents} */ export declare enum GatewayIntentBits { Guilds = 1, GuildMembers = 2, GuildModeration = 4, /** * @deprecated This is the old name for {@link GatewayIntentBits.GuildModeration} */ GuildBans = 4, GuildExpressions = 8, /** * @deprecated This is the old name for {@link GatewayIntentBits.GuildExpressions} */ GuildEmojisAndStickers = 8, GuildIntegrations = 16, GuildWebhooks = 32, GuildInvites = 64, GuildVoiceStates = 128, GuildPresences = 256, GuildMessages = 512, GuildMessageReactions = 1024, GuildMessageTyping = 2048, DirectMessages = 4096, DirectMessageReactions = 8192, DirectMessageTyping = 16384, GuildScheduledEvents = 65536, AutoModerationConfiguration = 1048576, AutoModerationExecution = 2097152, GuildMessagePolls = 16777216, DirectMessagePolls = 33554432 } /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#receive-events} */ export declare enum GatewayDispatchEvents { ApplicationCommandPermissionsUpdate = "APPLICATION_COMMAND_PERMISSIONS_UPDATE", AutoModerationActionExecution = "AUTO_MODERATION_ACTION_EXECUTION", AutoModerationRuleCreate = "AUTO_MODERATION_RULE_CREATE", AutoModerationRuleDelete = "AUTO_MODERATION_RULE_DELETE", AutoModerationRuleUpdate = "AUTO_MODERATION_RULE_UPDATE", ChannelCreate = "CHANNEL_CREATE", ChannelDelete = "CHANNEL_DELETE", ChannelPinsUpdate = "CHANNEL_PINS_UPDATE", ChannelUpdate = "CHANNEL_UPDATE", EntitlementCreate = "ENTITLEMENT_CREATE", EntitlementDelete = "ENTITLEMENT_DELETE", EntitlementUpdate = "ENTITLEMENT_UPDATE", GuildAuditLogEntryCreate = "GUILD_AUDIT_LOG_ENTRY_CREATE", GuildBanAdd = "GUILD_BAN_ADD", GuildBanRemove = "GUILD_BAN_REMOVE", GuildCreate = "GUILD_CREATE", GuildDelete = "GUILD_DELETE", GuildEmojisUpdate = "GUILD_EMOJIS_UPDATE", GuildIntegrationsUpdate = "GUILD_INTEGRATIONS_UPDATE", GuildMemberAdd = "GUILD_MEMBER_ADD", GuildMemberRemove = "GUILD_MEMBER_REMOVE", GuildMembersChunk = "GUILD_MEMBERS_CHUNK", GuildMemberUpdate = "GUILD_MEMBER_UPDATE", GuildRoleCreate = "GUILD_ROLE_CREATE", GuildRoleDelete = "GUILD_ROLE_DELETE", GuildRoleUpdate = "GUILD_ROLE_UPDATE", GuildScheduledEventCreate = "GUILD_SCHEDULED_EVENT_CREATE", GuildScheduledEventDelete = "GUILD_SCHEDULED_EVENT_DELETE", GuildScheduledEventUpdate = "GUILD_SCHEDULED_EVENT_UPDATE", GuildScheduledEventUserAdd = "GUILD_SCHEDULED_EVENT_USER_ADD", GuildScheduledEventUserRemove = "GUILD_SCHEDULED_EVENT_USER_REMOVE", GuildSoundboardSoundCreate = "GUILD_SOUNDBOARD_SOUND_CREATE", GuildSoundboardSoundDelete = "GUILD_SOUNDBOARD_SOUND_DELETE", GuildSoundboardSoundsUpdate = "GUILD_SOUNDBOARD_SOUNDS_UPDATE", GuildSoundboardSoundUpdate = "GUILD_SOUNDBOARD_SOUND_UPDATE", SoundboardSounds = "SOUNDBOARD_SOUNDS", GuildStickersUpdate = "GUILD_STICKERS_UPDATE", GuildUpdate = "GUILD_UPDATE", IntegrationCreate = "INTEGRATION_CREATE", IntegrationDelete = "INTEGRATION_DELETE", IntegrationUpdate = "INTEGRATION_UPDATE", InteractionCreate = "INTERACTION_CREATE", InviteCreate = "INVITE_CREATE", InviteDelete = "INVITE_DELETE", MessageCreate = "MESSAGE_CREATE", MessageDelete = "MESSAGE_DELETE", MessageDeleteBulk = "MESSAGE_DELETE_BULK", MessagePollVoteAdd = "MESSAGE_POLL_VOTE_ADD", MessagePollVoteRemove = "MESSAGE_POLL_VOTE_REMOVE", MessageReactionAdd = "MESSAGE_REACTION_ADD", MessageReactionRemove = "MESSAGE_REACTION_REMOVE", MessageReactionRemoveAll = "MESSAGE_REACTION_REMOVE_ALL", MessageReactionRemoveEmoji = "MESSAGE_REACTION_REMOVE_EMOJI", MessageUpdate = "MESSAGE_UPDATE", PresenceUpdate = "PRESENCE_UPDATE", Ready = "READY", Resumed = "RESUMED", StageInstanceCreate = "STAGE_INSTANCE_CREATE", StageInstanceDelete = "STAGE_INSTANCE_DELETE", StageInstanceUpdate = "STAGE_INSTANCE_UPDATE", SubscriptionCreate = "SUBSCRIPTION_CREATE", SubscriptionDelete = "SUBSCRIPTION_DELETE", SubscriptionUpdate = "SUBSCRIPTION_UPDATE", ThreadCreate = "THREAD_CREATE", ThreadDelete = "THREAD_DELETE", ThreadListSync = "THREAD_LIST_SYNC", ThreadMembersUpdate = "THREAD_MEMBERS_UPDATE", ThreadMemberUpdate = "THREAD_MEMBER_UPDATE", ThreadUpdate = "THREAD_UPDATE", TypingStart = "TYPING_START", UserUpdate = "USER_UPDATE", VoiceChannelEffectSend = "VOICE_CHANNEL_EFFECT_SEND", VoiceServerUpdate = "VOICE_SERVER_UPDATE", VoiceStateUpdate = "VOICE_STATE_UPDATE", WebhooksUpdate = "WEBHOOKS_UPDATE" } export type GatewaySendPayload = GatewayHeartbeat | GatewayIdentify | GatewayRequestGuildMembers | GatewayRequestSoundboardSounds | GatewayResume | GatewayUpdatePresence | GatewayVoiceStateUpdate; export type GatewayReceivePayload = GatewayDispatchPayload | GatewayHeartbeatAck | GatewayHeartbeatRequest | GatewayHello | GatewayInvalidSession | GatewayReconnect; export type GatewayDispatchPayload = GatewayApplicationCommandPermissionsUpdateDispatch | GatewayAutoModerationActionExecutionDispatch | GatewayAutoModerationRuleCreateDispatch | GatewayAutoModerationRuleDeleteDispatch | GatewayAutoModerationRuleModifyDispatch | GatewayChannelModifyDispatch | GatewayChannelPinsUpdateDispatch | GatewayEntitlementModifyDispatch | GatewayGuildAuditLogEntryCreateDispatch | GatewayGuildBanModifyDispatch | GatewayGuildCreateDispatch | GatewayGuildDeleteDispatch | GatewayGuildEmojisUpdateDispatch | GatewayGuildIntegrationsUpdateDispatch | GatewayGuildMemberAddDispatch | GatewayGuildMemberRemoveDispatch | GatewayGuildMembersChunkDispatch | GatewayGuildMemberUpdateDispatch | GatewayGuildModifyDispatch | GatewayGuildRoleDeleteDispatch | GatewayGuildRoleModifyDispatch | GatewayGuildScheduledEventCreateDispatch | GatewayGuildScheduledEventDeleteDispatch | GatewayGuildScheduledEventUpdateDispatch | GatewayGuildScheduledEventUserAddDispatch | GatewayGuildScheduledEventUserRemoveDispatch | GatewayGuildSoundboardSoundCreateDispatch | GatewayGuildSoundboardSoundDeleteDispatch | GatewayGuildSoundboardSoundsUpdateDispatch | GatewayGuildSoundboardSoundUpdateDispatch | GatewayGuildStickersUpdateDispatch | GatewayIntegrationCreateDispatch | GatewayIntegrationDeleteDispatch | GatewayIntegrationUpdateDispatch | GatewayInteractionCreateDispatch | GatewayInviteCreateDispatch | GatewayInviteDeleteDispatch | GatewayMessageCreateDispatch | GatewayMessageDeleteBulkDispatch | GatewayMessageDeleteDispatch | GatewayMessagePollVoteAddDispatch | GatewayMessagePollVoteRemoveDispatch | GatewayMessageReactionAddDispatch | GatewayMessageReactionRemoveAllDispatch | GatewayMessageReactionRemoveDispatch | GatewayMessageReactionRemoveEmojiDispatch | GatewayMessageUpdateDispatch | GatewayPresenceUpdateDispatch | GatewayReadyDispatch | GatewayResumedDispatch | GatewaySoundboardSoundsDispatch | GatewayStageInstanceCreateDispatch | GatewayStageInstanceDeleteDispatch | GatewayStageInstanceUpdateDispatch | GatewaySubscriptionModifyDispatch | GatewayThreadCreateDispatch | GatewayThreadDeleteDispatch | GatewayThreadListSyncDispatch | GatewayThreadMembersUpdateDispatch | GatewayThreadMemberUpdateDispatch | GatewayThreadUpdateDispatch | GatewayTypingStartDispatch | GatewayUserUpdateDispatch | GatewayVoiceChannelEffectSendDispatch | GatewayVoiceServerUpdateDispatch | GatewayVoiceStateUpdateDispatch | GatewayWebhooksUpdateDispatch; /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#hello} */ export interface GatewayHello extends _NonDispatchPayload { op: GatewayOpcodes.Hello; d: GatewayHelloData; } /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#hello} */ export interface GatewayHelloData { /** * The interval (in milliseconds) the client should heartbeat with */ heartbeat_interval: number; } /** * @see {@link https://discord.com/developers/docs/topics/gateway#sending-heartbeats} */ export interface GatewayHeartbeatRequest extends _NonDispatchPayload { op: GatewayOpcodes.Heartbeat; d: never; } /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#heartbeat} */ export interface GatewayHeartbeatAck extends _NonDispatchPayload { op: GatewayOpcodes.HeartbeatAck; d: never; } /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#invalid-session} */ export interface GatewayInvalidSession extends _NonDispatchPayload { op: GatewayOpcodes.InvalidSession; d: GatewayInvalidSessionData; } /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#invalid-session} */ export type GatewayInvalidSessionData = boolean; /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#reconnect} */ export interface GatewayReconnect extends _NonDispatchPayload { op: GatewayOpcodes.Reconnect; d: never; } /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#ready} */ export type GatewayReadyDispatch = _DataPayload<GatewayDispatchEvents.Ready, GatewayReadyDispatchData>; /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#ready} */ export interface GatewayReadyDispatchData { /** * Gateway version * * @see {@link https://discord.com/developers/docs/reference#api-versioning} */ v: number; /** * Information about the user including email * * @see {@link https://discord.com/developers/docs/resources/user#user-object} */ user: APIUser; /** * The guilds the user is in * * @see {@link https://discord.com/developers/docs/resources/guild#unavailable-guild-object} */ guilds: APIUnavailableGuild[]; /** * Used for resuming connections */ session_id: string; /** * Gateway url for resuming connections */ resume_gateway_url: string; /** * The shard information associated with this session, if sent when identifying * * @see {@link https://discord.com/developers/docs/topics/gateway#sharding} */ shard?: [shard_id: number, shard_count: number]; /** * Contains `id` and `flags` * * @see {@link https://discord.com/developers/docs/resources/application#application-object} */ application: Pick<APIApplication, 'flags' | 'id'>; } /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#resumed} */ export type GatewayResumedDispatch = _DataPayload<GatewayDispatchEvents.Resumed, never>; /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#auto-moderation-rule-create} * @see {@link https://discord.com/developers/docs/topics/gateway-events#auto-moderation-rule-update} * @see {@link https://discord.com/developers/docs/topics/gateway-events#auto-moderation-rule-delete} */ export type GatewayAutoModerationRuleModifyDispatch = _DataPayload<GatewayDispatchEvents.AutoModerationRuleCreate | GatewayDispatchEvents.AutoModerationRuleDelete | GatewayDispatchEvents.AutoModerationRuleUpdate, GatewayAutoModerationRuleModifyDispatchData>; /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#auto-moderation-rule-create} * @see {@link https://discord.com/developers/docs/topics/gateway-events#auto-moderation-rule-update} * @see {@link https://discord.com/developers/docs/topics/gateway-events#auto-moderation-rule-delete} */ export type GatewayAutoModerationRuleModifyDispatchData = APIAutoModerationRule; /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#auto-moderation-rule-create} */ export type GatewayAutoModerationRuleCreateDispatch = GatewayAutoModerationRuleModifyDispatch; /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#auto-moderation-rule-create} */ export type GatewayAutoModerationRuleCreateDispatchData = GatewayAutoModerationRuleModifyDispatchData; /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#auto-moderation-rule-update} */ export type GatewayAutoModerationRuleUpdateDispatch = GatewayAutoModerationRuleModifyDispatch; /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#auto-moderation-rule-update} */ export type GatewayAutoModerationRuleUpdateDispatchData = GatewayAutoModerationRuleModifyDispatchData; /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#auto-moderation-rule-delete} */ export type GatewayAutoModerationRuleDeleteDispatch = GatewayAutoModerationRuleModifyDispatch; /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#auto-moderation-rule-delete} */ export type GatewayAutoModerationRuleDeleteDispatchData = GatewayAutoModerationRuleModifyDispatchData; /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#auto-moderation-action-execution} */ export type GatewayAutoModerationActionExecutionDispatch = _DataPayload<GatewayDispatchEvents.AutoModerationActionExecution, GatewayAutoModerationActionExecutionDispatchData>; /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#auto-moderation-action-execution} */ export interface GatewayAutoModerationActionExecutionDispatchData { /** * The id of the guild in which action was executed */ guild_id: Snowflake; /** * The action which was executed */ action: APIAutoModerationAction; /** * The id of the rule which action belongs to */ rule_id: Snowflake; /** * The trigger type of rule which was triggered */ rule_trigger_type: AutoModerationRuleTriggerType; /** * The id of the user which generated the content which triggered the rule */ user_id: Snowflake; /** * The id of the channel in which user content was posted */ channel_id?: Snowflake; /** * The id of any user message which content belongs to * * This field will not be present if message was blocked by AutoMod or content was not part of any message */ message_id?: Snowflake; /** * The id of any system auto moderation messages posted as a result of this action * * This field will not be present if this event does not correspond to an action with type {@link AutoModerationActionType.SendAlertMessage} */ alert_system_message_id?: Snowflake; /** * The user generated text content * * `MESSAGE_CONTENT` (`1 << 15`) gateway intent is required to receive non-empty values from this field */ content: string; /** * The word or phrase configured in the rule that triggered the rule */ matched_keyword: string | null; /** * The substring in content that triggered the rule * * `MESSAGE_CONTENT` (`1 << 15`) gateway intent is required to receive non-empty values from this field */ matched_content: string | null; } /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#application-command-permissions-update} */ export type GatewayApplicationCommandPermissionsUpdateDispatch = _DataPayload<GatewayDispatchEvents.ApplicationCommandPermissionsUpdate, GatewayApplicationCommandPermissionsUpdateDispatchData>; /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#application-command-permissions-update} */ export interface GatewayApplicationCommandPermissionsUpdateDispatchData { /** * ID of the command or the application ID */ id: Snowflake; /** * ID of the application the command belongs to */ application_id: Snowflake; /** * ID of the guild */ guild_id: Snowflake; /** * Permissions for the command in the guild, max of 100 */ permissions: APIApplicationCommandPermission[]; } /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#subscription-create} * @see {@link https://discord.com/developers/docs/topics/gateway-events#subscription-update} * @see {@link https://discord.com/developers/docs/topics/gateway-events#subscription-delete} */ export type GatewaySubscriptionModifyDispatch = _DataPayload<GatewayDispatchEvents.SubscriptionCreate | GatewayDispatchEvents.SubscriptionDelete | GatewayDispatchEvents.SubscriptionUpdate, GatewaySubscriptionModifyDispatchData>; /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#subscription-create} * @see {@link https://discord.com/developers/docs/topics/gateway-events#subscription-update} * @see {@link https://discord.com/developers/docs/topics/gateway-events#subscription-delete} */ export type GatewaySubscriptionModifyDispatchData = APISubscription; /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#subscription-create} */ export type GatewaySubscriptionCreateDispatch = GatewaySubscriptionModifyDispatch; /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#subscription-create} */ export type GatewaySubscriptionCreateDispatchData = GatewaySubscriptionModifyDispatchData; /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#subscription-update} */ export type GatewaySubscriptionUpdateDispatch = GatewaySubscriptionModifyDispatch; /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#subscription-update} */ export type GatewaySubscriptionUpdateDispatchData = GatewaySubscriptionModifyDispatchData; /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#subscription-delete} */ export type GatewaySubscriptionDeleteDispatch = GatewaySubscriptionModifyDispatch; /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#subscription-delete} */ export type GatewaySubscriptionDeleteDispatchData = GatewaySubscriptionModifyDispatchData; /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#channel-create} * @see {@link https://discord.com/developers/docs/topics/gateway-events#channel-update} * @see {@link https://discord.com/developers/docs/topics/gateway-events#channel-delete} */ export type GatewayChannelModifyDispatch = _DataPayload<GatewayDispatchEvents.ChannelCreate | GatewayDispatchEvents.ChannelDelete | GatewayDispatchEvents.ChannelUpdate, GatewayChannelModifyDispatchData>; /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#channel-create} * @see {@link https://discord.com/developers/docs/topics/gateway-events#channel-update} * @see {@link https://discord.com/developers/docs/topics/gateway-events#channel-delete} */ export type GatewayChannelModifyDispatchData = APIChannel & { type: Exclude<GuildChannelType, ThreadChannelType>; guild_id: Snowflake; }; /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#channel-create} */ export type GatewayChannelCreateDispatch = GatewayChannelModifyDispatch; /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#channel-create} */ export type GatewayChannelCreateDispatchData = GatewayChannelModifyDispatchData; /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#channel-update} */ export type GatewayChannelUpdateDispatch = GatewayChannelModifyDispatch; /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#channel-update} */ export type GatewayChannelUpdateDispatchData = GatewayChannelModifyDispatchData; /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#channel-delete} */ export type GatewayChannelDeleteDispatch = GatewayChannelModifyDispatch; /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#channel-delete} */ export type GatewayChannelDeleteDispatchData = GatewayChannelModifyDispatchData; /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#channel-pins-update} */ export type GatewayChannelPinsUpdateDispatch = _DataPayload<GatewayDispatchEvents.ChannelPinsUpdate, GatewayChannelPinsUpdateDispatchData>; /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#channel-pins-update} */ export interface GatewayChannelPinsUpdateDispatchData { /** * The id of the guild */ guild_id?: Snowflake; /** * The id of the channel */ channel_id: Snowflake; /** * The time at which the most recent pinned message was pinned */ last_pin_timestamp?: string | null; } /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#entitlement-create} * @see {@link https://discord.com/developers/docs/topics/gateway-events#entitlement-update} * @see {@link https://discord.com/developers/docs/topics/gateway-events#entitlement-delete} */ export type GatewayEntitlementModifyDispatchData = APIEntitlement; /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#entitlement-create} * @see {@link https://discord.com/developers/docs/topics/gateway-events#entitlement-update} * @see {@link https://discord.com/developers/docs/topics/gateway-events#entitlement-delete} */ export type GatewayEntitlementModifyDispatch = _DataPayload<GatewayDispatchEvents.EntitlementCreate | GatewayDispatchEvents.EntitlementDelete | GatewayDispatchEvents.EntitlementUpdate, GatewayEntitlementModifyDispatchData>; /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#entitlement-create} */ export type GatewayEntitlementCreateDispatchData = GatewayEntitlementModifyDispatchData; /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#entitlement-create} */ export type GatewayEntitlementCreateDispatch = GatewayEntitlementModifyDispatch; /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#entitlement-update} */ export type GatewayEntitlementUpdateDispatchData = GatewayEntitlementModifyDispatchData; /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#entitlement-update} */ export type GatewayEntitlementUpdateDispatch = GatewayEntitlementModifyDispatch; /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#entitlement-delete} */ export type GatewayEntitlementDeleteDispatchData = GatewayEntitlementModifyDispatchData; /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#entitlement-delete} */ export type GatewayEntitlementDeleteDispatch = GatewayEntitlementModifyDispatch; /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#guild-update} */ export type GatewayGuildModifyDispatch = _DataPayload<GatewayDispatchEvents.GuildUpdate, GatewayGuildModifyDispatchData>; /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#guild-update} */ export type GatewayGuildModifyDispatchData = APIGuild; /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#guild-create} */ export type GatewayGuildCreateDispatch = _DataPayload<GatewayDispatchEvents.GuildCreate, GatewayGuildCreateDispatchData>; /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#guild-create} * @see {@link https://discord.com/developers/docs/topics/gateway-events#guild-create-guild-create-extra-fields} */ export interface GatewayGuildCreateDispatchData extends APIGuild { /** * When this guild was joined at * * **This field is only sent within the {@link https://discord.com/developers/docs/topics/gateway-events#guild-create | GUILD_CREATE} event** */ joined_at: string; /** * `true` if this is considered a large guild * * **This field is only sent within the {@link https://discord.com/developers/docs/topics/gateway-events#guild-create | GUILD_CREATE} event** */ large: boolean; /** * `true` if this guild is unavailable due to an outage */ unavailable?: boolean; /** * Total number of members in this guild * * **This field is only sent within the {@link https://discord.com/developers/docs/topics/gateway-events#guild-create | GUILD_CREATE} event** */ member_count: number; /** * States of members currently in voice channels; lacks the `guild_id` key * * **This field is only sent within the {@link https://discord.com/developers/docs/topics/gateway-events#guild-create | GUILD_CREATE} event** * * @see {@link https://discord.com/developers/docs/resources/voice#voice-state-object} */ voice_states: APIBaseVoiceState[]; /** * Users in the guild * * **This field is only sent within the {@link https://discord.com/developers/docs/topics/gateway-events#guild-create | GUILD_CREATE} event** * * @see {@link https://discord.com/developers/docs/resources/guild#guild-member-object} */ members: APIGuildMember[]; /** * Channels in the guild * * **This field is only sent within the {@link https://discord.com/developers/docs/topics/gateway-events#guild-create | GUILD_CREATE} event** * * @see {@link https://discord.com/developers/docs/resources/channel#channel-object} */ channels: (APIChannel & { type: Exclude<GuildChannelType, ThreadChannelType>; })[]; /** * Threads in the guild * * **This field is only sent within the {@link https://discord.com/developers/docs/topics/gateway-events#guild-create | GUILD_CREATE} event** * * @see {@link https://discord.com/developers/docs/resources/channel#channel-object} */ threads: (APIChannel & { type: ThreadChannelType; })[]; /** * Presences of the members in the guild, will only include non-offline members if the size is greater than `large_threshold` * * **This field is only sent within the {@link https://discord.com/developers/docs/topics/gateway-events#guild-create | GUILD_CREATE} event** * * @see {@link https://discord.com/developers/docs/topics/gateway-events#presence-update} */ presences: GatewayPresenceUpdate[]; /** * The stage instances in the guild * * **This field is only sent within the {@link https://discord.com/developers/docs/topics/gateway-events#guild-create | GUILD_CREATE} event** * * @see {@link https://discord.com/developers/docs/resources/stage-instance#stage-instance-object-stage-instance-structure} */ stage_instances: APIStageInstance[]; /** * The scheduled events in the guild * * **This field is only sent within the {@link https://discord.com/developers/docs/topics/gateway-events#guild-create | GUILD_CREATE} event** * * @see {@link https://discord.com/developers/docs/resources/guild-scheduled-event#guild-scheduled-event-object} */ guild_scheduled_events: APIGuildScheduledEvent[]; /** * The soundboard sounds in the guild * * **This field is only sent within the {@link https://discord.com/developers/docs/topics/gateway-events#guild-create | GUILD_CREATE} event** * * @see {@link https://discord.com/developers/docs/resources/soundboard#soundboard-sound-object} */ soundboard_sounds: APISoundboardSound[]; } /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#guild-update} */ export type GatewayGuildUpdateDispatch = GatewayGuildModifyDispatch; /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#guild-update} */ export type GatewayGuildUpdateDispatchData = GatewayGuildModifyDispatchData; /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#guild-delete} */ export type GatewayGuildDeleteDispatch = _DataPayload<GatewayDispatchEvents.GuildDelete, GatewayGuildDeleteDispatchData>; /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#guild-delete} */ export interface GatewayGuildDeleteDispatchData extends APIBaseGuild { /** * `true` if this guild is unavailable due to an outage * * If the field is not set, the user was removed from the guild. */ unavailable?: true; } /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#guild-ban-add} * @see {@link https://discord.com/developers/docs/topics/gateway-events#guild-ban-remove} */ export type GatewayGuildBanModifyDispatch = _DataPayload<GatewayDispatchEvents.GuildBanAdd | GatewayDispatchEvents.GuildBanRemove, GatewayGuildBanModifyDispatchData>; /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#guild-ban-add} * @see {@link https://discord.com/developers/docs/topics/gateway-events#guild-ban-remove} */ export interface GatewayGuildBanModifyDispatchData { /** * ID of the guild */ guild_id: Snowflake; /** * The banned user * * @see {@link https://discord.com/developers/docs/resources/user#user-object} */ user: APIUser; } /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#guild-ban-add} */ export type GatewayGuildBanAddDispatch = GatewayGuildBanModifyDispatch; /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#guild-ban-add} */ export type GatewayGuildBanAddDispatchData = GatewayGuildBanModifyDispatchData; /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#guild-ban-remove} */ export type GatewayGuildBanRemoveDispatch = GatewayGuildBanModifyDispatch; /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#guild-ban-remove} */ export type GatewayGuildBanRemoveDispatchData = GatewayGuildBanModifyDispatchData; /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#guild-emojis-update} */ export type GatewayGuildEmojisUpdateDispatch = _DataPayload<GatewayDispatchEvents.GuildEmojisUpdate, GatewayGuildEmojisUpdateDispatchData>; /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#guild-emojis-update} */ export interface GatewayGuildEmojisUpdateDispatchData { /** * ID of the guild */ guild_id: Snowflake; /** * Array of emojis * * @see {@link https://discord.com/developers/docs/resources/emoji#emoji-object} */ emojis: APIEmoji[]; } /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#guild-stickers-update} */ export type GatewayGuildStickersUpdateDispatch = _DataPayload<GatewayDispatchEvents.GuildStickersUpdate, GatewayGuildStickersUpdateDispatchData>; /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#guild-stickers-update} */ export interface GatewayGuildStickersUpdateDispatchData { /** * ID of the guild */ guild_id: Snowflake; /** * Array of stickers * * @see {@link https://discord.com/developers/docs/resources/sticker#sticker-object} */ stickers: APISticker[]; } /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#guild-integrations-update} */ export type GatewayGuildIntegrationsUpdateDispatch = _DataPayload<GatewayDispatchEvents.GuildIntegrationsUpdate, GatewayGuildIntegrationsUpdateDispatchData>; /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#guild-integrations-update} */ export interface GatewayGuildIntegrationsUpdateDispatchData { /** * ID of the guild whose integrations were updated */ guild_id: Snowflake; } /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#guild-member-add} */ export type GatewayGuildMemberAddDispatch = _DataPayload<GatewayDispatchEvents.GuildMemberAdd, GatewayGuildMemberAddDispatchData>; /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#guild-member-add} */ export interface GatewayGuildMemberAddDispatchData extends APIGuildMember { /** * The id of the guild */ guild_id: Snowflake; } /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#guild-member-remove} */ export type GatewayGuildMemberRemoveDispatch = _DataPayload<GatewayDispatchEvents.GuildMemberRemove, GatewayGuildMemberRemoveDispatchData>; /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#guild-member-remove} */ export interface GatewayGuildMemberRemoveDispatchData { /** * The id of the guild */ guild_id: Snowflake; /** * The user who was removed * * @see {@link https://discord.com/developers/docs/resources/user#user-object} */ user: APIUser; } /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#guild-member-update} */ export type GatewayGuildMemberUpdateDispatch = _DataPayload<GatewayDispatchEvents.GuildMemberUpdate, GatewayGuildMemberUpdateDispatchData>; /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#guild-member-update} */ export interface GatewayGuildMemberUpdateDispatchData extends _Nullable<APIGuildMemberJoined>, APIBaseGuildMember, Partial<APIBaseVoiceGuildMember>, Partial<APIFlaggedGuildMember>, Required<APIGuildMemberUser>, Required<APIGuildMemberAvatar> { /** * The id of the guild */ guild_id: Snowflake; } /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#guild-members-chunk} */ export type GatewayGuildMembersChunkDispatch = _DataPayload<GatewayDispatchEvents.GuildMembersChunk, GatewayGuildMembersChunkDispatchData>; /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#guild-members-chunk} */ export interface GatewayGuildMembersChunkDispatchData { /** * The id of the guild */ guild_id: Snowflake; /** * Set of guild members * * @see {@link https://discord.com/developers/docs/resources/guild#guild-member-object} */ members: APIGuildMember[]; /** * The chunk index in the expected chunks for this response (`0 <= chunk_index < chunk_count`) */ chunk_index: number; /** * The total number of expected chunks for this response */ chunk_count: number; /** * If passing an invalid id to `REQUEST_GUILD_MEMBERS`, it will be returned here */ not_found?: unknown[]; /** * If passing true to `REQUEST_GUILD_MEMBERS`, presences of the returned members will be here * * @see {@link https://discord.com/developers/docs/topics/gateway-events#update-presence} */ presences?: GatewayGuildMembersChunkPresence[]; /** * The nonce used in the Guild Members Request * * @see {@link https://discord.com/developers/docs/topics/gateway-events#request-guild-members} */ nonce?: string; } /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#guild-role-create} * @see {@link https://discord.com/developers/docs/topics/gateway-events#guild-role-update} */ export type GatewayGuildRoleModifyDispatch = _DataPayload<GatewayDispatchEvents.GuildRoleCreate | GatewayDispatchEvents.GuildRoleUpdate, GatewayGuildRoleModifyDispatchData>; /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#guild-role-create} * @see {@link https://discord.com/developers/docs/topics/gateway-events#guild-role-update} */ export interface GatewayGuildRoleModifyDispatchData { /** * The id of the guild */ guild_id: Snowflake; /** * The role created or updated * * @see {@link https://discord.com/developers/docs/topics/permissions#role-object} */ role: APIRole; } /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#guild-role-create} */ export type GatewayGuildRoleCreateDispatch = GatewayGuildRoleModifyDispatch; /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#guild-role-create} */ export type GatewayGuildRoleCreateDispatchData = GatewayGuildRoleModifyDispatchData; /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#guild-role-update} */ export type GatewayGuildRoleUpdateDispatch = GatewayGuildRoleModifyDispatch; /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#guild-role-update} */ export type GatewayGuildRoleUpdateDispatchData = GatewayGuildRoleModifyDispatchData; /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#guild-role-delete} */ export type GatewayGuildRoleDeleteDispatch = _DataPayload<GatewayDispatchEvents.GuildRoleDelete, GatewayGuildRoleDeleteDispatchData>; /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#guild-role-delete} */ export interface GatewayGuildRoleDeleteDispatchData { /** * The id of the guild */ guild_id: Snowflake; /** * The id of the role */ role_id: Snowflake; } /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#guild-scheduled-event-create} */ export type GatewayGuildScheduledEventCreateDispatch = _DataPayload<GatewayDispatchEvents.GuildScheduledEventCreate, GatewayGuildScheduledEventCreateDispatchData>; /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#guild-scheduled-event-create} */ export type GatewayGuildScheduledEventCreateDispatchData = APIGuildScheduledEvent; /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#guild-scheduled-event-update} */ export type GatewayGuildScheduledEventUpdateDispatch = _DataPayload<GatewayDispatchEvents.GuildScheduledEventUpdate, GatewayGuildScheduledEventUpdateDispatchData>; /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#guild-scheduled-event-update} */ export type GatewayGuildScheduledEventUpdateDispatchData = APIGuildScheduledEvent; /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#guild-scheduled-event-delete} */ export type GatewayGuildScheduledEventDeleteDispatch = _DataPayload<GatewayDispatchEvents.GuildScheduledEventDelete, GatewayGuildScheduledEventDeleteDispatchData>; /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#guild-scheduled-event-delete} */ export type GatewayGuildScheduledEventDeleteDispatchData = APIGuildScheduledEvent; /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#guild-scheduled-event-user-add} */ export type GatewayGuildScheduledEventUserAddDispatch = _DataPayload<GatewayDispatchEvents.GuildScheduledEventUserAdd, GatewayGuildScheduledEventUserAddDispatchData>; /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#guild-scheduled-event-user-add} */ export interface GatewayGuildScheduledEventUserAddDispatchData { guild_scheduled_event_id: Snowflake; user_id: Snowflake; guild_id: Snowflake; } /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#guild-scheduled-event-user-remove} */ export type GatewayGuildScheduledEventUserRemoveDispatch = _DataPayload<GatewayDispatchEvents.GuildScheduledEventUserRemove, GatewayGuildScheduledEventUserAddDispatchData>; /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#guild-scheduled-event-user-remove} */ export interface GatewayGuildScheduledEventUserRemoveDispatchData { guild_scheduled_event_id: Snowflake; user_id: Snowflake; guild_id: Snowflake; } /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#guild-soundboard-sound-create} */ export type GatewayGuildSoundboardSoundCreateDispatch = _DataPayload<GatewayDispatchEvents.GuildSoundboardSoundCreate, GatewayGuildSoundboardSoundCreateDispatchData>; /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#guild-soundboard-sound-create} */ export type GatewayGuildSoundboardSoundCreateDispatchData = APISoundboardSound; /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#guild-soundboard-sound-update} */ export type GatewayGuildSoundboardSoundUpdateDispatch = _DataPayload<GatewayDispatchEvents.GuildSoundboardSoundUpdate, GatewayGuildSoundboardSoundUpdateDispatchData>; /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#guild-soundboard-sound-update} */ export type GatewayGuildSoundboardSoundUpdateDispatchData = APISoundboardSound; /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#guild-soundboard-sound-delete} */ export type GatewayGuildSoundboardSoundDeleteDispatch = _DataPayload<GatewayDispatchEvents.GuildSoundboardSoundDelete, GatewayGuildSoundboardSoundDeleteDispatchData>; /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#guild-soundboard-sound-delete} */ export interface GatewayGuildSoundboardSoundDeleteDispatchData { /** * The id of the sound that was deleted */ sound_id: Snowflake; /** * The id of the guild the sound was in */ guild_id: Snowflake; } /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#guild-soundboard-sounds-update} */ export type GatewayGuildSoundboardSoundsUpdateDispatch = _DataPayload<GatewayDispatchEvents.GuildSoundboardSoundsUpdate, GatewayGuildSoundboardSoundsUpdateDispatchData>; /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#guild-soundboard-sounds-update} */ export interface GatewayGuildSoundboardSoundsUpdateDispatchData { /** * The guild's soundboard sounds */ soundboard_sounds: APISoundboardSound[]; /** * The id of the guild */ guild_id: Snowflake; } /** * @see {@link https://discord.com/developers/docs/events/gateway-events#soundboard-sounds} */ export type GatewaySoundboardSoundsDispatch = _DataPayload<GatewayDispatchEvents.SoundboardSounds, GatewaySoundboardSoundsDispatchData>; /** * @see {@link https://discord.com/developers/docs/events/gateway-events#soundboard-sounds} */ export interface GatewaySoundboardSoundsDispatchData { /** * The guild's soundboard sounds */ soundboard_sounds: APISoundboardSound[]; /** * The id of the guild */ guild_id: Snowflake; } /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#integration-create} */ export type GatewayIntegrationCreateDispatch = _DataPayload<GatewayDispatchEvents.IntegrationCreate, GatewayIntegrationCreateDispatchData>; /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#integration-create} */ export type GatewayIntegrationCreateDispatchData = APIGuildIntegration & { guild_id: Snowflake; }; /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#integration-update} */ export type GatewayIntegrationUpdateDispatch = _DataPayload<GatewayDispatchEvents.IntegrationUpdate, GatewayIntegrationUpdateDispatchData>; /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#integration-update} */ export type GatewayIntegrationUpdateDispatchData = APIGuildIntegration & { guild_id: Snowflake; }; /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#integration-update} */ export type GatewayIntegrationDeleteDispatch = _DataPayload<GatewayDispatchEvents.IntegrationDelete, GatewayIntegrationDeleteDispatchData>; /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#integration-delete} */ export interface GatewayIntegrationDeleteDispatchData { /** * Integration id */ id: Snowflake; /** * ID of the guild */ guild_id: Snowflake; /** * ID of the bot/OAuth2 application for this Discord integration */ application_id?: Snowflake; } /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#interaction-create} */ export type GatewayInteractionCreateDispatch = _DataPayload<GatewayDispatchEvents.InteractionCreate, GatewayInteractionCreateDispatchData>; /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#interaction-create} */ export type GatewayInteractionCreateDispatchData = APIInteraction; /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#invite-create} */ export type GatewayInviteCreateDispatch = _DataPayload<GatewayDispatchEvents.InviteCreate, GatewayInviteCreateDispatchData>; /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#invite-create} */ export interface GatewayInviteCreateDispatchData { /** * The channel the invite is for */ channel_id: Snowflake; /** * The unique invite code * * @see {@link https://discord.com/developers/docs/resources/invite#invite-object} */ code: string; /** * The time at which the invite was created */ created_at: number; /** * The guild of the invite */ guild_id?: Snowflake; /** * The user that created the invite * * @see {@link https://discord.com/developers/docs/resources/user#user-object} */ inviter?: APIUser; /** * How long the invite is valid for (in seconds) */ max_age: number; /** * The maximum number of times the invite can be used */ max_uses: number; /** * The type of target for this voice channel invite * * @see {@link https://discord.com/developers/docs/resources/invite#invite-object-invite-target-types} */ target_type?: InviteTargetType; /** * The user whose stream to display for this voice channel stream invite * * @see {@link https://discord.com/developers/docs/resources/user#user-object} */ target_user?: APIUser; /** * The embedded application to open for this voice channel embedded application invite */ target_application?: Partial<APIApplication>; /** * Whether or not the invite is temporary (invited users will be kicked on disconnect unless they're assigned a role) */ temporary: boolean; /** * How many times the invite has been used (always will be `0`) */ uses: 0; } /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#invite-delete} */ export type GatewayInviteDeleteDispatch = _DataPayload<GatewayDispatchEvents.InviteDelete, GatewayInviteDeleteDispatchData>; /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#invite-delete} */ export interface GatewayInviteDeleteDispatchData { /** * The channel of the invite */ channel_id: Snowflake; /** * The guild of the invite */ guild_id?: Snowflake; /** * The unique invite code * * @see {@link https://discord.com/developers/docs/resources/invite#invite-object} */ code: string; } /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#message-create} */ export type GatewayMessageCreateDispatch = _DataPayload<GatewayDispatchEvents.MessageCreate, GatewayMessageCreateDispatchData>; /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#message-create} */ export interface GatewayMessageCreateDispatchData extends GatewayMessageEventExtraFields, APIBaseMessage { } /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#message-update} */ export type GatewayMessageUpdateDispatch = _DataPayload<GatewayDispatchEvents.MessageUpdate, GatewayMessageUpdateDispatchData>; /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#message-update} */ export interface GatewayMessageUpdateDispatchData extends GatewayMessageEventExtraFields, APIBaseMessage { } export interface APIGuildMemberNoUser extends APIBaseGuildMember, APIFlaggedGuildMember, APIGuildMemberAvatar, APIGuildMemberJoined, APIBaseVoiceGuildMember { } export interface APIUserWithMember extends APIUser { /** * The `member` field is only present in `MESSAGE_CREATE` and `MESSAGE_UPDATE` events * from text-based guild channels * * @see {@link https://discord.com/developers/docs/resources/guild#guild-member-object} */ member?: APIGuildMemberNoUser; } /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#message-create-message-create-extra-fields} */ export interface GatewayMessageEventExtraFields { /** * ID of the guild the message was sent in */ guild_id?: Snowflake; /** * Member properties for this message's author * * The member object exists in `MESSAGE_CREATE` and `MESSAGE_UPDATE` events * from text-based guild channels * * @see {@link https://discord.com/developers/docs/resources/guild#guild-member-object} */ member?: APIGuildMemberNoUser; /** * Users specifically mentioned in the message * * @see {@link https://discord.com/developers/docs/resources/user#user-object} */ mentions: APIUserWithMember[]; } /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#message-delete} */ export type GatewayMessageDeleteDispatch = _DataPayload<GatewayDispatchEvents.MessageDelete, GatewayMessageDeleteDispatchData>; /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#message-delete} */ export interface GatewayMessageDeleteDispatchData { /** * The id of the message */ id: Snowflake; /** * The id of the channel */ channel_id: Snowflake; /** * The id of the guild */ guild_id?: Snowflake; } /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#message-delete-bulk} */ export type GatewayMessageDeleteBulkDispatch = _DataPayload<GatewayDispatchEvents.MessageDeleteBulk, GatewayMessageDeleteBulkDispatchData>; /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#message-delete-bulk} */ export interface GatewayMessageDeleteBulkDispatchData { /** * The ids of the messages */ ids: Snowflake[]; /** * The id of the channel */ channel_id: Snowflake; /** * The id of the guild */ guild_id?: Snowflake; } /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#message-reaction-add} */ export interface GatewayMessageReactionAddDispatchData extends GatewayMessageReactionRemoveDispatchData { /** * The member who reacted if this happened in a guild * * @see {@link https://discord.com/developers/docs/resources/guild#guild-member-object} */ member?: APIGuildMember; /** * The id of the user that posted the message that was reacted to */ message_author_id?: Snowflake; /** * Colors used for super-reaction animation in "#rrggbb" format */ burst_colors?: string[]; } /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#message-reaction-add} */ export type GatewayMessageReactionAddDispatch = _DataPayload<GatewayDispatchEvents.MessageReactionAdd, GatewayMessageReactionAddDispatchData>; /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#message-reaction-remove} */ export interface GatewayMessageReactionRemoveDispatchData { /** * The id of the user */ user_id: Snowflake; /** * The id of the channel */ channel_id: Snowflake; /** * The id of the message */ message_id: Snowflake; /** * The id of the guild */ guild_id?: Snowflake; /** * The emoji used to react * * @see {@link https://discord.com/developers/docs/resources/emoji#emoji-object} */ emoji: APIEmoji; /** * True if this is a super-reaction */ burst: boolean; /** * The type of reaction */ type: ReactionType; } /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#message-reaction-remove} */ export type GatewayMessageReactionRemoveDispatch = _DataPayload<GatewayDispatchEvents.MessageReactionRemove, GatewayMessageReactionRemoveDispatchData>; /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#message-reaction-remove-all} */ export type GatewayMessageReactionRemoveAllDispatch = _DataPayload<GatewayDispatchEvents.MessageReactionRemoveAll, GatewayMessageReactionRemoveAllDispatchData>; /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#message-reaction-remove-all} */ export type GatewayMessageReactionRemoveAllDispatchData = GatewayMessageReactionRemoveData; /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#message-reaction-remove-emoji} */ export type GatewayMessageReactionRemoveEmojiDispatch = _DataPayload<GatewayDispatchEvents.MessageReactionRemoveEmoji, GatewayMessageReactionRemoveEmojiDispatchData>; /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#message-reaction-remove-emoji} */ export interface GatewayMessageReactionRemoveEmojiDispatchData extends GatewayMessageReactionRemoveData { /** * The emoji that was removed */ emoji: APIEmoji; } /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#presence-update} */ export type GatewayPresenceUpdateDispatch = _DataPayload<GatewayDispatchEvents.PresenceUpdate, GatewayPresenceUpdateDispatchData>; /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#presence-update} */ export type GatewayPresenceUpdateDispatchData = GatewayPresenceUpdate; /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#stage-instance-create} */ export type GatewayStageInstanceCreateDispatch = _DataPayload<GatewayDispatchEvents.StageInstanceCreate, GatewayStageInstanceCreateDispatchData>; /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#stage-instance-create} */ export type GatewayStageInstanceCreateDispatchData = APIStageInstance; /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#stage-instance-delete} */ export type GatewayStageInstanceDeleteDispatch = _DataPayload<GatewayDispatchEvents.StageInstanceDelete, GatewayStageInstanceDeleteDispatchData>; /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#stage-instance-delete} */ export type GatewayStageInstanceDeleteDispatchData = APIStageInstance; /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#stage-instance-update} */ export type GatewayStageInstanceUpdateDispatch = _DataPayload<GatewayDispatchEvents.StageInstanceUpdate, GatewayStageInstanceUpdateDispatchData>; /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#stage-instance-update} */ export type GatewayStageInstanceUpdateDispatchData = APIStageInstance; /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#thread-list-sync} */ export type GatewayThreadListSyncDispatch = _DataPayload<GatewayDispatchEvents.ThreadListSync, GatewayThreadListSyncDispatchData>; /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#thread-list-sync} */ export type GatewayThreadListSyncDispatchData = GatewayThreadListSync; /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#thread-members-update} */ export type GatewayThreadMembersUpdateDispatch = _DataPayload<GatewayDispatchEvents.ThreadMembersUpdate, GatewayThreadMembersUpdateDispatchData>; /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#thread-members-update} */ export type GatewayThreadMembersUpdateDispatchData = RawGatewayThreadMembersUpdate; /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#thread-member-update} */ export type GatewayThreadMemberUpdateDispatch = _DataPayload<GatewayDispatchEvents.ThreadMemberUpdate, GatewayThreadMemberUpdateDispatchData>; /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#thread-member-update} */ export type GatewayThreadMemberUpdateDispatchData = APIThreadMember & { guild_id: Snowflake; }; /** * @deprecated This type doesn't accurately reflect the Discord API. * Use {@link GatewayThreadCreateDispatch}, * {@link GatewayThreadUpdateDispatch}, or * {@link GatewayThreadDeleteDispatch} instead. * @see {@link https://discord.com/developers/docs/topics/gateway-events#thread-create} * @see {@link https://discord.com/developers/docs/topics/gateway-events#thread-update} * @see {@link https://discord.com/developers/docs/topics/gateway-events#thread-delete} */ export type GatewayThreadModifyDispatch = _DataPayload<GatewayDispatchEvents.ThreadCreate | GatewayDispatchEvents.ThreadDelete | GatewayDispatchEvents.ThreadUpdate, APIThreadChannel>; /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#thread-create} */ export type GatewayThreadCreateDispatch = _DataPayload<GatewayDispatchEvents.ThreadCreate, GatewayThreadCreateDispatchData>; /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#thread-create} */ export interface GatewayThreadCreateDispatchData extends APIThreadChannel { /** * Whether the thread is newly created or not. */ newly_created?: true; } /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#thread-update} */ export type GatewayThreadUpdateDispatch = _DataPayload<GatewayDispatchEvents.ThreadUpdate, GatewayThreadUpdateDispatchData>; /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#thread-update} */ export type GatewayThreadUpdateDispatchData = APIThreadChannel; /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#thread-delete} */ export type GatewayThreadDeleteDispatch = _DataPayload<GatewayDispatchEvents.ThreadDelete, GatewayThreadDeleteDispatchData>; /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#thread-delete} */ export interface GatewayThreadDeleteDispatchData { /** * The id of the channel */ id: Snowflake; /** * The id of the guild */ guild_id: Snowflake; /** * The id of the parent channel of the thread */ parent_id: Snowflake; /** * The type of the channel * * @see {@link https://discord.com/developers/docs/resources/channel#channel-object-channel-types} */ type: ChannelType; } /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#typing-start} */ export type GatewayTypingStartDispatch = _DataPayload<GatewayDispatchEvents.TypingStart, GatewayTypingStartDispatchData>; /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#typing-start} */ export interface GatewayTypingStartDispatchData { /** * The id of the channel */ channel_id: Snowflake; /** * The id of the guild */ guild_id?: Snowflake; /** * The id of the user */ user_id: Snowflake; /** * Unix time (in seconds) of when the user started typing */ timestamp: number; /** * The member who started typing if this happened in a guild * * @see {@link https://discord.com/developers/docs/resources/guild#guild-member-object} */ member?: APIGuildMember; } /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#user-update} */ export type GatewayUserUpdateDispatch = _DataPayload<GatewayDispatchEvents.UserUpdate, GatewayUserUpdateDispatchData>; /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#user-update} */ export type GatewayUserUpdateDispatchData = APIUser; /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#voice-channel-effect-send} */ export type GatewayVoiceChannelEffectSendDispatch = _DataPayload<GatewayDispatchEvents.VoiceChannelEffectSend, GatewayVoiceChannelEffectSendDispatchData>; /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#voice-channel-effect-send} */ export interface GatewayVoiceChannelEffectSendDispatchData { /** * ID of the channel the effect was sent in */ channel_id: Snowflake; /** * ID of the guild the effect was sent in */ guild_id: Snowflake; /** * ID of the user who sent the effect */ user_id: Snowflake; /** * The emoji sent, for emoji reaction and soundboard effects */ emoji?: APIEmoji | null; /** * The type of emoji animation, for emoji reaction and soundboard effects */ animation_type?: VoiceChannelEffectSendAnimationType | null; /** * The ID of the emoji animation, for emoji reaction and soundboard effects */ animation_id?: number; /** * The ID of the soundboard sound, for soundboard effects */ sound_id?: Snowflake | number; /** * The volume of the soundboard sound, from 0 to 1, for soundboard effects */ sound_volume?: number; } /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#voice-channel-effect-send-animation-types} */ export declare enum VoiceChannelEffectSendAnimationType { /** * A fun animation, sent by a Nitro subscriber */ Premium = 0, /** * The standard animation */ Basic = 1 } /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#voice-state-update} */ export type GatewayVoiceStateUpdateDispatch = _DataPayload<GatewayDispatchEvents.VoiceStateUpdate, GatewayVoiceStateUpdateDispatchData>; /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#voice-state-update} */ export type GatewayVoiceStateUpdateDispatchData = APIVoiceState; /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#voice-server-update} */ export type GatewayVoiceServerUpdateDispatch = _DataPayload<GatewayDispatchEvents.VoiceServerUpdate, GatewayVoiceServerUpdateDispatchData>; /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#voice-server-update} */ export interface GatewayVoiceServerUpdateDispatchData { /** * Voice connection token */ token: string; /** * The guild this voice server update is for */ guild_id: Snowflake; /** * The voice server host * * A `null` endpoint means that the voice server allocated has gone away and is trying to be reallocated. * You should attempt to disconnect from the currently connected voice server, and not attempt to reconnect * until a new voice server is allocated */ endpoint: string | null; } /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#webhooks-update} */ export type GatewayWebhooksUpdateDispatch = _DataPayload<GatewayDispatchEvents.WebhooksUpdate, GatewayWebhooksUpdateDispatchData>; /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#webhooks-update} */ export interface GatewayWebhooksUpdateDispatchData { /** * The id of the guild */ guild_id: Snowflake; /** * The id of the channel */ channel_id: Snowflake; } /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#guild-audit-log-entry-create} */ export type GatewayGuildAuditLogEntryCreateDispatch = _DataPayload<GatewayDispatchEvents.GuildAuditLogEntryCreate, GatewayGuildAuditLogEntryCreateDispatchData>; /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#guild-audit-log-entry-create} */ export interface GatewayGuildAuditLogEntryCreateDispatchData extends APIAuditLogEntry { /** * ID of the guild */ guild_id: Snowflake; } /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#message-poll-vote-add} */ export type GatewayMessagePollVoteAddDispatch = _DataPayload<GatewayDispatchEvents.MessagePollVoteAdd, GatewayMessagePollVoteDispatchData>; /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#message-poll-vote-remove} */ export type GatewayMessagePollVoteRemoveDispatch = _DataPayload<GatewayDispatchEvents.MessagePollVoteRemove, GatewayMessagePollVoteDispatchData>; /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#message-poll-vote-add} * @see {@link https://discord.com/developers/docs/topics/gateway-events#message-poll-vote-remove} */ export interface GatewayMessagePollVoteDispatchData { /** * ID of the user */ user_id: Snowflake; /** * ID of the channel */ channel_id: Snowflake; /** * ID of the message */ message_id: Snowflake; /** * ID of the guild */ guild_id?: Snowflake; /** * ID of the answer */ answer_id: number; } /** * @see {@link https://discord.com/developers/docs/topics/gateway#sending-heartbeats} */ export interface GatewayHeartbeat { op: GatewayOpcodes.Heartbeat; d: GatewayHeartbeatData; } /** * @see {@link https://discord.com/developers/docs/topics/gateway#sending-heartbeats} */ export type GatewayHeartbeatData = number | null; /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#identify} */ export interface GatewayIdentify { op: GatewayOpcodes.Identify; d: GatewayIdentifyData; } /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#identify} */ export interface GatewayIdentifyData { /** * Authentication token */ token: string; /** * Connection properties * * @see {@link https://discord.com/developers/docs/topics/gateway-events#identify-identify-connection-properties} */ properties: GatewayIdentifyProperties; /** * Whether this connection supports compression of packets * * @defaultValue `false` */ compress?: boolean; /** * Value between 50 and 250, total number of members where the gateway will stop sending * offline members in the guild member list * * @defaultValue `50` */ large_threshold?: number; /** * Used for Guild Sharding * * @see {@link https://discord.com/developers/docs/topics/gateway#sharding} */ shard?: [shard_id: number, shard_count: number]; /** * Presence structure for initial presence information * * @see {@link https://discord.com/developers/docs/topics/gateway-events#update-presence} */ presence?: GatewayPresenceUpdateData; /** * The Gateway Intents you wish to receive * * @see {@link https://discord.com/developers/docs/topics/gateway#gateway-intents} */ intents: number; } /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#identify-identify-connection-properties} */ export interface GatewayIdentifyProperties { /** * Your operating system */ os: string; /** * Your library name */ browser: string; /** * Your library name */ device: string; } /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#resume} */ export interface GatewayResume { op: GatewayOpcodes.Resume; d: GatewayResumeData; } /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#resume} */ export interface GatewayResumeData { /** * Session token */ token: string; /** * Session id */ session_id: string; /** * Last sequence number received */ seq: number; } /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#request-guild-members} */ export interface GatewayRequestGuildMembers { op: GatewayOpcodes.RequestGuildMembers; d: GatewayRequestGuildMembersData; } /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#request-guild-members} */ export interface GatewayRequestGuildMembersDataBase { /** * ID of the guild to get members for */ guild_id: Snowflake; /** * Used to specify if we want the presences of the matched members */ presences?: boolean; /** * Nonce to identify the Guild Members Chunk response * * Nonce can only be up to 32 bytes. If you send an invalid nonce it will be ignored and the reply member_chunk(s) will not have a `nonce` set. * * @see {@link https://discord.com/developers/docs/topics/gateway-events#guild-members-chunk} */ nonce?: string; } /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#request-guild-members} */ export interface GatewayRequestGuildMembersDataWithUserIds extends GatewayRequestGuildMembersDataBase { /** * Used to specify which users you wish to fetch */ user_ids: Snowflake | Snowflake[]; } /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#request-guild-members} */ export interface GatewayRequestGuildMembersDataWithQuery extends GatewayRequestGuildMembersDataBase { /** * String that username starts with, or an empty string to return all members */ query: string; /** * Maximum number of members to send matching the `query`; * a limit of `0` can be used with an empty string `query` to return all members */ limit: number; } /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#request-guild-members} */ export type GatewayRequestGuildMembersData = GatewayRequestGuildMembersDataWithQuery | GatewayRequestGuildMembersDataWithUserIds; /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#request-soundboard-sounds} */ export interface GatewayRequestSoundboardSounds { op: GatewayOpcodes.RequestSoundboardSounds; d: GatewayRequestSoundboardSoundsData; } /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#request-soundboard-sounds} */ export interface GatewayRequestSoundboardSoundsData { /** * The ids of the guilds to get soundboard sounds for */ guild_ids: Snowflake[]; } /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#update-voice-state} */ export interface GatewayVoiceStateUpdate { op: GatewayOpcodes.VoiceStateUpdate; d: GatewayVoiceStateUpdateData; } /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#update-voice-state} */ export interface GatewayVoiceStateUpdateData { /** * ID of the guild */ guild_id: Snowflake; /** * ID of the voice channel client wants to join (`null` if disconnecting) */ channel_id: Snowflake | null; /** * Is the client muted */ self_mute: boolean; /** * Is the client deafened */ self_deaf: boolean; } /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#update-presence} */ export interface GatewayUpdatePresence { op: GatewayOpcodes.PresenceUpdate; d: GatewayPresenceUpdateData; } /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#update-presence-gateway-presence-update-structure} */ export interface GatewayPresenceUpdateData { /** * Unix time (in milliseconds) of when the client went idle, or `null` if the client is not idle */ since: number | null; /** * The user's activities * * @see {@link https://discord.com/developers/docs/topics/gateway-events#activity-object} */ activities: GatewayActivityUpdateData[]; /** * The user's new status * * @see {@link https://discord.com/developers/docs/topics/gateway-events#update-presence-status-types} */ status: PresenceUpdateStatus; /** * Whether or not the client is afk */ afk: boolean; } /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#activity-object-activity-structure} */ export type GatewayActivityUpdateData = Pick<GatewayActivity, 'name' | 'state' | 'type' | 'url'>; export interface _BaseBasePayload { /** * Opcode for the payload */ op: GatewayOpcodes; /** * Event data */ d?: unknown; } export interface _BasePayload extends _BaseBasePayload { /** * Sequence number, used for resuming sessions and heartbeats */ s: number; /** * The event name for this payload */ t?: string; } export interface _NonDispatchPayload extends _BaseBasePayload { t: null; s: null; } export interface _DataPayload<Event extends GatewayDispatchEvents, D = unknown> extends _BasePayload { op: GatewayOpcodes.Dispatch; t: Event; d: D; } export type GatewayMessageReactionData<E extends GatewayDispatchEvents, O extends string = never> = _DataPayload<E, Omit<GatewayMessageReactionAddDispatchData, O>>; export interface GatewayMessageReactionRemoveData { /** * The id of the channel */ channel_id: Snowflake; /** * The id of the message */ message_id: Snowflake; /** * The id of the guild */ guild_id?: Snowflake; } //# sourceMappingURL=v9.d.ts.map node_modules/discord-api-types/gateway/v10.js 0000664 00000036003 15114741631 0015175 0 ustar 00 "use strict"; /** * Types extracted from https://discord.com/developers/docs/topics/gateway */ Object.defineProperty(exports, "__esModule", { value: true }); exports.VoiceChannelEffectSendAnimationType = exports.GatewayDispatchEvents = exports.GatewayIntentBits = exports.GatewayCloseCodes = exports.GatewayOpcodes = exports.GatewayVersion = void 0; exports.GatewayVersion = '10'; /** * @see {@link https://discord.com/developers/docs/topics/opcodes-and-status-codes#gateway-gateway-opcodes} */ var GatewayOpcodes; (function (GatewayOpcodes) { /** * An event was dispatched */ GatewayOpcodes[GatewayOpcodes["Dispatch"] = 0] = "Dispatch"; /** * A bidirectional opcode to maintain an active gateway connection. * Fired periodically by the client, or fired by the gateway to request an immediate heartbeat from the client. */ GatewayOpcodes[GatewayOpcodes["Heartbeat"] = 1] = "Heartbeat"; /** * Starts a new session during the initial handshake */ GatewayOpcodes[GatewayOpcodes["Identify"] = 2] = "Identify"; /** * Update the client's presence */ GatewayOpcodes[GatewayOpcodes["PresenceUpdate"] = 3] = "PresenceUpdate"; /** * Used to join/leave or move between voice channels */ GatewayOpcodes[GatewayOpcodes["VoiceStateUpdate"] = 4] = "VoiceStateUpdate"; /** * Resume a previous session that was disconnected */ GatewayOpcodes[GatewayOpcodes["Resume"] = 6] = "Resume"; /** * You should attempt to reconnect and resume immediately */ GatewayOpcodes[GatewayOpcodes["Reconnect"] = 7] = "Reconnect"; /** * Request information about offline guild members in a large guild */ GatewayOpcodes[GatewayOpcodes["RequestGuildMembers"] = 8] = "RequestGuildMembers"; /** * The session has been invalidated. You should reconnect and identify/resume accordingly */ GatewayOpcodes[GatewayOpcodes["InvalidSession"] = 9] = "InvalidSession"; /** * Sent immediately after connecting, contains the `heartbeat_interval` to use */ GatewayOpcodes[GatewayOpcodes["Hello"] = 10] = "Hello"; /** * Sent in response to receiving a heartbeat to acknowledge that it has been received */ GatewayOpcodes[GatewayOpcodes["HeartbeatAck"] = 11] = "HeartbeatAck"; /** * Request information about soundboard sounds in a set of guilds */ GatewayOpcodes[GatewayOpcodes["RequestSoundboardSounds"] = 31] = "RequestSoundboardSounds"; })(GatewayOpcodes || (exports.GatewayOpcodes = GatewayOpcodes = {})); /** * @see {@link https://discord.com/developers/docs/topics/opcodes-and-status-codes#gateway-gateway-close-event-codes} */ var GatewayCloseCodes; (function (GatewayCloseCodes) { /** * We're not sure what went wrong. Try reconnecting? */ GatewayCloseCodes[GatewayCloseCodes["UnknownError"] = 4000] = "UnknownError"; /** * You sent an invalid Gateway opcode or an invalid payload for an opcode. Don't do that! * * @see {@link https://discord.com/developers/docs/topics/gateway-events#payload-structure} */ GatewayCloseCodes[GatewayCloseCodes["UnknownOpcode"] = 4001] = "UnknownOpcode"; /** * You sent an invalid payload to us. Don't do that! * * @see {@link https://discord.com/developers/docs/topics/gateway#sending-events} */ GatewayCloseCodes[GatewayCloseCodes["DecodeError"] = 4002] = "DecodeError"; /** * You sent us a payload prior to identifying * * @see {@link https://discord.com/developers/docs/topics/gateway-events#identify} */ GatewayCloseCodes[GatewayCloseCodes["NotAuthenticated"] = 4003] = "NotAuthenticated"; /** * The account token sent with your identify payload is incorrect * * @see {@link https://discord.com/developers/docs/topics/gateway-events#identify} */ GatewayCloseCodes[GatewayCloseCodes["AuthenticationFailed"] = 4004] = "AuthenticationFailed"; /** * You sent more than one identify payload. Don't do that! */ GatewayCloseCodes[GatewayCloseCodes["AlreadyAuthenticated"] = 4005] = "AlreadyAuthenticated"; /** * The sequence sent when resuming the session was invalid. Reconnect and start a new session * * @see {@link https://discord.com/developers/docs/topics/gateway-events#resume} */ GatewayCloseCodes[GatewayCloseCodes["InvalidSeq"] = 4007] = "InvalidSeq"; /** * Woah nelly! You're sending payloads to us too quickly. Slow it down! You will be disconnected on receiving this */ GatewayCloseCodes[GatewayCloseCodes["RateLimited"] = 4008] = "RateLimited"; /** * Your session timed out. Reconnect and start a new one */ GatewayCloseCodes[GatewayCloseCodes["SessionTimedOut"] = 4009] = "SessionTimedOut"; /** * You sent us an invalid shard when identifying * * @see {@link https://discord.com/developers/docs/topics/gateway#sharding} */ GatewayCloseCodes[GatewayCloseCodes["InvalidShard"] = 4010] = "InvalidShard"; /** * The session would have handled too many guilds - you are required to shard your connection in order to connect * * @see {@link https://discord.com/developers/docs/topics/gateway#sharding} */ GatewayCloseCodes[GatewayCloseCodes["ShardingRequired"] = 4011] = "ShardingRequired"; /** * You sent an invalid version for the gateway */ GatewayCloseCodes[GatewayCloseCodes["InvalidAPIVersion"] = 4012] = "InvalidAPIVersion"; /** * You sent an invalid intent for a Gateway Intent. You may have incorrectly calculated the bitwise value * * @see {@link https://discord.com/developers/docs/topics/gateway#gateway-intents} */ GatewayCloseCodes[GatewayCloseCodes["InvalidIntents"] = 4013] = "InvalidIntents"; /** * You sent a disallowed intent for a Gateway Intent. You may have tried to specify an intent that you have not * enabled or are not whitelisted for * * @see {@link https://discord.com/developers/docs/topics/gateway#gateway-intents} * @see {@link https://discord.com/developers/docs/topics/gateway#privileged-intents} */ GatewayCloseCodes[GatewayCloseCodes["DisallowedIntents"] = 4014] = "DisallowedIntents"; })(GatewayCloseCodes || (exports.GatewayCloseCodes = GatewayCloseCodes = {})); /** * @see {@link https://discord.com/developers/docs/topics/gateway#list-of-intents} */ var GatewayIntentBits; (function (GatewayIntentBits) { GatewayIntentBits[GatewayIntentBits["Guilds"] = 1] = "Guilds"; GatewayIntentBits[GatewayIntentBits["GuildMembers"] = 2] = "GuildMembers"; GatewayIntentBits[GatewayIntentBits["GuildModeration"] = 4] = "GuildModeration"; /** * @deprecated This is the old name for {@link GatewayIntentBits.GuildModeration} */ GatewayIntentBits[GatewayIntentBits["GuildBans"] = 4] = "GuildBans"; GatewayIntentBits[GatewayIntentBits["GuildExpressions"] = 8] = "GuildExpressions"; /** * @deprecated This is the old name for {@link GatewayIntentBits.GuildExpressions} */ GatewayIntentBits[GatewayIntentBits["GuildEmojisAndStickers"] = 8] = "GuildEmojisAndStickers"; GatewayIntentBits[GatewayIntentBits["GuildIntegrations"] = 16] = "GuildIntegrations"; GatewayIntentBits[GatewayIntentBits["GuildWebhooks"] = 32] = "GuildWebhooks"; GatewayIntentBits[GatewayIntentBits["GuildInvites"] = 64] = "GuildInvites"; GatewayIntentBits[GatewayIntentBits["GuildVoiceStates"] = 128] = "GuildVoiceStates"; GatewayIntentBits[GatewayIntentBits["GuildPresences"] = 256] = "GuildPresences"; GatewayIntentBits[GatewayIntentBits["GuildMessages"] = 512] = "GuildMessages"; GatewayIntentBits[GatewayIntentBits["GuildMessageReactions"] = 1024] = "GuildMessageReactions"; GatewayIntentBits[GatewayIntentBits["GuildMessageTyping"] = 2048] = "GuildMessageTyping"; GatewayIntentBits[GatewayIntentBits["DirectMessages"] = 4096] = "DirectMessages"; GatewayIntentBits[GatewayIntentBits["DirectMessageReactions"] = 8192] = "DirectMessageReactions"; GatewayIntentBits[GatewayIntentBits["DirectMessageTyping"] = 16384] = "DirectMessageTyping"; GatewayIntentBits[GatewayIntentBits["MessageContent"] = 32768] = "MessageContent"; GatewayIntentBits[GatewayIntentBits["GuildScheduledEvents"] = 65536] = "GuildScheduledEvents"; GatewayIntentBits[GatewayIntentBits["AutoModerationConfiguration"] = 1048576] = "AutoModerationConfiguration"; GatewayIntentBits[GatewayIntentBits["AutoModerationExecution"] = 2097152] = "AutoModerationExecution"; GatewayIntentBits[GatewayIntentBits["GuildMessagePolls"] = 16777216] = "GuildMessagePolls"; GatewayIntentBits[GatewayIntentBits["DirectMessagePolls"] = 33554432] = "DirectMessagePolls"; })(GatewayIntentBits || (exports.GatewayIntentBits = GatewayIntentBits = {})); /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#receive-events} */ var GatewayDispatchEvents; (function (GatewayDispatchEvents) { GatewayDispatchEvents["ApplicationCommandPermissionsUpdate"] = "APPLICATION_COMMAND_PERMISSIONS_UPDATE"; GatewayDispatchEvents["AutoModerationActionExecution"] = "AUTO_MODERATION_ACTION_EXECUTION"; GatewayDispatchEvents["AutoModerationRuleCreate"] = "AUTO_MODERATION_RULE_CREATE"; GatewayDispatchEvents["AutoModerationRuleDelete"] = "AUTO_MODERATION_RULE_DELETE"; GatewayDispatchEvents["AutoModerationRuleUpdate"] = "AUTO_MODERATION_RULE_UPDATE"; GatewayDispatchEvents["ChannelCreate"] = "CHANNEL_CREATE"; GatewayDispatchEvents["ChannelDelete"] = "CHANNEL_DELETE"; GatewayDispatchEvents["ChannelPinsUpdate"] = "CHANNEL_PINS_UPDATE"; GatewayDispatchEvents["ChannelUpdate"] = "CHANNEL_UPDATE"; GatewayDispatchEvents["EntitlementCreate"] = "ENTITLEMENT_CREATE"; GatewayDispatchEvents["EntitlementDelete"] = "ENTITLEMENT_DELETE"; GatewayDispatchEvents["EntitlementUpdate"] = "ENTITLEMENT_UPDATE"; GatewayDispatchEvents["GuildAuditLogEntryCreate"] = "GUILD_AUDIT_LOG_ENTRY_CREATE"; GatewayDispatchEvents["GuildBanAdd"] = "GUILD_BAN_ADD"; GatewayDispatchEvents["GuildBanRemove"] = "GUILD_BAN_REMOVE"; GatewayDispatchEvents["GuildCreate"] = "GUILD_CREATE"; GatewayDispatchEvents["GuildDelete"] = "GUILD_DELETE"; GatewayDispatchEvents["GuildEmojisUpdate"] = "GUILD_EMOJIS_UPDATE"; GatewayDispatchEvents["GuildIntegrationsUpdate"] = "GUILD_INTEGRATIONS_UPDATE"; GatewayDispatchEvents["GuildMemberAdd"] = "GUILD_MEMBER_ADD"; GatewayDispatchEvents["GuildMemberRemove"] = "GUILD_MEMBER_REMOVE"; GatewayDispatchEvents["GuildMembersChunk"] = "GUILD_MEMBERS_CHUNK"; GatewayDispatchEvents["GuildMemberUpdate"] = "GUILD_MEMBER_UPDATE"; GatewayDispatchEvents["GuildRoleCreate"] = "GUILD_ROLE_CREATE"; GatewayDispatchEvents["GuildRoleDelete"] = "GUILD_ROLE_DELETE"; GatewayDispatchEvents["GuildRoleUpdate"] = "GUILD_ROLE_UPDATE"; GatewayDispatchEvents["GuildScheduledEventCreate"] = "GUILD_SCHEDULED_EVENT_CREATE"; GatewayDispatchEvents["GuildScheduledEventDelete"] = "GUILD_SCHEDULED_EVENT_DELETE"; GatewayDispatchEvents["GuildScheduledEventUpdate"] = "GUILD_SCHEDULED_EVENT_UPDATE"; GatewayDispatchEvents["GuildScheduledEventUserAdd"] = "GUILD_SCHEDULED_EVENT_USER_ADD"; GatewayDispatchEvents["GuildScheduledEventUserRemove"] = "GUILD_SCHEDULED_EVENT_USER_REMOVE"; GatewayDispatchEvents["GuildSoundboardSoundCreate"] = "GUILD_SOUNDBOARD_SOUND_CREATE"; GatewayDispatchEvents["GuildSoundboardSoundDelete"] = "GUILD_SOUNDBOARD_SOUND_DELETE"; GatewayDispatchEvents["GuildSoundboardSoundsUpdate"] = "GUILD_SOUNDBOARD_SOUNDS_UPDATE"; GatewayDispatchEvents["GuildSoundboardSoundUpdate"] = "GUILD_SOUNDBOARD_SOUND_UPDATE"; GatewayDispatchEvents["SoundboardSounds"] = "SOUNDBOARD_SOUNDS"; GatewayDispatchEvents["GuildStickersUpdate"] = "GUILD_STICKERS_UPDATE"; GatewayDispatchEvents["GuildUpdate"] = "GUILD_UPDATE"; GatewayDispatchEvents["IntegrationCreate"] = "INTEGRATION_CREATE"; GatewayDispatchEvents["IntegrationDelete"] = "INTEGRATION_DELETE"; GatewayDispatchEvents["IntegrationUpdate"] = "INTEGRATION_UPDATE"; GatewayDispatchEvents["InteractionCreate"] = "INTERACTION_CREATE"; GatewayDispatchEvents["InviteCreate"] = "INVITE_CREATE"; GatewayDispatchEvents["InviteDelete"] = "INVITE_DELETE"; GatewayDispatchEvents["MessageCreate"] = "MESSAGE_CREATE"; GatewayDispatchEvents["MessageDelete"] = "MESSAGE_DELETE"; GatewayDispatchEvents["MessageDeleteBulk"] = "MESSAGE_DELETE_BULK"; GatewayDispatchEvents["MessagePollVoteAdd"] = "MESSAGE_POLL_VOTE_ADD"; GatewayDispatchEvents["MessagePollVoteRemove"] = "MESSAGE_POLL_VOTE_REMOVE"; GatewayDispatchEvents["MessageReactionAdd"] = "MESSAGE_REACTION_ADD"; GatewayDispatchEvents["MessageReactionRemove"] = "MESSAGE_REACTION_REMOVE"; GatewayDispatchEvents["MessageReactionRemoveAll"] = "MESSAGE_REACTION_REMOVE_ALL"; GatewayDispatchEvents["MessageReactionRemoveEmoji"] = "MESSAGE_REACTION_REMOVE_EMOJI"; GatewayDispatchEvents["MessageUpdate"] = "MESSAGE_UPDATE"; GatewayDispatchEvents["PresenceUpdate"] = "PRESENCE_UPDATE"; GatewayDispatchEvents["Ready"] = "READY"; GatewayDispatchEvents["Resumed"] = "RESUMED"; GatewayDispatchEvents["StageInstanceCreate"] = "STAGE_INSTANCE_CREATE"; GatewayDispatchEvents["StageInstanceDelete"] = "STAGE_INSTANCE_DELETE"; GatewayDispatchEvents["StageInstanceUpdate"] = "STAGE_INSTANCE_UPDATE"; GatewayDispatchEvents["SubscriptionCreate"] = "SUBSCRIPTION_CREATE"; GatewayDispatchEvents["SubscriptionDelete"] = "SUBSCRIPTION_DELETE"; GatewayDispatchEvents["SubscriptionUpdate"] = "SUBSCRIPTION_UPDATE"; GatewayDispatchEvents["ThreadCreate"] = "THREAD_CREATE"; GatewayDispatchEvents["ThreadDelete"] = "THREAD_DELETE"; GatewayDispatchEvents["ThreadListSync"] = "THREAD_LIST_SYNC"; GatewayDispatchEvents["ThreadMembersUpdate"] = "THREAD_MEMBERS_UPDATE"; GatewayDispatchEvents["ThreadMemberUpdate"] = "THREAD_MEMBER_UPDATE"; GatewayDispatchEvents["ThreadUpdate"] = "THREAD_UPDATE"; GatewayDispatchEvents["TypingStart"] = "TYPING_START"; GatewayDispatchEvents["UserUpdate"] = "USER_UPDATE"; GatewayDispatchEvents["VoiceChannelEffectSend"] = "VOICE_CHANNEL_EFFECT_SEND"; GatewayDispatchEvents["VoiceServerUpdate"] = "VOICE_SERVER_UPDATE"; GatewayDispatchEvents["VoiceStateUpdate"] = "VOICE_STATE_UPDATE"; GatewayDispatchEvents["WebhooksUpdate"] = "WEBHOOKS_UPDATE"; })(GatewayDispatchEvents || (exports.GatewayDispatchEvents = GatewayDispatchEvents = {})); /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#voice-channel-effect-send-animation-types} */ var VoiceChannelEffectSendAnimationType; (function (VoiceChannelEffectSendAnimationType) { /** * A fun animation, sent by a Nitro subscriber */ VoiceChannelEffectSendAnimationType[VoiceChannelEffectSendAnimationType["Premium"] = 0] = "Premium"; /** * The standard animation */ VoiceChannelEffectSendAnimationType[VoiceChannelEffectSendAnimationType["Basic"] = 1] = "Basic"; })(VoiceChannelEffectSendAnimationType || (exports.VoiceChannelEffectSendAnimationType = VoiceChannelEffectSendAnimationType = {})); // #endregion Shared //# sourceMappingURL=v10.js.map node_modules/discord-api-types/gateway/v6.mjs 0000664 00000000646 15114741631 0015303 0 ustar 00 import mod from "./v6.js"; export default mod; export const GatewayCloseCodes = mod.GatewayCloseCodes; export const GatewayDispatchEvents = mod.GatewayDispatchEvents; export const GatewayIntentBits = mod.GatewayIntentBits; export const GatewayOPCodes = mod.GatewayOPCodes; export const GatewayVersion = mod.GatewayVersion; export const VoiceCloseCodes = mod.VoiceCloseCodes; export const VoiceOPCodes = mod.VoiceOPCodes; node_modules/discord-api-types/gateway/v8.d.ts.map 0000664 00000042447 15114741631 0016145 0 ustar 00 {"version":3,"file":"v8.d.ts","sourceRoot":"","sources":["v8.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,YAA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B,CAAC,EAAE,KAAK,CAAC;IACT,CAAC,EAAE,CAAC,CAAC;CACL;AAED,KAAK,YAAY,CAAC,CAAC,SAAS,qBAAqB,EAAE,CAAC,SAAS,MAAM,GAAG,KAAK,IAAI,WAAW,CACzF,CAAC,EACD,IAAI,CACH;IACC;;OAEG;IACH,OAAO,EAAE,SAAS,CAAC;IACnB;;OAEG;IACH,UAAU,EAAE,SAAS,CAAC;IACtB;;OAEG;IACH,UAAU,EAAE,SAAS,CAAC;IACtB;;OAEG;IACH,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB;;;;OAIG;IACH,MAAM,CAAC,EAAE,cAAc,CAAC;IACxB;;;;OAIG;IACH,KAAK,EAAE,QAAQ,CAAC;CAChB,EACD,CAAC,CACD,CACD,CAAC;AAEF;;GAEG;AACH,UAAU,yBAAyB;IAClC;;OAEG;IACH,UAAU,EAAE,SAAS,CAAC;IACtB;;OAEG;IACH,UAAU,EAAE,SAAS,CAAC;IACtB;;OAEG;IACH,QAAQ,CAAC,EAAE,SAAS,CAAC;CACrB"} node_modules/discord-api-types/gateway/v8.js 0000664 00000027334 15114741631 0015133 0 ustar 00 "use strict"; /** * Types extracted from https://discord.com/developers/docs/topics/gateway */ Object.defineProperty(exports, "__esModule", { value: true }); exports.GatewayDispatchEvents = exports.GatewayIntentBits = exports.GatewayCloseCodes = exports.GatewayOpcodes = exports.GatewayVersion = void 0; /** * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ exports.GatewayVersion = '8'; /** * https://discord.com/developers/docs/topics/opcodes-and-status-codes#gateway-gateway-opcodes * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ var GatewayOpcodes; (function (GatewayOpcodes) { /** * An event was dispatched */ GatewayOpcodes[GatewayOpcodes["Dispatch"] = 0] = "Dispatch"; /** * A bidirectional opcode to maintain an active gateway connection. * Fired periodically by the client, or fired by the gateway to request an immediate heartbeat from the client. */ GatewayOpcodes[GatewayOpcodes["Heartbeat"] = 1] = "Heartbeat"; /** * Starts a new session during the initial handshake */ GatewayOpcodes[GatewayOpcodes["Identify"] = 2] = "Identify"; /** * Update the client's presence */ GatewayOpcodes[GatewayOpcodes["PresenceUpdate"] = 3] = "PresenceUpdate"; /** * Used to join/leave or move between voice channels */ GatewayOpcodes[GatewayOpcodes["VoiceStateUpdate"] = 4] = "VoiceStateUpdate"; /** * Resume a previous session that was disconnected */ GatewayOpcodes[GatewayOpcodes["Resume"] = 6] = "Resume"; /** * You should attempt to reconnect and resume immediately */ GatewayOpcodes[GatewayOpcodes["Reconnect"] = 7] = "Reconnect"; /** * Request information about offline guild members in a large guild */ GatewayOpcodes[GatewayOpcodes["RequestGuildMembers"] = 8] = "RequestGuildMembers"; /** * The session has been invalidated. You should reconnect and identify/resume accordingly */ GatewayOpcodes[GatewayOpcodes["InvalidSession"] = 9] = "InvalidSession"; /** * Sent immediately after connecting, contains the `heartbeat_interval` to use */ GatewayOpcodes[GatewayOpcodes["Hello"] = 10] = "Hello"; /** * Sent in response to receiving a heartbeat to acknowledge that it has been received */ GatewayOpcodes[GatewayOpcodes["HeartbeatAck"] = 11] = "HeartbeatAck"; })(GatewayOpcodes || (exports.GatewayOpcodes = GatewayOpcodes = {})); /** * https://discord.com/developers/docs/topics/opcodes-and-status-codes#gateway-gateway-close-event-codes * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ var GatewayCloseCodes; (function (GatewayCloseCodes) { /** * We're not sure what went wrong. Try reconnecting? */ GatewayCloseCodes[GatewayCloseCodes["UnknownError"] = 4000] = "UnknownError"; /** * You sent an invalid Gateway opcode or an invalid payload for an opcode. Don't do that! * * See https://discord.com/developers/docs/topics/gateway#payloads-and-opcodes */ GatewayCloseCodes[GatewayCloseCodes["UnknownOpcode"] = 4001] = "UnknownOpcode"; /** * You sent an invalid payload to us. Don't do that! * * See https://discord.com/developers/docs/topics/gateway#sending-payloads */ GatewayCloseCodes[GatewayCloseCodes["DecodeError"] = 4002] = "DecodeError"; /** * You sent us a payload prior to identifying * * See https://discord.com/developers/docs/topics/gateway#identify */ GatewayCloseCodes[GatewayCloseCodes["NotAuthenticated"] = 4003] = "NotAuthenticated"; /** * The account token sent with your identify payload is incorrect * * See https://discord.com/developers/docs/topics/gateway#identify */ GatewayCloseCodes[GatewayCloseCodes["AuthenticationFailed"] = 4004] = "AuthenticationFailed"; /** * You sent more than one identify payload. Don't do that! */ GatewayCloseCodes[GatewayCloseCodes["AlreadyAuthenticated"] = 4005] = "AlreadyAuthenticated"; /** * The sequence sent when resuming the session was invalid. Reconnect and start a new session * * See https://discord.com/developers/docs/topics/gateway#resume */ GatewayCloseCodes[GatewayCloseCodes["InvalidSeq"] = 4007] = "InvalidSeq"; /** * Woah nelly! You're sending payloads to us too quickly. Slow it down! You will be disconnected on receiving this */ GatewayCloseCodes[GatewayCloseCodes["RateLimited"] = 4008] = "RateLimited"; /** * Your session timed out. Reconnect and start a new one */ GatewayCloseCodes[GatewayCloseCodes["SessionTimedOut"] = 4009] = "SessionTimedOut"; /** * You sent us an invalid shard when identifying * * See https://discord.com/developers/docs/topics/gateway#sharding */ GatewayCloseCodes[GatewayCloseCodes["InvalidShard"] = 4010] = "InvalidShard"; /** * The session would have handled too many guilds - you are required to shard your connection in order to connect * * See https://discord.com/developers/docs/topics/gateway#sharding */ GatewayCloseCodes[GatewayCloseCodes["ShardingRequired"] = 4011] = "ShardingRequired"; /** * You sent an invalid version for the gateway */ GatewayCloseCodes[GatewayCloseCodes["InvalidAPIVersion"] = 4012] = "InvalidAPIVersion"; /** * You sent an invalid intent for a Gateway Intent. You may have incorrectly calculated the bitwise value * * See https://discord.com/developers/docs/topics/gateway#gateway-intents */ GatewayCloseCodes[GatewayCloseCodes["InvalidIntents"] = 4013] = "InvalidIntents"; /** * You sent a disallowed intent for a Gateway Intent. You may have tried to specify an intent that you have not * enabled or are not whitelisted for * * See https://discord.com/developers/docs/topics/gateway#gateway-intents * * See https://discord.com/developers/docs/topics/gateway#privileged-intents */ GatewayCloseCodes[GatewayCloseCodes["DisallowedIntents"] = 4014] = "DisallowedIntents"; })(GatewayCloseCodes || (exports.GatewayCloseCodes = GatewayCloseCodes = {})); /** * https://discord.com/developers/docs/topics/gateway#list-of-intents * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ var GatewayIntentBits; (function (GatewayIntentBits) { GatewayIntentBits[GatewayIntentBits["Guilds"] = 1] = "Guilds"; GatewayIntentBits[GatewayIntentBits["GuildMembers"] = 2] = "GuildMembers"; GatewayIntentBits[GatewayIntentBits["GuildBans"] = 4] = "GuildBans"; GatewayIntentBits[GatewayIntentBits["GuildEmojisAndStickers"] = 8] = "GuildEmojisAndStickers"; GatewayIntentBits[GatewayIntentBits["GuildIntegrations"] = 16] = "GuildIntegrations"; GatewayIntentBits[GatewayIntentBits["GuildWebhooks"] = 32] = "GuildWebhooks"; GatewayIntentBits[GatewayIntentBits["GuildInvites"] = 64] = "GuildInvites"; GatewayIntentBits[GatewayIntentBits["GuildVoiceStates"] = 128] = "GuildVoiceStates"; GatewayIntentBits[GatewayIntentBits["GuildPresences"] = 256] = "GuildPresences"; GatewayIntentBits[GatewayIntentBits["GuildMessages"] = 512] = "GuildMessages"; GatewayIntentBits[GatewayIntentBits["GuildMessageReactions"] = 1024] = "GuildMessageReactions"; GatewayIntentBits[GatewayIntentBits["GuildMessageTyping"] = 2048] = "GuildMessageTyping"; GatewayIntentBits[GatewayIntentBits["DirectMessages"] = 4096] = "DirectMessages"; GatewayIntentBits[GatewayIntentBits["DirectMessageReactions"] = 8192] = "DirectMessageReactions"; GatewayIntentBits[GatewayIntentBits["DirectMessageTyping"] = 16384] = "DirectMessageTyping"; GatewayIntentBits[GatewayIntentBits["GuildScheduledEvents"] = 65536] = "GuildScheduledEvents"; })(GatewayIntentBits || (exports.GatewayIntentBits = GatewayIntentBits = {})); /** * https://discord.com/developers/docs/topics/gateway#commands-and-events-gateway-events * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ var GatewayDispatchEvents; (function (GatewayDispatchEvents) { GatewayDispatchEvents["ChannelCreate"] = "CHANNEL_CREATE"; GatewayDispatchEvents["ChannelDelete"] = "CHANNEL_DELETE"; GatewayDispatchEvents["ChannelPinsUpdate"] = "CHANNEL_PINS_UPDATE"; GatewayDispatchEvents["ChannelUpdate"] = "CHANNEL_UPDATE"; GatewayDispatchEvents["GuildBanAdd"] = "GUILD_BAN_ADD"; GatewayDispatchEvents["GuildBanRemove"] = "GUILD_BAN_REMOVE"; GatewayDispatchEvents["GuildCreate"] = "GUILD_CREATE"; GatewayDispatchEvents["GuildDelete"] = "GUILD_DELETE"; GatewayDispatchEvents["GuildEmojisUpdate"] = "GUILD_EMOJIS_UPDATE"; GatewayDispatchEvents["GuildIntegrationsUpdate"] = "GUILD_INTEGRATIONS_UPDATE"; GatewayDispatchEvents["GuildMemberAdd"] = "GUILD_MEMBER_ADD"; GatewayDispatchEvents["GuildMemberRemove"] = "GUILD_MEMBER_REMOVE"; GatewayDispatchEvents["GuildMembersChunk"] = "GUILD_MEMBERS_CHUNK"; GatewayDispatchEvents["GuildMemberUpdate"] = "GUILD_MEMBER_UPDATE"; GatewayDispatchEvents["GuildRoleCreate"] = "GUILD_ROLE_CREATE"; GatewayDispatchEvents["GuildRoleDelete"] = "GUILD_ROLE_DELETE"; GatewayDispatchEvents["GuildRoleUpdate"] = "GUILD_ROLE_UPDATE"; GatewayDispatchEvents["GuildStickersUpdate"] = "GUILD_STICKERS_UPDATE"; GatewayDispatchEvents["GuildUpdate"] = "GUILD_UPDATE"; GatewayDispatchEvents["IntegrationCreate"] = "INTEGRATION_CREATE"; GatewayDispatchEvents["IntegrationDelete"] = "INTEGRATION_DELETE"; GatewayDispatchEvents["IntegrationUpdate"] = "INTEGRATION_UPDATE"; GatewayDispatchEvents["InteractionCreate"] = "INTERACTION_CREATE"; GatewayDispatchEvents["InviteCreate"] = "INVITE_CREATE"; GatewayDispatchEvents["InviteDelete"] = "INVITE_DELETE"; GatewayDispatchEvents["MessageCreate"] = "MESSAGE_CREATE"; GatewayDispatchEvents["MessageDelete"] = "MESSAGE_DELETE"; GatewayDispatchEvents["MessageDeleteBulk"] = "MESSAGE_DELETE_BULK"; GatewayDispatchEvents["MessageReactionAdd"] = "MESSAGE_REACTION_ADD"; GatewayDispatchEvents["MessageReactionRemove"] = "MESSAGE_REACTION_REMOVE"; GatewayDispatchEvents["MessageReactionRemoveAll"] = "MESSAGE_REACTION_REMOVE_ALL"; GatewayDispatchEvents["MessageReactionRemoveEmoji"] = "MESSAGE_REACTION_REMOVE_EMOJI"; GatewayDispatchEvents["MessageUpdate"] = "MESSAGE_UPDATE"; GatewayDispatchEvents["PresenceUpdate"] = "PRESENCE_UPDATE"; GatewayDispatchEvents["StageInstanceCreate"] = "STAGE_INSTANCE_CREATE"; GatewayDispatchEvents["StageInstanceDelete"] = "STAGE_INSTANCE_DELETE"; GatewayDispatchEvents["StageInstanceUpdate"] = "STAGE_INSTANCE_UPDATE"; GatewayDispatchEvents["Ready"] = "READY"; GatewayDispatchEvents["Resumed"] = "RESUMED"; GatewayDispatchEvents["TypingStart"] = "TYPING_START"; GatewayDispatchEvents["UserUpdate"] = "USER_UPDATE"; GatewayDispatchEvents["VoiceServerUpdate"] = "VOICE_SERVER_UPDATE"; GatewayDispatchEvents["VoiceStateUpdate"] = "VOICE_STATE_UPDATE"; GatewayDispatchEvents["WebhooksUpdate"] = "WEBHOOKS_UPDATE"; GatewayDispatchEvents["GuildScheduledEventCreate"] = "GUILD_SCHEDULED_EVENT_CREATE"; GatewayDispatchEvents["GuildScheduledEventUpdate"] = "GUILD_SCHEDULED_EVENT_UPDATE"; GatewayDispatchEvents["GuildScheduledEventDelete"] = "GUILD_SCHEDULED_EVENT_DELETE"; GatewayDispatchEvents["GuildScheduledEventUserAdd"] = "GUILD_SCHEDULED_EVENT_USER_ADD"; GatewayDispatchEvents["GuildScheduledEventUserRemove"] = "GUILD_SCHEDULED_EVENT_USER_REMOVE"; })(GatewayDispatchEvents || (exports.GatewayDispatchEvents = GatewayDispatchEvents = {})); // #endregion Shared //# sourceMappingURL=v8.js.map node_modules/discord-api-types/gateway/v9.js.map 0000664 00000006123 15114741631 0015701 0 ustar 00 {"version":3,"file":"v9.js","sourceRoot":"","sources":["v9.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AAqDU,QAAA,cAAc,GAAG,GAAG,CAAC;AAElC;;GAEG;AACH,IAAY,cAkDX;AAlDD,WAAY,cAAc;IACzB;;OAEG;IACH,2DAAQ,CAAA;IACR;;;OAGG;IACH,6DAAS,CAAA;IACT;;OAEG;IACH,2DAAQ,CAAA;IACR;;OAEG;IACH,uEAAc,CAAA;IACd;;OAEG;IACH,2EAAgB,CAAA;IAChB;;OAEG;IACH,uDAAU,CAAA;IACV;;OAEG;IACH,6DAAS,CAAA;IACT;;OAEG;IACH,iFAAmB,CAAA;IACnB;;OAEG;IACH,uEAAc,CAAA;IACd;;OAEG;IACH,sDAAK,CAAA;IACL;;OAEG;IACH,oEAAY,CAAA;IACZ;;OAEG;IACH,0FAA4B,CAAA;AAC7B,CAAC,EAlDW,cAAc,8BAAd,cAAc,QAkDzB;AAED;;GAEG;AACH,IAAY,iBA6EX;AA7ED,WAAY,iBAAiB;IAC5B;;OAEG;IACH,4EAAoB,CAAA;IACpB;;;;OAIG;IACH,8EAAa,CAAA;IACb;;;;OAIG;IACH,0EAAW,CAAA;IACX;;;;OAIG;IACH,oFAAgB,CAAA;IAChB;;;;OAIG;IACH,4FAAoB,CAAA;IACpB;;OAEG;IACH,4FAAoB,CAAA;IACpB;;;;OAIG;IACH,wEAAkB,CAAA;IAClB;;OAEG;IACH,0EAAW,CAAA;IACX;;OAEG;IACH,kFAAe,CAAA;IACf;;;;OAIG;IACH,4EAAY,CAAA;IACZ;;;;OAIG;IACH,oFAAgB,CAAA;IAChB;;OAEG;IACH,sFAAiB,CAAA;IACjB;;;;OAIG;IACH,gFAAc,CAAA;IACd;;;;;;OAMG;IACH,sFAAiB,CAAA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mCAAmC,QAS9C;AAicD,oBAAoB"} node_modules/discord-api-types/gateway/v10.d.ts 0000664 00000231056 15114741631 0015436 0 ustar 00 /** * Types extracted from https://discord.com/developers/docs/topics/gateway */ import type { Snowflake } from '../globals'; import type { APIApplication, APIApplicationCommandPermission, APIAutoModerationRule, APIAutoModerationAction, APIChannel, APIEmoji, APIGuild, APIGuildIntegration, APIGuildMember, APIGuildScheduledEvent, APIInteraction, APIRole, APIStageInstance, APISticker, APIThreadChannel, APIThreadMember, APIUnavailableGuild, APIUser, GatewayActivity, GatewayPresenceUpdate, GatewayThreadListSync, GatewayThreadMembersUpdate as RawGatewayThreadMembersUpdate, APIVoiceState, InviteTargetType, PresenceUpdateStatus, AutoModerationRuleTriggerType, APIAuditLogEntry, APIEntitlement, ChannelType, APISubscription, APISoundboardSound, GuildChannelType, ThreadChannelType, APIBaseGuild, APIBaseGuildMember, APIBaseVoiceState, APIBaseVoiceGuildMember, APIGuildMemberJoined, APIFlaggedGuildMember, APIGuildMemberAvatar, APIGuildMemberUser, GatewayGuildMembersChunkPresence, APIBaseMessage } from '../payloads/v10/index'; import type { ReactionType } from '../rest/v10/index'; import type { _Nullable } from '../utils/internals'; export type * from './common'; export declare const GatewayVersion = "10"; /** * @see {@link https://discord.com/developers/docs/topics/opcodes-and-status-codes#gateway-gateway-opcodes} */ export declare enum GatewayOpcodes { /** * An event was dispatched */ Dispatch = 0, /** * A bidirectional opcode to maintain an active gateway connection. * Fired periodically by the client, or fired by the gateway to request an immediate heartbeat from the client. */ Heartbeat = 1, /** * Starts a new session during the initial handshake */ Identify = 2, /** * Update the client's presence */ PresenceUpdate = 3, /** * Used to join/leave or move between voice channels */ VoiceStateUpdate = 4, /** * Resume a previous session that was disconnected */ Resume = 6, /** * You should attempt to reconnect and resume immediately */ Reconnect = 7, /** * Request information about offline guild members in a large guild */ RequestGuildMembers = 8, /** * The session has been invalidated. You should reconnect and identify/resume accordingly */ InvalidSession = 9, /** * Sent immediately after connecting, contains the `heartbeat_interval` to use */ Hello = 10, /** * Sent in response to receiving a heartbeat to acknowledge that it has been received */ HeartbeatAck = 11, /** * Request information about soundboard sounds in a set of guilds */ RequestSoundboardSounds = 31 } /** * @see {@link https://discord.com/developers/docs/topics/opcodes-and-status-codes#gateway-gateway-close-event-codes} */ export declare enum GatewayCloseCodes { /** * We're not sure what went wrong. Try reconnecting? */ UnknownError = 4000, /** * You sent an invalid Gateway opcode or an invalid payload for an opcode. Don't do that! * * @see {@link https://discord.com/developers/docs/topics/gateway-events#payload-structure} */ UnknownOpcode = 4001, /** * You sent an invalid payload to us. Don't do that! * * @see {@link https://discord.com/developers/docs/topics/gateway#sending-events} */ DecodeError = 4002, /** * You sent us a payload prior to identifying * * @see {@link https://discord.com/developers/docs/topics/gateway-events#identify} */ NotAuthenticated = 4003, /** * The account token sent with your identify payload is incorrect * * @see {@link https://discord.com/developers/docs/topics/gateway-events#identify} */ AuthenticationFailed = 4004, /** * You sent more than one identify payload. Don't do that! */ AlreadyAuthenticated = 4005, /** * The sequence sent when resuming the session was invalid. Reconnect and start a new session * * @see {@link https://discord.com/developers/docs/topics/gateway-events#resume} */ InvalidSeq = 4007, /** * Woah nelly! You're sending payloads to us too quickly. Slow it down! You will be disconnected on receiving this */ RateLimited = 4008, /** * Your session timed out. Reconnect and start a new one */ SessionTimedOut = 4009, /** * You sent us an invalid shard when identifying * * @see {@link https://discord.com/developers/docs/topics/gateway#sharding} */ InvalidShard = 4010, /** * The session would have handled too many guilds - you are required to shard your connection in order to connect * * @see {@link https://discord.com/developers/docs/topics/gateway#sharding} */ ShardingRequired = 4011, /** * You sent an invalid version for the gateway */ InvalidAPIVersion = 4012, /** * You sent an invalid intent for a Gateway Intent. You may have incorrectly calculated the bitwise value * * @see {@link https://discord.com/developers/docs/topics/gateway#gateway-intents} */ InvalidIntents = 4013, /** * You sent a disallowed intent for a Gateway Intent. You may have tried to specify an intent that you have not * enabled or are not whitelisted for * * @see {@link https://discord.com/developers/docs/topics/gateway#gateway-intents} * @see {@link https://discord.com/developers/docs/topics/gateway#privileged-intents} */ DisallowedIntents = 4014 } /** * @see {@link https://discord.com/developers/docs/topics/gateway#list-of-intents} */ export declare enum GatewayIntentBits { Guilds = 1, GuildMembers = 2, GuildModeration = 4, /** * @deprecated This is the old name for {@link GatewayIntentBits.GuildModeration} */ GuildBans = 4, GuildExpressions = 8, /** * @deprecated This is the old name for {@link GatewayIntentBits.GuildExpressions} */ GuildEmojisAndStickers = 8, GuildIntegrations = 16, GuildWebhooks = 32, GuildInvites = 64, GuildVoiceStates = 128, GuildPresences = 256, GuildMessages = 512, GuildMessageReactions = 1024, GuildMessageTyping = 2048, DirectMessages = 4096, DirectMessageReactions = 8192, DirectMessageTyping = 16384, MessageContent = 32768, GuildScheduledEvents = 65536, AutoModerationConfiguration = 1048576, AutoModerationExecution = 2097152, GuildMessagePolls = 16777216, DirectMessagePolls = 33554432 } /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#receive-events} */ export declare enum GatewayDispatchEvents { ApplicationCommandPermissionsUpdate = "APPLICATION_COMMAND_PERMISSIONS_UPDATE", AutoModerationActionExecution = "AUTO_MODERATION_ACTION_EXECUTION", AutoModerationRuleCreate = "AUTO_MODERATION_RULE_CREATE", AutoModerationRuleDelete = "AUTO_MODERATION_RULE_DELETE", AutoModerationRuleUpdate = "AUTO_MODERATION_RULE_UPDATE", ChannelCreate = "CHANNEL_CREATE", ChannelDelete = "CHANNEL_DELETE", ChannelPinsUpdate = "CHANNEL_PINS_UPDATE", ChannelUpdate = "CHANNEL_UPDATE", EntitlementCreate = "ENTITLEMENT_CREATE", EntitlementDelete = "ENTITLEMENT_DELETE", EntitlementUpdate = "ENTITLEMENT_UPDATE", GuildAuditLogEntryCreate = "GUILD_AUDIT_LOG_ENTRY_CREATE", GuildBanAdd = "GUILD_BAN_ADD", GuildBanRemove = "GUILD_BAN_REMOVE", GuildCreate = "GUILD_CREATE", GuildDelete = "GUILD_DELETE", GuildEmojisUpdate = "GUILD_EMOJIS_UPDATE", GuildIntegrationsUpdate = "GUILD_INTEGRATIONS_UPDATE", GuildMemberAdd = "GUILD_MEMBER_ADD", GuildMemberRemove = "GUILD_MEMBER_REMOVE", GuildMembersChunk = "GUILD_MEMBERS_CHUNK", GuildMemberUpdate = "GUILD_MEMBER_UPDATE", GuildRoleCreate = "GUILD_ROLE_CREATE", GuildRoleDelete = "GUILD_ROLE_DELETE", GuildRoleUpdate = "GUILD_ROLE_UPDATE", GuildScheduledEventCreate = "GUILD_SCHEDULED_EVENT_CREATE", GuildScheduledEventDelete = "GUILD_SCHEDULED_EVENT_DELETE", GuildScheduledEventUpdate = "GUILD_SCHEDULED_EVENT_UPDATE", GuildScheduledEventUserAdd = "GUILD_SCHEDULED_EVENT_USER_ADD", GuildScheduledEventUserRemove = "GUILD_SCHEDULED_EVENT_USER_REMOVE", GuildSoundboardSoundCreate = "GUILD_SOUNDBOARD_SOUND_CREATE", GuildSoundboardSoundDelete = "GUILD_SOUNDBOARD_SOUND_DELETE", GuildSoundboardSoundsUpdate = "GUILD_SOUNDBOARD_SOUNDS_UPDATE", GuildSoundboardSoundUpdate = "GUILD_SOUNDBOARD_SOUND_UPDATE", SoundboardSounds = "SOUNDBOARD_SOUNDS", GuildStickersUpdate = "GUILD_STICKERS_UPDATE", GuildUpdate = "GUILD_UPDATE", IntegrationCreate = "INTEGRATION_CREATE", IntegrationDelete = "INTEGRATION_DELETE", IntegrationUpdate = "INTEGRATION_UPDATE", InteractionCreate = "INTERACTION_CREATE", InviteCreate = "INVITE_CREATE", InviteDelete = "INVITE_DELETE", MessageCreate = "MESSAGE_CREATE", MessageDelete = "MESSAGE_DELETE", MessageDeleteBulk = "MESSAGE_DELETE_BULK", MessagePollVoteAdd = "MESSAGE_POLL_VOTE_ADD", MessagePollVoteRemove = "MESSAGE_POLL_VOTE_REMOVE", MessageReactionAdd = "MESSAGE_REACTION_ADD", MessageReactionRemove = "MESSAGE_REACTION_REMOVE", MessageReactionRemoveAll = "MESSAGE_REACTION_REMOVE_ALL", MessageReactionRemoveEmoji = "MESSAGE_REACTION_REMOVE_EMOJI", MessageUpdate = "MESSAGE_UPDATE", PresenceUpdate = "PRESENCE_UPDATE", Ready = "READY", Resumed = "RESUMED", StageInstanceCreate = "STAGE_INSTANCE_CREATE", StageInstanceDelete = "STAGE_INSTANCE_DELETE", StageInstanceUpdate = "STAGE_INSTANCE_UPDATE", SubscriptionCreate = "SUBSCRIPTION_CREATE", SubscriptionDelete = "SUBSCRIPTION_DELETE", SubscriptionUpdate = "SUBSCRIPTION_UPDATE", ThreadCreate = "THREAD_CREATE", ThreadDelete = "THREAD_DELETE", ThreadListSync = "THREAD_LIST_SYNC", ThreadMembersUpdate = "THREAD_MEMBERS_UPDATE", ThreadMemberUpdate = "THREAD_MEMBER_UPDATE", ThreadUpdate = "THREAD_UPDATE", TypingStart = "TYPING_START", UserUpdate = "USER_UPDATE", VoiceChannelEffectSend = "VOICE_CHANNEL_EFFECT_SEND", VoiceServerUpdate = "VOICE_SERVER_UPDATE", VoiceStateUpdate = "VOICE_STATE_UPDATE", WebhooksUpdate = "WEBHOOKS_UPDATE" } export type GatewaySendPayload = GatewayHeartbeat | GatewayIdentify | GatewayRequestGuildMembers | GatewayRequestSoundboardSounds | GatewayResume | GatewayUpdatePresence | GatewayVoiceStateUpdate; export type GatewayReceivePayload = GatewayDispatchPayload | GatewayHeartbeatAck | GatewayHeartbeatRequest | GatewayHello | GatewayInvalidSession | GatewayReconnect; export type GatewayDispatchPayload = GatewayApplicationCommandPermissionsUpdateDispatch | GatewayAutoModerationActionExecutionDispatch | GatewayAutoModerationRuleCreateDispatch | GatewayAutoModerationRuleDeleteDispatch | GatewayAutoModerationRuleModifyDispatch | GatewayChannelModifyDispatch | GatewayChannelPinsUpdateDispatch | GatewayEntitlementModifyDispatch | GatewayGuildAuditLogEntryCreateDispatch | GatewayGuildBanModifyDispatch | GatewayGuildCreateDispatch | GatewayGuildDeleteDispatch | GatewayGuildEmojisUpdateDispatch | GatewayGuildIntegrationsUpdateDispatch | GatewayGuildMemberAddDispatch | GatewayGuildMemberRemoveDispatch | GatewayGuildMembersChunkDispatch | GatewayGuildMemberUpdateDispatch | GatewayGuildModifyDispatch | GatewayGuildRoleDeleteDispatch | GatewayGuildRoleModifyDispatch | GatewayGuildScheduledEventCreateDispatch | GatewayGuildScheduledEventDeleteDispatch | GatewayGuildScheduledEventUpdateDispatch | GatewayGuildScheduledEventUserAddDispatch | GatewayGuildScheduledEventUserRemoveDispatch | GatewayGuildSoundboardSoundCreateDispatch | GatewayGuildSoundboardSoundDeleteDispatch | GatewayGuildSoundboardSoundsUpdateDispatch | GatewayGuildSoundboardSoundUpdateDispatch | GatewayGuildStickersUpdateDispatch | GatewayIntegrationCreateDispatch | GatewayIntegrationDeleteDispatch | GatewayIntegrationUpdateDispatch | GatewayInteractionCreateDispatch | GatewayInviteCreateDispatch | GatewayInviteDeleteDispatch | GatewayMessageCreateDispatch | GatewayMessageDeleteBulkDispatch | GatewayMessageDeleteDispatch | GatewayMessagePollVoteAddDispatch | GatewayMessagePollVoteRemoveDispatch | GatewayMessageReactionAddDispatch | GatewayMessageReactionRemoveAllDispatch | GatewayMessageReactionRemoveDispatch | GatewayMessageReactionRemoveEmojiDispatch | GatewayMessageUpdateDispatch | GatewayPresenceUpdateDispatch | GatewayReadyDispatch | GatewayResumedDispatch | GatewaySoundboardSoundsDispatch | GatewayStageInstanceCreateDispatch | GatewayStageInstanceDeleteDispatch | GatewayStageInstanceUpdateDispatch | GatewaySubscriptionModifyDispatch | GatewayThreadCreateDispatch | GatewayThreadDeleteDispatch | GatewayThreadListSyncDispatch | GatewayThreadMembersUpdateDispatch | GatewayThreadMemberUpdateDispatch | GatewayThreadUpdateDispatch | GatewayTypingStartDispatch | GatewayUserUpdateDispatch | GatewayVoiceChannelEffectSendDispatch | GatewayVoiceServerUpdateDispatch | GatewayVoiceStateUpdateDispatch | GatewayWebhooksUpdateDispatch; /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#hello} */ export interface GatewayHello extends _NonDispatchPayload { op: GatewayOpcodes.Hello; d: GatewayHelloData; } /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#hello} */ export interface GatewayHelloData { /** * The interval (in milliseconds) the client should heartbeat with */ heartbeat_interval: number; } /** * @see {@link https://discord.com/developers/docs/topics/gateway#sending-heartbeats} */ export interface GatewayHeartbeatRequest extends _NonDispatchPayload { op: GatewayOpcodes.Heartbeat; d: never; } /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#heartbeat} */ export interface GatewayHeartbeatAck extends _NonDispatchPayload { op: GatewayOpcodes.HeartbeatAck; d: never; } /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#invalid-session} */ export interface GatewayInvalidSession extends _NonDispatchPayload { op: GatewayOpcodes.InvalidSession; d: GatewayInvalidSessionData; } /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#invalid-session} */ export type GatewayInvalidSessionData = boolean; /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#reconnect} */ export interface GatewayReconnect extends _NonDispatchPayload { op: GatewayOpcodes.Reconnect; d: never; } /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#ready} */ export type GatewayReadyDispatch = _DataPayload<GatewayDispatchEvents.Ready, GatewayReadyDispatchData>; /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#ready} */ export interface GatewayReadyDispatchData { /** * Gateway version * * @see {@link https://discord.com/developers/docs/reference#api-versioning} */ v: number; /** * Information about the user including email * * @see {@link https://discord.com/developers/docs/resources/user#user-object} */ user: APIUser; /** * The guilds the user is in * * @see {@link https://discord.com/developers/docs/resources/guild#unavailable-guild-object} */ guilds: APIUnavailableGuild[]; /** * Used for resuming connections */ session_id: string; /** * Gateway url for resuming connections */ resume_gateway_url: string; /** * The shard information associated with this session, if sent when identifying * * @see {@link https://discord.com/developers/docs/topics/gateway#sharding} */ shard?: [shard_id: number, shard_count: number]; /** * Contains `id` and `flags` * * @see {@link https://discord.com/developers/docs/resources/application#application-object} */ application: Pick<APIApplication, 'flags' | 'id'>; } /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#resumed} */ export type GatewayResumedDispatch = _DataPayload<GatewayDispatchEvents.Resumed, never>; /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#auto-moderation-rule-create} * @see {@link https://discord.com/developers/docs/topics/gateway-events#auto-moderation-rule-update} * @see {@link https://discord.com/developers/docs/topics/gateway-events#auto-moderation-rule-delete} */ export type GatewayAutoModerationRuleModifyDispatch = _DataPayload<GatewayDispatchEvents.AutoModerationRuleCreate | GatewayDispatchEvents.AutoModerationRuleDelete | GatewayDispatchEvents.AutoModerationRuleUpdate, GatewayAutoModerationRuleModifyDispatchData>; /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#auto-moderation-rule-create} * @see {@link https://discord.com/developers/docs/topics/gateway-events#auto-moderation-rule-update} * @see {@link https://discord.com/developers/docs/topics/gateway-events#auto-moderation-rule-delete} */ export type GatewayAutoModerationRuleModifyDispatchData = APIAutoModerationRule; /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#auto-moderation-rule-create} */ export type GatewayAutoModerationRuleCreateDispatch = GatewayAutoModerationRuleModifyDispatch; /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#auto-moderation-rule-create} */ export type GatewayAutoModerationRuleCreateDispatchData = GatewayAutoModerationRuleModifyDispatchData; /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#auto-moderation-rule-update} */ export type GatewayAutoModerationRuleUpdateDispatch = GatewayAutoModerationRuleModifyDispatch; /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#auto-moderation-rule-update} */ export type GatewayAutoModerationRuleUpdateDispatchData = GatewayAutoModerationRuleModifyDispatchData; /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#auto-moderation-rule-delete} */ export type GatewayAutoModerationRuleDeleteDispatch = GatewayAutoModerationRuleModifyDispatch; /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#auto-moderation-rule-delete} */ export type GatewayAutoModerationRuleDeleteDispatchData = GatewayAutoModerationRuleModifyDispatchData; /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#auto-moderation-action-execution} */ export type GatewayAutoModerationActionExecutionDispatch = _DataPayload<GatewayDispatchEvents.AutoModerationActionExecution, GatewayAutoModerationActionExecutionDispatchData>; /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#auto-moderation-action-execution} */ export interface GatewayAutoModerationActionExecutionDispatchData { /** * The id of the guild in which action was executed */ guild_id: Snowflake; /** * The action which was executed */ action: APIAutoModerationAction; /** * The id of the rule which action belongs to */ rule_id: Snowflake; /** * The trigger type of rule which was triggered */ rule_trigger_type: AutoModerationRuleTriggerType; /** * The id of the user which generated the content which triggered the rule */ user_id: Snowflake; /** * The id of the channel in which user content was posted */ channel_id?: Snowflake; /** * The id of any user message which content belongs to * * This field will not be present if message was blocked by AutoMod or content was not part of any message */ message_id?: Snowflake; /** * The id of any system auto moderation messages posted as a result of this action * * This field will not be present if this event does not correspond to an action with type {@link AutoModerationActionType.SendAlertMessage} */ alert_system_message_id?: Snowflake; /** * The user generated text content * * `MESSAGE_CONTENT` (`1 << 15`) gateway intent is required to receive non-empty values from this field */ content: string; /** * The word or phrase configured in the rule that triggered the rule */ matched_keyword: string | null; /** * The substring in content that triggered the rule * * `MESSAGE_CONTENT` (`1 << 15`) gateway intent is required to receive non-empty values from this field */ matched_content: string | null; } /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#application-command-permissions-update} */ export type GatewayApplicationCommandPermissionsUpdateDispatch = _DataPayload<GatewayDispatchEvents.ApplicationCommandPermissionsUpdate, GatewayApplicationCommandPermissionsUpdateDispatchData>; /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#application-command-permissions-update} */ export interface GatewayApplicationCommandPermissionsUpdateDispatchData { /** * ID of the command or the application ID */ id: Snowflake; /** * ID of the application the command belongs to */ application_id: Snowflake; /** * ID of the guild */ guild_id: Snowflake; /** * Permissions for the command in the guild, max of 100 */ permissions: APIApplicationCommandPermission[]; } /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#subscription-create} * @see {@link https://discord.com/developers/docs/topics/gateway-events#subscription-update} * @see {@link https://discord.com/developers/docs/topics/gateway-events#subscription-delete} */ export type GatewaySubscriptionModifyDispatch = _DataPayload<GatewayDispatchEvents.SubscriptionCreate | GatewayDispatchEvents.SubscriptionDelete | GatewayDispatchEvents.SubscriptionUpdate, GatewaySubscriptionModifyDispatchData>; /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#subscription-create} * @see {@link https://discord.com/developers/docs/topics/gateway-events#subscription-update} * @see {@link https://discord.com/developers/docs/topics/gateway-events#subscription-delete} */ export type GatewaySubscriptionModifyDispatchData = APISubscription; /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#subscription-create} */ export type GatewaySubscriptionCreateDispatch = GatewaySubscriptionModifyDispatch; /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#subscription-create} */ export type GatewaySubscriptionCreateDispatchData = GatewaySubscriptionModifyDispatchData; /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#subscription-update} */ export type GatewaySubscriptionUpdateDispatch = GatewaySubscriptionModifyDispatch; /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#subscription-update} */ export type GatewaySubscriptionUpdateDispatchData = GatewaySubscriptionModifyDispatchData; /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#subscription-delete} */ export type GatewaySubscriptionDeleteDispatch = GatewaySubscriptionModifyDispatch; /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#subscription-delete} */ export type GatewaySubscriptionDeleteDispatchData = GatewaySubscriptionModifyDispatchData; /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#channel-create} * @see {@link https://discord.com/developers/docs/topics/gateway-events#channel-update} * @see {@link https://discord.com/developers/docs/topics/gateway-events#channel-delete} */ export type GatewayChannelModifyDispatch = _DataPayload<GatewayDispatchEvents.ChannelCreate | GatewayDispatchEvents.ChannelDelete | GatewayDispatchEvents.ChannelUpdate, GatewayChannelModifyDispatchData>; /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#channel-create} * @see {@link https://discord.com/developers/docs/topics/gateway-events#channel-update} * @see {@link https://discord.com/developers/docs/topics/gateway-events#channel-delete} */ export type GatewayChannelModifyDispatchData = APIChannel & { type: Exclude<GuildChannelType, ThreadChannelType>; guild_id: Snowflake; }; /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#channel-create} */ export type GatewayChannelCreateDispatch = GatewayChannelModifyDispatch; /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#channel-create} */ export type GatewayChannelCreateDispatchData = GatewayChannelModifyDispatchData; /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#channel-update} */ export type GatewayChannelUpdateDispatch = GatewayChannelModifyDispatch; /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#channel-update} */ export type GatewayChannelUpdateDispatchData = GatewayChannelModifyDispatchData; /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#channel-delete} */ export type GatewayChannelDeleteDispatch = GatewayChannelModifyDispatch; /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#channel-delete} */ export type GatewayChannelDeleteDispatchData = GatewayChannelModifyDispatchData; /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#channel-pins-update} */ export type GatewayChannelPinsUpdateDispatch = _DataPayload<GatewayDispatchEvents.ChannelPinsUpdate, GatewayChannelPinsUpdateDispatchData>; /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#channel-pins-update} */ export interface GatewayChannelPinsUpdateDispatchData { /** * The id of the guild */ guild_id?: Snowflake; /** * The id of the channel */ channel_id: Snowflake; /** * The time at which the most recent pinned message was pinned */ last_pin_timestamp?: string | null; } /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#entitlement-create} * @see {@link https://discord.com/developers/docs/topics/gateway-events#entitlement-update} * @see {@link https://discord.com/developers/docs/topics/gateway-events#entitlement-delete} */ export type GatewayEntitlementModifyDispatchData = APIEntitlement; /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#entitlement-create} * @see {@link https://discord.com/developers/docs/topics/gateway-events#entitlement-update} * @see {@link https://discord.com/developers/docs/topics/gateway-events#entitlement-delete} */ export type GatewayEntitlementModifyDispatch = _DataPayload<GatewayDispatchEvents.EntitlementCreate | GatewayDispatchEvents.EntitlementDelete | GatewayDispatchEvents.EntitlementUpdate, GatewayEntitlementModifyDispatchData>; /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#entitlement-create} */ export type GatewayEntitlementCreateDispatchData = GatewayEntitlementModifyDispatchData; /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#entitlement-create} */ export type GatewayEntitlementCreateDispatch = GatewayEntitlementModifyDispatch; /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#entitlement-update} */ export type GatewayEntitlementUpdateDispatchData = GatewayEntitlementModifyDispatchData; /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#entitlement-update} */ export type GatewayEntitlementUpdateDispatch = GatewayEntitlementModifyDispatch; /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#entitlement-delete} */ export type GatewayEntitlementDeleteDispatchData = GatewayEntitlementModifyDispatchData; /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#entitlement-delete} */ export type GatewayEntitlementDeleteDispatch = GatewayEntitlementModifyDispatch; /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#guild-update} */ export type GatewayGuildModifyDispatch = _DataPayload<GatewayDispatchEvents.GuildUpdate, GatewayGuildModifyDispatchData>; /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#guild-update} */ export type GatewayGuildModifyDispatchData = APIGuild; /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#guild-create} */ export type GatewayGuildCreateDispatch = _DataPayload<GatewayDispatchEvents.GuildCreate, GatewayGuildCreateDispatchData>; /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#guild-create} * @see {@link https://discord.com/developers/docs/topics/gateway-events#guild-create-guild-create-extra-fields} */ export interface GatewayGuildCreateDispatchData extends APIGuild { /** * When this guild was joined at * * **This field is only sent within the {@link https://discord.com/developers/docs/topics/gateway-events#guild-create | GUILD_CREATE} event** */ joined_at: string; /** * `true` if this is considered a large guild * * **This field is only sent within the {@link https://discord.com/developers/docs/topics/gateway-events#guild-create | GUILD_CREATE} event** */ large: boolean; /** * `true` if this guild is unavailable due to an outage */ unavailable?: boolean; /** * Total number of members in this guild * * **This field is only sent within the {@link https://discord.com/developers/docs/topics/gateway-events#guild-create | GUILD_CREATE} event** */ member_count: number; /** * States of members currently in voice channels; lacks the `guild_id` key * * **This field is only sent within the {@link https://discord.com/developers/docs/topics/gateway-events#guild-create | GUILD_CREATE} event** * * @see {@link https://discord.com/developers/docs/resources/voice#voice-state-object} */ voice_states: APIBaseVoiceState[]; /** * Users in the guild * * **This field is only sent within the {@link https://discord.com/developers/docs/topics/gateway-events#guild-create | GUILD_CREATE} event** * * @see {@link https://discord.com/developers/docs/resources/guild#guild-member-object} */ members: APIGuildMember[]; /** * Channels in the guild * * **This field is only sent within the {@link https://discord.com/developers/docs/topics/gateway-events#guild-create | GUILD_CREATE} event** * * @see {@link https://discord.com/developers/docs/resources/channel#channel-object} */ channels: (APIChannel & { type: Exclude<GuildChannelType, ThreadChannelType>; })[]; /** * Threads in the guild * * **This field is only sent within the {@link https://discord.com/developers/docs/topics/gateway-events#guild-create | GUILD_CREATE} event** * * @see {@link https://discord.com/developers/docs/resources/channel#channel-object} */ threads: (APIChannel & { type: ThreadChannelType; })[]; /** * Presences of the members in the guild, will only include non-offline members if the size is greater than `large_threshold` * * **This field is only sent within the {@link https://discord.com/developers/docs/topics/gateway-events#guild-create | GUILD_CREATE} event** * * @see {@link https://discord.com/developers/docs/topics/gateway-events#presence-update} */ presences: GatewayPresenceUpdate[]; /** * The stage instances in the guild * * **This field is only sent within the {@link https://discord.com/developers/docs/topics/gateway-events#guild-create | GUILD_CREATE} event** * * @see {@link https://discord.com/developers/docs/resources/stage-instance#stage-instance-object-stage-instance-structure} */ stage_instances: APIStageInstance[]; /** * The scheduled events in the guild * * **This field is only sent within the {@link https://discord.com/developers/docs/topics/gateway-events#guild-create | GUILD_CREATE} event** * * @see {@link https://discord.com/developers/docs/resources/guild-scheduled-event#guild-scheduled-event-object} */ guild_scheduled_events: APIGuildScheduledEvent[]; /** * The soundboard sounds in the guild * * **This field is only sent within the {@link https://discord.com/developers/docs/topics/gateway-events#guild-create | GUILD_CREATE} event** * * @see {@link https://discord.com/developers/docs/resources/soundboard#soundboard-sound-object} */ soundboard_sounds: APISoundboardSound[]; } /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#guild-update} */ export type GatewayGuildUpdateDispatch = GatewayGuildModifyDispatch; /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#guild-update} */ export type GatewayGuildUpdateDispatchData = GatewayGuildModifyDispatchData; /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#guild-delete} */ export type GatewayGuildDeleteDispatch = _DataPayload<GatewayDispatchEvents.GuildDelete, GatewayGuildDeleteDispatchData>; /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#guild-delete} */ export interface GatewayGuildDeleteDispatchData extends APIBaseGuild { /** * `true` if this guild is unavailable due to an outage * * If the field is not set, the user was removed from the guild. */ unavailable?: true; } /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#guild-ban-add} * @see {@link https://discord.com/developers/docs/topics/gateway-events#guild-ban-remove} */ export type GatewayGuildBanModifyDispatch = _DataPayload<GatewayDispatchEvents.GuildBanAdd | GatewayDispatchEvents.GuildBanRemove, GatewayGuildBanModifyDispatchData>; /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#guild-ban-add} * @see {@link https://discord.com/developers/docs/topics/gateway-events#guild-ban-remove} */ export interface GatewayGuildBanModifyDispatchData { /** * ID of the guild */ guild_id: Snowflake; /** * The banned user * * @see {@link https://discord.com/developers/docs/resources/user#user-object} */ user: APIUser; } /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#guild-ban-add} */ export type GatewayGuildBanAddDispatch = GatewayGuildBanModifyDispatch; /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#guild-ban-add} */ export type GatewayGuildBanAddDispatchData = GatewayGuildBanModifyDispatchData; /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#guild-ban-remove} */ export type GatewayGuildBanRemoveDispatch = GatewayGuildBanModifyDispatch; /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#guild-ban-remove} */ export type GatewayGuildBanRemoveDispatchData = GatewayGuildBanModifyDispatchData; /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#guild-emojis-update} */ export type GatewayGuildEmojisUpdateDispatch = _DataPayload<GatewayDispatchEvents.GuildEmojisUpdate, GatewayGuildEmojisUpdateDispatchData>; /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#guild-emojis-update} */ export interface GatewayGuildEmojisUpdateDispatchData { /** * ID of the guild */ guild_id: Snowflake; /** * Array of emojis * * @see {@link https://discord.com/developers/docs/resources/emoji#emoji-object} */ emojis: APIEmoji[]; } /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#guild-stickers-update} */ export type GatewayGuildStickersUpdateDispatch = _DataPayload<GatewayDispatchEvents.GuildStickersUpdate, GatewayGuildStickersUpdateDispatchData>; /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#guild-stickers-update} */ export interface GatewayGuildStickersUpdateDispatchData { /** * ID of the guild */ guild_id: Snowflake; /** * Array of stickers * * @see {@link https://discord.com/developers/docs/resources/sticker#sticker-object} */ stickers: APISticker[]; } /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#guild-integrations-update} */ export type GatewayGuildIntegrationsUpdateDispatch = _DataPayload<GatewayDispatchEvents.GuildIntegrationsUpdate, GatewayGuildIntegrationsUpdateDispatchData>; /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#guild-integrations-update} */ export interface GatewayGuildIntegrationsUpdateDispatchData { /** * ID of the guild whose integrations were updated */ guild_id: Snowflake; } /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#guild-member-add} */ export type GatewayGuildMemberAddDispatch = _DataPayload<GatewayDispatchEvents.GuildMemberAdd, GatewayGuildMemberAddDispatchData>; /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#guild-member-add} */ export interface GatewayGuildMemberAddDispatchData extends APIGuildMember { /** * The id of the guild */ guild_id: Snowflake; } /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#guild-member-remove} */ export type GatewayGuildMemberRemoveDispatch = _DataPayload<GatewayDispatchEvents.GuildMemberRemove, GatewayGuildMemberRemoveDispatchData>; /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#guild-member-remove} */ export interface GatewayGuildMemberRemoveDispatchData { /** * The id of the guild */ guild_id: Snowflake; /** * The user who was removed * * @see {@link https://discord.com/developers/docs/resources/user#user-object} */ user: APIUser; } /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#guild-member-update} */ export type GatewayGuildMemberUpdateDispatch = _DataPayload<GatewayDispatchEvents.GuildMemberUpdate, GatewayGuildMemberUpdateDispatchData>; /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#guild-member-update} */ export interface GatewayGuildMemberUpdateDispatchData extends _Nullable<APIGuildMemberJoined>, APIBaseGuildMember, Partial<APIBaseVoiceGuildMember>, Partial<APIFlaggedGuildMember>, Required<APIGuildMemberAvatar>, Required<APIGuildMemberUser> { /** * The id of the guild */ guild_id: Snowflake; } /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#guild-members-chunk} */ export type GatewayGuildMembersChunkDispatch = _DataPayload<GatewayDispatchEvents.GuildMembersChunk, GatewayGuildMembersChunkDispatchData>; /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#guild-members-chunk} */ export interface GatewayGuildMembersChunkDispatchData { /** * The id of the guild */ guild_id: Snowflake; /** * Set of guild members * * @see {@link https://discord.com/developers/docs/resources/guild#guild-member-object} */ members: APIGuildMember[]; /** * The chunk index in the expected chunks for this response (`0 <= chunk_index < chunk_count`) */ chunk_index: number; /** * The total number of expected chunks for this response */ chunk_count: number; /** * If passing an invalid id to `REQUEST_GUILD_MEMBERS`, it will be returned here */ not_found?: unknown[]; /** * If passing true to `REQUEST_GUILD_MEMBERS`, presences of the returned members will be here * * @see {@link https://discord.com/developers/docs/topics/gateway-events#update-presence} */ presences?: GatewayGuildMembersChunkPresence[]; /** * The nonce used in the Guild Members Request * * @see {@link https://discord.com/developers/docs/topics/gateway-events#request-guild-members} */ nonce?: string; } /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#guild-role-create} * @see {@link https://discord.com/developers/docs/topics/gateway-events#guild-role-update} */ export type GatewayGuildRoleModifyDispatch = _DataPayload<GatewayDispatchEvents.GuildRoleCreate | GatewayDispatchEvents.GuildRoleUpdate, GatewayGuildRoleModifyDispatchData>; /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#guild-role-create} * @see {@link https://discord.com/developers/docs/topics/gateway-events#guild-role-update} */ export interface GatewayGuildRoleModifyDispatchData { /** * The id of the guild */ guild_id: Snowflake; /** * The role created or updated * * @see {@link https://discord.com/developers/docs/topics/permissions#role-object} */ role: APIRole; } /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#guild-role-create} */ export type GatewayGuildRoleCreateDispatch = GatewayGuildRoleModifyDispatch; /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#guild-role-create} */ export type GatewayGuildRoleCreateDispatchData = GatewayGuildRoleModifyDispatchData; /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#guild-role-update} */ export type GatewayGuildRoleUpdateDispatch = GatewayGuildRoleModifyDispatch; /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#guild-role-update} */ export type GatewayGuildRoleUpdateDispatchData = GatewayGuildRoleModifyDispatchData; /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#guild-role-delete} */ export type GatewayGuildRoleDeleteDispatch = _DataPayload<GatewayDispatchEvents.GuildRoleDelete, GatewayGuildRoleDeleteDispatchData>; /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#guild-role-delete} */ export interface GatewayGuildRoleDeleteDispatchData { /** * The id of the guild */ guild_id: Snowflake; /** * The id of the role */ role_id: Snowflake; } /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#guild-scheduled-event-create} */ export type GatewayGuildScheduledEventCreateDispatch = _DataPayload<GatewayDispatchEvents.GuildScheduledEventCreate, GatewayGuildScheduledEventCreateDispatchData>; /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#guild-scheduled-event-create} */ export type GatewayGuildScheduledEventCreateDispatchData = APIGuildScheduledEvent; /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#guild-scheduled-event-update} */ export type GatewayGuildScheduledEventUpdateDispatch = _DataPayload<GatewayDispatchEvents.GuildScheduledEventUpdate, GatewayGuildScheduledEventUpdateDispatchData>; /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#guild-scheduled-event-update} */ export type GatewayGuildScheduledEventUpdateDispatchData = APIGuildScheduledEvent; /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#guild-scheduled-event-delete} */ export type GatewayGuildScheduledEventDeleteDispatch = _DataPayload<GatewayDispatchEvents.GuildScheduledEventDelete, GatewayGuildScheduledEventDeleteDispatchData>; /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#guild-scheduled-event-delete} */ export type GatewayGuildScheduledEventDeleteDispatchData = APIGuildScheduledEvent; /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#guild-scheduled-event-user-add} */ export type GatewayGuildScheduledEventUserAddDispatch = _DataPayload<GatewayDispatchEvents.GuildScheduledEventUserAdd, GatewayGuildScheduledEventUserAddDispatchData>; /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#guild-scheduled-event-user-add} */ export interface GatewayGuildScheduledEventUserAddDispatchData { guild_scheduled_event_id: Snowflake; user_id: Snowflake; guild_id: Snowflake; } /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#guild-scheduled-event-user-remove} */ export type GatewayGuildScheduledEventUserRemoveDispatch = _DataPayload<GatewayDispatchEvents.GuildScheduledEventUserRemove, GatewayGuildScheduledEventUserAddDispatchData>; /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#guild-scheduled-event-user-remove} */ export interface GatewayGuildScheduledEventUserRemoveDispatchData { guild_scheduled_event_id: Snowflake; user_id: Snowflake; guild_id: Snowflake; } /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#guild-soundboard-sound-create} */ export type GatewayGuildSoundboardSoundCreateDispatch = _DataPayload<GatewayDispatchEvents.GuildSoundboardSoundCreate, GatewayGuildSoundboardSoundCreateDispatchData>; /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#guild-soundboard-sound-create} */ export type GatewayGuildSoundboardSoundCreateDispatchData = APISoundboardSound; /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#guild-soundboard-sound-update} */ export type GatewayGuildSoundboardSoundUpdateDispatch = _DataPayload<GatewayDispatchEvents.GuildSoundboardSoundUpdate, GatewayGuildSoundboardSoundUpdateDispatchData>; /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#guild-soundboard-sound-update} */ export type GatewayGuildSoundboardSoundUpdateDispatchData = APISoundboardSound; /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#guild-soundboard-sound-delete} */ export type GatewayGuildSoundboardSoundDeleteDispatch = _DataPayload<GatewayDispatchEvents.GuildSoundboardSoundDelete, GatewayGuildSoundboardSoundDeleteDispatchData>; /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#guild-soundboard-sound-delete} */ export interface GatewayGuildSoundboardSoundDeleteDispatchData { /** * The id of the sound that was deleted */ sound_id: Snowflake; /** * The id of the guild the sound was in */ guild_id: Snowflake; } /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#guild-soundboard-sounds-update} */ export type GatewayGuildSoundboardSoundsUpdateDispatch = _DataPayload<GatewayDispatchEvents.GuildSoundboardSoundsUpdate, GatewayGuildSoundboardSoundsUpdateDispatchData>; /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#guild-soundboard-sounds-update} */ export interface GatewayGuildSoundboardSoundsUpdateDispatchData { /** * The guild's soundboard sounds */ soundboard_sounds: APISoundboardSound[]; /** * The id of the guild */ guild_id: Snowflake; } /** * @see {@link https://discord.com/developers/docs/events/gateway-events#soundboard-sounds} */ export type GatewaySoundboardSoundsDispatch = _DataPayload<GatewayDispatchEvents.SoundboardSounds, GatewaySoundboardSoundsDispatchData>; /** * @see {@link https://discord.com/developers/docs/events/gateway-events#soundboard-sounds} */ export interface GatewaySoundboardSoundsDispatchData { /** * The guild's soundboard sounds */ soundboard_sounds: APISoundboardSound[]; /** * The id of the guild */ guild_id: Snowflake; } /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#integration-create} */ export type GatewayIntegrationCreateDispatch = _DataPayload<GatewayDispatchEvents.IntegrationCreate, GatewayIntegrationCreateDispatchData>; /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#integration-create} */ export type GatewayIntegrationCreateDispatchData = APIGuildIntegration & { guild_id: Snowflake; }; /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#integration-update} */ export type GatewayIntegrationUpdateDispatch = _DataPayload<GatewayDispatchEvents.IntegrationUpdate, GatewayIntegrationUpdateDispatchData>; /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#integration-update} */ export type GatewayIntegrationUpdateDispatchData = APIGuildIntegration & { guild_id: Snowflake; }; /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#integration-update} */ export type GatewayIntegrationDeleteDispatch = _DataPayload<GatewayDispatchEvents.IntegrationDelete, GatewayIntegrationDeleteDispatchData>; /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#integration-delete} */ export interface GatewayIntegrationDeleteDispatchData { /** * Integration id */ id: Snowflake; /** * ID of the guild */ guild_id: Snowflake; /** * ID of the bot/OAuth2 application for this Discord integration */ application_id?: Snowflake; } /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#interaction-create} */ export type GatewayInteractionCreateDispatch = _DataPayload<GatewayDispatchEvents.InteractionCreate, GatewayInteractionCreateDispatchData>; /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#interaction-create} */ export type GatewayInteractionCreateDispatchData = APIInteraction; /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#invite-create} */ export type GatewayInviteCreateDispatch = _DataPayload<GatewayDispatchEvents.InviteCreate, GatewayInviteCreateDispatchData>; /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#invite-create} */ export interface GatewayInviteCreateDispatchData { /** * The channel the invite is for */ channel_id: Snowflake; /** * The unique invite code * * @see {@link https://discord.com/developers/docs/resources/invite#invite-object} */ code: string; /** * The time at which the invite was created */ created_at: number; /** * The guild of the invite */ guild_id?: Snowflake; /** * The user that created the invite * * @see {@link https://discord.com/developers/docs/resources/user#user-object} */ inviter?: APIUser; /** * How long the invite is valid for (in seconds) */ max_age: number; /** * The maximum number of times the invite can be used */ max_uses: number; /** * The type of target for this voice channel invite * * @see {@link https://discord.com/developers/docs/resources/invite#invite-object-invite-target-types} */ target_type?: InviteTargetType; /** * The user whose stream to display for this voice channel stream invite * * @see {@link https://discord.com/developers/docs/resources/user#user-object} */ target_user?: APIUser; /** * The embedded application to open for this voice channel embedded application invite */ target_application?: Partial<APIApplication>; /** * Whether or not the invite is temporary (invited users will be kicked on disconnect unless they're assigned a role) */ temporary: boolean; /** * How many times the invite has been used (always will be `0`) */ uses: 0; } /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#invite-delete} */ export type GatewayInviteDeleteDispatch = _DataPayload<GatewayDispatchEvents.InviteDelete, GatewayInviteDeleteDispatchData>; /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#invite-delete} */ export interface GatewayInviteDeleteDispatchData { /** * The channel of the invite */ channel_id: Snowflake; /** * The guild of the invite */ guild_id?: Snowflake; /** * The unique invite code * * @see {@link https://discord.com/developers/docs/resources/invite#invite-object} */ code: string; } /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#message-create} */ export type GatewayMessageCreateDispatch = _DataPayload<GatewayDispatchEvents.MessageCreate, GatewayMessageCreateDispatchData>; /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#message-create} */ export interface GatewayMessageCreateDispatchData extends GatewayMessageEventExtraFields, APIBaseMessage { } /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#message-update} */ export type GatewayMessageUpdateDispatch = _DataPayload<GatewayDispatchEvents.MessageUpdate, GatewayMessageUpdateDispatchData>; /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#message-update} */ export interface GatewayMessageUpdateDispatchData extends GatewayMessageEventExtraFields, APIBaseMessage { } export interface APIGuildMemberNoUser extends APIBaseGuildMember, APIFlaggedGuildMember, APIGuildMemberAvatar, APIGuildMemberJoined, APIBaseVoiceGuildMember { } export interface APIUserWithMember extends APIUser { /** * The `member` field is only present in `MESSAGE_CREATE` and `MESSAGE_UPDATE` events * from text-based guild channels * * @see {@link https://discord.com/developers/docs/resources/guild#guild-member-object} */ member?: APIGuildMemberNoUser; } /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#message-create-message-create-extra-fields} */ export interface GatewayMessageEventExtraFields { /** * ID of the guild the message was sent in */ guild_id?: Snowflake; /** * Member properties for this message's author * * The member object exists in `MESSAGE_CREATE` and `MESSAGE_UPDATE` events * from text-based guild channels * * @see {@link https://discord.com/developers/docs/resources/guild#guild-member-object} */ member?: APIGuildMemberNoUser; /** * Users specifically mentioned in the message * * @see {@link https://discord.com/developers/docs/resources/user#user-object} */ mentions: APIUserWithMember[]; } /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#message-delete} */ export type GatewayMessageDeleteDispatch = _DataPayload<GatewayDispatchEvents.MessageDelete, GatewayMessageDeleteDispatchData>; /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#message-delete} */ export interface GatewayMessageDeleteDispatchData { /** * The id of the message */ id: Snowflake; /** * The id of the channel */ channel_id: Snowflake; /** * The id of the guild */ guild_id?: Snowflake; } /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#message-delete-bulk} */ export type GatewayMessageDeleteBulkDispatch = _DataPayload<GatewayDispatchEvents.MessageDeleteBulk, GatewayMessageDeleteBulkDispatchData>; /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#message-delete-bulk} */ export interface GatewayMessageDeleteBulkDispatchData { /** * The ids of the messages */ ids: Snowflake[]; /** * The id of the channel */ channel_id: Snowflake; /** * The id of the guild */ guild_id?: Snowflake; } /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#message-reaction-add} */ export interface GatewayMessageReactionAddDispatchData extends GatewayMessageReactionRemoveDispatchData { /** * The member who reacted if this happened in a guild * * @see {@link https://discord.com/developers/docs/resources/guild#guild-member-object} */ member?: APIGuildMember; /** * The id of the user that posted the message that was reacted to */ message_author_id?: Snowflake; /** * Colors used for super-reaction animation in "#rrggbb" format */ burst_colors?: string[]; } /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#message-reaction-add} */ export type GatewayMessageReactionAddDispatch = _DataPayload<GatewayDispatchEvents.MessageReactionAdd, GatewayMessageReactionAddDispatchData>; /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#message-reaction-remove} */ export interface GatewayMessageReactionRemoveDispatchData { /** * The id of the user */ user_id: Snowflake; /** * The id of the channel */ channel_id: Snowflake; /** * The id of the message */ message_id: Snowflake; /** * The id of the guild */ guild_id?: Snowflake; /** * The emoji used to react * * @see {@link https://discord.com/developers/docs/resources/emoji#emoji-object} */ emoji: APIEmoji; /** * True if this is a super-reaction */ burst: boolean; /** * The type of reaction */ type: ReactionType; } /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#message-reaction-remove} */ export type GatewayMessageReactionRemoveDispatch = _DataPayload<GatewayDispatchEvents.MessageReactionRemove, GatewayMessageReactionRemoveDispatchData>; /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#message-reaction-remove-all} */ export type GatewayMessageReactionRemoveAllDispatch = _DataPayload<GatewayDispatchEvents.MessageReactionRemoveAll, GatewayMessageReactionRemoveAllDispatchData>; /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#message-reaction-remove-all} */ export type GatewayMessageReactionRemoveAllDispatchData = GatewayMessageReactionRemoveData; /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#message-reaction-remove-emoji} */ export type GatewayMessageReactionRemoveEmojiDispatch = _DataPayload<GatewayDispatchEvents.MessageReactionRemoveEmoji, GatewayMessageReactionRemoveEmojiDispatchData>; /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#message-reaction-remove-emoji} */ export interface GatewayMessageReactionRemoveEmojiDispatchData extends GatewayMessageReactionRemoveData { /** * The emoji that was removed */ emoji: APIEmoji; } /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#presence-update} */ export type GatewayPresenceUpdateDispatch = _DataPayload<GatewayDispatchEvents.PresenceUpdate, GatewayPresenceUpdateDispatchData>; /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#presence-update} */ export type GatewayPresenceUpdateDispatchData = GatewayPresenceUpdate; /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#stage-instance-create} */ export type GatewayStageInstanceCreateDispatch = _DataPayload<GatewayDispatchEvents.StageInstanceCreate, GatewayStageInstanceCreateDispatchData>; /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#stage-instance-create} */ export type GatewayStageInstanceCreateDispatchData = APIStageInstance; /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#stage-instance-delete} */ export type GatewayStageInstanceDeleteDispatch = _DataPayload<GatewayDispatchEvents.StageInstanceDelete, GatewayStageInstanceDeleteDispatchData>; /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#stage-instance-delete} */ export type GatewayStageInstanceDeleteDispatchData = APIStageInstance; /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#stage-instance-update} */ export type GatewayStageInstanceUpdateDispatch = _DataPayload<GatewayDispatchEvents.StageInstanceUpdate, GatewayStageInstanceUpdateDispatchData>; /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#stage-instance-update} */ export type GatewayStageInstanceUpdateDispatchData = APIStageInstance; /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#thread-list-sync} */ export type GatewayThreadListSyncDispatch = _DataPayload<GatewayDispatchEvents.ThreadListSync, GatewayThreadListSyncDispatchData>; /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#thread-list-sync} */ export type GatewayThreadListSyncDispatchData = GatewayThreadListSync; /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#thread-members-update} */ export type GatewayThreadMembersUpdateDispatch = _DataPayload<GatewayDispatchEvents.ThreadMembersUpdate, GatewayThreadMembersUpdateDispatchData>; /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#thread-members-update} */ export type GatewayThreadMembersUpdateDispatchData = RawGatewayThreadMembersUpdate; /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#thread-member-update} */ export type GatewayThreadMemberUpdateDispatch = _DataPayload<GatewayDispatchEvents.ThreadMemberUpdate, GatewayThreadMemberUpdateDispatchData>; /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#thread-member-update} */ export type GatewayThreadMemberUpdateDispatchData = APIThreadMember & { guild_id: Snowflake; }; /** * @deprecated This type doesn't accurately reflect the Discord API. * Use {@link GatewayThreadCreateDispatch}, * {@link GatewayThreadUpdateDispatch}, or * {@link GatewayThreadDeleteDispatch} instead. * @see {@link https://discord.com/developers/docs/topics/gateway-events#thread-create} * @see {@link https://discord.com/developers/docs/topics/gateway-events#thread-update} * @see {@link https://discord.com/developers/docs/topics/gateway-events#thread-delete} */ export type GatewayThreadModifyDispatch = _DataPayload<GatewayDispatchEvents.ThreadCreate | GatewayDispatchEvents.ThreadDelete | GatewayDispatchEvents.ThreadUpdate, APIThreadChannel>; /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#thread-create} */ export type GatewayThreadCreateDispatch = _DataPayload<GatewayDispatchEvents.ThreadCreate, GatewayThreadCreateDispatchData>; /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#thread-create} */ export interface GatewayThreadCreateDispatchData extends APIThreadChannel { /** * Whether the thread is newly created or not. */ newly_created?: true; } /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#thread-update} */ export type GatewayThreadUpdateDispatch = _DataPayload<GatewayDispatchEvents.ThreadUpdate, GatewayThreadUpdateDispatchData>; /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#thread-update} */ export type GatewayThreadUpdateDispatchData = APIThreadChannel; /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#thread-delete} */ export type GatewayThreadDeleteDispatch = _DataPayload<GatewayDispatchEvents.ThreadDelete, GatewayThreadDeleteDispatchData>; /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#thread-delete} */ export interface GatewayThreadDeleteDispatchData { /** * The id of the channel */ id: Snowflake; /** * The id of the guild */ guild_id: Snowflake; /** * The id of the parent channel of the thread */ parent_id: Snowflake; /** * The type of the channel * * @see {@link https://discord.com/developers/docs/resources/channel#channel-object-channel-types} */ type: ChannelType; } /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#typing-start} */ export type GatewayTypingStartDispatch = _DataPayload<GatewayDispatchEvents.TypingStart, GatewayTypingStartDispatchData>; /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#typing-start} */ export interface GatewayTypingStartDispatchData { /** * The id of the channel */ channel_id: Snowflake; /** * The id of the guild */ guild_id?: Snowflake; /** * The id of the user */ user_id: Snowflake; /** * Unix time (in seconds) of when the user started typing */ timestamp: number; /** * The member who started typing if this happened in a guild * * @see {@link https://discord.com/developers/docs/resources/guild#guild-member-object} */ member?: APIGuildMember; } /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#user-update} */ export type GatewayUserUpdateDispatch = _DataPayload<GatewayDispatchEvents.UserUpdate, GatewayUserUpdateDispatchData>; /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#user-update} */ export type GatewayUserUpdateDispatchData = APIUser; /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#voice-channel-effect-send} */ export type GatewayVoiceChannelEffectSendDispatch = _DataPayload<GatewayDispatchEvents.VoiceChannelEffectSend, GatewayVoiceChannelEffectSendDispatchData>; /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#voice-channel-effect-send} */ export interface GatewayVoiceChannelEffectSendDispatchData { /** * ID of the channel the effect was sent in */ channel_id: Snowflake; /** * ID of the guild the effect was sent in */ guild_id: Snowflake; /** * ID of the user who sent the effect */ user_id: Snowflake; /** * The emoji sent, for emoji reaction and soundboard effects */ emoji?: APIEmoji | null; /** * The type of emoji animation, for emoji reaction and soundboard effects */ animation_type?: VoiceChannelEffectSendAnimationType | null; /** * The ID of the emoji animation, for emoji reaction and soundboard effects */ animation_id?: number; /** * The ID of the soundboard sound, for soundboard effects */ sound_id?: Snowflake | number; /** * The volume of the soundboard sound, from 0 to 1, for soundboard effects */ sound_volume?: number; } /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#voice-channel-effect-send-animation-types} */ export declare enum VoiceChannelEffectSendAnimationType { /** * A fun animation, sent by a Nitro subscriber */ Premium = 0, /** * The standard animation */ Basic = 1 } /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#voice-state-update} */ export type GatewayVoiceStateUpdateDispatch = _DataPayload<GatewayDispatchEvents.VoiceStateUpdate, GatewayVoiceStateUpdateDispatchData>; /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#voice-state-update} */ export type GatewayVoiceStateUpdateDispatchData = APIVoiceState; /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#voice-server-update} */ export type GatewayVoiceServerUpdateDispatch = _DataPayload<GatewayDispatchEvents.VoiceServerUpdate, GatewayVoiceServerUpdateDispatchData>; /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#voice-server-update} */ export interface GatewayVoiceServerUpdateDispatchData { /** * Voice connection token */ token: string; /** * The guild this voice server update is for */ guild_id: Snowflake; /** * The voice server host * * A `null` endpoint means that the voice server allocated has gone away and is trying to be reallocated. * You should attempt to disconnect from the currently connected voice server, and not attempt to reconnect * until a new voice server is allocated */ endpoint: string | null; } /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#webhooks-update} */ export type GatewayWebhooksUpdateDispatch = _DataPayload<GatewayDispatchEvents.WebhooksUpdate, GatewayWebhooksUpdateDispatchData>; /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#webhooks-update} */ export interface GatewayWebhooksUpdateDispatchData { /** * The id of the guild */ guild_id: Snowflake; /** * The id of the channel */ channel_id: Snowflake; } /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#guild-audit-log-entry-create} */ export type GatewayGuildAuditLogEntryCreateDispatch = _DataPayload<GatewayDispatchEvents.GuildAuditLogEntryCreate, GatewayGuildAuditLogEntryCreateDispatchData>; /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#guild-audit-log-entry-create} */ export interface GatewayGuildAuditLogEntryCreateDispatchData extends APIAuditLogEntry { /** * ID of the guild */ guild_id: Snowflake; } /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#message-poll-vote-add} */ export type GatewayMessagePollVoteAddDispatch = _DataPayload<GatewayDispatchEvents.MessagePollVoteAdd, GatewayMessagePollVoteDispatchData>; /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#message-poll-vote-remove} */ export type GatewayMessagePollVoteRemoveDispatch = _DataPayload<GatewayDispatchEvents.MessagePollVoteRemove, GatewayMessagePollVoteDispatchData>; /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#message-poll-vote-add} * @see {@link https://discord.com/developers/docs/topics/gateway-events#message-poll-vote-remove} */ export interface GatewayMessagePollVoteDispatchData { /** * ID of the user */ user_id: Snowflake; /** * ID of the channel */ channel_id: Snowflake; /** * ID of the message */ message_id: Snowflake; /** * ID of the guild */ guild_id?: Snowflake; /** * ID of the answer */ answer_id: number; } /** * @see {@link https://discord.com/developers/docs/topics/gateway#sending-heartbeats} */ export interface GatewayHeartbeat { op: GatewayOpcodes.Heartbeat; d: GatewayHeartbeatData; } /** * @see {@link https://discord.com/developers/docs/topics/gateway#sending-heartbeats} */ export type GatewayHeartbeatData = number | null; /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#identify} */ export interface GatewayIdentify { op: GatewayOpcodes.Identify; d: GatewayIdentifyData; } /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#identify} */ export interface GatewayIdentifyData { /** * Authentication token */ token: string; /** * Connection properties * * @see {@link https://discord.com/developers/docs/topics/gateway-events#identify-identify-connection-properties} */ properties: GatewayIdentifyProperties; /** * Whether this connection supports compression of packets * * @defaultValue `false` */ compress?: boolean; /** * Value between 50 and 250, total number of members where the gateway will stop sending * offline members in the guild member list * * @defaultValue `50` */ large_threshold?: number; /** * Used for Guild Sharding * * @see {@link https://discord.com/developers/docs/topics/gateway#sharding} */ shard?: [shard_id: number, shard_count: number]; /** * Presence structure for initial presence information * * @see {@link https://discord.com/developers/docs/topics/gateway-events#update-presence} */ presence?: GatewayPresenceUpdateData; /** * The Gateway Intents you wish to receive * * @see {@link https://discord.com/developers/docs/topics/gateway#gateway-intents} */ intents: number; } /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#identify-identify-connection-properties} */ export interface GatewayIdentifyProperties { /** * Your operating system */ os: string; /** * Your library name */ browser: string; /** * Your library name */ device: string; } /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#resume} */ export interface GatewayResume { op: GatewayOpcodes.Resume; d: GatewayResumeData; } /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#resume} */ export interface GatewayResumeData { /** * Session token */ token: string; /** * Session id */ session_id: string; /** * Last sequence number received */ seq: number; } /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#request-guild-members} */ export interface GatewayRequestGuildMembers { op: GatewayOpcodes.RequestGuildMembers; d: GatewayRequestGuildMembersData; } /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#request-guild-members} */ export interface GatewayRequestGuildMembersDataBase { /** * ID of the guild to get members for */ guild_id: Snowflake; /** * Used to specify if we want the presences of the matched members */ presences?: boolean; /** * Nonce to identify the Guild Members Chunk response * * Nonce can only be up to 32 bytes. If you send an invalid nonce it will be ignored and the reply member_chunk(s) will not have a `nonce` set. * * @see {@link https://discord.com/developers/docs/topics/gateway-events#guild-members-chunk} */ nonce?: string; } /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#request-guild-members} */ export interface GatewayRequestGuildMembersDataWithUserIds extends GatewayRequestGuildMembersDataBase { /** * Used to specify which users you wish to fetch */ user_ids: Snowflake | Snowflake[]; } /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#request-guild-members} */ export interface GatewayRequestGuildMembersDataWithQuery extends GatewayRequestGuildMembersDataBase { /** * String that username starts with, or an empty string to return all members */ query: string; /** * Maximum number of members to send matching the `query`; * a limit of `0` can be used with an empty string `query` to return all members */ limit: number; } /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#request-guild-members} */ export type GatewayRequestGuildMembersData = GatewayRequestGuildMembersDataWithQuery | GatewayRequestGuildMembersDataWithUserIds; /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#request-soundboard-sounds} */ export interface GatewayRequestSoundboardSounds { op: GatewayOpcodes.RequestSoundboardSounds; d: GatewayRequestSoundboardSoundsData; } /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#request-soundboard-sounds} */ export interface GatewayRequestSoundboardSoundsData { /** * The ids of the guilds to get soundboard sounds for */ guild_ids: Snowflake[]; } /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#update-voice-state} */ export interface GatewayVoiceStateUpdate { op: GatewayOpcodes.VoiceStateUpdate; d: GatewayVoiceStateUpdateData; } /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#update-voice-state} */ export interface GatewayVoiceStateUpdateData { /** * ID of the guild */ guild_id: Snowflake; /** * ID of the voice channel client wants to join (`null` if disconnecting) */ channel_id: Snowflake | null; /** * Is the client muted */ self_mute: boolean; /** * Is the client deafened */ self_deaf: boolean; } /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#update-presence} */ export interface GatewayUpdatePresence { op: GatewayOpcodes.PresenceUpdate; d: GatewayPresenceUpdateData; } /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#update-presence-gateway-presence-update-structure} */ export interface GatewayPresenceUpdateData { /** * Unix time (in milliseconds) of when the client went idle, or `null` if the client is not idle */ since: number | null; /** * The user's activities * * @see {@link https://discord.com/developers/docs/topics/gateway-events#activity-object} */ activities: GatewayActivityUpdateData[]; /** * The user's new status * * @see {@link https://discord.com/developers/docs/topics/gateway-events#update-presence-status-types} */ status: PresenceUpdateStatus; /** * Whether or not the client is afk */ afk: boolean; } /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#activity-object-activity-structure} */ export type GatewayActivityUpdateData = Pick<GatewayActivity, 'name' | 'state' | 'type' | 'url'>; export interface _BaseBasePayload { /** * Opcode for the payload */ op: GatewayOpcodes; /** * Event data */ d?: unknown; } export interface _BasePayload { /** * Sequence number, used for resuming sessions and heartbeats */ s: number; /** * The event name for this payload */ t?: string; } export interface _NonDispatchPayload extends _BaseBasePayload { t: null; s: null; } export interface _DataPayload<Event extends GatewayDispatchEvents, D = unknown> extends _BasePayload { op: GatewayOpcodes.Dispatch; t: Event; d: D; } export type GatewayMessageReactionData<E extends GatewayDispatchEvents, O extends string = never> = _DataPayload<E, Omit<GatewayMessageReactionAddDispatchData, O>>; export interface GatewayMessageReactionRemoveData { /** * The id of the channel */ channel_id: Snowflake; /** * The id of the message */ message_id: Snowflake; /** * The id of the guild */ guild_id?: Snowflake; } //# sourceMappingURL=v10.d.ts.map node_modules/discord-api-types/gateway/v6.d.ts.map 0000664 00000025532 15114741631 0016137 0 ustar 00 {"version":3,"file":"v6.d.ts","sourceRoot":"","sources":["v6.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EACX,UAAU,EACV,QAAQ,EACR,QAAQ,EACR,cAAc,EACd,UAAU,EACV,OAAO,EACP,mBAAmB,EACnB,OAAO,EACP,eAAe,EACf,qBAAqB,IAAI,wBAAwB,EACjD,iBAAiB,EACjB,oBAAoB,EACpB,oBAAoB,EACpB,MAAM,sBAAsB,CAAC;AAE9B,mBAAmB,UAAU,CAAC;AAE9B;;GAEG;AACH,eAAO,MAAM,cAAc,MAAM,CAAC;AAElC;;;;GAIG;AACH,oBAAY,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,CACD,CACD,CAAC;AAEF;;GAEG;AACH,UAAU,yBAAyB;IAClC,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,MAAM,CAAC;CAClB"} node_modules/discord-api-types/gateway/v6.d.ts 0000664 00000062316 15114741631 0015364 0 ustar 00 /** * Types extracted from https://discord.com/developers/docs/topics/gateway */ import type { APIChannel, APIEmoji, APIGuild, APIGuildMember, APIMessage, APIRole, APIUnavailableGuild, APIUser, GatewayActivity, GatewayPresenceUpdate as RawGatewayPresenceUpdate, GatewayVoiceState, InviteTargetUserType, PresenceUpdateStatus } from '../payloads/v6/index'; export type * from './common'; /** * @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8. */ export declare const GatewayVersion = "6"; /** * https://discord.com/developers/docs/topics/opcodes-and-status-codes#gateway-gateway-opcodes * * @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8. */ export declare enum GatewayOPCodes { Dispatch = 0, Heartbeat = 1, Identify = 2, PresenceUpdate = 3, VoiceStateUpdate = 4, Resume = 6, Reconnect = 7, RequestGuildMembers = 8, InvalidSession = 9, Hello = 10, HeartbeatAck = 11 } /** * https://discord.com/developers/docs/topics/opcodes-and-status-codes#gateway-gateway-close-event-codes * * @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8. */ export declare enum GatewayCloseCodes { UnknownError = 4000, UnknownOpCode = 4001, DecodeError = 4002, NotAuthenticated = 4003, AuthenticationFailed = 4004, AlreadyAuthenticated = 4005, InvalidSeq = 4007, RateLimited = 4008, SessionTimedOut = 4009, InvalidShard = 4010, ShardingRequired = 4011, InvalidAPIVersion = 4012, InvalidIntents = 4013, DisallowedIntents = 4014 } /** * https://discord.com/developers/docs/topics/opcodes-and-status-codes#voice-voice-opcodes * * @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8. */ export declare enum VoiceOPCodes { Identify = 0, SelectProtocol = 1, Ready = 2, Heartbeat = 3, SessionDescription = 4, Speaking = 5, HeartbeatAck = 6, Resume = 7, Hello = 8, Resumed = 9, ClientDisconnect = 13 } /** * https://discord.com/developers/docs/topics/opcodes-and-status-codes#voice-voice-close-event-codes * * @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8. */ export declare enum VoiceCloseCodes { UnknownOpCode = 4001, NotAuthenticated = 4003, AuthenticationFailed = 4004, AlreadyAuthenticated = 4005, SessionNoLongerValid = 4006, SessionTimeout = 4009, ServerNotFound = 4011, UnknownProtocol = 4012, Disconnected = 4014, VoiceServerCrashed = 4015, UnknownEncryptionMode = 4016 } /** * https://discord.com/developers/docs/topics/gateway#list-of-intents * * @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8. */ export declare enum GatewayIntentBits { GUILDS = 1, GUILD_MEMBERS = 2, GUILD_BANS = 4, GUILD_EMOJIS = 8, GUILD_INTEGRATIONS = 16, GUILD_WEBHOOKS = 32, GUILD_INVITES = 64, GUILD_VOICE_STATES = 128, GUILD_PRESENCES = 256, GUILD_MESSAGES = 512, GUILD_MESSAGE_REACTIONS = 1024, GUILD_MESSAGE_TYPING = 2048, DIRECT_MESSAGES = 4096, DIRECT_MESSAGE_REACTIONS = 8192, DIRECT_MESSAGE_TYPING = 16384 } /** * https://discord.com/developers/docs/topics/gateway#commands-and-events-gateway-events * * @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8. */ export declare enum GatewayDispatchEvents { Ready = "READY", Resumed = "RESUMED", ChannelCreate = "CHANNEL_CREATE", ChannelUpdate = "CHANNEL_UPDATE", ChannelDelete = "CHANNEL_DELETE", ChannelPinsUpdate = "CHANNEL_PINS_UPDATE", GuildCreate = "GUILD_CREATE", GuildUpdate = "GUILD_UPDATE", GuildDelete = "GUILD_DELETE", GuildBanAdd = "GUILD_BAN_ADD", GuildBanRemove = "GUILD_BAN_REMOVE", GuildEmojisUpdate = "GUILD_EMOJIS_UPDATE", GuildIntegrationsUpdate = "GUILD_INTEGRATIONS_UPDATE", GuildMemberAdd = "GUILD_MEMBER_ADD", GuildMemberRemove = "GUILD_MEMBER_REMOVE", GuildMemberUpdate = "GUILD_MEMBER_UPDATE", GuildMembersChunk = "GUILD_MEMBERS_CHUNK", GuildRoleCreate = "GUILD_ROLE_CREATE", GuildRoleUpdate = "GUILD_ROLE_UPDATE", GuildRoleDelete = "GUILD_ROLE_DELETE", InviteCreate = "INVITE_CREATE", InviteDelete = "INVITE_DELETE", MessageCreate = "MESSAGE_CREATE", MessageUpdate = "MESSAGE_UPDATE", MessageDelete = "MESSAGE_DELETE", MessageDeleteBulk = "MESSAGE_DELETE_BULK", MessageReactionAdd = "MESSAGE_REACTION_ADD", MessageReactionRemove = "MESSAGE_REACTION_REMOVE", MessageReactionRemoveAll = "MESSAGE_REACTION_REMOVE_ALL", MessageReactionRemoveEmoji = "MESSAGE_REACTION_REMOVE_EMOJI", PresenceUpdate = "PRESENCE_UPDATE", TypingStart = "TYPING_START", UserUpdate = "USER_UPDATE", VoiceStateUpdate = "VOICE_STATE_UPDATE", VoiceServerUpdate = "VOICE_SERVER_UPDATE", WebhooksUpdate = "WEBHOOKS_UPDATE" } /** * @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8. */ export type GatewaySendPayload = GatewayHeartbeat | GatewayIdentify | GatewayRequestGuildMembers | GatewayResume | GatewayUpdatePresence | GatewayVoiceStateUpdate; /** * @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8. */ export type GatewayReceivePayload = GatewayDispatchPayload | GatewayHeartbeatAck | GatewayHeartbeatRequest | GatewayHello | GatewayInvalidSession | GatewayReconnect; /** * @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8. */ export type GatewayDispatchPayload = GatewayChannelModifyDispatch | GatewayChannelPinsUpdateDispatch | GatewayGuildBanModifyDispatch | GatewayGuildDeleteDispatch | GatewayGuildEmojisUpdateDispatch | GatewayGuildIntegrationsUpdateDispatch | GatewayGuildMemberAddDispatch | GatewayGuildMemberRemoveDispatch | GatewayGuildMembersChunkDispatch | GatewayGuildMemberUpdateDispatch | GatewayGuildModifyDispatch | GatewayGuildRoleDeleteDispatch | GatewayGuildRoleModifyDispatch | GatewayInviteCreateDispatch | GatewayInviteDeleteDispatch | GatewayMessageCreateDispatch | GatewayMessageDeleteBulkDispatch | GatewayMessageDeleteDispatch | GatewayMessageReactionAddDispatch | GatewayMessageReactionRemoveAllDispatch | GatewayMessageReactionRemoveDispatch | GatewayMessageReactionRemoveEmojiDispatch | GatewayMessageUpdateDispatch | GatewayPresenceUpdateDispatch | GatewayReadyDispatch | GatewayResumedDispatch | GatewayTypingStartDispatch | GatewayUserUpdateDispatch | GatewayVoiceServerUpdateDispatch | GatewayVoiceStateUpdateDispatch | GatewayWebhooksUpdateDispatch; /** * https://discord.com/developers/docs/topics/gateway#hello * * @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8. */ export interface GatewayHello extends NonDispatchPayload { op: GatewayOPCodes.Hello; d: { heartbeat_interval: number; }; } /** * https://discord.com/developers/docs/topics/gateway#heartbeating * * @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8. */ export interface GatewayHeartbeatRequest extends NonDispatchPayload { op: GatewayOPCodes.Heartbeat; d: never; } /** * https://discord.com/developers/docs/topics/gateway#heartbeating-example-gateway-heartbeat-ack * * @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8. */ export interface GatewayHeartbeatAck extends NonDispatchPayload { op: GatewayOPCodes.HeartbeatAck; d: never; } /** * https://discord.com/developers/docs/topics/gateway#invalid-session * * @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8. */ export interface GatewayInvalidSession extends NonDispatchPayload { op: GatewayOPCodes.InvalidSession; d: boolean; } /** * https://discord.com/developers/docs/topics/gateway#reconnect * * @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8. */ export interface GatewayReconnect extends NonDispatchPayload { op: GatewayOPCodes.Reconnect; d: never; } /** * https://discord.com/developers/docs/topics/gateway#ready * * @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8. */ export type GatewayReadyDispatch = DataPayload<GatewayDispatchEvents.Ready, { v: number; user: APIUser; session_id: string; private_channels: []; guilds: APIUnavailableGuild[]; shard?: [number, number]; }>; /** * https://discord.com/developers/docs/topics/gateway#resumed * * @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8. */ export type GatewayResumedDispatch = DataPayload<GatewayDispatchEvents.Resumed, never>; /** * https://discord.com/developers/docs/topics/gateway#channel-create * https://discord.com/developers/docs/topics/gateway#channel-update * https://discord.com/developers/docs/topics/gateway#channel-delete * * @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8. */ export type GatewayChannelModifyDispatch = DataPayload<GatewayDispatchEvents.ChannelCreate | GatewayDispatchEvents.ChannelDelete | GatewayDispatchEvents.ChannelUpdate, APIChannel>; /** * @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8. */ export type GatewayChannelCreateDispatch = GatewayChannelModifyDispatch; /** * @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8. */ export type GatewayChannelUpdateDispatch = GatewayChannelModifyDispatch; /** * @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8. */ export type GatewayChannelDeleteDispatch = GatewayChannelModifyDispatch; /** * https://discord.com/developers/docs/topics/gateway#channel-pins-update * * @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8. */ export type GatewayChannelPinsUpdateDispatch = DataPayload<GatewayDispatchEvents.ChannelPinsUpdate, { guild_id?: string; channel_id: string; last_pin_timestamp?: string; }>; /** * https://discord.com/developers/docs/topics/gateway#guild-create * https://discord.com/developers/docs/topics/gateway#guild-update * * @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8. */ export type GatewayGuildModifyDispatch = DataPayload<GatewayDispatchEvents.GuildCreate | GatewayDispatchEvents.GuildUpdate, APIGuild>; /** * @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8. */ export type GatewayGuildCreateDispatch = GatewayGuildModifyDispatch; /** * @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8. */ export type GatewayGuildUpdateDispatch = GatewayGuildModifyDispatch; /** * https://discord.com/developers/docs/topics/gateway#guild-delete * * @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8. */ export type GatewayGuildDeleteDispatch = DataPayload<GatewayDispatchEvents.GuildDelete, APIUnavailableGuild>; /** * https://discord.com/developers/docs/topics/gateway#guild-ban-add * https://discord.com/developers/docs/topics/gateway#guild-ban-remove * * @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8. */ export type GatewayGuildBanModifyDispatch = DataPayload<GatewayDispatchEvents.GuildBanAdd | GatewayDispatchEvents.GuildBanRemove, { guild_id: string; user: APIUser; }>; /** * @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8. */ export type GatewayGuildBanAddDispatch = GatewayGuildBanModifyDispatch; /** * @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8. */ export type GatewayGuildBanRemoveDispatch = GatewayGuildBanModifyDispatch; /** * https://discord.com/developers/docs/topics/gateway#guild-emojis-update * * @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8. */ export type GatewayGuildEmojisUpdateDispatch = DataPayload<GatewayDispatchEvents.GuildEmojisUpdate, { guild_id: string; emojis: APIEmoji[]; }>; /** * https://discord.com/developers/docs/topics/gateway#guild-integrations-update * * @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8. */ export type GatewayGuildIntegrationsUpdateDispatch = DataPayload<GatewayDispatchEvents.GuildIntegrationsUpdate, { guild_id: string; }>; /** * https://discord.com/developers/docs/topics/gateway#guild-member-add * * @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8. */ export type GatewayGuildMemberAddDispatch = DataPayload<GatewayDispatchEvents.GuildMemberAdd, APIGuildMember & { guild_id: string; }>; /** * https://discord.com/developers/docs/topics/gateway#guild-member-remove * * @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8. */ export type GatewayGuildMemberRemoveDispatch = DataPayload<GatewayDispatchEvents.GuildMemberRemove, { guild_id: string; user: APIUser; }>; /** * https://discord.com/developers/docs/topics/gateway#guild-member-update * * @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8. */ export type GatewayGuildMemberUpdateDispatch = DataPayload<GatewayDispatchEvents.GuildMemberUpdate, Omit<APIGuildMember, 'deaf' | 'mute'> & { guild_id: string; }>; /** * https://discord.com/developers/docs/topics/gateway#guild-members-chunk * * @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8. */ export type GatewayGuildMembersChunkDispatch = DataPayload<GatewayDispatchEvents.GuildMembersChunk, { guild_id: string; members: APIGuildMember[]; chunk_index?: number; chunk_count?: number; not_found?: unknown[]; presences?: RawGatewayPresenceUpdate[]; nonce?: string; }>; /** * https://discord.com/developers/docs/topics/gateway#guild-role-create * https://discord.com/developers/docs/topics/gateway#guild-role-update * * @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8. */ export type GatewayGuildRoleModifyDispatch = DataPayload<GatewayDispatchEvents.GuildRoleCreate | GatewayDispatchEvents.GuildRoleUpdate, { guild_id: string; role: APIRole; }>; /** * @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8. */ export type GatewayGuildRoleCreateDispatch = GatewayGuildRoleModifyDispatch; /** * @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8. */ export type GatewayGuildRoleUpdateDispatch = GatewayGuildRoleModifyDispatch; /** * https://discord.com/developers/docs/topics/gateway#guild-role-delete * * @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8. */ export type GatewayGuildRoleDeleteDispatch = DataPayload<GatewayDispatchEvents.GuildRoleDelete, { guild_id: string; role_id: string; }>; /** * https://discord.com/developers/docs/topics/gateway#invite-create * * @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8. */ export type GatewayInviteCreateDispatch = DataPayload<GatewayDispatchEvents.InviteCreate, { channel_id: string; code: string; created_at: number; guild_id?: string; inviter?: APIUser; max_age: number; max_uses: number; target_user?: APIUser; target_user_type?: InviteTargetUserType; temporary: boolean; uses: 0; }>; /** * https://discord.com/developers/docs/topics/gateway#invite-delete * * @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8. */ export type GatewayInviteDeleteDispatch = DataPayload<GatewayDispatchEvents.InviteDelete, { channel_id: string; guild_id?: string; code: string; }>; /** * https://discord.com/developers/docs/topics/gateway#message-create * * @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8. */ export type GatewayMessageCreateDispatch = DataPayload<GatewayDispatchEvents.MessageCreate, APIMessage>; /** * https://discord.com/developers/docs/topics/gateway#message-update * * @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8. */ export type GatewayMessageUpdateDispatch = DataPayload<GatewayDispatchEvents.MessageUpdate, Partial<APIMessage> & { id: string; channel_id: string; }>; /** * https://discord.com/developers/docs/topics/gateway#message-delete * * @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8. */ export type GatewayMessageDeleteDispatch = DataPayload<GatewayDispatchEvents.MessageDelete, { id: string; channel_id: string; guild_id?: string; }>; /** * https://discord.com/developers/docs/topics/gateway#message-delete-bulk * * @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8. */ export type GatewayMessageDeleteBulkDispatch = DataPayload<GatewayDispatchEvents.MessageDeleteBulk, { ids: string[]; channel_id: string; guild_id?: string; }>; /** * https://discord.com/developers/docs/topics/gateway#message-reaction-add * * @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8. */ export type GatewayMessageReactionAddDispatch = ReactionData<GatewayDispatchEvents.MessageReactionAdd>; /** * https://discord.com/developers/docs/topics/gateway#message-reaction-remove * * @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8. */ export type GatewayMessageReactionRemoveDispatch = ReactionData<GatewayDispatchEvents.MessageReactionRemove, 'member'>; /** * https://discord.com/developers/docs/topics/gateway#message-reaction-remove-all * * @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8. */ export type GatewayMessageReactionRemoveAllDispatch = DataPayload<GatewayDispatchEvents.MessageReactionRemoveAll, MessageReactionRemoveData>; /** * https://discord.com/developers/docs/topics/gateway#message-reaction-remove-emoji * * @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8. */ export type GatewayMessageReactionRemoveEmojiDispatch = DataPayload<GatewayDispatchEvents.MessageReactionRemoveEmoji, MessageReactionRemoveData & { emoji: APIEmoji; }>; /** * https://discord.com/developers/docs/topics/gateway#presence-update * * @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8. */ export type GatewayPresenceUpdateDispatch = DataPayload<GatewayDispatchEvents.PresenceUpdate, RawGatewayPresenceUpdate>; /** * https://discord.com/developers/docs/topics/gateway#typing-start * * @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8. */ export type GatewayTypingStartDispatch = DataPayload<GatewayDispatchEvents.TypingStart, { channel_id: string; guild_id?: string; user_id: string; timestamp: number; member?: APIGuildMember; }>; /** * https://discord.com/developers/docs/topics/gateway#user-update * * @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8. */ export type GatewayUserUpdateDispatch = DataPayload<GatewayDispatchEvents.UserUpdate, APIUser>; /** * https://discord.com/developers/docs/topics/gateway#voice-state-update * * @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8. */ export type GatewayVoiceStateUpdateDispatch = DataPayload<GatewayDispatchEvents.VoiceStateUpdate, GatewayVoiceState>; /** * https://discord.com/developers/docs/topics/gateway#voice-server-update * * @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8. */ export type GatewayVoiceServerUpdateDispatch = DataPayload<GatewayDispatchEvents.VoiceServerUpdate, { token: string; guild_id: string; endpoint: string; }>; /** * https://discord.com/developers/docs/topics/gateway#webhooks-update * * @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8. */ export type GatewayWebhooksUpdateDispatch = DataPayload<GatewayDispatchEvents.WebhooksUpdate, { guild_id: string; channel_id: string; }>; /** * https://discord.com/developers/docs/topics/gateway#heartbeating * * @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8. */ export interface GatewayHeartbeat { op: GatewayOPCodes.Heartbeat; d: number; } /** * https://discord.com/developers/docs/topics/gateway#identify-identify-connection-properties * * @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8. */ export interface GatewayIdentifyProperties { $os: string; $browser: string; $device: string; } /** * https://discord.com/developers/docs/topics/gateway#identify * * @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8. */ export interface GatewayIdentify { op: GatewayOPCodes.Identify; d: { token: string; properties: GatewayIdentifyProperties; compress?: boolean; large_threshold?: number; shard?: [shard_id: number, shard_count: number]; presence?: RawGatewayPresenceUpdate; guild_subscriptions?: boolean; intents?: number; }; } /** * https://discord.com/developers/docs/topics/gateway#resume * * @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8. */ export interface GatewayResume { op: GatewayOPCodes.Resume; d: { token: string; session_id: string; seq: number; }; } /** * https://discord.com/developers/docs/topics/gateway#request-guild-members * * @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8. */ export interface GatewayRequestGuildMembers { op: GatewayOPCodes.RequestGuildMembers; d: { guild_id: string[] | string; query?: string; limit: number; presences?: boolean; user_ids?: string[] | string; nonce?: string; }; } /** * https://discord.com/developers/docs/topics/gateway#update-voice-state * * @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8. */ export interface GatewayVoiceStateUpdate { op: GatewayOPCodes.VoiceStateUpdate; d: { guild_id: string; channel_id: string | null; self_mute: boolean; self_deaf: boolean; }; } /** * https://discord.com/developers/docs/topics/gateway#update-status * * @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8. */ export interface GatewayUpdatePresence { op: GatewayOPCodes.PresenceUpdate; d: GatewayPresenceUpdateData; } /** * https://discord.com/developers/docs/topics/gateway#update-status-gateway-status-update-structure * * @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8. */ export interface GatewayPresenceUpdateData { since: number | null; game: GatewayActivity | null; status: PresenceUpdateStatus; afk: boolean; } /** * @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8. */ interface BasePayload { op: GatewayOPCodes; s: number; d?: unknown; t?: string; } /** * @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8. */ type NonDispatchPayload = Omit<BasePayload, 't'>; /** * @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8. */ interface DataPayload<Event extends GatewayDispatchEvents, D = unknown> extends BasePayload { op: GatewayOPCodes.Dispatch; t: Event; d: D; } /** * @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8. */ type ReactionData<E extends GatewayDispatchEvents, O extends string = never> = DataPayload<E, Omit<{ user_id: string; channel_id: string; message_id: string; guild_id?: string; member?: APIGuildMember; emoji: APIEmoji; }, O>>; /** * @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8. */ interface MessageReactionRemoveData { channel_id: string; message_id: string; guild_id?: string; } //# sourceMappingURL=v6.d.ts.map node_modules/discord-api-types/gateway/v8.d.ts 0000664 00000167526 15114741631 0015377 0 ustar 00 /** * Types extracted from https://discord.com/developers/docs/topics/gateway */ import type { Snowflake } from '../globals'; import type { APIApplication, APIChannel, APIEmoji, APIGuild, APIGuildIntegration, APIGuildMember, APIGuildScheduledEvent, APIInteraction, APIMessage, APIRole, APIStageInstance, APISticker, APIUnavailableGuild, APIUser, GatewayActivity, GatewayPresenceUpdate as RawGatewayPresenceUpdate, GatewayVoiceState, InviteTargetType, PresenceUpdateStatus } from '../payloads/v8/index'; import type { _Nullable } from '../utils/internals'; export type * from './common'; /** * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export declare const GatewayVersion = "8"; /** * https://discord.com/developers/docs/topics/opcodes-and-status-codes#gateway-gateway-opcodes * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export declare enum GatewayOpcodes { /** * An event was dispatched */ Dispatch = 0, /** * A bidirectional opcode to maintain an active gateway connection. * Fired periodically by the client, or fired by the gateway to request an immediate heartbeat from the client. */ Heartbeat = 1, /** * Starts a new session during the initial handshake */ Identify = 2, /** * Update the client's presence */ PresenceUpdate = 3, /** * Used to join/leave or move between voice channels */ VoiceStateUpdate = 4, /** * Resume a previous session that was disconnected */ Resume = 6, /** * You should attempt to reconnect and resume immediately */ Reconnect = 7, /** * Request information about offline guild members in a large guild */ RequestGuildMembers = 8, /** * The session has been invalidated. You should reconnect and identify/resume accordingly */ InvalidSession = 9, /** * Sent immediately after connecting, contains the `heartbeat_interval` to use */ Hello = 10, /** * Sent in response to receiving a heartbeat to acknowledge that it has been received */ HeartbeatAck = 11 } /** * https://discord.com/developers/docs/topics/opcodes-and-status-codes#gateway-gateway-close-event-codes * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export declare enum GatewayCloseCodes { /** * We're not sure what went wrong. Try reconnecting? */ UnknownError = 4000, /** * You sent an invalid Gateway opcode or an invalid payload for an opcode. Don't do that! * * See https://discord.com/developers/docs/topics/gateway#payloads-and-opcodes */ UnknownOpcode = 4001, /** * You sent an invalid payload to us. Don't do that! * * See https://discord.com/developers/docs/topics/gateway#sending-payloads */ DecodeError = 4002, /** * You sent us a payload prior to identifying * * See https://discord.com/developers/docs/topics/gateway#identify */ NotAuthenticated = 4003, /** * The account token sent with your identify payload is incorrect * * See https://discord.com/developers/docs/topics/gateway#identify */ AuthenticationFailed = 4004, /** * You sent more than one identify payload. Don't do that! */ AlreadyAuthenticated = 4005, /** * The sequence sent when resuming the session was invalid. Reconnect and start a new session * * See https://discord.com/developers/docs/topics/gateway#resume */ InvalidSeq = 4007, /** * Woah nelly! You're sending payloads to us too quickly. Slow it down! You will be disconnected on receiving this */ RateLimited = 4008, /** * Your session timed out. Reconnect and start a new one */ SessionTimedOut = 4009, /** * You sent us an invalid shard when identifying * * See https://discord.com/developers/docs/topics/gateway#sharding */ InvalidShard = 4010, /** * The session would have handled too many guilds - you are required to shard your connection in order to connect * * See https://discord.com/developers/docs/topics/gateway#sharding */ ShardingRequired = 4011, /** * You sent an invalid version for the gateway */ InvalidAPIVersion = 4012, /** * You sent an invalid intent for a Gateway Intent. You may have incorrectly calculated the bitwise value * * See https://discord.com/developers/docs/topics/gateway#gateway-intents */ InvalidIntents = 4013, /** * You sent a disallowed intent for a Gateway Intent. You may have tried to specify an intent that you have not * enabled or are not whitelisted for * * See https://discord.com/developers/docs/topics/gateway#gateway-intents * * See https://discord.com/developers/docs/topics/gateway#privileged-intents */ DisallowedIntents = 4014 } /** * https://discord.com/developers/docs/topics/gateway#list-of-intents * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export declare enum GatewayIntentBits { Guilds = 1, GuildMembers = 2, GuildBans = 4, GuildEmojisAndStickers = 8, GuildIntegrations = 16, GuildWebhooks = 32, GuildInvites = 64, GuildVoiceStates = 128, GuildPresences = 256, GuildMessages = 512, GuildMessageReactions = 1024, GuildMessageTyping = 2048, DirectMessages = 4096, DirectMessageReactions = 8192, DirectMessageTyping = 16384, GuildScheduledEvents = 65536 } /** * https://discord.com/developers/docs/topics/gateway#commands-and-events-gateway-events * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export declare enum GatewayDispatchEvents { ChannelCreate = "CHANNEL_CREATE", ChannelDelete = "CHANNEL_DELETE", ChannelPinsUpdate = "CHANNEL_PINS_UPDATE", ChannelUpdate = "CHANNEL_UPDATE", GuildBanAdd = "GUILD_BAN_ADD", GuildBanRemove = "GUILD_BAN_REMOVE", GuildCreate = "GUILD_CREATE", GuildDelete = "GUILD_DELETE", GuildEmojisUpdate = "GUILD_EMOJIS_UPDATE", GuildIntegrationsUpdate = "GUILD_INTEGRATIONS_UPDATE", GuildMemberAdd = "GUILD_MEMBER_ADD", GuildMemberRemove = "GUILD_MEMBER_REMOVE", GuildMembersChunk = "GUILD_MEMBERS_CHUNK", GuildMemberUpdate = "GUILD_MEMBER_UPDATE", GuildRoleCreate = "GUILD_ROLE_CREATE", GuildRoleDelete = "GUILD_ROLE_DELETE", GuildRoleUpdate = "GUILD_ROLE_UPDATE", GuildStickersUpdate = "GUILD_STICKERS_UPDATE", GuildUpdate = "GUILD_UPDATE", IntegrationCreate = "INTEGRATION_CREATE", IntegrationDelete = "INTEGRATION_DELETE", IntegrationUpdate = "INTEGRATION_UPDATE", InteractionCreate = "INTERACTION_CREATE", InviteCreate = "INVITE_CREATE", InviteDelete = "INVITE_DELETE", MessageCreate = "MESSAGE_CREATE", MessageDelete = "MESSAGE_DELETE", MessageDeleteBulk = "MESSAGE_DELETE_BULK", MessageReactionAdd = "MESSAGE_REACTION_ADD", MessageReactionRemove = "MESSAGE_REACTION_REMOVE", MessageReactionRemoveAll = "MESSAGE_REACTION_REMOVE_ALL", MessageReactionRemoveEmoji = "MESSAGE_REACTION_REMOVE_EMOJI", MessageUpdate = "MESSAGE_UPDATE", PresenceUpdate = "PRESENCE_UPDATE", StageInstanceCreate = "STAGE_INSTANCE_CREATE", StageInstanceDelete = "STAGE_INSTANCE_DELETE", StageInstanceUpdate = "STAGE_INSTANCE_UPDATE", Ready = "READY", Resumed = "RESUMED", TypingStart = "TYPING_START", UserUpdate = "USER_UPDATE", VoiceServerUpdate = "VOICE_SERVER_UPDATE", VoiceStateUpdate = "VOICE_STATE_UPDATE", WebhooksUpdate = "WEBHOOKS_UPDATE", GuildScheduledEventCreate = "GUILD_SCHEDULED_EVENT_CREATE", GuildScheduledEventUpdate = "GUILD_SCHEDULED_EVENT_UPDATE", GuildScheduledEventDelete = "GUILD_SCHEDULED_EVENT_DELETE", GuildScheduledEventUserAdd = "GUILD_SCHEDULED_EVENT_USER_ADD", GuildScheduledEventUserRemove = "GUILD_SCHEDULED_EVENT_USER_REMOVE" } /** * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type GatewaySendPayload = GatewayHeartbeat | GatewayIdentify | GatewayRequestGuildMembers | GatewayResume | GatewayUpdatePresence | GatewayVoiceStateUpdate; /** * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type GatewayReceivePayload = GatewayDispatchPayload | GatewayHeartbeatAck | GatewayHeartbeatRequest | GatewayHello | GatewayInvalidSession | GatewayReconnect; /** * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type GatewayDispatchPayload = GatewayChannelModifyDispatch | GatewayChannelPinsUpdateDispatch | GatewayGuildBanModifyDispatch | GatewayGuildDeleteDispatch | GatewayGuildEmojisUpdateDispatch | GatewayGuildIntegrationsUpdateDispatch | GatewayGuildMemberAddDispatch | GatewayGuildMemberRemoveDispatch | GatewayGuildMembersChunkDispatch | GatewayGuildMemberUpdateDispatch | GatewayGuildModifyDispatch | GatewayGuildRoleDeleteDispatch | GatewayGuildRoleModifyDispatch | GatewayGuildScheduledEventCreateDispatch | GatewayGuildScheduledEventDeleteDispatch | GatewayGuildScheduledEventUpdateDispatch | GatewayGuildScheduledEventUserAddDispatch | GatewayGuildScheduledEventUserRemoveDispatch | GatewayGuildStickersUpdateDispatch | GatewayIntegrationCreateDispatch | GatewayIntegrationDeleteDispatch | GatewayIntegrationUpdateDispatch | GatewayInteractionCreateDispatch | GatewayInviteCreateDispatch | GatewayInviteDeleteDispatch | GatewayMessageCreateDispatch | GatewayMessageDeleteBulkDispatch | GatewayMessageDeleteDispatch | GatewayMessageReactionAddDispatch | GatewayMessageReactionRemoveAllDispatch | GatewayMessageReactionRemoveDispatch | GatewayMessageReactionRemoveEmojiDispatch | GatewayMessageUpdateDispatch | GatewayPresenceUpdateDispatch | GatewayReadyDispatch | GatewayResumedDispatch | GatewayStageInstanceCreateDispatch | GatewayStageInstanceDeleteDispatch | GatewayStageInstanceUpdateDispatch | GatewayTypingStartDispatch | GatewayUserUpdateDispatch | GatewayVoiceServerUpdateDispatch | GatewayVoiceStateUpdateDispatch | GatewayWebhooksUpdateDispatch; /** * https://discord.com/developers/docs/topics/gateway#hello * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export interface GatewayHello extends NonDispatchPayload { op: GatewayOpcodes.Hello; d: GatewayHelloData; } /** * https://discord.com/developers/docs/topics/gateway#hello * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export interface GatewayHelloData { /** * The interval (in milliseconds) the client should heartbeat with */ heartbeat_interval: number; } /** * https://discord.com/developers/docs/topics/gateway#heartbeating * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export interface GatewayHeartbeatRequest extends NonDispatchPayload { op: GatewayOpcodes.Heartbeat; d: never; } /** * https://discord.com/developers/docs/topics/gateway#heartbeating-example-gateway-heartbeat-ack * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export interface GatewayHeartbeatAck extends NonDispatchPayload { op: GatewayOpcodes.HeartbeatAck; d: never; } /** * https://discord.com/developers/docs/topics/gateway#invalid-session * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export interface GatewayInvalidSession extends NonDispatchPayload { op: GatewayOpcodes.InvalidSession; d: GatewayInvalidSessionData; } /** * https://discord.com/developers/docs/topics/gateway#invalid-session * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type GatewayInvalidSessionData = boolean; /** * https://discord.com/developers/docs/topics/gateway#reconnect * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export interface GatewayReconnect extends NonDispatchPayload { op: GatewayOpcodes.Reconnect; d: never; } /** * https://discord.com/developers/docs/topics/gateway#ready * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type GatewayReadyDispatch = DataPayload<GatewayDispatchEvents.Ready, GatewayReadyDispatchData>; /** * https://discord.com/developers/docs/topics/gateway#ready * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export interface GatewayReadyDispatchData { /** * Gateway version * * See https://discord.com/developers/docs/topics/gateway#gateways-gateway-versions */ v: number; /** * Information about the user including email * * See https://discord.com/developers/docs/resources/user#user-object */ user: APIUser; /** * The guilds the user is in * * See https://discord.com/developers/docs/resources/guild#unavailable-guild-object */ guilds: APIUnavailableGuild[]; /** * Used for resuming connections */ session_id: string; /** * The shard information associated with this session, if sent when identifying * * See https://discord.com/developers/docs/topics/gateway#sharding */ shard?: [shard_id: number, shard_count: number]; /** * Contains `id` and `flags` * * See https://discord.com/developers/docs/resources/application#application-object */ application: Pick<APIApplication, 'flags' | 'id'>; } /** * https://discord.com/developers/docs/topics/gateway#resumed * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type GatewayResumedDispatch = DataPayload<GatewayDispatchEvents.Resumed, never>; /** * https://discord.com/developers/docs/topics/gateway#channel-create * https://discord.com/developers/docs/topics/gateway#channel-update * https://discord.com/developers/docs/topics/gateway#channel-delete * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type GatewayChannelModifyDispatch = DataPayload<GatewayDispatchEvents.ChannelCreate | GatewayDispatchEvents.ChannelDelete | GatewayDispatchEvents.ChannelUpdate, GatewayChannelModifyDispatchData>; /** * https://discord.com/developers/docs/topics/gateway#channel-create * https://discord.com/developers/docs/topics/gateway#channel-update * https://discord.com/developers/docs/topics/gateway#channel-delete * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type GatewayChannelModifyDispatchData = APIChannel; /** * https://discord.com/developers/docs/topics/gateway#channel-create * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type GatewayChannelCreateDispatch = GatewayChannelModifyDispatch; /** * https://discord.com/developers/docs/topics/gateway#channel-create * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type GatewayChannelCreateDispatchData = GatewayChannelModifyDispatchData; /** * https://discord.com/developers/docs/topics/gateway#channel-update * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type GatewayChannelUpdateDispatch = GatewayChannelModifyDispatch; /** * https://discord.com/developers/docs/topics/gateway#channel-update * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type GatewayChannelUpdateDispatchData = GatewayChannelModifyDispatchData; /** * https://discord.com/developers/docs/topics/gateway#channel-delete * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type GatewayChannelDeleteDispatch = GatewayChannelModifyDispatch; /** * https://discord.com/developers/docs/topics/gateway#channel-delete * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type GatewayChannelDeleteDispatchData = GatewayChannelModifyDispatchData; /** * https://discord.com/developers/docs/topics/gateway#channel-pins-update * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type GatewayChannelPinsUpdateDispatch = DataPayload<GatewayDispatchEvents.ChannelPinsUpdate, GatewayChannelPinsUpdateDispatchData>; /** * https://discord.com/developers/docs/topics/gateway#channel-pins-update * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export interface GatewayChannelPinsUpdateDispatchData { /** * The id of the guild */ guild_id?: Snowflake; /** * The id of the channel */ channel_id: Snowflake; /** * The time at which the most recent pinned message was pinned */ last_pin_timestamp?: string | null; } /** * https://discord.com/developers/docs/topics/gateway#guild-create * https://discord.com/developers/docs/topics/gateway#guild-update * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type GatewayGuildModifyDispatch = DataPayload<GatewayDispatchEvents.GuildCreate | GatewayDispatchEvents.GuildUpdate, GatewayGuildModifyDispatchData>; /** * https://discord.com/developers/docs/topics/gateway#guild-create * https://discord.com/developers/docs/topics/gateway#guild-update * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type GatewayGuildModifyDispatchData = APIGuild; /** * https://discord.com/developers/docs/topics/gateway#guild-create * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type GatewayGuildCreateDispatch = GatewayGuildModifyDispatch; /** * https://discord.com/developers/docs/topics/gateway#guild-create * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type GatewayGuildCreateDispatchData = GatewayGuildModifyDispatchData; /** * https://discord.com/developers/docs/topics/gateway#guild-update * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type GatewayGuildUpdateDispatch = GatewayGuildModifyDispatch; /** * https://discord.com/developers/docs/topics/gateway#guild-update * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type GatewayGuildUpdateDispatchData = GatewayGuildModifyDispatchData; /** * https://discord.com/developers/docs/topics/gateway#guild-delete * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type GatewayGuildDeleteDispatch = DataPayload<GatewayDispatchEvents.GuildDelete, GatewayGuildDeleteDispatchData>; /** * https://discord.com/developers/docs/topics/gateway#guild-delete * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type GatewayGuildDeleteDispatchData = APIUnavailableGuild; /** * https://discord.com/developers/docs/topics/gateway#guild-ban-add * https://discord.com/developers/docs/topics/gateway#guild-ban-remove * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type GatewayGuildBanModifyDispatch = DataPayload<GatewayDispatchEvents.GuildBanAdd | GatewayDispatchEvents.GuildBanRemove, GatewayGuildBanModifyDispatchData>; /** * https://discord.com/developers/docs/topics/gateway#guild-ban-add * https://discord.com/developers/docs/topics/gateway#guild-ban-remove * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export interface GatewayGuildBanModifyDispatchData { /** * ID of the guild */ guild_id: Snowflake; /** * The banned user * * See https://discord.com/developers/docs/resources/user#user-object */ user: APIUser; } /** * https://discord.com/developers/docs/topics/gateway#guild-ban-add * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type GatewayGuildBanAddDispatch = GatewayGuildBanModifyDispatch; /** * https://discord.com/developers/docs/topics/gateway#guild-ban-add * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type GatewayGuildBanAddDispatchData = GatewayGuildBanModifyDispatchData; /** * https://discord.com/developers/docs/topics/gateway#guild-ban-remove * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type GatewayGuildBanRemoveDispatch = GatewayGuildBanModifyDispatch; /** * https://discord.com/developers/docs/topics/gateway#guild-ban-remove * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type GatewayGuildBanRemoveDispatchData = GatewayGuildBanModifyDispatchData; /** * https://discord.com/developers/docs/topics/gateway#guild-emojis-update * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type GatewayGuildEmojisUpdateDispatch = DataPayload<GatewayDispatchEvents.GuildEmojisUpdate, GatewayGuildEmojisUpdateDispatchData>; /** * https://discord.com/developers/docs/topics/gateway#guild-emojis-update * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export interface GatewayGuildEmojisUpdateDispatchData { /** * ID of the guild */ guild_id: Snowflake; /** * Array of emojis * * See https://discord.com/developers/docs/resources/emoji#emoji-object */ emojis: APIEmoji[]; } /** * https://discord.com/developers/docs/topics/gateway#guild-stickers-update * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type GatewayGuildStickersUpdateDispatch = DataPayload<GatewayDispatchEvents.GuildStickersUpdate, GatewayGuildStickersUpdateDispatchData>; /** * https://discord.com/developers/docs/topics/gateway#guild-stickers-update * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export interface GatewayGuildStickersUpdateDispatchData { /** * ID of the guild */ guild_id: Snowflake; /** * Array of stickers * * See https://discord.com/developers/docs/resources/sticker#sticker-object */ stickers: APISticker[]; } /** * https://discord.com/developers/docs/topics/gateway#guild-integrations-update * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type GatewayGuildIntegrationsUpdateDispatch = DataPayload<GatewayDispatchEvents.GuildIntegrationsUpdate, GatewayGuildIntegrationsUpdateDispatchData>; /** * https://discord.com/developers/docs/topics/gateway#guild-integrations-update * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export interface GatewayGuildIntegrationsUpdateDispatchData { /** * ID of the guild whose integrations were updated */ guild_id: Snowflake; } /** * https://discord.com/developers/docs/topics/gateway#guild-member-add * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type GatewayGuildMemberAddDispatch = DataPayload<GatewayDispatchEvents.GuildMemberAdd, GatewayGuildMemberAddDispatchData>; /** * https://discord.com/developers/docs/topics/gateway#guild-member-add * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export interface GatewayGuildMemberAddDispatchData extends APIGuildMember { /** * The id of the guild */ guild_id: Snowflake; } /** * https://discord.com/developers/docs/topics/gateway#guild-member-remove * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type GatewayGuildMemberRemoveDispatch = DataPayload<GatewayDispatchEvents.GuildMemberRemove, GatewayGuildMemberRemoveDispatchData>; /** * https://discord.com/developers/docs/topics/gateway#guild-member-remove * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export interface GatewayGuildMemberRemoveDispatchData { /** * The id of the guild */ guild_id: Snowflake; /** * The user who was removed * * See https://discord.com/developers/docs/resources/user#user-object */ user: APIUser; } /** * https://discord.com/developers/docs/topics/gateway#guild-member-update * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type GatewayGuildMemberUpdateDispatch = DataPayload<GatewayDispatchEvents.GuildMemberUpdate, GatewayGuildMemberUpdateDispatchData>; /** * https://discord.com/developers/docs/topics/gateway#guild-member-update * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type GatewayGuildMemberUpdateDispatchData = _Nullable<Pick<APIGuildMember, 'joined_at'>> & Omit<APIGuildMember, 'deaf' | 'joined_at' | 'mute' | 'user'> & Partial<Pick<APIGuildMember, 'deaf' | 'mute'>> & Required<Pick<APIGuildMember, 'user'>> & { /** * The id of the guild */ guild_id: Snowflake; }; /** * https://discord.com/developers/docs/topics/gateway#guild-members-chunk * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type GatewayGuildMembersChunkDispatch = DataPayload<GatewayDispatchEvents.GuildMembersChunk, GatewayGuildMembersChunkDispatchData>; /** * https://discord.com/developers/docs/topics/gateway#guild-members-chunk * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export interface GatewayGuildMembersChunkDispatchData { /** * The id of the guild */ guild_id: Snowflake; /** * Set of guild members * * See https://discord.com/developers/docs/resources/guild#guild-member-object */ members: APIGuildMember[]; /** * The chunk index in the expected chunks for this response (`0 <= chunk_index < chunk_count`) */ chunk_index?: number; /** * The total number of expected chunks for this response */ chunk_count?: number; /** * If passing an invalid id to `REQUEST_GUILD_MEMBERS`, it will be returned here */ not_found?: unknown[]; /** * If passing true to `REQUEST_GUILD_MEMBERS`, presences of the returned members will be here * * See https://discord.com/developers/docs/topics/gateway#presence */ presences?: RawGatewayPresenceUpdate[]; /** * The nonce used in the Guild Members Request * * See https://discord.com/developers/docs/topics/gateway#request-guild-members */ nonce?: string; } /** * https://discord.com/developers/docs/topics/gateway#guild-role-create * https://discord.com/developers/docs/topics/gateway#guild-role-update * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type GatewayGuildRoleModifyDispatch = DataPayload<GatewayDispatchEvents.GuildRoleCreate | GatewayDispatchEvents.GuildRoleUpdate, GatewayGuildRoleModifyDispatchData>; /** * https://discord.com/developers/docs/topics/gateway#guild-role-create * https://discord.com/developers/docs/topics/gateway#guild-role-update * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export interface GatewayGuildRoleModifyDispatchData { /** * The id of the guild */ guild_id: Snowflake; /** * The role created or updated * * See https://discord.com/developers/docs/topics/permissions#role-object */ role: APIRole; } /** * https://discord.com/developers/docs/topics/gateway#guild-role-create * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type GatewayGuildRoleCreateDispatch = GatewayGuildRoleModifyDispatch; /** * https://discord.com/developers/docs/topics/gateway#guild-role-create * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type GatewayGuildRoleCreateDispatchData = GatewayGuildRoleModifyDispatchData; /** * https://discord.com/developers/docs/topics/gateway#guild-role-update * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type GatewayGuildRoleUpdateDispatch = GatewayGuildRoleModifyDispatch; /** * https://discord.com/developers/docs/topics/gateway#guild-role-update * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type GatewayGuildRoleUpdateDispatchData = GatewayGuildRoleModifyDispatchData; /** * https://discord.com/developers/docs/topics/gateway#guild-role-delete * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type GatewayGuildRoleDeleteDispatch = DataPayload<GatewayDispatchEvents.GuildRoleDelete, GatewayGuildRoleDeleteDispatchData>; /** * https://discord.com/developers/docs/topics/gateway#guild-role-delete * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export interface GatewayGuildRoleDeleteDispatchData { /** * The id of the guild */ guild_id: Snowflake; /** * The id of the role */ role_id: Snowflake; } /** * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type GatewayGuildScheduledEventCreateDispatch = DataPayload<GatewayDispatchEvents.GuildScheduledEventCreate, GatewayGuildScheduledEventCreateDispatchData>; /** * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type GatewayGuildScheduledEventCreateDispatchData = APIGuildScheduledEvent; /** * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type GatewayGuildScheduledEventUpdateDispatch = DataPayload<GatewayDispatchEvents.GuildScheduledEventUpdate, GatewayGuildScheduledEventUpdateDispatchData>; /** * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type GatewayGuildScheduledEventUpdateDispatchData = APIGuildScheduledEvent; /** * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type GatewayGuildScheduledEventDeleteDispatch = DataPayload<GatewayDispatchEvents.GuildScheduledEventDelete, GatewayGuildScheduledEventDeleteDispatchData>; /** * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type GatewayGuildScheduledEventDeleteDispatchData = APIGuildScheduledEvent; /** * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type GatewayGuildScheduledEventUserAddDispatch = DataPayload<GatewayDispatchEvents.GuildScheduledEventUserAdd, GatewayGuildScheduledEventUserAddDispatchData>; /** * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export interface GatewayGuildScheduledEventUserAddDispatchData { guild_scheduled_event_id: Snowflake; user_id: Snowflake; guild_id: Snowflake; } /** * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type GatewayGuildScheduledEventUserRemoveDispatch = DataPayload<GatewayDispatchEvents.GuildScheduledEventUserRemove, GatewayGuildScheduledEventUserAddDispatchData>; /** * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export interface GatewayGuildScheduledEventUserRemoveDispatchData { guild_scheduled_event_id: Snowflake; user_id: Snowflake; guild_id: Snowflake; } /** * https://discord.com/developers/docs/topics/gateway#integration-create * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type GatewayIntegrationCreateDispatch = DataPayload<GatewayDispatchEvents.IntegrationCreate, GatewayIntegrationCreateDispatchData>; /** * https://discord.com/developers/docs/topics/gateway#integration-create * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type GatewayIntegrationCreateDispatchData = APIGuildIntegration & { guild_id: Snowflake; }; /** * https://discord.com/developers/docs/topics/gateway#integration-update * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type GatewayIntegrationUpdateDispatch = DataPayload<GatewayDispatchEvents.IntegrationUpdate, GatewayIntegrationUpdateDispatchData>; /** * https://discord.com/developers/docs/topics/gateway#integration-update * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type GatewayIntegrationUpdateDispatchData = APIGuildIntegration & { guild_id: Snowflake; }; /** * https://discord.com/developers/docs/topics/gateway#integration-update * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type GatewayIntegrationDeleteDispatch = DataPayload<GatewayDispatchEvents.IntegrationDelete, GatewayIntegrationDeleteDispatchData>; /** * https://discord.com/developers/docs/topics/gateway#integration-delete * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export interface GatewayIntegrationDeleteDispatchData { /** * Integration id */ id: Snowflake; /** * ID of the guild */ guild_id: Snowflake; /** * ID of the bot/OAuth2 application for this Discord integration */ application_id?: Snowflake; } /** * https://discord.com/developers/docs/topics/gateway#interaction-create * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type GatewayInteractionCreateDispatch = DataPayload<GatewayDispatchEvents.InteractionCreate, GatewayInteractionCreateDispatchData>; /** * https://discord.com/developers/docs/topics/gateway#interaction-create * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type GatewayInteractionCreateDispatchData = APIInteraction; /** * https://discord.com/developers/docs/topics/gateway#invite-create * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type GatewayInviteCreateDispatch = DataPayload<GatewayDispatchEvents.InviteCreate, GatewayInviteCreateDispatchData>; /** * https://discord.com/developers/docs/topics/gateway#invite-create * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export interface GatewayInviteCreateDispatchData { /** * The channel the invite is for */ channel_id: Snowflake; /** * The unique invite code * * See https://discord.com/developers/docs/resources/invite#invite-object */ code: string; /** * The time at which the invite was created */ created_at: number; /** * The guild of the invite */ guild_id?: Snowflake; /** * The user that created the invite * * See https://discord.com/developers/docs/resources/user#user-object */ inviter?: APIUser; /** * How long the invite is valid for (in seconds) */ max_age: number; /** * The maximum number of times the invite can be used */ max_uses: number; /** * The type of target for this voice channel invite * * See https://discord.com/developers/docs/resources/invite#invite-object-invite-target-types */ target_type?: InviteTargetType; /** * The user whose stream to display for this voice channel stream invite * * See https://discord.com/developers/docs/resources/user#user-object */ target_user?: APIUser; /** * The embedded application to open for this voice channel embedded application invite */ target_application?: Partial<APIApplication>; /** * Whether or not the invite is temporary (invited users will be kicked on disconnect unless they're assigned a role) */ temporary: boolean; /** * How many times the invite has been used (always will be `0`) */ uses: 0; } /** * https://discord.com/developers/docs/topics/gateway#invite-delete * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type GatewayInviteDeleteDispatch = DataPayload<GatewayDispatchEvents.InviteDelete, GatewayInviteDeleteDispatchData>; /** * https://discord.com/developers/docs/topics/gateway#invite-delete * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export interface GatewayInviteDeleteDispatchData { /** * The channel of the invite */ channel_id: Snowflake; /** * The guild of the invite */ guild_id?: Snowflake; /** * The unique invite code * * See https://discord.com/developers/docs/resources/invite#invite-object */ code: string; } /** * https://discord.com/developers/docs/topics/gateway#message-create * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type GatewayMessageCreateDispatch = DataPayload<GatewayDispatchEvents.MessageCreate, GatewayMessageCreateDispatchData>; /** * https://discord.com/developers/docs/topics/gateway#message-create * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type GatewayMessageCreateDispatchData = APIMessage; /** * https://discord.com/developers/docs/topics/gateway#message-update * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type GatewayMessageUpdateDispatch = DataPayload<GatewayDispatchEvents.MessageUpdate, GatewayMessageUpdateDispatchData>; /** * https://discord.com/developers/docs/topics/gateway#message-update * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type GatewayMessageUpdateDispatchData = Partial<APIMessage> & { id: Snowflake; channel_id: Snowflake; }; /** * https://discord.com/developers/docs/topics/gateway#message-delete * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type GatewayMessageDeleteDispatch = DataPayload<GatewayDispatchEvents.MessageDelete, GatewayMessageDeleteDispatchData>; /** * https://discord.com/developers/docs/topics/gateway#message-delete * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export interface GatewayMessageDeleteDispatchData { /** * The id of the message */ id: Snowflake; /** * The id of the channel */ channel_id: Snowflake; /** * The id of the guild */ guild_id?: Snowflake; } /** * https://discord.com/developers/docs/topics/gateway#message-delete-bulk * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type GatewayMessageDeleteBulkDispatch = DataPayload<GatewayDispatchEvents.MessageDeleteBulk, GatewayMessageDeleteBulkDispatchData>; /** * https://discord.com/developers/docs/topics/gateway#message-delete-bulk * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export interface GatewayMessageDeleteBulkDispatchData { /** * The ids of the messages */ ids: Snowflake[]; /** * The id of the channel */ channel_id: Snowflake; /** * The id of the guild */ guild_id?: Snowflake; } /** * https://discord.com/developers/docs/topics/gateway#message-reaction-add * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type GatewayMessageReactionAddDispatch = ReactionData<GatewayDispatchEvents.MessageReactionAdd>; /** * https://discord.com/developers/docs/topics/gateway#message-reaction-add * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type GatewayMessageReactionAddDispatchData = GatewayMessageReactionAddDispatch['d']; /** * https://discord.com/developers/docs/topics/gateway#message-reaction-remove * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type GatewayMessageReactionRemoveDispatch = ReactionData<GatewayDispatchEvents.MessageReactionRemove, 'member'>; /** * https://discord.com/developers/docs/topics/gateway#message-reaction-remove * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type GatewayMessageReactionRemoveDispatchData = GatewayMessageReactionRemoveDispatch['d']; /** * https://discord.com/developers/docs/topics/gateway#message-reaction-remove-all * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type GatewayMessageReactionRemoveAllDispatch = DataPayload<GatewayDispatchEvents.MessageReactionRemoveAll, GatewayMessageReactionRemoveAllDispatchData>; /** * https://discord.com/developers/docs/topics/gateway#message-reaction-remove-all * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type GatewayMessageReactionRemoveAllDispatchData = MessageReactionRemoveData; /** * https://discord.com/developers/docs/topics/gateway#message-reaction-remove-emoji * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type GatewayMessageReactionRemoveEmojiDispatch = DataPayload<GatewayDispatchEvents.MessageReactionRemoveEmoji, GatewayMessageReactionRemoveEmojiDispatchData>; /** * https://discord.com/developers/docs/topics/gateway#message-reaction-remove-emoji * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export interface GatewayMessageReactionRemoveEmojiDispatchData extends MessageReactionRemoveData { /** * The emoji that was removed */ emoji: APIEmoji; } /** * https://discord.com/developers/docs/topics/gateway#presence-update * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type GatewayPresenceUpdateDispatch = DataPayload<GatewayDispatchEvents.PresenceUpdate, GatewayPresenceUpdateDispatchData>; /** * https://discord.com/developers/docs/topics/gateway#presence-update * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type GatewayPresenceUpdateDispatchData = RawGatewayPresenceUpdate; /** * https://discord.com/developers/docs/topics/gateway#stage-instance-create * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type GatewayStageInstanceCreateDispatch = DataPayload<GatewayDispatchEvents.StageInstanceCreate, GatewayStageInstanceCreateDispatchData>; /** * https://discord.com/developers/docs/topics/gateway#stage-instance-create * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type GatewayStageInstanceCreateDispatchData = APIStageInstance; /** * https://discord.com/developers/docs/topics/gateway#stage-instance-delete * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type GatewayStageInstanceDeleteDispatch = DataPayload<GatewayDispatchEvents.StageInstanceDelete, GatewayStageInstanceDeleteDispatchData>; /** * https://discord.com/developers/docs/topics/gateway#stage-instance-delete * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type GatewayStageInstanceDeleteDispatchData = APIStageInstance; /** * https://discord.com/developers/docs/topics/gateway#stage-instance-update * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type GatewayStageInstanceUpdateDispatch = DataPayload<GatewayDispatchEvents.StageInstanceUpdate, GatewayStageInstanceUpdateDispatchData>; /** * https://discord.com/developers/docs/topics/gateway#stage-instance-update * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type GatewayStageInstanceUpdateDispatchData = APIStageInstance; /** * https://discord.com/developers/docs/topics/gateway#typing-start * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type GatewayTypingStartDispatch = DataPayload<GatewayDispatchEvents.TypingStart, GatewayTypingStartDispatchData>; /** * https://discord.com/developers/docs/topics/gateway#typing-start * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export interface GatewayTypingStartDispatchData { /** * The id of the channel */ channel_id: Snowflake; /** * The id of the guild */ guild_id?: Snowflake; /** * The id of the user */ user_id: Snowflake; /** * Unix time (in seconds) of when the user started typing */ timestamp: number; /** * The member who started typing if this happened in a guild * * See https://discord.com/developers/docs/resources/guild#guild-member-object */ member?: APIGuildMember; } /** * https://discord.com/developers/docs/topics/gateway#user-update * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type GatewayUserUpdateDispatch = DataPayload<GatewayDispatchEvents.UserUpdate, GatewayUserUpdateDispatchData>; /** * https://discord.com/developers/docs/topics/gateway#user-update * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type GatewayUserUpdateDispatchData = APIUser; /** * https://discord.com/developers/docs/topics/gateway#voice-state-update * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type GatewayVoiceStateUpdateDispatch = DataPayload<GatewayDispatchEvents.VoiceStateUpdate, GatewayVoiceStateUpdateDispatchData>; /** * https://discord.com/developers/docs/topics/gateway#voice-state-update * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type GatewayVoiceStateUpdateDispatchData = GatewayVoiceState; /** * https://discord.com/developers/docs/topics/gateway#voice-server-update * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type GatewayVoiceServerUpdateDispatch = DataPayload<GatewayDispatchEvents.VoiceServerUpdate, GatewayVoiceServerUpdateDispatchData>; /** * https://discord.com/developers/docs/topics/gateway#voice-server-update * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export interface GatewayVoiceServerUpdateDispatchData { /** * Voice connection token */ token: string; /** * The guild this voice server update is for */ guild_id: Snowflake; /** * The voice server host * * A `null` endpoint means that the voice server allocated has gone away and is trying to be reallocated. * You should attempt to disconnect from the currently connected voice server, and not attempt to reconnect * until a new voice server is allocated */ endpoint: string | null; } /** * https://discord.com/developers/docs/topics/gateway#webhooks-update * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type GatewayWebhooksUpdateDispatch = DataPayload<GatewayDispatchEvents.WebhooksUpdate, GatewayWebhooksUpdateDispatchData>; /** * https://discord.com/developers/docs/topics/gateway#webhooks-update * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export interface GatewayWebhooksUpdateDispatchData { /** * The id of the guild */ guild_id: Snowflake; /** * The id of the channel */ channel_id: Snowflake; } /** * https://discord.com/developers/docs/topics/gateway#heartbeating * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export interface GatewayHeartbeat { op: GatewayOpcodes.Heartbeat; d: GatewayHeartbeatData; } /** * https://discord.com/developers/docs/topics/gateway#heartbeating * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type GatewayHeartbeatData = number | null; /** * https://discord.com/developers/docs/topics/gateway#identify * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export interface GatewayIdentify { op: GatewayOpcodes.Identify; d: GatewayIdentifyData; } /** * https://discord.com/developers/docs/topics/gateway#identify * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export interface GatewayIdentifyData { /** * Authentication token */ token: string; /** * Connection properties * * See https://discord.com/developers/docs/topics/gateway#identify-identify-connection-properties */ properties: GatewayIdentifyProperties; /** * Whether this connection supports compression of packets * * @default false */ compress?: boolean; /** * Value between 50 and 250, total number of members where the gateway will stop sending * offline members in the guild member list * * @default 50 */ large_threshold?: number; /** * Used for Guild Sharding * * See https://discord.com/developers/docs/topics/gateway#sharding */ shard?: [shard_id: number, shard_count: number]; /** * Presence structure for initial presence information * * See https://discord.com/developers/docs/topics/gateway#update-presence */ presence?: GatewayPresenceUpdateData; /** * The Gateway Intents you wish to receive * * See https://discord.com/developers/docs/topics/gateway#gateway-intents */ intents: number; } /** * https://discord.com/developers/docs/topics/gateway#identify-identify-connection-properties * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export interface GatewayIdentifyProperties { /** * Your operating system */ $os: string; /** * Your library name */ $browser: string; /** * Your library name */ $device: string; } /** * https://discord.com/developers/docs/topics/gateway#resume * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export interface GatewayResume { op: GatewayOpcodes.Resume; d: GatewayResumeData; } /** * https://discord.com/developers/docs/topics/gateway#resume * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export interface GatewayResumeData { /** * Session token */ token: string; /** * Session id */ session_id: string; /** * Last sequence number received */ seq: number; } /** * https://discord.com/developers/docs/topics/gateway#request-guild-members * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export interface GatewayRequestGuildMembers { op: GatewayOpcodes.RequestGuildMembers; d: GatewayRequestGuildMembersData; } /** * https://discord.com/developers/docs/topics/gateway#request-guild-members * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export interface GatewayRequestGuildMembersData { /** * ID of the guild to get members for */ guild_id: Snowflake; /** * String that username starts with, or an empty string to return all members */ query?: string; /** * Maximum number of members to send matching the `query`; * a limit of `0` can be used with an empty string `query` to return all members */ limit: number; /** * Used to specify if we want the presences of the matched members */ presences?: boolean; /** * Used to specify which users you wish to fetch */ user_ids?: Snowflake | Snowflake[]; /** * Nonce to identify the Guild Members Chunk response * * Nonce can only be up to 32 bytes. If you send an invalid nonce it will be ignored and the reply member_chunk(s) will not have a `nonce` set. * * See https://discord.com/developers/docs/topics/gateway#guild-members-chunk */ nonce?: string; } /** * https://discord.com/developers/docs/topics/gateway#update-voice-state * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export interface GatewayVoiceStateUpdate { op: GatewayOpcodes.VoiceStateUpdate; d: GatewayVoiceStateUpdateData; } /** * https://discord.com/developers/docs/topics/gateway#update-voice-state * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export interface GatewayVoiceStateUpdateData { /** * ID of the guild */ guild_id: Snowflake; /** * ID of the voice channel client wants to join (`null` if disconnecting) */ channel_id: Snowflake | null; /** * Is the client muted */ self_mute: boolean; /** * Is the client deafened */ self_deaf: boolean; } /** * https://discord.com/developers/docs/topics/gateway#update-presence * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export interface GatewayUpdatePresence { op: GatewayOpcodes.PresenceUpdate; d: GatewayPresenceUpdateData; } /** * https://discord.com/developers/docs/topics/gateway#update-presence-gateway-presence-update-structure * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export interface GatewayPresenceUpdateData { /** * Unix time (in milliseconds) of when the client went idle, or `null` if the client is not idle */ since: number | null; /** * The user's activities * * See https://discord.com/developers/docs/topics/gateway-events#activity-object */ activities: GatewayActivityUpdateData[]; /** * The user's new status * * See https://discord.com/developers/docs/topics/gateway#update-presence-status-types */ status: PresenceUpdateStatus; /** * Whether or not the client is afk */ afk: boolean; } /** * https://discord.com/developers/docs/topics/gateway-events#activity-object-activity-structure * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type GatewayActivityUpdateData = Pick<GatewayActivity, 'name' | 'type' | 'url'>; interface BasePayload { /** * Opcode for the payload */ op: GatewayOpcodes; /** * Event data */ d?: unknown; /** * Sequence number, used for resuming sessions and heartbeats */ s: number; /** * The event name for this payload */ t?: string; } type NonDispatchPayload = Omit<BasePayload, 's' | 't'> & { t: null; s: null; }; interface DataPayload<Event extends GatewayDispatchEvents, D = unknown> extends BasePayload { op: GatewayOpcodes.Dispatch; t: Event; d: D; } type ReactionData<E extends GatewayDispatchEvents, O extends string = never> = DataPayload<E, Omit<{ /** * The id of the user */ user_id: Snowflake; /** * The id of the channel */ channel_id: Snowflake; /** * The id of the message */ message_id: Snowflake; /** * The id of the guild */ guild_id?: Snowflake; /** * The member who reacted if this happened in a guild * * See https://discord.com/developers/docs/resources/guild#guild-member-object */ member?: APIGuildMember; /** * The emoji used to react * * See https://discord.com/developers/docs/resources/emoji#emoji-object */ emoji: APIEmoji; }, O>>; /** * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ interface MessageReactionRemoveData { /** * The id of the channel */ channel_id: Snowflake; /** * The id of the message */ message_id: Snowflake; /** * The id of the guild */ guild_id?: Snowflake; } //# sourceMappingURL=v8.d.ts.map node_modules/discord-api-types/gateway/index.d.ts 0000664 00000000072 15114741631 0016127 0 ustar 00 export * from './v10'; //# sourceMappingURL=index.d.ts.map node_modules/discord-api-types/gateway/v9.js 0000664 00000035652 15114741631 0015136 0 ustar 00 "use strict"; /** * Types extracted from https://discord.com/developers/docs/topics/gateway */ Object.defineProperty(exports, "__esModule", { value: true }); exports.VoiceChannelEffectSendAnimationType = exports.GatewayDispatchEvents = exports.GatewayIntentBits = exports.GatewayCloseCodes = exports.GatewayOpcodes = exports.GatewayVersion = void 0; exports.GatewayVersion = '9'; /** * @see {@link https://discord.com/developers/docs/topics/opcodes-and-status-codes#gateway-gateway-opcodes} */ var GatewayOpcodes; (function (GatewayOpcodes) { /** * An event was dispatched */ GatewayOpcodes[GatewayOpcodes["Dispatch"] = 0] = "Dispatch"; /** * A bidirectional opcode to maintain an active gateway connection. * Fired periodically by the client, or fired by the gateway to request an immediate heartbeat from the client. */ GatewayOpcodes[GatewayOpcodes["Heartbeat"] = 1] = "Heartbeat"; /** * Starts a new session during the initial handshake */ GatewayOpcodes[GatewayOpcodes["Identify"] = 2] = "Identify"; /** * Update the client's presence */ GatewayOpcodes[GatewayOpcodes["PresenceUpdate"] = 3] = "PresenceUpdate"; /** * Used to join/leave or move between voice channels */ GatewayOpcodes[GatewayOpcodes["VoiceStateUpdate"] = 4] = "VoiceStateUpdate"; /** * Resume a previous session that was disconnected */ GatewayOpcodes[GatewayOpcodes["Resume"] = 6] = "Resume"; /** * You should attempt to reconnect and resume immediately */ GatewayOpcodes[GatewayOpcodes["Reconnect"] = 7] = "Reconnect"; /** * Request information about offline guild members in a large guild */ GatewayOpcodes[GatewayOpcodes["RequestGuildMembers"] = 8] = "RequestGuildMembers"; /** * The session has been invalidated. You should reconnect and identify/resume accordingly */ GatewayOpcodes[GatewayOpcodes["InvalidSession"] = 9] = "InvalidSession"; /** * Sent immediately after connecting, contains the `heartbeat_interval` to use */ GatewayOpcodes[GatewayOpcodes["Hello"] = 10] = "Hello"; /** * Sent in response to receiving a heartbeat to acknowledge that it has been received */ GatewayOpcodes[GatewayOpcodes["HeartbeatAck"] = 11] = "HeartbeatAck"; /** * Request information about soundboard sounds in a set of guilds */ GatewayOpcodes[GatewayOpcodes["RequestSoundboardSounds"] = 31] = "RequestSoundboardSounds"; })(GatewayOpcodes || (exports.GatewayOpcodes = GatewayOpcodes = {})); /** * @see {@link https://discord.com/developers/docs/topics/opcodes-and-status-codes#gateway-gateway-close-event-codes} */ var GatewayCloseCodes; (function (GatewayCloseCodes) { /** * We're not sure what went wrong. Try reconnecting? */ GatewayCloseCodes[GatewayCloseCodes["UnknownError"] = 4000] = "UnknownError"; /** * You sent an invalid Gateway opcode or an invalid payload for an opcode. Don't do that! * * @see {@link https://discord.com/developers/docs/topics/gateway-events#payload-structure} */ GatewayCloseCodes[GatewayCloseCodes["UnknownOpcode"] = 4001] = "UnknownOpcode"; /** * You sent an invalid payload to us. Don't do that! * * @see {@link https://discord.com/developers/docs/topics/gateway#sending-events} */ GatewayCloseCodes[GatewayCloseCodes["DecodeError"] = 4002] = "DecodeError"; /** * You sent us a payload prior to identifying * * @see {@link https://discord.com/developers/docs/topics/gateway-events#identify} */ GatewayCloseCodes[GatewayCloseCodes["NotAuthenticated"] = 4003] = "NotAuthenticated"; /** * The account token sent with your identify payload is incorrect * * @see {@link https://discord.com/developers/docs/topics/gateway-events#identify} */ GatewayCloseCodes[GatewayCloseCodes["AuthenticationFailed"] = 4004] = "AuthenticationFailed"; /** * You sent more than one identify payload. Don't do that! */ GatewayCloseCodes[GatewayCloseCodes["AlreadyAuthenticated"] = 4005] = "AlreadyAuthenticated"; /** * The sequence sent when resuming the session was invalid. Reconnect and start a new session * * @see {@link https://discord.com/developers/docs/topics/gateway-events#resume} */ GatewayCloseCodes[GatewayCloseCodes["InvalidSeq"] = 4007] = "InvalidSeq"; /** * Woah nelly! You're sending payloads to us too quickly. Slow it down! You will be disconnected on receiving this */ GatewayCloseCodes[GatewayCloseCodes["RateLimited"] = 4008] = "RateLimited"; /** * Your session timed out. Reconnect and start a new one */ GatewayCloseCodes[GatewayCloseCodes["SessionTimedOut"] = 4009] = "SessionTimedOut"; /** * You sent us an invalid shard when identifying * * @see {@link https://discord.com/developers/docs/topics/gateway#sharding} */ GatewayCloseCodes[GatewayCloseCodes["InvalidShard"] = 4010] = "InvalidShard"; /** * The session would have handled too many guilds - you are required to shard your connection in order to connect * * @see {@link https://discord.com/developers/docs/topics/gateway#sharding} */ GatewayCloseCodes[GatewayCloseCodes["ShardingRequired"] = 4011] = "ShardingRequired"; /** * You sent an invalid version for the gateway */ GatewayCloseCodes[GatewayCloseCodes["InvalidAPIVersion"] = 4012] = "InvalidAPIVersion"; /** * You sent an invalid intent for a Gateway Intent. You may have incorrectly calculated the bitwise value * * @see {@link https://discord.com/developers/docs/topics/gateway#gateway-intents} */ GatewayCloseCodes[GatewayCloseCodes["InvalidIntents"] = 4013] = "InvalidIntents"; /** * You sent a disallowed intent for a Gateway Intent. You may have tried to specify an intent that you have not * enabled or are not whitelisted for * * @see {@link https://discord.com/developers/docs/topics/gateway#gateway-intents} * @see {@link https://discord.com/developers/docs/topics/gateway#privileged-intents} */ GatewayCloseCodes[GatewayCloseCodes["DisallowedIntents"] = 4014] = "DisallowedIntents"; })(GatewayCloseCodes || (exports.GatewayCloseCodes = GatewayCloseCodes = {})); /** * @see {@link https://discord.com/developers/docs/topics/gateway#list-of-intents} */ var GatewayIntentBits; (function (GatewayIntentBits) { GatewayIntentBits[GatewayIntentBits["Guilds"] = 1] = "Guilds"; GatewayIntentBits[GatewayIntentBits["GuildMembers"] = 2] = "GuildMembers"; GatewayIntentBits[GatewayIntentBits["GuildModeration"] = 4] = "GuildModeration"; /** * @deprecated This is the old name for {@link GatewayIntentBits.GuildModeration} */ GatewayIntentBits[GatewayIntentBits["GuildBans"] = 4] = "GuildBans"; GatewayIntentBits[GatewayIntentBits["GuildExpressions"] = 8] = "GuildExpressions"; /** * @deprecated This is the old name for {@link GatewayIntentBits.GuildExpressions} */ GatewayIntentBits[GatewayIntentBits["GuildEmojisAndStickers"] = 8] = "GuildEmojisAndStickers"; GatewayIntentBits[GatewayIntentBits["GuildIntegrations"] = 16] = "GuildIntegrations"; GatewayIntentBits[GatewayIntentBits["GuildWebhooks"] = 32] = "GuildWebhooks"; GatewayIntentBits[GatewayIntentBits["GuildInvites"] = 64] = "GuildInvites"; GatewayIntentBits[GatewayIntentBits["GuildVoiceStates"] = 128] = "GuildVoiceStates"; GatewayIntentBits[GatewayIntentBits["GuildPresences"] = 256] = "GuildPresences"; GatewayIntentBits[GatewayIntentBits["GuildMessages"] = 512] = "GuildMessages"; GatewayIntentBits[GatewayIntentBits["GuildMessageReactions"] = 1024] = "GuildMessageReactions"; GatewayIntentBits[GatewayIntentBits["GuildMessageTyping"] = 2048] = "GuildMessageTyping"; GatewayIntentBits[GatewayIntentBits["DirectMessages"] = 4096] = "DirectMessages"; GatewayIntentBits[GatewayIntentBits["DirectMessageReactions"] = 8192] = "DirectMessageReactions"; GatewayIntentBits[GatewayIntentBits["DirectMessageTyping"] = 16384] = "DirectMessageTyping"; GatewayIntentBits[GatewayIntentBits["GuildScheduledEvents"] = 65536] = "GuildScheduledEvents"; GatewayIntentBits[GatewayIntentBits["AutoModerationConfiguration"] = 1048576] = "AutoModerationConfiguration"; GatewayIntentBits[GatewayIntentBits["AutoModerationExecution"] = 2097152] = "AutoModerationExecution"; GatewayIntentBits[GatewayIntentBits["GuildMessagePolls"] = 16777216] = "GuildMessagePolls"; GatewayIntentBits[GatewayIntentBits["DirectMessagePolls"] = 33554432] = "DirectMessagePolls"; })(GatewayIntentBits || (exports.GatewayIntentBits = GatewayIntentBits = {})); /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#receive-events} */ var GatewayDispatchEvents; (function (GatewayDispatchEvents) { GatewayDispatchEvents["ApplicationCommandPermissionsUpdate"] = "APPLICATION_COMMAND_PERMISSIONS_UPDATE"; GatewayDispatchEvents["AutoModerationActionExecution"] = "AUTO_MODERATION_ACTION_EXECUTION"; GatewayDispatchEvents["AutoModerationRuleCreate"] = "AUTO_MODERATION_RULE_CREATE"; GatewayDispatchEvents["AutoModerationRuleDelete"] = "AUTO_MODERATION_RULE_DELETE"; GatewayDispatchEvents["AutoModerationRuleUpdate"] = "AUTO_MODERATION_RULE_UPDATE"; GatewayDispatchEvents["ChannelCreate"] = "CHANNEL_CREATE"; GatewayDispatchEvents["ChannelDelete"] = "CHANNEL_DELETE"; GatewayDispatchEvents["ChannelPinsUpdate"] = "CHANNEL_PINS_UPDATE"; GatewayDispatchEvents["ChannelUpdate"] = "CHANNEL_UPDATE"; GatewayDispatchEvents["EntitlementCreate"] = "ENTITLEMENT_CREATE"; GatewayDispatchEvents["EntitlementDelete"] = "ENTITLEMENT_DELETE"; GatewayDispatchEvents["EntitlementUpdate"] = "ENTITLEMENT_UPDATE"; GatewayDispatchEvents["GuildAuditLogEntryCreate"] = "GUILD_AUDIT_LOG_ENTRY_CREATE"; GatewayDispatchEvents["GuildBanAdd"] = "GUILD_BAN_ADD"; GatewayDispatchEvents["GuildBanRemove"] = "GUILD_BAN_REMOVE"; GatewayDispatchEvents["GuildCreate"] = "GUILD_CREATE"; GatewayDispatchEvents["GuildDelete"] = "GUILD_DELETE"; GatewayDispatchEvents["GuildEmojisUpdate"] = "GUILD_EMOJIS_UPDATE"; GatewayDispatchEvents["GuildIntegrationsUpdate"] = "GUILD_INTEGRATIONS_UPDATE"; GatewayDispatchEvents["GuildMemberAdd"] = "GUILD_MEMBER_ADD"; GatewayDispatchEvents["GuildMemberRemove"] = "GUILD_MEMBER_REMOVE"; GatewayDispatchEvents["GuildMembersChunk"] = "GUILD_MEMBERS_CHUNK"; GatewayDispatchEvents["GuildMemberUpdate"] = "GUILD_MEMBER_UPDATE"; GatewayDispatchEvents["GuildRoleCreate"] = "GUILD_ROLE_CREATE"; GatewayDispatchEvents["GuildRoleDelete"] = "GUILD_ROLE_DELETE"; GatewayDispatchEvents["GuildRoleUpdate"] = "GUILD_ROLE_UPDATE"; GatewayDispatchEvents["GuildScheduledEventCreate"] = "GUILD_SCHEDULED_EVENT_CREATE"; GatewayDispatchEvents["GuildScheduledEventDelete"] = "GUILD_SCHEDULED_EVENT_DELETE"; GatewayDispatchEvents["GuildScheduledEventUpdate"] = "GUILD_SCHEDULED_EVENT_UPDATE"; GatewayDispatchEvents["GuildScheduledEventUserAdd"] = "GUILD_SCHEDULED_EVENT_USER_ADD"; GatewayDispatchEvents["GuildScheduledEventUserRemove"] = "GUILD_SCHEDULED_EVENT_USER_REMOVE"; GatewayDispatchEvents["GuildSoundboardSoundCreate"] = "GUILD_SOUNDBOARD_SOUND_CREATE"; GatewayDispatchEvents["GuildSoundboardSoundDelete"] = "GUILD_SOUNDBOARD_SOUND_DELETE"; GatewayDispatchEvents["GuildSoundboardSoundsUpdate"] = "GUILD_SOUNDBOARD_SOUNDS_UPDATE"; GatewayDispatchEvents["GuildSoundboardSoundUpdate"] = "GUILD_SOUNDBOARD_SOUND_UPDATE"; GatewayDispatchEvents["SoundboardSounds"] = "SOUNDBOARD_SOUNDS"; GatewayDispatchEvents["GuildStickersUpdate"] = "GUILD_STICKERS_UPDATE"; GatewayDispatchEvents["GuildUpdate"] = "GUILD_UPDATE"; GatewayDispatchEvents["IntegrationCreate"] = "INTEGRATION_CREATE"; GatewayDispatchEvents["IntegrationDelete"] = "INTEGRATION_DELETE"; GatewayDispatchEvents["IntegrationUpdate"] = "INTEGRATION_UPDATE"; GatewayDispatchEvents["InteractionCreate"] = "INTERACTION_CREATE"; GatewayDispatchEvents["InviteCreate"] = "INVITE_CREATE"; GatewayDispatchEvents["InviteDelete"] = "INVITE_DELETE"; GatewayDispatchEvents["MessageCreate"] = "MESSAGE_CREATE"; GatewayDispatchEvents["MessageDelete"] = "MESSAGE_DELETE"; GatewayDispatchEvents["MessageDeleteBulk"] = "MESSAGE_DELETE_BULK"; GatewayDispatchEvents["MessagePollVoteAdd"] = "MESSAGE_POLL_VOTE_ADD"; GatewayDispatchEvents["MessagePollVoteRemove"] = "MESSAGE_POLL_VOTE_REMOVE"; GatewayDispatchEvents["MessageReactionAdd"] = "MESSAGE_REACTION_ADD"; GatewayDispatchEvents["MessageReactionRemove"] = "MESSAGE_REACTION_REMOVE"; GatewayDispatchEvents["MessageReactionRemoveAll"] = "MESSAGE_REACTION_REMOVE_ALL"; GatewayDispatchEvents["MessageReactionRemoveEmoji"] = "MESSAGE_REACTION_REMOVE_EMOJI"; GatewayDispatchEvents["MessageUpdate"] = "MESSAGE_UPDATE"; GatewayDispatchEvents["PresenceUpdate"] = "PRESENCE_UPDATE"; GatewayDispatchEvents["Ready"] = "READY"; GatewayDispatchEvents["Resumed"] = "RESUMED"; GatewayDispatchEvents["StageInstanceCreate"] = "STAGE_INSTANCE_CREATE"; GatewayDispatchEvents["StageInstanceDelete"] = "STAGE_INSTANCE_DELETE"; GatewayDispatchEvents["StageInstanceUpdate"] = "STAGE_INSTANCE_UPDATE"; GatewayDispatchEvents["SubscriptionCreate"] = "SUBSCRIPTION_CREATE"; GatewayDispatchEvents["SubscriptionDelete"] = "SUBSCRIPTION_DELETE"; GatewayDispatchEvents["SubscriptionUpdate"] = "SUBSCRIPTION_UPDATE"; GatewayDispatchEvents["ThreadCreate"] = "THREAD_CREATE"; GatewayDispatchEvents["ThreadDelete"] = "THREAD_DELETE"; GatewayDispatchEvents["ThreadListSync"] = "THREAD_LIST_SYNC"; GatewayDispatchEvents["ThreadMembersUpdate"] = "THREAD_MEMBERS_UPDATE"; GatewayDispatchEvents["ThreadMemberUpdate"] = "THREAD_MEMBER_UPDATE"; GatewayDispatchEvents["ThreadUpdate"] = "THREAD_UPDATE"; GatewayDispatchEvents["TypingStart"] = "TYPING_START"; GatewayDispatchEvents["UserUpdate"] = "USER_UPDATE"; GatewayDispatchEvents["VoiceChannelEffectSend"] = "VOICE_CHANNEL_EFFECT_SEND"; GatewayDispatchEvents["VoiceServerUpdate"] = "VOICE_SERVER_UPDATE"; GatewayDispatchEvents["VoiceStateUpdate"] = "VOICE_STATE_UPDATE"; GatewayDispatchEvents["WebhooksUpdate"] = "WEBHOOKS_UPDATE"; })(GatewayDispatchEvents || (exports.GatewayDispatchEvents = GatewayDispatchEvents = {})); /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#voice-channel-effect-send-animation-types} */ var VoiceChannelEffectSendAnimationType; (function (VoiceChannelEffectSendAnimationType) { /** * A fun animation, sent by a Nitro subscriber */ VoiceChannelEffectSendAnimationType[VoiceChannelEffectSendAnimationType["Premium"] = 0] = "Premium"; /** * The standard animation */ VoiceChannelEffectSendAnimationType[VoiceChannelEffectSendAnimationType["Basic"] = 1] = "Basic"; })(VoiceChannelEffectSendAnimationType || (exports.VoiceChannelEffectSendAnimationType = VoiceChannelEffectSendAnimationType = {})); // #endregion Shared //# sourceMappingURL=v9.js.map node_modules/discord-api-types/gateway/v10.mjs 0000664 00000000641 15114741631 0015351 0 ustar 00 import mod from "./v10.js"; export default mod; export const GatewayCloseCodes = mod.GatewayCloseCodes; export const GatewayDispatchEvents = mod.GatewayDispatchEvents; export const GatewayIntentBits = mod.GatewayIntentBits; export const GatewayOpcodes = mod.GatewayOpcodes; export const GatewayVersion = mod.GatewayVersion; export const VoiceChannelEffectSendAnimationType = mod.VoiceChannelEffectSendAnimationType; node_modules/discord-api-types/gateway/v6.js.map 0000664 00000004533 15114741631 0015701 0 ustar 00 {"version":3,"file":"v6.js","sourceRoot":"","sources":["v6.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AAoBH;;GAEG;AACU,QAAA,cAAc,GAAG,GAAG,CAAC;AAElC;;;;GAIG;AACH,IAAY,cAaX;AAbD,WAAY,cAAc;IACzB,2DAAQ,CAAA;IACR,6DAAS,CAAA;IACT,2DAAQ,CAAA;IACR,uEAAc,CAAA;IACd,2EAAgB,CAAA;IAEhB,uDAAU,CAAA;IACV,6DAAS,CAAA;IACT,iFAAmB,CAAA;IACnB,uEAAc,CAAA;IACd,sDAAK,CAAA;IACL,oEAAY,CAAA;AACb,CAAC,EAbW,cAAc,8BAAd,cAAc,QAazB;AAED;;;;GAIG;AACH,IAAY,iBAgBX;AAhBD,WAAY,iBAAiB;IAC5B,4EAAoB,CAAA;IACpB,8EAAa,CAAA;IACb,0EAAW,CAAA;IACX,oFAAgB,CAAA;IAChB,4FAAoB,CAAA;IACpB,4FAAoB,CAAA;IAEpB,wEAAkB,CAAA;IAClB,0EAAW,CAAA;IACX,kFAAe,CAAA;IACf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WAAY,qBAAqB;IAChC,wCAAe,CAAA;IACf,4CAAmB,CAAA;IACnB,yDAAgC,CAAA;IAChC,yDAAgC,CAAA;IAChC,yDAAgC,CAAA;IAChC,kEAAyC,CAAA;IACzC,qDAA4B,CAAA;IAC5B,qDAA4B,CAAA;IAC5B,qDAA4B,CAAA;IAC5B,sDAA6B,CAAA;IAC7B,4DAAmC,CAAA;IACnC,kEAAyC,CAAA;IACzC,8EAAqD,CAAA;IACrD,4DAAmC,CAAA;IACnC,kEAAyC,CAAA;IACzC,kEAAyC,CAAA;IACzC,kEAAyC,CAAA;IACzC,8DAAqC,CAAA;IACrC,8DAAqC,CAAA;IACrC,8DAAqC,CAAA;IACrC,uDAA8B,CAAA;IAC9B,uDAA8B,CAAA;IAC9B,yDAAgC,CAAA;IAChC,yDAAgC,CAAA;IAChC,yDAAgC,CAAA;IAChC,kEAAyC,CAAA;IACzC,oEAA2C,CAAA;IAC3C,0EAAiD,CAAA;IACjD,iFAAwD,CAAA;IACxD,qFAA4D,CAAA;IAC5D,2DAAkC,CAAA;IAClC,qDAA4B,CAAA;IAC5B,mDAA0B,CAAA;IAC1B,gEAAuC,CAAA;IACvC,kEAAyC,CAAA;IACzC,2DAAkC,CAAA;AACnC,CAAC,EArCW,qBAAqB,qCAArB,qBAAqB,QAqChC;AAirBD,oBAAoB"} node_modules/discord-api-types/gateway/v8.js.map 0000664 00000004546 15114741631 0015707 0 ustar 00 {"version":3,"file":"v8.js","sourceRoot":"","sources":["v8.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AA4BH;;GAEG;AACU,QAAA,cAAc,GAAG,GAAG,CAAC;AAElC;;;;GAIG;AACH,IAAY,cA8CX;AA9CD,WAAY,cAAc;IACzB;;OAEG;IACH,2DAAQ,CAAA;IACR;;;OAGG;IACH,6DAAS,CAAA;IACT;;OAEG;IACH,2DAAQ,CAAA;IACR;;OAEG;IACH,uEAAc,CAAA;IACd;;OAEG;IACH,2EAAgB,CAAA;IAChB;;OAEG;IACH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CAAC,GAAG,OAAO,CAAE,SAAQ,YAAY;IACnG,EAAE,EAAE,cAAc,CAAC,QAAQ,CAAC;IAC5B,CAAC,EAAE,KAAK,CAAC;IACT,CAAC,EAAE,CAAC,CAAC;CACL;AAGD,MAAM,MAAM,0BAA0B,CAAC,CAAC,SAAS,qBAAqB,EAAE,CAAC,SAAS,MAAM,GAAG,KAAK,IAAI,YAAY,CAC/G,CAAC,EACD,IAAI,CAAC,qCAAqC,EAAE,CAAC,CAAC,CAC9C,CAAC;AAEF,MAAM,WAAW,gCAAgC;IAChD;;OAEG;IACH,UAAU,EAAE,SAAS,CAAC;IACtB;;OAEG;IACH,UAAU,EAAE,SAAS,CAAC;IACtB;;OAEG;IACH,QAAQ,CAAC,EAAE,SAAS,CAAC;CACrB"} node_modules/discord-api-types/gateway/common.js 0000664 00000000157 15114741631 0016060 0 ustar 00 "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); //# sourceMappingURL=common.js.map node_modules/discord-api-types/gateway/v8.mjs 0000664 00000000504 15114741631 0015276 0 ustar 00 import mod from "./v8.js"; export default mod; export const GatewayCloseCodes = mod.GatewayCloseCodes; export const GatewayDispatchEvents = mod.GatewayDispatchEvents; export const GatewayIntentBits = mod.GatewayIntentBits; export const GatewayOpcodes = mod.GatewayOpcodes; export const GatewayVersion = mod.GatewayVersion; node_modules/discord-api-types/gateway/v10.js.map 0000664 00000006147 15114741631 0015757 0 ustar 00 {"version":3,"file":"v10.js","sourceRoot":"","sources":["v10.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AAqDU,QAAA,cAAc,GAAG,IAAI,CAAC;AAEnC;;GAEG;AACH,IAAY,cAkDX;AAlDD,WAAY,cAAc;IACzB;;OAEG;IACH,2DAAQ,CAAA;IACR;;;OAGG;IACH,6DAAS,CAAA;IACT;;OAEG;IACH,2DAAQ,CAAA;IACR;;OAEG;IACH,uEAAc,CAAA;IACd;;OAEG;IACH,2EAAgB,CAAA;IAChB;;OAEG;IACH,uDAAU,CAAA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CAAA;IAC5C,2EAAkD,CAAA;IAClD,oEAA2C,CAAA;IAC3C,0EAAiD,CAAA;IACjD,iFAAwD,CAAA;IACxD,qFAA4D,CAAA;IAC5D,yDAAgC,CAAA;IAChC,2DAAkC,CAAA;IAClC,wCAAe,CAAA;IACf,4CAAmB,CAAA;IACnB,sEAA6C,CAAA;IAC7C,sEAA6C,CAAA;IAC7C,sEAA6C,CAAA;IAC7C,mEAA0C,CAAA;IAC1C,mEAA0C,CAAA;IAC1C,mEAA0C,CAAA;IAC1C,uDAA8B,CAAA;IAC9B,uDAA8B,CAAA;IAC9B,4DAAmC,CAAA;IACnC,sEAA6C,CAAA;IAC7C,oEAA2C,CAAA;IAC3C,uDAA8B,CAAA;IAC9B,qDAA4B,CAAA;IAC5B,mDAA0B,CAAA;IAC1B,6EAAoD,CAAA;IACpD,kEAAyC,CAAA;IACzC,gEAAuC,CAAA;IACvC,2DAAkC,CAAA;AACnC,CAAC,EA5EW,qBAAqB,qCAArB,qBAAqB,QA4EhC;AAuuDD;;GAEG;AACH,IAAY,mCASX;AATD,WAAY,mCAAmC;IAC9C;;OAEG;IACH,mGAAO,CAAA;IACP;;OAEG;IACH,+FAAK,CAAA;AACN,CAAC,EATW,mCAAmC,mDAAnC,mCAAmC,QAS9C;AAicD,oBAAoB"} node_modules/discord-api-types/gateway/index.mjs 0000664 00000000643 15114741631 0016054 0 ustar 00 import mod from "./index.js"; export default mod; export const GatewayCloseCodes = mod.GatewayCloseCodes; export const GatewayDispatchEvents = mod.GatewayDispatchEvents; export const GatewayIntentBits = mod.GatewayIntentBits; export const GatewayOpcodes = mod.GatewayOpcodes; export const GatewayVersion = mod.GatewayVersion; export const VoiceChannelEffectSendAnimationType = mod.VoiceChannelEffectSendAnimationType; node_modules/discord-api-types/gateway/index.js.map 0000664 00000000224 15114741631 0016446 0 ustar 00 {"version":3,"file":"index.js","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":";AAAA,+EAA+E;AAC/E,2FAA2F;;;;;;;;;;;;;;;;AAE3F,wCAAsB"} node_modules/discord-api-types/gateway/v9.mjs 0000664 00000000640 15114741631 0015300 0 ustar 00 import mod from "./v9.js"; export default mod; export const GatewayCloseCodes = mod.GatewayCloseCodes; export const GatewayDispatchEvents = mod.GatewayDispatchEvents; export const GatewayIntentBits = mod.GatewayIntentBits; export const GatewayOpcodes = mod.GatewayOpcodes; export const GatewayVersion = mod.GatewayVersion; export const VoiceChannelEffectSendAnimationType = mod.VoiceChannelEffectSendAnimationType; node_modules/discord-api-types/gateway/common.d.ts 0000664 00000000412 15114741631 0016306 0 ustar 00 /** * @see {@link https://discord.com/developers/docs/topics/gateway#connecting-gateway-url-query-string-params} */ export interface GatewayURLQuery { v: string; encoding: 'etf' | 'json'; compress?: 'zlib-stream'; } //# sourceMappingURL=common.d.ts.map node_modules/discord-api-types/gateway/index.js 0000664 00000001753 15114741631 0015702 0 ustar 00 "use strict"; // This file exports all the types available in the recommended gateway version // Thereby, things MAY break in the future. Try sticking to imports from a specific version var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { if (k2 === undefined) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { return m[k]; } }; } Object.defineProperty(o, k2, desc); }) : (function(o, m, k, k2) { if (k2 === undefined) k2 = k; o[k2] = m[k]; })); var __exportStar = (this && this.__exportStar) || function(m, exports) { for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); }; Object.defineProperty(exports, "__esModule", { value: true }); __exportStar(require("./v10"), exports); //# sourceMappingURL=index.js.map node_modules/discord-api-types/gateway/v6.js 0000664 00000023416 15114741631 0015126 0 ustar 00 "use strict"; /** * Types extracted from https://discord.com/developers/docs/topics/gateway */ Object.defineProperty(exports, "__esModule", { value: true }); exports.GatewayDispatchEvents = exports.GatewayIntentBits = exports.VoiceCloseCodes = exports.VoiceOPCodes = exports.GatewayCloseCodes = exports.GatewayOPCodes = exports.GatewayVersion = void 0; /** * @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8. */ exports.GatewayVersion = '6'; /** * https://discord.com/developers/docs/topics/opcodes-and-status-codes#gateway-gateway-opcodes * * @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8. */ var GatewayOPCodes; (function (GatewayOPCodes) { GatewayOPCodes[GatewayOPCodes["Dispatch"] = 0] = "Dispatch"; GatewayOPCodes[GatewayOPCodes["Heartbeat"] = 1] = "Heartbeat"; GatewayOPCodes[GatewayOPCodes["Identify"] = 2] = "Identify"; GatewayOPCodes[GatewayOPCodes["PresenceUpdate"] = 3] = "PresenceUpdate"; GatewayOPCodes[GatewayOPCodes["VoiceStateUpdate"] = 4] = "VoiceStateUpdate"; GatewayOPCodes[GatewayOPCodes["Resume"] = 6] = "Resume"; GatewayOPCodes[GatewayOPCodes["Reconnect"] = 7] = "Reconnect"; GatewayOPCodes[GatewayOPCodes["RequestGuildMembers"] = 8] = "RequestGuildMembers"; GatewayOPCodes[GatewayOPCodes["InvalidSession"] = 9] = "InvalidSession"; GatewayOPCodes[GatewayOPCodes["Hello"] = 10] = "Hello"; GatewayOPCodes[GatewayOPCodes["HeartbeatAck"] = 11] = "HeartbeatAck"; })(GatewayOPCodes || (exports.GatewayOPCodes = GatewayOPCodes = {})); /** * https://discord.com/developers/docs/topics/opcodes-and-status-codes#gateway-gateway-close-event-codes * * @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8. */ var GatewayCloseCodes; (function (GatewayCloseCodes) { GatewayCloseCodes[GatewayCloseCodes["UnknownError"] = 4000] = "UnknownError"; GatewayCloseCodes[GatewayCloseCodes["UnknownOpCode"] = 4001] = "UnknownOpCode"; GatewayCloseCodes[GatewayCloseCodes["DecodeError"] = 4002] = "DecodeError"; GatewayCloseCodes[GatewayCloseCodes["NotAuthenticated"] = 4003] = "NotAuthenticated"; GatewayCloseCodes[GatewayCloseCodes["AuthenticationFailed"] = 4004] = "AuthenticationFailed"; GatewayCloseCodes[GatewayCloseCodes["AlreadyAuthenticated"] = 4005] = "AlreadyAuthenticated"; GatewayCloseCodes[GatewayCloseCodes["InvalidSeq"] = 4007] = "InvalidSeq"; GatewayCloseCodes[GatewayCloseCodes["RateLimited"] = 4008] = "RateLimited"; GatewayCloseCodes[GatewayCloseCodes["SessionTimedOut"] = 4009] = "SessionTimedOut"; GatewayCloseCodes[GatewayCloseCodes["InvalidShard"] = 4010] = "InvalidShard"; GatewayCloseCodes[GatewayCloseCodes["ShardingRequired"] = 4011] = "ShardingRequired"; GatewayCloseCodes[GatewayCloseCodes["InvalidAPIVersion"] = 4012] = "InvalidAPIVersion"; GatewayCloseCodes[GatewayCloseCodes["InvalidIntents"] = 4013] = "InvalidIntents"; GatewayCloseCodes[GatewayCloseCodes["DisallowedIntents"] = 4014] = "DisallowedIntents"; })(GatewayCloseCodes || (exports.GatewayCloseCodes = GatewayCloseCodes = {})); /** * https://discord.com/developers/docs/topics/opcodes-and-status-codes#voice-voice-opcodes * * @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8. */ var VoiceOPCodes; (function (VoiceOPCodes) { VoiceOPCodes[VoiceOPCodes["Identify"] = 0] = "Identify"; VoiceOPCodes[VoiceOPCodes["SelectProtocol"] = 1] = "SelectProtocol"; VoiceOPCodes[VoiceOPCodes["Ready"] = 2] = "Ready"; VoiceOPCodes[VoiceOPCodes["Heartbeat"] = 3] = "Heartbeat"; VoiceOPCodes[VoiceOPCodes["SessionDescription"] = 4] = "SessionDescription"; VoiceOPCodes[VoiceOPCodes["Speaking"] = 5] = "Speaking"; VoiceOPCodes[VoiceOPCodes["HeartbeatAck"] = 6] = "HeartbeatAck"; VoiceOPCodes[VoiceOPCodes["Resume"] = 7] = "Resume"; VoiceOPCodes[VoiceOPCodes["Hello"] = 8] = "Hello"; VoiceOPCodes[VoiceOPCodes["Resumed"] = 9] = "Resumed"; VoiceOPCodes[VoiceOPCodes["ClientDisconnect"] = 13] = "ClientDisconnect"; })(VoiceOPCodes || (exports.VoiceOPCodes = VoiceOPCodes = {})); /** * https://discord.com/developers/docs/topics/opcodes-and-status-codes#voice-voice-close-event-codes * * @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8. */ var VoiceCloseCodes; (function (VoiceCloseCodes) { VoiceCloseCodes[VoiceCloseCodes["UnknownOpCode"] = 4001] = "UnknownOpCode"; VoiceCloseCodes[VoiceCloseCodes["NotAuthenticated"] = 4003] = "NotAuthenticated"; VoiceCloseCodes[VoiceCloseCodes["AuthenticationFailed"] = 4004] = "AuthenticationFailed"; VoiceCloseCodes[VoiceCloseCodes["AlreadyAuthenticated"] = 4005] = "AlreadyAuthenticated"; VoiceCloseCodes[VoiceCloseCodes["SessionNoLongerValid"] = 4006] = "SessionNoLongerValid"; VoiceCloseCodes[VoiceCloseCodes["SessionTimeout"] = 4009] = "SessionTimeout"; VoiceCloseCodes[VoiceCloseCodes["ServerNotFound"] = 4011] = "ServerNotFound"; VoiceCloseCodes[VoiceCloseCodes["UnknownProtocol"] = 4012] = "UnknownProtocol"; VoiceCloseCodes[VoiceCloseCodes["Disconnected"] = 4014] = "Disconnected"; VoiceCloseCodes[VoiceCloseCodes["VoiceServerCrashed"] = 4015] = "VoiceServerCrashed"; VoiceCloseCodes[VoiceCloseCodes["UnknownEncryptionMode"] = 4016] = "UnknownEncryptionMode"; })(VoiceCloseCodes || (exports.VoiceCloseCodes = VoiceCloseCodes = {})); /** * https://discord.com/developers/docs/topics/gateway#list-of-intents * * @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8. */ var GatewayIntentBits; (function (GatewayIntentBits) { GatewayIntentBits[GatewayIntentBits["GUILDS"] = 1] = "GUILDS"; GatewayIntentBits[GatewayIntentBits["GUILD_MEMBERS"] = 2] = "GUILD_MEMBERS"; GatewayIntentBits[GatewayIntentBits["GUILD_BANS"] = 4] = "GUILD_BANS"; GatewayIntentBits[GatewayIntentBits["GUILD_EMOJIS"] = 8] = "GUILD_EMOJIS"; GatewayIntentBits[GatewayIntentBits["GUILD_INTEGRATIONS"] = 16] = "GUILD_INTEGRATIONS"; GatewayIntentBits[GatewayIntentBits["GUILD_WEBHOOKS"] = 32] = "GUILD_WEBHOOKS"; GatewayIntentBits[GatewayIntentBits["GUILD_INVITES"] = 64] = "GUILD_INVITES"; GatewayIntentBits[GatewayIntentBits["GUILD_VOICE_STATES"] = 128] = "GUILD_VOICE_STATES"; GatewayIntentBits[GatewayIntentBits["GUILD_PRESENCES"] = 256] = "GUILD_PRESENCES"; GatewayIntentBits[GatewayIntentBits["GUILD_MESSAGES"] = 512] = "GUILD_MESSAGES"; GatewayIntentBits[GatewayIntentBits["GUILD_MESSAGE_REACTIONS"] = 1024] = "GUILD_MESSAGE_REACTIONS"; GatewayIntentBits[GatewayIntentBits["GUILD_MESSAGE_TYPING"] = 2048] = "GUILD_MESSAGE_TYPING"; GatewayIntentBits[GatewayIntentBits["DIRECT_MESSAGES"] = 4096] = "DIRECT_MESSAGES"; GatewayIntentBits[GatewayIntentBits["DIRECT_MESSAGE_REACTIONS"] = 8192] = "DIRECT_MESSAGE_REACTIONS"; GatewayIntentBits[GatewayIntentBits["DIRECT_MESSAGE_TYPING"] = 16384] = "DIRECT_MESSAGE_TYPING"; })(GatewayIntentBits || (exports.GatewayIntentBits = GatewayIntentBits = {})); /** * https://discord.com/developers/docs/topics/gateway#commands-and-events-gateway-events * * @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8. */ var GatewayDispatchEvents; (function (GatewayDispatchEvents) { GatewayDispatchEvents["Ready"] = "READY"; GatewayDispatchEvents["Resumed"] = "RESUMED"; GatewayDispatchEvents["ChannelCreate"] = "CHANNEL_CREATE"; GatewayDispatchEvents["ChannelUpdate"] = "CHANNEL_UPDATE"; GatewayDispatchEvents["ChannelDelete"] = "CHANNEL_DELETE"; GatewayDispatchEvents["ChannelPinsUpdate"] = "CHANNEL_PINS_UPDATE"; GatewayDispatchEvents["GuildCreate"] = "GUILD_CREATE"; GatewayDispatchEvents["GuildUpdate"] = "GUILD_UPDATE"; GatewayDispatchEvents["GuildDelete"] = "GUILD_DELETE"; GatewayDispatchEvents["GuildBanAdd"] = "GUILD_BAN_ADD"; GatewayDispatchEvents["GuildBanRemove"] = "GUILD_BAN_REMOVE"; GatewayDispatchEvents["GuildEmojisUpdate"] = "GUILD_EMOJIS_UPDATE"; GatewayDispatchEvents["GuildIntegrationsUpdate"] = "GUILD_INTEGRATIONS_UPDATE"; GatewayDispatchEvents["GuildMemberAdd"] = "GUILD_MEMBER_ADD"; GatewayDispatchEvents["GuildMemberRemove"] = "GUILD_MEMBER_REMOVE"; GatewayDispatchEvents["GuildMemberUpdate"] = "GUILD_MEMBER_UPDATE"; GatewayDispatchEvents["GuildMembersChunk"] = "GUILD_MEMBERS_CHUNK"; GatewayDispatchEvents["GuildRoleCreate"] = "GUILD_ROLE_CREATE"; GatewayDispatchEvents["GuildRoleUpdate"] = "GUILD_ROLE_UPDATE"; GatewayDispatchEvents["GuildRoleDelete"] = "GUILD_ROLE_DELETE"; GatewayDispatchEvents["InviteCreate"] = "INVITE_CREATE"; GatewayDispatchEvents["InviteDelete"] = "INVITE_DELETE"; GatewayDispatchEvents["MessageCreate"] = "MESSAGE_CREATE"; GatewayDispatchEvents["MessageUpdate"] = "MESSAGE_UPDATE"; GatewayDispatchEvents["MessageDelete"] = "MESSAGE_DELETE"; GatewayDispatchEvents["MessageDeleteBulk"] = "MESSAGE_DELETE_BULK"; GatewayDispatchEvents["MessageReactionAdd"] = "MESSAGE_REACTION_ADD"; GatewayDispatchEvents["MessageReactionRemove"] = "MESSAGE_REACTION_REMOVE"; GatewayDispatchEvents["MessageReactionRemoveAll"] = "MESSAGE_REACTION_REMOVE_ALL"; GatewayDispatchEvents["MessageReactionRemoveEmoji"] = "MESSAGE_REACTION_REMOVE_EMOJI"; GatewayDispatchEvents["PresenceUpdate"] = "PRESENCE_UPDATE"; GatewayDispatchEvents["TypingStart"] = "TYPING_START"; GatewayDispatchEvents["UserUpdate"] = "USER_UPDATE"; GatewayDispatchEvents["VoiceStateUpdate"] = "VOICE_STATE_UPDATE"; GatewayDispatchEvents["VoiceServerUpdate"] = "VOICE_SERVER_UPDATE"; GatewayDispatchEvents["WebhooksUpdate"] = "WEBHOOKS_UPDATE"; })(GatewayDispatchEvents || (exports.GatewayDispatchEvents = GatewayDispatchEvents = {})); // #endregion Shared //# sourceMappingURL=v6.js.map node_modules/discord-api-types/v8.d.ts.map 0000664 00000000352 15114741631 0014471 0 ustar 00 {"version":3,"file":"v8.d.ts","sourceRoot":"","sources":["v8.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAC7B,cAAc,WAAW,CAAC;AAC1B,cAAc,qBAAqB,CAAC;AACpC,cAAc,iBAAiB,CAAC;AAChC,cAAc,UAAU,CAAC;AACzB,OAAO,KAAK,KAAK,MAAM,YAAY,CAAC"} node_modules/discord-api-types/v8.js 0000664 00000002105 15114741631 0013457 0 ustar 00 "use strict"; var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { if (k2 === undefined) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { return m[k]; } }; } Object.defineProperty(o, k2, desc); }) : (function(o, m, k, k2) { if (k2 === undefined) k2 = k; o[k2] = m[k]; })); var __exportStar = (this && this.__exportStar) || function(m, exports) { for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); }; Object.defineProperty(exports, "__esModule", { value: true }); exports.Utils = void 0; __exportStar(require("./gateway/v8"), exports); __exportStar(require("./globals"), exports); __exportStar(require("./payloads/v8/index"), exports); __exportStar(require("./rest/v8/index"), exports); __exportStar(require("./rpc/v8"), exports); exports.Utils = require("./utils/v8"); //# sourceMappingURL=v8.js.map node_modules/discord-api-types/v9.js.map 0000664 00000000303 15114741631 0014232 0 ustar 00 {"version":3,"file":"v9.js","sourceRoot":"","sources":["v9.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,+CAA6B;AAC7B,4CAA0B;AAC1B,sDAAoC;AACpC,kDAAgC;AAChC,2CAAyB;AACzB,oDAAkC;AAClC,sCAAoC"} node_modules/discord-api-types/globals.js 0000664 00000010450 15114741631 0014547 0 ustar 00 "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.FormattingPatterns = void 0; /** * @see {@link https://discord.com/developers/docs/reference#message-formatting-formats} */ exports.FormattingPatterns = { /** * Regular expression for matching a user mention, strictly without a nickname * * The `id` group property is present on the `exec` result of this expression */ User: /<@(?<id>\d{17,20})>/, /** * Regular expression for matching a user mention, strictly with a nickname * * The `id` group property is present on the `exec` result of this expression * * @deprecated Passing `!` in user mentions is no longer necessary / supported, and future message contents won't have it */ UserWithNickname: /<@!(?<id>\d{17,20})>/, /** * Regular expression for matching a user mention, with or without a nickname * * The `id` group property is present on the `exec` result of this expression * * @deprecated Passing `!` in user mentions is no longer necessary / supported, and future message contents won't have it */ UserWithOptionalNickname: /<@!?(?<id>\d{17,20})>/, /** * Regular expression for matching a channel mention * * The `id` group property is present on the `exec` result of this expression */ Channel: /<#(?<id>\d{17,20})>/, /** * Regular expression for matching a role mention * * The `id` group property is present on the `exec` result of this expression */ Role: /<@&(?<id>\d{17,20})>/, /** * Regular expression for matching a application command mention * * The `fullName` (possibly including `name`, `subcommandOrGroup` and `subcommand`) and `id` group properties are present on the `exec` result of this expression */ SlashCommand: /<\/(?<fullName>(?<name>[-_\p{Letter}\p{Number}\p{sc=Deva}\p{sc=Thai}]{1,32})(?: (?<subcommandOrGroup>[-_\p{Letter}\p{Number}\p{sc=Deva}\p{sc=Thai}]{1,32}))?(?: (?<subcommand>[-_\p{Letter}\p{Number}\p{sc=Deva}\p{sc=Thai}]{1,32}))?):(?<id>\d{17,20})>/u, /** * Regular expression for matching a custom emoji, either static or animated * * The `animated`, `name` and `id` group properties are present on the `exec` result of this expression */ Emoji: /<(?<animated>a)?:(?<name>\w{2,32}):(?<id>\d{17,20})>/, /** * Regular expression for matching strictly an animated custom emoji * * The `animated`, `name` and `id` group properties are present on the `exec` result of this expression */ AnimatedEmoji: /<(?<animated>a):(?<name>\w{2,32}):(?<id>\d{17,20})>/, /** * Regular expression for matching strictly a static custom emoji * * The `name` and `id` group properties are present on the `exec` result of this expression */ StaticEmoji: /<:(?<name>\w{2,32}):(?<id>\d{17,20})>/, /** * Regular expression for matching a timestamp, either default or custom styled * * The `timestamp` and `style` group properties are present on the `exec` result of this expression */ // eslint-disable-next-line prefer-named-capture-group Timestamp: /<t:(?<timestamp>-?\d{1,13})(:(?<style>[DFRTdft]))?>/, /** * Regular expression for matching strictly default styled timestamps * * The `timestamp` group property is present on the `exec` result of this expression */ DefaultStyledTimestamp: /<t:(?<timestamp>-?\d{1,13})>/, /** * Regular expression for matching strictly custom styled timestamps * * The `timestamp` and `style` group properties are present on the `exec` result of this expression */ StyledTimestamp: /<t:(?<timestamp>-?\d{1,13}):(?<style>[DFRTdft])>/, /** * Regular expression for matching a guild navigation mention * * The `type` group property is present on the `exec` result of this expression */ GuildNavigation: /<id:(?<type>customize|browse|guide|linked-roles)>/, /** * Regular expression for matching a linked role mention * * The `id` group property is present on the `exec` result of this expression */ LinkedRole: /<id:linked-roles:(?<id>\d{17,20})>/, }; /** * Freezes the formatting patterns * * @internal */ Object.freeze(exports.FormattingPatterns); //# sourceMappingURL=globals.js.map node_modules/discord-api-types/LICENSE 0000664 00000002053 15114741631 0013573 0 ustar 00 MIT License Copyright (c) 2020 vladfrangu Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. node_modules/discord-api-types/v10.d.ts 0000664 00000000407 15114741631 0013767 0 ustar 00 export * from './gateway/v10'; export * from './globals'; export * from './payloads/v10/index'; export * from './rest/v10/index'; export * from './rpc/v10'; export * from './utils/internals'; export * as Utils from './utils/v10'; //# sourceMappingURL=v10.d.ts.map node_modules/discord-api-types/globals.mjs 0000664 00000000157 15114741631 0014727 0 ustar 00 import mod from "./globals.js"; export default mod; export const FormattingPatterns = mod.FormattingPatterns; node_modules/discord-api-types/v6.d.ts.map 0000664 00000000261 15114741631 0014466 0 ustar 00 {"version":3,"file":"v6.d.ts","sourceRoot":"","sources":["v6.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAC7B,cAAc,WAAW,CAAC;AAC1B,cAAc,qBAAqB,CAAC;AACpC,cAAc,iBAAiB,CAAC"} node_modules/discord-api-types/v6.d.ts 0000664 00000000237 15114741631 0013715 0 ustar 00 export * from './gateway/v6'; export * from './globals'; export * from './payloads/v6/index'; export * from './rest/v6/index'; //# sourceMappingURL=v6.d.ts.map node_modules/discord-api-types/v8.d.ts 0000664 00000000336 15114741631 0013717 0 ustar 00 export * from './gateway/v8'; export * from './globals'; export * from './payloads/v8/index'; export * from './rest/v8/index'; export * from './rpc/v8'; export * as Utils from './utils/v8'; //# sourceMappingURL=v8.d.ts.map node_modules/discord-api-types/v9.js 0000664 00000002172 15114741631 0013464 0 ustar 00 "use strict"; var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { if (k2 === undefined) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { return m[k]; } }; } Object.defineProperty(o, k2, desc); }) : (function(o, m, k, k2) { if (k2 === undefined) k2 = k; o[k2] = m[k]; })); var __exportStar = (this && this.__exportStar) || function(m, exports) { for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); }; Object.defineProperty(exports, "__esModule", { value: true }); exports.Utils = void 0; __exportStar(require("./gateway/v9"), exports); __exportStar(require("./globals"), exports); __exportStar(require("./payloads/v9/index"), exports); __exportStar(require("./rest/v9/index"), exports); __exportStar(require("./rpc/v9"), exports); __exportStar(require("./utils/internals"), exports); exports.Utils = require("./utils/v9"); //# sourceMappingURL=v9.js.map node_modules/discord-api-types/v10.mjs 0000664 00000015533 15114741631 0013716 0 ustar 00 import mod from "./v10.js"; export default mod; export const APIApplicationCommandPermissionsConstant = mod.APIApplicationCommandPermissionsConstant; export const APIVersion = mod.APIVersion; export const ActivityFlags = mod.ActivityFlags; export const ActivityPlatform = mod.ActivityPlatform; export const ActivityType = mod.ActivityType; export const AllowedMentionsTypes = mod.AllowedMentionsTypes; export const ApplicationCommandOptionType = mod.ApplicationCommandOptionType; export const ApplicationCommandPermissionType = mod.ApplicationCommandPermissionType; export const ApplicationCommandType = mod.ApplicationCommandType; export const ApplicationFlags = mod.ApplicationFlags; export const ApplicationIntegrationType = mod.ApplicationIntegrationType; export const ApplicationRoleConnectionMetadataType = mod.ApplicationRoleConnectionMetadataType; export const ApplicationWebhookEventStatus = mod.ApplicationWebhookEventStatus; export const ApplicationWebhookEventType = mod.ApplicationWebhookEventType; export const ApplicationWebhookType = mod.ApplicationWebhookType; export const AttachmentFlags = mod.AttachmentFlags; export const AuditLogEvent = mod.AuditLogEvent; export const AuditLogOptionsType = mod.AuditLogOptionsType; export const AutoModerationActionType = mod.AutoModerationActionType; export const AutoModerationRuleEventType = mod.AutoModerationRuleEventType; export const AutoModerationRuleKeywordPresetType = mod.AutoModerationRuleKeywordPresetType; export const AutoModerationRuleTriggerType = mod.AutoModerationRuleTriggerType; export const ButtonStyle = mod.ButtonStyle; export const CDNRoutes = mod.CDNRoutes; export const ChannelFlags = mod.ChannelFlags; export const ChannelType = mod.ChannelType; export const ComponentType = mod.ComponentType; export const ConnectionService = mod.ConnectionService; export const ConnectionVisibility = mod.ConnectionVisibility; export const EmbedType = mod.EmbedType; export const EntitlementOwnerType = mod.EntitlementOwnerType; export const EntitlementType = mod.EntitlementType; export const EntryPointCommandHandlerType = mod.EntryPointCommandHandlerType; export const FormattingPatterns = mod.FormattingPatterns; export const ForumLayoutType = mod.ForumLayoutType; export const GatewayCloseCodes = mod.GatewayCloseCodes; export const GatewayDispatchEvents = mod.GatewayDispatchEvents; export const GatewayIntentBits = mod.GatewayIntentBits; export const GatewayOpcodes = mod.GatewayOpcodes; export const GatewayVersion = mod.GatewayVersion; export const GuildDefaultMessageNotifications = mod.GuildDefaultMessageNotifications; export const GuildExplicitContentFilter = mod.GuildExplicitContentFilter; export const GuildFeature = mod.GuildFeature; export const GuildHubType = mod.GuildHubType; export const GuildMFALevel = mod.GuildMFALevel; export const GuildMemberFlags = mod.GuildMemberFlags; export const GuildNSFWLevel = mod.GuildNSFWLevel; export const GuildOnboardingMode = mod.GuildOnboardingMode; export const GuildOnboardingPromptType = mod.GuildOnboardingPromptType; export const GuildPremiumTier = mod.GuildPremiumTier; export const GuildScheduledEventEntityType = mod.GuildScheduledEventEntityType; export const GuildScheduledEventPrivacyLevel = mod.GuildScheduledEventPrivacyLevel; export const GuildScheduledEventRecurrenceRuleFrequency = mod.GuildScheduledEventRecurrenceRuleFrequency; export const GuildScheduledEventRecurrenceRuleMonth = mod.GuildScheduledEventRecurrenceRuleMonth; export const GuildScheduledEventRecurrenceRuleWeekday = mod.GuildScheduledEventRecurrenceRuleWeekday; export const GuildScheduledEventStatus = mod.GuildScheduledEventStatus; export const GuildSystemChannelFlags = mod.GuildSystemChannelFlags; export const GuildVerificationLevel = mod.GuildVerificationLevel; export const GuildWidgetStyle = mod.GuildWidgetStyle; export const ImageFormat = mod.ImageFormat; export const IntegrationExpireBehavior = mod.IntegrationExpireBehavior; export const InteractionContextType = mod.InteractionContextType; export const InteractionResponseType = mod.InteractionResponseType; export const InteractionType = mod.InteractionType; export const InviteTargetType = mod.InviteTargetType; export const InviteType = mod.InviteType; export const Locale = mod.Locale; export const MembershipScreeningFieldType = mod.MembershipScreeningFieldType; export const MessageActivityType = mod.MessageActivityType; export const MessageFlags = mod.MessageFlags; export const MessageReferenceType = mod.MessageReferenceType; export const MessageType = mod.MessageType; export const NameplatePalette = mod.NameplatePalette; export const OAuth2Routes = mod.OAuth2Routes; export const OAuth2Scopes = mod.OAuth2Scopes; export const OverwriteType = mod.OverwriteType; export const PermissionFlagsBits = mod.PermissionFlagsBits; export const PollLayoutType = mod.PollLayoutType; export const PresenceUpdateStatus = mod.PresenceUpdateStatus; export const RESTJSONErrorCodes = mod.RESTJSONErrorCodes; export const RPCCloseEventCodes = mod.RPCCloseEventCodes; export const RPCCommands = mod.RPCCommands; export const RPCDeviceType = mod.RPCDeviceType; export const RPCErrorCodes = mod.RPCErrorCodes; export const RPCEvents = mod.RPCEvents; export const RPCVersion = mod.RPCVersion; export const RPCVoiceSettingsModeType = mod.RPCVoiceSettingsModeType; export const RPCVoiceShortcutKeyComboKeyType = mod.RPCVoiceShortcutKeyComboKeyType; export const ReactionType = mod.ReactionType; export const RelationshipType = mod.RelationshipType; export const RoleFlags = mod.RoleFlags; export const RouteBases = mod.RouteBases; export const Routes = mod.Routes; export const SKUFlags = mod.SKUFlags; export const SKUType = mod.SKUType; export const SelectMenuDefaultValueType = mod.SelectMenuDefaultValueType; export const SeparatorSpacingSize = mod.SeparatorSpacingSize; export const SortOrderType = mod.SortOrderType; export const StageInstancePrivacyLevel = mod.StageInstancePrivacyLevel; export const StickerFormatType = mod.StickerFormatType; export const StickerPackApplicationId = mod.StickerPackApplicationId; export const StickerType = mod.StickerType; export const SubscriptionStatus = mod.SubscriptionStatus; export const TeamMemberMembershipState = mod.TeamMemberMembershipState; export const TeamMemberRole = mod.TeamMemberRole; export const TextInputStyle = mod.TextInputStyle; export const ThreadAutoArchiveDuration = mod.ThreadAutoArchiveDuration; export const ThreadMemberFlags = mod.ThreadMemberFlags; export const UnfurledMediaItemLoadingState = mod.UnfurledMediaItemLoadingState; export const UserFlags = mod.UserFlags; export const UserPremiumType = mod.UserPremiumType; export const Utils = mod.Utils; export const VideoQualityMode = mod.VideoQualityMode; export const VoiceChannelEffectSendAnimationType = mod.VoiceChannelEffectSendAnimationType; export const VoiceConnectionStates = mod.VoiceConnectionStates; export const WebhookType = mod.WebhookType; export const urlSafeCharacters = mod.urlSafeCharacters; node_modules/discord-api-types/v6.js.map 0000664 00000000233 15114741631 0014231 0 ustar 00 {"version":3,"file":"v6.js","sourceRoot":"","sources":["v6.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,+CAA6B;AAC7B,4CAA0B;AAC1B,sDAAoC;AACpC,kDAAgC"} node_modules/discord-api-types/v8.js.map 0000664 00000000266 15114741631 0014241 0 ustar 00 {"version":3,"file":"v8.js","sourceRoot":"","sources":["v8.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,+CAA6B;AAC7B,4CAA0B;AAC1B,sDAAoC;AACpC,kDAAgC;AAChC,2CAAyB;AACzB,sCAAoC"} node_modules/discord-api-types/v9.d.ts.map 0000664 00000000401 15114741631 0014465 0 ustar 00 {"version":3,"file":"v9.d.ts","sourceRoot":"","sources":["v9.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAC7B,cAAc,WAAW,CAAC;AAC1B,cAAc,qBAAqB,CAAC;AACpC,cAAc,iBAAiB,CAAC;AAChC,cAAc,UAAU,CAAC;AACzB,cAAc,mBAAmB,CAAC;AAClC,OAAO,KAAK,KAAK,MAAM,YAAY,CAAC"} node_modules/discord-api-types/v8.mjs 0000664 00000007464 15114741631 0013651 0 ustar 00 import mod from "./v8.js"; export default mod; export const APIVersion = mod.APIVersion; export const ActivityFlags = mod.ActivityFlags; export const ActivityPlatform = mod.ActivityPlatform; export const ActivityType = mod.ActivityType; export const AllowedMentionsTypes = mod.AllowedMentionsTypes; export const ApplicationCommandOptionType = mod.ApplicationCommandOptionType; export const ApplicationCommandPermissionType = mod.ApplicationCommandPermissionType; export const ApplicationCommandType = mod.ApplicationCommandType; export const ApplicationFlags = mod.ApplicationFlags; export const AuditLogEvent = mod.AuditLogEvent; export const AuditLogOptionsType = mod.AuditLogOptionsType; export const ButtonStyle = mod.ButtonStyle; export const ChannelType = mod.ChannelType; export const ComponentType = mod.ComponentType; export const ConnectionVisibility = mod.ConnectionVisibility; export const EmbedType = mod.EmbedType; export const FormattingPatterns = mod.FormattingPatterns; export const GatewayCloseCodes = mod.GatewayCloseCodes; export const GatewayDispatchEvents = mod.GatewayDispatchEvents; export const GatewayIntentBits = mod.GatewayIntentBits; export const GatewayOpcodes = mod.GatewayOpcodes; export const GatewayVersion = mod.GatewayVersion; export const GuildDefaultMessageNotifications = mod.GuildDefaultMessageNotifications; export const GuildExplicitContentFilter = mod.GuildExplicitContentFilter; export const GuildFeature = mod.GuildFeature; export const GuildMFALevel = mod.GuildMFALevel; export const GuildNSFWLevel = mod.GuildNSFWLevel; export const GuildPremiumTier = mod.GuildPremiumTier; export const GuildScheduledEventEntityType = mod.GuildScheduledEventEntityType; export const GuildScheduledEventPrivacyLevel = mod.GuildScheduledEventPrivacyLevel; export const GuildScheduledEventStatus = mod.GuildScheduledEventStatus; export const GuildSystemChannelFlags = mod.GuildSystemChannelFlags; export const GuildVerificationLevel = mod.GuildVerificationLevel; export const GuildWidgetStyle = mod.GuildWidgetStyle; export const IntegrationExpireBehavior = mod.IntegrationExpireBehavior; export const InteractionResponseType = mod.InteractionResponseType; export const InteractionType = mod.InteractionType; export const InviteTargetType = mod.InviteTargetType; export const Locale = mod.Locale; export const MembershipScreeningFieldType = mod.MembershipScreeningFieldType; export const MessageActivityType = mod.MessageActivityType; export const MessageFlags = mod.MessageFlags; export const MessageType = mod.MessageType; export const OAuth2Routes = mod.OAuth2Routes; export const OAuth2Scopes = mod.OAuth2Scopes; export const OverwriteType = mod.OverwriteType; export const PermissionFlagsBits = mod.PermissionFlagsBits; export const PresenceUpdateStatus = mod.PresenceUpdateStatus; export const RESTJSONErrorCodes = mod.RESTJSONErrorCodes; export const RPCCloseEventCodes = mod.RPCCloseEventCodes; export const RPCDeviceType = mod.RPCDeviceType; export const RPCErrorCodes = mod.RPCErrorCodes; export const RPCVoiceSettingsModeType = mod.RPCVoiceSettingsModeType; export const RPCVoiceShortcutKeyComboKeyType = mod.RPCVoiceShortcutKeyComboKeyType; export const RelationshipType = mod.RelationshipType; export const RouteBases = mod.RouteBases; export const Routes = mod.Routes; export const StageInstancePrivacyLevel = mod.StageInstancePrivacyLevel; export const StickerFormatType = mod.StickerFormatType; export const StickerType = mod.StickerType; export const TeamMemberMembershipState = mod.TeamMemberMembershipState; export const TextInputStyle = mod.TextInputStyle; export const UserFlags = mod.UserFlags; export const UserPremiumType = mod.UserPremiumType; export const Utils = mod.Utils; export const VideoQualityMode = mod.VideoQualityMode; export const VoiceConnectionStates = mod.VoiceConnectionStates; export const WebhookType = mod.WebhookType; node_modules/discord-api-types/payloads/common.d.ts.map 0000664 00000002755 15114741631 0017251 0 ustar 00 {"version":3,"file":"common.d.ts","sourceRoot":"","sources":["common.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AAE7C;;;;;;GAMG;AACH,eAAO,MAAM,mBAAmB;IAC/B;;;;OAIG;;IAEH;;OAEG;;IAGH;;OAEG;;IAEH;;OAEG;;IAEH;;;;OAIG;;IAEH;;OAEG;;IAEH;;;;OAIG;;IAEH;;OAEG;;IAEH;;;;OAIG;;IAEH;;;;OAIG;;IAEH;;;;OAIG;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IG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,MAAM,EAAE,OAAO,CAAC;IAChB;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC;IAChB;;OAEG;IACH,WAAW,EAAE,MAAM,CAAC;CACpB"} node_modules/discord-api-types/payloads/common.js.map 0000664 00000004555 15114741631 0017015 0 ustar 00 {"version":3,"file":"common.js","sourceRoot":"","sources":["common.ts"],"names":[],"mappings":";;;AAEA;;;;;;GAMG;AACU,QAAA,mBAAmB,GAAG;IAClC;;;;OAIG;IACH,mBAAmB,EAAE,EAAE,IAAI,EAAE;IAC7B;;OAEG;IAEH,WAAW,EAAE,EAAE,IAAI,EAAE;IACrB;;OAEG;IACH,UAAU,EAAE,EAAE,IAAI,EAAE;IACpB;;OAEG;IACH,aAAa,EAAE,EAAE,IAAI,EAAE;IACvB;;;;OAIG;IACH,cAAc,EAAE,EAAE,IAAI,EAAE;IACxB;;OAEG;IACH,WAAW,EAAE,EAAE,IAAI,EAAE;IACrB;;;;OAIG;IACH,YAAY,EAAE,EAAE,IAAI,EAAE;IACtB;;OAEG;IACH,YAAY,EAAE,EAAE,IAAI,EAAE;IACtB;;;;OAIG;IACH,eAAe,EAAE,EAAE,IAAI,EAAE;IACzB;;;;OAIG;IACH,MAAM,EAAE,EAAE,IAAI,EAAE;IAChB;;;;OAIG;IACH,WAAW,EAAE,EAAE,IAAI,GAAG;IACtB;;;;;OAKG;IACH,YAAY,EAAE,EAAE,IAAI,GAAG;IACvB;;;;OAIG;IACH,eAAe,EAAE,EAAE,IAAI,GAAG;IAC1B;;;;OAIG;IACH,cAAc,EAAE,EAAE,IAAI,GAAG;IACzB;;;;OAIG;IACH,UAAU,EAAE,EAAE,IAAI,GAAG;IACrB;;;;OAIG;IACH,WAAW,EAAE,EAAE,IAAI,GAAG;IACtB;;;;OAIG;IACH,kBAAkB,EAAE,EAAE,IAAI,GAAG;IAC7B;;;;;OAKG;IACH,eAAe,EAAE,EAAE,IAAI,G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,GAAG;IAC1B;;OAEG;IACH,gCAAgC,EAAE,EAAE,IAAI,GAAG;IAC3C;;;;OAIG;IACH,aAAa,EAAE,EAAE,IAAI,GAAG;IACxB;;OAEG;IACH,sBAAsB,EAAE,EAAE,IAAI,GAAG;IACjC;;;;OAIG;IACH,YAAY,EAAE,EAAE,IAAI,GAAG;IACvB;;;;OAIG;IACH,iBAAiB,EAAE,EAAE,IAAI,GAAG;IAC5B;;;;OAIG;IACH,iBAAiB,EAAE,EAAE,IAAI,GAAG;IAC5B;;;;OAIG;IACH,SAAS,EAAE,EAAE,IAAI,GAAG;IACpB;;;;OAIG;IACH,eAAe,EAAE,EAAE,IAAI,GAAG;CACjB,CAAC;AAEX;;;;GAIG;AACH,MAAM,CAAC,MAAM,CAAC,2BAAmB,CAAC,CAAC"} node_modules/discord-api-types/payloads/index.d.ts.map 0000664 00000000164 15114741631 0017060 0 ustar 00 {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":"AAGA,cAAc,aAAa,CAAC"} node_modules/discord-api-types/payloads/v10/stageInstance.js.map 0000664 00000000402 15114741631 0020706 0 ustar 00 {"version":3,"file":"stageInstance.js","sourceRoot":"","sources":["stageInstance.ts"],"names":[],"mappings":";;;AA0CA;;GAEG;AACH,IAAY,yBAYX;AAZD,WAAY,yBAAyB;IACpC;;;;;OAKG;IACH,6EAAU,CAAA;IACV;;OAEG;IACH,mFAAS,CAAA;AACV,CAAC,EAZW,yBAAyB,yCAAzB,yBAAyB,QAYpC"} node_modules/discord-api-types/payloads/v10/user.js.map 0000664 00000003676 15114741631 0017114 0 ustar 00 {"version":3,"file":"user.js","sourceRoot":"","sources":["user.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AAwGH;;GAEG;AACH,IAAY,SA0GX;AA1GD,WAAY,SAAS;IACpB;;OAEG;IACH,2CAAc,CAAA;IACd;;OAEG;IACH,+CAAgB,CAAA;IAChB;;OAEG;IACH,mDAAkB,CAAA;IAClB;;OAEG;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AAiB,CAAA;IACjB,4CAAuB,CAAA;IACvB,sCAAiB,CAAA;IACjB,wCAAmB,CAAA;IACnB,oCAAe,CAAA;IACf,oCAAe,CAAA;IACf,sCAAiB,CAAA;IACjB,sCAAiB,CAAA;IACjB,kCAAa,CAAA;IACb;;OAEG;IACH,wCAAW,CAAA;IACX,kCAAa,CAAA;IACb,wCAAmB,CAAA;AACpB,CAAC,EA/BW,iBAAiB,iCAAjB,iBAAiB,QA+B5B;AAED,IAAY,oBASX;AATD,WAAY,oBAAoB;IAC/B;;OAEG;IACH,+DAAI,CAAA;IACJ;;OAEG;IACH,uEAAQ,CAAA;AACT,CAAC,EATW,oBAAoB,oCAApB,oBAAoB,QAS/B;AAwED;;GAEG;AACH,IAAY,gBAYX;AAZD,WAAY,gBAAgB;IAC3B,mCAAe,CAAA;IACf,4CAAwB,CAAA;IACxB,qCAAiB,CAAA;IACjB,qCAAiB,CAAA;IACjB,uCAAmB,CAAA;IACnB,qCAAiB,CAAA;IACjB,mCAAe,CAAA;IACf,+BAAW,CAAA;IACX,iCAAa,CAAA;IACb,qCAAiB,CAAA;IACjB,mCAAe,CAAA;AAChB,CAAC,EAZW,gBAAgB,gCAAhB,gBAAgB,QAY3B"} node_modules/discord-api-types/payloads/v10/soundboard.js.map 0000664 00000000164 15114741631 0020263 0 ustar 00 {"version":3,"file":"soundboard.js","sourceRoot":"","sources":["soundboard.ts"],"names":[],"mappings":";AAAA;;GAEG"} node_modules/discord-api-types/payloads/v10/autoModeration.d.ts.map 0000664 00000003376 15114741631 0021361 0 ustar 00 {"version":3,"file":"autoModeration.d.ts","sourceRoot":"","sources":["autoModeration.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAE/C;;GAEG;AACH,MAAM,WAAW,qBAAqB;IACrC;;OAEG;IACH,EAAE,EAAE,SAAS,CAAC;IACd;;OAEG;IACH,QAAQ,EAAE,SAAS,CAAC;IACpB;;O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,WAAW,uBAAuB;IACvC;;OAEG;IACH,IAAI,EAAE,wBAAwB,CAAC;IAC/B;;;;OAIG;IACH,QAAQ,CAAC,EAAE,+BAA+B,CAAC;CAC3C;AAED;;GAEG;AACH,oBAAY,wBAAwB;IACnC;;;OAGG;IACH,YAAY,IAAI;IAChB;;OAEG;IACH,gBAAgB,IAAA;IAChB;;OAEG;IACH,OAAO,IAAA;IACP;;OAEG;IACH,sBAAsB,IAAA;CACtB;AAED;;GAEG;AACH,MAAM,WAAW,+BAA+B;IAC/C;;;;OAIG;IACH,UAAU,CAAC,EAAE,SAAS,CAAC;IACvB;;;;;;OAMG;IACH,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B;;;;OAIG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;CACxB"} node_modules/discord-api-types/payloads/v10/emoji.js 0000664 00000000302 15114741631 0016444 0 ustar 00 "use strict"; /** * Types extracted from https://discord.com/developers/docs/resources/emoji */ Object.defineProperty(exports, "__esModule", { value: true }); //# sourceMappingURL=emoji.js.map node_modules/discord-api-types/payloads/v10/interactions.d.ts 0000664 00000003755 15114741631 0020316 0 ustar 00 import type { APIApplicationCommandDMInteraction, APIApplicationCommandGuildInteraction, APIApplicationCommandInteraction } from './_interactions/applicationCommands'; import type { APIApplicationCommandAutocompleteDMInteraction, APIApplicationCommandAutocompleteGuildInteraction, APIApplicationCommandAutocompleteInteraction } from './_interactions/autocomplete'; import type { APIMessageComponentDMInteraction, APIMessageComponentGuildInteraction, APIMessageComponentInteraction } from './_interactions/messageComponents'; import type { APIModalSubmitDMInteraction, APIModalSubmitGuildInteraction, APIModalSubmitInteraction } from './_interactions/modalSubmit'; import type { APIPingInteraction } from './_interactions/ping'; export * from './_interactions/applicationCommands'; export type * from './_interactions/autocomplete'; export type * from './_interactions/base'; export type * from './_interactions/messageComponents'; export type * from './_interactions/modalSubmit'; export type * from './_interactions/ping'; export * from './_interactions/responses'; /** * @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object} */ export type APIInteraction = APIApplicationCommandAutocompleteInteraction | APIApplicationCommandInteraction | APIMessageComponentInteraction | APIModalSubmitInteraction | APIPingInteraction; /** * @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object} */ export type APIDMInteraction = APIApplicationCommandAutocompleteDMInteraction | APIApplicationCommandDMInteraction | APIMessageComponentDMInteraction | APIModalSubmitDMInteraction; /** * @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object} */ export type APIGuildInteraction = APIApplicationCommandAutocompleteGuildInteraction | APIApplicationCommandGuildInteraction | APIMessageComponentGuildInteraction | APIModalSubmitGuildInteraction; //# sourceMappingURL=interactions.d.ts.map node_modules/discord-api-types/payloads/v10/stageInstance.d.ts.map 0000664 00000001443 15114741631 0021150 0 ustar 00 {"version":3,"file":"stageInstance.d.ts","sourceRoot":"","sources":["stageInstance.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC/C,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAE9C;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAChC;;OAEG;IACH,EAAE,EAAE,SAAS,CAAC;IACd;;OAEG;IACH,QAAQ,EAAE,SAAS,CAAC;IACpB;;OAEG;IACH,UAAU,EAAE,SAAS,CAAC;IACtB;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;;;OAIG;IACH,aAAa,EAAE,yBAAyB,CAAC;IACzC;;;;;OAKG;IACH,qBAAqB,EAAE,OAAO,CAAC;IAC/B;;OAEG;IACH,wBAAwB,CAAC,EAAE,SAAS,CAAC;CACrC;AAED;;GAEG;AACH,oBAAY,yBAAyB;IACpC;;;;;OAKG;IACH,MAAM,IAAI;IACV;;OAEG;IACH,SAAS,IAAA;CACT;AAED;;;;GAIG;AACH,MAAM,WAAW,sBAAsB;IACtC;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,iBAAiB,EAAE,MAAM,CAAC;IAC1B;;OAEG;IACH,aAAa,EAAE,MAAM,CAAC;IACtB;;;;OAIG;IACH,OAAO,EAAE,cAAc,EAAE,CAAC;CAC1B"} node_modules/discord-api-types/payloads/v10/index.d.ts.map 0000664 00000001124 15114741631 0017463 0 ustar 00 {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAC;AAC1B,cAAc,eAAe,CAAC;AAC9B,cAAc,YAAY,CAAC;AAC3B,cAAc,kBAAkB,CAAC;AACjC,cAAc,WAAW,CAAC;AAC1B,mBAAmB,SAAS,CAAC;AAC7B,cAAc,WAAW,CAAC;AAC1B,cAAc,SAAS,CAAC;AACxB,cAAc,uBAAuB,CAAC;AACtC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,UAAU,CAAC;AACzB,cAAc,gBAAgB,CAAC;AAC/B,cAAc,UAAU,CAAC;AACzB,cAAc,eAAe,CAAC;AAC9B,cAAc,QAAQ,CAAC;AACvB,mBAAmB,cAAc,CAAC;AAClC,cAAc,iBAAiB,CAAC;AAChC,cAAc,WAAW,CAAC;AAC1B,cAAc,SAAS,CAAC;AACxB,mBAAmB,YAAY,CAAC;AAChC,cAAc,QAAQ,CAAC;AACvB,mBAAmB,SAAS,CAAC;AAC7B,cAAc,WAAW,CAAC"} node_modules/discord-api-types/payloads/v10/guildScheduledEvent.js.map 0000664 00000002206 15114741631 0022051 0 ustar 00 {"version":3,"file":"guildScheduledEvent.js","sourceRoot":"","sources":["guildScheduledEvent.ts"],"names":[],"mappings":";;;AA2HA;;GAEG;AACH,IAAY,0CAKX;AALD,WAAY,0CAA0C;IACrD,+GAAM,CAAA;IACN,iHAAO,CAAA;IACP,+GAAM,CAAA;IACN,6GAAK,CAAA;AACN,CAAC,EALW,0CAA0C,0DAA1C,0CAA0C,QAKrD;AAED;;GAEG;AACH,IAAY,wCAQX;AARD,WAAY,wCAAwC;IACnD,2GAAM,CAAA;IACN,6GAAO,CAAA;IACP,iHAAS,CAAA;IACT,+GAAQ,CAAA;IACR,2GAAM,CAAA;IACN,+GAAQ,CAAA;IACR,2GAAM,CAAA;AACP,CAAC,EARW,wCAAwC,wDAAxC,wCAAwC,QAQnD;AAED;;GAEG;AACH,IAAY,sCAaX;AAbD,WAAY,sCAAsC;IACjD,yGAAW,CAAA;IACX,2GAAQ,CAAA;IACR,qGAAK,CAAA;IACL,qGAAK,CAAA;IACL,iGAAG,CAAA;IACH,mGAAI,CAAA;IACJ,mGAAI,CAAA;IACJ,uGAAM,CAAA;IACN,6GAAS,CAAA;IACT,0GAAO,CAAA;IACP,4GAAQ,CAAA;IACR,4GAAQ,CAAA;AACT,CAAC,EAbW,sCAAsC,sDAAtC,sCAAsC,QAajD;AAwDD;;GAEG;AACH,IAAY,6BAIX;AAJD,WAAY,6BAA6B;IACxC,mGAAiB,CAAA;IACjB,mFAAK,CAAA;IACL,yFAAQ,CAAA;AACT,CAAC,EAJW,6BAA6B,6CAA7B,6BAA6B,QAIxC;AAED;;GAEG;AACH,IAAY,yBAKX;AALD,WAAY,yBAAyB;IACpC,mFAAa,CAAA;IACb,6EAAM,CAAA;IACN,mFAAS,CAAA;IACT,iFAAQ,CAAA;AACT,CAAC,EALW,yBAAyB,yCAAzB,yBAAyB,QAKpC;AAED;;GAEG;AACH,IAAY,+BAKX;AALD,WAAY,+BAA+B;IAC1C;;OAEG;IACH,+FAAa,CAAA;AACd,CAAC,EALW,+BAA+B,+CAA/B,+BAA+B,QAK1C"} node_modules/discord-api-types/payloads/v10/oauth2.js.map 0000664 00000001764 15114741631 0017334 0 ustar 00 {"version":3,"file":"oauth2.js","sourceRoot":"","sources":["oauth2.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AAEH,IAAY,YA2IX;AA3ID,WAAY,YAAY;IACvB;;OAEG;IACH,2BAAW,CAAA;IACX;;;;;OAKG;IACH,2CAA2B,CAAA;IAC3B;;OAEG;IACH,mDAAmC,CAAA;IACnC;;;;OAIG;IACH,+BAAe,CAAA;IACf;;;;OAIG;IACH,qCAAqB,CAAA;IACrB;;;;;OAKG;IACH,iCAAiB,CAAA;IACjB;;;;;OAKG;IACH,0CAA0B,CAAA;IAC1B;;;;OAIG;IACH,yDAAyC,CAAA;IACzC;;;;OAIG;IACH,yCAAyB,CAAA;IACzB;;;OAGG;IACH,8CAA8B,CAAA;IAC9B;;OAEG;IACH,+DAA+C,CAAA;IAC/C;;OAEG;IACH,2BAAW,CAAA;IACX;;OAEG;IACH,2DAA2C,CAAA;IAC3C;;OAEG;IACH,+CAA+B,CAAA;IAC/B;;OAEG;IACH,iDAAiC,CAAA;IACjC;;OAEG;IACH,+DAA+C,CAAA;IAC/C;;OAEG;IACH,oDAAoC,CAAA;IACpC;;OAEG;IACH,+BAAe,CAAA;IACf;;OAEG;IACH,uEAAuD,CAAA;IACvD;;OAEG;IACH,mEAAmD,CAAA;IACnD;;OAEG;IACH,qEAAqD,CAAA;IACrD;;OAEG;IACH,sEAAsD,CAAA;IACtD;;OAEG;IACH,wDAAwC,CAAA;IACxC;;OAEG;IACH,kDAAkC,CAAA;IAClC;;;;OAIG;IACH,oDAAoC,CAAA;IACpC;;;;OAIG;IACH,8DAA8C,CAAA;IAC9C;;;;OAIG;IACH,2EAA2D,CAAA;IAC3D;;;;OAIG;IACH,iGAAiF,CAAA;AAClF,CAAC,EA3IW,YAAY,4BAAZ,YAAY,QA2IvB"} node_modules/discord-api-types/payloads/v10/channel.js.map 0000664 00000012400 15114741631 0017527 0 ustar 00 {"version":3,"file":"channel.js","sourceRoot":"","sources":["channel.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AAyUH;;GAEG;AACH,IAAY,aASX;AATD,WAAY,aAAa;IACxB;;OAEG;IACH,qEAAc,CAAA;IACd;;OAEG;IACH,iEAAY,CAAA;AACb,CAAC,EATW,aAAa,6BAAb,aAAa,QASxB;AAED;;GAEG;AACH,IAAY,eAaX;AAbD,WAAY,eAAe;IAC1B;;OAEG;IACH,y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Ad,cAAc,QASzB;AAqID;;GAEG;AACH,IAAY,0BAIX;AAJD,WAAY,0BAA0B;IACrC,iDAAmB,CAAA;IACnB,2CAAa,CAAA;IACb,2CAAa,CAAA;AACd,CAAC,EAJW,0BAA0B,0CAA1B,0BAA0B,QAIrC;AAmGD,IAAY,6BAKX;AALD,WAAY,6BAA6B;IACxC,uFAAO,CAAA;IACP,uFAAO,CAAA;IACP,mGAAa,CAAA;IACb,qGAAc,CAAA;AACf,CAAC,EALW,6BAA6B,6CAA7B,6BAA6B,QAKxC;AAuJD;;GAEG;AACH,IAAY,oBAGX;AAHD,WAAY,oBAAoB;IAC/B,iEAAS,CAAA;IACT,iEAAK,CAAA;AACN,CAAC,EAHW,oBAAoB,oCAApB,oBAAoB,QAG/B;AAqED;;GAEG;AACH,IAAY,YAsCX;AAtCD,WAAY,YAAY;IACvB;;OAEG;IACH,uEAAyB,CAAA;IACzB;;OAEG;IACH,mDAAe,CAAA;IACf;;OAEG;IACH,iFAA8B,CAAA;IAC9B;;;OAGG;IACH,4DAAmB,CAAA;IACnB;;OAEG;IACH,oDAAe,CAAA;IACf;;OAEG;IACH,qFAA+B,CAAA;IAC/B;;OAEG;IACH,uDAAgB,CAAA;IAChB;;OAEG;IACH,qFAA+B,CAAA;IAC/B;;OAEG;IACH,2FAAkC,CAAA;AACnC,CAAC,EAtCW,YAAY,4BAAZ,YAAY,QAsCvB"} node_modules/discord-api-types/payloads/v10/poll.js.map 0000664 00000000325 15114741631 0017070 0 ustar 00 {"version":3,"file":"poll.js","sourceRoot":"","sources":["poll.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AA4CH;;GAEG;AACH,IAAY,cAKX;AALD,WAAY,cAAc;IACzB;;OAEG;IACH,yDAAW,CAAA;AACZ,CAAC,EALW,cAAc,8BAAd,cAAc,QAKzB"} node_modules/discord-api-types/payloads/v10/oauth2.d.ts 0000664 00000013643 15114741631 0017013 0 ustar 00 /** * Types extracted from https://discord.com/developers/docs/topics/oauth2 */ export declare enum OAuth2Scopes { /** * For oauth2 bots, this puts the bot in the user's selected guild by default */ Bot = "bot", /** * Allows {@link https://discord.com/developers/docs/resources/user#get-user-connections | `/users/@me/connections`} * to return linked third-party accounts * * @see {@link https://discord.com/developers/docs/resources/user#get-user-connections} */ Connections = "connections", /** * Allows your app to see information about the user's DMs and group DMs - requires Discord approval */ DMChannelsRead = "dm_channels.read", /** * Enables {@link https://discord.com/developers/docs/resources/user#get-current-user | `/users/@me`} to return an `email` * * @see {@link https://discord.com/developers/docs/resources/user#get-current-user} */ Email = "email", /** * Allows {@link https://discord.com/developers/docs/resources/user#get-current-user | `/users/@me`} without `email` * * @see {@link https://discord.com/developers/docs/resources/user#get-current-user} */ Identify = "identify", /** * Allows {@link https://discord.com/developers/docs/resources/user#get-current-user-guilds | `/users/@me/guilds`} * to return basic information about all of a user's guilds * * @see {@link https://discord.com/developers/docs/resources/user#get-current-user-guilds} */ Guilds = "guilds", /** * Allows {@link https://discord.com/developers/docs/resources/guild#add-guild-member | `/guilds/[guild.id]/members/[user.id]`} * to be used for joining users to a guild * * @see {@link https://discord.com/developers/docs/resources/guild#add-guild-member} */ GuildsJoin = "guilds.join", /** * Allows /users/\@me/guilds/\{guild.id\}/member to return a user's member information in a guild * * @see {@link https://discord.com/developers/docs/resources/user#get-current-user-guild-member} */ GuildsMembersRead = "guilds.members.read", /** * Allows your app to join users to a group dm * * @see {@link https://discord.com/developers/docs/resources/channel#group-dm-add-recipient} */ GroupDMJoins = "gdm.join", /** * For local rpc server api access, this allows you to read messages from all client channels * (otherwise restricted to channels/guilds your app creates) */ MessagesRead = "messages.read", /** * Allows your app to update a user's connection and metadata for the app */ RoleConnectionsWrite = "role_connections.write", /** * For local rpc server access, this allows you to control a user's local Discord client - requires Discord approval */ RPC = "rpc", /** * For local rpc server access, this allows you to update a user's activity - requires Discord approval */ RPCActivitiesWrite = "rpc.activities.write", /** * For local rpc server access, this allows you to read a user's voice settings and listen for voice events - requires Discord approval */ RPCVoiceRead = "rpc.voice.read", /** * For local rpc server access, this allows you to update a user's voice settings - requires Discord approval */ RPCVoiceWrite = "rpc.voice.write", /** * For local rpc server api access, this allows you to receive notifications pushed out to the user - requires Discord approval */ RPCNotificationsRead = "rpc.notifications.read", /** * This generates a webhook that is returned in the oauth token response for authorization code grants */ WebhookIncoming = "webhook.incoming", /** * Allows your app to connect to voice on user's behalf and see all the voice members - requires Discord approval */ Voice = "voice", /** * Allows your app to upload/update builds for a user's applications - requires Discord approval */ ApplicationsBuildsUpload = "applications.builds.upload", /** * Allows your app to read build data for a user's applications */ ApplicationsBuildsRead = "applications.builds.read", /** * Allows your app to read and update store data (SKUs, store listings, achievements, etc.) for a user's applications */ ApplicationsStoreUpdate = "applications.store.update", /** * Allows your app to read entitlements for a user's applications */ ApplicationsEntitlements = "applications.entitlements", /** * Allows your app to know a user's friends and implicit relationships - requires Discord approval */ RelationshipsRead = "relationships.read", /** * Allows your app to fetch data from a user's "Now Playing/Recently Played" list - requires Discord approval */ ActivitiesRead = "activities.read", /** * Allows your app to update a user's activity - requires Discord approval (NOT REQUIRED FOR GAMESDK ACTIVITY MANAGER) * * @see {@link https://discord.com/developers/docs/game-sdk/activities} */ ActivitiesWrite = "activities.write", /** * Allows your app to use Application Commands in a guild * * @see {@link https://discord.com/developers/docs/interactions/application-commands} */ ApplicationsCommands = "applications.commands", /** * Allows your app to update its Application Commands via this bearer token - client credentials grant only * * @see {@link https://discord.com/developers/docs/interactions/application-commands} */ ApplicationsCommandsUpdate = "applications.commands.update", /** * Allows your app to update permissions for its commands using a Bearer token - client credentials grant only * * @see {@link https://discord.com/developers/docs/interactions/application-commands} */ ApplicationCommandsPermissionsUpdate = "applications.commands.permissions.update" } //# sourceMappingURL=oauth2.d.ts.map node_modules/discord-api-types/payloads/v10/template.d.ts 0000664 00000003321 15114741631 0017414 0 ustar 00 /** * Types extracted from https://discord.com/developers/docs/resources/guild-template */ import type { Snowflake } from '../../globals'; import type { Locale } from '../../rest/common'; import type { RESTPostAPIGuildsJSONBody } from '../../rest/v10/index'; import type { APIUser } from './user'; /** * @see {@link https://discord.com/developers/docs/resources/guild-template#guild-template-object} */ export interface APITemplate { /** * The template code (unique ID) */ code: string; /** * Template name */ name: string; /** * The description for the template */ description: string | null; /** * Number of times this template has been used */ usage_count: number; /** * The ID of the user who created the template */ creator_id: Snowflake; /** * The user who created the template * * @see {@link https://discord.com/developers/docs/resources/user#user-object} */ creator: APIUser; /** * When this template was created */ created_at: string; /** * When this template was last synced to the source guild */ updated_at: string; /** * The ID of the guild this template is based on */ source_guild_id: Snowflake; /** * The guild snapshot this template contains */ serialized_source_guild: APITemplateSerializedSourceGuild; /** * Whether the template has unsynced changes */ is_dirty: boolean | null; } export interface APITemplateSerializedSourceGuild extends Omit<RESTPostAPIGuildsJSONBody, 'icon'> { description: string | null; preferred_locale: Locale; icon_hash: string | null; } //# sourceMappingURL=template.d.ts.map node_modules/discord-api-types/payloads/v10/sticker.d.ts.map 0000664 00000002437 15114741631 0020030 0 ustar 00 {"version":3,"file":"sticker.d.ts","sourceRoot":"","sources":["sticker.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC/C,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,QAAQ,CAAC;AAEtC;;GAEG;AACH,MAAM,WAAW,UAAU;IAC1B;;OAEG;IACH,EAAE,EAAE,SAAS,CAAC;IACd;;OAEG;IACH,OAAO,CAAC,EAAE,SAAS,CAAC;IACpB;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;OAEG;IACH,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;;;;OAKG;IACH,KAAK,CAAC,EAAE,EAAE,CAAC;IACX;;;;OAIG;IACH,IAAI,EAAE,WAAW,CAAC;IAClB;;;;OAIG;IACH,WAAW,EAAE,iBAAiB,CAAC;IAC/B;;OAEG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB;;OAEG;IACH,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB;;OAEG;IACH,IAAI,CAAC,EAAE,OAAO,CAAC;IACf;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;GAEG;AACH,oBAAY,WAAW;IACtB;;OAEG;IACH,QAAQ,IAAI;IACZ;;OAEG;IACH,KAAK,IAAA;CACL;AAED;;GAEG;AACH,oBAAY,iBAAiB;IAC5B,GAAG,IAAI;IACP,IAAI,IAAA;IACJ,MAAM,IAAA;IACN,GAAG,IAAA;CACH;AAED;;GAEG;AACH,MAAM,MAAM,cAAc,GAAG,IAAI,CAAC,UAAU,EAAE,aAAa,GAAG,IAAI,GAAG,MAAM,CAAC,CAAC;AAE7E;;GAEG;AACH,MAAM,WAAW,cAAc;IAC9B;;OAEG;IACH,EAAE,EAAE,SAAS,CAAC;IACd;;OAEG;IACH,QAAQ,EAAE,UAAU,EAAE,CAAC;IACvB;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;OAEG;IACH,MAAM,EAAE,SAAS,CAAC;IAClB;;OAEG;IACH,gBAAgB,CAAC,EAAE,SAAS,CAAC;IAC7B;;OAEG;IACH,WAAW,EAAE,MAAM,CAAC;IACpB;;OAEG;IACH,eAAe,CAAC,EAAE,SAAS,CAAC;CAC5B"} node_modules/discord-api-types/payloads/v10/application.js.map 0000664 00000002220 15114741631 0020421 0 ustar 00 {"version":3,"file":"application.js","sourceRoot":"","sources":["application.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AA8KH;;GAEG;AACH,IAAY,gBAsEX;AAtED,WAAY,gBAAgB;IAC3B;;OAEG;IACH,+EAAyB,CAAA;IACzB;;OAEG;IACH,uEAAqB,CAAA;IACrB;;OAEG;IACH,qEAAoB,CAAA;IACpB;;OAEG;IACH,0EAAsB,CAAA;IACtB;;OAEG;IACH,gIAAiD,CAAA;IACjD;;OAEG;IACH,gFAAyB,CAAA;IACzB;;OAEG;IACH,gFAAyB,CAAA;IACzB;;OAEG;IACH,8FAAgC,CAAA;IAChC;;;;OAIG;IACH,yFAA6B,CAAA;IAC7B;;;;OAIG;IACH,uGAAoC,CAAA;IACpC;;OAEG;IACH,6GAAuC,CAAA;IACvC;;OAEG;IACH,oEAAkB,CAAA;IAClB;;OAEG;IACH,8FAA+B,CAAA;IAC/B;;;OAGG;IACH,4GAAsC,CAAA;IACtC;;OAEG;IACH,yFAA4B,CAAA;IAC5B;;OAEG;IACH,mGAAiC,CAAA;AAClC,CAAC,EAtEW,gBAAgB,gCAAhB,gBAAgB,QAsE3B;AAgCD;;GAEG;AACH,IAAY,qCAiCX;AAjCD,WAAY,qCAAqC;IAChD;;OAEG;IACH,qIAA0B,CAAA;IAC1B;;OAEG;IACH,2IAAyB,CAAA;IACzB;;OAEG;IACH,iHAAY,CAAA;IACZ;;OAEG;IACH,uHAAe,CAAA;IACf;;OAEG;IACH,uIAAuB,CAAA;IACvB;;OAEG;IACH,6IAA0B,CAAA;IAC1B;;OAEG;IACH,iHAAY,CAAA;IACZ;;OAEG;IACH,uHAAe,CAAA;AAChB,CAAC,EAjCW,qCAAqC,qDAArC,qCAAqC,QAiChD;AAED;;GAEG;AACH,IAAY,6BAaX;AAbD,WAAY,6BAA6B;IACxC;;OAEG;IACH,yFAAY,CAAA;IACZ;;OAEG;IACH,uFAAO,CAAA;IACP;;OAEG;IACH,2GAAiB,CAAA;AAClB,CAAC,EAbW,6BAA6B,6CAA7B,6BAA6B,QAaxC"} node_modules/discord-api-types/payloads/v10/user.d.ts.map 0000664 00000007147 15114741631 0017345 0 ustar 00 {"version":3,"file":"user.d.ts","sourceRoot":"","sources":["user.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC/C,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAC;AAEnD;;GAEG;AACH,MAAM,WAAW,OAAO;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OAAO,EAAE,gBAAgB,CAAC;CAC1B;AAED;;GAEG;AACH,oBAAY,gBAAgB;IAC3B,KAAK,UAAU;IACf,SAAS,eAAe;IACxB,MAAM,WAAW;IACjB,MAAM,WAAW;IACjB,OAAO,YAAY;IACnB,MAAM,WAAW;IACjB,KAAK,UAAU;IACf,GAAG,QAAQ;IACX,IAAI,SAAS;IACb,MAAM,WAAW;IACjB,KAAK,UAAU;CACf"} node_modules/discord-api-types/payloads/v10/guild.d.ts.map 0000664 00000025456 15114741631 0017476 0 ustar 00 {"version":3,"file":"guild.d.ts","sourceRoot":"","sources":["guild.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC5D,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,KAAK,EAAE,QAAQ,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AACzD,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,WAAW,CAAC;AAC7D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAC7C,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAC7C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AAC5C,OAAO,KAAK,EAAE,uBAAuB,EAAE,OAAO,EAAE,MAAM,QAAQ,CAAC;AAE/D,MAAM,WAAW,YAAY;IAC5B;;OAEG;IACH,EAAE,EAAE,SAAS,CAAC;CACd;AAED;;GAEG;AACH,MAAM,WAAW,mBAAoB,SAAQ,YAAY;IACxD;;OAEG;IACH,WAAW,EAAE,OAAO,CAAC;CACrB;AAED;;GAEG;AACH,MAAM,WAAW,eAAgB,SAAQ,YAAY;IACpD;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;;;OAIG;IACH,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IACpB;;;;OAIG;IACH,M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S,CAAC;IACd;;OAEG;IACH,WAAW,EAAE,SAAS,EAAE,CAAC;IACzB;;OAEG;IACH,QAAQ,EAAE,SAAS,EAAE,CAAC;IACtB;;OAEG;IACH,KAAK,EAAE,eAAe,CAAC;IACvB;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;CAC3B;AAED;;GAEG;AACH,oBAAY,mBAAmB;IAC9B;;OAEG;IACH,iBAAiB,IAAA;IACjB;;OAEG;IACH,kBAAkB,IAAA;CAClB;AAED;;GAEG;AACH,oBAAY,yBAAyB;IACpC,cAAc,IAAA;IACd,QAAQ,IAAA;CACR;AAED,MAAM,WAAW,gBAAgB;IAChC;;OAEG;IACH,sBAAsB,EAAE,MAAM,GAAG,IAAI,CAAC;IACtC;;OAEG;IACH,kBAAkB,EAAE,MAAM,GAAG,IAAI,CAAC;IAClC;;OAEG;IACH,mBAAmB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACpC;;OAEG;IACH,gBAAgB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CACjC"} node_modules/discord-api-types/payloads/v10/poll.js 0000664 00000001043 15114741631 0016312 0 ustar 00 "use strict"; /** * Types extracted from https://discord.com/developers/docs/resources/poll */ Object.defineProperty(exports, "__esModule", { value: true }); exports.PollLayoutType = void 0; /** * @see {@link https://discord.com/developers/docs/resources/poll#layout-type} */ var PollLayoutType; (function (PollLayoutType) { /** * The, uhm, default layout type */ PollLayoutType[PollLayoutType["Default"] = 1] = "Default"; })(PollLayoutType || (exports.PollLayoutType = PollLayoutType = {})); //# sourceMappingURL=poll.js.map node_modules/discord-api-types/payloads/v10/stageInstance.d.ts 0000664 00000004633 15114741631 0020400 0 ustar 00 import type { Snowflake } from '../../globals'; import type { APIGuildMember } from './guild'; /** * @see {@link https://discord.com/developers/docs/resources/stage-instance#stage-instance-object} */ export interface APIStageInstance { /** * The id of the stage instance */ id: Snowflake; /** * The guild id of the associated stage channel */ guild_id: Snowflake; /** * The id of the associated stage channel */ channel_id: Snowflake; /** * The topic of the stage instance (1-120 characters) */ topic: string; /** * The privacy level of the stage instance * * @see {@link https://discord.com/developers/docs/resources/stage-instance#stage-instance-object-privacy-level} */ privacy_level: StageInstancePrivacyLevel; /** * Whether or not stage discovery is disabled * * @deprecated * {@link https://github.com/discord/discord-api-docs/pull/4296 | discord-api-docs#4296} */ discoverable_disabled: boolean; /** * The id of the scheduled event for this stage instance */ guild_scheduled_event_id?: Snowflake; } /** * @see {@link https://discord.com/developers/docs/resources/stage-instance#stage-instance-object-privacy-level} */ export declare enum StageInstancePrivacyLevel { /** * The stage instance is visible publicly, such as on stage discovery * * @deprecated * {@link https://github.com/discord/discord-api-docs/pull/4296 | discord-api-docs#4296} */ Public = 1, /** * The stage instance is visible to only guild members */ GuildOnly = 2 } /** * @see {@link https://discord.com/developers/docs/resources/invite#invite-stage-instance-object-invite-stage-instance-structure} * @deprecated * {@link https://github.com/discord/discord-api-docs/pull/4479 | discord-api-docs#4479} */ export interface APIInviteStageInstance { /** * The topic of the stage instance (1-120 characters) */ topic: string; /** * The number of users in the stage */ participant_count: number; /** * The number of users speaking in the stage */ speaker_count: number; /** * The members speaking in the stage * * @see {@link https://discord.com/developers/docs/resources/guild#guild-member-object-guild-member-structure} */ members: APIGuildMember[]; } //# sourceMappingURL=stageInstance.d.ts.map node_modules/discord-api-types/payloads/v10/autoModeration.d.ts 0000664 00000017145 15114741631 0020604 0 ustar 00 /** * Types extracted from https://discord.com/developers/docs/resources/auto-moderation */ import type { Snowflake } from '../../globals'; /** * @see {@link https://discord.com/developers/docs/resources/auto-moderation#auto-moderation-rule-object-auto-moderation-rule-structure} */ export interface APIAutoModerationRule { /** * The id of this rule */ id: Snowflake; /** * The guild which this rule belongs to */ guild_id: Snowflake; /** * The rule name */ name: string; /** * The user id who created this rule */ creator_id: Snowflake; /** * The rule event type */ event_type: AutoModerationRuleEventType; /** * The rule trigger type */ trigger_type: AutoModerationRuleTriggerType; /** * The rule trigger metadata */ trigger_metadata: APIAutoModerationRuleTriggerMetadata; /** * The actions which will execute when this rule is triggered */ actions: APIAutoModerationAction[]; /** * Whether this rule is enabled */ enabled: boolean; /** * The role ids that shouldn't be affected by this rule (Maximum of 20) */ exempt_roles: Snowflake[]; /** * The channel ids that shouldn't be affected by this rule (Maximum of 50) */ exempt_channels: Snowflake[]; } /** * @see {@link https://discord.com/developers/docs/resources/auto-moderation#auto-moderation-rule-object-trigger-types} */ export declare enum AutoModerationRuleTriggerType { /** * Check if content contains words from a user defined list of keywords (Maximum of 6 per guild) */ Keyword = 1, /** * Check if content represents generic spam (Maximum of 1 per guild) */ Spam = 3, /** * Check if content contains words from internal pre-defined wordsets (Maximum of 1 per guild) */ KeywordPreset = 4, /** * Check if content contains more mentions than allowed (Maximum of 1 per guild) */ MentionSpam = 5, /** * Check if member profile contains words from a user defined list of keywords (Maximum of 1 per guild) */ MemberProfile = 6 } /** * @see {@link https://discord.com/developers/docs/resources/auto-moderation#auto-moderation-rule-object-trigger-metadata} */ export interface APIAutoModerationRuleTriggerMetadata { /** * Substrings which will be searched for in content (Maximum of 1000) * * A keyword can be a phrase which contains multiple words. Wildcard symbols can be used to customize how each string will be matched. Each keyword must be 60 characters or less * * @see {@link https://discord.com/developers/docs/resources/auto-moderation#auto-moderation-rule-object-keyword-matching-strategies | Keyword matching strategies} * * Associated trigger types: {@link AutoModerationRuleTriggerType.Keyword}, {@link AutoModerationRuleTriggerType.MemberProfile} */ keyword_filter?: string[]; /** * The internally pre-defined wordsets which will be searched for in content * * Associated trigger type: {@link AutoModerationRuleTriggerType.KeywordPreset} */ presets?: AutoModerationRuleKeywordPresetType[]; /** * Substrings which will be exempt from triggering the preset trigger type (Maximum of 1000) * * A allowed-word can be a phrase which contains multiple words. Wildcard symbols can be used to customize how each string will be matched. Each keyword must be 60 characters or less * * @see {@link https://discord.com/developers/docs/resources/auto-moderation#auto-moderation-rule-object-keyword-matching-strategies | Keyword matching strategies} * * Associated trigger types: {@link AutoModerationRuleTriggerType.Keyword}, {@link AutoModerationRuleTriggerType.KeywordPreset}, {@link AutoModerationRuleTriggerType.MemberProfile} */ allow_list?: string[]; /** * Regular expression patterns which will be matched against content (Maximum of 10) * * Only Rust flavored regex is currently supported (Maximum of 260 characters) * * Associated trigger types: {@link AutoModerationRuleTriggerType.Keyword}, {@link AutoModerationRuleTriggerType.MemberProfile} */ regex_patterns?: string[]; /** * Total number of mentions (role & user) allowed per message (Maximum of 50) * * Associated trigger type: {@link AutoModerationRuleTriggerType.MentionSpam} */ mention_total_limit?: number; /** * Whether to automatically detect mention raids * * Associated trigger type: {@link AutoModerationRuleTriggerType.MentionSpam} */ mention_raid_protection_enabled?: boolean; } /** * @see {@link https://discord.com/developers/docs/resources/auto-moderation#auto-moderation-rule-object-keyword-preset-types} */ export declare enum AutoModerationRuleKeywordPresetType { /** * Words that may be considered forms of swearing or cursing */ Profanity = 1, /** * Words that refer to sexually explicit behavior or activity */ SexualContent = 2, /** * Personal insults or words that may be considered hate speech */ Slurs = 3 } /** * @see {@link https://discord.com/developers/docs/resources/auto-moderation#auto-moderation-rule-object-event-types} */ export declare enum AutoModerationRuleEventType { /** * When a member sends or edits a message in the guild */ MessageSend = 1, /** * When a member edits their profile */ MemberUpdate = 2 } /** * @see {@link https://discord.com/developers/docs/resources/auto-moderation#auto-moderation-action-object-auto-moderation-action-structure} */ export interface APIAutoModerationAction { /** * The action type */ type: AutoModerationActionType; /** * Additional metadata needed during execution for this specific action type * * Will only be omitted if the action type is {@link AutoModerationActionType.BlockMessage} */ metadata?: APIAutoModerationActionMetadata; } /** * @see {@link https://discord.com/developers/docs/resources/auto-moderation#auto-moderation-action-object-action-types} */ export declare enum AutoModerationActionType { /** * Blocks a member's message and prevents it from being posted. * A custom explanation can be specified and shown to members whenever their message is blocked */ BlockMessage = 1, /** * Logs user content to a specified channel */ SendAlertMessage = 2, /** * Timeout user for specified duration, this action type can be set if the bot has `MODERATE_MEMBERS` permission */ Timeout = 3, /** * Prevents a member from using text, voice, or other interactions */ BlockMemberInteraction = 4 } /** * @see {@link https://discord.com/developers/docs/resources/auto-moderation#auto-moderation-action-object-action-metadata} */ export interface APIAutoModerationActionMetadata { /** * Channel to which user content should be logged * * Associated action type: {@link AutoModerationActionType.SendAlertMessage} */ channel_id?: Snowflake; /** * Timeout duration in seconds (Maximum of 4 weeks - 2419200 seconds) * * Only available if using {@link AutoModerationRuleTriggerType.Keyword} * * Associated action type: {@link AutoModerationActionType.Timeout} */ duration_seconds?: number; /** * Additional explanation that will be shown to members whenever their message is blocked (Maximum 150 characters) * * Associated action type {@link AutoModerationActionType.BlockMessage} */ custom_message?: string; } //# sourceMappingURL=autoModeration.d.ts.map node_modules/discord-api-types/payloads/v10/permissions.js.map 0000664 00000000345 15114741631 0020477 0 ustar 00 {"version":3,"file":"permissions.js","sourceRoot":"","sources":["permissions.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AA0FH;;GAEG;AACH,IAAY,SAKX;AALD,WAAY,SAAS;IACpB;;OAEG;IACH,iDAAiB,CAAA;AAClB,CAAC,EALW,SAAS,yBAAT,SAAS,QAKpB"} node_modules/discord-api-types/payloads/v10/gateway.js 0000664 00000006315 15114741631 0017014 0 ustar 00 "use strict"; /** * Types extracted from * - https://discord.com/developers/docs/topics/gateway * - https://discord.com/developers/docs/topics/gateway-events */ Object.defineProperty(exports, "__esModule", { value: true }); exports.ActivityFlags = exports.ActivityType = exports.ActivityPlatform = exports.PresenceUpdateStatus = void 0; /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#update-presence-status-types} */ var PresenceUpdateStatus; (function (PresenceUpdateStatus) { PresenceUpdateStatus["Online"] = "online"; PresenceUpdateStatus["DoNotDisturb"] = "dnd"; PresenceUpdateStatus["Idle"] = "idle"; /** * Invisible and shown as offline */ PresenceUpdateStatus["Invisible"] = "invisible"; PresenceUpdateStatus["Offline"] = "offline"; })(PresenceUpdateStatus || (exports.PresenceUpdateStatus = PresenceUpdateStatus = {})); /** * @unstable This enum is currently not documented by Discord but has known values which we will try to keep up to date. * Values might be added or removed without a major version bump. */ var ActivityPlatform; (function (ActivityPlatform) { ActivityPlatform["Desktop"] = "desktop"; ActivityPlatform["Xbox"] = "xbox"; ActivityPlatform["Samsung"] = "samsung"; ActivityPlatform["IOS"] = "ios"; ActivityPlatform["Android"] = "android"; ActivityPlatform["Embedded"] = "embedded"; ActivityPlatform["PS4"] = "ps4"; ActivityPlatform["PS5"] = "ps5"; })(ActivityPlatform || (exports.ActivityPlatform = ActivityPlatform = {})); /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#activity-object-activity-types} */ var ActivityType; (function (ActivityType) { /** * Playing \{game\} */ ActivityType[ActivityType["Playing"] = 0] = "Playing"; /** * Streaming \{details\} */ ActivityType[ActivityType["Streaming"] = 1] = "Streaming"; /** * Listening to \{name\} */ ActivityType[ActivityType["Listening"] = 2] = "Listening"; /** * Watching \{details\} */ ActivityType[ActivityType["Watching"] = 3] = "Watching"; /** * \{emoji\} \{state\} */ ActivityType[ActivityType["Custom"] = 4] = "Custom"; /** * Competing in \{name\} */ ActivityType[ActivityType["Competing"] = 5] = "Competing"; })(ActivityType || (exports.ActivityType = ActivityType = {})); /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#activity-object-activity-flags} */ var ActivityFlags; (function (ActivityFlags) { ActivityFlags[ActivityFlags["Instance"] = 1] = "Instance"; ActivityFlags[ActivityFlags["Join"] = 2] = "Join"; ActivityFlags[ActivityFlags["Spectate"] = 4] = "Spectate"; ActivityFlags[ActivityFlags["JoinRequest"] = 8] = "JoinRequest"; ActivityFlags[ActivityFlags["Sync"] = 16] = "Sync"; ActivityFlags[ActivityFlags["Play"] = 32] = "Play"; ActivityFlags[ActivityFlags["PartyPrivacyFriends"] = 64] = "PartyPrivacyFriends"; ActivityFlags[ActivityFlags["PartyPrivacyVoiceChannel"] = 128] = "PartyPrivacyVoiceChannel"; ActivityFlags[ActivityFlags["Embedded"] = 256] = "Embedded"; })(ActivityFlags || (exports.ActivityFlags = ActivityFlags = {})); //# sourceMappingURL=gateway.js.map node_modules/discord-api-types/payloads/v10/emoji.js.map 0000664 00000000152 15114741631 0017223 0 ustar 00 {"version":3,"file":"emoji.js","sourceRoot":"","sources":["emoji.ts"],"names":[],"mappings":";AAAA;;GAEG"} node_modules/discord-api-types/payloads/v10/application.js 0000664 00000017440 15114741631 0017657 0 ustar 00 "use strict"; /** * Types extracted from https://discord.com/developers/docs/resources/application */ Object.defineProperty(exports, "__esModule", { value: true }); exports.ApplicationWebhookEventStatus = exports.ApplicationRoleConnectionMetadataType = exports.ApplicationFlags = void 0; /** * @see {@link https://discord.com/developers/docs/resources/application#application-object-application-flags} */ var ApplicationFlags; (function (ApplicationFlags) { /** * @unstable This application flag is currently not documented by Discord but has a known value which we will try to keep up to date. */ ApplicationFlags[ApplicationFlags["EmbeddedReleased"] = 2] = "EmbeddedReleased"; /** * @unstable This application flag is currently not documented by Discord but has a known value which we will try to keep up to date. */ ApplicationFlags[ApplicationFlags["ManagedEmoji"] = 4] = "ManagedEmoji"; /** * @unstable This application flag is currently not documented by Discord but has a known value which we will try to keep up to date. */ ApplicationFlags[ApplicationFlags["EmbeddedIAP"] = 8] = "EmbeddedIAP"; /** * @unstable This application flag is currently not documented by Discord but has a known value which we will try to keep up to date. */ ApplicationFlags[ApplicationFlags["GroupDMCreate"] = 16] = "GroupDMCreate"; /** * Indicates if an app uses the Auto Moderation API */ ApplicationFlags[ApplicationFlags["ApplicationAutoModerationRuleCreateBadge"] = 64] = "ApplicationAutoModerationRuleCreateBadge"; /** * @unstable This application flag is currently not documented by Discord but has a known value which we will try to keep up to date. */ ApplicationFlags[ApplicationFlags["RPCHasConnected"] = 2048] = "RPCHasConnected"; /** * Intent required for bots in 100 or more servers to receive `presence_update` events */ ApplicationFlags[ApplicationFlags["GatewayPresence"] = 4096] = "GatewayPresence"; /** * Intent required for bots in under 100 servers to receive `presence_update` events, found in Bot Settings */ ApplicationFlags[ApplicationFlags["GatewayPresenceLimited"] = 8192] = "GatewayPresenceLimited"; /** * Intent required for bots in 100 or more servers to receive member-related events like `guild_member_add`. * * @see List of member-related events {@link https://discord.com/developers/docs/topics/gateway#list-of-intents | under `GUILD_MEMBERS`} */ ApplicationFlags[ApplicationFlags["GatewayGuildMembers"] = 16384] = "GatewayGuildMembers"; /** * Intent required for bots in under 100 servers to receive member-related events like `guild_member_add`, found in Bot Settings. * * @see List of member-related events {@link https://discord.com/developers/docs/topics/gateway#list-of-intents | under `GUILD_MEMBERS`} */ ApplicationFlags[ApplicationFlags["GatewayGuildMembersLimited"] = 32768] = "GatewayGuildMembersLimited"; /** * Indicates unusual growth of an app that prevents verification */ ApplicationFlags[ApplicationFlags["VerificationPendingGuildLimit"] = 65536] = "VerificationPendingGuildLimit"; /** * Indicates if an app is embedded within the Discord client (currently unavailable publicly) */ ApplicationFlags[ApplicationFlags["Embedded"] = 131072] = "Embedded"; /** * Intent required for bots in 100 or more servers to receive {@link https://support-dev.discord.com/hc/articles/6207308062871 | message content} */ ApplicationFlags[ApplicationFlags["GatewayMessageContent"] = 262144] = "GatewayMessageContent"; /** * Intent required for bots in under 100 servers to receive {@link https://support-dev.discord.com/hc/articles/6207308062871 | message content}, * found in Bot Settings */ ApplicationFlags[ApplicationFlags["GatewayMessageContentLimited"] = 524288] = "GatewayMessageContentLimited"; /** * @unstable This application flag is currently not documented by Discord but has a known value which we will try to keep up to date. */ ApplicationFlags[ApplicationFlags["EmbeddedFirstParty"] = 1048576] = "EmbeddedFirstParty"; /** * Indicates if an app has registered global {@link https://discord.com/developers/docs/interactions/application-commands | application commands} */ ApplicationFlags[ApplicationFlags["ApplicationCommandBadge"] = 8388608] = "ApplicationCommandBadge"; })(ApplicationFlags || (exports.ApplicationFlags = ApplicationFlags = {})); /** * @see {@link https://discord.com/developers/docs/resources/application-role-connection-metadata#application-role-connection-metadata-object-application-role-connection-metadata-type} */ var ApplicationRoleConnectionMetadataType; (function (ApplicationRoleConnectionMetadataType) { /** * The metadata value (`integer`) is less than or equal to the guild's configured value (`integer`) */ ApplicationRoleConnectionMetadataType[ApplicationRoleConnectionMetadataType["IntegerLessThanOrEqual"] = 1] = "IntegerLessThanOrEqual"; /** * The metadata value (`integer`) is greater than or equal to the guild's configured value (`integer`) */ ApplicationRoleConnectionMetadataType[ApplicationRoleConnectionMetadataType["IntegerGreaterThanOrEqual"] = 2] = "IntegerGreaterThanOrEqual"; /** * The metadata value (`integer`) is equal to the guild's configured value (`integer`) */ ApplicationRoleConnectionMetadataType[ApplicationRoleConnectionMetadataType["IntegerEqual"] = 3] = "IntegerEqual"; /** * The metadata value (`integer`) is not equal to the guild's configured value (`integer`) */ ApplicationRoleConnectionMetadataType[ApplicationRoleConnectionMetadataType["IntegerNotEqual"] = 4] = "IntegerNotEqual"; /** * The metadata value (`ISO8601 string`) is less than or equal to the guild's configured value (`integer`; days before current date) */ ApplicationRoleConnectionMetadataType[ApplicationRoleConnectionMetadataType["DatetimeLessThanOrEqual"] = 5] = "DatetimeLessThanOrEqual"; /** * The metadata value (`ISO8601 string`) is greater than or equal to the guild's configured value (`integer`; days before current date) */ ApplicationRoleConnectionMetadataType[ApplicationRoleConnectionMetadataType["DatetimeGreaterThanOrEqual"] = 6] = "DatetimeGreaterThanOrEqual"; /** * The metadata value (`integer`) is equal to the guild's configured value (`integer`; `1`) */ ApplicationRoleConnectionMetadataType[ApplicationRoleConnectionMetadataType["BooleanEqual"] = 7] = "BooleanEqual"; /** * The metadata value (`integer`) is not equal to the guild's configured value (`integer`; `1`) */ ApplicationRoleConnectionMetadataType[ApplicationRoleConnectionMetadataType["BooleanNotEqual"] = 8] = "BooleanNotEqual"; })(ApplicationRoleConnectionMetadataType || (exports.ApplicationRoleConnectionMetadataType = ApplicationRoleConnectionMetadataType = {})); /** * @see {@link https://discord.com/developers/docs/resources/application#application-object-application-event-webhook-status} */ var ApplicationWebhookEventStatus; (function (ApplicationWebhookEventStatus) { /** * Webhook events are disabled by developer */ ApplicationWebhookEventStatus[ApplicationWebhookEventStatus["Disabled"] = 1] = "Disabled"; /** * Webhook events are enabled by developer */ ApplicationWebhookEventStatus[ApplicationWebhookEventStatus["Enabled"] = 2] = "Enabled"; /** * Webhook events are disabled by Discord, usually due to inactivity */ ApplicationWebhookEventStatus[ApplicationWebhookEventStatus["DisabledByDiscord"] = 3] = "DisabledByDiscord"; })(ApplicationWebhookEventStatus || (exports.ApplicationWebhookEventStatus = ApplicationWebhookEventStatus = {})); //# sourceMappingURL=application.js.map node_modules/discord-api-types/payloads/v10/poll.d.ts 0000664 00000005326 15114741631 0016556 0 ustar 00 /** * Types extracted from https://discord.com/developers/docs/resources/poll */ import type { APIPartialEmoji } from './emoji'; export interface APIBasePoll { /** * The question of the poll */ question: APIPollMedia; } export interface APIPollDefaults { /** * Whether a user can select multiple answers * * @defaultValue `false` */ allow_multiselect: boolean; /** * The layout type of the poll * * @defaultValue `PollLayoutType.Default` */ layout_type: PollLayoutType; } /** * @see {@link https://discord.com/developers/docs/resources/poll#poll-object-poll-object-structure} */ export interface APIPoll extends APIBasePoll, APIPollDefaults { /** * Each of the answers available in the poll, up to 10 */ answers: APIPollAnswer[]; /** * The time when the poll ends (IS08601 timestamp) */ expiry: string; /** * The results of the poll */ results?: APIPollResults; } /** * @see {@link https://discord.com/developers/docs/resources/poll#layout-type} */ export declare enum PollLayoutType { /** * The, uhm, default layout type */ Default = 1 } /** * @see {@link https://discord.com/developers/docs/resources/poll#poll-media-object-poll-media-object-structure} */ export interface APIPollMedia { /** * The text of the field * * The maximum length is `300` for the question, and `55` for any answer */ text?: string; /** * The emoji of the field */ emoji?: APIPartialEmoji; } export interface APIBasePollAnswer { /** * The data of the answer */ poll_media: APIPollMedia; } /** * @see {@link https://discord.com/developers/docs/resources/poll#poll-answer-object-poll-answer-object-structure} */ export interface APIPollAnswer extends APIBasePollAnswer { /** * The ID of the answer. Starts at `1` for the first answer and goes up sequentially */ answer_id: number; } /** * @see {@link https://discord.com/developers/docs/resources/poll#poll-results-object-poll-results-object-structure} */ export interface APIPollResults { /** * Whether the votes have been precisely counted */ is_finalized: boolean; /** * The counts for each answer */ answer_counts: APIPollAnswerCount[]; } /** * @see {@link https://discord.com/developers/docs/resources/poll#poll-results-object-poll-answer-count-object-structure} */ export interface APIPollAnswerCount { /** * The `answer_id` */ id: number; /** * The number of votes for this answer */ count: number; /** * Whether the current user voted for this answer */ me_voted: boolean; } //# sourceMappingURL=poll.d.ts.map node_modules/discord-api-types/payloads/v10/gateway.d.ts 0000664 00000025550 15114741631 0017252 0 ustar 00 /** * Types extracted from * - https://discord.com/developers/docs/topics/gateway * - https://discord.com/developers/docs/topics/gateway-events */ import type { Snowflake } from '../../globals'; import type { APIThreadChannel, APIThreadMember } from './channel'; import type { APIEmoji } from './emoji'; import type { APIUser } from './user'; /** * @see {@link https://discord.com/developers/docs/topics/gateway#get-gateway} */ export interface APIGatewayInfo { /** * The WSS URL that can be used for connecting to the gateway */ url: string; } /** * @see {@link https://discord.com/developers/docs/topics/gateway#get-gateway-bot} */ export interface APIGatewayBotInfo extends APIGatewayInfo { /** * The recommended number of shards to use when connecting * * @see {@link https://discord.com/developers/docs/topics/gateway#sharding} */ shards: number; /** * Information on the current session start limit * * @see {@link https://discord.com/developers/docs/topics/gateway#session-start-limit-object} */ session_start_limit: APIGatewaySessionStartLimit; } /** * @see {@link https://discord.com/developers/docs/topics/gateway#session-start-limit-object} */ export interface APIGatewaySessionStartLimit { /** * The total number of session starts the current user is allowed */ total: number; /** * The remaining number of session starts the current user is allowed */ remaining: number; /** * The number of milliseconds after which the limit resets */ reset_after: number; /** * The number of identify requests allowed per 5 seconds */ max_concurrency: number; } /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#update-presence} */ export interface GatewayGuildMembersChunkPresence { /** * The user presence is being updated for * * **The user object within this event can be partial, the only field which must be sent is the `id` field, * everything else is optional.** * * @see {@link https://discord.com/developers/docs/resources/user#user-object} */ user: Partial<APIUser> & Pick<APIUser, 'id'>; /** * Either "idle", "dnd", "online", or "offline" */ status?: PresenceUpdateReceiveStatus; /** * User's current activities * * @see {@link https://discord.com/developers/docs/topics/gateway-events#activity-object} */ activities?: GatewayActivity[]; /** * User's platform-dependent status * * @see {@link https://discord.com/developers/docs/topics/gateway-events#client-status-object} */ client_status?: GatewayPresenceClientStatus; } /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#presence-update-presence-update-event-fields} */ export interface GatewayPresenceUpdate extends GatewayGuildMembersChunkPresence { /** * ID of the guild */ guild_id: Snowflake; } /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#update-presence-status-types} */ export declare enum PresenceUpdateStatus { Online = "online", DoNotDisturb = "dnd", Idle = "idle", /** * Invisible and shown as offline */ Invisible = "invisible", Offline = "offline" } export type PresenceUpdateReceiveStatus = Exclude<PresenceUpdateStatus, PresenceUpdateStatus.Invisible>; /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#client-status-object} */ export interface GatewayPresenceClientStatus { /** * The user's status set for an active desktop (Windows, Linux, Mac) application session */ desktop?: PresenceUpdateReceiveStatus; /** * The user's status set for an active mobile (iOS, Android) application session */ mobile?: PresenceUpdateReceiveStatus; /** * The user's status set for an active web (browser, bot account) application session */ web?: PresenceUpdateReceiveStatus; } /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#activity-object-activity-structure} */ export interface GatewayActivity { /** * The activity's id * * @unstable */ id: string; /** * The activity's name */ name: string; /** * Activity type * * @see {@link https://discord.com/developers/docs/topics/gateway-events#activity-object-activity-types} */ type: ActivityType; /** * Stream url, is validated when type is `1` */ url?: string | null; /** * Unix timestamp of when the activity was added to the user's session */ created_at: number; /** * Unix timestamps for start and/or end of the game */ timestamps?: GatewayActivityTimestamps; /** * The Spotify song id * * @unstable */ sync_id?: string; /** * The platform this activity is being done on * * @unstable You can use {@link ActivityPlatform} as a stepping stone, but this might be inaccurate */ platform?: string; /** * Application id for the game */ application_id?: Snowflake; /** * What the player is currently doing */ details?: string | null; /** * The user's current party status, or the text used for a custom status */ state?: string | null; /** * The emoji used for a custom status * * @see {@link https://discord.com/developers/docs/topics/gateway-events#activity-object-activity-emoji} */ emoji?: GatewayActivityEmoji; /** * @unstable */ session_id?: string; /** * Information for the current party of the player * * @see {@link https://discord.com/developers/docs/topics/gateway-events#activity-object-activity-party} */ party?: GatewayActivityParty; /** * Images for the presence and their hover texts * * @see {@link https://discord.com/developers/docs/topics/gateway-events#activity-object-activity-assets} */ assets?: GatewayActivityAssets; /** * Secrets for Rich Presence joining and spectating * * @see {@link https://discord.com/developers/docs/topics/gateway-events#activity-object-activity-secrets} */ secrets?: GatewayActivitySecrets; /** * Whether or not the activity is an instanced game session */ instance?: boolean; /** * Activity flags `OR`d together, describes what the payload includes * * @see {@link https://discord.com/developers/docs/topics/gateway-events#activity-object-activity-flags} * @see {@link https://en.wikipedia.org/wiki/Bit_field} */ flags?: ActivityFlags; /** * The custom buttons shown in the Rich Presence (max 2) */ buttons?: GatewayActivityButton[] | string[]; } /** * @unstable This enum is currently not documented by Discord but has known values which we will try to keep up to date. * Values might be added or removed without a major version bump. */ export declare enum ActivityPlatform { Desktop = "desktop", Xbox = "xbox", Samsung = "samsung", IOS = "ios", Android = "android", Embedded = "embedded", PS4 = "ps4", PS5 = "ps5" } /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#activity-object-activity-types} */ export declare enum ActivityType { /** * Playing \{game\} */ Playing = 0, /** * Streaming \{details\} */ Streaming = 1, /** * Listening to \{name\} */ Listening = 2, /** * Watching \{details\} */ Watching = 3, /** * \{emoji\} \{state\} */ Custom = 4, /** * Competing in \{name\} */ Competing = 5 } /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#activity-object-activity-timestamps} */ export interface GatewayActivityTimestamps { /** * Unix time (in milliseconds) of when the activity started */ start?: number; /** * Unix time (in milliseconds) of when the activity ends */ end?: number; } /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#activity-object-activity-emoji} */ export type GatewayActivityEmoji = Partial<Pick<APIEmoji, 'animated' | 'id'>> & Pick<APIEmoji, 'name'>; /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#activity-object-activity-party} */ export interface GatewayActivityParty { /** * The id of the party */ id?: string; /** * Used to show the party's current and maximum size */ size?: [current_size: number, max_size: number]; } /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#activity-object-activity-assets} */ export type GatewayActivityAssets = Partial<Record<'large_image' | 'large_text' | 'small_image' | 'small_text', string>>; /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#activity-object-activity-secrets} */ export type GatewayActivitySecrets = Partial<Record<'join' | 'match' | 'spectate', string>>; /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#activity-object-activity-flags} */ export declare enum ActivityFlags { Instance = 1, Join = 2, Spectate = 4, JoinRequest = 8, Sync = 16, Play = 32, PartyPrivacyFriends = 64, PartyPrivacyVoiceChannel = 128, Embedded = 256 } export interface GatewayActivityButton { /** * The text shown on the button (1-32 characters) */ label: string; /** * The url opened when clicking the button (1-512 characters) */ url: string; } /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#thread-list-sync-thread-list-sync-event-fields} */ export interface GatewayThreadListSync { /** * ID of the guild */ guild_id: Snowflake; /** * The ids of all the parent channels whose threads are being synced, otherwise the entire guild */ channel_ids?: Snowflake[]; /** * Array of the synced threads */ threads: APIThreadChannel[]; /** * The member objects for the client user in each joined thread that was synced */ members: APIThreadMember[]; } /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#thread-members-update-thread-members-update-event-fields} */ export interface GatewayThreadMembersUpdate { /** * The id of the thread for which members are being synced */ id: Snowflake; /** * The id of the guild that the thread is in */ guild_id: Snowflake; /** * The approximate member count of the thread, does not count above 50 even if there are more members */ member_count: number; /** * The members that were added to the thread */ added_members?: APIThreadMember[]; /** * The ids of the members that were removed from the thread */ removed_member_ids?: Snowflake[]; } //# sourceMappingURL=gateway.d.ts.map node_modules/discord-api-types/payloads/v10/webhook.d.ts 0000664 00000013205 15114741631 0017241 0 ustar 00 /** * Types extracted from https://discord.com/developers/docs/resources/webhook */ import type { Snowflake } from '../../globals'; import type { APIEntitlement, APIGuild, APIUser, APIWebhookSourceGuild, ApplicationIntegrationType, OAuth2Scopes, APIWebhookSourceChannel } from './index'; /** * @see {@link https://discord.com/developers/docs/resources/webhook#webhook-object} */ export interface APIWebhook { /** * The id of the webhook */ id: Snowflake; /** * The type of the webhook * * @see {@link https://discord.com/developers/docs/resources/webhook#webhook-object-webhook-types} */ type: WebhookType; /** * The guild id this webhook is for */ guild_id?: Snowflake; /** * The channel id this webhook is for */ channel_id: Snowflake; /** * The user this webhook was created by (not returned when getting a webhook with its token) * * @see {@link https://discord.com/developers/docs/resources/user#user-object} */ user?: APIUser; /** * The default name of the webhook */ name: string | null; /** * The default avatar of the webhook */ avatar: string | null; /** * The secure token of the webhook (returned for Incoming Webhooks) */ token?: string; /** * The bot/OAuth2 application that created this webhook */ application_id: Snowflake | null; /** * The guild of the channel that this webhook is following (returned for Channel Follower Webhooks) */ source_guild?: APIWebhookSourceGuild; /** * The channel that this webhook is following (returned for Channel Follower Webhooks) */ source_channel?: APIWebhookSourceChannel; /** * The url used for executing the webhook (returned by the webhooks OAuth2 flow) */ url?: string; } /** * @see {@link https://discord.com/developers/docs/events/webhook-events#webhook-event-payloads} */ export type APIWebhookEvent = APIWebhookEventBase<ApplicationWebhookType.Event, APIWebhookEventBody> | APIWebhookEventBase<ApplicationWebhookType.Ping, never>; /** * @see {@link https://discord.com/developers/docs/events/webhook-events#event-body-object} */ export type APIWebhookEventBody = APIWebhookEventEventBase<ApplicationWebhookEventType.ApplicationAuthorized, APIWebhookEventApplicationAuthorizedData> | APIWebhookEventEventBase<ApplicationWebhookEventType.ApplicationDeauthorized, APIWebhookEventApplicationDeauthorizedData> | APIWebhookEventEventBase<ApplicationWebhookEventType.EntitlementCreate, APIWebhookEventEntitlementCreateData> | APIWebhookEventEventBase<ApplicationWebhookEventType.QuestUserEnrollment, APIWebhookEventQuestUserEnrollmentData>; export interface APIWebhookEventApplicationAuthorizedData { /** * Installation context for the authorization. Either guild (`0`) if installed to a server or user (`1`) if installed to a user's account */ integration_type?: ApplicationIntegrationType; /** * User who authorized the app */ user: APIUser; /** * List of scopes the user authorized */ scopes: OAuth2Scopes[]; /** * Server which app was authorized for (when integration type is `0`) */ guild?: APIGuild; } export interface APIWebhookEventApplicationDeauthorizedData { /** * User who deauthorized the app */ user: APIUser; } export type APIWebhookEventEntitlementCreateData = APIEntitlement; export type APIWebhookEventQuestUserEnrollmentData = never; export interface APIWebhookEventBase<Type extends ApplicationWebhookType, Event> { /** * Version scheme for the webhook event. Currently always `1` */ version: 1; /** * ID of your app */ application_id: Snowflake; /** * Type of webhook */ type: Type; /** * Event data payload */ event: Event; } /** * @see {@link https://discord.com/developers/docs/events/webhook-events#webhook-types} */ export declare enum ApplicationWebhookType { /** * PING event sent to verify your Webhook Event URL is active */ Ping = 0, /** * Webhook event (details for event in event body object) */ Event = 1 } export interface APIWebhookEventEventBase<Type extends ApplicationWebhookEventType, Data> { /** * Event type */ type: Type; /** * Timestamp of when the event occurred in ISO8601 format */ timestamp: string; /** * Data for the event. The shape depends on the event type */ data: Data; } /** * @see {@link https://discord.com/developers/docs/events/webhook-events#event-types} */ export declare enum ApplicationWebhookEventType { /** * Sent when an app was authorized by a user to a server or their account */ ApplicationAuthorized = "APPLICATION_AUTHORIZED", /** * Sent when an app was deauthorized by a user */ ApplicationDeauthorized = "APPLICATION_DEAUTHORIZED", /** * Entitlement was created */ EntitlementCreate = "ENTITLEMENT_CREATE", /** * User was added to a Quest (currently unavailable) */ QuestUserEnrollment = "QUEST_USER_ENROLLMENT" } /** * @see {@link https://discord.com/developers/docs/resources/webhook#webhook-object-webhook-types} */ export declare enum WebhookType { /** * Incoming Webhooks can post messages to channels with a generated token */ Incoming = 1, /** * Channel Follower Webhooks are internal webhooks used with Channel Following to post new messages into channels */ ChannelFollower = 2, /** * Application webhooks are webhooks used with Interactions */ Application = 3 } //# sourceMappingURL=webhook.d.ts.map node_modules/discord-api-types/payloads/v10/interactions.js 0000664 00000001641 15114741631 0020052 0 ustar 00 "use strict"; var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { if (k2 === undefined) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { return m[k]; } }; } Object.defineProperty(o, k2, desc); }) : (function(o, m, k, k2) { if (k2 === undefined) k2 = k; o[k2] = m[k]; })); var __exportStar = (this && this.__exportStar) || function(m, exports) { for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); }; Object.defineProperty(exports, "__esModule", { value: true }); __exportStar(require("./_interactions/applicationCommands"), exports); __exportStar(require("./_interactions/responses"), exports); //# sourceMappingURL=interactions.js.map node_modules/discord-api-types/payloads/v10/permissions.js 0000664 00000001061 15114741631 0017717 0 ustar 00 "use strict"; /** * Types extracted from https://discord.com/developers/docs/topics/permissions */ Object.defineProperty(exports, "__esModule", { value: true }); exports.RoleFlags = void 0; /** * @see {@link https://discord.com/developers/docs/topics/permissions#role-object-role-flags} */ var RoleFlags; (function (RoleFlags) { /** * Role can be selected by members in an onboarding prompt */ RoleFlags[RoleFlags["InPrompt"] = 1] = "InPrompt"; })(RoleFlags || (exports.RoleFlags = RoleFlags = {})); //# sourceMappingURL=permissions.js.map node_modules/discord-api-types/payloads/v10/channel.js 0000664 00000057703 15114741631 0016772 0 ustar 00 "use strict"; /** * Types extracted from https://discord.com/developers/docs/resources/channel */ Object.defineProperty(exports, "__esModule", { value: true }); exports.ChannelFlags = exports.SeparatorSpacingSize = exports.UnfurledMediaItemLoadingState = exports.SelectMenuDefaultValueType = exports.TextInputStyle = exports.ButtonStyle = exports.ComponentType = exports.AllowedMentionsTypes = exports.AttachmentFlags = exports.EmbedType = exports.ThreadMemberFlags = exports.ThreadAutoArchiveDuration = exports.OverwriteType = exports.MessageFlags = exports.MessageReferenceType = exports.MessageActivityType = exports.MessageType = exports.VideoQualityMode = exports.ChannelType = exports.ForumLayoutType = exports.SortOrderType = void 0; /** * @see {@link https://discord.com/developers/docs/resources/channel/#channel-object-sort-order-types} */ var SortOrderType; (function (SortOrderType) { /** * Sort forum posts by activity */ SortOrderType[SortOrderType["LatestActivity"] = 0] = "LatestActivity"; /** * Sort forum posts by creation time (from most recent to oldest) */ SortOrderType[SortOrderType["CreationDate"] = 1] = "CreationDate"; })(SortOrderType || (exports.SortOrderType = SortOrderType = {})); /** * @see {@link https://discord.com/developers/docs/resources/channel/#channel-object-forum-layout-types} */ var ForumLayoutType; (function (ForumLayoutType) { /** * No default has been set for forum channel */ ForumLayoutType[ForumLayoutType["NotSet"] = 0] = "NotSet"; /** * Display posts as a list */ ForumLayoutType[ForumLayoutType["ListView"] = 1] = "ListView"; /** * Display posts as a collection of tiles */ ForumLayoutType[ForumLayoutType["GalleryView"] = 2] = "GalleryView"; })(ForumLayoutType || (exports.ForumLayoutType = ForumLayoutType = {})); /** * @see {@link https://discord.com/developers/docs/resources/channel#channel-object-channel-types} */ var ChannelType; (function (ChannelType) { /** * A text channel within a guild */ ChannelType[ChannelType["GuildText"] = 0] = "GuildText"; /** * A direct message between users */ ChannelType[ChannelType["DM"] = 1] = "DM"; /** * A voice channel within a guild */ ChannelType[ChannelType["GuildVoice"] = 2] = "GuildVoice"; /** * A direct message between multiple users */ ChannelType[ChannelType["GroupDM"] = 3] = "GroupDM"; /** * An organizational category that contains up to 50 channels * * @see {@link https://support.discord.com/hc/articles/115001580171} */ ChannelType[ChannelType["GuildCategory"] = 4] = "GuildCategory"; /** * A channel that users can follow and crosspost into their own guild * * @see {@link https://support.discord.com/hc/articles/360032008192} */ ChannelType[ChannelType["GuildAnnouncement"] = 5] = "GuildAnnouncement"; /** * A temporary sub-channel within a Guild Announcement channel */ ChannelType[ChannelType["AnnouncementThread"] = 10] = "AnnouncementThread"; /** * A temporary sub-channel within a Guild Text or Guild Forum channel */ ChannelType[ChannelType["PublicThread"] = 11] = "PublicThread"; /** * A temporary sub-channel within a Guild Text channel that is only viewable by those invited and those with the Manage Threads permission */ ChannelType[ChannelType["PrivateThread"] = 12] = "PrivateThread"; /** * A voice channel for hosting events with an audience * * @see {@link https://support.discord.com/hc/articles/1500005513722} */ ChannelType[ChannelType["GuildStageVoice"] = 13] = "GuildStageVoice"; /** * The channel in a Student Hub containing the listed servers * * @see {@link https://support.discord.com/hc/articles/4406046651927} */ ChannelType[ChannelType["GuildDirectory"] = 14] = "GuildDirectory"; /** * A channel that can only contain threads */ ChannelType[ChannelType["GuildForum"] = 15] = "GuildForum"; /** * A channel like forum channels but contains media for server subscriptions * * @see {@link https://creator-support.discord.com/hc/articles/14346342766743} */ ChannelType[ChannelType["GuildMedia"] = 16] = "GuildMedia"; // EVERYTHING BELOW THIS LINE SHOULD BE OLD NAMES FOR RENAMED ENUM MEMBERS // /** * A channel that users can follow and crosspost into their own guild * * @deprecated This is the old name for {@link ChannelType.GuildAnnouncement} * @see {@link https://support.discord.com/hc/articles/360032008192} */ ChannelType[ChannelType["GuildNews"] = 5] = "GuildNews"; /** * A temporary sub-channel within a Guild Announcement channel * * @deprecated This is the old name for {@link ChannelType.AnnouncementThread} */ // eslint-disable-next-line @typescript-eslint/no-duplicate-enum-values ChannelType[ChannelType["GuildNewsThread"] = 10] = "GuildNewsThread"; /** * A temporary sub-channel within a Guild Text channel * * @deprecated This is the old name for {@link ChannelType.PublicThread} */ ChannelType[ChannelType["GuildPublicThread"] = 11] = "GuildPublicThread"; /** * A temporary sub-channel within a Guild Text channel that is only viewable by those invited and those with the Manage Threads permission * * @deprecated This is the old name for {@link ChannelType.PrivateThread} */ ChannelType[ChannelType["GuildPrivateThread"] = 12] = "GuildPrivateThread"; })(ChannelType || (exports.ChannelType = ChannelType = {})); var VideoQualityMode; (function (VideoQualityMode) { /** * Discord chooses the quality for optimal performance */ VideoQualityMode[VideoQualityMode["Auto"] = 1] = "Auto"; /** * 720p */ VideoQualityMode[VideoQualityMode["Full"] = 2] = "Full"; })(VideoQualityMode || (exports.VideoQualityMode = VideoQualityMode = {})); /** * @see {@link https://discord.com/developers/docs/resources/channel#message-object-message-types} */ var MessageType; (function (MessageType) { MessageType[MessageType["Default"] = 0] = "Default"; MessageType[MessageType["RecipientAdd"] = 1] = "RecipientAdd"; MessageType[MessageType["RecipientRemove"] = 2] = "RecipientRemove"; MessageType[MessageType["Call"] = 3] = "Call"; MessageType[MessageType["ChannelNameChange"] = 4] = "ChannelNameChange"; MessageType[MessageType["ChannelIconChange"] = 5] = "ChannelIconChange"; MessageType[MessageType["ChannelPinnedMessage"] = 6] = "ChannelPinnedMessage"; MessageType[MessageType["UserJoin"] = 7] = "UserJoin"; MessageType[MessageType["GuildBoost"] = 8] = "GuildBoost"; MessageType[MessageType["GuildBoostTier1"] = 9] = "GuildBoostTier1"; MessageType[MessageType["GuildBoostTier2"] = 10] = "GuildBoostTier2"; MessageType[MessageType["GuildBoostTier3"] = 11] = "GuildBoostTier3"; MessageType[MessageType["ChannelFollowAdd"] = 12] = "ChannelFollowAdd"; MessageType[MessageType["GuildDiscoveryDisqualified"] = 14] = "GuildDiscoveryDisqualified"; MessageType[MessageType["GuildDiscoveryRequalified"] = 15] = "GuildDiscoveryRequalified"; MessageType[MessageType["GuildDiscoveryGracePeriodInitialWarning"] = 16] = "GuildDiscoveryGracePeriodInitialWarning"; MessageType[MessageType["GuildDiscoveryGracePeriodFinalWarning"] = 17] = "GuildDiscoveryGracePeriodFinalWarning"; MessageType[MessageType["ThreadCreated"] = 18] = "ThreadCreated"; MessageType[MessageType["Reply"] = 19] = "Reply"; MessageType[MessageType["ChatInputCommand"] = 20] = "ChatInputCommand"; MessageType[MessageType["ThreadStarterMessage"] = 21] = "ThreadStarterMessage"; MessageType[MessageType["GuildInviteReminder"] = 22] = "GuildInviteReminder"; MessageType[MessageType["ContextMenuCommand"] = 23] = "ContextMenuCommand"; MessageType[MessageType["AutoModerationAction"] = 24] = "AutoModerationAction"; MessageType[MessageType["RoleSubscriptionPurchase"] = 25] = "RoleSubscriptionPurchase"; MessageType[MessageType["InteractionPremiumUpsell"] = 26] = "InteractionPremiumUpsell"; MessageType[MessageType["StageStart"] = 27] = "StageStart"; MessageType[MessageType["StageEnd"] = 28] = "StageEnd"; MessageType[MessageType["StageSpeaker"] = 29] = "StageSpeaker"; /** * @unstable https://github.com/discord/discord-api-docs/pull/5927#discussion_r1107678548 */ MessageType[MessageType["StageRaiseHand"] = 30] = "StageRaiseHand"; MessageType[MessageType["StageTopic"] = 31] = "StageTopic"; MessageType[MessageType["GuildApplicationPremiumSubscription"] = 32] = "GuildApplicationPremiumSubscription"; MessageType[MessageType["GuildIncidentAlertModeEnabled"] = 36] = "GuildIncidentAlertModeEnabled"; MessageType[MessageType["GuildIncidentAlertModeDisabled"] = 37] = "GuildIncidentAlertModeDisabled"; MessageType[MessageType["GuildIncidentReportRaid"] = 38] = "GuildIncidentReportRaid"; MessageType[MessageType["GuildIncidentReportFalseAlarm"] = 39] = "GuildIncidentReportFalseAlarm"; MessageType[MessageType["PurchaseNotification"] = 44] = "PurchaseNotification"; MessageType[MessageType["PollResult"] = 46] = "PollResult"; })(MessageType || (exports.MessageType = MessageType = {})); /** * @see {@link https://discord.com/developers/docs/resources/channel#message-object-message-activity-types} */ var MessageActivityType; (function (MessageActivityType) { MessageActivityType[MessageActivityType["Join"] = 1] = "Join"; MessageActivityType[MessageActivityType["Spectate"] = 2] = "Spectate"; MessageActivityType[MessageActivityType["Listen"] = 3] = "Listen"; MessageActivityType[MessageActivityType["JoinRequest"] = 5] = "JoinRequest"; })(MessageActivityType || (exports.MessageActivityType = MessageActivityType = {})); /** * @see {@link https://discord.com/developers/docs/resources/channel#message-reference-types} */ var MessageReferenceType; (function (MessageReferenceType) { /** * A standard reference used by replies */ MessageReferenceType[MessageReferenceType["Default"] = 0] = "Default"; /** * Reference used to point to a message at a point in time */ MessageReferenceType[MessageReferenceType["Forward"] = 1] = "Forward"; })(MessageReferenceType || (exports.MessageReferenceType = MessageReferenceType = {})); /** * @see {@link https://discord.com/developers/docs/resources/channel#message-object-message-flags} */ var MessageFlags; (function (MessageFlags) { /** * This message has been published to subscribed channels (via Channel Following) */ MessageFlags[MessageFlags["Crossposted"] = 1] = "Crossposted"; /** * This message originated from a message in another channel (via Channel Following) */ MessageFlags[MessageFlags["IsCrosspost"] = 2] = "IsCrosspost"; /** * Do not include any embeds when serializing this message */ MessageFlags[MessageFlags["SuppressEmbeds"] = 4] = "SuppressEmbeds"; /** * The source message for this crosspost has been deleted (via Channel Following) */ MessageFlags[MessageFlags["SourceMessageDeleted"] = 8] = "SourceMessageDeleted"; /** * This message came from the urgent message system */ MessageFlags[MessageFlags["Urgent"] = 16] = "Urgent"; /** * This message has an associated thread, which shares its id */ MessageFlags[MessageFlags["HasThread"] = 32] = "HasThread"; /** * This message is only visible to the user who invoked the Interaction */ MessageFlags[MessageFlags["Ephemeral"] = 64] = "Ephemeral"; /** * This message is an Interaction Response and the bot is "thinking" */ MessageFlags[MessageFlags["Loading"] = 128] = "Loading"; /** * This message failed to mention some roles and add their members to the thread */ MessageFlags[MessageFlags["FailedToMentionSomeRolesInThread"] = 256] = "FailedToMentionSomeRolesInThread"; /** * @unstable This message flag is currently not documented by Discord but has a known value which we will try to keep up to date. */ MessageFlags[MessageFlags["ShouldShowLinkNotDiscordWarning"] = 1024] = "ShouldShowLinkNotDiscordWarning"; /** * This message will not trigger push and desktop notifications */ MessageFlags[MessageFlags["SuppressNotifications"] = 4096] = "SuppressNotifications"; /** * This message is a voice message */ MessageFlags[MessageFlags["IsVoiceMessage"] = 8192] = "IsVoiceMessage"; /** * This message has a snapshot (via Message Forwarding) */ MessageFlags[MessageFlags["HasSnapshot"] = 16384] = "HasSnapshot"; /** * Allows you to create fully component-driven messages * * @see {@link https://discord.com/developers/docs/components/overview} */ MessageFlags[MessageFlags["IsComponentsV2"] = 32768] = "IsComponentsV2"; })(MessageFlags || (exports.MessageFlags = MessageFlags = {})); var OverwriteType; (function (OverwriteType) { OverwriteType[OverwriteType["Role"] = 0] = "Role"; OverwriteType[OverwriteType["Member"] = 1] = "Member"; })(OverwriteType || (exports.OverwriteType = OverwriteType = {})); var ThreadAutoArchiveDuration; (function (ThreadAutoArchiveDuration) { ThreadAutoArchiveDuration[ThreadAutoArchiveDuration["OneHour"] = 60] = "OneHour"; ThreadAutoArchiveDuration[ThreadAutoArchiveDuration["OneDay"] = 1440] = "OneDay"; ThreadAutoArchiveDuration[ThreadAutoArchiveDuration["ThreeDays"] = 4320] = "ThreeDays"; ThreadAutoArchiveDuration[ThreadAutoArchiveDuration["OneWeek"] = 10080] = "OneWeek"; })(ThreadAutoArchiveDuration || (exports.ThreadAutoArchiveDuration = ThreadAutoArchiveDuration = {})); var ThreadMemberFlags; (function (ThreadMemberFlags) { /** * @unstable This thread member flag is currently not documented by Discord but has a known value which we will try to keep up to date. */ ThreadMemberFlags[ThreadMemberFlags["HasInteracted"] = 1] = "HasInteracted"; /** * @unstable This thread member flag is currently not documented by Discord but has a known value which we will try to keep up to date. */ ThreadMemberFlags[ThreadMemberFlags["AllMessages"] = 2] = "AllMessages"; /** * @unstable This thread member flag is currently not documented by Discord but has a known value which we will try to keep up to date. */ ThreadMemberFlags[ThreadMemberFlags["OnlyMentions"] = 4] = "OnlyMentions"; /** * @unstable This thread member flag is currently not documented by Discord but has a known value which we will try to keep up to date. */ ThreadMemberFlags[ThreadMemberFlags["NoMessages"] = 8] = "NoMessages"; })(ThreadMemberFlags || (exports.ThreadMemberFlags = ThreadMemberFlags = {})); /** * @see {@link https://discord.com/developers/docs/resources/channel#embed-object-embed-types} */ var EmbedType; (function (EmbedType) { /** * Generic embed rendered from embed attributes */ EmbedType["Rich"] = "rich"; /** * Image embed */ EmbedType["Image"] = "image"; /** * Video embed */ EmbedType["Video"] = "video"; /** * Animated gif image embed rendered as a video embed */ EmbedType["GIFV"] = "gifv"; /** * Article embed */ EmbedType["Article"] = "article"; /** * Link embed */ EmbedType["Link"] = "link"; /** * Auto moderation alert embed * * @unstable This embed type is currently not documented by Discord, but it is returned in the auto moderation system messages. */ EmbedType["AutoModerationMessage"] = "auto_moderation_message"; /** * Poll result embed */ EmbedType["PollResult"] = "poll_result"; })(EmbedType || (exports.EmbedType = EmbedType = {})); /** * @see {@link https://discord.com/developers/docs/resources/channel#attachment-object-attachment-structure-attachment-flags} */ var AttachmentFlags; (function (AttachmentFlags) { /** * This attachment has been edited using the remix feature on mobile */ AttachmentFlags[AttachmentFlags["IsRemix"] = 4] = "IsRemix"; })(AttachmentFlags || (exports.AttachmentFlags = AttachmentFlags = {})); /** * @see {@link https://discord.com/developers/docs/resources/channel#allowed-mentions-object-allowed-mention-types} */ var AllowedMentionsTypes; (function (AllowedMentionsTypes) { /** * Controls `@everyone` and `@here` mentions */ AllowedMentionsTypes["Everyone"] = "everyone"; /** * Controls role mentions */ AllowedMentionsTypes["Role"] = "roles"; /** * Controls user mentions */ AllowedMentionsTypes["User"] = "users"; })(AllowedMentionsTypes || (exports.AllowedMentionsTypes = AllowedMentionsTypes = {})); /** * @see {@link https://discord.com/developers/docs/components/reference#component-object-component-types} */ var ComponentType; (function (ComponentType) { /** * Container to display a row of interactive components */ ComponentType[ComponentType["ActionRow"] = 1] = "ActionRow"; /** * Button component */ ComponentType[ComponentType["Button"] = 2] = "Button"; /** * Select menu for picking from defined text options */ ComponentType[ComponentType["StringSelect"] = 3] = "StringSelect"; /** * Text Input component */ ComponentType[ComponentType["TextInput"] = 4] = "TextInput"; /** * Select menu for users */ ComponentType[ComponentType["UserSelect"] = 5] = "UserSelect"; /** * Select menu for roles */ ComponentType[ComponentType["RoleSelect"] = 6] = "RoleSelect"; /** * Select menu for users and roles */ ComponentType[ComponentType["MentionableSelect"] = 7] = "MentionableSelect"; /** * Select menu for channels */ ComponentType[ComponentType["ChannelSelect"] = 8] = "ChannelSelect"; /** * Container to display text alongside an accessory component */ ComponentType[ComponentType["Section"] = 9] = "Section"; /** * Markdown text */ ComponentType[ComponentType["TextDisplay"] = 10] = "TextDisplay"; /** * Small image that can be used as an accessory */ ComponentType[ComponentType["Thumbnail"] = 11] = "Thumbnail"; /** * Display images and other media */ ComponentType[ComponentType["MediaGallery"] = 12] = "MediaGallery"; /** * Displays an attached file */ ComponentType[ComponentType["File"] = 13] = "File"; /** * Component to add vertical padding between other components */ ComponentType[ComponentType["Separator"] = 14] = "Separator"; /** * @unstable This component type is currently not documented by Discord but has a known value which we will try to keep up to date. */ ComponentType[ComponentType["ContentInventoryEntry"] = 16] = "ContentInventoryEntry"; /** * Container that visually groups a set of components */ ComponentType[ComponentType["Container"] = 17] = "Container"; // EVERYTHING BELOW THIS LINE SHOULD BE OLD NAMES FOR RENAMED ENUM MEMBERS // /** * Select menu for picking from defined text options * * @deprecated This is the old name for {@link ComponentType.StringSelect} */ ComponentType[ComponentType["SelectMenu"] = 3] = "SelectMenu"; })(ComponentType || (exports.ComponentType = ComponentType = {})); /** * @see {@link https://discord.com/developers/docs/components/reference#button-button-styles} */ var ButtonStyle; (function (ButtonStyle) { /** * The most important or recommended action in a group of options */ ButtonStyle[ButtonStyle["Primary"] = 1] = "Primary"; /** * Alternative or supporting actions */ ButtonStyle[ButtonStyle["Secondary"] = 2] = "Secondary"; /** * Positive confirmation or completion actions */ ButtonStyle[ButtonStyle["Success"] = 3] = "Success"; /** * An action with irreversible consequences */ ButtonStyle[ButtonStyle["Danger"] = 4] = "Danger"; /** * Navigates to a URL */ ButtonStyle[ButtonStyle["Link"] = 5] = "Link"; /** * Purchase */ ButtonStyle[ButtonStyle["Premium"] = 6] = "Premium"; })(ButtonStyle || (exports.ButtonStyle = ButtonStyle = {})); /** * @see {@link https://discord.com/developers/docs/components/reference#text-input-text-input-styles} */ var TextInputStyle; (function (TextInputStyle) { /** * Single-line input */ TextInputStyle[TextInputStyle["Short"] = 1] = "Short"; /** * Multi-line input */ TextInputStyle[TextInputStyle["Paragraph"] = 2] = "Paragraph"; })(TextInputStyle || (exports.TextInputStyle = TextInputStyle = {})); /** * @see {@link https://discord.com/developers/docs/components/reference#user-select-select-default-value-structure} */ var SelectMenuDefaultValueType; (function (SelectMenuDefaultValueType) { SelectMenuDefaultValueType["Channel"] = "channel"; SelectMenuDefaultValueType["Role"] = "role"; SelectMenuDefaultValueType["User"] = "user"; })(SelectMenuDefaultValueType || (exports.SelectMenuDefaultValueType = SelectMenuDefaultValueType = {})); var UnfurledMediaItemLoadingState; (function (UnfurledMediaItemLoadingState) { UnfurledMediaItemLoadingState[UnfurledMediaItemLoadingState["Unknown"] = 0] = "Unknown"; UnfurledMediaItemLoadingState[UnfurledMediaItemLoadingState["Loading"] = 1] = "Loading"; UnfurledMediaItemLoadingState[UnfurledMediaItemLoadingState["LoadedSuccess"] = 2] = "LoadedSuccess"; UnfurledMediaItemLoadingState[UnfurledMediaItemLoadingState["LoadedNotFound"] = 3] = "LoadedNotFound"; })(UnfurledMediaItemLoadingState || (exports.UnfurledMediaItemLoadingState = UnfurledMediaItemLoadingState = {})); /** * @see {@link https://discord.com/developers/docs/components/reference#separator} */ var SeparatorSpacingSize; (function (SeparatorSpacingSize) { SeparatorSpacingSize[SeparatorSpacingSize["Small"] = 1] = "Small"; SeparatorSpacingSize[SeparatorSpacingSize["Large"] = 2] = "Large"; })(SeparatorSpacingSize || (exports.SeparatorSpacingSize = SeparatorSpacingSize = {})); /** * @see {@link https://discord.com/developers/docs/resources/channel#channel-object-channel-flags} */ var ChannelFlags; (function (ChannelFlags) { /** * @unstable This channel flag is currently not documented by Discord but has a known value which we will try to keep up to date. */ ChannelFlags[ChannelFlags["GuildFeedRemoved"] = 1] = "GuildFeedRemoved"; /** * This thread is pinned to the top of its parent forum channel */ ChannelFlags[ChannelFlags["Pinned"] = 2] = "Pinned"; /** * @unstable This channel flag is currently not documented by Discord but has a known value which we will try to keep up to date. */ ChannelFlags[ChannelFlags["ActiveChannelsRemoved"] = 4] = "ActiveChannelsRemoved"; /** * Whether a tag is required to be specified when creating a thread in a forum channel. * Tags are specified in the `applied_tags` field */ ChannelFlags[ChannelFlags["RequireTag"] = 16] = "RequireTag"; /** * @unstable This channel flag is currently not documented by Discord but has a known value which we will try to keep up to date. */ ChannelFlags[ChannelFlags["IsSpam"] = 32] = "IsSpam"; /** * @unstable This channel flag is currently not documented by Discord but has a known value which we will try to keep up to date. */ ChannelFlags[ChannelFlags["IsGuildResourceChannel"] = 128] = "IsGuildResourceChannel"; /** * @unstable This channel flag is currently not documented by Discord but has a known value which we will try to keep up to date. */ ChannelFlags[ChannelFlags["ClydeAI"] = 256] = "ClydeAI"; /** * @unstable This channel flag is currently not documented by Discord but has a known value which we will try to keep up to date. */ ChannelFlags[ChannelFlags["IsScheduledForDeletion"] = 512] = "IsScheduledForDeletion"; /** * Whether media download options are hidden. */ ChannelFlags[ChannelFlags["HideMediaDownloadOptions"] = 32768] = "HideMediaDownloadOptions"; })(ChannelFlags || (exports.ChannelFlags = ChannelFlags = {})); //# sourceMappingURL=channel.js.map node_modules/discord-api-types/payloads/v10/emoji.d.ts 0000664 00000003640 15114741631 0016710 0 ustar 00 /** * Types extracted from https://discord.com/developers/docs/resources/emoji */ import type { Snowflake } from '../../globals'; import type { _NonNullableFields } from '../../utils/internals'; import type { APIRole } from './permissions'; import type { APIUser } from './user'; /** * Not documented but mentioned */ export interface APIPartialEmoji { /** * Emoji id */ id: Snowflake | null; /** * Emoji name (can be null only in reaction emoji objects) */ name: string | null; /** * Whether this emoji is animated */ animated?: boolean; } /** * @see {@link https://discord.com/developers/docs/resources/emoji#emoji-object-emoji-structure} */ export interface APIEmoji extends APIPartialEmoji { /** * Roles this emoji is whitelisted to */ roles?: APIRole['id'][]; /** * User that created this emoji */ user?: APIUser; /** * Whether this emoji must be wrapped in colons */ require_colons?: boolean; /** * Whether this emoji is managed */ managed?: boolean; /** * Whether this emoji can be used, may be false due to loss of Server Boosts */ available?: boolean; } /** * @see {@link https://discord.com/developers/docs/resources/emoji#emoji-object-applicationowned-emoji} */ export type APIApplicationEmoji = _NonNullableFields<Required<Pick<APIEmoji, 'animated' | 'id' | 'name' | 'user'>>> & { /** * Roles allowed to use this emoji. * * @remarks Always empty. */ roles: []; /** * Whether this emoji must be wrapped in colons. * * @remarks Always `true`. */ require_colons: true; /** * Whether this emoji is managed. * * @remarks Always `false`. */ managed: false; /** * Whether this emoji is available. * * @remarks Always `true`. */ available: true; }; //# sourceMappingURL=emoji.d.ts.map node_modules/discord-api-types/payloads/v10/guild.js.map 0000664 00000006775 15114741631 0017245 0 ustar 00 {"version":3,"file":"guild.js","sourceRoot":"","sources":["guild.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AAmTH;;GAEG;AACH,IAAY,gCAGX;AAHD,WAAY,gCAAgC;IAC3C,qGAAW,CAAA;IACX,uGAAY,CAAA;AACb,CAAC,EAHW,gCAAgC,gDAAhC,gCAAgC,QAG3C;AAED;;GAEG;AACH,IAAY,0BAIX;AAJD,WAAY,0BAA0B;IACrC,mFAAQ,CAAA;IACR,yGAAmB,CAAA;IACnB,uFAAU,CAAA;AACX,CAAC,EAJW,0BAA0B,0CAA1B,0BAA0B,QAIrC;AAED;;GAEG;AACH,IAAY,aAGX;AAHD,WAAY,aAAa;IACxB,iDAAI,CAAA;IACJ,yDAAQ,CAAA;AACT,CAAC,EAHW,aAAa,6BAAb,aAAa,QAGxB;AAED;;GAEG;AACH,IAAY,cAKX;AALD,WAAY,cAAc;IACzB,yDAAO,CAAA;IACP,2DAAQ,CAAA;IACR,mDAAI,CAAA;IACJ,qEAAa,CAAA;AACd,CAAC,EALW,cAAc,8BAAd,cAAc,QAKzB;AAED;;GAEG;AACH,IAAY,sBAqBX;AArBD,WAAY,sBAAsB;IACjC;;OAEG;IACH,mEAAI,CAAA;IACJ;;OAEG;IACH,iEAAG,CAAA;IACH;;OAEG;IACH,uEAAM,CAAA;IACN;;OAEG;IACH,mEAAI,CAAA;IACJ;;OAEG;IACH,2EAAQ,CAAA;AACT,CAAC,EArBW,sBAAsB,sCAAtB,sBAAsB,QAqBjC;AAED;;GAEG;AACH,IAAY,gBAKX;AALD,WAAY,gB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CAAiB,CAAA;IACjB;;OAEG;IACH,uCAAmB,CAAA;IACnB;;OAEG;IACH,uCAAmB,CAAA;IACnB;;OAEG;IACH,uCAAmB,CAAA;IACnB;;;OAGG;IACH,uCAAmB,CAAA;AACpB,CAAC,EAtBW,gBAAgB,gCAAhB,gBAAgB,QAsB3B;AAoED,IAAY,4BAKX;AALD,WAAY,4BAA4B;IACvC;;OAEG;IACH,+CAAe,CAAA;AAChB,CAAC,EALW,4BAA4B,4CAA5B,4BAA4B,QAKvC;AA6FD;;GAEG;AACH,IAAY,mBASX;AATD,WAAY,mBAAmB;IAC9B;;OAEG;IACH,uFAAiB,CAAA;IACjB;;OAEG;IACH,yFAAkB,CAAA;AACnB,CAAC,EATW,mBAAmB,mCAAnB,mBAAmB,QAS9B;AAED;;GAEG;AACH,IAAY,yBAGX;AAHD,WAAY,yBAAyB;IACpC,6FAAc,CAAA;IACd,iFAAQ,CAAA;AACT,CAAC,EAHW,yBAAyB,yCAAzB,yBAAyB,QAGpC"} node_modules/discord-api-types/payloads/v10/auditLog.js 0000664 00000014041 15114741631 0017116 0 ustar 00 "use strict"; /** * Types extracted from https://discord.com/developers/docs/resources/audit-log */ Object.defineProperty(exports, "__esModule", { value: true }); exports.AuditLogOptionsType = exports.AuditLogEvent = void 0; /** * @see {@link https://discord.com/developers/docs/resources/audit-log#audit-log-entry-object-audit-log-events} */ var AuditLogEvent; (function (AuditLogEvent) { AuditLogEvent[AuditLogEvent["GuildUpdate"] = 1] = "GuildUpdate"; AuditLogEvent[AuditLogEvent["ChannelCreate"] = 10] = "ChannelCreate"; AuditLogEvent[AuditLogEvent["ChannelUpdate"] = 11] = "ChannelUpdate"; AuditLogEvent[AuditLogEvent["ChannelDelete"] = 12] = "ChannelDelete"; AuditLogEvent[AuditLogEvent["ChannelOverwriteCreate"] = 13] = "ChannelOverwriteCreate"; AuditLogEvent[AuditLogEvent["ChannelOverwriteUpdate"] = 14] = "ChannelOverwriteUpdate"; AuditLogEvent[AuditLogEvent["ChannelOverwriteDelete"] = 15] = "ChannelOverwriteDelete"; AuditLogEvent[AuditLogEvent["MemberKick"] = 20] = "MemberKick"; AuditLogEvent[AuditLogEvent["MemberPrune"] = 21] = "MemberPrune"; AuditLogEvent[AuditLogEvent["MemberBanAdd"] = 22] = "MemberBanAdd"; AuditLogEvent[AuditLogEvent["MemberBanRemove"] = 23] = "MemberBanRemove"; AuditLogEvent[AuditLogEvent["MemberUpdate"] = 24] = "MemberUpdate"; AuditLogEvent[AuditLogEvent["MemberRoleUpdate"] = 25] = "MemberRoleUpdate"; AuditLogEvent[AuditLogEvent["MemberMove"] = 26] = "MemberMove"; AuditLogEvent[AuditLogEvent["MemberDisconnect"] = 27] = "MemberDisconnect"; AuditLogEvent[AuditLogEvent["BotAdd"] = 28] = "BotAdd"; AuditLogEvent[AuditLogEvent["RoleCreate"] = 30] = "RoleCreate"; AuditLogEvent[AuditLogEvent["RoleUpdate"] = 31] = "RoleUpdate"; AuditLogEvent[AuditLogEvent["RoleDelete"] = 32] = "RoleDelete"; AuditLogEvent[AuditLogEvent["InviteCreate"] = 40] = "InviteCreate"; AuditLogEvent[AuditLogEvent["InviteUpdate"] = 41] = "InviteUpdate"; AuditLogEvent[AuditLogEvent["InviteDelete"] = 42] = "InviteDelete"; AuditLogEvent[AuditLogEvent["WebhookCreate"] = 50] = "WebhookCreate"; AuditLogEvent[AuditLogEvent["WebhookUpdate"] = 51] = "WebhookUpdate"; AuditLogEvent[AuditLogEvent["WebhookDelete"] = 52] = "WebhookDelete"; AuditLogEvent[AuditLogEvent["EmojiCreate"] = 60] = "EmojiCreate"; AuditLogEvent[AuditLogEvent["EmojiUpdate"] = 61] = "EmojiUpdate"; AuditLogEvent[AuditLogEvent["EmojiDelete"] = 62] = "EmojiDelete"; AuditLogEvent[AuditLogEvent["MessageDelete"] = 72] = "MessageDelete"; AuditLogEvent[AuditLogEvent["MessageBulkDelete"] = 73] = "MessageBulkDelete"; AuditLogEvent[AuditLogEvent["MessagePin"] = 74] = "MessagePin"; AuditLogEvent[AuditLogEvent["MessageUnpin"] = 75] = "MessageUnpin"; AuditLogEvent[AuditLogEvent["IntegrationCreate"] = 80] = "IntegrationCreate"; AuditLogEvent[AuditLogEvent["IntegrationUpdate"] = 81] = "IntegrationUpdate"; AuditLogEvent[AuditLogEvent["IntegrationDelete"] = 82] = "IntegrationDelete"; AuditLogEvent[AuditLogEvent["StageInstanceCreate"] = 83] = "StageInstanceCreate"; AuditLogEvent[AuditLogEvent["StageInstanceUpdate"] = 84] = "StageInstanceUpdate"; AuditLogEvent[AuditLogEvent["StageInstanceDelete"] = 85] = "StageInstanceDelete"; AuditLogEvent[AuditLogEvent["StickerCreate"] = 90] = "StickerCreate"; AuditLogEvent[AuditLogEvent["StickerUpdate"] = 91] = "StickerUpdate"; AuditLogEvent[AuditLogEvent["StickerDelete"] = 92] = "StickerDelete"; AuditLogEvent[AuditLogEvent["GuildScheduledEventCreate"] = 100] = "GuildScheduledEventCreate"; AuditLogEvent[AuditLogEvent["GuildScheduledEventUpdate"] = 101] = "GuildScheduledEventUpdate"; AuditLogEvent[AuditLogEvent["GuildScheduledEventDelete"] = 102] = "GuildScheduledEventDelete"; AuditLogEvent[AuditLogEvent["ThreadCreate"] = 110] = "ThreadCreate"; AuditLogEvent[AuditLogEvent["ThreadUpdate"] = 111] = "ThreadUpdate"; AuditLogEvent[AuditLogEvent["ThreadDelete"] = 112] = "ThreadDelete"; AuditLogEvent[AuditLogEvent["ApplicationCommandPermissionUpdate"] = 121] = "ApplicationCommandPermissionUpdate"; AuditLogEvent[AuditLogEvent["SoundboardSoundCreate"] = 130] = "SoundboardSoundCreate"; AuditLogEvent[AuditLogEvent["SoundboardSoundUpdate"] = 131] = "SoundboardSoundUpdate"; AuditLogEvent[AuditLogEvent["SoundboardSoundDelete"] = 132] = "SoundboardSoundDelete"; AuditLogEvent[AuditLogEvent["AutoModerationRuleCreate"] = 140] = "AutoModerationRuleCreate"; AuditLogEvent[AuditLogEvent["AutoModerationRuleUpdate"] = 141] = "AutoModerationRuleUpdate"; AuditLogEvent[AuditLogEvent["AutoModerationRuleDelete"] = 142] = "AutoModerationRuleDelete"; AuditLogEvent[AuditLogEvent["AutoModerationBlockMessage"] = 143] = "AutoModerationBlockMessage"; AuditLogEvent[AuditLogEvent["AutoModerationFlagToChannel"] = 144] = "AutoModerationFlagToChannel"; AuditLogEvent[AuditLogEvent["AutoModerationUserCommunicationDisabled"] = 145] = "AutoModerationUserCommunicationDisabled"; AuditLogEvent[AuditLogEvent["CreatorMonetizationRequestCreated"] = 150] = "CreatorMonetizationRequestCreated"; AuditLogEvent[AuditLogEvent["CreatorMonetizationTermsAccepted"] = 151] = "CreatorMonetizationTermsAccepted"; AuditLogEvent[AuditLogEvent["OnboardingPromptCreate"] = 163] = "OnboardingPromptCreate"; AuditLogEvent[AuditLogEvent["OnboardingPromptUpdate"] = 164] = "OnboardingPromptUpdate"; AuditLogEvent[AuditLogEvent["OnboardingPromptDelete"] = 165] = "OnboardingPromptDelete"; AuditLogEvent[AuditLogEvent["OnboardingCreate"] = 166] = "OnboardingCreate"; AuditLogEvent[AuditLogEvent["OnboardingUpdate"] = 167] = "OnboardingUpdate"; AuditLogEvent[AuditLogEvent["HomeSettingsCreate"] = 190] = "HomeSettingsCreate"; AuditLogEvent[AuditLogEvent["HomeSettingsUpdate"] = 191] = "HomeSettingsUpdate"; })(AuditLogEvent || (exports.AuditLogEvent = AuditLogEvent = {})); var AuditLogOptionsType; (function (AuditLogOptionsType) { AuditLogOptionsType["Role"] = "0"; AuditLogOptionsType["Member"] = "1"; })(AuditLogOptionsType || (exports.AuditLogOptionsType = AuditLogOptionsType = {})); //# sourceMappingURL=auditLog.js.map node_modules/discord-api-types/payloads/v10/webhook.js 0000664 00000004646 15114741631 0017016 0 ustar 00 "use strict"; /** * Types extracted from https://discord.com/developers/docs/resources/webhook */ Object.defineProperty(exports, "__esModule", { value: true }); exports.WebhookType = exports.ApplicationWebhookEventType = exports.ApplicationWebhookType = void 0; /** * @see {@link https://discord.com/developers/docs/events/webhook-events#webhook-types} */ var ApplicationWebhookType; (function (ApplicationWebhookType) { /** * PING event sent to verify your Webhook Event URL is active */ ApplicationWebhookType[ApplicationWebhookType["Ping"] = 0] = "Ping"; /** * Webhook event (details for event in event body object) */ ApplicationWebhookType[ApplicationWebhookType["Event"] = 1] = "Event"; })(ApplicationWebhookType || (exports.ApplicationWebhookType = ApplicationWebhookType = {})); /** * @see {@link https://discord.com/developers/docs/events/webhook-events#event-types} */ var ApplicationWebhookEventType; (function (ApplicationWebhookEventType) { /** * Sent when an app was authorized by a user to a server or their account */ ApplicationWebhookEventType["ApplicationAuthorized"] = "APPLICATION_AUTHORIZED"; /** * Sent when an app was deauthorized by a user */ ApplicationWebhookEventType["ApplicationDeauthorized"] = "APPLICATION_DEAUTHORIZED"; /** * Entitlement was created */ ApplicationWebhookEventType["EntitlementCreate"] = "ENTITLEMENT_CREATE"; /** * User was added to a Quest (currently unavailable) */ ApplicationWebhookEventType["QuestUserEnrollment"] = "QUEST_USER_ENROLLMENT"; })(ApplicationWebhookEventType || (exports.ApplicationWebhookEventType = ApplicationWebhookEventType = {})); /** * @see {@link https://discord.com/developers/docs/resources/webhook#webhook-object-webhook-types} */ var WebhookType; (function (WebhookType) { /** * Incoming Webhooks can post messages to channels with a generated token */ WebhookType[WebhookType["Incoming"] = 1] = "Incoming"; /** * Channel Follower Webhooks are internal webhooks used with Channel Following to post new messages into channels */ WebhookType[WebhookType["ChannelFollower"] = 2] = "ChannelFollower"; /** * Application webhooks are webhooks used with Interactions */ WebhookType[WebhookType["Application"] = 3] = "Application"; })(WebhookType || (exports.WebhookType = WebhookType = {})); //# sourceMappingURL=webhook.js.map node_modules/discord-api-types/payloads/v10/autoModeration.js.map 0000664 00000001546 15114741631 0021122 0 ustar 00 {"version":3,"file":"autoModeration.js","sourceRoot":"","sources":["autoModeration.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AAsDH;;GAEG;AACH,IAAY,6BAqBX;AArBD,WAAY,6BAA6B;IACxC;;OAEG;IACH,uFAAW,CAAA;IACX;;OAEG;IACH,iFAAQ,CAAA;IACR;;OAEG;IACH,mGAAa,CAAA;IACb;;OAEG;IACH,+FAAW,CAAA;IACX;;OAEG;IACH,mGAAa,CAAA;AACd,CAAC,EArBW,6BAA6B,6CAA7B,6BAA6B,QAqBxC;AAsDD;;GAEG;AACH,IAAY,mCAaX;AAbD,WAAY,mCAAmC;IAC9C;;OAEG;IACH,uGAAa,CAAA;IACb;;OAEG;IACH,+GAAa,CAAA;IACb;;OAEG;IACH,+FAAK,CAAA;AACN,CAAC,EAbW,mCAAmC,mDAAnC,mCAAmC,QAa9C;AAED;;GAEG;AACH,IAAY,2BASX;AATD,WAAY,2BAA2B;IACtC;;OAEG;IACH,2FAAe,CAAA;IACf;;OAEG;IACH,6FAAY,CAAA;AACb,CAAC,EATW,2BAA2B,2CAA3B,2BAA2B,QAStC;AAkBD;;GAEG;AACH,IAAY,wBAkBX;AAlBD,WAAY,wBAAwB;IACnC;;;OAGG;IACH,uFAAgB,CAAA;IAChB;;OAEG;IACH,+FAAgB,CAAA;IAChB;;OAEG;IACH,6EAAO,CAAA;IACP;;OAEG;IACH,2GAAsB,CAAA;AACvB,CAAC,EAlBW,wBAAwB,wCAAxB,wBAAwB,QAkBnC"} node_modules/discord-api-types/payloads/v10/teams.js.map 0000664 00000000547 15114741631 0017241 0 ustar 00 {"version":3,"file":"teams.js","sourceRoot":"","sources":["teams.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AAiEH;;GAEG;AACH,IAAY,yBAGX;AAHD,WAAY,yBAAyB;IACpC,+EAAW,CAAA;IACX,iFAAQ,CAAA;AACT,CAAC,EAHW,yBAAyB,yCAAzB,yBAAyB,QAGpC;AAED;;GAEG;AACH,IAAY,cAIX;AAJD,WAAY,cAAc;IACzB,iCAAe,CAAA;IACf,yCAAuB,CAAA;IACvB,wCAAsB,CAAA;AACvB,CAAC,EAJW,cAAc,8BAAd,cAAc,QAIzB"} node_modules/discord-api-types/payloads/v10/sticker.d.ts 0000664 00000006341 15114741631 0017252 0 ustar 00 /** * Types extracted from https://discord.com/developers/docs/resources/sticker */ import type { Snowflake } from '../../globals'; import type { APIUser } from './user'; /** * @see {@link https://discord.com/developers/docs/resources/sticker#sticker-object} */ export interface APISticker { /** * ID of the sticker */ id: Snowflake; /** * For standard stickers, ID of the pack the sticker is from */ pack_id?: Snowflake; /** * Name of the sticker */ name: string; /** * Description of the sticker */ description: string | null; /** * For guild stickers, the Discord name of a unicode emoji representing the sticker's expression. for standard stickers, a comma-separated list of related expressions. */ tags: string; /** * Previously the sticker asset hash, now an empty string * * @deprecated This field is no longer documented by Discord and will be removed in v11 * @unstable This field is no longer documented by Discord and will be removed in v11 */ asset?: ''; /** * Type of sticker * * @see {@link https://discord.com/developers/docs/resources/sticker#sticker-object-sticker-types} */ type: StickerType; /** * Type of sticker format * * @see {@link https://discord.com/developers/docs/resources/sticker#sticker-object-sticker-format-types} */ format_type: StickerFormatType; /** * Whether this guild sticker can be used, may be false due to loss of Server Boosts */ available?: boolean; /** * ID of the guild that owns this sticker */ guild_id?: Snowflake; /** * The user that uploaded the guild sticker */ user?: APIUser; /** * The standard sticker's sort order within its pack */ sort_value?: number; } /** * @see {@link https://discord.com/developers/docs/resources/sticker#sticker-object-sticker-types} */ export declare enum StickerType { /** * An official sticker in a pack */ Standard = 1, /** * A sticker uploaded to a guild for the guild's members */ Guild = 2 } /** * @see {@link https://discord.com/developers/docs/resources/sticker#sticker-object-sticker-format-types} */ export declare enum StickerFormatType { PNG = 1, APNG = 2, Lottie = 3, GIF = 4 } /** * @see {@link https://discord.com/developers/docs/resources/sticker#sticker-item-object} */ export type APIStickerItem = Pick<APISticker, 'format_type' | 'id' | 'name'>; /** * @see {@link https://discord.com/developers/docs/resources/sticker#sticker-pack-object} */ export interface APIStickerPack { /** * ID of the sticker pack */ id: Snowflake; /** * The stickers in the pack */ stickers: APISticker[]; /** * Name of the sticker pack */ name: string; /** * ID of the pack's SKU */ sku_id: Snowflake; /** * ID of a sticker in the pack which is shown as the pack's icon */ cover_sticker_id?: Snowflake; /** * Description of the sticker pack */ description: string; /** * ID of the sticker pack's banner image */ banner_asset_id?: Snowflake; } //# sourceMappingURL=sticker.d.ts.map node_modules/discord-api-types/payloads/v10/voice.js 0000664 00000000302 15114741631 0016446 0 ustar 00 "use strict"; /** * Types extracted from https://discord.com/developers/docs/resources/voice */ Object.defineProperty(exports, "__esModule", { value: true }); //# sourceMappingURL=voice.js.map node_modules/discord-api-types/payloads/v10/guild.d.ts 0000664 00000101505 15114741631 0016710 0 ustar 00 /** * Types extracted from https://discord.com/developers/docs/resources/guild */ import type { Permissions, Snowflake } from '../../globals'; import type { Locale } from '../../rest/common'; import type { APIEmoji, APIPartialEmoji } from './emoji'; import type { PresenceUpdateReceiveStatus } from './gateway'; import type { OAuth2Scopes } from './oauth2'; import type { APIRole } from './permissions'; import type { APISticker } from './sticker'; import type { APIAvatarDecorationData, APIUser } from './user'; export interface APIBaseGuild { /** * Guild id */ id: Snowflake; } /** * @see {@link https://discord.com/developers/docs/resources/guild#unavailable-guild-object} */ export interface APIUnavailableGuild extends APIBaseGuild { /** * `true` if this guild is unavailable due to an outage */ unavailable: boolean; } /** * @see {@link https://discord.com/developers/docs/resources/guild#guild-object-guild-structure} */ export interface APIPartialGuild extends APIBaseGuild { /** * Guild name (2-100 characters, excluding trailing and leading whitespace) */ name: string; /** * Icon hash * * @see {@link https://discord.com/developers/docs/reference#image-formatting} */ icon: string | null; /** * Splash hash * * @see {@link https://discord.com/developers/docs/reference#image-formatting} */ splash: string | null; /** * Banner hash * * @see {@link https://discord.com/developers/docs/reference#image-formatting} */ banner?: string | null; /** * The description for the guild */ description?: string | null; /** * Enabled guild features * * @see {@link https://discord.com/developers/docs/resources/guild#guild-object-guild-features} */ features?: GuildFeature[]; /** * Verification level required for the guild * * @see {@link https://discord.com/developers/docs/resources/guild#guild-object-verification-level} */ verification_level?: GuildVerificationLevel; /** * The vanity url code for the guild */ vanity_url_code?: string | null; /** * The welcome screen of a Community guild, shown to new members * * Returned in the invite object */ welcome_screen?: APIGuildWelcomeScreen; } /** * Source guild of channel follower webhooks. */ export type APIWebhookSourceGuild = Pick<APIPartialGuild, 'icon' | 'id' | 'name'>; /** * @see {@link https://discord.com/developers/docs/resources/guild#guild-object-guild-structure} */ export interface APIGuild extends APIPartialGuild { /** * Icon hash, returned when in the template object * * @see {@link https://discord.com/developers/docs/reference#image-formatting} */ icon_hash?: string | null; /** * Discovery splash hash; only present for guilds with the "DISCOVERABLE" feature * * @see {@link https://discord.com/developers/docs/reference#image-formatting} */ discovery_splash: string | null; /** * `true` if the user is the owner of the guild * * **This field is only received from https://discord.com/developers/docs/resources/user#get-current-user-guilds** */ owner?: boolean; /** * ID of owner */ owner_id: Snowflake; /** * Total permissions for the user in the guild (excludes overrides) * * **This field is only received from https://discord.com/developers/docs/resources/user#get-current-user-guilds** * * @see {@link https://en.wikipedia.org/wiki/Bit_field} */ permissions?: Permissions; /** * Voice region id for the guild * * @see {@link https://discord.com/developers/docs/resources/voice#voice-region-object} * @deprecated This field has been deprecated in favor of `rtc_region` on the channel. */ region: string; /** * ID of afk channel */ afk_channel_id: Snowflake | null; /** * afk timeout in seconds, can be set to: `60`, `300`, `900`, `1800`, `3600` */ afk_timeout: 1800 | 3600 | 60 | 300 | 900; /** * `true` if the guild widget is enabled */ widget_enabled?: boolean; /** * The channel id that the widget will generate an invite to, or `null` if set to no invite */ widget_channel_id?: Snowflake | null; /** * Verification level required for the guild * * @see {@link https://discord.com/developers/docs/resources/guild#guild-object-verification-level} */ verification_level: GuildVerificationLevel; /** * Default message notifications level * * @see {@link https://discord.com/developers/docs/resources/guild#guild-object-default-message-notification-level} */ default_message_notifications: GuildDefaultMessageNotifications; /** * Explicit content filter level * * @see {@link https://discord.com/developers/docs/resources/guild#guild-object-explicit-content-filter-level} */ explicit_content_filter: GuildExplicitContentFilter; /** * Roles in the guild * * @see {@link https://discord.com/developers/docs/topics/permissions#role-object} */ roles: APIRole[]; /** * Custom guild emojis * * @see {@link https://discord.com/developers/docs/resources/emoji#emoji-object} */ emojis: APIEmoji[]; /** * Enabled guild features * * @see {@link https://discord.com/developers/docs/resources/guild#guild-object-guild-features} */ features: GuildFeature[]; /** * Required MFA level for the guild * * @see {@link https://discord.com/developers/docs/resources/guild#guild-object-mfa-level} */ mfa_level: GuildMFALevel; /** * Application id of the guild creator if it is bot-created */ application_id: Snowflake | null; /** * The id of the channel where guild notices such as welcome messages and boost events are posted */ system_channel_id: Snowflake | null; /** * System channel flags * * @see {@link https://discord.com/developers/docs/resources/guild#guild-object-system-channel-flags} */ system_channel_flags: GuildSystemChannelFlags; /** * The id of the channel where Community guilds can display rules and/or guidelines */ rules_channel_id: Snowflake | null; /** * The maximum number of presences for the guild (`null` is always returned, apart from the largest of guilds) */ max_presences?: number | null; /** * The maximum number of members for the guild */ max_members?: number; /** * The vanity url code for the guild */ vanity_url_code: string | null; /** * The description for the guild */ description: string | null; /** * Banner hash * * @see {@link https://discord.com/developers/docs/reference#image-formatting} */ banner: string | null; /** * Premium tier (Server Boost level) * * @see {@link https://discord.com/developers/docs/resources/guild#guild-object-premium-tier} */ premium_tier: GuildPremiumTier; /** * The number of boosts this guild currently has */ premium_subscription_count?: number; /** * The preferred locale of a Community guild; used in guild discovery and notices from Discord * * @defaultValue `"en-US"` */ preferred_locale: Locale; /** * The id of the channel where admins and moderators of Community guilds receive notices from Discord */ public_updates_channel_id: Snowflake | null; /** * The maximum amount of users in a video channel */ max_video_channel_users?: number; /** * The maximum amount of users in a stage video channel */ max_stage_video_channel_users?: number; /** * Approximate number of members in this guild, * returned from the `GET /guilds/<id>` and `/users/@me/guilds` (OAuth2) endpoints when `with_counts` is `true` */ approximate_member_count?: number; /** * Approximate number of non-offline members in this guild, * returned from the `GET /guilds/<id>` and `/users/@me/guilds` (OAuth2) endpoints when `with_counts` is `true` */ approximate_presence_count?: number; /** * The nsfw level of the guild * * @see {@link https://discord.com/developers/docs/resources/guild#guild-object-guild-nsfw-level} */ nsfw_level: GuildNSFWLevel; /** * Custom guild stickers * * @see {@link https://discord.com/developers/docs/resources/sticker#sticker-object} */ stickers: APISticker[]; /** * Whether the guild has the boost progress bar enabled. */ premium_progress_bar_enabled: boolean; /** * The type of Student Hub the guild is */ hub_type: GuildHubType | null; /** * The id of the channel where admins and moderators of Community guilds receive safety alerts from Discord */ safety_alerts_channel_id: Snowflake | null; /** * The incidents data for this guild */ incidents_data: APIIncidentsData | null; } /** * @see {@link https://discord.com/developers/docs/resources/guild#guild-object-guild-structure} */ export interface APIPartialInteractionGuild extends Pick<APIGuild, 'features' | 'id'> { /** * The preferred locale of a Community guild; used in guild discovery and notices from Discord * * @unstable https://github.com/discord/discord-api-docs/issues/6938 * @defaultValue `"en-US"` */ locale: Locale; } /** * @see {@link https://discord.com/developers/docs/resources/guild#guild-object-default-message-notification-level} */ export declare enum GuildDefaultMessageNotifications { AllMessages = 0, OnlyMentions = 1 } /** * @see {@link https://discord.com/developers/docs/resources/guild#guild-object-explicit-content-filter-level} */ export declare enum GuildExplicitContentFilter { Disabled = 0, MembersWithoutRoles = 1, AllMembers = 2 } /** * @see {@link https://discord.com/developers/docs/resources/guild#guild-object-mfa-level} */ export declare enum GuildMFALevel { None = 0, Elevated = 1 } /** * @see {@link https://discord.com/developers/docs/resources/guild#guild-object-guild-nsfw-level} */ export declare enum GuildNSFWLevel { Default = 0, Explicit = 1, Safe = 2, AgeRestricted = 3 } /** * @see {@link https://discord.com/developers/docs/resources/guild#guild-object-verification-level} */ export declare enum GuildVerificationLevel { /** * Unrestricted */ None = 0, /** * Must have verified email on account */ Low = 1, /** * Must be registered on Discord for longer than 5 minutes */ Medium = 2, /** * Must be a member of the guild for longer than 10 minutes */ High = 3, /** * Must have a verified phone number */ VeryHigh = 4 } /** * @see {@link https://discord.com/developers/docs/resources/guild#guild-object-premium-tier} */ export declare enum GuildPremiumTier { None = 0, Tier1 = 1, Tier2 = 2, Tier3 = 3 } export declare enum GuildHubType { Default = 0, HighSchool = 1, College = 2 } /** * @see {@link https://discord.com/developers/docs/resources/guild#guild-object-system-channel-flags} */ export declare enum GuildSystemChannelFlags { /** * Suppress member join notifications */ SuppressJoinNotifications = 1, /** * Suppress server boost notifications */ SuppressPremiumSubscriptions = 2, /** * Suppress server setup tips */ SuppressGuildReminderNotifications = 4, /** * Hide member join sticker reply buttons */ SuppressJoinNotificationReplies = 8, /** * Suppress role subscription purchase and renewal notifications */ SuppressRoleSubscriptionPurchaseNotifications = 16, /** * Hide role subscription sticker reply buttons */ SuppressRoleSubscriptionPurchaseNotificationReplies = 32 } /** * @see {@link https://discord.com/developers/docs/resources/guild#guild-object-guild-features} */ export declare enum GuildFeature { /** * Guild has access to set an animated guild banner image */ AnimatedBanner = "ANIMATED_BANNER", /** * Guild has access to set an animated guild icon */ AnimatedIcon = "ANIMATED_ICON", /** * Guild is using the old permissions configuration behavior * * @see {@link https://discord.com/developers/docs/change-log#upcoming-application-command-permission-changes} */ ApplicationCommandPermissionsV2 = "APPLICATION_COMMAND_PERMISSIONS_V2", /** * Guild has set up auto moderation rules */ AutoModeration = "AUTO_MODERATION", /** * Guild has access to set a guild banner image */ Banner = "BANNER", /** * Guild can enable welcome screen, Membership Screening and discovery, and receives community updates */ Community = "COMMUNITY", /** * Guild has enabled monetization */ CreatorMonetizableProvisional = "CREATOR_MONETIZABLE_PROVISIONAL", /** * Guild has enabled the role subscription promo page */ CreatorStorePage = "CREATOR_STORE_PAGE", /** * Guild has been set as a support server on the App Directory */ DeveloperSupportServer = "DEVELOPER_SUPPORT_SERVER", /** * Guild is able to be discovered in the directory */ Discoverable = "DISCOVERABLE", /** * Guild is able to be featured in the directory */ Featurable = "FEATURABLE", /** * Guild is listed in a directory channel */ HasDirectoryEntry = "HAS_DIRECTORY_ENTRY", /** * Guild is a Student Hub * * @see {@link https://support.discord.com/hc/articles/4406046651927} * @unstable This feature is currently not documented by Discord, but has known value */ Hub = "HUB", /** * Guild has disabled invite usage, preventing users from joining */ InvitesDisabled = "INVITES_DISABLED", /** * Guild has access to set an invite splash background */ InviteSplash = "INVITE_SPLASH", /** * Guild is in a Student Hub * * @see {@link https://support.discord.com/hc/articles/4406046651927} * @unstable This feature is currently not documented by Discord, but has known value */ LinkedToHub = "LINKED_TO_HUB", /** * Guild has enabled Membership Screening */ MemberVerificationGateEnabled = "MEMBER_VERIFICATION_GATE_ENABLED", /** * Guild has increased custom soundboard sound slots */ MoreSoundboard = "MORE_SOUNDBOARD", /** * Guild has enabled monetization * * @unstable This feature is no longer documented by Discord */ MonetizationEnabled = "MONETIZATION_ENABLED", /** * Guild has increased custom sticker slots */ MoreStickers = "MORE_STICKERS", /** * Guild has access to create news channels */ News = "NEWS", /** * Guild is partnered */ Partnered = "PARTNERED", /** * Guild can be previewed before joining via Membership Screening or the directory */ PreviewEnabled = "PREVIEW_ENABLED", /** * Guild has access to create private threads */ PrivateThreads = "PRIVATE_THREADS", /** * Guild has disabled alerts for join raids in the configured safety alerts channel */ RaidAlertsDisabled = "RAID_ALERTS_DISABLED", RelayEnabled = "RELAY_ENABLED", /** * Guild is able to set role icons */ RoleIcons = "ROLE_ICONS", /** * Guild has role subscriptions that can be purchased */ RoleSubscriptionsAvailableForPurchase = "ROLE_SUBSCRIPTIONS_AVAILABLE_FOR_PURCHASE", /** * Guild has enabled role subscriptions */ RoleSubscriptionsEnabled = "ROLE_SUBSCRIPTIONS_ENABLED", /** * Guild has created soundboard sounds */ Soundboard = "SOUNDBOARD", /** * Guild has enabled ticketed events */ TicketedEventsEnabled = "TICKETED_EVENTS_ENABLED", /** * Guild has access to set a vanity URL */ VanityURL = "VANITY_URL", /** * Guild is verified */ Verified = "VERIFIED", /** * Guild has access to set 384kbps bitrate in voice (previously VIP voice servers) */ VIPRegions = "VIP_REGIONS", /** * Guild has enabled the welcome screen */ WelcomeScreenEnabled = "WELCOME_SCREEN_ENABLED" } /** * @see {@link https://discord.com/developers/docs/resources/guild#guild-preview-object} */ export interface APIGuildPreview { /** * Guild id */ id: Snowflake; /** * Guild name (2-100 characters) */ name: string; /** * Icon hash * * @see {@link https://discord.com/developers/docs/reference#image-formatting} */ icon: string | null; /** * Splash hash * * @see {@link https://discord.com/developers/docs/reference#image-formatting} */ splash: string | null; /** * Discovery splash hash; only present for guilds with the "DISCOVERABLE" feature * * @see {@link https://discord.com/developers/docs/reference#image-formatting} */ discovery_splash: string | null; /** * Custom guild emojis * * @see {@link https://discord.com/developers/docs/resources/emoji#emoji-object} */ emojis: APIEmoji[]; /** * Enabled guild features * * @see {@link https://discord.com/developers/docs/resources/guild#guild-object-guild-features} */ features: GuildFeature[]; /** * Approximate number of members in this guild */ approximate_member_count: number; /** * Approximate number of online members in this guild */ approximate_presence_count: number; /** * The description for the guild */ description: string; /** * Custom guild stickers */ stickers: APISticker[]; } /** * @see {@link https://discord.com/developers/docs/resources/guild#guild-widget-object} */ export interface APIGuildWidgetSettings { /** * Whether the widget is enabled */ enabled: boolean; /** * The widget channel id */ channel_id: Snowflake | null; } /** * @see {@link https://discord.com/developers/docs/resources/guild#guild-member-object} */ export interface APIBaseGuildMember { /** * This users guild nickname */ nick?: string | null; /** * Array of role object ids * * @see {@link https://discord.com/developers/docs/topics/permissions#role-object} */ roles: Snowflake[]; /** * When the user started boosting the guild * * @see {@link https://support.discord.com/hc/articles/360028038352} */ premium_since?: string | null; /** * Whether the user has not yet passed the guild's Membership Screening requirements * * @remarks If this field is not present, it can be assumed as `false`. */ pending?: boolean; /** * Timestamp of when the time out will be removed; until then, they cannot interact with the guild */ communication_disabled_until?: string | null; /** * The data for the member's guild avatar decoration * * @see {@link https://discord.com/developers/docs/resources/user#avatar-decoration-data-object} */ avatar_decoration_data?: APIAvatarDecorationData | null; } /** * @see {@link https://discord.com/developers/docs/resources/guild#guild-member-object} */ export interface APIFlaggedGuildMember { /** * Guild member flags represented as a bit set * * @defaultValue `0` */ flags: GuildMemberFlags; } /** * @see {@link https://discord.com/developers/docs/resources/guild#guild-member-object} */ export interface APIGuildMemberJoined { /** * When the user joined the guild */ joined_at: string; } /** * @see {@link https://discord.com/developers/docs/resources/guild#guild-member-object} */ export interface APIGuildMemberAvatar { /** * The member's guild avatar hash */ avatar?: string | null; /** * The member's guild banner hash */ banner?: string | null; } /** * @see {@link https://discord.com/developers/docs/resources/guild#guild-member-object} */ export interface APIBaseVoiceGuildMember { /** * Whether the user is deafened in voice channels */ deaf: boolean; /** * Whether the user is muted in voice channels */ mute: boolean; } /** * @see {@link https://discord.com/developers/docs/resources/guild#guild-member-object} */ export interface APIGuildMemberUser { /** * The user this guild member represents * * **This field won't be included in the member object attached to `MESSAGE_CREATE` and `MESSAGE_UPDATE` gateway events.** * * @see {@link https://discord.com/developers/docs/resources/user#user-object} */ user: APIUser; } /** * @see {@link https://discord.com/developers/docs/resources/guild#guild-member-object} */ export interface APIGuildMember extends APIBaseGuildMember, APIBaseVoiceGuildMember, APIFlaggedGuildMember, APIGuildMemberAvatar, APIGuildMemberJoined, APIGuildMemberUser { } /** * @see {@link https://discord.com/developers/docs/resources/guild#guild-member-object-guild-member-flags} */ export declare enum GuildMemberFlags { /** * Member has left and rejoined the guild */ DidRejoin = 1, /** * Member has completed onboarding */ CompletedOnboarding = 2, /** * Member is exempt from guild verification requirements */ BypassesVerification = 4, /** * Member has started onboarding */ StartedOnboarding = 8, /** * Member is a guest and can only access the voice channel they were invited to */ IsGuest = 16, /** * Member has started Server Guide new member actions */ StartedHomeActions = 32, /** * Member has completed Server Guide new member actions */ CompletedHomeActions = 64, /** * Member's username, display name, or nickname is blocked by AutoMod */ AutomodQuarantinedUsernameOrGuildNickname = 128, /** * @deprecated * {@link https://github.com/discord/discord-api-docs/pull/7113 | discord-api-docs#7113} */ AutomodQuarantinedBio = 256, /** * Member has dismissed the DM settings upsell */ DmSettingsUpsellAcknowledged = 512 } /** * @see {@link https://discord.com/developers/docs/resources/guild#integration-object} */ export interface APIGuildIntegration { /** * Integration id */ id: Snowflake; /** * Integration name */ name: string; /** * Integration type */ type: APIGuildIntegrationType; /** * Is this integration enabled */ enabled: boolean; /** * Is this integration syncing * * **This field is not provided for `discord` bot integrations.** */ syncing?: boolean; /** * ID that this integration uses for "subscribers" * * **This field is not provided for `discord` bot integrations.** */ role_id?: Snowflake; /** * Whether emoticons should be synced for this integration (`twitch` only currently) * * **This field is not provided for `discord` bot integrations.** */ enable_emoticons?: boolean; /** * The behavior of expiring subscribers * * **This field is not provided for `discord` bot integrations.** * * @see {@link https://discord.com/developers/docs/resources/guild#integration-object-integration-expire-behaviors} */ expire_behavior?: IntegrationExpireBehavior; /** * The grace period (in days) before expiring subscribers * * **This field is not provided for `discord` bot integrations.** */ expire_grace_period?: number; /** * User for this integration * * **Some older integrations may not have an attached user.** * * @see {@link https://discord.com/developers/docs/resources/user#user-object} */ user?: APIUser; /** * Integration account information * * @see {@link https://discord.com/developers/docs/resources/guild#integration-account-object} */ account: APIIntegrationAccount; /** * When this integration was last synced * * **This field is not provided for `discord` bot integrations.** */ synced_at?: string; /** * How many subscribers this integration has * * **This field is not provided for `discord` bot integrations.** */ subscriber_count?: number; /** * Has this integration been revoked * * **This field is not provided for `discord` bot integrations.** */ revoked?: boolean; /** * The bot/OAuth2 application for discord integrations * * @see {@link https://discord.com/developers/docs/resources/guild#integration-application-object} * * **This field is not provided for `discord` bot integrations.** */ application?: APIGuildIntegrationApplication; /** * The scopes the application has been authorized for */ scopes?: OAuth2Scopes[]; } export type APIGuildIntegrationType = 'discord' | 'guild_subscription' | 'twitch' | 'youtube'; /** * @see {@link https://discord.com/developers/docs/resources/guild#integration-object-integration-expire-behaviors} */ export declare enum IntegrationExpireBehavior { RemoveRole = 0, Kick = 1 } /** * @see {@link https://discord.com/developers/docs/resources/guild#integration-account-object} */ export interface APIIntegrationAccount { /** * ID of the account */ id: string; /** * Name of the account */ name: string; } /** * @see {@link https://discord.com/developers/docs/resources/guild#integration-application-object} */ export interface APIGuildIntegrationApplication { /** * The id of the app */ id: Snowflake; /** * The name of the app */ name: string; /** * The icon hash of the app * * @see {@link https://discord.com/developers/docs/reference#image-formatting} */ icon: string | null; /** * The description of the app */ description: string; /** * The bot associated with this application * * @see {@link https://discord.com/developers/docs/resources/user#user-object} */ bot?: APIUser; } /** * @see {@link https://discord.com/developers/docs/resources/guild#ban-object} */ export interface APIBan { /** * The reason for the ban */ reason: string | null; /** * The banned user */ user: APIUser; } /** * @see {@link https://discord.com/developers/docs/resources/guild#guild-widget-object} */ export interface APIGuildWidget { id: Snowflake; name: string; instant_invite: string | null; channels: APIGuildWidgetChannel[]; members: APIGuildWidgetMember[]; presence_count: number; } /** * @see {@link https://discord.com/developers/docs/resources/guild#guild-widget-object-example-guild-widget} */ export interface APIGuildWidgetChannel { id: Snowflake; name: string; position: number; } /** * @see {@link https://discord.com/developers/docs/resources/guild#guild-widget-object-example-guild-widget} */ export interface APIGuildWidgetMember { id: string; username: string; discriminator: string; avatar: string | null; status: PresenceUpdateReceiveStatus; activity?: { name: string; }; avatar_url: string; } /** * @see {@link https://discord.com/developers/docs/resources/guild#get-guild-widget-image-widget-style-options} */ export declare enum GuildWidgetStyle { /** * Shield style widget with Discord icon and guild members online count */ Shield = "shield", /** * Large image with guild icon, name and online count. "POWERED BY DISCORD" as the footer of the widget */ Banner1 = "banner1", /** * Smaller widget style with guild icon, name and online count. Split on the right with Discord logo */ Banner2 = "banner2", /** * Large image with guild icon, name and online count. In the footer, Discord logo on the left and "Chat Now" on the right */ Banner3 = "banner3", /** * Large Discord logo at the top of the widget. Guild icon, name and online count in the middle portion of the widget * and a "JOIN MY SERVER" button at the bottom */ Banner4 = "banner4" } export interface APIGuildWelcomeScreen { /** * The welcome screen short message */ description: string | null; /** * Array of suggested channels */ welcome_channels: APIGuildWelcomeScreenChannel[]; } export interface APIGuildWelcomeScreenChannel { /** * The channel id that is suggested */ channel_id: Snowflake; /** * The description shown for the channel */ description: string; /** * The emoji id of the emoji that is shown on the left of the channel */ emoji_id: Snowflake | null; /** * The emoji name of the emoji that is shown on the left of the channel */ emoji_name: string | null; } export interface APIGuildMembershipScreening { /** * When the fields were last updated */ version: string; /** * The steps in the screening form */ form_fields: APIGuildMembershipScreeningField[]; /** * The server description shown in the screening form */ description: string | null; } export interface APIGuildMembershipScreeningField { /** * The type of field */ field_type: MembershipScreeningFieldType; /** * The title of the field */ label: string; /** * The list of rules */ values?: string[]; /** * Whether the user has to fill out this field */ required: boolean; } export declare enum MembershipScreeningFieldType { /** * Server Rules */ Terms = "TERMS" } /** * @see {@link https://discord.com/developers/docs/resources/guild#guild-onboarding-object-guild-onboarding-structure} */ export interface APIGuildOnboarding { /** * Id of the guild this onboarding is part of */ guild_id: Snowflake; /** * Prompts shown during onboarding and in customize community */ prompts: APIGuildOnboardingPrompt[]; /** * Channel ids that members get opted into automatically */ default_channel_ids: Snowflake[]; /** * Whether onboarding is enabled in the guild */ enabled: boolean; /** * Current mode of onboarding */ mode: GuildOnboardingMode; } /** * @see {@link https://discord.com/developers/docs/resources/guild#guild-onboarding-object-onboarding-prompt-structure} */ export interface APIGuildOnboardingPrompt { /** * Id of the prompt */ id: Snowflake; /** * Options available within the prompt */ options: APIGuildOnboardingPromptOption[]; /** * Title of the prompt */ title: string; /** * Indicates whether users are limited to selecting one option for the prompt */ single_select: boolean; /** * Indicates whether the prompt is required before a user completes the onboarding flow */ required: boolean; /** * Indicates whether the prompt is present in the onboarding flow. * If `false`, the prompt will only appear in the Channels & Roles tab */ in_onboarding: boolean; /** * Type of prompt */ type: GuildOnboardingPromptType; } /** * @see {@link https://discord.com/developers/docs/resources/guild#guild-onboarding-object-prompt-option-structure} */ export interface APIGuildOnboardingPromptOption { /** * Id of the prompt option */ id: Snowflake; /** * Ids for channels a member is added to when the option is selected */ channel_ids: Snowflake[]; /** * Ids for roles assigned to a member when the option is selected */ role_ids: Snowflake[]; /** * Emoji of the option */ emoji: APIPartialEmoji; /** * Title of the option */ title: string; /** * Description of the option */ description: string | null; } /** * @see {@link https://discord.com/developers/docs/resources/guild#guild-onboarding-object-onboarding-mode} */ export declare enum GuildOnboardingMode { /** * Counts only Default Channels towards constraints */ OnboardingDefault = 0, /** * Counts Default Channels and Questions towards constraints */ OnboardingAdvanced = 1 } /** * @see {@link https://discord.com/developers/docs/resources/guild#guild-onboarding-object-prompt-types} */ export declare enum GuildOnboardingPromptType { MultipleChoice = 0, Dropdown = 1 } export interface APIIncidentsData { /** * When invites get enabled again */ invites_disabled_until: string | null; /** * When direct messages get enabled again */ dms_disabled_until: string | null; /** * When the dm spam was detected */ dm_spam_detected_at?: string | null; /** * When the raid was detected */ raid_detected_at?: string | null; } //# sourceMappingURL=guild.d.ts.map node_modules/discord-api-types/payloads/v10/index.d.ts 0000664 00000001304 15114741631 0016707 0 ustar 00 export * from '../common'; export * from './application'; export * from './auditLog'; export * from './autoModeration'; export * from './channel'; export type * from './emoji'; export * from './gateway'; export * from './guild'; export * from './guildScheduledEvent'; export * from './interactions'; export * from './invite'; export * from './monetization'; export * from './oauth2'; export * from './permissions'; export * from './poll'; export type * from './soundboard'; export * from './stageInstance'; export * from './sticker'; export * from './teams'; export type * from './template'; export * from './user'; export type * from './voice'; export * from './webhook'; //# sourceMappingURL=index.d.ts.map node_modules/discord-api-types/payloads/v10/guildScheduledEvent.d.ts 0000664 00000017477 15114741631 0021551 0 ustar 00 import type { Snowflake } from '../../globals'; import type { APIGuildMember } from './guild'; import type { APIUser } from './user'; export interface APIGuildScheduledEventBase<Type extends GuildScheduledEventEntityType> { /** * The id of the guild event */ id: Snowflake; /** * The guild id which the scheduled event belongs to */ guild_id: Snowflake; /** * The channel id in which the scheduled event will be hosted, or `null` if entity type is `EXTERNAL` */ channel_id: Snowflake | null; /** * The id of the user that created the scheduled event */ creator_id?: Snowflake | null; /** * The name of the scheduled event */ name: string; /** * The description of the scheduled event */ description?: string | null; /** * The time the scheduled event will start */ scheduled_start_time: string; /** * The time at which the guild event will end, or `null` if the event does not have a scheduled time to end */ scheduled_end_time: string | null; /** * The privacy level of the scheduled event */ privacy_level: GuildScheduledEventPrivacyLevel; /** * The status of the scheduled event */ status: GuildScheduledEventStatus; /** * The type of hosting entity associated with the scheduled event */ entity_type: Type; /** * The id of the hosting entity associated with the scheduled event */ entity_id: Snowflake | null; /** * The entity metadata for the scheduled event */ entity_metadata: APIGuildScheduledEventEntityMetadata | null; /** * The user that created the scheduled event */ creator?: APIUser; /** * The number of users subscribed to the scheduled event */ user_count?: number; /** * The cover image of the scheduled event */ image?: string | null; /** * The definition for how often this event should recur */ recurrence_rule: APIGuildScheduledEventRecurrenceRule | null; } /** * @see {@link https://discord.com/developers/docs/resources/guild-scheduled-event#guild-scheduled-event-recurrence-rule-object-guild-scheduled-event-recurrence-rule-structure} */ export interface APIGuildScheduledEventRecurrenceRule { /** * Starting time of the recurrence interval */ start: string; /** * Ending time of the recurrence interval */ end: string | null; /** * How often the event occurs */ frequency: GuildScheduledEventRecurrenceRuleFrequency; /** * The spacing between the events, defined by `frequency`. * For example, `frequency` of {@link GuildScheduledEventRecurrenceRuleFrequency.Weekly} and an `interval` of `2` * would be "every-other week" */ interval: number; /** * Set of specific days within a week for the event to recur on */ by_weekday: GuildScheduledEventRecurrenceRuleWeekday[] | null; /** * List of specific days within a specific week (1-5) to recur on */ by_n_weekday: APIGuildScheduledEventRecurrenceRuleNWeekday[] | null; /** * Set of specific months to recur on */ by_month: GuildScheduledEventRecurrenceRuleMonth[] | null; /** * Set of specific dates within a month to recur on */ by_month_day: number[] | null; /** * Set of days within a year to recur on (1-364) */ by_year_day: number[] | null; /** * The total amount of times that the event is allowed to recur before stopping */ count: number | null; } /** * @see {@link https://discord.com/developers/docs/resources/guild-scheduled-event#guild-scheduled-event-recurrence-rule-object-guild-scheduled-event-recurrence-rule-frequency} */ export declare enum GuildScheduledEventRecurrenceRuleFrequency { Yearly = 0, Monthly = 1, Weekly = 2, Daily = 3 } /** * @see {@link https://discord.com/developers/docs/resources/guild-scheduled-event#guild-scheduled-event-recurrence-rule-object-guild-scheduled-event-recurrence-rule-weekday} */ export declare enum GuildScheduledEventRecurrenceRuleWeekday { Monday = 0, Tuesday = 1, Wednesday = 2, Thursday = 3, Friday = 4, Saturday = 5, Sunday = 6 } /** * @see {@link https://discord.com/developers/docs/resources/guild-scheduled-event#guild-scheduled-event-recurrence-rule-object-guild-scheduled-event-recurrence-rule-month} */ export declare enum GuildScheduledEventRecurrenceRuleMonth { January = 1, February = 2, March = 3, April = 4, May = 5, June = 6, July = 7, August = 8, September = 9, October = 10, November = 11, December = 12 } /** * @see {@link https://discord.com/developers/docs/resources/guild-scheduled-event#guild-scheduled-event-recurrence-rule-object-guild-scheduled-event-recurrence-rule-nweekday-structure} */ export interface APIGuildScheduledEventRecurrenceRuleNWeekday { /** * The week to reoccur on. */ n: 1 | 2 | 3 | 4 | 5; /** * The day within the week to reoccur on */ day: GuildScheduledEventRecurrenceRuleWeekday; } /** * @deprecated Use {@link APIGuildScheduledEventRecurrenceRuleNWeekday} instead */ export type GuildScheduledEventRecurrenceRuleNWeekday = APIGuildScheduledEventRecurrenceRuleNWeekday; export interface APIStageInstanceGuildScheduledEvent extends APIGuildScheduledEventBase<GuildScheduledEventEntityType.StageInstance> { channel_id: Snowflake; entity_metadata: null; } export interface APIVoiceGuildScheduledEvent extends APIGuildScheduledEventBase<GuildScheduledEventEntityType.Voice> { channel_id: Snowflake; entity_metadata: null; } export interface APIExternalGuildScheduledEvent extends APIGuildScheduledEventBase<GuildScheduledEventEntityType.External> { channel_id: null; entity_metadata: Required<APIGuildScheduledEventEntityMetadata>; } /** * @see {@link https://discord.com/developers/docs/resources/guild-scheduled-event#guild-scheduled-event-object-guild-scheduled-event-structure} */ export type APIGuildScheduledEvent = APIExternalGuildScheduledEvent | APIStageInstanceGuildScheduledEvent | APIVoiceGuildScheduledEvent; /** * @see {@link https://discord.com/developers/docs/resources/guild-scheduled-event#guild-scheduled-event-object-guild-scheduled-event-entity-metadata} */ export interface APIGuildScheduledEventEntityMetadata { /** * The location of the scheduled event */ location?: string; } /** * @see {@link https://discord.com/developers/docs/resources/guild-scheduled-event#guild-scheduled-event-object-guild-scheduled-event-entity-types} */ export declare enum GuildScheduledEventEntityType { StageInstance = 1, Voice = 2, External = 3 } /** * @see {@link https://discord.com/developers/docs/resources/guild-scheduled-event#guild-scheduled-event-object-guild-scheduled-event-status} */ export declare enum GuildScheduledEventStatus { Scheduled = 1, Active = 2, Completed = 3, Canceled = 4 } /** * @see {@link https://discord.com/developers/docs/resources/guild-scheduled-event#guild-scheduled-event-object-guild-scheduled-event-privacy-level} */ export declare enum GuildScheduledEventPrivacyLevel { /** * The scheduled event is only accessible to guild members */ GuildOnly = 2 } /** * @see {@link https://discord.com/developers/docs/resources/guild-scheduled-event#guild-scheduled-event-user-object-guild-scheduled-event-user-structure} */ export interface APIGuildScheduledEventUser { /** * The scheduled event id which the user subscribed to */ guild_scheduled_event_id: Snowflake; /** * The user which subscribed to the event */ user: APIUser; /** * The guild member data for this user for the guild which this event belongs to, if any */ member?: APIGuildMember; } //# sourceMappingURL=guildScheduledEvent.d.ts.map node_modules/discord-api-types/payloads/v10/auditLog.js.map 0000664 00000002645 15114741631 0017701 0 ustar 00 {"version":3,"file":"auditLog.js","sourceRoot":"","sources":["auditLog.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AAoIH;;GAEG;AACH,IAAY,aAoFX;AApFD,WAAY,aAAa;IACxB,+DAAe,CAAA;IAEf,oEAAkB,CAAA;IAClB,oEAAa,CAAA;IACb,oEAAa,CAAA;IACb,sFAAsB,CAAA;IACtB,sFAAsB,CAAA;IACtB,sFAAsB,CAAA;IAEtB,8DAAe,CAAA;IACf,gEAAW,CAAA;IACX,kEAAY,CAAA;IACZ,wEAAe,CAAA;IACf,kEAAY,CAAA;IACZ,0EAAgB,CAAA;IAChB,8DAAU,CAAA;IACV,0EAAgB,CAAA;IAChB,sDAAM,CAAA;IAEN,8DAAe,CAAA;IACf,8DAAU,CAAA;IACV,8DAAU,CAAA;IAEV,kEAAiB,CAAA;IACjB,kEAAY,CAAA;IACZ,kEAAY,CAAA;IAEZ,oEAAkB,CAAA;IAClB,oEAAa,CAAA;IACb,oEAAa,CAAA;IAEb,gEAAgB,CAAA;IAChB,gEAAW,CAAA;IACX,gEAAW,CAAA;IAEX,oEAAkB,CAAA;IAClB,4EAAiB,CAAA;IACjB,8DAAU,CAAA;IACV,kEAAY,CAAA;IAEZ,4EAAsB,CAAA;IACtB,4EAAiB,CAAA;IACjB,4EAAiB,CAAA;IACjB,gFAAmB,CAAA;IACnB,gFAAmB,CAAA;IACnB,gFAAmB,CAAA;IAEnB,oEAAkB,CAAA;IAClB,oEAAa,CAAA;IACb,oEAAa,CAAA;IAEb,6FAA+B,CAAA;IAC/B,6FAAyB,CAAA;IACzB,6FAAyB,CAAA;IAEzB,mEAAkB,CAAA;IAClB,mEAAY,CAAA;IACZ,mEAAY,CAAA;IAEZ,+GAAwC,CAAA;IAExC,qFAA2B,CAAA;IAC3B,qFAAqB,CAAA;IACrB,qFAAqB,CAAA;IAErB,2FAA8B,CAAA;IAC9B,2FAAwB,CAAA;IACxB,2FAAwB,CAAA;IACxB,+FAA0B,CAAA;IAC1B,iGAA2B,CAAA;IAC3B,yHAAuC,CAAA;IAEvC,6GAAuC,CAAA;IACvC,2GAAgC,CAAA;IAEhC,uFAA4B,CAAA;IAC5B,uFAAsB,CAAA;IACtB,uFAAsB,CAAA;IACtB,2EAAgB,CAAA;IAChB,2EAAgB,CAAA;IAEhB,+EAAwB,CAAA;IACxB,+EAAkB,CAAA;AACnB,CAAC,EApFW,aAAa,6BAAb,aAAa,QAoFxB;AAwHD,IAAY,mBAGX;AAHD,WAAY,mBAAmB;IAC9B,iCAAU,CAAA;IACV,mCAAY,CAAA;AACb,CAAC,EAHW,mBAAmB,mCAAnB,mBAAmB,QAG9B"} node_modules/discord-api-types/payloads/v10/soundboard.js 0000664 00000000314 15114741631 0017504 0 ustar 00 "use strict"; /** * Types extracted from https://discord.com/developers/docs/resources/soundboard */ Object.defineProperty(exports, "__esModule", { value: true }); //# sourceMappingURL=soundboard.js.map node_modules/discord-api-types/payloads/v10/teams.js 0000664 00000002066 15114741631 0016463 0 ustar 00 "use strict"; /** * Types extracted from https://discord.com/developers/docs/topics/teams */ Object.defineProperty(exports, "__esModule", { value: true }); exports.TeamMemberRole = exports.TeamMemberMembershipState = void 0; /** * @see {@link https://discord.com/developers/docs/topics/teams#data-models-membership-state-enum} */ var TeamMemberMembershipState; (function (TeamMemberMembershipState) { TeamMemberMembershipState[TeamMemberMembershipState["Invited"] = 1] = "Invited"; TeamMemberMembershipState[TeamMemberMembershipState["Accepted"] = 2] = "Accepted"; })(TeamMemberMembershipState || (exports.TeamMemberMembershipState = TeamMemberMembershipState = {})); /** * @see {@link https://discord.com/developers/docs/topics/teams#team-member-roles-team-member-role-types} */ var TeamMemberRole; (function (TeamMemberRole) { TeamMemberRole["Admin"] = "admin"; TeamMemberRole["Developer"] = "developer"; TeamMemberRole["ReadOnly"] = "read_only"; })(TeamMemberRole || (exports.TeamMemberRole = TeamMemberRole = {})); //# sourceMappingURL=teams.js.map node_modules/discord-api-types/payloads/v10/monetization.js.map 0000664 00000001665 15114741631 0020652 0 ustar 00 {"version":3,"file":"monetization.js","sourceRoot":"","sources":["monetization.ts"],"names":[],"mappings":";;;AAgDA;;GAEG;AACH,IAAY,eAiCX;AAjCD,WAAY,eAAe;IAC1B;;OAEG;IACH,6DAAY,CAAA;IACZ;;OAEG;IACH,mFAAmB,CAAA;IACnB;;OAEG;IACH,uEAAa,CAAA;IACb;;OAEG;IACH,6EAAgB,CAAA;IAChB;;OAEG;IACH,qEAAY,CAAA;IACZ;;OAEG;IACH,6DAAQ,CAAA;IACR;;OAEG;IACH,2EAAe,CAAA;IACf;;OAEG;IACH,2FAAuB,CAAA;AACxB,CAAC,EAjCW,eAAe,+BAAf,eAAe,QAiC1B;AAkCD;;GAEG;AACH,IAAY,QAcX;AAdD,WAAY,QAAQ;IACnB;;OAEG;IACH,iDAAkB,CAAA;IAClB;;;OAGG;IACH,mEAA0B,CAAA;IAC1B;;OAEG;IACH,iEAAyB,CAAA;AAC1B,CAAC,EAdW,QAAQ,wBAAR,QAAQ,QAcnB;AAED;;GAEG;AACH,IAAY,OAiBX;AAjBD,WAAY,OAAO;IAClB;;OAEG;IACH,2CAAW,CAAA;IACX;;OAEG;IACH,iDAAc,CAAA;IACd;;OAEG;IACH,qDAAgB,CAAA;IAChB;;OAEG;IACH,+DAAqB,CAAA;AACtB,CAAC,EAjBW,OAAO,uBAAP,OAAO,QAiBlB;AAgDD;;GAEG;AACH,IAAY,kBAaX;AAbD,WAAY,kBAAkB;IAC7B;;OAEG;IACH,+DAAM,CAAA;IACN;;OAEG;IACH,+DAAM,CAAA;IACN;;OAEG;IACH,mEAAQ,CAAA;AACT,CAAC,EAbW,kBAAkB,kCAAlB,kBAAkB,QAa7B"} node_modules/discord-api-types/payloads/v10/template.d.ts.map 0000664 00000001650 15114741631 0020173 0 ustar 00 {"version":3,"file":"template.d.ts","sourceRoot":"","sources":["template.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC/C,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,sBAAsB,CAAC;AACtE,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,QAAQ,CAAC;AAEtC;;GAEG;AACH,MAAM,WAAW,WAAW;IAC3B;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;OAEG;IACH,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B;;OAEG;IACH,WAAW,EAAE,MAAM,CAAC;IACpB;;OAEG;IACH,UAAU,EAAE,SAAS,CAAC;IACtB;;;;OAIG;IACH,OAAO,EAAE,OAAO,CAAC;IACjB;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC;IACnB;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC;IACnB;;OAEG;IACH,eAAe,EAAE,SAAS,CAAC;IAC3B;;OAEG;IACH,uBAAuB,EAAE,gCAAgC,CAAC;IAC1D;;OAEG;IACH,QAAQ,EAAE,OAAO,GAAG,IAAI,CAAC;CACzB;AAED,MAAM,WAAW,gCAAiC,SAAQ,IAAI,CAAC,yBAAyB,EAAE,MAAM,CAAC;IAChG,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,gBAAgB,EAAE,MAAM,CAAC;IACzB,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;CACzB"} node_modules/discord-api-types/payloads/v10/gateway.d.ts.map 0000664 00000007722 15114741631 0020027 0 ustar 00 {"version":3,"file":"gateway.d.ts","sourceRoot":"","sources":["gateway.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC/C,OAAO,KAAK,EAAE,gBAAgB,EAAE,eAAe,EAAE,MAAM,WAAW,CAAC;AACnE,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AACxC,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,QAAQ,CAAC;AAEtC;;GAEG;AACH,MAAM,WAAW,cAAc;IAC9B;;OAEG;IACH,GAAG,EAAE,MAAM,CAAC;CACZ;AAED;;GAEG;AACH,MAAM,WAAW,iBAAkB,SAAQ,cAAc;IACxD;;;;OAIG;IACH,MAAM,EAAE,MAAM,CAAC;IACf;;;;OAIG;IACH,mBAAmB,EAAE,2BAA2B,CAAC;CACjD;AAED;;GAEG;AACH,MAAM,WAAW,2BAA2B;IAC3C;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;IAClB;;OAEG;IACH,WAAW,EAAE,MAAM,CAAC;IACpB;;OAEG;IACH,eAAe,EAAE,MAAM,CAAC;CACxB;AAED;;GAEG;AACH,MAAM,WAAW,gCAAgC;IAChD;;;;;;;OAOG;IACH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MAAM,CAAC;IACrB;;OAEG;IACH,aAAa,CAAC,EAAE,eAAe,EAAE,CAAC;IAClC;;OAEG;IACH,kBAAkB,CAAC,EAAE,SAAS,EAAE,CAAC;CACjC"} node_modules/discord-api-types/payloads/v10/_interactions/ping.js 0000664 00000000155 15114741631 0021145 0 ustar 00 "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); //# sourceMappingURL=ping.js.map node_modules/discord-api-types/payloads/v10/_interactions/autocomplete.d.ts 0000664 00000002051 15114741631 0023142 0 ustar 00 import type { APIBaseInteraction, APIAutocompleteApplicationCommandInteractionData, APIDMInteractionWrapper, APIGuildInteractionWrapper, InteractionType } from '../index'; export type APIApplicationCommandAutocompleteInteraction = APIBaseInteraction<InteractionType.ApplicationCommandAutocomplete, APIAutocompleteApplicationCommandInteractionData> & Required<Pick<APIBaseInteraction<InteractionType.ApplicationCommandAutocomplete, Required<Pick<APIAutocompleteApplicationCommandInteractionData, 'options'>>>, 'data'>>; /** * @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object} */ export type APIApplicationCommandAutocompleteDMInteraction = APIDMInteractionWrapper<APIApplicationCommandAutocompleteInteraction>; /** * @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object} */ export type APIApplicationCommandAutocompleteGuildInteraction = APIGuildInteractionWrapper<APIApplicationCommandAutocompleteInteraction>; //# sourceMappingURL=autocomplete.d.ts.map node_modules/discord-api-types/payloads/v10/_interactions/messageComponents.d.ts 0000664 00000006344 15114741631 0024144 0 ustar 00 import type { Snowflake } from '../../../globals'; import type { ComponentType } from '../channel'; import type { APIBaseInteraction, InteractionType } from '../interactions'; import type { APIDMInteractionWrapper, APIGuildInteractionWrapper, APIInteractionDataResolved, APIUserInteractionDataResolved } from './base'; export type APIMessageComponentInteraction = APIBaseInteraction<InteractionType.MessageComponent, APIMessageComponentInteractionData> & Required<Pick<APIBaseInteraction<InteractionType.MessageComponent, APIMessageComponentInteractionData>, 'app_permissions' | 'channel_id' | 'channel' | 'data' | 'message'>>; export type APIMessageComponentButtonInteraction = APIBaseInteraction<InteractionType.MessageComponent, APIMessageButtonInteractionData> & Required<Pick<APIBaseInteraction<InteractionType.MessageComponent, APIMessageButtonInteractionData>, 'app_permissions' | 'channel_id' | 'channel' | 'data' | 'message'>>; export type APIMessageComponentSelectMenuInteraction = APIBaseInteraction<InteractionType.MessageComponent, APIMessageSelectMenuInteractionData> & Required<Pick<APIBaseInteraction<InteractionType.MessageComponent, APIMessageSelectMenuInteractionData>, 'app_permissions' | 'channel_id' | 'channel' | 'data' | 'message'>>; export type APIMessageComponentInteractionData = APIMessageButtonInteractionData | APIMessageSelectMenuInteractionData; export interface APIMessageComponentBaseInteractionData<CType extends ComponentType> { /** * The `custom_id` of the component */ custom_id: string; /** * The type of the component */ component_type: CType; } export type APIMessageButtonInteractionData = APIMessageComponentBaseInteractionData<ComponentType.Button>; export interface APIMessageStringSelectInteractionData extends APIMessageComponentBaseInteractionData<ComponentType.StringSelect> { values: string[]; } export interface APIMessageUserSelectInteractionData extends APIMessageComponentBaseInteractionData<ComponentType.UserSelect> { values: Snowflake[]; resolved: APIUserInteractionDataResolved; } export interface APIMessageRoleSelectInteractionData extends APIMessageComponentBaseInteractionData<ComponentType.RoleSelect> { values: Snowflake[]; resolved: Required<Pick<APIInteractionDataResolved, 'roles'>>; } export interface APIMessageMentionableSelectInteractionData extends APIMessageComponentBaseInteractionData<ComponentType.MentionableSelect> { values: Snowflake[]; resolved: Pick<APIInteractionDataResolved, 'members' | 'roles' | 'users'>; } export interface APIMessageChannelSelectInteractionData extends APIMessageComponentBaseInteractionData<ComponentType.ChannelSelect> { values: Snowflake[]; resolved: Required<Pick<APIInteractionDataResolved, 'channels'>>; } export type APIMessageSelectMenuInteractionData = APIMessageChannelSelectInteractionData | APIMessageMentionableSelectInteractionData | APIMessageRoleSelectInteractionData | APIMessageStringSelectInteractionData | APIMessageUserSelectInteractionData; export type APIMessageComponentDMInteraction = APIDMInteractionWrapper<APIMessageComponentInteraction>; export type APIMessageComponentGuildInteraction = APIGuildInteractionWrapper<APIMessageComponentInteraction>; //# sourceMappingURL=messageComponents.d.ts.map node_modules/discord-api-types/payloads/v10/_interactions/autocomplete.d.ts.map 0000664 00000001060 15114741631 0023715 0 ustar 00 {"version":3,"file":"autocomplete.d.ts","sourceRoot":"","sources":["autocomplete.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACX,kBAAkB,EAClB,gDAAgD,EAChD,uBAAuB,EACvB,0BAA0B,EAC1B,eAAe,EACf,MAAM,UAAU,CAAC;AAElB,MAAM,MAAM,4CAA4C,GAAG,kBAAkB,CAC5E,eAAe,CAAC,8BAA8B,EAC9C,gDAAgD,CAChD,GACA,QAAQ,CACP,IAAI,CACH,kBAAkB,CACjB,eAAe,CAAC,8BAA8B,EAC9C,QAAQ,CAAC,IAAI,CAAC,gDAAgD,EAAE,SAAS,CAAC,CAAC,CAC3E,EACD,MAAM,CACN,CACD,CAAC;AAEH;;GAEG;AACH,MAAM,MAAM,8CAA8C,GACzD,uBAAuB,CAAC,4CAA4C,CAAC,CAAC;AAEvE;;GAEG;AACH,MAAM,MAAM,iDAAiD,GAC5D,0BAA0B,CAAC,4CAA4C,CAAC,CAAC"} node_modules/discord-api-types/payloads/v10/_interactions/ping.js.map 0000664 00000000135 15114741631 0021717 0 ustar 00 {"version":3,"file":"ping.js","sourceRoot":"","sources":["ping.ts"],"names":[],"mappings":""} node_modules/discord-api-types/payloads/v10/_interactions/responses.d.ts 0000664 00000011321 15114741631 0022462 0 ustar 00 import type { RESTPostAPIWebhookWithTokenJSONBody } from '../../../v10'; import type { APIActionRowComponent, APIComponentInModalActionRow } from '../channel'; import type { APIApplicationCommandOptionChoice } from './applicationCommands'; /** * @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object-interaction-type} */ export declare enum InteractionType { Ping = 1, ApplicationCommand = 2, MessageComponent = 3, ApplicationCommandAutocomplete = 4, ModalSubmit = 5 } /** * @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-response-object} */ export type APIInteractionResponse = APIApplicationCommandAutocompleteResponse | APIInteractionResponseChannelMessageWithSource | APIInteractionResponseDeferredChannelMessageWithSource | APIInteractionResponseDeferredMessageUpdate | APIInteractionResponseLaunchActivity | APIInteractionResponsePong | APIInteractionResponseUpdateMessage | APIModalInteractionResponse | APIPremiumRequiredInteractionResponse; export interface APIInteractionResponsePong { type: InteractionResponseType.Pong; } export interface APIApplicationCommandAutocompleteResponse { type: InteractionResponseType.ApplicationCommandAutocompleteResult; data: APICommandAutocompleteInteractionResponseCallbackData; } export interface APIModalInteractionResponse { type: InteractionResponseType.Modal; data: APIModalInteractionResponseCallbackData; } export interface APIPremiumRequiredInteractionResponse { type: InteractionResponseType.PremiumRequired; } export interface APIInteractionResponseChannelMessageWithSource { type: InteractionResponseType.ChannelMessageWithSource; data: APIInteractionResponseCallbackData; } export interface APIInteractionResponseDeferredChannelMessageWithSource { type: InteractionResponseType.DeferredChannelMessageWithSource; data?: Pick<APIInteractionResponseCallbackData, 'flags'>; } export interface APIInteractionResponseDeferredMessageUpdate { type: InteractionResponseType.DeferredMessageUpdate; } export interface APIInteractionResponseUpdateMessage { type: InteractionResponseType.UpdateMessage; data?: APIInteractionResponseCallbackData; } export interface APIInteractionResponseLaunchActivity { type: InteractionResponseType.LaunchActivity; } /** * @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-response-object-interaction-callback-type} */ export declare enum InteractionResponseType { /** * ACK a `Ping` */ Pong = 1, /** * Respond to an interaction with a message */ ChannelMessageWithSource = 4, /** * ACK an interaction and edit to a response later, the user sees a loading state */ DeferredChannelMessageWithSource = 5, /** * ACK a button interaction and update it to a loading state */ DeferredMessageUpdate = 6, /** * ACK a button interaction and edit the message to which the button was attached */ UpdateMessage = 7, /** * For autocomplete interactions */ ApplicationCommandAutocompleteResult = 8, /** * Respond to an interaction with an modal for a user to fill-out */ Modal = 9, /** * Respond to an interaction with an upgrade button, only available for apps with monetization enabled * * @deprecated Send a button with Premium type instead. * {@link https://discord.com/developers/docs/change-log#premium-apps-new-premium-button-style-deep-linking-url-schemes | Learn more here} */ PremiumRequired = 10, /** * Launch the Activity associated with the app. * * @remarks * Only available for apps with Activities enabled */ LaunchActivity = 12 } /** * @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-response-object-interaction-callback-data-structure} */ export type APIInteractionResponseCallbackData = Omit<RESTPostAPIWebhookWithTokenJSONBody, 'avatar_url' | 'username'>; export interface APICommandAutocompleteInteractionResponseCallbackData { choices?: APIApplicationCommandOptionChoice[]; } /** * @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-response-object-modal} */ export interface APIModalInteractionResponseCallbackData { /** * A developer-defined identifier for the component, max 100 characters */ custom_id: string; /** * The title of the popup modal */ title: string; /** * Between 1 and 5 (inclusive) components that make up the modal */ components: APIActionRowComponent<APIComponentInModalActionRow>[]; } //# sourceMappingURL=responses.d.ts.map node_modules/discord-api-types/payloads/v10/_interactions/applicationCommands.d.ts.map 0000664 00000005043 15114741631 0025206 0 ustar 00 {"version":3,"file":"applicationCommands.d.ts","sourceRoot":"","sources":["applicationCommands.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC/D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AACpD,OAAO,KAAK,EACX,2BAA2B,EAC3B,2CAA2C,EAC3C,8CAA8C,EAC9C,yCAAyC,EACzC,6CAA6C,EAC7C,MAAM,kCAAkC,CAAC;AAC1C,OAAO,KAAK,EACX,2BAA2B,EAC3B,8BAA8B,EAC9B,yBAAyB,EACzB,6BAA6B,EAC7B,MAAM,oCAAoC,CAAC;AAC5C,OAAO,KAAK,EACX,wCAAwC,EACxC,2CAA2C,EAC3C,sCAAsC,EACtC,0CAA0C,EAC1C,MAAM,mCAAmC,CAAC;AAC3C,OAAO,KAAK,EAAE,kBAAkB,EAAE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BAA4B,CAAC;CACvC;AAED;;GAEG;AACH,oBAAY,sBAAsB;IACjC;;OAEG;IACH,SAAS,IAAI;IACb;;OAEG;IACH,IAAI,IAAA;IACJ;;OAEG;IACH,OAAO,IAAA;IACP;;OAEG;IACH,iBAAiB,IAAA;CACjB;AAED;;GAEG;AACH,oBAAY,0BAA0B;IACrC;;OAEG;IACH,YAAY,IAAA;IACZ;;OAEG;IACH,WAAW,IAAA;CACX;AAED;;GAEG;AACH,oBAAY,sBAAsB;IACjC;;OAEG;IACH,KAAK,IAAA;IACL;;OAEG;IACH,KAAK,IAAA;IACL;;OAEG;IACH,cAAc,IAAA;CACd;AAED;;GAEG;AACH,oBAAY,4BAA4B;IACvC;;OAEG;IACH,UAAU,IAAI;IACd;;;OAGG;IACH,qBAAqB,IAAA;CACrB;AAED;;GAEG;AACH,MAAM,MAAM,oCAAoC,GAC7C,6CAA6C,GAC7C,6BAA6B,GAC7B,0CAA0C,CAAC;AAE9C;;GAEG;AACH,MAAM,MAAM,uCAAuC,CAAC,IAAI,SAAS,oCAAoC,IACpG,kBAAkB,CAAC,eAAe,CAAC,kBAAkB,EAAE,IAAI,CAAC,GAC3D,QAAQ,CACP,IAAI,CACH,kBAAkB,CAAC,eAAe,CAAC,kBAAkB,EAAE,IAAI,CAAC,EAC5D,iBAAiB,GAAG,YAAY,GAAG,SAAS,GAAG,MAAM,CACrD,CACD,CAAC;AAEJ;;GAEG;AACH,MAAM,MAAM,gCAAgC,GACzC,yCAAyC,GACzC,yBAAyB,GACzB,sCAAsC,CAAC;AAE1C;;GAEG;AACH,MAAM,MAAM,kCAAkC,GAC3C,2CAA2C,GAC3C,2BAA2B,GAC3B,wCAAwC,CAAC;AAE5C;;GAEG;AACH,MAAM,MAAM,qCAAqC,GAC9C,8CAA8C,GAC9C,8BAA8B,GAC9B,2CAA2C,CAAC"} node_modules/discord-api-types/payloads/v10/_interactions/_applicationCommands/entryPoint.d.ts.map 0000664 00000001062 15114741631 0027515 0 ustar 00 {"version":3,"file":"entryPoint.d.ts","sourceRoot":"","sources":["entryPoint.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,uCAAuC,EAAE,sBAAsB,EAAE,MAAM,wBAAwB,CAAC;AAC9G,OAAO,KAAK,EAAE,uBAAuB,EAAE,0BAA0B,EAAE,MAAM,SAAS,CAAC;AACnF,OAAO,KAAK,EAAE,wCAAwC,EAAE,MAAM,aAAa,CAAC;AAE5E;;GAEG;AACH,MAAM,MAAM,0CAA0C,GACrD,wCAAwC,CAAC,sBAAsB,CAAC,iBAAiB,CAAC,CAAC;AAEpF;;GAEG;AACH,MAAM,MAAM,sCAAsC,GACjD,uCAAuC,CAAC,0CAA0C,CAAC,CAAC;AAErF;;GAEG;AACH,MAAM,MAAM,wCAAwC,GAAG,uBAAuB,CAAC,sCAAsC,CAAC,CAAC;AAEvH;;GAEG;AACH,MAAM,MAAM,2CAA2C,GACtD,0BAA0B,CAAC,sCAAsC,CAAC,CAAC"} node_modules/discord-api-types/payloads/v10/_interactions/_applicationCommands/chatInput.js.map 0000664 00000000203 15114741631 0027041 0 ustar 00 {"version":3,"file":"chatInput.js","sourceRoot":"","sources":["chatInput.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAyDA,sDAAoC"} node_modules/discord-api-types/payloads/v10/_interactions/_applicationCommands/internals.d.ts 0000664 00000000525 15114741631 0026570 0 ustar 00 import type { Snowflake } from '../../../../globals'; import type { ApplicationCommandType } from '../applicationCommands'; export interface APIBaseApplicationCommandInteractionData<Type extends ApplicationCommandType> { id: Snowflake; type: Type; name: string; guild_id?: Snowflake; } //# sourceMappingURL=internals.d.ts.map node_modules/discord-api-types/payloads/v10/_interactions/_applicationCommands/entryPoint.js 0000664 00000000163 15114741631 0026506 0 ustar 00 "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); //# sourceMappingURL=entryPoint.js.map node_modules/discord-api-types/payloads/v10/_interactions/_applicationCommands/internals.js 0000664 00000000162 15114741631 0026331 0 ustar 00 "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); //# sourceMappingURL=internals.js.map node_modules/discord-api-types/payloads/v10/_interactions/_applicationCommands/chatInput.d.ts 0000664 00000013465 15114741631 0026537 0 ustar 00 import type { APIInteractionDataResolved, InteractionType } from '../../index'; import type { APIApplicationCommandInteractionWrapper, ApplicationCommandType } from '../applicationCommands'; import type { APIDMInteractionWrapper, APIGuildInteractionWrapper } from '../base'; import type { APIApplicationCommandAttachmentOption, APIApplicationCommandInteractionDataAttachmentOption } from './_chatInput/attachment'; import type { APIApplicationCommandBooleanOption, APIApplicationCommandInteractionDataBooleanOption } from './_chatInput/boolean'; import type { APIApplicationCommandChannelOption, APIApplicationCommandInteractionDataChannelOption } from './_chatInput/channel'; import type { APIApplicationCommandIntegerOption, APIApplicationCommandInteractionDataIntegerOption } from './_chatInput/integer'; import type { APIApplicationCommandInteractionDataMentionableOption, APIApplicationCommandMentionableOption } from './_chatInput/mentionable'; import type { APIApplicationCommandInteractionDataNumberOption, APIApplicationCommandNumberOption } from './_chatInput/number'; import type { APIApplicationCommandInteractionDataRoleOption, APIApplicationCommandRoleOption } from './_chatInput/role'; import type { APIApplicationCommandInteractionDataStringOption, APIApplicationCommandStringOption } from './_chatInput/string'; import type { APIApplicationCommandInteractionDataSubcommandOption, APIApplicationCommandSubcommandOption } from './_chatInput/subcommand'; import type { APIApplicationCommandInteractionDataSubcommandGroupOption, APIApplicationCommandSubcommandGroupOption } from './_chatInput/subcommandGroup'; import type { APIApplicationCommandInteractionDataUserOption, APIApplicationCommandUserOption } from './_chatInput/user'; import type { APIBaseApplicationCommandInteractionData } from './internals'; export type * from './_chatInput/attachment'; export type * from './_chatInput/base'; export type * from './_chatInput/boolean'; export type * from './_chatInput/channel'; export type * from './_chatInput/integer'; export type * from './_chatInput/mentionable'; export type * from './_chatInput/number'; export type * from './_chatInput/role'; export * from './_chatInput/shared'; export type * from './_chatInput/string'; export type * from './_chatInput/subcommand'; export type * from './_chatInput/subcommandGroup'; export type * from './_chatInput/user'; /** * @see {@link https://discord.com/developers/docs/interactions/application-commands#application-command-object-application-command-option-structure} */ export type APIApplicationCommandBasicOption = APIApplicationCommandAttachmentOption | APIApplicationCommandBooleanOption | APIApplicationCommandChannelOption | APIApplicationCommandIntegerOption | APIApplicationCommandMentionableOption | APIApplicationCommandNumberOption | APIApplicationCommandRoleOption | APIApplicationCommandStringOption | APIApplicationCommandUserOption; /** * @see {@link https://discord.com/developers/docs/interactions/application-commands#application-command-object-application-command-option-structure} */ export type APIApplicationCommandOption = APIApplicationCommandBasicOption | APIApplicationCommandSubcommandGroupOption | APIApplicationCommandSubcommandOption; /** * @see {@link https://discord.com/developers/docs/interactions/application-commands#application-command-object-application-command-interaction-data-option-structure} */ export type APIApplicationCommandInteractionDataOption<Type extends InteractionType = InteractionType> = APIApplicationCommandInteractionDataBasicOption<Type> | APIApplicationCommandInteractionDataSubcommandGroupOption<Type> | APIApplicationCommandInteractionDataSubcommandOption<Type>; export type APIApplicationCommandInteractionDataBasicOption<Type extends InteractionType = InteractionType> = APIApplicationCommandInteractionDataAttachmentOption | APIApplicationCommandInteractionDataBooleanOption | APIApplicationCommandInteractionDataChannelOption | APIApplicationCommandInteractionDataIntegerOption<Type> | APIApplicationCommandInteractionDataMentionableOption | APIApplicationCommandInteractionDataNumberOption<Type> | APIApplicationCommandInteractionDataRoleOption | APIApplicationCommandInteractionDataStringOption | APIApplicationCommandInteractionDataUserOption; /** * @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object-interaction-data} */ export interface APIChatInputApplicationCommandInteractionData extends APIBaseApplicationCommandInteractionData<ApplicationCommandType.ChatInput> { options?: APIApplicationCommandInteractionDataOption<InteractionType.ApplicationCommand>[]; resolved?: APIInteractionDataResolved; } /** * @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object-interaction-data} */ export interface APIAutocompleteApplicationCommandInteractionData extends APIBaseApplicationCommandInteractionData<ApplicationCommandType.ChatInput> { options?: APIApplicationCommandInteractionDataOption<InteractionType.ApplicationCommandAutocomplete>[]; resolved?: APIInteractionDataResolved; } /** * @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object} */ export type APIChatInputApplicationCommandInteraction = APIApplicationCommandInteractionWrapper<APIChatInputApplicationCommandInteractionData>; /** * @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object} */ export type APIChatInputApplicationCommandDMInteraction = APIDMInteractionWrapper<APIChatInputApplicationCommandInteraction>; /** * @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object} */ export type APIChatInputApplicationCommandGuildInteraction = APIGuildInteractionWrapper<APIChatInputApplicationCommandInteraction>; //# sourceMappingURL=chatInput.d.ts.map node_modules/discord-api-types/payloads/v10/_interactions/_applicationCommands/contextMenu.d.ts.map 0000664 00000002600 15114741631 0027652 0 ustar 00 {"version":3,"file":"contextMenu.d.ts","sourceRoot":"","sources":["contextMenu.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AACrD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAChD,OAAO,KAAK,EAAE,uCAAuC,EAAE,sBAAsB,EAAE,MAAM,wBAAwB,CAAC;AAC9G,OAAO,KAAK,EAAE,uBAAuB,EAAE,0BAA0B,EAAE,8BAA8B,EAAE,MAAM,SAAS,CAAC;AACnH,OAAO,KAAK,EAAE,wCAAwC,EAAE,MAAM,aAAa,CAAC;AAE5E;;GAEG;AACH,MAAM,WAAW,wCAChB,SAAQ,wCAAwC,CAAC,sBAAsB,CAAC,IAAI,CAAC;IAC7E,SAAS,EAAE,SAAS,CAAC;IACrB,QAAQ,EAAE,8BAA8B,CAAC;CACzC;AAED;;GAEG;AACH,MAAM,WAAW,2CAChB,SAAQ,wCAAwC,CAAC,sBAAsB,CAAC,OAAO,CAAC;IAChF,SAAS,EAAE,SAAS,CAAC;IACrB,QAAQ,EAAE,mDAAmD,CAAC;CAC9D;AAED;;GAEG;AACH,MAAM,WAAW,mDAAmD;IACnE,QAAQ,EAAE,MAAM,CAAC,SAAS,EAAE,UAAU,CAAC,CAAC;CACxC;AAED;;GAEG;AACH,MAAM,MAAM,6BAA6B,GACtC,2CAA2C,GAC3C,wCAAwC,CAAC;AAE5C;;GAEG;AACH,MAAM,MAAM,oCAAoC,GAC/C,uCAAuC,CAAC,wCAAwC,CAAC,CAAC;AAEnF;;GAEG;AACH,MAAM,MAAM,sCAAsC,GAAG,uBAAuB,CAAC,oCAAoC,CAAC,CAAC;AAEnH;;GAEG;AACH,MAAM,MAAM,yCAAyC,GACpD,0BAA0B,CAAC,oCAAoC,CAAC,CAAC;AAElE;;GAEG;AACH,MAAM,MAAM,uCAAuC,GAClD,uCAAuC,CAAC,2CAA2C,CAAC,CAAC;AAEtF;;GAEG;AACH,MAAM,MAAM,yCAAyC,GACpD,uBAAuB,CAAC,uCAAuC,CAAC,CAAC;AAElE;;GAEG;AACH,MAAM,MAAM,4CAA4C,GACvD,0BAA0B,CAAC,uCAAuC,CAAC,CAAC;AAErE;;GAEG;AACH,MAAM,MAAM,yBAAyB,GAAG,uCAAuC,GAAG,oCAAoC,CAAC;AAEvH;;GAEG;AACH,MAAM,MAAM,2BAA2B,GACpC,yCAAyC,GACzC,sCAAsC,CAAC;AAE1C;;GAEG;AACH,MAAM,MAAM,8BAA8B,GACvC,4CAA4C,GAC5C,yCAAyC,CAAC"} node_modules/discord-api-types/payloads/v10/_interactions/_applicationCommands/permissions.js.map 0000664 00000000703 15114741631 0027462 0 ustar 00 {"version":3,"file":"permissions.js","sourceRoot":"","sources":["permissions.ts"],"names":[],"mappings":";;;AA0CA;;GAEG;AACH,IAAY,gCAIX;AAJD,WAAY,gCAAgC;IAC3C,uFAAQ,CAAA;IACR,uFAAI,CAAA;IACJ,6FAAO,CAAA;AACR,CAAC,EAJW,gCAAgC,gDAAhC,gCAAgC,QAI3C;AAED;;GAEG;AACU,QAAA,wCAAwC,GAAG;IACvD,oEAAoE;IACpE,QAAQ,EAAE,CAAC,OAAwB,EAAa,EAAE,CAAC,MAAM,CAAC,OAAO,CAAC;IAClE,WAAW,EAAE,CAAC,OAAwB,EAAa,EAAE,CAAC,MAAM,CAAC,MAAM,CAAC,OAAO,CAAC,GAAG,EAAE,CAAC;CAClF,CAAC"} node_modules/discord-api-types/payloads/v10/_interactions/_applicationCommands/contextMenu.js 0000664 00000000164 15114741631 0026645 0 ustar 00 "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); //# sourceMappingURL=contextMenu.js.map node_modules/discord-api-types/payloads/v10/_interactions/_applicationCommands/permissions.js 0000664 00000002411 15114741631 0026704 0 ustar 00 "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.APIApplicationCommandPermissionsConstant = exports.ApplicationCommandPermissionType = void 0; /** * @see {@link https://discord.com/developers/docs/interactions/application-commands#application-command-permissions-object-application-command-permission-type} */ var ApplicationCommandPermissionType; (function (ApplicationCommandPermissionType) { ApplicationCommandPermissionType[ApplicationCommandPermissionType["Role"] = 1] = "Role"; ApplicationCommandPermissionType[ApplicationCommandPermissionType["User"] = 2] = "User"; ApplicationCommandPermissionType[ApplicationCommandPermissionType["Channel"] = 3] = "Channel"; })(ApplicationCommandPermissionType || (exports.ApplicationCommandPermissionType = ApplicationCommandPermissionType = {})); /** * @see {@link https://discord.com/developers/docs/interactions/application-commands#application-command-permissions-object-application-command-permissions-constants} */ exports.APIApplicationCommandPermissionsConstant = { // eslint-disable-next-line unicorn/prefer-native-coercion-functions Everyone: (guildId) => String(guildId), AllChannels: (guildId) => String(BigInt(guildId) - 1n), }; //# sourceMappingURL=permissions.js.map node_modules/discord-api-types/payloads/v10/_interactions/_applicationCommands/entryPoint.d.ts 0000664 00000002452 15114741631 0026745 0 ustar 00 import type { APIApplicationCommandInteractionWrapper, ApplicationCommandType } from '../applicationCommands'; import type { APIDMInteractionWrapper, APIGuildInteractionWrapper } from '../base'; import type { APIBaseApplicationCommandInteractionData } from './internals'; /** * @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object-interaction-data} */ export type APIPrimaryEntryPointCommandInteractionData = APIBaseApplicationCommandInteractionData<ApplicationCommandType.PrimaryEntryPoint>; /** * @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object} */ export type APIPrimaryEntryPointCommandInteraction = APIApplicationCommandInteractionWrapper<APIPrimaryEntryPointCommandInteractionData>; /** * @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object} */ export type APIPrimaryEntryPointCommandDMInteraction = APIDMInteractionWrapper<APIPrimaryEntryPointCommandInteraction>; /** * @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object} */ export type APIPrimaryEntryPointCommandGuildInteraction = APIGuildInteractionWrapper<APIPrimaryEntryPointCommandInteraction>; //# sourceMappingURL=entryPoint.d.ts.map node_modules/discord-api-types/payloads/v10/_interactions/_applicationCommands/chatInput.d.ts.map 0000664 00000004715 15114741631 0027311 0 ustar 00 {"version":3,"file":"chatInput.d.ts","sourceRoot":"","sources":["chatInput.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,0BAA0B,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAC/E,OAAO,KAAK,EAAE,uCAAuC,EAAE,sBAAsB,EAAE,MAAM,wBAAwB,CAAC;AAC9G,OAAO,KAAK,EAAE,uBAAuB,EAAE,0BAA0B,EAAE,MAAM,SAAS,CAAC;AACnF,OAAO,KAAK,EACX,qCAAqC,EACrC,oDAAoD,EACpD,MAAM,yBAAyB,CAAC;AACjC,OAAO,KAAK,EACX,kCAAkC,EAClC,iDAAiD,EACjD,MAAM,sBAAsB,CAAC;AAC9B,OAAO,KAAK,EACX,kCAAkC,EAClC,iDAAiD,EACjD,MAAM,sBAAsB,CAAC;AAC9B,OAAO,KAAK,EACX,kCAAkC,EAClC,iDAAiD,EACjD,MAAM,sBAAsB,CAAC;AAC9B,OAAO,KAAK,EACX,qDAAqD,EACrD,sCAAsC,EACtC,MAAM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G,eAAe,IAClG,+CAA+C,CAAC,IAAI,CAAC,GACrD,yDAAyD,CAAC,IAAI,CAAC,GAC/D,oDAAoD,CAAC,IAAI,CAAC,CAAC;AAE9D,MAAM,MAAM,+CAA+C,CAAC,IAAI,SAAS,eAAe,GAAG,eAAe,IACvG,oDAAoD,GACpD,iDAAiD,GACjD,iDAAiD,GACjD,iDAAiD,CAAC,IAAI,CAAC,GACvD,qDAAqD,GACrD,gDAAgD,CAAC,IAAI,CAAC,GACtD,8CAA8C,GAC9C,gDAAgD,GAChD,8CAA8C,CAAC;AAElD;;GAEG;AACH,MAAM,WAAW,6CAChB,SAAQ,wCAAwC,CAAC,sBAAsB,CAAC,SAAS,CAAC;IAClF,OAAO,CAAC,EAAE,0CAA0C,CAAC,eAAe,CAAC,kBAAkB,CAAC,EAAE,CAAC;IAC3F,QAAQ,CAAC,EAAE,0BAA0B,CAAC;CACtC;AAED;;GAEG;AACH,MAAM,WAAW,gDAChB,SAAQ,wCAAwC,CAAC,sBAAsB,CAAC,SAAS,CAAC;IAClF,OAAO,CAAC,EAAE,0CAA0C,CAAC,eAAe,CAAC,8BAA8B,CAAC,EAAE,CAAC;IACvG,QAAQ,CAAC,EAAE,0BAA0B,CAAC;CACtC;AAED;;GAEG;AACH,MAAM,MAAM,yCAAyC,GACpD,uCAAuC,CAAC,6CAA6C,CAAC,CAAC;AAExF;;GAEG;AACH,MAAM,MAAM,2CAA2C,GACtD,uBAAuB,CAAC,yCAAyC,CAAC,CAAC;AAEpE;;GAEG;AACH,MAAM,MAAM,8CAA8C,GACzD,0BAA0B,CAAC,yCAAyC,CAAC,CAAC"} node_modules/discord-api-types/payloads/v10/_interactions/_applicationCommands/entryPoint.js.map 0000664 00000000151 15114741631 0027257 0 ustar 00 {"version":3,"file":"entryPoint.js","sourceRoot":"","sources":["entryPoint.ts"],"names":[],"mappings":""} discord-api-types/payloads/v10/_interactions/_applicationCommands/_chatInput/number.js.map 0000664 00000000141 15114741631 0030412 0 ustar 00 node_modules {"version":3,"file":"number.js","sourceRoot":"","sources":["number.ts"],"names":[],"mappings":""} discord-api-types/payloads/v10/_interactions/_applicationCommands/_chatInput/user.js.map 0000664 00000000135 15114741631 0030103 0 ustar 00 node_modules {"version":3,"file":"user.js","sourceRoot":"","sources":["user.ts"],"names":[],"mappings":""} discord-api-types/payloads/v10/_interactions/_applicationCommands/_chatInput/subcommand.js.map 0000664 00000000151 15114741631 0031253 0 ustar 00 node_modules {"version":3,"file":"subcommand.js","sourceRoot":"","sources":["subcommand.ts"],"names":[],"mappings":""} discord-api-types/payloads/v10/_interactions/_applicationCommands/_chatInput/attachment.d.ts.map 0000664 00000000630 15114741631 0031511 0 ustar 00 node_modules {"version":3,"file":"attachment.d.ts","sourceRoot":"","sources":["attachment.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AACxD,OAAO,KAAK,EAAE,+BAA+B,EAAE,4BAA4B,EAAE,MAAM,QAAQ,CAAC;AAC5F,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,UAAU,CAAC;AAE7D,MAAM,MAAM,qCAAqC,GAChD,+BAA+B,CAAC,4BAA4B,CAAC,UAAU,CAAC,CAAC;AAE1E,MAAM,MAAM,oDAAoD,GAAG,4BAA4B,CAC9F,4BAA4B,CAAC,UAAU,EACvC,SAAS,CACT,CAAC"} discord-api-types/payloads/v10/_interactions/_applicationCommands/_chatInput/mentionable.d.ts.map 0000664 00000000632 15114741631 0031660 0 ustar 00 node_modules {"version":3,"file":"mentionable.d.ts","sourceRoot":"","sources":["mentionable.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AACxD,OAAO,KAAK,EAAE,+BAA+B,EAAE,4BAA4B,EAAE,MAAM,QAAQ,CAAC;AAC5F,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,UAAU,CAAC;AAE7D,MAAM,MAAM,sCAAsC,GACjD,+BAA+B,CAAC,4BAA4B,CAAC,WAAW,CAAC,CAAC;AAE3E,MAAM,MAAM,qDAAqD,GAAG,4BAA4B,CAC/F,4BAA4B,CAAC,WAAW,EACxC,SAAS,CACT,CAAC"} discord-api-types/payloads/v10/_interactions/_applicationCommands/_chatInput/mentionable.d.ts 0000664 00000001024 15114741631 0031100 0 ustar 00 node_modules import type { Snowflake } from '../../../../../globals'; import type { APIApplicationCommandOptionBase, APIInteractionDataOptionBase } from './base'; import type { ApplicationCommandOptionType } from './shared'; export type APIApplicationCommandMentionableOption = APIApplicationCommandOptionBase<ApplicationCommandOptionType.Mentionable>; export type APIApplicationCommandInteractionDataMentionableOption = APIInteractionDataOptionBase<ApplicationCommandOptionType.Mentionable, Snowflake>; //# sourceMappingURL=mentionable.d.ts.map discord-api-types/payloads/v10/_interactions/_applicationCommands/_chatInput/mentionable.js 0000664 00000000164 15114741631 0030650 0 ustar 00 node_modules "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); //# sourceMappingURL=mentionable.js.map discord-api-types/payloads/v10/_interactions/_applicationCommands/_chatInput/channel.js.map 0000664 00000000143 15114741631 0030534 0 ustar 00 node_modules {"version":3,"file":"channel.js","sourceRoot":"","sources":["channel.ts"],"names":[],"mappings":""} discord-api-types/payloads/v10/_interactions/_applicationCommands/_chatInput/integer.d.ts.map 0000664 00000001304 15114741631 0031015 0 ustar 00 node_modules {"version":3,"file":"integer.d.ts","sourceRoot":"","sources":["integer.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AACvD,OAAO,KAAK,EACX,+BAA+B,EAC/B,2DAA2D,EAC3D,4BAA4B,EAC5B,MAAM,QAAQ,CAAC;AAChB,OAAO,KAAK,EAAE,iCAAiC,EAAE,4BAA4B,EAAE,MAAM,UAAU,CAAC;AAEhG,MAAM,WAAW,sCAChB,SAAQ,+BAA+B,CAAC,4BAA4B,CAAC,OAAO,CAAC;IAC7E;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,MAAM,kCAAkC,GAAG,2DAA2D,CAC3G,sCAAsC,EACtC,iCAAiC,CAAC,MAAM,CAAC,CACzC,CAAC;AAEF,MAAM,WAAW,iDAAiD,CAAC,IAAI,SAAS,eAAe,GAAG,eAAe,CAChH,SAAQ,4BAA4B,CACnC,4BAA4B,CAAC,OAAO,EACpC,IAAI,SAAS,eAAe,CAAC,8BAA8B,GAAG,MAAM,GAAG,MAAM,CAC7E;IACD,OAAO,CAAC,EAAE,OAAO,CAAC;CAClB"} discord-api-types/payloads/v10/_interactions/_applicationCommands/_chatInput/subcommand.js 0000664 00000000163 15114741631 0030502 0 ustar 00 node_modules "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); //# sourceMappingURL=subcommand.js.map discord-api-types/payloads/v10/_interactions/_applicationCommands/_chatInput/string.d.ts 0000664 00000002051 15114741631 0030112 0 ustar 00 node_modules import type { APIApplicationCommandOptionBase, APIApplicationCommandOptionWithAutocompleteOrChoicesWrapper, APIInteractionDataOptionBase } from './base'; import type { APIApplicationCommandOptionChoice, ApplicationCommandOptionType } from './shared'; export interface APIApplicationCommandStringOptionBase extends APIApplicationCommandOptionBase<ApplicationCommandOptionType.String> { /** * For option type `STRING`, the minimum allowed length (minimum of `0`, maximum of `6000`). */ min_length?: number; /** * For option type `STRING`, the maximum allowed length (minimum of `1`, maximum of `6000`). */ max_length?: number; } export type APIApplicationCommandStringOption = APIApplicationCommandOptionWithAutocompleteOrChoicesWrapper<APIApplicationCommandStringOptionBase, APIApplicationCommandOptionChoice<string>>; export interface APIApplicationCommandInteractionDataStringOption extends APIInteractionDataOptionBase<ApplicationCommandOptionType.String, string> { focused?: boolean; } //# sourceMappingURL=string.d.ts.map discord-api-types/payloads/v10/_interactions/_applicationCommands/_chatInput/mentionable.js.map 0000664 00000000153 15114741631 0031422 0 ustar 00 node_modules {"version":3,"file":"mentionable.js","sourceRoot":"","sources":["mentionable.ts"],"names":[],"mappings":""} discord-api-types/payloads/v10/_interactions/_applicationCommands/_chatInput/base.js.map 0000664 00000000135 15114741631 0030037 0 ustar 00 node_modules {"version":3,"file":"base.js","sourceRoot":"","sources":["base.ts"],"names":[],"mappings":""} discord-api-types/payloads/v10/_interactions/_applicationCommands/_chatInput/shared.js.map 0000664 00000000552 15114741631 0030376 0 ustar 00 node_modules {"version":3,"file":"shared.js","sourceRoot":"","sources":["shared.ts"],"names":[],"mappings":";;;AAEA;;GAEG;AACH,IAAY,4BAYX;AAZD,WAAY,4BAA4B;IACvC,2FAAc,CAAA;IACd,qGAAe,CAAA;IACf,mFAAM,CAAA;IACN,qFAAO,CAAA;IACP,qFAAO,CAAA;IACP,+EAAI,CAAA;IACJ,qFAAO,CAAA;IACP,+EAAI,CAAA;IACJ,6FAAW,CAAA;IACX,oFAAM,CAAA;IACN,4FAAU,CAAA;AACX,CAAC,EAZW,4BAA4B,4CAA5B,4BAA4B,QAYvC"} discord-api-types/payloads/v10/_interactions/_applicationCommands/_chatInput/user.d.ts.map 0000664 00000000613 15114741631 0030340 0 ustar 00 node_modules {"version":3,"file":"user.d.ts","sourceRoot":"","sources":["user.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AACxD,OAAO,KAAK,EAAE,+BAA+B,EAAE,4BAA4B,EAAE,MAAM,QAAQ,CAAC;AAC5F,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,UAAU,CAAC;AAE7D,MAAM,MAAM,+BAA+B,GAAG,+BAA+B,CAAC,4BAA4B,CAAC,IAAI,CAAC,CAAC;AAEjH,MAAM,MAAM,8CAA8C,GAAG,4BAA4B,CACxF,4BAA4B,CAAC,IAAI,EACjC,SAAS,CACT,CAAC"} discord-api-types/payloads/v10/_interactions/_applicationCommands/_chatInput/string.d.ts.map 0000664 00000001102 15114741631 0030662 0 ustar 00 node_modules {"version":3,"file":"string.d.ts","sourceRoot":"","sources":["string.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACX,+BAA+B,EAC/B,2DAA2D,EAC3D,4BAA4B,EAC5B,MAAM,QAAQ,CAAC;AAChB,OAAO,KAAK,EAAE,iCAAiC,EAAE,4BAA4B,EAAE,MAAM,UAAU,CAAC;AAEhG,MAAM,WAAW,qCAChB,SAAQ,+BAA+B,CAAC,4BAA4B,CAAC,MAAM,CAAC;IAC5E;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,MAAM,iCAAiC,GAAG,2DAA2D,CAC1G,qCAAqC,EACrC,iCAAiC,CAAC,MAAM,CAAC,CACzC,CAAC;AAEF,MAAM,WAAW,gDAChB,SAAQ,4BAA4B,CAAC,4BAA4B,CAAC,MAAM,EAAE,MAAM,CAAC;IACjF,OAAO,CAAC,EAAE,OAAO,CAAC;CAClB"} node_modules/discord-api-types/payloads/v10/_interactions/_applicationCommands/_chatInput/base.d.ts 0000664 00000001655 15114741631 0027606 0 ustar 00 import type { LocalizationMap } from '../../../../../v10'; import type { APIApplicationCommandOptionChoice, ApplicationCommandOptionType } from './shared'; export interface APIApplicationCommandOptionBase<Type extends ApplicationCommandOptionType> { type: Type; name: string; name_localizations?: LocalizationMap | null; description: string; description_localizations?: LocalizationMap | null; required?: boolean; } export interface APIInteractionDataOptionBase<T extends ApplicationCommandOptionType, D> { name: string; type: T; value: D; } export type APIApplicationCommandOptionWithAutocompleteOrChoicesWrapper<Base extends APIApplicationCommandOptionBase<ApplicationCommandOptionType>, ChoiceType extends APIApplicationCommandOptionChoice> = (Base & { autocomplete: true; choices?: []; }) | (Base & { autocomplete?: false; choices?: ChoiceType[]; }); //# sourceMappingURL=base.d.ts.map node_modules/discord-api-types/payloads/v10/_interactions/_applicationCommands/_chatInput/role.js 0000664 00000000155 15114741631 0027373 0 ustar 00 "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); //# sourceMappingURL=role.js.map node_modules/discord-api-types/payloads/v10/_interactions/_applicationCommands/_chatInput/channel.js0000664 00000000160 15114741631 0030036 0 ustar 00 "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); //# sourceMappingURL=channel.js.map discord-api-types/payloads/v10/_interactions/_applicationCommands/_chatInput/integer.js.map 0000664 00000000143 15114741631 0030561 0 ustar 00 node_modules {"version":3,"file":"integer.js","sourceRoot":"","sources":["integer.ts"],"names":[],"mappings":""} discord-api-types/payloads/v10/_interactions/_applicationCommands/_chatInput/shared.d.ts.map 0000664 00000000775 15114741631 0030641 0 ustar 00 node_modules {"version":3,"file":"shared.d.ts","sourceRoot":"","sources":["shared.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAE1D;;GAEG;AACH,oBAAY,4BAA4B;IACvC,UAAU,IAAI;IACd,eAAe,IAAA;IACf,MAAM,IAAA;IACN,OAAO,IAAA;IACP,OAAO,IAAA;IACP,IAAI,IAAA;IACJ,OAAO,IAAA;IACP,IAAI,IAAA;IACJ,WAAW,IAAA;IACX,MAAM,KAAA;IACN,UAAU,KAAA;CACV;AAED;;GAEG;AACH,MAAM,WAAW,iCAAiC,CAAC,SAAS,GAAG,MAAM,GAAG,MAAM;IAC7E,IAAI,EAAE,MAAM,CAAC;IACb,kBAAkB,CAAC,EAAE,eAAe,GAAG,IAAI,CAAC;IAC5C,KAAK,EAAE,SAAS,CAAC;CACjB"} discord-api-types/payloads/v10/_interactions/_applicationCommands/_chatInput/attachment.js.map 0000664 00000000151 15114741631 0031253 0 ustar 00 node_modules {"version":3,"file":"attachment.js","sourceRoot":"","sources":["attachment.ts"],"names":[],"mappings":""} discord-api-types/payloads/v10/_interactions/_applicationCommands/_chatInput/role.js.map 0000664 00000000135 15114741631 0030066 0 ustar 00 node_modules {"version":3,"file":"role.js","sourceRoot":"","sources":["role.ts"],"names":[],"mappings":""} node_modules/discord-api-types/payloads/v10/_interactions/_applicationCommands/_chatInput/string.js 0000664 00000000157 15114741631 0027742 0 ustar 00 "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); //# sourceMappingURL=string.js.map discord-api-types/payloads/v10/_interactions/_applicationCommands/_chatInput/subcommand.d.ts 0000664 00000001430 15114741631 0030734 0 ustar 00 node_modules import type { InteractionType } from '../../responses'; import type { APIApplicationCommandBasicOption, APIApplicationCommandInteractionDataBasicOption } from '../chatInput'; import type { APIApplicationCommandOptionBase } from './base'; import type { ApplicationCommandOptionType } from './shared'; export interface APIApplicationCommandSubcommandOption extends APIApplicationCommandOptionBase<ApplicationCommandOptionType.Subcommand> { options?: APIApplicationCommandBasicOption[]; } export interface APIApplicationCommandInteractionDataSubcommandOption<Type extends InteractionType = InteractionType> { name: string; type: ApplicationCommandOptionType.Subcommand; options?: APIApplicationCommandInteractionDataBasicOption<Type>[]; } //# sourceMappingURL=subcommand.d.ts.map discord-api-types/payloads/v10/_interactions/_applicationCommands/_chatInput/attachment.d.ts 0000664 00000001017 15114741631 0030735 0 ustar 00 node_modules import type { Snowflake } from '../../../../../globals'; import type { APIApplicationCommandOptionBase, APIInteractionDataOptionBase } from './base'; import type { ApplicationCommandOptionType } from './shared'; export type APIApplicationCommandAttachmentOption = APIApplicationCommandOptionBase<ApplicationCommandOptionType.Attachment>; export type APIApplicationCommandInteractionDataAttachmentOption = APIInteractionDataOptionBase<ApplicationCommandOptionType.Attachment, Snowflake>; //# sourceMappingURL=attachment.d.ts.map discord-api-types/payloads/v10/_interactions/_applicationCommands/_chatInput/subcommandGroup.js 0000664 00000000170 15114741631 0031515 0 ustar 00 node_modules "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); //# sourceMappingURL=subcommandGroup.js.map node_modules/discord-api-types/payloads/v10/_interactions/_applicationCommands/_chatInput/role.d.ts 0000664 00000000761 15114741631 0027632 0 ustar 00 import type { Snowflake } from '../../../../../globals'; import type { APIApplicationCommandOptionBase, APIInteractionDataOptionBase } from './base'; import type { ApplicationCommandOptionType } from './shared'; export type APIApplicationCommandRoleOption = APIApplicationCommandOptionBase<ApplicationCommandOptionType.Role>; export type APIApplicationCommandInteractionDataRoleOption = APIInteractionDataOptionBase<ApplicationCommandOptionType.Role, Snowflake>; //# sourceMappingURL=role.d.ts.map node_modules/discord-api-types/payloads/v10/_interactions/_applicationCommands/_chatInput/user.js 0000664 00000000155 15114741631 0027410 0 ustar 00 "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); //# sourceMappingURL=user.js.map discord-api-types/payloads/v10/_interactions/_applicationCommands/_chatInput/subcommand.d.ts.map 0000664 00000001115 15114741631 0031510 0 ustar 00 node_modules {"version":3,"file":"subcommand.d.ts","sourceRoot":"","sources":["subcommand.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AACvD,OAAO,KAAK,EAAE,gCAAgC,EAAE,+CAA+C,EAAE,MAAM,cAAc,CAAC;AACtH,OAAO,KAAK,EAAE,+BAA+B,EAAE,MAAM,QAAQ,CAAC;AAC9D,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,UAAU,CAAC;AAE7D,MAAM,WAAW,qCAChB,SAAQ,+BAA+B,CAAC,4BAA4B,CAAC,UAAU,CAAC;IAChF,OAAO,CAAC,EAAE,gCAAgC,EAAE,CAAC;CAC7C;AAED,MAAM,WAAW,oDAAoD,CAAC,IAAI,SAAS,eAAe,GAAG,eAAe;IACnH,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,4BAA4B,CAAC,UAAU,CAAC;IAC9C,OAAO,CAAC,EAAE,+CAA+C,CAAC,IAAI,CAAC,EAAE,CAAC;CAClE"} node_modules/discord-api-types/payloads/v10/_interactions/_applicationCommands/_chatInput/number.js 0000664 00000000157 15114741631 0027724 0 ustar 00 "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); //# sourceMappingURL=number.js.map discord-api-types/payloads/v10/_interactions/_applicationCommands/_chatInput/string.js.map 0000664 00000000141 15114741631 0030430 0 ustar 00 node_modules {"version":3,"file":"string.js","sourceRoot":"","sources":["string.ts"],"names":[],"mappings":""} discord-api-types/payloads/v10/_interactions/_applicationCommands/_chatInput/boolean.d.ts.map 0000664 00000000541 15114741631 0031001 0 ustar 00 node_modules {"version":3,"file":"boolean.d.ts","sourceRoot":"","sources":["boolean.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,+BAA+B,EAAE,4BAA4B,EAAE,MAAM,QAAQ,CAAC;AAC5F,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,UAAU,CAAC;AAE7D,MAAM,MAAM,kCAAkC,GAAG,+BAA+B,CAAC,4BAA4B,CAAC,OAAO,CAAC,CAAC;AAEvH,MAAM,MAAM,iDAAiD,GAAG,4BAA4B,CAC3F,4BAA4B,CAAC,OAAO,EACpC,OAAO,CACP,CAAC"} discord-api-types/payloads/v10/_interactions/_applicationCommands/_chatInput/number.d.ts 0000664 00000002274 15114741631 0030103 0 ustar 00 node_modules import type { InteractionType } from '../../responses'; import type { APIApplicationCommandOptionBase, APIApplicationCommandOptionWithAutocompleteOrChoicesWrapper, APIInteractionDataOptionBase } from './base'; import type { APIApplicationCommandOptionChoice, ApplicationCommandOptionType } from './shared'; export interface APIApplicationCommandNumberOptionBase extends APIApplicationCommandOptionBase<ApplicationCommandOptionType.Number> { /** * If the option is an `INTEGER` or `NUMBER` type, the minimum value permitted. */ min_value?: number; /** * If the option is an `INTEGER` or `NUMBER` type, the maximum value permitted. */ max_value?: number; } export type APIApplicationCommandNumberOption = APIApplicationCommandOptionWithAutocompleteOrChoicesWrapper<APIApplicationCommandNumberOptionBase, APIApplicationCommandOptionChoice<number>>; export interface APIApplicationCommandInteractionDataNumberOption<Type extends InteractionType = InteractionType> extends APIInteractionDataOptionBase<ApplicationCommandOptionType.Number, Type extends InteractionType.ApplicationCommandAutocomplete ? string : number> { focused?: boolean; } //# sourceMappingURL=number.d.ts.map discord-api-types/payloads/v10/_interactions/_applicationCommands/_chatInput/boolean.d.ts 0000664 00000000705 15114741631 0030227 0 ustar 00 node_modules import type { APIApplicationCommandOptionBase, APIInteractionDataOptionBase } from './base'; import type { ApplicationCommandOptionType } from './shared'; export type APIApplicationCommandBooleanOption = APIApplicationCommandOptionBase<ApplicationCommandOptionType.Boolean>; export type APIApplicationCommandInteractionDataBooleanOption = APIInteractionDataOptionBase<ApplicationCommandOptionType.Boolean, boolean>; //# sourceMappingURL=boolean.d.ts.map node_modules/discord-api-types/payloads/v10/_interactions/_applicationCommands/_chatInput/base.js 0000664 00000000155 15114741631 0027344 0 ustar 00 "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); //# sourceMappingURL=base.js.map discord-api-types/payloads/v10/_interactions/_applicationCommands/_chatInput/subcommandGroup.d.ts 0000664 00000001504 15114741631 0031753 0 ustar 00 node_modules import type { InteractionType } from '../../responses'; import type { APIApplicationCommandOptionBase } from './base'; import type { ApplicationCommandOptionType } from './shared'; import type { APIApplicationCommandInteractionDataSubcommandOption, APIApplicationCommandSubcommandOption } from './subcommand'; export interface APIApplicationCommandSubcommandGroupOption extends APIApplicationCommandOptionBase<ApplicationCommandOptionType.SubcommandGroup> { options?: APIApplicationCommandSubcommandOption[]; } export interface APIApplicationCommandInteractionDataSubcommandGroupOption<Type extends InteractionType = InteractionType> { name: string; type: ApplicationCommandOptionType.SubcommandGroup; options: APIApplicationCommandInteractionDataSubcommandOption<Type>[]; } //# sourceMappingURL=subcommandGroup.d.ts.map node_modules/discord-api-types/payloads/v10/_interactions/_applicationCommands/_chatInput/boolean.js0000664 00000000160 15114741631 0030045 0 ustar 00 "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); //# sourceMappingURL=boolean.js.map discord-api-types/payloads/v10/_interactions/_applicationCommands/_chatInput/number.d.ts.map 0000664 00000001302 15114741631 0030646 0 ustar 00 node_modules {"version":3,"file":"number.d.ts","sourceRoot":"","sources":["number.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AACvD,OAAO,KAAK,EACX,+BAA+B,EAC/B,2DAA2D,EAC3D,4BAA4B,EAC5B,MAAM,QAAQ,CAAC;AAChB,OAAO,KAAK,EAAE,iCAAiC,EAAE,4BAA4B,EAAE,MAAM,UAAU,CAAC;AAEhG,MAAM,WAAW,qCAChB,SAAQ,+BAA+B,CAAC,4BAA4B,CAAC,MAAM,CAAC;IAC5E;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,MAAM,iCAAiC,GAAG,2DAA2D,CAC1G,qCAAqC,EACrC,iCAAiC,CAAC,MAAM,CAAC,CACzC,CAAC;AAEF,MAAM,WAAW,gDAAgD,CAAC,IAAI,SAAS,eAAe,GAAG,eAAe,CAC/G,SAAQ,4BAA4B,CACnC,4BAA4B,CAAC,MAAM,EACnC,IAAI,SAAS,eAAe,CAAC,8BAA8B,GAAG,MAAM,GAAG,MAAM,CAC7E;IACD,OAAO,CAAC,EAAE,OAAO,CAAC;CAClB"} node_modules/discord-api-types/payloads/v10/_interactions/_applicationCommands/_chatInput/user.d.ts 0000664 00000000761 15114741631 0027647 0 ustar 00 import type { Snowflake } from '../../../../../globals'; import type { APIApplicationCommandOptionBase, APIInteractionDataOptionBase } from './base'; import type { ApplicationCommandOptionType } from './shared'; export type APIApplicationCommandUserOption = APIApplicationCommandOptionBase<ApplicationCommandOptionType.User>; export type APIApplicationCommandInteractionDataUserOption = APIInteractionDataOptionBase<ApplicationCommandOptionType.User, Snowflake>; //# sourceMappingURL=user.d.ts.map node_modules/discord-api-types/payloads/v10/_interactions/_applicationCommands/_chatInput/integer.js0000664 00000000160 15114741631 0030063 0 ustar 00 "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); //# sourceMappingURL=integer.js.map discord-api-types/payloads/v10/_interactions/_applicationCommands/_chatInput/base.d.ts.map 0000664 00000001526 15114741631 0030300 0 ustar 00 node_modules {"version":3,"file":"base.d.ts","sourceRoot":"","sources":["base.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAC1D,OAAO,KAAK,EAAE,iCAAiC,EAAE,4BAA4B,EAAE,MAAM,UAAU,CAAC;AAEhG,MAAM,WAAW,+BAA+B,CAAC,IAAI,SAAS,4BAA4B;IACzF,IAAI,EAAE,IAAI,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,kBAAkB,CAAC,EAAE,eAAe,GAAG,IAAI,CAAC;IAC5C,WAAW,EAAE,MAAM,CAAC;IACpB,yBAAyB,CAAC,EAAE,eAAe,GAAG,IAAI,CAAC;IACnD,QAAQ,CAAC,EAAE,OAAO,CAAC;CACnB;AAED,MAAM,WAAW,4BAA4B,CAAC,CAAC,SAAS,4BAA4B,EAAE,CAAC;IACtF,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,CAAC,CAAC;IACR,KAAK,EAAE,CAAC,CAAC;CACT;AAED,MAAM,MAAM,2DAA2D,CACtE,IAAI,SAAS,+BAA+B,CAAC,4BAA4B,CAAC,EAC1E,UAAU,SAAS,iCAAiC,IAElD,CAAC,IAAI,GAAG;IACR,YAAY,EAAE,IAAI,CAAC;IACnB,OAAO,CAAC,EAAE,EAAE,CAAC;CACZ,CAAC,GACF,CAAC,IAAI,GAAG;IACR,YAAY,CAAC,EAAE,KAAK,CAAC;IACrB,OAAO,CAAC,EAAE,UAAU,EAAE,CAAC;CACtB,CAAC,CAAC"} discord-api-types/payloads/v10/_interactions/_applicationCommands/_chatInput/shared.d.ts 0000664 00000001505 15114741631 0030055 0 ustar 00 node_modules import type { LocalizationMap } from '../../../../../v10'; /** * @see {@link https://discord.com/developers/docs/interactions/application-commands#application-command-object-application-command-option-type} */ export declare enum ApplicationCommandOptionType { Subcommand = 1, SubcommandGroup = 2, String = 3, Integer = 4, Boolean = 5, User = 6, Channel = 7, Role = 8, Mentionable = 9, Number = 10, Attachment = 11 } /** * @see {@link https://discord.com/developers/docs/interactions/application-commands#application-command-object-application-command-option-choice-structure} */ export interface APIApplicationCommandOptionChoice<ValueType = number | string> { name: string; name_localizations?: LocalizationMap | null; value: ValueType; } //# sourceMappingURL=shared.d.ts.map discord-api-types/payloads/v10/_interactions/_applicationCommands/_chatInput/channel.d.ts.map 0000664 00000001034 15114741631 0030770 0 ustar 00 node_modules {"version":3,"file":"channel.d.ts","sourceRoot":"","sources":["channel.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AACxD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AACpD,OAAO,KAAK,EAAE,+BAA+B,EAAE,4BAA4B,EAAE,MAAM,QAAQ,CAAC;AAC5F,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,UAAU,CAAC;AAE7D,MAAM,WAAW,kCAChB,SAAQ,+BAA+B,CAAC,4BAA4B,CAAC,OAAO,CAAC;IAC7E,aAAa,CAAC,EAAE,OAAO,CAAC,WAAW,EAAE,WAAW,CAAC,EAAE,GAAG,WAAW,CAAC,OAAO,CAAC,EAAE,CAAC;CAC7E;AAED,MAAM,MAAM,iDAAiD,GAAG,4BAA4B,CAC3F,4BAA4B,CAAC,OAAO,EACpC,SAAS,CACT,CAAC"} discord-api-types/payloads/v10/_interactions/_applicationCommands/_chatInput/integer.d.ts 0000664 00000002303 15114741631 0030241 0 ustar 00 node_modules import type { InteractionType } from '../../responses'; import type { APIApplicationCommandOptionBase, APIApplicationCommandOptionWithAutocompleteOrChoicesWrapper, APIInteractionDataOptionBase } from './base'; import type { APIApplicationCommandOptionChoice, ApplicationCommandOptionType } from './shared'; export interface APIApplicationCommandIntegerOptionBase extends APIApplicationCommandOptionBase<ApplicationCommandOptionType.Integer> { /** * If the option is an `INTEGER` or `NUMBER` type, the minimum value permitted. */ min_value?: number; /** * If the option is an `INTEGER` or `NUMBER` type, the maximum value permitted. */ max_value?: number; } export type APIApplicationCommandIntegerOption = APIApplicationCommandOptionWithAutocompleteOrChoicesWrapper<APIApplicationCommandIntegerOptionBase, APIApplicationCommandOptionChoice<number>>; export interface APIApplicationCommandInteractionDataIntegerOption<Type extends InteractionType = InteractionType> extends APIInteractionDataOptionBase<ApplicationCommandOptionType.Integer, Type extends InteractionType.ApplicationCommandAutocomplete ? string : number> { focused?: boolean; } //# sourceMappingURL=integer.d.ts.map discord-api-types/payloads/v10/_interactions/_applicationCommands/_chatInput/boolean.js.map 0000664 00000000143 15114741631 0030543 0 ustar 00 node_modules {"version":3,"file":"boolean.js","sourceRoot":"","sources":["boolean.ts"],"names":[],"mappings":""} discord-api-types/payloads/v10/_interactions/_applicationCommands/_chatInput/attachment.js 0000664 00000000163 15114741631 0030502 0 ustar 00 node_modules "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); //# sourceMappingURL=attachment.js.map node_modules/discord-api-types/payloads/v10/_interactions/_applicationCommands/_chatInput/shared.js 0000664 00000002763 15114741631 0027707 0 ustar 00 "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.ApplicationCommandOptionType = void 0; /** * @see {@link https://discord.com/developers/docs/interactions/application-commands#application-command-object-application-command-option-type} */ var ApplicationCommandOptionType; (function (ApplicationCommandOptionType) { ApplicationCommandOptionType[ApplicationCommandOptionType["Subcommand"] = 1] = "Subcommand"; ApplicationCommandOptionType[ApplicationCommandOptionType["SubcommandGroup"] = 2] = "SubcommandGroup"; ApplicationCommandOptionType[ApplicationCommandOptionType["String"] = 3] = "String"; ApplicationCommandOptionType[ApplicationCommandOptionType["Integer"] = 4] = "Integer"; ApplicationCommandOptionType[ApplicationCommandOptionType["Boolean"] = 5] = "Boolean"; ApplicationCommandOptionType[ApplicationCommandOptionType["User"] = 6] = "User"; ApplicationCommandOptionType[ApplicationCommandOptionType["Channel"] = 7] = "Channel"; ApplicationCommandOptionType[ApplicationCommandOptionType["Role"] = 8] = "Role"; ApplicationCommandOptionType[ApplicationCommandOptionType["Mentionable"] = 9] = "Mentionable"; ApplicationCommandOptionType[ApplicationCommandOptionType["Number"] = 10] = "Number"; ApplicationCommandOptionType[ApplicationCommandOptionType["Attachment"] = 11] = "Attachment"; })(ApplicationCommandOptionType || (exports.ApplicationCommandOptionType = ApplicationCommandOptionType = {})); //# sourceMappingURL=shared.js.map discord-api-types/payloads/v10/_interactions/_applicationCommands/_chatInput/channel.d.ts 0000664 00000001225 15114741631 0030216 0 ustar 00 node_modules import type { Snowflake } from '../../../../../globals'; import type { ChannelType } from '../../../channel'; import type { APIApplicationCommandOptionBase, APIInteractionDataOptionBase } from './base'; import type { ApplicationCommandOptionType } from './shared'; export interface APIApplicationCommandChannelOption extends APIApplicationCommandOptionBase<ApplicationCommandOptionType.Channel> { channel_types?: Exclude<ChannelType, ChannelType.DM | ChannelType.GroupDM>[]; } export type APIApplicationCommandInteractionDataChannelOption = APIInteractionDataOptionBase<ApplicationCommandOptionType.Channel, Snowflake>; //# sourceMappingURL=channel.d.ts.map discord-api-types/payloads/v10/_interactions/_applicationCommands/_chatInput/subcommandGroup.js.map 0000664 00000000163 15114741631 0032273 0 ustar 00 node_modules {"version":3,"file":"subcommandGroup.js","sourceRoot":"","sources":["subcommandGroup.ts"],"names":[],"mappings":""} payloads/v10/_interactions/_applicationCommands/_chatInput/subcommandGroup.d.ts.map 0000664 00000001125 15114741631 0032526 0 ustar 00 node_modules/discord-api-types {"version":3,"file":"subcommandGroup.d.ts","sourceRoot":"","sources":["subcommandGroup.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AACvD,OAAO,KAAK,EAAE,+BAA+B,EAAE,MAAM,QAAQ,CAAC;AAC9D,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,UAAU,CAAC;AAC7D,OAAO,KAAK,EACX,oDAAoD,EACpD,qCAAqC,EACrC,MAAM,cAAc,CAAC;AAEtB,MAAM,WAAW,0CAChB,SAAQ,+BAA+B,CAAC,4BAA4B,CAAC,eAAe,CAAC;IACrF,OAAO,CAAC,EAAE,qCAAqC,EAAE,CAAC;CAClD;AAED,MAAM,WAAW,yDAAyD,CACzE,IAAI,SAAS,eAAe,GAAG,eAAe;IAE9C,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,4BAA4B,CAAC,eAAe,CAAC;IACnD,OAAO,EAAE,oDAAoD,CAAC,IAAI,CAAC,EAAE,CAAC;CACtE"} discord-api-types/payloads/v10/_interactions/_applicationCommands/_chatInput/role.d.ts.map 0000664 00000000613 15114741631 0030323 0 ustar 00 node_modules {"version":3,"file":"role.d.ts","sourceRoot":"","sources":["role.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AACxD,OAAO,KAAK,EAAE,+BAA+B,EAAE,4BAA4B,EAAE,MAAM,QAAQ,CAAC;AAC5F,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,UAAU,CAAC;AAE7D,MAAM,MAAM,+BAA+B,GAAG,+BAA+B,CAAC,4BAA4B,CAAC,IAAI,CAAC,CAAC;AAEjH,MAAM,MAAM,8CAA8C,GAAG,4BAA4B,CACxF,4BAA4B,CAAC,IAAI,EACjC,SAAS,CACT,CAAC"} node_modules/discord-api-types/payloads/v10/_interactions/_applicationCommands/internals.d.ts.map 0000664 00000000546 15114741631 0027347 0 ustar 00 {"version":3,"file":"internals.d.ts","sourceRoot":"","sources":["internals.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AACrD,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,wBAAwB,CAAC;AAErE,MAAM,WAAW,wCAAwC,CAAC,IAAI,SAAS,sBAAsB;IAC5F,EAAE,EAAE,SAAS,CAAC;IACd,IAAI,EAAE,IAAI,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,CAAC,EAAE,SAAS,CAAC;CACrB"} node_modules/discord-api-types/payloads/v10/_interactions/_applicationCommands/contextMenu.d.ts 0000664 00000007460 15114741631 0027107 0 ustar 00 import type { Snowflake } from '../../../../globals'; import type { APIMessage } from '../../channel'; import type { APIApplicationCommandInteractionWrapper, ApplicationCommandType } from '../applicationCommands'; import type { APIDMInteractionWrapper, APIGuildInteractionWrapper, APIUserInteractionDataResolved } from '../base'; import type { APIBaseApplicationCommandInteractionData } from './internals'; /** * @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object-interaction-data} */ export interface APIUserApplicationCommandInteractionData extends APIBaseApplicationCommandInteractionData<ApplicationCommandType.User> { target_id: Snowflake; resolved: APIUserInteractionDataResolved; } /** * @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object-interaction-data} */ export interface APIMessageApplicationCommandInteractionData extends APIBaseApplicationCommandInteractionData<ApplicationCommandType.Message> { target_id: Snowflake; resolved: APIMessageApplicationCommandInteractionDataResolved; } /** * @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object-resolved-data-structure} */ export interface APIMessageApplicationCommandInteractionDataResolved { messages: Record<Snowflake, APIMessage>; } /** * @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object-interaction-data} */ export type APIContextMenuInteractionData = APIMessageApplicationCommandInteractionData | APIUserApplicationCommandInteractionData; /** * @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object} */ export type APIUserApplicationCommandInteraction = APIApplicationCommandInteractionWrapper<APIUserApplicationCommandInteractionData>; /** * @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object} */ export type APIUserApplicationCommandDMInteraction = APIDMInteractionWrapper<APIUserApplicationCommandInteraction>; /** * @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object} */ export type APIUserApplicationCommandGuildInteraction = APIGuildInteractionWrapper<APIUserApplicationCommandInteraction>; /** * @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object} */ export type APIMessageApplicationCommandInteraction = APIApplicationCommandInteractionWrapper<APIMessageApplicationCommandInteractionData>; /** * @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object} */ export type APIMessageApplicationCommandDMInteraction = APIDMInteractionWrapper<APIMessageApplicationCommandInteraction>; /** * @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object} */ export type APIMessageApplicationCommandGuildInteraction = APIGuildInteractionWrapper<APIMessageApplicationCommandInteraction>; /** * @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object} */ export type APIContextMenuInteraction = APIMessageApplicationCommandInteraction | APIUserApplicationCommandInteraction; /** * @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object} */ export type APIContextMenuDMInteraction = APIMessageApplicationCommandDMInteraction | APIUserApplicationCommandDMInteraction; /** * @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object} */ export type APIContextMenuGuildInteraction = APIMessageApplicationCommandGuildInteraction | APIUserApplicationCommandGuildInteraction; //# sourceMappingURL=contextMenu.d.ts.map node_modules/discord-api-types/payloads/v10/_interactions/_applicationCommands/permissions.d.ts 0000664 00000003551 15114741631 0027146 0 ustar 00 import type { Snowflake } from '../../../../globals'; /** * @see {@link https://discord.com/developers/docs/interactions/application-commands#application-command-permissions-object-guild-application-command-permissions-structure} */ export interface APIGuildApplicationCommandPermissions { /** * The id of the command or the application id if that permission applies to all commands */ id: Snowflake; /** * The id of the application the command belongs to */ application_id: Snowflake; /** * The id of the guild */ guild_id: Snowflake; /** * The permissions for the command in the guild */ permissions: APIApplicationCommandPermission[]; } /** * @see {@link https://discord.com/developers/docs/interactions/application-commands#application-command-permissions-object-application-command-permissions-structure} */ export interface APIApplicationCommandPermission { /** * The id of the role, user or channel. Can also be a permission constant */ id: Snowflake; /** * Role, user or channel */ type: ApplicationCommandPermissionType; /** * `true` to allow, `false`, to disallow */ permission: boolean; } /** * @see {@link https://discord.com/developers/docs/interactions/application-commands#application-command-permissions-object-application-command-permission-type} */ export declare enum ApplicationCommandPermissionType { Role = 1, User = 2, Channel = 3 } /** * @see {@link https://discord.com/developers/docs/interactions/application-commands#application-command-permissions-object-application-command-permissions-constants} */ export declare const APIApplicationCommandPermissionsConstant: { Everyone: (guildId: bigint | string) => Snowflake; AllChannels: (guildId: bigint | string) => Snowflake; }; //# sourceMappingURL=permissions.d.ts.map node_modules/discord-api-types/payloads/v10/_interactions/_applicationCommands/internals.js.map 0000664 00000000147 15114741631 0027110 0 ustar 00 {"version":3,"file":"internals.js","sourceRoot":"","sources":["internals.ts"],"names":[],"mappings":""} node_modules/discord-api-types/payloads/v10/_interactions/_applicationCommands/chatInput.js 0000664 00000001521 15114741631 0026271 0 ustar 00 "use strict"; var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { if (k2 === undefined) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { return m[k]; } }; } Object.defineProperty(o, k2, desc); }) : (function(o, m, k, k2) { if (k2 === undefined) k2 = k; o[k2] = m[k]; })); var __exportStar = (this && this.__exportStar) || function(m, exports) { for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); }; Object.defineProperty(exports, "__esModule", { value: true }); __exportStar(require("./_chatInput/shared"), exports); //# sourceMappingURL=chatInput.js.map node_modules/discord-api-types/payloads/v10/_interactions/_applicationCommands/permissions.d.ts.map 0000664 00000001260 15114741631 0027715 0 ustar 00 {"version":3,"file":"permissions.d.ts","sourceRoot":"","sources":["permissions.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAErD;;GAEG;AACH,MAAM,WAAW,qCAAqC;IACrD;;OAEG;IACH,EAAE,EAAE,SAAS,CAAC;IACd;;OAEG;IACH,cAAc,EAAE,SAAS,CAAC;IAC1B;;OAEG;IACH,QAAQ,EAAE,SAAS,CAAC;IACpB;;OAEG;IACH,WAAW,EAAE,+BAA+B,EAAE,CAAC;CAC/C;AAED;;GAEG;AACH,MAAM,WAAW,+BAA+B;IAC/C;;OAEG;IACH,EAAE,EAAE,SAAS,CAAC;IACd;;OAEG;IACH,IAAI,EAAE,gCAAgC,CAAC;IACvC;;OAEG;IACH,UAAU,EAAE,OAAO,CAAC;CACpB;AAED;;GAEG;AACH,oBAAY,gCAAgC;IAC3C,IAAI,IAAI;IACR,IAAI,IAAA;IACJ,OAAO,IAAA;CACP;AAED;;GAEG;AACH,eAAO,MAAM,wCAAwC;wBAEhC,MAAM,GAAG,MAAM,KAAG,SAAS;2BACxB,MAAM,GAAG,MAAM,KAAG,SAAS;CAClD,CAAC"} node_modules/discord-api-types/payloads/v10/_interactions/_applicationCommands/contextMenu.js.map 0000664 00000000153 15114741631 0027417 0 ustar 00 {"version":3,"file":"contextMenu.js","sourceRoot":"","sources":["contextMenu.ts"],"names":[],"mappings":""} node_modules/discord-api-types/payloads/v10/_interactions/base.js.map 0000664 00000000135 15114741631 0021674 0 ustar 00 {"version":3,"file":"base.js","sourceRoot":"","sources":["base.ts"],"names":[],"mappings":""} node_modules/discord-api-types/payloads/v10/_interactions/autocomplete.js 0000664 00000000165 15114741631 0022712 0 ustar 00 "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); //# sourceMappingURL=autocomplete.js.map node_modules/discord-api-types/payloads/v10/_interactions/ping.d.ts 0000664 00000000352 15114741631 0021400 0 ustar 00 import type { APIBaseInteraction } from './base'; import type { InteractionType } from './responses'; export type APIPingInteraction = Omit<APIBaseInteraction<InteractionType.Ping, never>, 'locale'>; //# sourceMappingURL=ping.d.ts.map node_modules/discord-api-types/payloads/v10/_interactions/base.d.ts 0000664 00000021247 15114741631 0021363 0 ustar 00 import type { Permissions, Snowflake } from '../../../globals'; import type { APIRole, ApplicationIntegrationType, InteractionContextType, Locale } from '../../../v10'; import type { APIAttachment, APIChannel, APIMessage, APIPartialChannel, APIThreadChannel, ChannelType, ThreadChannelType } from '../channel'; import type { APIBaseGuildMember, APIFlaggedGuildMember, APIGuildMember, APIGuildMemberAvatar, APIGuildMemberJoined, APIPartialInteractionGuild } from '../guild'; import type { APIEntitlement } from '../monetization'; import type { APIUser } from '../user'; import type { InteractionType } from './responses'; /** * @see {@link https://discord.com/developers/docs/resources/channel#message-interaction-metadata-object} */ export type APIMessageInteractionMetadata = APIApplicationCommandInteractionMetadata | APIMessageComponentInteractionMetadata | APIModalSubmitInteractionMetadata; export interface APIBaseInteractionMetadata<Type extends InteractionType> { /** * ID of the interaction */ id: Snowflake; /** * Type of interaction */ type: Type; /** * User who triggered the interaction */ user: APIUser; /** * IDs for installation context(s) related to an interaction */ authorizing_integration_owners: APIAuthorizingIntegrationOwnersMap; /** * ID of the original response message, present only on follow-up messages */ original_response_message_id?: Snowflake; } /** * @see {@link https://discord.com/developers/docs/resources/message#message-interaction-metadata-object-application-command-interaction-metadata-structure} */ export interface APIApplicationCommandInteractionMetadata extends APIBaseInteractionMetadata<InteractionType.ApplicationCommand> { /** * The user the command was run on, present only on user commands interactions */ target_user?: APIUser; /** * The ID of the message the command was run on, present only on message command interactions. * The original response message will also have `message_reference` and `referenced_message` pointing to this message. */ target_message_id?: Snowflake; } /** * @see {@link https://discord.com/developers/docs/resources/message#message-interaction-metadata-object-message-command-interaction-metadata-structure} */ export interface APIMessageComponentInteractionMetadata extends APIBaseInteractionMetadata<InteractionType.MessageComponent> { /** * ID of the message that contained the interactive component */ interacted_message_id: Snowflake; } /** * @see {@link https://discord.com/developers/docs/resources/message#message-interaction-metadata-object-modal-submit-interaction-metadata-structure} */ export interface APIModalSubmitInteractionMetadata extends APIBaseInteractionMetadata<InteractionType.ModalSubmit> { /** * Metadata for the interaction that was used to open the modal */ triggering_interaction_metadata: APIApplicationCommandInteractionMetadata | APIMessageComponentInteractionMetadata; } export type PartialAPIMessageInteractionGuildMember = Pick<APIGuildMember, 'avatar' | 'communication_disabled_until' | 'deaf' | 'joined_at' | 'mute' | 'nick' | 'pending' | 'premium_since' | 'roles'>; /** * @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#message-interaction-object} */ export interface APIMessageInteraction { /** * ID of the interaction */ id: Snowflake; /** * The type of interaction */ type: InteractionType; /** * The name of the application command, including subcommands and subcommand groups */ name: string; /** * The user who invoked the interaction */ user: APIUser; /** * The guild member who invoked the interaction, only sent in MESSAGE_CREATE events */ member?: PartialAPIMessageInteractionGuildMember; } /** * @see {@link https://discord.com/developers/docs/resources/guild#guild-member-object} */ export interface APIInteractionGuildMember extends APIGuildMember { permissions: Permissions; user: APIUser; } /** * @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object} */ export interface APIBaseInteraction<Type extends InteractionType, Data> { /** * ID of the interaction */ id: Snowflake; /** * ID of the application this interaction is for */ application_id: Snowflake; /** * The type of interaction */ type: Type; /** * The command data payload */ data?: Data; /** * Guild that the interaction was sent from */ guild?: APIPartialInteractionGuild; /** * Guild that the interaction was sent from */ guild_id?: Snowflake; /** * The channel it was sent from */ channel?: Partial<APIChannel> & Pick<APIChannel, 'id' | 'type'>; /** * The id of the channel it was sent from * * @deprecated Use {@link APIBaseInteraction.channel} instead */ channel_id?: Snowflake; /** * Guild member data for the invoking user, including permissions * * **This is only sent when an interaction is invoked in a guild** */ member?: APIInteractionGuildMember; /** * User object for the invoking user, if invoked in a DM */ user?: APIUser; /** * A continuation token for responding to the interaction */ token: string; /** * Read-only property, always `1` */ version: 1; /** * For components, the message they were attached to */ message?: APIMessage; /** * Bitwise set of permissions the app or bot has within the channel the interaction was sent from */ app_permissions: Permissions; /** * The selected language of the invoking user */ locale: Locale; /** * The guild's preferred locale, if invoked in a guild */ guild_locale?: Locale; /** * For monetized apps, any entitlements for the invoking user, representing access to premium SKUs */ entitlements: APIEntitlement[]; /** * Mapping of installation contexts that the interaction was authorized for to related user or guild IDs. */ authorizing_integration_owners: APIAuthorizingIntegrationOwnersMap; /** * Context where the interaction was triggered from */ context?: InteractionContextType; /** * Attachment size limit in bytes */ attachment_size_limit: number; } export type APIAuthorizingIntegrationOwnersMap = { [key in ApplicationIntegrationType]?: Snowflake; }; export type APIDMInteractionWrapper<Original extends APIBaseInteraction<InteractionType, unknown>> = Omit<Original, 'guild_id' | 'member'> & Required<Pick<Original, 'user'>>; export type APIGuildInteractionWrapper<Original extends APIBaseInteraction<InteractionType, unknown>> = Omit<Original, 'user'> & Required<Pick<Original, 'guild_id' | 'member'>>; export interface APIInteractionDataResolvedChannelBase<T extends ChannelType> extends Required<APIPartialChannel> { type: T; permissions: Permissions; } /** * @see {@link https://discord.com/developers/docs/resources/channel#channel-object} */ export type APIInteractionDataResolvedChannel = APIInteractionDataResolvedChannelBase<Exclude<ChannelType, ThreadChannelType>> | (APIInteractionDataResolvedChannelBase<ThreadChannelType> & Pick<APIThreadChannel, 'parent_id' | 'thread_metadata'>); /** * @see {@link https://discord.com/developers/docs/resources/guild#guild-member-object} */ export interface APIInteractionDataResolvedGuildMember extends APIBaseGuildMember, APIFlaggedGuildMember, APIGuildMemberAvatar, APIGuildMemberJoined { permissions: Permissions; } /** * @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object-resolved-data-structure} */ export interface APIInteractionDataResolved { users?: Record<Snowflake, APIUser>; roles?: Record<Snowflake, APIRole>; members?: Record<Snowflake, APIInteractionDataResolvedGuildMember>; channels?: Record<Snowflake, APIInteractionDataResolvedChannel>; attachments?: Record<Snowflake, APIAttachment>; } /** * @deprecated Renamed to `APIInteractionDataResolved` */ export type APIChatInputApplicationCommandInteractionDataResolved = APIInteractionDataResolved; /** * `users` and optional `members` from APIInteractionDataResolved, for user commands and user selects */ export type APIUserInteractionDataResolved = Pick<APIInteractionDataResolved, 'members'> & Required<Pick<APIInteractionDataResolved, 'users'>>; /** * @deprecated Renamed to `APIUserInteractionDataResolved` */ export type APIUserApplicationCommandInteractionDataResolved = APIUserInteractionDataResolved; //# sourceMappingURL=base.d.ts.map node_modules/discord-api-types/payloads/v10/_interactions/applicationCommands.js 0000664 00000010331 15114741631 0024172 0 ustar 00 "use strict"; var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { if (k2 === undefined) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { return m[k]; } }; } Object.defineProperty(o, k2, desc); }) : (function(o, m, k, k2) { if (k2 === undefined) k2 = k; o[k2] = m[k]; })); var __exportStar = (this && this.__exportStar) || function(m, exports) { for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); }; Object.defineProperty(exports, "__esModule", { value: true }); exports.EntryPointCommandHandlerType = exports.InteractionContextType = exports.ApplicationIntegrationType = exports.ApplicationCommandType = void 0; __exportStar(require("./_applicationCommands/chatInput"), exports); __exportStar(require("./_applicationCommands/permissions"), exports); /** * @see {@link https://discord.com/developers/docs/interactions/application-commands#application-command-object-application-command-types} */ var ApplicationCommandType; (function (ApplicationCommandType) { /** * Slash commands; a text-based command that shows up when a user types `/` */ ApplicationCommandType[ApplicationCommandType["ChatInput"] = 1] = "ChatInput"; /** * A UI-based command that shows up when you right click or tap on a user */ ApplicationCommandType[ApplicationCommandType["User"] = 2] = "User"; /** * A UI-based command that shows up when you right click or tap on a message */ ApplicationCommandType[ApplicationCommandType["Message"] = 3] = "Message"; /** * A UI-based command that represents the primary way to invoke an app's Activity */ ApplicationCommandType[ApplicationCommandType["PrimaryEntryPoint"] = 4] = "PrimaryEntryPoint"; })(ApplicationCommandType || (exports.ApplicationCommandType = ApplicationCommandType = {})); /** * @see {@link https://discord.com/developers/docs/resources/application#application-object-application-integration-types} */ var ApplicationIntegrationType; (function (ApplicationIntegrationType) { /** * App is installable to servers */ ApplicationIntegrationType[ApplicationIntegrationType["GuildInstall"] = 0] = "GuildInstall"; /** * App is installable to users */ ApplicationIntegrationType[ApplicationIntegrationType["UserInstall"] = 1] = "UserInstall"; })(ApplicationIntegrationType || (exports.ApplicationIntegrationType = ApplicationIntegrationType = {})); /** * @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object-interaction-context-types} */ var InteractionContextType; (function (InteractionContextType) { /** * Interaction can be used within servers */ InteractionContextType[InteractionContextType["Guild"] = 0] = "Guild"; /** * Interaction can be used within DMs with the app's bot user */ InteractionContextType[InteractionContextType["BotDM"] = 1] = "BotDM"; /** * Interaction can be used within Group DMs and DMs other than the app's bot user */ InteractionContextType[InteractionContextType["PrivateChannel"] = 2] = "PrivateChannel"; })(InteractionContextType || (exports.InteractionContextType = InteractionContextType = {})); /** * @see {@link https://discord.com/developers/docs/interactions/application-commands#application-command-object-entry-point-command-handler-types} */ var EntryPointCommandHandlerType; (function (EntryPointCommandHandlerType) { /** * The app handles the interaction using an interaction token */ EntryPointCommandHandlerType[EntryPointCommandHandlerType["AppHandler"] = 1] = "AppHandler"; /** * Discord handles the interaction by launching an Activity and sending a follow-up message without coordinating with * the app */ EntryPointCommandHandlerType[EntryPointCommandHandlerType["DiscordLaunchActivity"] = 2] = "DiscordLaunchActivity"; })(EntryPointCommandHandlerType || (exports.EntryPointCommandHandlerType = EntryPointCommandHandlerType = {})); //# sourceMappingURL=applicationCommands.js.map node_modules/discord-api-types/payloads/v10/_interactions/applicationCommands.js.map 0000664 00000001465 15114741631 0024756 0 ustar 00 {"version":3,"file":"applicationCommands.js","sourceRoot":"","sources":["applicationCommands.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAwBA,mEAAiD;AAEjD,qEAAmD;AAqGnD;;GAEG;AACH,IAAY,sBAiBX;AAjBD,WAAY,sBAAsB;IACjC;;OAEG;IACH,6EAAa,CAAA;IACb;;OAEG;IACH,mEAAI,CAAA;IACJ;;OAEG;IACH,yEAAO,CAAA;IACP;;OAEG;IACH,6FAAiB,CAAA;AAClB,CAAC,EAjBW,sBAAsB,sCAAtB,sBAAsB,QAiBjC;AAED;;GAEG;AACH,IAAY,0BASX;AATD,WAAY,0BAA0B;IACrC;;OAEG;IACH,2FAAY,CAAA;IACZ;;OAEG;IACH,yFAAW,CAAA;AACZ,CAAC,EATW,0BAA0B,0CAA1B,0BAA0B,QASrC;AAED;;GAEG;AACH,IAAY,sBAaX;AAbD,WAAY,sBAAsB;IACjC;;OAEG;IACH,qEAAK,CAAA;IACL;;OAEG;IACH,qEAAK,CAAA;IACL;;OAEG;IACH,uFAAc,CAAA;AACf,CAAC,EAbW,sBAAsB,sCAAtB,sBAAsB,QAajC;AAED;;GAEG;AACH,IAAY,4BAUX;AAVD,WAAY,4BAA4B;IACvC;;OAEG;IACH,2FAAc,CAAA;IACd;;;OAGG;IACH,iHAAqB,CAAA;AACtB,CAAC,EAVW,4BAA4B,4CAA5B,4BAA4B,QAUvC"} node_modules/discord-api-types/payloads/v10/_interactions/applicationCommands.d.ts 0000664 00000017434 15114741631 0024441 0 ustar 00 import type { Permissions, Snowflake } from '../../../globals'; import type { LocalizationMap } from '../../../v10'; import type { APIApplicationCommandOption, APIChatInputApplicationCommandDMInteraction, APIChatInputApplicationCommandGuildInteraction, APIChatInputApplicationCommandInteraction, APIChatInputApplicationCommandInteractionData } from './_applicationCommands/chatInput'; import type { APIContextMenuDMInteraction, APIContextMenuGuildInteraction, APIContextMenuInteraction, APIContextMenuInteractionData } from './_applicationCommands/contextMenu'; import type { APIPrimaryEntryPointCommandDMInteraction, APIPrimaryEntryPointCommandGuildInteraction, APIPrimaryEntryPointCommandInteraction, APIPrimaryEntryPointCommandInteractionData } from './_applicationCommands/entryPoint'; import type { APIBaseInteraction } from './base'; import type { InteractionType } from './responses'; export * from './_applicationCommands/chatInput'; export type * from './_applicationCommands/contextMenu'; export * from './_applicationCommands/permissions'; export type * from './_applicationCommands/entryPoint'; export type * from './_applicationCommands/internals'; /** * @see {@link https://discord.com/developers/docs/interactions/application-commands#application-command-object} */ export interface APIApplicationCommand { /** * Unique id of the command */ id: Snowflake; /** * Type of the command */ type: ApplicationCommandType; /** * Unique id of the parent application */ application_id: Snowflake; /** * Guild id of the command, if not global */ guild_id?: Snowflake; /** * 1-32 character name; `CHAT_INPUT` command names must be all lowercase matching `^[-_\p{L}\p{N}\p{sc=Deva}\p{sc=Thai}]{1,32}$` */ name: string; /** * Localization dictionary for the name field. Values follow the same restrictions as name */ name_localizations?: LocalizationMap | null; /** * The localized name */ name_localized?: string; /** * 1-100 character description for `CHAT_INPUT` commands, empty string for `USER` and `MESSAGE` commands */ description: string; /** * Localization dictionary for the description field. Values follow the same restrictions as description */ description_localizations?: LocalizationMap | null; /** * The localized description */ description_localized?: string; /** * The parameters for the `CHAT_INPUT` command, max 25 */ options?: APIApplicationCommandOption[]; /** * Set of permissions represented as a bitset */ default_member_permissions: Permissions | null; /** * Indicates whether the command is available in DMs with the app, only for globally-scoped commands. By default, commands are visible * * @deprecated Use {@link APIApplicationCommand.contexts} instead */ dm_permission?: boolean; /** * Whether the command is enabled by default when the app is added to a guild * * If missing, this property should be assumed as `true` * * @deprecated Use {@link APIApplicationCommand.dm_permission} and/or {@link APIApplicationCommand.default_member_permissions} instead */ default_permission?: boolean; /** * Indicates whether the command is age-restricted * * @defaultValue `false` */ nsfw?: boolean; /** * Installation context(s) where the command is available, only for globally-scoped commands * * @defaultValue `[ApplicationIntegrationType.GuildInstall]` */ integration_types?: ApplicationIntegrationType[]; /** * Interaction context(s) where the command can be used, only for globally-scoped commands * * @defaultValue `[InteractionContextType.Guild, InteractionContextType.BotDM, InteractionContextType.PrivateChannel]` */ contexts?: InteractionContextType[] | null; /** * Autoincrementing version identifier updated during substantial record changes */ version: Snowflake; /** * Determines whether the interaction is handled by the app's interactions handler or by Discord * * @remarks * This is only available for {@link ApplicationCommandType.PrimaryEntryPoint} commands */ handler?: EntryPointCommandHandlerType; } /** * @see {@link https://discord.com/developers/docs/interactions/application-commands#application-command-object-application-command-types} */ export declare enum ApplicationCommandType { /** * Slash commands; a text-based command that shows up when a user types `/` */ ChatInput = 1, /** * A UI-based command that shows up when you right click or tap on a user */ User = 2, /** * A UI-based command that shows up when you right click or tap on a message */ Message = 3, /** * A UI-based command that represents the primary way to invoke an app's Activity */ PrimaryEntryPoint = 4 } /** * @see {@link https://discord.com/developers/docs/resources/application#application-object-application-integration-types} */ export declare enum ApplicationIntegrationType { /** * App is installable to servers */ GuildInstall = 0, /** * App is installable to users */ UserInstall = 1 } /** * @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object-interaction-context-types} */ export declare enum InteractionContextType { /** * Interaction can be used within servers */ Guild = 0, /** * Interaction can be used within DMs with the app's bot user */ BotDM = 1, /** * Interaction can be used within Group DMs and DMs other than the app's bot user */ PrivateChannel = 2 } /** * @see {@link https://discord.com/developers/docs/interactions/application-commands#application-command-object-entry-point-command-handler-types} */ export declare enum EntryPointCommandHandlerType { /** * The app handles the interaction using an interaction token */ AppHandler = 1, /** * Discord handles the interaction by launching an Activity and sending a follow-up message without coordinating with * the app */ DiscordLaunchActivity = 2 } /** * @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object-interaction-data} */ export type APIApplicationCommandInteractionData = APIChatInputApplicationCommandInteractionData | APIContextMenuInteractionData | APIPrimaryEntryPointCommandInteractionData; /** * @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object} */ export type APIApplicationCommandInteractionWrapper<Data extends APIApplicationCommandInteractionData> = APIBaseInteraction<InteractionType.ApplicationCommand, Data> & Required<Pick<APIBaseInteraction<InteractionType.ApplicationCommand, Data>, 'app_permissions' | 'channel_id' | 'channel' | 'data'>>; /** * @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object} */ export type APIApplicationCommandInteraction = APIChatInputApplicationCommandInteraction | APIContextMenuInteraction | APIPrimaryEntryPointCommandInteraction; /** * @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object} */ export type APIApplicationCommandDMInteraction = APIChatInputApplicationCommandDMInteraction | APIContextMenuDMInteraction | APIPrimaryEntryPointCommandDMInteraction; /** * @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object} */ export type APIApplicationCommandGuildInteraction = APIChatInputApplicationCommandGuildInteraction | APIContextMenuGuildInteraction | APIPrimaryEntryPointCommandGuildInteraction; //# sourceMappingURL=applicationCommands.d.ts.map node_modules/discord-api-types/payloads/v10/_interactions/modalSubmit.js 0000664 00000000164 15114741631 0022470 0 ustar 00 "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); //# sourceMappingURL=modalSubmit.js.map node_modules/discord-api-types/payloads/v10/_interactions/modalSubmit.js.map 0000664 00000000153 15114741631 0023242 0 ustar 00 {"version":3,"file":"modalSubmit.js","sourceRoot":"","sources":["modalSubmit.ts"],"names":[],"mappings":""} node_modules/discord-api-types/payloads/v10/_interactions/responses.js 0000664 00000006041 15114741631 0022231 0 ustar 00 "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.InteractionResponseType = exports.InteractionType = void 0; /** * @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object-interaction-type} */ var InteractionType; (function (InteractionType) { InteractionType[InteractionType["Ping"] = 1] = "Ping"; InteractionType[InteractionType["ApplicationCommand"] = 2] = "ApplicationCommand"; InteractionType[InteractionType["MessageComponent"] = 3] = "MessageComponent"; InteractionType[InteractionType["ApplicationCommandAutocomplete"] = 4] = "ApplicationCommandAutocomplete"; InteractionType[InteractionType["ModalSubmit"] = 5] = "ModalSubmit"; })(InteractionType || (exports.InteractionType = InteractionType = {})); /** * @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-response-object-interaction-callback-type} */ var InteractionResponseType; (function (InteractionResponseType) { /** * ACK a `Ping` */ InteractionResponseType[InteractionResponseType["Pong"] = 1] = "Pong"; /** * Respond to an interaction with a message */ InteractionResponseType[InteractionResponseType["ChannelMessageWithSource"] = 4] = "ChannelMessageWithSource"; /** * ACK an interaction and edit to a response later, the user sees a loading state */ InteractionResponseType[InteractionResponseType["DeferredChannelMessageWithSource"] = 5] = "DeferredChannelMessageWithSource"; /** * ACK a button interaction and update it to a loading state */ InteractionResponseType[InteractionResponseType["DeferredMessageUpdate"] = 6] = "DeferredMessageUpdate"; /** * ACK a button interaction and edit the message to which the button was attached */ InteractionResponseType[InteractionResponseType["UpdateMessage"] = 7] = "UpdateMessage"; /** * For autocomplete interactions */ InteractionResponseType[InteractionResponseType["ApplicationCommandAutocompleteResult"] = 8] = "ApplicationCommandAutocompleteResult"; /** * Respond to an interaction with an modal for a user to fill-out */ InteractionResponseType[InteractionResponseType["Modal"] = 9] = "Modal"; /** * Respond to an interaction with an upgrade button, only available for apps with monetization enabled * * @deprecated Send a button with Premium type instead. * {@link https://discord.com/developers/docs/change-log#premium-apps-new-premium-button-style-deep-linking-url-schemes | Learn more here} */ InteractionResponseType[InteractionResponseType["PremiumRequired"] = 10] = "PremiumRequired"; /** * Launch the Activity associated with the app. * * @remarks * Only available for apps with Activities enabled */ InteractionResponseType[InteractionResponseType["LaunchActivity"] = 12] = "LaunchActivity"; })(InteractionResponseType || (exports.InteractionResponseType = InteractionResponseType = {})); //# sourceMappingURL=responses.js.map node_modules/discord-api-types/payloads/v10/_interactions/responses.d.ts.map 0000664 00000003605 15114741631 0023244 0 ustar 00 {"version":3,"file":"responses.d.ts","sourceRoot":"","sources":["responses.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mCAAmC,EAAE,MAAM,cAAc,CAAC;AACxE,OAAO,KAAK,EAAE,qBAAqB,EAAE,4BAA4B,EAAE,MAAM,YAAY,CAAC;AACtF,OAAO,KAAK,EAAE,iCAAiC,EAAE,MAAM,uBAAuB,CAAC;AAE/E;;GAEG;AACH,oBAAY,eAAe;IAC1B,IAAI,IAAI;IACR,kBAAkB,IAAA;IAClB,gBAAgB,IAAA;IAChB,8BAA8B,IAAA;IAC9B,WAAW,IAAA;CACX;AAED;;GAEG;AACH,MAAM,MAAM,sBAAsB,GAC/B,yCAAyC,GACzC,8CAA8C,GAC9C,sDAAsD,GACtD,2CAA2C,GAC3C,oCAAoC,GACpC,0BAA0B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IACH,eAAe,KAAA;IAEf;;;;;OAKG;IACH,cAAc,KAAK;CACnB;AAED;;GAEG;AACH,MAAM,MAAM,kCAAkC,GAAG,IAAI,CAAC,mCAAmC,EAAE,YAAY,GAAG,UAAU,CAAC,CAAC;AAEtH,MAAM,WAAW,qDAAqD;IACrE,OAAO,CAAC,EAAE,iCAAiC,EAAE,CAAC;CAC9C;AAED;;GAEG;AACH,MAAM,WAAW,uCAAuC;IACvD;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;IAClB;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,UAAU,EAAE,qBAAqB,CAAC,4BAA4B,CAAC,EAAE,CAAC;CAClE"} node_modules/discord-api-types/payloads/v10/_interactions/modalSubmit.d.ts.map 0000664 00000001567 15114741631 0023510 0 ustar 00 {"version":3,"file":"modalSubmit.d.ts","sourceRoot":"","sources":["modalSubmit.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AACnD,OAAO,KAAK,EACX,kBAAkB,EAClB,uBAAuB,EACvB,0BAA0B,EAC1B,aAAa,EACb,eAAe,EACf,MAAM,UAAU,CAAC;AAElB,MAAM,WAAW,oBAAoB;IACpC,IAAI,EAAE,aAAa,CAAC;IACpB,SAAS,EAAE,MAAM,CAAC;IAClB,KAAK,EAAE,MAAM,CAAC;CACd;AAED,MAAM,WAAW,6BAA8B,SAAQ,gBAAgB,CAAC,aAAa,CAAC,SAAS,CAAC;IAC/F,UAAU,EAAE,oBAAoB,EAAE,CAAC;CACnC;AAED;;GAEG;AACH,MAAM,WAAW,kBAAkB;IAClC;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;IAClB;;OAEG;IACH,UAAU,EAAE,6BAA6B,EAAE,CAAC;CAC5C;AAED;;GAEG;AACH,MAAM,MAAM,yBAAyB,GAAG,kBAAkB,CAAC,eAAe,CAAC,WAAW,EAAE,kBAAkB,CAAC,GAC1G,QAAQ,CAAC,IAAI,CAAC,kBAAkB,CAAC,eAAe,CAAC,WAAW,EAAE,kBAAkB,CAAC,EAAE,MAAM,CAAC,CAAC,CAAC;AAE7F;;GAEG;AACH,MAAM,MAAM,2BAA2B,GAAG,uBAAuB,CAAC,yBAAyB,CAAC,CAAC;AAE7F;;GAEG;AACH,MAAM,MAAM,8BAA8B,GAAG,0BAA0B,CAAC,yBAAyB,CAAC,CAAC"} node_modules/discord-api-types/payloads/v10/_interactions/messageComponents.js.map 0000664 00000000167 15114741631 0024461 0 ustar 00 {"version":3,"file":"messageComponents.js","sourceRoot":"","sources":["messageComponents.ts"],"names":[],"mappings":""} node_modules/discord-api-types/payloads/v10/_interactions/ping.d.ts.map 0000664 00000000437 15114741631 0022160 0 ustar 00 {"version":3,"file":"ping.d.ts","sourceRoot":"","sources":["ping.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,QAAQ,CAAC;AACjD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAEnD,MAAM,MAAM,kBAAkB,GAAG,IAAI,CAAC,kBAAkB,CAAC,eAAe,CAAC,IAAI,EAAE,KAAK,CAAC,EAAE,QAAQ,CAAC,CAAC"} node_modules/discord-api-types/payloads/v10/_interactions/autocomplete.js.map 0000664 00000000155 15114741631 0023465 0 ustar 00 {"version":3,"file":"autocomplete.js","sourceRoot":"","sources":["autocomplete.ts"],"names":[],"mappings":""} node_modules/discord-api-types/payloads/v10/_interactions/base.js 0000664 00000000155 15114741631 0021122 0 ustar 00 "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); //# sourceMappingURL=base.js.map node_modules/discord-api-types/payloads/v10/_interactions/messageComponents.d.ts.map 0000664 00000004176 15114741631 0024721 0 ustar 00 {"version":3,"file":"messageComponents.d.ts","sourceRoot":"","sources":["messageComponents.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,KA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AAM,CAAC,CAAC;AAE3G,MAAM,WAAW,qCAChB,SAAQ,sCAAsC,CAAC,aAAa,CAAC,YAAY,CAAC;IAC1E,MAAM,EAAE,MAAM,EAAE,CAAC;CACjB;AAED,MAAM,WAAW,mCAChB,SAAQ,sCAAsC,CAAC,aAAa,CAAC,UAAU,CAAC;IACxE,MAAM,EAAE,SAAS,EAAE,CAAC;IACpB,QAAQ,EAAE,8BAA8B,CAAC;CACzC;AAED,MAAM,WAAW,mCAChB,SAAQ,sCAAsC,CAAC,aAAa,CAAC,UAAU,CAAC;IACxE,MAAM,EAAE,SAAS,EAAE,CAAC;IACpB,QAAQ,EAAE,QAAQ,CAAC,IAAI,CAAC,0BAA0B,EAAE,OAAO,CAAC,CAAC,CAAC;CAC9D;AAED,MAAM,WAAW,0CAChB,SAAQ,sCAAsC,CAAC,aAAa,CAAC,iBAAiB,CAAC;IAC/E,MAAM,EAAE,SAAS,EAAE,CAAC;IACpB,QAAQ,EAAE,IAAI,CAAC,0BAA0B,EAAE,SAAS,GAAG,OAAO,GAAG,OAAO,CAAC,CAAC;CAC1E;AAED,MAAM,WAAW,sCAChB,SAAQ,sCAAsC,CAAC,aAAa,CAAC,aAAa,CAAC;IAC3E,MAAM,EAAE,SAAS,EAAE,CAAC;IACpB,QAAQ,EAAE,QAAQ,CAAC,IAAI,CAAC,0BAA0B,EAAE,UAAU,CAAC,CAAC,CAAC;CACjE;AAED,MAAM,MAAM,mCAAmC,GAC5C,sCAAsC,GACtC,0CAA0C,GAC1C,mCAAmC,GACnC,qCAAqC,GACrC,mCAAmC,CAAC;AAEvC,MAAM,MAAM,gCAAgC,GAAG,uBAAuB,CAAC,8BAA8B,CAAC,CAAC;AAEvG,MAAM,MAAM,mCAAmC,GAAG,0BAA0B,CAAC,8BAA8B,CAAC,CAAC"} node_modules/discord-api-types/payloads/v10/_interactions/modalSubmit.d.ts 0000664 00000003133 15114741631 0022723 0 ustar 00 import type { APIBaseComponent } from '../channel'; import type { APIBaseInteraction, APIDMInteractionWrapper, APIGuildInteractionWrapper, ComponentType, InteractionType } from '../index'; export interface ModalSubmitComponent { type: ComponentType; custom_id: string; value: string; } export interface ModalSubmitActionRowComponent extends APIBaseComponent<ComponentType.ActionRow> { components: ModalSubmitComponent[]; } /** * @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object-modal-submit-data-structure} */ export interface APIModalSubmission { /** * A developer-defined identifier for the component, max 100 characters */ custom_id: string; /** * A list of child components */ components: ModalSubmitActionRowComponent[]; } /** * @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object} */ export type APIModalSubmitInteraction = APIBaseInteraction<InteractionType.ModalSubmit, APIModalSubmission> & Required<Pick<APIBaseInteraction<InteractionType.ModalSubmit, APIModalSubmission>, 'data'>>; /** * @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object} */ export type APIModalSubmitDMInteraction = APIDMInteractionWrapper<APIModalSubmitInteraction>; /** * @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object} */ export type APIModalSubmitGuildInteraction = APIGuildInteractionWrapper<APIModalSubmitInteraction>; //# sourceMappingURL=modalSubmit.d.ts.map node_modules/discord-api-types/payloads/v10/_interactions/base.d.ts.map 0000664 00000010057 15114741631 0022134 0 ustar 00 {"version":3,"file":"base.d.ts","sourceRoot":"","sources":["base.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC/D,OAAO,KAAK,EAAE,OAAO,EAAE,0BAA0B,EAAE,sBAAsB,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AACxG,OAAO,KAAK,EACX,aAAa,EACb,UAAU,EACV,UAAU,EACV,iBAAiB,EACjB,gBAAgB,EAChB,WAAW,EACX,iBAAiB,EACjB,MAAM,YAAY,CAAC;AACpB,OAAO,KAAK,EACX,kBAAkB,EAClB,qBAAqB,EACrB,cAAc,EACd,oBAAoB,EACpB,oBAAoB,EACpB,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AM,WAAW,0BAA0B;IAC1C,KAAK,CAAC,EAAE,MAAM,CAAC,SAAS,EAAE,OAAO,CAAC,CAAC;IACnC,KAAK,CAAC,EAAE,MAAM,CAAC,SAAS,EAAE,OAAO,CAAC,CAAC;IACnC,OAAO,CAAC,EAAE,MAAM,CAAC,SAAS,EAAE,qCAAqC,CAAC,CAAC;IACnE,QAAQ,CAAC,EAAE,MAAM,CAAC,SAAS,EAAE,iCAAiC,CAAC,CAAC;IAChE,WAAW,CAAC,EAAE,MAAM,CAAC,SAAS,EAAE,aAAa,CAAC,CAAC;CAC/C;AAED;;GAEG;AACH,MAAM,MAAM,qDAAqD,GAAG,0BAA0B,CAAC;AAE/F;;GAEG;AACH,MAAM,MAAM,8BAA8B,GAAG,IAAI,CAAC,0BAA0B,EAAE,SAAS,CAAC,GACvF,QAAQ,CAAC,IAAI,CAAC,0BAA0B,EAAE,OAAO,CAAC,CAAC,CAAC;AAErD;;GAEG;AACH,MAAM,MAAM,gDAAgD,GAAG,8BAA8B,CAAC"} node_modules/discord-api-types/payloads/v10/_interactions/responses.js.map 0000664 00000001155 15114741631 0023006 0 ustar 00 {"version":3,"file":"responses.js","sourceRoot":"","sources":["responses.ts"],"names":[],"mappings":";;;AAIA;;GAEG;AACH,IAAY,eAMX;AAND,WAAY,eAAe;IAC1B,qDAAQ,CAAA;IACR,iFAAkB,CAAA;IAClB,6EAAgB,CAAA;IAChB,yGAA8B,CAAA;IAC9B,mEAAW,CAAA;AACZ,CAAC,EANW,eAAe,+BAAf,eAAe,QAM1B;AAyDD;;GAEG;AACH,IAAY,uBA4CX;AA5CD,WAAY,uBAAuB;IAClC;;OAEG;IACH,qEAAQ,CAAA;IACR;;OAEG;IACH,6GAA4B,CAAA;IAC5B;;OAEG;IACH,6HAAgC,CAAA;IAChC;;OAEG;IACH,uGAAqB,CAAA;IACrB;;OAEG;IACH,uFAAa,CAAA;IACb;;OAEG;IACH,qIAAoC,CAAA;IACpC;;OAEG;IACH,uEAAK,CAAA;IACL;;;;;OAKG;IACH,4FAAe,CAAA;IAEf;;;;;OAKG;IACH,0FAAmB,CAAA;AACpB,CAAC,EA5CW,uBAAuB,uCAAvB,uBAAuB,QA4ClC"} node_modules/discord-api-types/payloads/v10/_interactions/messageComponents.js 0000664 00000000172 15114741631 0023701 0 ustar 00 "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); //# sourceMappingURL=messageComponents.js.map node_modules/discord-api-types/payloads/v10/voice.js.map 0000664 00000000152 15114741631 0017225 0 ustar 00 {"version":3,"file":"voice.js","sourceRoot":"","sources":["voice.ts"],"names":[],"mappings":";AAAA;;GAEG"} node_modules/discord-api-types/payloads/v10/user.js 0000664 00000017354 15114741631 0016336 0 ustar 00 "use strict"; /** * Types extracted from https://discord.com/developers/docs/resources/user */ Object.defineProperty(exports, "__esModule", { value: true }); exports.NameplatePalette = exports.ConnectionVisibility = exports.ConnectionService = exports.UserPremiumType = exports.UserFlags = void 0; /** * @see {@link https://discord.com/developers/docs/resources/user#user-object-user-flags} */ var UserFlags; (function (UserFlags) { /** * Discord Employee */ UserFlags[UserFlags["Staff"] = 1] = "Staff"; /** * Partnered Server Owner */ UserFlags[UserFlags["Partner"] = 2] = "Partner"; /** * HypeSquad Events Member */ UserFlags[UserFlags["Hypesquad"] = 4] = "Hypesquad"; /** * Bug Hunter Level 1 */ UserFlags[UserFlags["BugHunterLevel1"] = 8] = "BugHunterLevel1"; /** * @unstable This user flag is currently not documented by Discord but has a known value which we will try to keep up to date. */ UserFlags[UserFlags["MFASMS"] = 16] = "MFASMS"; /** * @unstable This user flag is currently not documented by Discord but has a known value which we will try to keep up to date. */ UserFlags[UserFlags["PremiumPromoDismissed"] = 32] = "PremiumPromoDismissed"; /** * House Bravery Member */ UserFlags[UserFlags["HypeSquadOnlineHouse1"] = 64] = "HypeSquadOnlineHouse1"; /** * House Brilliance Member */ UserFlags[UserFlags["HypeSquadOnlineHouse2"] = 128] = "HypeSquadOnlineHouse2"; /** * House Balance Member */ UserFlags[UserFlags["HypeSquadOnlineHouse3"] = 256] = "HypeSquadOnlineHouse3"; /** * Early Nitro Supporter */ UserFlags[UserFlags["PremiumEarlySupporter"] = 512] = "PremiumEarlySupporter"; /** * User is a {@link https://discord.com/developers/docs/topics/teams | team} */ UserFlags[UserFlags["TeamPseudoUser"] = 1024] = "TeamPseudoUser"; /** * @unstable This user flag is currently not documented by Discord but has a known value which we will try to keep up to date. */ UserFlags[UserFlags["HasUnreadUrgentMessages"] = 8192] = "HasUnreadUrgentMessages"; /** * Bug Hunter Level 2 */ UserFlags[UserFlags["BugHunterLevel2"] = 16384] = "BugHunterLevel2"; /** * Verified Bot */ UserFlags[UserFlags["VerifiedBot"] = 65536] = "VerifiedBot"; /** * Early Verified Bot Developer */ UserFlags[UserFlags["VerifiedDeveloper"] = 131072] = "VerifiedDeveloper"; /** * Moderator Programs Alumni */ UserFlags[UserFlags["CertifiedModerator"] = 262144] = "CertifiedModerator"; /** * Bot uses only {@link https://discord.com/developers/docs/interactions/receiving-and-responding#receiving-an-interaction | HTTP interactions} and is shown in the online member list */ UserFlags[UserFlags["BotHTTPInteractions"] = 524288] = "BotHTTPInteractions"; /** * User has been identified as spammer * * @unstable This user flag is currently not documented by Discord but has a known value which we will try to keep up to date. */ UserFlags[UserFlags["Spammer"] = 1048576] = "Spammer"; /** * @unstable This user flag is currently not documented by Discord but has a known value which we will try to keep up to date. */ UserFlags[UserFlags["DisablePremium"] = 2097152] = "DisablePremium"; /** * User is an {@link https://support-dev.discord.com/hc/articles/10113997751447 | Active Developer} */ UserFlags[UserFlags["ActiveDeveloper"] = 4194304] = "ActiveDeveloper"; /** * User's account has been {@link https://support.discord.com/hc/articles/6461420677527 | quarantined} based on recent activity * * @unstable This user flag is currently not documented by Discord but has a known value which we will try to keep up to date. * @privateRemarks * * This value would be `1 << 44`, but bit shifting above `1 << 30` requires bigints */ UserFlags[UserFlags["Quarantined"] = 17592186044416] = "Quarantined"; /** * @unstable This user flag is currently not documented by Discord but has a known value which we will try to keep up to date. * @privateRemarks * * This value would be `1 << 50`, but bit shifting above `1 << 30` requires bigints */ UserFlags[UserFlags["Collaborator"] = 1125899906842624] = "Collaborator"; /** * @unstable This user flag is currently not documented by Discord but has a known value which we will try to keep up to date. * @privateRemarks * * This value would be `1 << 51`, but bit shifting above `1 << 30` requires bigints */ UserFlags[UserFlags["RestrictedCollaborator"] = 2251799813685248] = "RestrictedCollaborator"; })(UserFlags || (exports.UserFlags = UserFlags = {})); /** * @see {@link https://discord.com/developers/docs/resources/user#user-object-premium-types} */ var UserPremiumType; (function (UserPremiumType) { UserPremiumType[UserPremiumType["None"] = 0] = "None"; UserPremiumType[UserPremiumType["NitroClassic"] = 1] = "NitroClassic"; UserPremiumType[UserPremiumType["Nitro"] = 2] = "Nitro"; UserPremiumType[UserPremiumType["NitroBasic"] = 3] = "NitroBasic"; })(UserPremiumType || (exports.UserPremiumType = UserPremiumType = {})); var ConnectionService; (function (ConnectionService) { ConnectionService["AmazonMusic"] = "amazon-music"; ConnectionService["BattleNet"] = "battlenet"; ConnectionService["Bluesky"] = "bluesky"; ConnectionService["BungieNet"] = "bungie"; ConnectionService["Crunchyroll"] = "crunchyroll"; ConnectionService["Domain"] = "domain"; ConnectionService["eBay"] = "ebay"; ConnectionService["EpicGames"] = "epicgames"; ConnectionService["Facebook"] = "facebook"; ConnectionService["GitHub"] = "github"; ConnectionService["Instagram"] = "instagram"; ConnectionService["LeagueOfLegends"] = "leagueoflegends"; ConnectionService["Mastodon"] = "mastodon"; ConnectionService["PayPal"] = "paypal"; ConnectionService["PlayStationNetwork"] = "playstation"; ConnectionService["Reddit"] = "reddit"; ConnectionService["RiotGames"] = "riotgames"; ConnectionService["Roblox"] = "roblox"; ConnectionService["Spotify"] = "spotify"; ConnectionService["Skype"] = "skype"; ConnectionService["Steam"] = "steam"; ConnectionService["TikTok"] = "tiktok"; ConnectionService["Twitch"] = "twitch"; ConnectionService["X"] = "twitter"; /** * @deprecated This is the old name for {@link ConnectionService.X} */ ConnectionService["Twitter"] = "twitter"; ConnectionService["Xbox"] = "xbox"; ConnectionService["YouTube"] = "youtube"; })(ConnectionService || (exports.ConnectionService = ConnectionService = {})); var ConnectionVisibility; (function (ConnectionVisibility) { /** * Invisible to everyone except the user themselves */ ConnectionVisibility[ConnectionVisibility["None"] = 0] = "None"; /** * Visible to everyone */ ConnectionVisibility[ConnectionVisibility["Everyone"] = 1] = "Everyone"; })(ConnectionVisibility || (exports.ConnectionVisibility = ConnectionVisibility = {})); /** * Background color of a nameplate. */ var NameplatePalette; (function (NameplatePalette) { NameplatePalette["Berry"] = "berry"; NameplatePalette["BubbleGum"] = "bubble_gum"; NameplatePalette["Clover"] = "clover"; NameplatePalette["Cobalt"] = "cobalt"; NameplatePalette["Crimson"] = "crimson"; NameplatePalette["Forest"] = "forest"; NameplatePalette["Lemon"] = "lemon"; NameplatePalette["Sky"] = "sky"; NameplatePalette["Teal"] = "teal"; NameplatePalette["Violet"] = "violet"; NameplatePalette["White"] = "white"; })(NameplatePalette || (exports.NameplatePalette = NameplatePalette = {})); //# sourceMappingURL=user.js.map node_modules/discord-api-types/payloads/v10/guild.js 0000664 00000037036 15114741631 0016463 0 ustar 00 "use strict"; /** * Types extracted from https://discord.com/developers/docs/resources/guild */ Object.defineProperty(exports, "__esModule", { value: true }); exports.GuildOnboardingPromptType = exports.GuildOnboardingMode = exports.MembershipScreeningFieldType = exports.GuildWidgetStyle = exports.IntegrationExpireBehavior = exports.GuildMemberFlags = exports.GuildFeature = exports.GuildSystemChannelFlags = exports.GuildHubType = exports.GuildPremiumTier = exports.GuildVerificationLevel = exports.GuildNSFWLevel = exports.GuildMFALevel = exports.GuildExplicitContentFilter = exports.GuildDefaultMessageNotifications = void 0; /** * @see {@link https://discord.com/developers/docs/resources/guild#guild-object-default-message-notification-level} */ var GuildDefaultMessageNotifications; (function (GuildDefaultMessageNotifications) { GuildDefaultMessageNotifications[GuildDefaultMessageNotifications["AllMessages"] = 0] = "AllMessages"; GuildDefaultMessageNotifications[GuildDefaultMessageNotifications["OnlyMentions"] = 1] = "OnlyMentions"; })(GuildDefaultMessageNotifications || (exports.GuildDefaultMessageNotifications = GuildDefaultMessageNotifications = {})); /** * @see {@link https://discord.com/developers/docs/resources/guild#guild-object-explicit-content-filter-level} */ var GuildExplicitContentFilter; (function (GuildExplicitContentFilter) { GuildExplicitContentFilter[GuildExplicitContentFilter["Disabled"] = 0] = "Disabled"; GuildExplicitContentFilter[GuildExplicitContentFilter["MembersWithoutRoles"] = 1] = "MembersWithoutRoles"; GuildExplicitContentFilter[GuildExplicitContentFilter["AllMembers"] = 2] = "AllMembers"; })(GuildExplicitContentFilter || (exports.GuildExplicitContentFilter = GuildExplicitContentFilter = {})); /** * @see {@link https://discord.com/developers/docs/resources/guild#guild-object-mfa-level} */ var GuildMFALevel; (function (GuildMFALevel) { GuildMFALevel[GuildMFALevel["None"] = 0] = "None"; GuildMFALevel[GuildMFALevel["Elevated"] = 1] = "Elevated"; })(GuildMFALevel || (exports.GuildMFALevel = GuildMFALevel = {})); /** * @see {@link https://discord.com/developers/docs/resources/guild#guild-object-guild-nsfw-level} */ var GuildNSFWLevel; (function (GuildNSFWLevel) { GuildNSFWLevel[GuildNSFWLevel["Default"] = 0] = "Default"; GuildNSFWLevel[GuildNSFWLevel["Explicit"] = 1] = "Explicit"; GuildNSFWLevel[GuildNSFWLevel["Safe"] = 2] = "Safe"; GuildNSFWLevel[GuildNSFWLevel["AgeRestricted"] = 3] = "AgeRestricted"; })(GuildNSFWLevel || (exports.GuildNSFWLevel = GuildNSFWLevel = {})); /** * @see {@link https://discord.com/developers/docs/resources/guild#guild-object-verification-level} */ var GuildVerificationLevel; (function (GuildVerificationLevel) { /** * Unrestricted */ GuildVerificationLevel[GuildVerificationLevel["None"] = 0] = "None"; /** * Must have verified email on account */ GuildVerificationLevel[GuildVerificationLevel["Low"] = 1] = "Low"; /** * Must be registered on Discord for longer than 5 minutes */ GuildVerificationLevel[GuildVerificationLevel["Medium"] = 2] = "Medium"; /** * Must be a member of the guild for longer than 10 minutes */ GuildVerificationLevel[GuildVerificationLevel["High"] = 3] = "High"; /** * Must have a verified phone number */ GuildVerificationLevel[GuildVerificationLevel["VeryHigh"] = 4] = "VeryHigh"; })(GuildVerificationLevel || (exports.GuildVerificationLevel = GuildVerificationLevel = {})); /** * @see {@link https://discord.com/developers/docs/resources/guild#guild-object-premium-tier} */ var GuildPremiumTier; (function (GuildPremiumTier) { GuildPremiumTier[GuildPremiumTier["None"] = 0] = "None"; GuildPremiumTier[GuildPremiumTier["Tier1"] = 1] = "Tier1"; GuildPremiumTier[GuildPremiumTier["Tier2"] = 2] = "Tier2"; GuildPremiumTier[GuildPremiumTier["Tier3"] = 3] = "Tier3"; })(GuildPremiumTier || (exports.GuildPremiumTier = GuildPremiumTier = {})); var GuildHubType; (function (GuildHubType) { GuildHubType[GuildHubType["Default"] = 0] = "Default"; GuildHubType[GuildHubType["HighSchool"] = 1] = "HighSchool"; GuildHubType[GuildHubType["College"] = 2] = "College"; })(GuildHubType || (exports.GuildHubType = GuildHubType = {})); /** * @see {@link https://discord.com/developers/docs/resources/guild#guild-object-system-channel-flags} */ var GuildSystemChannelFlags; (function (GuildSystemChannelFlags) { /** * Suppress member join notifications */ GuildSystemChannelFlags[GuildSystemChannelFlags["SuppressJoinNotifications"] = 1] = "SuppressJoinNotifications"; /** * Suppress server boost notifications */ GuildSystemChannelFlags[GuildSystemChannelFlags["SuppressPremiumSubscriptions"] = 2] = "SuppressPremiumSubscriptions"; /** * Suppress server setup tips */ GuildSystemChannelFlags[GuildSystemChannelFlags["SuppressGuildReminderNotifications"] = 4] = "SuppressGuildReminderNotifications"; /** * Hide member join sticker reply buttons */ GuildSystemChannelFlags[GuildSystemChannelFlags["SuppressJoinNotificationReplies"] = 8] = "SuppressJoinNotificationReplies"; /** * Suppress role subscription purchase and renewal notifications */ GuildSystemChannelFlags[GuildSystemChannelFlags["SuppressRoleSubscriptionPurchaseNotifications"] = 16] = "SuppressRoleSubscriptionPurchaseNotifications"; /** * Hide role subscription sticker reply buttons */ GuildSystemChannelFlags[GuildSystemChannelFlags["SuppressRoleSubscriptionPurchaseNotificationReplies"] = 32] = "SuppressRoleSubscriptionPurchaseNotificationReplies"; })(GuildSystemChannelFlags || (exports.GuildSystemChannelFlags = GuildSystemChannelFlags = {})); /** * @see {@link https://discord.com/developers/docs/resources/guild#guild-object-guild-features} */ var GuildFeature; (function (GuildFeature) { /** * Guild has access to set an animated guild banner image */ GuildFeature["AnimatedBanner"] = "ANIMATED_BANNER"; /** * Guild has access to set an animated guild icon */ GuildFeature["AnimatedIcon"] = "ANIMATED_ICON"; /** * Guild is using the old permissions configuration behavior * * @see {@link https://discord.com/developers/docs/change-log#upcoming-application-command-permission-changes} */ GuildFeature["ApplicationCommandPermissionsV2"] = "APPLICATION_COMMAND_PERMISSIONS_V2"; /** * Guild has set up auto moderation rules */ GuildFeature["AutoModeration"] = "AUTO_MODERATION"; /** * Guild has access to set a guild banner image */ GuildFeature["Banner"] = "BANNER"; /** * Guild can enable welcome screen, Membership Screening and discovery, and receives community updates */ GuildFeature["Community"] = "COMMUNITY"; /** * Guild has enabled monetization */ GuildFeature["CreatorMonetizableProvisional"] = "CREATOR_MONETIZABLE_PROVISIONAL"; /** * Guild has enabled the role subscription promo page */ GuildFeature["CreatorStorePage"] = "CREATOR_STORE_PAGE"; /** * Guild has been set as a support server on the App Directory */ GuildFeature["DeveloperSupportServer"] = "DEVELOPER_SUPPORT_SERVER"; /** * Guild is able to be discovered in the directory */ GuildFeature["Discoverable"] = "DISCOVERABLE"; /** * Guild is able to be featured in the directory */ GuildFeature["Featurable"] = "FEATURABLE"; /** * Guild is listed in a directory channel */ GuildFeature["HasDirectoryEntry"] = "HAS_DIRECTORY_ENTRY"; /** * Guild is a Student Hub * * @see {@link https://support.discord.com/hc/articles/4406046651927} * @unstable This feature is currently not documented by Discord, but has known value */ GuildFeature["Hub"] = "HUB"; /** * Guild has disabled invite usage, preventing users from joining */ GuildFeature["InvitesDisabled"] = "INVITES_DISABLED"; /** * Guild has access to set an invite splash background */ GuildFeature["InviteSplash"] = "INVITE_SPLASH"; /** * Guild is in a Student Hub * * @see {@link https://support.discord.com/hc/articles/4406046651927} * @unstable This feature is currently not documented by Discord, but has known value */ GuildFeature["LinkedToHub"] = "LINKED_TO_HUB"; /** * Guild has enabled Membership Screening */ GuildFeature["MemberVerificationGateEnabled"] = "MEMBER_VERIFICATION_GATE_ENABLED"; /** * Guild has increased custom soundboard sound slots */ GuildFeature["MoreSoundboard"] = "MORE_SOUNDBOARD"; /** * Guild has enabled monetization * * @unstable This feature is no longer documented by Discord */ GuildFeature["MonetizationEnabled"] = "MONETIZATION_ENABLED"; /** * Guild has increased custom sticker slots */ GuildFeature["MoreStickers"] = "MORE_STICKERS"; /** * Guild has access to create news channels */ GuildFeature["News"] = "NEWS"; /** * Guild is partnered */ GuildFeature["Partnered"] = "PARTNERED"; /** * Guild can be previewed before joining via Membership Screening or the directory */ GuildFeature["PreviewEnabled"] = "PREVIEW_ENABLED"; /** * Guild has access to create private threads */ GuildFeature["PrivateThreads"] = "PRIVATE_THREADS"; /** * Guild has disabled alerts for join raids in the configured safety alerts channel */ GuildFeature["RaidAlertsDisabled"] = "RAID_ALERTS_DISABLED"; GuildFeature["RelayEnabled"] = "RELAY_ENABLED"; /** * Guild is able to set role icons */ GuildFeature["RoleIcons"] = "ROLE_ICONS"; /** * Guild has role subscriptions that can be purchased */ GuildFeature["RoleSubscriptionsAvailableForPurchase"] = "ROLE_SUBSCRIPTIONS_AVAILABLE_FOR_PURCHASE"; /** * Guild has enabled role subscriptions */ GuildFeature["RoleSubscriptionsEnabled"] = "ROLE_SUBSCRIPTIONS_ENABLED"; /** * Guild has created soundboard sounds */ GuildFeature["Soundboard"] = "SOUNDBOARD"; /** * Guild has enabled ticketed events */ GuildFeature["TicketedEventsEnabled"] = "TICKETED_EVENTS_ENABLED"; /** * Guild has access to set a vanity URL */ GuildFeature["VanityURL"] = "VANITY_URL"; /** * Guild is verified */ GuildFeature["Verified"] = "VERIFIED"; /** * Guild has access to set 384kbps bitrate in voice (previously VIP voice servers) */ GuildFeature["VIPRegions"] = "VIP_REGIONS"; /** * Guild has enabled the welcome screen */ GuildFeature["WelcomeScreenEnabled"] = "WELCOME_SCREEN_ENABLED"; })(GuildFeature || (exports.GuildFeature = GuildFeature = {})); /** * @see {@link https://discord.com/developers/docs/resources/guild#guild-member-object-guild-member-flags} */ var GuildMemberFlags; (function (GuildMemberFlags) { /** * Member has left and rejoined the guild */ GuildMemberFlags[GuildMemberFlags["DidRejoin"] = 1] = "DidRejoin"; /** * Member has completed onboarding */ GuildMemberFlags[GuildMemberFlags["CompletedOnboarding"] = 2] = "CompletedOnboarding"; /** * Member is exempt from guild verification requirements */ GuildMemberFlags[GuildMemberFlags["BypassesVerification"] = 4] = "BypassesVerification"; /** * Member has started onboarding */ GuildMemberFlags[GuildMemberFlags["StartedOnboarding"] = 8] = "StartedOnboarding"; /** * Member is a guest and can only access the voice channel they were invited to */ GuildMemberFlags[GuildMemberFlags["IsGuest"] = 16] = "IsGuest"; /** * Member has started Server Guide new member actions */ GuildMemberFlags[GuildMemberFlags["StartedHomeActions"] = 32] = "StartedHomeActions"; /** * Member has completed Server Guide new member actions */ GuildMemberFlags[GuildMemberFlags["CompletedHomeActions"] = 64] = "CompletedHomeActions"; /** * Member's username, display name, or nickname is blocked by AutoMod */ GuildMemberFlags[GuildMemberFlags["AutomodQuarantinedUsernameOrGuildNickname"] = 128] = "AutomodQuarantinedUsernameOrGuildNickname"; /** * @deprecated * {@link https://github.com/discord/discord-api-docs/pull/7113 | discord-api-docs#7113} */ GuildMemberFlags[GuildMemberFlags["AutomodQuarantinedBio"] = 256] = "AutomodQuarantinedBio"; /** * Member has dismissed the DM settings upsell */ GuildMemberFlags[GuildMemberFlags["DmSettingsUpsellAcknowledged"] = 512] = "DmSettingsUpsellAcknowledged"; })(GuildMemberFlags || (exports.GuildMemberFlags = GuildMemberFlags = {})); /** * @see {@link https://discord.com/developers/docs/resources/guild#integration-object-integration-expire-behaviors} */ var IntegrationExpireBehavior; (function (IntegrationExpireBehavior) { IntegrationExpireBehavior[IntegrationExpireBehavior["RemoveRole"] = 0] = "RemoveRole"; IntegrationExpireBehavior[IntegrationExpireBehavior["Kick"] = 1] = "Kick"; })(IntegrationExpireBehavior || (exports.IntegrationExpireBehavior = IntegrationExpireBehavior = {})); /** * @see {@link https://discord.com/developers/docs/resources/guild#get-guild-widget-image-widget-style-options} */ var GuildWidgetStyle; (function (GuildWidgetStyle) { /** * Shield style widget with Discord icon and guild members online count */ GuildWidgetStyle["Shield"] = "shield"; /** * Large image with guild icon, name and online count. "POWERED BY DISCORD" as the footer of the widget */ GuildWidgetStyle["Banner1"] = "banner1"; /** * Smaller widget style with guild icon, name and online count. Split on the right with Discord logo */ GuildWidgetStyle["Banner2"] = "banner2"; /** * Large image with guild icon, name and online count. In the footer, Discord logo on the left and "Chat Now" on the right */ GuildWidgetStyle["Banner3"] = "banner3"; /** * Large Discord logo at the top of the widget. Guild icon, name and online count in the middle portion of the widget * and a "JOIN MY SERVER" button at the bottom */ GuildWidgetStyle["Banner4"] = "banner4"; })(GuildWidgetStyle || (exports.GuildWidgetStyle = GuildWidgetStyle = {})); var MembershipScreeningFieldType; (function (MembershipScreeningFieldType) { /** * Server Rules */ MembershipScreeningFieldType["Terms"] = "TERMS"; })(MembershipScreeningFieldType || (exports.MembershipScreeningFieldType = MembershipScreeningFieldType = {})); /** * @see {@link https://discord.com/developers/docs/resources/guild#guild-onboarding-object-onboarding-mode} */ var GuildOnboardingMode; (function (GuildOnboardingMode) { /** * Counts only Default Channels towards constraints */ GuildOnboardingMode[GuildOnboardingMode["OnboardingDefault"] = 0] = "OnboardingDefault"; /** * Counts Default Channels and Questions towards constraints */ GuildOnboardingMode[GuildOnboardingMode["OnboardingAdvanced"] = 1] = "OnboardingAdvanced"; })(GuildOnboardingMode || (exports.GuildOnboardingMode = GuildOnboardingMode = {})); /** * @see {@link https://discord.com/developers/docs/resources/guild#guild-onboarding-object-prompt-types} */ var GuildOnboardingPromptType; (function (GuildOnboardingPromptType) { GuildOnboardingPromptType[GuildOnboardingPromptType["MultipleChoice"] = 0] = "MultipleChoice"; GuildOnboardingPromptType[GuildOnboardingPromptType["Dropdown"] = 1] = "Dropdown"; })(GuildOnboardingPromptType || (exports.GuildOnboardingPromptType = GuildOnboardingPromptType = {})); //# sourceMappingURL=guild.js.map node_modules/discord-api-types/payloads/v10/autoModeration.js 0000664 00000010562 15114741631 0020344 0 ustar 00 "use strict"; /** * Types extracted from https://discord.com/developers/docs/resources/auto-moderation */ Object.defineProperty(exports, "__esModule", { value: true }); exports.AutoModerationActionType = exports.AutoModerationRuleEventType = exports.AutoModerationRuleKeywordPresetType = exports.AutoModerationRuleTriggerType = void 0; /** * @see {@link https://discord.com/developers/docs/resources/auto-moderation#auto-moderation-rule-object-trigger-types} */ var AutoModerationRuleTriggerType; (function (AutoModerationRuleTriggerType) { /** * Check if content contains words from a user defined list of keywords (Maximum of 6 per guild) */ AutoModerationRuleTriggerType[AutoModerationRuleTriggerType["Keyword"] = 1] = "Keyword"; /** * Check if content represents generic spam (Maximum of 1 per guild) */ AutoModerationRuleTriggerType[AutoModerationRuleTriggerType["Spam"] = 3] = "Spam"; /** * Check if content contains words from internal pre-defined wordsets (Maximum of 1 per guild) */ AutoModerationRuleTriggerType[AutoModerationRuleTriggerType["KeywordPreset"] = 4] = "KeywordPreset"; /** * Check if content contains more mentions than allowed (Maximum of 1 per guild) */ AutoModerationRuleTriggerType[AutoModerationRuleTriggerType["MentionSpam"] = 5] = "MentionSpam"; /** * Check if member profile contains words from a user defined list of keywords (Maximum of 1 per guild) */ AutoModerationRuleTriggerType[AutoModerationRuleTriggerType["MemberProfile"] = 6] = "MemberProfile"; })(AutoModerationRuleTriggerType || (exports.AutoModerationRuleTriggerType = AutoModerationRuleTriggerType = {})); /** * @see {@link https://discord.com/developers/docs/resources/auto-moderation#auto-moderation-rule-object-keyword-preset-types} */ var AutoModerationRuleKeywordPresetType; (function (AutoModerationRuleKeywordPresetType) { /** * Words that may be considered forms of swearing or cursing */ AutoModerationRuleKeywordPresetType[AutoModerationRuleKeywordPresetType["Profanity"] = 1] = "Profanity"; /** * Words that refer to sexually explicit behavior or activity */ AutoModerationRuleKeywordPresetType[AutoModerationRuleKeywordPresetType["SexualContent"] = 2] = "SexualContent"; /** * Personal insults or words that may be considered hate speech */ AutoModerationRuleKeywordPresetType[AutoModerationRuleKeywordPresetType["Slurs"] = 3] = "Slurs"; })(AutoModerationRuleKeywordPresetType || (exports.AutoModerationRuleKeywordPresetType = AutoModerationRuleKeywordPresetType = {})); /** * @see {@link https://discord.com/developers/docs/resources/auto-moderation#auto-moderation-rule-object-event-types} */ var AutoModerationRuleEventType; (function (AutoModerationRuleEventType) { /** * When a member sends or edits a message in the guild */ AutoModerationRuleEventType[AutoModerationRuleEventType["MessageSend"] = 1] = "MessageSend"; /** * When a member edits their profile */ AutoModerationRuleEventType[AutoModerationRuleEventType["MemberUpdate"] = 2] = "MemberUpdate"; })(AutoModerationRuleEventType || (exports.AutoModerationRuleEventType = AutoModerationRuleEventType = {})); /** * @see {@link https://discord.com/developers/docs/resources/auto-moderation#auto-moderation-action-object-action-types} */ var AutoModerationActionType; (function (AutoModerationActionType) { /** * Blocks a member's message and prevents it from being posted. * A custom explanation can be specified and shown to members whenever their message is blocked */ AutoModerationActionType[AutoModerationActionType["BlockMessage"] = 1] = "BlockMessage"; /** * Logs user content to a specified channel */ AutoModerationActionType[AutoModerationActionType["SendAlertMessage"] = 2] = "SendAlertMessage"; /** * Timeout user for specified duration, this action type can be set if the bot has `MODERATE_MEMBERS` permission */ AutoModerationActionType[AutoModerationActionType["Timeout"] = 3] = "Timeout"; /** * Prevents a member from using text, voice, or other interactions */ AutoModerationActionType[AutoModerationActionType["BlockMemberInteraction"] = 4] = "BlockMemberInteraction"; })(AutoModerationActionType || (exports.AutoModerationActionType = AutoModerationActionType = {})); //# sourceMappingURL=autoModeration.js.map node_modules/discord-api-types/payloads/v10/oauth2.js 0000664 00000015026 15114741631 0016554 0 ustar 00 "use strict"; /** * Types extracted from https://discord.com/developers/docs/topics/oauth2 */ Object.defineProperty(exports, "__esModule", { value: true }); exports.OAuth2Scopes = void 0; var OAuth2Scopes; (function (OAuth2Scopes) { /** * For oauth2 bots, this puts the bot in the user's selected guild by default */ OAuth2Scopes["Bot"] = "bot"; /** * Allows {@link https://discord.com/developers/docs/resources/user#get-user-connections | `/users/@me/connections`} * to return linked third-party accounts * * @see {@link https://discord.com/developers/docs/resources/user#get-user-connections} */ OAuth2Scopes["Connections"] = "connections"; /** * Allows your app to see information about the user's DMs and group DMs - requires Discord approval */ OAuth2Scopes["DMChannelsRead"] = "dm_channels.read"; /** * Enables {@link https://discord.com/developers/docs/resources/user#get-current-user | `/users/@me`} to return an `email` * * @see {@link https://discord.com/developers/docs/resources/user#get-current-user} */ OAuth2Scopes["Email"] = "email"; /** * Allows {@link https://discord.com/developers/docs/resources/user#get-current-user | `/users/@me`} without `email` * * @see {@link https://discord.com/developers/docs/resources/user#get-current-user} */ OAuth2Scopes["Identify"] = "identify"; /** * Allows {@link https://discord.com/developers/docs/resources/user#get-current-user-guilds | `/users/@me/guilds`} * to return basic information about all of a user's guilds * * @see {@link https://discord.com/developers/docs/resources/user#get-current-user-guilds} */ OAuth2Scopes["Guilds"] = "guilds"; /** * Allows {@link https://discord.com/developers/docs/resources/guild#add-guild-member | `/guilds/[guild.id]/members/[user.id]`} * to be used for joining users to a guild * * @see {@link https://discord.com/developers/docs/resources/guild#add-guild-member} */ OAuth2Scopes["GuildsJoin"] = "guilds.join"; /** * Allows /users/\@me/guilds/\{guild.id\}/member to return a user's member information in a guild * * @see {@link https://discord.com/developers/docs/resources/user#get-current-user-guild-member} */ OAuth2Scopes["GuildsMembersRead"] = "guilds.members.read"; /** * Allows your app to join users to a group dm * * @see {@link https://discord.com/developers/docs/resources/channel#group-dm-add-recipient} */ OAuth2Scopes["GroupDMJoins"] = "gdm.join"; /** * For local rpc server api access, this allows you to read messages from all client channels * (otherwise restricted to channels/guilds your app creates) */ OAuth2Scopes["MessagesRead"] = "messages.read"; /** * Allows your app to update a user's connection and metadata for the app */ OAuth2Scopes["RoleConnectionsWrite"] = "role_connections.write"; /** * For local rpc server access, this allows you to control a user's local Discord client - requires Discord approval */ OAuth2Scopes["RPC"] = "rpc"; /** * For local rpc server access, this allows you to update a user's activity - requires Discord approval */ OAuth2Scopes["RPCActivitiesWrite"] = "rpc.activities.write"; /** * For local rpc server access, this allows you to read a user's voice settings and listen for voice events - requires Discord approval */ OAuth2Scopes["RPCVoiceRead"] = "rpc.voice.read"; /** * For local rpc server access, this allows you to update a user's voice settings - requires Discord approval */ OAuth2Scopes["RPCVoiceWrite"] = "rpc.voice.write"; /** * For local rpc server api access, this allows you to receive notifications pushed out to the user - requires Discord approval */ OAuth2Scopes["RPCNotificationsRead"] = "rpc.notifications.read"; /** * This generates a webhook that is returned in the oauth token response for authorization code grants */ OAuth2Scopes["WebhookIncoming"] = "webhook.incoming"; /** * Allows your app to connect to voice on user's behalf and see all the voice members - requires Discord approval */ OAuth2Scopes["Voice"] = "voice"; /** * Allows your app to upload/update builds for a user's applications - requires Discord approval */ OAuth2Scopes["ApplicationsBuildsUpload"] = "applications.builds.upload"; /** * Allows your app to read build data for a user's applications */ OAuth2Scopes["ApplicationsBuildsRead"] = "applications.builds.read"; /** * Allows your app to read and update store data (SKUs, store listings, achievements, etc.) for a user's applications */ OAuth2Scopes["ApplicationsStoreUpdate"] = "applications.store.update"; /** * Allows your app to read entitlements for a user's applications */ OAuth2Scopes["ApplicationsEntitlements"] = "applications.entitlements"; /** * Allows your app to know a user's friends and implicit relationships - requires Discord approval */ OAuth2Scopes["RelationshipsRead"] = "relationships.read"; /** * Allows your app to fetch data from a user's "Now Playing/Recently Played" list - requires Discord approval */ OAuth2Scopes["ActivitiesRead"] = "activities.read"; /** * Allows your app to update a user's activity - requires Discord approval (NOT REQUIRED FOR GAMESDK ACTIVITY MANAGER) * * @see {@link https://discord.com/developers/docs/game-sdk/activities} */ OAuth2Scopes["ActivitiesWrite"] = "activities.write"; /** * Allows your app to use Application Commands in a guild * * @see {@link https://discord.com/developers/docs/interactions/application-commands} */ OAuth2Scopes["ApplicationsCommands"] = "applications.commands"; /** * Allows your app to update its Application Commands via this bearer token - client credentials grant only * * @see {@link https://discord.com/developers/docs/interactions/application-commands} */ OAuth2Scopes["ApplicationsCommandsUpdate"] = "applications.commands.update"; /** * Allows your app to update permissions for its commands using a Bearer token - client credentials grant only * * @see {@link https://discord.com/developers/docs/interactions/application-commands} */ OAuth2Scopes["ApplicationCommandsPermissionsUpdate"] = "applications.commands.permissions.update"; })(OAuth2Scopes || (exports.OAuth2Scopes = OAuth2Scopes = {})); //# sourceMappingURL=oauth2.js.map node_modules/discord-api-types/payloads/v10/soundboard.d.ts 0000664 00000002067 15114741631 0017747 0 ustar 00 /** * Types extracted from https://discord.com/developers/docs/resources/soundboard */ import type { Snowflake } from '../../globals'; import type { APIUser } from './user'; /** * @see {@link https://discord.com/developers/docs/resources/soundboard#soundboard-sound-object} */ export interface APISoundboardSound { /** * The name of this sound */ name: string; /** * The id of this sound */ sound_id: Snowflake; /** * The volume of this sound, from 0 to 1 */ volume: number; /** * The id of this sound's custom emoji */ emoji_id: Snowflake | null; /** * The unicode character of this sound's standard emoji */ emoji_name: string | null; /** * The id of the guild that this sound is in */ guild_id?: Snowflake; /** * Whether this sound can be used (for guild sounds), may be false due to loss of Server Boosts */ available: boolean; /** * The user who created this sound */ user?: APIUser; } //# sourceMappingURL=soundboard.d.ts.map node_modules/discord-api-types/payloads/v10/invite.d.ts.map 0000664 00000003051 15114741631 0017653 0 ustar 00 {"version":3,"file":"invite.d.ts","sourceRoot":"","sources":["invite.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AACpD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,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AAA;IACP,MAAM,IAAA;CACN;AAED;;GAEG;AACH,oBAAY,gBAAgB;IAC3B,MAAM,IAAI;IACV,mBAAmB,IAAA;CACnB;AAED;;GAEG;AACH,MAAM,WAAW,iBAAkB,SAAQ,SAAS;IACnD;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC;IACjB;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC;IAChB;;OAEG;IACH,SAAS,EAAE,OAAO,CAAC;IACnB;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC;CACnB"} node_modules/discord-api-types/payloads/v10/interactions.d.ts.map 0000664 00000001632 15114741631 0021062 0 ustar 00 {"version":3,"file":"interactions.d.ts","sourceRoot":"","sources":["interactions.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACX,kCAAkC,EAClC,qCAAqC,EACrC,gCAAgC,EAChC,MAAM,qCAAqC,CAAC;AAC7C,OAAO,KAAK,EACX,8CAA8C,EAC9C,iDAAiD,EACjD,4CAA4C,EAC5C,MAAM,8BAA8B,CAAC;AACtC,OAAO,KAAK,EACX,gCAAgC,EAChC,mCAAmC,EACnC,8BAA8B,EAC9B,MAAM,mCAAmC,CAAC;AAC3C,OAAO,KAAK,EACX,2BAA2B,EAC3B,8BAA8B,EAC9B,yBAAyB,EACzB,MAAM,6BAA6B,CAAC;AACrC,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAE/D,cAAc,qCAAqC,CAAC;AACpD,mBAAmB,8BAA8B,CAAC;AAClD,mBAAmB,sBAAsB,CAAC;AAC1C,mBAAmB,mCAAmC,CAAC;AACvD,mBAAmB,6BAA6B,CAAC;AACjD,mBAAmB,sBAAsB,CAAC;AAC1C,cAAc,2BAA2B,CAAC;AAE1C;;GAEG;AACH,MAAM,MAAM,cAAc,GACvB,4CAA4C,GAC5C,gCAAgC,GAChC,8BAA8B,GAC9B,yBAAyB,GACzB,kBAAkB,CAAC;AAEtB;;GAEG;AACH,MAAM,MAAM,gBAAgB,GACzB,8CAA8C,GAC9C,kCAAkC,GAClC,gCAAgC,GAChC,2BAA2B,CAAC;AAE/B;;GAEG;AACH,MAAM,MAAM,mBAAmB,GAC5B,iDAAiD,GACjD,qCAAqC,GACrC,mCAAmC,GACnC,8BAA8B,CAAC"} node_modules/discord-api-types/payloads/v10/auditLog.d.ts 0000664 00000066151 15114741631 0017363 0 ustar 00 /** * Types extracted from https://discord.com/developers/docs/resources/audit-log */ import type { Snowflake } from '../../globals'; import type { APIAutoModerationAction, APIAutoModerationRule, APIAutoModerationRuleTriggerMetadata, AutoModerationRuleEventType, AutoModerationRuleTriggerType } from './autoModeration'; import type { APIChannel, APIGuildForumDefaultReactionEmoji, APIGuildForumTag, APIOverwrite } from './channel'; import type { APIGuildIntegration, APIGuildIntegrationType, GuildDefaultMessageNotifications, GuildExplicitContentFilter, GuildMFALevel, GuildSystemChannelFlags, GuildVerificationLevel, IntegrationExpireBehavior } from './guild'; import type { APIGuildScheduledEvent, APIGuildScheduledEventRecurrenceRule, GuildScheduledEventEntityType, GuildScheduledEventStatus } from './guildScheduledEvent'; import type { APIApplicationCommand } from './interactions'; import type { APIRole } from './permissions'; import type { StageInstancePrivacyLevel } from './stageInstance'; import type { StickerFormatType } from './sticker'; import type { APIUser } from './user'; import type { APIWebhook } from './webhook'; /** * @see {@link https://discord.com/developers/docs/resources/audit-log#audit-log-object-audit-log-structure} */ export interface APIAuditLog { /** * List of application commands found in the audit log * * @see {@link https://discord.com/developers/docs/interactions/application-commands#application-command-object} */ application_commands: APIApplicationCommand[]; /** * Webhooks found in the audit log * * @see {@link https://discord.com/developers/docs/resources/webhook#webhook-object} */ webhooks: APIWebhook[]; /** * Users found in the audit log * * @see {@link https://discord.com/developers/docs/resources/user#user-object} */ users: APIUser[]; /** * Audit log entries * * @see {@link https://discord.com/developers/docs/resources/audit-log#audit-log-entry-object} */ audit_log_entries: APIAuditLogEntry[]; /** * List of auto moderation rules referenced in the audit log * * @see {@link https://discord.com/developers/docs/resources/auto-moderation#auto-moderation-rule-object} */ auto_moderation_rules: APIAutoModerationRule[]; /** * Partial integration objects * * @see {@link https://discord.com/developers/docs/resources/guild#integration-object} */ integrations: APIGuildIntegration[]; /** * Threads found in the audit log * * Threads referenced in THREAD_CREATE and THREAD_UPDATE events are included in the threads map, since archived threads might not be kept in memory by clients. * * @see {@link https://discord.com/developers/docs/resources/channel#channel-object} */ threads: APIChannel[]; /** * The guild scheduled events in the audit log * * @see {@link https://discord.com/developers/docs/resources/guild-scheduled-event#guild-scheduled-event-object} */ guild_scheduled_events: APIGuildScheduledEvent[]; } /** * @see {@link https://discord.com/developers/docs/resources/audit-log#audit-log-entry-object-audit-log-entry-structure} */ export interface APIAuditLogEntry { /** * ID of the affected entity (webhook, user, role, etc.) */ target_id: string | null; /** * Changes made to the `target_id` * * @see {@link https://discord.com/developers/docs/resources/audit-log#audit-log-change-object} */ changes?: APIAuditLogChange[]; /** * The user who made the changes * * This can be `null` in some cases (webhooks deleting themselves by using their own token, for example) */ user_id: Snowflake | null; /** * ID of the entry */ id: Snowflake; /** * Type of action that occurred * * @see {@link https://discord.com/developers/docs/resources/audit-log#audit-log-entry-object-audit-log-events} */ action_type: AuditLogEvent; /** * Additional info for certain action types * * @see {@link https://discord.com/developers/docs/resources/audit-log#audit-log-entry-object-optional-audit-entry-info} */ options?: APIAuditLogOptions; /** * The reason for the change (0-512 characters) */ reason?: string; } /** * @see {@link https://discord.com/developers/docs/resources/audit-log#audit-log-entry-object-audit-log-events} */ export declare enum AuditLogEvent { GuildUpdate = 1, ChannelCreate = 10, ChannelUpdate = 11, ChannelDelete = 12, ChannelOverwriteCreate = 13, ChannelOverwriteUpdate = 14, ChannelOverwriteDelete = 15, MemberKick = 20, MemberPrune = 21, MemberBanAdd = 22, MemberBanRemove = 23, MemberUpdate = 24, MemberRoleUpdate = 25, MemberMove = 26, MemberDisconnect = 27, BotAdd = 28, RoleCreate = 30, RoleUpdate = 31, RoleDelete = 32, InviteCreate = 40, InviteUpdate = 41, InviteDelete = 42, WebhookCreate = 50, WebhookUpdate = 51, WebhookDelete = 52, EmojiCreate = 60, EmojiUpdate = 61, EmojiDelete = 62, MessageDelete = 72, MessageBulkDelete = 73, MessagePin = 74, MessageUnpin = 75, IntegrationCreate = 80, IntegrationUpdate = 81, IntegrationDelete = 82, StageInstanceCreate = 83, StageInstanceUpdate = 84, StageInstanceDelete = 85, StickerCreate = 90, StickerUpdate = 91, StickerDelete = 92, GuildScheduledEventCreate = 100, GuildScheduledEventUpdate = 101, GuildScheduledEventDelete = 102, ThreadCreate = 110, ThreadUpdate = 111, ThreadDelete = 112, ApplicationCommandPermissionUpdate = 121, SoundboardSoundCreate = 130, SoundboardSoundUpdate = 131, SoundboardSoundDelete = 132, AutoModerationRuleCreate = 140, AutoModerationRuleUpdate = 141, AutoModerationRuleDelete = 142, AutoModerationBlockMessage = 143, AutoModerationFlagToChannel = 144, AutoModerationUserCommunicationDisabled = 145, CreatorMonetizationRequestCreated = 150, CreatorMonetizationTermsAccepted = 151, OnboardingPromptCreate = 163, OnboardingPromptUpdate = 164, OnboardingPromptDelete = 165, OnboardingCreate = 166, OnboardingUpdate = 167, HomeSettingsCreate = 190, HomeSettingsUpdate = 191 } /** * @see {@link https://discord.com/developers/docs/resources/audit-log#audit-log-entry-object-optional-audit-entry-info} */ export interface APIAuditLogOptions { /** * Name of the Auto Moderation rule that was triggered * * Present from: * - AUTO_MODERATION_BLOCK_MESSAGE * - AUTO_MODERATION_FLAG_TO_CHANNEL * - AUTO_MODERATION_USER_COMMUNICATION_DISABLED */ auto_moderation_rule_name?: string; /** * Trigger type of the Auto Moderation rule that was triggered * * Present from: * - AUTO_MODERATION_BLOCK_MESSAGE * - AUTO_MODERATION_FLAG_TO_CHANNEL * - AUTO_MODERATION_USER_COMMUNICATION_DISABLED */ auto_moderation_rule_trigger_type?: AuditLogRuleTriggerType; /** * Number of days after which inactive members were kicked * * Present from: * - MEMBER_PRUNE */ delete_member_days?: string; /** * Number of members removed by the prune * * Present from: * - MEMBER_PRUNE */ members_removed?: string; /** * Channel in which the entities were targeted * * Present from: * - MEMBER_MOVE * - MESSAGE_PIN * - MESSAGE_UNPIN * - MESSAGE_DELETE * - STAGE_INSTANCE_CREATE * - STAGE_INSTANCE_UPDATE * - STAGE_INSTANCE_DELETE * - AUTO_MODERATION_BLOCK_MESSAGE * - AUTO_MODERATION_FLAG_TO_CHANNEL * - AUTO_MODERATION_USER_COMMUNICATION_DISABLED */ channel_id?: Snowflake; /** * ID of the message that was targeted * * Present from: * - MESSAGE_PIN * - MESSAGE_UNPIN */ message_id?: Snowflake; /** * Number of entities that were targeted * * Present from: * - MESSAGE_DELETE * - MESSAGE_BULK_DELETE * - MEMBER_DISCONNECT * - MEMBER_MOVE */ count?: string; /** * ID of the overwritten entity * * Present from: * - CHANNEL_OVERWRITE_CREATE * - CHANNEL_OVERWRITE_UPDATE * - CHANNEL_OVERWRITE_DELETE */ id?: Snowflake; /** * Type of overwritten entity - "0" for "role" or "1" for "member" * * Present from: * - CHANNEL_OVERWRITE_CREATE * - CHANNEL_OVERWRITE_UPDATE * - CHANNEL_OVERWRITE_DELETE * * {@link AuditLogOptionsType} */ type?: AuditLogOptionsType; /** * Name of the role * * Present from: * - CHANNEL_OVERWRITE_CREATE * - CHANNEL_OVERWRITE_UPDATE * - CHANNEL_OVERWRITE_DELETE * * **Present only if the {@link APIAuditLogOptions."type" | entry type} is "0"** */ role_name?: string; /** * Type of integration which performed the action * * Present from: * - MEMBER_KICK * - MEMBER_ROLE_UPDATE */ integration_type?: APIGuildIntegrationType; } export declare enum AuditLogOptionsType { Role = "0", Member = "1" } export type AuditLogRuleTriggerType = `${AutoModerationRuleTriggerType}`; /** * @see {@link https://discord.com/developers/docs/resources/audit-log#audit-log-change-object-audit-log-change-structure} */ export type APIAuditLogChange = APIAuditLogChangeKey$Add | APIAuditLogChangeKey$Remove | APIAuditLogChangeKeyActions | APIAuditLogChangeKeyAFKChannelId | APIAuditLogChangeKeyAFKTimeout | APIAuditLogChangeKeyAllow | APIAuditLogChangeKeyApplicationId | APIAuditLogChangeKeyArchived | APIAuditLogChangeKeyAsset | APIAuditLogChangeKeyAutoArchiveDuration | APIAuditLogChangeKeyAvailable | APIAuditLogChangeKeyAvailableTags | APIAuditLogChangeKeyAvatarHash | APIAuditLogChangeKeyBannerHash | APIAuditLogChangeKeyBitrate | APIAuditLogChangeKeyChannelId | APIAuditLogChangeKeyCode | APIAuditLogChangeKeyColor | APIAuditLogChangeKeyCommunicationDisabledUntil | APIAuditLogChangeKeyDeaf | APIAuditLogChangeKeyDefaultAutoArchiveDuration | APIAuditLogChangeKeyDefaultMessageNotifications | APIAuditLogChangeKeyDefaultReactionEmoji | APIAuditLogChangeKeyDefaultThreadRateLimitPerUser | APIAuditLogChangeKeyDeny | APIAuditLogChangeKeyDescription | APIAuditLogChangeKeyDiscoverySplashHash | APIAuditLogChangeKeyEmojiId | APIAuditLogChangeKeyEmojiName | APIAuditLogChangeKeyEnabled | APIAuditLogChangeKeyEnableEmoticons | APIAuditLogChangeKeyEntityType | APIAuditLogChangeKeyEventType | APIAuditLogChangeKeyExemptChannels | APIAuditLogChangeKeyExemptRoles | APIAuditLogChangeKeyExpireBehavior | APIAuditLogChangeKeyExpireGracePeriod | APIAuditLogChangeKeyExplicitContentFilter | APIAuditLogChangeKeyFlags | APIAuditLogChangeKeyFormatType | APIAuditLogChangeKeyGuildId | APIAuditLogChangeKeyHoist | APIAuditLogChangeKeyIconHash | APIAuditLogChangeKeyId | APIAuditLogChangeKeyImageHash | APIAuditLogChangeKeyInviterId | APIAuditLogChangeKeyLocation | APIAuditLogChangeKeyLocked | APIAuditLogChangeKeyMaxAge | APIAuditLogChangeKeyMaxUses | APIAuditLogChangeKeyMentionable | APIAuditLogChangeKeyMFALevel | APIAuditLogChangeKeyMute | APIAuditLogChangeKeyName | APIAuditLogChangeKeyNick | APIAuditLogChangeKeyNSFW | APIAuditLogChangeKeyOwnerId | APIAuditLogChangeKeyPermissionOverwrites | APIAuditLogChangeKeyPermissions | APIAuditLogChangeKeyPosition | APIAuditLogChangeKeyPreferredLocale | APIAuditLogChangeKeyPremiumProgressBarEnabled | APIAuditLogChangeKeyPrivacyLevel | APIAuditLogChangeKeyPruneDeleteDays | APIAuditLogChangeKeyPublicUpdatesChannelId | APIAuditLogChangeKeyRateLimitPerUser | APIAuditLogChangeKeyRecurrenceRule | APIAuditLogChangeKeyRegion | APIAuditLogChangeKeyRulesChannelId | APIAuditLogChangeKeySoundId | APIAuditLogChangeKeySplashHash | APIAuditLogChangeKeyStatus | APIAuditLogChangeKeySystemChannelFlags | APIAuditLogChangeKeySystemChannelId | APIAuditLogChangeKeyTags | APIAuditLogChangeKeyTemporary | APIAuditLogChangeKeyTopic | APIAuditLogChangeKeyTriggerMetadata | APIAuditLogChangeKeyTriggerType | APIAuditLogChangeKeyType | APIAuditLogChangeKeyUserId | APIAuditLogChangeKeyUserLimit | APIAuditLogChangeKeyUses | APIAuditLogChangeKeyVanityURLCode | APIAuditLogChangeKeyVerificationLevel | APIAuditLogChangeKeyVolume | APIAuditLogChangeKeyWidgetChannelId | APIAuditLogChangeKeyWidgetEnabled; /** * Returned when an entity's name is changed */ export type APIAuditLogChangeKeyName = APIAuditLogChangeData<'name', string>; /** * Returned when a guild's or sticker's or guild scheduled event's description is changed */ export type APIAuditLogChangeKeyDescription = APIAuditLogChangeData<'description', string>; /** * Returned when a guild's icon is changed */ export type APIAuditLogChangeKeyIconHash = APIAuditLogChangeData<'icon_hash', string>; /** * Returned when a guild's scheduled event's cover image is changed */ export type APIAuditLogChangeKeyImageHash = APIAuditLogChangeData<'image_hash', string>; /** * Returned when a guild's splash is changed */ export type APIAuditLogChangeKeySplashHash = APIAuditLogChangeData<'splash_hash', string>; /** * Returned when a guild's discovery splash is changed */ export type APIAuditLogChangeKeyDiscoverySplashHash = APIAuditLogChangeData<'discovery_splash_hash', string>; /** * Returned when a guild's banner hash is changed */ export type APIAuditLogChangeKeyBannerHash = APIAuditLogChangeData<'banner_hash', string>; /** * Returned when a guild's owner_id is changed */ export type APIAuditLogChangeKeyOwnerId = APIAuditLogChangeData<'owner_id', Snowflake>; /** * Returned when a guild's region is changed */ export type APIAuditLogChangeKeyRegion = APIAuditLogChangeData<'region', string>; /** * Returned when a guild's preferred_locale is changed */ export type APIAuditLogChangeKeyPreferredLocale = APIAuditLogChangeData<'preferred_locale', string>; /** * Returned when a guild's afk_channel_id is changed */ export type APIAuditLogChangeKeyAFKChannelId = APIAuditLogChangeData<'afk_channel_id', Snowflake>; /** * Returned when a guild's afk_timeout is changed */ export type APIAuditLogChangeKeyAFKTimeout = APIAuditLogChangeData<'afk_timeout', number>; /** * Returned when a guild's rules_channel_id is changed */ export type APIAuditLogChangeKeyRulesChannelId = APIAuditLogChangeData<'rules_channel_id', string>; /** * Returned when a guild's public_updates_channel_id is changed */ export type APIAuditLogChangeKeyPublicUpdatesChannelId = APIAuditLogChangeData<'public_updates_channel_id', string>; /** * Returned when a guild's safety_alerts_channel_id is changed */ export type APIAuditLogChangeKeySafetyAlertsChannelId = APIAuditLogChangeData<'safety_alerts_channel_id', string>; /** * Returned when a guild's mfa_level is changed */ export type APIAuditLogChangeKeyMFALevel = APIAuditLogChangeData<'mfa_level', GuildMFALevel>; /** * Returned when a guild's verification_level is changed */ export type APIAuditLogChangeKeyVerificationLevel = APIAuditLogChangeData<'verification_level', GuildVerificationLevel>; /** * Returned when a guild's explicit_content_filter is changed */ export type APIAuditLogChangeKeyExplicitContentFilter = APIAuditLogChangeData<'explicit_content_filter', GuildExplicitContentFilter>; /** * Returned when a guild's default_message_notifications is changed */ export type APIAuditLogChangeKeyDefaultMessageNotifications = APIAuditLogChangeData<'default_message_notifications', GuildDefaultMessageNotifications>; /** * Returned when a guild's vanity_url_code is changed */ export type APIAuditLogChangeKeyVanityURLCode = APIAuditLogChangeData<'vanity_url_code', string>; /** * Returned when a guild's boost progress bar is enabled */ export type APIAuditLogChangeKeyPremiumProgressBarEnabled = APIAuditLogChangeData<'premium_progress_bar_enabled', boolean>; /** * Returned when new role(s) are added */ export type APIAuditLogChangeKey$Add = APIAuditLogChangeData<'$add', Pick<APIRole, 'id' | 'name'>[]>; /** * Returned when role(s) are removed */ export type APIAuditLogChangeKey$Remove = APIAuditLogChangeData<'$remove', Pick<APIRole, 'id' | 'name'>[]>; /** * Returned when there is a change in number of days after which inactive and role-unassigned members are kicked */ export type APIAuditLogChangeKeyPruneDeleteDays = APIAuditLogChangeData<'prune_delete_days', number>; /** * Returned when a guild's widget is enabled */ export type APIAuditLogChangeKeyWidgetEnabled = APIAuditLogChangeData<'widget_enabled', boolean>; /** * Returned when a guild's widget_channel_id is changed */ export type APIAuditLogChangeKeyWidgetChannelId = APIAuditLogChangeData<'widget_channel_id', Snowflake>; /** * Returned when a guild's system_channel_flags is changed */ export type APIAuditLogChangeKeySystemChannelFlags = APIAuditLogChangeData<'system_channel_flags', GuildSystemChannelFlags>; /** * Returned when a guild's system_channel_id is changed */ export type APIAuditLogChangeKeySystemChannelId = APIAuditLogChangeData<'system_channel_id', Snowflake>; /** * Returned when a channel's position is changed */ export type APIAuditLogChangeKeyPosition = APIAuditLogChangeData<'position', number>; /** * Returned when a channel's topic is changed */ export type APIAuditLogChangeKeyTopic = APIAuditLogChangeData<'topic', string>; /** * Returned when a voice channel's bitrate is changed */ export type APIAuditLogChangeKeyBitrate = APIAuditLogChangeData<'bitrate', number>; /** * Returned when a channel's permission overwrites is changed */ export type APIAuditLogChangeKeyPermissionOverwrites = APIAuditLogChangeData<'permission_overwrites', APIOverwrite[]>; /** * Returned when a channel's NSFW restriction is changed */ export type APIAuditLogChangeKeyNSFW = APIAuditLogChangeData<'nsfw', boolean>; /** * The application ID of the added or removed Webhook or Bot */ export type APIAuditLogChangeKeyApplicationId = APIAuditLogChangeData<'application_id', Snowflake>; /** * Returned when a channel's amount of seconds a user has to wait before sending another message * is changed */ export type APIAuditLogChangeKeyRateLimitPerUser = APIAuditLogChangeData<'rate_limit_per_user', number>; /** * Returned when a guild scheduled event's recurrence_rule is changed */ export type APIAuditLogChangeKeyRecurrenceRule = APIAuditLogChangeData<'recurrence_rule', APIGuildScheduledEventRecurrenceRule>; /** * Returned when a permission bitfield is changed */ export type APIAuditLogChangeKeyPermissions = APIAuditLogChangeData<'permissions', string>; /** * Returned when a role's color is changed */ export type APIAuditLogChangeKeyColor = APIAuditLogChangeData<'color', number>; /** * Represents a change where the key is a snowflake. * Currently, the only known instance of this is returned when permissions for a command were updated */ export type APIAuditLogChangeKeySnowflake = APIAuditLogChangeData<Snowflake, unknown>; /** * Returned when a role's hoist status is changed */ export type APIAuditLogChangeKeyHoist = APIAuditLogChangeData<'hoist', boolean>; /** * Returned when a role's mentionable status is changed */ export type APIAuditLogChangeKeyMentionable = APIAuditLogChangeData<'mentionable', boolean>; /** * Returned when an overwrite's allowed permissions bitfield is changed */ export type APIAuditLogChangeKeyAllow = APIAuditLogChangeData<'allow', string>; /** * Returned when an overwrite's denied permissions bitfield is changed */ export type APIAuditLogChangeKeyDeny = APIAuditLogChangeData<'deny', string>; /** * Returned when an invite's code is changed */ export type APIAuditLogChangeKeyCode = APIAuditLogChangeData<'code', string>; /** * Returned when an invite's or guild scheduled event's channel_id is changed */ export type APIAuditLogChangeKeyChannelId = APIAuditLogChangeData<'channel_id', Snowflake>; /** * Returned when an invite's inviter_id is changed */ export type APIAuditLogChangeKeyInviterId = APIAuditLogChangeData<'inviter_id', Snowflake>; /** * Returned when an invite's max_uses is changed */ export type APIAuditLogChangeKeyMaxUses = APIAuditLogChangeData<'max_uses', number>; /** * Returned when an invite's uses is changed */ export type APIAuditLogChangeKeyUses = APIAuditLogChangeData<'uses', number>; /** * Returned when an invite's max_age is changed */ export type APIAuditLogChangeKeyMaxAge = APIAuditLogChangeData<'max_age', number>; /** * Returned when an invite's temporary status is changed */ export type APIAuditLogChangeKeyTemporary = APIAuditLogChangeData<'temporary', boolean>; /** * Returned when a user's deaf status is changed */ export type APIAuditLogChangeKeyDeaf = APIAuditLogChangeData<'deaf', boolean>; /** * Returned when a user's mute status is changed */ export type APIAuditLogChangeKeyMute = APIAuditLogChangeData<'mute', boolean>; /** * Returned when a user's nick is changed */ export type APIAuditLogChangeKeyNick = APIAuditLogChangeData<'nick', string>; /** * Returned when a user's avatar_hash is changed */ export type APIAuditLogChangeKeyAvatarHash = APIAuditLogChangeData<'avatar_hash', string>; /** * The ID of the changed entity - sometimes used in conjunction with other keys */ export type APIAuditLogChangeKeyId = APIAuditLogChangeData<'id', Snowflake>; /** * The type of entity created */ export type APIAuditLogChangeKeyType = APIAuditLogChangeData<'type', number | string>; /** * Returned when an integration's enable_emoticons is changed */ export type APIAuditLogChangeKeyEnableEmoticons = APIAuditLogChangeData<'enable_emoticons', boolean>; /** * Returned when an integration's expire_behavior is changed */ export type APIAuditLogChangeKeyExpireBehavior = APIAuditLogChangeData<'expire_behavior', IntegrationExpireBehavior>; /** * Returned when an integration's expire_grace_period is changed */ export type APIAuditLogChangeKeyExpireGracePeriod = APIAuditLogChangeData<'expire_grace_period', number>; /** * Returned when a voice channel's user_limit is changed */ export type APIAuditLogChangeKeyUserLimit = APIAuditLogChangeData<'user_limit', number>; /** * Returned when privacy level of a stage instance or guild scheduled event is changed */ export type APIAuditLogChangeKeyPrivacyLevel = APIAuditLogChangeData<'privacy_level', StageInstancePrivacyLevel>; /** * Returned when a sticker's related emoji is changed */ export type APIAuditLogChangeKeyTags = APIAuditLogChangeData<'tags', string>; /** * Returned when a sticker's format_type is changed */ export type APIAuditLogChangeKeyFormatType = APIAuditLogChangeData<'format_type', StickerFormatType>; /** * Empty string */ export type APIAuditLogChangeKeyAsset = APIAuditLogChangeData<'asset', ''>; /** * Returned when a sticker's availability is changed */ export type APIAuditLogChangeKeyAvailable = APIAuditLogChangeData<'available', boolean>; /** * Returned when a sticker's guild_id is changed */ export type APIAuditLogChangeKeyGuildId = APIAuditLogChangeData<'guild_id', Snowflake>; /** * Returned when a thread's archive status is changed */ export type APIAuditLogChangeKeyArchived = APIAuditLogChangeData<'archived', boolean>; /** * Returned when a thread's lock status is changed */ export type APIAuditLogChangeKeyLocked = APIAuditLogChangeData<'locked', boolean>; /** * Returned when a thread's auto archive duration is changed */ export type APIAuditLogChangeKeyAutoArchiveDuration = APIAuditLogChangeData<'auto_archive_duration', number>; /** * Returned when a channel's default auto archive duration for newly created threads is changed */ export type APIAuditLogChangeKeyDefaultAutoArchiveDuration = APIAuditLogChangeData<'default_auto_archive_duration', number>; /** * Returned when entity type of a guild scheduled event is changed */ export type APIAuditLogChangeKeyEntityType = APIAuditLogChangeData<'entity_type', GuildScheduledEventEntityType>; /** * Returned when status of a guild scheduled event is changed */ export type APIAuditLogChangeKeyStatus = APIAuditLogChangeData<'status', GuildScheduledEventStatus>; /** * Returned when location of a guild scheduled event is changed */ export type APIAuditLogChangeKeyLocation = APIAuditLogChangeData<'location', string>; /** * Returned when a user's timeout is changed */ export type APIAuditLogChangeKeyCommunicationDisabledUntil = APIAuditLogChangeData<'communication_disabled_until', string>; /** * Returned when an auto moderation rule's trigger type is changed (only in rule creation or deletion) */ export type APIAuditLogChangeKeyTriggerType = APIAuditLogChangeData<'trigger_type', AutoModerationRuleTriggerType>; /** * Returned when an auto moderation rule's event type is changed */ export type APIAuditLogChangeKeyEventType = APIAuditLogChangeData<'event_type', AutoModerationRuleEventType>; /** * Returned when an auto moderation rule's trigger metadata is changed */ export type APIAuditLogChangeKeyTriggerMetadata = APIAuditLogChangeData<'trigger_metadata', APIAutoModerationRuleTriggerMetadata>; /** * Returned when an auto moderation rule's actions is changed */ export type APIAuditLogChangeKeyActions = APIAuditLogChangeData<'actions', APIAutoModerationAction[]>; /** * Returned when an auto moderation rule's enabled status is changed */ export type APIAuditLogChangeKeyEnabled = APIAuditLogChangeData<'enabled', boolean>; /** * Returned when an auto moderation rule's exempt roles is changed */ export type APIAuditLogChangeKeyExemptRoles = APIAuditLogChangeData<'exempt_roles', Snowflake[]>; /** * Returned when an auto moderation rule's exempt channels is changed */ export type APIAuditLogChangeKeyExemptChannels = APIAuditLogChangeData<'exempt_channels', Snowflake[]>; /** * Returned when a guild forum's available tags gets changed */ export type APIAuditLogChangeKeyAvailableTags = APIAuditLogChangeData<'available_tags', APIGuildForumTag[]>; /** * Returned when a guild forum's default reaction emoji gets changed */ export type APIAuditLogChangeKeyDefaultReactionEmoji = APIAuditLogChangeData<'default_reaction_emoji', APIGuildForumDefaultReactionEmoji>; /** * Returned when a channel flag gets changed */ export type APIAuditLogChangeKeyFlags = APIAuditLogChangeData<'flags', number>; /** * Returned when a thread's amount of seconds a user has to wait before creating another thread * gets changed */ export type APIAuditLogChangeKeyDefaultThreadRateLimitPerUser = APIAuditLogChangeData<'default_thread_rate_limit_per_user', number>; /** * Returned when a soundboard is create or deleted */ export type APIAuditLogChangeKeySoundId = APIAuditLogChangeData<'sound_id', Snowflake>; /** * Returned when a soundboard's volume is changed */ export type APIAuditLogChangeKeyVolume = APIAuditLogChangeData<'volume', number>; /** * Returned when a soundboard's custom emoji is changed */ export type APIAuditLogChangeKeyEmojiId = APIAuditLogChangeData<'emoji_id', Snowflake>; /** * Returned when a soundboard's unicode emoji is changed */ export type APIAuditLogChangeKeyEmojiName = APIAuditLogChangeData<'emoji_name', string>; /** * Returned when a sounboard is created */ export type APIAuditLogChangeKeyUserId = APIAuditLogChangeData<'user_id', Snowflake>; export interface APIAuditLogChangeData<K extends string, D> { key: K; /** * The new value * * If `new_value` is not present in the change object, while `old_value` is, * that means the property that was changed has been reset, or set to `null` */ new_value?: D; old_value?: D; } //# sourceMappingURL=auditLog.d.ts.map node_modules/discord-api-types/payloads/v10/auditLog.d.ts.map 0000664 00000027067 15114741631 0020142 0 ustar 00 {"version":3,"file":"auditLog.d.ts","sourceRoot":"","sources":["auditLog.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC/C,OAAO,KAAK,EACX,uBAAuB,EACvB,qBAAqB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AAC,CAAC;IACP;;;;;OAKG;IACH,SAAS,CAAC,EAAE,CAAC,CAAC;IACd,SAAS,CAAC,EAAE,CAAC,CAAC;CACd"} node_modules/discord-api-types/payloads/v10/webhook.d.ts.map 0000664 00000004350 15114741631 0020016 0 ustar 00 {"version":3,"file":"webhook.d.ts","sourceRoot":"","sources":["webhook.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC/C,OAAO,KAAK,EACX,cAAc,EACd,QAAQ,EACR,OAAO,EACP,qBAAqB,EACrB,0BAA0B,EAC1B,YAAY,EACZ,uBAAuB,EACvB,MAAM,SAAS,CAAC;AAEjB;;GAEG;AACH,MAAM,WAAW,UAAU;IAC1B;;OAEG;IACH,EAAE,EAAE,SAAS,CAAC;IACd;;;;OAIG;IACH,IAAI,EAAE,WAAW,CAAC;IAClB;;OAEG;IACH,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB;;OAEG;IACH,UAAU,EAAE,SAAS,CAAC;IACtB;;;;OAIG;IACH,IAAI,CAAC,EAAE,OAAO,CAAC;IACf;;OAEG;IACH,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IACpB;;OAEG;IACH,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,cAAc,EAAE,SAAS,GAAG,IAAI,CAAC;IACjC;;OAEG;IACH,YAAY,CAAC,EAAE,qBAAqB,CAAC;IACrC;;OAEG;IACH,cAAc,CAAC,EAAE,uBAAuB,CAAC;IACzC;;OAEG;IACH,GAAG,CAAC,EAAE,MAAM,CAAC;CACb;AAED;;GAEG;AACH,MAAM,MAAM,eAAe,GACxB,mBAAmB,CAAC,sBAAsB,CAAC,KAAK,EAAE,mBAAmB,CAAC,GACtE,mBAAmB,CAAC,sBAAsB,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;AAE3D;;GAE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AA2B;IACtC;;OAEG;IACH,qBAAqB,2BAA2B;IAChD;;OAEG;IACH,uBAAuB,6BAA6B;IACpD;;OAEG;IACH,iBAAiB,uBAAuB;IACxC;;OAEG;IACH,mBAAmB,0BAA0B;CAC7C;AAED;;GAEG;AACH,oBAAY,WAAW;IACtB;;OAEG;IACH,QAAQ,IAAI;IACZ;;OAEG;IACH,eAAe,IAAA;IACf;;OAEG;IACH,WAAW,IAAA;CACX"} node_modules/discord-api-types/payloads/v10/monetization.d.ts.map 0000664 00000003611 15114741631 0021077 0 ustar 00 {"version":3,"file":"monetization.d.ts","sourceRoot":"","sources":["monetization.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAE/C;;GAEG;AACH,MAAM,WAAW,cAAc;IAC9B;;OAEG;IACH,EAAE,EAAE,SAAS,CAAC;IACd;;OAEG;IACH,MAAM,EAAE,SAAS,CAAC;IAClB;;OAEG;IACH,OAAO,CAAC,EAAE,SAAS,CAAC;IACpB;;OAEG;IACH,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB;;OAEG;IACH,cAAc,EAAE,SAAS,CAAC;IAC1B;;OAEG;IACH,IAAI,EAAE,eAAe,CAAC;IACtB;;OAEG;IACH,OAAO,EAAE,OAAO,CAAC;IACjB;;OAEG;IACH,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB;;OAEG;IACH,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;CACnB;AAED;;GAEG;AACH,oBAAY,eAAe;IAC1B;;OAEG;IACH,QAAQ,IAAI;IACZ;;OAEG;IACH,mBAAmB,IAAA;IACnB;;OAEG;IACH,aAAa,IAAA;IACb;;OAEG;IACH,gBAAgB,IAAA;IAChB;;OAEG;IACH,YAAY,IAAA;IACZ;;OAEG;IACH,QAAQ,IAAA;IACR;;OAEG;IACH,eAAe,IAAA;IACf;;OAEG;I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AEG;IACH,QAAQ,IAAA;CACR"} node_modules/discord-api-types/payloads/v10/stageInstance.js 0000664 00000001621 15114741631 0020136 0 ustar 00 "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.StageInstancePrivacyLevel = void 0; /** * @see {@link https://discord.com/developers/docs/resources/stage-instance#stage-instance-object-privacy-level} */ var StageInstancePrivacyLevel; (function (StageInstancePrivacyLevel) { /** * The stage instance is visible publicly, such as on stage discovery * * @deprecated * {@link https://github.com/discord/discord-api-docs/pull/4296 | discord-api-docs#4296} */ StageInstancePrivacyLevel[StageInstancePrivacyLevel["Public"] = 1] = "Public"; /** * The stage instance is visible to only guild members */ StageInstancePrivacyLevel[StageInstancePrivacyLevel["GuildOnly"] = 2] = "GuildOnly"; })(StageInstancePrivacyLevel || (exports.StageInstancePrivacyLevel = StageInstancePrivacyLevel = {})); //# sourceMappingURL=stageInstance.js.map node_modules/discord-api-types/payloads/v10/gateway.js.map 0000664 00000001757 15114741631 0017575 0 ustar 00 {"version":3,"file":"gateway.js","sourceRoot":"","sources":["gateway.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;;AAkGH;;GAEG;AACH,IAAY,oBASX;AATD,WAAY,oBAAoB;IAC/B,yCAAiB,CAAA;IACjB,4CAAoB,CAAA;IACpB,qCAAa,CAAA;IACb;;OAEG;IACH,+CAAuB,CAAA;IACvB,2CAAmB,CAAA;AACpB,CAAC,EATW,oBAAoB,oCAApB,oBAAoB,QAS/B;AA2HD;;;GAGG;AACH,IAAY,gBASX;AATD,WAAY,gBAAgB;IAC3B,uCAAmB,CAAA;IACnB,iCAAa,CAAA;IACb,uCAAmB,CAAA;IACnB,+BAAW,CAAA;IACX,uCAAmB,CAAA;IACnB,yCAAqB,CAAA;IACrB,+BAAW,CAAA;IACX,+BAAW,CAAA;AACZ,CAAC,EATW,gBAAgB,gCAAhB,gBAAgB,QAS3B;AAED;;GAEG;AACH,IAAY,YAyBX;AAzBD,WAAY,YAAY;IACvB;;OAEG;IACH,qDAAO,CAAA;IACP;;OAEG;IACH,yDAAS,CAAA;IACT;;OAEG;IACH,yDAAS,CAAA;IACT;;OAEG;IACH,uDAAQ,CAAA;IACR;;OAEG;IACH,mDAAM,CAAA;IACN;;OAEG;IACH,yDAAS,CAAA;AACV,CAAC,EAzBW,YAAY,4BAAZ,YAAY,QAyBvB;AA+CD;;GAEG;AACH,IAAY,aAUX;AAVD,WAAY,aAAa;IACxB,yDAAiB,CAAA;IACjB,iDAAa,CAAA;IACb,yDAAiB,CAAA;IACjB,+DAAoB,CAAA;IACpB,kDAAa,CAAA;IACb,kDAAa,CAAA;IACb,gFAA4B,CAAA;IAC5B,2FAAiC,CAAA;IACjC,2DAAiB,CAAA;AAClB,CAAC,EAVW,aAAa,6BAAb,aAAa,QAUxB"} node_modules/discord-api-types/payloads/v10/soundboard.d.ts.map 0000664 00000001073 15114741631 0020517 0 ustar 00 {"version":3,"file":"soundboard.d.ts","sourceRoot":"","sources":["soundboard.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC/C,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,QAAQ,CAAC;AAEtC;;GAEG;AACH,MAAM,WAAW,kBAAkB;IAClC;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;OAEG;IACH,QAAQ,EAAE,SAAS,CAAC;IACpB;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,QAAQ,EAAE,SAAS,GAAG,IAAI,CAAC;IAC3B;;OAEG;IACH,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B;;OAEG;IACH,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB;;OAEG;IACH,SAAS,EAAE,OAAO,CAAC;IACnB;;OAEG;IACH,IAAI,CAAC,EAAE,OAAO,CAAC;CACf"} node_modules/discord-api-types/payloads/v10/application.d.ts 0000664 00000026756 15114741631 0020125 0 ustar 00 /** * Types extracted from https://discord.com/developers/docs/resources/application */ import type { Permissions, Snowflake } from '../../globals'; import type { LocalizationMap } from '../common'; import type { APIPartialGuild } from './guild'; import type { ApplicationIntegrationType } from './interactions'; import type { OAuth2Scopes } from './oauth2'; import type { APITeam } from './teams'; import type { APIUser } from './user'; import type { ApplicationWebhookEventType } from './webhook'; /** * @see {@link https://discord.com/developers/docs/resources/application#application-object} */ export interface APIApplication { /** * The id of the app */ id: Snowflake; /** * The name of the app */ name: string; /** * The icon hash of the app */ icon: string | null; /** * The description of the app */ description: string; /** * An array of rpc origin urls, if rpc is enabled */ rpc_origins?: string[]; /** * When `false` only app owner can join the app's bot to guilds */ bot_public: boolean; /** * When `true` the app's bot will only join upon completion of the full oauth2 code grant flow */ bot_require_code_grant: boolean; /** * Partial user object for the bot user associated with the application */ bot?: APIUser; /** * The url of the application's terms of service */ terms_of_service_url?: string; /** * The url of the application's privacy policy */ privacy_policy_url?: string; /** * Partial user object containing info on the owner of the application * * @see {@link https://discord.com/developers/docs/resources/user#user-object} */ owner?: APIUser; /** * An empty string * * @deprecated This field will be removed in v11 * @unstable This field is no longer documented by Discord and will be removed in v11 */ summary: ''; /** * The hexadecimal encoded key for verification in interactions and the GameSDK's GetTicket function * * @see {@link https://discord.com/developers/docs/game-sdk/applications#getticket} */ verify_key: string; /** * The team this application belongs to * * @see {@link https://discord.com/developers/docs/topics/teams#data-models-team-object} */ team: APITeam | null; /** * If this application is a game sold on Discord, this field will be the guild to which it has been linked */ guild_id?: Snowflake; /** * A partial object of the associated guild */ guild?: APIPartialGuild; /** * If this application is a game sold on Discord, this field will be the id of the "Game SKU" that is created, if exists */ primary_sku_id?: Snowflake; /** * If this application is a game sold on Discord, this field will be the URL slug that links to the store page */ slug?: string; /** * If this application is a game sold on Discord, this field will be the hash of the image on store embeds */ cover_image?: string; /** * The application's public flags * * @see {@link https://discord.com/developers/docs/resources/application#application-object-application-flags} */ flags: ApplicationFlags; /** * Approximate count of guilds the application has been added to */ approximate_guild_count?: number; /** * Approximate count of users that have installed the app (authorized with `application.commands` as a scope) */ approximate_user_install_count?: number; /** * Approximate count of users that have OAuth2 authorizations for the app */ approximate_user_authorization_count?: number; /** * Array of redirect URIs for the application */ redirect_uris?: string[]; /** * The interactions endpoint URL for the application */ interactions_endpoint_url?: string | null; /** * The application's role connection verification entry point, * which when configured will render the app as a verification method in the guild role verification configuration */ role_connections_verification_url?: string | null; /** * Up to 5 tags of max 20 characters each describing the content and functionality of the application */ tags?: [string, string?, string?, string?, string?]; /** * Settings for the application's default in-app authorization link, if enabled */ install_params?: APIApplicationInstallParams; /** * Default scopes and permissions for each supported installation context. Value for each key is an integration type configuration object */ integration_types_config?: APIApplicationIntegrationTypesConfigMap; /** * The application's default custom authorization link, if enabled */ custom_install_url?: string; /** * Event webhook URL for the app to receive webhook events */ event_webhooks_url?: string | null; /** * If webhook events are enabled for the app */ event_webhooks_status: ApplicationWebhookEventStatus; /** * List of webhook event types the app subscribes to */ event_webhooks_types?: ApplicationWebhookEventType[]; } export interface APIApplicationInstallParams { scopes: OAuth2Scopes[]; permissions: Permissions; } export interface APIApplicationIntegrationTypeConfiguration { oauth2_install_params?: APIApplicationInstallParams; } export type APIApplicationIntegrationTypesConfigMap = { [key in ApplicationIntegrationType]?: APIApplicationIntegrationTypeConfiguration; }; /** * @see {@link https://discord.com/developers/docs/resources/application#application-object-application-flags} */ export declare enum ApplicationFlags { /** * @unstable This application flag is currently not documented by Discord but has a known value which we will try to keep up to date. */ EmbeddedReleased = 2, /** * @unstable This application flag is currently not documented by Discord but has a known value which we will try to keep up to date. */ ManagedEmoji = 4, /** * @unstable This application flag is currently not documented by Discord but has a known value which we will try to keep up to date. */ EmbeddedIAP = 8, /** * @unstable This application flag is currently not documented by Discord but has a known value which we will try to keep up to date. */ GroupDMCreate = 16, /** * Indicates if an app uses the Auto Moderation API */ ApplicationAutoModerationRuleCreateBadge = 64, /** * @unstable This application flag is currently not documented by Discord but has a known value which we will try to keep up to date. */ RPCHasConnected = 2048, /** * Intent required for bots in 100 or more servers to receive `presence_update` events */ GatewayPresence = 4096, /** * Intent required for bots in under 100 servers to receive `presence_update` events, found in Bot Settings */ GatewayPresenceLimited = 8192, /** * Intent required for bots in 100 or more servers to receive member-related events like `guild_member_add`. * * @see List of member-related events {@link https://discord.com/developers/docs/topics/gateway#list-of-intents | under `GUILD_MEMBERS`} */ GatewayGuildMembers = 16384, /** * Intent required for bots in under 100 servers to receive member-related events like `guild_member_add`, found in Bot Settings. * * @see List of member-related events {@link https://discord.com/developers/docs/topics/gateway#list-of-intents | under `GUILD_MEMBERS`} */ GatewayGuildMembersLimited = 32768, /** * Indicates unusual growth of an app that prevents verification */ VerificationPendingGuildLimit = 65536, /** * Indicates if an app is embedded within the Discord client (currently unavailable publicly) */ Embedded = 131072, /** * Intent required for bots in 100 or more servers to receive {@link https://support-dev.discord.com/hc/articles/6207308062871 | message content} */ GatewayMessageContent = 262144, /** * Intent required for bots in under 100 servers to receive {@link https://support-dev.discord.com/hc/articles/6207308062871 | message content}, * found in Bot Settings */ GatewayMessageContentLimited = 524288, /** * @unstable This application flag is currently not documented by Discord but has a known value which we will try to keep up to date. */ EmbeddedFirstParty = 1048576, /** * Indicates if an app has registered global {@link https://discord.com/developers/docs/interactions/application-commands | application commands} */ ApplicationCommandBadge = 8388608 } /** * @see {@link https://discord.com/developers/docs/resources/application-role-connection-metadata#application-role-connection-metadata-object-application-role-connection-metadata-structure} */ export interface APIApplicationRoleConnectionMetadata { /** * Type of metadata value */ type: ApplicationRoleConnectionMetadataType; /** * Dictionary key for the metadata field (must be `a-z`, `0-9`, or `_` characters; 1-50 characters) */ key: string; /** * Name of the metadata field (1-100 characters) */ name: string; /** * Translations of the name */ name_localizations?: LocalizationMap; /** * Description of the metadata field (1-200 characters) */ description: string; /** * Translations of the description */ description_localizations?: LocalizationMap; } /** * @see {@link https://discord.com/developers/docs/resources/application-role-connection-metadata#application-role-connection-metadata-object-application-role-connection-metadata-type} */ export declare enum ApplicationRoleConnectionMetadataType { /** * The metadata value (`integer`) is less than or equal to the guild's configured value (`integer`) */ IntegerLessThanOrEqual = 1, /** * The metadata value (`integer`) is greater than or equal to the guild's configured value (`integer`) */ IntegerGreaterThanOrEqual = 2, /** * The metadata value (`integer`) is equal to the guild's configured value (`integer`) */ IntegerEqual = 3, /** * The metadata value (`integer`) is not equal to the guild's configured value (`integer`) */ IntegerNotEqual = 4, /** * The metadata value (`ISO8601 string`) is less than or equal to the guild's configured value (`integer`; days before current date) */ DatetimeLessThanOrEqual = 5, /** * The metadata value (`ISO8601 string`) is greater than or equal to the guild's configured value (`integer`; days before current date) */ DatetimeGreaterThanOrEqual = 6, /** * The metadata value (`integer`) is equal to the guild's configured value (`integer`; `1`) */ BooleanEqual = 7, /** * The metadata value (`integer`) is not equal to the guild's configured value (`integer`; `1`) */ BooleanNotEqual = 8 } /** * @see {@link https://discord.com/developers/docs/resources/application#application-object-application-event-webhook-status} */ export declare enum ApplicationWebhookEventStatus { /** * Webhook events are disabled by developer */ Disabled = 1, /** * Webhook events are enabled by developer */ Enabled = 2, /** * Webhook events are disabled by Discord, usually due to inactivity */ DisabledByDiscord = 3 } //# sourceMappingURL=application.d.ts.map node_modules/discord-api-types/payloads/v10/index.mjs 0000664 00000012455 15114741631 0016641 0 ustar 00 import mod from "./index.js"; export default mod; export const APIApplicationCommandPermissionsConstant = mod.APIApplicationCommandPermissionsConstant; export const ActivityFlags = mod.ActivityFlags; export const ActivityPlatform = mod.ActivityPlatform; export const ActivityType = mod.ActivityType; export const AllowedMentionsTypes = mod.AllowedMentionsTypes; export const ApplicationCommandOptionType = mod.ApplicationCommandOptionType; export const ApplicationCommandPermissionType = mod.ApplicationCommandPermissionType; export const ApplicationCommandType = mod.ApplicationCommandType; export const ApplicationFlags = mod.ApplicationFlags; export const ApplicationIntegrationType = mod.ApplicationIntegrationType; export const ApplicationRoleConnectionMetadataType = mod.ApplicationRoleConnectionMetadataType; export const ApplicationWebhookEventStatus = mod.ApplicationWebhookEventStatus; export const ApplicationWebhookEventType = mod.ApplicationWebhookEventType; export const ApplicationWebhookType = mod.ApplicationWebhookType; export const AttachmentFlags = mod.AttachmentFlags; export const AuditLogEvent = mod.AuditLogEvent; export const AuditLogOptionsType = mod.AuditLogOptionsType; export const AutoModerationActionType = mod.AutoModerationActionType; export const AutoModerationRuleEventType = mod.AutoModerationRuleEventType; export const AutoModerationRuleKeywordPresetType = mod.AutoModerationRuleKeywordPresetType; export const AutoModerationRuleTriggerType = mod.AutoModerationRuleTriggerType; export const ButtonStyle = mod.ButtonStyle; export const ChannelFlags = mod.ChannelFlags; export const ChannelType = mod.ChannelType; export const ComponentType = mod.ComponentType; export const ConnectionService = mod.ConnectionService; export const ConnectionVisibility = mod.ConnectionVisibility; export const EmbedType = mod.EmbedType; export const EntitlementType = mod.EntitlementType; export const EntryPointCommandHandlerType = mod.EntryPointCommandHandlerType; export const ForumLayoutType = mod.ForumLayoutType; export const GuildDefaultMessageNotifications = mod.GuildDefaultMessageNotifications; export const GuildExplicitContentFilter = mod.GuildExplicitContentFilter; export const GuildFeature = mod.GuildFeature; export const GuildHubType = mod.GuildHubType; export const GuildMFALevel = mod.GuildMFALevel; export const GuildMemberFlags = mod.GuildMemberFlags; export const GuildNSFWLevel = mod.GuildNSFWLevel; export const GuildOnboardingMode = mod.GuildOnboardingMode; export const GuildOnboardingPromptType = mod.GuildOnboardingPromptType; export const GuildPremiumTier = mod.GuildPremiumTier; export const GuildScheduledEventEntityType = mod.GuildScheduledEventEntityType; export const GuildScheduledEventPrivacyLevel = mod.GuildScheduledEventPrivacyLevel; export const GuildScheduledEventRecurrenceRuleFrequency = mod.GuildScheduledEventRecurrenceRuleFrequency; export const GuildScheduledEventRecurrenceRuleMonth = mod.GuildScheduledEventRecurrenceRuleMonth; export const GuildScheduledEventRecurrenceRuleWeekday = mod.GuildScheduledEventRecurrenceRuleWeekday; export const GuildScheduledEventStatus = mod.GuildScheduledEventStatus; export const GuildSystemChannelFlags = mod.GuildSystemChannelFlags; export const GuildVerificationLevel = mod.GuildVerificationLevel; export const GuildWidgetStyle = mod.GuildWidgetStyle; export const IntegrationExpireBehavior = mod.IntegrationExpireBehavior; export const InteractionContextType = mod.InteractionContextType; export const InteractionResponseType = mod.InteractionResponseType; export const InteractionType = mod.InteractionType; export const InviteTargetType = mod.InviteTargetType; export const InviteType = mod.InviteType; export const MembershipScreeningFieldType = mod.MembershipScreeningFieldType; export const MessageActivityType = mod.MessageActivityType; export const MessageFlags = mod.MessageFlags; export const MessageReferenceType = mod.MessageReferenceType; export const MessageType = mod.MessageType; export const NameplatePalette = mod.NameplatePalette; export const OAuth2Scopes = mod.OAuth2Scopes; export const OverwriteType = mod.OverwriteType; export const PermissionFlagsBits = mod.PermissionFlagsBits; export const PollLayoutType = mod.PollLayoutType; export const PresenceUpdateStatus = mod.PresenceUpdateStatus; export const RoleFlags = mod.RoleFlags; export const SKUFlags = mod.SKUFlags; export const SKUType = mod.SKUType; export const SelectMenuDefaultValueType = mod.SelectMenuDefaultValueType; export const SeparatorSpacingSize = mod.SeparatorSpacingSize; export const SortOrderType = mod.SortOrderType; export const StageInstancePrivacyLevel = mod.StageInstancePrivacyLevel; export const StickerFormatType = mod.StickerFormatType; export const StickerType = mod.StickerType; export const SubscriptionStatus = mod.SubscriptionStatus; export const TeamMemberMembershipState = mod.TeamMemberMembershipState; export const TeamMemberRole = mod.TeamMemberRole; export const TextInputStyle = mod.TextInputStyle; export const ThreadAutoArchiveDuration = mod.ThreadAutoArchiveDuration; export const ThreadMemberFlags = mod.ThreadMemberFlags; export const UnfurledMediaItemLoadingState = mod.UnfurledMediaItemLoadingState; export const UserFlags = mod.UserFlags; export const UserPremiumType = mod.UserPremiumType; export const VideoQualityMode = mod.VideoQualityMode; export const WebhookType = mod.WebhookType; node_modules/discord-api-types/payloads/v10/invite.js.map 0000664 00000000547 15114741631 0017426 0 ustar 00 {"version":3,"file":"invite.js","sourceRoot":"","sources":["invite.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AAiGH;;GAEG;AACH,IAAY,UAIX;AAJD,WAAY,UAAU;IACrB,6CAAK,CAAA;IACL,iDAAO,CAAA;IACP,+CAAM,CAAA;AACP,CAAC,EAJW,UAAU,0BAAV,UAAU,QAIrB;AAED;;GAEG;AACH,IAAY,gBAGX;AAHD,WAAY,gBAAgB;IAC3B,2DAAU,CAAA;IACV,qFAAmB,CAAA;AACpB,CAAC,EAHW,gBAAgB,gCAAhB,gBAAgB,QAG3B"} node_modules/discord-api-types/payloads/v10/index.js.map 0000664 00000000544 15114741631 0017234 0 ustar 00 {"version":3,"file":"index.js","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,4CAA0B;AAC1B,gDAA8B;AAC9B,6CAA2B;AAC3B,mDAAiC;AACjC,4CAA0B;AAE1B,4CAA0B;AAC1B,0CAAwB;AACxB,wDAAsC;AACtC,iDAA+B;AAC/B,2CAAyB;AACzB,iDAA+B;AAC/B,2CAAyB;AACzB,gDAA8B;AAC9B,yCAAuB;AAEvB,kDAAgC;AAChC,4CAA0B;AAC1B,0CAAwB;AAExB,yCAAuB;AAEvB,4CAA0B"} node_modules/discord-api-types/payloads/v10/voice.d.ts 0000664 00000005013 15114741631 0016706 0 ustar 00 /** * Types extracted from https://discord.com/developers/docs/resources/voice */ import type { Snowflake } from '../../globals'; import type { APIGuildMember } from './guild'; /** * @see {@link https://discord.com/developers/docs/resources/voice#voice-state-object} * @deprecated This is deprecated, use {@link APIVoiceState} */ export type GatewayVoiceState = APIVoiceState; /** * @see {@link https://discord.com/developers/docs/resources/voice#voice-state-object} */ export interface APIBaseVoiceState { /** * The channel id this user is connected to */ channel_id: Snowflake | null; /** * The user id this voice state is for */ user_id: Snowflake; /** * The guild member this voice state is for * * @see {@link https://discord.com/developers/docs/resources/guild#guild-member-object} */ member?: APIGuildMember; /** * The session id for this voice state */ session_id: string; /** * Whether this user is deafened by the server */ deaf: boolean; /** * Whether this user is muted by the server */ mute: boolean; /** * Whether this user is locally deafened */ self_deaf: boolean; /** * Whether this user is locally muted */ self_mute: boolean; /** * Whether this user is streaming using "Go Live" */ self_stream?: boolean; /** * Whether this user's camera is enabled */ self_video: boolean; /** * Whether this user is muted by the current user */ suppress: boolean; /** * The time at which the user requested to speak */ request_to_speak_timestamp: string | null; } /** * @see {@link https://discord.com/developers/docs/resources/voice#voice-state-object} */ export interface APIVoiceState extends APIBaseVoiceState { /** * The guild id this voice state is for */ guild_id?: Snowflake; } /** * @see {@link https://discord.com/developers/docs/resources/voice#voice-region-object} */ export interface APIVoiceRegion { /** * Unique ID for the region */ id: string; /** * Name of the region */ name: string; /** * `true` for a single server that is closest to the current user's client */ optimal: boolean; /** * Whether this is a deprecated voice region (avoid switching to these) */ deprecated: boolean; /** * Whether this is a custom voice region (used for events/etc) */ custom: boolean; } //# sourceMappingURL=voice.d.ts.map node_modules/discord-api-types/payloads/v10/permissions.d.ts 0000664 00000004305 15114741631 0020157 0 ustar 00 /** * Types extracted from https://discord.com/developers/docs/topics/permissions */ import type { Permissions, Snowflake } from '../../globals'; /** * @see {@link https://discord.com/developers/docs/topics/permissions#role-object} */ export interface APIRole { /** * Role id */ id: Snowflake; /** * Role name */ name: string; /** * Integer representation of hexadecimal color code */ color: number; /** * If this role is pinned in the user listing */ hoist: boolean; /** * The role icon hash */ icon?: string | null; /** * The role unicode emoji as a standard emoji */ unicode_emoji?: string | null; /** * Position of this role */ position: number; /** * Permission bit set * * @see {@link https://en.wikipedia.org/wiki/Bit_field} */ permissions: Permissions; /** * Whether this role is managed by an integration */ managed: boolean; /** * Whether this role is mentionable */ mentionable: boolean; /** * The tags this role has */ tags?: APIRoleTags; /** * Role flags */ flags: RoleFlags; } /** * @see {@link https://discord.com/developers/docs/topics/permissions#role-object-role-tags-structure} */ export interface APIRoleTags { /** * The id of the bot this role belongs to */ bot_id?: Snowflake; /** * Whether this is the guild's premium subscriber role */ premium_subscriber?: null; /** * The id of the integration this role belongs to */ integration_id?: Snowflake; /** * The id of this role's subscription sku and listing */ subscription_listing_id?: Snowflake; /** * Whether this role is available for purchase */ available_for_purchase?: null; /** * Whether this role is a guild's linked role */ guild_connections?: null; } /** * @see {@link https://discord.com/developers/docs/topics/permissions#role-object-role-flags} */ export declare enum RoleFlags { /** * Role can be selected by members in an onboarding prompt */ InPrompt = 1 } //# sourceMappingURL=permissions.d.ts.map node_modules/discord-api-types/payloads/v10/invite.d.ts 0000664 00000010056 15114741631 0017102 0 ustar 00 /** * Types extracted from https://discord.com/developers/docs/resources/invite */ import type { APIApplication } from './application'; import type { APIInviteChannel } from './channel'; import type { APIGuild } from './guild'; import type { APIGuildScheduledEvent } from './guildScheduledEvent'; import type { APIInviteStageInstance } from './stageInstance'; import type { APIUser } from './user'; export type APIInviteGuild = Pick<APIGuild, 'banner' | 'description' | 'features' | 'icon' | 'id' | 'name' | 'nsfw_level' | 'premium_subscription_count' | 'splash' | 'vanity_url_code' | 'verification_level'>; /** * @see {@link https://discord.com/developers/docs/resources/invite#invite-object} */ export interface APIInvite { /** * The invite code (unique ID) */ code: string; /** * The guild this invite is for * * @see {@link https://discord.com/developers/docs/resources/guild#guild-object} */ guild?: APIInviteGuild; /** * The channel this invite is for * * @see {@link https://discord.com/developers/docs/resources/channel#channel-object} */ channel: APIInviteChannel | null; /** * The user who created the invite * * @see {@link https://discord.com/developers/docs/resources/user#user-object} */ inviter?: APIUser; /** * The type of target for this voice channel invite * * @see {@link https://discord.com/developers/docs/resources/invite#invite-object-invite-target-types} */ target_type?: InviteTargetType; /** * The user whose stream to display for this voice channel stream invite * * @see {@link https://discord.com/developers/docs/resources/user#user-object} */ target_user?: APIUser; /** * The embedded application to open for this voice channel embedded application invite * * @see {@link https://discord.com/developers/docs/resources/application#application-object} */ target_application?: Partial<APIApplication>; /** * Approximate count of online members, returned from the `GET /invites/<code>` endpoint when `with_counts` is `true` */ approximate_presence_count?: number; /** * Approximate count of total members, returned from the `GET /invites/<code>` endpoint when `with_counts` is `true` */ approximate_member_count?: number; /** * The expiration date of this invite, returned from the `GET /invites/<code>` endpoint when `with_expiration` is `true` */ expires_at?: string | null; /** * The stage instance data if there is a public stage instance in the stage channel this invite is for * * @deprecated * {@link https://github.com/discord/discord-api-docs/pull/4479 | discord-api-docs#4479} */ stage_instance?: APIInviteStageInstance; /** * The guild scheduled event data, returned from the `GET /invites/<code>` endpoint when `guild_scheduled_event_id` is a valid guild scheduled event id */ guild_scheduled_event?: APIGuildScheduledEvent; /** * The invite type */ type: InviteType; } /** * @see {@link https://discord.com/developers/docs/resources/invite#invite-object-invite-types} */ export declare enum InviteType { Guild = 0, GroupDM = 1, Friend = 2 } /** * @see {@link https://discord.com/developers/docs/resources/invite#invite-object-invite-target-types} */ export declare enum InviteTargetType { Stream = 1, EmbeddedApplication = 2 } /** * @see {@link https://discord.com/developers/docs/resources/invite#invite-metadata-object} */ export interface APIExtendedInvite extends APIInvite { /** * Number of times this invite has been used */ uses: number; /** * Max number of times this invite can be used */ max_uses: number; /** * Duration (in seconds) after which the invite expires */ max_age: number; /** * Whether this invite only grants temporary membership */ temporary: boolean; /** * When this invite was created */ created_at: string; } //# sourceMappingURL=invite.d.ts.map node_modules/discord-api-types/payloads/v10/user.d.ts 0000664 00000026057 15114741631 0016572 0 ustar 00 /** * Types extracted from https://discord.com/developers/docs/resources/user */ import type { Snowflake } from '../../globals'; import type { APIGuildIntegration } from './guild'; /** * @see {@link https://discord.com/developers/docs/resources/user#user-object} */ export interface APIUser { /** * The user's id */ id: Snowflake; /** * The user's username, not unique across the platform */ username: string; /** * The user's Discord-tag */ discriminator: string; /** * The user's display name, if it is set. For bots, this is the application name */ global_name: string | null; /** * The user's avatar hash * * @see {@link https://discord.com/developers/docs/reference#image-formatting} */ avatar: string | null; /** * Whether the user belongs to an OAuth2 application */ bot?: boolean; /** * Whether the user is an Official Discord System user (part of the urgent message system) */ system?: boolean; /** * Whether the user has two factor enabled on their account */ mfa_enabled?: boolean; /** * The user's banner hash * * @see {@link https://discord.com/developers/docs/reference#image-formatting} */ banner?: string | null; /** * The user's banner color encoded as an integer representation of hexadecimal color code */ accent_color?: number | null; /** * The user's chosen language option */ locale?: string; /** * Whether the email on this account has been verified */ verified?: boolean; /** * The user's email */ email?: string | null; /** * The flags on a user's account * * @see {@link https://discord.com/developers/docs/resources/user#user-object-user-flags} */ flags?: UserFlags; /** * The type of Nitro subscription on a user's account * * @see {@link https://discord.com/developers/docs/resources/user#user-object-premium-types} */ premium_type?: UserPremiumType; /** * The public flags on a user's account * * @see {@link https://discord.com/developers/docs/resources/user#user-object-user-flags} */ public_flags?: UserFlags; /** * The user's avatar decoration hash * * @see {@link https://discord.com/developers/docs/reference#image-formatting} * @deprecated Use {@link APIUser.avatar_decoration_data} instead */ avatar_decoration?: string | null; /** * The data for the user's avatar decoration * * @see {@link https://discord.com/developers/docs/resources/user#avatar-decoration-data-object} */ avatar_decoration_data?: APIAvatarDecorationData | null; /** * The data for the user's collectibles * * @see {@link https://discord.com/developers/docs/resources/user#collectibles} */ collectibles?: APICollectibles | null; } /** * @see {@link https://discord.com/developers/docs/resources/user#user-object-user-flags} */ export declare enum UserFlags { /** * Discord Employee */ Staff = 1, /** * Partnered Server Owner */ Partner = 2, /** * HypeSquad Events Member */ Hypesquad = 4, /** * Bug Hunter Level 1 */ BugHunterLevel1 = 8, /** * @unstable This user flag is currently not documented by Discord but has a known value which we will try to keep up to date. */ MFASMS = 16, /** * @unstable This user flag is currently not documented by Discord but has a known value which we will try to keep up to date. */ PremiumPromoDismissed = 32, /** * House Bravery Member */ HypeSquadOnlineHouse1 = 64, /** * House Brilliance Member */ HypeSquadOnlineHouse2 = 128, /** * House Balance Member */ HypeSquadOnlineHouse3 = 256, /** * Early Nitro Supporter */ PremiumEarlySupporter = 512, /** * User is a {@link https://discord.com/developers/docs/topics/teams | team} */ TeamPseudoUser = 1024, /** * @unstable This user flag is currently not documented by Discord but has a known value which we will try to keep up to date. */ HasUnreadUrgentMessages = 8192, /** * Bug Hunter Level 2 */ BugHunterLevel2 = 16384, /** * Verified Bot */ VerifiedBot = 65536, /** * Early Verified Bot Developer */ VerifiedDeveloper = 131072, /** * Moderator Programs Alumni */ CertifiedModerator = 262144, /** * Bot uses only {@link https://discord.com/developers/docs/interactions/receiving-and-responding#receiving-an-interaction | HTTP interactions} and is shown in the online member list */ BotHTTPInteractions = 524288, /** * User has been identified as spammer * * @unstable This user flag is currently not documented by Discord but has a known value which we will try to keep up to date. */ Spammer = 1048576, /** * @unstable This user flag is currently not documented by Discord but has a known value which we will try to keep up to date. */ DisablePremium = 2097152, /** * User is an {@link https://support-dev.discord.com/hc/articles/10113997751447 | Active Developer} */ ActiveDeveloper = 4194304, /** * User's account has been {@link https://support.discord.com/hc/articles/6461420677527 | quarantined} based on recent activity * * @unstable This user flag is currently not documented by Discord but has a known value which we will try to keep up to date. * @privateRemarks * * This value would be `1 << 44`, but bit shifting above `1 << 30` requires bigints */ Quarantined = 17592186044416, /** * @unstable This user flag is currently not documented by Discord but has a known value which we will try to keep up to date. * @privateRemarks * * This value would be `1 << 50`, but bit shifting above `1 << 30` requires bigints */ Collaborator = 1125899906842624, /** * @unstable This user flag is currently not documented by Discord but has a known value which we will try to keep up to date. * @privateRemarks * * This value would be `1 << 51`, but bit shifting above `1 << 30` requires bigints */ RestrictedCollaborator = 2251799813685248 } /** * @see {@link https://discord.com/developers/docs/resources/user#user-object-premium-types} */ export declare enum UserPremiumType { None = 0, NitroClassic = 1, Nitro = 2, NitroBasic = 3 } /** * @see {@link https://discord.com/developers/docs/resources/user#connection-object} */ export interface APIConnection { /** * ID of the connection account */ id: string; /** * The username of the connection account */ name: string; /** * The service of the connection * * @see {@link https://discord.com/developers/docs/resources/user#connection-object-services} */ type: ConnectionService; /** * Whether the connection is revoked */ revoked?: boolean; /** * An array of partial server integrations * * @see {@link https://discord.com/developers/docs/resources/guild#integration-object} */ integrations?: Partial<APIGuildIntegration>[]; /** * Whether the connection is verified */ verified: boolean; /** * Whether friend sync is enabled for this connection */ friend_sync: boolean; /** * Whether activities related to this connection will be shown in presence updates */ show_activity: boolean; /** * Whether this connection supports console voice transfer */ two_way_link: boolean; /** * Visibility of this connection * * @see {@link https://discord.com/developers/docs/resources/user#connection-object-visibility-types} */ visibility: ConnectionVisibility; } export declare enum ConnectionService { AmazonMusic = "amazon-music", BattleNet = "battlenet", Bluesky = "bluesky", BungieNet = "bungie", Crunchyroll = "crunchyroll", Domain = "domain", eBay = "ebay", EpicGames = "epicgames", Facebook = "facebook", GitHub = "github", Instagram = "instagram", LeagueOfLegends = "leagueoflegends", Mastodon = "mastodon", PayPal = "paypal", PlayStationNetwork = "playstation", Reddit = "reddit", RiotGames = "riotgames", Roblox = "roblox", Spotify = "spotify", Skype = "skype", Steam = "steam", TikTok = "tiktok", Twitch = "twitch", X = "twitter", /** * @deprecated This is the old name for {@link ConnectionService.X} */ Twitter = "twitter", Xbox = "xbox", YouTube = "youtube" } export declare enum ConnectionVisibility { /** * Invisible to everyone except the user themselves */ None = 0, /** * Visible to everyone */ Everyone = 1 } /** * @see {@link https://discord.com/developers/docs/resources/user#application-role-connection-object-application-role-connection-structure} */ export interface APIApplicationRoleConnection { /** * The vanity name of the platform a bot has connected (max 50 characters) */ platform_name: string | null; /** * The username on the platform a bot has connected (max 100 characters) */ platform_username: string | null; /** * Object mapping application role connection metadata keys to their `string`-ified value (max 100 characters) for the user on the platform a bot has connected */ metadata: Record<string, number | string>; } /** * @see {@link https://discord.com/developers/docs/resources/user#avatar-decoration-data-object} */ export interface APIAvatarDecorationData { /** * The avatar decoration hash * * @see {@link https://discord.com/developers/docs/reference#image-formatting} */ asset: string; /** * The id of the avatar decoration's SKU */ sku_id: Snowflake; } /** * The collectibles the user has, excluding Avatar Decorations and Profile Effects. * * @see {@link https://discord.com/developers/docs/resources/user#collectibles} */ export interface APICollectibles { /** * Object mapping of {@link APINameplateData} */ nameplate?: APINameplateData; } /** * @see {@link https://discord.com/developers/docs/resources/user#nameplate} */ export interface APINameplateData { /** * ID of the nameplate SKU */ sku_id: Snowflake; /** * Path to the nameplate asset * * @example `nameplates/nameplates/twilight/` */ asset: string; /** * The label of this nameplate. Currently unused */ label: string; /** * Background color of the nameplate */ palette: NameplatePalette; } /** * Background color of a nameplate. */ export declare enum NameplatePalette { Berry = "berry", BubbleGum = "bubble_gum", Clover = "clover", Cobalt = "cobalt", Crimson = "crimson", Forest = "forest", Lemon = "lemon", Sky = "sky", Teal = "teal", Violet = "violet", White = "white" } //# sourceMappingURL=user.d.ts.map node_modules/discord-api-types/payloads/v10/index.js 0000664 00000003215 15114741631 0016456 0 ustar 00 "use strict"; var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { if (k2 === undefined) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { return m[k]; } }; } Object.defineProperty(o, k2, desc); }) : (function(o, m, k, k2) { if (k2 === undefined) k2 = k; o[k2] = m[k]; })); var __exportStar = (this && this.__exportStar) || function(m, exports) { for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); }; Object.defineProperty(exports, "__esModule", { value: true }); __exportStar(require("../common"), exports); __exportStar(require("./application"), exports); __exportStar(require("./auditLog"), exports); __exportStar(require("./autoModeration"), exports); __exportStar(require("./channel"), exports); __exportStar(require("./gateway"), exports); __exportStar(require("./guild"), exports); __exportStar(require("./guildScheduledEvent"), exports); __exportStar(require("./interactions"), exports); __exportStar(require("./invite"), exports); __exportStar(require("./monetization"), exports); __exportStar(require("./oauth2"), exports); __exportStar(require("./permissions"), exports); __exportStar(require("./poll"), exports); __exportStar(require("./stageInstance"), exports); __exportStar(require("./sticker"), exports); __exportStar(require("./teams"), exports); __exportStar(require("./user"), exports); __exportStar(require("./webhook"), exports); //# sourceMappingURL=index.js.map node_modules/discord-api-types/payloads/v10/permissions.d.ts.map 0000664 00000002026 15114741631 0020731 0 ustar 00 {"version":3,"file":"permissions.d.ts","sourceRoot":"","sources":["permissions.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAE5D;;GAEG;AACH,MAAM,WAAW,OAAO;IACvB;;OAEG;IACH,EAAE,EAAE,SAAS,CAAC;IACd;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,KAAK,EAAE,OAAO,CAAC;IACf;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB;;OAEG;IACH,aAAa,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC9B;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC;IACjB;;;;OAIG;IACH,WAAW,EAAE,WAAW,CAAC;IACzB;;OAEG;IACH,OAAO,EAAE,OAAO,CAAC;IACjB;;OAEG;IACH,WAAW,EAAE,OAAO,CAAC;IACrB;;OAEG;IACH,IAAI,CAAC,EAAE,WAAW,CAAC;IACnB;;OAEG;IACH,KAAK,EAAE,SAAS,CAAC;CACjB;AAED;;GAEG;AACH,MAAM,WAAW,WAAW;IAC3B;;OAEG;IACH,MAAM,CAAC,EAAE,SAAS,CAAC;IACnB;;OAEG;IACH,kBAAkB,CAAC,EAAE,IAAI,CAAC;IAC1B;;OAEG;IACH,cAAc,CAAC,EAAE,SAAS,CAAC;IAC3B;;OAEG;IACH,uBAAuB,CAAC,EAAE,SAAS,CAAC;IACpC;;OAEG;IACH,sBAAsB,CAAC,EAAE,IAAI,CAAC;IAC9B;;OAEG;IACH,iBAAiB,CAAC,EAAE,IAAI,CAAC;CACzB;AAED;;GAEG;AACH,oBAAY,SAAS;IACpB;;OAEG;IACH,QAAQ,IAAS;CACjB"} node_modules/discord-api-types/payloads/v10/voice.d.ts.map 0000664 00000002063 15114741631 0017464 0 ustar 00 {"version":3,"file":"voice.d.ts","sourceRoot":"","sources":["voice.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC/C,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAE9C;;;GAGG;AACH,MAAM,MAAM,iBAAiB,GAAG,aAAa,CAAC;AAE9C;;GAEG;AACH,MAAM,WAAW,iBAAiB;IACjC;;OAEG;IACH,UAAU,EAAE,SAAS,GAAG,IAAI,CAAC;IAC7B;;OAEG;IACH,OAAO,EAAE,SAAS,CAAC;IACnB;;;;OAIG;IACH,MAAM,CAAC,EAAE,cAAc,CAAC;IACxB;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC;IACnB;;OAEG;IACH,IAAI,EAAE,OAAO,CAAC;IACd;;OAEG;IACH,IAAI,EAAE,OAAO,CAAC;IACd;;OAEG;IACH,SAAS,EAAE,OAAO,CAAC;IACnB;;OAEG;IACH,SAAS,EAAE,OAAO,CAAC;IACnB;;OAEG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB;;OAEG;IACH,UAAU,EAAE,OAAO,CAAC;IACpB;;OAEG;IACH,QAAQ,EAAE,OAAO,CAAC;IAClB;;OAEG;IACH,0BAA0B,EAAE,MAAM,GAAG,IAAI,CAAC;CAC1C;AAED;;GAEG;AACH,MAAM,WAAW,aAAc,SAAQ,iBAAiB;IACvD;;OAEG;IACH,QAAQ,CAAC,EAAE,SAAS,CAAC;CACrB;AAED;;GAEG;AACH,MAAM,WAAW,cAAc;IAC9B;;OAEG;IACH,EAAE,EAAE,MAAM,CAAC;IACX;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;OAEG;IACH,OAAO,EAAE,OAAO,CAAC;IACjB;;OAEG;IACH,UAAU,EAAE,OAAO,CAAC;IACpB;;OAEG;IACH,MAAM,EAAE,OAAO,CAAC;CAChB"} node_modules/discord-api-types/payloads/v10/emoji.d.ts.map 0000664 00000002024 15114741631 0017457 0 ustar 00 {"version":3,"file":"emoji.d.ts","sourceRoot":"","sources":["emoji.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC/C,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAChE,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAC7C,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,QAAQ,CAAC;AAEtC;;GAEG;AACH,MAAM,WAAW,eAAe;IAC/B;;OAEG;IACH,EAAE,EAAE,SAAS,GAAG,IAAI,CAAC;IACrB;;OAEG;IACH,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IACpB;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;CACnB;AAED;;GAEG;AACH,MAAM,WAAW,QAAS,SAAQ,eAAe;IAChD;;OAEG;IACH,KAAK,CAAC,EAAE,OAAO,CAAC,IAAI,CAAC,EAAE,CAAC;IACxB;;OAEG;IACH,IAAI,CAAC,EAAE,OAAO,CAAC;IACf;;OAEG;IACH,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB;;OAEG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB;;OAEG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;CACpB;AAED;;GAEG;AACH,MAAM,MAAM,mBAAmB,GAAG,kBAAkB,CAAC,QAAQ,CAAC,IAAI,CAAC,QAAQ,EAAE,UAAU,GAAG,IAAI,GAAG,MAAM,GAAG,MAAM,CAAC,CAAC,CAAC,GAAG;IACrH;;;;OAIG;IACH,KAAK,EAAE,EAAE,CAAC;IACV;;;;OAIG;IACH,cAAc,EAAE,IAAI,CAAC;IACrB;;;;OAIG;IACH,OAAO,EAAE,KAAK,CAAC;IACf;;;;OAIG;IACH,SAAS,EAAE,IAAI,CAAC;CAChB,CAAC"} node_modules/discord-api-types/payloads/v10/application.d.ts.map 0000664 00000006532 15114741631 0020667 0 ustar 00 {"version":3,"file":"application.d.ts","sourceRoot":"","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IACH,eAAe,IAAA;CACf;AAED;;GAEG;AACH,oBAAY,6BAA6B;IACxC;;OAEG;IACH,QAAQ,IAAI;IACZ;;OAEG;IACH,OAAO,IAAA;IACP;;OAEG;IACH,iBAAiB,IAAA;CACjB"} node_modules/discord-api-types/payloads/v10/interactions.js.map 0000664 00000000226 15114741631 0020624 0 ustar 00 {"version":3,"file":"interactions.js","sourceRoot":"","sources":["interactions.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAsBA,sEAAoD;AAMpD,4DAA0C"} node_modules/discord-api-types/payloads/v10/webhook.js.map 0000664 00000001156 15114741631 0017563 0 ustar 00 {"version":3,"file":"webhook.js","sourceRoot":"","sources":["webhook.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AA8IH;;GAEG;AACH,IAAY,sBASX;AATD,WAAY,sBAAsB;IACjC;;OAEG;IACH,mEAAI,CAAA;IACJ;;OAEG;IACH,qEAAK,CAAA;AACN,CAAC,EATW,sBAAsB,sCAAtB,sBAAsB,QASjC;AAiBD;;GAEG;AACH,IAAY,2BAiBX;AAjBD,WAAY,2BAA2B;IACtC;;OAEG;IACH,+EAAgD,CAAA;IAChD;;OAEG;IACH,mFAAoD,CAAA;IACpD;;OAEG;IACH,uEAAwC,CAAA;IACxC;;OAEG;IACH,4EAA6C,CAAA;AAC9C,CAAC,EAjBW,2BAA2B,2CAA3B,2BAA2B,QAiBtC;AAED;;GAEG;AACH,IAAY,WAaX;AAbD,WAAY,WAAW;IACtB;;OAEG;IACH,qDAAY,CAAA;IACZ;;OAEG;IACH,mEAAe,CAAA;IACf;;OAEG;IACH,2DAAW,CAAA;AACZ,CAAC,EAbW,WAAW,2BAAX,WAAW,QAatB"} node_modules/discord-api-types/payloads/v10/teams.d.ts 0000664 00000004054 15114741631 0016716 0 ustar 00 /** * Types extracted from https://discord.com/developers/docs/topics/teams */ import type { Snowflake } from '../../globals'; import type { APIUser } from './user'; /** * @see {@link https://discord.com/developers/docs/topics/teams#data-models-team-object} */ export interface APITeam { /** * A hash of the image of the team's icon */ icon: string | null; /** * The unique id of the team */ id: Snowflake; /** * The members of the team */ members: APITeamMember[]; /** * The name of the team */ name: string; /** * The user id of the current team owner */ owner_user_id: Snowflake; } /** * @see {@link https://discord.com/developers/docs/topics/teams#data-models-team-member-object} */ export interface APITeamMember { /** * The user's membership state on the team * * @see {@link https://discord.com/developers/docs/topics/teams#data-models-membership-state-enum} */ membership_state: TeamMemberMembershipState; /** * Will always be `["*"]` * * @deprecated Use {@link APITeamMember.role} instead. */ permissions: ['*']; /** * The id of the parent team of which they are a member */ team_id: Snowflake; /** * The avatar, discriminator, id, and username of the user * * @see {@link https://discord.com/developers/docs/resources/user#user-object} */ user: APIUser; /** * The user's role in the team. * * @see {@link https://discord.com/developers/docs/topics/teams#team-member-roles} */ role: TeamMemberRole; } /** * @see {@link https://discord.com/developers/docs/topics/teams#data-models-membership-state-enum} */ export declare enum TeamMemberMembershipState { Invited = 1, Accepted = 2 } /** * @see {@link https://discord.com/developers/docs/topics/teams#team-member-roles-team-member-role-types} */ export declare enum TeamMemberRole { Admin = "admin", Developer = "developer", ReadOnly = "read_only" } //# sourceMappingURL=teams.d.ts.map node_modules/discord-api-types/payloads/v10/template.js.map 0000664 00000000160 15114741631 0017732 0 ustar 00 {"version":3,"file":"template.js","sourceRoot":"","sources":["template.ts"],"names":[],"mappings":";AAAA;;GAEG"} node_modules/discord-api-types/payloads/v10/teams.d.ts.map 0000664 00000001466 15114741631 0017476 0 ustar 00 {"version":3,"file":"teams.d.ts","sourceRoot":"","sources":["teams.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC/C,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,QAAQ,CAAC;AAEtC;;GAEG;AACH,MAAM,WAAW,OAAO;IACvB;;OAEG;IACH,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IACpB;;OAEG;IACH,EAAE,EAAE,SAAS,CAAC;IACd;;OAEG;IACH,OAAO,EAAE,aAAa,EAAE,CAAC;IACzB;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;OAEG;IACH,aAAa,EAAE,SAAS,CAAC;CACzB;AAED;;GAEG;AACH,MAAM,WAAW,aAAa;IAC7B;;;;OAIG;IACH,gBAAgB,EAAE,yBAAyB,CAAC;IAC5C;;;;OAIG;IACH,WAAW,EAAE,CAAC,GAAG,CAAC,CAAC;IACnB;;OAEG;IACH,OAAO,EAAE,SAAS,CAAC;IACnB;;;;OAIG;IACH,IAAI,EAAE,OAAO,CAAC;IACd;;;;OAIG;IACH,IAAI,EAAE,cAAc,CAAC;CACrB;AAED;;GAEG;AACH,oBAAY,yBAAyB;IACpC,OAAO,IAAI;IACX,QAAQ,IAAA;CACR;AAED;;GAEG;AACH,oBAAY,cAAc;IACzB,KAAK,UAAU;IACf,SAAS,cAAc;IACvB,QAAQ,cAAc;CACtB"} node_modules/discord-api-types/payloads/v10/oauth2.d.ts.map 0000664 00000001717 15114741631 0017566 0 ustar 00 {"version":3,"file":"oauth2.d.ts","sourceRoot":"","sources":["oauth2.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,oBAAY,YAAY;IACvB;;OAEG;IACH,GAAG,QAAQ;IACX;;;;;OAKG;IACH,WAAW,gBAAgB;IAC3B;;OAEG;IACH,cAAc,qBAAqB;IACnC;;;;OAIG;IACH,KAAK,UAAU;IACf;;;;OAIG;IACH,QAAQ,aAAa;IACrB;;;;;OAKG;IACH,MAAM,WAAW;IACjB;;;;;OAKG;IACH,UAAU,gBAAgB;IAC1B;;;;OAIG;IACH,iBAAiB,wBAAwB;IACzC;;;;OAIG;IACH,YAAY,aAAa;IACzB;;;OAGG;IACH,YAAY,kBAAkB;IAC9B;;OAEG;IACH,oBAAoB,2BAA2B;IAC/C;;OAEG;IACH,GAAG,QAAQ;IACX;;OAEG;IACH,kBAAkB,yBAAyB;IAC3C;;OAEG;IACH,YAAY,mBAAmB;IAC/B;;OAEG;IACH,aAAa,oBAAoB;IACjC;;OAEG;IACH,oBAAoB,2BAA2B;IAC/C;;OAEG;IACH,eAAe,qBAAqB;IACpC;;OAEG;IACH,KAAK,UAAU;IACf;;OAEG;IACH,wBAAwB,+BAA+B;IACvD;;OAEG;IACH,sBAAsB,6BAA6B;IACnD;;OAEG;IACH,uBAAuB,8BAA8B;IACrD;;OAEG;IACH,wBAAwB,8BAA8B;IACtD;;OAEG;IACH,iBAAiB,uBAAuB;IACxC;;OAEG;IACH,cAAc,oBAAoB;IAClC;;;;OAIG;IACH,eAAe,qBAAqB;IACpC;;;;OAIG;IACH,oBAAoB,0BAA0B;IAC9C;;;;OAIG;IACH,0BAA0B,iCAAiC;IAC3D;;;;OAIG;IACH,oCAAoC,6CAA6C;CACjF"} node_modules/discord-api-types/payloads/v10/channel.d.ts.map 0000664 00000055322 15114741631 0017775 0 ustar 00 {"version":3,"file":"channel.d.ts","sourceRoot":"","sources":["channel.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC5D,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAChE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AACpD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAC/C,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAC9C,OAAO,KAAK,EAAE,0BAA0B,EAAE,qBAAqB,EAAE,6BAA6B,EAAE,MAAM,gBAAgB,CAAC;AACvH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAC7C,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,QAAQ,CAAC;AACtC,OAAO,KAAK,EAAE,UAAU,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAC5D,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,QAAQ,CA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B,GACxB,mBAAmB,GACnB,qBAAqB,GACrB,uBAAuB,CAAC;AAE3B;;GAEG;AACH,MAAM,MAAM,wBAAwB,GAAG,IAAI,CAC1C,UAAU,EACR,aAAa,GACb,YAAY,GACZ,SAAS,GACT,kBAAkB,GAClB,QAAQ,GACR,OAAO,GACP,eAAe,GACf,UAAU,GACV,eAAe,GACf,UAAU,GACV,WAAW,GACX,MAAM,CACR,CAAC"} node_modules/discord-api-types/payloads/v10/poll.d.ts.map 0000664 00000002107 15114741631 0017324 0 ustar 00 {"version":3,"file":"poll.d.ts","sourceRoot":"","sources":["poll.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAE/C,MAAM,WAAW,WAAW;IAC3B;;OAEG;IACH,QAAQ,EAAE,YAAY,CAAC;CACvB;AAED,MAAM,WAAW,eAAe;IAC/B;;;;OAIG;IACH,iBAAiB,EAAE,OAAO,CAAC;IAC3B;;;;OAIG;IACH,WAAW,EAAE,cAAc,CAAC;CAC5B;AAED;;GAEG;AACH,MAAM,WAAW,OAAQ,SAAQ,WAAW,EAAE,eAAe;IAC5D;;OAEG;IACH,OAAO,EAAE,aAAa,EAAE,CAAC;IACzB;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,OAAO,CAAC,EAAE,cAAc,CAAC;CACzB;AAED;;GAEG;AACH,oBAAY,cAAc;IACzB;;OAEG;IACH,OAAO,IAAI;CACX;AAED;;GAEG;AACH,MAAM,WAAW,YAAY;IAC5B;;;;OAIG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,KAAK,CAAC,EAAE,eAAe,CAAC;CACxB;AAED,MAAM,WAAW,iBAAiB;IACjC;;OAEG;IACH,UAAU,EAAE,YAAY,CAAC;CACzB;AAED;;GAEG;AACH,MAAM,WAAW,aAAc,SAAQ,iBAAiB;IACvD;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;CAClB;AAED;;GAEG;AACH,MAAM,WAAW,cAAc;IAC9B;;OAEG;IACH,YAAY,EAAE,OAAO,CAAC;IACtB;;OAEG;IACH,aAAa,EAAE,kBAAkB,EAAE,CAAC;CACpC;AAED;;GAEG;AACH,MAAM,WAAW,kBAAkB;IAClC;;OAEG;IACH,EAAE,EAAE,MAAM,CAAC;IACX;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,QAAQ,EAAE,OAAO,CAAC;CAClB"} node_modules/discord-api-types/payloads/v10/invite.js 0000664 00000001762 15114741631 0016652 0 ustar 00 "use strict"; /** * Types extracted from https://discord.com/developers/docs/resources/invite */ Object.defineProperty(exports, "__esModule", { value: true }); exports.InviteTargetType = exports.InviteType = void 0; /** * @see {@link https://discord.com/developers/docs/resources/invite#invite-object-invite-types} */ var InviteType; (function (InviteType) { InviteType[InviteType["Guild"] = 0] = "Guild"; InviteType[InviteType["GroupDM"] = 1] = "GroupDM"; InviteType[InviteType["Friend"] = 2] = "Friend"; })(InviteType || (exports.InviteType = InviteType = {})); /** * @see {@link https://discord.com/developers/docs/resources/invite#invite-object-invite-target-types} */ var InviteTargetType; (function (InviteTargetType) { InviteTargetType[InviteTargetType["Stream"] = 1] = "Stream"; InviteTargetType[InviteTargetType["EmbeddedApplication"] = 2] = "EmbeddedApplication"; })(InviteTargetType || (exports.InviteTargetType = InviteTargetType = {})); //# sourceMappingURL=invite.js.map node_modules/discord-api-types/payloads/v10/channel.d.ts 0000664 00000220344 15114741631 0017217 0 ustar 00 /** * Types extracted from https://discord.com/developers/docs/resources/channel */ import type { Permissions, Snowflake } from '../../globals'; import type { _NonNullableFields } from '../../utils/internals'; import type { APIApplication } from './application'; import type { APIPartialEmoji } from './emoji'; import type { APIGuildMember } from './guild'; import type { APIInteractionDataResolved, APIMessageInteraction, APIMessageInteractionMetadata } from './interactions'; import type { APIRole } from './permissions'; import type { APIPoll } from './poll'; import type { APISticker, APIStickerItem } from './sticker'; import type { APIUser } from './user'; export interface APIBasePartialChannel { /** * The id of the channel */ id: Snowflake; /** * The type of the channel * * @see {@link https://discord.com/developers/docs/resources/channel#channel-object-channel-types} */ type: ChannelType; } export interface APINameableChannel { /** * The name of the channel (1-100 characters) */ name?: string | null; } /** * Not documented, but partial only includes id, name, and type */ export interface APIPartialChannel extends APIBasePartialChannel, APINameableChannel { } /** * A channel obtained from fetching an invite. */ export interface APIInviteChannel extends Required<APIPartialChannel> { /** * Icon hash. */ icon?: string | undefined; /** * The invite channel's recipients. * * @remarks Only includes usernames of users. */ recipients?: Pick<APIUser, 'username'>[] | undefined; } /** * Source channel of channel follower webhooks. */ export type APIWebhookSourceChannel = Required<_NonNullableFields<Pick<APIPartialChannel, 'id' | 'name'>>>; /** * This interface is used to allow easy extension for other channel types. While * also allowing `APIPartialChannel` to be used without breaking. */ export interface APIChannelBase<T extends ChannelType> extends APIBasePartialChannel { type: T; flags?: ChannelFlags; } export type TextChannelType = ChannelType.AnnouncementThread | ChannelType.DM | ChannelType.GroupDM | ChannelType.GuildAnnouncement | ChannelType.GuildStageVoice | ChannelType.GuildText | ChannelType.GuildVoice | ChannelType.PrivateThread | ChannelType.PublicThread; export type GuildChannelType = Exclude<ChannelType, ChannelType.DM | ChannelType.GroupDM>; export interface APISlowmodeChannel<T extends ChannelType> extends APIChannelBase<T> { /** * Amount of seconds a user has to wait before sending another message (0-21600); * bots, as well as users with the permission `MANAGE_MESSAGES` or `MANAGE_CHANNELS`, are unaffected * * `rate_limit_per_user` also applies to thread creation. Users can send one message and create one thread during each `rate_limit_per_user` interval. * * For thread channels, `rate_limit_per_user` is only returned if the field is set to a non-zero and non-null value. * The absence of this field in API calls and Gateway events should indicate that slowmode has been reset to the default value. */ rate_limit_per_user?: number; } export interface APISortableChannel { /** * Sorting position of the channel */ position: number; } export interface APITextBasedChannel<T extends ChannelType> extends APIChannelBase<T>, APISlowmodeChannel<T> { /** * The id of the last message sent in this channel (may not point to an existing or valid message) */ last_message_id?: Snowflake | null; } export interface APIPinChannel<T extends ChannelType> extends APIChannelBase<T> { /** * When the last pinned message was pinned. * This may be `null` in events such as `GUILD_CREATE` when a message is not pinned */ last_pin_timestamp?: string | null; } export interface APIGuildChannel<T extends ChannelType> extends APIChannelBase<T> { /** * The name of the channel (1-100 characters) */ name: string; /** * The id of the guild (may be missing for some channel objects received over gateway guild dispatches) */ guild_id?: Snowflake; /** * Explicit permission overwrites for members and roles * * @see {@link https://discord.com/developers/docs/resources/channel#overwrite-object} */ permission_overwrites?: APIOverwrite[]; /** * ID of the parent category for a channel (each parent category can contain up to 50 channels) * * OR * * ID of the parent channel for a thread */ parent_id?: Snowflake | null; /** * Whether the channel is nsfw */ nsfw?: boolean; } export type GuildTextChannelType = Exclude<TextChannelType, ChannelType.DM | ChannelType.GroupDM>; export interface APIGuildTextChannel<T extends ChannelType.GuildForum | ChannelType.GuildMedia | GuildTextChannelType> extends APITextBasedChannel<T>, APIGuildChannel<T>, APISortableChannel, APIPinChannel<T> { /** * Default duration for newly created threads, in minutes, to automatically archive the thread after recent activity */ default_auto_archive_duration?: ThreadAutoArchiveDuration; /** * The initial `rate_limit_per_user` to set on newly created threads. * This field is copied to the thread at creation time and does not live update */ default_thread_rate_limit_per_user?: number; /** * The channel topic (0-1024 characters) */ topic?: string | null; } export type APITextChannel = APIGuildTextChannel<ChannelType.GuildText>; export type APINewsChannel = APIGuildTextChannel<ChannelType.GuildAnnouncement>; export interface APIGuildCategoryChannel extends APIGuildChannel<ChannelType.GuildCategory>, APISortableChannel { } export interface APIVoiceChannelBase<T extends ChannelType> extends APIGuildChannel<T>, APISortableChannel, APITextBasedChannel<T>, APISlowmodeChannel<T> { /** * The bitrate (in bits) of the voice or stage channel */ bitrate?: number; /** * The user limit of the voice or stage channel */ user_limit?: number; /** * Voice region id for the voice or stage channel, automatic when set to `null` * * @see {@link https://discord.com/developers/docs/resources/voice#voice-region-object} */ rtc_region?: string | null; /** * The camera video quality mode of the voice or stage channel, `1` when not present * * @see {@link https://discord.com/developers/docs/resources/channel#channel-object-video-quality-modes} */ video_quality_mode?: VideoQualityMode; } export type APIGuildVoiceChannel = APIVoiceChannelBase<ChannelType.GuildVoice>; export type APIGuildStageVoiceChannel = APIVoiceChannelBase<ChannelType.GuildStageVoice>; export interface APIDMChannelBase<T extends ChannelType> extends APITextBasedChannel<T>, APIPinChannel<T> { /** * The recipients of the DM * * @see {@link https://discord.com/developers/docs/resources/user#user-object} */ recipients?: APIUser[]; } export interface APIDMChannel extends APIDMChannelBase<ChannelType.DM> { /** * The name of the channel (always null for DM channels) */ name: null; } export interface APIGroupDMChannel extends APIDMChannelBase<ChannelType.GroupDM> { /** * The name of the channel (1-100 characters) */ name: string | null; /** * Application id of the group DM creator if it is bot-created */ application_id?: Snowflake; /** * Icon hash */ icon?: string | null; /** * ID of the DM creator */ owner_id?: Snowflake; /** * The id of the last message sent in this channel (may not point to an existing or valid message) */ last_message_id?: Snowflake | null; /** * Whether the channel is managed by an OAuth2 application */ managed?: boolean; } export type ThreadChannelType = ChannelType.AnnouncementThread | ChannelType.PrivateThread | ChannelType.PublicThread; export interface APIThreadChannel<Type extends ThreadChannelType = ThreadChannelType> extends APITextBasedChannel<Type>, APIGuildChannel<Type>, APIPinChannel<Type> { /** * The client users member for the thread, only included in select endpoints */ member?: APIThreadMember; /** * The metadata for a thread channel not shared by other channels */ thread_metadata?: APIThreadMetadata; /** * Number of messages (not including the initial message or deleted messages) in a thread * * If the thread was created before July 1, 2022, it stops counting at 50 messages */ message_count?: number; /** * The approximate member count of the thread, does not count above 50 even if there are more members */ member_count?: number; /** * ID of the thread creator */ owner_id?: Snowflake; /** * Number of messages ever sent in a thread * * Similar to `message_count` on message creation, but won't decrement when a message is deleted */ total_message_sent?: number; /** * The IDs of the set of tags that have been applied to a thread in a thread-only channel */ applied_tags: Snowflake[]; } export type APIPublicThreadChannel = APIThreadChannel<ChannelType.PublicThread>; export type APIPrivateThreadChannel = APIThreadChannel<ChannelType.PrivateThread>; export type APIAnnouncementThreadChannel = APIThreadChannel<ChannelType.AnnouncementThread>; /** * @see {@link https://discord.com/developers/docs/resources/channel#forum-tag-object-forum-tag-structure} */ export interface APIGuildForumTag { /** * The id of the tag */ id: Snowflake; /** * The name of the tag (0-20 characters) */ name: string; /** * Whether this tag can only be added to or removed from threads by a member with the `MANAGE_THREADS` permission */ moderated: boolean; /** * The id of a guild's custom emoji */ emoji_id: Snowflake | null; /** * The unicode character of the emoji */ emoji_name: string | null; } /** * @see {@link https://discord.com/developers/docs/resources/channel#default-reaction-object-default-reaction-structure} */ export interface APIGuildForumDefaultReactionEmoji { /** * The id of a guild's custom emoji */ emoji_id: Snowflake | null; /** * The unicode character of the emoji */ emoji_name: string | null; } /** * @see {@link https://discord.com/developers/docs/resources/channel/#channel-object-sort-order-types} */ export declare enum SortOrderType { /** * Sort forum posts by activity */ LatestActivity = 0, /** * Sort forum posts by creation time (from most recent to oldest) */ CreationDate = 1 } /** * @see {@link https://discord.com/developers/docs/resources/channel/#channel-object-forum-layout-types} */ export declare enum ForumLayoutType { /** * No default has been set for forum channel */ NotSet = 0, /** * Display posts as a list */ ListView = 1, /** * Display posts as a collection of tiles */ GalleryView = 2 } export interface APIThreadOnlyChannel<T extends ChannelType.GuildForum | ChannelType.GuildMedia> extends APIGuildChannel<T>, APISortableChannel { /** * The channel topic (0-4096 characters) */ topic?: string | null; /** * The id of the last thread created in this channel (may not point to an existing or valid thread) */ last_message_id?: Snowflake | null; /** * Amount of seconds a user has to wait before creating another thread (0-21600); * bots, as well as users with the permission `MANAGE_MESSAGES` or `MANAGE_CHANNELS`, are unaffected * * The absence of this field in API calls and Gateway events should indicate that slowmode has been reset to the default value. */ rate_limit_per_user?: number; /** * When the last pinned message was pinned. * This may be `null` in events such as `GUILD_CREATE` when a message is not pinned */ last_pin_timestamp?: string | null; /** * Default duration for newly created threads, in minutes, to automatically archive the thread after recent activity */ default_auto_archive_duration?: ThreadAutoArchiveDuration; /** * The set of tags that can be used in a thread-only channel */ available_tags: APIGuildForumTag[]; /** * The initial `rate_limit_per_user` to set on newly created threads. * This field is copied to the thread at creation time and does not live update */ default_thread_rate_limit_per_user?: number; /** * The emoji to show in the add reaction button on a thread in a thread-only channel */ default_reaction_emoji: APIGuildForumDefaultReactionEmoji | null; /** * The default sort order type used to order posts in a thread-only channel */ default_sort_order: SortOrderType | null; } export interface APIGuildForumChannel extends APIThreadOnlyChannel<ChannelType.GuildForum> { /** * The default layout type used to display posts in a forum channel * * @defaultValue `ForumLayoutType.NotSet` which indicates a layout view has not been set by a channel admin */ default_forum_layout: ForumLayoutType; } export type APIGuildMediaChannel = APIThreadOnlyChannel<ChannelType.GuildMedia>; /** * @see {@link https://discord.com/developers/docs/resources/channel#channel-object-channel-structure} */ export type APIChannel = APIAnnouncementThreadChannel | APIDMChannel | APIGroupDMChannel | APIGuildCategoryChannel | APIGuildForumChannel | APIGuildMediaChannel | APIGuildStageVoiceChannel | APIGuildVoiceChannel | APINewsChannel | APIPrivateThreadChannel | APIPublicThreadChannel | APITextChannel; /** * @see {@link https://discord.com/developers/docs/resources/channel#channel-object-channel-types} */ export declare enum ChannelType { /** * A text channel within a guild */ GuildText = 0, /** * A direct message between users */ DM = 1, /** * A voice channel within a guild */ GuildVoice = 2, /** * A direct message between multiple users */ GroupDM = 3, /** * An organizational category that contains up to 50 channels * * @see {@link https://support.discord.com/hc/articles/115001580171} */ GuildCategory = 4, /** * A channel that users can follow and crosspost into their own guild * * @see {@link https://support.discord.com/hc/articles/360032008192} */ GuildAnnouncement = 5, /** * A temporary sub-channel within a Guild Announcement channel */ AnnouncementThread = 10, /** * A temporary sub-channel within a Guild Text or Guild Forum channel */ PublicThread = 11, /** * A temporary sub-channel within a Guild Text channel that is only viewable by those invited and those with the Manage Threads permission */ PrivateThread = 12, /** * A voice channel for hosting events with an audience * * @see {@link https://support.discord.com/hc/articles/1500005513722} */ GuildStageVoice = 13, /** * The channel in a Student Hub containing the listed servers * * @see {@link https://support.discord.com/hc/articles/4406046651927} */ GuildDirectory = 14, /** * A channel that can only contain threads */ GuildForum = 15, /** * A channel like forum channels but contains media for server subscriptions * * @see {@link https://creator-support.discord.com/hc/articles/14346342766743} */ GuildMedia = 16, /** * A channel that users can follow and crosspost into their own guild * * @deprecated This is the old name for {@link ChannelType.GuildAnnouncement} * @see {@link https://support.discord.com/hc/articles/360032008192} */ GuildNews = 5, /** * A temporary sub-channel within a Guild Announcement channel * * @deprecated This is the old name for {@link ChannelType.AnnouncementThread} */ GuildNewsThread = 10, /** * A temporary sub-channel within a Guild Text channel * * @deprecated This is the old name for {@link ChannelType.PublicThread} */ GuildPublicThread = 11, /** * A temporary sub-channel within a Guild Text channel that is only viewable by those invited and those with the Manage Threads permission * * @deprecated This is the old name for {@link ChannelType.PrivateThread} */ GuildPrivateThread = 12 } export declare enum VideoQualityMode { /** * Discord chooses the quality for optimal performance */ Auto = 1, /** * 720p */ Full = 2 } export interface APIMessageMentions { /** * Users specifically mentioned in the message * * The `member` field is only present in `MESSAGE_CREATE` and `MESSAGE_UPDATE` events * from text-based guild channels * * @see {@link https://discord.com/developers/docs/resources/user#user-object} * @see {@link https://discord.com/developers/docs/resources/guild#guild-member-object} */ mentions: APIUser[]; } /** * @see {@link https://discord.com/developers/docs/resources/channel#message-object-message-structure} */ export interface APIBaseMessageNoChannel { /** * ID of the message */ id: Snowflake; /** * The author of this message (only a valid user in the case where the message is generated by a user or bot user) * * If the message is generated by a webhook, the author object corresponds to the webhook's id, * username, and avatar. You can tell if a message is generated by a webhook by checking for the `webhook_id` property * * @see {@link https://discord.com/developers/docs/resources/user#user-object} */ author: APIUser; /** * Contents of the message * * The `MESSAGE_CONTENT` privileged gateway intent is required for verified applications to receive a non-empty value from this field * * In the Discord Developers Portal, you need to enable the toggle of this intent of your application in **Bot \> Privileged Gateway Intents**. * You also need to specify the intent bit value (`1 << 15`) if you are connecting to the gateway * * @see {@link https://support-dev.discord.com/hc/articles/6207308062871} */ content: string; /** * When this message was sent */ timestamp: string; /** * When this message was edited (or null if never) */ edited_timestamp: string | null; /** * Whether this was a TTS message */ tts: boolean; /** * Whether this message mentions everyone */ mention_everyone: boolean; /** * Roles specifically mentioned in this message * * @see {@link https://discord.com/developers/docs/topics/permissions#role-object} */ mention_roles: APIRole['id'][]; /** * Channels specifically mentioned in this message * * Not all channel mentions in a message will appear in `mention_channels`. * - Only textual channels that are visible to everyone in a lurkable guild will ever be included * - Only crossposted messages (via Channel Following) currently include `mention_channels` at all * * If no mentions in the message meet these requirements, this field will not be sent * * @see {@link https://discord.com/developers/docs/resources/channel#channel-mention-object} */ mention_channels?: APIChannelMention[]; /** * Any attached files * * @see {@link https://discord.com/developers/docs/resources/message#attachment-object-attachment-structure} * * The `MESSAGE_CONTENT` privileged gateway intent is required for verified applications to receive a non-empty value from this field * * In the Discord Developers Portal, you need to enable the toggle of this intent of your application in **Bot \> Privileged Gateway Intents**. * You also need to specify the intent bit value (`1 << 15`) if you are connecting to the gateway * @see {@link https://support-dev.discord.com/hc/articles/6207308062871} */ attachments: APIAttachment[]; /** * Any embedded content * * @see {@link https://discord.com/developers/docs/resources/channel#embed-object} * * The `MESSAGE_CONTENT` privileged gateway intent is required for verified applications to receive a non-empty value from this field * * In the Discord Developers Portal, you need to enable the toggle of this intent of your application in **Bot \> Privileged Gateway Intents**. * You also need to specify the intent bit value (`1 << 15`) if you are connecting to the gateway * @see {@link https://support-dev.discord.com/hc/articles/6207308062871} */ embeds: APIEmbed[]; /** * Reactions to the message * * @see {@link https://discord.com/developers/docs/resources/channel#reaction-object} */ reactions?: APIReaction[]; /** * A nonce that can be used for optimistic message sending (up to 25 characters) * * **You will not receive this from further fetches. This is received only once from a `MESSAGE_CREATE` * event to ensure it got sent** */ nonce?: number | string; /** * Whether this message is pinned */ pinned: boolean; /** * If the message is generated by a webhook, this is the webhook's id */ webhook_id?: Snowflake; /** * Type of message * * @see {@link https://discord.com/developers/docs/resources/channel#message-object-message-types} */ type: MessageType; /** * Sent with Rich Presence-related chat embeds * * @see {@link https://discord.com/developers/docs/resources/channel#message-object-message-activity-structure} */ activity?: APIMessageActivity; /** * Sent with Rich Presence-related chat embeds * * @see {@link https://discord.com/developers/docs/resources/application#application-object} */ application?: Partial<APIApplication>; /** * If the message is a response to an Interaction, this is the id of the interaction's application */ application_id?: Snowflake; /** * Reference data sent with crossposted messages, replies, pins, and thread starter messages * * @see {@link https://discord.com/developers/docs/resources/channel#message-reference-object-message-reference-structure} */ message_reference?: APIMessageReference; /** * Message flags combined as a bitfield * * @see {@link https://discord.com/developers/docs/resources/channel#message-object-message-flags} * @see {@link https://en.wikipedia.org/wiki/Bit_field} */ flags?: MessageFlags; /** * The message associated with the `message_reference` * * This field is only returned for messages with a `type` of `19` (REPLY). * * If the message is a reply but the `referenced_message` field is not present, * the backend did not attempt to fetch the message that was being replied to, * so its state is unknown. * * If the field exists but is `null`, the referenced message was deleted * * @see {@link https://discord.com/developers/docs/resources/channel#message-object} */ referenced_message?: APIMessage | null; /** * Sent if the message is sent as a result of an interaction */ interaction_metadata?: APIMessageInteractionMetadata; /** * Sent if the message is a response to an Interaction * * @deprecated In favor of `interaction_metadata` */ interaction?: APIMessageInteraction; /** * Sent if a thread was started from this message */ thread?: APIChannel; /** * Sent if the message contains components like buttons, action rows, or other interactive components * * The `MESSAGE_CONTENT` privileged gateway intent is required for verified applications to receive a non-empty value from this field * * In the Discord Developers Portal, you need to enable the toggle of this intent of your application in **Bot \> Privileged Gateway Intents**. * You also need to specify the intent bit value (`1 << 15`) if you are connecting to the gateway * * @see {@link https://support-dev.discord.com/hc/articles/6207308062871} */ components?: APIMessageTopLevelComponent[]; /** * Sent if the message contains stickers * * @see {@link https://discord.com/developers/docs/resources/sticker#sticker-item-object} */ sticker_items?: APIStickerItem[]; /** * The stickers sent with the message * * @see {@link https://discord.com/developers/docs/resources/sticker#sticker-object} * @deprecated Use {@link APIBaseMessageNoChannel.sticker_items} instead */ stickers?: APISticker[]; /** * A generally increasing integer (there may be gaps or duplicates) that represents the approximate position of the message in a thread * * It can be used to estimate the relative position of the message in a thread in company with `total_message_sent` on parent thread */ position?: number; /** * Data of the role subscription purchase or renewal that prompted this `ROLE_SUBSCRIPTION_PURCHASE` message */ role_subscription_data?: APIMessageRoleSubscriptionData; /** * Data for users, members, channels, and roles in the message's auto-populated select menus * * @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object-resolved-data-structure} */ resolved?: APIInteractionDataResolved; /** * A poll! * * The `MESSAGE_CONTENT` privileged gateway intent is required for verified applications to receive a non-empty value from this field * * In the Discord Developers Portal, you need to enable the toggle of this intent of your application in **Bot \> Privileged Gateway Intents**. * You also need to specify the intent bit value (`1 << 15`) if you are connecting to the gateway * * @see {@link https://support-dev.discord.com/hc/articles/6207308062871} */ poll?: APIPoll; /** * The message associated with the message_reference. This is a minimal subset of fields in a message (e.g. author is excluded.) */ message_snapshots?: APIMessageSnapshot[]; /** * The call associated with the message */ call?: APIMessageCall; } /** * @see {@link https://discord.com/developers/docs/resources/channel#message-object-message-structure} */ export interface APIBaseMessage extends APIBaseMessageNoChannel { /** * ID of the channel the message was sent in */ channel_id: Snowflake; } /** * @see {@link https://discord.com/developers/docs/resources/channel#message-object-message-structure} */ export interface APIMessage extends APIBaseMessage, APIMessageMentions { } /** * @see {@link https://discord.com/developers/docs/resources/channel#message-object-message-types} */ export declare enum MessageType { Default = 0, RecipientAdd = 1, RecipientRemove = 2, Call = 3, ChannelNameChange = 4, ChannelIconChange = 5, ChannelPinnedMessage = 6, UserJoin = 7, GuildBoost = 8, GuildBoostTier1 = 9, GuildBoostTier2 = 10, GuildBoostTier3 = 11, ChannelFollowAdd = 12, GuildDiscoveryDisqualified = 14, GuildDiscoveryRequalified = 15, GuildDiscoveryGracePeriodInitialWarning = 16, GuildDiscoveryGracePeriodFinalWarning = 17, ThreadCreated = 18, Reply = 19, ChatInputCommand = 20, ThreadStarterMessage = 21, GuildInviteReminder = 22, ContextMenuCommand = 23, AutoModerationAction = 24, RoleSubscriptionPurchase = 25, InteractionPremiumUpsell = 26, StageStart = 27, StageEnd = 28, StageSpeaker = 29, /** * @unstable https://github.com/discord/discord-api-docs/pull/5927#discussion_r1107678548 */ StageRaiseHand = 30, StageTopic = 31, GuildApplicationPremiumSubscription = 32, GuildIncidentAlertModeEnabled = 36, GuildIncidentAlertModeDisabled = 37, GuildIncidentReportRaid = 38, GuildIncidentReportFalseAlarm = 39, PurchaseNotification = 44, PollResult = 46 } /** * @see {@link https://discord.com/developers/docs/resources/channel#message-object-message-activity-structure} */ export interface APIMessageActivity { /** * Type of message activity * * @see {@link https://discord.com/developers/docs/resources/channel#message-object-message-activity-types} */ type: MessageActivityType; /** * `party_id` from a Rich Presence event * * @see {@link https://discord.com/developers/docs/rich-presence/how-to#updating-presence-update-presence-payload-fields} */ party_id?: string; } /** * @see {@link https://discord.com/developers/docs/resources/channel#message-reference-object-message-reference-structure} */ export interface APIMessageReference { /** * Type of reference */ type?: MessageReferenceType; /** * ID of the originating message */ message_id?: Snowflake; /** * ID of the originating message's channel */ channel_id: Snowflake; /** * ID of the originating message's guild */ guild_id?: Snowflake; } /** * @see {@link https://discord.com/developers/docs/resources/channel#message-object-message-activity-types} */ export declare enum MessageActivityType { Join = 1, Spectate = 2, Listen = 3, JoinRequest = 5 } /** * @see {@link https://discord.com/developers/docs/resources/channel#message-reference-types} */ export declare enum MessageReferenceType { /** * A standard reference used by replies */ Default = 0, /** * Reference used to point to a message at a point in time */ Forward = 1 } /** * @see {@link https://discord.com/developers/docs/resources/channel#message-object-message-flags} */ export declare enum MessageFlags { /** * This message has been published to subscribed channels (via Channel Following) */ Crossposted = 1, /** * This message originated from a message in another channel (via Channel Following) */ IsCrosspost = 2, /** * Do not include any embeds when serializing this message */ SuppressEmbeds = 4, /** * The source message for this crosspost has been deleted (via Channel Following) */ SourceMessageDeleted = 8, /** * This message came from the urgent message system */ Urgent = 16, /** * This message has an associated thread, which shares its id */ HasThread = 32, /** * This message is only visible to the user who invoked the Interaction */ Ephemeral = 64, /** * This message is an Interaction Response and the bot is "thinking" */ Loading = 128, /** * This message failed to mention some roles and add their members to the thread */ FailedToMentionSomeRolesInThread = 256, /** * @unstable This message flag is currently not documented by Discord but has a known value which we will try to keep up to date. */ ShouldShowLinkNotDiscordWarning = 1024, /** * This message will not trigger push and desktop notifications */ SuppressNotifications = 4096, /** * This message is a voice message */ IsVoiceMessage = 8192, /** * This message has a snapshot (via Message Forwarding) */ HasSnapshot = 16384, /** * Allows you to create fully component-driven messages * * @see {@link https://discord.com/developers/docs/components/overview} */ IsComponentsV2 = 32768 } /** * @see {@link https://discord.com/developers/docs/resources/channel#message-call-object-message-call-object-structure} */ export interface APIMessageCall { /** * Array of user ids that participated in the call */ participants: Snowflake[]; /** * ISO8601 timestamp when the call ended */ ended_timestamp?: string | null; } /** * @see {@link https://discord.com/developers/docs/resources/channel#role-subscription-data-object-role-subscription-data-object-structure} */ export interface APIMessageRoleSubscriptionData { /** * The id of the SKU and listing the user is subscribed to */ role_subscription_listing_id: Snowflake; /** * The name of the tier the user is subscribed to */ tier_name: string; /** * The number of months the user has been subscribed for */ total_months_subscribed: number; /** * Whether this notification is for a renewal */ is_renewal: boolean; } /** * @see {@link https://discord.com/developers/docs/resources/channel#followed-channel-object} */ export interface APIFollowedChannel { /** * Source channel id */ channel_id: Snowflake; /** * Created target webhook id */ webhook_id: Snowflake; } /** * @see {@link https://discord.com/developers/docs/resources/channel#reaction-object-reaction-structure} */ export interface APIReaction { /** * Total number of times this emoji has been used to react (including super reacts) */ count: number; /** * An object detailing the individual reaction counts for different types of reactions */ count_details: APIReactionCountDetails; /** * Whether the current user reacted using this emoji */ me: boolean; /** * Whether the current user super-reacted using this emoji */ me_burst: boolean; /** * Emoji information * * @see {@link https://discord.com/developers/docs/resources/emoji#emoji-object} */ emoji: APIPartialEmoji; /** * Hexadecimal colors used for this super reaction */ burst_colors: string[]; } /** * @see {@link https://discord.com/developers/docs/resources/channel#reaction-count-details-object-reaction-count-details-structure} */ export interface APIReactionCountDetails { /** * Count of super reactions */ burst: number; /** * Count of normal reactions */ normal: number; } /** * @see {@link https://discord.com/developers/docs/resources/channel#overwrite-object-overwrite-structure} */ export interface APIOverwrite { /** * Role or user id */ id: Snowflake; /** * Either 0 (role) or 1 (member) */ type: OverwriteType; /** * Permission bit set * * @see {@link https://discord.com/developers/docs/topics/permissions#permissions-bitwise-permission-flags} * @see {@link https://en.wikipedia.org/wiki/Bit_field} */ allow: Permissions; /** * Permission bit set * * @see {@link https://discord.com/developers/docs/topics/permissions#permissions-bitwise-permission-flags} * @see {@link https://en.wikipedia.org/wiki/Bit_field} */ deny: Permissions; } export declare enum OverwriteType { Role = 0, Member = 1 } /** * @see {@link https://discord.com/developers/docs/resources/channel#thread-metadata-object-thread-metadata-structure} */ export interface APIThreadMetadata { /** * Whether the thread is archived */ archived: boolean; /** * Duration in minutes to automatically archive the thread after recent activity, can be set to: 60, 1440, 4320, 10080 */ auto_archive_duration: ThreadAutoArchiveDuration; /** * An ISO8601 timestamp when the thread's archive status was last changed, used for calculating recent activity */ archive_timestamp: string; /** * Whether the thread is locked; when a thread is locked, only users with `MANAGE_THREADS` can unarchive it */ locked: boolean; /** * Whether non-moderators can add other non-moderators to the thread; only available on private threads */ invitable?: boolean; /** * Timestamp when the thread was created; only populated for threads created after 2022-01-09 */ create_timestamp?: string; } export declare enum ThreadAutoArchiveDuration { OneHour = 60, OneDay = 1440, ThreeDays = 4320, OneWeek = 10080 } /** * @see {@link https://discord.com/developers/docs/resources/channel#thread-member-object-thread-member-structure} */ export interface APIThreadMember { /** * The id of the thread * * **This field is omitted on the member sent within each thread in the `GUILD_CREATE` event** */ id?: Snowflake; /** * The id of the member * * **This field is omitted on the member sent within each thread in the `GUILD_CREATE` event** */ user_id?: Snowflake; /** * An ISO8601 timestamp for when the member last joined */ join_timestamp: string; /** * Member flags combined as a bitfield * * @see {@link https://en.wikipedia.org/wiki/Bit_field} */ flags: ThreadMemberFlags; /** * Additional information about the user * * **This field is omitted on the member sent within each thread in the `GUILD_CREATE` event** * * **This field is only present when `with_member` is set to true when calling `List Thread Members` or `Get Thread Member`** */ member?: APIGuildMember; } export declare enum ThreadMemberFlags { /** * @unstable This thread member flag is currently not documented by Discord but has a known value which we will try to keep up to date. */ HasInteracted = 1, /** * @unstable This thread member flag is currently not documented by Discord but has a known value which we will try to keep up to date. */ AllMessages = 2, /** * @unstable This thread member flag is currently not documented by Discord but has a known value which we will try to keep up to date. */ OnlyMentions = 4, /** * @unstable This thread member flag is currently not documented by Discord but has a known value which we will try to keep up to date. */ NoMessages = 8 } export interface APIThreadList { /** * The threads that were fetched */ threads: APIChannel[]; /** * The members for the client user in each of the fetched threads */ members: APIThreadMember[]; } /** * @see {@link https://discord.com/developers/docs/resources/channel#embed-object-embed-structure} * * Length limit: 6000 characters */ export interface APIEmbed { /** * Title of embed * * Length limit: 256 characters */ title?: string; /** * Type of embed (always "rich" for webhook embeds) */ type?: EmbedType; /** * Description of embed * * Length limit: 4096 characters */ description?: string; /** * URL of embed */ url?: string; /** * Timestamp of embed content */ timestamp?: string; /** * Color code of the embed */ color?: number; /** * Footer information * * @see {@link https://discord.com/developers/docs/resources/channel#embed-object-embed-footer-structure} */ footer?: APIEmbedFooter; /** * Image information * * @see {@link https://discord.com/developers/docs/resources/channel#embed-object-embed-image-structure} */ image?: APIEmbedImage; /** * Thumbnail information * * @see {@link https://discord.com/developers/docs/resources/channel#embed-object-embed-thumbnail-structure} */ thumbnail?: APIEmbedThumbnail; /** * Video information * * @see {@link https://discord.com/developers/docs/resources/channel#embed-object-embed-video-structure} */ video?: APIEmbedVideo; /** * Provider information * * @see {@link https://discord.com/developers/docs/resources/channel#embed-object-embed-provider-structure} */ provider?: APIEmbedProvider; /** * Author information * * @see {@link https://discord.com/developers/docs/resources/channel#embed-object-embed-author-structure} */ author?: APIEmbedAuthor; /** * Fields information * * Length limit: 25 field objects * * @see {@link https://discord.com/developers/docs/resources/channel#embed-object-embed-field-structure} */ fields?: APIEmbedField[]; } /** * @see {@link https://discord.com/developers/docs/resources/channel#embed-object-embed-types} */ export declare enum EmbedType { /** * Generic embed rendered from embed attributes */ Rich = "rich", /** * Image embed */ Image = "image", /** * Video embed */ Video = "video", /** * Animated gif image embed rendered as a video embed */ GIFV = "gifv", /** * Article embed */ Article = "article", /** * Link embed */ Link = "link", /** * Auto moderation alert embed * * @unstable This embed type is currently not documented by Discord, but it is returned in the auto moderation system messages. */ AutoModerationMessage = "auto_moderation_message", /** * Poll result embed */ PollResult = "poll_result" } /** * @see {@link https://discord.com/developers/docs/resources/channel#embed-object-embed-thumbnail-structure} */ export interface APIEmbedThumbnail { /** * Source url of thumbnail (only supports http(s) and attachments) */ url: string; /** * A proxied url of the thumbnail */ proxy_url?: string; /** * Height of thumbnail */ height?: number; /** * Width of thumbnail */ width?: number; } /** * @see {@link https://discord.com/developers/docs/resources/channel#embed-object-embed-video-structure} */ export interface APIEmbedVideo { /** * Source url of video */ url?: string; /** * A proxied url of the video */ proxy_url?: string; /** * Height of video */ height?: number; /** * Width of video */ width?: number; } /** * @see {@link https://discord.com/developers/docs/resources/channel#embed-object-embed-image-structure} */ export interface APIEmbedImage { /** * Source url of image (only supports http(s) and attachments) */ url: string; /** * A proxied url of the image */ proxy_url?: string; /** * Height of image */ height?: number; /** * Width of image */ width?: number; } /** * @see {@link https://discord.com/developers/docs/resources/channel#embed-object-embed-provider-structure} */ export interface APIEmbedProvider { /** * Name of provider */ name?: string; /** * URL of provider */ url?: string; } /** * @see {@link https://discord.com/developers/docs/resources/channel#embed-object-embed-author-structure} */ export interface APIEmbedAuthor { /** * Name of author * * Length limit: 256 characters */ name: string; /** * URL of author */ url?: string; /** * URL of author icon (only supports http(s) and attachments) */ icon_url?: string; /** * A proxied url of author icon */ proxy_icon_url?: string; } /** * @see {@link https://discord.com/developers/docs/resources/channel#embed-object-embed-footer-structure} */ export interface APIEmbedFooter { /** * Footer text * * Length limit: 2048 characters */ text: string; /** * URL of footer icon (only supports http(s) and attachments) */ icon_url?: string; /** * A proxied url of footer icon */ proxy_icon_url?: string; } /** * @see {@link https://discord.com/developers/docs/resources/channel#embed-object-embed-field-structure} */ export interface APIEmbedField { /** * Name of the field * * Length limit: 256 characters */ name: string; /** * Value of the field * * Length limit: 1024 characters */ value: string; /** * Whether or not this field should display inline */ inline?: boolean; } /** * @see {@link https://discord.com/developers/docs/resources/message#attachment-object-attachment-structure} */ export interface APIAttachment { /** * Attachment id */ id: Snowflake; /** * Name of file attached */ filename: string; /** * The title of the file */ title?: string; /** * Description for the file */ description?: string; /** * The attachment's media type * * @see {@link https://en.wikipedia.org/wiki/Media_type} */ content_type?: string; /** * Size of file in bytes */ size: number; /** * Source url of file */ url: string; /** * A proxied url of file */ proxy_url: string; /** * Height of file (if image) */ height?: number | null; /** * Width of file (if image) */ width?: number | null; /** * Whether this attachment is ephemeral */ ephemeral?: boolean; /** * The duration of the audio file (currently for voice messages) */ duration_secs?: number; /** * Base64 encoded bytearray representing a sampled waveform (currently for voice messages) */ waveform?: string; /** * Attachment flags combined as a bitfield */ flags?: AttachmentFlags; } /** * @see {@link https://discord.com/developers/docs/resources/channel#attachment-object-attachment-structure-attachment-flags} */ export declare enum AttachmentFlags { /** * This attachment has been edited using the remix feature on mobile */ IsRemix = 4 } /** * @see {@link https://discord.com/developers/docs/resources/channel#channel-mention-object-channel-mention-structure} */ export interface APIChannelMention { /** * ID of the channel */ id: Snowflake; /** * ID of the guild containing the channel */ guild_id: Snowflake; /** * The type of channel * * @see {@link https://discord.com/developers/docs/resources/channel#channel-object-channel-types} */ type: ChannelType; /** * The name of the channel */ name: string; } /** * @see {@link https://discord.com/developers/docs/resources/channel#allowed-mentions-object-allowed-mention-types} */ export declare enum AllowedMentionsTypes { /** * Controls `@everyone` and `@here` mentions */ Everyone = "everyone", /** * Controls role mentions */ Role = "roles", /** * Controls user mentions */ User = "users" } /** * @see {@link https://discord.com/developers/docs/resources/channel#allowed-mentions-object-allowed-mentions-structure} */ export interface APIAllowedMentions { /** * An array of allowed mention types to parse from the content * * @see {@link https://discord.com/developers/docs/resources/channel#allowed-mentions-object-allowed-mention-types} */ parse?: AllowedMentionsTypes[]; /** * Array of role_ids to mention (Max size of 100) */ roles?: Snowflake[]; /** * Array of user_ids to mention (Max size of 100) */ users?: Snowflake[]; /** * For replies, whether to mention the author of the message being replied to * * @defaultValue `false` */ replied_user?: boolean; } /** * @see {@link https://discord.com/developers/docs/components/reference#anatomy-of-a-component} */ export interface APIBaseComponent<T extends ComponentType> { /** * The type of the component */ type: T; /** * 32 bit integer used as an optional identifier for component * * The id field is optional and is used to identify components in the response from an interaction that aren't interactive components. The id must be unique within the message and is generated sequentially if left empty. Generation of ids won't use another id that exists in the message if you have one defined for another component. */ id?: number; } /** * @see {@link https://discord.com/developers/docs/components/reference#component-object-component-types} */ export declare enum ComponentType { /** * Container to display a row of interactive components */ ActionRow = 1, /** * Button component */ Button = 2, /** * Select menu for picking from defined text options */ StringSelect = 3, /** * Text Input component */ TextInput = 4, /** * Select menu for users */ UserSelect = 5, /** * Select menu for roles */ RoleSelect = 6, /** * Select menu for users and roles */ MentionableSelect = 7, /** * Select menu for channels */ ChannelSelect = 8, /** * Container to display text alongside an accessory component */ Section = 9, /** * Markdown text */ TextDisplay = 10, /** * Small image that can be used as an accessory */ Thumbnail = 11, /** * Display images and other media */ MediaGallery = 12, /** * Displays an attached file */ File = 13, /** * Component to add vertical padding between other components */ Separator = 14, /** * @unstable This component type is currently not documented by Discord but has a known value which we will try to keep up to date. */ ContentInventoryEntry = 16, /** * Container that visually groups a set of components */ Container = 17, /** * Select menu for picking from defined text options * * @deprecated This is the old name for {@link ComponentType.StringSelect} */ SelectMenu = 3 } /** * An Action Row is a top-level layout component used in messages and modals. * * @see {@link https://discord.com/developers/docs/components/reference#action-row} */ export interface APIActionRowComponent<T extends APIComponentInActionRow> extends APIBaseComponent<ComponentType.ActionRow> { /** * The components in the ActionRow */ components: T[]; } export interface APIButtonBase<Style extends ButtonStyle> extends APIBaseComponent<ComponentType.Button> { /** * The style of the button */ style: Style; /** * The status of the button */ disabled?: boolean; } /** * @see {@link https://discord.com/developers/docs/components/reference#button} */ export interface APIButtonComponentBase<Style extends ButtonStyle> extends APIButtonBase<Style> { /** * The label to be displayed on the button */ label?: string; /** * The emoji to display to the left of the text */ emoji?: APIMessageComponentEmoji; } export interface APIMessageComponentEmoji { /** * Emoji id */ id?: Snowflake; /** * Emoji name */ name?: string; /** * Whether this emoji is animated */ animated?: boolean; } /** * @see {@link https://discord.com/developers/docs/components/reference#button} */ export interface APIButtonComponentWithCustomId extends APIButtonComponentBase<ButtonStyle.Danger | ButtonStyle.Primary | ButtonStyle.Secondary | ButtonStyle.Success> { /** * The custom_id to be sent in the interaction when clicked */ custom_id: string; } /** * @see {@link https://discord.com/developers/docs/components/reference#button} */ export interface APIButtonComponentWithURL extends APIButtonComponentBase<ButtonStyle.Link> { /** * The URL to direct users to when clicked for Link buttons */ url: string; } /** * @see {@link https://discord.com/developers/docs/components/reference#button} */ export interface APIButtonComponentWithSKUId extends APIButtonBase<ButtonStyle.Premium> { /** * The id for a purchasable SKU */ sku_id: Snowflake; } /** * A Button is an interactive component that can only be used in messages. It creates clickable elements that users can interact with, sending an interaction to your app when clicked. * * Buttons must be placed inside an Action Row or a Section's accessory field. * * @see {@link https://discord.com/developers/docs/components/reference#button} */ export type APIButtonComponent = APIButtonComponentWithCustomId | APIButtonComponentWithSKUId | APIButtonComponentWithURL; /** * @see {@link https://discord.com/developers/docs/components/reference#button-button-styles} */ export declare enum ButtonStyle { /** * The most important or recommended action in a group of options */ Primary = 1, /** * Alternative or supporting actions */ Secondary = 2, /** * Positive confirmation or completion actions */ Success = 3, /** * An action with irreversible consequences */ Danger = 4, /** * Navigates to a URL */ Link = 5, /** * Purchase */ Premium = 6 } /** * @see {@link https://discord.com/developers/docs/components/reference#text-input-text-input-styles} */ export declare enum TextInputStyle { /** * Single-line input */ Short = 1, /** * Multi-line input */ Paragraph = 2 } /** * @see {@link https://discord.com/developers/docs/components/reference} */ export interface APIBaseSelectMenuComponent<T extends ComponentType.ChannelSelect | ComponentType.MentionableSelect | ComponentType.RoleSelect | ComponentType.StringSelect | ComponentType.UserSelect> extends APIBaseComponent<T> { /** * A developer-defined identifier for the select menu, max 100 characters */ custom_id: string; /** * Custom placeholder text if nothing is selected, max 150 characters */ placeholder?: string; /** * The minimum number of items that must be chosen; min 0, max 25 * * @defaultValue `1` */ min_values?: number; /** * The maximum number of items that can be chosen; max 25 * * @defaultValue `1` */ max_values?: number; /** * Disable the select * * @defaultValue `false` */ disabled?: boolean; } /** * @see {@link https://discord.com/developers/docs/components/reference} */ export interface APIBaseAutoPopulatedSelectMenuComponent<T extends ComponentType.ChannelSelect | ComponentType.MentionableSelect | ComponentType.RoleSelect | ComponentType.UserSelect, D extends SelectMenuDefaultValueType> extends APIBaseSelectMenuComponent<T> { /** * List of default values for auto-populated select menu components */ default_values?: APISelectMenuDefaultValue<D>[]; } /** * A String Select is an interactive component that allows users to select one or more provided options in a message. * * String Selects can be configured for both single-select and multi-select behavior. When a user finishes making their choice(s) your app receives an interaction. * * String Selects must be placed inside an Action Row and are only available in messages. An Action Row can contain only one select menu and cannot contain buttons if it has a select menu. * * @see {@link https://discord.com/developers/docs/components/reference#string-select} */ export interface APIStringSelectComponent extends APIBaseSelectMenuComponent<ComponentType.StringSelect> { /** * Specified choices in a select menu; max 25 */ options: APISelectMenuOption[]; } /** * A User Select is an interactive component that allows users to select one or more users in a message. Options are automatically populated based on the server's available users. * * User Selects can be configured for both single-select and multi-select behavior. When a user finishes making their choice(s) your app receives an interaction. * * User Selects must be placed inside an Action Row and are only available in messages. An Action Row can contain only one select menu and cannot contain buttons if it has a select menu. * * @see {@link https://discord.com/developers/docs/components/reference#user-select} */ export type APIUserSelectComponent = APIBaseAutoPopulatedSelectMenuComponent<ComponentType.UserSelect, SelectMenuDefaultValueType.User>; /** * A Role Select is an interactive component that allows users to select one or more roles in a message. Options are automatically populated based on the server's available roles. * * Role Selects can be configured for both single-select and multi-select behavior. When a user finishes making their choice(s) your app receives an interaction. * * Role Selects must be placed inside an Action Row and are only available in messages. An Action Row can contain only one select menu and cannot contain buttons if it has a select menu. * * @see {@link https://discord.com/developers/docs/components/reference#role-select} */ export type APIRoleSelectComponent = APIBaseAutoPopulatedSelectMenuComponent<ComponentType.RoleSelect, SelectMenuDefaultValueType.Role>; /** * A Mentionable Select is an interactive component that allows users to select one or more mentionables in a message. Options are automatically populated based on available mentionables in the server. * * Mentionable Selects can be configured for both single-select and multi-select behavior. When a user finishes making their choice(s), your app receives an interaction. * * Mentionable Selects must be placed inside an Action Row and are only available in messages. An Action Row can contain only one select menu and cannot contain buttons if it has a select menu. * * @see {@link https://discord.com/developers/docs/components/reference#mentionable-select} */ export type APIMentionableSelectComponent = APIBaseAutoPopulatedSelectMenuComponent<ComponentType.MentionableSelect, SelectMenuDefaultValueType.Role | SelectMenuDefaultValueType.User>; /** * A Channel Select is an interactive component that allows users to select one or more channels in a message. Options are automatically populated based on available channels in the server and can be filtered by channel types. * * Channel Selects can be configured for both single-select and multi-select behavior. When a user finishes making their choice(s) your app receives an interaction. * * Channel Selects must be placed inside an Action Row and are only available in messages. An Action Row can contain only one select menu and cannot contain buttons if it has a select menu. * * @see {@link https://discord.com/developers/docs/components/reference#channel-select} */ export interface APIChannelSelectComponent extends APIBaseAutoPopulatedSelectMenuComponent<ComponentType.ChannelSelect, SelectMenuDefaultValueType.Channel> { /** * List of channel types to include in the ChannelSelect component */ channel_types?: ChannelType[]; } /** * @see {@link https://discord.com/developers/docs/components/reference#user-select-select-default-value-structure} */ export declare enum SelectMenuDefaultValueType { Channel = "channel", Role = "role", User = "user" } /** * @see {@link https://discord.com/developers/docs/components/reference#user-select-select-default-value-structure} */ export interface APISelectMenuDefaultValue<T extends SelectMenuDefaultValueType> { type: T; id: Snowflake; } /** * @see {@link https://discord.com/developers/docs/components/reference} */ export type APIAutoPopulatedSelectMenuComponent = APIChannelSelectComponent | APIMentionableSelectComponent | APIRoleSelectComponent | APIUserSelectComponent; /** * @see {@link https://discord.com/developers/docs/components/reference} */ export type APISelectMenuComponent = APIChannelSelectComponent | APIMentionableSelectComponent | APIRoleSelectComponent | APIStringSelectComponent | APIUserSelectComponent; /** * @see {@link https://discord.com/developers/docs/components/reference#string-select-select-option-structure} */ export interface APISelectMenuOption { /** * The user-facing name of the option (max 100 chars) */ label: string; /** * The dev-defined value of the option (max 100 chars) */ value: string; /** * An additional description of the option (max 100 chars) */ description?: string; /** * The emoji to display to the left of the option */ emoji?: APIMessageComponentEmoji; /** * Whether this option should be already-selected by default */ default?: boolean; } /** * Text Input is an interactive component that allows users to enter free-form text responses in modals. It supports both short, single-line inputs and longer, multi-line paragraph inputs. * * Text Inputs can only be used within modals and must be placed inside an Action Row. * * When defining a text input component, you can set attributes to customize the behavior and appearance of it. However, not all attributes will be returned in the text input interaction payload. * * @see {@link https://discord.com/developers/docs/components/reference#text-input} */ export interface APITextInputComponent extends APIBaseComponent<ComponentType.TextInput> { /** * One of text input styles */ style: TextInputStyle; /** * The custom id for the text input */ custom_id: string; /** * Text that appears on top of the text input field, max 45 characters */ label: string; /** * Placeholder for the text input */ placeholder?: string; /** * The pre-filled text in the text input */ value?: string; /** * Minimal length of text input */ min_length?: number; /** * Maximal length of text input */ max_length?: number; /** * Whether or not this text input is required or not */ required?: boolean; } export declare enum UnfurledMediaItemLoadingState { Unknown = 0, Loading = 1, LoadedSuccess = 2, LoadedNotFound = 3 } /** * @see {@link https://discord.com/developers/docs/components/reference#unfurled-media-item-structure} */ export interface APIUnfurledMediaItem { /** * Supports arbitrary urls and attachment://<filename> references */ url: string; /** * The proxied url of the media item. This field is ignored and provided by the API as part of the response */ proxy_url?: string; /** * The width of the media item. This field is ignored and provided by the API as part of the response */ width?: number | null; /** * The height of the media item. This field is ignored and provided by the API as part of the response */ height?: number | null; placeholder?: string | null; placeholder_version?: number | null; /** * The media type of the content. This field is ignored and provided by the API as part of the response * * @see {@link https://en.wikipedia.org/wiki/Media_type} */ content_type?: string | null; loading_state?: UnfurledMediaItemLoadingState; flags?: number; /** * The id of the uploaded attachment. This field is ignored and provided by the API as part of the response */ attachment_id?: Snowflake; } /** * A Section is a top-level layout component that allows you to join text contextually with an accessory. * * Sections are only available in messages. * * @see {@link https://discord.com/developers/docs/components/reference#section} */ export interface APISectionComponent extends APIBaseComponent<ComponentType.Section> { /** * One to three text components */ components: APITextDisplayComponent[]; /** * A thumbnail or a button component, with a future possibility of adding more compatible components */ accessory: APISectionAccessoryComponent; } /** * A Text Display is a top-level content component that allows you to add text to your message formatted with markdown and mention users and roles. This is similar to the content field of a message, but allows you to add multiple text components, controlling the layout of your message. * * Text Displays are only available in messages. * * @see {@link https://discord.com/developers/docs/components/reference#text-display} */ export interface APITextDisplayComponent extends APIBaseComponent<ComponentType.TextDisplay> { /** * Text that will be displayed similar to a message */ content: string; } /** * A Thumbnail is a content component that is a small image only usable as an accessory in a section. The preview comes from an url or attachment through the unfurled media item structure. * * Thumbnails are only available in messages as an accessory in a section. * * @see {@link https://discord.com/developers/docs/components/reference#thumbnail} */ export interface APIThumbnailComponent extends APIBaseComponent<ComponentType.Thumbnail> { /** * A url or attachment */ media: APIUnfurledMediaItem; /** * Alt text for the media */ description?: string | null; /** * Whether the thumbnail should be a spoiler (or blurred out) * * @defaultValue `false` */ spoiler?: boolean; } /** * @see {@link https://discord.com/developers/docs/components/reference#media-gallery-media-gallery-item-structure} */ export interface APIMediaGalleryItem { /** * A url or attachment */ media: APIUnfurledMediaItem; /** * Alt text for the media */ description?: string | null; /** * Whether the media should be a spoiler (or blurred out) * * @defaultValue `false` */ spoiler?: boolean; } /** * A Media Gallery is a top-level content component that allows you to display 1-10 media attachments in an organized gallery format. Each item can have optional descriptions and can be marked as spoilers. * * Media Galleries are only available in messages. * * @see {@link https://discord.com/developers/docs/components/reference#media-gallery} */ export interface APIMediaGalleryComponent extends APIBaseComponent<ComponentType.MediaGallery> { /** * 1 to 10 media gallery items */ items: APIMediaGalleryItem[]; } /** * A File is a top-level component that allows you to display an uploaded file as an attachment to the message and reference it in the component. * * Each file component can only display 1 attached file, but you can upload multiple files and add them to different file components within your payload. * * Files are only available in messages. * * @see {@link https://discord.com/developers/docs/components/reference#file} */ export interface APIFileComponent extends APIBaseComponent<ComponentType.File> { /** * This unfurled media item is unique in that it **only** support attachment references using the `attachment://<filename>` syntax */ file: APIUnfurledMediaItem; /** * Whether the media should be a spoiler (or blurred out) * * @defaultValue `false` */ spoiler?: boolean; } /** * @see {@link https://discord.com/developers/docs/components/reference#separator} */ export declare enum SeparatorSpacingSize { Small = 1, Large = 2 } /** * A Separator is a top-level layout component that adds vertical padding and visual division between other components. * * Separators are only available in messages. * * @see {@link https://discord.com/developers/docs/components/reference#separator} */ export interface APISeparatorComponent extends APIBaseComponent<ComponentType.Separator> { /** * Whether a visual divider should be displayed in the component * * @defaultValue `true` */ divider?: boolean; /** * Size of separator padding * * @defaultValue `SeparatorSpacingSize.Small` */ spacing?: SeparatorSpacingSize; } /** * A Container is a top-level layout component that holds up to 10 components. Containers are visually distinct from surrounding components and has an optional customizable color bar. * * Containers are only available in messages. * * @see {@link https://discord.com/developers/docs/components/reference#container} */ export interface APIContainerComponent extends APIBaseComponent<ComponentType.Container> { /** * Color for the accent on the container as RGB from `0x000000` to `0xFFFFFF` */ accent_color?: number | null; /** * Whether the container should be a spoiler (or blurred out) * * @defaultValue `false` */ spoiler?: boolean; /** * Up to 10 components of the type action row, text display, section, media gallery, separator, or file */ components: APIComponentInContainer[]; } /** * @see {@link https://discord.com/developers/docs/resources/channel#message-snapshot-object} */ export interface APIMessageSnapshot { /** * Subset of the message object fields */ message: APIMessageSnapshotFields; /** * Id of the origin message's guild * * @deprecated This field doesn't accurately reflect the Discord API as it doesn't exist nor is documented and will * be removed in the next major version. * * It was added in {@link https://github.com/discord/discord-api-docs/pull/6833/commits/d18f72d06d62e6b1d51ca2c1ef308ddc29ff3348 | d18f72d} * but was later removed before the PR ({@link https://github.com/discord/discord-api-docs/pull/6833 | discord-api-docs#6833}) was merged. * @see {@link https://github.com/discordjs/discord-api-types/pull/1084 | discord-api-types#1084} for more information. */ guild_id?: Snowflake; } /** * @see {@link https://discord.com/developers/docs/resources/channel#channel-object-channel-flags} */ export declare enum ChannelFlags { /** * @unstable This channel flag is currently not documented by Discord but has a known value which we will try to keep up to date. */ GuildFeedRemoved = 1, /** * This thread is pinned to the top of its parent forum channel */ Pinned = 2, /** * @unstable This channel flag is currently not documented by Discord but has a known value which we will try to keep up to date. */ ActiveChannelsRemoved = 4, /** * Whether a tag is required to be specified when creating a thread in a forum channel. * Tags are specified in the `applied_tags` field */ RequireTag = 16, /** * @unstable This channel flag is currently not documented by Discord but has a known value which we will try to keep up to date. */ IsSpam = 32, /** * @unstable This channel flag is currently not documented by Discord but has a known value which we will try to keep up to date. */ IsGuildResourceChannel = 128, /** * @unstable This channel flag is currently not documented by Discord but has a known value which we will try to keep up to date. */ ClydeAI = 256, /** * @unstable This channel flag is currently not documented by Discord but has a known value which we will try to keep up to date. */ IsScheduledForDeletion = 512, /** * Whether media download options are hidden. */ HideMediaDownloadOptions = 32768 } /** * All components that can appear in messages. * * For more specific sets, see {@link APIMessageTopLevelComponent}, {@link APIComponentInMessageActionRow}, {@link APIComponentInContainer}, and {@link APISectionAccessoryComponent} * * @see {@link https://discord.com/developers/docs/components/reference} */ export type APIMessageComponent = APIActionRowComponent<APIComponentInMessageActionRow> | APIButtonComponent | APIContainerComponent | APIFileComponent | APIMediaGalleryComponent | APISectionComponent | APISelectMenuComponent | APISeparatorComponent | APITextDisplayComponent | APIThumbnailComponent; /** * @see {@link https://discord.com/developers/docs/components/reference} */ export type APIMessageTopLevelComponent = APIActionRowComponent<APIComponentInMessageActionRow> | APIContainerComponent | APIFileComponent | APIMediaGalleryComponent | APISectionComponent | APISeparatorComponent | APITextDisplayComponent; /** * @see {@link https://discord.com/developers/docs/components/reference} */ export type APIModalComponent = APIActionRowComponent<APIComponentInModalActionRow> | APIComponentInModalActionRow; /** * @see {@link https://discord.com/developers/docs/components/reference#action-row} */ export type APIComponentInActionRow = APIComponentInMessageActionRow | APIComponentInModalActionRow; /** * @see {@link https://discord.com/developers/docs/components/reference#action-row} */ export type APIComponentInMessageActionRow = APIButtonComponent | APISelectMenuComponent; /** * @see {@link https://discord.com/developers/docs/components/reference#action-row} */ export type APIComponentInModalActionRow = APITextInputComponent; /** * @see {@link https://discord.com/developers/docs/components/reference#section} */ export type APISectionAccessoryComponent = APIButtonComponent | APIThumbnailComponent; /** * @see {@link https://discord.com/developers/docs/components/reference#container} */ export type APIComponentInContainer = APIActionRowComponent<APIComponentInMessageActionRow> | APIFileComponent | APIMediaGalleryComponent | APISectionComponent | APISeparatorComponent | APITextDisplayComponent; /** * https://discord.com/developers/docs/resources/message#message-snapshot-object */ export type APIMessageSnapshotFields = Pick<APIMessage, 'attachments' | 'components' | 'content' | 'edited_timestamp' | 'embeds' | 'flags' | 'mention_roles' | 'mentions' | 'sticker_items' | 'stickers' | 'timestamp' | 'type'>; //# sourceMappingURL=channel.d.ts.map node_modules/discord-api-types/payloads/v10/template.js 0000664 00000000316 15114741631 0017161 0 ustar 00 "use strict"; /** * Types extracted from https://discord.com/developers/docs/resources/guild-template */ Object.defineProperty(exports, "__esModule", { value: true }); //# sourceMappingURL=template.js.map node_modules/discord-api-types/payloads/v10/monetization.js 0000664 00000007146 15114741631 0020076 0 ustar 00 "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.SubscriptionStatus = exports.SKUType = exports.SKUFlags = exports.EntitlementType = void 0; /** * @see {@link https://discord.com/developers/docs/monetization/entitlements#entitlement-object-entitlement-types} */ var EntitlementType; (function (EntitlementType) { /** * Entitlement was purchased by user */ EntitlementType[EntitlementType["Purchase"] = 1] = "Purchase"; /** * Entitlement for Discord Nitro subscription */ EntitlementType[EntitlementType["PremiumSubscription"] = 2] = "PremiumSubscription"; /** * Entitlement was gifted by developer */ EntitlementType[EntitlementType["DeveloperGift"] = 3] = "DeveloperGift"; /** * Entitlement was purchased by a dev in application test mode */ EntitlementType[EntitlementType["TestModePurchase"] = 4] = "TestModePurchase"; /** * Entitlement was granted when the SKU was free */ EntitlementType[EntitlementType["FreePurchase"] = 5] = "FreePurchase"; /** * Entitlement was gifted by another user */ EntitlementType[EntitlementType["UserGift"] = 6] = "UserGift"; /** * Entitlement was claimed by user for free as a Nitro Subscriber */ EntitlementType[EntitlementType["PremiumPurchase"] = 7] = "PremiumPurchase"; /** * Entitlement was purchased as an app subscription */ EntitlementType[EntitlementType["ApplicationSubscription"] = 8] = "ApplicationSubscription"; })(EntitlementType || (exports.EntitlementType = EntitlementType = {})); /** * @see {@link https://discord.com/developers/docs/monetization/skus#sku-object-sku-flags} */ var SKUFlags; (function (SKUFlags) { /** * SKU is available for purchase */ SKUFlags[SKUFlags["Available"] = 4] = "Available"; /** * Recurring SKU that can be purchased by a user and applied to a single server. * Grants access to every user in that server. */ SKUFlags[SKUFlags["GuildSubscription"] = 128] = "GuildSubscription"; /** * Recurring SKU purchased by a user for themselves. Grants access to the purchasing user in every server. */ SKUFlags[SKUFlags["UserSubscription"] = 256] = "UserSubscription"; })(SKUFlags || (exports.SKUFlags = SKUFlags = {})); /** * @see {@link https://discord.com/developers/docs/resources/sku#sku-object-sku-types} */ var SKUType; (function (SKUType) { /** * Durable one-time purchase */ SKUType[SKUType["Durable"] = 2] = "Durable"; /** * Consumable one-time purchase */ SKUType[SKUType["Consumable"] = 3] = "Consumable"; /** * Represents a recurring subscription */ SKUType[SKUType["Subscription"] = 5] = "Subscription"; /** * System-generated group for each Subscription SKU created */ SKUType[SKUType["SubscriptionGroup"] = 6] = "SubscriptionGroup"; })(SKUType || (exports.SKUType = SKUType = {})); /** * @see {@link https://discord.com/developers/docs/resources/subscription#subscription-statuses} */ var SubscriptionStatus; (function (SubscriptionStatus) { /** * Subscription is active and scheduled to renew. */ SubscriptionStatus[SubscriptionStatus["Active"] = 0] = "Active"; /** * Subscription is active but will not renew. */ SubscriptionStatus[SubscriptionStatus["Ending"] = 1] = "Ending"; /** * Subscription is inactive and not being charged. */ SubscriptionStatus[SubscriptionStatus["Inactive"] = 2] = "Inactive"; })(SubscriptionStatus || (exports.SubscriptionStatus = SubscriptionStatus = {})); //# sourceMappingURL=monetization.js.map node_modules/discord-api-types/payloads/v10/sticker.js 0000664 00000002271 15114741631 0017014 0 ustar 00 "use strict"; /** * Types extracted from https://discord.com/developers/docs/resources/sticker */ Object.defineProperty(exports, "__esModule", { value: true }); exports.StickerFormatType = exports.StickerType = void 0; /** * @see {@link https://discord.com/developers/docs/resources/sticker#sticker-object-sticker-types} */ var StickerType; (function (StickerType) { /** * An official sticker in a pack */ StickerType[StickerType["Standard"] = 1] = "Standard"; /** * A sticker uploaded to a guild for the guild's members */ StickerType[StickerType["Guild"] = 2] = "Guild"; })(StickerType || (exports.StickerType = StickerType = {})); /** * @see {@link https://discord.com/developers/docs/resources/sticker#sticker-object-sticker-format-types} */ var StickerFormatType; (function (StickerFormatType) { StickerFormatType[StickerFormatType["PNG"] = 1] = "PNG"; StickerFormatType[StickerFormatType["APNG"] = 2] = "APNG"; StickerFormatType[StickerFormatType["Lottie"] = 3] = "Lottie"; StickerFormatType[StickerFormatType["GIF"] = 4] = "GIF"; })(StickerFormatType || (exports.StickerFormatType = StickerFormatType = {})); //# sourceMappingURL=sticker.js.map node_modules/discord-api-types/payloads/v10/monetization.d.ts 0000664 00000012202 15114741631 0020317 0 ustar 00 import type { Snowflake } from '../../globals'; /** * @see {@link https://discord.com/developers/docs/monetization/entitlements#entitlement-object-entitlement-structure} */ export interface APIEntitlement { /** * ID of the entitlement */ id: Snowflake; /** * ID of the SKU */ sku_id: Snowflake; /** * ID of the user that is granted access to the entitlement's sku */ user_id?: Snowflake; /** * ID of the guild that is granted access to the entitlement's sku */ guild_id?: Snowflake; /** * ID of the parent application */ application_id: Snowflake; /** * Type of entitlement */ type: EntitlementType; /** * Whether the entitlement was deleted */ deleted: boolean; /** * Start date at which the entitlement is valid. */ starts_at: string | null; /** * Date at which the entitlement is no longer valid. */ ends_at: string | null; /** * For consumable items, whether or not the entitlement has been consumed */ consumed?: boolean; } /** * @see {@link https://discord.com/developers/docs/monetization/entitlements#entitlement-object-entitlement-types} */ export declare enum EntitlementType { /** * Entitlement was purchased by user */ Purchase = 1, /** * Entitlement for Discord Nitro subscription */ PremiumSubscription = 2, /** * Entitlement was gifted by developer */ DeveloperGift = 3, /** * Entitlement was purchased by a dev in application test mode */ TestModePurchase = 4, /** * Entitlement was granted when the SKU was free */ FreePurchase = 5, /** * Entitlement was gifted by another user */ UserGift = 6, /** * Entitlement was claimed by user for free as a Nitro Subscriber */ PremiumPurchase = 7, /** * Entitlement was purchased as an app subscription */ ApplicationSubscription = 8 } /** * @see {@link https://discord.com/developers/docs/monetization/skus#sku-object-sku-structure} */ export interface APISKU { /** * ID of SKU */ id: Snowflake; /** * Type of SKU */ type: SKUType; /** * ID of the parent application */ application_id: Snowflake; /** * Customer-facing name of your premium offering */ name: string; /** * System-generated URL slug based on the SKU's name */ slug: string; /** * SKU flags combined as a bitfield * * @see {@link https://en.wikipedia.org/wiki/Bit_field} */ flags: SKUFlags; } /** * @see {@link https://discord.com/developers/docs/monetization/skus#sku-object-sku-flags} */ export declare enum SKUFlags { /** * SKU is available for purchase */ Available = 4, /** * Recurring SKU that can be purchased by a user and applied to a single server. * Grants access to every user in that server. */ GuildSubscription = 128, /** * Recurring SKU purchased by a user for themselves. Grants access to the purchasing user in every server. */ UserSubscription = 256 } /** * @see {@link https://discord.com/developers/docs/resources/sku#sku-object-sku-types} */ export declare enum SKUType { /** * Durable one-time purchase */ Durable = 2, /** * Consumable one-time purchase */ Consumable = 3, /** * Represents a recurring subscription */ Subscription = 5, /** * System-generated group for each Subscription SKU created */ SubscriptionGroup = 6 } /** * @see {@link https://discord.com/developers/docs/resources/subscription#subscription-object} */ export interface APISubscription { /** * ID of the subscription */ id: Snowflake; /** * ID of the user who is subscribed */ user_id: Snowflake; /** * List of SKUs subscribed to */ sku_ids: Snowflake[]; /** * List of entitlements granted for this subscription */ entitlement_ids: Snowflake[]; /** * List of SKUs that this user will be subscribed to at renewal */ renewal_sku_ids: Snowflake[] | null; /** * Start of the current subscription period */ current_period_start: string; /** * End of the current subscription period */ current_period_end: string; /** * Current status of the subscription */ status: SubscriptionStatus; /** * When the subscription was canceled */ canceled_at: string | null; /** * ISO3166-1 alpha-2 country code of the payment source used to purchase the subscription. Missing unless queried with a private OAuth scope. */ country?: string; } /** * @see {@link https://discord.com/developers/docs/resources/subscription#subscription-statuses} */ export declare enum SubscriptionStatus { /** * Subscription is active and scheduled to renew. */ Active = 0, /** * Subscription is active but will not renew. */ Ending = 1, /** * Subscription is inactive and not being charged. */ Inactive = 2 } //# sourceMappingURL=monetization.d.ts.map node_modules/discord-api-types/payloads/v10/guildScheduledEvent.d.ts.map 0000664 00000006117 15114741631 0022312 0 ustar 00 {"version":3,"file":"guildScheduledEvent.d.ts","sourceRoot":"","sources":["guildScheduledEvent.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC/C,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAC9C,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,QAAQ,CAAC;AAEtC,MAAM,WAAW,0BAA0B,CAAC,IAAI,SAAS,6BAA6B;IACrF;;OAEG;IACH,EAAE,EAAE,SAAS,CAAC;IACd;;OAEG;IACH,QAAQ,EAAE,SAAS,CAAC;IACpB;;OAEG;IACH,UAAU,EAAE,SAAS,GAAG,IAAI,CAAC;IAC7B;;OAEG;IACH,UAAU,CAAC,EAAE,SAAS,GAAG,IAAI,CAAC;IAC9B;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B;;OAEG;IACH,oBAAoB,EAAE,MAAM,CAAC;IAC7B;;OAEG;IACH,kBAAkB,EAAE,MAAM,GAAG,IAAI,CAAC;IAClC;;OAEG;IACH,aAAa,EAAE,+BAA+B,CAAC;IAC/C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AQ,IAAA;CACR;AAED;;GAEG;AACH,oBAAY,yBAAyB;IACpC,SAAS,IAAI;IACb,MAAM,IAAA;IACN,SAAS,IAAA;IACT,QAAQ,IAAA;CACR;AAED;;GAEG;AACH,oBAAY,+BAA+B;IAC1C;;OAEG;IACH,SAAS,IAAI;CACb;AAED;;GAEG;AACH,MAAM,WAAW,0BAA0B;IAC1C;;OAEG;IACH,wBAAwB,EAAE,SAAS,CAAC;IACpC;;OAEG;IACH,IAAI,EAAE,OAAO,CAAC;IACd;;OAEG;IACH,MAAM,CAAC,EAAE,cAAc,CAAC;CACxB"} node_modules/discord-api-types/payloads/v10/guildScheduledEvent.js 0000664 00000013775 15114741631 0021312 0 ustar 00 "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.GuildScheduledEventPrivacyLevel = exports.GuildScheduledEventStatus = exports.GuildScheduledEventEntityType = exports.GuildScheduledEventRecurrenceRuleMonth = exports.GuildScheduledEventRecurrenceRuleWeekday = exports.GuildScheduledEventRecurrenceRuleFrequency = void 0; /** * @see {@link https://discord.com/developers/docs/resources/guild-scheduled-event#guild-scheduled-event-recurrence-rule-object-guild-scheduled-event-recurrence-rule-frequency} */ var GuildScheduledEventRecurrenceRuleFrequency; (function (GuildScheduledEventRecurrenceRuleFrequency) { GuildScheduledEventRecurrenceRuleFrequency[GuildScheduledEventRecurrenceRuleFrequency["Yearly"] = 0] = "Yearly"; GuildScheduledEventRecurrenceRuleFrequency[GuildScheduledEventRecurrenceRuleFrequency["Monthly"] = 1] = "Monthly"; GuildScheduledEventRecurrenceRuleFrequency[GuildScheduledEventRecurrenceRuleFrequency["Weekly"] = 2] = "Weekly"; GuildScheduledEventRecurrenceRuleFrequency[GuildScheduledEventRecurrenceRuleFrequency["Daily"] = 3] = "Daily"; })(GuildScheduledEventRecurrenceRuleFrequency || (exports.GuildScheduledEventRecurrenceRuleFrequency = GuildScheduledEventRecurrenceRuleFrequency = {})); /** * @see {@link https://discord.com/developers/docs/resources/guild-scheduled-event#guild-scheduled-event-recurrence-rule-object-guild-scheduled-event-recurrence-rule-weekday} */ var GuildScheduledEventRecurrenceRuleWeekday; (function (GuildScheduledEventRecurrenceRuleWeekday) { GuildScheduledEventRecurrenceRuleWeekday[GuildScheduledEventRecurrenceRuleWeekday["Monday"] = 0] = "Monday"; GuildScheduledEventRecurrenceRuleWeekday[GuildScheduledEventRecurrenceRuleWeekday["Tuesday"] = 1] = "Tuesday"; GuildScheduledEventRecurrenceRuleWeekday[GuildScheduledEventRecurrenceRuleWeekday["Wednesday"] = 2] = "Wednesday"; GuildScheduledEventRecurrenceRuleWeekday[GuildScheduledEventRecurrenceRuleWeekday["Thursday"] = 3] = "Thursday"; GuildScheduledEventRecurrenceRuleWeekday[GuildScheduledEventRecurrenceRuleWeekday["Friday"] = 4] = "Friday"; GuildScheduledEventRecurrenceRuleWeekday[GuildScheduledEventRecurrenceRuleWeekday["Saturday"] = 5] = "Saturday"; GuildScheduledEventRecurrenceRuleWeekday[GuildScheduledEventRecurrenceRuleWeekday["Sunday"] = 6] = "Sunday"; })(GuildScheduledEventRecurrenceRuleWeekday || (exports.GuildScheduledEventRecurrenceRuleWeekday = GuildScheduledEventRecurrenceRuleWeekday = {})); /** * @see {@link https://discord.com/developers/docs/resources/guild-scheduled-event#guild-scheduled-event-recurrence-rule-object-guild-scheduled-event-recurrence-rule-month} */ var GuildScheduledEventRecurrenceRuleMonth; (function (GuildScheduledEventRecurrenceRuleMonth) { GuildScheduledEventRecurrenceRuleMonth[GuildScheduledEventRecurrenceRuleMonth["January"] = 1] = "January"; GuildScheduledEventRecurrenceRuleMonth[GuildScheduledEventRecurrenceRuleMonth["February"] = 2] = "February"; GuildScheduledEventRecurrenceRuleMonth[GuildScheduledEventRecurrenceRuleMonth["March"] = 3] = "March"; GuildScheduledEventRecurrenceRuleMonth[GuildScheduledEventRecurrenceRuleMonth["April"] = 4] = "April"; GuildScheduledEventRecurrenceRuleMonth[GuildScheduledEventRecurrenceRuleMonth["May"] = 5] = "May"; GuildScheduledEventRecurrenceRuleMonth[GuildScheduledEventRecurrenceRuleMonth["June"] = 6] = "June"; GuildScheduledEventRecurrenceRuleMonth[GuildScheduledEventRecurrenceRuleMonth["July"] = 7] = "July"; GuildScheduledEventRecurrenceRuleMonth[GuildScheduledEventRecurrenceRuleMonth["August"] = 8] = "August"; GuildScheduledEventRecurrenceRuleMonth[GuildScheduledEventRecurrenceRuleMonth["September"] = 9] = "September"; GuildScheduledEventRecurrenceRuleMonth[GuildScheduledEventRecurrenceRuleMonth["October"] = 10] = "October"; GuildScheduledEventRecurrenceRuleMonth[GuildScheduledEventRecurrenceRuleMonth["November"] = 11] = "November"; GuildScheduledEventRecurrenceRuleMonth[GuildScheduledEventRecurrenceRuleMonth["December"] = 12] = "December"; })(GuildScheduledEventRecurrenceRuleMonth || (exports.GuildScheduledEventRecurrenceRuleMonth = GuildScheduledEventRecurrenceRuleMonth = {})); /** * @see {@link https://discord.com/developers/docs/resources/guild-scheduled-event#guild-scheduled-event-object-guild-scheduled-event-entity-types} */ var GuildScheduledEventEntityType; (function (GuildScheduledEventEntityType) { GuildScheduledEventEntityType[GuildScheduledEventEntityType["StageInstance"] = 1] = "StageInstance"; GuildScheduledEventEntityType[GuildScheduledEventEntityType["Voice"] = 2] = "Voice"; GuildScheduledEventEntityType[GuildScheduledEventEntityType["External"] = 3] = "External"; })(GuildScheduledEventEntityType || (exports.GuildScheduledEventEntityType = GuildScheduledEventEntityType = {})); /** * @see {@link https://discord.com/developers/docs/resources/guild-scheduled-event#guild-scheduled-event-object-guild-scheduled-event-status} */ var GuildScheduledEventStatus; (function (GuildScheduledEventStatus) { GuildScheduledEventStatus[GuildScheduledEventStatus["Scheduled"] = 1] = "Scheduled"; GuildScheduledEventStatus[GuildScheduledEventStatus["Active"] = 2] = "Active"; GuildScheduledEventStatus[GuildScheduledEventStatus["Completed"] = 3] = "Completed"; GuildScheduledEventStatus[GuildScheduledEventStatus["Canceled"] = 4] = "Canceled"; })(GuildScheduledEventStatus || (exports.GuildScheduledEventStatus = GuildScheduledEventStatus = {})); /** * @see {@link https://discord.com/developers/docs/resources/guild-scheduled-event#guild-scheduled-event-object-guild-scheduled-event-privacy-level} */ var GuildScheduledEventPrivacyLevel; (function (GuildScheduledEventPrivacyLevel) { /** * The scheduled event is only accessible to guild members */ GuildScheduledEventPrivacyLevel[GuildScheduledEventPrivacyLevel["GuildOnly"] = 2] = "GuildOnly"; })(GuildScheduledEventPrivacyLevel || (exports.GuildScheduledEventPrivacyLevel = GuildScheduledEventPrivacyLevel = {})); //# sourceMappingURL=guildScheduledEvent.js.map node_modules/discord-api-types/payloads/v10/sticker.js.map 0000664 00000000615 15114741631 0017570 0 ustar 00 {"version":3,"file":"sticker.js","sourceRoot":"","sources":["sticker.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AAkEH;;GAEG;AACH,IAAY,WASX;AATD,WAAY,WAAW;IACtB;;OAEG;IACH,qDAAY,CAAA;IACZ;;OAEG;IACH,+CAAK,CAAA;AACN,CAAC,EATW,WAAW,2BAAX,WAAW,QAStB;AAED;;GAEG;AACH,IAAY,iBAKX;AALD,WAAY,iBAAiB;IAC5B,uDAAO,CAAA;IACP,yDAAI,CAAA;IACJ,6DAAM,CAAA;IACN,uDAAG,CAAA;AACJ,CAAC,EALW,iBAAiB,iCAAjB,iBAAiB,QAK5B"} node_modules/discord-api-types/payloads/index.d.ts 0000664 00000000100 15114741631 0016272 0 ustar 00 export * from './v10/index'; //# sourceMappingURL=index.d.ts.map node_modules/discord-api-types/payloads/v8/stageInstance.js.map 0000664 00000000401 15114741631 0020634 0 ustar 00 {"version":3,"file":"stageInstance.js","sourceRoot":"","sources":["stageInstance.ts"],"names":[],"mappings":";;;AAqCA;;;;GAIG;AACH,IAAY,yBASX;AATD,WAAY,yBAAyB;IACpC;;OAEG;IACH,6EAAU,CAAA;IACV;;OAEG;IACH,mFAAS,CAAA;AACV,CAAC,EATW,yBAAyB,yCAAzB,yBAAyB,QASpC"} node_modules/discord-api-types/payloads/v8/user.js.map 0000664 00000001641 15114741631 0017031 0 ustar 00 {"version":3,"file":"user.js","sourceRoot":"","sources":["user.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AAmFH;;;;GAIG;AACH,IAAY,SAqEX;AArED,WAAY,SAAS;IACpB;;OAEG;IACH,2CAAc,CAAA;IACd;;OAEG;IACH,+CAAgB,CAAA;IAChB;;OAEG;IACH,mDAAkB,CAAA;IAClB;;OAEG;IACH,+DAAwB,CAAA;IACxB;;OAEG;IACH,4EAA8B,CAAA;IAC9B;;OAEG;IACH,6EAA8B,CAAA;IAC9B;;OAEG;IACH,6EAA8B,CAAA;IAC9B;;OAEG;IACH,6EAA8B,CAAA;IAC9B;;OAEG;IACH,gEAAwB,CAAA;IACxB;;OAEG;IACH,mEAAyB,CAAA;IACzB;;OAEG;IACH,2DAAqB,CAAA;IACrB;;OAEG;IACH,wEAA2B,CAAA;IAC3B;;OAEG;IACH,0EAA4B,CAAA;IAC5B;;OAEG;IACH,4EAA6B,CAAA;IAC7B;;;;OAIG;IACH,qDAAiB,CAAA;IACjB;;;;OAIG;IACH,oEAAqB,CAAA;AACtB,CAAC,EArEW,SAAS,yBAAT,SAAS,QAqEpB;AAED;;;;GAIG;AACH,IAAY,eAIX;AAJD,WAAY,eAAe;IAC1B,qDAAI,CAAA;IACJ,qEAAY,CAAA;IACZ,uDAAK,CAAA;AACN,CAAC,EAJW,eAAe,+BAAf,eAAe,QAI1B;AAkDD;;GAEG;AACH,IAAY,oBASX;AATD,WAAY,oBAAoB;IAC/B;;OAEG;IACH,+DAAI,CAAA;IACJ;;OAEG;IACH,uEAAQ,CAAA;AACT,CAAC,EATW,oBAAoB,oCAApB,oBAAoB,QAS/B"} node_modules/discord-api-types/payloads/v8/emoji.js 0000664 00000000302 15114741631 0016373 0 ustar 00 "use strict"; /** * Types extracted from https://discord.com/developers/docs/resources/emoji */ Object.defineProperty(exports, "__esModule", { value: true }); //# sourceMappingURL=emoji.js.map node_modules/discord-api-types/payloads/v8/interactions.d.ts 0000664 00000004433 15114741631 0020237 0 ustar 00 import type { APIApplicationCommandDMInteraction, APIApplicationCommandGuildInteraction, APIApplicationCommandInteraction } from './_interactions/applicationCommands'; import type { APIApplicationCommandAutocompleteDMInteraction, APIApplicationCommandAutocompleteGuildInteraction, APIApplicationCommandAutocompleteInteraction } from './_interactions/autocomplete'; import type { APIMessageComponentDMInteraction, APIMessageComponentGuildInteraction, APIMessageComponentInteraction } from './_interactions/messageComponents'; import type { APIModalSubmitDMInteraction, APIModalSubmitGuildInteraction, APIModalSubmitInteraction } from './_interactions/modalSubmit'; import type { APIPingInteraction } from './_interactions/ping'; export * from './_interactions/applicationCommands'; export * from './_interactions/autocomplete'; export * from './_interactions/base'; export * from './_interactions/messageComponents'; export * from './_interactions/modalSubmit'; export * from './_interactions/ping'; export * from './_interactions/responses'; /** * https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type APIInteraction = APIApplicationCommandAutocompleteInteraction | APIApplicationCommandInteraction | APIMessageComponentInteraction | APIModalSubmitInteraction | APIPingInteraction; /** * https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type APIDMInteraction = APIApplicationCommandAutocompleteDMInteraction | APIApplicationCommandDMInteraction | APIMessageComponentDMInteraction | APIModalSubmitDMInteraction; /** * https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type APIGuildInteraction = APIApplicationCommandAutocompleteGuildInteraction | APIApplicationCommandGuildInteraction | APIMessageComponentGuildInteraction | APIModalSubmitGuildInteraction; //# sourceMappingURL=interactions.d.ts.map node_modules/discord-api-types/payloads/v8/stageInstance.d.ts.map 0000664 00000001365 15114741631 0021102 0 ustar 00 {"version":3,"file":"stageInstance.d.ts","sourceRoot":"","sources":["stageInstance.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC/C,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAE9C;;;;GAIG;AACH,MAAM,WAAW,gBAAgB;IAChC;;OAEG;IACH,EAAE,EAAE,SAAS,CAAC;IACd;;OAEG;IACH,QAAQ,EAAE,SAAS,CAAC;IACpB;;OAEG;IACH,UAAU,EAAE,SAAS,CAAC;IACtB;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;;;OAIG;IACH,aAAa,EAAE,yBAAyB,CAAC;IACzC;;OAEG;IACH,qBAAqB,EAAE,OAAO,CAAC;CAC/B;AAED;;;;GAIG;AACH,oBAAY,yBAAyB;IACpC;;OAEG;IACH,MAAM,IAAI;IACV;;OAEG;IACH,SAAS,IAAA;CACT;AAED;;;;GAIG;AACH,MAAM,WAAW,sBAAsB;IACtC;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,iBAAiB,EAAE,MAAM,CAAC;IAC1B;;OAEG;IACH,aAAa,EAAE,MAAM,CAAC;IACtB;;;;OAIG;IACH,OAAO,EAAE,cAAc,EAAE,CAAC;CAC1B"} node_modules/discord-api-types/payloads/v8/index.d.ts.map 0000664 00000000764 15114741631 0017423 0 ustar 00 {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAC;AAC1B,cAAc,eAAe,CAAC;AAC9B,cAAc,YAAY,CAAC;AAC3B,cAAc,WAAW,CAAC;AAC1B,cAAc,SAAS,CAAC;AACxB,cAAc,WAAW,CAAC;AAC1B,cAAc,SAAS,CAAC;AACxB,cAAc,uBAAuB,CAAC;AACtC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,eAAe,CAAC;AAC9B,cAAc,iBAAiB,CAAC;AAChC,cAAc,WAAW,CAAC;AAC1B,cAAc,SAAS,CAAC;AACxB,cAAc,YAAY,CAAC;AAC3B,cAAc,QAAQ,CAAC;AACvB,cAAc,SAAS,CAAC;AACxB,cAAc,WAAW,CAAC"} node_modules/discord-api-types/payloads/v8/guildScheduledEvent.js.map 0000664 00000001026 15114741631 0021777 0 ustar 00 {"version":3,"file":"guildScheduledEvent.js","sourceRoot":"","sources":["guildScheduledEvent.ts"],"names":[],"mappings":";;;AA0HA;;;;GAIG;AACH,IAAY,6BAIX;AAJD,WAAY,6BAA6B;IACxC,mGAAiB,CAAA;IACjB,mFAAK,CAAA;IACL,yFAAQ,CAAA;AACT,CAAC,EAJW,6BAA6B,6CAA7B,6BAA6B,QAIxC;AAED;;;;GAIG;AACH,IAAY,yBAKX;AALD,WAAY,yBAAyB;IACpC,mFAAa,CAAA;IACb,6EAAM,CAAA;IACN,mFAAS,CAAA;IACT,iFAAQ,CAAA;AACT,CAAC,EALW,yBAAyB,yCAAzB,yBAAyB,QAKpC;AAED;;;;GAIG;AACH,IAAY,+BAKX;AALD,WAAY,+BAA+B;IAC1C;;OAEG;IACH,+FAAa,CAAA;AACd,CAAC,EALW,+BAA+B,+CAA/B,+BAA+B,QAK1C"} node_modules/discord-api-types/payloads/v8/oauth2.js.map 0000664 00000001464 15114741631 0017260 0 ustar 00 {"version":3,"file":"oauth2.js","sourceRoot":"","sources":["oauth2.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AAEH;;GAEG;AACH,IAAY,YA6GX;AA7GD,WAAY,YAAY;IACvB;;OAEG;IACH,2BAAW,CAAA;IACX;;;;;OAKG;IACH,2CAA2B,CAAA;IAC3B;;;;OAIG;IACH,+BAAe,CAAA;IACf;;;;OAIG;IACH,qCAAqB,CAAA;IACrB;;;;;OAKG;IACH,iCAAiB,CAAA;IACjB;;;;;OAKG;IACH,0CAA0B,CAAA;IAC1B;;;;OAIG;IACH,yDAAyC,CAAA;IACzC;;;;OAIG;IACH,yCAAyB,CAAA;IACzB;;;OAGG;IACH,8CAA8B,CAAA;IAC9B;;OAEG;IACH,2BAAW,CAAA;IACX;;OAEG;IACH,+DAA+C,CAAA;IAC/C;;OAEG;IACH,oDAAoC,CAAA;IACpC;;OAEG;IACH,uEAAuD,CAAA;IACvD;;OAEG;IACH,mEAAmD,CAAA;IACnD;;OAEG;IACH,qEAAqD,CAAA;IACrD;;OAEG;IACH,sEAAsD,CAAA;IACtD;;OAEG;IACH,wDAAwC,CAAA;IACxC;;OAEG;IACH,kDAAkC,CAAA;IAClC;;;;OAIG;IACH,oDAAoC,CAAA;IACpC;;;;OAIG;IACH,8DAA8C,CAAA;IAC9C;;;;OAIG;IACH,2EAA2D,CAAA;AAC5D,CAAC,EA7GW,YAAY,4BAAZ,YAAY,QA6GvB"} node_modules/discord-api-types/payloads/v8/channel.js.map 0000664 00000004636 15114741631 0017472 0 ustar 00 {"version":3,"file":"channel.js","sourceRoot":"","sources":["channel.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AAmOH;;;;GAIG;AACH,IAAY,WAyCX;AAzCD,WAAY,WAAW;IACtB;;OAEG;IACH,uDAAS,CAAA;IACT;;OAEG;IACH,yCAAE,CAAA;IACF;;OAEG;IACH,yDAAU,CAAA;IACV;;OAEG;IACH,mDAAO,CAAA;IACP;;;;OAIG;IACH,+DAAa,CAAA;IACb;;;;OAIG;IACH,uDAAS,CAAA;IACT;;;;OAIG;IACH,yDAAU,CAAA;IACV;;;;OAIG;IACH,oEAAoB,CAAA;AACrB,CAAC,EAzCW,WAAW,2BAAX,WAAW,QAyCtB;AAED;;GAEG;AACH,IAAY,gBASX;AATD,WAAY,gBAAgB;IAC3B;;OAEG;IACH,uDAAQ,CAAA;IACR;;OAEG;IACH,uDAAI,CAAA;AACL,CAAC,EATW,gBAAgB,gCAAhB,gBAAgB,QAS3B;AAiMD;;;;GAIG;AACH,IAAY,WAsBX;AAtBD,WAAY,WAAW;IACtB,mDAAO,CAAA;IACP,6DAAY,CAAA;IACZ,mEAAe,CAAA;IACf,6CAAI,CAAA;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AAA;IACnB;;OAEG;IACH,0BAAa,CAAA;AACd,CAAC,EAzBW,SAAS,yBAAT,SAAS,QAyBpB;AA0OD;;;;GAIG;AACH,IAAY,oBAaX;AAbD,WAAY,oBAAoB;IAC/B;;OAEG;IACH,6CAAqB,CAAA;IACrB;;OAEG;IACH,sCAAc,CAAA;IACd;;OAEG;IACH,sCAAc,CAAA;AACf,CAAC,EAbW,oBAAoB,oCAApB,oBAAoB,QAa/B;AA0CD;;;;GAIG;AACH,IAAY,aAiBX;AAjBD,WAAY,aAAa;IACxB;;OAEG;IACH,2DAAa,CAAA;IACb;;OAEG;IACH,qDAAM,CAAA;IACN;;OAEG;IACH,6DAAU,CAAA;IACV;;OAEG;IACH,2DAAS,CAAA;AACV,CAAC,EAjBW,aAAa,6BAAb,aAAa,QAiBxB;AAmFD;;;;GAIG;AACH,IAAY,WAMX;AAND,WAAY,WAAW;IACtB,mDAAW,CAAA;IACX,uDAAS,CAAA;IACT,mDAAO,CAAA;IACP,iDAAM,CAAA;IACN,6CAAI,CAAA;AACL,CAAC,EANW,WAAW,2BAAX,WAAW,QAMtB;AAED;;;;GAIG;AACH,IAAY,cAGX;AAHD,WAAY,cAAc;IACzB,qDAAS,CAAA;IACT,6DAAS,CAAA;AACV,CAAC,EAHW,cAAc,8BAAd,cAAc,QAGzB"} node_modules/discord-api-types/payloads/v8/oauth2.d.ts 0000664 00000011167 15114741631 0016741 0 ustar 00 /** * Types extracted from https://discord.com/developers/docs/topics/oauth2 */ /** * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export declare enum OAuth2Scopes { /** * For oauth2 bots, this puts the bot in the user's selected guild by default */ Bot = "bot", /** * Allows [/users/@me/connections](https://discord.com/developers/docs/resources/user#get-user-connections) * to return linked third-party accounts * * See https://discord.com/developers/docs/resources/user#get-user-connections */ Connections = "connections", /** * Enables [/users/@me](https://discord.com/developers/docs/resources/user#get-current-user) to return an `email` * * See https://discord.com/developers/docs/resources/user#get-current-user */ Email = "email", /** * Allows [/users/@me](https://discord.com/developers/docs/resources/user#get-current-user) without `email` * * See https://discord.com/developers/docs/resources/user#get-current-user */ Identify = "identify", /** * Allows [/users/@me/guilds](https://discord.com/developers/docs/resources/user#get-current-user-guilds) * to return basic information about all of a user's guilds * * See https://discord.com/developers/docs/resources/user#get-current-user-guilds */ Guilds = "guilds", /** * Allows [/guilds/{guild.id}/members/{user.id}](https://discord.com/developers/docs/resources/guild#add-guild-member) * to be used for joining users to a guild * * See https://discord.com/developers/docs/resources/guild#add-guild-member */ GuildsJoin = "guilds.join", /** * Allows /users/@me/guilds/{guild.id}/member to return a user's member information in a guild * * See https://discord.com/developers/docs/resources/guild#get-current-user-guild-member */ GuildsMembersRead = "guilds.members.read", /** * Allows your app to join users to a group dm * * See https://discord.com/developers/docs/resources/channel#group-dm-add-recipient */ GroupDMJoins = "gdm.join", /** * For local rpc server api access, this allows you to read messages from all client channels * (otherwise restricted to channels/guilds your app creates) */ MessagesRead = "messages.read", /** * For local rpc server access, this allows you to control a user's local Discord client - requires Discord approval */ RPC = "rpc", /** * For local rpc server api access, this allows you to receive notifications pushed out to the user - requires Discord approval */ RPCNotificationsRead = "rpc.notifications.read", /** * This generates a webhook that is returned in the oauth token response for authorization code grants */ WebhookIncoming = "webhook.incoming", /** * Allows your app to upload/update builds for a user's applications - requires Discord approval */ ApplicationsBuildsUpload = "applications.builds.upload", /** * Allows your app to read build data for a user's applications */ ApplicationsBuildsRead = "applications.builds.read", /** * Allows your app to read and update store data (SKUs, store listings, achievements, etc.) for a user's applications */ ApplicationsStoreUpdate = "applications.store.update", /** * Allows your app to read entitlements for a user's applications */ ApplicationsEntitlements = "applications.entitlements", /** * Allows your app to know a user's friends and implicit relationships - requires Discord approval */ RelationshipsRead = "relationships.read", /** * Allows your app to fetch data from a user's "Now Playing/Recently Played" list - requires Discord approval */ ActivitiesRead = "activities.read", /** * Allows your app to update a user's activity - requires Discord approval (NOT REQUIRED FOR GAMESDK ACTIVITY MANAGER) * * See https://discord.com/developers/docs/game-sdk/activities */ ActivitiesWrite = "activities.write", /** * Allows your app to use Application Commands in a guild * * See https://discord.com/developers/docs/interactions/application-commands */ ApplicationsCommands = "applications.commands", /** * Allows your app to update its Application Commands via this bearer token - client credentials grant only * * See https://discord.com/developers/docs/interactions/application-commands */ ApplicationsCommandsUpdate = "applications.commands.update" } //# sourceMappingURL=oauth2.d.ts.map node_modules/discord-api-types/payloads/v8/template.d.ts 0000664 00000003560 15114741631 0017350 0 ustar 00 /** * Types extracted from https://discord.com/developers/docs/resources/template */ import type { Snowflake } from '../../globals'; import type { RESTPostAPIGuildsJSONBody } from '../../rest/v8/index'; import type { APIUser } from './user'; /** * https://discord.com/developers/docs/resources/template#template-object * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export interface APITemplate { /** * The template code (unique ID) */ code: string; /** * Template name */ name: string; /** * The description for the template */ description: string | null; /** * Number of times this template has been used */ usage_count: number; /** * The ID of the user who created the template */ creator_id: Snowflake; /** * The user who created the template * * See https://discord.com/developers/docs/resources/user#user-object */ creator: APIUser; /** * When this template was created */ created_at: string; /** * When this template was last synced to the source guild */ updated_at: string; /** * The ID of the guild this template is based on */ source_guild_id: Snowflake; /** * The guild snapshot this template contains */ serialized_source_guild: APITemplateSerializedSourceGuild; /** * Whether the template has unsynced changes */ is_dirty: boolean | null; } /** * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export interface APITemplateSerializedSourceGuild extends Omit<RESTPostAPIGuildsJSONBody, 'icon'> { description: string | null; preferred_locale: string; icon_hash: string | null; } //# sourceMappingURL=template.d.ts.map node_modules/discord-api-types/payloads/v8/sticker.d.ts.map 0000664 00000002424 15114741631 0017753 0 ustar 00 {"version":3,"file":"sticker.d.ts","sourceRoot":"","sources":["sticker.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC/C,OAAO,KAAK,EAAE,OAAO,EAAE,M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pB;;OAEG;IACH,eAAe,CAAC,EAAE,SAAS,CAAC;CAC5B"} node_modules/discord-api-types/payloads/v8/application.js.map 0000664 00000000674 15114741631 0020363 0 ustar 00 {"version":3,"file":"application.js","sourceRoot":"","sources":["application.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AAmHH;;;;GAIG;AACH,IAAY,gBAcX;AAdD,WAAY,gBAAgB;IAC3B,+EAAyB,CAAA;IACzB,uEAAqB,CAAA;IACrB,0EAAsB,CAAA;IACtB,gFAAyB,CAAA;IACzB,gFAAyB,CAAA;IACzB,8FAAgC,CAAA;IAChC,yFAA6B,CAAA;IAC7B,uGAAoC,CAAA;IACpC,6GAAuC,CAAA;IACvC,oEAAkB,CAAA;IAClB,8FAA+B,CAAA;IAC/B,4GAAsC,CAAA;IACtC,yFAA4B,CAAA;AAC7B,CAAC,EAdW,gBAAgB,gCAAhB,gBAAgB,QAc3B"} node_modules/discord-api-types/payloads/v8/user.d.ts.map 0000664 00000003643 15114741631 0017271 0 ustar 00 {"version":3,"file":"user.d.ts","sourceRoot":"","sources":["user.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC/C,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAC;AAEnD;;;;GAIG;AACH,MAAM,WAAW,OAAO;IACvB;;OAEG;IACH,EAAE,EAAE,SAAS,CAAC;IACd;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC;IACjB;;OAEG;IACH,aAAa,EAAE,MAAM,CAAC;IACtB;;;;OAIG;IACH,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB;;OAEG;IACH,GAAG,CAAC,EAAE,OAAO,CAAC;IACd;;OAEG;IACH,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB;;OAEG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB;;;;OAIG;IACH,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,C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C;IAClB;;;;OAIG;IACH,YAAY,CAAC,EAAE,OAAO,CAAC,mBAAmB,CAAC,EAAE,CAAC;IAC9C;;OAEG;IACH,QAAQ,EAAE,OAAO,CAAC;IAClB;;OAEG;IACH,WAAW,EAAE,OAAO,CAAC;IACrB;;OAEG;IACH,aAAa,EAAE,OAAO,CAAC;IACvB;;;;OAIG;IACH,UAAU,EAAE,oBAAoB,CAAC;CACjC;AAED;;GAEG;AACH,oBAAY,oBAAoB;IAC/B;;OAEG;IACH,IAAI,IAAA;IACJ;;OAEG;IACH,QAAQ,IAAA;CACR"} node_modules/discord-api-types/payloads/v8/guild.d.ts.map 0000664 00000021247 15114741631 0017417 0 ustar 00 {"version":3,"file":"guild.d.ts","sourceRoot":"","sources":["guild.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC5D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AAC5C,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AACxC,OAAO,KAAK,EAAE,qBAAqB,EAAE,oBAAoB,EAAE,MAAM,WAAW,CAAC;AAC7E,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,uBAAuB,CAAC;AACpE,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAC7C,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AACxD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AAC5C,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,QAAQ,CAAC;AACtC,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC;AAEjD;;;;GAIG;AACH,MAAM,WAAW,mBAAmB;IACnC;;OAEG;IACH,EAAE,EAAE,SAAS,CAAC;IACd;;OAEG;IACH,WAAW,EAAE,OAAO,CAAC;CACrB;AAED;;;;G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gBAAgB,EAAE,4BAA4B,EAAE,CAAC;CACjD;AAED;;GAEG;AACH,MAAM,WAAW,4BAA4B;IAC5C;;OAEG;IACH,UAAU,EAAE,SAAS,CAAC;IACtB;;OAEG;IACH,WAAW,EAAE,MAAM,CAAC;IACpB;;OAEG;IACH,QAAQ,EAAE,SAAS,GAAG,IAAI,CAAC;IAC3B;;OAEG;IACH,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;CAC1B;AAED;;GAEG;AACH,MAAM,WAAW,2BAA2B;IAC3C;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC;IAChB;;OAEG;IACH,WAAW,EAAE,gCAAgC,EAAE,CAAC;IAChD;;OAEG;IACH,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;CAC3B;AAID;;GAEG;AACH,MAAM,WAAW,gCAAgC;IAChD;;OAEG;IACH,UAAU,EAAE,4BAA4B,CAAC;IACzC;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC;IAClB;;OAEG;IACH,QAAQ,EAAE,OAAO,CAAC;CAClB;AAED;;GAEG;AACH,oBAAY,4BAA4B;IACvC;;OAEG;IACH,KAAK,UAAU;CACf"} node_modules/discord-api-types/payloads/v8/stageInstance.d.ts 0000664 00000004403 15114741631 0020322 0 ustar 00 import type { Snowflake } from '../../globals'; import type { APIGuildMember } from './guild'; /** * https://discord.com/developers/docs/resources/stage-instance#stage-instance-object * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export interface APIStageInstance { /** * The id of the stage instance */ id: Snowflake; /** * The guild id of the associated stage channel */ guild_id: Snowflake; /** * The id of the associated stage channel */ channel_id: Snowflake; /** * The topic of the stage instance (1-120 characters) */ topic: string; /** * The privacy level of the stage instance * * See https://discord.com/developers/docs/resources/stage-instance#stage-instance-object-privacy-level */ privacy_level: StageInstancePrivacyLevel; /** * Whether or not stage discovery is disabled */ discoverable_disabled: boolean; } /** * https://discord.com/developers/docs/resources/stage-instance#stage-instance-object-privacy-level * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export declare enum StageInstancePrivacyLevel { /** * The stage instance is visible publicly, such as on stage discovery */ Public = 1, /** * The stage instance is visible to only guild members */ GuildOnly = 2 } /** * https://discord.com/developers/docs/resources/invite#invite-stage-instance-object-invite-stage-instance-structure * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export interface APIInviteStageInstance { /** * The topic of the stage instance (1-120 characters) */ topic: string; /** * The number of users in the stage */ participant_count: number; /** * The number of users speaking in the stage */ speaker_count: number; /** * The members speaking in the stage * * See https://discord.com/developers/docs/resources/guild#guild-member-object-guild-member-structure */ members: APIGuildMember[]; } //# sourceMappingURL=stageInstance.d.ts.map node_modules/discord-api-types/payloads/v8/permissions.js.map 0000664 00000000166 15114741631 0020427 0 ustar 00 {"version":3,"file":"permissions.js","sourceRoot":"","sources":["permissions.ts"],"names":[],"mappings":";AAAA;;GAEG"} node_modules/discord-api-types/payloads/v8/gateway.js 0000664 00000006110 15114741631 0016734 0 ustar 00 "use strict"; /** * Types extracted from https://discord.com/developers/docs/topics/gateway */ Object.defineProperty(exports, "__esModule", { value: true }); exports.ActivityFlags = exports.ActivityType = exports.ActivityPlatform = exports.PresenceUpdateStatus = void 0; /** * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ var PresenceUpdateStatus; (function (PresenceUpdateStatus) { PresenceUpdateStatus["Online"] = "online"; PresenceUpdateStatus["DoNotDisturb"] = "dnd"; PresenceUpdateStatus["Idle"] = "idle"; /** * Invisible and shown as offline */ PresenceUpdateStatus["Invisible"] = "invisible"; PresenceUpdateStatus["Offline"] = "offline"; })(PresenceUpdateStatus || (exports.PresenceUpdateStatus = PresenceUpdateStatus = {})); /** * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ var ActivityPlatform; (function (ActivityPlatform) { ActivityPlatform["Desktop"] = "desktop"; ActivityPlatform["Samsung"] = "samsung"; ActivityPlatform["Xbox"] = "xbox"; })(ActivityPlatform || (exports.ActivityPlatform = ActivityPlatform = {})); /** * https://discord.com/developers/docs/topics/gateway#activity-object-activity-types * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ var ActivityType; (function (ActivityType) { /** * Playing {game} */ ActivityType[ActivityType["Playing"] = 0] = "Playing"; /** * Streaming {details} */ ActivityType[ActivityType["Streaming"] = 1] = "Streaming"; /** * Listening to {name} */ ActivityType[ActivityType["Listening"] = 2] = "Listening"; /** * Watching {details} */ ActivityType[ActivityType["Watching"] = 3] = "Watching"; /** * {emoji} {details} */ ActivityType[ActivityType["Custom"] = 4] = "Custom"; /** * Competing in {name} */ ActivityType[ActivityType["Competing"] = 5] = "Competing"; })(ActivityType || (exports.ActivityType = ActivityType = {})); /** * https://discord.com/developers/docs/topics/gateway#activity-object-activity-flags * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ var ActivityFlags; (function (ActivityFlags) { ActivityFlags[ActivityFlags["Instance"] = 1] = "Instance"; ActivityFlags[ActivityFlags["Join"] = 2] = "Join"; ActivityFlags[ActivityFlags["Spectate"] = 4] = "Spectate"; ActivityFlags[ActivityFlags["JoinRequest"] = 8] = "JoinRequest"; ActivityFlags[ActivityFlags["Sync"] = 16] = "Sync"; ActivityFlags[ActivityFlags["Play"] = 32] = "Play"; ActivityFlags[ActivityFlags["PartyPrivacyFriends"] = 64] = "PartyPrivacyFriends"; ActivityFlags[ActivityFlags["PartyPrivacyVoiceChannel"] = 128] = "PartyPrivacyVoiceChannel"; ActivityFlags[ActivityFlags["Embedded"] = 256] = "Embedded"; })(ActivityFlags || (exports.ActivityFlags = ActivityFlags = {})); //# sourceMappingURL=gateway.js.map node_modules/discord-api-types/payloads/v8/emoji.js.map 0000664 00000000152 15114741631 0017152 0 ustar 00 {"version":3,"file":"emoji.js","sourceRoot":"","sources":["emoji.ts"],"names":[],"mappings":";AAAA;;GAEG"} node_modules/discord-api-types/payloads/v8/application.js 0000664 00000003426 15114741631 0017605 0 ustar 00 "use strict"; /** * Types extracted from https://discord.com/developers/docs/resources/application */ Object.defineProperty(exports, "__esModule", { value: true }); exports.ApplicationFlags = void 0; /** * https://discord.com/developers/docs/resources/application#application-object-application-flags * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ var ApplicationFlags; (function (ApplicationFlags) { ApplicationFlags[ApplicationFlags["EmbeddedReleased"] = 2] = "EmbeddedReleased"; ApplicationFlags[ApplicationFlags["ManagedEmoji"] = 4] = "ManagedEmoji"; ApplicationFlags[ApplicationFlags["GroupDMCreate"] = 16] = "GroupDMCreate"; ApplicationFlags[ApplicationFlags["RPCHasConnected"] = 2048] = "RPCHasConnected"; ApplicationFlags[ApplicationFlags["GatewayPresence"] = 4096] = "GatewayPresence"; ApplicationFlags[ApplicationFlags["GatewayPresenceLimited"] = 8192] = "GatewayPresenceLimited"; ApplicationFlags[ApplicationFlags["GatewayGuildMembers"] = 16384] = "GatewayGuildMembers"; ApplicationFlags[ApplicationFlags["GatewayGuildMembersLimited"] = 32768] = "GatewayGuildMembersLimited"; ApplicationFlags[ApplicationFlags["VerificationPendingGuildLimit"] = 65536] = "VerificationPendingGuildLimit"; ApplicationFlags[ApplicationFlags["Embedded"] = 131072] = "Embedded"; ApplicationFlags[ApplicationFlags["GatewayMessageContent"] = 262144] = "GatewayMessageContent"; ApplicationFlags[ApplicationFlags["GatewayMessageContentLimited"] = 524288] = "GatewayMessageContentLimited"; ApplicationFlags[ApplicationFlags["EmbeddedFirstParty"] = 1048576] = "EmbeddedFirstParty"; })(ApplicationFlags || (exports.ApplicationFlags = ApplicationFlags = {})); //# sourceMappingURL=application.js.map node_modules/discord-api-types/payloads/v8/gateway.d.ts 0000664 00000023613 15114741631 0017177 0 ustar 00 /** * Types extracted from https://discord.com/developers/docs/topics/gateway */ import type { Snowflake } from '../../globals'; import type { APIEmoji } from './emoji'; import type { APIUser } from './user'; /** * https://discord.com/developers/docs/topics/gateway#get-gateway * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export interface APIGatewayInfo { /** * The WSS URL that can be used for connecting to the gateway */ url: string; } /** * https://discord.com/developers/docs/topics/gateway#get-gateway-bot * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export interface APIGatewayBotInfo extends APIGatewayInfo { /** * The recommended number of shards to use when connecting * * See https://discord.com/developers/docs/topics/gateway#sharding */ shards: number; /** * Information on the current session start limit * * See https://discord.com/developers/docs/topics/gateway#session-start-limit-object */ session_start_limit: APIGatewaySessionStartLimit; } /** * https://discord.com/developers/docs/topics/gateway#session-start-limit-object * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export interface APIGatewaySessionStartLimit { /** * The total number of session starts the current user is allowed */ total: number; /** * The remaining number of session starts the current user is allowed */ remaining: number; /** * The number of milliseconds after which the limit resets */ reset_after: number; /** * The number of identify requests allowed per 5 seconds */ max_concurrency: number; } /** * https://discord.com/developers/docs/topics/gateway#presence-update-presence-update-event-fields * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export interface GatewayPresenceUpdate { /** * The user presence is being updated for * * **The user object within this event can be partial, the only field which must be sent is the `id` field, * everything else is optional.** * * See https://discord.com/developers/docs/resources/user#user-object */ user: Partial<APIUser> & Pick<APIUser, 'id'>; /** * ID of the guild */ guild_id: Snowflake; /** * Either "idle", "dnd", "online", or "offline" */ status?: PresenceUpdateStatus; /** * User's current activities * * See https://discord.com/developers/docs/topics/gateway#activity-object */ activities?: GatewayActivity[]; /** * User's platform-dependent status * * See https://discord.com/developers/docs/topics/gateway#client-status-object */ client_status?: GatewayPresenceClientStatus; } /** * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export declare enum PresenceUpdateStatus { Online = "online", DoNotDisturb = "dnd", Idle = "idle", /** * Invisible and shown as offline */ Invisible = "invisible", Offline = "offline" } /** * https://discord.com/developers/docs/topics/gateway#client-status-object * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export interface GatewayPresenceClientStatus { /** * The user's status set for an active desktop (Windows, Linux, Mac) application session */ desktop?: PresenceUpdateStatus; /** * The user's status set for an active mobile (iOS, Android) application session */ mobile?: PresenceUpdateStatus; /** * The user's status set for an active web (browser, bot account) application session */ web?: PresenceUpdateStatus; } /** * https://discord.com/developers/docs/topics/gateway#activity-object-activity-structure * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export interface GatewayActivity { /** * The activity's id */ id: string; /** * The activity's name */ name: string; /** * Activity type * * See https://discord.com/developers/docs/topics/gateway#activity-object-activity-types */ type: ActivityType; /** * Stream url, is validated when type is `1` */ url?: string | null; /** * Unix timestamp of when the activity was added to the user's session */ created_at: number; /** * Unix timestamps for start and/or end of the game */ timestamps?: GatewayActivityTimestamps; sync_id?: string; platform?: ActivityPlatform; /** * Application id for the game */ application_id?: Snowflake; /** * What the player is currently doing */ details?: string | null; /** * The user's current party status */ state?: string | null; /** * The emoji used for a custom status * * See https://discord.com/developers/docs/topics/gateway#activity-object-activity-emoji */ emoji?: GatewayActivityEmoji; session_id?: string; /** * Information for the current party of the player * * See https://discord.com/developers/docs/topics/gateway#activity-object-activity-party */ party?: GatewayActivityParty; /** * Images for the presence and their hover texts * * See https://discord.com/developers/docs/topics/gateway#activity-object-activity-assets */ assets?: GatewayActivityAssets; /** * Secrets for Rich Presence joining and spectating * * See https://discord.com/developers/docs/topics/gateway#activity-object-activity-secrets */ secrets?: GatewayActivitySecrets; /** * Whether or not the activity is an instanced game session */ instance?: boolean; /** * Activity flags `OR`d together, describes what the payload includes * * See https://discord.com/developers/docs/topics/gateway#activity-object-activity-flags * * See https://en.wikipedia.org/wiki/Bit_field */ flags?: ActivityFlags; /** * The custom buttons shown in the Rich Presence (max 2) */ buttons?: GatewayActivityButton[] | string[]; } /** * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export declare enum ActivityPlatform { Desktop = "desktop", Samsung = "samsung", Xbox = "xbox" } /** * https://discord.com/developers/docs/topics/gateway#activity-object-activity-types * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export declare enum ActivityType { /** * Playing {game} */ Playing = 0, /** * Streaming {details} */ Streaming = 1, /** * Listening to {name} */ Listening = 2, /** * Watching {details} */ Watching = 3, /** * {emoji} {details} */ Custom = 4, /** * Competing in {name} */ Competing = 5 } /** * https://discord.com/developers/docs/topics/gateway#activity-object-activity-timestamps * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export interface GatewayActivityTimestamps { /** * Unix time (in milliseconds) of when the activity started */ start?: number; /** * Unix time (in milliseconds) of when the activity ends */ end?: number; } /** * https://discord.com/developers/docs/topics/gateway#activity-object-activity-emoji * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type GatewayActivityEmoji = Partial<Pick<APIEmoji, 'animated' | 'id'>> & Pick<APIEmoji, 'name'>; /** * https://discord.com/developers/docs/topics/gateway#activity-object-activity-party * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export interface GatewayActivityParty { /** * The id of the party */ id?: string; /** * Used to show the party's current and maximum size */ size?: [current_size: number, max_size: number]; } /** * https://discord.com/developers/docs/topics/gateway#activity-object-activity-assets * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type GatewayActivityAssets = Partial<Record<'large_image' | 'large_text' | 'small_image' | 'small_text', string>>; /** * https://discord.com/developers/docs/topics/gateway#activity-object-activity-secrets * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type GatewayActivitySecrets = Partial<Record<'join' | 'match' | 'spectate', string>>; /** * https://discord.com/developers/docs/topics/gateway#activity-object-activity-flags * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export declare enum ActivityFlags { Instance = 1, Join = 2, Spectate = 4, JoinRequest = 8, Sync = 16, Play = 32, PartyPrivacyFriends = 64, PartyPrivacyVoiceChannel = 128, Embedded = 256 } /** * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export interface GatewayActivityButton { /** * The text shown on the button (1-32 characters) */ label: string; /** * The url opened when clicking the button (1-512 characters) */ url: string; } //# sourceMappingURL=gateway.d.ts.map node_modules/discord-api-types/payloads/v8/webhook.d.ts 0000664 00000004607 15114741631 0017176 0 ustar 00 /** * Types extracted from https://discord.com/developers/docs/resources/webhook */ import type { Snowflake } from '../../globals'; import type { APIPartialChannel, APIPartialGuild, APIUser } from './index'; /** * https://discord.com/developers/docs/resources/webhook#webhook-object * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export interface APIWebhook { /** * The id of the webhook */ id: Snowflake; /** * The type of the webhook * * See https://discord.com/developers/docs/resources/webhook#webhook-object-webhook-types */ type: WebhookType; /** * The guild id this webhook is for */ guild_id?: Snowflake; /** * The channel id this webhook is for */ channel_id: Snowflake; /** * The user this webhook was created by (not returned when getting a webhook with its token) * * See https://discord.com/developers/docs/resources/user#user-object */ user?: APIUser; /** * The default name of the webhook */ name: string | null; /** * The default avatar of the webhook */ avatar: string | null; /** * The secure token of the webhook (returned for Incoming Webhooks) */ token?: string; /** * The bot/OAuth2 application that created this webhook */ application_id: Snowflake | null; /** * The guild of the channel that this webhook is following (returned for Channel Follower Webhooks) */ source_guild?: APIPartialGuild; /** * The channel that this webhook is following (returned for Channel Follower Webhooks) */ source_channel?: APIPartialChannel; /** * The url used for executing the webhook (returned by the webhooks OAuth2 flow) */ url?: string; } /** * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export declare enum WebhookType { /** * Incoming Webhooks can post messages to channels with a generated token */ Incoming = 1, /** * Channel Follower Webhooks are internal webhooks used with Channel Following to post new messages into channels */ ChannelFollower = 2, /** * Application webhooks are webhooks used with Interactions */ Application = 3 } //# sourceMappingURL=webhook.d.ts.map node_modules/discord-api-types/payloads/v8/interactions.js 0000664 00000002325 15114741631 0020001 0 ustar 00 "use strict"; var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { if (k2 === undefined) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { return m[k]; } }; } Object.defineProperty(o, k2, desc); }) : (function(o, m, k, k2) { if (k2 === undefined) k2 = k; o[k2] = m[k]; })); var __exportStar = (this && this.__exportStar) || function(m, exports) { for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); }; Object.defineProperty(exports, "__esModule", { value: true }); __exportStar(require("./_interactions/applicationCommands"), exports); __exportStar(require("./_interactions/autocomplete"), exports); __exportStar(require("./_interactions/base"), exports); __exportStar(require("./_interactions/messageComponents"), exports); __exportStar(require("./_interactions/modalSubmit"), exports); __exportStar(require("./_interactions/ping"), exports); __exportStar(require("./_interactions/responses"), exports); //# sourceMappingURL=interactions.js.map node_modules/discord-api-types/payloads/v8/permissions.js 0000664 00000000313 15114741631 0017645 0 ustar 00 "use strict"; /** * Types extracted from https://discord.com/developers/docs/topics/permissions */ Object.defineProperty(exports, "__esModule", { value: true }); //# sourceMappingURL=permissions.js.map node_modules/discord-api-types/payloads/v8/channel.js 0000664 00000024503 15114741631 0016711 0 ustar 00 "use strict"; /** * Types extracted from https://discord.com/developers/docs/resources/channel */ Object.defineProperty(exports, "__esModule", { value: true }); exports.TextInputStyle = exports.ButtonStyle = exports.ComponentType = exports.AllowedMentionsTypes = exports.EmbedType = exports.OverwriteType = exports.MessageFlags = exports.MessageActivityType = exports.MessageType = exports.VideoQualityMode = exports.ChannelType = void 0; /** * https://discord.com/developers/docs/resources/channel#channel-object-channel-types * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ var ChannelType; (function (ChannelType) { /** * A text channel within a guild */ ChannelType[ChannelType["GuildText"] = 0] = "GuildText"; /** * A direct message between users */ ChannelType[ChannelType["DM"] = 1] = "DM"; /** * A voice channel within a guild */ ChannelType[ChannelType["GuildVoice"] = 2] = "GuildVoice"; /** * A direct message between multiple users */ ChannelType[ChannelType["GroupDM"] = 3] = "GroupDM"; /** * An organizational category that contains up to 50 channels * * See https://support.discord.com/hc/en-us/articles/115001580171-Channel-Categories-101 */ ChannelType[ChannelType["GuildCategory"] = 4] = "GuildCategory"; /** * A channel that users can follow and crosspost into their own guild * * See https://support.discord.com/hc/en-us/articles/360032008192 */ ChannelType[ChannelType["GuildNews"] = 5] = "GuildNews"; /** * A channel in which game developers can sell their game on Discord * * See https://discord.com/developers/docs/game-and-server-management/special-channels */ ChannelType[ChannelType["GuildStore"] = 6] = "GuildStore"; /** * A voice channel for hosting events with an audience * * See https://support.discord.com/hc/en-us/articles/1500005513722 */ ChannelType[ChannelType["GuildStageVoice"] = 13] = "GuildStageVoice"; })(ChannelType || (exports.ChannelType = ChannelType = {})); /** * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ var VideoQualityMode; (function (VideoQualityMode) { /** * Discord chooses the quality for optimal performance */ VideoQualityMode[VideoQualityMode["Auto"] = 1] = "Auto"; /** * 720p */ VideoQualityMode[VideoQualityMode["Full"] = 2] = "Full"; })(VideoQualityMode || (exports.VideoQualityMode = VideoQualityMode = {})); /** * https://discord.com/developers/docs/resources/channel#message-object-message-types * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ var MessageType; (function (MessageType) { MessageType[MessageType["Default"] = 0] = "Default"; MessageType[MessageType["RecipientAdd"] = 1] = "RecipientAdd"; MessageType[MessageType["RecipientRemove"] = 2] = "RecipientRemove"; MessageType[MessageType["Call"] = 3] = "Call"; MessageType[MessageType["ChannelNameChange"] = 4] = "ChannelNameChange"; MessageType[MessageType["ChannelIconChange"] = 5] = "ChannelIconChange"; MessageType[MessageType["ChannelPinnedMessage"] = 6] = "ChannelPinnedMessage"; MessageType[MessageType["GuildMemberJoin"] = 7] = "GuildMemberJoin"; MessageType[MessageType["UserPremiumGuildSubscription"] = 8] = "UserPremiumGuildSubscription"; MessageType[MessageType["UserPremiumGuildSubscriptionTier1"] = 9] = "UserPremiumGuildSubscriptionTier1"; MessageType[MessageType["UserPremiumGuildSubscriptionTier2"] = 10] = "UserPremiumGuildSubscriptionTier2"; MessageType[MessageType["UserPremiumGuildSubscriptionTier3"] = 11] = "UserPremiumGuildSubscriptionTier3"; MessageType[MessageType["ChannelFollowAdd"] = 12] = "ChannelFollowAdd"; MessageType[MessageType["GuildDiscoveryDisqualified"] = 14] = "GuildDiscoveryDisqualified"; MessageType[MessageType["GuildDiscoveryRequalified"] = 15] = "GuildDiscoveryRequalified"; MessageType[MessageType["GuildDiscoveryGracePeriodInitialWarning"] = 16] = "GuildDiscoveryGracePeriodInitialWarning"; MessageType[MessageType["GuildDiscoveryGracePeriodFinalWarning"] = 17] = "GuildDiscoveryGracePeriodFinalWarning"; MessageType[MessageType["Reply"] = 19] = "Reply"; MessageType[MessageType["ChatInputCommand"] = 20] = "ChatInputCommand"; MessageType[MessageType["GuildInviteReminder"] = 22] = "GuildInviteReminder"; MessageType[MessageType["ContextMenuCommand"] = 23] = "ContextMenuCommand"; })(MessageType || (exports.MessageType = MessageType = {})); /** * https://discord.com/developers/docs/resources/channel#message-object-message-activity-types * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ var MessageActivityType; (function (MessageActivityType) { MessageActivityType[MessageActivityType["Join"] = 1] = "Join"; MessageActivityType[MessageActivityType["Spectate"] = 2] = "Spectate"; MessageActivityType[MessageActivityType["Listen"] = 3] = "Listen"; MessageActivityType[MessageActivityType["JoinRequest"] = 5] = "JoinRequest"; })(MessageActivityType || (exports.MessageActivityType = MessageActivityType = {})); /** * https://discord.com/developers/docs/resources/channel#message-object-message-flags * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ var MessageFlags; (function (MessageFlags) { /** * This message has been published to subscribed channels (via Channel Following) */ MessageFlags[MessageFlags["Crossposted"] = 1] = "Crossposted"; /** * This message originated from a message in another channel (via Channel Following) */ MessageFlags[MessageFlags["IsCrosspost"] = 2] = "IsCrosspost"; /** * Do not include any embeds when serializing this message */ MessageFlags[MessageFlags["SuppressEmbeds"] = 4] = "SuppressEmbeds"; /** * The source message for this crosspost has been deleted (via Channel Following) */ MessageFlags[MessageFlags["SourceMessageDeleted"] = 8] = "SourceMessageDeleted"; /** * This message came from the urgent message system */ MessageFlags[MessageFlags["Urgent"] = 16] = "Urgent"; /** * This message is only visible to the user who invoked the Interaction */ MessageFlags[MessageFlags["Ephemeral"] = 64] = "Ephemeral"; /** * This message is an Interaction Response and the bot is "thinking" */ MessageFlags[MessageFlags["Loading"] = 128] = "Loading"; })(MessageFlags || (exports.MessageFlags = MessageFlags = {})); /** * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ var OverwriteType; (function (OverwriteType) { OverwriteType[OverwriteType["Role"] = 0] = "Role"; OverwriteType[OverwriteType["Member"] = 1] = "Member"; })(OverwriteType || (exports.OverwriteType = OverwriteType = {})); /** * https://discord.com/developers/docs/resources/channel#embed-object-embed-types * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ var EmbedType; (function (EmbedType) { /** * Generic embed rendered from embed attributes */ EmbedType["Rich"] = "rich"; /** * Image embed */ EmbedType["Image"] = "image"; /** * Video embed */ EmbedType["Video"] = "video"; /** * Animated gif image embed rendered as a video embed */ EmbedType["GIFV"] = "gifv"; /** * Article embed */ EmbedType["Article"] = "article"; /** * Link embed */ EmbedType["Link"] = "link"; })(EmbedType || (exports.EmbedType = EmbedType = {})); /** * https://discord.com/developers/docs/resources/channel#allowed-mentions-object-allowed-mention-types * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ var AllowedMentionsTypes; (function (AllowedMentionsTypes) { /** * Controls @everyone and @here mentions */ AllowedMentionsTypes["Everyone"] = "everyone"; /** * Controls role mentions */ AllowedMentionsTypes["Role"] = "roles"; /** * Controls user mentions */ AllowedMentionsTypes["User"] = "users"; })(AllowedMentionsTypes || (exports.AllowedMentionsTypes = AllowedMentionsTypes = {})); /** * https://discord.com/developers/docs/interactions/message-components#component-types * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ var ComponentType; (function (ComponentType) { /** * Action Row component */ ComponentType[ComponentType["ActionRow"] = 1] = "ActionRow"; /** * Button component */ ComponentType[ComponentType["Button"] = 2] = "Button"; /** * Select Menu component */ ComponentType[ComponentType["SelectMenu"] = 3] = "SelectMenu"; /** * Text Input component */ ComponentType[ComponentType["TextInput"] = 4] = "TextInput"; })(ComponentType || (exports.ComponentType = ComponentType = {})); /** * https://discord.com/developers/docs/interactions/message-components#button-object-button-styles * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ var ButtonStyle; (function (ButtonStyle) { ButtonStyle[ButtonStyle["Primary"] = 1] = "Primary"; ButtonStyle[ButtonStyle["Secondary"] = 2] = "Secondary"; ButtonStyle[ButtonStyle["Success"] = 3] = "Success"; ButtonStyle[ButtonStyle["Danger"] = 4] = "Danger"; ButtonStyle[ButtonStyle["Link"] = 5] = "Link"; })(ButtonStyle || (exports.ButtonStyle = ButtonStyle = {})); /** * https://discord.com/developers/docs/interactions/message-components#text-inputs-text-input-styles * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ var TextInputStyle; (function (TextInputStyle) { TextInputStyle[TextInputStyle["Short"] = 1] = "Short"; TextInputStyle[TextInputStyle["Paragraph"] = 2] = "Paragraph"; })(TextInputStyle || (exports.TextInputStyle = TextInputStyle = {})); //# sourceMappingURL=channel.js.map node_modules/discord-api-types/payloads/v8/emoji.d.ts 0000664 00000002606 15114741631 0016640 0 ustar 00 /** * Types extracted from https://discord.com/developers/docs/resources/emoji */ import type { Snowflake } from '../../globals'; import type { APIRole } from './permissions'; import type { APIUser } from './user'; /** * Not documented but mentioned * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export interface APIPartialEmoji { /** * Emoji id */ id: Snowflake | null; /** * Emoji name (can be null only in reaction emoji objects) */ name: string | null; /** * Whether this emoji is animated */ animated?: boolean; } /** * https://discord.com/developers/docs/resources/emoji#emoji-object-emoji-structure * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export interface APIEmoji extends APIPartialEmoji { /** * Roles this emoji is whitelisted to */ roles?: APIRole['id'][]; /** * User that created this emoji */ user?: APIUser; /** * Whether this emoji must be wrapped in colons */ require_colons?: boolean; /** * Whether this emoji is managed */ managed?: boolean; /** * Whether this emoji can be used, may be false due to loss of Server Boosts */ available?: boolean; } //# sourceMappingURL=emoji.d.ts.map node_modules/discord-api-types/payloads/v8/guild.js.map 0000664 00000004637 15114741631 0017167 0 ustar 00 {"version":3,"file":"guild.js","sourceRoot":"","sources":["guild.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AA2VH;;;;GAIG;AACH,IAAY,gCAGX;AAHD,WAAY,gCAAgC;IAC3C,qGAAW,CAAA;IACX,uGAAY,CAAA;AACb,CAAC,EAHW,gCAAgC,gDAAhC,gCAAgC,QAG3C;AAED;;;;GAIG;AACH,IAAY,0BAIX;AAJD,WAAY,0BAA0B;IACrC,mFAAQ,CAAA;IACR,yGAAmB,CAAA;IACnB,uFAAU,CAAA;AACX,CAAC,EAJW,0BAA0B,0CAA1B,0BAA0B,QAIrC;AAED;;;;GAIG;AACH,IAAY,aAGX;AAHD,WAAY,aAAa;IACxB,iDAAI,CAAA;IACJ,yDAAQ,CAAA;AACT,CAAC,EAHW,aAAa,6BAAb,aAAa,QAGxB;AAED;;;;GAIG;AACH,IAAY,cAKX;AALD,WAAY,cAAc;IACzB,yDAAO,CAAA;IACP,2DAAQ,CAAA;IACR,mDAAI,CAAA;IACJ,qEAAa,CAAA;AACd,CAAC,EALW,cAAc,8BAAd,cAAc,QAKzB;AAED;;;;GAIG;AACH,IAAY,sBAqBX;AArBD,WAAY,sBAAsB;IACjC;;OAEG;IACH,mEAAI,CAAA;IACJ;;OAEG;IACH,iEAAG,CA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AEG;IACH,iEAAiD,CAAA;IACjD;;OAEG;IACH,wCAAwB,CAAA;IACxB;;OAEG;IACH,qCAAqB,CAAA;IACrB;;OAEG;IACH,0CAA0B,CAAA;IAC1B;;OAEG;IACH,+DAA+C,CAAA;AAChD,CAAC,EA9FW,YAAY,4BAAZ,YAAY,QA8FvB;AA+OD;;;;GAIG;AACH,IAAY,yBAGX;AAHD,WAAY,yBAAyB;IACpC,qFAAU,CAAA;IACV,yEAAI,CAAA;AACL,CAAC,EAHW,yBAAyB,yCAAzB,yBAAyB,QAGpC;AAgHD;;;;GAIG;AACH,IAAY,gBAsBX;AAtBD,WAAY,gBAAgB;IAC3B;;OAEG;IACH,qCAAiB,CAAA;IACjB;;OAEG;IACH,uCAAmB,CAAA;IACnB;;OAEG;IACH,uCAAmB,CAAA;IACnB;;OAEG;IACH,uCAAmB,CAAA;IACnB;;;OAGG;IACH,uCAAmB,CAAA;AACpB,CAAC,EAtBW,gBAAgB,gCAAhB,gBAAgB,QAsB3B;AAgFD;;GAEG;AACH,IAAY,4BAKX;AALD,WAAY,4BAA4B;IACvC;;OAEG;IACH,+CAAe,CAAA;AAChB,CAAC,EALW,4BAA4B,4CAA5B,4BAA4B,QAKvC"} node_modules/discord-api-types/payloads/v8/auditLog.js 0000664 00000010367 15114741631 0017054 0 ustar 00 "use strict"; /** * Types extracted from https://discord.com/developers/docs/resources/audit-log */ Object.defineProperty(exports, "__esModule", { value: true }); exports.AuditLogOptionsType = exports.AuditLogEvent = void 0; /** * https://discord.com/developers/docs/resources/audit-log#audit-log-entry-object-audit-log-events * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ var AuditLogEvent; (function (AuditLogEvent) { AuditLogEvent[AuditLogEvent["GuildUpdate"] = 1] = "GuildUpdate"; AuditLogEvent[AuditLogEvent["ChannelCreate"] = 10] = "ChannelCreate"; AuditLogEvent[AuditLogEvent["ChannelUpdate"] = 11] = "ChannelUpdate"; AuditLogEvent[AuditLogEvent["ChannelDelete"] = 12] = "ChannelDelete"; AuditLogEvent[AuditLogEvent["ChannelOverwriteCreate"] = 13] = "ChannelOverwriteCreate"; AuditLogEvent[AuditLogEvent["ChannelOverwriteUpdate"] = 14] = "ChannelOverwriteUpdate"; AuditLogEvent[AuditLogEvent["ChannelOverwriteDelete"] = 15] = "ChannelOverwriteDelete"; AuditLogEvent[AuditLogEvent["MemberKick"] = 20] = "MemberKick"; AuditLogEvent[AuditLogEvent["MemberPrune"] = 21] = "MemberPrune"; AuditLogEvent[AuditLogEvent["MemberBanAdd"] = 22] = "MemberBanAdd"; AuditLogEvent[AuditLogEvent["MemberBanRemove"] = 23] = "MemberBanRemove"; AuditLogEvent[AuditLogEvent["MemberUpdate"] = 24] = "MemberUpdate"; AuditLogEvent[AuditLogEvent["MemberRoleUpdate"] = 25] = "MemberRoleUpdate"; AuditLogEvent[AuditLogEvent["MemberMove"] = 26] = "MemberMove"; AuditLogEvent[AuditLogEvent["MemberDisconnect"] = 27] = "MemberDisconnect"; AuditLogEvent[AuditLogEvent["BotAdd"] = 28] = "BotAdd"; AuditLogEvent[AuditLogEvent["RoleCreate"] = 30] = "RoleCreate"; AuditLogEvent[AuditLogEvent["RoleUpdate"] = 31] = "RoleUpdate"; AuditLogEvent[AuditLogEvent["RoleDelete"] = 32] = "RoleDelete"; AuditLogEvent[AuditLogEvent["InviteCreate"] = 40] = "InviteCreate"; AuditLogEvent[AuditLogEvent["InviteUpdate"] = 41] = "InviteUpdate"; AuditLogEvent[AuditLogEvent["InviteDelete"] = 42] = "InviteDelete"; AuditLogEvent[AuditLogEvent["WebhookCreate"] = 50] = "WebhookCreate"; AuditLogEvent[AuditLogEvent["WebhookUpdate"] = 51] = "WebhookUpdate"; AuditLogEvent[AuditLogEvent["WebhookDelete"] = 52] = "WebhookDelete"; AuditLogEvent[AuditLogEvent["EmojiCreate"] = 60] = "EmojiCreate"; AuditLogEvent[AuditLogEvent["EmojiUpdate"] = 61] = "EmojiUpdate"; AuditLogEvent[AuditLogEvent["EmojiDelete"] = 62] = "EmojiDelete"; AuditLogEvent[AuditLogEvent["MessageDelete"] = 72] = "MessageDelete"; AuditLogEvent[AuditLogEvent["MessageBulkDelete"] = 73] = "MessageBulkDelete"; AuditLogEvent[AuditLogEvent["MessagePin"] = 74] = "MessagePin"; AuditLogEvent[AuditLogEvent["MessageUnpin"] = 75] = "MessageUnpin"; AuditLogEvent[AuditLogEvent["IntegrationCreate"] = 80] = "IntegrationCreate"; AuditLogEvent[AuditLogEvent["IntegrationUpdate"] = 81] = "IntegrationUpdate"; AuditLogEvent[AuditLogEvent["IntegrationDelete"] = 82] = "IntegrationDelete"; AuditLogEvent[AuditLogEvent["StageInstanceCreate"] = 83] = "StageInstanceCreate"; AuditLogEvent[AuditLogEvent["StageInstanceUpdate"] = 84] = "StageInstanceUpdate"; AuditLogEvent[AuditLogEvent["StageInstanceDelete"] = 85] = "StageInstanceDelete"; AuditLogEvent[AuditLogEvent["StickerCreate"] = 90] = "StickerCreate"; AuditLogEvent[AuditLogEvent["StickerUpdate"] = 91] = "StickerUpdate"; AuditLogEvent[AuditLogEvent["StickerDelete"] = 92] = "StickerDelete"; AuditLogEvent[AuditLogEvent["GuildScheduledEventCreate"] = 100] = "GuildScheduledEventCreate"; AuditLogEvent[AuditLogEvent["GuildScheduledEventUpdate"] = 101] = "GuildScheduledEventUpdate"; AuditLogEvent[AuditLogEvent["GuildScheduledEventDelete"] = 102] = "GuildScheduledEventDelete"; })(AuditLogEvent || (exports.AuditLogEvent = AuditLogEvent = {})); /** * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ var AuditLogOptionsType; (function (AuditLogOptionsType) { AuditLogOptionsType["Role"] = "0"; AuditLogOptionsType["Member"] = "1"; })(AuditLogOptionsType || (exports.AuditLogOptionsType = AuditLogOptionsType = {})); //# sourceMappingURL=auditLog.js.map node_modules/discord-api-types/payloads/v8/webhook.js 0000664 00000001704 15114741631 0016735 0 ustar 00 "use strict"; /** * Types extracted from https://discord.com/developers/docs/resources/webhook */ Object.defineProperty(exports, "__esModule", { value: true }); exports.WebhookType = void 0; /** * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ var WebhookType; (function (WebhookType) { /** * Incoming Webhooks can post messages to channels with a generated token */ WebhookType[WebhookType["Incoming"] = 1] = "Incoming"; /** * Channel Follower Webhooks are internal webhooks used with Channel Following to post new messages into channels */ WebhookType[WebhookType["ChannelFollower"] = 2] = "ChannelFollower"; /** * Application webhooks are webhooks used with Interactions */ WebhookType[WebhookType["Application"] = 3] = "Application"; })(WebhookType || (exports.WebhookType = WebhookType = {})); //# sourceMappingURL=webhook.js.map node_modules/discord-api-types/payloads/v8/teams.js.map 0000664 00000000346 15114741631 0017165 0 ustar 00 {"version":3,"file":"teams.js","sourceRoot":"","sources":["teams.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AA6DH;;;;GAIG;AACH,IAAY,yBAGX;AAHD,WAAY,yBAAyB;IACpC,+EAAW,CAAA;IACX,iFAAQ,CAAA;AACT,CAAC,EAHW,yBAAyB,yCAAzB,yBAAyB,QAGpC"} node_modules/discord-api-types/payloads/v8/sticker.d.ts 0000664 00000007167 15114741631 0017210 0 ustar 00 /** * Types extracted from https://discord.com/developers/docs/resources/sticker */ import type { Snowflake } from '../../globals'; import type { APIUser } from './user'; /** * https://discord.com/developers/docs/resources/sticker#sticker-object * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export interface APISticker { /** * ID of the sticker */ id: Snowflake; /** * For standard stickers, ID of the pack the sticker is from */ pack_id?: Snowflake; /** * Name of the sticker */ name: string; /** * Description of the sticker */ description: string | null; /** * For guild stickers, the Discord name of a unicode emoji representing the sticker's expression. for standard stickers, a comma-separated list of related expressions. */ tags: string; /** * Previously the sticker asset hash, now an empty string * * @deprecated */ asset: ''; /** * Type of sticker * * See https://discord.com/developers/docs/resources/sticker#sticker-object-sticker-types */ type: StickerType; /** * Type of sticker format * * See https://discord.com/developers/docs/resources/sticker#sticker-object-sticker-format-types */ format_type: StickerFormatType; /** * Whether this guild sticker can be used, may be false due to loss of Server Boosts */ available?: boolean; /** * ID of the guild that owns this sticker */ guild_id?: Snowflake; /** * The user that uploaded the guild sticker */ user?: APIUser; /** * The standard sticker's sort order within its pack */ sort_value?: number; } /** * https://discord.com/developers/docs/resources/sticker#sticker-object-sticker-types * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export declare enum StickerType { /** * An official sticker in a pack, part of Nitro or in a removed purchasable pack */ Standard = 1, /** * A sticker uploaded to a Boosted guild for the guild's members */ Guild = 2 } /** * https://discord.com/developers/docs/resources/sticker#sticker-object-sticker-format-types * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export declare enum StickerFormatType { PNG = 1, APNG = 2, Lottie = 3 } /** * https://discord.com/developers/docs/resources/sticker#sticker-item-object * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type APIStickerItem = Pick<APISticker, 'format_type' | 'id' | 'name'>; /** * https://discord.com/developers/docs/resources/sticker#sticker-pack-object * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export interface APIStickerPack { /** * ID of the sticker pack */ id: Snowflake; /** * The stickers in the pack */ stickers: APISticker[]; /** * Name of the sticker pack */ name: string; /** * ID of the pack's SKU */ sku_id: Snowflake; /** * ID of a sticker in the pack which is shown as the pack's icon */ cover_sticker_id?: Snowflake; /** * Description of the sticker pack */ description: string; /** * ID of the sticker pack's banner image */ banner_asset_id?: Snowflake; } //# sourceMappingURL=sticker.d.ts.map node_modules/discord-api-types/payloads/v8/voice.js 0000664 00000000302 15114741631 0016375 0 ustar 00 "use strict"; /** * Types extracted from https://discord.com/developers/docs/resources/voice */ Object.defineProperty(exports, "__esModule", { value: true }); //# sourceMappingURL=voice.js.map node_modules/discord-api-types/payloads/v8/guild.d.ts 0000664 00000073327 15114741631 0016651 0 ustar 00 /** * Types extracted from https://discord.com/developers/docs/resources/guild */ import type { Permissions, Snowflake } from '../../globals'; import type { APIChannel } from './channel'; import type { APIEmoji } from './emoji'; import type { GatewayPresenceUpdate, PresenceUpdateStatus } from './gateway'; import type { APIGuildScheduledEvent } from './guildScheduledEvent'; import type { APIRole } from './permissions'; import type { APIStageInstance } from './stageInstance'; import type { APISticker } from './sticker'; import type { APIUser } from './user'; import type { GatewayVoiceState } from './voice'; /** * https://discord.com/developers/docs/resources/guild#unavailable-guild-object * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export interface APIUnavailableGuild { /** * Guild id */ id: Snowflake; /** * `true` if this guild is unavailable due to an outage */ unavailable: boolean; } /** * https://discord.com/developers/docs/resources/guild#guild-object-guild-structure * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export interface APIPartialGuild extends Omit<APIUnavailableGuild, 'unavailable'>, Pick<APIGuild, 'welcome_screen'> { /** * Guild name (2-100 characters, excluding trailing and leading whitespace) */ name: string; /** * Icon hash * * See https://discord.com/developers/docs/reference#image-formatting */ icon: string | null; /** * Splash hash * * See https://discord.com/developers/docs/reference#image-formatting */ splash: string | null; /** * Banner hash * * See https://discord.com/developers/docs/reference#image-formatting */ banner?: string | null; /** * The description for the guild, if the guild is discoverable */ description?: string | null; /** * Enabled guild features * * See https://discord.com/developers/docs/resources/guild#guild-object-guild-features */ features?: GuildFeature[]; /** * Verification level required for the guild * * See https://discord.com/developers/docs/resources/guild#guild-object-verification-level */ verification_level?: GuildVerificationLevel; /** * The vanity url code for the guild */ vanity_url_code?: string | null; /** * `true` if this guild is unavailable due to an outage */ unavailable?: boolean; } /** * https://discord.com/developers/docs/resources/guild#guild-object-guild-structure * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export interface APIGuild extends APIPartialGuild { /** * Icon hash, returned when in the template object * * See https://discord.com/developers/docs/reference#image-formatting */ icon_hash?: string | null; /** * Discovery splash hash; only present for guilds with the "DISCOVERABLE" feature * * See https://discord.com/developers/docs/reference#image-formatting */ discovery_splash: string | null; /** * `true` if the user is the owner of the guild * * **This field is only received from https://discord.com/developers/docs/resources/user#get-current-user-guilds** */ owner?: boolean; /** * ID of owner */ owner_id: Snowflake; /** * Total permissions for the user in the guild (excludes overrides) * * **This field is only received from https://discord.com/developers/docs/resources/user#get-current-user-guilds** * * See https://en.wikipedia.org/wiki/Bit_field */ permissions?: Permissions; /** * Voice region id for the guild * * See https://discord.com/developers/docs/resources/voice#voice-region-object * * @deprecated This field has been deprecated in favor of `rtc_region` on the channel. */ region: string; /** * ID of afk channel */ afk_channel_id: Snowflake | null; /** * afk timeout in seconds */ afk_timeout: number; /** * `true` if the guild widget is enabled */ widget_enabled?: boolean; /** * The channel id that the widget will generate an invite to, or `null` if set to no invite */ widget_channel_id?: Snowflake | null; /** * Verification level required for the guild * * See https://discord.com/developers/docs/resources/guild#guild-object-verification-level */ verification_level: GuildVerificationLevel; /** * Default message notifications level * * See https://discord.com/developers/docs/resources/guild#guild-object-default-message-notification-level */ default_message_notifications: GuildDefaultMessageNotifications; /** * Explicit content filter level * * See https://discord.com/developers/docs/resources/guild#guild-object-explicit-content-filter-level */ explicit_content_filter: GuildExplicitContentFilter; /** * Roles in the guild * * See https://discord.com/developers/docs/topics/permissions#role-object */ roles: APIRole[]; /** * Custom guild emojis * * See https://discord.com/developers/docs/resources/emoji#emoji-object */ emojis: APIEmoji[]; /** * Enabled guild features * * See https://discord.com/developers/docs/resources/guild#guild-object-guild-features */ features: GuildFeature[]; /** * Required MFA level for the guild * * See https://discord.com/developers/docs/resources/guild#guild-object-mfa-level */ mfa_level: GuildMFALevel; /** * Application id of the guild creator if it is bot-created */ application_id: Snowflake | null; /** * The id of the channel where guild notices such as welcome messages and boost events are posted */ system_channel_id: Snowflake | null; /** * System channel flags * * See https://discord.com/developers/docs/resources/guild#guild-object-system-channel-flags */ system_channel_flags: GuildSystemChannelFlags; /** * The id of the channel where Community guilds can display rules and/or guidelines */ rules_channel_id: Snowflake | null; /** * When this guild was joined at * * **This field is only sent within the [GUILD_CREATE](https://discord.com/developers/docs/topics/gateway#guild-create) event** */ joined_at?: string; /** * `true` if this is considered a large guild * * **This field is only sent within the [GUILD_CREATE](https://discord.com/developers/docs/topics/gateway#guild-create) event** */ large?: boolean; /** * Total number of members in this guild * * **This field is only sent within the [GUILD_CREATE](https://discord.com/developers/docs/topics/gateway#guild-create) event** */ member_count?: number; /** * States of members currently in voice channels; lacks the `guild_id` key * * **This field is only sent within the [GUILD_CREATE](https://discord.com/developers/docs/topics/gateway#guild-create) event** * * See https://discord.com/developers/docs/resources/voice#voice-state-object */ voice_states?: Omit<GatewayVoiceState, 'guild_id'>[]; /** * Users in the guild * * **This field is only sent within the [GUILD_CREATE](https://discord.com/developers/docs/topics/gateway#guild-create) event** * * See https://discord.com/developers/docs/resources/guild#guild-member-object */ members?: APIGuildMember[]; /** * Channels in the guild * * **This field is only sent within the [GUILD_CREATE](https://discord.com/developers/docs/topics/gateway#guild-create) event** * * See https://discord.com/developers/docs/resources/channel#channel-object */ channels?: APIChannel[]; /** * Presences of the members in the guild, will only include non-offline members if the size is greater than `large_threshold` * * **This field is only sent within the [GUILD_CREATE](https://discord.com/developers/docs/topics/gateway#guild-create) event** * * See https://discord.com/developers/docs/topics/gateway#presence-update */ presences?: GatewayPresenceUpdate[]; /** * The maximum number of presences for the guild (`null` is always returned, apart from the largest of guilds) */ max_presences?: number | null; /** * The maximum number of members for the guild */ max_members?: number; /** * The vanity url code for the guild */ vanity_url_code: string | null; /** * The description for the guild, if the guild is discoverable */ description: string | null; /** * Banner hash * * See https://discord.com/developers/docs/reference#image-formatting */ banner: string | null; /** * Premium tier (Server Boost level) * * See https://discord.com/developers/docs/resources/guild#guild-object-premium-tier */ premium_tier: GuildPremiumTier; /** * The number of boosts this guild currently has */ premium_subscription_count?: number; /** * The preferred locale of a Community guild; used in guild discovery and notices from Discord; defaults to "en-US" * * @default "en-US" */ preferred_locale: string; /** * The id of the channel where admins and moderators of Community guilds receive notices from Discord */ public_updates_channel_id: Snowflake | null; /** * The maximum amount of users in a video channel */ max_video_channel_users?: number; /** * **This field is only received from https://discord.com/developers/docs/resources/guild#get-guild with the `with_counts` query parameter set to `true`** */ approximate_member_count?: number; /** * **This field is only received from https://discord.com/developers/docs/resources/guild#get-guild with the `with_counts` query parameter set to `true`** */ approximate_presence_count?: number; /** * The welcome screen of a Community guild, shown to new members * * Returned in the invite object */ welcome_screen?: APIGuildWelcomeScreen; /** * The nsfw level of the guild * * See https://discord.com/developers/docs/resources/guild#guild-object-guild-nsfw-level */ nsfw_level: GuildNSFWLevel; /** * The stage instances in the guild * * **This field is only sent within the [GUILD_CREATE](https://discord.com/developers/docs/topics/gateway#guild-create) event** * * See https://discord.com/developers/docs/resources/stage-instance#stage-instance-object-stage-instance-structure */ stage_instances?: APIStageInstance[]; /** * Custom guild stickers * * See https://discord.com/developers/docs/resources/sticker#sticker-object */ stickers: APISticker[]; /** * Whether the guild has the boost progress bar enabled. */ premium_progress_bar_enabled: boolean; /** * The scheduled events in the guild * * **This field is only sent within the [GUILD_CREATE](https://discord.com/developers/docs/topics/gateway#guild-create) event** * * https://discord.com/developers/docs/resources/guild-scheduled-event#guild-scheduled-event-object */ guild_scheduled_events?: APIGuildScheduledEvent[]; } /** * https://discord.com/developers/docs/resources/guild#guild-object-default-message-notification-level * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export declare enum GuildDefaultMessageNotifications { AllMessages = 0, OnlyMentions = 1 } /** * https://discord.com/developers/docs/resources/guild#guild-object-explicit-content-filter-level * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export declare enum GuildExplicitContentFilter { Disabled = 0, MembersWithoutRoles = 1, AllMembers = 2 } /** * https://discord.com/developers/docs/resources/guild#guild-object-mfa-level * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export declare enum GuildMFALevel { None = 0, Elevated = 1 } /** * https://discord.com/developers/docs/resources/guild#guild-object-guild-nsfw-level * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export declare enum GuildNSFWLevel { Default = 0, Explicit = 1, Safe = 2, AgeRestricted = 3 } /** * https://discord.com/developers/docs/resources/guild#guild-object-verification-level * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export declare enum GuildVerificationLevel { /** * Unrestricted */ None = 0, /** * Must have verified email on account */ Low = 1, /** * Must be registered on Discord for longer than 5 minutes */ Medium = 2, /** * Must be a member of the guild for longer than 10 minutes */ High = 3, /** * Must have a verified phone number */ VeryHigh = 4 } /** * https://discord.com/developers/docs/resources/guild#guild-object-premium-tier * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export declare enum GuildPremiumTier { None = 0, Tier1 = 1, Tier2 = 2, Tier3 = 3 } /** * https://discord.com/developers/docs/resources/guild#guild-object-system-channel-flags * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export declare enum GuildSystemChannelFlags { /** * Suppress member join notifications */ SuppressJoinNotifications = 1, /** * Suppress server boost notifications */ SuppressPremiumSubscriptions = 2, /** * Suppress server setup tips */ SuppressGuildReminderNotifications = 4, /** * Hide member join sticker reply buttons */ SuppressJoinNotificationReplies = 8 } /** * https://discord.com/developers/docs/resources/guild#guild-object-guild-features * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export declare enum GuildFeature { /** * Guild has access to set an animated guild banner image */ AnimatedBanner = "ANIMATED_BANNER", /** * Guild has access to set an animated guild icon */ AnimatedIcon = "ANIMATED_ICON", /** * Guild has access to set a guild banner image */ Banner = "BANNER", /** * Guild has access to use commerce features (i.e. create store channels) */ Commerce = "COMMERCE", /** * Guild can enable welcome screen, Membership Screening and discovery, and receives community updates */ Community = "COMMUNITY", /** * Guild is able to be discovered in the directory */ Discoverable = "DISCOVERABLE", /** * Guild is able to be featured in the directory */ Featurable = "FEATURABLE", /** * Guild has access to set an invite splash background */ InviteSplash = "INVITE_SPLASH", /** * Guild has enabled Membership Screening */ MemberVerificationGateEnabled = "MEMBER_VERIFICATION_GATE_ENABLED", /** * Guild has enabled monetization */ MonetizationEnabled = "MONETIZATION_ENABLED", /** * Guild has increased custom sticker slots */ MoreStickers = "MORE_STICKERS", /** * Guild has access to create news channels */ News = "NEWS", /** * Guild is partnered */ Partnered = "PARTNERED", /** * Guild can be previewed before joining via Membership Screening or the directory */ PreviewEnabled = "PREVIEW_ENABLED", /** * Guild has access to create private threads */ PrivateThreads = "PRIVATE_THREADS", RelayEnabled = "RELAY_ENABLED", /** * Guild is able to set role icons */ RoleIcons = "ROLE_ICONS", /** * Guild has access to the seven day archive time for threads */ SevenDayThreadArchive = "SEVEN_DAY_THREAD_ARCHIVE", /** * Guild has access to the three day archive time for threads */ ThreeDayThreadArchive = "THREE_DAY_THREAD_ARCHIVE", /** * Guild has enabled ticketed events */ TicketedEventsEnabled = "TICKETED_EVENTS_ENABLED", /** * Guild has access to set a vanity URL */ VanityURL = "VANITY_URL", /** * Guild is verified */ Verified = "VERIFIED", /** * Guild has access to set 384kbps bitrate in voice (previously VIP voice servers) */ VIPRegions = "VIP_REGIONS", /** * Guild has enabled the welcome screen */ WelcomeScreenEnabled = "WELCOME_SCREEN_ENABLED" } /** * https://discord.com/developers/docs/resources/guild#guild-preview-object * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export interface APIGuildPreview { /** * Guild id */ id: Snowflake; /** * Guild name (2-100 characters) */ name: string; /** * Icon hash * * See https://discord.com/developers/docs/reference#image-formatting */ icon: string | null; /** * Splash hash * * See https://discord.com/developers/docs/reference#image-formatting */ splash: string | null; /** * Discovery splash hash; only present for guilds with the "DISCOVERABLE" feature * * See https://discord.com/developers/docs/reference#image-formatting */ discovery_splash: string | null; /** * Custom guild emojis * * See https://discord.com/developers/docs/resources/emoji#emoji-object */ emojis: APIEmoji[]; /** * Enabled guild features * * See https://discord.com/developers/docs/resources/guild#guild-object-guild-features */ features: GuildFeature[]; /** * Approximate number of members in this guild */ approximate_member_count: number; /** * Approximate number of online members in this guild */ approximate_presence_count: number; /** * The description for the guild */ description: string; /** * Custom guild stickers */ stickers: APISticker[]; } /** * https://discord.com/developers/docs/resources/guild#guild-widget-object * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export interface APIGuildWidgetSettings { /** * Whether the widget is enabled */ enabled: boolean; /** * The widget channel id */ channel_id: Snowflake | null; } /** * https://discord.com/developers/docs/resources/guild#guild-member-object * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export interface APIGuildMember { /** * The user this guild member represents * * **This field won't be included in the member object attached to `MESSAGE_CREATE` and `MESSAGE_UPDATE` gateway events.** * * See https://discord.com/developers/docs/resources/user#user-object */ user?: APIUser; /** * This users guild nickname */ nick?: string | null; /** * The member's guild avatar hash */ avatar?: string | null; /** * Array of role object ids * * See https://discord.com/developers/docs/topics/permissions#role-object */ roles: Snowflake[]; /** * When the user joined the guild */ joined_at: string; /** * When the user started boosting the guild * * See https://support.discord.com/hc/en-us/articles/360028038352-Server-Boosting- */ premium_since?: string | null; /** * Whether the user is deafened in voice channels */ deaf: boolean; /** * Whether the user is muted in voice channels */ mute: boolean; /** * Whether the user has not yet passed the guild's Membership Screening requirements * * @remarks If this field is not present, it can be assumed as `false`. */ pending?: boolean; /** * Timestamp of when the time out will be removed; until then, they cannot interact with the guild */ communication_disabled_until?: string | null; } /** * https://discord.com/developers/docs/resources/guild#integration-object * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export interface APIGuildIntegration { /** * Integration id */ id: Snowflake; /** * Integration name */ name: string; /** * Integration type */ type: APIGuildInteractionType; /** * Is this integration enabled */ enabled: boolean; /** * Is this integration syncing * * **This field is not provided for `discord` bot integrations.** */ syncing?: boolean; /** * ID that this integration uses for "subscribers" * * **This field is not provided for `discord` bot integrations.** */ role_id?: Snowflake; /** * Whether emoticons should be synced for this integration (`twitch` only currently) * * **This field is not provided for `discord` bot integrations.** */ enable_emoticons?: boolean; /** * The behavior of expiring subscribers * * **This field is not provided for `discord` bot integrations.** * * See https://discord.com/developers/docs/resources/guild#integration-object-integration-expire-behaviors */ expire_behavior?: IntegrationExpireBehavior; /** * The grace period (in days) before expiring subscribers * * **This field is not provided for `discord` bot integrations.** */ expire_grace_period?: number; /** * User for this integration * * **This field is not provided for `discord` bot integrations.** * * See https://discord.com/developers/docs/resources/user#user-object */ user?: APIUser; /** * Integration account information * * See https://discord.com/developers/docs/resources/guild#integration-account-object */ account: APIIntegrationAccount; /** * When this integration was last synced * * **This field is not provided for `discord` bot integrations.** */ synced_at?: string; /** * How many subscribers this integration has * * **This field is not provided for `discord` bot integrations.** */ subscriber_count?: number; /** * Has this integration been revoked * * **This field is not provided for `discord` bot integrations.** */ revoked?: boolean; /** * The bot/OAuth2 application for discord integrations * * See https://discord.com/developers/docs/resources/guild#integration-application-object * * **This field is not provided for `discord` bot integrations.** */ application?: APIGuildIntegrationApplication; } /** * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type APIGuildInteractionType = 'discord' | 'twitch' | 'youtube'; /** * https://discord.com/developers/docs/resources/guild#integration-object-integration-expire-behaviors * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export declare enum IntegrationExpireBehavior { RemoveRole = 0, Kick = 1 } /** * https://discord.com/developers/docs/resources/guild#integration-account-object * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export interface APIIntegrationAccount { /** * ID of the account */ id: string; /** * Name of the account */ name: string; } /** * https://discord.com/developers/docs/resources/guild#integration-application-object * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export interface APIGuildIntegrationApplication { /** * The id of the app */ id: Snowflake; /** * The name of the app */ name: string; /** * The icon hash of the app * * See https://discord.com/developers/docs/reference#image-formatting */ icon: string | null; /** * The description of the app */ description: string; /** * The summary of the app * * @deprecated Always an empty string, will be removed in v11 */ summary: ''; /** * The bot associated with this application * * See https://discord.com/developers/docs/resources/user#user-object */ bot?: APIUser; } /** * https://discord.com/developers/docs/resources/guild#ban-object * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export interface APIBan { /** * The reason for the ban */ reason: string | null; /** * The banned user */ user: APIUser; } /** * https://discord.com/developers/docs/resources/guild#get-guild-widget-example-get-guild-widget * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export interface APIGuildWidget { id: Snowflake; name: string; instant_invite: string | null; channels: APIGuildWidgetChannel[]; members: APIGuildWidgetMember[]; presence_count: number; } /** * https://discord.com/developers/docs/resources/guild#get-guild-widget-example-get-guild-widget * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export interface APIGuildWidgetChannel { id: Snowflake; name: string; position: number; } /** * https://discord.com/developers/docs/resources/guild#get-guild-widget-example-get-guild-widget * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export interface APIGuildWidgetMember { id: string; username: string; discriminator: string; avatar: string | null; status: PresenceUpdateStatus; activity?: { name: string; }; avatar_url: string; } /** * https://discord.com/developers/docs/resources/guild#get-guild-widget-image-widget-style-options * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export declare enum GuildWidgetStyle { /** * Shield style widget with Discord icon and guild members online count */ Shield = "shield", /** * Large image with guild icon, name and online count. "POWERED BY DISCORD" as the footer of the widget */ Banner1 = "banner1", /** * Smaller widget style with guild icon, name and online count. Split on the right with Discord logo */ Banner2 = "banner2", /** * Large image with guild icon, name and online count. In the footer, Discord logo on the left and "Chat Now" on the right */ Banner3 = "banner3", /** * Large Discord logo at the top of the widget. Guild icon, name and online count in the middle portion of the widget * and a "JOIN MY SERVER" button at the bottom */ Banner4 = "banner4" } /** * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export interface APIGuildWelcomeScreen { /** * The welcome screen short message */ description: string | null; /** * Array of suggested channels */ welcome_channels: APIGuildWelcomeScreenChannel[]; } /** * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export interface APIGuildWelcomeScreenChannel { /** * The channel id that is suggested */ channel_id: Snowflake; /** * The description shown for the channel */ description: string; /** * The emoji id of the emoji that is shown on the left of the channel */ emoji_id: Snowflake | null; /** * The emoji name of the emoji that is shown on the left of the channel */ emoji_name: string | null; } /** * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export interface APIGuildMembershipScreening { /** * When the fields were last updated */ version: string; /** * The steps in the screening form */ form_fields: APIGuildMembershipScreeningField[]; /** * The server description shown in the screening form */ description: string | null; } /** * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export interface APIGuildMembershipScreeningField { /** * The type of field */ field_type: MembershipScreeningFieldType; /** * The title of the field */ label: string; /** * The list of rules */ values?: string[]; /** * Whether the user has to fill out this field */ required: boolean; } /** * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export declare enum MembershipScreeningFieldType { /** * Server Rules */ Terms = "TERMS" } //# sourceMappingURL=guild.d.ts.map node_modules/discord-api-types/payloads/v8/index.d.ts 0000664 00000001070 15114741631 0016636 0 ustar 00 export * from '../common'; export * from './application'; export * from './auditLog'; export * from './channel'; export * from './emoji'; export * from './gateway'; export * from './guild'; export * from './guildScheduledEvent'; export * from './interactions'; export * from './invite'; export * from './oauth2'; export * from './permissions'; export * from './stageInstance'; export * from './sticker'; export * from './teams'; export * from './template'; export * from './user'; export * from './voice'; export * from './webhook'; //# sourceMappingURL=index.d.ts.map node_modules/discord-api-types/payloads/v8/guildScheduledEvent.d.ts 0000664 00000013124 15114741631 0021461 0 ustar 00 import type { Snowflake } from '../../globals'; import type { APIGuildMember } from './guild'; import type { APIUser } from './user'; /** * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ interface APIGuildScheduledEventBase<Type extends GuildScheduledEventEntityType> { /** * The id of the guild event */ id: Snowflake; /** * The guild id which the scheduled event belongs to */ guild_id: Snowflake; /** * The channel id in which the scheduled event will be hosted, or `null` if entity type is `EXTERNAL` */ channel_id: Snowflake | null; /** * The id of the user that created the scheduled event */ creator_id?: Snowflake | null; /** * The name of the scheduled event */ name: string; /** * The description of the scheduled event */ description?: string; /** * The time the scheduled event will start */ scheduled_start_time: string; /** * The time at which the guild event will end, or `null` if the event does not have a scheduled time to end */ scheduled_end_time: string | null; /** * The privacy level of the scheduled event */ privacy_level: GuildScheduledEventPrivacyLevel; /** * The status of the scheduled event */ status: GuildScheduledEventStatus; /** * The type of hosting entity associated with the scheduled event */ entity_type: Type; /** * The id of the hosting entity associated with the scheduled event */ entity_id: Snowflake | null; /** * The entity metadata for the scheduled event */ entity_metadata: APIGuildScheduledEventEntityMetadata | null; /** * The user that created the scheduled event */ creator?: APIUser; /** * The number of users subscribed to the scheduled event */ user_count?: number; /** * The cover image of the scheduled event */ image: string | null; } /** * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export interface APIStageInstanceGuildScheduledEvent extends APIGuildScheduledEventBase<GuildScheduledEventEntityType.StageInstance> { channel_id: Snowflake; entity_metadata: null; } /** * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export interface APIVoiceGuildScheduledEvent extends APIGuildScheduledEventBase<GuildScheduledEventEntityType.Voice> { channel_id: Snowflake; entity_metadata: null; } /** * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export interface APIExternalGuildScheduledEvent extends APIGuildScheduledEventBase<GuildScheduledEventEntityType.External> { channel_id: null; entity_metadata: Required<APIGuildScheduledEventEntityMetadata>; } /** * https://discord.com/developers/docs/resources/guild-scheduled-event#guild-scheduled-event-object-guild-scheduled-event-structure * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type APIGuildScheduledEvent = APIExternalGuildScheduledEvent | APIStageInstanceGuildScheduledEvent | APIVoiceGuildScheduledEvent; /** * https://discord.com/developers/docs/resources/guild-scheduled-event#guild-scheduled-event-object-guild-scheduled-event-entity-metadata * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export interface APIGuildScheduledEventEntityMetadata { /** * The location of the scheduled event */ location?: string; } /** * https://discord.com/developers/docs/resources/guild-scheduled-event#guild-scheduled-event-object-guild-scheduled-event-entity-types * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export declare enum GuildScheduledEventEntityType { StageInstance = 1, Voice = 2, External = 3 } /** * https://discord.com/developers/docs/resources/guild-scheduled-event#guild-scheduled-event-object-guild-scheduled-event-status * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export declare enum GuildScheduledEventStatus { Scheduled = 1, Active = 2, Completed = 3, Canceled = 4 } /** * https://discord.com/developers/docs/resources/guild-scheduled-event#guild-scheduled-event-object-guild-scheduled-event-privacy-level * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export declare enum GuildScheduledEventPrivacyLevel { /** * The scheduled event is only accessible to guild members */ GuildOnly = 2 } /** * https://discord.com/developers/docs/resources/guild-scheduled-event#guild-scheduled-event-user-object-guild-scheduled-event-user-structure * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export interface APIGuildScheduledEventUser { /** * The scheduled event id which the user subscribed to */ guild_scheduled_event_id: Snowflake; /** * The user which subscribed to the event */ user: APIUser; /** * The guild member data for this user for the guild which this event belongs to, if any */ member?: APIGuildMember; } export {}; //# sourceMappingURL=guildScheduledEvent.d.ts.map node_modules/discord-api-types/payloads/v8/auditLog.js.map 0000664 00000002052 15114741631 0017620 0 ustar 00 {"version":3,"file":"auditLog.js","sourceRoot":"","sources":["auditLog.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AAyGH;;;;GAIG;AACH,IAAY,aAuDX;AAvDD,WAAY,aAAa;IACxB,+DAAe,CAAA;IAEf,oEAAkB,CAAA;IAClB,oEAAa,CAAA;IACb,oEAAa,CAAA;IACb,sFAAsB,CAAA;IACtB,sFAAsB,CAAA;IACtB,sFAAsB,CAAA;IAEtB,8DAAe,CAAA;IACf,gEAAW,CAAA;IACX,kEAAY,CAAA;IACZ,wEAAe,CAAA;IACf,kEAAY,CAAA;IACZ,0EAAgB,CAAA;IAChB,8DAAU,CAAA;IACV,0EAAgB,CAAA;IAChB,sDAAM,CAAA;IAEN,8DAAe,CAAA;IACf,8DAAU,CAAA;IACV,8DAAU,CAAA;IAEV,kEAAiB,CAAA;IACjB,kEAAY,CAAA;IACZ,kEAAY,CAAA;IAEZ,oEAAkB,CAAA;IAClB,oEAAa,CAAA;IACb,oEAAa,CAAA;IAEb,gEAAgB,CAAA;IAChB,gEAAW,CAAA;IACX,gEAAW,CAAA;IAEX,oEAAkB,CAAA;IAClB,4EAAiB,CAAA;IACjB,8DAAU,CAAA;IACV,kEAAY,CAAA;IAEZ,4EAAsB,CAAA;IACtB,4EAAiB,CAAA;IACjB,4EAAiB,CAAA;IACjB,gFAAmB,CAAA;IACnB,gFAAmB,CAAA;IACnB,gFAAmB,CAAA;IAEnB,oEAAkB,CAAA;IAClB,oEAAa,CAAA;IACb,oEAAa,CAAA;IAEb,6FAA+B,CAAA;IAC/B,6FAAyB,CAAA;IACzB,6FAAyB,CAAA;AAC1B,CAAC,EAvDW,aAAa,6BAAb,aAAa,QAuDxB;AA4FD;;GAEG;AACH,IAAY,mBAGX;AAHD,WAAY,mBAAmB;IAC9B,iCAAU,CAAA;IACV,mCAAY,CAAA;AACb,CAAC,EAHW,mBAAmB,mCAAnB,mBAAmB,QAG9B"} node_modules/discord-api-types/payloads/v8/teams.js 0000664 00000001435 15114741631 0016411 0 ustar 00 "use strict"; /** * Types extracted from https://discord.com/developers/docs/topics/teams */ Object.defineProperty(exports, "__esModule", { value: true }); exports.TeamMemberMembershipState = void 0; /** * https://discord.com/developers/docs/topics/teams#data-models-membership-state-enum * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ var TeamMemberMembershipState; (function (TeamMemberMembershipState) { TeamMemberMembershipState[TeamMemberMembershipState["Invited"] = 1] = "Invited"; TeamMemberMembershipState[TeamMemberMembershipState["Accepted"] = 2] = "Accepted"; })(TeamMemberMembershipState || (exports.TeamMemberMembershipState = TeamMemberMembershipState = {})); //# sourceMappingURL=teams.js.map node_modules/discord-api-types/payloads/v8/template.d.ts.map 0000664 00000001605 15114741631 0020122 0 ustar 00 {"version":3,"file":"template.d.ts","sourceRoot":"","sources":["template.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC/C,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,qBAAqB,CAAC;AACrE,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,QAAQ,CAAC;AAEtC;;;;GAIG;AACH,MAAM,WAAW,WAAW;IAC3B;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;OAEG;IACH,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B;;OAEG;IACH,WAAW,EAAE,MAAM,CAAC;IACpB;;OAEG;IACH,UAAU,EAAE,SAAS,CAAC;IACtB;;;;OAIG;IACH,OAAO,EAAE,OAAO,CAAC;IACjB;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC;IACnB;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC;IACnB;;OAEG;IACH,eAAe,EAAE,SAAS,CAAC;IAC3B;;OAEG;IACH,uBAAuB,EAAE,gCAAgC,CAAC;IAC1D;;OAEG;IACH,QAAQ,EAAE,OAAO,GAAG,IAAI,CAAC;CACzB;AAED;;GAEG;AACH,MAAM,WAAW,gCAAiC,SAAQ,IAAI,CAAC,yBAAyB,EAAE,MAAM,CAAC;IAChG,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,gBAAgB,EAAE,MAAM,CAAC;IACzB,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;CACzB"} node_modules/discord-api-types/payloads/v8/gateway.d.ts.map 0000664 00000006403 15114741631 0017751 0 ustar 00 {"version":3,"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MAAM,WAAW,qBAAqB;IACrC;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,GAAG,EAAE,MAAM,CAAC;CACZ"} node_modules/discord-api-types/payloads/v8/_interactions/ping.js 0000664 00000000155 15114741631 0021074 0 ustar 00 "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); //# sourceMappingURL=ping.js.map node_modules/discord-api-types/payloads/v8/_interactions/autocomplete.d.ts 0000664 00000002571 15114741631 0023100 0 ustar 00 import type { APIBaseInteraction, APIChatInputApplicationCommandInteractionData, APIDMInteractionWrapper, APIGuildInteractionWrapper, InteractionType } from '../index'; /** * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type APIApplicationCommandAutocompleteInteraction = APIBaseInteraction<InteractionType.ApplicationCommandAutocomplete, APIChatInputApplicationCommandInteractionData> & Required<Pick<APIBaseInteraction<InteractionType.ApplicationCommandAutocomplete, Required<Pick<APIChatInputApplicationCommandInteractionData, 'options'>>>, 'data'>>; /** * https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type APIApplicationCommandAutocompleteDMInteraction = APIDMInteractionWrapper<APIApplicationCommandAutocompleteInteraction>; /** * https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type APIApplicationCommandAutocompleteGuildInteraction = APIGuildInteractionWrapper<APIApplicationCommandAutocompleteInteraction>; //# sourceMappingURL=autocomplete.d.ts.map node_modules/discord-api-types/payloads/v8/_interactions/messageComponents.d.ts 0000664 00000004323 15114741631 0024066 0 ustar 00 import type { ComponentType } from '../channel'; import type { APIBaseInteraction, InteractionType } from '../interactions'; import type { APIDMInteractionWrapper, APIGuildInteractionWrapper } from './base'; /** * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type APIMessageComponentInteraction = APIBaseInteraction<InteractionType.MessageComponent, APIMessageComponentInteractionData> & Required<Pick<APIBaseInteraction<InteractionType.MessageComponent, APIMessageComponentInteractionData>, 'channel_id' | 'data' | 'message'>>; /** * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type APIMessageComponentInteractionData = APIMessageButtonInteractionData | APIMessageSelectMenuInteractionData; /** * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export interface APIMessageComponentBaseInteractionData<CType extends ComponentType> { /** * The `custom_id` of the component */ custom_id: string; /** * The type of the component */ component_type: CType; } /** * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type APIMessageButtonInteractionData = APIMessageComponentBaseInteractionData<ComponentType.Button>; /** * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export interface APIMessageSelectMenuInteractionData extends APIMessageComponentBaseInteractionData<ComponentType.SelectMenu> { values: string[]; } /** * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type APIMessageComponentDMInteraction = APIDMInteractionWrapper<APIMessageComponentInteraction>; /** * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type APIMessageComponentGuildInteraction = APIGuildInteractionWrapper<APIMessageComponentInteraction>; //# sourceMappingURL=messageComponents.d.ts.map node_modules/discord-api-types/payloads/v8/_interactions/autocomplete.d.ts.map 0000664 00000001077 15114741631 0023654 0 ustar 00 {"version":3,"file":"autocomplete.d.ts","sourceRoot":"","sources":["autocomplete.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACX,kBAAkB,EAClB,6CAA6C,EAC7C,uBAAuB,EACvB,0BAA0B,EAC1B,eAAe,EACf,MAAM,UAAU,CAAC;AAElB;;GAEG;AACH,MAAM,MAAM,4CAA4C,GAAG,kBAAkB,CAC5E,eAAe,CAAC,8BAA8B,EAC9C,6CAA6C,CAC7C,GACA,QAAQ,CACP,IAAI,CACH,kBAAkB,CACjB,eAAe,CAAC,8BAA8B,EAC9C,QAAQ,CAAC,IAAI,CAAC,6CAA6C,EAAE,SAAS,CAAC,CAAC,CACxE,EACD,MAAM,CACN,CACD,CAAC;AAEH;;;;GAIG;AACH,MAAM,MAAM,8CAA8C,GACzD,uBAAuB,CAAC,4CAA4C,CAAC,CAAC;AAEvE;;;;GAIG;AACH,MAAM,MAAM,iDAAiD,GAC5D,0BAA0B,CAAC,4CAA4C,CAAC,CAAC"} node_modules/discord-api-types/payloads/v8/_interactions/ping.js.map 0000664 00000000135 15114741631 0021646 0 ustar 00 {"version":3,"file":"ping.js","sourceRoot":"","sources":["ping.ts"],"names":[],"mappings":""} node_modules/discord-api-types/payloads/v8/_interactions/responses.d.ts 0000664 00000012770 15114741631 0022422 0 ustar 00 import type { RESTPostAPIWebhookWithTokenJSONBody } from '../../../v8'; import type { APIActionRowComponent, APIModalActionRowComponent } from '../channel'; import type { MessageFlags } from '../index'; import type { APIApplicationCommandOptionChoice } from './applicationCommands'; /** * https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object-interaction-type * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export declare enum InteractionType { Ping = 1, ApplicationCommand = 2, MessageComponent = 3, ApplicationCommandAutocomplete = 4, ModalSubmit = 5 } /** * https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-response-object * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type APIInteractionResponse = APIApplicationCommandAutocompleteResponse | APIInteractionResponseChannelMessageWithSource | APIInteractionResponseDeferredChannelMessageWithSource | APIInteractionResponseDeferredMessageUpdate | APIInteractionResponsePong | APIInteractionResponseUpdateMessage | APIModalInteractionResponse; /** * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export interface APIInteractionResponsePong { type: InteractionResponseType.Pong; } /** * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export interface APIApplicationCommandAutocompleteResponse { type: InteractionResponseType.ApplicationCommandAutocompleteResult; data: APICommandAutocompleteInteractionResponseCallbackData; } /** * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export interface APIModalInteractionResponse { type: InteractionResponseType.Modal; data: APIModalInteractionResponseCallbackData; } /** * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export interface APIInteractionResponseChannelMessageWithSource { type: InteractionResponseType.ChannelMessageWithSource; data: APIInteractionResponseCallbackData; } /** * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export interface APIInteractionResponseDeferredChannelMessageWithSource { type: InteractionResponseType.DeferredChannelMessageWithSource; data?: Pick<APIInteractionResponseCallbackData, 'flags'>; } /** * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export interface APIInteractionResponseDeferredMessageUpdate { type: InteractionResponseType.DeferredMessageUpdate; } /** * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export interface APIInteractionResponseUpdateMessage { type: InteractionResponseType.UpdateMessage; data?: APIInteractionResponseCallbackData; } /** * https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-response-object-interaction-callback-type * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export declare enum InteractionResponseType { /** * ACK a `Ping` */ Pong = 1, /** * Respond to an interaction with a message */ ChannelMessageWithSource = 4, /** * ACK an interaction and edit to a response later, the user sees a loading state */ DeferredChannelMessageWithSource = 5, /** * ACK a button interaction and update it to a loading state */ DeferredMessageUpdate = 6, /** * ACK a button interaction and edit the message to which the button was attached */ UpdateMessage = 7, /** * For autocomplete interactions */ ApplicationCommandAutocompleteResult = 8, /** * Respond to an interaction with an modal for a user to fill-out */ Modal = 9 } /** * https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-response-object-interaction-callback-data-structure * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type APIInteractionResponseCallbackData = Omit<RESTPostAPIWebhookWithTokenJSONBody, 'avatar_url' | 'username'> & { flags?: MessageFlags; }; /** * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export interface APICommandAutocompleteInteractionResponseCallbackData { choices?: APIApplicationCommandOptionChoice[]; } /** * https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-response-object-modal * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export interface APIModalInteractionResponseCallbackData { /** * A developer-defined identifier for the component, max 100 characters */ custom_id: string; /** * The title of the popup modal */ title: string; /** * Between 1 and 5 (inclusive) components that make up the modal */ components: APIActionRowComponent<APIModalActionRowComponent>[]; } //# sourceMappingURL=responses.d.ts.map node_modules/discord-api-types/payloads/v8/_interactions/applicationCommands.d.ts.map 0000664 00000003420 15114741631 0025132 0 ustar 00 {"version":3,"file":"applicationCommands.d.ts","sourceRoot":"","sources":["applicationCommands.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC/D,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AACpD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAC/C,OAAO,KAAK,EACX,2BAA2B,EAC3B,2CAA2C,EAC3C,8CAA8C,EAC9C,yCAAyC,EACzC,6CAA6C,EAC7C,MAAM,kCAAkC,CAAC;AAC1C,OAAO,KAAK,EACX,2BAA2B,EAC3B,8BAA8B,EAC9B,yBAAyB,EACzB,6BAA6B,EAC7B,MAAM,oCAAoC,CAAC;AAC5C,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,QAAQ,CAAC;AACjD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAEnD,cAAc,kCAAkC,CAAC;AACjD,cAAc,oCAAoC,CAAC;AACnD,cAAc,oCAAoC,CAAC;AAEnD;;;;GAIG;AACH,MAAM,WAAW,qBAAqB;IACrC;;OAEG;IACH,EAAE,EAAE,SAAS,CAAC;IACd;;OAEG;IACH,IAAI,EAAE,sBAAsB,CAAC;IAC7B;;OAEG;IACH,cAA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ules/discord-api-types/payloads/v8/_interactions/_applicationCommands/chatInput.js.map 0000664 00000000422 15114741631 0026773 0 ustar 00 {"version":3,"file":"chatInput.js","sourceRoot":"","sources":["chatInput.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAuDA,0DAAwC;AACxC,uDAAqC;AACrC,uDAAqC;AACrC,uDAAqC;AACrC,2DAAyC;AACzC,sDAAoC;AACpC,oDAAkC;AAClC,sDAAoC;AACpC,sDAAoC;AACpC,0DAAwC;AACxC,+DAA6C;AAC7C,oDAAkC"} node_modules/discord-api-types/payloads/v8/_interactions/_applicationCommands/internals.d.ts 0000664 00000000672 15114741631 0026522 0 ustar 00 import type { Snowflake } from '../../../../globals'; import type { ApplicationCommandType } from '../applicationCommands'; /** * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export interface APIBaseApplicationCommandInteractionData<Type extends ApplicationCommandType> { id: Snowflake; type: Type; name: string; } //# sourceMappingURL=internals.d.ts.map node_modules/discord-api-types/payloads/v8/_interactions/_applicationCommands/internals.js 0000664 00000000162 15114741631 0026260 0 ustar 00 "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); //# sourceMappingURL=internals.js.map node_modules/discord-api-types/payloads/v8/_interactions/_applicationCommands/chatInput.d.ts 0000664 00000015347 15114741631 0026467 0 ustar 00 import type { Snowflake } from '../../../../globals'; import type { APIAttachment, APIRole, APIUser } from '../../index'; import type { APIApplicationCommandInteractionWrapper, APIInteractionDataResolvedChannel, APIInteractionDataResolvedGuildMember, ApplicationCommandType } from '../applicationCommands'; import type { APIDMInteractionWrapper, APIGuildInteractionWrapper } from '../base'; import type { APIApplicationCommandAttachmentOption, APIApplicationCommandInteractionDataAttachmentOption } from './_chatInput/attachment'; import type { APIApplicationCommandBooleanOption, APIApplicationCommandInteractionDataBooleanOption } from './_chatInput/boolean'; import type { APIApplicationCommandChannelOption, APIApplicationCommandInteractionDataChannelOption } from './_chatInput/channel'; import type { APIApplicationCommandIntegerOption, APIApplicationCommandInteractionDataIntegerOption } from './_chatInput/integer'; import type { APIApplicationCommandInteractionDataMentionableOption, APIApplicationCommandMentionableOption } from './_chatInput/mentionable'; import type { APIApplicationCommandInteractionDataNumberOption, APIApplicationCommandNumberOption } from './_chatInput/number'; import type { APIApplicationCommandInteractionDataRoleOption, APIApplicationCommandRoleOption } from './_chatInput/role'; import type { APIApplicationCommandInteractionDataStringOption, APIApplicationCommandStringOption } from './_chatInput/string'; import type { APIApplicationCommandInteractionDataSubcommandOption, APIApplicationCommandSubcommandOption } from './_chatInput/subcommand'; import type { APIApplicationCommandInteractionDataSubcommandGroupOption, APIApplicationCommandSubcommandGroupOption } from './_chatInput/subcommandGroup'; import type { APIApplicationCommandInteractionDataUserOption, APIApplicationCommandUserOption } from './_chatInput/user'; import type { APIBaseApplicationCommandInteractionData } from './internals'; export * from './_chatInput/attachment'; export * from './_chatInput/boolean'; export * from './_chatInput/channel'; export * from './_chatInput/integer'; export * from './_chatInput/mentionable'; export * from './_chatInput/number'; export * from './_chatInput/role'; export * from './_chatInput/shared'; export * from './_chatInput/string'; export * from './_chatInput/subcommand'; export * from './_chatInput/subcommandGroup'; export * from './_chatInput/user'; /** * https://discord.com/developers/docs/interactions/application-commands#application-command-object-application-command-option-structure * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type APIApplicationCommandBasicOption = APIApplicationCommandAttachmentOption | APIApplicationCommandBooleanOption | APIApplicationCommandChannelOption | APIApplicationCommandIntegerOption | APIApplicationCommandMentionableOption | APIApplicationCommandNumberOption | APIApplicationCommandRoleOption | APIApplicationCommandStringOption | APIApplicationCommandUserOption; /** * https://discord.com/developers/docs/interactions/application-commands#application-command-object-application-command-option-structure * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type APIApplicationCommandOption = APIApplicationCommandBasicOption | APIApplicationCommandSubcommandGroupOption | APIApplicationCommandSubcommandOption; /** * https://discord.com/developers/docs/interactions/application-commands#application-command-object-application-command-interaction-data-option-structure * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type APIApplicationCommandInteractionDataOption = APIApplicationCommandInteractionDataBasicOption | APIApplicationCommandInteractionDataSubcommandGroupOption | APIApplicationCommandInteractionDataSubcommandOption; /** * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type APIApplicationCommandInteractionDataBasicOption = APIApplicationCommandInteractionDataAttachmentOption | APIApplicationCommandInteractionDataBooleanOption | APIApplicationCommandInteractionDataChannelOption | APIApplicationCommandInteractionDataIntegerOption | APIApplicationCommandInteractionDataMentionableOption | APIApplicationCommandInteractionDataNumberOption | APIApplicationCommandInteractionDataRoleOption | APIApplicationCommandInteractionDataStringOption | APIApplicationCommandInteractionDataUserOption; /** * https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object-interaction-data-structure * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export interface APIChatInputApplicationCommandInteractionData extends APIBaseApplicationCommandInteractionData<ApplicationCommandType.ChatInput> { options?: APIApplicationCommandInteractionDataOption[]; resolved?: APIChatInputApplicationCommandInteractionDataResolved; } /** * https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object-resolved-data-structure * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export interface APIChatInputApplicationCommandInteractionDataResolved { users?: Record<Snowflake, APIUser>; roles?: Record<Snowflake, APIRole>; members?: Record<Snowflake, APIInteractionDataResolvedGuildMember>; channels?: Record<Snowflake, APIInteractionDataResolvedChannel>; attachments?: Record<Snowflake, APIAttachment>; } /** * https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type APIChatInputApplicationCommandInteraction = APIApplicationCommandInteractionWrapper<APIChatInputApplicationCommandInteractionData>; /** * https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type APIChatInputApplicationCommandDMInteraction = APIDMInteractionWrapper<APIChatInputApplicationCommandInteraction>; /** * https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type APIChatInputApplicationCommandGuildInteraction = APIGuildInteractionWrapper<APIChatInputApplicationCommandInteraction>; //# sourceMappingURL=chatInput.d.ts.map node_modules/discord-api-types/payloads/v8/_interactions/_applicationCommands/contextMenu.d.ts.map 0000664 00000003141 15114741631 0027602 0 ustar 00 {"version":3,"file":"contextMenu.d.ts","sourceRoot":"","sources":["contextMenu.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AACrD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAChD,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAC1C,OAAO,KAAK,EACX,uCAAuC,EACvC,qCAAqC,EACrC,sBAAsB,EACtB,MAAM,wBAAwB,CAAC;AAChC,OAAO,KAAK,EAAE,uBAAuB,EAAE,0BAA0B,EAAE,MAAM,SAAS,CAAC;AACnF,OAAO,KAAK,EAAE,wCAAwC,EAAE,MAAM,aAAa,CAAC;AAE5E;;;;GAIG;AACH,MAAM,WAAW,wCAChB,SAAQ,wCAAwC,CAAC,sBAAsB,CAAC,IAAI,CAAC;IAC7E,SAAS,EAAE,SAAS,CAAC;IACrB,QAAQ,EAAE,gDAAgD,CAAC;CAC3D;AAED;;;;GAIG;AACH,MAAM,WAAW,gDAAgD;IAChE,KAAK,EAAE,MAAM,CAAC,SAAS,EAAE,OAAO,CAAC,CAAC;IAClC,OAAO,CAAC,EAAE,MAAM,CAAC,SAAS,EAAE,qCAAqC,CAAC,CAAC;CACnE;AAED;;;;GAIG;AACH,MAAM,WAAW,2CAChB,SAAQ,wCAAwC,CAAC,sBAAsB,CAAC,OAAO,CAAC;IAChF,SAAS,EAAE,SAAS,CAAC;IACrB,QAAQ,EAAE,mDAAmD,CAAC;CAC9D;AAED;;;;GAIG;AACH,MAAM,WAAW,mDAAmD;IACnE,QAAQ,EAAE,MAAM,CAAC,SAAS,EAAE,UAAU,CAAC,CAAC;CACxC;AAED;;;;GAIG;AACH,MAAM,MAAM,6BAA6B,GACtC,2CAA2C,GAC3C,wCAAwC,CAAC;AAE5C;;;;GAIG;AACH,MAAM,MAAM,oCAAoC,GAC/C,uCAAuC,CAAC,wCAAwC,CAAC,CAAC;AAEnF;;;;GAIG;AACH,MAAM,MAAM,sCAAsC,GAAG,uBAAuB,CAAC,oCAAoC,CAAC,CAAC;AAEnH;;;;GAIG;AACH,MAAM,MAAM,yCAAyC,GACpD,0BAA0B,CAAC,oCAAoC,CAAC,CAAC;AAElE;;;;GAIG;AACH,MAAM,MAAM,uCAAuC,GAClD,uCAAuC,CAAC,2CAA2C,CAAC,CAAC;AAEtF;;;;GAIG;AACH,MAAM,MAAM,yCAAyC,GACpD,uBAAuB,CAAC,uCAAuC,CAAC,CAAC;AAElE;;;;GAIG;AACH,MAAM,MAAM,4CAA4C,GACvD,0BAA0B,CAAC,uCAAuC,CAAC,CAAC;AAErE;;;;GAIG;AACH,MAAM,MAAM,yBAAyB,GAAG,uCAAuC,GAAG,oCAAoC,CAAC;AAEvH;;;;GAIG;AACH,MAAM,MAAM,2BAA2B,GACpC,yCAAyC,GACzC,sCAAsC,CAAC;AAE1C;;;;GAIG;AACH,MAAM,MAAM,8BAA8B,GACvC,4CAA4C,GAC5C,yCAAyC,CAAC"} node_modules/discord-api-types/payloads/v8/_interactions/_applicationCommands/permissions.js.map 0000664 00000000347 15114741631 0027415 0 ustar 00 {"version":3,"file":"permissions.js","sourceRoot":"","sources":["permissions.ts"],"names":[],"mappings":";;;AA8CA;;;;GAIG;AACH,IAAY,gCAGX;AAHD,WAAY,gCAAgC;IAC3C,uFAAQ,CAAA;IACR,uFAAI,CAAA;AACL,CAAC,EAHW,gCAAgC,gDAAhC,gCAAgC,QAG3C"} node_modules/discord-api-types/payloads/v8/_interactions/_applicationCommands/contextMenu.js 0000664 00000000164 15114741631 0026574 0 ustar 00 "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); //# sourceMappingURL=contextMenu.js.map node_modules/discord-api-types/payloads/v8/_interactions/_applicationCommands/permissions.js 0000664 00000001510 15114741631 0026632 0 ustar 00 "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.ApplicationCommandPermissionType = void 0; /** * https://discord.com/developers/docs/interactions/application-commands#application-command-permissions-object-application-command-permission-type * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ var ApplicationCommandPermissionType; (function (ApplicationCommandPermissionType) { ApplicationCommandPermissionType[ApplicationCommandPermissionType["Role"] = 1] = "Role"; ApplicationCommandPermissionType[ApplicationCommandPermissionType["User"] = 2] = "User"; })(ApplicationCommandPermissionType || (exports.ApplicationCommandPermissionType = ApplicationCommandPermissionType = {})); //# sourceMappingURL=permissions.js.map node_modules/discord-api-types/payloads/v8/_interactions/_applicationCommands/chatInput.d.ts.map 0000664 00000004776 15114741631 0027247 0 ustar 00 {"version":3,"file":"chatInput.d.ts","sourceRoot":"","sources":["chatInput.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AACrD,OAAO,KAAK,EAAE,aAAa,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AACnE,OAAO,KAAK,EACX,uCAAuC,EACvC,iCAAiC,EACjC,qCAAqC,EACrC,sBAAsB,EACtB,MAAM,wBAAwB,CAAC;AAChC,OAAO,KAAK,EAAE,uBAAuB,EAAE,0BAA0B,EAAE,MAAM,SAAS,CAAC;AACnF,OAAO,KAAK,EACX,qCAAqC,EACrC,oDAAoD,EACpD,MAAM,yBAAyB,CAAC;AACjC,OAAO,KAAK,EACX,kCAAkC,EAClC,iDAAiD,EACjD,MAAM,sBAAsB,CAAC;AAC9B,OAAO,KAAK,EACX,kCAAkC,EAClC,iDAAiD,EAC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0CAA0C,GAC1C,qCAAqC,CAAC;AAEzC;;;;GAIG;AACH,MAAM,MAAM,0CAA0C,GACnD,+CAA+C,GAC/C,yDAAyD,GACzD,oDAAoD,CAAC;AAExD;;GAEG;AACH,MAAM,MAAM,+CAA+C,GACxD,oDAAoD,GACpD,iDAAiD,GACjD,iDAAiD,GACjD,iDAAiD,GACjD,qDAAqD,GACrD,gDAAgD,GAChD,8CAA8C,GAC9C,gDAAgD,GAChD,8CAA8C,CAAC;AAElD;;;;GAIG;AACH,MAAM,WAAW,6CAChB,SAAQ,wCAAwC,CAAC,sBAAsB,CAAC,SAAS,CAAC;IAClF,OAAO,CAAC,EAAE,0CAA0C,EAAE,CAAC;IACvD,QAAQ,CAAC,EAAE,qDAAqD,CAAC;CACjE;AAED;;;;GAIG;AACH,MAAM,WAAW,qDAAqD;IACrE,KAAK,CAAC,EAAE,MAAM,CAAC,SAAS,EAAE,OAAO,CAAC,CAAC;IACnC,KAAK,CAAC,EAAE,MAAM,CAAC,SAAS,EAAE,OAAO,CAAC,CAAC;IACnC,OAAO,CAAC,EAAE,MAAM,CAAC,SAAS,EAAE,qCAAqC,CAAC,CAAC;IACnE,QAAQ,CAAC,EAAE,MAAM,CAAC,SAAS,EAAE,iCAAiC,CAAC,CAAC;IAChE,WAAW,CAAC,EAAE,MAAM,CAAC,SAAS,EAAE,aAAa,CAAC,CAAC;CAC/C;AAED;;;;GAIG;AACH,MAAM,MAAM,yCAAyC,GACpD,uCAAuC,CAAC,6CAA6C,CAAC,CAAC;AAExF;;;;GAIG;AACH,MAAM,MAAM,2CAA2C,GACtD,uBAAuB,CAAC,yCAAyC,CAAC,CAAC;AAEpE;;;;GAIG;AACH,MAAM,MAAM,8CAA8C,GACzD,0BAA0B,CAAC,yCAAyC,CAAC,CAAC"} discord-api-types/payloads/v8/_interactions/_applicationCommands/_chatInput/number.js.map 0000664 00000000141 15114741631 0030341 0 ustar 00 node_modules {"version":3,"file":"number.js","sourceRoot":"","sources":["number.ts"],"names":[],"mappings":""} node_modules/discord-api-types/payloads/v8/_interactions/_applicationCommands/_chatInput/user.js.map0000664 00000000135 15114741631 0030111 0 ustar 00 {"version":3,"file":"user.js","sourceRoot":"","sources":["user.ts"],"names":[],"mappings":""} discord-api-types/payloads/v8/_interactions/_applicationCommands/_chatInput/subcommand.js.map 0000664 00000000151 15114741631 0031202 0 ustar 00 node_modules {"version":3,"file":"subcommand.js","sourceRoot":"","sources":["subcommand.ts"],"names":[],"mappings":""} discord-api-types/payloads/v8/_interactions/_applicationCommands/_chatInput/attachment.d.ts.map 0000664 00000000656 15114741631 0031450 0 ustar 00 node_modules {"version":3,"file":"attachment.d.ts","sourceRoot":"","sources":["attachment.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AACxD,OAAO,KAAK,EAAE,+BAA+B,EAAE,4BAA4B,EAAE,MAAM,QAAQ,CAAC;AAC5F,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,UAAU,CAAC;AAE7D;;GAEG;AACH,MAAM,MAAM,qCAAqC,GAChD,+BAA+B,CAAC,4BAA4B,CAAC,UAAU,CAAC,CAAC;AAE1E;;GAEG;AACH,MAAM,MAAM,oDAAoD,GAAG,4BAA4B,CAC9F,4BAA4B,CAAC,UAAU,EACvC,SAAS,CACT,CAAC"} discord-api-types/payloads/v8/_interactions/_applicationCommands/_chatInput/mentionable.d.ts.map 0000664 00000000660 15114741631 0031610 0 ustar 00 node_modules {"version":3,"file":"mentionable.d.ts","sourceRoot":"","sources":["mentionable.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AACxD,OAAO,KAAK,EAAE,+BAA+B,EAAE,4BAA4B,EAAE,MAAM,QAAQ,CAAC;AAC5F,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,UAAU,CAAC;AAE7D;;GAEG;AACH,MAAM,MAAM,sCAAsC,GACjD,+BAA+B,CAAC,4BAA4B,CAAC,WAAW,CAAC,CAAC;AAE3E;;GAEG;AACH,MAAM,MAAM,qDAAqD,GAAG,4BAA4B,CAC/F,4BAA4B,CAAC,WAAW,EACxC,SAAS,CACT,CAAC"} discord-api-types/payloads/v8/_interactions/_applicationCommands/_chatInput/mentionable.d.ts 0000664 00000001422 15114741631 0031031 0 ustar 00 node_modules import type { Snowflake } from '../../../../../globals'; import type { APIApplicationCommandOptionBase, APIInteractionDataOptionBase } from './base'; import type { ApplicationCommandOptionType } from './shared'; /** * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type APIApplicationCommandMentionableOption = APIApplicationCommandOptionBase<ApplicationCommandOptionType.Mentionable>; /** * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type APIApplicationCommandInteractionDataMentionableOption = APIInteractionDataOptionBase<ApplicationCommandOptionType.Mentionable, Snowflake>; //# sourceMappingURL=mentionable.d.ts.map discord-api-types/payloads/v8/_interactions/_applicationCommands/_chatInput/mentionable.js 0000664 00000000164 15114741631 0030577 0 ustar 00 node_modules "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); //# sourceMappingURL=mentionable.js.map discord-api-types/payloads/v8/_interactions/_applicationCommands/_chatInput/channel.js.map 0000664 00000000143 15114741631 0030463 0 ustar 00 node_modules {"version":3,"file":"channel.js","sourceRoot":"","sources":["channel.ts"],"names":[],"mappings":""} discord-api-types/payloads/v8/_interactions/_applicationCommands/_chatInput/integer.d.ts.map 0000664 00000001137 15114741631 0030750 0 ustar 00 node_modules {"version":3,"file":"integer.d.ts","sourceRoot":"","sources":["integer.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACX,+BAA+B,EAC/B,2DAA2D,EAC3D,4BAA4B,EAC5B,MAAM,QAAQ,CAAC;AAChB,OAAO,KAAK,EAAE,iCAAiC,EAAE,4BAA4B,EAAE,MAAM,UAAU,CAAC;AAEhG;;GAEG;AACH,UAAU,sCACT,SAAQ,+BAA+B,CAAC,4BAA4B,CAAC,OAAO,CAAC;IAC7E;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;CACnB;AAED;;GAEG;AACH,MAAM,MAAM,kCAAkC,GAAG,2DAA2D,CAC3G,sCAAsC,EACtC,iCAAiC,CAAC,MAAM,CAAC,CACzC,CAAC;AAEF;;GAEG;AACH,MAAM,WAAW,iDAChB,SAAQ,4BAA4B,CAAC,4BAA4B,CAAC,OAAO,EAAE,MAAM,CAAC;IAClF,OAAO,CAAC,EAAE,OAAO,CAAC;CAClB"} discord-api-types/payloads/v8/_interactions/_applicationCommands/_chatInput/subcommand.js 0000664 00000000163 15114741631 0030431 0 ustar 00 node_modules "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); //# sourceMappingURL=subcommand.js.map node_modules/discord-api-types/payloads/v8/_interactions/_applicationCommands/_chatInput/string.d.ts0000664 00000001652 15114741631 0030126 0 ustar 00 import type { APIApplicationCommandOptionBase, APIApplicationCommandOptionWithAutocompleteOrChoicesWrapper, APIInteractionDataOptionBase } from './base'; import type { APIApplicationCommandOptionChoice, ApplicationCommandOptionType } from './shared'; /** * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type APIApplicationCommandStringOption = APIApplicationCommandOptionWithAutocompleteOrChoicesWrapper<APIApplicationCommandOptionBase<ApplicationCommandOptionType.String>, APIApplicationCommandOptionChoice<string>>; /** * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export interface APIApplicationCommandInteractionDataStringOption extends APIInteractionDataOptionBase<ApplicationCommandOptionType.String, string> { focused?: boolean; } //# sourceMappingURL=string.d.ts.map discord-api-types/payloads/v8/_interactions/_applicationCommands/_chatInput/mentionable.js.map 0000664 00000000153 15114741631 0031351 0 ustar 00 node_modules {"version":3,"file":"mentionable.js","sourceRoot":"","sources":["mentionable.ts"],"names":[],"mappings":""} node_modules/discord-api-types/payloads/v8/_interactions/_applicationCommands/_chatInput/base.js.map0000664 00000000135 15114741631 0030045 0 ustar 00 {"version":3,"file":"base.js","sourceRoot":"","sources":["base.ts"],"names":[],"mappings":""} discord-api-types/payloads/v8/_interactions/_applicationCommands/_chatInput/shared.js.map 0000664 00000000554 15114741631 0030327 0 ustar 00 node_modules {"version":3,"file":"shared.js","sourceRoot":"","sources":["shared.ts"],"names":[],"mappings":";;;AAAA;;;;GAIG;AACH,IAAY,4BAYX;AAZD,WAAY,4BAA4B;IACvC,2FAAc,CAAA;IACd,qGAAe,CAAA;IACf,mFAAM,CAAA;IACN,qFAAO,CAAA;IACP,qFAAO,CAAA;IACP,+EAAI,CAAA;IACJ,qFAAO,CAAA;IACP,+EAAI,CAAA;IACJ,6FAAW,CAAA;IACX,oFAAM,CAAA;IACN,4FAAU,CAAA;AACX,CAAC,EAZW,4BAA4B,4CAA5B,4BAA4B,QAYvC"} discord-api-types/payloads/v8/_interactions/_applicationCommands/_chatInput/user.d.ts.map 0000664 00000000641 15114741631 0030270 0 ustar 00 node_modules {"version":3,"file":"user.d.ts","sourceRoot":"","sources":["user.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AACxD,OAAO,KAAK,EAAE,+BAA+B,EAAE,4BAA4B,EAAE,MAAM,QAAQ,CAAC;AAC5F,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,UAAU,CAAC;AAE7D;;GAEG;AACH,MAAM,MAAM,+BAA+B,GAAG,+BAA+B,CAAC,4BAA4B,CAAC,IAAI,CAAC,CAAC;AAEjH;;GAEG;AACH,MAAM,MAAM,8CAA8C,GAAG,4BAA4B,CACxF,4BAA4B,CAAC,IAAI,EACjC,SAAS,CACT,CAAC"} discord-api-types/payloads/v8/_interactions/_applicationCommands/_chatInput/string.d.ts.map 0000664 00000000734 15114741631 0030623 0 ustar 00 node_modules {"version":3,"file":"string.d.ts","sourceRoot":"","sources":["string.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACX,+BAA+B,EAC/B,2DAA2D,EAC3D,4BAA4B,EAC5B,MAAM,QAAQ,CAAC;AAChB,OAAO,KAAK,EAAE,iCAAiC,EAAE,4BAA4B,EAAE,MAAM,UAAU,CAAC;AAEhG;;GAEG;AACH,MAAM,MAAM,iCAAiC,GAAG,2DAA2D,CAC1G,+BAA+B,CAAC,4BAA4B,CAAC,MAAM,CAAC,EACpE,iCAAiC,CAAC,MAAM,CAAC,CACzC,CAAC;AAEF;;GAEG;AACH,MAAM,WAAW,gDAChB,SAAQ,4BAA4B,CAAC,4BAA4B,CAAC,MAAM,EAAE,MAAM,CAAC;IACjF,OAAO,CAAC,EAAE,OAAO,CAAC;CAClB"} node_modules/discord-api-types/payloads/v8/_interactions/_applicationCommands/_chatInput/base.d.ts 0000664 00000002164 15114741631 0027531 0 ustar 00 import type { APIApplicationCommandOptionChoice, ApplicationCommandOptionType } from './shared'; /** * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export interface APIApplicationCommandOptionBase<Type extends ApplicationCommandOptionType> { type: Type; name: string; description: string; required?: boolean; } /** * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export interface APIInteractionDataOptionBase<T extends ApplicationCommandOptionType, D> { name: string; type: T; value: D; } /** * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type APIApplicationCommandOptionWithAutocompleteOrChoicesWrapper<Base extends APIApplicationCommandOptionBase<ApplicationCommandOptionType>, ChoiceType extends APIApplicationCommandOptionChoice> = (Base & { autocomplete: true; }) | (Base & { autocomplete?: false; choices?: ChoiceType[]; }); //# sourceMappingURL=base.d.ts.map node_modules/discord-api-types/payloads/v8/_interactions/_applicationCommands/_chatInput/role.js 0000664 00000000155 15114741631 0027322 0 ustar 00 "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); //# sourceMappingURL=role.js.map node_modules/discord-api-types/payloads/v8/_interactions/_applicationCommands/_chatInput/channel.js 0000664 00000000160 15114741631 0027765 0 ustar 00 "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); //# sourceMappingURL=channel.js.map discord-api-types/payloads/v8/_interactions/_applicationCommands/_chatInput/integer.js.map 0000664 00000000143 15114741631 0030510 0 ustar 00 node_modules {"version":3,"file":"integer.js","sourceRoot":"","sources":["integer.ts"],"names":[],"mappings":""} discord-api-types/payloads/v8/_interactions/_applicationCommands/_chatInput/shared.d.ts.map 0000664 00000000646 15114741631 0030565 0 ustar 00 node_modules {"version":3,"file":"shared.d.ts","sourceRoot":"","sources":["shared.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,oBAAY,4BAA4B;IACvC,UAAU,IAAI;IACd,eAAe,IAAA;IACf,MAAM,IAAA;IACN,OAAO,IAAA;IACP,OAAO,IAAA;IACP,IAAI,IAAA;IACJ,OAAO,IAAA;IACP,IAAI,IAAA;IACJ,WAAW,IAAA;IACX,MAAM,KAAA;IACN,UAAU,KAAA;CACV;AAED;;;;GAIG;AACH,MAAM,WAAW,iCAAiC,CAAC,SAAS,GAAG,MAAM,GAAG,MAAM;IAC7E,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,SAAS,CAAC;CACjB"} discord-api-types/payloads/v8/_interactions/_applicationCommands/_chatInput/attachment.js.map 0000664 00000000151 15114741631 0031202 0 ustar 00 node_modules {"version":3,"file":"attachment.js","sourceRoot":"","sources":["attachment.ts"],"names":[],"mappings":""} node_modules/discord-api-types/payloads/v8/_interactions/_applicationCommands/_chatInput/role.js.map0000664 00000000135 15114741631 0030074 0 ustar 00 {"version":3,"file":"role.js","sourceRoot":"","sources":["role.ts"],"names":[],"mappings":""} node_modules/discord-api-types/payloads/v8/_interactions/_applicationCommands/_chatInput/string.js 0000664 00000000157 15114741631 0027671 0 ustar 00 "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); //# sourceMappingURL=string.js.map discord-api-types/payloads/v8/_interactions/_applicationCommands/_chatInput/subcommand.d.ts 0000664 00000001650 15114741631 0030667 0 ustar 00 node_modules import type { APIApplicationCommandBasicOption, APIApplicationCommandInteractionDataBasicOption } from '../chatInput'; import type { APIApplicationCommandOptionBase } from './base'; import type { ApplicationCommandOptionType } from './shared'; /** * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export interface APIApplicationCommandSubcommandOption extends APIApplicationCommandOptionBase<ApplicationCommandOptionType.Subcommand> { options?: APIApplicationCommandBasicOption[]; } /** * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export interface APIApplicationCommandInteractionDataSubcommandOption { name: string; type: ApplicationCommandOptionType.Subcommand; options?: APIApplicationCommandInteractionDataBasicOption[]; } //# sourceMappingURL=subcommand.d.ts.map discord-api-types/payloads/v8/_interactions/_applicationCommands/_chatInput/attachment.d.ts 0000664 00000001415 15114741631 0030666 0 ustar 00 node_modules import type { Snowflake } from '../../../../../globals'; import type { APIApplicationCommandOptionBase, APIInteractionDataOptionBase } from './base'; import type { ApplicationCommandOptionType } from './shared'; /** * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type APIApplicationCommandAttachmentOption = APIApplicationCommandOptionBase<ApplicationCommandOptionType.Attachment>; /** * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type APIApplicationCommandInteractionDataAttachmentOption = APIInteractionDataOptionBase<ApplicationCommandOptionType.Attachment, Snowflake>; //# sourceMappingURL=attachment.d.ts.map discord-api-types/payloads/v8/_interactions/_applicationCommands/_chatInput/subcommandGroup.js 0000664 00000000170 15114741631 0031444 0 ustar 00 node_modules "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); //# sourceMappingURL=subcommandGroup.js.map node_modules/discord-api-types/payloads/v8/_interactions/_applicationCommands/_chatInput/role.d.ts 0000664 00000001357 15114741631 0027563 0 ustar 00 import type { Snowflake } from '../../../../../globals'; import type { APIApplicationCommandOptionBase, APIInteractionDataOptionBase } from './base'; import type { ApplicationCommandOptionType } from './shared'; /** * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type APIApplicationCommandRoleOption = APIApplicationCommandOptionBase<ApplicationCommandOptionType.Role>; /** * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type APIApplicationCommandInteractionDataRoleOption = APIInteractionDataOptionBase<ApplicationCommandOptionType.Role, Snowflake>; //# sourceMappingURL=role.d.ts.map node_modules/discord-api-types/payloads/v8/_interactions/_applicationCommands/_chatInput/user.js 0000664 00000000155 15114741631 0027337 0 ustar 00 "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); //# sourceMappingURL=user.js.map discord-api-types/payloads/v8/_interactions/_applicationCommands/_chatInput/subcommand.d.ts.map 0000664 00000001006 15114741631 0031436 0 ustar 00 node_modules {"version":3,"file":"subcommand.d.ts","sourceRoot":"","sources":["subcommand.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gCAAgC,EAAE,+CAA+C,EAAE,MAAM,cAAc,CAAC;AACtH,OAAO,KAAK,EAAE,+BAA+B,EAAE,MAAM,QAAQ,CAAC;AAC9D,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,UAAU,CAAC;AAE7D;;GAEG;AACH,MAAM,WAAW,qCAChB,SAAQ,+BAA+B,CAAC,4BAA4B,CAAC,UAAU,CAAC;IAChF,OAAO,CAAC,EAAE,gCAAgC,EAAE,CAAC;CAC7C;AAED;;GAEG;AACH,MAAM,WAAW,oDAAoD;IACpE,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,4BAA4B,CAAC,UAAU,CAAC;IAC9C,OAAO,CAAC,EAAE,+CAA+C,EAAE,CAAC;CAC5D"} node_modules/discord-api-types/payloads/v8/_interactions/_applicationCommands/_chatInput/number.js 0000664 00000000157 15114741631 0027653 0 ustar 00 "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); //# sourceMappingURL=number.js.map discord-api-types/payloads/v8/_interactions/_applicationCommands/_chatInput/string.js.map 0000664 00000000141 15114741631 0030357 0 ustar 00 node_modules {"version":3,"file":"string.js","sourceRoot":"","sources":["string.ts"],"names":[],"mappings":""} discord-api-types/payloads/v8/_interactions/_applicationCommands/_chatInput/boolean.d.ts.map 0000664 00000000567 15114741631 0030740 0 ustar 00 node_modules {"version":3,"file":"boolean.d.ts","sourceRoot":"","sources":["boolean.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,+BAA+B,EAAE,4BAA4B,EAAE,MAAM,QAAQ,CAAC;AAC5F,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,UAAU,CAAC;AAE7D;;GAEG;AACH,MAAM,MAAM,kCAAkC,GAAG,+BAA+B,CAAC,4BAA4B,CAAC,OAAO,CAAC,CAAC;AAEvH;;GAEG;AACH,MAAM,MAAM,iDAAiD,GAAG,4BAA4B,CAC3F,4BAA4B,CAAC,OAAO,EACpC,OAAO,CACP,CAAC"} node_modules/discord-api-types/payloads/v8/_interactions/_applicationCommands/_chatInput/number.d.ts0000664 00000002616 15114741631 0030111 0 ustar 00 import type { APIApplicationCommandOptionBase, APIApplicationCommandOptionWithAutocompleteOrChoicesWrapper, APIInteractionDataOptionBase } from './base'; import type { APIApplicationCommandOptionChoice, ApplicationCommandOptionType } from './shared'; /** * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ interface APIApplicationCommandNumberOptionBase extends APIApplicationCommandOptionBase<ApplicationCommandOptionType.Number> { /** * If the option is an `INTEGER` or `NUMBER` type, the minimum value permitted. */ min_value?: number; /** * If the option is an `INTEGER` or `NUMBER` type, the maximum value permitted. */ max_value?: number; } /** * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type APIApplicationCommandNumberOption = APIApplicationCommandOptionWithAutocompleteOrChoicesWrapper<APIApplicationCommandNumberOptionBase, APIApplicationCommandOptionChoice<number>>; /** * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export interface APIApplicationCommandInteractionDataNumberOption extends APIInteractionDataOptionBase<ApplicationCommandOptionType.Number, number> { focused?: boolean; } export {}; //# sourceMappingURL=number.d.ts.map discord-api-types/payloads/v8/_interactions/_applicationCommands/_chatInput/boolean.d.ts 0000664 00000001303 15114741631 0030151 0 ustar 00 node_modules import type { APIApplicationCommandOptionBase, APIInteractionDataOptionBase } from './base'; import type { ApplicationCommandOptionType } from './shared'; /** * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type APIApplicationCommandBooleanOption = APIApplicationCommandOptionBase<ApplicationCommandOptionType.Boolean>; /** * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type APIApplicationCommandInteractionDataBooleanOption = APIInteractionDataOptionBase<ApplicationCommandOptionType.Boolean, boolean>; //# sourceMappingURL=boolean.d.ts.map node_modules/discord-api-types/payloads/v8/_interactions/_applicationCommands/_chatInput/base.js 0000664 00000000155 15114741631 0027273 0 ustar 00 "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); //# sourceMappingURL=base.js.map discord-api-types/payloads/v8/_interactions/_applicationCommands/_chatInput/subcommandGroup.d.ts 0000664 00000001724 15114741631 0031706 0 ustar 00 node_modules import type { APIApplicationCommandOptionBase } from './base'; import type { ApplicationCommandOptionType } from './shared'; import type { APIApplicationCommandInteractionDataSubcommandOption, APIApplicationCommandSubcommandOption } from './subcommand'; /** * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export interface APIApplicationCommandSubcommandGroupOption extends APIApplicationCommandOptionBase<ApplicationCommandOptionType.SubcommandGroup> { options?: APIApplicationCommandSubcommandOption[]; } /** * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export interface APIApplicationCommandInteractionDataSubcommandGroupOption { name: string; type: ApplicationCommandOptionType.SubcommandGroup; options: APIApplicationCommandInteractionDataSubcommandOption[]; } //# sourceMappingURL=subcommandGroup.d.ts.map node_modules/discord-api-types/payloads/v8/_interactions/_applicationCommands/_chatInput/boolean.js 0000664 00000000160 15114741631 0027774 0 ustar 00 "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); //# sourceMappingURL=boolean.js.map discord-api-types/payloads/v8/_interactions/_applicationCommands/_chatInput/number.d.ts.map 0000664 00000001135 15114741631 0030601 0 ustar 00 node_modules {"version":3,"file":"number.d.ts","sourceRoot":"","sources":["number.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACX,+BAA+B,EAC/B,2DAA2D,EAC3D,4BAA4B,EAC5B,MAAM,QAAQ,CAAC;AAChB,OAAO,KAAK,EAAE,iCAAiC,EAAE,4BAA4B,EAAE,MAAM,UAAU,CAAC;AAEhG;;GAEG;AACH,UAAU,qCACT,SAAQ,+BAA+B,CAAC,4BAA4B,CAAC,MAAM,CAAC;IAC5E;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;CACnB;AAED;;GAEG;AACH,MAAM,MAAM,iCAAiC,GAAG,2DAA2D,CAC1G,qCAAqC,EACrC,iCAAiC,CAAC,MAAM,CAAC,CACzC,CAAC;AAEF;;GAEG;AACH,MAAM,WAAW,gDAChB,SAAQ,4BAA4B,CAAC,4BAA4B,CAAC,MAAM,EAAE,MAAM,CAAC;IACjF,OAAO,CAAC,EAAE,OAAO,CAAC;CAClB"} node_modules/discord-api-types/payloads/v8/_interactions/_applicationCommands/_chatInput/user.d.ts 0000664 00000001357 15114741631 0027600 0 ustar 00 import type { Snowflake } from '../../../../../globals'; import type { APIApplicationCommandOptionBase, APIInteractionDataOptionBase } from './base'; import type { ApplicationCommandOptionType } from './shared'; /** * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type APIApplicationCommandUserOption = APIApplicationCommandOptionBase<ApplicationCommandOptionType.User>; /** * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type APIApplicationCommandInteractionDataUserOption = APIInteractionDataOptionBase<ApplicationCommandOptionType.User, Snowflake>; //# sourceMappingURL=user.d.ts.map node_modules/discord-api-types/payloads/v8/_interactions/_applicationCommands/_chatInput/integer.js 0000664 00000000160 15114741631 0030012 0 ustar 00 "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); //# sourceMappingURL=integer.js.map discord-api-types/payloads/v8/_interactions/_applicationCommands/_chatInput/base.d.ts.map 0000664 00000001323 15114741631 0030222 0 ustar 00 node_modules {"version":3,"file":"base.d.ts","sourceRoot":"","sources":["base.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iCAAiC,EAAE,4BAA4B,EAAE,MAAM,UAAU,CAAC;AAEhG;;GAEG;AACH,MAAM,WAAW,+BAA+B,CAAC,IAAI,SAAS,4BAA4B;IACzF,IAAI,EAAE,IAAI,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACnB;AAED;;GAEG;AACH,MAAM,WAAW,4BAA4B,CAAC,CAAC,SAAS,4BAA4B,EAAE,CAAC;IACtF,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,CAAC,CAAC;IACR,KAAK,EAAE,CAAC,CAAC;CACT;AAED;;GAEG;AACH,MAAM,MAAM,2DAA2D,CACtE,IAAI,SAAS,+BAA+B,CAAC,4BAA4B,CAAC,EAC1E,UAAU,SAAS,iCAAiC,IAElD,CAAC,IAAI,GAAG;IACR,YAAY,EAAE,IAAI,CAAC;CAClB,CAAC,GACF,CAAC,IAAI,GAAG;IACR,YAAY,CAAC,EAAE,KAAK,CAAC;IACrB,OAAO,CAAC,EAAE,UAAU,EAAE,CAAC;CACtB,CAAC,CAAC"} node_modules/discord-api-types/payloads/v8/_interactions/_applicationCommands/_chatInput/shared.d.ts0000664 00000001663 15114741631 0030070 0 ustar 00 /** * https://discord.com/developers/docs/interactions/application-commands#application-command-object-application-command-option-type * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export declare enum ApplicationCommandOptionType { Subcommand = 1, SubcommandGroup = 2, String = 3, Integer = 4, Boolean = 5, User = 6, Channel = 7, Role = 8, Mentionable = 9, Number = 10, Attachment = 11 } /** * https://discord.com/developers/docs/interactions/application-commands#application-command-object-application-command-option-choice-structure * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export interface APIApplicationCommandOptionChoice<ValueType = number | string> { name: string; value: ValueType; } //# sourceMappingURL=shared.d.ts.map discord-api-types/payloads/v8/_interactions/_applicationCommands/_chatInput/channel.d.ts.map 0000664 00000001062 15114741631 0030720 0 ustar 00 node_modules {"version":3,"file":"channel.d.ts","sourceRoot":"","sources":["channel.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AACxD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AACpD,OAAO,KAAK,EAAE,+BAA+B,EAAE,4BAA4B,EAAE,MAAM,QAAQ,CAAC;AAC5F,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,UAAU,CAAC;AAE7D;;GAEG;AACH,MAAM,WAAW,kCAChB,SAAQ,+BAA+B,CAAC,4BAA4B,CAAC,OAAO,CAAC;IAC7E,aAAa,CAAC,EAAE,OAAO,CAAC,WAAW,EAAE,WAAW,CAAC,EAAE,GAAG,WAAW,CAAC,OAAO,CAAC,EAAE,CAAC;CAC7E;AAED;;GAEG;AACH,MAAM,MAAM,iDAAiD,GAAG,4BAA4B,CAC3F,4BAA4B,CAAC,OAAO,EACpC,SAAS,CACT,CAAC"} discord-api-types/payloads/v8/_interactions/_applicationCommands/_chatInput/integer.d.ts 0000664 00000002625 15114741631 0030177 0 ustar 00 node_modules import type { APIApplicationCommandOptionBase, APIApplicationCommandOptionWithAutocompleteOrChoicesWrapper, APIInteractionDataOptionBase } from './base'; import type { APIApplicationCommandOptionChoice, ApplicationCommandOptionType } from './shared'; /** * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ interface APIApplicationCommandIntegerOptionBase extends APIApplicationCommandOptionBase<ApplicationCommandOptionType.Integer> { /** * If the option is an `INTEGER` or `NUMBER` type, the minimum value permitted. */ min_value?: number; /** * If the option is an `INTEGER` or `NUMBER` type, the maximum value permitted. */ max_value?: number; } /** * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type APIApplicationCommandIntegerOption = APIApplicationCommandOptionWithAutocompleteOrChoicesWrapper<APIApplicationCommandIntegerOptionBase, APIApplicationCommandOptionChoice<number>>; /** * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export interface APIApplicationCommandInteractionDataIntegerOption extends APIInteractionDataOptionBase<ApplicationCommandOptionType.Integer, number> { focused?: boolean; } export {}; //# sourceMappingURL=integer.d.ts.map discord-api-types/payloads/v8/_interactions/_applicationCommands/_chatInput/boolean.js.map 0000664 00000000143 15114741631 0030472 0 ustar 00 node_modules {"version":3,"file":"boolean.js","sourceRoot":"","sources":["boolean.ts"],"names":[],"mappings":""} discord-api-types/payloads/v8/_interactions/_applicationCommands/_chatInput/attachment.js 0000664 00000000163 15114741631 0030431 0 ustar 00 node_modules "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); //# sourceMappingURL=attachment.js.map node_modules/discord-api-types/payloads/v8/_interactions/_applicationCommands/_chatInput/shared.js 0000664 00000003140 15114741631 0027624 0 ustar 00 "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.ApplicationCommandOptionType = void 0; /** * https://discord.com/developers/docs/interactions/application-commands#application-command-object-application-command-option-type * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ var ApplicationCommandOptionType; (function (ApplicationCommandOptionType) { ApplicationCommandOptionType[ApplicationCommandOptionType["Subcommand"] = 1] = "Subcommand"; ApplicationCommandOptionType[ApplicationCommandOptionType["SubcommandGroup"] = 2] = "SubcommandGroup"; ApplicationCommandOptionType[ApplicationCommandOptionType["String"] = 3] = "String"; ApplicationCommandOptionType[ApplicationCommandOptionType["Integer"] = 4] = "Integer"; ApplicationCommandOptionType[ApplicationCommandOptionType["Boolean"] = 5] = "Boolean"; ApplicationCommandOptionType[ApplicationCommandOptionType["User"] = 6] = "User"; ApplicationCommandOptionType[ApplicationCommandOptionType["Channel"] = 7] = "Channel"; ApplicationCommandOptionType[ApplicationCommandOptionType["Role"] = 8] = "Role"; ApplicationCommandOptionType[ApplicationCommandOptionType["Mentionable"] = 9] = "Mentionable"; ApplicationCommandOptionType[ApplicationCommandOptionType["Number"] = 10] = "Number"; ApplicationCommandOptionType[ApplicationCommandOptionType["Attachment"] = 11] = "Attachment"; })(ApplicationCommandOptionType || (exports.ApplicationCommandOptionType = ApplicationCommandOptionType = {})); //# sourceMappingURL=shared.js.map discord-api-types/payloads/v8/_interactions/_applicationCommands/_chatInput/channel.d.ts 0000664 00000001623 15114741631 0030147 0 ustar 00 node_modules import type { Snowflake } from '../../../../../globals'; import type { ChannelType } from '../../../channel'; import type { APIApplicationCommandOptionBase, APIInteractionDataOptionBase } from './base'; import type { ApplicationCommandOptionType } from './shared'; /** * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export interface APIApplicationCommandChannelOption extends APIApplicationCommandOptionBase<ApplicationCommandOptionType.Channel> { channel_types?: Exclude<ChannelType, ChannelType.DM | ChannelType.GroupDM>[]; } /** * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type APIApplicationCommandInteractionDataChannelOption = APIInteractionDataOptionBase<ApplicationCommandOptionType.Channel, Snowflake>; //# sourceMappingURL=channel.d.ts.map discord-api-types/payloads/v8/_interactions/_applicationCommands/_chatInput/subcommandGroup.js.map 0000664 00000000163 15114741631 0032222 0 ustar 00 node_modules {"version":3,"file":"subcommandGroup.js","sourceRoot":"","sources":["subcommandGroup.ts"],"names":[],"mappings":""} discord-api-types/payloads/v8/_interactions/_applicationCommands/_chatInput/subcommandGroup.d.ts.map0000664 00000001015 15114741631 0032453 0 ustar 00 node_modules {"version":3,"file":"subcommandGroup.d.ts","sourceRoot":"","sources":["subcommandGroup.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,+BAA+B,EAAE,MAAM,QAAQ,CAAC;AAC9D,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,UAAU,CAAC;AAC7D,OAAO,KAAK,EACX,oDAAoD,EACpD,qCAAqC,EACrC,MAAM,cAAc,CAAC;AAEtB;;GAEG;AACH,MAAM,WAAW,0CAChB,SAAQ,+BAA+B,CAAC,4BAA4B,CAAC,eAAe,CAAC;IACrF,OAAO,CAAC,EAAE,qCAAqC,EAAE,CAAC;CAClD;AAED;;GAEG;AACH,MAAM,WAAW,yDAAyD;IACzE,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,4BAA4B,CAAC,eAAe,CAAC;IACnD,OAAO,EAAE,oDAAoD,EAAE,CAAC;CAChE"} discord-api-types/payloads/v8/_interactions/_applicationCommands/_chatInput/role.d.ts.map 0000664 00000000641 15114741631 0030253 0 ustar 00 node_modules {"version":3,"file":"role.d.ts","sourceRoot":"","sources":["role.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AACxD,OAAO,KAAK,EAAE,+BAA+B,EAAE,4BAA4B,EAAE,MAAM,QAAQ,CAAC;AAC5F,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,UAAU,CAAC;AAE7D;;GAEG;AACH,MAAM,MAAM,+BAA+B,GAAG,+BAA+B,CAAC,4BAA4B,CAAC,IAAI,CAAC,CAAC;AAEjH;;GAEG;AACH,MAAM,MAAM,8CAA8C,GAAG,4BAA4B,CACxF,4BAA4B,CAAC,IAAI,EACjC,SAAS,CACT,CAAC"} node_modules/discord-api-types/payloads/v8/_interactions/_applicationCommands/internals.d.ts.map 0000664 00000000522 15114741631 0027270 0 ustar 00 {"version":3,"file":"internals.d.ts","sourceRoot":"","sources":["internals.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AACrD,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,wBAAwB,CAAC;AAErE;;GAEG;AACH,MAAM,WAAW,wCAAwC,CAAC,IAAI,SAAS,sBAAsB;IAC5F,EAAE,EAAE,SAAS,CAAC;IACd,IAAI,EAAE,IAAI,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;CACb"} node_modules/discord-api-types/payloads/v8/_interactions/_applicationCommands/contextMenu.d.ts 0000664 00000013312 15114741631 0027027 0 ustar 00 import type { Snowflake } from '../../../../globals'; import type { APIMessage } from '../../channel'; import type { APIUser } from '../../user'; import type { APIApplicationCommandInteractionWrapper, APIInteractionDataResolvedGuildMember, ApplicationCommandType } from '../applicationCommands'; import type { APIDMInteractionWrapper, APIGuildInteractionWrapper } from '../base'; import type { APIBaseApplicationCommandInteractionData } from './internals'; /** * https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object-interaction-data-structure * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export interface APIUserApplicationCommandInteractionData extends APIBaseApplicationCommandInteractionData<ApplicationCommandType.User> { target_id: Snowflake; resolved: APIUserApplicationCommandInteractionDataResolved; } /** * https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object-resolved-data-structure * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export interface APIUserApplicationCommandInteractionDataResolved { users: Record<Snowflake, APIUser>; members?: Record<Snowflake, APIInteractionDataResolvedGuildMember>; } /** * https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object-interaction-data-structure * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export interface APIMessageApplicationCommandInteractionData extends APIBaseApplicationCommandInteractionData<ApplicationCommandType.Message> { target_id: Snowflake; resolved: APIMessageApplicationCommandInteractionDataResolved; } /** * https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object-resolved-data-structure * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export interface APIMessageApplicationCommandInteractionDataResolved { messages: Record<Snowflake, APIMessage>; } /** * https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object-interaction-data-structure * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type APIContextMenuInteractionData = APIMessageApplicationCommandInteractionData | APIUserApplicationCommandInteractionData; /** * https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type APIUserApplicationCommandInteraction = APIApplicationCommandInteractionWrapper<APIUserApplicationCommandInteractionData>; /** * https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type APIUserApplicationCommandDMInteraction = APIDMInteractionWrapper<APIUserApplicationCommandInteraction>; /** * https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type APIUserApplicationCommandGuildInteraction = APIGuildInteractionWrapper<APIUserApplicationCommandInteraction>; /** * https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type APIMessageApplicationCommandInteraction = APIApplicationCommandInteractionWrapper<APIMessageApplicationCommandInteractionData>; /** * https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type APIMessageApplicationCommandDMInteraction = APIDMInteractionWrapper<APIMessageApplicationCommandInteraction>; /** * https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type APIMessageApplicationCommandGuildInteraction = APIGuildInteractionWrapper<APIMessageApplicationCommandInteraction>; /** * https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type APIContextMenuInteraction = APIMessageApplicationCommandInteraction | APIUserApplicationCommandInteraction; /** * https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type APIContextMenuDMInteraction = APIMessageApplicationCommandDMInteraction | APIUserApplicationCommandDMInteraction; /** * https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type APIContextMenuGuildInteraction = APIMessageApplicationCommandGuildInteraction | APIUserApplicationCommandGuildInteraction; //# sourceMappingURL=contextMenu.d.ts.map node_modules/discord-api-types/payloads/v8/_interactions/_applicationCommands/permissions.d.ts 0000664 00000003305 15114741631 0027072 0 ustar 00 import type { Snowflake } from '../../../../globals'; /** * https://discord.com/developers/docs/interactions/application-commands#application-command-permissions-object-guild-application-command-permissions-structure * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export interface APIGuildApplicationCommandPermissions { /** * The id of the command */ id: Snowflake; /** * The id of the application the command belongs to */ application_id: Snowflake; /** * The id of the guild */ guild_id: Snowflake; /** * The permissions for the command in the guild */ permissions: APIApplicationCommandPermission[]; } /** * https://discord.com/developers/docs/interactions/application-commands#application-command-permissions-object-application-command-permissions-structure * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export interface APIApplicationCommandPermission { /** * The id of the role or user */ id: Snowflake; /** * Role or user */ type: ApplicationCommandPermissionType; /** * `true` to allow, `false`, to disallow */ permission: boolean; } /** * https://discord.com/developers/docs/interactions/application-commands#application-command-permissions-object-application-command-permission-type * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export declare enum ApplicationCommandPermissionType { Role = 1, User = 2 } //# sourceMappingURL=permissions.d.ts.map node_modules/discord-api-types/payloads/v8/_interactions/_applicationCommands/internals.js.map 0000664 00000000147 15114741631 0027037 0 ustar 00 {"version":3,"file":"internals.js","sourceRoot":"","sources":["internals.ts"],"names":[],"mappings":""} node_modules/discord-api-types/payloads/v8/_interactions/_applicationCommands/chatInput.js 0000664 00000002703 15114741631 0026223 0 ustar 00 "use strict"; var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { if (k2 === undefined) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { return m[k]; } }; } Object.defineProperty(o, k2, desc); }) : (function(o, m, k, k2) { if (k2 === undefined) k2 = k; o[k2] = m[k]; })); var __exportStar = (this && this.__exportStar) || function(m, exports) { for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); }; Object.defineProperty(exports, "__esModule", { value: true }); __exportStar(require("./_chatInput/attachment"), exports); __exportStar(require("./_chatInput/boolean"), exports); __exportStar(require("./_chatInput/channel"), exports); __exportStar(require("./_chatInput/integer"), exports); __exportStar(require("./_chatInput/mentionable"), exports); __exportStar(require("./_chatInput/number"), exports); __exportStar(require("./_chatInput/role"), exports); __exportStar(require("./_chatInput/shared"), exports); __exportStar(require("./_chatInput/string"), exports); __exportStar(require("./_chatInput/subcommand"), exports); __exportStar(require("./_chatInput/subcommandGroup"), exports); __exportStar(require("./_chatInput/user"), exports); //# sourceMappingURL=chatInput.js.map node_modules/discord-api-types/payloads/v8/_interactions/_applicationCommands/permissions.d.ts.map 0000664 00000001073 15114741631 0027646 0 ustar 00 {"version":3,"file":"permissions.d.ts","sourceRoot":"","sources":["permissions.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAErD;;;;GAIG;AACH,MAAM,WAAW,qCAAqC;IACrD;;OAEG;IACH,EAAE,EAAE,SAAS,CAAC;IACd;;OAEG;IACH,cAAc,EAAE,SAAS,CAAC;IAC1B;;OAEG;IACH,QAAQ,EAAE,SAAS,CAAC;IACpB;;OAEG;IACH,WAAW,EAAE,+BAA+B,EAAE,CAAC;CAC/C;AAED;;;;GAIG;AACH,MAAM,WAAW,+BAA+B;IAC/C;;OAEG;IACH,EAAE,EAAE,SAAS,CAAC;IACd;;OAEG;IACH,IAAI,EAAE,gCAAgC,CAAC;IACvC;;OAEG;IACH,UAAU,EAAE,OAAO,CAAC;CACpB;AAED;;;;GAIG;AACH,oBAAY,gCAAgC;IAC3C,IAAI,IAAI;IACR,IAAI,IAAA;CACJ"} node_modules/discord-api-types/payloads/v8/_interactions/_applicationCommands/contextMenu.js.map 0000664 00000000153 15114741631 0027346 0 ustar 00 {"version":3,"file":"contextMenu.js","sourceRoot":"","sources":["contextMenu.ts"],"names":[],"mappings":""} node_modules/discord-api-types/payloads/v8/_interactions/base.js.map 0000664 00000000135 15114741631 0021623 0 ustar 00 {"version":3,"file":"base.js","sourceRoot":"","sources":["base.ts"],"names":[],"mappings":""} node_modules/discord-api-types/payloads/v8/_interactions/autocomplete.js 0000664 00000000165 15114741631 0022641 0 ustar 00 "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); //# sourceMappingURL=autocomplete.js.map node_modules/discord-api-types/payloads/v8/_interactions/ping.d.ts 0000664 00000000551 15114741631 0021330 0 ustar 00 import type { APIBaseInteraction } from './base'; import type { InteractionType } from './responses'; /** * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type APIPingInteraction = Omit<APIBaseInteraction<InteractionType.Ping, never>, 'locale'>; //# sourceMappingURL=ping.d.ts.map node_modules/discord-api-types/payloads/v8/_interactions/base.d.ts 0000664 00000007374 15114741631 0021317 0 ustar 00 import type { Permissions, Snowflake } from '../../../globals'; import type { LocaleString } from '../../../v8'; import type { APIMessage } from '../channel'; import type { APIGuildMember } from '../guild'; import type { APIUser } from '../user'; import type { InteractionType } from './responses'; /** * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type PartialAPIMessageInteractionGuildMember = Pick<APIGuildMember, 'avatar' | 'communication_disabled_until' | 'deaf' | 'joined_at' | 'mute' | 'nick' | 'pending' | 'premium_since' | 'roles'>; /** * https://discord.com/developers/docs/interactions/receiving-and-responding#message-interaction-object * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export interface APIMessageInteraction { /** * ID of the interaction */ id: Snowflake; /** * The type of interaction */ type: InteractionType; /** * The name of the ApplicationCommand */ name: string; /** * The user who invoked the interaction */ user: APIUser; /** * The guild member who invoked the interaction, only sent in MESSAGE_CREATE events */ member?: PartialAPIMessageInteractionGuildMember; } /** * https://discord.com/developers/docs/resources/guild#guild-member-object * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export interface APIInteractionGuildMember extends APIGuildMember { permissions: Permissions; user: APIUser; } /** * https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export interface APIBaseInteraction<Type extends InteractionType, Data> { /** * ID of the interaction */ id: Snowflake; /** * ID of the application this interaction is for */ application_id: Snowflake; /** * The type of interaction */ type: Type; /** * The command data payload */ data?: Data; /** * The guild it was sent from */ guild_id?: Snowflake; /** * The channel it was sent from */ channel_id?: Snowflake; /** * Guild member data for the invoking user, including permissions * * **This is only sent when an interaction is invoked in a guild** */ member?: APIInteractionGuildMember; /** * User object for the invoking user, if invoked in a DM */ user?: APIUser; /** * A continuation token for responding to the interaction */ token: string; /** * Read-only property, always `1` */ version: 1; /** * For components, the message they were attached to */ message?: APIMessage; /** * The selected language of the invoking user */ locale: LocaleString; /** * The guild's preferred locale, if invoked in a guild */ guild_locale?: LocaleString; } /** * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type APIDMInteractionWrapper<Original extends APIBaseInteraction<InteractionType, unknown>> = Omit<Original, 'guild_id' | 'member'> & Required<Pick<Original, 'user'>>; /** * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type APIGuildInteractionWrapper<Original extends APIBaseInteraction<InteractionType, unknown>> = Omit<Original, 'user'> & Required<Pick<Original, 'guild_id' | 'member'>>; //# sourceMappingURL=base.d.ts.map node_modules/discord-api-types/payloads/v8/_interactions/applicationCommands.js 0000664 00000003247 15114741631 0024131 0 ustar 00 "use strict"; var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { if (k2 === undefined) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { return m[k]; } }; } Object.defineProperty(o, k2, desc); }) : (function(o, m, k, k2) { if (k2 === undefined) k2 = k; o[k2] = m[k]; })); var __exportStar = (this && this.__exportStar) || function(m, exports) { for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); }; Object.defineProperty(exports, "__esModule", { value: true }); exports.ApplicationCommandType = void 0; __exportStar(require("./_applicationCommands/chatInput"), exports); __exportStar(require("./_applicationCommands/contextMenu"), exports); __exportStar(require("./_applicationCommands/permissions"), exports); /** * https://discord.com/developers/docs/interactions/application-commands#application-command-object-application-command-types * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ var ApplicationCommandType; (function (ApplicationCommandType) { ApplicationCommandType[ApplicationCommandType["ChatInput"] = 1] = "ChatInput"; ApplicationCommandType[ApplicationCommandType["User"] = 2] = "User"; ApplicationCommandType[ApplicationCommandType["Message"] = 3] = "Message"; })(ApplicationCommandType || (exports.ApplicationCommandType = ApplicationCommandType = {})); //# sourceMappingURL=applicationCommands.js.map node_modules/discord-api-types/payloads/v8/_interactions/applicationCommands.js.map 0000664 00000000475 15114741631 0024705 0 ustar 00 {"version":3,"file":"applicationCommands.js","sourceRoot":"","sources":["applicationCommands.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAmBA,mEAAiD;AACjD,qEAAmD;AACnD,qEAAmD;AAgDnD;;;;GAIG;AACH,IAAY,sBAIX;AAJD,WAAY,sBAAsB;IACjC,6EAAa,CAAA;IACb,mEAAI,CAAA;IACJ,yEAAO,CAAA;AACR,CAAC,EAJW,sBAAsB,sCAAtB,sBAAsB,QAIjC"} node_modules/discord-api-types/payloads/v8/_interactions/applicationCommands.d.ts 0000664 00000012114 15114741631 0024356 0 ustar 00 import type { Permissions, Snowflake } from '../../../globals'; import type { APIPartialChannel } from '../channel'; import type { APIGuildMember } from '../guild'; import type { APIApplicationCommandOption, APIChatInputApplicationCommandDMInteraction, APIChatInputApplicationCommandGuildInteraction, APIChatInputApplicationCommandInteraction, APIChatInputApplicationCommandInteractionData } from './_applicationCommands/chatInput'; import type { APIContextMenuDMInteraction, APIContextMenuGuildInteraction, APIContextMenuInteraction, APIContextMenuInteractionData } from './_applicationCommands/contextMenu'; import type { APIBaseInteraction } from './base'; import type { InteractionType } from './responses'; export * from './_applicationCommands/chatInput'; export * from './_applicationCommands/contextMenu'; export * from './_applicationCommands/permissions'; /** * https://discord.com/developers/docs/interactions/application-commands#application-command-object * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export interface APIApplicationCommand { /** * Unique id of the command */ id: Snowflake; /** * Type of the command */ type: ApplicationCommandType; /** * Unique id of the parent application */ application_id: Snowflake; /** * Guild id of the command, if not global */ guild_id?: Snowflake; /** * 1-32 character name; `CHAT_INPUT` command names must be all lowercase matching `^[\w-]{1,32}$` */ name: string; /** * 1-100 character description for `CHAT_INPUT` commands, empty string for `USER` and `MESSAGE` commands */ description: string; /** * The parameters for the `CHAT_INPUT` command, max 25 */ options?: APIApplicationCommandOption[]; /** * Whether the command is enabled by default when the app is added to a guild * * If missing, this property should be assumed as `true` */ default_permission?: boolean; /** * Autoincrementing version identifier updated during substantial record changes */ version: Snowflake; } /** * https://discord.com/developers/docs/interactions/application-commands#application-command-object-application-command-types * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export declare enum ApplicationCommandType { ChatInput = 1, User = 2, Message = 3 } /** * https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object-interaction-data-structure * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type APIApplicationCommandInteractionData = APIChatInputApplicationCommandInteractionData | APIContextMenuInteractionData; /** * https://discord.com/developers/docs/resources/channel#channel-object * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export interface APIInteractionDataResolvedChannel extends Required<APIPartialChannel> { permissions: Permissions; } /** * https://discord.com/developers/docs/resources/guild#guild-member-object * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export interface APIInteractionDataResolvedGuildMember extends Omit<APIGuildMember, 'deaf' | 'mute' | 'user'> { permissions: Permissions; } /** * https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type APIApplicationCommandInteractionWrapper<Data extends APIApplicationCommandInteractionData> = APIBaseInteraction<InteractionType.ApplicationCommand, Data> & Required<Pick<APIBaseInteraction<InteractionType.ApplicationCommand, Data>, 'channel_id' | 'data'>>; /** * https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type APIApplicationCommandInteraction = APIChatInputApplicationCommandInteraction | APIContextMenuInteraction; /** * https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type APIApplicationCommandDMInteraction = APIChatInputApplicationCommandDMInteraction | APIContextMenuDMInteraction; /** * https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type APIApplicationCommandGuildInteraction = APIChatInputApplicationCommandGuildInteraction | APIContextMenuGuildInteraction; //# sourceMappingURL=applicationCommands.d.ts.map node_modules/discord-api-types/payloads/v8/_interactions/modalSubmit.js 0000664 00000000164 15114741631 0022417 0 ustar 00 "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); //# sourceMappingURL=modalSubmit.js.map node_modules/discord-api-types/payloads/v8/_interactions/modalSubmit.js.map 0000664 00000000153 15114741631 0023171 0 ustar 00 {"version":3,"file":"modalSubmit.js","sourceRoot":"","sources":["modalSubmit.ts"],"names":[],"mappings":""} node_modules/discord-api-types/payloads/v8/_interactions/responses.js 0000664 00000005132 15114741631 0022160 0 ustar 00 "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.InteractionResponseType = exports.InteractionType = void 0; /** * https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object-interaction-type * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ var InteractionType; (function (InteractionType) { InteractionType[InteractionType["Ping"] = 1] = "Ping"; InteractionType[InteractionType["ApplicationCommand"] = 2] = "ApplicationCommand"; InteractionType[InteractionType["MessageComponent"] = 3] = "MessageComponent"; InteractionType[InteractionType["ApplicationCommandAutocomplete"] = 4] = "ApplicationCommandAutocomplete"; InteractionType[InteractionType["ModalSubmit"] = 5] = "ModalSubmit"; })(InteractionType || (exports.InteractionType = InteractionType = {})); /** * https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-response-object-interaction-callback-type * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ var InteractionResponseType; (function (InteractionResponseType) { /** * ACK a `Ping` */ InteractionResponseType[InteractionResponseType["Pong"] = 1] = "Pong"; /** * Respond to an interaction with a message */ InteractionResponseType[InteractionResponseType["ChannelMessageWithSource"] = 4] = "ChannelMessageWithSource"; /** * ACK an interaction and edit to a response later, the user sees a loading state */ InteractionResponseType[InteractionResponseType["DeferredChannelMessageWithSource"] = 5] = "DeferredChannelMessageWithSource"; /** * ACK a button interaction and update it to a loading state */ InteractionResponseType[InteractionResponseType["DeferredMessageUpdate"] = 6] = "DeferredMessageUpdate"; /** * ACK a button interaction and edit the message to which the button was attached */ InteractionResponseType[InteractionResponseType["UpdateMessage"] = 7] = "UpdateMessage"; /** * For autocomplete interactions */ InteractionResponseType[InteractionResponseType["ApplicationCommandAutocompleteResult"] = 8] = "ApplicationCommandAutocompleteResult"; /** * Respond to an interaction with an modal for a user to fill-out */ InteractionResponseType[InteractionResponseType["Modal"] = 9] = "Modal"; })(InteractionResponseType || (exports.InteractionResponseType = InteractionResponseType = {})); //# sourceMappingURL=responses.js.map node_modules/discord-api-types/payloads/v8/_interactions/responses.d.ts.map 0000664 00000003547 15114741631 0023200 0 ustar 00 {"version":3,"file":"responses.d.ts","sourceRoot":"","sources":["responses.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mCAAmC,EAAE,MAAM,aAAa,CAAC;AACvE,OAAO,KAAK,EAAE,qBAAqB,EAAE,0BAA0B,EAAE,MAAM,YAAY,CAAC;AACpF,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAC7C,OAAO,KAAK,EAAE,iCAAiC,EAAE,MAAM,uBAAuB,CAAC;AAE/E;;;;GAIG;AACH,oBAAY,eAAe;IAC1B,IAAI,IAAI;IACR,kBAAkB,IAAA;IAClB,gBAAgB,IAAA;IAChB,8BAA8B,IAAA;IAC9B,WAAW,IAAA;CACX;AAED;;;;GAIG;AACH,MAAM,MAAM,sBAAsB,GAC/B,yCAAyC,GACzC,8CAA8C,GAC9C,sDAAsD,GACtD,2CAA2C,GAC3C,0BAA0B,GAC1B,mCAAmC,GACnC,2BAA2B,CAAC;AAE/B;;GAEG;AACH,MAAM,WAAW,0BAA0B;IAC1C,IAAI,EAAE,uBAAuB,CAAC,IAAI,CAAC;CACnC;AAED;;GAEG;AACH,MAAM,WAAW,yCAAyC;IACzD,IAAI,EAAE,uBAAuB,CAAC,oCAAoC,CAAC;IACnE,IAAI,EAAE,qDAAqD,CAAC;CAC5D;AAED;;GAEG;AACH,MAAM,WAAW,2BAA2B;IAC3C,IAAI,EAAE,uBAAuB,CAAC,KAAK,CAAC;IACpC,IAAI,EAAE,uCAAuC,CAAC;CAC9C;AAED;;GAEG;AACH,MAAM,WAAW,8CAA8C;IAC9D,IAAI,EAAE,uBAAuB,CAAC,wBAAwB,CAAC;IACvD,IAAI,EAAE,kCAAkC,CAAC;CACzC;AAED;;GAEG;AACH,MAAM,WAAW,sDAAsD;IACtE,IAAI,EAAE,uBAAuB,CAAC,gCAAgC,CAAC;IAC/D,IAAI,CAAC,EAAE,IAAI,CAAC,kCAAkC,EAAE,OAAO,CAAC,CAAC;CACzD;AAED;;GAEG;AACH,MAAM,WAAW,2CAA2C;IAC3D,IAAI,EAAE,uBAAuB,CAAC,qBAAqB,CAAC;CACpD;AAED;;GAEG;AACH,MAAM,WAAW,mCAAmC;IACnD,IAAI,EAAE,uBAAuB,CAAC,aAAa,CAAC;IAC5C,IAAI,CAAC,EAAE,kCAAkC,CAAC;CAC1C;AAED;;;;GAIG;AACH,oBAAY,uBAAuB;IAClC;;OAEG;IACH,IAAI,IAAI;IACR;;OAEG;IACH,wBAAwB,IAAI;IAC5B;;OAEG;IACH,gCAAgC,IAAA;IAChC;;OAEG;IACH,qBAAqB,IAAA;IACrB;;OAEG;IACH,aAAa,IAAA;IACb;;OAEG;IACH,oCAAoC,IAAA;IACpC;;OAEG;IACH,KAAK,IAAA;CACL;AAED;;;;GAIG;AACH,MAAM,MAAM,kCAAkC,GAAG,IAAI,CACpD,mCAAmC,EACnC,YAAY,GAAG,UAAU,CACzB,GAAG;IAAE,KAAK,CAAC,EAAE,YAAY,CAAA;CAAE,CAAC;AAE7B;;GAEG;AACH,MAAM,WAAW,qDAAqD;IACrE,OAAO,CAAC,EAAE,iCAAiC,EAAE,CAAC;CAC9C;AAED;;;;GAIG;AACH,MAAM,WAAW,uCAAuC;IACvD;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;IAClB;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,UAAU,EAAE,qBAAqB,CAAC,0BAA0B,CAAC,EAAE,CAAC;CAChE"} node_modules/discord-api-types/payloads/v8/_interactions/modalSubmit.d.ts.map 0000664 00000001665 15114741631 0023436 0 ustar 00 {"version":3,"file":"modalSubmit.d.ts","sourceRoot":"","sources":["modalSubmit.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,0BAA0B,EAAE,MAAM,YAAY,CAAC;AACpF,OAAO,KAAK,EACX,kBAAkB,EAClB,uBAAuB,EACvB,0BAA0B,EAC1B,aAAa,EACb,eAAe,EACf,MAAM,UAAU,CAAC;AAElB;;GAEG;AACH,MAAM,WAAW,oBAAoB;IACpC,IAAI,EAAE,aAAa,CAAC;IACpB,SAAS,EAAE,MAAM,CAAC;IAClB,KAAK,EAAE,MAAM,CAAC;CACd;AAED;;GAEG;AACH,MAAM,WAAW,6BAChB,SAAQ,IAAI,CAAC,qBAAqB,CAAC,0BAA0B,CAAC,EAAE,YAAY,CAAC;IAC7E,UAAU,EAAE,oBAAoB,EAAE,CAAC;CACnC;AAED;;GAEG;AACH,MAAM,WAAW,kBAAkB;IAClC;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;IAClB;;OAEG;IACH,UAAU,CAAC,EAAE,6BAA6B,EAAE,CAAC;CAC7C;AAED;;;;GAIG;AACH,MAAM,MAAM,yBAAyB,GAAG,kBAAkB,CAAC,eAAe,CAAC,WAAW,EAAE,kBAAkB,CAAC,GAC1G,QAAQ,CAAC,IAAI,CAAC,kBAAkB,CAAC,eAAe,CAAC,WAAW,EAAE,kBAAkB,CAAC,EAAE,MAAM,CAAC,CAAC,CAAC;AAE7F;;;;GAIG;AACH,MAAM,MAAM,2BAA2B,GAAG,uBAAuB,CAAC,yBAAyB,CAAC,CAAC;AAE7F;;;;GAIG;AACH,MAAM,MAAM,8BAA8B,GAAG,0BAA0B,CAAC,yBAAyB,CAAC,CAAC"} node_modules/discord-api-types/payloads/v8/_interactions/messageComponents.js.map 0000664 00000000167 15114741631 0024410 0 ustar 00 {"version":3,"file":"messageComponents.js","sourceRoot":"","sources":["messageComponents.ts"],"names":[],"mappings":""} node_modules/discord-api-types/payloads/v8/_interactions/ping.d.ts.map 0000664 00000000452 15114741631 0022104 0 ustar 00 {"version":3,"file":"ping.d.ts","sourceRoot":"","sources":["ping.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,QAAQ,CAAC;AACjD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAEnD;;GAEG;AACH,MAAM,MAAM,kBAAkB,GAAG,IAAI,CAAC,kBAAkB,CAAC,eAAe,CAAC,IAAI,EAAE,KAAK,CAAC,EAAE,QAAQ,CAAC,CAAC"} node_modules/discord-api-types/payloads/v8/_interactions/autocomplete.js.map 0000664 00000000155 15114741631 0023414 0 ustar 00 {"version":3,"file":"autocomplete.js","sourceRoot":"","sources":["autocomplete.ts"],"names":[],"mappings":""} node_modules/discord-api-types/payloads/v8/_interactions/base.js 0000664 00000000155 15114741631 0021051 0 ustar 00 "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); //# sourceMappingURL=base.js.map node_modules/discord-api-types/payloads/v8/_interactions/messageComponents.d.ts.map 0000664 00000001755 15114741631 0024650 0 ustar 00 {"version":3,"file":"messageComponents.d.ts","sourceRoot":"","sources":["messageComponents.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAChD,OAAO,KAAK,EAAE,kBAAkB,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAC3E,OAAO,KAAK,EAAE,uBAAuB,EAAE,0BAA0B,EAAE,MAAM,QAAQ,CAAC;AAElF;;GAEG;AACH,MAAM,MAAM,8BAA8B,GAAG,kBAAkB,CAC9D,eAAe,CAAC,gBAAgB,EAChC,kCAAkC,CAClC,GACA,QAAQ,CACP,IAAI,CACH,kBAAkB,CAAC,eAAe,CAAC,gBAAgB,EAAE,kCAAkC,CAAC,EACxF,YAAY,GAAG,MAAM,GAAG,SAAS,CACjC,CACD,CAAC;AAEH;;GAEG;AACH,MAAM,MAAM,kCAAkC,GAAG,+BAA+B,GAAG,mCAAmC,CAAC;AAEvH;;GAEG;AACH,MAAM,WAAW,sCAAsC,CAAC,KAAK,SAAS,aAAa;IAClF;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;IAClB;;OAEG;IACH,cAAc,EAAE,KAAK,CAAC;CACtB;AAED;;GAEG;AACH,MAAM,MAAM,+BAA+B,GAAG,sCAAsC,CAAC,aAAa,CAAC,MAAM,CAAC,CAAC;AAE3G;;GAEG;AACH,MAAM,WAAW,mCAChB,SAAQ,sCAAsC,CAAC,aAAa,CAAC,UAAU,CAAC;IACxE,MAAM,EAAE,MAAM,EAAE,CAAC;CACjB;AAED;;GAEG;AACH,MAAM,MAAM,gCAAgC,GAAG,uBAAuB,CAAC,8BAA8B,CAAC,CAAC;AAEvG;;GAEG;AACH,MAAM,MAAM,mCAAmC,GAAG,0BAA0B,CAAC,8BAA8B,CAAC,CAAC"} node_modules/discord-api-types/payloads/v8/_interactions/modalSubmit.d.ts 0000664 00000004314 15114741631 0022654 0 ustar 00 import type { APIActionRowComponent, APIModalActionRowComponent } from '../channel'; import type { APIBaseInteraction, APIDMInteractionWrapper, APIGuildInteractionWrapper, ComponentType, InteractionType } from '../index'; /** * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export interface ModalSubmitComponent { type: ComponentType; custom_id: string; value: string; } /** * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export interface ModalSubmitActionRowComponent extends Omit<APIActionRowComponent<APIModalActionRowComponent>, 'components'> { components: ModalSubmitComponent[]; } /** * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export interface APIModalSubmission { /** * A developer-defined identifier for the component, max 100 characters */ custom_id: string; /** * A list of child components */ components?: ModalSubmitActionRowComponent[]; } /** * https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type APIModalSubmitInteraction = APIBaseInteraction<InteractionType.ModalSubmit, APIModalSubmission> & Required<Pick<APIBaseInteraction<InteractionType.ModalSubmit, APIModalSubmission>, 'data'>>; /** * https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type APIModalSubmitDMInteraction = APIDMInteractionWrapper<APIModalSubmitInteraction>; /** * https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type APIModalSubmitGuildInteraction = APIGuildInteractionWrapper<APIModalSubmitInteraction>; //# sourceMappingURL=modalSubmit.d.ts.map node_modules/discord-api-types/payloads/v8/_interactions/base.d.ts.map 0000664 00000003434 15114741631 0022064 0 ustar 00 {"version":3,"file":"base.d.ts","sourceRoot":"","sources":["base.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC/D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAChD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAC7C,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAC/C,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AACvC,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAEnD;;GAEG;AACH,MAAM,MAAM,uCAAuC,GAAG,IAAI,CACzD,cAAc,EACZ,QAAQ,GACR,8BAA8B,GAC9B,MAAM,GACN,WAAW,GACX,MAAM,GACN,MAAM,GACN,SAAS,GACT,eAAe,GACf,OAAO,CACT,CAAC;AAEF;;;;GAIG;AACH,MAAM,WAAW,qBAAqB;IACrC;;OAEG;IACH,EAAE,EAAE,SAAS,CAAC;IACd;;OAEG;IACH,IAAI,EAAE,eAAe,CAAC;IACtB;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;OAEG;IACH,IAAI,EAAE,OAAO,CAAC;IACd;;OAEG;IACH,MAAM,CAAC,EAAE,uCAAuC,CAAC;CACjD;AAED;;;;GAIG;AACH,MAAM,WAAW,yBAA0B,SAAQ,cA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631 0022733 0 ustar 00 {"version":3,"file":"responses.js","sourceRoot":"","sources":["responses.ts"],"names":[],"mappings":";;;AAKA;;;;GAIG;AACH,IAAY,eAMX;AAND,WAAY,eAAe;IAC1B,qDAAQ,CAAA;IACR,iFAAkB,CAAA;IAClB,6EAAgB,CAAA;IAChB,yGAA8B,CAAA;IAC9B,mEAAW,CAAA;AACZ,CAAC,EANW,eAAe,+BAAf,eAAe,QAM1B;AAsED;;;;GAIG;AACH,IAAY,uBA6BX;AA7BD,WAAY,uBAAuB;IAClC;;OAEG;IACH,qEAAQ,CAAA;IACR;;OAEG;IACH,6GAA4B,CAAA;IAC5B;;OAEG;IACH,6HAAgC,CAAA;IAChC;;OAEG;IACH,uGAAqB,CAAA;IACrB;;OAEG;IACH,uFAAa,CAAA;IACb;;OAEG;IACH,qIAAoC,CAAA;IACpC;;OAEG;IACH,uEAAK,CAAA;AACN,CAAC,EA7BW,uBAAuB,uCAAvB,uBAAuB,QA6BlC"} node_modules/discord-api-types/payloads/v8/_interactions/messageComponents.js 0000664 00000000172 15114741631 0023630 0 ustar 00 "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); //# sourceMappingURL=messageComponents.js.map node_modules/discord-api-types/payloads/v8/voice.js.map 0000664 00000000152 15114741631 0017154 0 ustar 00 {"version":3,"file":"voice.js","sourceRoot":"","sources":["voice.ts"],"names":[],"mappings":";AAAA;;GAEG"} node_modules/discord-api-types/payloads/v8/user.js 0000664 00000007677 15114741631 0016274 0 ustar 00 "use strict"; /** * Types extracted from https://discord.com/developers/docs/resources/user */ Object.defineProperty(exports, "__esModule", { value: true }); exports.ConnectionVisibility = exports.UserPremiumType = exports.UserFlags = void 0; /** * https://discord.com/developers/docs/resources/user#user-object-user-flags * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ var UserFlags; (function (UserFlags) { /** * Discord Employee */ UserFlags[UserFlags["Staff"] = 1] = "Staff"; /** * Partnered Server Owner */ UserFlags[UserFlags["Partner"] = 2] = "Partner"; /** * HypeSquad Events Coordinator */ UserFlags[UserFlags["Hypesquad"] = 4] = "Hypesquad"; /** * Bug Hunter Level 1 */ UserFlags[UserFlags["BugHunterLevel1"] = 8] = "BugHunterLevel1"; /** * House Bravery Member */ UserFlags[UserFlags["HypeSquadOnlineHouse1"] = 64] = "HypeSquadOnlineHouse1"; /** * House Brilliance Member */ UserFlags[UserFlags["HypeSquadOnlineHouse2"] = 128] = "HypeSquadOnlineHouse2"; /** * House Balance MemberW */ UserFlags[UserFlags["HypeSquadOnlineHouse3"] = 256] = "HypeSquadOnlineHouse3"; /** * Early Nitro Supporter */ UserFlags[UserFlags["PremiumEarlySupporter"] = 512] = "PremiumEarlySupporter"; /** * User is a [team](https://discord.com/developers/docs/topics/teams) */ UserFlags[UserFlags["TeamPseudoUser"] = 1024] = "TeamPseudoUser"; /** * Bug Hunter Level 2 */ UserFlags[UserFlags["BugHunterLevel2"] = 16384] = "BugHunterLevel2"; /** * Verified Bot */ UserFlags[UserFlags["VerifiedBot"] = 65536] = "VerifiedBot"; /** * Early Verified Bot Developer */ UserFlags[UserFlags["VerifiedDeveloper"] = 131072] = "VerifiedDeveloper"; /** * Discord Certified Moderator */ UserFlags[UserFlags["CertifiedModerator"] = 262144] = "CertifiedModerator"; /** * Bot uses only [HTTP interactions](https://discord.com/developers/docs/interactions/receiving-and-responding#receiving-an-interaction) and is shown in the online member list */ UserFlags[UserFlags["BotHTTPInteractions"] = 524288] = "BotHTTPInteractions"; /** * User has been identified as spammer * * @unstable This user flag is currently not documented by Discord but has a known value which we will try to keep up to date. */ UserFlags[UserFlags["Spammer"] = 1048576] = "Spammer"; /** * User's account has been quarantined based on recent activity * * @unstable This user flag is currently not documented by Discord but has a known value which we will try to keep up to date. */ UserFlags[UserFlags["Quarantined"] = 17592186044416] = "Quarantined"; })(UserFlags || (exports.UserFlags = UserFlags = {})); /** * https://discord.com/developers/docs/resources/user#user-object-premium-types * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ var UserPremiumType; (function (UserPremiumType) { UserPremiumType[UserPremiumType["None"] = 0] = "None"; UserPremiumType[UserPremiumType["NitroClassic"] = 1] = "NitroClassic"; UserPremiumType[UserPremiumType["Nitro"] = 2] = "Nitro"; })(UserPremiumType || (exports.UserPremiumType = UserPremiumType = {})); /** * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ var ConnectionVisibility; (function (ConnectionVisibility) { /** * Invisible to everyone except the user themselves */ ConnectionVisibility[ConnectionVisibility["None"] = 0] = "None"; /** * Visible to everyone */ ConnectionVisibility[ConnectionVisibility["Everyone"] = 1] = "Everyone"; })(ConnectionVisibility || (exports.ConnectionVisibility = ConnectionVisibility = {})); //# sourceMappingURL=user.js.map node_modules/discord-api-types/payloads/v8/guild.js 0000664 00000025711 15114741631 0016407 0 ustar 00 "use strict"; /** * Types extracted from https://discord.com/developers/docs/resources/guild */ Object.defineProperty(exports, "__esModule", { value: true }); exports.MembershipScreeningFieldType = exports.GuildWidgetStyle = exports.IntegrationExpireBehavior = exports.GuildFeature = exports.GuildSystemChannelFlags = exports.GuildPremiumTier = exports.GuildVerificationLevel = exports.GuildNSFWLevel = exports.GuildMFALevel = exports.GuildExplicitContentFilter = exports.GuildDefaultMessageNotifications = void 0; /** * https://discord.com/developers/docs/resources/guild#guild-object-default-message-notification-level * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ var GuildDefaultMessageNotifications; (function (GuildDefaultMessageNotifications) { GuildDefaultMessageNotifications[GuildDefaultMessageNotifications["AllMessages"] = 0] = "AllMessages"; GuildDefaultMessageNotifications[GuildDefaultMessageNotifications["OnlyMentions"] = 1] = "OnlyMentions"; })(GuildDefaultMessageNotifications || (exports.GuildDefaultMessageNotifications = GuildDefaultMessageNotifications = {})); /** * https://discord.com/developers/docs/resources/guild#guild-object-explicit-content-filter-level * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ var GuildExplicitContentFilter; (function (GuildExplicitContentFilter) { GuildExplicitContentFilter[GuildExplicitContentFilter["Disabled"] = 0] = "Disabled"; GuildExplicitContentFilter[GuildExplicitContentFilter["MembersWithoutRoles"] = 1] = "MembersWithoutRoles"; GuildExplicitContentFilter[GuildExplicitContentFilter["AllMembers"] = 2] = "AllMembers"; })(GuildExplicitContentFilter || (exports.GuildExplicitContentFilter = GuildExplicitContentFilter = {})); /** * https://discord.com/developers/docs/resources/guild#guild-object-mfa-level * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ var GuildMFALevel; (function (GuildMFALevel) { GuildMFALevel[GuildMFALevel["None"] = 0] = "None"; GuildMFALevel[GuildMFALevel["Elevated"] = 1] = "Elevated"; })(GuildMFALevel || (exports.GuildMFALevel = GuildMFALevel = {})); /** * https://discord.com/developers/docs/resources/guild#guild-object-guild-nsfw-level * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ var GuildNSFWLevel; (function (GuildNSFWLevel) { GuildNSFWLevel[GuildNSFWLevel["Default"] = 0] = "Default"; GuildNSFWLevel[GuildNSFWLevel["Explicit"] = 1] = "Explicit"; GuildNSFWLevel[GuildNSFWLevel["Safe"] = 2] = "Safe"; GuildNSFWLevel[GuildNSFWLevel["AgeRestricted"] = 3] = "AgeRestricted"; })(GuildNSFWLevel || (exports.GuildNSFWLevel = GuildNSFWLevel = {})); /** * https://discord.com/developers/docs/resources/guild#guild-object-verification-level * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ var GuildVerificationLevel; (function (GuildVerificationLevel) { /** * Unrestricted */ GuildVerificationLevel[GuildVerificationLevel["None"] = 0] = "None"; /** * Must have verified email on account */ GuildVerificationLevel[GuildVerificationLevel["Low"] = 1] = "Low"; /** * Must be registered on Discord for longer than 5 minutes */ GuildVerificationLevel[GuildVerificationLevel["Medium"] = 2] = "Medium"; /** * Must be a member of the guild for longer than 10 minutes */ GuildVerificationLevel[GuildVerificationLevel["High"] = 3] = "High"; /** * Must have a verified phone number */ GuildVerificationLevel[GuildVerificationLevel["VeryHigh"] = 4] = "VeryHigh"; })(GuildVerificationLevel || (exports.GuildVerificationLevel = GuildVerificationLevel = {})); /** * https://discord.com/developers/docs/resources/guild#guild-object-premium-tier * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ var GuildPremiumTier; (function (GuildPremiumTier) { GuildPremiumTier[GuildPremiumTier["None"] = 0] = "None"; GuildPremiumTier[GuildPremiumTier["Tier1"] = 1] = "Tier1"; GuildPremiumTier[GuildPremiumTier["Tier2"] = 2] = "Tier2"; GuildPremiumTier[GuildPremiumTier["Tier3"] = 3] = "Tier3"; })(GuildPremiumTier || (exports.GuildPremiumTier = GuildPremiumTier = {})); /** * https://discord.com/developers/docs/resources/guild#guild-object-system-channel-flags * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ var GuildSystemChannelFlags; (function (GuildSystemChannelFlags) { /** * Suppress member join notifications */ GuildSystemChannelFlags[GuildSystemChannelFlags["SuppressJoinNotifications"] = 1] = "SuppressJoinNotifications"; /** * Suppress server boost notifications */ GuildSystemChannelFlags[GuildSystemChannelFlags["SuppressPremiumSubscriptions"] = 2] = "SuppressPremiumSubscriptions"; /** * Suppress server setup tips */ GuildSystemChannelFlags[GuildSystemChannelFlags["SuppressGuildReminderNotifications"] = 4] = "SuppressGuildReminderNotifications"; /** * Hide member join sticker reply buttons */ GuildSystemChannelFlags[GuildSystemChannelFlags["SuppressJoinNotificationReplies"] = 8] = "SuppressJoinNotificationReplies"; })(GuildSystemChannelFlags || (exports.GuildSystemChannelFlags = GuildSystemChannelFlags = {})); /** * https://discord.com/developers/docs/resources/guild#guild-object-guild-features * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ var GuildFeature; (function (GuildFeature) { /** * Guild has access to set an animated guild banner image */ GuildFeature["AnimatedBanner"] = "ANIMATED_BANNER"; /** * Guild has access to set an animated guild icon */ GuildFeature["AnimatedIcon"] = "ANIMATED_ICON"; /** * Guild has access to set a guild banner image */ GuildFeature["Banner"] = "BANNER"; /** * Guild has access to use commerce features (i.e. create store channels) */ GuildFeature["Commerce"] = "COMMERCE"; /** * Guild can enable welcome screen, Membership Screening and discovery, and receives community updates */ GuildFeature["Community"] = "COMMUNITY"; /** * Guild is able to be discovered in the directory */ GuildFeature["Discoverable"] = "DISCOVERABLE"; /** * Guild is able to be featured in the directory */ GuildFeature["Featurable"] = "FEATURABLE"; /** * Guild has access to set an invite splash background */ GuildFeature["InviteSplash"] = "INVITE_SPLASH"; /** * Guild has enabled Membership Screening */ GuildFeature["MemberVerificationGateEnabled"] = "MEMBER_VERIFICATION_GATE_ENABLED"; /** * Guild has enabled monetization */ GuildFeature["MonetizationEnabled"] = "MONETIZATION_ENABLED"; /** * Guild has increased custom sticker slots */ GuildFeature["MoreStickers"] = "MORE_STICKERS"; /** * Guild has access to create news channels */ GuildFeature["News"] = "NEWS"; /** * Guild is partnered */ GuildFeature["Partnered"] = "PARTNERED"; /** * Guild can be previewed before joining via Membership Screening or the directory */ GuildFeature["PreviewEnabled"] = "PREVIEW_ENABLED"; /** * Guild has access to create private threads */ GuildFeature["PrivateThreads"] = "PRIVATE_THREADS"; GuildFeature["RelayEnabled"] = "RELAY_ENABLED"; /** * Guild is able to set role icons */ GuildFeature["RoleIcons"] = "ROLE_ICONS"; /** * Guild has access to the seven day archive time for threads */ GuildFeature["SevenDayThreadArchive"] = "SEVEN_DAY_THREAD_ARCHIVE"; /** * Guild has access to the three day archive time for threads */ GuildFeature["ThreeDayThreadArchive"] = "THREE_DAY_THREAD_ARCHIVE"; /** * Guild has enabled ticketed events */ GuildFeature["TicketedEventsEnabled"] = "TICKETED_EVENTS_ENABLED"; /** * Guild has access to set a vanity URL */ GuildFeature["VanityURL"] = "VANITY_URL"; /** * Guild is verified */ GuildFeature["Verified"] = "VERIFIED"; /** * Guild has access to set 384kbps bitrate in voice (previously VIP voice servers) */ GuildFeature["VIPRegions"] = "VIP_REGIONS"; /** * Guild has enabled the welcome screen */ GuildFeature["WelcomeScreenEnabled"] = "WELCOME_SCREEN_ENABLED"; })(GuildFeature || (exports.GuildFeature = GuildFeature = {})); /** * https://discord.com/developers/docs/resources/guild#integration-object-integration-expire-behaviors * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ var IntegrationExpireBehavior; (function (IntegrationExpireBehavior) { IntegrationExpireBehavior[IntegrationExpireBehavior["RemoveRole"] = 0] = "RemoveRole"; IntegrationExpireBehavior[IntegrationExpireBehavior["Kick"] = 1] = "Kick"; })(IntegrationExpireBehavior || (exports.IntegrationExpireBehavior = IntegrationExpireBehavior = {})); /** * https://discord.com/developers/docs/resources/guild#get-guild-widget-image-widget-style-options * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ var GuildWidgetStyle; (function (GuildWidgetStyle) { /** * Shield style widget with Discord icon and guild members online count */ GuildWidgetStyle["Shield"] = "shield"; /** * Large image with guild icon, name and online count. "POWERED BY DISCORD" as the footer of the widget */ GuildWidgetStyle["Banner1"] = "banner1"; /** * Smaller widget style with guild icon, name and online count. Split on the right with Discord logo */ GuildWidgetStyle["Banner2"] = "banner2"; /** * Large image with guild icon, name and online count. In the footer, Discord logo on the left and "Chat Now" on the right */ GuildWidgetStyle["Banner3"] = "banner3"; /** * Large Discord logo at the top of the widget. Guild icon, name and online count in the middle portion of the widget * and a "JOIN MY SERVER" button at the bottom */ GuildWidgetStyle["Banner4"] = "banner4"; })(GuildWidgetStyle || (exports.GuildWidgetStyle = GuildWidgetStyle = {})); /** * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ var MembershipScreeningFieldType; (function (MembershipScreeningFieldType) { /** * Server Rules */ MembershipScreeningFieldType["Terms"] = "TERMS"; })(MembershipScreeningFieldType || (exports.MembershipScreeningFieldType = MembershipScreeningFieldType = {})); //# sourceMappingURL=guild.js.map node_modules/discord-api-types/payloads/v8/oauth2.js 0000664 00000012172 15114741631 0016502 0 ustar 00 "use strict"; /** * Types extracted from https://discord.com/developers/docs/topics/oauth2 */ Object.defineProperty(exports, "__esModule", { value: true }); exports.OAuth2Scopes = void 0; /** * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ var OAuth2Scopes; (function (OAuth2Scopes) { /** * For oauth2 bots, this puts the bot in the user's selected guild by default */ OAuth2Scopes["Bot"] = "bot"; /** * Allows [/users/@me/connections](https://discord.com/developers/docs/resources/user#get-user-connections) * to return linked third-party accounts * * See https://discord.com/developers/docs/resources/user#get-user-connections */ OAuth2Scopes["Connections"] = "connections"; /** * Enables [/users/@me](https://discord.com/developers/docs/resources/user#get-current-user) to return an `email` * * See https://discord.com/developers/docs/resources/user#get-current-user */ OAuth2Scopes["Email"] = "email"; /** * Allows [/users/@me](https://discord.com/developers/docs/resources/user#get-current-user) without `email` * * See https://discord.com/developers/docs/resources/user#get-current-user */ OAuth2Scopes["Identify"] = "identify"; /** * Allows [/users/@me/guilds](https://discord.com/developers/docs/resources/user#get-current-user-guilds) * to return basic information about all of a user's guilds * * See https://discord.com/developers/docs/resources/user#get-current-user-guilds */ OAuth2Scopes["Guilds"] = "guilds"; /** * Allows [/guilds/{guild.id}/members/{user.id}](https://discord.com/developers/docs/resources/guild#add-guild-member) * to be used for joining users to a guild * * See https://discord.com/developers/docs/resources/guild#add-guild-member */ OAuth2Scopes["GuildsJoin"] = "guilds.join"; /** * Allows /users/@me/guilds/{guild.id}/member to return a user's member information in a guild * * See https://discord.com/developers/docs/resources/guild#get-current-user-guild-member */ OAuth2Scopes["GuildsMembersRead"] = "guilds.members.read"; /** * Allows your app to join users to a group dm * * See https://discord.com/developers/docs/resources/channel#group-dm-add-recipient */ OAuth2Scopes["GroupDMJoins"] = "gdm.join"; /** * For local rpc server api access, this allows you to read messages from all client channels * (otherwise restricted to channels/guilds your app creates) */ OAuth2Scopes["MessagesRead"] = "messages.read"; /** * For local rpc server access, this allows you to control a user's local Discord client - requires Discord approval */ OAuth2Scopes["RPC"] = "rpc"; /** * For local rpc server api access, this allows you to receive notifications pushed out to the user - requires Discord approval */ OAuth2Scopes["RPCNotificationsRead"] = "rpc.notifications.read"; /** * This generates a webhook that is returned in the oauth token response for authorization code grants */ OAuth2Scopes["WebhookIncoming"] = "webhook.incoming"; /** * Allows your app to upload/update builds for a user's applications - requires Discord approval */ OAuth2Scopes["ApplicationsBuildsUpload"] = "applications.builds.upload"; /** * Allows your app to read build data for a user's applications */ OAuth2Scopes["ApplicationsBuildsRead"] = "applications.builds.read"; /** * Allows your app to read and update store data (SKUs, store listings, achievements, etc.) for a user's applications */ OAuth2Scopes["ApplicationsStoreUpdate"] = "applications.store.update"; /** * Allows your app to read entitlements for a user's applications */ OAuth2Scopes["ApplicationsEntitlements"] = "applications.entitlements"; /** * Allows your app to know a user's friends and implicit relationships - requires Discord approval */ OAuth2Scopes["RelationshipsRead"] = "relationships.read"; /** * Allows your app to fetch data from a user's "Now Playing/Recently Played" list - requires Discord approval */ OAuth2Scopes["ActivitiesRead"] = "activities.read"; /** * Allows your app to update a user's activity - requires Discord approval (NOT REQUIRED FOR GAMESDK ACTIVITY MANAGER) * * See https://discord.com/developers/docs/game-sdk/activities */ OAuth2Scopes["ActivitiesWrite"] = "activities.write"; /** * Allows your app to use Application Commands in a guild * * See https://discord.com/developers/docs/interactions/application-commands */ OAuth2Scopes["ApplicationsCommands"] = "applications.commands"; /** * Allows your app to update its Application Commands via this bearer token - client credentials grant only * * See https://discord.com/developers/docs/interactions/application-commands */ OAuth2Scopes["ApplicationsCommandsUpdate"] = "applications.commands.update"; })(OAuth2Scopes || (exports.OAuth2Scopes = OAuth2Scopes = {})); //# sourceMappingURL=oauth2.js.map node_modules/discord-api-types/payloads/v8/invite.d.ts.map 0000664 00000002710 15114741631 0017603 0 ustar 00 {"version":3,"file":"invite.d.ts","sourceRoot":"","sources":["invite.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AACpD,OAAO,KAAK,EAAE,i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mB,IAAA;CACnB;AAED;;;;GAIG;AACH,MAAM,WAAW,iBAAkB,SAAQ,SAAS;IACnD;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC;IACjB;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC;IAChB;;OAEG;IACH,SAAS,EAAE,OAAO,CAAC;IACnB;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC;CACnB"} node_modules/discord-api-types/payloads/v8/interactions.d.ts.map 0000664 00000001626 15114741631 0021014 0 ustar 00 {"version":3,"file":"interactions.d.ts","sourceRoot":"","sources":["interactions.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACX,kCAAkC,EAClC,qCAAqC,EACrC,gCAAgC,EAChC,MAAM,qCAAqC,CAAC;AAC7C,OAAO,KAAK,EACX,8CAA8C,EAC9C,iDAAiD,EACjD,4CAA4C,EAC5C,MAAM,8BAA8B,CAAC;AACtC,OAAO,KAAK,EACX,gCAAgC,EAChC,mCAAmC,EACnC,8BAA8B,EAC9B,MAAM,mCAAmC,CAAC;AAC3C,OAAO,KAAK,EACX,2BAA2B,EAC3B,8BAA8B,EAC9B,yBAAyB,EACzB,MAAM,6BAA6B,CAAC;AACrC,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAE/D,cAAc,qCAAqC,CAAC;AACpD,cAAc,8BAA8B,CAAC;AAC7C,cAAc,sBAAsB,CAAC;AACrC,cAAc,mCAAmC,CAAC;AAClD,cAAc,6BAA6B,CAAC;AAC5C,cAAc,sBAAsB,CAAC;AACrC,cAAc,2BAA2B,CAAC;AAE1C;;;;GAIG;AACH,MAAM,MAAM,cAAc,GACvB,4CAA4C,GAC5C,gCAAgC,GAChC,8BAA8B,GAC9B,yBAAyB,GACzB,kBAAkB,CAAC;AAEtB;;;;GAIG;AACH,MAAM,MAAM,gBAAgB,GACzB,8CAA8C,GAC9C,kCAAkC,GAClC,gCAAgC,GAChC,2BAA2B,CAAC;AAE/B;;;;GAIG;AACH,MAAM,MAAM,mBAAmB,GAC5B,iDAAiD,GACjD,qCAAqC,GACrC,mCAAmC,GACnC,8BAA8B,CAAC"} node_modules/discord-api-types/payloads/v8/auditLog.d.ts 0000664 00000065353 15114741631 0017315 0 ustar 00 /** * Types extracted from https://discord.com/developers/docs/resources/audit-log */ import type { Snowflake } from '../../globals'; import type { APIOverwrite } from './channel'; import type { APIGuildIntegration, GuildDefaultMessageNotifications, GuildExplicitContentFilter, GuildMFALevel, GuildVerificationLevel, IntegrationExpireBehavior } from './guild'; import type { APIGuildScheduledEvent, GuildScheduledEventEntityType, GuildScheduledEventStatus } from './guildScheduledEvent'; import type { APIRole } from './permissions'; import type { StageInstancePrivacyLevel } from './stageInstance'; import type { StickerFormatType } from './sticker'; import type { APIUser } from './user'; import type { APIWebhook } from './webhook'; /** * https://discord.com/developers/docs/resources/audit-log#audit-log-object-audit-log-structure * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export interface APIAuditLog { /** * Webhooks found in the audit log * * See https://discord.com/developers/docs/resources/webhook#webhook-object */ webhooks: APIWebhook[]; /** * Users found in the audit log * * See https://discord.com/developers/docs/resources/user#user-object */ users: APIUser[]; /** * Audit log entries * * See https://discord.com/developers/docs/resources/audit-log#audit-log-entry-object */ audit_log_entries: APIAuditLogEntry[]; /** * Partial integration objects * * See https://discord.com/developers/docs/resources/guild#integration-object */ integrations: APIGuildIntegration[]; /** * The guild scheduled events in the audit log * * See https://discord.com/developers/docs/resources/guild-scheduled-event#guild-scheduled-event-object */ guild_scheduled_events: APIGuildScheduledEvent[]; } /** * https://discord.com/developers/docs/resources/audit-log#audit-log-entry-object-audit-log-entry-structure * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export interface APIAuditLogEntry { /** * ID of the affected entity (webhook, user, role, etc.) */ target_id: string | null; /** * Changes made to the `target_id` * * See https://discord.com/developers/docs/resources/audit-log#audit-log-change-object */ changes?: APIAuditLogChange[]; /** * The user who made the changes * * This can be `null` in some cases (webhooks deleting themselves by using their own token, for example) */ user_id: Snowflake | null; /** * ID of the entry */ id: Snowflake; /** * Type of action that occurred * * See https://discord.com/developers/docs/resources/audit-log#audit-log-entry-object-audit-log-events */ action_type: AuditLogEvent; /** * Additional info for certain action types * * See https://discord.com/developers/docs/resources/audit-log#audit-log-entry-object-optional-audit-entry-info */ options?: APIAuditLogOptions; /** * The reason for the change (0-512 characters) */ reason?: string; } /** * https://discord.com/developers/docs/resources/audit-log#audit-log-entry-object-audit-log-events * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export declare enum AuditLogEvent { GuildUpdate = 1, ChannelCreate = 10, ChannelUpdate = 11, ChannelDelete = 12, ChannelOverwriteCreate = 13, ChannelOverwriteUpdate = 14, ChannelOverwriteDelete = 15, MemberKick = 20, MemberPrune = 21, MemberBanAdd = 22, MemberBanRemove = 23, MemberUpdate = 24, MemberRoleUpdate = 25, MemberMove = 26, MemberDisconnect = 27, BotAdd = 28, RoleCreate = 30, RoleUpdate = 31, RoleDelete = 32, InviteCreate = 40, InviteUpdate = 41, InviteDelete = 42, WebhookCreate = 50, WebhookUpdate = 51, WebhookDelete = 52, EmojiCreate = 60, EmojiUpdate = 61, EmojiDelete = 62, MessageDelete = 72, MessageBulkDelete = 73, MessagePin = 74, MessageUnpin = 75, IntegrationCreate = 80, IntegrationUpdate = 81, IntegrationDelete = 82, StageInstanceCreate = 83, StageInstanceUpdate = 84, StageInstanceDelete = 85, StickerCreate = 90, StickerUpdate = 91, StickerDelete = 92, GuildScheduledEventCreate = 100, GuildScheduledEventUpdate = 101, GuildScheduledEventDelete = 102 } /** * https://discord.com/developers/docs/resources/audit-log#audit-log-entry-object-optional-audit-entry-info * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export interface APIAuditLogOptions { /** * Number of days after which inactive members were kicked * * Present from: * - MEMBER_PRUNE */ delete_member_days?: string; /** * Number of members removed by the prune * * Present from: * - MEMBER_PRUNE */ members_removed?: string; /** * Channel in which the entities were targeted * * Present from: * - MEMBER_MOVE * - MESSAGE_PIN * - MESSAGE_UNPIN * - MESSAGE_DELETE * - STAGE_INSTANCE_CREATE * - STAGE_INSTANCE_UPDATE * - STAGE_INSTANCE_DELETE */ channel_id?: Snowflake; /** * ID of the message that was targeted * * Present from: * - MESSAGE_PIN * - MESSAGE_UNPIN */ message_id?: Snowflake; /** * Number of entities that were targeted * * Present from: * - MESSAGE_DELETE * - MESSAGE_BULK_DELETE * - MEMBER_DISCONNECT * - MEMBER_MOVE */ count?: string; /** * ID of the overwritten entity * * Present from: * - CHANNEL_OVERWRITE_CREATE * - CHANNEL_OVERWRITE_UPDATE * - CHANNEL_OVERWRITE_DELETE */ id?: Snowflake; /** * Type of overwritten entity - "0" for "role" or "1" for "member" * * Present from: * - CHANNEL_OVERWRITE_CREATE * - CHANNEL_OVERWRITE_UPDATE * - CHANNEL_OVERWRITE_DELETE * * {@link AuditLogOptionsType} */ type?: AuditLogOptionsType; /** * Name of the role * * Present from: * - CHANNEL_OVERWRITE_CREATE * - CHANNEL_OVERWRITE_UPDATE * - CHANNEL_OVERWRITE_DELETE * * **Present only if the {@link APIAuditLogOptions#type entry type} is "0"** */ role_name?: string; } /** * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export declare enum AuditLogOptionsType { Role = "0", Member = "1" } /** * https://discord.com/developers/docs/resources/audit-log#audit-log-change-object-audit-log-change-structure * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type APIAuditLogChange = APIAuditLogChangeKey$Add | APIAuditLogChangeKey$Remove | APIAuditLogChangeKeyAFKChannelId | APIAuditLogChangeKeyAFKTimeout | APIAuditLogChangeKeyAllow | APIAuditLogChangeKeyApplicationId | APIAuditLogChangeKeyAsset | APIAuditLogChangeKeyAvailable | APIAuditLogChangeKeyAvatarHash | APIAuditLogChangeKeyBannerHash | APIAuditLogChangeKeyBitrate | APIAuditLogChangeKeyChannelId | APIAuditLogChangeKeyCode | APIAuditLogChangeKeyColor | APIAuditLogChangeKeyCommunicationDisabledUntil | APIAuditLogChangeKeyDeaf | APIAuditLogChangeKeyDefaultMessageNotifications | APIAuditLogChangeKeyDeny | APIAuditLogChangeKeyDescription | APIAuditLogChangeKeyDiscoverySplashHash | APIAuditLogChangeKeyEnableEmoticons | APIAuditLogChangeKeyEntityType | APIAuditLogChangeKeyExpireBehavior | APIAuditLogChangeKeyExpireGracePeriod | APIAuditLogChangeKeyExplicitContentFilter | APIAuditLogChangeKeyFormatType | APIAuditLogChangeKeyGuildId | APIAuditLogChangeKeyHoist | APIAuditLogChangeKeyIconHash | APIAuditLogChangeKeyId | APIAuditLogChangeKeyInviterId | APIAuditLogChangeKeyLocation | APIAuditLogChangeKeyMaxAge | APIAuditLogChangeKeyMaxUses | APIAuditLogChangeKeyMentionable | APIAuditLogChangeKeyMFALevel | APIAuditLogChangeKeyMute | APIAuditLogChangeKeyName | APIAuditLogChangeKeyNick | APIAuditLogChangeKeyNSFW | APIAuditLogChangeKeyOwnerId | APIAuditLogChangeKeyPermissionOverwrites | APIAuditLogChangeKeyPermissions | APIAuditLogChangeKeyPosition | APIAuditLogChangeKeyPreferredLocale | APIAuditLogChangeKeyPrivacyLevel | APIAuditLogChangeKeyPruneDeleteDays | APIAuditLogChangeKeyPublicUpdatesChannelId | APIAuditLogChangeKeyRateLimitPerUser | APIAuditLogChangeKeyRegion | APIAuditLogChangeKeyRulesChannelId | APIAuditLogChangeKeySplashHash | APIAuditLogChangeKeyStatus | APIAuditLogChangeKeySystemChannelId | APIAuditLogChangeKeyTags | APIAuditLogChangeKeyTemporary | APIAuditLogChangeKeyTopic | APIAuditLogChangeKeyType | APIAuditLogChangeKeyUserLimit | APIAuditLogChangeKeyUses | APIAuditLogChangeKeyVanityURLCode | APIAuditLogChangeKeyVerificationLevel | APIAuditLogChangeKeyWidgetChannelId | APIAuditLogChangeKeyWidgetEnabled; /** * Returned when an entity's name is changed * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type APIAuditLogChangeKeyName = AuditLogChangeData<'name', string>; /** * Returned when a guild's or sticker's or guild scheduled event's description is changed * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type APIAuditLogChangeKeyDescription = AuditLogChangeData<'description', string>; /** * Returned when a guild's icon is changed * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type APIAuditLogChangeKeyIconHash = AuditLogChangeData<'icon_hash', string>; /** * Returned when a guild's splash is changed * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type APIAuditLogChangeKeySplashHash = AuditLogChangeData<'splash_hash', string>; /** * Returned when a guild's discovery splash is changed * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type APIAuditLogChangeKeyDiscoverySplashHash = AuditLogChangeData<'discovery_splash_hash', string>; /** * Returned when a guild's banner hash is changed * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type APIAuditLogChangeKeyBannerHash = AuditLogChangeData<'banner_hash', string>; /** * Returned when a guild's owner_id is changed * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type APIAuditLogChangeKeyOwnerId = AuditLogChangeData<'owner_id', Snowflake>; /** * Returned when a guild's region is changed * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type APIAuditLogChangeKeyRegion = AuditLogChangeData<'region', string>; /** * Returned when a guild's preferred_locale is changed * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type APIAuditLogChangeKeyPreferredLocale = AuditLogChangeData<'preferred_locale', string>; /** * Returned when a guild's afk_channel_id is changed * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type APIAuditLogChangeKeyAFKChannelId = AuditLogChangeData<'afk_channel_id', Snowflake>; /** * Returned when a guild's afk_timeout is changed * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type APIAuditLogChangeKeyAFKTimeout = AuditLogChangeData<'afk_timeout', number>; /** * Returned when a guild's rules_channel_id is changed * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type APIAuditLogChangeKeyRulesChannelId = AuditLogChangeData<'rules_channel_id', string>; /** * Returned when a guild's public_updates_channel_id is changed * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type APIAuditLogChangeKeyPublicUpdatesChannelId = AuditLogChangeData<'public_updates_channel_id', string>; /** * Returned when a guild's mfa_level is changed * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type APIAuditLogChangeKeyMFALevel = AuditLogChangeData<'mfa_level', GuildMFALevel>; /** * Returned when a guild's verification_level is changed * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type APIAuditLogChangeKeyVerificationLevel = AuditLogChangeData<'verification_level', GuildVerificationLevel>; /** * Returned when a guild's explicit_content_filter is changed * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type APIAuditLogChangeKeyExplicitContentFilter = AuditLogChangeData<'explicit_content_filter', GuildExplicitContentFilter>; /** * Returned when a guild's default_message_notifications is changed * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type APIAuditLogChangeKeyDefaultMessageNotifications = AuditLogChangeData<'default_message_notifications', GuildDefaultMessageNotifications>; /** * Returned when a guild's vanity_url_code is changed * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type APIAuditLogChangeKeyVanityURLCode = AuditLogChangeData<'vanity_url_code', string>; /** * Returned when new role(s) are added * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type APIAuditLogChangeKey$Add = AuditLogChangeData<'$add', APIRole[]>; /** * Returned when role(s) are removed * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type APIAuditLogChangeKey$Remove = AuditLogChangeData<'$remove', APIRole[]>; /** * Returned when there is a change in number of days after which inactive and role-unassigned members are kicked * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type APIAuditLogChangeKeyPruneDeleteDays = AuditLogChangeData<'prune_delete_days', number>; /** * Returned when a guild's widget is enabled * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type APIAuditLogChangeKeyWidgetEnabled = AuditLogChangeData<'widget_enabled', boolean>; /** * Returned when a guild's widget_channel_id is changed * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type APIAuditLogChangeKeyWidgetChannelId = AuditLogChangeData<'widget_channel_id', Snowflake>; /** * Returned when a guild's system_channel_id is changed * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type APIAuditLogChangeKeySystemChannelId = AuditLogChangeData<'system_channel_id', Snowflake>; /** * Returned when a channel's position is changed * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type APIAuditLogChangeKeyPosition = AuditLogChangeData<'position', number>; /** * Returned when a channel's topic is changed * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type APIAuditLogChangeKeyTopic = AuditLogChangeData<'topic', string>; /** * Returned when a voice channel's bitrate is changed * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type APIAuditLogChangeKeyBitrate = AuditLogChangeData<'bitrate', number>; /** * Returned when a channel's permission overwrites is changed * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type APIAuditLogChangeKeyPermissionOverwrites = AuditLogChangeData<'permission_overwrites', APIOverwrite[]>; /** * Returned when a channel's NSFW restriction is changed * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type APIAuditLogChangeKeyNSFW = AuditLogChangeData<'nsfw', boolean>; /** * The application ID of the added or removed Webhook or Bot * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type APIAuditLogChangeKeyApplicationId = AuditLogChangeData<'application_id', Snowflake>; /** * Returned when a channel's amount of seconds a user has to wait before sending another message * is changed * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type APIAuditLogChangeKeyRateLimitPerUser = AuditLogChangeData<'rate_limit_per_user', number>; /** * Returned when a permission bitfield is changed * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type APIAuditLogChangeKeyPermissions = AuditLogChangeData<'permissions', string>; /** * Returned when a role's color is changed * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type APIAuditLogChangeKeyColor = AuditLogChangeData<'color', number>; /** * Returned when a role's hoist status is changed * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type APIAuditLogChangeKeyHoist = AuditLogChangeData<'hoist', boolean>; /** * Returned when a role's mentionable status is changed * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type APIAuditLogChangeKeyMentionable = AuditLogChangeData<'mentionable', boolean>; /** * Returned when an overwrite's allowed permissions bitfield is changed * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type APIAuditLogChangeKeyAllow = AuditLogChangeData<'allow', string>; /** * Returned when an overwrite's denied permissions bitfield is changed * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type APIAuditLogChangeKeyDeny = AuditLogChangeData<'deny', string>; /** * Returned when an invite's code is changed * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type APIAuditLogChangeKeyCode = AuditLogChangeData<'code', string>; /** * Returned when an invite's or guild scheduled event's channel_id is changed * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type APIAuditLogChangeKeyChannelId = AuditLogChangeData<'channel_id', Snowflake>; /** * Returned when an invite's inviter_id is changed * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type APIAuditLogChangeKeyInviterId = AuditLogChangeData<'inviter_id', Snowflake>; /** * Returned when an invite's max_uses is changed * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type APIAuditLogChangeKeyMaxUses = AuditLogChangeData<'max_uses', number>; /** * Returned when an invite's uses is changed * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type APIAuditLogChangeKeyUses = AuditLogChangeData<'uses', number>; /** * Returned when an invite's max_age is changed * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type APIAuditLogChangeKeyMaxAge = AuditLogChangeData<'max_age', number>; /** * Returned when an invite's temporary status is changed * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type APIAuditLogChangeKeyTemporary = AuditLogChangeData<'temporary', boolean>; /** * Returned when a user's deaf status is changed * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type APIAuditLogChangeKeyDeaf = AuditLogChangeData<'deaf', boolean>; /** * Returned when a user's mute status is changed * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type APIAuditLogChangeKeyMute = AuditLogChangeData<'mute', boolean>; /** * Returned when a user's nick is changed * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type APIAuditLogChangeKeyNick = AuditLogChangeData<'nick', string>; /** * Returned when a user's avatar_hash is changed * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type APIAuditLogChangeKeyAvatarHash = AuditLogChangeData<'avatar_hash', string>; /** * The ID of the changed entity - sometimes used in conjunction with other keys * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type APIAuditLogChangeKeyId = AuditLogChangeData<'id', Snowflake>; /** * The type of entity created * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type APIAuditLogChangeKeyType = AuditLogChangeData<'type', number | string>; /** * Returned when an integration's enable_emoticons is changed * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type APIAuditLogChangeKeyEnableEmoticons = AuditLogChangeData<'enable_emoticons', boolean>; /** * Returned when an integration's expire_behavior is changed * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type APIAuditLogChangeKeyExpireBehavior = AuditLogChangeData<'expire_behavior', IntegrationExpireBehavior>; /** * Returned when an integration's expire_grace_period is changed * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type APIAuditLogChangeKeyExpireGracePeriod = AuditLogChangeData<'expire_grace_period', number>; /** * Returned when a voice channel's user_limit is changed * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type APIAuditLogChangeKeyUserLimit = AuditLogChangeData<'user_limit', number>; /** * Returned when privacy level of a stage instance or guild scheduled event is changed * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type APIAuditLogChangeKeyPrivacyLevel = AuditLogChangeData<'privacy_level', StageInstancePrivacyLevel>; /** * Returned when a sticker's related emoji is changed * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type APIAuditLogChangeKeyTags = AuditLogChangeData<'tags', string>; /** * Returned when a sticker's format_type is changed * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type APIAuditLogChangeKeyFormatType = AuditLogChangeData<'format_type', StickerFormatType>; /** * Empty string * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type APIAuditLogChangeKeyAsset = AuditLogChangeData<'asset', ''>; /** * Returned when a sticker's availability is changed * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type APIAuditLogChangeKeyAvailable = AuditLogChangeData<'available', boolean>; /** * Returned when a sticker's guild_id is changed * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type APIAuditLogChangeKeyGuildId = AuditLogChangeData<'guild_id', Snowflake>; /** * Returned when entity type of a guild scheduled event is changed * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type APIAuditLogChangeKeyEntityType = AuditLogChangeData<'entity_type', GuildScheduledEventEntityType>; /** * Returned when status of a guild scheduled event is changed * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type APIAuditLogChangeKeyStatus = AuditLogChangeData<'status', GuildScheduledEventStatus>; /** * Returned when location of a guild scheduled event is changed * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type APIAuditLogChangeKeyLocation = AuditLogChangeData<'location', string>; /** * Returned when a user's timeout is changed * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type APIAuditLogChangeKeyCommunicationDisabledUntil = AuditLogChangeData<'communication_disabled_until', string>; interface AuditLogChangeData<K extends string, D> { key: K; /** * The new value * * If `new_value` is not present in the change object, while `old_value` is, * that means the property that was changed has been reset, or set to `null` */ new_value?: D; old_value?: D; } export {}; //# sourceMappingURL=auditLog.d.ts.map node_modules/discord-api-types/payloads/v8/auditLog.d.ts.map 0000664 00000020612 15114741631 0020056 0 ustar 00 {"version":3,"file":"auditLog.d.ts","sourceRoot":"","sources":["auditLog.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC/C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AAC9C,OAAO,KAAK,EACX,mBAAmB,EACnB,gCAAgC,EAChC,0BAA0B,EAC1B,aAAa,EACb,sBAAsB,EACtB,yBAAyB,EACzB,MAAM,SAAS,CAAC;AACjB,OAAO,KAAK,EACX,sBAAsB,EACtB,6BAA6B,EAC7B,yBAAyB,EACzB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAC7C,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,iBAAiB,CAAC;AACjE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,WAAW,CAAC;AACnD,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,QAAQ,CAAC;AACtC,OAAO,KAA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E,CAAC,CAAC;AAExE;;;;GAIG;AACH,MAAM,MAAM,6BAA6B,GAAG,kBAAkB,CAAC,WAAW,EAAE,OAAO,CAAC,CAAC;AAErF;;;;GAIG;AACH,MAAM,MAAM,2BAA2B,GAAG,kBAAkB,CAAC,UAAU,EAAE,SAAS,CAAC,CAAC;AAEpF;;;;GAIG;AACH,MAAM,MAAM,8BAA8B,GAAG,kBAAkB,CAAC,aAAa,EAAE,6BAA6B,CAAC,CAAC;AAE9G;;;;GAIG;AACH,MAAM,MAAM,0BAA0B,GAAG,kBAAkB,CAAC,QAAQ,EAAE,yBAAyB,CAAC,CAAC;AAEjG;;;;GAIG;AACH,MAAM,MAAM,4BAA4B,GAAG,kBAAkB,CAAC,UAAU,EAAE,MAAM,CAAC,CAAC;AAElF;;;;GAIG;AACH,MAAM,MAAM,8CAA8C,GAAG,kBAAkB,CAAC,8BAA8B,EAAE,MAAM,CAAC,CAAC;AAExH,UAAU,kBAAkB,CAAC,CAAC,SAAS,MAAM,EAAE,CAAC;IAC/C,GAAG,EAAE,CAAC,CAAC;IACP;;;;;OAKG;IACH,SAAS,CAAC,EAAE,CAAC,CAAC;IACd,SAAS,CAAC,EAAE,CAAC,CAAC;CACd"} node_modules/discord-api-types/payloads/v8/webhook.d.ts.map 0000664 00000001561 15114741631 0017746 0 ustar 00 {"version":3,"file":"webhook.d.ts","sourceRoot":"","sources":["webhook.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC/C,OAAO,KAAK,EAAE,iBAAiB,EAAE,eAAe,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAE3E;;;;GAIG;AACH,MAAM,WAAW,UAAU;IAC1B;;OAEG;IACH,EAAE,EAAE,SAAS,CAAC;IACd;;;;OAIG;IACH,IAAI,EAAE,WAAW,CAAC;IAClB;;OAEG;IACH,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB;;OAEG;IACH,UAAU,EAAE,SAAS,CAAC;IACtB;;;;OAIG;IACH,IAAI,CAAC,EAAE,OAAO,CAAC;IACf;;OAEG;IACH,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IACpB;;OAEG;IACH,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,cAAc,EAAE,SAAS,GAAG,IAAI,CAAC;IACjC;;OAEG;IACH,YAAY,CAAC,EAAE,eAAe,CAAC;IAC/B;;OAEG;IACH,cAAc,CAAC,EAAE,iBAAiB,CAAC;IACnC;;OAEG;IACH,GAAG,CAAC,EAAE,MAAM,CAAC;CACb;AAED;;GAEG;AACH,oBAAY,WAAW;IACtB;;OAEG;IACH,QAAQ,IAAI;IACZ;;OAEG;IACH,eAAe,IAAA;IACf;;OAEG;IACH,WAAW,IAAA;CACX"} node_modules/discord-api-types/payloads/v8/stageInstance.js 0000664 00000001607 15114741631 0020071 0 ustar 00 "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.StageInstancePrivacyLevel = void 0; /** * https://discord.com/developers/docs/resources/stage-instance#stage-instance-object-privacy-level * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ var StageInstancePrivacyLevel; (function (StageInstancePrivacyLevel) { /** * The stage instance is visible publicly, such as on stage discovery */ StageInstancePrivacyLevel[StageInstancePrivacyLevel["Public"] = 1] = "Public"; /** * The stage instance is visible to only guild members */ StageInstancePrivacyLevel[StageInstancePrivacyLevel["GuildOnly"] = 2] = "GuildOnly"; })(StageInstancePrivacyLevel || (exports.StageInstancePrivacyLevel = StageInstancePrivacyLevel = {})); //# sourceMappingURL=stageInstance.js.map node_modules/discord-api-types/payloads/v8/gateway.js.map 0000664 00000001634 15114741631 0017516 0 ustar 00 {"version":3,"file":"gateway.js","sourceRoot":"","sources":["gateway.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AAmGH;;GAEG;AACH,IAAY,oBASX;AATD,WAAY,oBAAoB;IAC/B,yCAAiB,CAAA;IACjB,4CAAoB,CAAA;IACpB,qCAAa,CAAA;IACb;;OAEG;IACH,+CAAuB,CAAA;IACvB,2CAAmB,CAAA;AACpB,CAAC,EATW,oBAAoB,oCAApB,oBAAoB,QAS/B;AA+GD;;GAEG;AACH,IAAY,gBAIX;AAJD,WAAY,gBAAgB;IAC3B,uCAAmB,CAAA;IACnB,uCAAmB,CAAA;IACnB,iCAAa,CAAA;AACd,CAAC,EAJW,gBAAgB,gCAAhB,gBAAgB,QAI3B;AAED;;;;GAIG;AACH,IAAY,YAyBX;AAzBD,WAAY,YAAY;IACvB;;OAEG;IACH,qDAAO,CAAA;IACP;;OAEG;IACH,yDAAS,CAAA;IACT;;OAEG;IACH,yDAAS,CAAA;IACT;;OAEG;IACH,uDAAQ,CAAA;IACR;;OAEG;IACH,mDAAM,CAAA;IACN;;OAEG;IACH,yDAAS,CAAA;AACV,CAAC,EAzBW,YAAY,4BAAZ,YAAY,QAyBvB;AAyDD;;;;GAIG;AACH,IAAY,aAUX;AAVD,WAAY,aAAa;IACxB,yDAAiB,CAAA;IACjB,iDAAa,CAAA;IACb,yDAAiB,CAAA;IACjB,+DAAoB,CAAA;IACpB,kDAAa,CAAA;IACb,kDAAa,CAAA;IACb,gFAA4B,CAAA;IAC5B,2FAAiC,CAAA;IACjC,2DAAiB,CAAA;AAClB,CAAC,EAVW,aAAa,6BAAb,aAAa,QAUxB"} node_modules/discord-api-types/payloads/v8/application.d.ts 0000664 00000010265 15114741631 0020040 0 ustar 00 /** * Types extracted from https://discord.com/developers/docs/resources/application */ import type { Permissions, Snowflake } from '../../globals'; import type { OAuth2Scopes } from './oauth2'; import type { APITeam } from './teams'; import type { APIUser } from './user'; /** * https://discord.com/developers/docs/resources/application#application-object * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export interface APIApplication { /** * The id of the app */ id: Snowflake; /** * The name of the app */ name: string; /** * The icon hash of the app */ icon: string | null; /** * The description of the app */ description: string; /** * An array of rpc origin urls, if rpc is enabled */ rpc_origins?: string[]; /** * When `false` only app owner can join the app's bot to guilds */ bot_public: boolean; /** * When `true` the app's bot will only join upon completion of the full oauth2 code grant flow */ bot_require_code_grant: boolean; /** * The url of the application's terms of service */ terms_of_service_url?: string; /** * The url of the application's privacy policy */ privacy_policy_url?: string; /** * Partial user object containing info on the owner of the application * * See https://discord.com/developers/docs/resources/user#user-object */ owner?: APIUser; /** * If this application is a game sold on Discord, this field will be the summary field for the store page * of its primary sku * * @deprecated Always an empty string, will be removed in v11 */ summary: ''; /** * The hexadecimal encoded key for verification in interactions and the GameSDK's GetTicket function * * See https://discord.com/developers/docs/game-sdk/applications#get-ticket */ verify_key: string; /** * The team this application belongs to * * See https://discord.com/developers/docs/topics/teams#data-models-team-object */ team: APITeam | null; /** * If this application is a game sold on Discord, this field will be the guild to which it has been linked */ guild_id?: Snowflake; /** * If this application is a game sold on Discord, this field will be the id of the "Game SKU" that is created, if exists */ primary_sku_id?: Snowflake; /** * If this application is a game sold on Discord, this field will be the URL slug that links to the store page */ slug?: string; /** * If this application is a game sold on Discord, this field will be the hash of the image on store embeds */ cover_image?: string; /** * The application's public flags * * See https://discord.com/developers/docs/resources/application#application-object-application-flags */ flags: ApplicationFlags; /** * Up to 5 tags describing the content and functionality of the application */ tags?: [string, string?, string?, string?, string?]; /** * Settings for the application's default in-app authorization link, if enabled */ install_params?: APIApplicationInstallParams; /** * The application's default custom authorization link, if enabled */ custom_install_url?: string; } export interface APIApplicationInstallParams { scopes: OAuth2Scopes[]; permissions: Permissions; } /** * https://discord.com/developers/docs/resources/application#application-object-application-flags * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export declare enum ApplicationFlags { EmbeddedReleased = 2, ManagedEmoji = 4, GroupDMCreate = 16, RPCHasConnected = 2048, GatewayPresence = 4096, GatewayPresenceLimited = 8192, GatewayGuildMembers = 16384, GatewayGuildMembersLimited = 32768, VerificationPendingGuildLimit = 65536, Embedded = 131072, GatewayMessageContent = 262144, GatewayMessageContentLimited = 524288, EmbeddedFirstParty = 1048576 } //# sourceMappingURL=application.d.ts.map node_modules/discord-api-types/payloads/v8/index.mjs 0000664 00000005437 15114741631 0016572 0 ustar 00 import mod from "./index.js"; export default mod; export const ActivityFlags = mod.ActivityFlags; export const ActivityPlatform = mod.ActivityPlatform; export const ActivityType = mod.ActivityType; export const AllowedMentionsTypes = mod.AllowedMentionsTypes; export const ApplicationCommandOptionType = mod.ApplicationCommandOptionType; export const ApplicationCommandPermissionType = mod.ApplicationCommandPermissionType; export const ApplicationCommandType = mod.ApplicationCommandType; export const ApplicationFlags = mod.ApplicationFlags; export const AuditLogEvent = mod.AuditLogEvent; export const AuditLogOptionsType = mod.AuditLogOptionsType; export const ButtonStyle = mod.ButtonStyle; export const ChannelType = mod.ChannelType; export const ComponentType = mod.ComponentType; export const ConnectionVisibility = mod.ConnectionVisibility; export const EmbedType = mod.EmbedType; export const GuildDefaultMessageNotifications = mod.GuildDefaultMessageNotifications; export const GuildExplicitContentFilter = mod.GuildExplicitContentFilter; export const GuildFeature = mod.GuildFeature; export const GuildMFALevel = mod.GuildMFALevel; export const GuildNSFWLevel = mod.GuildNSFWLevel; export const GuildPremiumTier = mod.GuildPremiumTier; export const GuildScheduledEventEntityType = mod.GuildScheduledEventEntityType; export const GuildScheduledEventPrivacyLevel = mod.GuildScheduledEventPrivacyLevel; export const GuildScheduledEventStatus = mod.GuildScheduledEventStatus; export const GuildSystemChannelFlags = mod.GuildSystemChannelFlags; export const GuildVerificationLevel = mod.GuildVerificationLevel; export const GuildWidgetStyle = mod.GuildWidgetStyle; export const IntegrationExpireBehavior = mod.IntegrationExpireBehavior; export const InteractionResponseType = mod.InteractionResponseType; export const InteractionType = mod.InteractionType; export const InviteTargetType = mod.InviteTargetType; export const MembershipScreeningFieldType = mod.MembershipScreeningFieldType; export const MessageActivityType = mod.MessageActivityType; export const MessageFlags = mod.MessageFlags; export const MessageType = mod.MessageType; export const OAuth2Scopes = mod.OAuth2Scopes; export const OverwriteType = mod.OverwriteType; export const PermissionFlagsBits = mod.PermissionFlagsBits; export const PresenceUpdateStatus = mod.PresenceUpdateStatus; export const StageInstancePrivacyLevel = mod.StageInstancePrivacyLevel; export const StickerFormatType = mod.StickerFormatType; export const StickerType = mod.StickerType; export const TeamMemberMembershipState = mod.TeamMemberMembershipState; export const TextInputStyle = mod.TextInputStyle; export const UserFlags = mod.UserFlags; export const UserPremiumType = mod.UserPremiumType; export const VideoQualityMode = mod.VideoQualityMode; export const WebhookType = mod.WebhookType; node_modules/discord-api-types/payloads/v8/invite.js.map 0000664 00000000352 15114741631 0017347 0 ustar 00 {"version":3,"file":"invite.js","sourceRoot":"","sources":["invite.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AA4FH;;;;GAIG;AACH,IAAY,gBAGX;AAHD,WAAY,gBAAgB;IAC3B,2DAAU,CAAA;IACV,qFAAmB,CAAA;AACpB,CAAC,EAHW,gBAAgB,gCAAhB,gBAAgB,QAG3B"} node_modules/discord-api-types/payloads/v8/index.js.map 0000664 00000000544 15114741631 0017163 0 ustar 00 {"version":3,"file":"index.js","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,4CAA0B;AAC1B,gDAA8B;AAC9B,6CAA2B;AAC3B,4CAA0B;AAC1B,0CAAwB;AACxB,4CAA0B;AAC1B,0CAAwB;AACxB,wDAAsC;AACtC,iDAA+B;AAC/B,2CAAyB;AACzB,2CAAyB;AACzB,gDAA8B;AAC9B,kDAAgC;AAChC,4CAA0B;AAC1B,0CAAwB;AACxB,6CAA2B;AAC3B,yCAAuB;AACvB,0CAAwB;AACxB,4CAA0B"} node_modules/discord-api-types/payloads/v8/voice.d.ts 0000664 00000004565 15114741631 0016650 0 ustar 00 /** * Types extracted from https://discord.com/developers/docs/resources/voice */ import type { Snowflake } from '../../globals'; import type { APIGuildMember } from './guild'; /** * https://discord.com/developers/docs/resources/voice#voice-state-object * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export interface GatewayVoiceState { /** * The guild id this voice state is for */ guild_id?: Snowflake; /** * The channel id this user is connected to */ channel_id: Snowflake | null; /** * The user id this voice state is for */ user_id: Snowflake; /** * The guild member this voice state is for * * See https://discord.com/developers/docs/resources/guild#guild-member-object */ member?: APIGuildMember; /** * The session id for this voice state */ session_id: string; /** * Whether this user is deafened by the server */ deaf: boolean; /** * Whether this user is muted by the server */ mute: boolean; /** * Whether this user is locally deafened */ self_deaf: boolean; /** * Whether this user is locally muted */ self_mute: boolean; /** * Whether this user is streaming using "Go Live" */ self_stream?: boolean; /** * Whether this user's camera is enabled */ self_video: boolean; /** * Whether this user is muted by the current user */ suppress: boolean; /** * The time at which the user requested to speak */ request_to_speak_timestamp: string | null; } /** * https://discord.com/developers/docs/resources/voice#voice-region-object * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export interface APIVoiceRegion { /** * Unique ID for the region */ id: string; /** * Name of the region */ name: string; /** * `true` for a single server that is closest to the current user's client */ optimal: boolean; /** * Whether this is a deprecated voice region (avoid switching to these) */ deprecated: boolean; /** * Whether this is a custom voice region (used for events/etc) */ custom: boolean; } //# sourceMappingURL=voice.d.ts.map node_modules/discord-api-types/payloads/v8/permissions.d.ts 0000664 00000003475 15114741631 0020115 0 ustar 00 /** * Types extracted from https://discord.com/developers/docs/topics/permissions */ import type { Permissions, Snowflake } from '../../globals'; /** * https://discord.com/developers/docs/topics/permissions#role-object * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export interface APIRole { /** * Role id */ id: Snowflake; /** * Role name */ name: string; /** * Integer representation of hexadecimal color code */ color: number; /** * If this role is pinned in the user listing */ hoist: boolean; /** * The role icon hash */ icon?: string | null; /** * The role unicode emoji as a standard emoji */ unicode_emoji?: string | null; /** * Position of this role */ position: number; /** * Permission bit set * * See https://en.wikipedia.org/wiki/Bit_field */ permissions: Permissions; /** * Whether this role is managed by an integration */ managed: boolean; /** * Whether this role is mentionable */ mentionable: boolean; /** * The tags this role has */ tags?: APIRoleTags; } /** * https://discord.com/developers/docs/topics/permissions#role-object-role-tags-structure * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export interface APIRoleTags { /** * The id of the bot this role belongs to */ bot_id?: Snowflake; /** * Whether this is the guild's premium subscriber role */ premium_subscriber?: null; /** * The id of the integration this role belongs to */ integration_id?: Snowflake; } //# sourceMappingURL=permissions.d.ts.map node_modules/discord-api-types/payloads/v8/invite.d.ts 0000664 00000007714 15114741631 0017040 0 ustar 00 /** * Types extracted from https://discord.com/developers/docs/resources/invite */ import type { APIApplication } from './application'; import type { APIPartialChannel } from './channel'; import type { APIGuild } from './guild'; import type { APIGuildScheduledEvent } from './guildScheduledEvent'; import type { APIInviteStageInstance } from './stageInstance'; import type { APIUser } from './user'; export type APIInviteGuild = Pick<APIGuild, 'banner' | 'description' | 'features' | 'icon' | 'id' | 'name' | 'nsfw_level' | 'premium_subscription_count' | 'splash' | 'vanity_url_code' | 'verification_level'>; /** * https://discord.com/developers/docs/resources/invite#invite-object * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export interface APIInvite { /** * The invite code (unique ID) */ code: string; /** * The guild this invite is for * * See https://discord.com/developers/docs/resources/guild#guild-object */ guild?: APIInviteGuild; /** * The channel this invite is for * * See https://discord.com/developers/docs/resources/channel#channel-object */ channel: Required<APIPartialChannel> | null; /** * The user who created the invite * * See https://discord.com/developers/docs/resources/user#user-object */ inviter?: APIUser; /** * The type of target for this voice channel invite * * See https://discord.com/developers/docs/resources/invite#invite-object-target-user-types */ target_type?: InviteTargetType; /** * The user whose stream to display for this voice channel stream invite * * See https://discord.com/developers/docs/resources/user#user-object */ target_user?: APIUser; /** * The embedded application to open for this voice channel embedded application invite * * See https://discord.com/developers/docs/topics/oauth2#application */ target_application?: Partial<APIApplication>; /** * Approximate count of online members, returned from the `GET /invites/<code>` endpoint when `with_counts` is `true` */ approximate_presence_count?: number; /** * Approximate count of total members, returned from the `GET /invites/<code>` endpoint when `with_counts` is `true` */ approximate_member_count?: number; /** * The expiration date of this invite, returned from the `GET /invites/<code>` endpoint when `with_expiration` is `true` */ expires_at?: string | null; /** * The stage instance data if there is a public stage instance in the stage channel this invite is for */ stage_instance?: APIInviteStageInstance; /** * The guild scheduled event data, returned from the `GET /invites/<code>` endpoint when `guild_scheduled_event_id` is a valid guild scheduled event id */ guild_scheduled_event?: APIGuildScheduledEvent; } /** * https://discord.com/developers/docs/resources/invite#invite-object-invite-target-types * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export declare enum InviteTargetType { Stream = 1, EmbeddedApplication = 2 } /** * https://discord.com/developers/docs/resources/invite#invite-metadata-object * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export interface APIExtendedInvite extends APIInvite { /** * Number of times this invite has been used */ uses: number; /** * Max number of times this invite can be used */ max_uses: number; /** * Duration (in seconds) after which the invite expires */ max_age: number; /** * Whether this invite only grants temporary membership */ temporary: boolean; /** * When this invite was created */ created_at: string; } //# sourceMappingURL=invite.d.ts.map node_modules/discord-api-types/payloads/v8/user.d.ts 0000664 00000013647 15114741631 0016522 0 ustar 00 /** * Types extracted from https://discord.com/developers/docs/resources/user */ import type { Snowflake } from '../../globals'; import type { APIGuildIntegration } from './guild'; /** * https://discord.com/developers/docs/resources/user#user-object * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export interface APIUser { /** * The user's id */ id: Snowflake; /** * The user's username, not unique across the platform */ username: string; /** * The user's 4-digit discord-tag */ discriminator: string; /** * The user's avatar hash * * See https://discord.com/developers/docs/reference#image-formatting */ avatar: string | null; /** * Whether the user belongs to an OAuth2 application */ bot?: boolean; /** * Whether the user is an Official Discord System user (part of the urgent message system) */ system?: boolean; /** * Whether the user has two factor enabled on their account */ mfa_enabled?: boolean; /** * The user's banner hash * * See https://discord.com/developers/docs/reference#image-formatting */ banner?: string | null; /** * The user's banner color encoded as an integer representation of hexadecimal color code */ accent_color?: number | null; /** * The user's chosen language option */ locale?: string; /** * Whether the email on this account has been verified */ verified?: boolean; /** * The user's email */ email?: string | null; /** * The flags on a user's account * * See https://discord.com/developers/docs/resources/user#user-object-user-flags */ flags?: UserFlags; /** * The type of Nitro subscription on a user's account * * See https://discord.com/developers/docs/resources/user#user-object-premium-types */ premium_type?: UserPremiumType; /** * The public flags on a user's account * * See https://discord.com/developers/docs/resources/user#user-object-user-flags */ public_flags?: UserFlags; } /** * https://discord.com/developers/docs/resources/user#user-object-user-flags * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export declare enum UserFlags { /** * Discord Employee */ Staff = 1, /** * Partnered Server Owner */ Partner = 2, /** * HypeSquad Events Coordinator */ Hypesquad = 4, /** * Bug Hunter Level 1 */ BugHunterLevel1 = 8, /** * House Bravery Member */ HypeSquadOnlineHouse1 = 64, /** * House Brilliance Member */ HypeSquadOnlineHouse2 = 128, /** * House Balance MemberW */ HypeSquadOnlineHouse3 = 256, /** * Early Nitro Supporter */ PremiumEarlySupporter = 512, /** * User is a [team](https://discord.com/developers/docs/topics/teams) */ TeamPseudoUser = 1024, /** * Bug Hunter Level 2 */ BugHunterLevel2 = 16384, /** * Verified Bot */ VerifiedBot = 65536, /** * Early Verified Bot Developer */ VerifiedDeveloper = 131072, /** * Discord Certified Moderator */ CertifiedModerator = 262144, /** * Bot uses only [HTTP interactions](https://discord.com/developers/docs/interactions/receiving-and-responding#receiving-an-interaction) and is shown in the online member list */ BotHTTPInteractions = 524288, /** * User has been identified as spammer * * @unstable This user flag is currently not documented by Discord but has a known value which we will try to keep up to date. */ Spammer = 1048576, /** * User's account has been quarantined based on recent activity * * @unstable This user flag is currently not documented by Discord but has a known value which we will try to keep up to date. */ Quarantined = 17592186044416 } /** * https://discord.com/developers/docs/resources/user#user-object-premium-types * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export declare enum UserPremiumType { None = 0, NitroClassic = 1, Nitro = 2 } /** * https://discord.com/developers/docs/resources/user#connection-object * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export interface APIConnection { /** * ID of the connection account */ id: string; /** * The username of the connection account */ name: string; /** * The service of the connection */ type: string; /** * Whether the connection is revoked */ revoked?: boolean; /** * An array of partial server integrations * * See https://discord.com/developers/docs/resources/guild#integration-object */ integrations?: Partial<APIGuildIntegration>[]; /** * Whether the connection is verified */ verified: boolean; /** * Whether friend sync is enabled for this connection */ friend_sync: boolean; /** * Whether activities related to this connection will be shown in presence updates */ show_activity: boolean; /** * Visibility of this connection * * See https://discord.com/developers/docs/resources/user#connection-object-visibility-types */ visibility: ConnectionVisibility; } /** * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export declare enum ConnectionVisibility { /** * Invisible to everyone except the user themselves */ None = 0, /** * Visible to everyone */ Everyone = 1 } //# sourceMappingURL=user.d.ts.map node_modules/discord-api-types/payloads/v8/index.js 0000664 00000003201 15114741631 0016400 0 ustar 00 "use strict"; var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { if (k2 === undefined) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { return m[k]; } }; } Object.defineProperty(o, k2, desc); }) : (function(o, m, k, k2) { if (k2 === undefined) k2 = k; o[k2] = m[k]; })); var __exportStar = (this && this.__exportStar) || function(m, exports) { for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); }; Object.defineProperty(exports, "__esModule", { value: true }); __exportStar(require("../common"), exports); __exportStar(require("./application"), exports); __exportStar(require("./auditLog"), exports); __exportStar(require("./channel"), exports); __exportStar(require("./emoji"), exports); __exportStar(require("./gateway"), exports); __exportStar(require("./guild"), exports); __exportStar(require("./guildScheduledEvent"), exports); __exportStar(require("./interactions"), exports); __exportStar(require("./invite"), exports); __exportStar(require("./oauth2"), exports); __exportStar(require("./permissions"), exports); __exportStar(require("./stageInstance"), exports); __exportStar(require("./sticker"), exports); __exportStar(require("./teams"), exports); __exportStar(require("./template"), exports); __exportStar(require("./user"), exports); __exportStar(require("./voice"), exports); __exportStar(require("./webhook"), exports); //# sourceMappingURL=index.js.map node_modules/discord-api-types/payloads/v8/permissions.d.ts.map 0000664 00000001465 15114741631 0020666 0 ustar 00 {"version":3,"file":"permissions.d.ts","sourceRoot":"","sources":["permissions.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAE5D;;;;GAIG;AACH,MAAM,WAAW,OAAO;IACvB;;OAEG;IACH,EAAE,EAAE,SAAS,CAAC;IACd;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,KAAK,EAAE,OAAO,CAAC;IACf;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB;;OAEG;IACH,aAAa,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC9B;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC;IACjB;;;;OAIG;IACH,WAAW,EAAE,WAAW,CAAC;IACzB;;OAEG;IACH,OAAO,EAAE,OAAO,CAAC;IACjB;;OAEG;IACH,WAAW,EAAE,OAAO,CAAC;IACrB;;OAEG;IACH,IAAI,CAAC,EAAE,WAAW,CAAC;CACnB;AAED;;;;GAIG;AACH,MAAM,WAAW,WAAW;IAC3B;;OAEG;IACH,MAAM,CAAC,EAAE,SAAS,CAAC;IACnB;;OAEG;IACH,kBAAkB,CAAC,EAAE,IAAI,CAAC;IAC1B;;OAEG;IACH,cAAc,CAAC,EAAE,SAAS,CAAC;CAC3B"} node_modules/discord-api-types/payloads/v8/voice.d.ts.map 0000664 00000001724 15114741631 0017416 0 ustar 00 {"version":3,"file":"voice.d.ts","sourceRoot":"","sources":["voice.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC/C,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAE9C;;;;GAIG;AACH,MAAM,WAAW,iBAAiB;IACjC;;OAEG;IACH,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB;;OAEG;IACH,UAAU,EAAE,SAAS,GAAG,IAAI,CAAC;IAC7B;;OAEG;IACH,OAAO,EAAE,SAAS,CAAC;IACnB;;;;OAIG;IACH,MAAM,CAAC,EAAE,cAAc,CAAC;IACxB;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC;IACnB;;OAEG;IACH,IAAI,EAAE,OAAO,CAAC;IACd;;OAEG;IACH,IAAI,EAAE,OAAO,CAAC;IACd;;OAEG;IACH,SAAS,EAAE,OAAO,CAAC;IACnB;;OAEG;IACH,SAAS,EAAE,OAAO,CAAC;IACnB;;OAEG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB;;OAEG;IACH,UAAU,EAAE,OAAO,CAAC;IACpB;;OAEG;IACH,QAAQ,EAAE,OAAO,CAAC;IAClB;;OAEG;IACH,0BAA0B,EAAE,MAAM,GAAG,IAAI,CAAC;CAC1C;AAED;;;;GAIG;AACH,MAAM,WAAW,cAAc;IAC9B;;OAEG;IACH,EAAE,EAAE,MAAM,CAAC;IACX;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;OAEG;IACH,OAAO,EAAE,OAAO,CAAC;IACjB;;OAEG;IACH,UAAU,EAAE,OAAO,CAAC;IACpB;;OAEG;IACH,MAAM,EAAE,OAAO,CAAC;CAChB"} node_modules/discord-api-types/payloads/v8/emoji.d.ts.map 0000664 00000001272 15114741631 0017412 0 ustar 00 {"version":3,"file":"emoji.d.ts","sourceRoot":"","sources":["emoji.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC/C,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAC7C,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,QAAQ,CAAC;AAEtC;;;;GAIG;AACH,MAAM,WAAW,eAAe;IAC/B;;OAEG;IACH,EAAE,EAAE,SAAS,GAAG,IAAI,CAAC;IACrB;;OAEG;IACH,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IACpB;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;CACnB;AAED;;;;GAIG;AACH,MAAM,WAAW,QAAS,SAAQ,eAAe;IAChD;;OAEG;IACH,KAAK,CAAC,EAAE,OAAO,CAAC,IAAI,CAAC,EAAE,CAAC;IACxB;;OAEG;IACH,IAAI,CAAC,EAAE,OAAO,CAAC;IACf;;OAEG;IACH,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB;;OAEG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB;;OAEG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;CACpB"} node_modules/discord-api-types/payloads/v8/application.d.ts.map 0000664 00000003154 15114741631 0020613 0 ustar 00 {"version":3,"file":"application.d.ts","sourceRoot":"","sources":["application.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC5D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAC7C,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AACvC,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,QAAQ,CAAC;AAEtC;;;;GAIG;AACH,MAAM,WAAW,cAAc;IAC9B;;OAEG;IACH,EAAE,EAAE,SAAS,CAAC;IACd;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;OAEG;IACH,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IACpB;;OAEG;IAC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B,QAAU;IACpC,6BAA6B,QAAU;IACvC,QAAQ,SAAU;IAClB,qBAAqB,SAAU;IAC/B,4BAA4B,SAAU;IACtC,kBAAkB,UAAU;CAC5B"} node_modules/discord-api-types/payloads/v8/interactions.js.map 0000664 00000000327 15114741631 0020555 0 ustar 00 {"version":3,"file":"interactions.js","sourceRoot":"","sources":["interactions.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAsBA,sEAAoD;AACpD,+DAA6C;AAC7C,uDAAqC;AACrC,oEAAkD;AAClD,8DAA4C;AAC5C,uDAAqC;AACrC,4DAA0C"} node_modules/discord-api-types/payloads/v8/webhook.js.map 0000664 00000000421 15114741631 0017504 0 ustar 00 {"version":3,"file":"webhook.js","sourceRoot":"","sources":["webhook.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AAiEH;;GAEG;AACH,IAAY,WAaX;AAbD,WAAY,WAAW;IACtB;;OAEG;IACH,qDAAY,CAAA;IACZ;;OAEG;IACH,mEAAe,CAAA;IACf;;OAEG;IACH,2DAAW,CAAA;AACZ,CAAC,EAbW,WAAW,2BAAX,WAAW,QAatB"} node_modules/discord-api-types/payloads/v8/teams.d.ts 0000664 00000003616 15114741631 0016650 0 ustar 00 /** * Types extracted from https://discord.com/developers/docs/topics/teams */ import type { Snowflake } from '../../globals'; import type { APIUser } from './user'; /** * https://discord.com/developers/docs/topics/teams#data-models-team-object * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export interface APITeam { /** * A hash of the image of the team's icon */ icon: string | null; /** * The unique id of the team */ id: Snowflake; /** * The members of the team */ members: APITeamMember[]; /** * The name of the team */ name: string; /** * The user id of the current team owner */ owner_user_id: Snowflake; } /** * https://discord.com/developers/docs/topics/teams#data-models-team-members-object * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export interface APITeamMember { /** * The user's membership state on the team * * See https://discord.com/developers/docs/topics/teams#data-models-membership-state-enum */ membership_state: TeamMemberMembershipState; /** * Will always be `["*"]` */ permissions: ['*']; /** * The id of the parent team of which they are a member */ team_id: Snowflake; /** * The avatar, discriminator, id, and username of the user * * See https://discord.com/developers/docs/resources/user#user-object */ user: APIUser; } /** * https://discord.com/developers/docs/topics/teams#data-models-membership-state-enum * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export declare enum TeamMemberMembershipState { Invited = 1, Accepted = 2 } //# sourceMappingURL=teams.d.ts.map node_modules/discord-api-types/payloads/v8/template.js.map 0000664 00000000160 15114741631 0017661 0 ustar 00 {"version":3,"file":"template.js","sourceRoot":"","sources":["template.ts"],"names":[],"mappings":";AAAA;;GAEG"} node_modules/discord-api-types/payloads/v8/teams.d.ts.map 0000664 00000001303 15114741631 0017413 0 ustar 00 {"version":3,"file":"teams.d.ts","sourceRoot":"","sources":["teams.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC/C,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,QAAQ,CAAC;AAEtC;;;;GAIG;AACH,MAAM,WAAW,OAAO;IACvB;;OAEG;IACH,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IACpB;;OAEG;IACH,EAAE,EAAE,SAAS,CAAC;IACd;;OAEG;IACH,OAAO,EAAE,aAAa,EAAE,CAAC;IACzB;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;OAEG;IACH,aAAa,EAAE,SAAS,CAAC;CACzB;AAED;;;;GAIG;AACH,MAAM,WAAW,aAAa;IAC7B;;;;OAIG;IACH,gBAAgB,EAAE,yBAAyB,CAAC;IAC5C;;OAEG;IACH,WAAW,EAAE,CAAC,GAAG,CAAC,CAAC;IACnB;;OAEG;IACH,OAAO,EAAE,SAAS,CAAC;IACnB;;;;OAIG;IACH,IAAI,EAAE,OAAO,CAAC;CACd;AAED;;;;GAIG;AACH,oBAAY,yBAAyB;IACpC,OAAO,IAAI;IACX,QAAQ,IAAA;CACR"} node_modules/discord-api-types/payloads/v8/oauth2.d.ts.map 0000664 00000001412 15114741631 0017505 0 ustar 00 {"version":3,"file":"oauth2.d.ts","sourceRoot":"","sources":["oauth2.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH;;GAEG;AACH,oBAAY,YAAY;IACvB;;OAEG;IACH,GAAG,QAAQ;IACX;;;;;OAKG;IACH,WAAW,gBAAgB;IAC3B;;;;OAIG;IACH,KAAK,UAAU;IACf;;;;OAIG;IACH,QAAQ,aAAa;IACrB;;;;;OAKG;IACH,MAAM,WAAW;IACjB;;;;;OAKG;IACH,UAAU,gBAAgB;IAC1B;;;;OAIG;IACH,iBAAiB,wBAAwB;IACzC;;;;OAIG;IACH,YAAY,aAAa;IACzB;;;OAGG;IACH,YAAY,kBAAkB;IAC9B;;OAEG;IACH,GAAG,QAAQ;IACX;;OAEG;IACH,oBAAoB,2BAA2B;IAC/C;;OAEG;IACH,eAAe,qBAAqB;IACpC;;OAEG;IACH,wBAAwB,+BAA+B;IACvD;;OAEG;IACH,sBAAsB,6BAA6B;IACnD;;OAEG;IACH,uBAAuB,8BAA8B;IACrD;;OAEG;IACH,wBAAwB,8BAA8B;IACtD;;OAEG;IACH,iBAAiB,uBAAuB;IACxC;;OAEG;IACH,cAAc,oBAAoB;IAClC;;;;OAIG;IACH,eAAe,qBAAqB;IACpC;;;;OAIG;IACH,oBAAoB,0BAA0B;IAC9C;;;;OAIG;IACH,0BAA0B,iCAAiC;CAC3D"} node_modules/discord-api-types/payloads/v8/channel.d.ts.map 0000664 00000027472 15114741631 0017731 0 ustar 00 {"version":3,"file":"channel.d.ts","sourceRoot":"","sources":["channel.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC5D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AACpD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAC/C,OAAO,KAA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BAAkB,GAAG,sBAAsB,CAAC;AAGvF;;GAEG;AACH,MAAM,MAAM,0BAA0B,GAAG,qBAAqB,CAAC"} node_modules/discord-api-types/payloads/v8/invite.js 0000664 00000001340 15114741631 0016571 0 ustar 00 "use strict"; /** * Types extracted from https://discord.com/developers/docs/resources/invite */ Object.defineProperty(exports, "__esModule", { value: true }); exports.InviteTargetType = void 0; /** * https://discord.com/developers/docs/resources/invite#invite-object-invite-target-types * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ var InviteTargetType; (function (InviteTargetType) { InviteTargetType[InviteTargetType["Stream"] = 1] = "Stream"; InviteTargetType[InviteTargetType["EmbeddedApplication"] = 2] = "EmbeddedApplication"; })(InviteTargetType || (exports.InviteTargetType = InviteTargetType = {})); //# sourceMappingURL=invite.js.map node_modules/discord-api-types/payloads/v8/channel.d.ts 0000664 00000113074 15114741631 0017147 0 ustar 00 /** * Types extracted from https://discord.com/developers/docs/resources/channel */ import type { Permissions, Snowflake } from '../../globals'; import type { APIApplication } from './application'; import type { APIPartialEmoji } from './emoji'; import type { APIGuildMember } from './guild'; import type { APIMessageInteraction } from './interactions'; import type { APIRole } from './permissions'; import type { APISticker, APIStickerItem } from './sticker'; import type { APIUser } from './user'; /** * Not documented, but partial only includes id, name, and type * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export interface APIPartialChannel { /** * The id of the channel */ id: Snowflake; /** * The type of the channel * * See https://discord.com/developers/docs/resources/channel#channel-object-channel-types */ type: ChannelType; /** * The name of the channel (2-100 characters) */ name?: string; } /** * This interface is used to allow easy extension for other channel types. While * also allowing `APIPartialChannel` to be used without breaking. * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export interface APIChannelBase<T extends ChannelType> extends APIPartialChannel { type: T; } /** * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type TextChannelType = ChannelType.DM | ChannelType.GroupDM | ChannelType.GuildNews | ChannelType.GuildText; /** * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type GuildChannelType = Exclude<ChannelType.GuildNews | ChannelType.GuildStageVoice | ChannelType.GuildStore | ChannelType.GuildVoice | TextChannelType, ChannelType.DM | ChannelType.GroupDM>; /** * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export interface APITextBasedChannel<T extends ChannelType> extends APIChannelBase<T> { /** * The id of the last message sent in this channel (may not point to an existing or valid message) */ last_message_id?: Snowflake | null; } /** * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export interface APIGuildChannel<T extends ChannelType> extends APIChannelBase<T> { /** * The id of the guild (may be missing for some channel objects received over gateway guild dispatches) */ guild_id?: Snowflake; /** * Explicit permission overwrites for members and roles * * See https://discord.com/developers/docs/resources/channel#overwrite-object */ permission_overwrites?: APIOverwrite[]; /** * Sorting position of the channel */ position: number; /** * ID of the parent category for a channel (each parent category can contain up to 50 channels) */ parent_id?: Snowflake | null; /** * Whether the channel is nsfw */ nsfw?: boolean; } /** * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type GuildTextChannelType = Exclude<TextChannelType, ChannelType.DM | ChannelType.GroupDM>; /** * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export interface APIGuildTextChannel<T extends GuildTextChannelType> extends APITextBasedChannel<T>, APIGuildChannel<T> { /** * The channel topic (0-1024 characters) */ topic?: string | null; /** * When the last pinned message was pinned. * This may be `null` in events such as `GUILD_CREATE` when a message is not pinned */ last_pin_timestamp?: string | null; } /** * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export interface APITextChannel extends APIGuildTextChannel<ChannelType.GuildText> { /** * Amount of seconds a user has to wait before sending another message (0-21600); * bots, as well as users with the permission `MANAGE_MESSAGES` or `MANAGE_CHANNELS`, are unaffected */ rate_limit_per_user?: number; } /** * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type APINewsChannel = APIGuildTextChannel<ChannelType.GuildNews>; /** * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type APIGuildCategoryChannel = APIGuildChannel<ChannelType.GuildCategory>; /** * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type APIGuildStoreChannel = APIGuildChannel<ChannelType.GuildStore>; /** * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export interface APIVoiceChannel extends APIGuildChannel<ChannelType.GuildStageVoice | ChannelType.GuildVoice> { /** * The bitrate (in bits) of the voice channel */ bitrate?: number; /** * The user limit of the voice channel */ user_limit?: number; /** * Voice region id for the voice or stage channel, automatic when set to `null` * * See https://discord.com/developers/docs/resources/voice#voice-region-object */ rtc_region?: string | null; /** * The camera video quality mode of the voice channel, `1` when not present * * See https://discord.com/developers/docs/resources/channel#channel-object-video-quality-modes */ video_quality_mode?: VideoQualityMode; } /** * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ interface APIDMChannelBase<T extends ChannelType> extends APITextBasedChannel<T> { /** * The recipients of the DM * * See https://discord.com/developers/docs/resources/user#user-object */ recipients?: APIUser[]; } /** * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type APIDMChannel = APIDMChannelBase<ChannelType.DM>; /** * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export interface APIGroupDMChannel extends APIDMChannelBase<ChannelType.GroupDM> { /** * Application id of the group DM creator if it is bot-created */ application_id?: Snowflake; /** * Icon hash */ icon?: string | null; /** * ID of the DM creator */ owner_id?: Snowflake; /** * The id of the last message sent in this channel (may not point to an existing or valid message) */ last_message_id?: Snowflake | null; } /** * https://discord.com/developers/docs/resources/channel#channel-object-channel-structure * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type APIChannel = APIDMChannel | APIGroupDMChannel | APIGuildCategoryChannel | APIGuildStoreChannel | APINewsChannel | APINewsChannel | APITextChannel | APIVoiceChannel; /** * https://discord.com/developers/docs/resources/channel#channel-object-channel-types * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export declare enum ChannelType { /** * A text channel within a guild */ GuildText = 0, /** * A direct message between users */ DM = 1, /** * A voice channel within a guild */ GuildVoice = 2, /** * A direct message between multiple users */ GroupDM = 3, /** * An organizational category that contains up to 50 channels * * See https://support.discord.com/hc/en-us/articles/115001580171-Channel-Categories-101 */ GuildCategory = 4, /** * A channel that users can follow and crosspost into their own guild * * See https://support.discord.com/hc/en-us/articles/360032008192 */ GuildNews = 5, /** * A channel in which game developers can sell their game on Discord * * See https://discord.com/developers/docs/game-and-server-management/special-channels */ GuildStore = 6, /** * A voice channel for hosting events with an audience * * See https://support.discord.com/hc/en-us/articles/1500005513722 */ GuildStageVoice = 13 } /** * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export declare enum VideoQualityMode { /** * Discord chooses the quality for optimal performance */ Auto = 1, /** * 720p */ Full = 2 } /** * https://discord.com/developers/docs/resources/channel#message-object-message-structure * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export interface APIMessage { /** * ID of the message */ id: Snowflake; /** * ID of the channel the message was sent in */ channel_id: Snowflake; /** * ID of the guild the message was sent in */ guild_id?: Snowflake; /** * The author of this message (only a valid user in the case where the message is generated by a user or bot user) * * If the message is generated by a webhook, the author object corresponds to the webhook's id, * username, and avatar. You can tell if a message is generated by a webhook by checking for the `webhook_id` property * * See https://discord.com/developers/docs/resources/user#user-object */ author: APIUser; /** * Member properties for this message's author * * The member object exists in `MESSAGE_CREATE` and `MESSAGE_UPDATE` events * from text-based guild channels * * See https://discord.com/developers/docs/resources/guild#guild-member-object */ member?: APIGuildMember; /** * Contents of the message */ content: string; /** * When this message was sent */ timestamp: string; /** * When this message was edited (or null if never) */ edited_timestamp: string | null; /** * Whether this was a TTS message */ tts: boolean; /** * Whether this message mentions everyone */ mention_everyone: boolean; /** * Users specifically mentioned in the message * * The `member` field is only present in `MESSAGE_CREATE` and `MESSAGE_UPDATE` events * from text-based guild channels * * See https://discord.com/developers/docs/resources/user#user-object * See https://discord.com/developers/docs/resources/guild#guild-member-object */ mentions: (APIUser & { member?: Omit<APIGuildMember, 'user'>; })[]; /** * Roles specifically mentioned in this message * * See https://discord.com/developers/docs/topics/permissions#role-object */ mention_roles: APIRole['id'][]; /** * Channels specifically mentioned in this message * * Not all channel mentions in a message will appear in `mention_channels`. * - Only textual channels that are visible to everyone in a lurkable guild will ever be included * - Only crossposted messages (via Channel Following) currently include `mention_channels` at all * * If no mentions in the message meet these requirements, this field will not be sent * * See https://discord.com/developers/docs/resources/channel#channel-mention-object */ mention_channels?: APIChannelMention[]; /** * Any attached files * * See https://discord.com/developers/docs/resources/channel#attachment-object */ attachments: APIAttachment[]; /** * Any embedded content * * See https://discord.com/developers/docs/resources/channel#embed-object */ embeds: APIEmbed[]; /** * Reactions to the message * * See https://discord.com/developers/docs/resources/channel#reaction-object */ reactions?: APIReaction[]; /** * A nonce that can be used for optimistic message sending (up to 25 characters) * * **You will not receive this from further fetches. This is received only once from a `MESSAGE_CREATE` * event to ensure it got sent** */ nonce?: number | string; /** * Whether this message is pinned */ pinned: boolean; /** * If the message is generated by a webhook, this is the webhook's id */ webhook_id?: Snowflake; /** * Type of message * * See https://discord.com/developers/docs/resources/channel#message-object-message-types */ type: MessageType; /** * Sent with Rich Presence-related chat embeds * * See https://discord.com/developers/docs/resources/channel#message-object-message-activity-structure */ activity?: APIMessageActivity; /** * Sent with Rich Presence-related chat embeds * * See https://discord.com/developers/docs/resources/channel#message-object-message-application-structure */ application?: Partial<APIApplication>; /** * If the message is a response to an Interaction, this is the id of the interaction's application */ application_id?: Snowflake; /** * Reference data sent with crossposted messages, replies, pins, and thread starter messages * * See https://discord.com/developers/docs/resources/channel#message-object-message-reference-structure */ message_reference?: APIMessageReference; /** * Message flags combined as a bitfield * * See https://discord.com/developers/docs/resources/channel#message-object-message-flags * * See https://en.wikipedia.org/wiki/Bit_field */ flags?: MessageFlags; /** * The message associated with the `message_reference` * * This field is only returned for messages with a `type` of `19` (REPLY). * * If the message is a reply but the `referenced_message` field is not present, * the backend did not attempt to fetch the message that was being replied to, * so its state is unknown. * * If the field exists but is `null`, the referenced message was deleted * * See https://discord.com/developers/docs/resources/channel#message-object */ referenced_message?: APIMessage | null; /** * Sent if the message is a response to an Interaction */ interaction?: APIMessageInteraction; /** * Sent if the message contains components like buttons, action rows, or other interactive components */ components?: APIActionRowComponent<APIMessageActionRowComponent>[]; /** * Sent if the message contains stickers * * See https://discord.com/developers/docs/resources/sticker#sticker-item-object */ sticker_items?: APIStickerItem[]; /** * The stickers sent with the message * * See https://discord.com/developers/docs/resources/sticker#sticker-object * * @deprecated Use `sticker_items` instead */ stickers?: APISticker[]; } /** * https://discord.com/developers/docs/resources/channel#message-object-message-types * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export declare enum MessageType { Default = 0, RecipientAdd = 1, RecipientRemove = 2, Call = 3, ChannelNameChange = 4, ChannelIconChange = 5, ChannelPinnedMessage = 6, GuildMemberJoin = 7, UserPremiumGuildSubscription = 8, UserPremiumGuildSubscriptionTier1 = 9, UserPremiumGuildSubscriptionTier2 = 10, UserPremiumGuildSubscriptionTier3 = 11, ChannelFollowAdd = 12, GuildDiscoveryDisqualified = 14, GuildDiscoveryRequalified = 15, GuildDiscoveryGracePeriodInitialWarning = 16, GuildDiscoveryGracePeriodFinalWarning = 17, Reply = 19, ChatInputCommand = 20, GuildInviteReminder = 22, ContextMenuCommand = 23 } /** * https://discord.com/developers/docs/resources/channel#message-object-message-activity-structure * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export interface APIMessageActivity { /** * Type of message activity * * See https://discord.com/developers/docs/resources/channel#message-object-message-activity-types */ type: MessageActivityType; /** * `party_id` from a Rich Presence event * * See https://discord.com/developers/docs/rich-presence/how-to#updating-presence-update-presence-payload-fields */ party_id?: string; } /** * https://discord.com/developers/docs/resources/channel#message-object-message-reference-structure * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export interface APIMessageReference { /** * ID of the originating message */ message_id?: Snowflake; /** * ID of the originating message's channel */ channel_id: Snowflake; /** * ID of the originating message's guild */ guild_id?: Snowflake; } /** * https://discord.com/developers/docs/resources/channel#message-object-message-activity-types * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export declare enum MessageActivityType { Join = 1, Spectate = 2, Listen = 3, JoinRequest = 5 } /** * https://discord.com/developers/docs/resources/channel#message-object-message-flags * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export declare enum MessageFlags { /** * This message has been published to subscribed channels (via Channel Following) */ Crossposted = 1, /** * This message originated from a message in another channel (via Channel Following) */ IsCrosspost = 2, /** * Do not include any embeds when serializing this message */ SuppressEmbeds = 4, /** * The source message for this crosspost has been deleted (via Channel Following) */ SourceMessageDeleted = 8, /** * This message came from the urgent message system */ Urgent = 16, /** * This message is only visible to the user who invoked the Interaction */ Ephemeral = 64, /** * This message is an Interaction Response and the bot is "thinking" */ Loading = 128 } /** * https://discord.com/developers/docs/resources/channel#followed-channel-object * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export interface APIFollowedChannel { /** * Source channel id */ channel_id: Snowflake; /** * Created target webhook id */ webhook_id: Snowflake; } /** * https://discord.com/developers/docs/resources/channel#reaction-object-reaction-structure * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export interface APIReaction { /** * Times this emoji has been used to react */ count: number; /** * Whether the current user reacted using this emoji */ me: boolean; /** * Emoji information * * See https://discord.com/developers/docs/resources/emoji#emoji-object */ emoji: APIPartialEmoji; } /** * https://discord.com/developers/docs/resources/channel#overwrite-object-overwrite-structure * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export interface APIOverwrite { /** * Role or user id */ id: Snowflake; /** * Either 0 (role) or 1 (member) * * {@link OverwriteType} */ type: OverwriteType; /** * Permission bit set * * See https://discord.com/developers/docs/topics/permissions#permissions-bitwise-permission-flags * * See https://en.wikipedia.org/wiki/Bit_field */ allow: Permissions; /** * Permission bit set * * See https://discord.com/developers/docs/topics/permissions#permissions-bitwise-permission-flags * * See https://en.wikipedia.org/wiki/Bit_field */ deny: Permissions; } /** * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export declare enum OverwriteType { Role = 0, Member = 1 } /** * https://discord.com/developers/docs/resources/channel#embed-object-embed-structure * * Length limit: 6000 characters * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export interface APIEmbed { /** * Title of embed * * Length limit: 256 characters */ title?: string; /** * Type of embed (always "rich" for webhook embeds) */ type?: EmbedType; /** * Description of embed * * Length limit: 4096 characters */ description?: string; /** * URL of embed */ url?: string; /** * Timestamp of embed content */ timestamp?: string; /** * Color code of the embed */ color?: number; /** * Footer information * * See https://discord.com/developers/docs/resources/channel#embed-object-embed-footer-structure */ footer?: APIEmbedFooter; /** * Image information * * See https://discord.com/developers/docs/resources/channel#embed-object-embed-image-structure */ image?: APIEmbedImage; /** * Thumbnail information * * See https://discord.com/developers/docs/resources/channel#embed-object-embed-thumbnail-structure */ thumbnail?: APIEmbedThumbnail; /** * Video information * * See https://discord.com/developers/docs/resources/channel#embed-object-embed-video-structure */ video?: APIEmbedVideo; /** * Provider information * * See https://discord.com/developers/docs/resources/channel#embed-object-embed-provider-structure */ provider?: APIEmbedProvider; /** * Author information * * See https://discord.com/developers/docs/resources/channel#embed-object-embed-author-structure */ author?: APIEmbedAuthor; /** * Fields information * * Length limit: 25 field objects * * See https://discord.com/developers/docs/resources/channel#embed-object-embed-field-structure */ fields?: APIEmbedField[]; } /** * https://discord.com/developers/docs/resources/channel#embed-object-embed-types * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export declare enum EmbedType { /** * Generic embed rendered from embed attributes */ Rich = "rich", /** * Image embed */ Image = "image", /** * Video embed */ Video = "video", /** * Animated gif image embed rendered as a video embed */ GIFV = "gifv", /** * Article embed */ Article = "article", /** * Link embed */ Link = "link" } /** * https://discord.com/developers/docs/resources/channel#embed-object-embed-thumbnail-structure * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export interface APIEmbedThumbnail { /** * Source url of thumbnail (only supports http(s) and attachments) */ url: string; /** * A proxied url of the thumbnail */ proxy_url?: string; /** * Height of thumbnail */ height?: number; /** * Width of thumbnail */ width?: number; } /** * https://discord.com/developers/docs/resources/channel#embed-object-embed-video-structure * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export interface APIEmbedVideo { /** * Source url of video */ url?: string; /** * Height of video */ height?: number; /** * Width of video */ width?: number; } /** * https://discord.com/developers/docs/resources/channel#embed-object-embed-image-structure * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export interface APIEmbedImage { /** * Source url of image (only supports http(s) and attachments) */ url: string; /** * A proxied url of the image */ proxy_url?: string; /** * Height of image */ height?: number; /** * Width of image */ width?: number; } /** * https://discord.com/developers/docs/resources/channel#embed-object-embed-provider-structure * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export interface APIEmbedProvider { /** * Name of provider */ name?: string; /** * URL of provider */ url?: string; } /** * https://discord.com/developers/docs/resources/channel#embed-object-embed-author-structure * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export interface APIEmbedAuthor { /** * Name of author * * Length limit: 256 characters */ name: string; /** * URL of author */ url?: string; /** * URL of author icon (only supports http(s) and attachments) */ icon_url?: string; /** * A proxied url of author icon */ proxy_icon_url?: string; } /** * https://discord.com/developers/docs/resources/channel#embed-object-embed-footer-structure * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export interface APIEmbedFooter { /** * Footer text * * Length limit: 2048 characters */ text: string; /** * URL of footer icon (only supports http(s) and attachments) */ icon_url?: string; /** * A proxied url of footer icon */ proxy_icon_url?: string; } /** * https://discord.com/developers/docs/resources/channel#embed-object-embed-field-structure * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export interface APIEmbedField { /** * Name of the field * * Length limit: 256 characters */ name: string; /** * Value of the field * * Length limit: 1024 characters */ value: string; /** * Whether or not this field should display inline */ inline?: boolean; } /** * https://discord.com/developers/docs/resources/channel#attachment-object-attachment-structure * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export interface APIAttachment { /** * Attachment id */ id: Snowflake; /** * Name of file attached */ filename: string; /** * Description for the file */ description?: string; /** * The attachment's media type * * See https://en.wikipedia.org/wiki/Media_type */ content_type?: string; /** * Size of file in bytes */ size: number; /** * Source url of file */ url: string; /** * A proxied url of file */ proxy_url: string; /** * Height of file (if image) */ height?: number | null; /** * Width of file (if image) */ width?: number | null; /** * Whether this attachment is ephemeral */ ephemeral?: boolean; } /** * https://discord.com/developers/docs/resources/channel#channel-mention-object-channel-mention-structure * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export interface APIChannelMention { /** * ID of the channel */ id: Snowflake; /** * ID of the guild containing the channel */ guild_id: Snowflake; /** * The type of channel * * See https://discord.com/developers/docs/resources/channel#channel-object-channel-types */ type: ChannelType; /** * The name of the channel */ name: string; } /** * https://discord.com/developers/docs/resources/channel#allowed-mentions-object-allowed-mention-types * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export declare enum AllowedMentionsTypes { /** * Controls @everyone and @here mentions */ Everyone = "everyone", /** * Controls role mentions */ Role = "roles", /** * Controls user mentions */ User = "users" } /** * https://discord.com/developers/docs/resources/channel#allowed-mentions-object-allowed-mentions-structure * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export interface APIAllowedMentions { /** * An array of allowed mention types to parse from the content * * See https://discord.com/developers/docs/resources/channel#allowed-mentions-object-allowed-mention-types */ parse?: AllowedMentionsTypes[]; /** * Array of role_ids to mention (Max size of 100) */ roles?: Snowflake[]; /** * Array of user_ids to mention (Max size of 100) */ users?: Snowflake[]; /** * For replies, whether to mention the author of the message being replied to (default false) * * @default false */ replied_user?: boolean; } /** * https://discord.com/developers/docs/interactions/message-components#component-object * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export interface APIBaseComponent<T extends ComponentType> { /** * The type of the component */ type: T; } /** * https://discord.com/developers/docs/interactions/message-components#component-types * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export declare enum ComponentType { /** * Action Row component */ ActionRow = 1, /** * Button component */ Button = 2, /** * Select Menu component */ SelectMenu = 3, /** * Text Input component */ TextInput = 4 } /** * https://discord.com/developers/docs/interactions/message-components#action-rows * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export interface APIActionRowComponent<T extends APIActionRowComponentTypes> extends APIBaseComponent<ComponentType.ActionRow> { /** * The components in the ActionRow */ components: T[]; } /** * https://discord.com/developers/docs/interactions/message-components#buttons */ interface APIButtonComponentBase<Style extends ButtonStyle> extends APIBaseComponent<ComponentType.Button> { /** * The label to be displayed on the button */ label?: string; /** * The style of the button */ style: Style; /** * The emoji to display to the left of the text */ emoji?: APIMessageComponentEmoji; /** * The status of the button */ disabled?: boolean; } /** * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export interface APIMessageComponentEmoji { /** * Emoji id */ id?: Snowflake; /** * Emoji name */ name?: string; /** * Whether this emoji is animated */ animated?: boolean; } /** * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export interface APIButtonComponentWithCustomId extends APIButtonComponentBase<ButtonStyle.Danger | ButtonStyle.Primary | ButtonStyle.Secondary | ButtonStyle.Success> { /** * The custom_id to be sent in the interaction when clicked */ custom_id: string; } /** * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export interface APIButtonComponentWithURL extends APIButtonComponentBase<ButtonStyle.Link> { /** * The URL to direct users to when clicked for Link buttons */ url: string; } /** * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type APIButtonComponent = APIButtonComponentWithCustomId | APIButtonComponentWithURL; /** * https://discord.com/developers/docs/interactions/message-components#button-object-button-styles * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export declare enum ButtonStyle { Primary = 1, Secondary = 2, Success = 3, Danger = 4, Link = 5 } /** * https://discord.com/developers/docs/interactions/message-components#text-inputs-text-input-styles * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export declare enum TextInputStyle { Short = 1, Paragraph = 2 } /** * https://discord.com/developers/docs/interactions/message-components#select-menus * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export interface APISelectMenuComponent extends APIBaseComponent<ComponentType.SelectMenu> { /** * A developer-defined identifier for the select menu, max 100 characters */ custom_id: string; /** * The choices in the select, max 25 */ options: APISelectMenuOption[]; /** * Custom placeholder text if nothing is selected, max 100 characters */ placeholder?: string; /** * The minimum number of items that must be chosen; min 0, max 25 * * @default 1 */ min_values?: number; /** * The maximum number of items that can be chosen; max 25 * * @default 1 */ max_values?: number; /** * Disable the select * * @default false */ disabled?: boolean; } /** * https://discord.com/developers/docs/interactions/message-components#select-menu-object-select-option-structure * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export interface APISelectMenuOption { /** * The user-facing name of the option (max 25 chars) */ label: string; /** * The dev-defined value of the option (max 100 chars) */ value: string; /** * An additional description of the option (max 50 chars) */ description?: string; /** * The emoji to display to the left of the option */ emoji?: APIMessageComponentEmoji; /** * Whether this option should be already-selected by default */ default?: boolean; } /** * https://discord.com/developers/docs/interactions/message-components#text-inputs-text-input-structure * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export interface APITextInputComponent extends APIBaseComponent<ComponentType.TextInput> { /** * One of text input styles */ style: TextInputStyle; /** * The custom id for the text input */ custom_id: string; /** * Text that appears on top of the text input field, max 45 characters */ label: string; /** * Placeholder for the text input */ placeholder?: string; /** * The pre-filled text in the text input */ value?: string; /** * Minimal length of text input */ min_length?: number; /** * Maximal length of text input */ max_length?: number; /** * Whether or not this text input is required or not */ required?: boolean; } /** * https://discord.com/developers/docs/interactions/message-components#message-components * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type APIMessageComponent = APIActionRowComponent<APIMessageActionRowComponent> | APIMessageActionRowComponent; /** * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type APIModalComponent = APIActionRowComponent<APIModalActionRowComponent> | APIModalActionRowComponent; /** * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type APIActionRowComponentTypes = APIMessageActionRowComponent | APIModalActionRowComponent; /** * https://discord.com/developers/docs/interactions/message-components#message-components * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type APIMessageActionRowComponent = APIButtonComponent | APISelectMenuComponent; /** * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type APIModalActionRowComponent = APITextInputComponent; export {}; //# sourceMappingURL=channel.d.ts.map node_modules/discord-api-types/payloads/v8/template.js 0000664 00000000310 15114741631 0017102 0 ustar 00 "use strict"; /** * Types extracted from https://discord.com/developers/docs/resources/template */ Object.defineProperty(exports, "__esModule", { value: true }); //# sourceMappingURL=template.js.map node_modules/discord-api-types/payloads/v8/sticker.js 0000664 00000002616 15114741631 0016746 0 ustar 00 "use strict"; /** * Types extracted from https://discord.com/developers/docs/resources/sticker */ Object.defineProperty(exports, "__esModule", { value: true }); exports.StickerFormatType = exports.StickerType = void 0; /** * https://discord.com/developers/docs/resources/sticker#sticker-object-sticker-types * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ var StickerType; (function (StickerType) { /** * An official sticker in a pack, part of Nitro or in a removed purchasable pack */ StickerType[StickerType["Standard"] = 1] = "Standard"; /** * A sticker uploaded to a Boosted guild for the guild's members */ StickerType[StickerType["Guild"] = 2] = "Guild"; })(StickerType || (exports.StickerType = StickerType = {})); /** * https://discord.com/developers/docs/resources/sticker#sticker-object-sticker-format-types * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ var StickerFormatType; (function (StickerFormatType) { StickerFormatType[StickerFormatType["PNG"] = 1] = "PNG"; StickerFormatType[StickerFormatType["APNG"] = 2] = "APNG"; StickerFormatType[StickerFormatType["Lottie"] = 3] = "Lottie"; })(StickerFormatType || (exports.StickerFormatType = StickerFormatType = {})); //# sourceMappingURL=sticker.js.map node_modules/discord-api-types/payloads/v8/guildScheduledEvent.d.ts.map 0000664 00000003661 15114741631 0022242 0 ustar 00 {"version":3,"file":"guildScheduledEvent.d.ts","sourceRoot":"","sources":["guildScheduledEvent.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC/C,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAC9C,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,QAAQ,CAAC;AAEtC;;GAEG;AACH,UAAU,0BAA0B,CAAC,IAAI,SAAS,6BAA6B;IAC9E;;OAEG;IACH,EAAE,EAAE,SAAS,CAAC;IACd;;OAEG;IACH,QAAQ,EAAE,SAAS,CAAC;IACpB;;OAEG;IACH,UAAU,EAAE,SAAS,GAAG,IAAI,CAAC;IAC7B;;OAEG;IACH,UAAU,CAAC,EAAE,SAAS,GAAG,IAAI,CAAC;IAC9B;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;OAEG;IACH,oBAAoB,EAAE,MAAM,CAAC;IAC7B;;OAEG;IACH,kBAAkB,EAAE,MAAM,GAAG,IAAI,CAAC;IAClC;;OAEG;IACH,aAAa,EAAE,+BAA+B,CAAC;IAC/C;;OAEG;IACH,MAAM,EAAE,yBAAyB,CAAC;IAClC;;OAEG;IACH,WAAW,EAAE,IAAI,CAAC;IAClB;;OAEG;IACH,SAAS,EAAE,SAAS,GAAG,IAAI,CAAC;IAC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CAAC;IACpC;;OAEG;IACH,IAAI,EAAE,OAAO,CAAC;IACd;;OAEG;IACH,MAAM,CAAC,EAAE,cAAc,CAAC;CACxB"} node_modules/discord-api-types/payloads/v8/guildScheduledEvent.js 0000664 00000004575 15114741631 0021237 0 ustar 00 "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.GuildScheduledEventPrivacyLevel = exports.GuildScheduledEventStatus = exports.GuildScheduledEventEntityType = void 0; /** * https://discord.com/developers/docs/resources/guild-scheduled-event#guild-scheduled-event-object-guild-scheduled-event-entity-types * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ var GuildScheduledEventEntityType; (function (GuildScheduledEventEntityType) { GuildScheduledEventEntityType[GuildScheduledEventEntityType["StageInstance"] = 1] = "StageInstance"; GuildScheduledEventEntityType[GuildScheduledEventEntityType["Voice"] = 2] = "Voice"; GuildScheduledEventEntityType[GuildScheduledEventEntityType["External"] = 3] = "External"; })(GuildScheduledEventEntityType || (exports.GuildScheduledEventEntityType = GuildScheduledEventEntityType = {})); /** * https://discord.com/developers/docs/resources/guild-scheduled-event#guild-scheduled-event-object-guild-scheduled-event-status * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ var GuildScheduledEventStatus; (function (GuildScheduledEventStatus) { GuildScheduledEventStatus[GuildScheduledEventStatus["Scheduled"] = 1] = "Scheduled"; GuildScheduledEventStatus[GuildScheduledEventStatus["Active"] = 2] = "Active"; GuildScheduledEventStatus[GuildScheduledEventStatus["Completed"] = 3] = "Completed"; GuildScheduledEventStatus[GuildScheduledEventStatus["Canceled"] = 4] = "Canceled"; })(GuildScheduledEventStatus || (exports.GuildScheduledEventStatus = GuildScheduledEventStatus = {})); /** * https://discord.com/developers/docs/resources/guild-scheduled-event#guild-scheduled-event-object-guild-scheduled-event-privacy-level * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ var GuildScheduledEventPrivacyLevel; (function (GuildScheduledEventPrivacyLevel) { /** * The scheduled event is only accessible to guild members */ GuildScheduledEventPrivacyLevel[GuildScheduledEventPrivacyLevel["GuildOnly"] = 2] = "GuildOnly"; })(GuildScheduledEventPrivacyLevel || (exports.GuildScheduledEventPrivacyLevel = GuildScheduledEventPrivacyLevel = {})); //# sourceMappingURL=guildScheduledEvent.js.map node_modules/discord-api-types/payloads/v8/sticker.js.map 0000664 00000000601 15114741631 0017512 0 ustar 00 {"version":3,"file":"sticker.js","sourceRoot":"","sources":["sticker.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AAmEH;;;;GAIG;AACH,IAAY,WASX;AATD,WAAY,WAAW;IACtB;;OAEG;IACH,qDAAY,CAAA;IACZ;;OAEG;IACH,+CAAK,CAAA;AACN,CAAC,EATW,WAAW,2BAAX,WAAW,QAStB;AAED;;;;GAIG;AACH,IAAY,iBAIX;AAJD,WAAY,iBAAiB;IAC5B,uDAAO,CAAA;IACP,yDAAI,CAAA;IACJ,6DAAM,CAAA;AACP,CAAC,EAJW,iBAAiB,iCAAjB,iBAAiB,QAI5B"} node_modules/discord-api-types/payloads/common.js 0000664 00000020501 15114741631 0016226 0 ustar 00 "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.PermissionFlagsBits = void 0; /** * @see {@link https://discord.com/developers/docs/topics/permissions#permissions-bitwise-permission-flags} * * These flags are exported as `BigInt`s and NOT numbers. Wrapping them in `Number()` * may cause issues, try to use BigInts as much as possible or modules that can * replicate them in some way */ exports.PermissionFlagsBits = { /** * Allows creation of instant invites * * Applies to channel types: Text, Voice, Stage */ CreateInstantInvite: 1n << 0n, /** * Allows kicking members */ KickMembers: 1n << 1n, /** * Allows banning members */ BanMembers: 1n << 2n, /** * Allows all permissions and bypasses channel permission overwrites */ Administrator: 1n << 3n, /** * Allows management and editing of channels * * Applies to channel types: Text, Voice, Stage */ ManageChannels: 1n << 4n, /** * Allows management and editing of the guild */ ManageGuild: 1n << 5n, /** * Allows for the addition of reactions to messages * * Applies to channel types: Text, Voice, Stage */ AddReactions: 1n << 6n, /** * Allows for viewing of audit logs */ ViewAuditLog: 1n << 7n, /** * Allows for using priority speaker in a voice channel * * Applies to channel types: Voice */ PrioritySpeaker: 1n << 8n, /** * Allows the user to go live * * Applies to channel types: Voice, Stage */ Stream: 1n << 9n, /** * Allows guild members to view a channel, which includes reading messages in text channels and joining voice channels * * Applies to channel types: Text, Voice, Stage */ ViewChannel: 1n << 10n, /** * Allows for sending messages in a channel and creating threads in a forum * (does not allow sending messages in threads) * * Applies to channel types: Text, Voice, Stage */ SendMessages: 1n << 11n, /** * Allows for sending of `/tts` messages * * Applies to channel types: Text, Voice, Stage */ SendTTSMessages: 1n << 12n, /** * Allows for deletion of other users messages * * Applies to channel types: Text, Voice, Stage */ ManageMessages: 1n << 13n, /** * Links sent by users with this permission will be auto-embedded * * Applies to channel types: Text, Voice, Stage */ EmbedLinks: 1n << 14n, /** * Allows for uploading images and files * * Applies to channel types: Text, Voice, Stage */ AttachFiles: 1n << 15n, /** * Allows for reading of message history * * Applies to channel types: Text, Voice, Stage */ ReadMessageHistory: 1n << 16n, /** * Allows for using the `@everyone` tag to notify all users in a channel, * and the `@here` tag to notify all online users in a channel * * Applies to channel types: Text, Voice, Stage */ MentionEveryone: 1n << 17n, /** * Allows the usage of custom emojis from other servers * * Applies to channel types: Text, Voice, Stage */ UseExternalEmojis: 1n << 18n, /** * Allows for viewing guild insights */ ViewGuildInsights: 1n << 19n, /** * Allows for joining of a voice channel * * Applies to channel types: Voice, Stage */ Connect: 1n << 20n, /** * Allows for speaking in a voice channel * * Applies to channel types: Voice */ Speak: 1n << 21n, /** * Allows for muting members in a voice channel * * Applies to channel types: Voice, Stage */ MuteMembers: 1n << 22n, /** * Allows for deafening of members in a voice channel * * Applies to channel types: Voice */ DeafenMembers: 1n << 23n, /** * Allows for moving of members between voice channels * * Applies to channel types: Voice, Stage */ MoveMembers: 1n << 24n, /** * Allows for using voice-activity-detection in a voice channel * * Applies to channel types: Voice */ UseVAD: 1n << 25n, /** * Allows for modification of own nickname */ ChangeNickname: 1n << 26n, /** * Allows for modification of other users nicknames */ ManageNicknames: 1n << 27n, /** * Allows management and editing of roles * * Applies to channel types: Text, Voice, Stage */ ManageRoles: 1n << 28n, /** * Allows management and editing of webhooks * * Applies to channel types: Text, Voice, Stage */ ManageWebhooks: 1n << 29n, /** * Allows management and editing of emojis, stickers, and soundboard sounds * * @deprecated This is the old name for {@link PermissionFlagsBits.ManageGuildExpressions} */ ManageEmojisAndStickers: 1n << 30n, /** * Allows for editing and deleting emojis, stickers, and soundboard sounds created by all users */ ManageGuildExpressions: 1n << 30n, /** * Allows members to use application commands, including slash commands and context menu commands * * Applies to channel types: Text, Voice, Stage */ UseApplicationCommands: 1n << 31n, /** * Allows for requesting to speak in stage channels * * Applies to channel types: Stage */ RequestToSpeak: 1n << 32n, /** * Allows for editing and deleting scheduled events created by all users * * Applies to channel types: Voice, Stage */ ManageEvents: 1n << 33n, /** * Allows for deleting and archiving threads, and viewing all private threads * * Applies to channel types: Text */ ManageThreads: 1n << 34n, /** * Allows for creating public and announcement threads * * Applies to channel types: Text */ CreatePublicThreads: 1n << 35n, /** * Allows for creating private threads * * Applies to channel types: Text */ CreatePrivateThreads: 1n << 36n, /** * Allows the usage of custom stickers from other servers * * Applies to channel types: Text, Voice, Stage */ UseExternalStickers: 1n << 37n, /** * Allows for sending messages in threads * * Applies to channel types: Text */ SendMessagesInThreads: 1n << 38n, /** * Allows for using Activities (applications with the {@link ApplicationFlags.Embedded} flag) in a voice channel * * Applies to channel types: Voice */ UseEmbeddedActivities: 1n << 39n, /** * Allows for timing out users to prevent them from sending or reacting to messages in chat and threads, * and from speaking in voice and stage channels */ ModerateMembers: 1n << 40n, /** * Allows for viewing role subscription insights */ ViewCreatorMonetizationAnalytics: 1n << 41n, /** * Allows for using soundboard in a voice channel * * Applies to channel types: Voice */ UseSoundboard: 1n << 42n, /** * Allows for creating emojis, stickers, and soundboard sounds, and editing and deleting those created by the current user */ CreateGuildExpressions: 1n << 43n, /** * Allows for creating scheduled events, and editing and deleting those created by the current user * * Applies to channel types: Voice, Stage */ CreateEvents: 1n << 44n, /** * Allows the usage of custom soundboard sounds from other servers * * Applies to channel types: Voice */ UseExternalSounds: 1n << 45n, /** * Allows sending voice messages * * Applies to channel types: Text, Voice, Stage */ SendVoiceMessages: 1n << 46n, /** * Allows sending polls * * Applies to channel types: Text, Voice, Stage */ SendPolls: 1n << 49n, /** * Allows user-installed apps to send public responses. When disabled, users will still be allowed to use their apps but the responses will be ephemeral. This only applies to apps not also installed to the server * * Applies to channel types: Text, Voice, Stage */ UseExternalApps: 1n << 50n, }; /** * Freeze the object of bits, preventing any modifications to it * * @internal */ Object.freeze(exports.PermissionFlagsBits); //# sourceMappingURL=common.js.map node_modules/discord-api-types/payloads/v6/user.js.map 0000664 00000001257 15114741631 0017032 0 ustar 00 {"version":3,"file":"user.js","sourceRoot":"","sources":["user.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AAyBH;;;;GAIG;AACH,IAAY,SAeX;AAfD,WAAY,SAAS;IACpB,yCAAQ,CAAA;IACR,+DAAwB,CAAA;IACxB,yEAA6B,CAAA;IAC7B,6EAA+B,CAAA;IAC/B,+DAAwB,CAAA;IACxB,4EAA8B,CAAA;IAC9B,mFAAiC,CAAA;IACjC,6EAA8B,CAAA;IAC9B,+DAAuB,CAAA;IACvB,oDAAkB,CAAA;IAClB,gDAAgB,CAAA;IAChB,mEAAyB,CAAA;IACzB,2DAAqB,CAAA;IACrB,wFAAmC,CAAA;AACpC,CAAC,EAfW,SAAS,yBAAT,SAAS,QAepB;AAED;;;;GAIG;AACH,IAAY,eAIX;AAJD,WAAY,eAAe;IAC1B,qDAAI,CAAA;IACJ,qEAAY,CAAA;IACZ,uDAAK,CAAA;AACN,CAAC,EAJW,eAAe,+BAAf,eAAe,QAI1B;AAmBD;;GAEG;AACH,IAAY,oBAGX;AAHD,WAAY,oBAAoB;IAC/B,+DAAI,CAAA;IACJ,uEAAQ,CAAA;AACT,CAAC,EAHW,oBAAoB,oCAApB,oBAAoB,QAG/B"} node_modules/discord-api-types/payloads/v6/emoji.js 0000664 00000000302 15114741631 0016371 0 ustar 00 "use strict"; /** * Types extracted from https://discord.com/developers/docs/resources/emoji */ Object.defineProperty(exports, "__esModule", { value: true }); //# sourceMappingURL=emoji.js.map node_modules/discord-api-types/payloads/v6/index.d.ts.map 0000664 00000000533 15114741631 0017413 0 ustar 00 {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAC;AAC3B,cAAc,WAAW,CAAC;AAC1B,cAAc,SAAS,CAAC;AACxB,cAAc,WAAW,CAAC;AAC1B,cAAc,SAAS,CAAC;AACxB,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,eAAe,CAAC;AAC9B,cAAc,SAAS,CAAC;AACxB,cAAc,QAAQ,CAAC;AACvB,cAAc,SAAS,CAAC;AACxB,cAAc,WAAW,CAAC"} node_modules/discord-api-types/payloads/v6/oauth2.js.map 0000664 00000000154 15114741631 0017251 0 ustar 00 {"version":3,"file":"oauth2.js","sourceRoot":"","sources":["oauth2.ts"],"names":[],"mappings":";AAAA;;GAEG"} node_modules/discord-api-types/payloads/v6/channel.js.map 0000664 00000002440 15114741631 0017457 0 ustar 00 {"version":3,"file":"channel.js","sourceRoot":"","sources":["channel.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AAyCH;;;;GAIG;AACH,IAAY,WAQX;AARD,WAAY,WAAW;IACtB,yDAAc,CAAA;IACd,yCAAE,CAAA;IACF,2DAAW,CAAA;IACX,qDAAQ,CAAA;IACR,iEAAc,CAAA;IACd,yDAAU,CAAA;IACV,2DAAW,CAAA;AACZ,CAAC,EARW,WAAW,2BAAX,WAAW,QAQtB;AAmCD;;;;GAIG;AACH,IAAY,WAkBX;AAlBD,WAAY,WAAW;IACtB,mDAAO,CAAA;IACP,+DAAa,CAAA;IACb,qEAAgB,CAAA;IAChB,6CAAI,CAAA;IACJ,2EAAmB,CAAA;IACnB,2EAAmB,CAAA;IACnB,iFAAsB,CAAA;IACtB,uEAAiB,CAAA;IACjB,mGAA+B,CAAA;IAC/B,iHAAsC,CAAA;IACtC,kHAAsC,CAAA;IACtC,kHAAsC,CAAA;IACtC,0EAAkB,CAAA;IAClB,8FAAiC,CAAA;IACjC,4FAA2B,CAAA;IAC3B,8HAA4C,CAAA;IAC5C,0HAA0C,CAAA;AAC3C,CAAC,EAlBW,WAAW,2BAAX,WAAW,QAkBtB;AAoCD;;;;GAIG;AACH,IAAY,mBAKX;AALD,WAAY,mBAAmB;IAC9B,6DAAQ,CAAA;IACR,qEAAQ,CAAA;IACR,iEAAM,CAAA;IACN,6EAAgB,CAAA;AACjB,CAAC,EALW,mBAAmB,mCAAnB,mBAAmB,QAK9B;AAED;;;;GAIG;AACH,IAAY,YAMX;AAND,WAAY,YAAY;IACvB,6DAAoB,CAAA;IACpB,+DAAqB,CAAA;IACrB,qEAAwB,CAAA;IACxB,mFAA+B,CAAA;IAC/B,oDAAe,CAAA;AAChB,CAAC,EANW,YAAY,4BAAZ,YAAY,QAMvB;AAiCD;;GAEG;AACH,IAAY,aAGX;AAHD,WAAY,aAAa;IACxB,kCAAiB,CAAA;IACjB,8BAAa,CAAA;AACd,CAAC,EAHW,aAAa,6BAAb,aAAa,QAGxB;AAuBD;;;;GAIG;AACH,IAAY,SAOX;AAPD,WAAY,SAAS;IACpB,0BAAa,CAAA;IACb,4BAAe,CAAA;IACf,4BAAe,CAAA;IACf,0BAAa,CAAA;IACb,gCAAmB,CAAA;IACnB,0BAAa,CAAA;AACd,CAAC,EAPW,SAAS,yBAAT,SAAS,QAOpB"} node_modules/discord-api-types/payloads/v6/oauth2.d.ts 0000664 00000001500 15114741631 0016725 0 ustar 00 /** * Types extracted from https://discord.com/developers/docs/topics/oauth2 */ import type { APITeam } from './teams'; import type { APIUser } from './user'; /** * https://discord.com/developers/docs/topics/oauth2#get-current-application-information-response-structure * * @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8. */ export interface APIApplication { id: string; name: string; icon: string | null; description: string; rpc_origins?: string[]; bot_public: boolean; bot_require_code_grant: boolean; owner: APIUser; summary: string; verify_key: string; team: APITeam | null; guild_id?: string; primary_sku_id?: string; slug?: string; cover_image?: string; } //# sourceMappingURL=oauth2.d.ts.map node_modules/discord-api-types/payloads/v6/user.d.ts.map 0000664 00000002440 15114741631 0017261 0 ustar 00 {"version":3,"file":"user.d.ts","sourceRoot":"","sources":["user.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAC;AAEnD;;;;GAIG;AACH,MAAM,WAAW,OAAO;IACvB,EAAE,EAAE,MAAM,CAAC;IACX,QAAQ,EAAE,MAAM,CAAC;IACjB,aAAa,EAAE,MAAM,CAAC;IACtB,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,GAAG,CAAC,EAAE,OAAO,CAAC;IACd,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,YAAY,CAAC,EAAE,eAAe,CAAC;IAC/B,YAAY,CAAC,EAAE,SAAS,CAAC;CACzB;AAED;;;;GAIG;AACH,oBAAY,SAAS;IACpB,IAAI,IAAI;IACR,eAAe,IAAS;IACxB,oBAAoB,IAAS;IAC7B,sBAAsB,IAAS;IAC/B,eAAe,IAAS;IACxB,qBAAqB,KAAS;IAC9B,wBAAwB,MAAS;IACjC,qBAAqB,MAAS;IAC9B,cAAc,MAAS;IACvB,QAAQ,OAAU;IAClB,MAAM,OAAU;IAChB,eAAe,QAAU;IACzB,WAAW,QAAU;IACrB,yBAAyB,SAAU;CACnC;AAED;;;;GAIG;AACH,oBAAY,eAAe;IAC1B,IAAI,IAAA;IACJ,YAAY,IAAA;IACZ,KAAK,IAAA;CACL;AAED;;;;GAIG;AACH,MAAM,WAAW,aAAa;IAC7B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,YAAY,CAAC,EAAE,OAAO,CAAC,mBAAmB,CAAC,EAAE,CAAC;IAC9C,QAAQ,EAAE,OAAO,CAAC;IAClB,WAAW,EAAE,OAAO,CAAC;IACrB,aAAa,EAAE,OAAO,CAAC;IACvB,UAAU,EAAE,oBAAoB,CAAC;CACjC;AAED;;GAEG;AACH,oBAAY,oBAAoB;IAC/B,IAAI,IAAA;IACJ,QAAQ,IAAA;CACR"} node_modules/discord-api-types/payloads/v6/guild.d.ts.map 0000664 00000012172 15114741631 0017412 0 ustar 00 {"version":3,"file":"guild.d.ts","sourceRoot":"","sources":["guild.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AAC5C,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AACxC,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,WAAW,CAAC;AACvD,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAC7C,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,QAAQ,CAAC;AACtC,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC;AAEjD;;;;GAIG;AACH,MAAM,WAAW,mBAAmB;IACnC,EAAE,EAAE,MAAM,CAAC;IACX,WAAW,EAAE,OAAO,CAAC;CACrB;AAED;;GAEG;AACH,MAAM,WAAW,eAAgB,SAAQ,IAAI,CAAC,mBAAmB,EAAE,aAAa,CAAC,EAAE,IAAI,CAAC,QAAQ,EAAE,gBAAgB,CAAC;IAClH,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,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,IAAI,EAAE,OAAO,CAAC;CACd;AAED;;;;GAIG;AACH,oBAAY,gBAAgB;IAC3B,OAAO,YAAY;IACnB,OAAO,YAAY;IACnB,OAAO,YAAY;IACnB,OAAO,YAAY;IACnB,MAAM,WAAW;CACjB;AAED;;GAEG;AACH,MAAM,WAAW,qBAAqB;IACrC,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,gBAAgB,EAAE,4BAA4B,EAAE,CAAC;CACjD;AAED;;GAEG;AACH,MAAM,WAAW,4BAA4B;IAC5C,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;CAC1B"} node_modules/discord-api-types/payloads/v6/permissions.js.map 0000664 00000001573 15114741631 0020430 0 ustar 00 {"version":3,"file":"permissions.js","sourceRoot":"","sources":["permissions.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AAEH;;;;;;;;;GASG;AACU,QAAA,mBAAmB,GAAG;IAClC,qBAAqB,EAAE,EAAE;IACzB,YAAY,EAAE,EAAE;IAChB,WAAW,EAAE,EAAE;IACf,aAAa,EAAE,EAAE;IACjB,eAAe,EAAE,GAAG;IACpB,YAAY,EAAE,GAAG;IACjB,aAAa,EAAE,GAAG;IAClB,cAAc,EAAE,IAAI;IACpB,gBAAgB,EAAE,IAAI;IACtB,MAAM,EAAE,IAAI;IACZ,YAAY,EAAE,KAAM;IACpB,aAAa,EAAE,KAAM;IACrB,iBAAiB,EAAE,KAAM;IACzB,eAAe,EAAE,KAAM;IACvB,WAAW,EAAE,MAAO;IACpB,YAAY,EAAE,MAAO;IACrB,oBAAoB,EAAE,MAAO;IAC7B,gBAAgB,EAAE,OAAQ;IAC1B,mBAAmB,EAAE,OAAQ;IAC7B,mBAAmB,EAAE,OAAQ;IAC7B,OAAO,EAAE,QAAU;IACnB,KAAK,EAAE,QAAU;IACjB,YAAY,EAAE,QAAU;IACxB,cAAc,EAAE,QAAU;IAC1B,YAAY,EAAE,SAAW;IACzB,OAAO,EAAE,SAAW;IACpB,eAAe,EAAE,SAAW;IAC5B,gBAAgB,EAAE,UAAY;IAC9B,YAAY,EAAE,UAAY;IAC1B,eAAe,EAAE,UAAY;IAC7B,aAAa,EAAE,WAAc;CACpB,CAAC;AAEX;;;;GAIG;AACH,MAAM,CAAC,MAAM,CAAC,2BAAmB,CAAC,CAAC"} node_modules/discord-api-types/payloads/v6/gateway.js 0000664 00000004063 15114741631 0016737 0 ustar 00 "use strict"; /** * Types extracted from https://discord.com/developers/docs/topics/gateway */ Object.defineProperty(exports, "__esModule", { value: true }); exports.ActivityFlags = exports.ActivityType = exports.PresenceUpdateStatus = void 0; /** * @deprecated API v6 is deprecated and the types will not receive further updates, please update to v8. */ var PresenceUpdateStatus; (function (PresenceUpdateStatus) { PresenceUpdateStatus["DoNotDisturb"] = "dnd"; PresenceUpdateStatus["Idle"] = "idle"; PresenceUpdateStatus["Invisible"] = "invisible"; PresenceUpdateStatus["Offline"] = "offline"; PresenceUpdateStatus["Online"] = "online"; })(PresenceUpdateStatus || (exports.PresenceUpdateStatus = PresenceUpdateStatus = {})); /** * https://discord.com/developers/docs/topics/gateway#activity-object-activity-types * * @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8. */ var ActivityType; (function (ActivityType) { ActivityType[ActivityType["Game"] = 0] = "Game"; ActivityType[ActivityType["Streaming"] = 1] = "Streaming"; ActivityType[ActivityType["Listening"] = 2] = "Listening"; ActivityType[ActivityType["Custom"] = 4] = "Custom"; ActivityType[ActivityType["Competing"] = 5] = "Competing"; })(ActivityType || (exports.ActivityType = ActivityType = {})); /** * https://discord.com/developers/docs/topics/gateway#activity-object-activity-flags * * @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8. */ var ActivityFlags; (function (ActivityFlags) { ActivityFlags[ActivityFlags["INSTANCE"] = 1] = "INSTANCE"; ActivityFlags[ActivityFlags["JOIN"] = 2] = "JOIN"; ActivityFlags[ActivityFlags["SPECTATE"] = 4] = "SPECTATE"; ActivityFlags[ActivityFlags["JOIN_REQUEST"] = 8] = "JOIN_REQUEST"; ActivityFlags[ActivityFlags["SYNC"] = 16] = "SYNC"; ActivityFlags[ActivityFlags["PLAY"] = 32] = "PLAY"; })(ActivityFlags || (exports.ActivityFlags = ActivityFlags = {})); //# sourceMappingURL=gateway.js.map node_modules/discord-api-types/payloads/v6/emoji.js.map 0000664 00000000152 15114741631 0017150 0 ustar 00 {"version":3,"file":"emoji.js","sourceRoot":"","sources":["emoji.ts"],"names":[],"mappings":";AAAA;;GAEG"} node_modules/discord-api-types/payloads/v6/gateway.d.ts 0000664 00000012150 15114741631 0017167 0 ustar 00 /** * Types extracted from https://discord.com/developers/docs/topics/gateway */ import type { APIEmoji } from './emoji'; import type { APIUser } from './user'; /** * https://discord.com/developers/docs/topics/gateway#get-gateway * * @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8. */ export interface APIGatewayInfo { url: string; } /** * https://discord.com/developers/docs/topics/gateway#get-gateway-bot * * @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8. */ export interface APIGatewayBotInfo extends APIGatewayInfo { shards: number; session_start_limit: APIGatewaySessionStartLimit; } /** * https://discord.com/developers/docs/topics/gateway#session-start-limit-object * * @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8. */ export interface APIGatewaySessionStartLimit { total: number; remaining: number; reset_after: number; } /** * https://discord.com/developers/docs/topics/gateway#presence-update-presence-update-event-fields * * @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8. */ export interface GatewayPresenceUpdate { user: Partial<APIUser> & { id: string; }; roles?: string[]; game?: GatewayActivity | null; guild_id?: string; status?: PresenceUpdateStatus; activities?: GatewayActivity[]; client_status?: GatewayPresenceClientStatus; premium_since?: string | null; nick?: string | null; } /** * @deprecated API v6 is deprecated and the types will not receive further updates, please update to v8. */ export declare enum PresenceUpdateStatus { DoNotDisturb = "dnd", Idle = "idle", Invisible = "invisible", Offline = "offline", Online = "online" } /** * https://discord.com/developers/docs/topics/gateway#client-status-object * * @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8. */ export type GatewayPresenceClientStatus = Partial<Record<'desktop' | 'mobile' | 'web', PresenceUpdateStatus>>; /** * https://discord.com/developers/docs/topics/gateway#activity-object * * @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8. */ export interface GatewayActivity { name: string; type: ActivityType; url?: string | null; created_at: number; timestamps?: GatewayActivityTimestamps; application_id?: string; details?: string | null; state?: string | null; emoji?: GatewayActivityEmoji; party?: GatewayActivityParty; assets?: GatewayActivityAssets; secrets?: GatewayActivitySecrets; instance?: boolean; flags?: ActivityFlags; } /** * https://discord.com/developers/docs/topics/gateway#activity-object-activity-types * * @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8. */ export declare enum ActivityType { Game = 0, Streaming = 1, Listening = 2, Custom = 4, Competing = 5 } /** * https://discord.com/developers/docs/topics/gateway#activity-object-activity-timestamps * * @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8. */ export interface GatewayActivityTimestamps { start?: number; end?: number; } /** * https://discord.com/developers/docs/topics/gateway#activity-object-activity-emoji * * @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8. */ export type GatewayActivityEmoji = Partial<Pick<APIEmoji, 'animated' | 'name'>> & Pick<APIEmoji, 'id'>; /** * https://discord.com/developers/docs/topics/gateway#activity-object-activity-party * * @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8. */ export interface GatewayActivityParty { id?: string; size?: [currentSize: number, maxSize: number]; } /** * https://discord.com/developers/docs/topics/gateway#activity-object-activity-assets * * @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8. */ export type GatewayActivityAssets = Partial<Record<'large_image' | 'large_text' | 'small_image' | 'small_text', string>>; /** * https://discord.com/developers/docs/topics/gateway#activity-object-activity-secrets * * @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8. */ export type GatewayActivitySecrets = Partial<Record<'join' | 'match' | 'spectate', string>>; /** * https://discord.com/developers/docs/topics/gateway#activity-object-activity-flags * * @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8. */ export declare enum ActivityFlags { INSTANCE = 1, JOIN = 2, SPECTATE = 4, JOIN_REQUEST = 8, SYNC = 16, PLAY = 32 } //# sourceMappingURL=gateway.d.ts.map node_modules/discord-api-types/payloads/v6/webhook.d.ts 0000664 00000001734 15114741631 0017172 0 ustar 00 /** * Types extracted from https://discord.com/developers/docs/resources/webhook */ import type { APIPartialChannel } from './channel'; import type { APIPartialGuild } from './guild'; import type { APIUser } from './user'; /** * https://discord.com/developers/docs/resources/webhook#webhook-object * * @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8. */ export interface APIWebhook { id: string; type: WebhookType; guild_id?: string; channel_id: string; user?: APIUser; name: string | null; avatar: string | null; token?: string; source_guild?: APIPartialGuild; source_channel?: APIPartialChannel; application_id: string | null; } /** * @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8. */ export declare enum WebhookType { Incoming = 1, ChannelFollower = 2 } //# sourceMappingURL=webhook.d.ts.map node_modules/discord-api-types/payloads/v6/permissions.js 0000664 00000003405 15114741631 0017650 0 ustar 00 "use strict"; /** * Types extracted from https://discord.com/developers/docs/topics/permissions */ Object.defineProperty(exports, "__esModule", { value: true }); exports.PermissionFlagsBits = void 0; /** * https://discord.com/developers/docs/topics/permissions#permissions-bitwise-permission-flags * * These flags are exported as `BigInt`s and NOT numbers. For most of them, you can * convert them in a number by wrapping it in `Number()`, however be careful as any * further bits added may cause issues if done so. Try to use BigInts as much as possible * or modules that can replicate them in some way. * * @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8. */ exports.PermissionFlagsBits = { CREATE_INSTANT_INVITE: 1n, KICK_MEMBERS: 2n, BAN_MEMBERS: 4n, ADMINISTRATOR: 8n, MANAGE_CHANNELS: 16n, MANAGE_GUILD: 32n, ADD_REACTIONS: 64n, VIEW_AUDIT_LOG: 128n, PRIORITY_SPEAKER: 256n, STREAM: 512n, VIEW_CHANNEL: 1024n, SEND_MESSAGES: 2048n, SEND_TTS_MESSAGES: 4096n, MANAGE_MESSAGES: 8192n, EMBED_LINKS: 16384n, ATTACH_FILES: 32768n, READ_MESSAGE_HISTORY: 65536n, MENTION_EVERYONE: 131072n, USE_EXTERNAL_EMOJIS: 262144n, VIEW_GUILD_INSIGHTS: 524288n, CONNECT: 1048576n, SPEAK: 2097152n, MUTE_MEMBERS: 4194304n, DEAFEN_MEMBERS: 8388608n, MOVE_MEMBERS: 16777216n, USE_VAD: 33554432n, CHANGE_NICKNAME: 67108864n, MANAGE_NICKNAMES: 134217728n, MANAGE_ROLES: 268435456n, MANAGE_WEBHOOKS: 536870912n, MANAGE_EMOJIS: 1073741824n, }; /** * Freeze the object of bits, preventing any modifications to it. * * @internal */ Object.freeze(exports.PermissionFlagsBits); //# sourceMappingURL=permissions.js.map node_modules/discord-api-types/payloads/v6/channel.js 0000664 00000012057 15114741631 0016710 0 ustar 00 "use strict"; /** * Types extracted from https://discord.com/developers/docs/resources/channel */ Object.defineProperty(exports, "__esModule", { value: true }); exports.EmbedType = exports.OverwriteType = exports.MessageFlags = exports.MessageActivityType = exports.MessageType = exports.ChannelType = void 0; /** * https://discord.com/developers/docs/resources/channel#channel-object-channel-types * * @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8. */ var ChannelType; (function (ChannelType) { ChannelType[ChannelType["GUILD_TEXT"] = 0] = "GUILD_TEXT"; ChannelType[ChannelType["DM"] = 1] = "DM"; ChannelType[ChannelType["GUILD_VOICE"] = 2] = "GUILD_VOICE"; ChannelType[ChannelType["GROUP_DM"] = 3] = "GROUP_DM"; ChannelType[ChannelType["GUILD_CATEGORY"] = 4] = "GUILD_CATEGORY"; ChannelType[ChannelType["GUILD_NEWS"] = 5] = "GUILD_NEWS"; ChannelType[ChannelType["GUILD_STORE"] = 6] = "GUILD_STORE"; })(ChannelType || (exports.ChannelType = ChannelType = {})); /** * https://discord.com/developers/docs/resources/channel#message-object-message-types * * @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8. */ var MessageType; (function (MessageType) { MessageType[MessageType["DEFAULT"] = 0] = "DEFAULT"; MessageType[MessageType["RECIPIENT_ADD"] = 1] = "RECIPIENT_ADD"; MessageType[MessageType["RECIPIENT_REMOVE"] = 2] = "RECIPIENT_REMOVE"; MessageType[MessageType["CALL"] = 3] = "CALL"; MessageType[MessageType["CHANNEL_NAME_CHANGE"] = 4] = "CHANNEL_NAME_CHANGE"; MessageType[MessageType["CHANNEL_ICON_CHANGE"] = 5] = "CHANNEL_ICON_CHANGE"; MessageType[MessageType["CHANNEL_PINNED_MESSAGE"] = 6] = "CHANNEL_PINNED_MESSAGE"; MessageType[MessageType["GUILD_MEMBER_JOIN"] = 7] = "GUILD_MEMBER_JOIN"; MessageType[MessageType["USER_PREMIUM_GUILD_SUBSCRIPTION"] = 8] = "USER_PREMIUM_GUILD_SUBSCRIPTION"; MessageType[MessageType["USER_PREMIUM_GUILD_SUBSCRIPTION_TIER_1"] = 9] = "USER_PREMIUM_GUILD_SUBSCRIPTION_TIER_1"; MessageType[MessageType["USER_PREMIUM_GUILD_SUBSCRIPTION_TIER_2"] = 10] = "USER_PREMIUM_GUILD_SUBSCRIPTION_TIER_2"; MessageType[MessageType["USER_PREMIUM_GUILD_SUBSCRIPTION_TIER_3"] = 11] = "USER_PREMIUM_GUILD_SUBSCRIPTION_TIER_3"; MessageType[MessageType["CHANNEL_FOLLOW_ADD"] = 12] = "CHANNEL_FOLLOW_ADD"; MessageType[MessageType["GUILD_DISCOVERY_DISQUALIFIED"] = 14] = "GUILD_DISCOVERY_DISQUALIFIED"; MessageType[MessageType["GUILD_DISCOVERY_REQUALIFIED"] = 15] = "GUILD_DISCOVERY_REQUALIFIED"; MessageType[MessageType["GUILD_DISCOVERY_GRACE_PERIOD_INITIAL_WARNING"] = 16] = "GUILD_DISCOVERY_GRACE_PERIOD_INITIAL_WARNING"; MessageType[MessageType["GUILD_DISCOVERY_GRACE_PERIOD_FINAL_WARNING"] = 17] = "GUILD_DISCOVERY_GRACE_PERIOD_FINAL_WARNING"; })(MessageType || (exports.MessageType = MessageType = {})); /** * https://discord.com/developers/docs/resources/channel#message-object-message-activity-types * * @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8. */ var MessageActivityType; (function (MessageActivityType) { MessageActivityType[MessageActivityType["JOIN"] = 1] = "JOIN"; MessageActivityType[MessageActivityType["SPECTATE"] = 2] = "SPECTATE"; MessageActivityType[MessageActivityType["LISTEN"] = 3] = "LISTEN"; MessageActivityType[MessageActivityType["JOIN_REQUEST"] = 5] = "JOIN_REQUEST"; })(MessageActivityType || (exports.MessageActivityType = MessageActivityType = {})); /** * https://discord.com/developers/docs/resources/channel#message-object-message-flags * * @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8. */ var MessageFlags; (function (MessageFlags) { MessageFlags[MessageFlags["CROSSPOSTED"] = 1] = "CROSSPOSTED"; MessageFlags[MessageFlags["IS_CROSSPOST"] = 2] = "IS_CROSSPOST"; MessageFlags[MessageFlags["SUPPRESS_EMBEDS"] = 4] = "SUPPRESS_EMBEDS"; MessageFlags[MessageFlags["SOURCE_MESSAGE_DELETED"] = 8] = "SOURCE_MESSAGE_DELETED"; MessageFlags[MessageFlags["URGENT"] = 16] = "URGENT"; })(MessageFlags || (exports.MessageFlags = MessageFlags = {})); /** * @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8. */ var OverwriteType; (function (OverwriteType) { OverwriteType["Member"] = "member"; OverwriteType["Role"] = "role"; })(OverwriteType || (exports.OverwriteType = OverwriteType = {})); /** * https://discord.com/developers/docs/resources/channel#embed-object-embed-types * * @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8. */ var EmbedType; (function (EmbedType) { EmbedType["Rich"] = "rich"; EmbedType["Image"] = "image"; EmbedType["Video"] = "video"; EmbedType["GifV"] = "gifv"; EmbedType["Article"] = "article"; EmbedType["Link"] = "link"; })(EmbedType || (exports.EmbedType = EmbedType = {})); //# sourceMappingURL=channel.js.map node_modules/discord-api-types/payloads/v6/emoji.d.ts 0000664 00000001457 15114741631 0016641 0 ustar 00 /** * Types extracted from https://discord.com/developers/docs/resources/emoji */ import type { APIUser } from './user'; /** * Not documented but mentioned * * @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8. */ export interface APIPartialEmoji { id: string | null; name: string | null; animated?: boolean; } /** * https://discord.com/developers/docs/resources/emoji#emoji-object-emoji-structure * * @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8. */ export interface APIEmoji extends APIPartialEmoji { roles?: string[]; user?: APIUser; require_colons?: boolean; managed?: boolean; available?: boolean; } //# sourceMappingURL=emoji.d.ts.map node_modules/discord-api-types/payloads/v6/guild.js.map 0000664 00000003032 15114741631 0017151 0 ustar 00 {"version":3,"file":"guild.js","sourceRoot":"","sources":["guild.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AAkGH;;;;GAIG;AACH,IAAY,gCAGX;AAHD,WAAY,gCAAgC;IAC3C,uGAAY,CAAA;IACZ,yGAAa,CAAA;AACd,CAAC,EAHW,gCAAgC,gDAAhC,gCAAgC,QAG3C;AAED;;;;GAIG;AACH,IAAY,0BAIX;AAJD,WAAY,0BAA0B;IACrC,mFAAQ,CAAA;IACR,6GAAqB,CAAA;IACrB,yFAAW,CAAA;AACZ,CAAC,EAJW,0BAA0B,0CAA1B,0BAA0B,QAIrC;AAED;;;;GAIG;AACH,IAAY,aAGX;AAHD,WAAY,aAAa;IACxB,iDAAI,CAAA;IACJ,yDAAQ,CAAA;AACT,CAAC,EAHW,aAAa,6BAAb,aAAa,QAGxB;AAED;;;;GAIG;AACH,IAAY,sBAMX;AAND,WAAY,sBAAsB;IACjC,mEAAI,CAAA;IACJ,iEAAG,CAAA;IACH,uEAAM,CAAA;IACN,mEAAI,CAAA;IACJ,6EAAS,CAAA;AACV,CAAC,EANW,sBAAsB,sCAAtB,sBAAsB,QAMjC;AAED;;;;GAIG;AACH,IAAY,gBAKX;AALD,WAAY,gBAAgB;IAC3B,uDAAI,CAAA;IACJ,2DAAM,CAAA;IACN,2DAAM,CAAA;IACN,2DAAM,CAAA;AACP,CAAC,EALW,gBAAgB,gCAAhB,gBAAgB,QAK3B;AAED;;;;GAIG;AACH,IAAY,uBAGX;AAHD,WAAY,uBAAuB;IAClC,mHAAoC,CAAA;IACpC,yHAAuC,CAAA;AACxC,CAAC,EAHW,uBAAuB,uCAAvB,uBAAuB,QAGlC;AAED;;;;GAIG;AACH,IAAY,YAeX;AAfD,WAAY,YAAY;IACvB,+CAA+B,CAAA;IAC/B,iCAAiB,CAAA;IACjB,qCAAqB,CAAA;IACrB,uCAAuB,CAAA;IACvB,6CAA6B,CAAA;IAC7B,yCAAyB,CAAA;IACzB,+CAA+B,CAAA;IAC/B,6BAAa,CAAA;IACb,uCAAuB,CAAA;IACvB,+CAA+B,CAAA;IAC/B,yCAAyB,CAAA;IACzB,qCAAqB,CAAA;IACrB,2CAA2B,CAAA;IAC3B,iEAAiD,CAAA;AAClD,CAAC,EAfW,YAAY,4BAAZ,YAAY,QAevB;AAyED;;;;GAIG;AACH,IAAY,yBAGX;AAHD,WAAY,yBAAyB;IACpC,qFAAU,CAAA;IACV,yEAAI,CAAA;AACL,CAAC,EAHW,yBAAyB,yCAAzB,yBAAyB,QAGpC;AAoCD;;;;GAIG;AACH,IAAY,gBAMX;AAND,WAAY,gBAAgB;IAC3B,uCAAmB,CAAA;IACnB,uCAAmB,CAAA;IACnB,uCAAmB,CAAA;IACnB,uCAAmB,CAAA;IACnB,qCAAiB,CAAA;AAClB,CAAC,EANW,gBAAgB,gCAAhB,gBAAgB,QAM3B"} node_modules/discord-api-types/payloads/v6/auditLog.js 0000664 00000007110 15114741631 0017042 0 ustar 00 "use strict"; /** * Types extracted from https://discord.com/developers/docs/resources/audit-log */ Object.defineProperty(exports, "__esModule", { value: true }); exports.AuditLogOptionsType = exports.AuditLogEvent = void 0; /** * https://discord.com/developers/docs/resources/audit-log#audit-log-entry-object-audit-log-events * * @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8. */ var AuditLogEvent; (function (AuditLogEvent) { AuditLogEvent[AuditLogEvent["GUILD_UPDATE"] = 1] = "GUILD_UPDATE"; AuditLogEvent[AuditLogEvent["CHANNEL_CREATE"] = 10] = "CHANNEL_CREATE"; AuditLogEvent[AuditLogEvent["CHANNEL_UPDATE"] = 11] = "CHANNEL_UPDATE"; AuditLogEvent[AuditLogEvent["CHANNEL_DELETE"] = 12] = "CHANNEL_DELETE"; AuditLogEvent[AuditLogEvent["CHANNEL_OVERWRITE_CREATE"] = 13] = "CHANNEL_OVERWRITE_CREATE"; AuditLogEvent[AuditLogEvent["CHANNEL_OVERWRITE_UPDATE"] = 14] = "CHANNEL_OVERWRITE_UPDATE"; AuditLogEvent[AuditLogEvent["CHANNEL_OVERWRITE_DELETE"] = 15] = "CHANNEL_OVERWRITE_DELETE"; AuditLogEvent[AuditLogEvent["MEMBER_KICK"] = 20] = "MEMBER_KICK"; AuditLogEvent[AuditLogEvent["MEMBER_PRUNE"] = 21] = "MEMBER_PRUNE"; AuditLogEvent[AuditLogEvent["MEMBER_BAN_ADD"] = 22] = "MEMBER_BAN_ADD"; AuditLogEvent[AuditLogEvent["MEMBER_BAN_REMOVE"] = 23] = "MEMBER_BAN_REMOVE"; AuditLogEvent[AuditLogEvent["MEMBER_UPDATE"] = 24] = "MEMBER_UPDATE"; AuditLogEvent[AuditLogEvent["MEMBER_ROLE_UPDATE"] = 25] = "MEMBER_ROLE_UPDATE"; AuditLogEvent[AuditLogEvent["MEMBER_MOVE"] = 26] = "MEMBER_MOVE"; AuditLogEvent[AuditLogEvent["MEMBER_DISCONNECT"] = 27] = "MEMBER_DISCONNECT"; AuditLogEvent[AuditLogEvent["BOT_ADD"] = 28] = "BOT_ADD"; AuditLogEvent[AuditLogEvent["ROLE_CREATE"] = 30] = "ROLE_CREATE"; AuditLogEvent[AuditLogEvent["ROLE_UPDATE"] = 31] = "ROLE_UPDATE"; AuditLogEvent[AuditLogEvent["ROLE_DELETE"] = 32] = "ROLE_DELETE"; AuditLogEvent[AuditLogEvent["INVITE_CREATE"] = 40] = "INVITE_CREATE"; AuditLogEvent[AuditLogEvent["INVITE_UPDATE"] = 41] = "INVITE_UPDATE"; AuditLogEvent[AuditLogEvent["INVITE_DELETE"] = 42] = "INVITE_DELETE"; AuditLogEvent[AuditLogEvent["WEBHOOK_CREATE"] = 50] = "WEBHOOK_CREATE"; AuditLogEvent[AuditLogEvent["WEBHOOK_UPDATE"] = 51] = "WEBHOOK_UPDATE"; AuditLogEvent[AuditLogEvent["WEBHOOK_DELETE"] = 52] = "WEBHOOK_DELETE"; AuditLogEvent[AuditLogEvent["EMOJI_CREATE"] = 60] = "EMOJI_CREATE"; AuditLogEvent[AuditLogEvent["EMOJI_UPDATE"] = 61] = "EMOJI_UPDATE"; AuditLogEvent[AuditLogEvent["EMOJI_DELETE"] = 62] = "EMOJI_DELETE"; AuditLogEvent[AuditLogEvent["MESSAGE_DELETE"] = 72] = "MESSAGE_DELETE"; AuditLogEvent[AuditLogEvent["MESSAGE_BULK_DELETE"] = 73] = "MESSAGE_BULK_DELETE"; AuditLogEvent[AuditLogEvent["MESSAGE_PIN"] = 74] = "MESSAGE_PIN"; AuditLogEvent[AuditLogEvent["MESSAGE_UNPIN"] = 75] = "MESSAGE_UNPIN"; AuditLogEvent[AuditLogEvent["INTEGRATION_CREATE"] = 80] = "INTEGRATION_CREATE"; AuditLogEvent[AuditLogEvent["INTEGRATION_UPDATE"] = 81] = "INTEGRATION_UPDATE"; AuditLogEvent[AuditLogEvent["INTEGRATION_DELETE"] = 82] = "INTEGRATION_DELETE"; })(AuditLogEvent || (exports.AuditLogEvent = AuditLogEvent = {})); /** * @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8. */ var AuditLogOptionsType; (function (AuditLogOptionsType) { AuditLogOptionsType["Member"] = "member"; AuditLogOptionsType["Role"] = "role"; })(AuditLogOptionsType || (exports.AuditLogOptionsType = AuditLogOptionsType = {})); //# sourceMappingURL=auditLog.js.map node_modules/discord-api-types/payloads/v6/webhook.js 0000664 00000001116 15114741631 0016730 0 ustar 00 "use strict"; /** * Types extracted from https://discord.com/developers/docs/resources/webhook */ Object.defineProperty(exports, "__esModule", { value: true }); exports.WebhookType = void 0; /** * @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8. */ var WebhookType; (function (WebhookType) { WebhookType[WebhookType["Incoming"] = 1] = "Incoming"; WebhookType[WebhookType["ChannelFollower"] = 2] = "ChannelFollower"; })(WebhookType || (exports.WebhookType = WebhookType = {})); //# sourceMappingURL=webhook.js.map node_modules/discord-api-types/payloads/v6/teams.js.map 0000664 00000000346 15114741631 0017163 0 ustar 00 {"version":3,"file":"teams.js","sourceRoot":"","sources":["teams.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AA4BH;;;;GAIG;AACH,IAAY,yBAGX;AAHD,WAAY,yBAAyB;IACpC,+EAAW,CAAA;IACX,iFAAQ,CAAA;AACT,CAAC,EAHW,yBAAyB,yCAAzB,yBAAyB,QAGpC"} node_modules/discord-api-types/payloads/v6/voice.js 0000664 00000000302 15114741631 0016373 0 ustar 00 "use strict"; /** * Types extracted from https://discord.com/developers/docs/resources/voice */ Object.defineProperty(exports, "__esModule", { value: true }); //# sourceMappingURL=voice.js.map node_modules/discord-api-types/payloads/v6/guild.d.ts 0000664 00000023734 15114741631 0016644 0 ustar 00 /** * Types extracted from https://discord.com/developers/docs/resources/guild */ import type { APIChannel } from './channel'; import type { APIEmoji } from './emoji'; import type { GatewayPresenceUpdate } from './gateway'; import type { APIRole } from './permissions'; import type { APIUser } from './user'; import type { GatewayVoiceState } from './voice'; /** * https://discord.com/developers/docs/resources/guild#unavailable-guild-object * * @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8. */ export interface APIUnavailableGuild { id: string; unavailable: boolean; } /** * @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8. */ export interface APIPartialGuild extends Omit<APIUnavailableGuild, 'unavailable'>, Pick<APIGuild, 'welcome_screen'> { name: string; icon: string | null; splash: string | null; banner?: string | null; description?: string | null; features?: GuildFeature[]; verification_level?: GuildVerificationLevel; vanity_url_code?: string | null; unavailable?: boolean; } /** * @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8. */ export interface APIGuild extends APIPartialGuild { discovery_splash: string | null; owner?: boolean; owner_id: string; /** * @deprecated Use `permissions_new` instead */ permissions?: number; permissions_new?: string; region: string; afk_channel_id: string | null; afk_timeout: number; /** * @deprecated Use `widget_enabled` instead */ embed_enabled?: boolean; /** * @deprecated Use `widget_channel_id` instead */ embed_channel_id?: string | null; verification_level: GuildVerificationLevel; default_message_notifications: GuildDefaultMessageNotifications; explicit_content_filter: GuildExplicitContentFilter; roles: APIRole[]; emojis: APIEmoji[]; features: GuildFeature[]; mfa_level: GuildMFALevel; application_id: string | null; widget_enabled?: boolean; widget_channel_id?: string | null; system_channel_id: string | null; system_channel_flags: GuildSystemChannelFlags; rules_channel_id: string | null; joined_at?: string; large?: boolean; member_count?: number; voice_states?: Omit<GatewayVoiceState, 'guild_id'>[]; members?: APIGuildMember[]; channels?: APIChannel[]; presences?: GatewayPresenceUpdate[]; max_presences?: number | null; max_members?: number; vanity_url_code: string | null; description: string | null; banner: string | null; premium_tier: GuildPremiumTier; premium_subscription_count?: number; preferred_locale: string; public_updates_channel_id: string | null; max_video_channel_users?: number; /** * Returned by calling GET `/guilds/{guild.id}` with the query `with_counts` set to `true` */ approximate_member_count?: number; /** * Returned by calling GET `/guilds/{guild.id}` with the query `with_counts` set to `true` */ approximate_presence_count?: number; welcome_screen?: APIGuildWelcomeScreen; } /** * https://discord.com/developers/docs/resources/guild#guild-object-default-message-notification-level * * @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8. */ export declare enum GuildDefaultMessageNotifications { ALL_MESSAGES = 0, ONLY_MENTIONS = 1 } /** * https://discord.com/developers/docs/resources/guild#guild-object-explicit-content-filter-level * * @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8. */ export declare enum GuildExplicitContentFilter { DISABLED = 0, MEMBERS_WITHOUT_ROLES = 1, ALL_MEMBERS = 2 } /** * https://discord.com/developers/docs/resources/guild#guild-object-mfa-level * * @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8. */ export declare enum GuildMFALevel { NONE = 0, ELEVATED = 1 } /** * https://discord.com/developers/docs/resources/guild#guild-object-verification-level * * @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8. */ export declare enum GuildVerificationLevel { NONE = 0, LOW = 1, MEDIUM = 2, HIGH = 3, VERY_HIGH = 4 } /** * https://discord.com/developers/docs/resources/guild#guild-object-premium-tier * * @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8. */ export declare enum GuildPremiumTier { NONE = 0, TIER_1 = 1, TIER_2 = 2, TIER_3 = 3 } /** * https://discord.com/developers/docs/resources/guild#guild-object-system-channel-flags * * @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8. */ export declare enum GuildSystemChannelFlags { SUPPRESS_JOIN_NOTIFICATIONS = 1, SUPPRESS_PREMIUM_SUBSCRIPTIONS = 2 } /** * https://discord.com/developers/docs/resources/guild#guild-object-guild-features * * @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8. */ export declare enum GuildFeature { ANIMATED_ICON = "ANIMATED_ICON", BANNER = "BANNER", COMMERCE = "COMMERCE", COMMUNITY = "COMMUNITY", DISCOVERABLE = "DISCOVERABLE", FEATURABLE = "FEATURABLE", INVITE_SPLASH = "INVITE_SPLASH", NEWS = "NEWS", PARTNERED = "PARTNERED", RELAY_ENABLED = "RELAY_ENABLED", VANITY_URL = "VANITY_URL", VERIFIED = "VERIFIED", VIP_REGIONS = "VIP_REGIONS", WELCOME_SCREEN_ENABLED = "WELCOME_SCREEN_ENABLED" } /** * https://discord.com/developers/docs/resources/guild#guild-preview-object * * @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8. */ export interface APIGuildPreview { id: string; name: string; icon: string | null; splash: string | null; discovery_splash: string | null; emojis: APIEmoji[]; features: GuildFeature[]; approximate_member_count: number; approximate_presence_count: number; } /** * @deprecated Use `APIGuildWidgetSettings` instead * @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8. */ export type APIGuildWidget = APIGuildWidgetSettings; /** * https://discord.com/developers/docs/resources/guild#guild-widget-object * * @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8. */ export interface APIGuildWidgetSettings { enabled: boolean; channel_id: string | null; } /** * https://discord.com/developers/docs/resources/guild#guild-member-object * * @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8. */ export interface APIGuildMember { user?: APIUser; nick: string | null; roles: string[]; joined_at: string; premium_since?: string | null; deaf: boolean; mute: boolean; } /** * https://discord.com/developers/docs/resources/guild#integration-object * * @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8. */ export interface APIGuildIntegration { id: string; name: string; type: string; enabled: boolean; syncing: boolean; role_id: string; enable_emoticons?: boolean; expire_behavior: IntegrationExpireBehavior; expire_grace_period: number; user?: APIUser; account: APIIntegrationAccount; synced_at: string; subscriber_count: number; revoked: boolean; application?: APIGuildIntegrationApplication; } /** * https://discord.com/developers/docs/resources/guild#integration-object-integration-expire-behaviors * * @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8. */ export declare enum IntegrationExpireBehavior { RemoveRole = 0, Kick = 1 } /** * https://discord.com/developers/docs/resources/guild#integration-account-object * * @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8. */ export interface APIIntegrationAccount { id: string; name: string; } /** * https://discord.com/developers/docs/resources/guild#integration-application-object * * @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8. */ export interface APIGuildIntegrationApplication { id: string; name: string; icon: string | null; description: string; summary: string; bot?: APIUser; } /** * https://discord.com/developers/docs/resources/guild#ban-object * * @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8. */ export interface APIBan { reason: string | null; user: APIUser; } /** * https://discord.com/developers/docs/resources/guild#get-guild-widget-image-widget-style-options * * @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8. */ export declare enum GuildWidgetStyle { Banner1 = "banner1", Banner2 = "banner2", Banner3 = "banner3", Banner4 = "banner4", Shield = "shield" } /** * @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8. */ export interface APIGuildWelcomeScreen { description: string | null; welcome_channels: APIGuildWelcomeScreenChannel[]; } /** * @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8. */ export interface APIGuildWelcomeScreenChannel { channel_id: string; emoji_id: string | null; emoji_name: string | null; } //# sourceMappingURL=guild.d.ts.map node_modules/discord-api-types/payloads/v6/index.d.ts 0000664 00000000537 15114741631 0016643 0 ustar 00 export * from './auditLog'; export * from './channel'; export * from './emoji'; export * from './gateway'; export * from './guild'; export * from './invite'; export * from './oauth2'; export * from './permissions'; export * from './teams'; export * from './user'; export * from './voice'; export * from './webhook'; //# sourceMappingURL=index.d.ts.map node_modules/discord-api-types/payloads/v6/auditLog.js.map 0000664 00000001626 15114741631 0017624 0 ustar 00 {"version":3,"file":"auditLog.js","sourceRoot":"","sources":["auditLog.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AA0CH;;;;GAIG;AACH,IAAY,aA4CX;AA5CD,WAAY,aAAa;IACxB,iEAAgB,CAAA;IAEhB,sEAAmB,CAAA;IACnB,sEAAc,CAAA;IACd,sEAAc,CAAA;IACd,0FAAwB,CAAA;IACxB,0FAAwB,CAAA;IACxB,0FAAwB,CAAA;IAExB,gEAAgB,CAAA;IAChB,kEAAY,CAAA;IACZ,sEAAc,CAAA;IACd,4EAAiB,CAAA;IACjB,oEAAa,CAAA;IACb,8EAAkB,CAAA;IAClB,gEAAW,CAAA;IACX,4EAAiB,CAAA;IACjB,wDAAO,CAAA;IAEP,gEAAgB,CAAA;IAChB,gEAAW,CAAA;IACX,gEAAW,CAAA;IAEX,oEAAkB,CAAA;IAClB,oEAAa,CAAA;IACb,oEAAa,CAAA;IAEb,sEAAmB,CAAA;IACnB,sEAAc,CAAA;IACd,sEAAc,CAAA;IAEd,kEAAiB,CAAA;IACjB,kEAAY,CAAA;IACZ,kEAAY,CAAA;IAEZ,sEAAmB,CAAA;IACnB,gFAAmB,CAAA;IACnB,gEAAW,CAAA;IACX,oEAAa,CAAA;IAEb,8EAAuB,CAAA;IACvB,8EAAkB,CAAA;IAClB,8EAAkB,CAAA;AACnB,CAAC,EA5CW,aAAa,6BAAb,aAAa,QA4CxB;AAuED;;GAEG;AACH,IAAY,mBAGX;AAHD,WAAY,mBAAmB;IAC9B,wCAAiB,CAAA;IACjB,oCAAa,CAAA;AACd,CAAC,EAHW,mBAAmB,mCAAnB,mBAAmB,QAG9B"} node_modules/discord-api-types/payloads/v6/teams.js 0000664 00000001434 15114741631 0016406 0 ustar 00 "use strict"; /** * Types extracted from https://discord.com/developers/docs/topics/teams */ Object.defineProperty(exports, "__esModule", { value: true }); exports.TeamMemberMembershipState = void 0; /** * https://discord.com/developers/docs/topics/teams#data-models-membership-state-enum * * @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8. */ var TeamMemberMembershipState; (function (TeamMemberMembershipState) { TeamMemberMembershipState[TeamMemberMembershipState["INVITED"] = 1] = "INVITED"; TeamMemberMembershipState[TeamMemberMembershipState["ACCEPTED"] = 2] = "ACCEPTED"; })(TeamMemberMembershipState || (exports.TeamMemberMembershipState = TeamMemberMembershipState = {})); //# sourceMappingURL=teams.js.map node_modules/discord-api-types/payloads/v6/gateway.d.ts.map 0000664 00000004652 15114741631 0017753 0 ustar 00 {"version":3,"file":"gateway.d.ts","sourceRoot":"","sources":["gateway.ts"],"names":[],"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aAAa,GAAG,YAAY,EAAE,MAAM,CAAC,CAC3E,CAAC;AAEF;;;;GAIG;AACH,MAAM,MAAM,sBAAsB,GAAG,OAAO,CAAC,MAAM,CAAC,MAAM,GAAG,OAAO,GAAG,UAAU,EAAE,MAAM,CAAC,CAAC,CAAC;AAE5F;;;;GAIG;AACH,oBAAY,aAAa;IACxB,QAAQ,IAAS;IACjB,IAAI,IAAS;IACb,QAAQ,IAAS;IACjB,YAAY,IAAS;IACrB,IAAI,KAAS;IACb,IAAI,KAAS;CACb"} node_modules/discord-api-types/payloads/v6/voice.js.map 0000664 00000000152 15114741631 0017152 0 ustar 00 {"version":3,"file":"voice.js","sourceRoot":"","sources":["voice.ts"],"names":[],"mappings":";AAAA;;GAEG"} node_modules/discord-api-types/payloads/v6/user.js 0000664 00000004754 15114741631 0016263 0 ustar 00 "use strict"; /** * Types extracted from https://discord.com/developers/docs/resources/user */ Object.defineProperty(exports, "__esModule", { value: true }); exports.ConnectionVisibility = exports.UserPremiumType = exports.UserFlags = void 0; /** * https://discord.com/developers/docs/resources/user#user-object-user-flags * * @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8. */ var UserFlags; (function (UserFlags) { UserFlags[UserFlags["None"] = 0] = "None"; UserFlags[UserFlags["DiscordEmployee"] = 1] = "DiscordEmployee"; UserFlags[UserFlags["PartneredServerOwner"] = 2] = "PartneredServerOwner"; UserFlags[UserFlags["DiscordHypeSquadEvents"] = 4] = "DiscordHypeSquadEvents"; UserFlags[UserFlags["BugHunterLevel1"] = 8] = "BugHunterLevel1"; UserFlags[UserFlags["HypeSquadHouseBravery"] = 64] = "HypeSquadHouseBravery"; UserFlags[UserFlags["HypeSquadHouseBrilliance"] = 128] = "HypeSquadHouseBrilliance"; UserFlags[UserFlags["HypeSquadHouseBalance"] = 256] = "HypeSquadHouseBalance"; UserFlags[UserFlags["EarlySupporter"] = 512] = "EarlySupporter"; UserFlags[UserFlags["TeamUser"] = 1024] = "TeamUser"; UserFlags[UserFlags["System"] = 4096] = "System"; UserFlags[UserFlags["BugHunterLevel2"] = 16384] = "BugHunterLevel2"; UserFlags[UserFlags["VerifiedBot"] = 65536] = "VerifiedBot"; UserFlags[UserFlags["EarlyVerifiedBotDeveloper"] = 131072] = "EarlyVerifiedBotDeveloper"; })(UserFlags || (exports.UserFlags = UserFlags = {})); /** * https://discord.com/developers/docs/resources/user#user-object-premium-types * * @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8. */ var UserPremiumType; (function (UserPremiumType) { UserPremiumType[UserPremiumType["None"] = 0] = "None"; UserPremiumType[UserPremiumType["NitroClassic"] = 1] = "NitroClassic"; UserPremiumType[UserPremiumType["Nitro"] = 2] = "Nitro"; })(UserPremiumType || (exports.UserPremiumType = UserPremiumType = {})); /** * @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8. */ var ConnectionVisibility; (function (ConnectionVisibility) { ConnectionVisibility[ConnectionVisibility["None"] = 0] = "None"; ConnectionVisibility[ConnectionVisibility["Everyone"] = 1] = "Everyone"; })(ConnectionVisibility || (exports.ConnectionVisibility = ConnectionVisibility = {})); //# sourceMappingURL=user.js.map node_modules/discord-api-types/payloads/v6/guild.js 0000664 00000014423 15114741631 0016403 0 ustar 00 "use strict"; /** * Types extracted from https://discord.com/developers/docs/resources/guild */ Object.defineProperty(exports, "__esModule", { value: true }); exports.GuildWidgetStyle = exports.IntegrationExpireBehavior = exports.GuildFeature = exports.GuildSystemChannelFlags = exports.GuildPremiumTier = exports.GuildVerificationLevel = exports.GuildMFALevel = exports.GuildExplicitContentFilter = exports.GuildDefaultMessageNotifications = void 0; /** * https://discord.com/developers/docs/resources/guild#guild-object-default-message-notification-level * * @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8. */ var GuildDefaultMessageNotifications; (function (GuildDefaultMessageNotifications) { GuildDefaultMessageNotifications[GuildDefaultMessageNotifications["ALL_MESSAGES"] = 0] = "ALL_MESSAGES"; GuildDefaultMessageNotifications[GuildDefaultMessageNotifications["ONLY_MENTIONS"] = 1] = "ONLY_MENTIONS"; })(GuildDefaultMessageNotifications || (exports.GuildDefaultMessageNotifications = GuildDefaultMessageNotifications = {})); /** * https://discord.com/developers/docs/resources/guild#guild-object-explicit-content-filter-level * * @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8. */ var GuildExplicitContentFilter; (function (GuildExplicitContentFilter) { GuildExplicitContentFilter[GuildExplicitContentFilter["DISABLED"] = 0] = "DISABLED"; GuildExplicitContentFilter[GuildExplicitContentFilter["MEMBERS_WITHOUT_ROLES"] = 1] = "MEMBERS_WITHOUT_ROLES"; GuildExplicitContentFilter[GuildExplicitContentFilter["ALL_MEMBERS"] = 2] = "ALL_MEMBERS"; })(GuildExplicitContentFilter || (exports.GuildExplicitContentFilter = GuildExplicitContentFilter = {})); /** * https://discord.com/developers/docs/resources/guild#guild-object-mfa-level * * @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8. */ var GuildMFALevel; (function (GuildMFALevel) { GuildMFALevel[GuildMFALevel["NONE"] = 0] = "NONE"; GuildMFALevel[GuildMFALevel["ELEVATED"] = 1] = "ELEVATED"; })(GuildMFALevel || (exports.GuildMFALevel = GuildMFALevel = {})); /** * https://discord.com/developers/docs/resources/guild#guild-object-verification-level * * @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8. */ var GuildVerificationLevel; (function (GuildVerificationLevel) { GuildVerificationLevel[GuildVerificationLevel["NONE"] = 0] = "NONE"; GuildVerificationLevel[GuildVerificationLevel["LOW"] = 1] = "LOW"; GuildVerificationLevel[GuildVerificationLevel["MEDIUM"] = 2] = "MEDIUM"; GuildVerificationLevel[GuildVerificationLevel["HIGH"] = 3] = "HIGH"; GuildVerificationLevel[GuildVerificationLevel["VERY_HIGH"] = 4] = "VERY_HIGH"; })(GuildVerificationLevel || (exports.GuildVerificationLevel = GuildVerificationLevel = {})); /** * https://discord.com/developers/docs/resources/guild#guild-object-premium-tier * * @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8. */ var GuildPremiumTier; (function (GuildPremiumTier) { GuildPremiumTier[GuildPremiumTier["NONE"] = 0] = "NONE"; GuildPremiumTier[GuildPremiumTier["TIER_1"] = 1] = "TIER_1"; GuildPremiumTier[GuildPremiumTier["TIER_2"] = 2] = "TIER_2"; GuildPremiumTier[GuildPremiumTier["TIER_3"] = 3] = "TIER_3"; })(GuildPremiumTier || (exports.GuildPremiumTier = GuildPremiumTier = {})); /** * https://discord.com/developers/docs/resources/guild#guild-object-system-channel-flags * * @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8. */ var GuildSystemChannelFlags; (function (GuildSystemChannelFlags) { GuildSystemChannelFlags[GuildSystemChannelFlags["SUPPRESS_JOIN_NOTIFICATIONS"] = 1] = "SUPPRESS_JOIN_NOTIFICATIONS"; GuildSystemChannelFlags[GuildSystemChannelFlags["SUPPRESS_PREMIUM_SUBSCRIPTIONS"] = 2] = "SUPPRESS_PREMIUM_SUBSCRIPTIONS"; })(GuildSystemChannelFlags || (exports.GuildSystemChannelFlags = GuildSystemChannelFlags = {})); /** * https://discord.com/developers/docs/resources/guild#guild-object-guild-features * * @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8. */ var GuildFeature; (function (GuildFeature) { GuildFeature["ANIMATED_ICON"] = "ANIMATED_ICON"; GuildFeature["BANNER"] = "BANNER"; GuildFeature["COMMERCE"] = "COMMERCE"; GuildFeature["COMMUNITY"] = "COMMUNITY"; GuildFeature["DISCOVERABLE"] = "DISCOVERABLE"; GuildFeature["FEATURABLE"] = "FEATURABLE"; GuildFeature["INVITE_SPLASH"] = "INVITE_SPLASH"; GuildFeature["NEWS"] = "NEWS"; GuildFeature["PARTNERED"] = "PARTNERED"; GuildFeature["RELAY_ENABLED"] = "RELAY_ENABLED"; GuildFeature["VANITY_URL"] = "VANITY_URL"; GuildFeature["VERIFIED"] = "VERIFIED"; GuildFeature["VIP_REGIONS"] = "VIP_REGIONS"; GuildFeature["WELCOME_SCREEN_ENABLED"] = "WELCOME_SCREEN_ENABLED"; })(GuildFeature || (exports.GuildFeature = GuildFeature = {})); /** * https://discord.com/developers/docs/resources/guild#integration-object-integration-expire-behaviors * * @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8. */ var IntegrationExpireBehavior; (function (IntegrationExpireBehavior) { IntegrationExpireBehavior[IntegrationExpireBehavior["RemoveRole"] = 0] = "RemoveRole"; IntegrationExpireBehavior[IntegrationExpireBehavior["Kick"] = 1] = "Kick"; })(IntegrationExpireBehavior || (exports.IntegrationExpireBehavior = IntegrationExpireBehavior = {})); /** * https://discord.com/developers/docs/resources/guild#get-guild-widget-image-widget-style-options * * @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8. */ var GuildWidgetStyle; (function (GuildWidgetStyle) { GuildWidgetStyle["Banner1"] = "banner1"; GuildWidgetStyle["Banner2"] = "banner2"; GuildWidgetStyle["Banner3"] = "banner3"; GuildWidgetStyle["Banner4"] = "banner4"; GuildWidgetStyle["Shield"] = "shield"; })(GuildWidgetStyle || (exports.GuildWidgetStyle = GuildWidgetStyle = {})); //# sourceMappingURL=guild.js.map node_modules/discord-api-types/payloads/v6/oauth2.js 0000664 00000000301 15114741631 0016467 0 ustar 00 "use strict"; /** * Types extracted from https://discord.com/developers/docs/topics/oauth2 */ Object.defineProperty(exports, "__esModule", { value: true }); //# sourceMappingURL=oauth2.js.map node_modules/discord-api-types/payloads/v6/invite.d.ts.map 0000664 00000001423 15114741631 0017601 0 ustar 00 {"version":3,"file":"invite.d.ts","sourceRoot":"","sources":["invite.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,WAAW,CAAC;AACnD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAC/C,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,QAAQ,CAAC;AAEtC;;;;GAIG;AACH,MAAM,WAAW,SAAS;IACzB,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,CAAC,EAAE,eAAe,CAAC;IACxB,OAAO,CAAC,EAAE,QAAQ,CAAC,iBAAiB,CAAC,CAAC;IACtC,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,gBAAgB,CAAC,EAAE,oBAAoB,CAAC;IACxC,0BAA0B,CAAC,EAAE,MAAM,CAAC;IACpC,wBAAwB,CAAC,EAAE,MAAM,CAAC;CAClC;AAED;;;;GAIG;AACH,oBAAY,oBAAoB;IAC/B,MAAM,IAAI;CACV;AAED;;;;GAIG;AACH,MAAM,WAAW,iBAAkB,SAAQ,SAAS;IACnD,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,OAAO,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;CACnB"} node_modules/discord-api-types/payloads/v6/auditLog.d.ts 0000664 00000047315 15114741631 0017311 0 ustar 00 /** * Types extracted from https://discord.com/developers/docs/resources/audit-log */ import type { APIOverwrite, ChannelType } from './channel'; import type { APIGuildIntegration, GuildDefaultMessageNotifications, GuildExplicitContentFilter, GuildMFALevel, GuildVerificationLevel, IntegrationExpireBehavior } from './guild'; import type { APIRole } from './permissions'; import type { APIUser } from './user'; import type { APIWebhook } from './webhook'; /** * https://discord.com/developers/docs/resources/audit-log#audit-log-object-audit-log-structure * * @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8. */ export interface APIAuditLog { webhooks: APIWebhook[]; users: APIUser[]; audit_log_entries: APIAuditLogEntry[]; integrations: APIGuildIntegration[]; } /** * https://discord.com/developers/docs/resources/audit-log#audit-log-entry-object-audit-log-entry-structure * * @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8. */ export interface APIAuditLogEntry { target_id: string | null; changes?: APIAuditLogChange[]; user_id: string | null; id: string; action_type: AuditLogEvent; options?: APIAuditLogOptions; reason?: string; } /** * https://discord.com/developers/docs/resources/audit-log#audit-log-entry-object-audit-log-events * * @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8. */ export declare enum AuditLogEvent { GUILD_UPDATE = 1, CHANNEL_CREATE = 10, CHANNEL_UPDATE = 11, CHANNEL_DELETE = 12, CHANNEL_OVERWRITE_CREATE = 13, CHANNEL_OVERWRITE_UPDATE = 14, CHANNEL_OVERWRITE_DELETE = 15, MEMBER_KICK = 20, MEMBER_PRUNE = 21, MEMBER_BAN_ADD = 22, MEMBER_BAN_REMOVE = 23, MEMBER_UPDATE = 24, MEMBER_ROLE_UPDATE = 25, MEMBER_MOVE = 26, MEMBER_DISCONNECT = 27, BOT_ADD = 28, ROLE_CREATE = 30, ROLE_UPDATE = 31, ROLE_DELETE = 32, INVITE_CREATE = 40, INVITE_UPDATE = 41, INVITE_DELETE = 42, WEBHOOK_CREATE = 50, WEBHOOK_UPDATE = 51, WEBHOOK_DELETE = 52, EMOJI_CREATE = 60, EMOJI_UPDATE = 61, EMOJI_DELETE = 62, MESSAGE_DELETE = 72, MESSAGE_BULK_DELETE = 73, MESSAGE_PIN = 74, MESSAGE_UNPIN = 75, INTEGRATION_CREATE = 80, INTEGRATION_UPDATE = 81, INTEGRATION_DELETE = 82 } /** * https://discord.com/developers/docs/resources/audit-log#audit-log-entry-object-optional-audit-entry-info * * @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8. */ export interface APIAuditLogOptions { /** * Present from: * - MEMBER_PRUNE */ delete_member_days?: string; /** * Present from: * - MEMBER_PRUNE */ members_removed?: string; /** * Present from: * - MEMBER_MOVE * - MESSAGE_PIN * - MESSAGE_UNPIN * - MESSAGE_DELETE */ channel_id?: string; /** * Present from: * - MESSAGE_PIN * - MESSAGE_UNPIN */ message_id?: string; /** * Present from: * - MESSAGE_DELETE * - MESSAGE_BULK_DELETE * - MEMBER_DISCONNECT * - MEMBER_MOVE */ count?: string; /** * Present from: * - CHANNEL_OVERWRITE_CREATE * - CHANNEL_OVERWRITE_UPDATE * - CHANNEL_OVERWRITE_DELETE */ id?: string; /** * Present from: * - CHANNEL_OVERWRITE_CREATE * - CHANNEL_OVERWRITE_UPDATE * - CHANNEL_OVERWRITE_DELETE */ type: AuditLogOptionsType; /** * Present from: * - CHANNEL_OVERWRITE_CREATE * - CHANNEL_OVERWRITE_UPDATE * - CHANNEL_OVERWRITE_DELETE * * **Present only if the {@link APIAuditLogOptions#type entry type} is "role"** */ role_name?: string; } /** * @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8. */ export declare enum AuditLogOptionsType { Member = "member", Role = "role" } /** * https://discord.com/developers/docs/resources/audit-log#audit-log-change-object-audit-log-change-structure * * @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8. */ export type APIAuditLogChange = APIAuditLogChangeKey$Add | APIAuditLogChangeKey$Remove | APIAuditLogChangeKeyAFKChannelID | APIAuditLogChangeKeyAFKTimeout | APIAuditLogChangeKeyAllow | APIAuditLogChangeKeyAllowNew | APIAuditLogChangeKeyApplicationID | APIAuditLogChangeKeyAvatarHash | APIAuditLogChangeKeyBitrate | APIAuditLogChangeKeyChannelID | APIAuditLogChangeKeyCode | APIAuditLogChangeKeyColor | APIAuditLogChangeKeyDeaf | APIAuditLogChangeKeyDefaultMessageNotifications | APIAuditLogChangeKeyDeny | APIAuditLogChangeKeyDenyNew | APIAuditLogChangeKeyEnableEmoticons | APIAuditLogChangeKeyExpireBehavior | APIAuditLogChangeKeyExpireGracePeriod | APIAuditLogChangeKeyExplicitContentFilter | APIAuditLogChangeKeyHoist | APIAuditLogChangeKeyIconHash | APIAuditLogChangeKeyID | APIAuditLogChangeKeyInviterID | APIAuditLogChangeKeyMaxAge | APIAuditLogChangeKeyMaxUses | APIAuditLogChangeKeyMentionable | APIAuditLogChangeKeyMFALevel | APIAuditLogChangeKeyMute | APIAuditLogChangeKeyName | APIAuditLogChangeKeyNick | APIAuditLogChangeKeyNSFW | APIAuditLogChangeKeyOwnerID | APIAuditLogChangeKeyPermissionOverwrites | APIAuditLogChangeKeyPermissions | APIAuditLogChangeKeyPermissionsNew | APIAuditLogChangeKeyPosition | APIAuditLogChangeKeyPruneDeleteDays | APIAuditLogChangeKeyRateLimitPerUser | APIAuditLogChangeKeyRegion | APIAuditLogChangeKeySplashHash | APIAuditLogChangeKeySystemChannelID | APIAuditLogChangeKeyTemporary | APIAuditLogChangeKeyTopic | APIAuditLogChangeKeyType | APIAuditLogChangeKeyUses | APIAuditLogChangeKeyVanityURLCode | APIAuditLogChangeKeyVerificationLevel | APIAuditLogChangeKeyWidgetChannelID | APIAuditLogChangeKeyWidgetEnabled; /** * Returned when a guild's name is changed * * @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8. */ export type APIAuditLogChangeKeyName = AuditLogChangeData<'name', string>; /** * Returned when a guild's icon is changed * * @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8. */ export type APIAuditLogChangeKeyIconHash = AuditLogChangeData<'icon_hash', string>; /** * Returned when a guild's splash is changed * * @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8. */ export type APIAuditLogChangeKeySplashHash = AuditLogChangeData<'splash_hash', string>; /** * Returned when a guild's owner ID is changed * * @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8. */ export type APIAuditLogChangeKeyOwnerID = AuditLogChangeData<'owner_id', string>; /** * Returned when a guild's region is changed * * @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8. */ export type APIAuditLogChangeKeyRegion = AuditLogChangeData<'region', string>; /** * Returned when a guild's afk_channel_id is changed * * @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8. */ export type APIAuditLogChangeKeyAFKChannelID = AuditLogChangeData<'afk_channel_id', string>; /** * Returned when a guild's afk_timeout is changed * * @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8. */ export type APIAuditLogChangeKeyAFKTimeout = AuditLogChangeData<'afk_timeout', number>; /** * Returned when a guild's mfa_level is changed * * @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8. */ export type APIAuditLogChangeKeyMFALevel = AuditLogChangeData<'mfa_level', GuildMFALevel>; /** * Returned when a guild's verification_level is changed * * @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8. */ export type APIAuditLogChangeKeyVerificationLevel = AuditLogChangeData<'verification_level', GuildVerificationLevel>; /** * Returned when a guild's explicit_content_filter is changed * * @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8. */ export type APIAuditLogChangeKeyExplicitContentFilter = AuditLogChangeData<'explicit_content_filter', GuildExplicitContentFilter>; /** * Returned when a guild's default_message_notifications is changed * * @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8. */ export type APIAuditLogChangeKeyDefaultMessageNotifications = AuditLogChangeData<'default_message_notifications', GuildDefaultMessageNotifications>; /** * Returned when a guild's vanity_url_code is changed * * @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8. */ export type APIAuditLogChangeKeyVanityURLCode = AuditLogChangeData<'vanity_url_code', string>; /** * Returned when new role(s) are added * * @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8. */ export type APIAuditLogChangeKey$Add = AuditLogChangeData<'$add', APIRole[]>; /** * Returned when role(s) are removed * * @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8. */ export type APIAuditLogChangeKey$Remove = AuditLogChangeData<'$remove', APIRole[]>; /** * Returned when there is a change in number of days after which inactive and role-unassigned members are kicked * * @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8. */ export type APIAuditLogChangeKeyPruneDeleteDays = AuditLogChangeData<'prune_delete_days', number>; /** * Returned when a guild's widget is enabled * * @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8. */ export type APIAuditLogChangeKeyWidgetEnabled = AuditLogChangeData<'widget_enabled', boolean>; /** * Returned when a guild's widget_channel_id is changed * * @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8. */ export type APIAuditLogChangeKeyWidgetChannelID = AuditLogChangeData<'widget_channel_id', string>; /** * Returned when a guild's system_channel_id is changed * * @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8. */ export type APIAuditLogChangeKeySystemChannelID = AuditLogChangeData<'system_channel_id', string>; /** * Returned when a channel's position is changed * * @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8. */ export type APIAuditLogChangeKeyPosition = AuditLogChangeData<'position', number>; /** * Returned when a channel's topic is changed * * @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8. */ export type APIAuditLogChangeKeyTopic = AuditLogChangeData<'topic', string>; /** * Returned when a voice channel's bitrate is changed * * @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8. */ export type APIAuditLogChangeKeyBitrate = AuditLogChangeData<'bitrate', number>; /** * Returned when a channel's permission overwrites is changed * * @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8. */ export type APIAuditLogChangeKeyPermissionOverwrites = AuditLogChangeData<'permission_overwrites', APIOverwrite[]>; /** * Returned when a channel's NSFW restriction is changed * * @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8. */ export type APIAuditLogChangeKeyNSFW = AuditLogChangeData<'nsfw', boolean>; /** * The application ID of the added or removed Webhook or Bot * * @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8. */ export type APIAuditLogChangeKeyApplicationID = AuditLogChangeData<'application_id', string>; /** * Returned when a channel's amount of seconds a user has to wait before sending another message * is changed * * @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8. */ export type APIAuditLogChangeKeyRateLimitPerUser = AuditLogChangeData<'rate_limit_per_user', number>; /** * Returned when a permission bitfield is changed * * @deprecated Use `permissions_new` instead * @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8. */ export type APIAuditLogChangeKeyPermissions = AuditLogChangeData<'permissions', number>; /** * Returned when a permission bitfield is changed * * @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8. */ export type APIAuditLogChangeKeyPermissionsNew = AuditLogChangeData<'permissions_new', string>; /** * Returned when a role's color is changed * * @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8. */ export type APIAuditLogChangeKeyColor = AuditLogChangeData<'color', number>; /** * Returned when a role's hoist status is changed * * @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8. */ export type APIAuditLogChangeKeyHoist = AuditLogChangeData<'hoist', boolean>; /** * Returned when a role's mentionable status is changed * * @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8. */ export type APIAuditLogChangeKeyMentionable = AuditLogChangeData<'mentionable', boolean>; /** * Returned when an overwrite's allowed permissions bitfield is changed * * @deprecated Use `allow_new` instead * @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8. */ export type APIAuditLogChangeKeyAllow = AuditLogChangeData<'allow', number>; /** * Returned when an overwrite's allowed permissions bitfield is changed * * @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8. */ export type APIAuditLogChangeKeyAllowNew = AuditLogChangeData<'allow_new', string>; /** * Returned when an overwrite's denied permissions bitfield is changed * * @deprecated Use `deny_new` instead * @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8. */ export type APIAuditLogChangeKeyDeny = AuditLogChangeData<'deny', number>; /** * Returned when an overwrite's denied permissions bitfield is changed * * @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8. */ export type APIAuditLogChangeKeyDenyNew = AuditLogChangeData<'deny_new', string>; /** * Returned when an invite's code is changed * * @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8. */ export type APIAuditLogChangeKeyCode = AuditLogChangeData<'code', string>; /** * Returned when an invite's channel_id is changed * * @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8. */ export type APIAuditLogChangeKeyChannelID = AuditLogChangeData<'channel_id', string>; /** * Returned when an invite's inviter_id is changed * * @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8. */ export type APIAuditLogChangeKeyInviterID = AuditLogChangeData<'inviter_id', string>; /** * Returned when an invite's max_uses is changed * * @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8. */ export type APIAuditLogChangeKeyMaxUses = AuditLogChangeData<'max_uses', number>; /** * Returned when an invite's uses is changed * * @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8. */ export type APIAuditLogChangeKeyUses = AuditLogChangeData<'uses', number>; /** * Returned when an invite's max_age is changed * * @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8. */ export type APIAuditLogChangeKeyMaxAge = AuditLogChangeData<'max_age', number>; /** * Returned when an invite's temporary status is changed * * @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8. */ export type APIAuditLogChangeKeyTemporary = AuditLogChangeData<'temporary', boolean>; /** * Returned when a user's deaf status is changed * * @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8. */ export type APIAuditLogChangeKeyDeaf = AuditLogChangeData<'deaf', boolean>; /** * Returned when a user's mute status is changed * * @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8. */ export type APIAuditLogChangeKeyMute = AuditLogChangeData<'mute', boolean>; /** * Returned when a user's nick is changed * * @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8. */ export type APIAuditLogChangeKeyNick = AuditLogChangeData<'mute', boolean>; /** * Returned when a user's avatar_hash is changed * * @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8. */ export type APIAuditLogChangeKeyAvatarHash = AuditLogChangeData<'avatar_hash', string>; /** * The ID of the changed entity - sometimes used in conjunction with other keys * * @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8. */ export interface APIAuditLogChangeKeyID { key: 'id'; new_value: string; old_value?: string; } /** * The type of entity created * * @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8. */ export type APIAuditLogChangeKeyType = AuditLogChangeData<'type', ChannelType | string>; /** * Returned when an integration's enable_emoticons is changed * * @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8. */ export type APIAuditLogChangeKeyEnableEmoticons = AuditLogChangeData<'enable_emoticons', boolean>; /** * Returned when an integration's expire_behavior is changed * * @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8. */ export type APIAuditLogChangeKeyExpireBehavior = AuditLogChangeData<'expire_behavior', IntegrationExpireBehavior>; /** * Returned when an integration's expire_grace_period is changed * * @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8. */ export type APIAuditLogChangeKeyExpireGracePeriod = AuditLogChangeData<'expire_grace_period', number>; /** * @internal * @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8. */ interface AuditLogChangeData<K extends string, D> { key: K; new_value?: D; old_value?: D; } export {}; //# sourceMappingURL=auditLog.d.ts.map node_modules/discord-api-types/payloads/v6/auditLog.d.ts.map 0000664 00000015165 15114741631 0020063 0 ustar 00 {"version":3,"file":"auditLog.d.ts","sourceRoot":"","sources":["auditLog.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AAC3D,OAAO,KAAK,EACX,mBAAmB,EACnB,gCAAgC,EAChC,0BAA0B,EAC1B,aAAa,EACb,sBAAsB,EACtB,yBAAyB,EACzB,MAAM,SAAS,CAAC;AACjB,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAC7C,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,QAAQ,CAAC;AACtC,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AAE5C;;;;GAIG;AACH,MAAM,WAAW,WAAW;IAC3B,QAAQ,EAAE,UAAU,EAAE,CAAC;IACvB,KAAK,EAAE,OAAO,EAAE,CAAC;IACjB,iBAAiB,EAAE,gBAAgB,EAAE,CAAC;IACtC,YAAY,EAAE,mBAAmB,EAAE,CAAC;CACpC;AA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AAO,CAAC,CAAC;AAErF;;;;GAIG;AACH,MAAM,MAAM,wBAAwB,GAAG,kBAAkB,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;AAE3E;;;;GAIG;AACH,MAAM,MAAM,wBAAwB,GAAG,kBAAkB,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;AAE3E;;;;GAIG;AACH,MAAM,MAAM,wBAAwB,GAAG,kBAAkB,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;AAE3E;;;;GAIG;AACH,MAAM,MAAM,8BAA8B,GAAG,kBAAkB,CAAC,aAAa,EAAE,MAAM,CAAC,CAAC;AAEvF;;;;GAIG;AACH,MAAM,WAAW,sBAAsB;IACtC,GAAG,EAAE,IAAI,CAAC;IACV,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,CAAC;CACnB;AAED;;;;GAIG;AACH,MAAM,MAAM,wBAAwB,GAAG,kBAAkB,CAAC,MAAM,EAAE,WAAW,GAAG,MAAM,CAAC,CAAC;AAExF;;;;GAIG;AACH,MAAM,MAAM,mCAAmC,GAAG,kBAAkB,CAAC,kBAAkB,EAAE,OAAO,CAAC,CAAC;AAElG;;;;GAIG;AACH,MAAM,MAAM,kCAAkC,GAAG,kBAAkB,CAAC,iBAAiB,EAAE,yBAAyB,CAAC,CAAC;AAElH;;;;GAIG;AACH,MAAM,MAAM,qCAAqC,GAAG,kBAAkB,CAAC,qBAAqB,EAAE,MAAM,CAAC,CAAC;AAEtG;;;GAGG;AACH,UAAU,kBAAkB,CAAC,CAAC,SAAS,MAAM,EAAE,CAAC;IAC/C,GAAG,EAAE,CAAC,CAAC;IACP,SAAS,CAAC,EAAE,CAAC,CAAC;IACd,SAAS,CAAC,EAAE,CAAC,CAAC;CACd"} node_modules/discord-api-types/payloads/v6/webhook.d.ts.map 0000664 00000001265 15114741631 0017745 0 ustar 00 {"version":3,"file":"webhook.d.ts","sourceRoot":"","sources":["webhook.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,WAAW,CAAC;AACnD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAC/C,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,QAAQ,CAAC;AAEtC;;;;GAIG;AACH,MAAM,WAAW,UAAU;IAC1B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,WAAW,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,MAAM,CAAC;IACnB,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IACpB,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,YAAY,CAAC,EAAE,eAAe,CAAC;IAC/B,cAAc,CAAC,EAAE,iBAAiB,CAAC;IACnC,cAAc,EAAE,MAAM,GAAG,IAAI,CAAC;CAC9B;AAED;;GAEG;AACH,oBAAY,WAAW;IACtB,QAAQ,IAAI;IACZ,eAAe,IAAA;CACf"} node_modules/discord-api-types/payloads/v6/gateway.js.map 0000664 00000001172 15114741631 0017511 0 ustar 00 {"version":3,"file":"gateway.js","sourceRoot":"","sources":["gateway.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AAsDH;;GAEG;AACH,IAAY,oBAMX;AAND,WAAY,oBAAoB;IAC/B,4CAAoB,CAAA;IACpB,qCAAa,CAAA;IACb,+CAAuB,CAAA;IACvB,2CAAmB,CAAA;IACnB,yCAAiB,CAAA;AAClB,CAAC,EANW,oBAAoB,oCAApB,oBAAoB,QAM/B;AA+BD;;;;GAIG;AACH,IAAY,YAOX;AAPD,WAAY,YAAY;IACvB,+CAAI,CAAA;IACJ,yDAAS,CAAA;IACT,yDAAS,CAAA;IAET,mDAAU,CAAA;IACV,yDAAS,CAAA;AACV,CAAC,EAPW,YAAY,4BAAZ,YAAY,QAOvB;AA6CD;;;;GAIG;AACH,IAAY,aAOX;AAPD,WAAY,aAAa;IACxB,yDAAiB,CAAA;IACjB,iDAAa,CAAA;IACb,yDAAiB,CAAA;IACjB,iEAAqB,CAAA;IACrB,kDAAa,CAAA;IACb,kDAAa,CAAA;AACd,CAAC,EAPW,aAAa,6BAAb,aAAa,QAOxB"} node_modules/discord-api-types/payloads/v6/index.mjs 0000664 00000003025 15114741631 0016557 0 ustar 00 import mod from "./index.js"; export default mod; export const ActivityFlags = mod.ActivityFlags; export const ActivityType = mod.ActivityType; export const AuditLogEvent = mod.AuditLogEvent; export const AuditLogOptionsType = mod.AuditLogOptionsType; export const ChannelType = mod.ChannelType; export const ConnectionVisibility = mod.ConnectionVisibility; export const EmbedType = mod.EmbedType; export const GuildDefaultMessageNotifications = mod.GuildDefaultMessageNotifications; export const GuildExplicitContentFilter = mod.GuildExplicitContentFilter; export const GuildFeature = mod.GuildFeature; export const GuildMFALevel = mod.GuildMFALevel; export const GuildPremiumTier = mod.GuildPremiumTier; export const GuildSystemChannelFlags = mod.GuildSystemChannelFlags; export const GuildVerificationLevel = mod.GuildVerificationLevel; export const GuildWidgetStyle = mod.GuildWidgetStyle; export const IntegrationExpireBehavior = mod.IntegrationExpireBehavior; export const InviteTargetUserType = mod.InviteTargetUserType; export const MessageActivityType = mod.MessageActivityType; export const MessageFlags = mod.MessageFlags; export const MessageType = mod.MessageType; export const OverwriteType = mod.OverwriteType; export const PermissionFlagsBits = mod.PermissionFlagsBits; export const PresenceUpdateStatus = mod.PresenceUpdateStatus; export const TeamMemberMembershipState = mod.TeamMemberMembershipState; export const UserFlags = mod.UserFlags; export const UserPremiumType = mod.UserPremiumType; export const WebhookType = mod.WebhookType; node_modules/discord-api-types/payloads/v6/invite.js.map 0000664 00000000330 15114741631 0017341 0 ustar 00 {"version":3,"file":"invite.js","sourceRoot":"","sources":["invite.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AAsBH;;;;GAIG;AACH,IAAY,oBAEX;AAFD,WAAY,oBAAoB;IAC/B,mEAAU,CAAA;AACX,CAAC,EAFW,oBAAoB,oCAApB,oBAAoB,QAE/B"} node_modules/discord-api-types/payloads/v6/index.js.map 0000664 00000000411 15114741631 0017152 0 ustar 00 {"version":3,"file":"index.js","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,6CAA2B;AAC3B,4CAA0B;AAC1B,0CAAwB;AACxB,4CAA0B;AAC1B,0CAAwB;AACxB,2CAAyB;AACzB,2CAAyB;AACzB,gDAA8B;AAC9B,0CAAwB;AACxB,yCAAuB;AACvB,0CAAwB;AACxB,4CAA0B"} node_modules/discord-api-types/payloads/v6/voice.d.ts 0000664 00000002041 15114741631 0016631 0 ustar 00 /** * Types extracted from https://discord.com/developers/docs/resources/voice */ import type { APIGuildMember } from './guild'; /** * https://discord.com/developers/docs/resources/voice#voice-state-object * * @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8. */ export interface GatewayVoiceState { guild_id?: string; channel_id: string | null; user_id: string; member?: APIGuildMember; session_id: string; deaf: boolean; mute: boolean; self_deaf: boolean; self_mute: boolean; self_stream?: boolean; self_video: boolean; suppress: boolean; } /** * https://discord.com/developers/docs/resources/voice#voice-region-object * * @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8. */ export interface APIVoiceRegion { id: string; name: string; vip: boolean; optimal: boolean; deprecated: boolean; custom: boolean; } //# sourceMappingURL=voice.d.ts.map node_modules/discord-api-types/payloads/v6/permissions.d.ts 0000664 00000005043 15114741631 0020104 0 ustar 00 /** * Types extracted from https://discord.com/developers/docs/topics/permissions */ /** * https://discord.com/developers/docs/topics/permissions#permissions-bitwise-permission-flags * * These flags are exported as `BigInt`s and NOT numbers. For most of them, you can * convert them in a number by wrapping it in `Number()`, however be careful as any * further bits added may cause issues if done so. Try to use BigInts as much as possible * or modules that can replicate them in some way. * * @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8. */ export declare const PermissionFlagsBits: { readonly CREATE_INSTANT_INVITE: 1n; readonly KICK_MEMBERS: 2n; readonly BAN_MEMBERS: 4n; readonly ADMINISTRATOR: 8n; readonly MANAGE_CHANNELS: 16n; readonly MANAGE_GUILD: 32n; readonly ADD_REACTIONS: 64n; readonly VIEW_AUDIT_LOG: 128n; readonly PRIORITY_SPEAKER: 256n; readonly STREAM: 512n; readonly VIEW_CHANNEL: 1024n; readonly SEND_MESSAGES: 2048n; readonly SEND_TTS_MESSAGES: 4096n; readonly MANAGE_MESSAGES: 8192n; readonly EMBED_LINKS: 16384n; readonly ATTACH_FILES: 32768n; readonly READ_MESSAGE_HISTORY: 65536n; readonly MENTION_EVERYONE: 131072n; readonly USE_EXTERNAL_EMOJIS: 262144n; readonly VIEW_GUILD_INSIGHTS: 524288n; readonly CONNECT: 1048576n; readonly SPEAK: 2097152n; readonly MUTE_MEMBERS: 4194304n; readonly DEAFEN_MEMBERS: 8388608n; readonly MOVE_MEMBERS: 16777216n; readonly USE_VAD: 33554432n; readonly CHANGE_NICKNAME: 67108864n; readonly MANAGE_NICKNAMES: 134217728n; readonly MANAGE_ROLES: 268435456n; readonly MANAGE_WEBHOOKS: 536870912n; readonly MANAGE_EMOJIS: 1073741824n; }; /** * https://discord.com/developers/docs/topics/permissions#role-object * * @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8. */ export interface APIRole { id: string; name: string; color: number; hoist: boolean; position: number; /** * @deprecated Use `permissions_new` instead */ permissions: number; permissions_new: string; managed: boolean; mentionable: boolean; tags?: APIRoleTags; } /** * @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8. */ export interface APIRoleTags { bot_id?: string; premium_subscriber?: null; integration_id?: string; } //# sourceMappingURL=permissions.d.ts.map node_modules/discord-api-types/payloads/v6/invite.d.ts 0000664 00000002576 15114741631 0017037 0 ustar 00 /** * Types extracted from https://discord.com/developers/docs/resources/invite */ import type { APIPartialChannel } from './channel'; import type { APIPartialGuild } from './guild'; import type { APIUser } from './user'; /** * https://discord.com/developers/docs/resources/invite#invite-object * * @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8. */ export interface APIInvite { code: string; guild?: APIPartialGuild; channel?: Required<APIPartialChannel>; inviter?: APIUser; target_user?: APIUser; target_user_type?: InviteTargetUserType; approximate_presence_count?: number; approximate_member_count?: number; } /** * https://discord.com/developers/docs/resources/invite#invite-object-target-user-types * * @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8. */ export declare enum InviteTargetUserType { STREAM = 1 } /** * https://discord.com/developers/docs/resources/invite#invite-metadata-object * * @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8. */ export interface APIExtendedInvite extends APIInvite { uses: number; max_uses: number; max_age: number; temporary: boolean; created_at: string; } //# sourceMappingURL=invite.d.ts.map node_modules/discord-api-types/payloads/v6/user.d.ts 0000664 00000004416 15114741631 0016512 0 ustar 00 /** * Types extracted from https://discord.com/developers/docs/resources/user */ import type { APIGuildIntegration } from './guild'; /** * https://discord.com/developers/docs/resources/user#user-object * * @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8. */ export interface APIUser { id: string; username: string; discriminator: string; avatar: string | null; bot?: boolean; system?: boolean; mfa_enabled?: boolean; locale?: string; verified?: boolean; email?: string | null; flags?: UserFlags; premium_type?: UserPremiumType; public_flags?: UserFlags; } /** * https://discord.com/developers/docs/resources/user#user-object-user-flags * * @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8. */ export declare enum UserFlags { None = 0, DiscordEmployee = 1, PartneredServerOwner = 2, DiscordHypeSquadEvents = 4, BugHunterLevel1 = 8, HypeSquadHouseBravery = 64, HypeSquadHouseBrilliance = 128, HypeSquadHouseBalance = 256, EarlySupporter = 512, TeamUser = 1024, System = 4096, BugHunterLevel2 = 16384, VerifiedBot = 65536, EarlyVerifiedBotDeveloper = 131072 } /** * https://discord.com/developers/docs/resources/user#user-object-premium-types * * @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8. */ export declare enum UserPremiumType { None = 0, NitroClassic = 1, Nitro = 2 } /** * https://discord.com/developers/docs/resources/user#connection-object * * @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8. */ export interface APIConnection { id: string; name: string; type: string; revoked?: boolean; integrations?: Partial<APIGuildIntegration>[]; verified: boolean; friend_sync: boolean; show_activity: boolean; visibility: ConnectionVisibility; } /** * @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8. */ export declare enum ConnectionVisibility { None = 0, Everyone = 1 } //# sourceMappingURL=user.d.ts.map node_modules/discord-api-types/payloads/v6/index.js 0000664 00000002452 15114741631 0016405 0 ustar 00 "use strict"; var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { if (k2 === undefined) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { return m[k]; } }; } Object.defineProperty(o, k2, desc); }) : (function(o, m, k, k2) { if (k2 === undefined) k2 = k; o[k2] = m[k]; })); var __exportStar = (this && this.__exportStar) || function(m, exports) { for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); }; Object.defineProperty(exports, "__esModule", { value: true }); __exportStar(require("./auditLog"), exports); __exportStar(require("./channel"), exports); __exportStar(require("./emoji"), exports); __exportStar(require("./gateway"), exports); __exportStar(require("./guild"), exports); __exportStar(require("./invite"), exports); __exportStar(require("./oauth2"), exports); __exportStar(require("./permissions"), exports); __exportStar(require("./teams"), exports); __exportStar(require("./user"), exports); __exportStar(require("./voice"), exports); __exportStar(require("./webhook"), exports); //# sourceMappingURL=index.js.map node_modules/discord-api-types/payloads/v6/permissions.d.ts.map 0000664 00000001205 15114741631 0020654 0 ustar 00 {"version":3,"file":"permissions.d.ts","sourceRoot":"","sources":["permissions.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH;;;;;;;;;GASG;AACH,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAgCtB,CAAC;AASX;;;;GAIG;AACH,MAAM,WAAW,OAAO;IACvB,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,OAAO,CAAC;IACf,QAAQ,EAAE,MAAM,CAAC;IACjB;;OAEG;IACH,WAAW,EAAE,MAAM,CAAC;IACpB,eAAe,EAAE,MAAM,CAAC;IACxB,OAAO,EAAE,OAAO,CAAC;IACjB,WAAW,EAAE,OAAO,CAAC;IACrB,IAAI,CAAC,EAAE,WAAW,CAAC;CACnB;AAED;;GAEG;AACH,MAAM,WAAW,WAAW;IAC3B,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,kBAAkB,CAAC,EAAE,IAAI,CAAC;IAC1B,cAAc,CAAC,EAAE,MAAM,CAAC;CACxB"} node_modules/discord-api-types/payloads/v6/voice.d.ts.map 0000664 00000001321 15114741631 0017405 0 ustar 00 {"version":3,"file":"voice.d.ts","sourceRoot":"","sources":["voice.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAE9C;;;;GAIG;AACH,MAAM,WAAW,iBAAiB;IACjC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,cAAc,CAAC;IACxB,UAAU,EAAE,MAAM,CAAC;IACnB,IAAI,EAAE,OAAO,CAAC;IACd,IAAI,EAAE,OAAO,CAAC;IACd,SAAS,EAAE,OAAO,CAAC;IACnB,SAAS,EAAE,OAAO,CAAC;IACnB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,UAAU,EAAE,OAAO,CAAC;IACpB,QAAQ,EAAE,OAAO,CAAC;CAClB;AAED;;;;GAIG;AACH,MAAM,WAAW,cAAc;IAC9B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,GAAG,EAAE,OAAO,CAAC;IACb,OAAO,EAAE,OAAO,CAAC;IACjB,UAAU,EAAE,OAAO,CAAC;IACpB,MAAM,EAAE,OAAO,CAAC;CAChB"} node_modules/discord-api-types/payloads/v6/emoji.d.ts.map 0000664 00000000767 15114741631 0017420 0 ustar 00 {"version":3,"file":"emoji.d.ts","sourceRoot":"","sources":["emoji.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,QAAQ,CAAC;AAEtC;;;;GAIG;AACH,MAAM,WAAW,eAAe;IAC/B,EAAE,EAAE,MAAM,GAAG,IAAI,CAAC;IAClB,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IACpB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACnB;AAED;;;;GAIG;AACH,MAAM,WAAW,QAAS,SAAQ,eAAe;IAChD,KAAK,CAAC,EAAE,MAAM,EAAE,CAAC;IACjB,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,SAAS,CAAC,EAAE,OAAO,CAAC;CACpB"} node_modules/discord-api-types/payloads/v6/webhook.js.map 0000664 00000000341 15114741631 0017503 0 ustar 00 {"version":3,"file":"webhook.js","sourceRoot":"","sources":["webhook.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AAyBH;;GAEG;AACH,IAAY,WAGX;AAHD,WAAY,WAAW;IACtB,qDAAY,CAAA;IACZ,mEAAe,CAAA;AAChB,CAAC,EAHW,WAAW,2BAAX,WAAW,QAGtB"} node_modules/discord-api-types/payloads/v6/teams.d.ts 0000664 00000002176 15114741631 0016646 0 ustar 00 /** * Types extracted from https://discord.com/developers/docs/topics/teams */ import type { APIUser } from './user'; /** * https://discord.com/developers/docs/topics/teams#data-models-team-object * * @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8. */ export interface APITeam { id: string; icon: string | null; members: APITeamMember[]; owner_user_id: string; } /** * https://discord.com/developers/docs/topics/teams#data-models-team-members-object * * @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8. */ export interface APITeamMember { membership_state: TeamMemberMembershipState; permissions: string[]; team_id: string; user: APIUser; } /** * https://discord.com/developers/docs/topics/teams#data-models-membership-state-enum * * @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8. */ export declare enum TeamMemberMembershipState { INVITED = 1, ACCEPTED = 2 } //# sourceMappingURL=teams.d.ts.map node_modules/discord-api-types/payloads/v6/teams.d.ts.map 0000664 00000001020 15114741631 0017405 0 ustar 00 {"version":3,"file":"teams.d.ts","sourceRoot":"","sources":["teams.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,QAAQ,CAAC;AAEtC;;;;GAIG;AACH,MAAM,WAAW,OAAO;IACvB,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IACpB,OAAO,EAAE,aAAa,EAAE,CAAC;IACzB,aAAa,EAAE,MAAM,CAAC;CACtB;AAED;;;;GAIG;AACH,MAAM,WAAW,aAAa;IAC7B,gBAAgB,EAAE,yBAAyB,CAAC;IAC5C,WAAW,EAAE,MAAM,EAAE,CAAC;IACtB,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,OAAO,CAAC;CACd;AAED;;;;GAIG;AACH,oBAAY,yBAAyB;IACpC,OAAO,IAAI;IACX,QAAQ,IAAA;CACR"} node_modules/discord-api-types/payloads/v6/oauth2.d.ts.map 0000664 00000001246 15114741631 0017510 0 ustar 00 {"version":3,"file":"oauth2.d.ts","sourceRoot":"","sources":["oauth2.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AACvC,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,QAAQ,CAAC;AAEtC;;;;GAIG;AACH,MAAM,WAAW,cAAc;IAC9B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IACpB,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,CAAC,EAAE,MAAM,EAAE,CAAC;IACvB,UAAU,EAAE,OAAO,CAAC;IACpB,sBAAsB,EAAE,OAAO,CAAC;IAChC,KAAK,EAAE,OAAO,CAAC;IACf,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,EAAE,MAAM,CAAC;IACnB,IAAI,EAAE,OAAO,GAAG,IAAI,CAAC;IACrB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,CAAC;CACrB"} node_modules/discord-api-types/payloads/v6/channel.d.ts.map 0000664 00000012401 15114741631 0017711 0 ustar 00 {"version":3,"file":"channel.d.ts","sourceRoot":"","sources":["channel.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAC/C,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAC9C,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,QAAQ,CAAC;AAEtC;;;;GAIG;AACH,MAAM,WAAW,iBAAiB;IACjC,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,WAAW,CAAC;IAClB,IAAI,CAAC,EAAE,MAAM,CAAC;CACd;AAED;;;;GAIG;AACH,MAAM,WAAW,UAAW,SAAQ,iBAAiB;IACpD,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,qBAAqB,CAAC,EAAE,YAAY,EAAE,CAAC;IACvC,IAAI,CAAC,EAAE,MAAM,CAAC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IG;AACH,MAAM,WAAW,aAAa;IAC7B,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,CAAC,EAAE,OAAO,CAAC;CACjB;AAED;;;;GAIG;AACH,MAAM,WAAW,aAAa;IAC7B,EAAE,EAAE,MAAM,CAAC;IACX,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,GAAG,EAAE,MAAM,CAAC;IACZ,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;CACrB;AAED;;;;GAIG;AACH,MAAM,WAAW,iBAAiB;IACjC,EAAE,EAAE,MAAM,CAAC;IACX,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,WAAW,CAAC;IAClB,IAAI,EAAE,MAAM,CAAC;CACb;AAED;;GAEG;AACH,MAAM,WAAW,kBAAkB;IAClC,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;CACnB"} node_modules/discord-api-types/payloads/v6/invite.js 0000664 00000001242 15114741631 0016570 0 ustar 00 "use strict"; /** * Types extracted from https://discord.com/developers/docs/resources/invite */ Object.defineProperty(exports, "__esModule", { value: true }); exports.InviteTargetUserType = void 0; /** * https://discord.com/developers/docs/resources/invite#invite-object-target-user-types * * @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8. */ var InviteTargetUserType; (function (InviteTargetUserType) { InviteTargetUserType[InviteTargetUserType["STREAM"] = 1] = "STREAM"; })(InviteTargetUserType || (exports.InviteTargetUserType = InviteTargetUserType = {})); //# sourceMappingURL=invite.js.map node_modules/discord-api-types/payloads/v6/channel.d.ts 0000664 00000024442 15114741631 0017145 0 ustar 00 /** * Types extracted from https://discord.com/developers/docs/resources/channel */ import type { APIPartialEmoji } from './emoji'; import type { APIGuildMember } from './guild'; import type { APIUser } from './user'; /** * Not documented, but partial only includes id, name, and type * * @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8. */ export interface APIPartialChannel { id: string; type: ChannelType; name?: string; } /** * https://discord.com/developers/docs/resources/channel#channel-object-channel-structure * * @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8. */ export interface APIChannel extends APIPartialChannel { guild_id?: string; position?: number; permission_overwrites?: APIOverwrite[]; name?: string; topic?: string | null; nsfw?: boolean; last_message_id?: string | null; bitrate?: number; user_limit?: number; rate_limit_per_user?: number; recipients?: APIUser[]; icon?: string | null; owner_id?: string; application_id?: string; parent_id?: string | null; last_pin_timestamp?: string | null; } /** * https://discord.com/developers/docs/resources/channel#channel-object-channel-types * * @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8. */ export declare enum ChannelType { GUILD_TEXT = 0, DM = 1, GUILD_VOICE = 2, GROUP_DM = 3, GUILD_CATEGORY = 4, GUILD_NEWS = 5, GUILD_STORE = 6 } /** * https://discord.com/developers/docs/resources/channel#message-object-message-structure * * @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8. */ export interface APIMessage { id: string; channel_id: string; guild_id?: string; author: APIUser; member?: APIGuildMember; content: string; timestamp: string; edited_timestamp: string | null; tts: boolean; mention_everyone: boolean; mentions: (APIUser & { member?: Omit<APIGuildMember, 'user'>; })[]; mention_roles: string[]; mention_channels?: APIChannelMention[]; attachments: APIAttachment[]; embeds: APIEmbed[]; reactions?: APIReaction[]; nonce?: number | string; pinned: boolean; webhook_id?: string; type: MessageType; activity?: APIMessageActivity; application?: APIMessageApplication; message_reference?: APIMessageReference; flags?: MessageFlags; referenced_message?: APIMessage | null; } /** * https://discord.com/developers/docs/resources/channel#message-object-message-types * * @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8. */ export declare enum MessageType { DEFAULT = 0, RECIPIENT_ADD = 1, RECIPIENT_REMOVE = 2, CALL = 3, CHANNEL_NAME_CHANGE = 4, CHANNEL_ICON_CHANGE = 5, CHANNEL_PINNED_MESSAGE = 6, GUILD_MEMBER_JOIN = 7, USER_PREMIUM_GUILD_SUBSCRIPTION = 8, USER_PREMIUM_GUILD_SUBSCRIPTION_TIER_1 = 9, USER_PREMIUM_GUILD_SUBSCRIPTION_TIER_2 = 10, USER_PREMIUM_GUILD_SUBSCRIPTION_TIER_3 = 11, CHANNEL_FOLLOW_ADD = 12, GUILD_DISCOVERY_DISQUALIFIED = 14, GUILD_DISCOVERY_REQUALIFIED = 15, GUILD_DISCOVERY_GRACE_PERIOD_INITIAL_WARNING = 16, GUILD_DISCOVERY_GRACE_PERIOD_FINAL_WARNING = 17 } /** * https://discord.com/developers/docs/resources/channel#message-object-message-activity-structure * * @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8. */ export interface APIMessageActivity { type: MessageActivityType; party_id?: string; } /** * https://discord.com/developers/docs/resources/channel#message-object-message-application-structure * * @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8. */ export interface APIMessageApplication { id: string; cover_image?: string; description: string; icon: string | null; name: string; } /** * https://discord.com/developers/docs/resources/channel#message-object-message-reference-structure * * @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8. */ export interface APIMessageReference { message_id?: string; channel_id: string; guild_id?: string; } /** * https://discord.com/developers/docs/resources/channel#message-object-message-activity-types * * @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8. */ export declare enum MessageActivityType { JOIN = 1, SPECTATE = 2, LISTEN = 3, JOIN_REQUEST = 5 } /** * https://discord.com/developers/docs/resources/channel#message-object-message-flags * * @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8. */ export declare enum MessageFlags { CROSSPOSTED = 1, IS_CROSSPOST = 2, SUPPRESS_EMBEDS = 4, SOURCE_MESSAGE_DELETED = 8, URGENT = 16 } /** * https://discord.com/developers/docs/resources/channel#reaction-object-reaction-structure * * @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8. */ export interface APIReaction { count: number; me: boolean; emoji: APIPartialEmoji; } /** * https://discord.com/developers/docs/resources/channel#overwrite-object-overwrite-structure * * @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8. */ export interface APIOverwrite { id: string; type: OverwriteType; /** * @deprecated Use `allow_new` instead */ allow: number; allow_new: string; /** * @deprecated Use `deny_new` instead */ deny: number; deny_new: string; } /** * @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8. */ export declare enum OverwriteType { Member = "member", Role = "role" } /** * https://discord.com/developers/docs/resources/channel#embed-object-embed-structure * * @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8. */ export interface APIEmbed { title?: string; type?: EmbedType; description?: string; url?: string; timestamp?: string; color?: number; footer?: APIEmbedFooter; image?: APIEmbedImage; thumbnail?: APIEmbedThumbnail; video?: APIEmbedVideo; provider?: APIEmbedProvider; author?: APIEmbedAuthor; fields?: APIEmbedField[]; } /** * https://discord.com/developers/docs/resources/channel#embed-object-embed-types * * @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8. */ export declare enum EmbedType { Rich = "rich", Image = "image", Video = "video", GifV = "gifv", Article = "article", Link = "link" } /** * https://discord.com/developers/docs/resources/channel#embed-object-embed-thumbnail-structure * * @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8. */ export interface APIEmbedThumbnail { url?: string; proxy_url?: string; height?: number; width?: number; } /** * https://discord.com/developers/docs/resources/channel#embed-object-embed-video-structure * * @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8. */ export interface APIEmbedVideo { url?: string; height?: number; width?: number; } /** * https://discord.com/developers/docs/resources/channel#embed-object-embed-image-structure * * @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8. */ export interface APIEmbedImage { url?: string; proxy_url?: string; height?: number; width?: number; } /** * https://discord.com/developers/docs/resources/channel#embed-object-embed-provider-structure * * @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8. */ export interface APIEmbedProvider { name?: string; url?: string; } /** * https://discord.com/developers/docs/resources/channel#embed-object-embed-author-structure * * @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8. */ export interface APIEmbedAuthor { name?: string; url?: string; icon_url?: string; proxy_icon_url?: string; } /** * https://discord.com/developers/docs/resources/channel#embed-object-embed-footer-structure * * @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8. */ export interface APIEmbedFooter { text: string; icon_url?: string; proxy_icon_url?: string; } /** * https://discord.com/developers/docs/resources/channel#embed-object-embed-field-structure * * @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8. */ export interface APIEmbedField { name: string; value: string; inline?: boolean; } /** * https://discord.com/developers/docs/resources/channel#attachment-object-attachment-structure * * @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8. */ export interface APIAttachment { id: string; filename: string; size: number; url: string; proxy_url: string; height: number | null; width: number | null; } /** * https://discord.com/developers/docs/resources/channel#channel-mention-object-channel-mention-structure * * @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8. */ export interface APIChannelMention { id: string; guild_id: string; type: ChannelType; name: string; } /** * @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8. */ export interface APIFollowedChannel { channel_id: string; webhook_id: string; } //# sourceMappingURL=channel.d.ts.map node_modules/discord-api-types/payloads/index.mjs 0000664 00000012455 15114741631 0016233 0 ustar 00 import mod from "./index.js"; export default mod; export const APIApplicationCommandPermissionsConstant = mod.APIApplicationCommandPermissionsConstant; export const ActivityFlags = mod.ActivityFlags; export const ActivityPlatform = mod.ActivityPlatform; export const ActivityType = mod.ActivityType; export const AllowedMentionsTypes = mod.AllowedMentionsTypes; export const ApplicationCommandOptionType = mod.ApplicationCommandOptionType; export const ApplicationCommandPermissionType = mod.ApplicationCommandPermissionType; export const ApplicationCommandType = mod.ApplicationCommandType; export const ApplicationFlags = mod.ApplicationFlags; export const ApplicationIntegrationType = mod.ApplicationIntegrationType; export const ApplicationRoleConnectionMetadataType = mod.ApplicationRoleConnectionMetadataType; export const ApplicationWebhookEventStatus = mod.ApplicationWebhookEventStatus; export const ApplicationWebhookEventType = mod.ApplicationWebhookEventType; export const ApplicationWebhookType = mod.ApplicationWebhookType; export const AttachmentFlags = mod.AttachmentFlags; export const AuditLogEvent = mod.AuditLogEvent; export const AuditLogOptionsType = mod.AuditLogOptionsType; export const AutoModerationActionType = mod.AutoModerationActionType; export const AutoModerationRuleEventType = mod.AutoModerationRuleEventType; export const AutoModerationRuleKeywordPresetType = mod.AutoModerationRuleKeywordPresetType; export const AutoModerationRuleTriggerType = mod.AutoModerationRuleTriggerType; export const ButtonStyle = mod.ButtonStyle; export const ChannelFlags = mod.ChannelFlags; export const ChannelType = mod.ChannelType; export const ComponentType = mod.ComponentType; export const ConnectionService = mod.ConnectionService; export const ConnectionVisibility = mod.ConnectionVisibility; export const EmbedType = mod.EmbedType; export const EntitlementType = mod.EntitlementType; export const EntryPointCommandHandlerType = mod.EntryPointCommandHandlerType; export const ForumLayoutType = mod.ForumLayoutType; export const GuildDefaultMessageNotifications = mod.GuildDefaultMessageNotifications; export const GuildExplicitContentFilter = mod.GuildExplicitContentFilter; export const GuildFeature = mod.GuildFeature; export const GuildHubType = mod.GuildHubType; export const GuildMFALevel = mod.GuildMFALevel; export const GuildMemberFlags = mod.GuildMemberFlags; export const GuildNSFWLevel = mod.GuildNSFWLevel; export const GuildOnboardingMode = mod.GuildOnboardingMode; export const GuildOnboardingPromptType = mod.GuildOnboardingPromptType; export const GuildPremiumTier = mod.GuildPremiumTier; export const GuildScheduledEventEntityType = mod.GuildScheduledEventEntityType; export const GuildScheduledEventPrivacyLevel = mod.GuildScheduledEventPrivacyLevel; export const GuildScheduledEventRecurrenceRuleFrequency = mod.GuildScheduledEventRecurrenceRuleFrequency; export const GuildScheduledEventRecurrenceRuleMonth = mod.GuildScheduledEventRecurrenceRuleMonth; export const GuildScheduledEventRecurrenceRuleWeekday = mod.GuildScheduledEventRecurrenceRuleWeekday; export const GuildScheduledEventStatus = mod.GuildScheduledEventStatus; export const GuildSystemChannelFlags = mod.GuildSystemChannelFlags; export const GuildVerificationLevel = mod.GuildVerificationLevel; export const GuildWidgetStyle = mod.GuildWidgetStyle; export const IntegrationExpireBehavior = mod.IntegrationExpireBehavior; export const InteractionContextType = mod.InteractionContextType; export const InteractionResponseType = mod.InteractionResponseType; export const InteractionType = mod.InteractionType; export const InviteTargetType = mod.InviteTargetType; export const InviteType = mod.InviteType; export const MembershipScreeningFieldType = mod.MembershipScreeningFieldType; export const MessageActivityType = mod.MessageActivityType; export const MessageFlags = mod.MessageFlags; export const MessageReferenceType = mod.MessageReferenceType; export const MessageType = mod.MessageType; export const NameplatePalette = mod.NameplatePalette; export const OAuth2Scopes = mod.OAuth2Scopes; export const OverwriteType = mod.OverwriteType; export const PermissionFlagsBits = mod.PermissionFlagsBits; export const PollLayoutType = mod.PollLayoutType; export const PresenceUpdateStatus = mod.PresenceUpdateStatus; export const RoleFlags = mod.RoleFlags; export const SKUFlags = mod.SKUFlags; export const SKUType = mod.SKUType; export const SelectMenuDefaultValueType = mod.SelectMenuDefaultValueType; export const SeparatorSpacingSize = mod.SeparatorSpacingSize; export const SortOrderType = mod.SortOrderType; export const StageInstancePrivacyLevel = mod.StageInstancePrivacyLevel; export const StickerFormatType = mod.StickerFormatType; export const StickerType = mod.StickerType; export const SubscriptionStatus = mod.SubscriptionStatus; export const TeamMemberMembershipState = mod.TeamMemberMembershipState; export const TeamMemberRole = mod.TeamMemberRole; export const TextInputStyle = mod.TextInputStyle; export const ThreadAutoArchiveDuration = mod.ThreadAutoArchiveDuration; export const ThreadMemberFlags = mod.ThreadMemberFlags; export const UnfurledMediaItemLoadingState = mod.UnfurledMediaItemLoadingState; export const UserFlags = mod.UserFlags; export const UserPremiumType = mod.UserPremiumType; export const VideoQualityMode = mod.VideoQualityMode; export const WebhookType = mod.WebhookType; node_modules/discord-api-types/payloads/index.js.map 0000664 00000000224 15114741631 0016621 0 ustar 00 {"version":3,"file":"index.js","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":";AAAA,8EAA8E;AAC9E,2FAA2F;;;;;;;;;;;;;;;;AAE3F,8CAA4B"} node_modules/discord-api-types/payloads/v9/stageInstance.js.map 0000664 00000000402 15114741631 0020636 0 ustar 00 {"version":3,"file":"stageInstance.js","sourceRoot":"","sources":["stageInstance.ts"],"names":[],"mappings":";;;AA0CA;;GAEG;AACH,IAAY,yBAYX;AAZD,WAAY,yBAAyB;IACpC;;;;;OAKG;IACH,6EAAU,CAAA;IACV;;OAEG;IACH,mFAAS,CAAA;AACV,CAAC,EAZW,yBAAyB,yCAAzB,yBAAyB,QAYpC"} node_modules/discord-api-types/payloads/v9/user.js.map 0000664 00000003676 15114741631 0017044 0 ustar 00 {"version":3,"file":"user.js","sourceRoot":"","sources":["user.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AAwGH;;GAEG;AACH,IAAY,SA0GX;AA1GD,WAAY,SAAS;IACpB;;OAEG;IACH,2CAAc,CAAA;IACd;;OAEG;IACH,+CAAgB,CAAA;IAChB;;OAEG;IACH,mDAAkB,CAAA;IAClB;;OAEG;IACH,+DAAwB,CAAA;IACxB;;OAEG;IACH,8CAAe,CAAA;IACf;;OAEG;IACH,4EAA8B,CAAA;IAC9B;;OAEG;IACH,4EAA8B,CAAA;IAC9B;;OAEG;IACH,6EAA8B,CAAA;IAC9B;;OAEG;IACH,6EAA8B,CAAA;IAC9B;;OAEG;IACH,6EAA8B,CAAA;IAC9B;;OAEG;IACH,gEAAwB,CAAA;IACxB;;OAEG;IACH,kFAAiC,CAAA;IACjC;;OAEG;IACH,mEAAyB,CAAA;IACzB;;OAEG;IACH,2DAAqB,CAAA;IACrB;;OAEG;IACH,wEAA2B,CAAA;IAC3B;;OAEG;IACH,0EAA4B,CAAA;IAC5B;;OAEG;IACH,4EAA6B,CAAA;IAC7B;;;;OAIG;IACH,qDAAiB,CAAA;IACjB;;OAEG;IACH,mEAAwB,CAAA;IACxB;;OAEG;IACH,qEAAyB,CAAA;IACzB;;;;;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AiB,CAAA;IACjB,uCAAmB,CAAA;IACnB,qCAAiB,CAAA;IACjB,mCAAe,CAAA;IACf,+BAAW,CAAA;IACX,iCAAa,CAAA;IACb,qCAAiB,CAAA;IACjB,mCAAe,CAAA;AAChB,CAAC,EAZW,gBAAgB,gCAAhB,gBAAgB,QAY3B"} node_modules/discord-api-types/payloads/v9/soundboard.js.map 0000664 00000000164 15114741631 0020213 0 ustar 00 {"version":3,"file":"soundboard.js","sourceRoot":"","sources":["soundboard.ts"],"names":[],"mappings":";AAAA;;GAEG"} node_modules/discord-api-types/payloads/v9/autoModeration.d.ts.map 0000664 00000003376 15114741631 0021311 0 ustar 00 {"version":3,"file":"autoModeration.d.ts","sourceRoot":"","sources":["autoModeration.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAE/C;;GAEG;AACH,MAAM,WAAW,qBAAqB;IACrC;;OAEG;IACH,EAAE,EAAE,SAAS,CAAC;IACd;;OAEG;IACH,QAAQ,EAAE,SAAS,CAAC;IACpB;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;OAEG;IACH,UAAU,EAAE,SAAS,CAAC;IACtB;;OAEG;IACH,UAAU,EAAE,2BAA2B,CAAC;IACxC;;OAEG;IACH,YAAY,EAAE,6BAA6B,CAAC;IAC5C;;OAEG;IACH,gBAAgB,EAAE,oCAAoC,CAAC;IACvD;;OAEG;IACH,OAAO,EAAE,uBAAuB,EAAE,CAAC;IACnC;;OAEG;IACH,OAAO,EAAE,OAAO,CAAC;IACjB;;OAEG;IACH,YAAY,EAAE,SAAS,EAAE,CAAC;IAC1B;;OAEG;IACH,eAAe,EAAE,SAAS,EAAE,CAAC;CAC7B;AAED;;GAEG;AACH,oBAAY,6BAA6B;IACxC;;OAEG;IACH,OAAO,IAAI;IACX;;OAEG;IACH,IAAI,IAAI;IACR;;OAEG;IACH,aAAa,IAAA;IACb;;OAEG;IACH,WAAW,IAAA;IACX;;OAEG;IACH,aAAa,IAAA;CACb;AAED;;GAEG;AACH,MAAM,WAAW,oCAAoC;IACpD;;;;;;;;OAQG;IACH,cAAc,CAAC,EAAE,MAAM,EAAE,CAAC;IAC1B;;;;OAIG;IACH,OAAO,CAAC,EAAE,mCAAmC,EAAE,CAAC;IAChD;;;;;;;;OAQG;IACH,UAAU,CAAC,EAAE,MAAM,EAAE,CAAC;IACtB;;;;;;OAMG;IACH,cAAc,CAAC,EAAE,MAAM,EAAE,CAAC;IAC1B;;;;OAIG;IACH,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B;;;;OAIG;IACH,+BAA+B,CAAC,EAAE,OAAO,CAAC;CAC1C;AAED;;GAEG;AACH,oBAAY,mCAAmC;IAC9C;;OAEG;IACH,SAAS,IAAI;IACb;;OAEG;IACH,aAAa,IAAA;IACb;;OAEG;IACH,KAAK,IAAA;CACL;AAED;;GAEG;AACH,oBAAY,2BAA2B;IACtC;;OAEG;IACH,WAAW,IAAI;IACf;;OAEG;IACH,YAAY,IAAA;CACZ;AAED;;GAEG;AACH,MAAM,WAAW,uBAAuB;IACvC;;OAEG;IACH,IAAI,EAAE,wBAAwB,CAAC;IAC/B;;;;OAIG;IACH,QAAQ,CAAC,EAAE,+BAA+B,CAAC;CAC3C;AAED;;GAEG;AACH,oBAAY,wBAAwB;IACnC;;;OAGG;IACH,YAAY,IAAI;IAChB;;OAEG;IACH,gBAAgB,IAAA;IAChB;;OAEG;IACH,OAAO,IAAA;IACP;;OAEG;IACH,sBAAsB,IAAA;CACtB;AAED;;GAEG;AACH,MAAM,WAAW,+BAA+B;IAC/C;;;;OAIG;IACH,UAAU,CAAC,EAAE,SAAS,CAAC;IACvB;;;;;;OAMG;IACH,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B;;;;OAIG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;CACxB"} node_modules/discord-api-types/payloads/v9/emoji.js 0000664 00000000302 15114741631 0016374 0 ustar 00 "use strict"; /** * Types extracted from https://discord.com/developers/docs/resources/emoji */ Object.defineProperty(exports, "__esModule", { value: true }); //# sourceMappingURL=emoji.js.map node_modules/discord-api-types/payloads/v9/interactions.d.ts 0000664 00000003755 15114741631 0020246 0 ustar 00 import type { APIApplicationCommandDMInteraction, APIApplicationCommandGuildInteraction, APIApplicationCommandInteraction } from './_interactions/applicationCommands'; import type { APIApplicationCommandAutocompleteDMInteraction, APIApplicationCommandAutocompleteGuildInteraction, APIApplicationCommandAutocompleteInteraction } from './_interactions/autocomplete'; import type { APIMessageComponentDMInteraction, APIMessageComponentGuildInteraction, APIMessageComponentInteraction } from './_interactions/messageComponents'; import type { APIModalSubmitDMInteraction, APIModalSubmitGuildInteraction, APIModalSubmitInteraction } from './_interactions/modalSubmit'; import type { APIPingInteraction } from './_interactions/ping'; export * from './_interactions/applicationCommands'; export type * from './_interactions/autocomplete'; export type * from './_interactions/base'; export type * from './_interactions/messageComponents'; export type * from './_interactions/modalSubmit'; export type * from './_interactions/ping'; export * from './_interactions/responses'; /** * @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object} */ export type APIInteraction = APIApplicationCommandAutocompleteInteraction | APIApplicationCommandInteraction | APIMessageComponentInteraction | APIModalSubmitInteraction | APIPingInteraction; /** * @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object} */ export type APIDMInteraction = APIApplicationCommandAutocompleteDMInteraction | APIApplicationCommandDMInteraction | APIMessageComponentDMInteraction | APIModalSubmitDMInteraction; /** * @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object} */ export type APIGuildInteraction = APIApplicationCommandAutocompleteGuildInteraction | APIApplicationCommandGuildInteraction | APIMessageComponentGuildInteraction | APIModalSubmitGuildInteraction; //# sourceMappingURL=interactions.d.ts.map node_modules/discord-api-types/payloads/v9/stageInstance.d.ts.map 0000664 00000001443 15114741631 0021100 0 ustar 00 {"version":3,"file":"stageInstance.d.ts","sourceRoot":"","sources":["stageInstance.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC/C,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAE9C;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAChC;;OAEG;IACH,EAAE,EAAE,SAAS,CAAC;IACd;;OAEG;IACH,QAAQ,EAAE,SAAS,CAAC;IACpB;;OAEG;IACH,UAAU,EAAE,SAAS,CAAC;IACtB;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;;;OAIG;IACH,aAAa,EAAE,yBAAyB,CAAC;IACzC;;;;;OAKG;IACH,qBAAqB,EAAE,OAAO,CAAC;IAC/B;;OAEG;IACH,wBAAwB,CAAC,EAAE,SAAS,CAAC;CACrC;AAED;;GAEG;AACH,oBAAY,yBAAyB;IACpC;;;;;OAKG;IACH,MAAM,IAAI;IACV;;OAEG;IACH,SAAS,IAAA;CACT;AAED;;;;GAIG;AACH,MAAM,WAAW,sBAAsB;IACtC;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,iBAAiB,EAAE,MAAM,CAAC;IAC1B;;OAEG;IACH,aAAa,EAAE,MAAM,CAAC;IACtB;;;;OAIG;IACH,OAAO,EAAE,cAAc,EAAE,CAAC;CAC1B"} node_modules/discord-api-types/payloads/v9/index.d.ts.map 0000664 00000001124 15114741631 0017413 0 ustar 00 {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAC;AAC1B,cAAc,eAAe,CAAC;AAC9B,cAAc,YAAY,CAAC;AAC3B,cAAc,kBAAkB,CAAC;AACjC,cAAc,WAAW,CAAC;AAC1B,mBAAmB,SAAS,CAAC;AAC7B,cAAc,WAAW,CAAC;AAC1B,cAAc,SAAS,CAAC;AACxB,cAAc,uBAAuB,CAAC;AACtC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,UAAU,CAAC;AACzB,cAAc,gBAAgB,CAAC;AAC/B,cAAc,UAAU,CAAC;AACzB,cAAc,eAAe,CAAC;AAC9B,cAAc,QAAQ,CAAC;AACvB,mBAAmB,cAAc,CAAC;AAClC,cAAc,iBAAiB,CAAC;AAChC,cAAc,WAAW,CAAC;AAC1B,cAAc,SAAS,CAAC;AACxB,mBAAmB,YAAY,CAAC;AAChC,cAAc,QAAQ,CAAC;AACvB,mBAAmB,SAAS,CAAC;AAC7B,cAAc,WAAW,CAAC"} node_modules/discord-api-types/payloads/v9/guildScheduledEvent.js.map 0000664 00000002206 15114741631 0022001 0 ustar 00 {"version":3,"file":"guildScheduledEvent.js","sourceRoot":"","sources":["guildScheduledEvent.ts"],"names":[],"mappings":";;;AA2HA;;GAEG;AACH,IAAY,0CAKX;AALD,WAAY,0CAA0C;IACrD,+GAAM,CAAA;IACN,iHAAO,CAAA;IACP,+GAAM,CAAA;IACN,6GAAK,CAAA;AACN,CAAC,EALW,0CAA0C,0DAA1C,0CAA0C,QAKrD;AAED;;GAEG;AACH,IAAY,wCAQX;AARD,WAAY,wCAAwC;IACnD,2GAAM,CAAA;IACN,6GAAO,CAAA;IACP,iHAAS,CAAA;IACT,+GAAQ,CAAA;IACR,2GAAM,CAAA;IACN,+GAAQ,CAAA;IACR,2GAAM,CAAA;AACP,CAAC,EARW,wCAAwC,wDAAxC,wCAAwC,QAQnD;AAED;;GAEG;AACH,IAAY,sCAaX;AAbD,WAAY,sCAAsC;IACjD,yGAAW,CAAA;IACX,2GAAQ,CAAA;IACR,qGAAK,CAAA;IACL,qGAAK,CAAA;IACL,iGAAG,CAAA;IACH,mGAAI,CAAA;IACJ,mGAAI,CAAA;IACJ,uGAAM,CAAA;IACN,6GAAS,CAAA;IACT,0GAAO,CAAA;IACP,4GAAQ,CAAA;IACR,4GAAQ,CAAA;AACT,CAAC,EAbW,sCAAsC,sDAAtC,sCAAsC,QAajD;AAwDD;;GAEG;AACH,IAAY,6BAIX;AAJD,WAAY,6BAA6B;IACxC,mGAAiB,CAAA;IACjB,mFAAK,CAAA;IACL,yFAAQ,CAAA;AACT,CAAC,EAJW,6BAA6B,6CAA7B,6BAA6B,QAIxC;AAED;;GAEG;AACH,IAAY,yBAKX;AALD,WAAY,yBAAyB;IACpC,mFAAa,CAAA;IACb,6EAAM,CAAA;IACN,mFAAS,CAAA;IACT,iFAAQ,CAAA;AACT,CAAC,EALW,yBAAyB,yCAAzB,yBAAyB,QAKpC;AAED;;GAEG;AACH,IAAY,+BAKX;AALD,WAAY,+BAA+B;IAC1C;;OAEG;IACH,+FAAa,CAAA;AACd,CAAC,EALW,+BAA+B,+CAA/B,+BAA+B,QAK1C"} node_modules/discord-api-types/payloads/v9/oauth2.js.map 0000664 00000001635 15114741631 0017261 0 ustar 00 {"version":3,"file":"oauth2.js","sourceRoot":"","sources":["oauth2.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AAEH,IAAY,YA+HX;AA/HD,WAAY,YAAY;IACvB;;OAEG;IACH,2BAAW,CAAA;IACX;;;;;OAKG;IACH,2CAA2B,CAAA;IAC3B;;OAEG;IACH,mDAAmC,CAAA;IACnC;;;;OAIG;IACH,+BAAe,CAAA;IACf;;;;OAIG;IACH,qCAAqB,CAAA;IACrB;;;;;OAKG;IACH,iCAAiB,CAAA;IACjB;;;;;OAKG;IACH,0CAA0B,CAAA;IAC1B;;;;OAIG;IACH,yDAAyC,CAAA;IACzC;;;;OAIG;IACH,yCAAyB,CAAA;IACzB;;;OAGG;IACH,8CAA8B,CAAA;IAC9B;;OAEG;IACH,+DAA+C,CAAA;IAC/C;;OAEG;IACH,2BAAW,CAAA;IACX;;OAEG;IACH,+DAA+C,CAAA;IAC/C;;OAEG;IACH,oDAAoC,CAAA;IACpC;;OAEG;IACH,+BAAe,CAAA;IACf;;OAEG;IACH,uEAAuD,CAAA;IACvD;;OAEG;IACH,mEAAmD,CAAA;IACnD;;OAEG;IACH,qEAAqD,CAAA;IACrD;;OAEG;IACH,sEAAsD,CAAA;IACtD;;OAEG;IACH,wDAAwC,CAAA;IACxC;;OAEG;IACH,kDAAkC,CAAA;IAClC;;;;OAIG;IACH,oDAAoC,CAAA;IACpC;;;;OAIG;IACH,8DAA8C,CAAA;IAC9C;;;;OAIG;IACH,2EAA2D,CAAA;IAC3D;;;;OAIG;IACH,iGAAiF,CAAA;AAClF,CAAC,EA/HW,YAAY,4BAAZ,YAAY,QA+HvB"} node_modules/discord-api-types/payloads/v9/channel.js.map 0000664 00000012400 15114741631 0017457 0 ustar 00 {"version":3,"file":"channel.js","sourceRoot":"","sources":["channel.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AAyUH;;GAEG;AACH,IAAY,aASX;AATD,WAAY,aAAa;IACxB;;OAEG;IACH,qEAAc,CAAA;IACd;;OAEG;IACH,iEAAY,CAAA;AACb,CAAC,EATW,aAAa,6BAAb,aAAa,QASxB;AAED;;GAEG;AACH,IAAY,eAaX;AAbD,WAAY,eAAe;IAC1B;;OAEG;IACH,yDAAM,CAAA;IACN;;OAEG;IACH,6DAAQ,CAAA;IACR;;OAEG;IACH,mEAAW,CAAA;AACZ,CAAC,EAbW,eAAe,+BAAf,eAAe,QAa1B;AA4ED;;GAEG;AACH,IAAY,WA4FX;AA5FD,WAAY,WAAW;IACtB;;OAEG;IACH,uDAAS,CAAA;IACT;;OAEG;IACH,yCAAE,CAAA;IACF;;OAEG;IACH,yDAAU,CAAA;IACV;;OAEG;IACH,mDAAO,CAAA;IACP;;;;OAIG;IACH,+DAAa,CAAA;IACb;;;;OAIG;IACH,uEAAiB,CAAA;IACjB;;OAEG;IACH,0EAAuB,CAAA;IACvB;;OAEG;IACH,8DAAY,CAAA;IACZ;;OAEG;IACH,gEAAa,CAAA;IACb;;;;OAIG;IACH,oEAAe,CAAA;IACf;;;;OAIG;IACH,kEAAc,CAAA;IACd;;OAEG;IACH,0DAAU,CAAA;IACV;;;;OAIG;IACH,0DAAU,CAAA;IAEV,6EAA6E;IAE7E;;;;;OAKG;IACH,uDAAa,CAAA;IACb;;;;OAIG;IACH,uEAAuE;I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B;;OAEG;IACH,oDAAe,CAAA;IACf;;OAEG;IACH,qFAA+B,CAAA;IAC/B;;OAEG;IACH,uDAAgB,CAAA;IAChB;;OAEG;IACH,qFAA+B,CAAA;IAC/B;;OAEG;IACH,2FAAkC,CAAA;AACnC,CAAC,EAtCW,YAAY,4BAAZ,YAAY,QAsCvB"} node_modules/discord-api-types/payloads/v9/poll.js.map 0000664 00000000325 15114741631 0017020 0 ustar 00 {"version":3,"file":"poll.js","sourceRoot":"","sources":["poll.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AA4CH;;GAEG;AACH,IAAY,cAKX;AALD,WAAY,cAAc;IACzB;;OAEG;IACH,yDAAW,CAAA;AACZ,CAAC,EALW,cAAc,8BAAd,cAAc,QAKzB"} node_modules/discord-api-types/payloads/v9/oauth2.d.ts 0000664 00000012614 15114741631 0016740 0 ustar 00 /** * Types extracted from https://discord.com/developers/docs/topics/oauth2 */ export declare enum OAuth2Scopes { /** * For oauth2 bots, this puts the bot in the user's selected guild by default */ Bot = "bot", /** * Allows {@link https://discord.com/developers/docs/resources/user#get-user-connections | `/users/@me/connections`} * to return linked third-party accounts * * @see {@link https://discord.com/developers/docs/resources/user#get-user-connections} */ Connections = "connections", /** * Allows your app to see information about the user's DMs and group DMs - requires Discord approval */ DMChannelsRead = "dm_channels.read", /** * Enables {@link https://discord.com/developers/docs/resources/user#get-current-user | `/users/@me`} to return an `email` * * @see {@link https://discord.com/developers/docs/resources/user#get-current-user} */ Email = "email", /** * Allows {@link https://discord.com/developers/docs/resources/user#get-current-user | `/users/@me`} without `email` * * @see {@link https://discord.com/developers/docs/resources/user#get-current-user} */ Identify = "identify", /** * Allows {@link https://discord.com/developers/docs/resources/user#get-current-user-guilds | `/users/@me/guilds`} * to return basic information about all of a user's guilds * * @see {@link https://discord.com/developers/docs/resources/user#get-current-user-guilds} */ Guilds = "guilds", /** * Allows {@link https://discord.com/developers/docs/resources/guild#add-guild-member | `/guilds/[guild.id]/members/[user.id]`} * to be used for joining users to a guild * * @see {@link https://discord.com/developers/docs/resources/guild#add-guild-member} */ GuildsJoin = "guilds.join", /** * Allows /users/\@me/guilds/\{guild.id\}/member to return a user's member information in a guild * * @see {@link https://discord.com/developers/docs/resources/user#get-current-user-guild-member} */ GuildsMembersRead = "guilds.members.read", /** * Allows your app to join users to a group dm * * @see {@link https://discord.com/developers/docs/resources/channel#group-dm-add-recipient} */ GroupDMJoins = "gdm.join", /** * For local rpc server api access, this allows you to read messages from all client channels * (otherwise restricted to channels/guilds your app creates) */ MessagesRead = "messages.read", /** * Allows your app to update a user's connection and metadata for the app */ RoleConnectionsWrite = "role_connections.write", /** * For local rpc server access, this allows you to control a user's local Discord client - requires Discord approval */ RPC = "rpc", /** * For local rpc server api access, this allows you to receive notifications pushed out to the user - requires Discord approval */ RPCNotificationsRead = "rpc.notifications.read", /** * This generates a webhook that is returned in the oauth token response for authorization code grants */ WebhookIncoming = "webhook.incoming", /** * Allows your app to connect to voice on user's behalf and see all the voice members - requires Discord approval */ Voice = "voice", /** * Allows your app to upload/update builds for a user's applications - requires Discord approval */ ApplicationsBuildsUpload = "applications.builds.upload", /** * Allows your app to read build data for a user's applications */ ApplicationsBuildsRead = "applications.builds.read", /** * Allows your app to read and update store data (SKUs, store listings, achievements, etc.) for a user's applications */ ApplicationsStoreUpdate = "applications.store.update", /** * Allows your app to read entitlements for a user's applications */ ApplicationsEntitlements = "applications.entitlements", /** * Allows your app to know a user's friends and implicit relationships - requires Discord approval */ RelationshipsRead = "relationships.read", /** * Allows your app to fetch data from a user's "Now Playing/Recently Played" list - requires Discord approval */ ActivitiesRead = "activities.read", /** * Allows your app to update a user's activity - requires Discord approval (NOT REQUIRED FOR GAMESDK ACTIVITY MANAGER) * * @see {@link https://discord.com/developers/docs/game-sdk/activities} */ ActivitiesWrite = "activities.write", /** * Allows your app to use Application Commands in a guild * * @see {@link https://discord.com/developers/docs/interactions/application-commands} */ ApplicationsCommands = "applications.commands", /** * Allows your app to update its Application Commands via this bearer token - client credentials grant only * * @see {@link https://discord.com/developers/docs/interactions/application-commands} */ ApplicationsCommandsUpdate = "applications.commands.update", /** * Allows your app to update permissions for its commands using a Bearer token - client credentials grant only * * @see {@link https://discord.com/developers/docs/interactions/application-commands} */ ApplicationCommandsPermissionsUpdate = "applications.commands.permissions.update" } //# sourceMappingURL=oauth2.d.ts.map node_modules/discord-api-types/payloads/v9/template.d.ts 0000664 00000003312 15114741631 0017344 0 ustar 00 /** * Types extracted from https://discord.com/developers/docs/resources/guild-template */ import type { Snowflake } from '../../globals'; import type { Locale } from '../../rest/common'; import type { RESTPostAPIGuildsJSONBody } from '../../rest/v9/index'; import type { APIUser } from './user'; /** * @see {@link https://discord.com/developers/docs/resources/guild-template#template-object} */ export interface APITemplate { /** * The template code (unique ID) */ code: string; /** * Template name */ name: string; /** * The description for the template */ description: string | null; /** * Number of times this template has been used */ usage_count: number; /** * The ID of the user who created the template */ creator_id: Snowflake; /** * The user who created the template * * @see {@link https://discord.com/developers/docs/resources/user#user-object} */ creator: APIUser; /** * When this template was created */ created_at: string; /** * When this template was last synced to the source guild */ updated_at: string; /** * The ID of the guild this template is based on */ source_guild_id: Snowflake; /** * The guild snapshot this template contains */ serialized_source_guild: APITemplateSerializedSourceGuild; /** * Whether the template has unsynced changes */ is_dirty: boolean | null; } export interface APITemplateSerializedSourceGuild extends Omit<RESTPostAPIGuildsJSONBody, 'icon'> { description: string | null; preferred_locale: Locale; icon_hash: string | null; } //# sourceMappingURL=template.d.ts.map node_modules/discord-api-types/payloads/v9/sticker.d.ts.map 0000664 00000002437 15114741631 0017760 0 ustar 00 {"version":3,"file":"sticker.d.ts","sourceRoot":"","sources":["sticker.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC/C,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,QAAQ,CAAC;AAEtC;;GAEG;AACH,MAAM,WAAW,UAAU;IAC1B;;OAEG;IACH,EAAE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/payloads/v9/application.js.map 0000664 00000002220 15114741631 0020351 0 ustar 00 {"version":3,"file":"application.js","sourceRoot":"","sources":["application.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AA8KH;;GAEG;AACH,IAAY,gBAsEX;AAtED,WAAY,gBAAgB;IAC3B;;OAEG;IACH,+EAAyB,CAAA;IACzB;;OAEG;IACH,uEAAqB,CAAA;IACrB;;OAEG;IACH,qEAAoB,CAAA;IACpB;;OAEG;IACH,0EAAsB,CAAA;IACtB;;OAEG;IACH,gIAAiD,CAAA;IACjD;;OAEG;IACH,gFAAyB,CAAA;IACzB;;OAEG;IACH,gFAAyB,CAAA;IACzB;;OAEG;IACH,8FAAgC,CAAA;IAChC;;;;OAIG;IACH,yFAA6B,CAAA;IAC7B;;;;OAIG;IACH,uGAAoC,CAAA;IACpC;;OAEG;IACH,6GAAuC,CAAA;IACvC;;OAEG;IACH,oEAAkB,CAAA;IAClB;;OAEG;IACH,8FAA+B,CAAA;IAC/B;;;OAGG;IACH,4GAAsC,CAAA;IACtC;;OAEG;IACH,yFAA4B,CAAA;IAC5B;;OAEG;IACH,mGAAiC,CAAA;AAClC,CAAC,EAtEW,gBAAgB,gCAAhB,gBAAgB,QAsE3B;AAgCD;;GAEG;AACH,IAAY,qCAiCX;AAjCD,WAAY,qCAAqC;IAChD;;OAEG;IACH,qIAA0B,CAAA;IAC1B;;OAEG;IACH,2IAAyB,CAAA;IACzB;;OAEG;IACH,iHAAY,CAAA;IACZ;;OAEG;IACH,uHAAe,CAAA;IACf;;OAEG;IACH,uIAAuB,CAAA;IACvB;;OAEG;IACH,6IAA0B,CAAA;IAC1B;;OAEG;IACH,iHAAY,CAAA;IACZ;;OAEG;IACH,uHAAe,CAAA;AAChB,CAAC,EAjCW,qCAAqC,qDAArC,qCAAqC,QAiChD;AAED;;GAEG;AACH,IAAY,6BAaX;AAbD,WAAY,6BAA6B;IACxC;;OAEG;IACH,yFAAY,CAAA;IACZ;;OAEG;IACH,uFAAO,CAAA;IACP;;OAEG;IACH,2GAAiB,CAAA;AAClB,CAAC,EAbW,6BAA6B,6CAA7B,6BAA6B,QAaxC"} node_modules/discord-api-types/payloads/v9/user.d.ts.map 0000664 00000007147 15114741631 0017275 0 ustar 00 {"version":3,"file":"user.d.ts","sourceRoot":"","sources":["user.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC/C,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAC;AAEnD;;GAEG;AACH,MAAM,WAAW,OAAO;IACvB;;OAEG;IACH,EAAE,EAAE,SAAS,CAAC;IACd;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC;IACjB;;OAEG;IACH,aAAa,EAAE,MAAM,CAAC;IACtB;;OAEG;IACH,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B;;;;OAIG;IACH,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB;;OAEG;IACH,GAAG,CAAC,EAAE,OAAO,CAAC;IACd;;OAEG;IACH,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB;;OAEG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB;;;;OAIG;IACH,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB;;OAEG;IACH,YAAY,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB;;;;OAIG;IACH,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB;;;;OAIG;IACH,YAAY,CAAC,EAAE,eAAe,CAAC;IAC/B;;;;OAIG;IACH,YAAY,CAAC,EAAE,SAAS,CAAC;IACzB;;;;;OAKG;IACH,iBAAiB,CAAC,EAAE,MAAM,GAA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;;;;OAIG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,MAAM,EAAE,SAAS,CAAC;CAClB;AAED;;;;GAIG;AACH,MAAM,WAAW,eAAe;IAC/B;;OAEG;IACH,SAAS,CAAC,EAAE,gBAAgB,CAAC;CAC7B;AAED;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAChC;;OAEG;IACH,MAAM,EAAE,SAAS,CAAC;IAClB;;;;OAIG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,OAAO,EAAE,gBAAgB,CAAC;CAC1B;AAED;;GAEG;AACH,oBAAY,gBAAgB;IAC3B,KAAK,UAAU;IACf,SAAS,eAAe;IACxB,MAAM,WAAW;IACjB,MAAM,WAAW;IACjB,OAAO,YAAY;IACnB,MAAM,WAAW;IACjB,KAAK,UAAU;IACf,GAAG,QAAQ;IACX,IAAI,SAAS;IACb,MAAM,WAAW;IACjB,KAAK,UAAU;CACf"} node_modules/discord-api-types/payloads/v9/guild.d.ts.map 0000664 00000025364 15114741631 0017424 0 ustar 00 {"version":3,"file":"guild.d.ts","sourceRoot":"","sources":["guild.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC5D,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,KAAK,EAAE,QAAQ,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AACzD,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,WAAW,CAAC;AAC7D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAC7C,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAC7C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AAC5C,OAAO,KAAK,EAAE,uBAAuB,EAAE,OAAO,E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AAC;IAC1C;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,aAAa,EAAE,OAAO,CAAC;IACvB;;OAEG;IACH,QAAQ,EAAE,OAAO,CAAC;IAClB;;;OAGG;IACH,aAAa,EAAE,OAAO,CAAC;IACvB;;OAEG;IACH,IAAI,EAAE,yBAAyB,CAAC;CAChC;AAED;;GAEG;AACH,MAAM,WAAW,8BAA8B;IAC9C;;OAEG;IACH,EAAE,EAAE,SAAS,CAAC;IACd;;OAEG;IACH,WAAW,EAAE,SAAS,EAAE,CAAC;IACzB;;OAEG;IACH,QAAQ,EAAE,SAAS,EAAE,CAAC;IACtB;;OAEG;IACH,KAAK,EAAE,eAAe,CAAC;IACvB;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;CAC3B;AAED;;GAEG;AACH,oBAAY,mBAAmB;IAC9B;;OAEG;IACH,iBAAiB,IAAA;IACjB;;OAEG;IACH,kBAAkB,IAAA;CAClB;AAED;;GAEG;AACH,oBAAY,yBAAyB;IACpC,cAAc,IAAA;IACd,QAAQ,IAAA;CACR;AAED,MAAM,WAAW,gBAAgB;IAChC;;OAEG;IACH,sBAAsB,EAAE,MAAM,GAAG,IAAI,CAAC;IACtC;;OAEG;IACH,kBAAkB,EAAE,MAAM,GAAG,IAAI,CAAC;IAClC;;OAEG;IACH,mBAAmB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACpC;;OAEG;IACH,gBAAgB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CACjC"} node_modules/discord-api-types/payloads/v9/poll.js 0000664 00000001043 15114741631 0016242 0 ustar 00 "use strict"; /** * Types extracted from https://discord.com/developers/docs/resources/poll */ Object.defineProperty(exports, "__esModule", { value: true }); exports.PollLayoutType = void 0; /** * @see {@link https://discord.com/developers/docs/resources/poll#layout-type} */ var PollLayoutType; (function (PollLayoutType) { /** * The, uhm, default layout type */ PollLayoutType[PollLayoutType["Default"] = 1] = "Default"; })(PollLayoutType || (exports.PollLayoutType = PollLayoutType = {})); //# sourceMappingURL=poll.js.map node_modules/discord-api-types/payloads/v9/stageInstance.d.ts 0000664 00000004633 15114741631 0020330 0 ustar 00 import type { Snowflake } from '../../globals'; import type { APIGuildMember } from './guild'; /** * @see {@link https://discord.com/developers/docs/resources/stage-instance#stage-instance-object} */ export interface APIStageInstance { /** * The id of the stage instance */ id: Snowflake; /** * The guild id of the associated stage channel */ guild_id: Snowflake; /** * The id of the associated stage channel */ channel_id: Snowflake; /** * The topic of the stage instance (1-120 characters) */ topic: string; /** * The privacy level of the stage instance * * @see {@link https://discord.com/developers/docs/resources/stage-instance#stage-instance-object-privacy-level} */ privacy_level: StageInstancePrivacyLevel; /** * Whether or not stage discovery is disabled * * @deprecated * {@link https://github.com/discord/discord-api-docs/pull/4296 | discord-api-docs#4296} */ discoverable_disabled: boolean; /** * The id of the scheduled event for this stage instance */ guild_scheduled_event_id?: Snowflake; } /** * @see {@link https://discord.com/developers/docs/resources/stage-instance#stage-instance-object-privacy-level} */ export declare enum StageInstancePrivacyLevel { /** * The stage instance is visible publicly, such as on stage discovery * * @deprecated * {@link https://github.com/discord/discord-api-docs/pull/4296 | discord-api-docs#4296} */ Public = 1, /** * The stage instance is visible to only guild members */ GuildOnly = 2 } /** * @see {@link https://discord.com/developers/docs/resources/invite#invite-stage-instance-object-invite-stage-instance-structure} * @deprecated * {@link https://github.com/discord/discord-api-docs/pull/4479 | discord-api-docs#4479} */ export interface APIInviteStageInstance { /** * The topic of the stage instance (1-120 characters) */ topic: string; /** * The number of users in the stage */ participant_count: number; /** * The number of users speaking in the stage */ speaker_count: number; /** * The members speaking in the stage * * @see {@link https://discord.com/developers/docs/resources/guild#guild-member-object-guild-member-structure} */ members: APIGuildMember[]; } //# sourceMappingURL=stageInstance.d.ts.map node_modules/discord-api-types/payloads/v9/autoModeration.d.ts 0000664 00000017145 15114741631 0020534 0 ustar 00 /** * Types extracted from https://discord.com/developers/docs/resources/auto-moderation */ import type { Snowflake } from '../../globals'; /** * @see {@link https://discord.com/developers/docs/resources/auto-moderation#auto-moderation-rule-object-auto-moderation-rule-structure} */ export interface APIAutoModerationRule { /** * The id of this rule */ id: Snowflake; /** * The guild which this rule belongs to */ guild_id: Snowflake; /** * The rule name */ name: string; /** * The user id who created this rule */ creator_id: Snowflake; /** * The rule event type */ event_type: AutoModerationRuleEventType; /** * The rule trigger type */ trigger_type: AutoModerationRuleTriggerType; /** * The rule trigger metadata */ trigger_metadata: APIAutoModerationRuleTriggerMetadata; /** * The actions which will execute when this rule is triggered */ actions: APIAutoModerationAction[]; /** * Whether this rule is enabled */ enabled: boolean; /** * The role ids that shouldn't be affected by this rule (Maximum of 20) */ exempt_roles: Snowflake[]; /** * The channel ids that shouldn't be affected by this rule (Maximum of 50) */ exempt_channels: Snowflake[]; } /** * @see {@link https://discord.com/developers/docs/resources/auto-moderation#auto-moderation-rule-object-trigger-types} */ export declare enum AutoModerationRuleTriggerType { /** * Check if content contains words from a user defined list of keywords (Maximum of 6 per guild) */ Keyword = 1, /** * Check if content represents generic spam (Maximum of 1 per guild) */ Spam = 3, /** * Check if content contains words from internal pre-defined wordsets (Maximum of 1 per guild) */ KeywordPreset = 4, /** * Check if content contains more mentions than allowed (Maximum of 1 per guild) */ MentionSpam = 5, /** * Check if member profile contains words from a user defined list of keywords (Maximum of 1 per guild) */ MemberProfile = 6 } /** * @see {@link https://discord.com/developers/docs/resources/auto-moderation#auto-moderation-rule-object-trigger-metadata} */ export interface APIAutoModerationRuleTriggerMetadata { /** * Substrings which will be searched for in content (Maximum of 1000) * * A keyword can be a phrase which contains multiple words. Wildcard symbols can be used to customize how each string will be matched. Each keyword must be 60 characters or less * * @see {@link https://discord.com/developers/docs/resources/auto-moderation#auto-moderation-rule-object-keyword-matching-strategies | Keyword matching strategies} * * Associated trigger types: {@link AutoModerationRuleTriggerType.Keyword}, {@link AutoModerationRuleTriggerType.MemberProfile} */ keyword_filter?: string[]; /** * The internally pre-defined wordsets which will be searched for in content * * Associated trigger type: {@link AutoModerationRuleTriggerType.KeywordPreset} */ presets?: AutoModerationRuleKeywordPresetType[]; /** * Substrings which will be exempt from triggering the preset trigger type (Maximum of 1000) * * A allowed-word can be a phrase which contains multiple words. Wildcard symbols can be used to customize how each string will be matched. Each keyword must be 60 characters or less * * @see {@link https://discord.com/developers/docs/resources/auto-moderation#auto-moderation-rule-object-keyword-matching-strategies | Keyword matching strategies} * * Associated trigger types: {@link AutoModerationRuleTriggerType.Keyword}, {@link AutoModerationRuleTriggerType.KeywordPreset}, {@link AutoModerationRuleTriggerType.MemberProfile} */ allow_list?: string[]; /** * Regular expression patterns which will be matched against content (Maximum of 10) * * Only Rust flavored regex is currently supported (Maximum of 260 characters) * * Associated trigger types: {@link AutoModerationRuleTriggerType.Keyword}, {@link AutoModerationRuleTriggerType.MemberProfile} */ regex_patterns?: string[]; /** * Total number of mentions (role & user) allowed per message (Maximum of 50) * * Associated trigger type: {@link AutoModerationRuleTriggerType.MentionSpam} */ mention_total_limit?: number; /** * Whether to automatically detect mention raids * * Associated trigger type: {@link AutoModerationRuleTriggerType.MentionSpam} */ mention_raid_protection_enabled?: boolean; } /** * @see {@link https://discord.com/developers/docs/resources/auto-moderation#auto-moderation-rule-object-keyword-preset-types} */ export declare enum AutoModerationRuleKeywordPresetType { /** * Words that may be considered forms of swearing or cursing */ Profanity = 1, /** * Words that refer to sexually explicit behavior or activity */ SexualContent = 2, /** * Personal insults or words that may be considered hate speech */ Slurs = 3 } /** * @see {@link https://discord.com/developers/docs/resources/auto-moderation#auto-moderation-rule-object-event-types} */ export declare enum AutoModerationRuleEventType { /** * When a member sends or edits a message in the guild */ MessageSend = 1, /** * When a member edits their profile */ MemberUpdate = 2 } /** * @see {@link https://discord.com/developers/docs/resources/auto-moderation#auto-moderation-action-object-auto-moderation-action-structure} */ export interface APIAutoModerationAction { /** * The action type */ type: AutoModerationActionType; /** * Additional metadata needed during execution for this specific action type * * Will only be omitted if the action type is {@link AutoModerationActionType.BlockMessage} */ metadata?: APIAutoModerationActionMetadata; } /** * @see {@link https://discord.com/developers/docs/resources/auto-moderation#auto-moderation-action-object-action-types} */ export declare enum AutoModerationActionType { /** * Blocks a member's message and prevents it from being posted. * A custom explanation can be specified and shown to members whenever their message is blocked */ BlockMessage = 1, /** * Logs user content to a specified channel */ SendAlertMessage = 2, /** * Timeout user for specified duration, this action type can be set if the bot has `MODERATE_MEMBERS` permission */ Timeout = 3, /** * Prevents a member from using text, voice, or other interactions */ BlockMemberInteraction = 4 } /** * @see {@link https://discord.com/developers/docs/resources/auto-moderation#auto-moderation-action-object-action-metadata} */ export interface APIAutoModerationActionMetadata { /** * Channel to which user content should be logged * * Associated action type: {@link AutoModerationActionType.SendAlertMessage} */ channel_id?: Snowflake; /** * Timeout duration in seconds (Maximum of 4 weeks - 2419200 seconds) * * Only available if using {@link AutoModerationRuleTriggerType.Keyword} * * Associated action type: {@link AutoModerationActionType.Timeout} */ duration_seconds?: number; /** * Additional explanation that will be shown to members whenever their message is blocked (Maximum 150 characters) * * Associated action type {@link AutoModerationActionType.BlockMessage} */ custom_message?: string; } //# sourceMappingURL=autoModeration.d.ts.map node_modules/discord-api-types/payloads/v9/permissions.js.map 0000664 00000000345 15114741631 0020427 0 ustar 00 {"version":3,"file":"permissions.js","sourceRoot":"","sources":["permissions.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AA0FH;;GAEG;AACH,IAAY,SAKX;AALD,WAAY,SAAS;IACpB;;OAEG;IACH,iDAAiB,CAAA;AAClB,CAAC,EALW,SAAS,yBAAT,SAAS,QAKpB"} node_modules/discord-api-types/payloads/v9/gateway.js 0000664 00000006315 15114741631 0016744 0 ustar 00 "use strict"; /** * Types extracted from * - https://discord.com/developers/docs/topics/gateway * - https://discord.com/developers/docs/topics/gateway-events */ Object.defineProperty(exports, "__esModule", { value: true }); exports.ActivityFlags = exports.ActivityType = exports.ActivityPlatform = exports.PresenceUpdateStatus = void 0; /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#update-presence-status-types} */ var PresenceUpdateStatus; (function (PresenceUpdateStatus) { PresenceUpdateStatus["Online"] = "online"; PresenceUpdateStatus["DoNotDisturb"] = "dnd"; PresenceUpdateStatus["Idle"] = "idle"; /** * Invisible and shown as offline */ PresenceUpdateStatus["Invisible"] = "invisible"; PresenceUpdateStatus["Offline"] = "offline"; })(PresenceUpdateStatus || (exports.PresenceUpdateStatus = PresenceUpdateStatus = {})); /** * @unstable This enum is currently not documented by Discord but has known values which we will try to keep up to date. * Values might be added or removed without a major version bump. */ var ActivityPlatform; (function (ActivityPlatform) { ActivityPlatform["Desktop"] = "desktop"; ActivityPlatform["Xbox"] = "xbox"; ActivityPlatform["Samsung"] = "samsung"; ActivityPlatform["IOS"] = "ios"; ActivityPlatform["Android"] = "android"; ActivityPlatform["Embedded"] = "embedded"; ActivityPlatform["PS4"] = "ps4"; ActivityPlatform["PS5"] = "ps5"; })(ActivityPlatform || (exports.ActivityPlatform = ActivityPlatform = {})); /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#activity-object-activity-types} */ var ActivityType; (function (ActivityType) { /** * Playing \{game\} */ ActivityType[ActivityType["Playing"] = 0] = "Playing"; /** * Streaming \{details\} */ ActivityType[ActivityType["Streaming"] = 1] = "Streaming"; /** * Listening to \{name\} */ ActivityType[ActivityType["Listening"] = 2] = "Listening"; /** * Watching \{details\} */ ActivityType[ActivityType["Watching"] = 3] = "Watching"; /** * \{emoji\} \{state\} */ ActivityType[ActivityType["Custom"] = 4] = "Custom"; /** * Competing in \{name\} */ ActivityType[ActivityType["Competing"] = 5] = "Competing"; })(ActivityType || (exports.ActivityType = ActivityType = {})); /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#activity-object-activity-flags} */ var ActivityFlags; (function (ActivityFlags) { ActivityFlags[ActivityFlags["Instance"] = 1] = "Instance"; ActivityFlags[ActivityFlags["Join"] = 2] = "Join"; ActivityFlags[ActivityFlags["Spectate"] = 4] = "Spectate"; ActivityFlags[ActivityFlags["JoinRequest"] = 8] = "JoinRequest"; ActivityFlags[ActivityFlags["Sync"] = 16] = "Sync"; ActivityFlags[ActivityFlags["Play"] = 32] = "Play"; ActivityFlags[ActivityFlags["PartyPrivacyFriends"] = 64] = "PartyPrivacyFriends"; ActivityFlags[ActivityFlags["PartyPrivacyVoiceChannel"] = 128] = "PartyPrivacyVoiceChannel"; ActivityFlags[ActivityFlags["Embedded"] = 256] = "Embedded"; })(ActivityFlags || (exports.ActivityFlags = ActivityFlags = {})); //# sourceMappingURL=gateway.js.map node_modules/discord-api-types/payloads/v9/emoji.js.map 0000664 00000000152 15114741631 0017153 0 ustar 00 {"version":3,"file":"emoji.js","sourceRoot":"","sources":["emoji.ts"],"names":[],"mappings":";AAAA;;GAEG"} node_modules/discord-api-types/payloads/v9/application.js 0000664 00000017440 15114741631 0017607 0 ustar 00 "use strict"; /** * Types extracted from https://discord.com/developers/docs/resources/application */ Object.defineProperty(exports, "__esModule", { value: true }); exports.ApplicationWebhookEventStatus = exports.ApplicationRoleConnectionMetadataType = exports.ApplicationFlags = void 0; /** * @see {@link https://discord.com/developers/docs/resources/application#application-object-application-flags} */ var ApplicationFlags; (function (ApplicationFlags) { /** * @unstable This application flag is currently not documented by Discord but has a known value which we will try to keep up to date. */ ApplicationFlags[ApplicationFlags["EmbeddedReleased"] = 2] = "EmbeddedReleased"; /** * @unstable This application flag is currently not documented by Discord but has a known value which we will try to keep up to date. */ ApplicationFlags[ApplicationFlags["ManagedEmoji"] = 4] = "ManagedEmoji"; /** * @unstable This application flag is currently not documented by Discord but has a known value which we will try to keep up to date. */ ApplicationFlags[ApplicationFlags["EmbeddedIAP"] = 8] = "EmbeddedIAP"; /** * @unstable This application flag is currently not documented by Discord but has a known value which we will try to keep up to date. */ ApplicationFlags[ApplicationFlags["GroupDMCreate"] = 16] = "GroupDMCreate"; /** * Indicates if an app uses the Auto Moderation API */ ApplicationFlags[ApplicationFlags["ApplicationAutoModerationRuleCreateBadge"] = 64] = "ApplicationAutoModerationRuleCreateBadge"; /** * @unstable This application flag is currently not documented by Discord but has a known value which we will try to keep up to date. */ ApplicationFlags[ApplicationFlags["RPCHasConnected"] = 2048] = "RPCHasConnected"; /** * Intent required for bots in 100 or more servers to receive `presence_update` events */ ApplicationFlags[ApplicationFlags["GatewayPresence"] = 4096] = "GatewayPresence"; /** * Intent required for bots in under 100 servers to receive `presence_update` events, found in Bot Settings */ ApplicationFlags[ApplicationFlags["GatewayPresenceLimited"] = 8192] = "GatewayPresenceLimited"; /** * Intent required for bots in 100 or more servers to receive member-related events like `guild_member_add`. * * @see List of member-related events {@link https://discord.com/developers/docs/topics/gateway#list-of-intents | under `GUILD_MEMBERS`} */ ApplicationFlags[ApplicationFlags["GatewayGuildMembers"] = 16384] = "GatewayGuildMembers"; /** * Intent required for bots in under 100 servers to receive member-related events like `guild_member_add`, found in Bot Settings. * * @see List of member-related events {@link https://discord.com/developers/docs/topics/gateway#list-of-intents | under `GUILD_MEMBERS`} */ ApplicationFlags[ApplicationFlags["GatewayGuildMembersLimited"] = 32768] = "GatewayGuildMembersLimited"; /** * Indicates unusual growth of an app that prevents verification */ ApplicationFlags[ApplicationFlags["VerificationPendingGuildLimit"] = 65536] = "VerificationPendingGuildLimit"; /** * Indicates if an app is embedded within the Discord client (currently unavailable publicly) */ ApplicationFlags[ApplicationFlags["Embedded"] = 131072] = "Embedded"; /** * Intent required for bots in 100 or more servers to receive {@link https://support-dev.discord.com/hc/articles/6207308062871 | message content} */ ApplicationFlags[ApplicationFlags["GatewayMessageContent"] = 262144] = "GatewayMessageContent"; /** * Intent required for bots in under 100 servers to receive {@link https://support-dev.discord.com/hc/articles/6207308062871 | message content}, * found in Bot Settings */ ApplicationFlags[ApplicationFlags["GatewayMessageContentLimited"] = 524288] = "GatewayMessageContentLimited"; /** * @unstable This application flag is currently not documented by Discord but has a known value which we will try to keep up to date. */ ApplicationFlags[ApplicationFlags["EmbeddedFirstParty"] = 1048576] = "EmbeddedFirstParty"; /** * Indicates if an app has registered global {@link https://discord.com/developers/docs/interactions/application-commands | application commands} */ ApplicationFlags[ApplicationFlags["ApplicationCommandBadge"] = 8388608] = "ApplicationCommandBadge"; })(ApplicationFlags || (exports.ApplicationFlags = ApplicationFlags = {})); /** * @see {@link https://discord.com/developers/docs/resources/application-role-connection-metadata#application-role-connection-metadata-object-application-role-connection-metadata-type} */ var ApplicationRoleConnectionMetadataType; (function (ApplicationRoleConnectionMetadataType) { /** * The metadata value (`integer`) is less than or equal to the guild's configured value (`integer`) */ ApplicationRoleConnectionMetadataType[ApplicationRoleConnectionMetadataType["IntegerLessThanOrEqual"] = 1] = "IntegerLessThanOrEqual"; /** * The metadata value (`integer`) is greater than or equal to the guild's configured value (`integer`) */ ApplicationRoleConnectionMetadataType[ApplicationRoleConnectionMetadataType["IntegerGreaterThanOrEqual"] = 2] = "IntegerGreaterThanOrEqual"; /** * The metadata value (`integer`) is equal to the guild's configured value (`integer`) */ ApplicationRoleConnectionMetadataType[ApplicationRoleConnectionMetadataType["IntegerEqual"] = 3] = "IntegerEqual"; /** * The metadata value (`integer`) is not equal to the guild's configured value (`integer`) */ ApplicationRoleConnectionMetadataType[ApplicationRoleConnectionMetadataType["IntegerNotEqual"] = 4] = "IntegerNotEqual"; /** * The metadata value (`ISO8601 string`) is less than or equal to the guild's configured value (`integer`; days before current date) */ ApplicationRoleConnectionMetadataType[ApplicationRoleConnectionMetadataType["DatetimeLessThanOrEqual"] = 5] = "DatetimeLessThanOrEqual"; /** * The metadata value (`ISO8601 string`) is greater than or equal to the guild's configured value (`integer`; days before current date) */ ApplicationRoleConnectionMetadataType[ApplicationRoleConnectionMetadataType["DatetimeGreaterThanOrEqual"] = 6] = "DatetimeGreaterThanOrEqual"; /** * The metadata value (`integer`) is equal to the guild's configured value (`integer`; `1`) */ ApplicationRoleConnectionMetadataType[ApplicationRoleConnectionMetadataType["BooleanEqual"] = 7] = "BooleanEqual"; /** * The metadata value (`integer`) is not equal to the guild's configured value (`integer`; `1`) */ ApplicationRoleConnectionMetadataType[ApplicationRoleConnectionMetadataType["BooleanNotEqual"] = 8] = "BooleanNotEqual"; })(ApplicationRoleConnectionMetadataType || (exports.ApplicationRoleConnectionMetadataType = ApplicationRoleConnectionMetadataType = {})); /** * @see {@link https://discord.com/developers/docs/resources/application#application-object-application-event-webhook-status} */ var ApplicationWebhookEventStatus; (function (ApplicationWebhookEventStatus) { /** * Webhook events are disabled by developer */ ApplicationWebhookEventStatus[ApplicationWebhookEventStatus["Disabled"] = 1] = "Disabled"; /** * Webhook events are enabled by developer */ ApplicationWebhookEventStatus[ApplicationWebhookEventStatus["Enabled"] = 2] = "Enabled"; /** * Webhook events are disabled by Discord, usually due to inactivity */ ApplicationWebhookEventStatus[ApplicationWebhookEventStatus["DisabledByDiscord"] = 3] = "DisabledByDiscord"; })(ApplicationWebhookEventStatus || (exports.ApplicationWebhookEventStatus = ApplicationWebhookEventStatus = {})); //# sourceMappingURL=application.js.map node_modules/discord-api-types/payloads/v9/poll.d.ts 0000664 00000005326 15114741631 0016506 0 ustar 00 /** * Types extracted from https://discord.com/developers/docs/resources/poll */ import type { APIPartialEmoji } from './emoji'; export interface APIBasePoll { /** * The question of the poll */ question: APIPollMedia; } export interface APIPollDefaults { /** * Whether a user can select multiple answers * * @defaultValue `false` */ allow_multiselect: boolean; /** * The layout type of the poll * * @defaultValue `PollLayoutType.Default` */ layout_type: PollLayoutType; } /** * @see {@link https://discord.com/developers/docs/resources/poll#poll-object-poll-object-structure} */ export interface APIPoll extends APIBasePoll, APIPollDefaults { /** * Each of the answers available in the poll, up to 10 */ answers: APIPollAnswer[]; /** * The time when the poll ends (IS08601 timestamp) */ expiry: string; /** * The results of the poll */ results?: APIPollResults; } /** * @see {@link https://discord.com/developers/docs/resources/poll#layout-type} */ export declare enum PollLayoutType { /** * The, uhm, default layout type */ Default = 1 } /** * @see {@link https://discord.com/developers/docs/resources/poll#poll-media-object-poll-media-object-structure} */ export interface APIPollMedia { /** * The text of the field * * The maximum length is `300` for the question, and `55` for any answer */ text?: string; /** * The emoji of the field */ emoji?: APIPartialEmoji; } export interface APIBasePollAnswer { /** * The data of the answer */ poll_media: APIPollMedia; } /** * @see {@link https://discord.com/developers/docs/resources/poll#poll-answer-object-poll-answer-object-structure} */ export interface APIPollAnswer extends APIBasePollAnswer { /** * The ID of the answer. Starts at `1` for the first answer and goes up sequentially */ answer_id: number; } /** * @see {@link https://discord.com/developers/docs/resources/poll#poll-results-object-poll-results-object-structure} */ export interface APIPollResults { /** * Whether the votes have been precisely counted */ is_finalized: boolean; /** * The counts for each answer */ answer_counts: APIPollAnswerCount[]; } /** * @see {@link https://discord.com/developers/docs/resources/poll#poll-results-object-poll-answer-count-object-structure} */ export interface APIPollAnswerCount { /** * The `answer_id` */ id: number; /** * The number of votes for this answer */ count: number; /** * Whether the current user voted for this answer */ me_voted: boolean; } //# sourceMappingURL=poll.d.ts.map node_modules/discord-api-types/payloads/v9/gateway.d.ts 0000664 00000025152 15114741631 0017200 0 ustar 00 /** * Types extracted from * - https://discord.com/developers/docs/topics/gateway * - https://discord.com/developers/docs/topics/gateway-events */ import type { Snowflake } from '../../globals'; import type { APIThreadChannel, APIThreadMember } from './channel'; import type { APIEmoji } from './emoji'; import type { APIUser } from './user'; /** * @see {@link https://discord.com/developers/docs/topics/gateway#get-gateway} */ export interface APIGatewayInfo { /** * The WSS URL that can be used for connecting to the gateway */ url: string; } /** * @see {@link https://discord.com/developers/docs/topics/gateway#get-gateway-bot} */ export interface APIGatewayBotInfo extends APIGatewayInfo { /** * The recommended number of shards to use when connecting * * @see {@link https://discord.com/developers/docs/topics/gateway#sharding} */ shards: number; /** * Information on the current session start limit * * @see {@link https://discord.com/developers/docs/topics/gateway#session-start-limit-object} */ session_start_limit: APIGatewaySessionStartLimit; } /** * @see {@link https://discord.com/developers/docs/topics/gateway#session-start-limit-object} */ export interface APIGatewaySessionStartLimit { /** * The total number of session starts the current user is allowed */ total: number; /** * The remaining number of session starts the current user is allowed */ remaining: number; /** * The number of milliseconds after which the limit resets */ reset_after: number; /** * The number of identify requests allowed per 5 seconds */ max_concurrency: number; } /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#update-presence} */ export interface GatewayGuildMembersChunkPresence { /** * The user presence is being updated for * * **The user object within this event can be partial, the only field which must be sent is the `id` field, * everything else is optional.** * * @see {@link https://discord.com/developers/docs/resources/user#user-object} */ user: Partial<APIUser> & Pick<APIUser, 'id'>; /** * Either "idle", "dnd", "online", or "offline" */ status?: PresenceUpdateReceiveStatus; /** * User's current activities * * @see {@link https://discord.com/developers/docs/topics/gateway-events#activity-object} */ activities?: GatewayActivity[]; /** * User's platform-dependent status * * @see {@link https://discord.com/developers/docs/topics/gateway-events#client-status-object} */ client_status?: GatewayPresenceClientStatus; } /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#presence-update-presence-update-event-fields} */ export interface GatewayPresenceUpdate extends GatewayGuildMembersChunkPresence { /** * ID of the guild */ guild_id: Snowflake; } /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#update-presence-status-types} */ export declare enum PresenceUpdateStatus { Online = "online", DoNotDisturb = "dnd", Idle = "idle", /** * Invisible and shown as offline */ Invisible = "invisible", Offline = "offline" } export type PresenceUpdateReceiveStatus = Exclude<PresenceUpdateStatus, PresenceUpdateStatus.Invisible>; /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#client-status-object} */ export interface GatewayPresenceClientStatus { /** * The user's status set for an active desktop (Windows, Linux, Mac) application session */ desktop?: PresenceUpdateReceiveStatus; /** * The user's status set for an active mobile (iOS, Android) application session */ mobile?: PresenceUpdateReceiveStatus; /** * The user's status set for an active web (browser, bot account) application session */ web?: PresenceUpdateReceiveStatus; } /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#activity-object-activity-structure} */ export interface GatewayActivity { /** * The activity's id */ id: string; /** * The activity's name */ name: string; /** * Activity type * * @see {@link https://discord.com/developers/docs/topics/gateway-events#activity-object-activity-types} */ type: ActivityType; /** * Stream url, is validated when type is `1` */ url?: string | null; /** * Unix timestamp of when the activity was added to the user's session */ created_at: number; /** * Unix timestamps for start and/or end of the game */ timestamps?: GatewayActivityTimestamps; sync_id?: string; /** * {@link ActivityPlatform} */ platform?: string; /** * Application id for the game */ application_id?: Snowflake; /** * What the player is currently doing */ details?: string | null; /** * The user's current party status, or the text used for a custom status */ state?: string | null; /** * The emoji used for a custom status * * @see {@link https://discord.com/developers/docs/topics/gateway-events#activity-object-activity-emoji} */ emoji?: GatewayActivityEmoji; session_id?: string; /** * Information for the current party of the player * * @see {@link https://discord.com/developers/docs/topics/gateway-events#activity-object-activity-party} */ party?: GatewayActivityParty; /** * Images for the presence and their hover texts * * @see {@link https://discord.com/developers/docs/topics/gateway-events#activity-object-activity-assets} */ assets?: GatewayActivityAssets; /** * Secrets for Rich Presence joining and spectating * * @see {@link https://discord.com/developers/docs/topics/gateway-events#activity-object-activity-secrets} */ secrets?: GatewayActivitySecrets; /** * Whether or not the activity is an instanced game session */ instance?: boolean; /** * Activity flags `OR`d together, describes what the payload includes * * @see {@link https://discord.com/developers/docs/topics/gateway-events#activity-object-activity-flags} * @see {@link https://en.wikipedia.org/wiki/Bit_field} */ flags?: ActivityFlags; /** * The custom buttons shown in the Rich Presence (max 2) */ buttons?: GatewayActivityButton[] | string[]; } /** * @unstable This enum is currently not documented by Discord but has known values which we will try to keep up to date. * Values might be added or removed without a major version bump. */ export declare enum ActivityPlatform { Desktop = "desktop", Xbox = "xbox", Samsung = "samsung", IOS = "ios", Android = "android", Embedded = "embedded", PS4 = "ps4", PS5 = "ps5" } /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#activity-object-activity-types} */ export declare enum ActivityType { /** * Playing \{game\} */ Playing = 0, /** * Streaming \{details\} */ Streaming = 1, /** * Listening to \{name\} */ Listening = 2, /** * Watching \{details\} */ Watching = 3, /** * \{emoji\} \{state\} */ Custom = 4, /** * Competing in \{name\} */ Competing = 5 } /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#activity-object-activity-timestamps} */ export interface GatewayActivityTimestamps { /** * Unix time (in milliseconds) of when the activity started */ start?: number; /** * Unix time (in milliseconds) of when the activity ends */ end?: number; } /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#activity-object-activity-emoji} */ export type GatewayActivityEmoji = Partial<Pick<APIEmoji, 'animated' | 'id'>> & Pick<APIEmoji, 'name'>; /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#activity-object-activity-party} */ export interface GatewayActivityParty { /** * The id of the party */ id?: string; /** * Used to show the party's current and maximum size */ size?: [current_size: number, max_size: number]; } /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#activity-object-activity-assets} */ export type GatewayActivityAssets = Partial<Record<'large_image' | 'large_text' | 'small_image' | 'small_text', string>>; /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#activity-object-activity-secrets} */ export type GatewayActivitySecrets = Partial<Record<'join' | 'match' | 'spectate', string>>; /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#activity-object-activity-flags} */ export declare enum ActivityFlags { Instance = 1, Join = 2, Spectate = 4, JoinRequest = 8, Sync = 16, Play = 32, PartyPrivacyFriends = 64, PartyPrivacyVoiceChannel = 128, Embedded = 256 } export interface GatewayActivityButton { /** * The text shown on the button (1-32 characters) */ label: string; /** * The url opened when clicking the button (1-512 characters) */ url: string; } /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#thread-list-sync-thread-list-sync-event-fields} */ export interface GatewayThreadListSync { /** * ID of the guild */ guild_id: Snowflake; /** * The ids of all the parent channels whose threads are being synced, otherwise the entire guild */ channel_ids?: Snowflake[]; /** * Array of the synced threads */ threads: APIThreadChannel[]; /** * The member objects for the client user in each joined thread that was synced */ members: APIThreadMember[]; } /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#thread-members-update-thread-members-update-event-fields} */ export interface GatewayThreadMembersUpdate { /** * The id of the thread for which members are being synced */ id: Snowflake; /** * The id of the guild that the thread is in */ guild_id: Snowflake; /** * The approximate member count of the thread, does not count above 50 even if there are more members */ member_count: number; /** * The members that were added to the thread */ added_members?: APIThreadMember[]; /** * The ids of the members that were removed from the thread */ removed_member_ids?: Snowflake[]; } //# sourceMappingURL=gateway.d.ts.map node_modules/discord-api-types/payloads/v9/webhook.d.ts 0000664 00000013205 15114741631 0017171 0 ustar 00 /** * Types extracted from https://discord.com/developers/docs/resources/webhook */ import type { Snowflake } from '../../globals'; import type { APIEntitlement, APIGuild, APIUser, APIWebhookSourceGuild, ApplicationIntegrationType, OAuth2Scopes, APIWebhookSourceChannel } from './index'; /** * @see {@link https://discord.com/developers/docs/resources/webhook#webhook-object} */ export interface APIWebhook { /** * The id of the webhook */ id: Snowflake; /** * The type of the webhook * * @see {@link https://discord.com/developers/docs/resources/webhook#webhook-object-webhook-types} */ type: WebhookType; /** * The guild id this webhook is for */ guild_id?: Snowflake; /** * The channel id this webhook is for */ channel_id: Snowflake; /** * The user this webhook was created by (not returned when getting a webhook with its token) * * @see {@link https://discord.com/developers/docs/resources/user#user-object} */ user?: APIUser; /** * The default name of the webhook */ name: string | null; /** * The default avatar of the webhook */ avatar: string | null; /** * The secure token of the webhook (returned for Incoming Webhooks) */ token?: string; /** * The bot/OAuth2 application that created this webhook */ application_id: Snowflake | null; /** * The guild of the channel that this webhook is following (returned for Channel Follower Webhooks) */ source_guild?: APIWebhookSourceGuild; /** * The channel that this webhook is following (returned for Channel Follower Webhooks) */ source_channel?: APIWebhookSourceChannel; /** * The url used for executing the webhook (returned by the webhooks OAuth2 flow) */ url?: string; } /** * @see {@link https://discord.com/developers/docs/events/webhook-events#webhook-event-payloads} */ export type APIWebhookEvent = APIWebhookEventBase<ApplicationWebhookType.Event, APIWebhookEventBody> | APIWebhookEventBase<ApplicationWebhookType.Ping, never>; /** * @see {@link https://discord.com/developers/docs/events/webhook-events#event-body-object} */ export type APIWebhookEventBody = APIWebhookEventEventBase<ApplicationWebhookEventType.ApplicationAuthorized, APIWebhookEventApplicationAuthorizedData> | APIWebhookEventEventBase<ApplicationWebhookEventType.ApplicationDeauthorized, APIWebhookEventApplicationDeauthorizedData> | APIWebhookEventEventBase<ApplicationWebhookEventType.EntitlementCreate, APIWebhookEventEntitlementCreateData> | APIWebhookEventEventBase<ApplicationWebhookEventType.QuestUserEnrollment, APIWebhookEventQuestUserEnrollmentData>; export interface APIWebhookEventApplicationAuthorizedData { /** * Installation context for the authorization. Either guild (`0`) if installed to a server or user (`1`) if installed to a user's account */ integration_type?: ApplicationIntegrationType; /** * User who authorized the app */ user: APIUser; /** * List of scopes the user authorized */ scopes: OAuth2Scopes[]; /** * Server which app was authorized for (when integration type is `0`) */ guild?: APIGuild; } export interface APIWebhookEventApplicationDeauthorizedData { /** * User who deauthorized the app */ user: APIUser; } export type APIWebhookEventEntitlementCreateData = APIEntitlement; export type APIWebhookEventQuestUserEnrollmentData = never; export interface APIWebhookEventBase<Type extends ApplicationWebhookType, Event> { /** * Version scheme for the webhook event. Currently always `1` */ version: 1; /** * ID of your app */ application_id: Snowflake; /** * Type of webhook */ type: Type; /** * Event data payload */ event: Event; } /** * @see {@link https://discord.com/developers/docs/events/webhook-events#webhook-types} */ export declare enum ApplicationWebhookType { /** * PING event sent to verify your Webhook Event URL is active */ Ping = 0, /** * Webhook event (details for event in event body object) */ Event = 1 } export interface APIWebhookEventEventBase<Type extends ApplicationWebhookEventType, Data> { /** * Event type */ type: Type; /** * Timestamp of when the event occurred in ISO8601 format */ timestamp: string; /** * Data for the event. The shape depends on the event type */ data: Data; } /** * @see {@link https://discord.com/developers/docs/events/webhook-events#event-types} */ export declare enum ApplicationWebhookEventType { /** * Sent when an app was authorized by a user to a server or their account */ ApplicationAuthorized = "APPLICATION_AUTHORIZED", /** * Sent when an app was deauthorized by a user */ ApplicationDeauthorized = "APPLICATION_DEAUTHORIZED", /** * Entitlement was created */ EntitlementCreate = "ENTITLEMENT_CREATE", /** * User was added to a Quest (currently unavailable) */ QuestUserEnrollment = "QUEST_USER_ENROLLMENT" } /** * @see {@link https://discord.com/developers/docs/resources/webhook#webhook-object-webhook-types} */ export declare enum WebhookType { /** * Incoming Webhooks can post messages to channels with a generated token */ Incoming = 1, /** * Channel Follower Webhooks are internal webhooks used with Channel Following to post new messages into channels */ ChannelFollower = 2, /** * Application webhooks are webhooks used with Interactions */ Application = 3 } //# sourceMappingURL=webhook.d.ts.map node_modules/discord-api-types/payloads/v9/interactions.js 0000664 00000001641 15114741631 0020002 0 ustar 00 "use strict"; var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { if (k2 === undefined) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { return m[k]; } }; } Object.defineProperty(o, k2, desc); }) : (function(o, m, k, k2) { if (k2 === undefined) k2 = k; o[k2] = m[k]; })); var __exportStar = (this && this.__exportStar) || function(m, exports) { for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); }; Object.defineProperty(exports, "__esModule", { value: true }); __exportStar(require("./_interactions/applicationCommands"), exports); __exportStar(require("./_interactions/responses"), exports); //# sourceMappingURL=interactions.js.map node_modules/discord-api-types/payloads/v9/permissions.js 0000664 00000001061 15114741631 0017647 0 ustar 00 "use strict"; /** * Types extracted from https://discord.com/developers/docs/topics/permissions */ Object.defineProperty(exports, "__esModule", { value: true }); exports.RoleFlags = void 0; /** * @see {@link https://discord.com/developers/docs/topics/permissions#role-object-role-flags} */ var RoleFlags; (function (RoleFlags) { /** * Role can be selected by members in an onboarding prompt */ RoleFlags[RoleFlags["InPrompt"] = 1] = "InPrompt"; })(RoleFlags || (exports.RoleFlags = RoleFlags = {})); //# sourceMappingURL=permissions.js.map node_modules/discord-api-types/payloads/v9/channel.js 0000664 00000057703 15114741631 0016722 0 ustar 00 "use strict"; /** * Types extracted from https://discord.com/developers/docs/resources/channel */ Object.defineProperty(exports, "__esModule", { value: true }); exports.ChannelFlags = exports.SeparatorSpacingSize = exports.UnfurledMediaItemLoadingState = exports.SelectMenuDefaultValueType = exports.TextInputStyle = exports.ButtonStyle = exports.ComponentType = exports.AllowedMentionsTypes = exports.AttachmentFlags = exports.EmbedType = exports.ThreadMemberFlags = exports.ThreadAutoArchiveDuration = exports.OverwriteType = exports.MessageFlags = exports.MessageReferenceType = exports.MessageActivityType = exports.MessageType = exports.VideoQualityMode = exports.ChannelType = exports.ForumLayoutType = exports.SortOrderType = void 0; /** * @see {@link https://discord.com/developers/docs/resources/channel/#channel-object-sort-order-types} */ var SortOrderType; (function (SortOrderType) { /** * Sort forum posts by activity */ SortOrderType[SortOrderType["LatestActivity"] = 0] = "LatestActivity"; /** * Sort forum posts by creation time (from most recent to oldest) */ SortOrderType[SortOrderType["CreationDate"] = 1] = "CreationDate"; })(SortOrderType || (exports.SortOrderType = SortOrderType = {})); /** * @see {@link https://discord.com/developers/docs/resources/channel/#channel-object-forum-layout-types} */ var ForumLayoutType; (function (ForumLayoutType) { /** * No default has been set for forum channel */ ForumLayoutType[ForumLayoutType["NotSet"] = 0] = "NotSet"; /** * Display posts as a list */ ForumLayoutType[ForumLayoutType["ListView"] = 1] = "ListView"; /** * Display posts as a collection of tiles */ ForumLayoutType[ForumLayoutType["GalleryView"] = 2] = "GalleryView"; })(ForumLayoutType || (exports.ForumLayoutType = ForumLayoutType = {})); /** * @see {@link https://discord.com/developers/docs/resources/channel#channel-object-channel-types} */ var ChannelType; (function (ChannelType) { /** * A text channel within a guild */ ChannelType[ChannelType["GuildText"] = 0] = "GuildText"; /** * A direct message between users */ ChannelType[ChannelType["DM"] = 1] = "DM"; /** * A voice channel within a guild */ ChannelType[ChannelType["GuildVoice"] = 2] = "GuildVoice"; /** * A direct message between multiple users */ ChannelType[ChannelType["GroupDM"] = 3] = "GroupDM"; /** * An organizational category that contains up to 50 channels * * @see {@link https://support.discord.com/hc/articles/115001580171} */ ChannelType[ChannelType["GuildCategory"] = 4] = "GuildCategory"; /** * A channel that users can follow and crosspost into their own guild * * @see {@link https://support.discord.com/hc/articles/360032008192} */ ChannelType[ChannelType["GuildAnnouncement"] = 5] = "GuildAnnouncement"; /** * A temporary sub-channel within a Guild Announcement channel */ ChannelType[ChannelType["AnnouncementThread"] = 10] = "AnnouncementThread"; /** * A temporary sub-channel within a Guild Text or Guild Forum channel */ ChannelType[ChannelType["PublicThread"] = 11] = "PublicThread"; /** * A temporary sub-channel within a Guild Text channel that is only viewable by those invited and those with the Manage Threads permission */ ChannelType[ChannelType["PrivateThread"] = 12] = "PrivateThread"; /** * A voice channel for hosting events with an audience * * @see {@link https://support.discord.com/hc/articles/1500005513722} */ ChannelType[ChannelType["GuildStageVoice"] = 13] = "GuildStageVoice"; /** * The channel in a Student Hub containing the listed servers * * @see {@link https://support.discord.com/hc/articles/4406046651927} */ ChannelType[ChannelType["GuildDirectory"] = 14] = "GuildDirectory"; /** * A channel that can only contain threads */ ChannelType[ChannelType["GuildForum"] = 15] = "GuildForum"; /** * A channel like forum channels but contains media for server subscriptions * * @see {@link https://creator-support.discord.com/hc/articles/14346342766743} */ ChannelType[ChannelType["GuildMedia"] = 16] = "GuildMedia"; // EVERYTHING BELOW THIS LINE SHOULD BE OLD NAMES FOR RENAMED ENUM MEMBERS // /** * A channel that users can follow and crosspost into their own guild * * @deprecated This is the old name for {@link ChannelType.GuildAnnouncement} * @see {@link https://support.discord.com/hc/articles/360032008192} */ ChannelType[ChannelType["GuildNews"] = 5] = "GuildNews"; /** * A temporary sub-channel within a Guild Announcement channel * * @deprecated This is the old name for {@link ChannelType.AnnouncementThread} */ // eslint-disable-next-line @typescript-eslint/no-duplicate-enum-values ChannelType[ChannelType["GuildNewsThread"] = 10] = "GuildNewsThread"; /** * A temporary sub-channel within a Guild Text channel * * @deprecated This is the old name for {@link ChannelType.PublicThread} */ ChannelType[ChannelType["GuildPublicThread"] = 11] = "GuildPublicThread"; /** * A temporary sub-channel within a Guild Text channel that is only viewable by those invited and those with the Manage Threads permission * * @deprecated This is the old name for {@link ChannelType.PrivateThread} */ ChannelType[ChannelType["GuildPrivateThread"] = 12] = "GuildPrivateThread"; })(ChannelType || (exports.ChannelType = ChannelType = {})); var VideoQualityMode; (function (VideoQualityMode) { /** * Discord chooses the quality for optimal performance */ VideoQualityMode[VideoQualityMode["Auto"] = 1] = "Auto"; /** * 720p */ VideoQualityMode[VideoQualityMode["Full"] = 2] = "Full"; })(VideoQualityMode || (exports.VideoQualityMode = VideoQualityMode = {})); /** * @see {@link https://discord.com/developers/docs/resources/channel#message-object-message-types} */ var MessageType; (function (MessageType) { MessageType[MessageType["Default"] = 0] = "Default"; MessageType[MessageType["RecipientAdd"] = 1] = "RecipientAdd"; MessageType[MessageType["RecipientRemove"] = 2] = "RecipientRemove"; MessageType[MessageType["Call"] = 3] = "Call"; MessageType[MessageType["ChannelNameChange"] = 4] = "ChannelNameChange"; MessageType[MessageType["ChannelIconChange"] = 5] = "ChannelIconChange"; MessageType[MessageType["ChannelPinnedMessage"] = 6] = "ChannelPinnedMessage"; MessageType[MessageType["UserJoin"] = 7] = "UserJoin"; MessageType[MessageType["GuildBoost"] = 8] = "GuildBoost"; MessageType[MessageType["GuildBoostTier1"] = 9] = "GuildBoostTier1"; MessageType[MessageType["GuildBoostTier2"] = 10] = "GuildBoostTier2"; MessageType[MessageType["GuildBoostTier3"] = 11] = "GuildBoostTier3"; MessageType[MessageType["ChannelFollowAdd"] = 12] = "ChannelFollowAdd"; MessageType[MessageType["GuildDiscoveryDisqualified"] = 14] = "GuildDiscoveryDisqualified"; MessageType[MessageType["GuildDiscoveryRequalified"] = 15] = "GuildDiscoveryRequalified"; MessageType[MessageType["GuildDiscoveryGracePeriodInitialWarning"] = 16] = "GuildDiscoveryGracePeriodInitialWarning"; MessageType[MessageType["GuildDiscoveryGracePeriodFinalWarning"] = 17] = "GuildDiscoveryGracePeriodFinalWarning"; MessageType[MessageType["ThreadCreated"] = 18] = "ThreadCreated"; MessageType[MessageType["Reply"] = 19] = "Reply"; MessageType[MessageType["ChatInputCommand"] = 20] = "ChatInputCommand"; MessageType[MessageType["ThreadStarterMessage"] = 21] = "ThreadStarterMessage"; MessageType[MessageType["GuildInviteReminder"] = 22] = "GuildInviteReminder"; MessageType[MessageType["ContextMenuCommand"] = 23] = "ContextMenuCommand"; MessageType[MessageType["AutoModerationAction"] = 24] = "AutoModerationAction"; MessageType[MessageType["RoleSubscriptionPurchase"] = 25] = "RoleSubscriptionPurchase"; MessageType[MessageType["InteractionPremiumUpsell"] = 26] = "InteractionPremiumUpsell"; MessageType[MessageType["StageStart"] = 27] = "StageStart"; MessageType[MessageType["StageEnd"] = 28] = "StageEnd"; MessageType[MessageType["StageSpeaker"] = 29] = "StageSpeaker"; /** * @unstable https://github.com/discord/discord-api-docs/pull/5927#discussion_r1107678548 */ MessageType[MessageType["StageRaiseHand"] = 30] = "StageRaiseHand"; MessageType[MessageType["StageTopic"] = 31] = "StageTopic"; MessageType[MessageType["GuildApplicationPremiumSubscription"] = 32] = "GuildApplicationPremiumSubscription"; MessageType[MessageType["GuildIncidentAlertModeEnabled"] = 36] = "GuildIncidentAlertModeEnabled"; MessageType[MessageType["GuildIncidentAlertModeDisabled"] = 37] = "GuildIncidentAlertModeDisabled"; MessageType[MessageType["GuildIncidentReportRaid"] = 38] = "GuildIncidentReportRaid"; MessageType[MessageType["GuildIncidentReportFalseAlarm"] = 39] = "GuildIncidentReportFalseAlarm"; MessageType[MessageType["PurchaseNotification"] = 44] = "PurchaseNotification"; MessageType[MessageType["PollResult"] = 46] = "PollResult"; })(MessageType || (exports.MessageType = MessageType = {})); /** * @see {@link https://discord.com/developers/docs/resources/channel#message-object-message-activity-types} */ var MessageActivityType; (function (MessageActivityType) { MessageActivityType[MessageActivityType["Join"] = 1] = "Join"; MessageActivityType[MessageActivityType["Spectate"] = 2] = "Spectate"; MessageActivityType[MessageActivityType["Listen"] = 3] = "Listen"; MessageActivityType[MessageActivityType["JoinRequest"] = 5] = "JoinRequest"; })(MessageActivityType || (exports.MessageActivityType = MessageActivityType = {})); /** * @see {@link https://discord.com/developers/docs/resources/channel#message-reference-types} */ var MessageReferenceType; (function (MessageReferenceType) { /** * A standard reference used by replies */ MessageReferenceType[MessageReferenceType["Default"] = 0] = "Default"; /** * Reference used to point to a message at a point in time */ MessageReferenceType[MessageReferenceType["Forward"] = 1] = "Forward"; })(MessageReferenceType || (exports.MessageReferenceType = MessageReferenceType = {})); /** * @see {@link https://discord.com/developers/docs/resources/channel#message-object-message-flags} */ var MessageFlags; (function (MessageFlags) { /** * This message has been published to subscribed channels (via Channel Following) */ MessageFlags[MessageFlags["Crossposted"] = 1] = "Crossposted"; /** * This message originated from a message in another channel (via Channel Following) */ MessageFlags[MessageFlags["IsCrosspost"] = 2] = "IsCrosspost"; /** * Do not include any embeds when serializing this message */ MessageFlags[MessageFlags["SuppressEmbeds"] = 4] = "SuppressEmbeds"; /** * The source message for this crosspost has been deleted (via Channel Following) */ MessageFlags[MessageFlags["SourceMessageDeleted"] = 8] = "SourceMessageDeleted"; /** * This message came from the urgent message system */ MessageFlags[MessageFlags["Urgent"] = 16] = "Urgent"; /** * This message has an associated thread, which shares its id */ MessageFlags[MessageFlags["HasThread"] = 32] = "HasThread"; /** * This message is only visible to the user who invoked the Interaction */ MessageFlags[MessageFlags["Ephemeral"] = 64] = "Ephemeral"; /** * This message is an Interaction Response and the bot is "thinking" */ MessageFlags[MessageFlags["Loading"] = 128] = "Loading"; /** * This message failed to mention some roles and add their members to the thread */ MessageFlags[MessageFlags["FailedToMentionSomeRolesInThread"] = 256] = "FailedToMentionSomeRolesInThread"; /** * @unstable This message flag is currently not documented by Discord but has a known value which we will try to keep up to date. */ MessageFlags[MessageFlags["ShouldShowLinkNotDiscordWarning"] = 1024] = "ShouldShowLinkNotDiscordWarning"; /** * This message will not trigger push and desktop notifications */ MessageFlags[MessageFlags["SuppressNotifications"] = 4096] = "SuppressNotifications"; /** * This message is a voice message */ MessageFlags[MessageFlags["IsVoiceMessage"] = 8192] = "IsVoiceMessage"; /** * This message has a snapshot (via Message Forwarding) */ MessageFlags[MessageFlags["HasSnapshot"] = 16384] = "HasSnapshot"; /** * Allows you to create fully component-driven messages * * @see {@link https://discord.com/developers/docs/components/overview} */ MessageFlags[MessageFlags["IsComponentsV2"] = 32768] = "IsComponentsV2"; })(MessageFlags || (exports.MessageFlags = MessageFlags = {})); var OverwriteType; (function (OverwriteType) { OverwriteType[OverwriteType["Role"] = 0] = "Role"; OverwriteType[OverwriteType["Member"] = 1] = "Member"; })(OverwriteType || (exports.OverwriteType = OverwriteType = {})); var ThreadAutoArchiveDuration; (function (ThreadAutoArchiveDuration) { ThreadAutoArchiveDuration[ThreadAutoArchiveDuration["OneHour"] = 60] = "OneHour"; ThreadAutoArchiveDuration[ThreadAutoArchiveDuration["OneDay"] = 1440] = "OneDay"; ThreadAutoArchiveDuration[ThreadAutoArchiveDuration["ThreeDays"] = 4320] = "ThreeDays"; ThreadAutoArchiveDuration[ThreadAutoArchiveDuration["OneWeek"] = 10080] = "OneWeek"; })(ThreadAutoArchiveDuration || (exports.ThreadAutoArchiveDuration = ThreadAutoArchiveDuration = {})); var ThreadMemberFlags; (function (ThreadMemberFlags) { /** * @unstable This thread member flag is currently not documented by Discord but has a known value which we will try to keep up to date. */ ThreadMemberFlags[ThreadMemberFlags["HasInteracted"] = 1] = "HasInteracted"; /** * @unstable This thread member flag is currently not documented by Discord but has a known value which we will try to keep up to date. */ ThreadMemberFlags[ThreadMemberFlags["AllMessages"] = 2] = "AllMessages"; /** * @unstable This thread member flag is currently not documented by Discord but has a known value which we will try to keep up to date. */ ThreadMemberFlags[ThreadMemberFlags["OnlyMentions"] = 4] = "OnlyMentions"; /** * @unstable This thread member flag is currently not documented by Discord but has a known value which we will try to keep up to date. */ ThreadMemberFlags[ThreadMemberFlags["NoMessages"] = 8] = "NoMessages"; })(ThreadMemberFlags || (exports.ThreadMemberFlags = ThreadMemberFlags = {})); /** * @see {@link https://discord.com/developers/docs/resources/channel#embed-object-embed-types} */ var EmbedType; (function (EmbedType) { /** * Generic embed rendered from embed attributes */ EmbedType["Rich"] = "rich"; /** * Image embed */ EmbedType["Image"] = "image"; /** * Video embed */ EmbedType["Video"] = "video"; /** * Animated gif image embed rendered as a video embed */ EmbedType["GIFV"] = "gifv"; /** * Article embed */ EmbedType["Article"] = "article"; /** * Link embed */ EmbedType["Link"] = "link"; /** * Auto moderation alert embed * * @unstable This embed type is currently not documented by Discord, but it is returned in the auto moderation system messages. */ EmbedType["AutoModerationMessage"] = "auto_moderation_message"; /** * Poll result embed */ EmbedType["PollResult"] = "poll_result"; })(EmbedType || (exports.EmbedType = EmbedType = {})); /** * @see {@link https://discord.com/developers/docs/resources/channel#attachment-object-attachment-structure-attachment-flags} */ var AttachmentFlags; (function (AttachmentFlags) { /** * This attachment has been edited using the remix feature on mobile */ AttachmentFlags[AttachmentFlags["IsRemix"] = 4] = "IsRemix"; })(AttachmentFlags || (exports.AttachmentFlags = AttachmentFlags = {})); /** * @see {@link https://discord.com/developers/docs/resources/channel#allowed-mentions-object-allowed-mention-types} */ var AllowedMentionsTypes; (function (AllowedMentionsTypes) { /** * Controls `@everyone` and `@here` mentions */ AllowedMentionsTypes["Everyone"] = "everyone"; /** * Controls role mentions */ AllowedMentionsTypes["Role"] = "roles"; /** * Controls user mentions */ AllowedMentionsTypes["User"] = "users"; })(AllowedMentionsTypes || (exports.AllowedMentionsTypes = AllowedMentionsTypes = {})); /** * @see {@link https://discord.com/developers/docs/components/reference#component-object-component-types} */ var ComponentType; (function (ComponentType) { /** * Container to display a row of interactive components */ ComponentType[ComponentType["ActionRow"] = 1] = "ActionRow"; /** * Button component */ ComponentType[ComponentType["Button"] = 2] = "Button"; /** * Select menu for picking from defined text options */ ComponentType[ComponentType["StringSelect"] = 3] = "StringSelect"; /** * Text Input component */ ComponentType[ComponentType["TextInput"] = 4] = "TextInput"; /** * Select menu for users */ ComponentType[ComponentType["UserSelect"] = 5] = "UserSelect"; /** * Select menu for roles */ ComponentType[ComponentType["RoleSelect"] = 6] = "RoleSelect"; /** * Select menu for users and roles */ ComponentType[ComponentType["MentionableSelect"] = 7] = "MentionableSelect"; /** * Select menu for channels */ ComponentType[ComponentType["ChannelSelect"] = 8] = "ChannelSelect"; /** * Container to display text alongside an accessory component */ ComponentType[ComponentType["Section"] = 9] = "Section"; /** * Markdown text */ ComponentType[ComponentType["TextDisplay"] = 10] = "TextDisplay"; /** * Small image that can be used as an accessory */ ComponentType[ComponentType["Thumbnail"] = 11] = "Thumbnail"; /** * Display images and other media */ ComponentType[ComponentType["MediaGallery"] = 12] = "MediaGallery"; /** * Displays an attached file */ ComponentType[ComponentType["File"] = 13] = "File"; /** * Component to add vertical padding between other components */ ComponentType[ComponentType["Separator"] = 14] = "Separator"; /** * @unstable This component type is currently not documented by Discord but has a known value which we will try to keep up to date. */ ComponentType[ComponentType["ContentInventoryEntry"] = 16] = "ContentInventoryEntry"; /** * Container that visually groups a set of components */ ComponentType[ComponentType["Container"] = 17] = "Container"; // EVERYTHING BELOW THIS LINE SHOULD BE OLD NAMES FOR RENAMED ENUM MEMBERS // /** * Select menu for picking from defined text options * * @deprecated This is the old name for {@link ComponentType.StringSelect} */ ComponentType[ComponentType["SelectMenu"] = 3] = "SelectMenu"; })(ComponentType || (exports.ComponentType = ComponentType = {})); /** * @see {@link https://discord.com/developers/docs/components/reference#button-button-styles} */ var ButtonStyle; (function (ButtonStyle) { /** * The most important or recommended action in a group of options */ ButtonStyle[ButtonStyle["Primary"] = 1] = "Primary"; /** * Alternative or supporting actions */ ButtonStyle[ButtonStyle["Secondary"] = 2] = "Secondary"; /** * Positive confirmation or completion actions */ ButtonStyle[ButtonStyle["Success"] = 3] = "Success"; /** * An action with irreversible consequences */ ButtonStyle[ButtonStyle["Danger"] = 4] = "Danger"; /** * Navigates to a URL */ ButtonStyle[ButtonStyle["Link"] = 5] = "Link"; /** * Purchase */ ButtonStyle[ButtonStyle["Premium"] = 6] = "Premium"; })(ButtonStyle || (exports.ButtonStyle = ButtonStyle = {})); /** * @see {@link https://discord.com/developers/docs/components/reference#text-input-text-input-styles} */ var TextInputStyle; (function (TextInputStyle) { /** * Single-line input */ TextInputStyle[TextInputStyle["Short"] = 1] = "Short"; /** * Multi-line input */ TextInputStyle[TextInputStyle["Paragraph"] = 2] = "Paragraph"; })(TextInputStyle || (exports.TextInputStyle = TextInputStyle = {})); /** * @see {@link https://discord.com/developers/docs/components/reference#user-select-select-default-value-structure} */ var SelectMenuDefaultValueType; (function (SelectMenuDefaultValueType) { SelectMenuDefaultValueType["Channel"] = "channel"; SelectMenuDefaultValueType["Role"] = "role"; SelectMenuDefaultValueType["User"] = "user"; })(SelectMenuDefaultValueType || (exports.SelectMenuDefaultValueType = SelectMenuDefaultValueType = {})); var UnfurledMediaItemLoadingState; (function (UnfurledMediaItemLoadingState) { UnfurledMediaItemLoadingState[UnfurledMediaItemLoadingState["Unknown"] = 0] = "Unknown"; UnfurledMediaItemLoadingState[UnfurledMediaItemLoadingState["Loading"] = 1] = "Loading"; UnfurledMediaItemLoadingState[UnfurledMediaItemLoadingState["LoadedSuccess"] = 2] = "LoadedSuccess"; UnfurledMediaItemLoadingState[UnfurledMediaItemLoadingState["LoadedNotFound"] = 3] = "LoadedNotFound"; })(UnfurledMediaItemLoadingState || (exports.UnfurledMediaItemLoadingState = UnfurledMediaItemLoadingState = {})); /** * @see {@link https://discord.com/developers/docs/components/reference#separator} */ var SeparatorSpacingSize; (function (SeparatorSpacingSize) { SeparatorSpacingSize[SeparatorSpacingSize["Small"] = 1] = "Small"; SeparatorSpacingSize[SeparatorSpacingSize["Large"] = 2] = "Large"; })(SeparatorSpacingSize || (exports.SeparatorSpacingSize = SeparatorSpacingSize = {})); /** * @see {@link https://discord.com/developers/docs/resources/channel#channel-object-channel-flags} */ var ChannelFlags; (function (ChannelFlags) { /** * @unstable This channel flag is currently not documented by Discord but has a known value which we will try to keep up to date. */ ChannelFlags[ChannelFlags["GuildFeedRemoved"] = 1] = "GuildFeedRemoved"; /** * This thread is pinned to the top of its parent forum channel */ ChannelFlags[ChannelFlags["Pinned"] = 2] = "Pinned"; /** * @unstable This channel flag is currently not documented by Discord but has a known value which we will try to keep up to date. */ ChannelFlags[ChannelFlags["ActiveChannelsRemoved"] = 4] = "ActiveChannelsRemoved"; /** * Whether a tag is required to be specified when creating a thread in a forum channel. * Tags are specified in the `applied_tags` field */ ChannelFlags[ChannelFlags["RequireTag"] = 16] = "RequireTag"; /** * @unstable This channel flag is currently not documented by Discord but has a known value which we will try to keep up to date. */ ChannelFlags[ChannelFlags["IsSpam"] = 32] = "IsSpam"; /** * @unstable This channel flag is currently not documented by Discord but has a known value which we will try to keep up to date. */ ChannelFlags[ChannelFlags["IsGuildResourceChannel"] = 128] = "IsGuildResourceChannel"; /** * @unstable This channel flag is currently not documented by Discord but has a known value which we will try to keep up to date. */ ChannelFlags[ChannelFlags["ClydeAI"] = 256] = "ClydeAI"; /** * @unstable This channel flag is currently not documented by Discord but has a known value which we will try to keep up to date. */ ChannelFlags[ChannelFlags["IsScheduledForDeletion"] = 512] = "IsScheduledForDeletion"; /** * Whether media download options are hidden. */ ChannelFlags[ChannelFlags["HideMediaDownloadOptions"] = 32768] = "HideMediaDownloadOptions"; })(ChannelFlags || (exports.ChannelFlags = ChannelFlags = {})); //# sourceMappingURL=channel.js.map node_modules/discord-api-types/payloads/v9/emoji.d.ts 0000664 00000003640 15114741631 0016640 0 ustar 00 /** * Types extracted from https://discord.com/developers/docs/resources/emoji */ import type { Snowflake } from '../../globals'; import type { _NonNullableFields } from '../../utils/internals'; import type { APIRole } from './permissions'; import type { APIUser } from './user'; /** * Not documented but mentioned */ export interface APIPartialEmoji { /** * Emoji id */ id: Snowflake | null; /** * Emoji name (can be null only in reaction emoji objects) */ name: string | null; /** * Whether this emoji is animated */ animated?: boolean; } /** * @see {@link https://discord.com/developers/docs/resources/emoji#emoji-object-emoji-structure} */ export interface APIEmoji extends APIPartialEmoji { /** * Roles this emoji is whitelisted to */ roles?: APIRole['id'][]; /** * User that created this emoji */ user?: APIUser; /** * Whether this emoji must be wrapped in colons */ require_colons?: boolean; /** * Whether this emoji is managed */ managed?: boolean; /** * Whether this emoji can be used, may be false due to loss of Server Boosts */ available?: boolean; } /** * @see {@link https://discord.com/developers/docs/resources/emoji#emoji-object-applicationowned-emoji} */ export type APIApplicationEmoji = _NonNullableFields<Required<Pick<APIEmoji, 'animated' | 'id' | 'name' | 'user'>>> & { /** * Roles allowed to use this emoji. * * @remarks Always empty. */ roles: []; /** * Whether this emoji must be wrapped in colons. * * @remarks Always `true`. */ require_colons: true; /** * Whether this emoji is managed. * * @remarks Always `false`. */ managed: false; /** * Whether this emoji is available. * * @remarks Always `true`. */ available: true; }; //# sourceMappingURL=emoji.d.ts.map node_modules/discord-api-types/payloads/v9/guild.js.map 0000664 00000006703 15114741631 0017164 0 ustar 00 {"version":3,"file":"guild.js","sourceRoot":"","sources":["guild.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AAmTH;;GAEG;AACH,IAAY,gCAGX;AAHD,WAAY,gCAAgC;IAC3C,qGAAW,CAAA;IACX,uGAAY,CAAA;AACb,CAAC,EAHW,gCAAgC,gDAAhC,gCAAgC,QAG3C;AAED;;GAEG;AACH,IAAY,0BAIX;AAJD,WAAY,0BAA0B;IACrC,mFAAQ,CAAA;IACR,yGAAmB,CAAA;IACnB,uFAAU,CAAA;AACX,CAAC,EAJW,0BAA0B,0CAA1B,0BAA0B,QAIrC;AAED;;GAEG;AACH,IAAY,aAGX;AAHD,WAAY,aAAa;IACxB,iDAAI,CAAA;IACJ,yDAAQ,CAAA;AACT,CAAC,EAHW,aAAa,6BAAb,aAAa,QAGxB;AAED;;GAEG;AACH,IAAY,cAKX;AALD,WAAY,cAAc;IACzB,yDAAO,CAAA;IACP,2DAAQ,CAAA;IACR,mDAAI,CAAA;IACJ,qEAAa,CAAA;AACd,CAAC,EALW,cAAc,8BAAd,cAAc,QAKzB;AAED;;GAEG;AACH,IAAY,sBAqBX;AArBD,WAAY,sBAAsB;IACjC;;OAEG;IACH,mEAAI,CAAA;IAC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CAAA;IACV,yEAAI,CAAA;AACL,CAAC,EAHW,yBAAyB,yCAAzB,yBAAyB,QAGpC;AA8FD;;GAEG;AACH,IAAY,gBAsBX;AAtBD,WAAY,gBAAgB;IAC3B;;OAEG;IACH,qCAAiB,CAAA;IACjB;;OAEG;IACH,uCAAmB,CAAA;IACnB;;OAEG;IACH,uCAAmB,CAAA;IACnB;;OAEG;IACH,uCAAmB,CAAA;IACnB;;;OAGG;IACH,uCAAmB,CAAA;AACpB,CAAC,EAtBW,gBAAgB,gCAAhB,gBAAgB,QAsB3B;AAoED,IAAY,4BAKX;AALD,WAAY,4BAA4B;IACvC;;OAEG;IACH,+CAAe,CAAA;AAChB,CAAC,EALW,4BAA4B,4CAA5B,4BAA4B,QAKvC;AA6FD;;GAEG;AACH,IAAY,mBASX;AATD,WAAY,mBAAmB;IAC9B;;OAEG;IACH,uFAAiB,CAAA;IACjB;;OAEG;IACH,yFAAkB,CAAA;AACnB,CAAC,EATW,mBAAmB,mCAAnB,mBAAmB,QAS9B;AAED;;GAEG;AACH,IAAY,yBAGX;AAHD,WAAY,yBAAyB;IACpC,6FAAc,CAAA;IACd,iFAAQ,CAAA;AACT,CAAC,EAHW,yBAAyB,yCAAzB,yBAAyB,QAGpC"} node_modules/discord-api-types/payloads/v9/auditLog.js 0000664 00000014041 15114741631 0017046 0 ustar 00 "use strict"; /** * Types extracted from https://discord.com/developers/docs/resources/audit-log */ Object.defineProperty(exports, "__esModule", { value: true }); exports.AuditLogOptionsType = exports.AuditLogEvent = void 0; /** * @see {@link https://discord.com/developers/docs/resources/audit-log#audit-log-entry-object-audit-log-events} */ var AuditLogEvent; (function (AuditLogEvent) { AuditLogEvent[AuditLogEvent["GuildUpdate"] = 1] = "GuildUpdate"; AuditLogEvent[AuditLogEvent["ChannelCreate"] = 10] = "ChannelCreate"; AuditLogEvent[AuditLogEvent["ChannelUpdate"] = 11] = "ChannelUpdate"; AuditLogEvent[AuditLogEvent["ChannelDelete"] = 12] = "ChannelDelete"; AuditLogEvent[AuditLogEvent["ChannelOverwriteCreate"] = 13] = "ChannelOverwriteCreate"; AuditLogEvent[AuditLogEvent["ChannelOverwriteUpdate"] = 14] = "ChannelOverwriteUpdate"; AuditLogEvent[AuditLogEvent["ChannelOverwriteDelete"] = 15] = "ChannelOverwriteDelete"; AuditLogEvent[AuditLogEvent["MemberKick"] = 20] = "MemberKick"; AuditLogEvent[AuditLogEvent["MemberPrune"] = 21] = "MemberPrune"; AuditLogEvent[AuditLogEvent["MemberBanAdd"] = 22] = "MemberBanAdd"; AuditLogEvent[AuditLogEvent["MemberBanRemove"] = 23] = "MemberBanRemove"; AuditLogEvent[AuditLogEvent["MemberUpdate"] = 24] = "MemberUpdate"; AuditLogEvent[AuditLogEvent["MemberRoleUpdate"] = 25] = "MemberRoleUpdate"; AuditLogEvent[AuditLogEvent["MemberMove"] = 26] = "MemberMove"; AuditLogEvent[AuditLogEvent["MemberDisconnect"] = 27] = "MemberDisconnect"; AuditLogEvent[AuditLogEvent["BotAdd"] = 28] = "BotAdd"; AuditLogEvent[AuditLogEvent["RoleCreate"] = 30] = "RoleCreate"; AuditLogEvent[AuditLogEvent["RoleUpdate"] = 31] = "RoleUpdate"; AuditLogEvent[AuditLogEvent["RoleDelete"] = 32] = "RoleDelete"; AuditLogEvent[AuditLogEvent["InviteCreate"] = 40] = "InviteCreate"; AuditLogEvent[AuditLogEvent["InviteUpdate"] = 41] = "InviteUpdate"; AuditLogEvent[AuditLogEvent["InviteDelete"] = 42] = "InviteDelete"; AuditLogEvent[AuditLogEvent["WebhookCreate"] = 50] = "WebhookCreate"; AuditLogEvent[AuditLogEvent["WebhookUpdate"] = 51] = "WebhookUpdate"; AuditLogEvent[AuditLogEvent["WebhookDelete"] = 52] = "WebhookDelete"; AuditLogEvent[AuditLogEvent["EmojiCreate"] = 60] = "EmojiCreate"; AuditLogEvent[AuditLogEvent["EmojiUpdate"] = 61] = "EmojiUpdate"; AuditLogEvent[AuditLogEvent["EmojiDelete"] = 62] = "EmojiDelete"; AuditLogEvent[AuditLogEvent["MessageDelete"] = 72] = "MessageDelete"; AuditLogEvent[AuditLogEvent["MessageBulkDelete"] = 73] = "MessageBulkDelete"; AuditLogEvent[AuditLogEvent["MessagePin"] = 74] = "MessagePin"; AuditLogEvent[AuditLogEvent["MessageUnpin"] = 75] = "MessageUnpin"; AuditLogEvent[AuditLogEvent["IntegrationCreate"] = 80] = "IntegrationCreate"; AuditLogEvent[AuditLogEvent["IntegrationUpdate"] = 81] = "IntegrationUpdate"; AuditLogEvent[AuditLogEvent["IntegrationDelete"] = 82] = "IntegrationDelete"; AuditLogEvent[AuditLogEvent["StageInstanceCreate"] = 83] = "StageInstanceCreate"; AuditLogEvent[AuditLogEvent["StageInstanceUpdate"] = 84] = "StageInstanceUpdate"; AuditLogEvent[AuditLogEvent["StageInstanceDelete"] = 85] = "StageInstanceDelete"; AuditLogEvent[AuditLogEvent["StickerCreate"] = 90] = "StickerCreate"; AuditLogEvent[AuditLogEvent["StickerUpdate"] = 91] = "StickerUpdate"; AuditLogEvent[AuditLogEvent["StickerDelete"] = 92] = "StickerDelete"; AuditLogEvent[AuditLogEvent["GuildScheduledEventCreate"] = 100] = "GuildScheduledEventCreate"; AuditLogEvent[AuditLogEvent["GuildScheduledEventUpdate"] = 101] = "GuildScheduledEventUpdate"; AuditLogEvent[AuditLogEvent["GuildScheduledEventDelete"] = 102] = "GuildScheduledEventDelete"; AuditLogEvent[AuditLogEvent["ThreadCreate"] = 110] = "ThreadCreate"; AuditLogEvent[AuditLogEvent["ThreadUpdate"] = 111] = "ThreadUpdate"; AuditLogEvent[AuditLogEvent["ThreadDelete"] = 112] = "ThreadDelete"; AuditLogEvent[AuditLogEvent["ApplicationCommandPermissionUpdate"] = 121] = "ApplicationCommandPermissionUpdate"; AuditLogEvent[AuditLogEvent["SoundboardSoundCreate"] = 130] = "SoundboardSoundCreate"; AuditLogEvent[AuditLogEvent["SoundboardSoundUpdate"] = 131] = "SoundboardSoundUpdate"; AuditLogEvent[AuditLogEvent["SoundboardSoundDelete"] = 132] = "SoundboardSoundDelete"; AuditLogEvent[AuditLogEvent["AutoModerationRuleCreate"] = 140] = "AutoModerationRuleCreate"; AuditLogEvent[AuditLogEvent["AutoModerationRuleUpdate"] = 141] = "AutoModerationRuleUpdate"; AuditLogEvent[AuditLogEvent["AutoModerationRuleDelete"] = 142] = "AutoModerationRuleDelete"; AuditLogEvent[AuditLogEvent["AutoModerationBlockMessage"] = 143] = "AutoModerationBlockMessage"; AuditLogEvent[AuditLogEvent["AutoModerationFlagToChannel"] = 144] = "AutoModerationFlagToChannel"; AuditLogEvent[AuditLogEvent["AutoModerationUserCommunicationDisabled"] = 145] = "AutoModerationUserCommunicationDisabled"; AuditLogEvent[AuditLogEvent["CreatorMonetizationRequestCreated"] = 150] = "CreatorMonetizationRequestCreated"; AuditLogEvent[AuditLogEvent["CreatorMonetizationTermsAccepted"] = 151] = "CreatorMonetizationTermsAccepted"; AuditLogEvent[AuditLogEvent["OnboardingPromptCreate"] = 163] = "OnboardingPromptCreate"; AuditLogEvent[AuditLogEvent["OnboardingPromptUpdate"] = 164] = "OnboardingPromptUpdate"; AuditLogEvent[AuditLogEvent["OnboardingPromptDelete"] = 165] = "OnboardingPromptDelete"; AuditLogEvent[AuditLogEvent["OnboardingCreate"] = 166] = "OnboardingCreate"; AuditLogEvent[AuditLogEvent["OnboardingUpdate"] = 167] = "OnboardingUpdate"; AuditLogEvent[AuditLogEvent["HomeSettingsCreate"] = 190] = "HomeSettingsCreate"; AuditLogEvent[AuditLogEvent["HomeSettingsUpdate"] = 191] = "HomeSettingsUpdate"; })(AuditLogEvent || (exports.AuditLogEvent = AuditLogEvent = {})); var AuditLogOptionsType; (function (AuditLogOptionsType) { AuditLogOptionsType["Role"] = "0"; AuditLogOptionsType["Member"] = "1"; })(AuditLogOptionsType || (exports.AuditLogOptionsType = AuditLogOptionsType = {})); //# sourceMappingURL=auditLog.js.map node_modules/discord-api-types/payloads/v9/webhook.js 0000664 00000004646 15114741631 0016746 0 ustar 00 "use strict"; /** * Types extracted from https://discord.com/developers/docs/resources/webhook */ Object.defineProperty(exports, "__esModule", { value: true }); exports.WebhookType = exports.ApplicationWebhookEventType = exports.ApplicationWebhookType = void 0; /** * @see {@link https://discord.com/developers/docs/events/webhook-events#webhook-types} */ var ApplicationWebhookType; (function (ApplicationWebhookType) { /** * PING event sent to verify your Webhook Event URL is active */ ApplicationWebhookType[ApplicationWebhookType["Ping"] = 0] = "Ping"; /** * Webhook event (details for event in event body object) */ ApplicationWebhookType[ApplicationWebhookType["Event"] = 1] = "Event"; })(ApplicationWebhookType || (exports.ApplicationWebhookType = ApplicationWebhookType = {})); /** * @see {@link https://discord.com/developers/docs/events/webhook-events#event-types} */ var ApplicationWebhookEventType; (function (ApplicationWebhookEventType) { /** * Sent when an app was authorized by a user to a server or their account */ ApplicationWebhookEventType["ApplicationAuthorized"] = "APPLICATION_AUTHORIZED"; /** * Sent when an app was deauthorized by a user */ ApplicationWebhookEventType["ApplicationDeauthorized"] = "APPLICATION_DEAUTHORIZED"; /** * Entitlement was created */ ApplicationWebhookEventType["EntitlementCreate"] = "ENTITLEMENT_CREATE"; /** * User was added to a Quest (currently unavailable) */ ApplicationWebhookEventType["QuestUserEnrollment"] = "QUEST_USER_ENROLLMENT"; })(ApplicationWebhookEventType || (exports.ApplicationWebhookEventType = ApplicationWebhookEventType = {})); /** * @see {@link https://discord.com/developers/docs/resources/webhook#webhook-object-webhook-types} */ var WebhookType; (function (WebhookType) { /** * Incoming Webhooks can post messages to channels with a generated token */ WebhookType[WebhookType["Incoming"] = 1] = "Incoming"; /** * Channel Follower Webhooks are internal webhooks used with Channel Following to post new messages into channels */ WebhookType[WebhookType["ChannelFollower"] = 2] = "ChannelFollower"; /** * Application webhooks are webhooks used with Interactions */ WebhookType[WebhookType["Application"] = 3] = "Application"; })(WebhookType || (exports.WebhookType = WebhookType = {})); //# sourceMappingURL=webhook.js.map node_modules/discord-api-types/payloads/v9/autoModeration.js.map 0000664 00000001546 15114741631 0021052 0 ustar 00 {"version":3,"file":"autoModeration.js","sourceRoot":"","sources":["autoModeration.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AAsDH;;GAEG;AACH,IAAY,6BAqBX;AArBD,WAAY,6BAA6B;IACxC;;OAEG;IACH,uFAAW,CAAA;IACX;;OAEG;IACH,iFAAQ,CAAA;IACR;;OAEG;IACH,mGAAa,CAAA;IACb;;OAEG;IACH,+FAAW,CAAA;IACX;;OAEG;IACH,mGAAa,CAAA;AACd,CAAC,EArBW,6BAA6B,6CAA7B,6BAA6B,QAqBxC;AAsDD;;GAEG;AACH,IAAY,mCAaX;AAbD,WAAY,mCAAmC;IAC9C;;OAEG;IACH,uGAAa,CAAA;IACb;;OAEG;IACH,+GAAa,CAAA;IACb;;OAEG;IACH,+FAAK,CAAA;AACN,CAAC,EAbW,mCAAmC,mDAAnC,mCAAmC,QAa9C;AAED;;GAEG;AACH,IAAY,2BASX;AATD,WAAY,2BAA2B;IACtC;;OAEG;IACH,2FAAe,CAAA;IACf;;OAEG;IACH,6FAAY,CAAA;AACb,CAAC,EATW,2BAA2B,2CAA3B,2BAA2B,QAStC;AAkBD;;GAEG;AACH,IAAY,wBAkBX;AAlBD,WAAY,wBAAwB;IACnC;;;OAGG;IACH,uFAAgB,CAAA;IAChB;;OAEG;IACH,+FAAgB,CAAA;IAChB;;OAEG;IACH,6EAAO,CAAA;IACP;;OAEG;IACH,2GAAsB,CAAA;AACvB,CAAC,EAlBW,wBAAwB,wCAAxB,wBAAwB,QAkBnC"} node_modules/discord-api-types/payloads/v9/teams.js.map 0000664 00000000547 15114741631 0017171 0 ustar 00 {"version":3,"file":"teams.js","sourceRoot":"","sources":["teams.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AAiEH;;GAEG;AACH,IAAY,yBAGX;AAHD,WAAY,yBAAyB;IACpC,+EAAW,CAAA;IACX,iFAAQ,CAAA;AACT,CAAC,EAHW,yBAAyB,yCAAzB,yBAAyB,QAGpC;AAED;;GAEG;AACH,IAAY,cAIX;AAJD,WAAY,cAAc;IACzB,iCAAe,CAAA;IACf,yCAAuB,CAAA;IACvB,wCAAsB,CAAA;AACvB,CAAC,EAJW,cAAc,8BAAd,cAAc,QAIzB"} node_modules/discord-api-types/payloads/v9/sticker.d.ts 0000664 00000006341 15114741631 0017202 0 ustar 00 /** * Types extracted from https://discord.com/developers/docs/resources/sticker */ import type { Snowflake } from '../../globals'; import type { APIUser } from './user'; /** * @see {@link https://discord.com/developers/docs/resources/sticker#sticker-object} */ export interface APISticker { /** * ID of the sticker */ id: Snowflake; /** * For standard stickers, ID of the pack the sticker is from */ pack_id?: Snowflake; /** * Name of the sticker */ name: string; /** * Description of the sticker */ description: string | null; /** * For guild stickers, the Discord name of a unicode emoji representing the sticker's expression. for standard stickers, a comma-separated list of related expressions. */ tags: string; /** * Previously the sticker asset hash, now an empty string * * @deprecated This field is no longer documented by Discord and will be removed in v11 * @unstable This field is no longer documented by Discord and will be removed in v11 */ asset?: ''; /** * Type of sticker * * @see {@link https://discord.com/developers/docs/resources/sticker#sticker-object-sticker-types} */ type: StickerType; /** * Type of sticker format * * @see {@link https://discord.com/developers/docs/resources/sticker#sticker-object-sticker-format-types} */ format_type: StickerFormatType; /** * Whether this guild sticker can be used, may be false due to loss of Server Boosts */ available?: boolean; /** * ID of the guild that owns this sticker */ guild_id?: Snowflake; /** * The user that uploaded the guild sticker */ user?: APIUser; /** * The standard sticker's sort order within its pack */ sort_value?: number; } /** * @see {@link https://discord.com/developers/docs/resources/sticker#sticker-object-sticker-types} */ export declare enum StickerType { /** * An official sticker in a pack */ Standard = 1, /** * A sticker uploaded to a guild for the guild's members */ Guild = 2 } /** * @see {@link https://discord.com/developers/docs/resources/sticker#sticker-object-sticker-format-types} */ export declare enum StickerFormatType { PNG = 1, APNG = 2, Lottie = 3, GIF = 4 } /** * @see {@link https://discord.com/developers/docs/resources/sticker#sticker-item-object} */ export type APIStickerItem = Pick<APISticker, 'format_type' | 'id' | 'name'>; /** * @see {@link https://discord.com/developers/docs/resources/sticker#sticker-pack-object} */ export interface APIStickerPack { /** * ID of the sticker pack */ id: Snowflake; /** * The stickers in the pack */ stickers: APISticker[]; /** * Name of the sticker pack */ name: string; /** * ID of the pack's SKU */ sku_id: Snowflake; /** * ID of a sticker in the pack which is shown as the pack's icon */ cover_sticker_id?: Snowflake; /** * Description of the sticker pack */ description: string; /** * ID of the sticker pack's banner image */ banner_asset_id?: Snowflake; } //# sourceMappingURL=sticker.d.ts.map node_modules/discord-api-types/payloads/v9/voice.js 0000664 00000000302 15114741631 0016376 0 ustar 00 "use strict"; /** * Types extracted from https://discord.com/developers/docs/resources/voice */ Object.defineProperty(exports, "__esModule", { value: true }); //# sourceMappingURL=voice.js.map node_modules/discord-api-types/payloads/v9/guild.d.ts 0000664 00000101066 15114741631 0016642 0 ustar 00 /** * Types extracted from https://discord.com/developers/docs/resources/guild */ import type { Permissions, Snowflake } from '../../globals'; import type { Locale } from '../../rest/common'; import type { APIEmoji, APIPartialEmoji } from './emoji'; import type { PresenceUpdateReceiveStatus } from './gateway'; import type { OAuth2Scopes } from './oauth2'; import type { APIRole } from './permissions'; import type { APISticker } from './sticker'; import type { APIAvatarDecorationData, APIUser } from './user'; export interface APIBaseGuild { /** * Guild id */ id: Snowflake; } /** * @see {@link https://discord.com/developers/docs/resources/guild#unavailable-guild-object} */ export interface APIUnavailableGuild extends APIBaseGuild { /** * `true` if this guild is unavailable due to an outage */ unavailable: boolean; } /** * @see {@link https://discord.com/developers/docs/resources/guild#guild-object-guild-structure} */ export interface APIPartialGuild extends APIBaseGuild { /** * Guild name (2-100 characters, excluding trailing and leading whitespace) */ name: string; /** * Icon hash * * @see {@link https://discord.com/developers/docs/reference#image-formatting} */ icon: string | null; /** * Splash hash * * @see {@link https://discord.com/developers/docs/reference#image-formatting} */ splash: string | null; /** * Banner hash * * @see {@link https://discord.com/developers/docs/reference#image-formatting} */ banner?: string | null; /** * The description for the guild */ description?: string | null; /** * Enabled guild features * * @see {@link https://discord.com/developers/docs/resources/guild#guild-object-guild-features} */ features?: GuildFeature[]; /** * Verification level required for the guild * * @see {@link https://discord.com/developers/docs/resources/guild#guild-object-verification-level} */ verification_level?: GuildVerificationLevel; /** * The vanity url code for the guild */ vanity_url_code?: string | null; /** * The welcome screen of a Community guild, shown to new members * * Returned in the invite object */ welcome_screen?: APIGuildWelcomeScreen; } /** * Source guild of channel follower webhooks. */ export type APIWebhookSourceGuild = Pick<APIPartialGuild, 'icon' | 'id' | 'name'>; /** * @see {@link https://discord.com/developers/docs/resources/guild#guild-object-guild-structure} */ export interface APIGuild extends APIPartialGuild { /** * Icon hash, returned when in the template object * * @see {@link https://discord.com/developers/docs/reference#image-formatting} */ icon_hash?: string | null; /** * Discovery splash hash; only present for guilds with the "DISCOVERABLE" feature * * @see {@link https://discord.com/developers/docs/reference#image-formatting} */ discovery_splash: string | null; /** * `true` if the user is the owner of the guild * * **This field is only received from https://discord.com/developers/docs/resources/user#get-current-user-guilds** */ owner?: boolean; /** * ID of owner */ owner_id: Snowflake; /** * Total permissions for the user in the guild (excludes overrides) * * **This field is only received from https://discord.com/developers/docs/resources/user#get-current-user-guilds** * * @see {@link https://en.wikipedia.org/wiki/Bit_field} */ permissions?: Permissions; /** * Voice region id for the guild * * @see {@link https://discord.com/developers/docs/resources/voice#voice-region-object} * @deprecated This field has been deprecated in favor of `rtc_region` on the channel. */ region: string; /** * ID of afk channel */ afk_channel_id: Snowflake | null; /** * afk timeout in seconds, can be set to: `60`, `300`, `900`, `1800`, `3600` */ afk_timeout: 1800 | 3600 | 60 | 300 | 900; /** * `true` if the guild widget is enabled */ widget_enabled?: boolean; /** * The channel id that the widget will generate an invite to, or `null` if set to no invite */ widget_channel_id?: Snowflake | null; /** * Verification level required for the guild * * @see {@link https://discord.com/developers/docs/resources/guild#guild-object-verification-level} */ verification_level: GuildVerificationLevel; /** * Default message notifications level * * @see {@link https://discord.com/developers/docs/resources/guild#guild-object-default-message-notification-level} */ default_message_notifications: GuildDefaultMessageNotifications; /** * Explicit content filter level * * @see {@link https://discord.com/developers/docs/resources/guild#guild-object-explicit-content-filter-level} */ explicit_content_filter: GuildExplicitContentFilter; /** * Roles in the guild * * @see {@link https://discord.com/developers/docs/topics/permissions#role-object} */ roles: APIRole[]; /** * Custom guild emojis * * @see {@link https://discord.com/developers/docs/resources/emoji#emoji-object} */ emojis: APIEmoji[]; /** * Enabled guild features * * @see {@link https://discord.com/developers/docs/resources/guild#guild-object-guild-features} */ features: GuildFeature[]; /** * Required MFA level for the guild * * @see {@link https://discord.com/developers/docs/resources/guild#guild-object-mfa-level} */ mfa_level: GuildMFALevel; /** * Application id of the guild creator if it is bot-created */ application_id: Snowflake | null; /** * The id of the channel where guild notices such as welcome messages and boost events are posted */ system_channel_id: Snowflake | null; /** * System channel flags * * @see {@link https://discord.com/developers/docs/resources/guild#guild-object-system-channel-flags} */ system_channel_flags: GuildSystemChannelFlags; /** * The id of the channel where Community guilds can display rules and/or guidelines */ rules_channel_id: Snowflake | null; /** * The maximum number of presences for the guild (`null` is always returned, apart from the largest of guilds) */ max_presences?: number | null; /** * The maximum number of members for the guild */ max_members?: number; /** * The vanity url code for the guild */ vanity_url_code: string | null; /** * The description for the guild */ description: string | null; /** * Banner hash * * @see {@link https://discord.com/developers/docs/reference#image-formatting} */ banner: string | null; /** * Premium tier (Server Boost level) * * @see {@link https://discord.com/developers/docs/resources/guild#guild-object-premium-tier} */ premium_tier: GuildPremiumTier; /** * The number of boosts this guild currently has */ premium_subscription_count?: number; /** * The preferred locale of a Community guild; used in guild discovery and notices from Discord * * @defaultValue `"en-US"` */ preferred_locale: Locale; /** * The id of the channel where admins and moderators of Community guilds receive notices from Discord */ public_updates_channel_id: Snowflake | null; /** * The maximum amount of users in a video channel */ max_video_channel_users?: number; /** * The maximum amount of users in a stage video channel */ max_stage_video_channel_users?: number; /** * Approximate number of members in this guild, * returned from the `GET /guilds/<id>` and `/users/@me/guilds` (OAuth2) endpoints when `with_counts` is `true` */ approximate_member_count?: number; /** * Approximate number of non-offline members in this guild, * returned from the `GET /guilds/<id>` and `/users/@me/guilds` (OAuth2) endpoints when `with_counts` is `true` */ approximate_presence_count?: number; /** * The nsfw level of the guild * * @see {@link https://discord.com/developers/docs/resources/guild#guild-object-guild-nsfw-level} */ nsfw_level: GuildNSFWLevel; /** * Custom guild stickers * * @see {@link https://discord.com/developers/docs/resources/sticker#sticker-object} */ stickers: APISticker[]; /** * Whether the guild has the boost progress bar enabled. */ premium_progress_bar_enabled: boolean; /** * The type of Student Hub the guild is */ hub_type: GuildHubType | null; /** * The id of the channel where admins and moderators of Community guilds receive safety alerts from Discord */ safety_alerts_channel_id: Snowflake | null; /** * The incidents data for this guild */ incidents_data: APIIncidentsData | null; } /** * @see {@link https://discord.com/developers/docs/resources/guild#guild-object-guild-structure} */ export interface APIPartialInteractionGuild extends Pick<APIGuild, 'features' | 'id'> { /** * The preferred locale of a Community guild; used in guild discovery and notices from Discord * * @unstable https://github.com/discord/discord-api-docs/issues/6938 * @defaultValue `"en-US"` */ locale: Locale; } /** * @see {@link https://discord.com/developers/docs/resources/guild#guild-object-default-message-notification-level} */ export declare enum GuildDefaultMessageNotifications { AllMessages = 0, OnlyMentions = 1 } /** * @see {@link https://discord.com/developers/docs/resources/guild#guild-object-explicit-content-filter-level} */ export declare enum GuildExplicitContentFilter { Disabled = 0, MembersWithoutRoles = 1, AllMembers = 2 } /** * @see {@link https://discord.com/developers/docs/resources/guild#guild-object-mfa-level} */ export declare enum GuildMFALevel { None = 0, Elevated = 1 } /** * @see {@link https://discord.com/developers/docs/resources/guild#guild-object-guild-nsfw-level} */ export declare enum GuildNSFWLevel { Default = 0, Explicit = 1, Safe = 2, AgeRestricted = 3 } /** * @see {@link https://discord.com/developers/docs/resources/guild#guild-object-verification-level} */ export declare enum GuildVerificationLevel { /** * Unrestricted */ None = 0, /** * Must have verified email on account */ Low = 1, /** * Must be registered on Discord for longer than 5 minutes */ Medium = 2, /** * Must be a member of the guild for longer than 10 minutes */ High = 3, /** * Must have a verified phone number */ VeryHigh = 4 } /** * @see {@link https://discord.com/developers/docs/resources/guild#guild-object-premium-tier} */ export declare enum GuildPremiumTier { None = 0, Tier1 = 1, Tier2 = 2, Tier3 = 3 } export declare enum GuildHubType { Default = 0, HighSchool = 1, College = 2 } /** * @see {@link https://discord.com/developers/docs/resources/guild#guild-object-system-channel-flags} */ export declare enum GuildSystemChannelFlags { /** * Suppress member join notifications */ SuppressJoinNotifications = 1, /** * Suppress server boost notifications */ SuppressPremiumSubscriptions = 2, /** * Suppress server setup tips */ SuppressGuildReminderNotifications = 4, /** * Hide member join sticker reply buttons */ SuppressJoinNotificationReplies = 8 } /** * @see {@link https://discord.com/developers/docs/resources/guild#guild-object-guild-features} */ export declare enum GuildFeature { /** * Guild has access to set an animated guild banner image */ AnimatedBanner = "ANIMATED_BANNER", /** * Guild has access to set an animated guild icon */ AnimatedIcon = "ANIMATED_ICON", /** * Guild is using the old permissions configuration behavior * * @see {@link https://discord.com/developers/docs/change-log#upcoming-application-command-permission-changes} */ ApplicationCommandPermissionsV2 = "APPLICATION_COMMAND_PERMISSIONS_V2", /** * Guild has set up auto moderation rules */ AutoModeration = "AUTO_MODERATION", /** * Guild has access to set a guild banner image */ Banner = "BANNER", /** * Guild can enable welcome screen, Membership Screening and discovery, and receives community updates */ Community = "COMMUNITY", /** * Guild has enabled monetization */ CreatorMonetizableProvisional = "CREATOR_MONETIZABLE_PROVISIONAL", /** * Guild has enabled the role subscription promo page */ CreatorStorePage = "CREATOR_STORE_PAGE", /** * Guild has been set as a support server on the App Directory */ DeveloperSupportServer = "DEVELOPER_SUPPORT_SERVER", /** * Guild is able to be discovered in the directory */ Discoverable = "DISCOVERABLE", /** * Guild is able to be featured in the directory */ Featurable = "FEATURABLE", /** * Guild is listed in a directory channel */ HasDirectoryEntry = "HAS_DIRECTORY_ENTRY", /** * Guild is a Student Hub * * @see {@link https://support.discord.com/hc/articles/4406046651927} * @unstable This feature is currently not documented by Discord, but has known value */ Hub = "HUB", /** * Guild has disabled invite usage, preventing users from joining */ InvitesDisabled = "INVITES_DISABLED", /** * Guild has access to set an invite splash background */ InviteSplash = "INVITE_SPLASH", /** * Guild is in a Student Hub * * @see {@link https://support.discord.com/hc/articles/4406046651927} * @unstable This feature is currently not documented by Discord, but has known value */ LinkedToHub = "LINKED_TO_HUB", /** * Guild has enabled Membership Screening */ MemberVerificationGateEnabled = "MEMBER_VERIFICATION_GATE_ENABLED", /** * Guild has increased custom soundboard sound slots */ MoreSoundboard = "MORE_SOUNDBOARD", /** * Guild has enabled monetization * * @unstable This feature is no longer documented by Discord */ MonetizationEnabled = "MONETIZATION_ENABLED", /** * Guild has increased custom sticker slots */ MoreStickers = "MORE_STICKERS", /** * Guild has access to create news channels */ News = "NEWS", /** * Guild is partnered */ Partnered = "PARTNERED", /** * Guild can be previewed before joining via Membership Screening or the directory */ PreviewEnabled = "PREVIEW_ENABLED", /** * Guild has access to create private threads */ PrivateThreads = "PRIVATE_THREADS", /** * Guild has disabled alerts for join raids in the configured safety alerts channel */ RaidAlertsDisabled = "RAID_ALERTS_DISABLED", RelayEnabled = "RELAY_ENABLED", /** * Guild is able to set role icons */ RoleIcons = "ROLE_ICONS", /** * Guild has role subscriptions that can be purchased */ RoleSubscriptionsAvailableForPurchase = "ROLE_SUBSCRIPTIONS_AVAILABLE_FOR_PURCHASE", /** * Guild has enabled role subscriptions */ RoleSubscriptionsEnabled = "ROLE_SUBSCRIPTIONS_ENABLED", /** * Guild has created soundboard sounds */ Soundboard = "SOUNDBOARD", /** * Guild has enabled ticketed events */ TicketedEventsEnabled = "TICKETED_EVENTS_ENABLED", /** * Guild has access to set a vanity URL */ VanityURL = "VANITY_URL", /** * Guild is verified */ Verified = "VERIFIED", /** * Guild has access to set 384kbps bitrate in voice (previously VIP voice servers) */ VIPRegions = "VIP_REGIONS", /** * Guild has enabled the welcome screen */ WelcomeScreenEnabled = "WELCOME_SCREEN_ENABLED" } /** * @see {@link https://discord.com/developers/docs/resources/guild#guild-preview-object} */ export interface APIGuildPreview { /** * Guild id */ id: Snowflake; /** * Guild name (2-100 characters) */ name: string; /** * Icon hash * * @see {@link https://discord.com/developers/docs/reference#image-formatting} */ icon: string | null; /** * Splash hash * * @see {@link https://discord.com/developers/docs/reference#image-formatting} */ splash: string | null; /** * Discovery splash hash; only present for guilds with the "DISCOVERABLE" feature * * @see {@link https://discord.com/developers/docs/reference#image-formatting} */ discovery_splash: string | null; /** * Custom guild emojis * * @see {@link https://discord.com/developers/docs/resources/emoji#emoji-object} */ emojis: APIEmoji[]; /** * Enabled guild features * * @see {@link https://discord.com/developers/docs/resources/guild#guild-object-guild-features} */ features: GuildFeature[]; /** * Approximate number of members in this guild */ approximate_member_count: number; /** * Approximate number of online members in this guild */ approximate_presence_count: number; /** * The description for the guild */ description: string; /** * Custom guild stickers */ stickers: APISticker[]; } /** * @see {@link https://discord.com/developers/docs/resources/guild#guild-widget-object} */ export interface APIGuildWidgetSettings { /** * Whether the widget is enabled */ enabled: boolean; /** * The widget channel id */ channel_id: Snowflake | null; } /** * @see {@link https://discord.com/developers/docs/resources/guild#guild-member-object} */ export interface APIBaseGuildMember { /** * This users guild nickname */ nick?: string | null; /** * Array of role object ids * * @see {@link https://discord.com/developers/docs/topics/permissions#role-object} */ roles: Snowflake[]; /** * When the user started boosting the guild * * @see {@link https://support.discord.com/hc/articles/360028038352} */ premium_since?: string | null; /** * Whether the user has not yet passed the guild's Membership Screening requirements * * @remarks If this field is not present, it can be assumed as `false`. */ pending?: boolean; /** * Timestamp of when the time out will be removed; until then, they cannot interact with the guild */ communication_disabled_until?: string | null; /** * The data for the member's guild avatar decoration * * @see {@link https://discord.com/developers/docs/resources/user#avatar-decoration-data-object} */ avatar_decoration_data?: APIAvatarDecorationData | null; } /** * @see {@link https://discord.com/developers/docs/resources/guild#guild-member-object} */ export interface APIFlaggedGuildMember { /** * Guild member flags represented as a bit set * * @defaultValue `0` */ flags: GuildMemberFlags; } /** * @see {@link https://discord.com/developers/docs/resources/guild#guild-member-object} */ export interface APIGuildMemberJoined { /** * When the user joined the guild */ joined_at: string; } /** * @see {@link https://discord.com/developers/docs/resources/guild#guild-member-object} */ export interface APIGuildMemberAvatar { /** * The member's guild avatar hash */ avatar?: string | null; /** * The member's guild banner hash */ banner?: string | null; } /** * @see {@link https://discord.com/developers/docs/resources/guild#guild-member-object} */ export interface APIBaseVoiceGuildMember { /** * Whether the user is deafened in voice channels */ deaf: boolean; /** * Whether the user is muted in voice channels */ mute: boolean; } /** * @see {@link https://discord.com/developers/docs/resources/guild#guild-member-object} */ export interface APIGuildMemberUser { /** * The user this guild member represents * * **This field won't be included in the member object attached to `MESSAGE_CREATE` and `MESSAGE_UPDATE` gateway events.** * * @see {@link https://discord.com/developers/docs/resources/user#user-object} */ user: APIUser; } /** * @see {@link https://discord.com/developers/docs/resources/guild#guild-member-object} */ export interface APIGuildMember extends APIBaseGuildMember, APIBaseVoiceGuildMember, APIFlaggedGuildMember, APIGuildMemberAvatar, APIGuildMemberJoined, APIGuildMemberUser { } /** * @see {@link https://discord.com/developers/docs/resources/guild#guild-member-object-guild-member-flags} */ export declare enum GuildMemberFlags { /** * Member has left and rejoined the guild */ DidRejoin = 1, /** * Member has completed onboarding */ CompletedOnboarding = 2, /** * Member is exempt from guild verification requirements */ BypassesVerification = 4, /** * Member has started onboarding */ StartedOnboarding = 8, /** * Member is a guest and can only access the voice channel they were invited to */ IsGuest = 16, /** * Member has started Server Guide new member actions */ StartedHomeActions = 32, /** * Member has completed Server Guide new member actions */ CompletedHomeActions = 64, /** * Member's username, display name, or nickname is blocked by AutoMod */ AutomodQuarantinedUsernameOrGuildNickname = 128, /** * @deprecated * {@link https://github.com/discord/discord-api-docs/pull/7113 | discord-api-docs#7113} */ AutomodQuarantinedBio = 256, /** * Member has dismissed the DM settings upsell */ DmSettingsUpsellAcknowledged = 512 } /** * @see {@link https://discord.com/developers/docs/resources/guild#integration-object} */ export interface APIGuildIntegration { /** * Integration id */ id: Snowflake; /** * Integration name */ name: string; /** * Integration type */ type: APIGuildIntegrationType; /** * Is this integration enabled */ enabled: boolean; /** * Is this integration syncing * * **This field is not provided for `discord` bot integrations.** */ syncing?: boolean; /** * ID that this integration uses for "subscribers" * * **This field is not provided for `discord` bot integrations.** */ role_id?: Snowflake; /** * Whether emoticons should be synced for this integration (`twitch` only currently) * * **This field is not provided for `discord` bot integrations.** */ enable_emoticons?: boolean; /** * The behavior of expiring subscribers * * **This field is not provided for `discord` bot integrations.** * * @see {@link https://discord.com/developers/docs/resources/guild#integration-object-integration-expire-behaviors} */ expire_behavior?: IntegrationExpireBehavior; /** * The grace period (in days) before expiring subscribers * * **This field is not provided for `discord` bot integrations.** */ expire_grace_period?: number; /** * User for this integration * * **Some older integrations may not have an attached user.** * * @see {@link https://discord.com/developers/docs/resources/user#user-object} */ user?: APIUser; /** * Integration account information * * @see {@link https://discord.com/developers/docs/resources/guild#integration-account-object} */ account: APIIntegrationAccount; /** * When this integration was last synced * * **This field is not provided for `discord` bot integrations.** */ synced_at?: string; /** * How many subscribers this integration has * * **This field is not provided for `discord` bot integrations.** */ subscriber_count?: number; /** * Has this integration been revoked * * **This field is not provided for `discord` bot integrations.** */ revoked?: boolean; /** * The bot/OAuth2 application for discord integrations * * @see {@link https://discord.com/developers/docs/resources/guild#integration-application-object} * * **This field is not provided for `discord` bot integrations.** */ application?: APIGuildIntegrationApplication; /** * The scopes the application has been authorized for */ scopes?: OAuth2Scopes[]; } export type APIGuildIntegrationType = 'discord' | 'guild_subscription' | 'twitch' | 'youtube'; /** * @see {@link https://discord.com/developers/docs/resources/guild#integration-object-integration-expire-behaviors} */ export declare enum IntegrationExpireBehavior { RemoveRole = 0, Kick = 1 } /** * @see {@link https://discord.com/developers/docs/resources/guild#integration-account-object} */ export interface APIIntegrationAccount { /** * ID of the account */ id: string; /** * Name of the account */ name: string; } /** * @see {@link https://discord.com/developers/docs/resources/guild#integration-application-object} */ export interface APIGuildIntegrationApplication { /** * The id of the app */ id: Snowflake; /** * The name of the app */ name: string; /** * The icon hash of the app * * @see {@link https://discord.com/developers/docs/reference#image-formatting} */ icon: string | null; /** * The description of the app */ description: string; /** * The bot associated with this application * * @see {@link https://discord.com/developers/docs/resources/user#user-object} */ bot?: APIUser; } /** * @see {@link https://discord.com/developers/docs/resources/guild#ban-object} */ export interface APIBan { /** * The reason for the ban */ reason: string | null; /** * The banned user */ user: APIUser; } /** * @see {@link https://discord.com/developers/docs/resources/guild#guild-widget-object} */ export interface APIGuildWidget { id: Snowflake; name: string; instant_invite: string | null; channels: APIGuildWidgetChannel[]; members: APIGuildWidgetMember[]; presence_count: number; } /** * @see {@link https://discord.com/developers/docs/resources/guild#guild-widget-object-example-guild-widget} */ export interface APIGuildWidgetChannel { id: Snowflake; name: string; position: number; } /** * @see {@link https://discord.com/developers/docs/resources/guild#guild-widget-object-example-guild-widget} */ export interface APIGuildWidgetMember { id: string; username: string; discriminator: string; avatar: string | null; status: PresenceUpdateReceiveStatus; activity?: { name: string; }; avatar_url: string; } /** * @see {@link https://discord.com/developers/docs/resources/guild#get-guild-widget-image-widget-style-options} */ export declare enum GuildWidgetStyle { /** * Shield style widget with Discord icon and guild members online count */ Shield = "shield", /** * Large image with guild icon, name and online count. "POWERED BY DISCORD" as the footer of the widget */ Banner1 = "banner1", /** * Smaller widget style with guild icon, name and online count. Split on the right with Discord logo */ Banner2 = "banner2", /** * Large image with guild icon, name and online count. In the footer, Discord logo on the left and "Chat Now" on the right */ Banner3 = "banner3", /** * Large Discord logo at the top of the widget. Guild icon, name and online count in the middle portion of the widget * and a "JOIN MY SERVER" button at the bottom */ Banner4 = "banner4" } export interface APIGuildWelcomeScreen { /** * The welcome screen short message */ description: string | null; /** * Array of suggested channels */ welcome_channels: APIGuildWelcomeScreenChannel[]; } export interface APIGuildWelcomeScreenChannel { /** * The channel id that is suggested */ channel_id: Snowflake; /** * The description shown for the channel */ description: string; /** * The emoji id of the emoji that is shown on the left of the channel */ emoji_id: Snowflake | null; /** * The emoji name of the emoji that is shown on the left of the channel */ emoji_name: string | null; } export interface APIGuildMembershipScreening { /** * When the fields were last updated */ version: string; /** * The steps in the screening form */ form_fields: APIGuildMembershipScreeningField[]; /** * The server description shown in the screening form */ description: string | null; } export interface APIGuildMembershipScreeningField { /** * The type of field */ field_type: MembershipScreeningFieldType; /** * The title of the field */ label: string; /** * The list of rules */ values?: string[]; /** * Whether the user has to fill out this field */ required: boolean; } export declare enum MembershipScreeningFieldType { /** * Server Rules */ Terms = "TERMS" } /** * @see {@link https://discord.com/developers/docs/resources/guild#guild-onboarding-object-guild-onboarding-structure} */ export interface APIGuildOnboarding { /** * Id of the guild this onboarding is part of */ guild_id: Snowflake; /** * Prompts shown during onboarding and in customize community */ prompts: APIGuildOnboardingPrompt[]; /** * Channel ids that members get opted into automatically */ default_channel_ids: Snowflake[]; /** * Whether onboarding is enabled in the guild */ enabled: boolean; /** * Current mode of onboarding */ mode: GuildOnboardingMode; } /** * @see {@link https://discord.com/developers/docs/resources/guild#guild-onboarding-object-onboarding-prompt-structure} */ export interface APIGuildOnboardingPrompt { /** * Id of the prompt */ id: Snowflake; /** * Options available within the prompt */ options: APIGuildOnboardingPromptOption[]; /** * Title of the prompt */ title: string; /** * Indicates whether users are limited to selecting one option for the prompt */ single_select: boolean; /** * Indicates whether the prompt is required before a user completes the onboarding flow */ required: boolean; /** * Indicates whether the prompt is present in the onboarding flow. * If `false`, the prompt will only appear in the Channels & Roles tab */ in_onboarding: boolean; /** * Type of prompt */ type: GuildOnboardingPromptType; } /** * @see {@link https://discord.com/developers/docs/resources/guild#guild-onboarding-object-prompt-option-structure} */ export interface APIGuildOnboardingPromptOption { /** * Id of the prompt option */ id: Snowflake; /** * Ids for channels a member is added to when the option is selected */ channel_ids: Snowflake[]; /** * Ids for roles assigned to a member when the option is selected */ role_ids: Snowflake[]; /** * Emoji of the option */ emoji: APIPartialEmoji; /** * Title of the option */ title: string; /** * Description of the option */ description: string | null; } /** * @see {@link https://discord.com/developers/docs/resources/guild#guild-onboarding-object-onboarding-mode} */ export declare enum GuildOnboardingMode { /** * Counts only Default Channels towards constraints */ OnboardingDefault = 0, /** * Counts Default Channels and Questions towards constraints */ OnboardingAdvanced = 1 } /** * @see {@link https://discord.com/developers/docs/resources/guild#guild-onboarding-object-prompt-types} */ export declare enum GuildOnboardingPromptType { MultipleChoice = 0, Dropdown = 1 } export interface APIIncidentsData { /** * When invites get enabled again */ invites_disabled_until: string | null; /** * When direct messages get enabled again */ dms_disabled_until: string | null; /** * When the dm spam was detected */ dm_spam_detected_at?: string | null; /** * When the raid was detected */ raid_detected_at?: string | null; } //# sourceMappingURL=guild.d.ts.map node_modules/discord-api-types/payloads/v9/index.d.ts 0000664 00000001304 15114741631 0016637 0 ustar 00 export * from '../common'; export * from './application'; export * from './auditLog'; export * from './autoModeration'; export * from './channel'; export type * from './emoji'; export * from './gateway'; export * from './guild'; export * from './guildScheduledEvent'; export * from './interactions'; export * from './invite'; export * from './monetization'; export * from './oauth2'; export * from './permissions'; export * from './poll'; export type * from './soundboard'; export * from './stageInstance'; export * from './sticker'; export * from './teams'; export type * from './template'; export * from './user'; export type * from './voice'; export * from './webhook'; //# sourceMappingURL=index.d.ts.map node_modules/discord-api-types/payloads/v9/guildScheduledEvent.d.ts 0000664 00000017477 15114741631 0021501 0 ustar 00 import type { Snowflake } from '../../globals'; import type { APIGuildMember } from './guild'; import type { APIUser } from './user'; export interface APIGuildScheduledEventBase<Type extends GuildScheduledEventEntityType> { /** * The id of the guild event */ id: Snowflake; /** * The guild id which the scheduled event belongs to */ guild_id: Snowflake; /** * The channel id in which the scheduled event will be hosted, or `null` if entity type is `EXTERNAL` */ channel_id: Snowflake | null; /** * The id of the user that created the scheduled event */ creator_id?: Snowflake | null; /** * The name of the scheduled event */ name: string; /** * The description of the scheduled event */ description?: string | null; /** * The time the scheduled event will start */ scheduled_start_time: string; /** * The time at which the guild event will end, or `null` if the event does not have a scheduled time to end */ scheduled_end_time: string | null; /** * The privacy level of the scheduled event */ privacy_level: GuildScheduledEventPrivacyLevel; /** * The status of the scheduled event */ status: GuildScheduledEventStatus; /** * The type of hosting entity associated with the scheduled event */ entity_type: Type; /** * The id of the hosting entity associated with the scheduled event */ entity_id: Snowflake | null; /** * The entity metadata for the scheduled event */ entity_metadata: APIGuildScheduledEventEntityMetadata | null; /** * The user that created the scheduled event */ creator?: APIUser; /** * The number of users subscribed to the scheduled event */ user_count?: number; /** * The cover image of the scheduled event */ image?: string | null; /** * The definition for how often this event should recur */ recurrence_rule: APIGuildScheduledEventRecurrenceRule | null; } /** * @see {@link https://discord.com/developers/docs/resources/guild-scheduled-event#guild-scheduled-event-recurrence-rule-object-guild-scheduled-event-recurrence-rule-structure} */ export interface APIGuildScheduledEventRecurrenceRule { /** * Starting time of the recurrence interval */ start: string; /** * Ending time of the recurrence interval */ end: string | null; /** * How often the event occurs */ frequency: GuildScheduledEventRecurrenceRuleFrequency; /** * The spacing between the events, defined by `frequency`. * For example, `frequency` of {@link GuildScheduledEventRecurrenceRuleFrequency.Weekly} and an `interval` of `2` * would be "every-other week" */ interval: number; /** * Set of specific days within a week for the event to recur on */ by_weekday: GuildScheduledEventRecurrenceRuleWeekday[] | null; /** * List of specific days within a specific week (1-5) to recur on */ by_n_weekday: APIGuildScheduledEventRecurrenceRuleNWeekday[] | null; /** * Set of specific months to recur on */ by_month: GuildScheduledEventRecurrenceRuleMonth[] | null; /** * Set of specific dates within a month to recur on */ by_month_day: number[] | null; /** * Set of days within a year to recur on (1-364) */ by_year_day: number[] | null; /** * The total amount of times that the event is allowed to recur before stopping */ count: number | null; } /** * @see {@link https://discord.com/developers/docs/resources/guild-scheduled-event#guild-scheduled-event-recurrence-rule-object-guild-scheduled-event-recurrence-rule-frequency} */ export declare enum GuildScheduledEventRecurrenceRuleFrequency { Yearly = 0, Monthly = 1, Weekly = 2, Daily = 3 } /** * @see {@link https://discord.com/developers/docs/resources/guild-scheduled-event#guild-scheduled-event-recurrence-rule-object-guild-scheduled-event-recurrence-rule-weekday} */ export declare enum GuildScheduledEventRecurrenceRuleWeekday { Monday = 0, Tuesday = 1, Wednesday = 2, Thursday = 3, Friday = 4, Saturday = 5, Sunday = 6 } /** * @see {@link https://discord.com/developers/docs/resources/guild-scheduled-event#guild-scheduled-event-recurrence-rule-object-guild-scheduled-event-recurrence-rule-month} */ export declare enum GuildScheduledEventRecurrenceRuleMonth { January = 1, February = 2, March = 3, April = 4, May = 5, June = 6, July = 7, August = 8, September = 9, October = 10, November = 11, December = 12 } /** * @see {@link https://discord.com/developers/docs/resources/guild-scheduled-event#guild-scheduled-event-recurrence-rule-object-guild-scheduled-event-recurrence-rule-nweekday-structure} */ export interface APIGuildScheduledEventRecurrenceRuleNWeekday { /** * The week to reoccur on. */ n: 1 | 2 | 3 | 4 | 5; /** * The day within the week to reoccur on */ day: GuildScheduledEventRecurrenceRuleWeekday; } /** * @deprecated Use {@link APIGuildScheduledEventRecurrenceRuleNWeekday} instead */ export type GuildScheduledEventRecurrenceRuleNWeekday = APIGuildScheduledEventRecurrenceRuleNWeekday; export interface APIStageInstanceGuildScheduledEvent extends APIGuildScheduledEventBase<GuildScheduledEventEntityType.StageInstance> { channel_id: Snowflake; entity_metadata: null; } export interface APIVoiceGuildScheduledEvent extends APIGuildScheduledEventBase<GuildScheduledEventEntityType.Voice> { channel_id: Snowflake; entity_metadata: null; } export interface APIExternalGuildScheduledEvent extends APIGuildScheduledEventBase<GuildScheduledEventEntityType.External> { channel_id: null; entity_metadata: Required<APIGuildScheduledEventEntityMetadata>; } /** * @see {@link https://discord.com/developers/docs/resources/guild-scheduled-event#guild-scheduled-event-object-guild-scheduled-event-structure} */ export type APIGuildScheduledEvent = APIExternalGuildScheduledEvent | APIStageInstanceGuildScheduledEvent | APIVoiceGuildScheduledEvent; /** * @see {@link https://discord.com/developers/docs/resources/guild-scheduled-event#guild-scheduled-event-object-guild-scheduled-event-entity-metadata} */ export interface APIGuildScheduledEventEntityMetadata { /** * The location of the scheduled event */ location?: string; } /** * @see {@link https://discord.com/developers/docs/resources/guild-scheduled-event#guild-scheduled-event-object-guild-scheduled-event-entity-types} */ export declare enum GuildScheduledEventEntityType { StageInstance = 1, Voice = 2, External = 3 } /** * @see {@link https://discord.com/developers/docs/resources/guild-scheduled-event#guild-scheduled-event-object-guild-scheduled-event-status} */ export declare enum GuildScheduledEventStatus { Scheduled = 1, Active = 2, Completed = 3, Canceled = 4 } /** * @see {@link https://discord.com/developers/docs/resources/guild-scheduled-event#guild-scheduled-event-object-guild-scheduled-event-privacy-level} */ export declare enum GuildScheduledEventPrivacyLevel { /** * The scheduled event is only accessible to guild members */ GuildOnly = 2 } /** * @see {@link https://discord.com/developers/docs/resources/guild-scheduled-event#guild-scheduled-event-user-object-guild-scheduled-event-user-structure} */ export interface APIGuildScheduledEventUser { /** * The scheduled event id which the user subscribed to */ guild_scheduled_event_id: Snowflake; /** * The user which subscribed to the event */ user: APIUser; /** * The guild member data for this user for the guild which this event belongs to, if any */ member?: APIGuildMember; } //# sourceMappingURL=guildScheduledEvent.d.ts.map node_modules/discord-api-types/payloads/v9/auditLog.js.map 0000664 00000002645 15114741631 0017631 0 ustar 00 {"version":3,"file":"auditLog.js","sourceRoot":"","sources":["auditLog.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AAoIH;;GAEG;AACH,IAAY,aAoFX;AApFD,WAAY,aAAa;IACxB,+DAAe,CAAA;IAEf,oEAAkB,CAAA;IAClB,oEAAa,CAAA;IACb,oEAAa,CAAA;IACb,sFAAsB,CAAA;IACtB,sFAAsB,CAAA;IACtB,sFAAsB,CAAA;IAEtB,8DAAe,CAAA;IACf,gEAAW,CAAA;IACX,kEAAY,CAAA;IACZ,wEAAe,CAAA;IACf,kEAAY,CAAA;IACZ,0EAAgB,CAAA;IAChB,8DAAU,CAAA;IACV,0EAAgB,CAAA;IAChB,sDAAM,CAAA;IAEN,8DAAe,CAAA;IACf,8DAAU,CAAA;IACV,8DAAU,CAAA;IAEV,kEAAiB,CAAA;IACjB,kEAAY,CAAA;IACZ,kEAAY,CAAA;IAEZ,oEAAkB,CAAA;IAClB,oEAAa,CAAA;IACb,oEAAa,CAAA;IAEb,gEAAgB,CAAA;IAChB,gEAAW,CAAA;IACX,gEAAW,CAAA;IAEX,oEAAkB,CAAA;IAClB,4EAAiB,CAAA;IACjB,8DAAU,CAAA;IACV,kEAAY,CAAA;IAEZ,4EAAsB,CAAA;IACtB,4EAAiB,CAAA;IACjB,4EAAiB,CAAA;IACjB,gFAAmB,CAAA;IACnB,gFAAmB,CAAA;IACnB,gFAAmB,CAAA;IAEnB,oEAAkB,CAAA;IAClB,oEAAa,CAAA;IACb,oEAAa,CAAA;IAEb,6FAA+B,CAAA;IAC/B,6FAAyB,CAAA;IACzB,6FAAyB,CAAA;IAEzB,mEAAkB,CAAA;IAClB,mEAAY,CAAA;IACZ,mEAAY,CAAA;IAEZ,+GAAwC,CAAA;IAExC,qFAA2B,CAAA;IAC3B,qFAAqB,CAAA;IACrB,qFAAqB,CAAA;IAErB,2FAA8B,CAAA;IAC9B,2FAAwB,CAAA;IACxB,2FAAwB,CAAA;IACxB,+FAA0B,CAAA;IAC1B,iGAA2B,CAAA;IAC3B,yHAAuC,CAAA;IAEvC,6GAAuC,CAAA;IACvC,2GAAgC,CAAA;IAEhC,uFAA4B,CAAA;IAC5B,uFAAsB,CAAA;IACtB,uFAAsB,CAAA;IACtB,2EAAgB,CAAA;IAChB,2EAAgB,CAAA;IAEhB,+EAAwB,CAAA;IACxB,+EAAkB,CAAA;AACnB,CAAC,EApFW,aAAa,6BAAb,aAAa,QAoFxB;AAwHD,IAAY,mBAGX;AAHD,WAAY,mBAAmB;IAC9B,iCAAU,CAAA;IACV,mCAAY,CAAA;AACb,CAAC,EAHW,mBAAmB,mCAAnB,mBAAmB,QAG9B"} node_modules/discord-api-types/payloads/v9/soundboard.js 0000664 00000000314 15114741631 0017434 0 ustar 00 "use strict"; /** * Types extracted from https://discord.com/developers/docs/resources/soundboard */ Object.defineProperty(exports, "__esModule", { value: true }); //# sourceMappingURL=soundboard.js.map node_modules/discord-api-types/payloads/v9/teams.js 0000664 00000002066 15114741631 0016413 0 ustar 00 "use strict"; /** * Types extracted from https://discord.com/developers/docs/topics/teams */ Object.defineProperty(exports, "__esModule", { value: true }); exports.TeamMemberRole = exports.TeamMemberMembershipState = void 0; /** * @see {@link https://discord.com/developers/docs/topics/teams#data-models-membership-state-enum} */ var TeamMemberMembershipState; (function (TeamMemberMembershipState) { TeamMemberMembershipState[TeamMemberMembershipState["Invited"] = 1] = "Invited"; TeamMemberMembershipState[TeamMemberMembershipState["Accepted"] = 2] = "Accepted"; })(TeamMemberMembershipState || (exports.TeamMemberMembershipState = TeamMemberMembershipState = {})); /** * @see {@link https://discord.com/developers/docs/topics/teams#team-member-roles-team-member-role-types} */ var TeamMemberRole; (function (TeamMemberRole) { TeamMemberRole["Admin"] = "admin"; TeamMemberRole["Developer"] = "developer"; TeamMemberRole["ReadOnly"] = "read_only"; })(TeamMemberRole || (exports.TeamMemberRole = TeamMemberRole = {})); //# sourceMappingURL=teams.js.map node_modules/discord-api-types/payloads/v9/monetization.js.map 0000664 00000001665 15114741631 0020602 0 ustar 00 {"version":3,"file":"monetization.js","sourceRoot":"","sources":["monetization.ts"],"names":[],"mappings":";;;AAgDA;;GAEG;AACH,IAAY,eAiCX;AAjCD,WAAY,eAAe;IAC1B;;OAEG;IACH,6DAAY,CAAA;IACZ;;OAEG;IACH,mFAAmB,CAAA;IACnB;;OAEG;IACH,uEAAa,CAAA;IACb;;OAEG;IACH,6EAAgB,CAAA;IAChB;;OAEG;IACH,qEAAY,CAAA;IACZ;;OAEG;IACH,6DAAQ,CAAA;IACR;;OAEG;IACH,2EAAe,CAAA;IACf;;OAEG;IACH,2FAAuB,CAAA;AACxB,CAAC,EAjCW,eAAe,+BAAf,eAAe,QAiC1B;AAkCD;;GAEG;AACH,IAAY,QAcX;AAdD,WAAY,QAAQ;IACnB;;OAEG;IACH,iDAAkB,CAAA;IAClB;;;OAGG;IACH,mEAA0B,CAAA;IAC1B;;OAEG;IACH,iEAAyB,CAAA;AAC1B,CAAC,EAdW,QAAQ,wBAAR,QAAQ,QAcnB;AAED;;GAEG;AACH,IAAY,OAiBX;AAjBD,WAAY,OAAO;IAClB;;OAEG;IACH,2CAAW,CAAA;IACX;;OAEG;IACH,iDAAc,CAAA;IACd;;OAEG;IACH,qDAAgB,CAAA;IAChB;;OAEG;IACH,+DAAqB,CAAA;AACtB,CAAC,EAjBW,OAAO,uBAAP,OAAO,QAiBlB;AAgDD;;GAEG;AACH,IAAY,kBAaX;AAbD,WAAY,kBAAkB;IAC7B;;OAEG;IACH,+DAAM,CAAA;IACN;;OAEG;IACH,+DAAM,CAAA;IACN;;OAEG;IACH,mEAAQ,CAAA;AACT,CAAC,EAbW,kBAAkB,kCAAlB,kBAAkB,QAa7B"} node_modules/discord-api-types/payloads/v9/template.d.ts.map 0000664 00000001650 15114741631 0020123 0 ustar 00 {"version":3,"file":"template.d.ts","sourceRoot":"","sources":["template.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC/C,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,qBAAqB,CAAC;AACrE,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,QAAQ,CAAC;AAEtC;;GAEG;AACH,MAAM,WAAW,WAAW;IAC3B;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;OAEG;IACH,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B;;OAEG;IACH,WAAW,EAAE,MAAM,CAAC;IACpB;;OAEG;IACH,UAAU,EAAE,SAAS,CAAC;IACtB;;;;OAIG;IACH,OAAO,EAAE,OAAO,CAAC;IACjB;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC;IACnB;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC;IACnB;;OAEG;IACH,eAAe,EAAE,SAAS,CAAC;IAC3B;;OAEG;IACH,uBAAuB,EAAE,gCAAgC,CAAC;IAC1D;;OAEG;IACH,QAAQ,EAAE,OAAO,GAAG,IAAI,CAAC;CACzB;AAED,MAAM,WAAW,gCAAiC,SAAQ,IAAI,CAAC,yBAAyB,EAAE,MAAM,CAAC;IAChG,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,gBAAgB,EAAE,MAAM,CAAC;IACzB,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;CACzB"} node_modules/discord-api-types/payloads/v9/gateway.d.ts.map 0000664 00000007666 15114741631 0017766 0 ustar 00 {"version":3,"file":"gateway.d.ts","sourceRoot":"","sources":["gateway.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC/C,OAAO,KAAK,EAAE,gBAAgB,EAAE,eAAe,EAAE,MAAM,WAAW,CAAC;AACnE,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AACxC,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,QAAQ,CAAC;AAEtC;;GAEG;AACH,MAAM,WAAW,cAAc;IAC9B;;OAEG;IACH,GAAG,EAAE,MAAM,CAAC;CACZ;AAED;;GAEG;AACH,MAAM,WAAW,iBAAkB,SAAQ,cAAc;IACxD;;;;OAIG;IACH,MAAM,EAAE,MAAM,CAAC;IACf;;;;OAIG;IACH,mBAAmB,EAAE,2BAA2B,CAAC;CACjD;AAED;;GAEG;AACH,MAAM,WAAW,2BAA2B;IAC3C;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;IAClB;;OAEG;IACH,WAAW,EAAE,MAAM,CAAC;IACpB;;OAEG;IACH,eAAe,EAAE,MAAM,CAAC;CACxB;AAED;;GAEG;AACH,MAAM,WAAW,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MAAM,CAAC;IACrB;;OAEG;IACH,aAAa,CAAC,EAAE,eAAe,EAAE,CAAC;IAClC;;OAEG;IACH,kBAAkB,CAAC,EAAE,SAAS,EAAE,CAAC;CACjC"} node_modules/discord-api-types/payloads/v9/_interactions/ping.js 0000664 00000000155 15114741631 0021075 0 ustar 00 "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); //# sourceMappingURL=ping.js.map node_modules/discord-api-types/payloads/v9/_interactions/autocomplete.d.ts 0000664 00000002051 15114741631 0023072 0 ustar 00 import type { APIBaseInteraction, APIAutocompleteApplicationCommandInteractionData, APIDMInteractionWrapper, APIGuildInteractionWrapper, InteractionType } from '../index'; export type APIApplicationCommandAutocompleteInteraction = APIBaseInteraction<InteractionType.ApplicationCommandAutocomplete, APIAutocompleteApplicationCommandInteractionData> & Required<Pick<APIBaseInteraction<InteractionType.ApplicationCommandAutocomplete, Required<Pick<APIAutocompleteApplicationCommandInteractionData, 'options'>>>, 'data'>>; /** * @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object} */ export type APIApplicationCommandAutocompleteDMInteraction = APIDMInteractionWrapper<APIApplicationCommandAutocompleteInteraction>; /** * @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object} */ export type APIApplicationCommandAutocompleteGuildInteraction = APIGuildInteractionWrapper<APIApplicationCommandAutocompleteInteraction>; //# sourceMappingURL=autocomplete.d.ts.map node_modules/discord-api-types/payloads/v9/_interactions/messageComponents.d.ts 0000664 00000006344 15114741631 0024074 0 ustar 00 import type { Snowflake } from '../../../globals'; import type { ComponentType } from '../channel'; import type { APIBaseInteraction, InteractionType } from '../interactions'; import type { APIDMInteractionWrapper, APIGuildInteractionWrapper, APIInteractionDataResolved, APIUserInteractionDataResolved } from './base'; export type APIMessageComponentInteraction = APIBaseInteraction<InteractionType.MessageComponent, APIMessageComponentInteractionData> & Required<Pick<APIBaseInteraction<InteractionType.MessageComponent, APIMessageComponentInteractionData>, 'app_permissions' | 'channel_id' | 'channel' | 'data' | 'message'>>; export type APIMessageComponentButtonInteraction = APIBaseInteraction<InteractionType.MessageComponent, APIMessageButtonInteractionData> & Required<Pick<APIBaseInteraction<InteractionType.MessageComponent, APIMessageButtonInteractionData>, 'app_permissions' | 'channel_id' | 'channel' | 'data' | 'message'>>; export type APIMessageComponentSelectMenuInteraction = APIBaseInteraction<InteractionType.MessageComponent, APIMessageSelectMenuInteractionData> & Required<Pick<APIBaseInteraction<InteractionType.MessageComponent, APIMessageSelectMenuInteractionData>, 'app_permissions' | 'channel_id' | 'channel' | 'data' | 'message'>>; export type APIMessageComponentInteractionData = APIMessageButtonInteractionData | APIMessageSelectMenuInteractionData; export interface APIMessageComponentBaseInteractionData<CType extends ComponentType> { /** * The `custom_id` of the component */ custom_id: string; /** * The type of the component */ component_type: CType; } export type APIMessageButtonInteractionData = APIMessageComponentBaseInteractionData<ComponentType.Button>; export interface APIMessageStringSelectInteractionData extends APIMessageComponentBaseInteractionData<ComponentType.StringSelect> { values: string[]; } export interface APIMessageUserSelectInteractionData extends APIMessageComponentBaseInteractionData<ComponentType.UserSelect> { values: Snowflake[]; resolved: APIUserInteractionDataResolved; } export interface APIMessageRoleSelectInteractionData extends APIMessageComponentBaseInteractionData<ComponentType.RoleSelect> { values: Snowflake[]; resolved: Required<Pick<APIInteractionDataResolved, 'roles'>>; } export interface APIMessageMentionableSelectInteractionData extends APIMessageComponentBaseInteractionData<ComponentType.MentionableSelect> { values: Snowflake[]; resolved: Pick<APIInteractionDataResolved, 'members' | 'roles' | 'users'>; } export interface APIMessageChannelSelectInteractionData extends APIMessageComponentBaseInteractionData<ComponentType.ChannelSelect> { values: Snowflake[]; resolved: Required<Pick<APIInteractionDataResolved, 'channels'>>; } export type APIMessageSelectMenuInteractionData = APIMessageChannelSelectInteractionData | APIMessageMentionableSelectInteractionData | APIMessageRoleSelectInteractionData | APIMessageStringSelectInteractionData | APIMessageUserSelectInteractionData; export type APIMessageComponentDMInteraction = APIDMInteractionWrapper<APIMessageComponentInteraction>; export type APIMessageComponentGuildInteraction = APIGuildInteractionWrapper<APIMessageComponentInteraction>; //# sourceMappingURL=messageComponents.d.ts.map node_modules/discord-api-types/payloads/v9/_interactions/autocomplete.d.ts.map 0000664 00000001060 15114741631 0023645 0 ustar 00 {"version":3,"file":"autocomplete.d.ts","sourceRoot":"","sources":["autocomplete.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACX,kBAAkB,EAClB,gDAAgD,EAChD,uBAAuB,EACvB,0BAA0B,EAC1B,eAAe,EACf,MAAM,UAAU,CAAC;AAElB,MAAM,MAAM,4CAA4C,GAAG,kBAAkB,CAC5E,eAAe,CAAC,8BAA8B,EAC9C,gDAAgD,CAChD,GACA,QAAQ,CACP,IAAI,CACH,kBAAkB,CACjB,eAAe,CAAC,8BAA8B,EAC9C,QAAQ,CAAC,IAAI,CAAC,gDAAgD,EAAE,SAAS,CAAC,CAAC,CAC3E,EACD,MAAM,CACN,CACD,CAAC;AAEH;;GAEG;AACH,MAAM,MAAM,8CAA8C,GACzD,uBAAuB,CAAC,4CAA4C,CAAC,CAAC;AAEvE;;GAEG;AACH,MAAM,MAAM,iDAAiD,GAC5D,0BAA0B,CAAC,4CAA4C,CAAC,CAAC"} node_modules/discord-api-types/payloads/v9/_interactions/ping.js.map 0000664 00000000135 15114741631 0021647 0 ustar 00 {"version":3,"file":"ping.js","sourceRoot":"","sources":["ping.ts"],"names":[],"mappings":""} node_modules/discord-api-types/payloads/v9/_interactions/responses.d.ts 0000664 00000011320 15114741631 0022411 0 ustar 00 import type { RESTPostAPIWebhookWithTokenJSONBody } from '../../../v9'; import type { APIActionRowComponent, APIComponentInModalActionRow } from '../channel'; import type { APIApplicationCommandOptionChoice } from './applicationCommands'; /** * @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object-interaction-type} */ export declare enum InteractionType { Ping = 1, ApplicationCommand = 2, MessageComponent = 3, ApplicationCommandAutocomplete = 4, ModalSubmit = 5 } /** * @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-response-object} */ export type APIInteractionResponse = APIApplicationCommandAutocompleteResponse | APIInteractionResponseChannelMessageWithSource | APIInteractionResponseDeferredChannelMessageWithSource | APIInteractionResponseDeferredMessageUpdate | APIInteractionResponseLaunchActivity | APIInteractionResponsePong | APIInteractionResponseUpdateMessage | APIModalInteractionResponse | APIPremiumRequiredInteractionResponse; export interface APIInteractionResponsePong { type: InteractionResponseType.Pong; } export interface APIApplicationCommandAutocompleteResponse { type: InteractionResponseType.ApplicationCommandAutocompleteResult; data: APICommandAutocompleteInteractionResponseCallbackData; } export interface APIModalInteractionResponse { type: InteractionResponseType.Modal; data: APIModalInteractionResponseCallbackData; } export interface APIPremiumRequiredInteractionResponse { type: InteractionResponseType.PremiumRequired; } export interface APIInteractionResponseChannelMessageWithSource { type: InteractionResponseType.ChannelMessageWithSource; data: APIInteractionResponseCallbackData; } export interface APIInteractionResponseDeferredChannelMessageWithSource { type: InteractionResponseType.DeferredChannelMessageWithSource; data?: Pick<APIInteractionResponseCallbackData, 'flags'>; } export interface APIInteractionResponseDeferredMessageUpdate { type: InteractionResponseType.DeferredMessageUpdate; } export interface APIInteractionResponseUpdateMessage { type: InteractionResponseType.UpdateMessage; data?: APIInteractionResponseCallbackData; } export interface APIInteractionResponseLaunchActivity { type: InteractionResponseType.LaunchActivity; } /** * @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-response-object-interaction-callback-type} */ export declare enum InteractionResponseType { /** * ACK a `Ping` */ Pong = 1, /** * Respond to an interaction with a message */ ChannelMessageWithSource = 4, /** * ACK an interaction and edit to a response later, the user sees a loading state */ DeferredChannelMessageWithSource = 5, /** * ACK a button interaction and update it to a loading state */ DeferredMessageUpdate = 6, /** * ACK a button interaction and edit the message to which the button was attached */ UpdateMessage = 7, /** * For autocomplete interactions */ ApplicationCommandAutocompleteResult = 8, /** * Respond to an interaction with an modal for a user to fill-out */ Modal = 9, /** * Respond to an interaction with an upgrade button, only available for apps with monetization enabled * * @deprecated Send a button with Premium type instead. * {@link https://discord.com/developers/docs/change-log#premium-apps-new-premium-button-style-deep-linking-url-schemes | Learn more here} */ PremiumRequired = 10, /** * Launch the Activity associated with the app. * * @remarks * Only available for apps with Activities enabled */ LaunchActivity = 12 } /** * @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-response-object-interaction-callback-data-structure} */ export type APIInteractionResponseCallbackData = Omit<RESTPostAPIWebhookWithTokenJSONBody, 'avatar_url' | 'username'>; export interface APICommandAutocompleteInteractionResponseCallbackData { choices?: APIApplicationCommandOptionChoice[]; } /** * @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-response-object-modal} */ export interface APIModalInteractionResponseCallbackData { /** * A developer-defined identifier for the component, max 100 characters */ custom_id: string; /** * The title of the popup modal */ title: string; /** * Between 1 and 5 (inclusive) components that make up the modal */ components: APIActionRowComponent<APIComponentInModalActionRow>[]; } //# sourceMappingURL=responses.d.ts.map node_modules/discord-api-types/payloads/v9/_interactions/applicationCommands.d.ts.map 0000664 00000005041 15114741631 0025134 0 ustar 00 {"version":3,"file":"applicationCommands.d.ts","sourceRoot":"","sources":["applicationCommands.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC/D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AACnD,OAAO,KAAK,EACX,2BAA2B,EAC3B,2CAA2C,EAC3C,8CAA8C,EAC9C,yCAAyC,EACzC,6CAA6C,EAC7C,MAAM,kCAAkC,CAAC;AAC1C,OAAO,KAAK,EACX,2BAA2B,EAC3B,8BAA8B,EAC9B,yBAAyB,EACzB,6BAA6B,EAC7B,MAAM,oCAAoC,CAAC;AAC5C,OAAO,KAAK,EACX,wCAAwC,EACxC,2CAA2C,EAC3C,sCAAsC,EACtC,0CAA0C,EAC1C,MAAM,mCAAmC,CAAC;AAC3C,OAAO,KAAK,EAAE,kBAAkB,EAAE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A4B,CAAC;CACvC;AAED;;GAEG;AACH,oBAAY,sBAAsB;IACjC;;OAEG;IACH,SAAS,IAAI;IACb;;OAEG;IACH,IAAI,IAAA;IACJ;;OAEG;IACH,OAAO,IAAA;IACP;;OAEG;IACH,iBAAiB,IAAA;CACjB;AAED;;GAEG;AACH,oBAAY,0BAA0B;IACrC;;OAEG;IACH,YAAY,IAAA;IACZ;;OAEG;IACH,WAAW,IAAA;CACX;AAED;;GAEG;AACH,oBAAY,sBAAsB;IACjC;;OAEG;IACH,KAAK,IAAA;IACL;;OAEG;IACH,KAAK,IAAA;IACL;;OAEG;IACH,cAAc,IAAA;CACd;AAED;;GAEG;AACH,oBAAY,4BAA4B;IACvC;;OAEG;IACH,UAAU,IAAI;IACd;;;OAGG;IACH,qBAAqB,IAAA;CACrB;AAED;;GAEG;AACH,MAAM,MAAM,oCAAoC,GAC7C,6CAA6C,GAC7C,6BAA6B,GAC7B,0CAA0C,CAAC;AAE9C;;GAEG;AACH,MAAM,MAAM,uCAAuC,CAAC,IAAI,SAAS,oCAAoC,IACpG,kBAAkB,CAAC,eAAe,CAAC,kBAAkB,EAAE,IAAI,CAAC,GAC3D,QAAQ,CACP,IAAI,CACH,kBAAkB,CAAC,eAAe,CAAC,kBAAkB,EAAE,IAAI,CAAC,EAC5D,iBAAiB,GAAG,YAAY,GAAG,SAAS,GAAG,MAAM,CACrD,CACD,CAAC;AAEJ;;GAEG;AACH,MAAM,MAAM,gCAAgC,GACzC,yCAAyC,GACzC,yBAAyB,GACzB,sCAAsC,CAAC;AAE1C;;GAEG;AACH,MAAM,MAAM,kCAAkC,GAC3C,2CAA2C,GAC3C,2BAA2B,GAC3B,wCAAwC,CAAC;AAE5C;;GAEG;AACH,MAAM,MAAM,qCAAqC,GAC9C,8CAA8C,GAC9C,8BAA8B,GAC9B,2CAA2C,CAAC"} node_modules/discord-api-types/payloads/v9/_interactions/_applicationCommands/entryPoint.d.ts.map 0000664 00000001062 15114741631 0027445 0 ustar 00 {"version":3,"file":"entryPoint.d.ts","sourceRoot":"","sources":["entryPoint.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,uCAAuC,EAAE,sBAAsB,EAAE,MAAM,wBAAwB,CAAC;AAC9G,OAAO,KAAK,EAAE,uBAAuB,EAAE,0BAA0B,EAAE,MAAM,SAAS,CAAC;AACnF,OAAO,KAAK,EAAE,wCAAwC,EAAE,MAAM,aAAa,CAAC;AAE5E;;GAEG;AACH,MAAM,MAAM,0CAA0C,GACrD,wCAAwC,CAAC,sBAAsB,CAAC,iBAAiB,CAAC,CAAC;AAEpF;;GAEG;AACH,MAAM,MAAM,sCAAsC,GACjD,uCAAuC,CAAC,0CAA0C,CAAC,CAAC;AAErF;;GAEG;AACH,MAAM,MAAM,wCAAwC,GAAG,uBAAuB,CAAC,sCAAsC,CAAC,CAAC;AAEvH;;GAEG;AACH,MAAM,MAAM,2CAA2C,GACtD,0BAA0B,CAAC,sCAAsC,CAAC,CAAC"} node_modules/discord-api-types/payloads/v9/_interactions/_applicationCommands/chatInput.js.map 0000664 00000000203 15114741631 0026771 0 ustar 00 {"version":3,"file":"chatInput.js","sourceRoot":"","sources":["chatInput.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAyDA,sDAAoC"} node_modules/discord-api-types/payloads/v9/_interactions/_applicationCommands/internals.d.ts 0000664 00000000525 15114741631 0026520 0 ustar 00 import type { Snowflake } from '../../../../globals'; import type { ApplicationCommandType } from '../applicationCommands'; export interface APIBaseApplicationCommandInteractionData<Type extends ApplicationCommandType> { id: Snowflake; type: Type; name: string; guild_id?: Snowflake; } //# sourceMappingURL=internals.d.ts.map node_modules/discord-api-types/payloads/v9/_interactions/_applicationCommands/entryPoint.js 0000664 00000000163 15114741631 0026436 0 ustar 00 "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); //# sourceMappingURL=entryPoint.js.map node_modules/discord-api-types/payloads/v9/_interactions/_applicationCommands/internals.js 0000664 00000000162 15114741631 0026261 0 ustar 00 "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); //# sourceMappingURL=internals.js.map node_modules/discord-api-types/payloads/v9/_interactions/_applicationCommands/chatInput.d.ts 0000664 00000013465 15114741631 0026467 0 ustar 00 import type { APIInteractionDataResolved, InteractionType } from '../../index'; import type { APIApplicationCommandInteractionWrapper, ApplicationCommandType } from '../applicationCommands'; import type { APIDMInteractionWrapper, APIGuildInteractionWrapper } from '../base'; import type { APIApplicationCommandAttachmentOption, APIApplicationCommandInteractionDataAttachmentOption } from './_chatInput/attachment'; import type { APIApplicationCommandBooleanOption, APIApplicationCommandInteractionDataBooleanOption } from './_chatInput/boolean'; import type { APIApplicationCommandChannelOption, APIApplicationCommandInteractionDataChannelOption } from './_chatInput/channel'; import type { APIApplicationCommandIntegerOption, APIApplicationCommandInteractionDataIntegerOption } from './_chatInput/integer'; import type { APIApplicationCommandInteractionDataMentionableOption, APIApplicationCommandMentionableOption } from './_chatInput/mentionable'; import type { APIApplicationCommandInteractionDataNumberOption, APIApplicationCommandNumberOption } from './_chatInput/number'; import type { APIApplicationCommandInteractionDataRoleOption, APIApplicationCommandRoleOption } from './_chatInput/role'; import type { APIApplicationCommandInteractionDataStringOption, APIApplicationCommandStringOption } from './_chatInput/string'; import type { APIApplicationCommandInteractionDataSubcommandOption, APIApplicationCommandSubcommandOption } from './_chatInput/subcommand'; import type { APIApplicationCommandInteractionDataSubcommandGroupOption, APIApplicationCommandSubcommandGroupOption } from './_chatInput/subcommandGroup'; import type { APIApplicationCommandInteractionDataUserOption, APIApplicationCommandUserOption } from './_chatInput/user'; import type { APIBaseApplicationCommandInteractionData } from './internals'; export type * from './_chatInput/attachment'; export type * from './_chatInput/base'; export type * from './_chatInput/boolean'; export type * from './_chatInput/channel'; export type * from './_chatInput/integer'; export type * from './_chatInput/mentionable'; export type * from './_chatInput/number'; export type * from './_chatInput/role'; export * from './_chatInput/shared'; export type * from './_chatInput/string'; export type * from './_chatInput/subcommand'; export type * from './_chatInput/subcommandGroup'; export type * from './_chatInput/user'; /** * @see {@link https://discord.com/developers/docs/interactions/application-commands#application-command-object-application-command-option-structure} */ export type APIApplicationCommandBasicOption = APIApplicationCommandAttachmentOption | APIApplicationCommandBooleanOption | APIApplicationCommandChannelOption | APIApplicationCommandIntegerOption | APIApplicationCommandMentionableOption | APIApplicationCommandNumberOption | APIApplicationCommandRoleOption | APIApplicationCommandStringOption | APIApplicationCommandUserOption; /** * @see {@link https://discord.com/developers/docs/interactions/application-commands#application-command-object-application-command-option-structure} */ export type APIApplicationCommandOption = APIApplicationCommandBasicOption | APIApplicationCommandSubcommandGroupOption | APIApplicationCommandSubcommandOption; /** * @see {@link https://discord.com/developers/docs/interactions/application-commands#application-command-object-application-command-interaction-data-option-structure} */ export type APIApplicationCommandInteractionDataOption<Type extends InteractionType = InteractionType> = APIApplicationCommandInteractionDataBasicOption<Type> | APIApplicationCommandInteractionDataSubcommandGroupOption<Type> | APIApplicationCommandInteractionDataSubcommandOption<Type>; export type APIApplicationCommandInteractionDataBasicOption<Type extends InteractionType = InteractionType> = APIApplicationCommandInteractionDataAttachmentOption | APIApplicationCommandInteractionDataBooleanOption | APIApplicationCommandInteractionDataChannelOption | APIApplicationCommandInteractionDataIntegerOption<Type> | APIApplicationCommandInteractionDataMentionableOption | APIApplicationCommandInteractionDataNumberOption<Type> | APIApplicationCommandInteractionDataRoleOption | APIApplicationCommandInteractionDataStringOption | APIApplicationCommandInteractionDataUserOption; /** * @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object-interaction-data} */ export interface APIChatInputApplicationCommandInteractionData extends APIBaseApplicationCommandInteractionData<ApplicationCommandType.ChatInput> { options?: APIApplicationCommandInteractionDataOption<InteractionType.ApplicationCommand>[]; resolved?: APIInteractionDataResolved; } /** * @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object-interaction-data} */ export interface APIAutocompleteApplicationCommandInteractionData extends APIBaseApplicationCommandInteractionData<ApplicationCommandType.ChatInput> { options?: APIApplicationCommandInteractionDataOption<InteractionType.ApplicationCommandAutocomplete>[]; resolved?: APIInteractionDataResolved; } /** * @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object} */ export type APIChatInputApplicationCommandInteraction = APIApplicationCommandInteractionWrapper<APIChatInputApplicationCommandInteractionData>; /** * @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object} */ export type APIChatInputApplicationCommandDMInteraction = APIDMInteractionWrapper<APIChatInputApplicationCommandInteraction>; /** * @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object} */ export type APIChatInputApplicationCommandGuildInteraction = APIGuildInteractionWrapper<APIChatInputApplicationCommandInteraction>; //# sourceMappingURL=chatInput.d.ts.map node_modules/discord-api-types/payloads/v9/_interactions/_applicationCommands/contextMenu.d.ts.map 0000664 00000002600 15114741631 0027602 0 ustar 00 {"version":3,"file":"contextMenu.d.ts","sourceRoot":"","sources":["contextMenu.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AACrD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAChD,OAAO,KAAK,EAAE,uCAAuC,EAAE,sBAAsB,EAAE,MAAM,wBAAwB,CAAC;AAC9G,OAAO,KAAK,EAAE,uBAAuB,EAAE,0BAA0B,EAAE,8BAA8B,EAAE,MAAM,SAAS,CAAC;AACnH,OAAO,KAAK,EAAE,wCAAwC,EAAE,MAAM,aAAa,CAAC;AAE5E;;GAEG;AACH,MAAM,WAAW,wCAChB,SAAQ,wCAAwC,CAAC,sBAAsB,CAAC,IAAI,CAAC;IAC7E,SAAS,EAAE,SAAS,CAAC;IACrB,QAAQ,EAAE,8BAA8B,CAAC;CACzC;AAED;;GAEG;AACH,MAAM,WAAW,2CAChB,SAAQ,wCAAwC,CAAC,sBAAsB,CAAC,OAAO,CAAC;IAChF,SAAS,EAAE,SAAS,CAAC;IACrB,QAAQ,EAAE,mDAAmD,CAAC;CAC9D;AAED;;GAEG;AACH,MAAM,WAAW,mDAAmD;IACnE,QAAQ,EAAE,MAAM,CAAC,SAAS,EAAE,UAAU,CAAC,CAAC;CACxC;AAED;;GAEG;AACH,MAAM,MAAM,6BAA6B,GACtC,2CAA2C,GAC3C,wCAAwC,CAAC;AAE5C;;GAEG;AACH,MAAM,MAAM,oCAAoC,GAC/C,uCAAuC,CAAC,wCAAwC,CAAC,CAAC;AAEnF;;GAEG;AACH,MAAM,MAAM,sCAAsC,GAAG,uBAAuB,CAAC,oCAAoC,CAAC,CAAC;AAEnH;;GAEG;AACH,MAAM,MAAM,yCAAyC,GACpD,0BAA0B,CAAC,oCAAoC,CAAC,CAAC;AAElE;;GAEG;AACH,MAAM,MAAM,uCAAuC,GAClD,uCAAuC,CAAC,2CAA2C,CAAC,CAAC;AAEtF;;GAEG;AACH,MAAM,MAAM,yCAAyC,GACpD,uBAAuB,CAAC,uCAAuC,CAAC,CAAC;AAElE;;GAEG;AACH,MAAM,MAAM,4CAA4C,GACvD,0BAA0B,CAAC,uCAAuC,CAAC,CAAC;AAErE;;GAEG;AACH,MAAM,MAAM,yBAAyB,GAAG,uCAAuC,GAAG,oCAAoC,CAAC;AAEvH;;GAEG;AACH,MAAM,MAAM,2BAA2B,GACpC,yCAAyC,GACzC,sCAAsC,CAAC;AAE1C;;GAEG;AACH,MAAM,MAAM,8BAA8B,GACvC,4CAA4C,GAC5C,yCAAyC,CAAC"} node_modules/discord-api-types/payloads/v9/_interactions/_applicationCommands/permissions.js.map 0000664 00000000703 15114741631 0027412 0 ustar 00 {"version":3,"file":"permissions.js","sourceRoot":"","sources":["permissions.ts"],"names":[],"mappings":";;;AA0CA;;GAEG;AACH,IAAY,gCAIX;AAJD,WAAY,gCAAgC;IAC3C,uFAAQ,CAAA;IACR,uFAAI,CAAA;IACJ,6FAAO,CAAA;AACR,CAAC,EAJW,gCAAgC,gDAAhC,gCAAgC,QAI3C;AAED;;GAEG;AACU,QAAA,wCAAwC,GAAG;IACvD,oEAAoE;IACpE,QAAQ,EAAE,CAAC,OAAwB,EAAa,EAAE,CAAC,MAAM,CAAC,OAAO,CAAC;IAClE,WAAW,EAAE,CAAC,OAAwB,EAAa,EAAE,CAAC,MAAM,CAAC,MAAM,CAAC,OAAO,CAAC,GAAG,EAAE,CAAC;CAClF,CAAC"} node_modules/discord-api-types/payloads/v9/_interactions/_applicationCommands/contextMenu.js 0000664 00000000164 15114741631 0026575 0 ustar 00 "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); //# sourceMappingURL=contextMenu.js.map node_modules/discord-api-types/payloads/v9/_interactions/_applicationCommands/permissions.js 0000664 00000002411 15114741631 0026634 0 ustar 00 "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.APIApplicationCommandPermissionsConstant = exports.ApplicationCommandPermissionType = void 0; /** * @see {@link https://discord.com/developers/docs/interactions/application-commands#application-command-permissions-object-application-command-permission-type} */ var ApplicationCommandPermissionType; (function (ApplicationCommandPermissionType) { ApplicationCommandPermissionType[ApplicationCommandPermissionType["Role"] = 1] = "Role"; ApplicationCommandPermissionType[ApplicationCommandPermissionType["User"] = 2] = "User"; ApplicationCommandPermissionType[ApplicationCommandPermissionType["Channel"] = 3] = "Channel"; })(ApplicationCommandPermissionType || (exports.ApplicationCommandPermissionType = ApplicationCommandPermissionType = {})); /** * @see {@link https://discord.com/developers/docs/interactions/application-commands#application-command-permissions-object-application-command-permissions-constants} */ exports.APIApplicationCommandPermissionsConstant = { // eslint-disable-next-line unicorn/prefer-native-coercion-functions Everyone: (guildId) => String(guildId), AllChannels: (guildId) => String(BigInt(guildId) - 1n), }; //# sourceMappingURL=permissions.js.map node_modules/discord-api-types/payloads/v9/_interactions/_applicationCommands/entryPoint.d.ts 0000664 00000002452 15114741631 0026675 0 ustar 00 import type { APIApplicationCommandInteractionWrapper, ApplicationCommandType } from '../applicationCommands'; import type { APIDMInteractionWrapper, APIGuildInteractionWrapper } from '../base'; import type { APIBaseApplicationCommandInteractionData } from './internals'; /** * @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object-interaction-data} */ export type APIPrimaryEntryPointCommandInteractionData = APIBaseApplicationCommandInteractionData<ApplicationCommandType.PrimaryEntryPoint>; /** * @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object} */ export type APIPrimaryEntryPointCommandInteraction = APIApplicationCommandInteractionWrapper<APIPrimaryEntryPointCommandInteractionData>; /** * @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object} */ export type APIPrimaryEntryPointCommandDMInteraction = APIDMInteractionWrapper<APIPrimaryEntryPointCommandInteraction>; /** * @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object} */ export type APIPrimaryEntryPointCommandGuildInteraction = APIGuildInteractionWrapper<APIPrimaryEntryPointCommandInteraction>; //# sourceMappingURL=entryPoint.d.ts.map node_modules/discord-api-types/payloads/v9/_interactions/_applicationCommands/chatInput.d.ts.map 0000664 00000004715 15114741631 0027241 0 ustar 00 {"version":3,"file":"chatInput.d.ts","sourceRoot":"","sources":["chatInput.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,0BAA0B,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAC/E,OAAO,KAAK,EAAE,uCAAuC,EAAE,sBAAsB,EAAE,MAAM,wBAAwB,CAAC;AAC9G,OAAO,KAAK,EAAE,uBAAuB,EAAE,0BAA0B,EAAE,MAAM,SAAS,CAAC;AACnF,OAAO,KAAK,EACX,qCAAqC,EACrC,oDAAoD,EACpD,MAAM,yBAAyB,CAAC;AACjC,OAAO,KAAK,EACX,kCAAkC,EAClC,iDAAiD,EACjD,MAAM,sBAAsB,CAAC;AAC9B,OAAO,KAAK,EACX,kCAAkC,EAClC,iDAAiD,EACjD,MAAM,sBAAsB,CAAC;AAC9B,OAAO,KAAK,EACX,kCAAkC,EAClC,iDAAiD,EACjD,MAAM,sBAAsB,CAAC;AAC9B,OAAO,KAAK,EACX,qDAAqD,EACrD,sCAAsC,EACtC,MAAM,0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eAAe,IAClG,+CAA+C,CAAC,IAAI,CAAC,GACrD,yDAAyD,CAAC,IAAI,CAAC,GAC/D,oDAAoD,CAAC,IAAI,CAAC,CAAC;AAE9D,MAAM,MAAM,+CAA+C,CAAC,IAAI,SAAS,eAAe,GAAG,eAAe,IACvG,oDAAoD,GACpD,iDAAiD,GACjD,iDAAiD,GACjD,iDAAiD,CAAC,IAAI,CAAC,GACvD,qDAAqD,GACrD,gDAAgD,CAAC,IAAI,CAAC,GACtD,8CAA8C,GAC9C,gDAAgD,GAChD,8CAA8C,CAAC;AAElD;;GAEG;AACH,MAAM,WAAW,6CAChB,SAAQ,wCAAwC,CAAC,sBAAsB,CAAC,SAAS,CAAC;IAClF,OAAO,CAAC,EAAE,0CAA0C,CAAC,eAAe,CAAC,kBAAkB,CAAC,EAAE,CAAC;IAC3F,QAAQ,CAAC,EAAE,0BAA0B,CAAC;CACtC;AAED;;GAEG;AACH,MAAM,WAAW,gDAChB,SAAQ,wCAAwC,CAAC,sBAAsB,CAAC,SAAS,CAAC;IAClF,OAAO,CAAC,EAAE,0CAA0C,CAAC,eAAe,CAAC,8BAA8B,CAAC,EAAE,CAAC;IACvG,QAAQ,CAAC,EAAE,0BAA0B,CAAC;CACtC;AAED;;GAEG;AACH,MAAM,MAAM,yCAAyC,GACpD,uCAAuC,CAAC,6CAA6C,CAAC,CAAC;AAExF;;GAEG;AACH,MAAM,MAAM,2CAA2C,GACtD,uBAAuB,CAAC,yCAAyC,CAAC,CAAC;AAEpE;;GAEG;AACH,MAAM,MAAM,8CAA8C,GACzD,0BAA0B,CAAC,yCAAyC,CAAC,CAAC"} node_modules/discord-api-types/payloads/v9/_interactions/_applicationCommands/entryPoint.js.map 0000664 00000000151 15114741631 0027207 0 ustar 00 {"version":3,"file":"entryPoint.js","sourceRoot":"","sources":["entryPoint.ts"],"names":[],"mappings":""} discord-api-types/payloads/v9/_interactions/_applicationCommands/_chatInput/number.js.map 0000664 00000000141 15114741631 0030342 0 ustar 00 node_modules {"version":3,"file":"number.js","sourceRoot":"","sources":["number.ts"],"names":[],"mappings":""} node_modules/discord-api-types/payloads/v9/_interactions/_applicationCommands/_chatInput/user.js.map0000664 00000000135 15114741631 0030112 0 ustar 00 {"version":3,"file":"user.js","sourceRoot":"","sources":["user.ts"],"names":[],"mappings":""} discord-api-types/payloads/v9/_interactions/_applicationCommands/_chatInput/subcommand.js.map 0000664 00000000151 15114741631 0031203 0 ustar 00 node_modules {"version":3,"file":"subcommand.js","sourceRoot":"","sources":["subcommand.ts"],"names":[],"mappings":""} discord-api-types/payloads/v9/_interactions/_applicationCommands/_chatInput/attachment.d.ts.map 0000664 00000000630 15114741631 0031441 0 ustar 00 node_modules {"version":3,"file":"attachment.d.ts","sourceRoot":"","sources":["attachment.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AACxD,OAAO,KAAK,EAAE,+BAA+B,EAAE,4BAA4B,EAAE,MAAM,QAAQ,CAAC;AAC5F,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,UAAU,CAAC;AAE7D,MAAM,MAAM,qCAAqC,GAChD,+BAA+B,CAAC,4BAA4B,CAAC,UAAU,CAAC,CAAC;AAE1E,MAAM,MAAM,oDAAoD,GAAG,4BAA4B,CAC9F,4BAA4B,CAAC,UAAU,EACvC,SAAS,CACT,CAAC"} discord-api-types/payloads/v9/_interactions/_applicationCommands/_chatInput/mentionable.d.ts.map 0000664 00000000632 15114741631 0031610 0 ustar 00 node_modules {"version":3,"file":"mentionable.d.ts","sourceRoot":"","sources":["mentionable.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AACxD,OAAO,KAAK,EAAE,+BAA+B,EAAE,4BAA4B,EAAE,MAAM,QAAQ,CAAC;AAC5F,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,UAAU,CAAC;AAE7D,MAAM,MAAM,sCAAsC,GACjD,+BAA+B,CAAC,4BAA4B,CAAC,WAAW,CAAC,CAAC;AAE3E,MAAM,MAAM,qDAAqD,GAAG,4BAA4B,CAC/F,4BAA4B,CAAC,WAAW,EACxC,SAAS,CACT,CAAC"} discord-api-types/payloads/v9/_interactions/_applicationCommands/_chatInput/mentionable.d.ts 0000664 00000001024 15114741631 0031030 0 ustar 00 node_modules import type { Snowflake } from '../../../../../globals'; import type { APIApplicationCommandOptionBase, APIInteractionDataOptionBase } from './base'; import type { ApplicationCommandOptionType } from './shared'; export type APIApplicationCommandMentionableOption = APIApplicationCommandOptionBase<ApplicationCommandOptionType.Mentionable>; export type APIApplicationCommandInteractionDataMentionableOption = APIInteractionDataOptionBase<ApplicationCommandOptionType.Mentionable, Snowflake>; //# sourceMappingURL=mentionable.d.ts.map discord-api-types/payloads/v9/_interactions/_applicationCommands/_chatInput/mentionable.js 0000664 00000000164 15114741631 0030600 0 ustar 00 node_modules "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); //# sourceMappingURL=mentionable.js.map discord-api-types/payloads/v9/_interactions/_applicationCommands/_chatInput/channel.js.map 0000664 00000000143 15114741631 0030464 0 ustar 00 node_modules {"version":3,"file":"channel.js","sourceRoot":"","sources":["channel.ts"],"names":[],"mappings":""} discord-api-types/payloads/v9/_interactions/_applicationCommands/_chatInput/integer.d.ts.map 0000664 00000001304 15114741631 0030745 0 ustar 00 node_modules {"version":3,"file":"integer.d.ts","sourceRoot":"","sources":["integer.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AACvD,OAAO,KAAK,EACX,+BAA+B,EAC/B,2DAA2D,EAC3D,4BAA4B,EAC5B,MAAM,QAAQ,CAAC;AAChB,OAAO,KAAK,EAAE,iCAAiC,EAAE,4BAA4B,EAAE,MAAM,UAAU,CAAC;AAEhG,MAAM,WAAW,sCAChB,SAAQ,+BAA+B,CAAC,4BAA4B,CAAC,OAAO,CAAC;IAC7E;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,MAAM,kCAAkC,GAAG,2DAA2D,CAC3G,sCAAsC,EACtC,iCAAiC,CAAC,MAAM,CAAC,CACzC,CAAC;AAEF,MAAM,WAAW,iDAAiD,CAAC,IAAI,SAAS,eAAe,GAAG,eAAe,CAChH,SAAQ,4BAA4B,CACnC,4BAA4B,CAAC,OAAO,EACpC,IAAI,SAAS,eAAe,CAAC,8BAA8B,GAAG,MAAM,GAAG,MAAM,CAC7E;IACD,OAAO,CAAC,EAAE,OAAO,CAAC;CAClB"} discord-api-types/payloads/v9/_interactions/_applicationCommands/_chatInput/subcommand.js 0000664 00000000163 15114741631 0030432 0 ustar 00 node_modules "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); //# sourceMappingURL=subcommand.js.map node_modules/discord-api-types/payloads/v9/_interactions/_applicationCommands/_chatInput/string.d.ts0000664 00000002051 15114741631 0030121 0 ustar 00 import type { APIApplicationCommandOptionBase, APIApplicationCommandOptionWithAutocompleteOrChoicesWrapper, APIInteractionDataOptionBase } from './base'; import type { APIApplicationCommandOptionChoice, ApplicationCommandOptionType } from './shared'; export interface APIApplicationCommandStringOptionBase extends APIApplicationCommandOptionBase<ApplicationCommandOptionType.String> { /** * For option type `STRING`, the minimum allowed length (minimum of `0`, maximum of `6000`). */ min_length?: number; /** * For option type `STRING`, the maximum allowed length (minimum of `1`, maximum of `6000`). */ max_length?: number; } export type APIApplicationCommandStringOption = APIApplicationCommandOptionWithAutocompleteOrChoicesWrapper<APIApplicationCommandStringOptionBase, APIApplicationCommandOptionChoice<string>>; export interface APIApplicationCommandInteractionDataStringOption extends APIInteractionDataOptionBase<ApplicationCommandOptionType.String, string> { focused?: boolean; } //# sourceMappingURL=string.d.ts.map discord-api-types/payloads/v9/_interactions/_applicationCommands/_chatInput/mentionable.js.map 0000664 00000000153 15114741631 0031352 0 ustar 00 node_modules {"version":3,"file":"mentionable.js","sourceRoot":"","sources":["mentionable.ts"],"names":[],"mappings":""} node_modules/discord-api-types/payloads/v9/_interactions/_applicationCommands/_chatInput/base.js.map0000664 00000000135 15114741631 0030046 0 ustar 00 {"version":3,"file":"base.js","sourceRoot":"","sources":["base.ts"],"names":[],"mappings":""} discord-api-types/payloads/v9/_interactions/_applicationCommands/_chatInput/shared.js.map 0000664 00000000552 15114741631 0030326 0 ustar 00 node_modules {"version":3,"file":"shared.js","sourceRoot":"","sources":["shared.ts"],"names":[],"mappings":";;;AAEA;;GAEG;AACH,IAAY,4BAYX;AAZD,WAAY,4BAA4B;IACvC,2FAAc,CAAA;IACd,qGAAe,CAAA;IACf,mFAAM,CAAA;IACN,qFAAO,CAAA;IACP,qFAAO,CAAA;IACP,+EAAI,CAAA;IACJ,qFAAO,CAAA;IACP,+EAAI,CAAA;IACJ,6FAAW,CAAA;IACX,oFAAM,CAAA;IACN,4FAAU,CAAA;AACX,CAAC,EAZW,4BAA4B,4CAA5B,4BAA4B,QAYvC"} discord-api-types/payloads/v9/_interactions/_applicationCommands/_chatInput/user.d.ts.map 0000664 00000000613 15114741631 0030270 0 ustar 00 node_modules {"version":3,"file":"user.d.ts","sourceRoot":"","sources":["user.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AACxD,OAAO,KAAK,EAAE,+BAA+B,EAAE,4BAA4B,EAAE,MAAM,QAAQ,CAAC;AAC5F,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,UAAU,CAAC;AAE7D,MAAM,MAAM,+BAA+B,GAAG,+BAA+B,CAAC,4BAA4B,CAAC,IAAI,CAAC,CAAC;AAEjH,MAAM,MAAM,8CAA8C,GAAG,4BAA4B,CACxF,4BAA4B,CAAC,IAAI,EACjC,SAAS,CACT,CAAC"} discord-api-types/payloads/v9/_interactions/_applicationCommands/_chatInput/string.d.ts.map 0000664 00000001102 15114741631 0030612 0 ustar 00 node_modules {"version":3,"file":"string.d.ts","sourceRoot":"","sources":["string.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACX,+BAA+B,EAC/B,2DAA2D,EAC3D,4BAA4B,EAC5B,MAAM,QAAQ,CAAC;AAChB,OAAO,KAAK,EAAE,iCAAiC,EAAE,4BAA4B,EAAE,MAAM,UAAU,CAAC;AAEhG,MAAM,WAAW,qCAChB,SAAQ,+BAA+B,CAAC,4BAA4B,CAAC,MAAM,CAAC;IAC5E;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,MAAM,iCAAiC,GAAG,2DAA2D,CAC1G,qCAAqC,EACrC,iCAAiC,CAAC,MAAM,CAAC,CACzC,CAAC;AAEF,MAAM,WAAW,gDAChB,SAAQ,4BAA4B,CAAC,4BAA4B,CAAC,MAAM,EAAE,MAAM,CAAC;IACjF,OAAO,CAAC,EAAE,OAAO,CAAC;CAClB"} node_modules/discord-api-types/payloads/v9/_interactions/_applicationCommands/_chatInput/base.d.ts 0000664 00000001654 15114741631 0027535 0 ustar 00 import type { LocalizationMap } from '../../../../../v9'; import type { APIApplicationCommandOptionChoice, ApplicationCommandOptionType } from './shared'; export interface APIApplicationCommandOptionBase<Type extends ApplicationCommandOptionType> { type: Type; name: string; name_localizations?: LocalizationMap | null; description: string; description_localizations?: LocalizationMap | null; required?: boolean; } export interface APIInteractionDataOptionBase<T extends ApplicationCommandOptionType, D> { name: string; type: T; value: D; } export type APIApplicationCommandOptionWithAutocompleteOrChoicesWrapper<Base extends APIApplicationCommandOptionBase<ApplicationCommandOptionType>, ChoiceType extends APIApplicationCommandOptionChoice> = (Base & { autocomplete: true; choices?: []; }) | (Base & { autocomplete?: false; choices?: ChoiceType[]; }); //# sourceMappingURL=base.d.ts.map node_modules/discord-api-types/payloads/v9/_interactions/_applicationCommands/_chatInput/role.js 0000664 00000000155 15114741631 0027323 0 ustar 00 "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); //# sourceMappingURL=role.js.map node_modules/discord-api-types/payloads/v9/_interactions/_applicationCommands/_chatInput/channel.js 0000664 00000000160 15114741631 0027766 0 ustar 00 "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); //# sourceMappingURL=channel.js.map discord-api-types/payloads/v9/_interactions/_applicationCommands/_chatInput/integer.js.map 0000664 00000000143 15114741631 0030511 0 ustar 00 node_modules {"version":3,"file":"integer.js","sourceRoot":"","sources":["integer.ts"],"names":[],"mappings":""} discord-api-types/payloads/v9/_interactions/_applicationCommands/_chatInput/shared.d.ts.map 0000664 00000000775 15114741631 0030571 0 ustar 00 node_modules {"version":3,"file":"shared.d.ts","sourceRoot":"","sources":["shared.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAEzD;;GAEG;AACH,oBAAY,4BAA4B;IACvC,UAAU,IAAI;IACd,eAAe,IAAA;IACf,MAAM,IAAA;IACN,OAAO,IAAA;IACP,OAAO,IAAA;IACP,IAAI,IAAA;IACJ,OAAO,IAAA;IACP,IAAI,IAAA;IACJ,WAAW,IAAA;IACX,MAAM,KAAA;IACN,UAAU,KAAA;CACV;AAED;;GAEG;AACH,MAAM,WAAW,iCAAiC,CAAC,SAAS,GAAG,MAAM,GAAG,MAAM;IAC7E,IAAI,EAAE,MAAM,CAAC;IACb,kBAAkB,CAAC,EAAE,eAAe,GAAG,IAAI,CAAC;IAC5C,KAAK,EAAE,SAAS,CAAC;CACjB"} discord-api-types/payloads/v9/_interactions/_applicationCommands/_chatInput/attachment.js.map 0000664 00000000151 15114741631 0031203 0 ustar 00 node_modules {"version":3,"file":"attachment.js","sourceRoot":"","sources":["attachment.ts"],"names":[],"mappings":""} node_modules/discord-api-types/payloads/v9/_interactions/_applicationCommands/_chatInput/role.js.map0000664 00000000135 15114741631 0030075 0 ustar 00 {"version":3,"file":"role.js","sourceRoot":"","sources":["role.ts"],"names":[],"mappings":""} node_modules/discord-api-types/payloads/v9/_interactions/_applicationCommands/_chatInput/string.js 0000664 00000000157 15114741631 0027672 0 ustar 00 "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); //# sourceMappingURL=string.js.map discord-api-types/payloads/v9/_interactions/_applicationCommands/_chatInput/subcommand.d.ts 0000664 00000001430 15114741631 0030664 0 ustar 00 node_modules import type { InteractionType } from '../../responses'; import type { APIApplicationCommandBasicOption, APIApplicationCommandInteractionDataBasicOption } from '../chatInput'; import type { APIApplicationCommandOptionBase } from './base'; import type { ApplicationCommandOptionType } from './shared'; export interface APIApplicationCommandSubcommandOption extends APIApplicationCommandOptionBase<ApplicationCommandOptionType.Subcommand> { options?: APIApplicationCommandBasicOption[]; } export interface APIApplicationCommandInteractionDataSubcommandOption<Type extends InteractionType = InteractionType> { name: string; type: ApplicationCommandOptionType.Subcommand; options?: APIApplicationCommandInteractionDataBasicOption<Type>[]; } //# sourceMappingURL=subcommand.d.ts.map discord-api-types/payloads/v9/_interactions/_applicationCommands/_chatInput/attachment.d.ts 0000664 00000001017 15114741631 0030665 0 ustar 00 node_modules import type { Snowflake } from '../../../../../globals'; import type { APIApplicationCommandOptionBase, APIInteractionDataOptionBase } from './base'; import type { ApplicationCommandOptionType } from './shared'; export type APIApplicationCommandAttachmentOption = APIApplicationCommandOptionBase<ApplicationCommandOptionType.Attachment>; export type APIApplicationCommandInteractionDataAttachmentOption = APIInteractionDataOptionBase<ApplicationCommandOptionType.Attachment, Snowflake>; //# sourceMappingURL=attachment.d.ts.map discord-api-types/payloads/v9/_interactions/_applicationCommands/_chatInput/subcommandGroup.js 0000664 00000000170 15114741631 0031445 0 ustar 00 node_modules "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); //# sourceMappingURL=subcommandGroup.js.map node_modules/discord-api-types/payloads/v9/_interactions/_applicationCommands/_chatInput/role.d.ts 0000664 00000000761 15114741631 0027562 0 ustar 00 import type { Snowflake } from '../../../../../globals'; import type { APIApplicationCommandOptionBase, APIInteractionDataOptionBase } from './base'; import type { ApplicationCommandOptionType } from './shared'; export type APIApplicationCommandRoleOption = APIApplicationCommandOptionBase<ApplicationCommandOptionType.Role>; export type APIApplicationCommandInteractionDataRoleOption = APIInteractionDataOptionBase<ApplicationCommandOptionType.Role, Snowflake>; //# sourceMappingURL=role.d.ts.map node_modules/discord-api-types/payloads/v9/_interactions/_applicationCommands/_chatInput/user.js 0000664 00000000155 15114741631 0027340 0 ustar 00 "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); //# sourceMappingURL=user.js.map discord-api-types/payloads/v9/_interactions/_applicationCommands/_chatInput/subcommand.d.ts.map 0000664 00000001115 15114741631 0031440 0 ustar 00 node_modules {"version":3,"file":"subcommand.d.ts","sourceRoot":"","sources":["subcommand.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AACvD,OAAO,KAAK,EAAE,gCAAgC,EAAE,+CAA+C,EAAE,MAAM,cAAc,CAAC;AACtH,OAAO,KAAK,EAAE,+BAA+B,EAAE,MAAM,QAAQ,CAAC;AAC9D,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,UAAU,CAAC;AAE7D,MAAM,WAAW,qCAChB,SAAQ,+BAA+B,CAAC,4BAA4B,CAAC,UAAU,CAAC;IAChF,OAAO,CAAC,EAAE,gCAAgC,EAAE,CAAC;CAC7C;AAED,MAAM,WAAW,oDAAoD,CAAC,IAAI,SAAS,eAAe,GAAG,eAAe;IACnH,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,4BAA4B,CAAC,UAAU,CAAC;IAC9C,OAAO,CAAC,EAAE,+CAA+C,CAAC,IAAI,CAAC,EAAE,CAAC;CAClE"} node_modules/discord-api-types/payloads/v9/_interactions/_applicationCommands/_chatInput/number.js 0000664 00000000157 15114741631 0027654 0 ustar 00 "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); //# sourceMappingURL=number.js.map discord-api-types/payloads/v9/_interactions/_applicationCommands/_chatInput/string.js.map 0000664 00000000141 15114741631 0030360 0 ustar 00 node_modules {"version":3,"file":"string.js","sourceRoot":"","sources":["string.ts"],"names":[],"mappings":""} discord-api-types/payloads/v9/_interactions/_applicationCommands/_chatInput/boolean.d.ts.map 0000664 00000000541 15114741631 0030731 0 ustar 00 node_modules {"version":3,"file":"boolean.d.ts","sourceRoot":"","sources":["boolean.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,+BAA+B,EAAE,4BAA4B,EAAE,MAAM,QAAQ,CAAC;AAC5F,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,UAAU,CAAC;AAE7D,MAAM,MAAM,kCAAkC,GAAG,+BAA+B,CAAC,4BAA4B,CAAC,OAAO,CAAC,CAAC;AAEvH,MAAM,MAAM,iDAAiD,GAAG,4BAA4B,CAC3F,4BAA4B,CAAC,OAAO,EACpC,OAAO,CACP,CAAC"} node_modules/discord-api-types/payloads/v9/_interactions/_applicationCommands/_chatInput/number.d.ts0000664 00000002274 15114741631 0030112 0 ustar 00 import type { InteractionType } from '../../responses'; import type { APIApplicationCommandOptionBase, APIApplicationCommandOptionWithAutocompleteOrChoicesWrapper, APIInteractionDataOptionBase } from './base'; import type { APIApplicationCommandOptionChoice, ApplicationCommandOptionType } from './shared'; export interface APIApplicationCommandNumberOptionBase extends APIApplicationCommandOptionBase<ApplicationCommandOptionType.Number> { /** * If the option is an `INTEGER` or `NUMBER` type, the minimum value permitted. */ min_value?: number; /** * If the option is an `INTEGER` or `NUMBER` type, the maximum value permitted. */ max_value?: number; } export type APIApplicationCommandNumberOption = APIApplicationCommandOptionWithAutocompleteOrChoicesWrapper<APIApplicationCommandNumberOptionBase, APIApplicationCommandOptionChoice<number>>; export interface APIApplicationCommandInteractionDataNumberOption<Type extends InteractionType = InteractionType> extends APIInteractionDataOptionBase<ApplicationCommandOptionType.Number, Type extends InteractionType.ApplicationCommandAutocomplete ? string : number> { focused?: boolean; } //# sourceMappingURL=number.d.ts.map discord-api-types/payloads/v9/_interactions/_applicationCommands/_chatInput/boolean.d.ts 0000664 00000000705 15114741631 0030157 0 ustar 00 node_modules import type { APIApplicationCommandOptionBase, APIInteractionDataOptionBase } from './base'; import type { ApplicationCommandOptionType } from './shared'; export type APIApplicationCommandBooleanOption = APIApplicationCommandOptionBase<ApplicationCommandOptionType.Boolean>; export type APIApplicationCommandInteractionDataBooleanOption = APIInteractionDataOptionBase<ApplicationCommandOptionType.Boolean, boolean>; //# sourceMappingURL=boolean.d.ts.map node_modules/discord-api-types/payloads/v9/_interactions/_applicationCommands/_chatInput/base.js 0000664 00000000155 15114741631 0027274 0 ustar 00 "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); //# sourceMappingURL=base.js.map discord-api-types/payloads/v9/_interactions/_applicationCommands/_chatInput/subcommandGroup.d.ts 0000664 00000001504 15114741631 0031703 0 ustar 00 node_modules import type { InteractionType } from '../../responses'; import type { APIApplicationCommandOptionBase } from './base'; import type { ApplicationCommandOptionType } from './shared'; import type { APIApplicationCommandInteractionDataSubcommandOption, APIApplicationCommandSubcommandOption } from './subcommand'; export interface APIApplicationCommandSubcommandGroupOption extends APIApplicationCommandOptionBase<ApplicationCommandOptionType.SubcommandGroup> { options?: APIApplicationCommandSubcommandOption[]; } export interface APIApplicationCommandInteractionDataSubcommandGroupOption<Type extends InteractionType = InteractionType> { name: string; type: ApplicationCommandOptionType.SubcommandGroup; options: APIApplicationCommandInteractionDataSubcommandOption<Type>[]; } //# sourceMappingURL=subcommandGroup.d.ts.map node_modules/discord-api-types/payloads/v9/_interactions/_applicationCommands/_chatInput/boolean.js 0000664 00000000160 15114741631 0027775 0 ustar 00 "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); //# sourceMappingURL=boolean.js.map discord-api-types/payloads/v9/_interactions/_applicationCommands/_chatInput/number.d.ts.map 0000664 00000001302 15114741631 0030576 0 ustar 00 node_modules {"version":3,"file":"number.d.ts","sourceRoot":"","sources":["number.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AACvD,OAAO,KAAK,EACX,+BAA+B,EAC/B,2DAA2D,EAC3D,4BAA4B,EAC5B,MAAM,QAAQ,CAAC;AAChB,OAAO,KAAK,EAAE,iCAAiC,EAAE,4BAA4B,EAAE,MAAM,UAAU,CAAC;AAEhG,MAAM,WAAW,qCAChB,SAAQ,+BAA+B,CAAC,4BAA4B,CAAC,MAAM,CAAC;IAC5E;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,MAAM,iCAAiC,GAAG,2DAA2D,CAC1G,qCAAqC,EACrC,iCAAiC,CAAC,MAAM,CAAC,CACzC,CAAC;AAEF,MAAM,WAAW,gDAAgD,CAAC,IAAI,SAAS,eAAe,GAAG,eAAe,CAC/G,SAAQ,4BAA4B,CACnC,4BAA4B,CAAC,MAAM,EACnC,IAAI,SAAS,eAAe,CAAC,8BAA8B,GAAG,MAAM,GAAG,MAAM,CAC7E;IACD,OAAO,CAAC,EAAE,OAAO,CAAC;CAClB"} node_modules/discord-api-types/payloads/v9/_interactions/_applicationCommands/_chatInput/user.d.ts 0000664 00000000761 15114741631 0027577 0 ustar 00 import type { Snowflake } from '../../../../../globals'; import type { APIApplicationCommandOptionBase, APIInteractionDataOptionBase } from './base'; import type { ApplicationCommandOptionType } from './shared'; export type APIApplicationCommandUserOption = APIApplicationCommandOptionBase<ApplicationCommandOptionType.User>; export type APIApplicationCommandInteractionDataUserOption = APIInteractionDataOptionBase<ApplicationCommandOptionType.User, Snowflake>; //# sourceMappingURL=user.d.ts.map node_modules/discord-api-types/payloads/v9/_interactions/_applicationCommands/_chatInput/integer.js 0000664 00000000160 15114741631 0030013 0 ustar 00 "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); //# sourceMappingURL=integer.js.map discord-api-types/payloads/v9/_interactions/_applicationCommands/_chatInput/base.d.ts.map 0000664 00000001526 15114741631 0030230 0 ustar 00 node_modules {"version":3,"file":"base.d.ts","sourceRoot":"","sources":["base.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACzD,OAAO,KAAK,EAAE,iCAAiC,EAAE,4BAA4B,EAAE,MAAM,UAAU,CAAC;AAEhG,MAAM,WAAW,+BAA+B,CAAC,IAAI,SAAS,4BAA4B;IACzF,IAAI,EAAE,IAAI,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,kBAAkB,CAAC,EAAE,eAAe,GAAG,IAAI,CAAC;IAC5C,WAAW,EAAE,MAAM,CAAC;IACpB,yBAAyB,CAAC,EAAE,eAAe,GAAG,IAAI,CAAC;IACnD,QAAQ,CAAC,EAAE,OAAO,CAAC;CACnB;AAED,MAAM,WAAW,4BAA4B,CAAC,CAAC,SAAS,4BAA4B,EAAE,CAAC;IACtF,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,CAAC,CAAC;IACR,KAAK,EAAE,CAAC,CAAC;CACT;AAED,MAAM,MAAM,2DAA2D,CACtE,IAAI,SAAS,+BAA+B,CAAC,4BAA4B,CAAC,EAC1E,UAAU,SAAS,iCAAiC,IAElD,CAAC,IAAI,GAAG;IACR,YAAY,EAAE,IAAI,CAAC;IACnB,OAAO,CAAC,EAAE,EAAE,CAAC;CACZ,CAAC,GACF,CAAC,IAAI,GAAG;IACR,YAAY,CAAC,EAAE,KAAK,CAAC;IACrB,OAAO,CAAC,EAAE,UAAU,EAAE,CAAC;CACtB,CAAC,CAAC"} node_modules/discord-api-types/payloads/v9/_interactions/_applicationCommands/_chatInput/shared.d.ts0000664 00000001504 15114741631 0030063 0 ustar 00 import type { LocalizationMap } from '../../../../../v9'; /** * @see {@link https://discord.com/developers/docs/interactions/application-commands#application-command-object-application-command-option-type} */ export declare enum ApplicationCommandOptionType { Subcommand = 1, SubcommandGroup = 2, String = 3, Integer = 4, Boolean = 5, User = 6, Channel = 7, Role = 8, Mentionable = 9, Number = 10, Attachment = 11 } /** * @see {@link https://discord.com/developers/docs/interactions/application-commands#application-command-object-application-command-option-choice-structure} */ export interface APIApplicationCommandOptionChoice<ValueType = number | string> { name: string; name_localizations?: LocalizationMap | null; value: ValueType; } //# sourceMappingURL=shared.d.ts.map discord-api-types/payloads/v9/_interactions/_applicationCommands/_chatInput/channel.d.ts.map 0000664 00000001034 15114741631 0030720 0 ustar 00 node_modules {"version":3,"file":"channel.d.ts","sourceRoot":"","sources":["channel.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AACxD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AACpD,OAAO,KAAK,EAAE,+BAA+B,EAAE,4BAA4B,EAAE,MAAM,QAAQ,CAAC;AAC5F,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,UAAU,CAAC;AAE7D,MAAM,WAAW,kCAChB,SAAQ,+BAA+B,CAAC,4BAA4B,CAAC,OAAO,CAAC;IAC7E,aAAa,CAAC,EAAE,OAAO,CAAC,WAAW,EAAE,WAAW,CAAC,EAAE,GAAG,WAAW,CAAC,OAAO,CAAC,EAAE,CAAC;CAC7E;AAED,MAAM,MAAM,iDAAiD,GAAG,4BAA4B,CAC3F,4BAA4B,CAAC,OAAO,EACpC,SAAS,CACT,CAAC"} discord-api-types/payloads/v9/_interactions/_applicationCommands/_chatInput/integer.d.ts 0000664 00000002303 15114741631 0030171 0 ustar 00 node_modules import type { InteractionType } from '../../responses'; import type { APIApplicationCommandOptionBase, APIApplicationCommandOptionWithAutocompleteOrChoicesWrapper, APIInteractionDataOptionBase } from './base'; import type { APIApplicationCommandOptionChoice, ApplicationCommandOptionType } from './shared'; export interface APIApplicationCommandIntegerOptionBase extends APIApplicationCommandOptionBase<ApplicationCommandOptionType.Integer> { /** * If the option is an `INTEGER` or `NUMBER` type, the minimum value permitted. */ min_value?: number; /** * If the option is an `INTEGER` or `NUMBER` type, the maximum value permitted. */ max_value?: number; } export type APIApplicationCommandIntegerOption = APIApplicationCommandOptionWithAutocompleteOrChoicesWrapper<APIApplicationCommandIntegerOptionBase, APIApplicationCommandOptionChoice<number>>; export interface APIApplicationCommandInteractionDataIntegerOption<Type extends InteractionType = InteractionType> extends APIInteractionDataOptionBase<ApplicationCommandOptionType.Integer, Type extends InteractionType.ApplicationCommandAutocomplete ? string : number> { focused?: boolean; } //# sourceMappingURL=integer.d.ts.map discord-api-types/payloads/v9/_interactions/_applicationCommands/_chatInput/boolean.js.map 0000664 00000000143 15114741631 0030473 0 ustar 00 node_modules {"version":3,"file":"boolean.js","sourceRoot":"","sources":["boolean.ts"],"names":[],"mappings":""} discord-api-types/payloads/v9/_interactions/_applicationCommands/_chatInput/attachment.js 0000664 00000000163 15114741631 0030432 0 ustar 00 node_modules "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); //# sourceMappingURL=attachment.js.map node_modules/discord-api-types/payloads/v9/_interactions/_applicationCommands/_chatInput/shared.js 0000664 00000002763 15114741631 0027637 0 ustar 00 "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.ApplicationCommandOptionType = void 0; /** * @see {@link https://discord.com/developers/docs/interactions/application-commands#application-command-object-application-command-option-type} */ var ApplicationCommandOptionType; (function (ApplicationCommandOptionType) { ApplicationCommandOptionType[ApplicationCommandOptionType["Subcommand"] = 1] = "Subcommand"; ApplicationCommandOptionType[ApplicationCommandOptionType["SubcommandGroup"] = 2] = "SubcommandGroup"; ApplicationCommandOptionType[ApplicationCommandOptionType["String"] = 3] = "String"; ApplicationCommandOptionType[ApplicationCommandOptionType["Integer"] = 4] = "Integer"; ApplicationCommandOptionType[ApplicationCommandOptionType["Boolean"] = 5] = "Boolean"; ApplicationCommandOptionType[ApplicationCommandOptionType["User"] = 6] = "User"; ApplicationCommandOptionType[ApplicationCommandOptionType["Channel"] = 7] = "Channel"; ApplicationCommandOptionType[ApplicationCommandOptionType["Role"] = 8] = "Role"; ApplicationCommandOptionType[ApplicationCommandOptionType["Mentionable"] = 9] = "Mentionable"; ApplicationCommandOptionType[ApplicationCommandOptionType["Number"] = 10] = "Number"; ApplicationCommandOptionType[ApplicationCommandOptionType["Attachment"] = 11] = "Attachment"; })(ApplicationCommandOptionType || (exports.ApplicationCommandOptionType = ApplicationCommandOptionType = {})); //# sourceMappingURL=shared.js.map discord-api-types/payloads/v9/_interactions/_applicationCommands/_chatInput/channel.d.ts 0000664 00000001225 15114741631 0030146 0 ustar 00 node_modules import type { Snowflake } from '../../../../../globals'; import type { ChannelType } from '../../../channel'; import type { APIApplicationCommandOptionBase, APIInteractionDataOptionBase } from './base'; import type { ApplicationCommandOptionType } from './shared'; export interface APIApplicationCommandChannelOption extends APIApplicationCommandOptionBase<ApplicationCommandOptionType.Channel> { channel_types?: Exclude<ChannelType, ChannelType.DM | ChannelType.GroupDM>[]; } export type APIApplicationCommandInteractionDataChannelOption = APIInteractionDataOptionBase<ApplicationCommandOptionType.Channel, Snowflake>; //# sourceMappingURL=channel.d.ts.map discord-api-types/payloads/v9/_interactions/_applicationCommands/_chatInput/subcommandGroup.js.map 0000664 00000000163 15114741631 0032223 0 ustar 00 node_modules {"version":3,"file":"subcommandGroup.js","sourceRoot":"","sources":["subcommandGroup.ts"],"names":[],"mappings":""} discord-api-types/payloads/v9/_interactions/_applicationCommands/_chatInput/subcommandGroup.d.ts.map0000664 00000001125 15114741631 0032456 0 ustar 00 node_modules {"version":3,"file":"subcommandGroup.d.ts","sourceRoot":"","sources":["subcommandGroup.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AACvD,OAAO,KAAK,EAAE,+BAA+B,EAAE,MAAM,QAAQ,CAAC;AAC9D,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,UAAU,CAAC;AAC7D,OAAO,KAAK,EACX,oDAAoD,EACpD,qCAAqC,EACrC,MAAM,cAAc,CAAC;AAEtB,MAAM,WAAW,0CAChB,SAAQ,+BAA+B,CAAC,4BAA4B,CAAC,eAAe,CAAC;IACrF,OAAO,CAAC,EAAE,qCAAqC,EAAE,CAAC;CAClD;AAED,MAAM,WAAW,yDAAyD,CACzE,IAAI,SAAS,eAAe,GAAG,eAAe;IAE9C,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,4BAA4B,CAAC,eAAe,CAAC;IACnD,OAAO,EAAE,oDAAoD,CAAC,IAAI,CAAC,EAAE,CAAC;CACtE"} discord-api-types/payloads/v9/_interactions/_applicationCommands/_chatInput/role.d.ts.map 0000664 00000000613 15114741631 0030253 0 ustar 00 node_modules {"version":3,"file":"role.d.ts","sourceRoot":"","sources":["role.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AACxD,OAAO,KAAK,EAAE,+BAA+B,EAAE,4BAA4B,EAAE,MAAM,QAAQ,CAAC;AAC5F,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,UAAU,CAAC;AAE7D,MAAM,MAAM,+BAA+B,GAAG,+BAA+B,CAAC,4BAA4B,CAAC,IAAI,CAAC,CAAC;AAEjH,MAAM,MAAM,8CAA8C,GAAG,4BAA4B,CACxF,4BAA4B,CAAC,IAAI,EACjC,SAAS,CACT,CAAC"} node_modules/discord-api-types/payloads/v9/_interactions/_applicationCommands/internals.d.ts.map 0000664 00000000546 15114741631 0027277 0 ustar 00 {"version":3,"file":"internals.d.ts","sourceRoot":"","sources":["internals.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AACrD,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,wBAAwB,CAAC;AAErE,MAAM,WAAW,wCAAwC,CAAC,IAAI,SAAS,sBAAsB;IAC5F,EAAE,EAAE,SAAS,CAAC;IACd,IAAI,EAAE,IAAI,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,CAAC,EAAE,SAAS,CAAC;CACrB"} node_modules/discord-api-types/payloads/v9/_interactions/_applicationCommands/contextMenu.d.ts 0000664 00000007460 15114741631 0027037 0 ustar 00 import type { Snowflake } from '../../../../globals'; import type { APIMessage } from '../../channel'; import type { APIApplicationCommandInteractionWrapper, ApplicationCommandType } from '../applicationCommands'; import type { APIDMInteractionWrapper, APIGuildInteractionWrapper, APIUserInteractionDataResolved } from '../base'; import type { APIBaseApplicationCommandInteractionData } from './internals'; /** * @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object-interaction-data} */ export interface APIUserApplicationCommandInteractionData extends APIBaseApplicationCommandInteractionData<ApplicationCommandType.User> { target_id: Snowflake; resolved: APIUserInteractionDataResolved; } /** * @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object-interaction-data} */ export interface APIMessageApplicationCommandInteractionData extends APIBaseApplicationCommandInteractionData<ApplicationCommandType.Message> { target_id: Snowflake; resolved: APIMessageApplicationCommandInteractionDataResolved; } /** * @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object-resolved-data-structure} */ export interface APIMessageApplicationCommandInteractionDataResolved { messages: Record<Snowflake, APIMessage>; } /** * @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object-interaction-data} */ export type APIContextMenuInteractionData = APIMessageApplicationCommandInteractionData | APIUserApplicationCommandInteractionData; /** * @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object} */ export type APIUserApplicationCommandInteraction = APIApplicationCommandInteractionWrapper<APIUserApplicationCommandInteractionData>; /** * @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object} */ export type APIUserApplicationCommandDMInteraction = APIDMInteractionWrapper<APIUserApplicationCommandInteraction>; /** * @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object} */ export type APIUserApplicationCommandGuildInteraction = APIGuildInteractionWrapper<APIUserApplicationCommandInteraction>; /** * @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object} */ export type APIMessageApplicationCommandInteraction = APIApplicationCommandInteractionWrapper<APIMessageApplicationCommandInteractionData>; /** * @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object} */ export type APIMessageApplicationCommandDMInteraction = APIDMInteractionWrapper<APIMessageApplicationCommandInteraction>; /** * @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object} */ export type APIMessageApplicationCommandGuildInteraction = APIGuildInteractionWrapper<APIMessageApplicationCommandInteraction>; /** * @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object} */ export type APIContextMenuInteraction = APIMessageApplicationCommandInteraction | APIUserApplicationCommandInteraction; /** * @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object} */ export type APIContextMenuDMInteraction = APIMessageApplicationCommandDMInteraction | APIUserApplicationCommandDMInteraction; /** * @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object} */ export type APIContextMenuGuildInteraction = APIMessageApplicationCommandGuildInteraction | APIUserApplicationCommandGuildInteraction; //# sourceMappingURL=contextMenu.d.ts.map node_modules/discord-api-types/payloads/v9/_interactions/_applicationCommands/permissions.d.ts 0000664 00000003551 15114741631 0027076 0 ustar 00 import type { Snowflake } from '../../../../globals'; /** * @see {@link https://discord.com/developers/docs/interactions/application-commands#application-command-permissions-object-guild-application-command-permissions-structure} */ export interface APIGuildApplicationCommandPermissions { /** * The id of the command or the application id if that permission applies to all commands */ id: Snowflake; /** * The id of the application the command belongs to */ application_id: Snowflake; /** * The id of the guild */ guild_id: Snowflake; /** * The permissions for the command in the guild */ permissions: APIApplicationCommandPermission[]; } /** * @see {@link https://discord.com/developers/docs/interactions/application-commands#application-command-permissions-object-application-command-permissions-structure} */ export interface APIApplicationCommandPermission { /** * The id of the role, user or channel. Can also be a permission constant */ id: Snowflake; /** * Role, user or channel */ type: ApplicationCommandPermissionType; /** * `true` to allow, `false`, to disallow */ permission: boolean; } /** * @see {@link https://discord.com/developers/docs/interactions/application-commands#application-command-permissions-object-application-command-permission-type} */ export declare enum ApplicationCommandPermissionType { Role = 1, User = 2, Channel = 3 } /** * @see {@link https://discord.com/developers/docs/interactions/application-commands#application-command-permissions-object-application-command-permissions-constants} */ export declare const APIApplicationCommandPermissionsConstant: { Everyone: (guildId: bigint | string) => Snowflake; AllChannels: (guildId: bigint | string) => Snowflake; }; //# sourceMappingURL=permissions.d.ts.map node_modules/discord-api-types/payloads/v9/_interactions/_applicationCommands/internals.js.map 0000664 00000000147 15114741631 0027040 0 ustar 00 {"version":3,"file":"internals.js","sourceRoot":"","sources":["internals.ts"],"names":[],"mappings":""} node_modules/discord-api-types/payloads/v9/_interactions/_applicationCommands/chatInput.js 0000664 00000001521 15114741631 0026221 0 ustar 00 "use strict"; var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { if (k2 === undefined) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { return m[k]; } }; } Object.defineProperty(o, k2, desc); }) : (function(o, m, k, k2) { if (k2 === undefined) k2 = k; o[k2] = m[k]; })); var __exportStar = (this && this.__exportStar) || function(m, exports) { for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); }; Object.defineProperty(exports, "__esModule", { value: true }); __exportStar(require("./_chatInput/shared"), exports); //# sourceMappingURL=chatInput.js.map node_modules/discord-api-types/payloads/v9/_interactions/_applicationCommands/permissions.d.ts.map 0000664 00000001260 15114741631 0027645 0 ustar 00 {"version":3,"file":"permissions.d.ts","sourceRoot":"","sources":["permissions.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAErD;;GAEG;AACH,MAAM,WAAW,qCAAqC;IACrD;;OAEG;IACH,EAAE,EAAE,SAAS,CAAC;IACd;;OAEG;IACH,cAAc,EAAE,SAAS,CAAC;IAC1B;;OAEG;IACH,QAAQ,EAAE,SAAS,CAAC;IACpB;;OAEG;IACH,WAAW,EAAE,+BAA+B,EAAE,CAAC;CAC/C;AAED;;GAEG;AACH,MAAM,WAAW,+BAA+B;IAC/C;;OAEG;IACH,EAAE,EAAE,SAAS,CAAC;IACd;;OAEG;IACH,IAAI,EAAE,gCAAgC,CAAC;IACvC;;OAEG;IACH,UAAU,EAAE,OAAO,CAAC;CACpB;AAED;;GAEG;AACH,oBAAY,gCAAgC;IAC3C,IAAI,IAAI;IACR,IAAI,IAAA;IACJ,OAAO,IAAA;CACP;AAED;;GAEG;AACH,eAAO,MAAM,wCAAwC;wBAEhC,MAAM,GAAG,MAAM,KAAG,SAAS;2BACxB,MAAM,GAAG,MAAM,KAAG,SAAS;CAClD,CAAC"} node_modules/discord-api-types/payloads/v9/_interactions/_applicationCommands/contextMenu.js.map 0000664 00000000153 15114741631 0027347 0 ustar 00 {"version":3,"file":"contextMenu.js","sourceRoot":"","sources":["contextMenu.ts"],"names":[],"mappings":""} node_modules/discord-api-types/payloads/v9/_interactions/base.js.map 0000664 00000000135 15114741631 0021624 0 ustar 00 {"version":3,"file":"base.js","sourceRoot":"","sources":["base.ts"],"names":[],"mappings":""} node_modules/discord-api-types/payloads/v9/_interactions/autocomplete.js 0000664 00000000165 15114741631 0022642 0 ustar 00 "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); //# sourceMappingURL=autocomplete.js.map node_modules/discord-api-types/payloads/v9/_interactions/ping.d.ts 0000664 00000000352 15114741631 0021330 0 ustar 00 import type { APIBaseInteraction } from './base'; import type { InteractionType } from './responses'; export type APIPingInteraction = Omit<APIBaseInteraction<InteractionType.Ping, never>, 'locale'>; //# sourceMappingURL=ping.d.ts.map node_modules/discord-api-types/payloads/v9/_interactions/base.d.ts 0000664 00000021430 15114741631 0021305 0 ustar 00 import type { Permissions, Snowflake } from '../../../globals'; import type { APIRole, ApplicationIntegrationType, InteractionContextType, Locale } from '../../../v9'; import type { APIAttachment, APIChannel, APIMessage, APIPartialChannel, APIThreadChannel, ChannelType, ThreadChannelType } from '../channel'; import type { APIBaseGuildMember, APIFlaggedGuildMember, APIGuildMember, APIGuildMemberAvatar, APIGuildMemberJoined, APIPartialInteractionGuild } from '../guild'; import type { APIEntitlement } from '../monetization'; import type { APIUser } from '../user'; import type { InteractionType } from './responses'; /** * @see {@link https://discord.com/developers/docs/resources/channel#message-interaction-metadata-object} */ export type APIMessageInteractionMetadata = APIApplicationCommandInteractionMetadata | APIMessageComponentInteractionMetadata | APIModalSubmitInteractionMetadata; /** * @see {@link https://discord.com/developers/docs/resources/channel#message-interaction-metadata-object} */ export interface APIBaseInteractionMetadata<Type extends InteractionType> { /** * ID of the interaction */ id: Snowflake; /** * Type of interaction */ type: Type; /** * User who triggered the interaction */ user: APIUser; /** * IDs for installation context(s) related to an interaction */ authorizing_integration_owners: APIAuthorizingIntegrationOwnersMap; /** * ID of the original response message, present only on follow-up messages */ original_response_message_id?: Snowflake; } /** * @see {@link https://discord.com/developers/docs/resources/message#message-interaction-metadata-object-application-command-interaction-metadata-structure} */ export interface APIApplicationCommandInteractionMetadata extends APIBaseInteractionMetadata<InteractionType.ApplicationCommand> { /** * The user the command was run on, present only on user commands interactions */ target_user?: APIUser; /** * The ID of the message the command was run on, present only on message command interactions. * The original response message will also have `message_reference` and `referenced_message` pointing to this message. */ target_message_id?: Snowflake; } /** * @see {@link https://discord.com/developers/docs/resources/message#message-interaction-metadata-object-message-command-interaction-metadata-structure} */ export interface APIMessageComponentInteractionMetadata extends APIBaseInteractionMetadata<InteractionType.MessageComponent> { /** * ID of the message that contained the interactive component */ interacted_message_id: Snowflake; } /** * @see {@link https://discord.com/developers/docs/resources/message#message-interaction-metadata-object-modal-submit-interaction-metadata-structure} */ export interface APIModalSubmitInteractionMetadata extends APIBaseInteractionMetadata<InteractionType.ModalSubmit> { /** * Metadata for the interaction that was used to open the modal */ triggering_interaction_metadata: APIApplicationCommandInteractionMetadata | APIMessageComponentInteractionMetadata; } export type PartialAPIMessageInteractionGuildMember = Pick<APIGuildMember, 'avatar' | 'communication_disabled_until' | 'deaf' | 'joined_at' | 'mute' | 'nick' | 'pending' | 'premium_since' | 'roles'>; /** * @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#message-interaction-object} */ export interface APIMessageInteraction { /** * ID of the interaction */ id: Snowflake; /** * The type of interaction */ type: InteractionType; /** * The name of the application command, including subcommands and subcommand groups */ name: string; /** * The user who invoked the interaction */ user: APIUser; /** * The guild member who invoked the interaction, only sent in MESSAGE_CREATE events */ member?: PartialAPIMessageInteractionGuildMember; } /** * @see {@link https://discord.com/developers/docs/resources/guild#guild-member-object} */ export interface APIInteractionGuildMember extends APIGuildMember { permissions: Permissions; user: APIUser; } /** * @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object} */ export interface APIBaseInteraction<Type extends InteractionType, Data> { /** * ID of the interaction */ id: Snowflake; /** * ID of the application this interaction is for */ application_id: Snowflake; /** * The type of interaction */ type: Type; /** * The command data payload */ data?: Data; /** * Guild that the interaction was sent from */ guild?: APIPartialInteractionGuild; /** * Guild that the interaction was sent from */ guild_id?: Snowflake; /** * The channel it was sent from */ channel?: Partial<APIChannel> & Pick<APIChannel, 'id' | 'type'>; /** * The id of the channel it was sent from * * @deprecated Use {@link APIBaseInteraction.channel} instead */ channel_id?: Snowflake; /** * Guild member data for the invoking user, including permissions * * **This is only sent when an interaction is invoked in a guild** */ member?: APIInteractionGuildMember; /** * User object for the invoking user, if invoked in a DM */ user?: APIUser; /** * A continuation token for responding to the interaction */ token: string; /** * Read-only property, always `1` */ version: 1; /** * For components, the message they were attached to */ message?: APIMessage; /** * Bitwise set of permissions the app or bot has within the channel the interaction was sent from */ app_permissions: Permissions; /** * The selected language of the invoking user */ locale: Locale; /** * The guild's preferred locale, if invoked in a guild */ guild_locale?: Locale; /** * For monetized apps, any entitlements for the invoking user, representing access to premium SKUs */ entitlements: APIEntitlement[]; /** * Mapping of installation contexts that the interaction was authorized for to related user or guild IDs. */ authorizing_integration_owners: APIAuthorizingIntegrationOwnersMap; /** * Context where the interaction was triggered from */ context?: InteractionContextType; /** * Attachment size limit in bytes */ attachment_size_limit: number; } export type APIAuthorizingIntegrationOwnersMap = { [key in ApplicationIntegrationType]?: Snowflake; }; export type APIDMInteractionWrapper<Original extends APIBaseInteraction<InteractionType, unknown>> = Omit<Original, 'guild_id' | 'member'> & Required<Pick<Original, 'user'>>; export type APIGuildInteractionWrapper<Original extends APIBaseInteraction<InteractionType, unknown>> = Omit<Original, 'user'> & Required<Pick<Original, 'guild_id' | 'member'>>; export interface APIInteractionDataResolvedChannelBase<T extends ChannelType> extends Required<APIPartialChannel> { type: T; permissions: Permissions; } /** * @see {@link https://discord.com/developers/docs/resources/channel#channel-object} */ export type APIInteractionDataResolvedChannel = APIInteractionDataResolvedChannelBase<Exclude<ChannelType, ThreadChannelType>> | (APIInteractionDataResolvedChannelBase<ThreadChannelType> & Pick<APIThreadChannel, 'parent_id' | 'thread_metadata'>); /** * @see {@link https://discord.com/developers/docs/resources/guild#guild-member-object} */ export interface APIInteractionDataResolvedGuildMember extends APIBaseGuildMember, APIFlaggedGuildMember, APIGuildMemberAvatar, APIGuildMemberJoined { permissions: Permissions; } /** * @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object-resolved-data-structure} */ export interface APIInteractionDataResolved { users?: Record<Snowflake, APIUser>; roles?: Record<Snowflake, APIRole>; members?: Record<Snowflake, APIInteractionDataResolvedGuildMember>; channels?: Record<Snowflake, APIInteractionDataResolvedChannel>; attachments?: Record<Snowflake, APIAttachment>; } /** * @deprecated Renamed to `APIInteractionDataResolved` */ export type APIChatInputApplicationCommandInteractionDataResolved = APIInteractionDataResolved; /** * `users` and optional `members` from APIInteractionDataResolved, for user commands and user selects */ export type APIUserInteractionDataResolved = Pick<APIInteractionDataResolved, 'members'> & Required<Pick<APIInteractionDataResolved, 'users'>>; /** * @deprecated Renamed to `APIUserInteractionDataResolved` */ export type APIUserApplicationCommandInteractionDataResolved = APIUserInteractionDataResolved; //# sourceMappingURL=base.d.ts.map node_modules/discord-api-types/payloads/v9/_interactions/applicationCommands.js 0000664 00000010331 15114741631 0024122 0 ustar 00 "use strict"; var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { if (k2 === undefined) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { return m[k]; } }; } Object.defineProperty(o, k2, desc); }) : (function(o, m, k, k2) { if (k2 === undefined) k2 = k; o[k2] = m[k]; })); var __exportStar = (this && this.__exportStar) || function(m, exports) { for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); }; Object.defineProperty(exports, "__esModule", { value: true }); exports.EntryPointCommandHandlerType = exports.InteractionContextType = exports.ApplicationIntegrationType = exports.ApplicationCommandType = void 0; __exportStar(require("./_applicationCommands/chatInput"), exports); __exportStar(require("./_applicationCommands/permissions"), exports); /** * @see {@link https://discord.com/developers/docs/interactions/application-commands#application-command-object-application-command-types} */ var ApplicationCommandType; (function (ApplicationCommandType) { /** * Slash commands; a text-based command that shows up when a user types `/` */ ApplicationCommandType[ApplicationCommandType["ChatInput"] = 1] = "ChatInput"; /** * A UI-based command that shows up when you right click or tap on a user */ ApplicationCommandType[ApplicationCommandType["User"] = 2] = "User"; /** * A UI-based command that shows up when you right click or tap on a message */ ApplicationCommandType[ApplicationCommandType["Message"] = 3] = "Message"; /** * A UI-based command that represents the primary way to invoke an app's Activity */ ApplicationCommandType[ApplicationCommandType["PrimaryEntryPoint"] = 4] = "PrimaryEntryPoint"; })(ApplicationCommandType || (exports.ApplicationCommandType = ApplicationCommandType = {})); /** * @see {@link https://discord.com/developers/docs/resources/application#application-object-application-integration-types} */ var ApplicationIntegrationType; (function (ApplicationIntegrationType) { /** * App is installable to servers */ ApplicationIntegrationType[ApplicationIntegrationType["GuildInstall"] = 0] = "GuildInstall"; /** * App is installable to users */ ApplicationIntegrationType[ApplicationIntegrationType["UserInstall"] = 1] = "UserInstall"; })(ApplicationIntegrationType || (exports.ApplicationIntegrationType = ApplicationIntegrationType = {})); /** * @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object-interaction-context-types} */ var InteractionContextType; (function (InteractionContextType) { /** * Interaction can be used within servers */ InteractionContextType[InteractionContextType["Guild"] = 0] = "Guild"; /** * Interaction can be used within DMs with the app's bot user */ InteractionContextType[InteractionContextType["BotDM"] = 1] = "BotDM"; /** * Interaction can be used within Group DMs and DMs other than the app's bot user */ InteractionContextType[InteractionContextType["PrivateChannel"] = 2] = "PrivateChannel"; })(InteractionContextType || (exports.InteractionContextType = InteractionContextType = {})); /** * @see {@link https://discord.com/developers/docs/interactions/application-commands#application-command-object-entry-point-command-handler-types} */ var EntryPointCommandHandlerType; (function (EntryPointCommandHandlerType) { /** * The app handles the interaction using an interaction token */ EntryPointCommandHandlerType[EntryPointCommandHandlerType["AppHandler"] = 1] = "AppHandler"; /** * Discord handles the interaction by launching an Activity and sending a follow-up message without coordinating with * the app */ EntryPointCommandHandlerType[EntryPointCommandHandlerType["DiscordLaunchActivity"] = 2] = "DiscordLaunchActivity"; })(EntryPointCommandHandlerType || (exports.EntryPointCommandHandlerType = EntryPointCommandHandlerType = {})); //# sourceMappingURL=applicationCommands.js.map node_modules/discord-api-types/payloads/v9/_interactions/applicationCommands.js.map 0000664 00000001465 15114741631 0024706 0 ustar 00 {"version":3,"file":"applicationCommands.js","sourceRoot":"","sources":["applicationCommands.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAwBA,mEAAiD;AAEjD,qEAAmD;AAmGnD;;GAEG;AACH,IAAY,sBAiBX;AAjBD,WAAY,sBAAsB;IACjC;;OAEG;IACH,6EAAa,CAAA;IACb;;OAEG;IACH,mEAAI,CAAA;IACJ;;OAEG;IACH,yEAAO,CAAA;IACP;;OAEG;IACH,6FAAiB,CAAA;AAClB,CAAC,EAjBW,sBAAsB,sCAAtB,sBAAsB,QAiBjC;AAED;;GAEG;AACH,IAAY,0BASX;AATD,WAAY,0BAA0B;IACrC;;OAEG;IACH,2FAAY,CAAA;IACZ;;OAEG;IACH,yFAAW,CAAA;AACZ,CAAC,EATW,0BAA0B,0CAA1B,0BAA0B,QASrC;AAED;;GAEG;AACH,IAAY,sBAaX;AAbD,WAAY,sBAAsB;IACjC;;OAEG;IACH,qEAAK,CAAA;IACL;;OAEG;IACH,qEAAK,CAAA;IACL;;OAEG;IACH,uFAAc,CAAA;AACf,CAAC,EAbW,sBAAsB,sCAAtB,sBAAsB,QAajC;AAED;;GAEG;AACH,IAAY,4BAUX;AAVD,WAAY,4BAA4B;IACvC;;OAEG;IACH,2FAAc,CAAA;IACd;;;OAGG;IACH,iHAAqB,CAAA;AACtB,CAAC,EAVW,4BAA4B,4CAA5B,4BAA4B,QAUvC"} node_modules/discord-api-types/payloads/v9/_interactions/applicationCommands.d.ts 0000664 00000017367 15114741631 0024376 0 ustar 00 import type { Permissions, Snowflake } from '../../../globals'; import type { LocalizationMap } from '../../../v9'; import type { APIApplicationCommandOption, APIChatInputApplicationCommandDMInteraction, APIChatInputApplicationCommandGuildInteraction, APIChatInputApplicationCommandInteraction, APIChatInputApplicationCommandInteractionData } from './_applicationCommands/chatInput'; import type { APIContextMenuDMInteraction, APIContextMenuGuildInteraction, APIContextMenuInteraction, APIContextMenuInteractionData } from './_applicationCommands/contextMenu'; import type { APIPrimaryEntryPointCommandDMInteraction, APIPrimaryEntryPointCommandGuildInteraction, APIPrimaryEntryPointCommandInteraction, APIPrimaryEntryPointCommandInteractionData } from './_applicationCommands/entryPoint'; import type { APIBaseInteraction } from './base'; import type { InteractionType } from './responses'; export * from './_applicationCommands/chatInput'; export type * from './_applicationCommands/contextMenu'; export * from './_applicationCommands/permissions'; export type * from './_applicationCommands/entryPoint'; export type * from './_applicationCommands/internals'; /** * @see {@link https://discord.com/developers/docs/interactions/application-commands#application-command-object} */ export interface APIApplicationCommand { /** * Unique id of the command */ id: Snowflake; /** * Type of the command */ type: ApplicationCommandType; /** * Unique id of the parent application */ application_id: Snowflake; /** * Guild id of the command, if not global */ guild_id?: Snowflake; /** * 1-32 character name; `CHAT_INPUT` command names must be all lowercase matching `^[-_\p{L}\p{N}\p{sc=Deva}\p{sc=Thai}]{1,32}$` */ name: string; /** * Localization dictionary for the name field. Values follow the same restrictions as name */ name_localizations?: LocalizationMap | null; /** * The localized name */ name_localized?: string; /** * 1-100 character description for `CHAT_INPUT` commands, empty string for `USER` and `MESSAGE` commands */ description: string; /** * Localization dictionary for the description field. Values follow the same restrictions as description */ description_localizations?: LocalizationMap | null; /** * The localized description */ description_localized?: string; /** * The parameters for the `CHAT_INPUT` command, max 25 */ options?: APIApplicationCommandOption[]; /** * Set of permissions represented as a bitset */ default_member_permissions: Permissions | null; /** * Indicates whether the command is available in DMs with the app, only for globally-scoped commands. By default, commands are visible * * @deprecated Use {@link APIApplicationCommand.contexts} instead */ dm_permission?: boolean; /** * Whether the command is enabled by default when the app is added to a guild * * If missing, this property should be assumed as `true` * * @deprecated Use {@link APIApplicationCommand.dm_permission} and/or {@link APIApplicationCommand.default_member_permissions} instead */ default_permission?: boolean; /** * Indicates whether the command is age-restricted */ nsfw?: boolean; /** * Installation context(s) where the command is available, only for globally-scoped commands * * @defaultValue `[ApplicationIntegrationType.GuildInstall]` */ integration_types?: ApplicationIntegrationType[]; /** * Interaction context(s) where the command can be used, only for globally-scoped commands * * @defaultValue `[InteractionContextType.Guild, InteractionContextType.BotDM, InteractionContextType.PrivateChannel]` */ contexts?: InteractionContextType[] | null; /** * Autoincrementing version identifier updated during substantial record changes */ version: Snowflake; /** * Determines whether the interaction is handled by the app's interactions handler or by Discord * * @remarks * This is only available for {@link ApplicationCommandType.PrimaryEntryPoint} commands */ handler?: EntryPointCommandHandlerType; } /** * @see {@link https://discord.com/developers/docs/interactions/application-commands#application-command-object-application-command-types} */ export declare enum ApplicationCommandType { /** * Slash commands; a text-based command that shows up when a user types `/` */ ChatInput = 1, /** * A UI-based command that shows up when you right click or tap on a user */ User = 2, /** * A UI-based command that shows up when you right click or tap on a message */ Message = 3, /** * A UI-based command that represents the primary way to invoke an app's Activity */ PrimaryEntryPoint = 4 } /** * @see {@link https://discord.com/developers/docs/resources/application#application-object-application-integration-types} */ export declare enum ApplicationIntegrationType { /** * App is installable to servers */ GuildInstall = 0, /** * App is installable to users */ UserInstall = 1 } /** * @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object-interaction-context-types} */ export declare enum InteractionContextType { /** * Interaction can be used within servers */ Guild = 0, /** * Interaction can be used within DMs with the app's bot user */ BotDM = 1, /** * Interaction can be used within Group DMs and DMs other than the app's bot user */ PrivateChannel = 2 } /** * @see {@link https://discord.com/developers/docs/interactions/application-commands#application-command-object-entry-point-command-handler-types} */ export declare enum EntryPointCommandHandlerType { /** * The app handles the interaction using an interaction token */ AppHandler = 1, /** * Discord handles the interaction by launching an Activity and sending a follow-up message without coordinating with * the app */ DiscordLaunchActivity = 2 } /** * @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object-interaction-data} */ export type APIApplicationCommandInteractionData = APIChatInputApplicationCommandInteractionData | APIContextMenuInteractionData | APIPrimaryEntryPointCommandInteractionData; /** * @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object} */ export type APIApplicationCommandInteractionWrapper<Data extends APIApplicationCommandInteractionData> = APIBaseInteraction<InteractionType.ApplicationCommand, Data> & Required<Pick<APIBaseInteraction<InteractionType.ApplicationCommand, Data>, 'app_permissions' | 'channel_id' | 'channel' | 'data'>>; /** * @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object} */ export type APIApplicationCommandInteraction = APIChatInputApplicationCommandInteraction | APIContextMenuInteraction | APIPrimaryEntryPointCommandInteraction; /** * @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object} */ export type APIApplicationCommandDMInteraction = APIChatInputApplicationCommandDMInteraction | APIContextMenuDMInteraction | APIPrimaryEntryPointCommandDMInteraction; /** * @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object} */ export type APIApplicationCommandGuildInteraction = APIChatInputApplicationCommandGuildInteraction | APIContextMenuGuildInteraction | APIPrimaryEntryPointCommandGuildInteraction; //# sourceMappingURL=applicationCommands.d.ts.map node_modules/discord-api-types/payloads/v9/_interactions/modalSubmit.js 0000664 00000000164 15114741631 0022420 0 ustar 00 "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); //# sourceMappingURL=modalSubmit.js.map node_modules/discord-api-types/payloads/v9/_interactions/modalSubmit.js.map 0000664 00000000153 15114741631 0023172 0 ustar 00 {"version":3,"file":"modalSubmit.js","sourceRoot":"","sources":["modalSubmit.ts"],"names":[],"mappings":""} node_modules/discord-api-types/payloads/v9/_interactions/responses.js 0000664 00000006041 15114741631 0022161 0 ustar 00 "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.InteractionResponseType = exports.InteractionType = void 0; /** * @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object-interaction-type} */ var InteractionType; (function (InteractionType) { InteractionType[InteractionType["Ping"] = 1] = "Ping"; InteractionType[InteractionType["ApplicationCommand"] = 2] = "ApplicationCommand"; InteractionType[InteractionType["MessageComponent"] = 3] = "MessageComponent"; InteractionType[InteractionType["ApplicationCommandAutocomplete"] = 4] = "ApplicationCommandAutocomplete"; InteractionType[InteractionType["ModalSubmit"] = 5] = "ModalSubmit"; })(InteractionType || (exports.InteractionType = InteractionType = {})); /** * @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-response-object-interaction-callback-type} */ var InteractionResponseType; (function (InteractionResponseType) { /** * ACK a `Ping` */ InteractionResponseType[InteractionResponseType["Pong"] = 1] = "Pong"; /** * Respond to an interaction with a message */ InteractionResponseType[InteractionResponseType["ChannelMessageWithSource"] = 4] = "ChannelMessageWithSource"; /** * ACK an interaction and edit to a response later, the user sees a loading state */ InteractionResponseType[InteractionResponseType["DeferredChannelMessageWithSource"] = 5] = "DeferredChannelMessageWithSource"; /** * ACK a button interaction and update it to a loading state */ InteractionResponseType[InteractionResponseType["DeferredMessageUpdate"] = 6] = "DeferredMessageUpdate"; /** * ACK a button interaction and edit the message to which the button was attached */ InteractionResponseType[InteractionResponseType["UpdateMessage"] = 7] = "UpdateMessage"; /** * For autocomplete interactions */ InteractionResponseType[InteractionResponseType["ApplicationCommandAutocompleteResult"] = 8] = "ApplicationCommandAutocompleteResult"; /** * Respond to an interaction with an modal for a user to fill-out */ InteractionResponseType[InteractionResponseType["Modal"] = 9] = "Modal"; /** * Respond to an interaction with an upgrade button, only available for apps with monetization enabled * * @deprecated Send a button with Premium type instead. * {@link https://discord.com/developers/docs/change-log#premium-apps-new-premium-button-style-deep-linking-url-schemes | Learn more here} */ InteractionResponseType[InteractionResponseType["PremiumRequired"] = 10] = "PremiumRequired"; /** * Launch the Activity associated with the app. * * @remarks * Only available for apps with Activities enabled */ InteractionResponseType[InteractionResponseType["LaunchActivity"] = 12] = "LaunchActivity"; })(InteractionResponseType || (exports.InteractionResponseType = InteractionResponseType = {})); //# sourceMappingURL=responses.js.map node_modules/discord-api-types/payloads/v9/_interactions/responses.d.ts.map 0000664 00000003605 15114741631 0023174 0 ustar 00 {"version":3,"file":"responses.d.ts","sourceRoot":"","sources":["responses.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mCAAmC,EAAE,MAAM,aAAa,CAAC;AACvE,OAAO,KAAK,EAAE,qBAAqB,EAAE,4BAA4B,EAAE,MAAM,YAAY,CAAC;AACtF,OAAO,KAAK,EAAE,iCAAiC,EAAE,MAAM,uBAAuB,CAAC;AAE/E;;GAEG;AACH,oBAAY,eAAe;IAC1B,IAAI,IAAI;IACR,kBAAkB,IAAA;IAClB,gBAAgB,IAAA;IAChB,8BAA8B,IAAA;IAC9B,WAAW,IAAA;CACX;AAED;;GAEG;AACH,MAAM,MAAM,sBAAsB,GAC/B,yCAAyC,GACzC,8CAA8C,GAC9C,sDAAsD,GACtD,2C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G;IACH,KAAK,IAAA;IACL;;;;;OAKG;IACH,eAAe,KAAA;IAEf;;;;;OAKG;IACH,cAAc,KAAK;CACnB;AAED;;GAEG;AACH,MAAM,MAAM,kCAAkC,GAAG,IAAI,CAAC,mCAAmC,EAAE,YAAY,GAAG,UAAU,CAAC,CAAC;AAEtH,MAAM,WAAW,qDAAqD;IACrE,OAAO,CAAC,EAAE,iCAAiC,EAAE,CAAC;CAC9C;AAED;;GAEG;AACH,MAAM,WAAW,uCAAuC;IACvD;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;IAClB;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,UAAU,EAAE,qBAAqB,CAAC,4BAA4B,CAAC,EAAE,CAAC;CAClE"} node_modules/discord-api-types/payloads/v9/_interactions/modalSubmit.d.ts.map 0000664 00000001567 15114741631 0023440 0 ustar 00 {"version":3,"file":"modalSubmit.d.ts","sourceRoot":"","sources":["modalSubmit.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AACnD,OAAO,KAAK,EACX,kBAAkB,EAClB,uBAAuB,EACvB,0BAA0B,EAC1B,aAAa,EACb,eAAe,EACf,MAAM,UAAU,CAAC;AAElB,MAAM,WAAW,oBAAoB;IACpC,IAAI,EAAE,aAAa,CAAC;IACpB,SAAS,EAAE,MAAM,CAAC;IAClB,KAAK,EAAE,MAAM,CAAC;CACd;AAED,MAAM,WAAW,6BAA8B,SAAQ,gBAAgB,CAAC,aAAa,CAAC,SAAS,CAAC;IAC/F,UAAU,EAAE,oBAAoB,EAAE,CAAC;CACnC;AAED;;GAEG;AACH,MAAM,WAAW,kBAAkB;IAClC;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;IAClB;;OAEG;IACH,UAAU,EAAE,6BAA6B,EAAE,CAAC;CAC5C;AAED;;GAEG;AACH,MAAM,MAAM,yBAAyB,GAAG,kBAAkB,CAAC,eAAe,CAAC,WAAW,EAAE,kBAAkB,CAAC,GAC1G,QAAQ,CAAC,IAAI,CAAC,kBAAkB,CAAC,eAAe,CAAC,WAAW,EAAE,kBAAkB,CAAC,EAAE,MAAM,CAAC,CAAC,CAAC;AAE7F;;GAEG;AACH,MAAM,MAAM,2BAA2B,GAAG,uBAAuB,CAAC,yBAAyB,CAAC,CAAC;AAE7F;;GAEG;AACH,MAAM,MAAM,8BAA8B,GAAG,0BAA0B,CAAC,yBAAyB,CAAC,CAAC"} node_modules/discord-api-types/payloads/v9/_interactions/messageComponents.js.map 0000664 00000000167 15114741631 0024411 0 ustar 00 {"version":3,"file":"messageComponents.js","sourceRoot":"","sources":["messageComponents.ts"],"names":[],"mappings":""} node_modules/discord-api-types/payloads/v9/_interactions/ping.d.ts.map 0000664 00000000437 15114741631 0022110 0 ustar 00 {"version":3,"file":"ping.d.ts","sourceRoot":"","sources":["ping.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,QAAQ,CAAC;AACjD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAEnD,MAAM,MAAM,kBAAkB,GAAG,IAAI,CAAC,kBAAkB,CAAC,eAAe,CAAC,IAAI,EAAE,KAAK,CAAC,EAAE,QAAQ,CAAC,CAAC"} node_modules/discord-api-types/payloads/v9/_interactions/autocomplete.js.map 0000664 00000000155 15114741631 0023415 0 ustar 00 {"version":3,"file":"autocomplete.js","sourceRoot":"","sources":["autocomplete.ts"],"names":[],"mappings":""} node_modules/discord-api-types/payloads/v9/_interactions/base.js 0000664 00000000155 15114741631 0021052 0 ustar 00 "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); //# sourceMappingURL=base.js.map node_modules/discord-api-types/payloads/v9/_interactions/messageComponents.d.ts.map 0000664 00000004176 15114741631 0024651 0 ustar 00 {"version":3,"file":"messageComponents.d.ts","sourceRoot":"","sources":["messageComponents.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,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APIBaseComponent } from '../channel'; import type { APIBaseInteraction, APIDMInteractionWrapper, APIGuildInteractionWrapper, ComponentType, InteractionType } from '../index'; export interface ModalSubmitComponent { type: ComponentType; custom_id: string; value: string; } export interface ModalSubmitActionRowComponent extends APIBaseComponent<ComponentType.ActionRow> { components: ModalSubmitComponent[]; } /** * @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object-modal-submit-data-structure} */ export interface APIModalSubmission { /** * A developer-defined identifier for the component, max 100 characters */ custom_id: string; /** * A list of child components */ components: ModalSubmitActionRowComponent[]; } /** * @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object} */ export type APIModalSubmitInteraction = APIBaseInteraction<InteractionType.ModalSubmit, APIModalSubmission> & Required<Pick<APIBaseInteraction<InteractionType.ModalSubmit, APIModalSubmission>, 'data'>>; /** * @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object} */ export type APIModalSubmitDMInteraction = APIDMInteractionWrapper<APIModalSubmitInteraction>; /** * @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object} */ export type APIModalSubmitGuildInteraction = APIGuildInteractionWrapper<APIModalSubmitInteraction>; //# sourceMappingURL=modalSubmit.d.ts.map node_modules/discord-api-types/payloads/v9/_interactions/base.d.ts.map 0000664 00000010072 15114741631 0022061 0 ustar 00 {"version":3,"file":"base.d.ts","sourceRoot":"","sources":["base.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC/D,OAAO,KAAK,EAAE,OAAO,EAAE,0BAA0B,EAAE,sBAAsB,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AACvG,OAAO,KAAK,EACX,aAAa,EACb,UAAU,EACV,UAAU,EACV,iBAAiB,EACjB,gBAAgB,EAChB,WAAW,EACX,iBAAiB,EACjB,MAAM,YAAY,CAAC;AACpB,OAAO,KAAK,EACX,kBAAkB,EAClB,qBAAqB,EACrB,cAAc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AW,EAAE,WAAW,CAAC;CACzB;AAED;;GAEG;AACH,MAAM,WAAW,0BAA0B;IAC1C,KAAK,CAAC,EAAE,MAAM,CAAC,SAAS,EAAE,OAAO,CAAC,CAAC;IACnC,KAAK,CAAC,EAAE,MAAM,CAAC,SAAS,EAAE,OAAO,CAAC,CAAC;IACnC,OAAO,CAAC,EAAE,MAAM,CAAC,SAAS,EAAE,qCAAqC,CAAC,CAAC;IACnE,QAAQ,CAAC,EAAE,MAAM,CAAC,SAAS,EAAE,iCAAiC,CAAC,CAAC;IAChE,WAAW,CAAC,EAAE,MAAM,CAAC,SAAS,EAAE,aAAa,CAAC,CAAC;CAC/C;AAED;;GAEG;AACH,MAAM,MAAM,qDAAqD,GAAG,0BAA0B,CAAC;AAE/F;;GAEG;AACH,MAAM,MAAM,8BAA8B,GAAG,IAAI,CAAC,0BAA0B,EAAE,SAAS,CAAC,GACvF,QAAQ,CAAC,IAAI,CAAC,0BAA0B,EAAE,OAAO,CAAC,CAAC,CAAC;AAErD;;GAEG;AACH,MAAM,MAAM,gDAAgD,GAAG,8BAA8B,CAAC"} node_modules/discord-api-types/payloads/v9/_interactions/responses.js.map 0000664 00000001155 15114741631 0022736 0 ustar 00 {"version":3,"file":"responses.js","sourceRoot":"","sources":["responses.ts"],"names":[],"mappings":";;;AAIA;;GAEG;AACH,IAAY,eAMX;AAND,WAAY,eAAe;IAC1B,qDAAQ,CAAA;IACR,iFAAkB,CAAA;IAClB,6EAAgB,CAAA;IAChB,yGAA8B,CAAA;IAC9B,mEAAW,CAAA;AACZ,CAAC,EANW,eAAe,+BAAf,eAAe,QAM1B;AAyDD;;GAEG;AACH,IAAY,uBA4CX;AA5CD,WAAY,uBAAuB;IAClC;;OAEG;IACH,qEAAQ,CAAA;IACR;;OAEG;IACH,6GAA4B,CAAA;IAC5B;;OAEG;IACH,6HAAgC,CAAA;IAChC;;OAEG;IACH,uGAAqB,CAAA;IACrB;;OAEG;IACH,uFAAa,CAAA;IACb;;OAEG;IACH,qIAAoC,CAAA;IACpC;;OAEG;IACH,uEAAK,CAAA;IACL;;;;;OAKG;IACH,4FAAe,CAAA;IAEf;;;;;OAKG;IACH,0FAAmB,CAAA;AACpB,CAAC,EA5CW,uBAAuB,uCAAvB,uBAAuB,QA4ClC"} node_modules/discord-api-types/payloads/v9/_interactions/messageComponents.js 0000664 00000000172 15114741631 0023631 0 ustar 00 "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); //# sourceMappingURL=messageComponents.js.map node_modules/discord-api-types/payloads/v9/voice.js.map 0000664 00000000152 15114741631 0017155 0 ustar 00 {"version":3,"file":"voice.js","sourceRoot":"","sources":["voice.ts"],"names":[],"mappings":";AAAA;;GAEG"} node_modules/discord-api-types/payloads/v9/user.js 0000664 00000017354 15114741631 0016266 0 ustar 00 "use strict"; /** * Types extracted from https://discord.com/developers/docs/resources/user */ Object.defineProperty(exports, "__esModule", { value: true }); exports.NameplatePalette = exports.ConnectionVisibility = exports.ConnectionService = exports.UserPremiumType = exports.UserFlags = void 0; /** * @see {@link https://discord.com/developers/docs/resources/user#user-object-user-flags} */ var UserFlags; (function (UserFlags) { /** * Discord Employee */ UserFlags[UserFlags["Staff"] = 1] = "Staff"; /** * Partnered Server Owner */ UserFlags[UserFlags["Partner"] = 2] = "Partner"; /** * HypeSquad Events Member */ UserFlags[UserFlags["Hypesquad"] = 4] = "Hypesquad"; /** * Bug Hunter Level 1 */ UserFlags[UserFlags["BugHunterLevel1"] = 8] = "BugHunterLevel1"; /** * @unstable This user flag is currently not documented by Discord but has a known value which we will try to keep up to date. */ UserFlags[UserFlags["MFASMS"] = 16] = "MFASMS"; /** * @unstable This user flag is currently not documented by Discord but has a known value which we will try to keep up to date. */ UserFlags[UserFlags["PremiumPromoDismissed"] = 32] = "PremiumPromoDismissed"; /** * House Bravery Member */ UserFlags[UserFlags["HypeSquadOnlineHouse1"] = 64] = "HypeSquadOnlineHouse1"; /** * House Brilliance Member */ UserFlags[UserFlags["HypeSquadOnlineHouse2"] = 128] = "HypeSquadOnlineHouse2"; /** * House Balance Member */ UserFlags[UserFlags["HypeSquadOnlineHouse3"] = 256] = "HypeSquadOnlineHouse3"; /** * Early Nitro Supporter */ UserFlags[UserFlags["PremiumEarlySupporter"] = 512] = "PremiumEarlySupporter"; /** * User is a {@link https://discord.com/developers/docs/topics/teams | team} */ UserFlags[UserFlags["TeamPseudoUser"] = 1024] = "TeamPseudoUser"; /** * @unstable This user flag is currently not documented by Discord but has a known value which we will try to keep up to date. */ UserFlags[UserFlags["HasUnreadUrgentMessages"] = 8192] = "HasUnreadUrgentMessages"; /** * Bug Hunter Level 2 */ UserFlags[UserFlags["BugHunterLevel2"] = 16384] = "BugHunterLevel2"; /** * Verified Bot */ UserFlags[UserFlags["VerifiedBot"] = 65536] = "VerifiedBot"; /** * Early Verified Bot Developer */ UserFlags[UserFlags["VerifiedDeveloper"] = 131072] = "VerifiedDeveloper"; /** * Moderator Programs Alumni */ UserFlags[UserFlags["CertifiedModerator"] = 262144] = "CertifiedModerator"; /** * Bot uses only {@link https://discord.com/developers/docs/interactions/receiving-and-responding#receiving-an-interaction | HTTP interactions} and is shown in the online member list */ UserFlags[UserFlags["BotHTTPInteractions"] = 524288] = "BotHTTPInteractions"; /** * User has been identified as spammer * * @unstable This user flag is currently not documented by Discord but has a known value which we will try to keep up to date. */ UserFlags[UserFlags["Spammer"] = 1048576] = "Spammer"; /** * @unstable This user flag is currently not documented by Discord but has a known value which we will try to keep up to date. */ UserFlags[UserFlags["DisablePremium"] = 2097152] = "DisablePremium"; /** * User is an {@link https://support-dev.discord.com/hc/articles/10113997751447 | Active Developer} */ UserFlags[UserFlags["ActiveDeveloper"] = 4194304] = "ActiveDeveloper"; /** * User's account has been {@link https://support.discord.com/hc/articles/6461420677527 | quarantined} based on recent activity * * @unstable This user flag is currently not documented by Discord but has a known value which we will try to keep up to date. * @privateRemarks * * This value would be `1 << 44`, but bit shifting above `1 << 30` requires bigints */ UserFlags[UserFlags["Quarantined"] = 17592186044416] = "Quarantined"; /** * @unstable This user flag is currently not documented by Discord but has a known value which we will try to keep up to date. * @privateRemarks * * This value would be `1 << 50`, but bit shifting above `1 << 30` requires bigints */ UserFlags[UserFlags["Collaborator"] = 1125899906842624] = "Collaborator"; /** * @unstable This user flag is currently not documented by Discord but has a known value which we will try to keep up to date. * @privateRemarks * * This value would be `1 << 51`, but bit shifting above `1 << 30` requires bigints */ UserFlags[UserFlags["RestrictedCollaborator"] = 2251799813685248] = "RestrictedCollaborator"; })(UserFlags || (exports.UserFlags = UserFlags = {})); /** * @see {@link https://discord.com/developers/docs/resources/user#user-object-premium-types} */ var UserPremiumType; (function (UserPremiumType) { UserPremiumType[UserPremiumType["None"] = 0] = "None"; UserPremiumType[UserPremiumType["NitroClassic"] = 1] = "NitroClassic"; UserPremiumType[UserPremiumType["Nitro"] = 2] = "Nitro"; UserPremiumType[UserPremiumType["NitroBasic"] = 3] = "NitroBasic"; })(UserPremiumType || (exports.UserPremiumType = UserPremiumType = {})); var ConnectionService; (function (ConnectionService) { ConnectionService["AmazonMusic"] = "amazon-music"; ConnectionService["BattleNet"] = "battlenet"; ConnectionService["Bluesky"] = "bluesky"; ConnectionService["BungieNet"] = "bungie"; ConnectionService["Crunchyroll"] = "crunchyroll"; ConnectionService["Domain"] = "domain"; ConnectionService["eBay"] = "ebay"; ConnectionService["EpicGames"] = "epicgames"; ConnectionService["Facebook"] = "facebook"; ConnectionService["GitHub"] = "github"; ConnectionService["Instagram"] = "instagram"; ConnectionService["LeagueOfLegends"] = "leagueoflegends"; ConnectionService["Mastodon"] = "mastodon"; ConnectionService["PayPal"] = "paypal"; ConnectionService["PlayStationNetwork"] = "playstation"; ConnectionService["Reddit"] = "reddit"; ConnectionService["RiotGames"] = "riotgames"; ConnectionService["Roblox"] = "roblox"; ConnectionService["Spotify"] = "spotify"; ConnectionService["Skype"] = "skype"; ConnectionService["Steam"] = "steam"; ConnectionService["TikTok"] = "tiktok"; ConnectionService["Twitch"] = "twitch"; ConnectionService["X"] = "twitter"; /** * @deprecated This is the old name for {@link ConnectionService.X} */ ConnectionService["Twitter"] = "twitter"; ConnectionService["Xbox"] = "xbox"; ConnectionService["YouTube"] = "youtube"; })(ConnectionService || (exports.ConnectionService = ConnectionService = {})); var ConnectionVisibility; (function (ConnectionVisibility) { /** * Invisible to everyone except the user themselves */ ConnectionVisibility[ConnectionVisibility["None"] = 0] = "None"; /** * Visible to everyone */ ConnectionVisibility[ConnectionVisibility["Everyone"] = 1] = "Everyone"; })(ConnectionVisibility || (exports.ConnectionVisibility = ConnectionVisibility = {})); /** * Background color of a nameplate. */ var NameplatePalette; (function (NameplatePalette) { NameplatePalette["Berry"] = "berry"; NameplatePalette["BubbleGum"] = "bubble_gum"; NameplatePalette["Clover"] = "clover"; NameplatePalette["Cobalt"] = "cobalt"; NameplatePalette["Crimson"] = "crimson"; NameplatePalette["Forest"] = "forest"; NameplatePalette["Lemon"] = "lemon"; NameplatePalette["Sky"] = "sky"; NameplatePalette["Teal"] = "teal"; NameplatePalette["Violet"] = "violet"; NameplatePalette["White"] = "white"; })(NameplatePalette || (exports.NameplatePalette = NameplatePalette = {})); //# sourceMappingURL=user.js.map node_modules/discord-api-types/payloads/v9/guild.js 0000664 00000036075 15114741631 0016415 0 ustar 00 "use strict"; /** * Types extracted from https://discord.com/developers/docs/resources/guild */ Object.defineProperty(exports, "__esModule", { value: true }); exports.GuildOnboardingPromptType = exports.GuildOnboardingMode = exports.MembershipScreeningFieldType = exports.GuildWidgetStyle = exports.IntegrationExpireBehavior = exports.GuildMemberFlags = exports.GuildFeature = exports.GuildSystemChannelFlags = exports.GuildHubType = exports.GuildPremiumTier = exports.GuildVerificationLevel = exports.GuildNSFWLevel = exports.GuildMFALevel = exports.GuildExplicitContentFilter = exports.GuildDefaultMessageNotifications = void 0; /** * @see {@link https://discord.com/developers/docs/resources/guild#guild-object-default-message-notification-level} */ var GuildDefaultMessageNotifications; (function (GuildDefaultMessageNotifications) { GuildDefaultMessageNotifications[GuildDefaultMessageNotifications["AllMessages"] = 0] = "AllMessages"; GuildDefaultMessageNotifications[GuildDefaultMessageNotifications["OnlyMentions"] = 1] = "OnlyMentions"; })(GuildDefaultMessageNotifications || (exports.GuildDefaultMessageNotifications = GuildDefaultMessageNotifications = {})); /** * @see {@link https://discord.com/developers/docs/resources/guild#guild-object-explicit-content-filter-level} */ var GuildExplicitContentFilter; (function (GuildExplicitContentFilter) { GuildExplicitContentFilter[GuildExplicitContentFilter["Disabled"] = 0] = "Disabled"; GuildExplicitContentFilter[GuildExplicitContentFilter["MembersWithoutRoles"] = 1] = "MembersWithoutRoles"; GuildExplicitContentFilter[GuildExplicitContentFilter["AllMembers"] = 2] = "AllMembers"; })(GuildExplicitContentFilter || (exports.GuildExplicitContentFilter = GuildExplicitContentFilter = {})); /** * @see {@link https://discord.com/developers/docs/resources/guild#guild-object-mfa-level} */ var GuildMFALevel; (function (GuildMFALevel) { GuildMFALevel[GuildMFALevel["None"] = 0] = "None"; GuildMFALevel[GuildMFALevel["Elevated"] = 1] = "Elevated"; })(GuildMFALevel || (exports.GuildMFALevel = GuildMFALevel = {})); /** * @see {@link https://discord.com/developers/docs/resources/guild#guild-object-guild-nsfw-level} */ var GuildNSFWLevel; (function (GuildNSFWLevel) { GuildNSFWLevel[GuildNSFWLevel["Default"] = 0] = "Default"; GuildNSFWLevel[GuildNSFWLevel["Explicit"] = 1] = "Explicit"; GuildNSFWLevel[GuildNSFWLevel["Safe"] = 2] = "Safe"; GuildNSFWLevel[GuildNSFWLevel["AgeRestricted"] = 3] = "AgeRestricted"; })(GuildNSFWLevel || (exports.GuildNSFWLevel = GuildNSFWLevel = {})); /** * @see {@link https://discord.com/developers/docs/resources/guild#guild-object-verification-level} */ var GuildVerificationLevel; (function (GuildVerificationLevel) { /** * Unrestricted */ GuildVerificationLevel[GuildVerificationLevel["None"] = 0] = "None"; /** * Must have verified email on account */ GuildVerificationLevel[GuildVerificationLevel["Low"] = 1] = "Low"; /** * Must be registered on Discord for longer than 5 minutes */ GuildVerificationLevel[GuildVerificationLevel["Medium"] = 2] = "Medium"; /** * Must be a member of the guild for longer than 10 minutes */ GuildVerificationLevel[GuildVerificationLevel["High"] = 3] = "High"; /** * Must have a verified phone number */ GuildVerificationLevel[GuildVerificationLevel["VeryHigh"] = 4] = "VeryHigh"; })(GuildVerificationLevel || (exports.GuildVerificationLevel = GuildVerificationLevel = {})); /** * @see {@link https://discord.com/developers/docs/resources/guild#guild-object-premium-tier} */ var GuildPremiumTier; (function (GuildPremiumTier) { GuildPremiumTier[GuildPremiumTier["None"] = 0] = "None"; GuildPremiumTier[GuildPremiumTier["Tier1"] = 1] = "Tier1"; GuildPremiumTier[GuildPremiumTier["Tier2"] = 2] = "Tier2"; GuildPremiumTier[GuildPremiumTier["Tier3"] = 3] = "Tier3"; })(GuildPremiumTier || (exports.GuildPremiumTier = GuildPremiumTier = {})); var GuildHubType; (function (GuildHubType) { GuildHubType[GuildHubType["Default"] = 0] = "Default"; GuildHubType[GuildHubType["HighSchool"] = 1] = "HighSchool"; GuildHubType[GuildHubType["College"] = 2] = "College"; })(GuildHubType || (exports.GuildHubType = GuildHubType = {})); /** * @see {@link https://discord.com/developers/docs/resources/guild#guild-object-system-channel-flags} */ var GuildSystemChannelFlags; (function (GuildSystemChannelFlags) { /** * Suppress member join notifications */ GuildSystemChannelFlags[GuildSystemChannelFlags["SuppressJoinNotifications"] = 1] = "SuppressJoinNotifications"; /** * Suppress server boost notifications */ GuildSystemChannelFlags[GuildSystemChannelFlags["SuppressPremiumSubscriptions"] = 2] = "SuppressPremiumSubscriptions"; /** * Suppress server setup tips */ GuildSystemChannelFlags[GuildSystemChannelFlags["SuppressGuildReminderNotifications"] = 4] = "SuppressGuildReminderNotifications"; /** * Hide member join sticker reply buttons */ GuildSystemChannelFlags[GuildSystemChannelFlags["SuppressJoinNotificationReplies"] = 8] = "SuppressJoinNotificationReplies"; })(GuildSystemChannelFlags || (exports.GuildSystemChannelFlags = GuildSystemChannelFlags = {})); /** * @see {@link https://discord.com/developers/docs/resources/guild#guild-object-guild-features} */ var GuildFeature; (function (GuildFeature) { /** * Guild has access to set an animated guild banner image */ GuildFeature["AnimatedBanner"] = "ANIMATED_BANNER"; /** * Guild has access to set an animated guild icon */ GuildFeature["AnimatedIcon"] = "ANIMATED_ICON"; /** * Guild is using the old permissions configuration behavior * * @see {@link https://discord.com/developers/docs/change-log#upcoming-application-command-permission-changes} */ GuildFeature["ApplicationCommandPermissionsV2"] = "APPLICATION_COMMAND_PERMISSIONS_V2"; /** * Guild has set up auto moderation rules */ GuildFeature["AutoModeration"] = "AUTO_MODERATION"; /** * Guild has access to set a guild banner image */ GuildFeature["Banner"] = "BANNER"; /** * Guild can enable welcome screen, Membership Screening and discovery, and receives community updates */ GuildFeature["Community"] = "COMMUNITY"; /** * Guild has enabled monetization */ GuildFeature["CreatorMonetizableProvisional"] = "CREATOR_MONETIZABLE_PROVISIONAL"; /** * Guild has enabled the role subscription promo page */ GuildFeature["CreatorStorePage"] = "CREATOR_STORE_PAGE"; /** * Guild has been set as a support server on the App Directory */ GuildFeature["DeveloperSupportServer"] = "DEVELOPER_SUPPORT_SERVER"; /** * Guild is able to be discovered in the directory */ GuildFeature["Discoverable"] = "DISCOVERABLE"; /** * Guild is able to be featured in the directory */ GuildFeature["Featurable"] = "FEATURABLE"; /** * Guild is listed in a directory channel */ GuildFeature["HasDirectoryEntry"] = "HAS_DIRECTORY_ENTRY"; /** * Guild is a Student Hub * * @see {@link https://support.discord.com/hc/articles/4406046651927} * @unstable This feature is currently not documented by Discord, but has known value */ GuildFeature["Hub"] = "HUB"; /** * Guild has disabled invite usage, preventing users from joining */ GuildFeature["InvitesDisabled"] = "INVITES_DISABLED"; /** * Guild has access to set an invite splash background */ GuildFeature["InviteSplash"] = "INVITE_SPLASH"; /** * Guild is in a Student Hub * * @see {@link https://support.discord.com/hc/articles/4406046651927} * @unstable This feature is currently not documented by Discord, but has known value */ GuildFeature["LinkedToHub"] = "LINKED_TO_HUB"; /** * Guild has enabled Membership Screening */ GuildFeature["MemberVerificationGateEnabled"] = "MEMBER_VERIFICATION_GATE_ENABLED"; /** * Guild has increased custom soundboard sound slots */ GuildFeature["MoreSoundboard"] = "MORE_SOUNDBOARD"; /** * Guild has enabled monetization * * @unstable This feature is no longer documented by Discord */ GuildFeature["MonetizationEnabled"] = "MONETIZATION_ENABLED"; /** * Guild has increased custom sticker slots */ GuildFeature["MoreStickers"] = "MORE_STICKERS"; /** * Guild has access to create news channels */ GuildFeature["News"] = "NEWS"; /** * Guild is partnered */ GuildFeature["Partnered"] = "PARTNERED"; /** * Guild can be previewed before joining via Membership Screening or the directory */ GuildFeature["PreviewEnabled"] = "PREVIEW_ENABLED"; /** * Guild has access to create private threads */ GuildFeature["PrivateThreads"] = "PRIVATE_THREADS"; /** * Guild has disabled alerts for join raids in the configured safety alerts channel */ GuildFeature["RaidAlertsDisabled"] = "RAID_ALERTS_DISABLED"; GuildFeature["RelayEnabled"] = "RELAY_ENABLED"; /** * Guild is able to set role icons */ GuildFeature["RoleIcons"] = "ROLE_ICONS"; /** * Guild has role subscriptions that can be purchased */ GuildFeature["RoleSubscriptionsAvailableForPurchase"] = "ROLE_SUBSCRIPTIONS_AVAILABLE_FOR_PURCHASE"; /** * Guild has enabled role subscriptions */ GuildFeature["RoleSubscriptionsEnabled"] = "ROLE_SUBSCRIPTIONS_ENABLED"; /** * Guild has created soundboard sounds */ GuildFeature["Soundboard"] = "SOUNDBOARD"; /** * Guild has enabled ticketed events */ GuildFeature["TicketedEventsEnabled"] = "TICKETED_EVENTS_ENABLED"; /** * Guild has access to set a vanity URL */ GuildFeature["VanityURL"] = "VANITY_URL"; /** * Guild is verified */ GuildFeature["Verified"] = "VERIFIED"; /** * Guild has access to set 384kbps bitrate in voice (previously VIP voice servers) */ GuildFeature["VIPRegions"] = "VIP_REGIONS"; /** * Guild has enabled the welcome screen */ GuildFeature["WelcomeScreenEnabled"] = "WELCOME_SCREEN_ENABLED"; })(GuildFeature || (exports.GuildFeature = GuildFeature = {})); /** * @see {@link https://discord.com/developers/docs/resources/guild#guild-member-object-guild-member-flags} */ var GuildMemberFlags; (function (GuildMemberFlags) { /** * Member has left and rejoined the guild */ GuildMemberFlags[GuildMemberFlags["DidRejoin"] = 1] = "DidRejoin"; /** * Member has completed onboarding */ GuildMemberFlags[GuildMemberFlags["CompletedOnboarding"] = 2] = "CompletedOnboarding"; /** * Member is exempt from guild verification requirements */ GuildMemberFlags[GuildMemberFlags["BypassesVerification"] = 4] = "BypassesVerification"; /** * Member has started onboarding */ GuildMemberFlags[GuildMemberFlags["StartedOnboarding"] = 8] = "StartedOnboarding"; /** * Member is a guest and can only access the voice channel they were invited to */ GuildMemberFlags[GuildMemberFlags["IsGuest"] = 16] = "IsGuest"; /** * Member has started Server Guide new member actions */ GuildMemberFlags[GuildMemberFlags["StartedHomeActions"] = 32] = "StartedHomeActions"; /** * Member has completed Server Guide new member actions */ GuildMemberFlags[GuildMemberFlags["CompletedHomeActions"] = 64] = "CompletedHomeActions"; /** * Member's username, display name, or nickname is blocked by AutoMod */ GuildMemberFlags[GuildMemberFlags["AutomodQuarantinedUsernameOrGuildNickname"] = 128] = "AutomodQuarantinedUsernameOrGuildNickname"; /** * @deprecated * {@link https://github.com/discord/discord-api-docs/pull/7113 | discord-api-docs#7113} */ GuildMemberFlags[GuildMemberFlags["AutomodQuarantinedBio"] = 256] = "AutomodQuarantinedBio"; /** * Member has dismissed the DM settings upsell */ GuildMemberFlags[GuildMemberFlags["DmSettingsUpsellAcknowledged"] = 512] = "DmSettingsUpsellAcknowledged"; })(GuildMemberFlags || (exports.GuildMemberFlags = GuildMemberFlags = {})); /** * @see {@link https://discord.com/developers/docs/resources/guild#integration-object-integration-expire-behaviors} */ var IntegrationExpireBehavior; (function (IntegrationExpireBehavior) { IntegrationExpireBehavior[IntegrationExpireBehavior["RemoveRole"] = 0] = "RemoveRole"; IntegrationExpireBehavior[IntegrationExpireBehavior["Kick"] = 1] = "Kick"; })(IntegrationExpireBehavior || (exports.IntegrationExpireBehavior = IntegrationExpireBehavior = {})); /** * @see {@link https://discord.com/developers/docs/resources/guild#get-guild-widget-image-widget-style-options} */ var GuildWidgetStyle; (function (GuildWidgetStyle) { /** * Shield style widget with Discord icon and guild members online count */ GuildWidgetStyle["Shield"] = "shield"; /** * Large image with guild icon, name and online count. "POWERED BY DISCORD" as the footer of the widget */ GuildWidgetStyle["Banner1"] = "banner1"; /** * Smaller widget style with guild icon, name and online count. Split on the right with Discord logo */ GuildWidgetStyle["Banner2"] = "banner2"; /** * Large image with guild icon, name and online count. In the footer, Discord logo on the left and "Chat Now" on the right */ GuildWidgetStyle["Banner3"] = "banner3"; /** * Large Discord logo at the top of the widget. Guild icon, name and online count in the middle portion of the widget * and a "JOIN MY SERVER" button at the bottom */ GuildWidgetStyle["Banner4"] = "banner4"; })(GuildWidgetStyle || (exports.GuildWidgetStyle = GuildWidgetStyle = {})); var MembershipScreeningFieldType; (function (MembershipScreeningFieldType) { /** * Server Rules */ MembershipScreeningFieldType["Terms"] = "TERMS"; })(MembershipScreeningFieldType || (exports.MembershipScreeningFieldType = MembershipScreeningFieldType = {})); /** * @see {@link https://discord.com/developers/docs/resources/guild#guild-onboarding-object-onboarding-mode} */ var GuildOnboardingMode; (function (GuildOnboardingMode) { /** * Counts only Default Channels towards constraints */ GuildOnboardingMode[GuildOnboardingMode["OnboardingDefault"] = 0] = "OnboardingDefault"; /** * Counts Default Channels and Questions towards constraints */ GuildOnboardingMode[GuildOnboardingMode["OnboardingAdvanced"] = 1] = "OnboardingAdvanced"; })(GuildOnboardingMode || (exports.GuildOnboardingMode = GuildOnboardingMode = {})); /** * @see {@link https://discord.com/developers/docs/resources/guild#guild-onboarding-object-prompt-types} */ var GuildOnboardingPromptType; (function (GuildOnboardingPromptType) { GuildOnboardingPromptType[GuildOnboardingPromptType["MultipleChoice"] = 0] = "MultipleChoice"; GuildOnboardingPromptType[GuildOnboardingPromptType["Dropdown"] = 1] = "Dropdown"; })(GuildOnboardingPromptType || (exports.GuildOnboardingPromptType = GuildOnboardingPromptType = {})); //# sourceMappingURL=guild.js.map node_modules/discord-api-types/payloads/v9/autoModeration.js 0000664 00000010562 15114741631 0020274 0 ustar 00 "use strict"; /** * Types extracted from https://discord.com/developers/docs/resources/auto-moderation */ Object.defineProperty(exports, "__esModule", { value: true }); exports.AutoModerationActionType = exports.AutoModerationRuleEventType = exports.AutoModerationRuleKeywordPresetType = exports.AutoModerationRuleTriggerType = void 0; /** * @see {@link https://discord.com/developers/docs/resources/auto-moderation#auto-moderation-rule-object-trigger-types} */ var AutoModerationRuleTriggerType; (function (AutoModerationRuleTriggerType) { /** * Check if content contains words from a user defined list of keywords (Maximum of 6 per guild) */ AutoModerationRuleTriggerType[AutoModerationRuleTriggerType["Keyword"] = 1] = "Keyword"; /** * Check if content represents generic spam (Maximum of 1 per guild) */ AutoModerationRuleTriggerType[AutoModerationRuleTriggerType["Spam"] = 3] = "Spam"; /** * Check if content contains words from internal pre-defined wordsets (Maximum of 1 per guild) */ AutoModerationRuleTriggerType[AutoModerationRuleTriggerType["KeywordPreset"] = 4] = "KeywordPreset"; /** * Check if content contains more mentions than allowed (Maximum of 1 per guild) */ AutoModerationRuleTriggerType[AutoModerationRuleTriggerType["MentionSpam"] = 5] = "MentionSpam"; /** * Check if member profile contains words from a user defined list of keywords (Maximum of 1 per guild) */ AutoModerationRuleTriggerType[AutoModerationRuleTriggerType["MemberProfile"] = 6] = "MemberProfile"; })(AutoModerationRuleTriggerType || (exports.AutoModerationRuleTriggerType = AutoModerationRuleTriggerType = {})); /** * @see {@link https://discord.com/developers/docs/resources/auto-moderation#auto-moderation-rule-object-keyword-preset-types} */ var AutoModerationRuleKeywordPresetType; (function (AutoModerationRuleKeywordPresetType) { /** * Words that may be considered forms of swearing or cursing */ AutoModerationRuleKeywordPresetType[AutoModerationRuleKeywordPresetType["Profanity"] = 1] = "Profanity"; /** * Words that refer to sexually explicit behavior or activity */ AutoModerationRuleKeywordPresetType[AutoModerationRuleKeywordPresetType["SexualContent"] = 2] = "SexualContent"; /** * Personal insults or words that may be considered hate speech */ AutoModerationRuleKeywordPresetType[AutoModerationRuleKeywordPresetType["Slurs"] = 3] = "Slurs"; })(AutoModerationRuleKeywordPresetType || (exports.AutoModerationRuleKeywordPresetType = AutoModerationRuleKeywordPresetType = {})); /** * @see {@link https://discord.com/developers/docs/resources/auto-moderation#auto-moderation-rule-object-event-types} */ var AutoModerationRuleEventType; (function (AutoModerationRuleEventType) { /** * When a member sends or edits a message in the guild */ AutoModerationRuleEventType[AutoModerationRuleEventType["MessageSend"] = 1] = "MessageSend"; /** * When a member edits their profile */ AutoModerationRuleEventType[AutoModerationRuleEventType["MemberUpdate"] = 2] = "MemberUpdate"; })(AutoModerationRuleEventType || (exports.AutoModerationRuleEventType = AutoModerationRuleEventType = {})); /** * @see {@link https://discord.com/developers/docs/resources/auto-moderation#auto-moderation-action-object-action-types} */ var AutoModerationActionType; (function (AutoModerationActionType) { /** * Blocks a member's message and prevents it from being posted. * A custom explanation can be specified and shown to members whenever their message is blocked */ AutoModerationActionType[AutoModerationActionType["BlockMessage"] = 1] = "BlockMessage"; /** * Logs user content to a specified channel */ AutoModerationActionType[AutoModerationActionType["SendAlertMessage"] = 2] = "SendAlertMessage"; /** * Timeout user for specified duration, this action type can be set if the bot has `MODERATE_MEMBERS` permission */ AutoModerationActionType[AutoModerationActionType["Timeout"] = 3] = "Timeout"; /** * Prevents a member from using text, voice, or other interactions */ AutoModerationActionType[AutoModerationActionType["BlockMemberInteraction"] = 4] = "BlockMemberInteraction"; })(AutoModerationActionType || (exports.AutoModerationActionType = AutoModerationActionType = {})); //# sourceMappingURL=autoModeration.js.map node_modules/discord-api-types/payloads/v9/oauth2.js 0000664 00000013717 15114741631 0016511 0 ustar 00 "use strict"; /** * Types extracted from https://discord.com/developers/docs/topics/oauth2 */ Object.defineProperty(exports, "__esModule", { value: true }); exports.OAuth2Scopes = void 0; var OAuth2Scopes; (function (OAuth2Scopes) { /** * For oauth2 bots, this puts the bot in the user's selected guild by default */ OAuth2Scopes["Bot"] = "bot"; /** * Allows {@link https://discord.com/developers/docs/resources/user#get-user-connections | `/users/@me/connections`} * to return linked third-party accounts * * @see {@link https://discord.com/developers/docs/resources/user#get-user-connections} */ OAuth2Scopes["Connections"] = "connections"; /** * Allows your app to see information about the user's DMs and group DMs - requires Discord approval */ OAuth2Scopes["DMChannelsRead"] = "dm_channels.read"; /** * Enables {@link https://discord.com/developers/docs/resources/user#get-current-user | `/users/@me`} to return an `email` * * @see {@link https://discord.com/developers/docs/resources/user#get-current-user} */ OAuth2Scopes["Email"] = "email"; /** * Allows {@link https://discord.com/developers/docs/resources/user#get-current-user | `/users/@me`} without `email` * * @see {@link https://discord.com/developers/docs/resources/user#get-current-user} */ OAuth2Scopes["Identify"] = "identify"; /** * Allows {@link https://discord.com/developers/docs/resources/user#get-current-user-guilds | `/users/@me/guilds`} * to return basic information about all of a user's guilds * * @see {@link https://discord.com/developers/docs/resources/user#get-current-user-guilds} */ OAuth2Scopes["Guilds"] = "guilds"; /** * Allows {@link https://discord.com/developers/docs/resources/guild#add-guild-member | `/guilds/[guild.id]/members/[user.id]`} * to be used for joining users to a guild * * @see {@link https://discord.com/developers/docs/resources/guild#add-guild-member} */ OAuth2Scopes["GuildsJoin"] = "guilds.join"; /** * Allows /users/\@me/guilds/\{guild.id\}/member to return a user's member information in a guild * * @see {@link https://discord.com/developers/docs/resources/user#get-current-user-guild-member} */ OAuth2Scopes["GuildsMembersRead"] = "guilds.members.read"; /** * Allows your app to join users to a group dm * * @see {@link https://discord.com/developers/docs/resources/channel#group-dm-add-recipient} */ OAuth2Scopes["GroupDMJoins"] = "gdm.join"; /** * For local rpc server api access, this allows you to read messages from all client channels * (otherwise restricted to channels/guilds your app creates) */ OAuth2Scopes["MessagesRead"] = "messages.read"; /** * Allows your app to update a user's connection and metadata for the app */ OAuth2Scopes["RoleConnectionsWrite"] = "role_connections.write"; /** * For local rpc server access, this allows you to control a user's local Discord client - requires Discord approval */ OAuth2Scopes["RPC"] = "rpc"; /** * For local rpc server api access, this allows you to receive notifications pushed out to the user - requires Discord approval */ OAuth2Scopes["RPCNotificationsRead"] = "rpc.notifications.read"; /** * This generates a webhook that is returned in the oauth token response for authorization code grants */ OAuth2Scopes["WebhookIncoming"] = "webhook.incoming"; /** * Allows your app to connect to voice on user's behalf and see all the voice members - requires Discord approval */ OAuth2Scopes["Voice"] = "voice"; /** * Allows your app to upload/update builds for a user's applications - requires Discord approval */ OAuth2Scopes["ApplicationsBuildsUpload"] = "applications.builds.upload"; /** * Allows your app to read build data for a user's applications */ OAuth2Scopes["ApplicationsBuildsRead"] = "applications.builds.read"; /** * Allows your app to read and update store data (SKUs, store listings, achievements, etc.) for a user's applications */ OAuth2Scopes["ApplicationsStoreUpdate"] = "applications.store.update"; /** * Allows your app to read entitlements for a user's applications */ OAuth2Scopes["ApplicationsEntitlements"] = "applications.entitlements"; /** * Allows your app to know a user's friends and implicit relationships - requires Discord approval */ OAuth2Scopes["RelationshipsRead"] = "relationships.read"; /** * Allows your app to fetch data from a user's "Now Playing/Recently Played" list - requires Discord approval */ OAuth2Scopes["ActivitiesRead"] = "activities.read"; /** * Allows your app to update a user's activity - requires Discord approval (NOT REQUIRED FOR GAMESDK ACTIVITY MANAGER) * * @see {@link https://discord.com/developers/docs/game-sdk/activities} */ OAuth2Scopes["ActivitiesWrite"] = "activities.write"; /** * Allows your app to use Application Commands in a guild * * @see {@link https://discord.com/developers/docs/interactions/application-commands} */ OAuth2Scopes["ApplicationsCommands"] = "applications.commands"; /** * Allows your app to update its Application Commands via this bearer token - client credentials grant only * * @see {@link https://discord.com/developers/docs/interactions/application-commands} */ OAuth2Scopes["ApplicationsCommandsUpdate"] = "applications.commands.update"; /** * Allows your app to update permissions for its commands using a Bearer token - client credentials grant only * * @see {@link https://discord.com/developers/docs/interactions/application-commands} */ OAuth2Scopes["ApplicationCommandsPermissionsUpdate"] = "applications.commands.permissions.update"; })(OAuth2Scopes || (exports.OAuth2Scopes = OAuth2Scopes = {})); //# sourceMappingURL=oauth2.js.map node_modules/discord-api-types/payloads/v9/soundboard.d.ts 0000664 00000002067 15114741631 0017677 0 ustar 00 /** * Types extracted from https://discord.com/developers/docs/resources/soundboard */ import type { Snowflake } from '../../globals'; import type { APIUser } from './user'; /** * @see {@link https://discord.com/developers/docs/resources/soundboard#soundboard-sound-object} */ export interface APISoundboardSound { /** * The name of this sound */ name: string; /** * The id of this sound */ sound_id: Snowflake; /** * The volume of this sound, from 0 to 1 */ volume: number; /** * The id of this sound's custom emoji */ emoji_id: Snowflake | null; /** * The unicode character of this sound's standard emoji */ emoji_name: string | null; /** * The id of the guild that this sound is in */ guild_id?: Snowflake; /** * Whether this sound can be used (for guild sounds), may be false due to loss of Server Boosts */ available: boolean; /** * The user who created this sound */ user?: APIUser; } //# sourceMappingURL=soundboard.d.ts.map node_modules/discord-api-types/payloads/v9/invite.d.ts.map 0000664 00000003051 15114741631 0017603 0 ustar 00 {"version":3,"file":"invite.d.ts","sourceRoot":"","sources":["invite.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AACpD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,WAAW,CAAC;AAClD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AACxC,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,uBAAuB,CAAC;AACpE,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AAC9D,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,QAAQ,CAAC;AAEtC,MAAM,MAAM,cAAc,GAAG,IAAI,CAChC,QAAQ,EACN,QAAQ,GACR,aAAa,GACb,UAAU,GACV,MAAM,GACN,IAAI,GACJ,MAAM,GACN,YAAY,GACZ,4BAA4B,GAC5B,QAAQ,GACR,iBAAiB,GACjB,oBAAoB,CACtB,CAAC;AAEF;;GAEG;AACH,MAAM,WAAW,SAAS;IACzB;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;;;OAIG;IACH,KAAK,CAAC,EAAE,cAAc,CAAC;IACvB;;;;OAIG;IACH,OAAO,EAAE,gBAAgB,GAAG,IAAI,CAAC;IACjC;;;;OAIG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB;;;;OAIG;IACH,WAAW,CAAC,EAAE,gBAAgB,CAAC;IAC/B;;;;OAIG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB;;;;OAIG;IACH,kBAAkB,CAAC,EAAE,OAAO,CAAC,cAAc,CAAC,CAAC;IAC7C;;OAEG;IACH,0BAA0B,CAAC,EAAE,MAAM,CAAC;IACpC;;OAEG;IACH,wBAAwB,CAAC,EAAE,MAAM,CAAC;IAClC;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B;;;;;OAKG;IACH,cAAc,CAAC,EAAE,sBAAsB,CAAC;IACxC;;OAEG;IACH,qBAAqB,CAAC,EAAE,sBAAsB,CAAC;IAC/C;;OAEG;IACH,IAAI,EAAE,UAAU,CAAC;CACjB;AAED;;GAEG;AACH,oBAAY,UAAU;IACrB,KAAK,IAAA;IACL,OAAO,IAAA;IACP,MAAM,IAAA;CACN;AAED;;GAEG;AACH,oBAAY,gBAAgB;IAC3B,MAAM,IAAI;IACV,mBAAmB,IAAA;CACnB;AAED;;GAEG;AACH,MAAM,WAAW,iBAAkB,SAAQ,SAAS;IACnD;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC;IACjB;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC;IAChB;;OAEG;IACH,SAAS,EAAE,OAAO,CAAC;IACnB;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC;CACnB"} node_modules/discord-api-types/payloads/v9/interactions.d.ts.map 0000664 00000001632 15114741631 0021012 0 ustar 00 {"version":3,"file":"interactions.d.ts","sourceRoot":"","sources":["interactions.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACX,kCAAkC,EAClC,qCAAqC,EACrC,gCAAgC,EAChC,MAAM,qCAAqC,CAAC;AAC7C,OAAO,KAAK,EACX,8CAA8C,EAC9C,iDAAiD,EACjD,4CAA4C,EAC5C,MAAM,8BAA8B,CAAC;AACtC,OAAO,KAAK,EACX,gCAAgC,EAChC,mCAAmC,EACnC,8BAA8B,EAC9B,MAAM,mCAAmC,CAAC;AAC3C,OAAO,KAAK,EACX,2BAA2B,EAC3B,8BAA8B,EAC9B,yBAAyB,EACzB,MAAM,6BAA6B,CAAC;AACrC,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAE/D,cAAc,qCAAqC,CAAC;AACpD,mBAAmB,8BAA8B,CAAC;AAClD,mBAAmB,sBAAsB,CAAC;AAC1C,mBAAmB,mCAAmC,CAAC;AACvD,mBAAmB,6BAA6B,CAAC;AACjD,mBAAmB,sBAAsB,CAAC;AAC1C,cAAc,2BAA2B,CAAC;AAE1C;;GAEG;AACH,MAAM,MAAM,cAAc,GACvB,4CAA4C,GAC5C,gCAAgC,GAChC,8BAA8B,GAC9B,yBAAyB,GACzB,kBAAkB,CAAC;AAEtB;;GAEG;AACH,MAAM,MAAM,gBAAgB,GACzB,8CAA8C,GAC9C,kCAAkC,GAClC,gCAAgC,GAChC,2BAA2B,CAAC;AAE/B;;GAEG;AACH,MAAM,MAAM,mBAAmB,GAC5B,iDAAiD,GACjD,qCAAqC,GACrC,mCAAmC,GACnC,8BAA8B,CAAC"} node_modules/discord-api-types/payloads/v9/auditLog.d.ts 0000664 00000066151 15114741631 0017313 0 ustar 00 /** * Types extracted from https://discord.com/developers/docs/resources/audit-log */ import type { Snowflake } from '../../globals'; import type { APIAutoModerationAction, APIAutoModerationRule, APIAutoModerationRuleTriggerMetadata, AutoModerationRuleEventType, AutoModerationRuleTriggerType } from './autoModeration'; import type { APIChannel, APIGuildForumDefaultReactionEmoji, APIGuildForumTag, APIOverwrite } from './channel'; import type { APIGuildIntegration, APIGuildIntegrationType, GuildDefaultMessageNotifications, GuildExplicitContentFilter, GuildMFALevel, GuildSystemChannelFlags, GuildVerificationLevel, IntegrationExpireBehavior } from './guild'; import type { APIGuildScheduledEvent, APIGuildScheduledEventRecurrenceRule, GuildScheduledEventEntityType, GuildScheduledEventStatus } from './guildScheduledEvent'; import type { APIApplicationCommand } from './interactions'; import type { APIRole } from './permissions'; import type { StageInstancePrivacyLevel } from './stageInstance'; import type { StickerFormatType } from './sticker'; import type { APIUser } from './user'; import type { APIWebhook } from './webhook'; /** * @see {@link https://discord.com/developers/docs/resources/audit-log#audit-log-object-audit-log-structure} */ export interface APIAuditLog { /** * List of application commands found in the audit log * * @see {@link https://discord.com/developers/docs/interactions/application-commands#application-command-object} */ application_commands: APIApplicationCommand[]; /** * Webhooks found in the audit log * * @see {@link https://discord.com/developers/docs/resources/webhook#webhook-object} */ webhooks: APIWebhook[]; /** * Users found in the audit log * * @see {@link https://discord.com/developers/docs/resources/user#user-object} */ users: APIUser[]; /** * Audit log entries * * @see {@link https://discord.com/developers/docs/resources/audit-log#audit-log-entry-object} */ audit_log_entries: APIAuditLogEntry[]; /** * List of auto moderation rules referenced in the audit log * * @see {@link https://discord.com/developers/docs/resources/auto-moderation#auto-moderation-rule-object} */ auto_moderation_rules: APIAutoModerationRule[]; /** * Partial integration objects * * @see {@link https://discord.com/developers/docs/resources/guild#integration-object} */ integrations: APIGuildIntegration[]; /** * Threads found in the audit log * * Threads referenced in THREAD_CREATE and THREAD_UPDATE events are included in the threads map, since archived threads might not be kept in memory by clients. * * @see {@link https://discord.com/developers/docs/resources/channel#channel-object} */ threads: APIChannel[]; /** * The guild scheduled events in the audit log * * @see {@link https://discord.com/developers/docs/resources/guild-scheduled-event#guild-scheduled-event-object} */ guild_scheduled_events: APIGuildScheduledEvent[]; } /** * @see {@link https://discord.com/developers/docs/resources/audit-log#audit-log-entry-object-audit-log-entry-structure} */ export interface APIAuditLogEntry { /** * ID of the affected entity (webhook, user, role, etc.) */ target_id: string | null; /** * Changes made to the `target_id` * * @see {@link https://discord.com/developers/docs/resources/audit-log#audit-log-change-object} */ changes?: APIAuditLogChange[]; /** * The user who made the changes * * This can be `null` in some cases (webhooks deleting themselves by using their own token, for example) */ user_id: Snowflake | null; /** * ID of the entry */ id: Snowflake; /** * Type of action that occurred * * @see {@link https://discord.com/developers/docs/resources/audit-log#audit-log-entry-object-audit-log-events} */ action_type: AuditLogEvent; /** * Additional info for certain action types * * @see {@link https://discord.com/developers/docs/resources/audit-log#audit-log-entry-object-optional-audit-entry-info} */ options?: APIAuditLogOptions; /** * The reason for the change (0-512 characters) */ reason?: string; } /** * @see {@link https://discord.com/developers/docs/resources/audit-log#audit-log-entry-object-audit-log-events} */ export declare enum AuditLogEvent { GuildUpdate = 1, ChannelCreate = 10, ChannelUpdate = 11, ChannelDelete = 12, ChannelOverwriteCreate = 13, ChannelOverwriteUpdate = 14, ChannelOverwriteDelete = 15, MemberKick = 20, MemberPrune = 21, MemberBanAdd = 22, MemberBanRemove = 23, MemberUpdate = 24, MemberRoleUpdate = 25, MemberMove = 26, MemberDisconnect = 27, BotAdd = 28, RoleCreate = 30, RoleUpdate = 31, RoleDelete = 32, InviteCreate = 40, InviteUpdate = 41, InviteDelete = 42, WebhookCreate = 50, WebhookUpdate = 51, WebhookDelete = 52, EmojiCreate = 60, EmojiUpdate = 61, EmojiDelete = 62, MessageDelete = 72, MessageBulkDelete = 73, MessagePin = 74, MessageUnpin = 75, IntegrationCreate = 80, IntegrationUpdate = 81, IntegrationDelete = 82, StageInstanceCreate = 83, StageInstanceUpdate = 84, StageInstanceDelete = 85, StickerCreate = 90, StickerUpdate = 91, StickerDelete = 92, GuildScheduledEventCreate = 100, GuildScheduledEventUpdate = 101, GuildScheduledEventDelete = 102, ThreadCreate = 110, ThreadUpdate = 111, ThreadDelete = 112, ApplicationCommandPermissionUpdate = 121, SoundboardSoundCreate = 130, SoundboardSoundUpdate = 131, SoundboardSoundDelete = 132, AutoModerationRuleCreate = 140, AutoModerationRuleUpdate = 141, AutoModerationRuleDelete = 142, AutoModerationBlockMessage = 143, AutoModerationFlagToChannel = 144, AutoModerationUserCommunicationDisabled = 145, CreatorMonetizationRequestCreated = 150, CreatorMonetizationTermsAccepted = 151, OnboardingPromptCreate = 163, OnboardingPromptUpdate = 164, OnboardingPromptDelete = 165, OnboardingCreate = 166, OnboardingUpdate = 167, HomeSettingsCreate = 190, HomeSettingsUpdate = 191 } /** * @see {@link https://discord.com/developers/docs/resources/audit-log#audit-log-entry-object-optional-audit-entry-info} */ export interface APIAuditLogOptions { /** * Name of the Auto Moderation rule that was triggered * * Present from: * - AUTO_MODERATION_BLOCK_MESSAGE * - AUTO_MODERATION_FLAG_TO_CHANNEL * - AUTO_MODERATION_USER_COMMUNICATION_DISABLED */ auto_moderation_rule_name?: string; /** * Trigger type of the Auto Moderation rule that was triggered * * Present from: * - AUTO_MODERATION_BLOCK_MESSAGE * - AUTO_MODERATION_FLAG_TO_CHANNEL * - AUTO_MODERATION_USER_COMMUNICATION_DISABLED */ auto_moderation_rule_trigger_type?: AuditLogRuleTriggerType; /** * Number of days after which inactive members were kicked * * Present from: * - MEMBER_PRUNE */ delete_member_days?: string; /** * Number of members removed by the prune * * Present from: * - MEMBER_PRUNE */ members_removed?: string; /** * Channel in which the entities were targeted * * Present from: * - MEMBER_MOVE * - MESSAGE_PIN * - MESSAGE_UNPIN * - MESSAGE_DELETE * - STAGE_INSTANCE_CREATE * - STAGE_INSTANCE_UPDATE * - STAGE_INSTANCE_DELETE * - AUTO_MODERATION_BLOCK_MESSAGE * - AUTO_MODERATION_FLAG_TO_CHANNEL * - AUTO_MODERATION_USER_COMMUNICATION_DISABLED */ channel_id?: Snowflake; /** * ID of the message that was targeted * * Present from: * - MESSAGE_PIN * - MESSAGE_UNPIN */ message_id?: Snowflake; /** * Number of entities that were targeted * * Present from: * - MESSAGE_DELETE * - MESSAGE_BULK_DELETE * - MEMBER_DISCONNECT * - MEMBER_MOVE */ count?: string; /** * ID of the overwritten entity * * Present from: * - CHANNEL_OVERWRITE_CREATE * - CHANNEL_OVERWRITE_UPDATE * - CHANNEL_OVERWRITE_DELETE */ id?: Snowflake; /** * Type of overwritten entity - "0" for "role" or "1" for "member" * * Present from: * - CHANNEL_OVERWRITE_CREATE * - CHANNEL_OVERWRITE_UPDATE * - CHANNEL_OVERWRITE_DELETE * * {@link AuditLogOptionsType} */ type?: AuditLogOptionsType; /** * Name of the role * * Present from: * - CHANNEL_OVERWRITE_CREATE * - CHANNEL_OVERWRITE_UPDATE * - CHANNEL_OVERWRITE_DELETE * * **Present only if the {@link APIAuditLogOptions."type" | entry type} is "0"** */ role_name?: string; /** * Type of integration which performed the action * * Present from: * - MEMBER_KICK * - MEMBER_ROLE_UPDATE */ integration_type?: APIGuildIntegrationType; } export declare enum AuditLogOptionsType { Role = "0", Member = "1" } export type AuditLogRuleTriggerType = `${AutoModerationRuleTriggerType}`; /** * @see {@link https://discord.com/developers/docs/resources/audit-log#audit-log-change-object-audit-log-change-structure} */ export type APIAuditLogChange = APIAuditLogChangeKey$Add | APIAuditLogChangeKey$Remove | APIAuditLogChangeKeyActions | APIAuditLogChangeKeyAFKChannelId | APIAuditLogChangeKeyAFKTimeout | APIAuditLogChangeKeyAllow | APIAuditLogChangeKeyApplicationId | APIAuditLogChangeKeyArchived | APIAuditLogChangeKeyAsset | APIAuditLogChangeKeyAutoArchiveDuration | APIAuditLogChangeKeyAvailable | APIAuditLogChangeKeyAvailableTags | APIAuditLogChangeKeyAvatarHash | APIAuditLogChangeKeyBannerHash | APIAuditLogChangeKeyBitrate | APIAuditLogChangeKeyChannelId | APIAuditLogChangeKeyCode | APIAuditLogChangeKeyColor | APIAuditLogChangeKeyCommunicationDisabledUntil | APIAuditLogChangeKeyDeaf | APIAuditLogChangeKeyDefaultAutoArchiveDuration | APIAuditLogChangeKeyDefaultMessageNotifications | APIAuditLogChangeKeyDefaultReactionEmoji | APIAuditLogChangeKeyDefaultThreadRateLimitPerUser | APIAuditLogChangeKeyDeny | APIAuditLogChangeKeyDescription | APIAuditLogChangeKeyDiscoverySplashHash | APIAuditLogChangeKeyEmojiId | APIAuditLogChangeKeyEmojiName | APIAuditLogChangeKeyEnabled | APIAuditLogChangeKeyEnableEmoticons | APIAuditLogChangeKeyEntityType | APIAuditLogChangeKeyEventType | APIAuditLogChangeKeyExemptChannels | APIAuditLogChangeKeyExemptRoles | APIAuditLogChangeKeyExpireBehavior | APIAuditLogChangeKeyExpireGracePeriod | APIAuditLogChangeKeyExplicitContentFilter | APIAuditLogChangeKeyFlags | APIAuditLogChangeKeyFormatType | APIAuditLogChangeKeyGuildId | APIAuditLogChangeKeyHoist | APIAuditLogChangeKeyIconHash | APIAuditLogChangeKeyId | APIAuditLogChangeKeyImageHash | APIAuditLogChangeKeyInviterId | APIAuditLogChangeKeyLocation | APIAuditLogChangeKeyLocked | APIAuditLogChangeKeyMaxAge | APIAuditLogChangeKeyMaxUses | APIAuditLogChangeKeyMentionable | APIAuditLogChangeKeyMFALevel | APIAuditLogChangeKeyMute | APIAuditLogChangeKeyName | APIAuditLogChangeKeyNick | APIAuditLogChangeKeyNSFW | APIAuditLogChangeKeyOwnerId | APIAuditLogChangeKeyPermissionOverwrites | APIAuditLogChangeKeyPermissions | APIAuditLogChangeKeyPosition | APIAuditLogChangeKeyPreferredLocale | APIAuditLogChangeKeyPremiumProgressBarEnabled | APIAuditLogChangeKeyPrivacyLevel | APIAuditLogChangeKeyPruneDeleteDays | APIAuditLogChangeKeyPublicUpdatesChannelId | APIAuditLogChangeKeyRateLimitPerUser | APIAuditLogChangeKeyRecurrenceRule | APIAuditLogChangeKeyRegion | APIAuditLogChangeKeyRulesChannelId | APIAuditLogChangeKeySoundId | APIAuditLogChangeKeySplashHash | APIAuditLogChangeKeyStatus | APIAuditLogChangeKeySystemChannelFlags | APIAuditLogChangeKeySystemChannelId | APIAuditLogChangeKeyTags | APIAuditLogChangeKeyTemporary | APIAuditLogChangeKeyTopic | APIAuditLogChangeKeyTriggerMetadata | APIAuditLogChangeKeyTriggerType | APIAuditLogChangeKeyType | APIAuditLogChangeKeyUserId | APIAuditLogChangeKeyUserLimit | APIAuditLogChangeKeyUses | APIAuditLogChangeKeyVanityURLCode | APIAuditLogChangeKeyVerificationLevel | APIAuditLogChangeKeyVolume | APIAuditLogChangeKeyWidgetChannelId | APIAuditLogChangeKeyWidgetEnabled; /** * Returned when an entity's name is changed */ export type APIAuditLogChangeKeyName = APIAuditLogChangeData<'name', string>; /** * Returned when a guild's or sticker's or guild scheduled event's description is changed */ export type APIAuditLogChangeKeyDescription = APIAuditLogChangeData<'description', string>; /** * Returned when a guild's icon is changed */ export type APIAuditLogChangeKeyIconHash = APIAuditLogChangeData<'icon_hash', string>; /** * Returned when a guild's scheduled event's cover image is changed */ export type APIAuditLogChangeKeyImageHash = APIAuditLogChangeData<'image_hash', string>; /** * Returned when a guild's splash is changed */ export type APIAuditLogChangeKeySplashHash = APIAuditLogChangeData<'splash_hash', string>; /** * Returned when a guild's discovery splash is changed */ export type APIAuditLogChangeKeyDiscoverySplashHash = APIAuditLogChangeData<'discovery_splash_hash', string>; /** * Returned when a guild's banner hash is changed */ export type APIAuditLogChangeKeyBannerHash = APIAuditLogChangeData<'banner_hash', string>; /** * Returned when a guild's owner_id is changed */ export type APIAuditLogChangeKeyOwnerId = APIAuditLogChangeData<'owner_id', Snowflake>; /** * Returned when a guild's region is changed */ export type APIAuditLogChangeKeyRegion = APIAuditLogChangeData<'region', string>; /** * Returned when a guild's preferred_locale is changed */ export type APIAuditLogChangeKeyPreferredLocale = APIAuditLogChangeData<'preferred_locale', string>; /** * Returned when a guild's afk_channel_id is changed */ export type APIAuditLogChangeKeyAFKChannelId = APIAuditLogChangeData<'afk_channel_id', Snowflake>; /** * Returned when a guild's afk_timeout is changed */ export type APIAuditLogChangeKeyAFKTimeout = APIAuditLogChangeData<'afk_timeout', number>; /** * Returned when a guild's rules_channel_id is changed */ export type APIAuditLogChangeKeyRulesChannelId = APIAuditLogChangeData<'rules_channel_id', string>; /** * Returned when a guild's public_updates_channel_id is changed */ export type APIAuditLogChangeKeyPublicUpdatesChannelId = APIAuditLogChangeData<'public_updates_channel_id', string>; /** * Returned when a guild's safety_alerts_channel_id is changed */ export type APIAuditLogChangeKeySafetyAlertsChannelId = APIAuditLogChangeData<'safety_alerts_channel_id', string>; /** * Returned when a guild's mfa_level is changed */ export type APIAuditLogChangeKeyMFALevel = APIAuditLogChangeData<'mfa_level', GuildMFALevel>; /** * Returned when a guild's verification_level is changed */ export type APIAuditLogChangeKeyVerificationLevel = APIAuditLogChangeData<'verification_level', GuildVerificationLevel>; /** * Returned when a guild's explicit_content_filter is changed */ export type APIAuditLogChangeKeyExplicitContentFilter = APIAuditLogChangeData<'explicit_content_filter', GuildExplicitContentFilter>; /** * Returned when a guild's default_message_notifications is changed */ export type APIAuditLogChangeKeyDefaultMessageNotifications = APIAuditLogChangeData<'default_message_notifications', GuildDefaultMessageNotifications>; /** * Returned when a guild's vanity_url_code is changed */ export type APIAuditLogChangeKeyVanityURLCode = APIAuditLogChangeData<'vanity_url_code', string>; /** * Returned when a guild's boost progress bar is enabled */ export type APIAuditLogChangeKeyPremiumProgressBarEnabled = APIAuditLogChangeData<'premium_progress_bar_enabled', boolean>; /** * Returned when new role(s) are added */ export type APIAuditLogChangeKey$Add = APIAuditLogChangeData<'$add', Pick<APIRole, 'id' | 'name'>[]>; /** * Returned when role(s) are removed */ export type APIAuditLogChangeKey$Remove = APIAuditLogChangeData<'$remove', Pick<APIRole, 'id' | 'name'>[]>; /** * Returned when there is a change in number of days after which inactive and role-unassigned members are kicked */ export type APIAuditLogChangeKeyPruneDeleteDays = APIAuditLogChangeData<'prune_delete_days', number>; /** * Returned when a guild's widget is enabled */ export type APIAuditLogChangeKeyWidgetEnabled = APIAuditLogChangeData<'widget_enabled', boolean>; /** * Returned when a guild's widget_channel_id is changed */ export type APIAuditLogChangeKeyWidgetChannelId = APIAuditLogChangeData<'widget_channel_id', Snowflake>; /** * Returned when a guild's system_channel_flags is changed */ export type APIAuditLogChangeKeySystemChannelFlags = APIAuditLogChangeData<'system_channel_flags', GuildSystemChannelFlags>; /** * Returned when a guild's system_channel_id is changed */ export type APIAuditLogChangeKeySystemChannelId = APIAuditLogChangeData<'system_channel_id', Snowflake>; /** * Returned when a channel's position is changed */ export type APIAuditLogChangeKeyPosition = APIAuditLogChangeData<'position', number>; /** * Returned when a channel's topic is changed */ export type APIAuditLogChangeKeyTopic = APIAuditLogChangeData<'topic', string>; /** * Returned when a voice channel's bitrate is changed */ export type APIAuditLogChangeKeyBitrate = APIAuditLogChangeData<'bitrate', number>; /** * Returned when a channel's permission overwrites is changed */ export type APIAuditLogChangeKeyPermissionOverwrites = APIAuditLogChangeData<'permission_overwrites', APIOverwrite[]>; /** * Returned when a channel's NSFW restriction is changed */ export type APIAuditLogChangeKeyNSFW = APIAuditLogChangeData<'nsfw', boolean>; /** * The application ID of the added or removed Webhook or Bot */ export type APIAuditLogChangeKeyApplicationId = APIAuditLogChangeData<'application_id', Snowflake>; /** * Returned when a channel's amount of seconds a user has to wait before sending another message * is changed */ export type APIAuditLogChangeKeyRateLimitPerUser = APIAuditLogChangeData<'rate_limit_per_user', number>; /** * Returned when a guild scheduled event's recurrence_rule is changed */ export type APIAuditLogChangeKeyRecurrenceRule = APIAuditLogChangeData<'recurrence_rule', APIGuildScheduledEventRecurrenceRule>; /** * Returned when a permission bitfield is changed */ export type APIAuditLogChangeKeyPermissions = APIAuditLogChangeData<'permissions', string>; /** * Returned when a role's color is changed */ export type APIAuditLogChangeKeyColor = APIAuditLogChangeData<'color', number>; /** * Represents a change where the key is a snowflake. * Currently, the only known instance of this is returned when permissions for a command were updated */ export type APIAuditLogChangeKeySnowflake = APIAuditLogChangeData<Snowflake, unknown>; /** * Returned when a role's hoist status is changed */ export type APIAuditLogChangeKeyHoist = APIAuditLogChangeData<'hoist', boolean>; /** * Returned when a role's mentionable status is changed */ export type APIAuditLogChangeKeyMentionable = APIAuditLogChangeData<'mentionable', boolean>; /** * Returned when an overwrite's allowed permissions bitfield is changed */ export type APIAuditLogChangeKeyAllow = APIAuditLogChangeData<'allow', string>; /** * Returned when an overwrite's denied permissions bitfield is changed */ export type APIAuditLogChangeKeyDeny = APIAuditLogChangeData<'deny', string>; /** * Returned when an invite's code is changed */ export type APIAuditLogChangeKeyCode = APIAuditLogChangeData<'code', string>; /** * Returned when an invite's or guild scheduled event's channel_id is changed */ export type APIAuditLogChangeKeyChannelId = APIAuditLogChangeData<'channel_id', Snowflake>; /** * Returned when an invite's inviter_id is changed */ export type APIAuditLogChangeKeyInviterId = APIAuditLogChangeData<'inviter_id', Snowflake>; /** * Returned when an invite's max_uses is changed */ export type APIAuditLogChangeKeyMaxUses = APIAuditLogChangeData<'max_uses', number>; /** * Returned when an invite's uses is changed */ export type APIAuditLogChangeKeyUses = APIAuditLogChangeData<'uses', number>; /** * Returned when an invite's max_age is changed */ export type APIAuditLogChangeKeyMaxAge = APIAuditLogChangeData<'max_age', number>; /** * Returned when an invite's temporary status is changed */ export type APIAuditLogChangeKeyTemporary = APIAuditLogChangeData<'temporary', boolean>; /** * Returned when a user's deaf status is changed */ export type APIAuditLogChangeKeyDeaf = APIAuditLogChangeData<'deaf', boolean>; /** * Returned when a user's mute status is changed */ export type APIAuditLogChangeKeyMute = APIAuditLogChangeData<'mute', boolean>; /** * Returned when a user's nick is changed */ export type APIAuditLogChangeKeyNick = APIAuditLogChangeData<'nick', string>; /** * Returned when a user's avatar_hash is changed */ export type APIAuditLogChangeKeyAvatarHash = APIAuditLogChangeData<'avatar_hash', string>; /** * The ID of the changed entity - sometimes used in conjunction with other keys */ export type APIAuditLogChangeKeyId = APIAuditLogChangeData<'id', Snowflake>; /** * The type of entity created */ export type APIAuditLogChangeKeyType = APIAuditLogChangeData<'type', number | string>; /** * Returned when an integration's enable_emoticons is changed */ export type APIAuditLogChangeKeyEnableEmoticons = APIAuditLogChangeData<'enable_emoticons', boolean>; /** * Returned when an integration's expire_behavior is changed */ export type APIAuditLogChangeKeyExpireBehavior = APIAuditLogChangeData<'expire_behavior', IntegrationExpireBehavior>; /** * Returned when an integration's expire_grace_period is changed */ export type APIAuditLogChangeKeyExpireGracePeriod = APIAuditLogChangeData<'expire_grace_period', number>; /** * Returned when a voice channel's user_limit is changed */ export type APIAuditLogChangeKeyUserLimit = APIAuditLogChangeData<'user_limit', number>; /** * Returned when privacy level of a stage instance or guild scheduled event is changed */ export type APIAuditLogChangeKeyPrivacyLevel = APIAuditLogChangeData<'privacy_level', StageInstancePrivacyLevel>; /** * Returned when a sticker's related emoji is changed */ export type APIAuditLogChangeKeyTags = APIAuditLogChangeData<'tags', string>; /** * Returned when a sticker's format_type is changed */ export type APIAuditLogChangeKeyFormatType = APIAuditLogChangeData<'format_type', StickerFormatType>; /** * Empty string */ export type APIAuditLogChangeKeyAsset = APIAuditLogChangeData<'asset', ''>; /** * Returned when a sticker's availability is changed */ export type APIAuditLogChangeKeyAvailable = APIAuditLogChangeData<'available', boolean>; /** * Returned when a sticker's guild_id is changed */ export type APIAuditLogChangeKeyGuildId = APIAuditLogChangeData<'guild_id', Snowflake>; /** * Returned when a thread's archive status is changed */ export type APIAuditLogChangeKeyArchived = APIAuditLogChangeData<'archived', boolean>; /** * Returned when a thread's lock status is changed */ export type APIAuditLogChangeKeyLocked = APIAuditLogChangeData<'locked', boolean>; /** * Returned when a thread's auto archive duration is changed */ export type APIAuditLogChangeKeyAutoArchiveDuration = APIAuditLogChangeData<'auto_archive_duration', number>; /** * Returned when a channel's default auto archive duration for newly created threads is changed */ export type APIAuditLogChangeKeyDefaultAutoArchiveDuration = APIAuditLogChangeData<'default_auto_archive_duration', number>; /** * Returned when entity type of a guild scheduled event is changed */ export type APIAuditLogChangeKeyEntityType = APIAuditLogChangeData<'entity_type', GuildScheduledEventEntityType>; /** * Returned when status of a guild scheduled event is changed */ export type APIAuditLogChangeKeyStatus = APIAuditLogChangeData<'status', GuildScheduledEventStatus>; /** * Returned when location of a guild scheduled event is changed */ export type APIAuditLogChangeKeyLocation = APIAuditLogChangeData<'location', string>; /** * Returned when a user's timeout is changed */ export type APIAuditLogChangeKeyCommunicationDisabledUntil = APIAuditLogChangeData<'communication_disabled_until', string>; /** * Returned when an auto moderation rule's trigger type is changed (only in rule creation or deletion) */ export type APIAuditLogChangeKeyTriggerType = APIAuditLogChangeData<'trigger_type', AutoModerationRuleTriggerType>; /** * Returned when an auto moderation rule's event type is changed */ export type APIAuditLogChangeKeyEventType = APIAuditLogChangeData<'event_type', AutoModerationRuleEventType>; /** * Returned when an auto moderation rule's trigger metadata is changed */ export type APIAuditLogChangeKeyTriggerMetadata = APIAuditLogChangeData<'trigger_metadata', APIAutoModerationRuleTriggerMetadata>; /** * Returned when an auto moderation rule's actions is changed */ export type APIAuditLogChangeKeyActions = APIAuditLogChangeData<'actions', APIAutoModerationAction[]>; /** * Returned when an auto moderation rule's enabled status is changed */ export type APIAuditLogChangeKeyEnabled = APIAuditLogChangeData<'enabled', boolean>; /** * Returned when an auto moderation rule's exempt roles is changed */ export type APIAuditLogChangeKeyExemptRoles = APIAuditLogChangeData<'exempt_roles', Snowflake[]>; /** * Returned when an auto moderation rule's exempt channels is changed */ export type APIAuditLogChangeKeyExemptChannels = APIAuditLogChangeData<'exempt_channels', Snowflake[]>; /** * Returned when a guild forum's available tags gets changed */ export type APIAuditLogChangeKeyAvailableTags = APIAuditLogChangeData<'available_tags', APIGuildForumTag[]>; /** * Returned when a guild forum's default reaction emoji gets changed */ export type APIAuditLogChangeKeyDefaultReactionEmoji = APIAuditLogChangeData<'default_reaction_emoji', APIGuildForumDefaultReactionEmoji>; /** * Returned when a channel flag gets changed */ export type APIAuditLogChangeKeyFlags = APIAuditLogChangeData<'flags', number>; /** * Returned when a thread's amount of seconds a user has to wait before creating another thread * gets changed */ export type APIAuditLogChangeKeyDefaultThreadRateLimitPerUser = APIAuditLogChangeData<'default_thread_rate_limit_per_user', number>; /** * Returned when a soundboard is create or deleted */ export type APIAuditLogChangeKeySoundId = APIAuditLogChangeData<'sound_id', Snowflake>; /** * Returned when a soundboard's volume is changed */ export type APIAuditLogChangeKeyVolume = APIAuditLogChangeData<'volume', number>; /** * Returned when a soundboard's custom emoji is changed */ export type APIAuditLogChangeKeyEmojiId = APIAuditLogChangeData<'emoji_id', Snowflake>; /** * Returned when a soundboard's unicode emoji is changed */ export type APIAuditLogChangeKeyEmojiName = APIAuditLogChangeData<'emoji_name', string>; /** * Returned when a sounboard is created */ export type APIAuditLogChangeKeyUserId = APIAuditLogChangeData<'user_id', Snowflake>; export interface APIAuditLogChangeData<K extends string, D> { key: K; /** * The new value * * If `new_value` is not present in the change object, while `old_value` is, * that means the property that was changed has been reset, or set to `null` */ new_value?: D; old_value?: D; } //# sourceMappingURL=auditLog.d.ts.map node_modules/discord-api-types/payloads/v9/auditLog.d.ts.map 0000664 00000027067 15114741631 0020072 0 ustar 00 {"version":3,"file":"auditLog.d.ts","sourceRoot":"","sources":["auditLog.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC/C,OAAO,KAAK,EACX,uBAAuB,EACvB,qBAAqB,EACrB,oCAAoC,EACpC,2BAA2B,EAC3B,6BAA6B,EAC7B,MAAM,kBAAkB,CAAC;AAC1B,OAAO,KAAK,EAAE,UAAU,EAAE,iCAAiC,EAAE,gBAAgB,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AAC/G,OAAO,KAAK,EACX,mBAAmB,EACnB,uBAAuB,EACvB,gCAAgC,EAChC,0BAA0B,EAC1B,aAAa,EACb,uBAAuB,EACvB,sBAAsB,EACtB,yBAAyB,EACzB,MAAM,SAAS,CAAC;AACjB,OAAO,KAAK,EACX,sBAAsB,EACtB,oCAAoC,EACpC,6BAA6B,EAC7B,yBAAyB,EACzB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,KAAK,EAAE,qBA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AAwC,GAAG,qBAAqB,CAC3E,wBAAwB,EACxB,iCAAiC,CACjC,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,yBAAyB,GAAG,qBAAqB,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC;AAE/E;;;GAGG;AACH,MAAM,MAAM,iDAAiD,GAAG,qBAAqB,CACpF,oCAAoC,EACpC,MAAM,CACN,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,2BAA2B,GAAG,qBAAqB,CAAC,UAAU,EAAE,SAAS,CAAC,CAAC;AAEvF;;GAEG;AACH,MAAM,MAAM,0BAA0B,GAAG,qBAAqB,CAAC,QAAQ,EAAE,MAAM,CAAC,CAAC;AAEjF;;GAEG;AACH,MAAM,MAAM,2BAA2B,GAAG,qBAAqB,CAAC,UAAU,EAAE,SAAS,CAAC,CAAC;AAEvF;;GAEG;AACH,MAAM,MAAM,6BAA6B,GAAG,qBAAqB,CAAC,YAAY,EAAE,MAAM,CAAC,CAAC;AAExF;;GAEG;AACH,MAAM,MAAM,0BAA0B,GAAG,qBAAqB,CAAC,SAAS,EAAE,SAAS,CAAC,CAAC;AAErF,MAAM,WAAW,qBAAqB,CAAC,CAAC,SAAS,MAAM,EAAE,CAAC;IACzD,GAAG,EAAE,CAAC,CAAC;IACP;;;;;OAKG;IACH,SAAS,CAAC,EAAE,CAAC,CAAC;IACd,SAAS,CAAC,EAAE,CAAC,CAAC;CACd"} node_modules/discord-api-types/payloads/v9/webhook.d.ts.map 0000664 00000004350 15114741631 0017746 0 ustar 00 {"version":3,"file":"webhook.d.ts","sourceRoot":"","sources":["webhook.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC/C,OAAO,KAAK,EACX,cAAc,EACd,QAAQ,EACR,OAAO,EACP,qBAAqB,EACrB,0BAA0B,EAC1B,YAAY,EACZ,uBAAuB,EACvB,MAAM,SAAS,CAAC;AAEjB;;GAEG;AACH,MAAM,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C;IACvB;;OAEG;IACH,KAAK,CAAC,EAAE,QAAQ,CAAC;CACjB;AAED,MAAM,WAAW,0CAA0C;IAC1D;;OAEG;IACH,IAAI,EAAE,OAAO,CAAC;CACd;AAED,MAAM,MAAM,oCAAoC,GAAG,cAAc,CAAC;AAElE,MAAM,MAAM,sCAAsC,GAAG,KAAK,CAAC;AAE3D,MAAM,WAAW,mBAAmB,CAAC,IAAI,SAAS,sBAAsB,EAAE,KAAK;IAC9E;;OAEG;IACH,OAAO,EAAE,CAAC,CAAC;IACX;;OAEG;IACH,cAAc,EAAE,SAAS,CAAC;IAC1B;;OAEG;IACH,IAAI,EAAE,IAAI,CAAC;IACX;;OAEG;IACH,KAAK,EAAE,KAAK,CAAC;CACb;AAED;;GAEG;AACH,oBAAY,sBAAsB;IACjC;;OAEG;IACH,IAAI,IAAA;IACJ;;OAEG;IACH,KAAK,IAAA;CACL;AAED,MAAM,WAAW,wBAAwB,CAAC,IAAI,SAAS,2BAA2B,EAAE,IAAI;IACvF;;OAEG;IACH,IAAI,EAAE,IAAI,CAAC;IACX;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;IAClB;;OAEG;IACH,IAAI,EAAE,IAAI,CAAC;CACX;AAED;;GAEG;AACH,oBAAY,2BAA2B;IACtC;;OAEG;IACH,qBAAqB,2BAA2B;IAChD;;OAEG;IACH,uBAAuB,6BAA6B;IACpD;;OAEG;IACH,iBAAiB,uBAAuB;IACxC;;OAEG;IACH,mBAAmB,0BAA0B;CAC7C;AAED;;GAEG;AACH,oBAAY,WAAW;IACtB;;OAEG;IACH,QAAQ,IAAI;IACZ;;OAEG;IACH,eAAe,IAAA;IACf;;OAEG;IACH,WAAW,IAAA;CACX"} node_modules/discord-api-types/payloads/v9/monetization.d.ts.map 0000664 00000003611 15114741631 0021027 0 ustar 00 {"version":3,"file":"monetization.d.ts","sourceRoot":"","sources":["monetization.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,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;;GAEG;AACH,oBAAY,OAAO;IAClB;;OAEG;IACH,OAAO,IAAI;IACX;;OAEG;IACH,UAAU,IAAI;IACd;;OAEG;IACH,YAAY,IAAI;IAChB;;OAEG;IACH,iBAAiB,IAAI;CACrB;AAED;;GAEG;AACH,MAAM,WAAW,eAAe;IAC/B;;OAEG;IACH,EAAE,EAAE,SAAS,CAAC;IACd;;OAEG;IACH,OAAO,EAAE,SAAS,CAAC;IACnB;;OAEG;IACH,OAAO,EAAE,SAAS,EAAE,CAAC;IACrB;;OAEG;IACH,eAAe,EAAE,SAAS,EAAE,CAAC;IAC7B;;OAEG;IACH,eAAe,EAAE,SAAS,EAAE,GAAG,IAAI,CAAC;IACpC;;OAEG;IACH,oBAAoB,EAAE,MAAM,CAAC;IAC7B;;OAEG;IACH,kBAAkB,EAAE,MAAM,CAAC;IAC3B;;OAEG;IACH,MAAM,EAAE,kBAAkB,CAAC;IAC3B;;OAEG;IACH,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;CACjB;AAED;;GAEG;AACH,oBAAY,kBAAkB;IAC7B;;OAEG;IACH,MAAM,IAAA;IACN;;OAEG;IACH,MAAM,IAAA;IACN;;OAEG;IACH,QAAQ,IAAA;CACR"} node_modules/discord-api-types/payloads/v9/stageInstance.js 0000664 00000001621 15114741631 0020066 0 ustar 00 "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.StageInstancePrivacyLevel = void 0; /** * @see {@link https://discord.com/developers/docs/resources/stage-instance#stage-instance-object-privacy-level} */ var StageInstancePrivacyLevel; (function (StageInstancePrivacyLevel) { /** * The stage instance is visible publicly, such as on stage discovery * * @deprecated * {@link https://github.com/discord/discord-api-docs/pull/4296 | discord-api-docs#4296} */ StageInstancePrivacyLevel[StageInstancePrivacyLevel["Public"] = 1] = "Public"; /** * The stage instance is visible to only guild members */ StageInstancePrivacyLevel[StageInstancePrivacyLevel["GuildOnly"] = 2] = "GuildOnly"; })(StageInstancePrivacyLevel || (exports.StageInstancePrivacyLevel = StageInstancePrivacyLevel = {})); //# sourceMappingURL=stageInstance.js.map node_modules/discord-api-types/payloads/v9/gateway.js.map 0000664 00000001757 15114741631 0017525 0 ustar 00 {"version":3,"file":"gateway.js","sourceRoot":"","sources":["gateway.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;;AAkGH;;GAEG;AACH,IAAY,oBASX;AATD,WAAY,oBAAoB;IAC/B,yCAAiB,CAAA;IACjB,4CAAoB,CAAA;IACpB,qCAAa,CAAA;IACb;;OAEG;IACH,+CAAuB,CAAA;IACvB,2CAAmB,CAAA;AACpB,CAAC,EATW,oBAAoB,oCAApB,oBAAoB,QAS/B;AA+GD;;;GAGG;AACH,IAAY,gBASX;AATD,WAAY,gBAAgB;IAC3B,uCAAmB,CAAA;IACnB,iCAAa,CAAA;IACb,uCAAmB,CAAA;IACnB,+BAAW,CAAA;IACX,uCAAmB,CAAA;IACnB,yCAAqB,CAAA;IACrB,+BAAW,CAAA;IACX,+BAAW,CAAA;AACZ,CAAC,EATW,gBAAgB,gCAAhB,gBAAgB,QAS3B;AAED;;GAEG;AACH,IAAY,YAyBX;AAzBD,WAAY,YAAY;IACvB;;OAEG;IACH,qDAAO,CAAA;IACP;;OAEG;IACH,yDAAS,CAAA;IACT;;OAEG;IACH,yDAAS,CAAA;IACT;;OAEG;IACH,uDAAQ,CAAA;IACR;;OAEG;IACH,mDAAM,CAAA;IACN;;OAEG;IACH,yDAAS,CAAA;AACV,CAAC,EAzBW,YAAY,4BAAZ,YAAY,QAyBvB;AA+CD;;GAEG;AACH,IAAY,aAUX;AAVD,WAAY,aAAa;IACxB,yDAAiB,CAAA;IACjB,iDAAa,CAAA;IACb,yDAAiB,CAAA;IACjB,+DAAoB,CAAA;IACpB,kDAAa,CAAA;IACb,kDAAa,CAAA;IACb,gFAA4B,CAAA;IAC5B,2FAAiC,CAAA;IACjC,2DAAiB,CAAA;AAClB,CAAC,EAVW,aAAa,6BAAb,aAAa,QAUxB"} node_modules/discord-api-types/payloads/v9/soundboard.d.ts.map 0000664 00000001073 15114741631 0020447 0 ustar 00 {"version":3,"file":"soundboard.d.ts","sourceRoot":"","sources":["soundboard.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC/C,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,QAAQ,CAAC;AAEtC;;GAEG;AACH,MAAM,WAAW,kBAAkB;IAClC;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;OAEG;IACH,QAAQ,EAAE,SAAS,CAAC;IACpB;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,QAAQ,EAAE,SAAS,GAAG,IAAI,CAAC;IAC3B;;OAEG;IACH,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B;;OAEG;IACH,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB;;OAEG;IACH,SAAS,EAAE,OAAO,CAAC;IACnB;;OAEG;IACH,IAAI,CAAC,EAAE,OAAO,CAAC;CACf"} node_modules/discord-api-types/payloads/v9/application.d.ts 0000664 00000026756 15114741631 0020055 0 ustar 00 /** * Types extracted from https://discord.com/developers/docs/resources/application */ import type { Permissions, Snowflake } from '../../globals'; import type { LocalizationMap } from '../common'; import type { APIPartialGuild } from './guild'; import type { ApplicationIntegrationType } from './interactions'; import type { OAuth2Scopes } from './oauth2'; import type { APITeam } from './teams'; import type { APIUser } from './user'; import type { ApplicationWebhookEventType } from './webhook'; /** * @see {@link https://discord.com/developers/docs/resources/application#application-object} */ export interface APIApplication { /** * The id of the app */ id: Snowflake; /** * The name of the app */ name: string; /** * The icon hash of the app */ icon: string | null; /** * The description of the app */ description: string; /** * An array of rpc origin urls, if rpc is enabled */ rpc_origins?: string[]; /** * When `false` only app owner can join the app's bot to guilds */ bot_public: boolean; /** * When `true` the app's bot will only join upon completion of the full oauth2 code grant flow */ bot_require_code_grant: boolean; /** * Partial user object for the bot user associated with the application */ bot?: APIUser; /** * The url of the application's terms of service */ terms_of_service_url?: string; /** * The url of the application's privacy policy */ privacy_policy_url?: string; /** * Partial user object containing info on the owner of the application * * @see {@link https://discord.com/developers/docs/resources/user#user-object} */ owner?: APIUser; /** * An empty string * * @deprecated This field will be removed in v11 * @unstable This field is no longer documented by Discord and will be removed in v11 */ summary: ''; /** * The hexadecimal encoded key for verification in interactions and the GameSDK's GetTicket function * * @see {@link https://discord.com/developers/docs/game-sdk/applications#getticket} */ verify_key: string; /** * The team this application belongs to * * @see {@link https://discord.com/developers/docs/topics/teams#data-models-team-object} */ team: APITeam | null; /** * If this application is a game sold on Discord, this field will be the guild to which it has been linked */ guild_id?: Snowflake; /** * A partial object of the associated guild */ guild?: APIPartialGuild; /** * If this application is a game sold on Discord, this field will be the id of the "Game SKU" that is created, if exists */ primary_sku_id?: Snowflake; /** * If this application is a game sold on Discord, this field will be the URL slug that links to the store page */ slug?: string; /** * If this application is a game sold on Discord, this field will be the hash of the image on store embeds */ cover_image?: string; /** * The application's public flags * * @see {@link https://discord.com/developers/docs/resources/application#application-object-application-flags} */ flags: ApplicationFlags; /** * Approximate count of guilds the application has been added to */ approximate_guild_count?: number; /** * Approximate count of users that have installed the app (authorized with `application.commands` as a scope) */ approximate_user_install_count?: number; /** * Approximate count of users that have OAuth2 authorizations for the app */ approximate_user_authorization_count?: number; /** * Array of redirect URIs for the application */ redirect_uris?: string[]; /** * The interactions endpoint URL for the application */ interactions_endpoint_url?: string | null; /** * The application's role connection verification entry point, * which when configured will render the app as a verification method in the guild role verification configuration */ role_connections_verification_url?: string | null; /** * Up to 5 tags of max 20 characters each describing the content and functionality of the application */ tags?: [string, string?, string?, string?, string?]; /** * Settings for the application's default in-app authorization link, if enabled */ install_params?: APIApplicationInstallParams; /** * Default scopes and permissions for each supported installation context. Value for each key is an integration type configuration object */ integration_types_config?: APIApplicationIntegrationTypesConfigMap; /** * The application's default custom authorization link, if enabled */ custom_install_url?: string; /** * Event webhook URL for the app to receive webhook events */ event_webhooks_url?: string | null; /** * If webhook events are enabled for the app */ event_webhooks_status: ApplicationWebhookEventStatus; /** * List of webhook event types the app subscribes to */ event_webhooks_types?: ApplicationWebhookEventType[]; } export interface APIApplicationInstallParams { scopes: OAuth2Scopes[]; permissions: Permissions; } export interface APIApplicationIntegrationTypeConfiguration { oauth2_install_params?: APIApplicationInstallParams; } export type APIApplicationIntegrationTypesConfigMap = { [key in ApplicationIntegrationType]?: APIApplicationIntegrationTypeConfiguration; }; /** * @see {@link https://discord.com/developers/docs/resources/application#application-object-application-flags} */ export declare enum ApplicationFlags { /** * @unstable This application flag is currently not documented by Discord but has a known value which we will try to keep up to date. */ EmbeddedReleased = 2, /** * @unstable This application flag is currently not documented by Discord but has a known value which we will try to keep up to date. */ ManagedEmoji = 4, /** * @unstable This application flag is currently not documented by Discord but has a known value which we will try to keep up to date. */ EmbeddedIAP = 8, /** * @unstable This application flag is currently not documented by Discord but has a known value which we will try to keep up to date. */ GroupDMCreate = 16, /** * Indicates if an app uses the Auto Moderation API */ ApplicationAutoModerationRuleCreateBadge = 64, /** * @unstable This application flag is currently not documented by Discord but has a known value which we will try to keep up to date. */ RPCHasConnected = 2048, /** * Intent required for bots in 100 or more servers to receive `presence_update` events */ GatewayPresence = 4096, /** * Intent required for bots in under 100 servers to receive `presence_update` events, found in Bot Settings */ GatewayPresenceLimited = 8192, /** * Intent required for bots in 100 or more servers to receive member-related events like `guild_member_add`. * * @see List of member-related events {@link https://discord.com/developers/docs/topics/gateway#list-of-intents | under `GUILD_MEMBERS`} */ GatewayGuildMembers = 16384, /** * Intent required for bots in under 100 servers to receive member-related events like `guild_member_add`, found in Bot Settings. * * @see List of member-related events {@link https://discord.com/developers/docs/topics/gateway#list-of-intents | under `GUILD_MEMBERS`} */ GatewayGuildMembersLimited = 32768, /** * Indicates unusual growth of an app that prevents verification */ VerificationPendingGuildLimit = 65536, /** * Indicates if an app is embedded within the Discord client (currently unavailable publicly) */ Embedded = 131072, /** * Intent required for bots in 100 or more servers to receive {@link https://support-dev.discord.com/hc/articles/6207308062871 | message content} */ GatewayMessageContent = 262144, /** * Intent required for bots in under 100 servers to receive {@link https://support-dev.discord.com/hc/articles/6207308062871 | message content}, * found in Bot Settings */ GatewayMessageContentLimited = 524288, /** * @unstable This application flag is currently not documented by Discord but has a known value which we will try to keep up to date. */ EmbeddedFirstParty = 1048576, /** * Indicates if an app has registered global {@link https://discord.com/developers/docs/interactions/application-commands | application commands} */ ApplicationCommandBadge = 8388608 } /** * @see {@link https://discord.com/developers/docs/resources/application-role-connection-metadata#application-role-connection-metadata-object-application-role-connection-metadata-structure} */ export interface APIApplicationRoleConnectionMetadata { /** * Type of metadata value */ type: ApplicationRoleConnectionMetadataType; /** * Dictionary key for the metadata field (must be `a-z`, `0-9`, or `_` characters; 1-50 characters) */ key: string; /** * Name of the metadata field (1-100 characters) */ name: string; /** * Translations of the name */ name_localizations?: LocalizationMap; /** * Description of the metadata field (1-200 characters) */ description: string; /** * Translations of the description */ description_localizations?: LocalizationMap; } /** * @see {@link https://discord.com/developers/docs/resources/application-role-connection-metadata#application-role-connection-metadata-object-application-role-connection-metadata-type} */ export declare enum ApplicationRoleConnectionMetadataType { /** * The metadata value (`integer`) is less than or equal to the guild's configured value (`integer`) */ IntegerLessThanOrEqual = 1, /** * The metadata value (`integer`) is greater than or equal to the guild's configured value (`integer`) */ IntegerGreaterThanOrEqual = 2, /** * The metadata value (`integer`) is equal to the guild's configured value (`integer`) */ IntegerEqual = 3, /** * The metadata value (`integer`) is not equal to the guild's configured value (`integer`) */ IntegerNotEqual = 4, /** * The metadata value (`ISO8601 string`) is less than or equal to the guild's configured value (`integer`; days before current date) */ DatetimeLessThanOrEqual = 5, /** * The metadata value (`ISO8601 string`) is greater than or equal to the guild's configured value (`integer`; days before current date) */ DatetimeGreaterThanOrEqual = 6, /** * The metadata value (`integer`) is equal to the guild's configured value (`integer`; `1`) */ BooleanEqual = 7, /** * The metadata value (`integer`) is not equal to the guild's configured value (`integer`; `1`) */ BooleanNotEqual = 8 } /** * @see {@link https://discord.com/developers/docs/resources/application#application-object-application-event-webhook-status} */ export declare enum ApplicationWebhookEventStatus { /** * Webhook events are disabled by developer */ Disabled = 1, /** * Webhook events are enabled by developer */ Enabled = 2, /** * Webhook events are disabled by Discord, usually due to inactivity */ DisabledByDiscord = 3 } //# sourceMappingURL=application.d.ts.map node_modules/discord-api-types/payloads/v9/index.mjs 0000664 00000012455 15114741631 0016571 0 ustar 00 import mod from "./index.js"; export default mod; export const APIApplicationCommandPermissionsConstant = mod.APIApplicationCommandPermissionsConstant; export const ActivityFlags = mod.ActivityFlags; export const ActivityPlatform = mod.ActivityPlatform; export const ActivityType = mod.ActivityType; export const AllowedMentionsTypes = mod.AllowedMentionsTypes; export const ApplicationCommandOptionType = mod.ApplicationCommandOptionType; export const ApplicationCommandPermissionType = mod.ApplicationCommandPermissionType; export const ApplicationCommandType = mod.ApplicationCommandType; export const ApplicationFlags = mod.ApplicationFlags; export const ApplicationIntegrationType = mod.ApplicationIntegrationType; export const ApplicationRoleConnectionMetadataType = mod.ApplicationRoleConnectionMetadataType; export const ApplicationWebhookEventStatus = mod.ApplicationWebhookEventStatus; export const ApplicationWebhookEventType = mod.ApplicationWebhookEventType; export const ApplicationWebhookType = mod.ApplicationWebhookType; export const AttachmentFlags = mod.AttachmentFlags; export const AuditLogEvent = mod.AuditLogEvent; export const AuditLogOptionsType = mod.AuditLogOptionsType; export const AutoModerationActionType = mod.AutoModerationActionType; export const AutoModerationRuleEventType = mod.AutoModerationRuleEventType; export const AutoModerationRuleKeywordPresetType = mod.AutoModerationRuleKeywordPresetType; export const AutoModerationRuleTriggerType = mod.AutoModerationRuleTriggerType; export const ButtonStyle = mod.ButtonStyle; export const ChannelFlags = mod.ChannelFlags; export const ChannelType = mod.ChannelType; export const ComponentType = mod.ComponentType; export const ConnectionService = mod.ConnectionService; export const ConnectionVisibility = mod.ConnectionVisibility; export const EmbedType = mod.EmbedType; export const EntitlementType = mod.EntitlementType; export const EntryPointCommandHandlerType = mod.EntryPointCommandHandlerType; export const ForumLayoutType = mod.ForumLayoutType; export const GuildDefaultMessageNotifications = mod.GuildDefaultMessageNotifications; export const GuildExplicitContentFilter = mod.GuildExplicitContentFilter; export const GuildFeature = mod.GuildFeature; export const GuildHubType = mod.GuildHubType; export const GuildMFALevel = mod.GuildMFALevel; export const GuildMemberFlags = mod.GuildMemberFlags; export const GuildNSFWLevel = mod.GuildNSFWLevel; export const GuildOnboardingMode = mod.GuildOnboardingMode; export const GuildOnboardingPromptType = mod.GuildOnboardingPromptType; export const GuildPremiumTier = mod.GuildPremiumTier; export const GuildScheduledEventEntityType = mod.GuildScheduledEventEntityType; export const GuildScheduledEventPrivacyLevel = mod.GuildScheduledEventPrivacyLevel; export const GuildScheduledEventRecurrenceRuleFrequency = mod.GuildScheduledEventRecurrenceRuleFrequency; export const GuildScheduledEventRecurrenceRuleMonth = mod.GuildScheduledEventRecurrenceRuleMonth; export const GuildScheduledEventRecurrenceRuleWeekday = mod.GuildScheduledEventRecurrenceRuleWeekday; export const GuildScheduledEventStatus = mod.GuildScheduledEventStatus; export const GuildSystemChannelFlags = mod.GuildSystemChannelFlags; export const GuildVerificationLevel = mod.GuildVerificationLevel; export const GuildWidgetStyle = mod.GuildWidgetStyle; export const IntegrationExpireBehavior = mod.IntegrationExpireBehavior; export const InteractionContextType = mod.InteractionContextType; export const InteractionResponseType = mod.InteractionResponseType; export const InteractionType = mod.InteractionType; export const InviteTargetType = mod.InviteTargetType; export const InviteType = mod.InviteType; export const MembershipScreeningFieldType = mod.MembershipScreeningFieldType; export const MessageActivityType = mod.MessageActivityType; export const MessageFlags = mod.MessageFlags; export const MessageReferenceType = mod.MessageReferenceType; export const MessageType = mod.MessageType; export const NameplatePalette = mod.NameplatePalette; export const OAuth2Scopes = mod.OAuth2Scopes; export const OverwriteType = mod.OverwriteType; export const PermissionFlagsBits = mod.PermissionFlagsBits; export const PollLayoutType = mod.PollLayoutType; export const PresenceUpdateStatus = mod.PresenceUpdateStatus; export const RoleFlags = mod.RoleFlags; export const SKUFlags = mod.SKUFlags; export const SKUType = mod.SKUType; export const SelectMenuDefaultValueType = mod.SelectMenuDefaultValueType; export const SeparatorSpacingSize = mod.SeparatorSpacingSize; export const SortOrderType = mod.SortOrderType; export const StageInstancePrivacyLevel = mod.StageInstancePrivacyLevel; export const StickerFormatType = mod.StickerFormatType; export const StickerType = mod.StickerType; export const SubscriptionStatus = mod.SubscriptionStatus; export const TeamMemberMembershipState = mod.TeamMemberMembershipState; export const TeamMemberRole = mod.TeamMemberRole; export const TextInputStyle = mod.TextInputStyle; export const ThreadAutoArchiveDuration = mod.ThreadAutoArchiveDuration; export const ThreadMemberFlags = mod.ThreadMemberFlags; export const UnfurledMediaItemLoadingState = mod.UnfurledMediaItemLoadingState; export const UserFlags = mod.UserFlags; export const UserPremiumType = mod.UserPremiumType; export const VideoQualityMode = mod.VideoQualityMode; export const WebhookType = mod.WebhookType; node_modules/discord-api-types/payloads/v9/invite.js.map 0000664 00000000547 15114741631 0017356 0 ustar 00 {"version":3,"file":"invite.js","sourceRoot":"","sources":["invite.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AAiGH;;GAEG;AACH,IAAY,UAIX;AAJD,WAAY,UAAU;IACrB,6CAAK,CAAA;IACL,iDAAO,CAAA;IACP,+CAAM,CAAA;AACP,CAAC,EAJW,UAAU,0BAAV,UAAU,QAIrB;AAED;;GAEG;AACH,IAAY,gBAGX;AAHD,WAAY,gBAAgB;IAC3B,2DAAU,CAAA;IACV,qFAAmB,CAAA;AACpB,CAAC,EAHW,gBAAgB,gCAAhB,gBAAgB,QAG3B"} node_modules/discord-api-types/payloads/v9/index.js.map 0000664 00000000544 15114741631 0017164 0 ustar 00 {"version":3,"file":"index.js","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,4CAA0B;AAC1B,gDAA8B;AAC9B,6CAA2B;AAC3B,mDAAiC;AACjC,4CAA0B;AAE1B,4CAA0B;AAC1B,0CAAwB;AACxB,wDAAsC;AACtC,iDAA+B;AAC/B,2CAAyB;AACzB,iDAA+B;AAC/B,2CAAyB;AACzB,gDAA8B;AAC9B,yCAAuB;AAEvB,kDAAgC;AAChC,4CAA0B;AAC1B,0CAAwB;AAExB,yCAAuB;AAEvB,4CAA0B"} node_modules/discord-api-types/payloads/v9/voice.d.ts 0000664 00000004654 15114741631 0016650 0 ustar 00 /** * Types extracted from https://discord.com/developers/docs/resources/voice */ import type { Snowflake } from '../../globals'; import type { APIGuildMember } from './guild'; /** * @see {@link https://discord.com/developers/docs/resources/voice#voice-state-object} * @deprecated This is deprecated, use {@link APIVoiceState} */ export type GatewayVoiceState = APIVoiceState; export interface APIBaseVoiceState { /** * The channel id this user is connected to */ channel_id: Snowflake | null; /** * The user id this voice state is for */ user_id: Snowflake; /** * The guild member this voice state is for * * @see {@link https://discord.com/developers/docs/resources/guild#guild-member-object} */ member?: APIGuildMember; /** * The session id for this voice state */ session_id: string; /** * Whether this user is deafened by the server */ deaf: boolean; /** * Whether this user is muted by the server */ mute: boolean; /** * Whether this user is locally deafened */ self_deaf: boolean; /** * Whether this user is locally muted */ self_mute: boolean; /** * Whether this user is streaming using "Go Live" */ self_stream?: boolean; /** * Whether this user's camera is enabled */ self_video: boolean; /** * Whether this user is muted by the current user */ suppress: boolean; /** * The time at which the user requested to speak */ request_to_speak_timestamp: string | null; } /** * @see {@link https://discord.com/developers/docs/resources/voice#voice-state-object} */ export interface APIVoiceState extends APIBaseVoiceState { /** * The guild id this voice state is for */ guild_id?: Snowflake; } /** * @see {@link https://discord.com/developers/docs/resources/voice#voice-region-object} */ export interface APIVoiceRegion { /** * Unique ID for the region */ id: string; /** * Name of the region */ name: string; /** * `true` for a single server that is closest to the current user's client */ optimal: boolean; /** * Whether this is a deprecated voice region (avoid switching to these) */ deprecated: boolean; /** * Whether this is a custom voice region (used for events/etc) */ custom: boolean; } //# sourceMappingURL=voice.d.ts.map node_modules/discord-api-types/payloads/v9/permissions.d.ts 0000664 00000004305 15114741631 0020107 0 ustar 00 /** * Types extracted from https://discord.com/developers/docs/topics/permissions */ import type { Permissions, Snowflake } from '../../globals'; /** * @see {@link https://discord.com/developers/docs/topics/permissions#role-object} */ export interface APIRole { /** * Role id */ id: Snowflake; /** * Role name */ name: string; /** * Integer representation of hexadecimal color code */ color: number; /** * If this role is pinned in the user listing */ hoist: boolean; /** * The role icon hash */ icon?: string | null; /** * The role unicode emoji as a standard emoji */ unicode_emoji?: string | null; /** * Position of this role */ position: number; /** * Permission bit set * * @see {@link https://en.wikipedia.org/wiki/Bit_field} */ permissions: Permissions; /** * Whether this role is managed by an integration */ managed: boolean; /** * Whether this role is mentionable */ mentionable: boolean; /** * The tags this role has */ tags?: APIRoleTags; /** * Role flags */ flags: RoleFlags; } /** * @see {@link https://discord.com/developers/docs/topics/permissions#role-object-role-tags-structure} */ export interface APIRoleTags { /** * The id of the bot this role belongs to */ bot_id?: Snowflake; /** * Whether this is the guild's premium subscriber role */ premium_subscriber?: null; /** * The id of the integration this role belongs to */ integration_id?: Snowflake; /** * The id of this role's subscription sku and listing */ subscription_listing_id?: Snowflake; /** * Whether this role is available for purchase */ available_for_purchase?: null; /** * Whether this role is a guild's linked role */ guild_connections?: null; } /** * @see {@link https://discord.com/developers/docs/topics/permissions#role-object-role-flags} */ export declare enum RoleFlags { /** * Role can be selected by members in an onboarding prompt */ InPrompt = 1 } //# sourceMappingURL=permissions.d.ts.map node_modules/discord-api-types/payloads/v9/invite.d.ts 0000664 00000010056 15114741631 0017032 0 ustar 00 /** * Types extracted from https://discord.com/developers/docs/resources/invite */ import type { APIApplication } from './application'; import type { APIInviteChannel } from './channel'; import type { APIGuild } from './guild'; import type { APIGuildScheduledEvent } from './guildScheduledEvent'; import type { APIInviteStageInstance } from './stageInstance'; import type { APIUser } from './user'; export type APIInviteGuild = Pick<APIGuild, 'banner' | 'description' | 'features' | 'icon' | 'id' | 'name' | 'nsfw_level' | 'premium_subscription_count' | 'splash' | 'vanity_url_code' | 'verification_level'>; /** * @see {@link https://discord.com/developers/docs/resources/invite#invite-object} */ export interface APIInvite { /** * The invite code (unique ID) */ code: string; /** * The guild this invite is for * * @see {@link https://discord.com/developers/docs/resources/guild#guild-object} */ guild?: APIInviteGuild; /** * The channel this invite is for * * @see {@link https://discord.com/developers/docs/resources/channel#channel-object} */ channel: APIInviteChannel | null; /** * The user who created the invite * * @see {@link https://discord.com/developers/docs/resources/user#user-object} */ inviter?: APIUser; /** * The type of target for this voice channel invite * * @see {@link https://discord.com/developers/docs/resources/invite#invite-object-invite-target-types} */ target_type?: InviteTargetType; /** * The user whose stream to display for this voice channel stream invite * * @see {@link https://discord.com/developers/docs/resources/user#user-object} */ target_user?: APIUser; /** * The embedded application to open for this voice channel embedded application invite * * @see {@link https://discord.com/developers/docs/resources/application#application-object} */ target_application?: Partial<APIApplication>; /** * Approximate count of online members, returned from the `GET /invites/<code>` endpoint when `with_counts` is `true` */ approximate_presence_count?: number; /** * Approximate count of total members, returned from the `GET /invites/<code>` endpoint when `with_counts` is `true` */ approximate_member_count?: number; /** * The expiration date of this invite, returned from the `GET /invites/<code>` endpoint when `with_expiration` is `true` */ expires_at?: string | null; /** * The stage instance data if there is a public stage instance in the stage channel this invite is for * * @deprecated * {@link https://github.com/discord/discord-api-docs/pull/4479 | discord-api-docs#4479} */ stage_instance?: APIInviteStageInstance; /** * The guild scheduled event data, returned from the `GET /invites/<code>` endpoint when `guild_scheduled_event_id` is a valid guild scheduled event id */ guild_scheduled_event?: APIGuildScheduledEvent; /** * The invite type */ type: InviteType; } /** * @see {@link https://discord.com/developers/docs/resources/invite#invite-object-invite-types} */ export declare enum InviteType { Guild = 0, GroupDM = 1, Friend = 2 } /** * @see {@link https://discord.com/developers/docs/resources/invite#invite-object-invite-target-types} */ export declare enum InviteTargetType { Stream = 1, EmbeddedApplication = 2 } /** * @see {@link https://discord.com/developers/docs/resources/invite#invite-metadata-object} */ export interface APIExtendedInvite extends APIInvite { /** * Number of times this invite has been used */ uses: number; /** * Max number of times this invite can be used */ max_uses: number; /** * Duration (in seconds) after which the invite expires */ max_age: number; /** * Whether this invite only grants temporary membership */ temporary: boolean; /** * When this invite was created */ created_at: string; } //# sourceMappingURL=invite.d.ts.map node_modules/discord-api-types/payloads/v9/user.d.ts 0000664 00000026057 15114741631 0016522 0 ustar 00 /** * Types extracted from https://discord.com/developers/docs/resources/user */ import type { Snowflake } from '../../globals'; import type { APIGuildIntegration } from './guild'; /** * @see {@link https://discord.com/developers/docs/resources/user#user-object} */ export interface APIUser { /** * The user's id */ id: Snowflake; /** * The user's username, not unique across the platform */ username: string; /** * The user's Discord-tag */ discriminator: string; /** * The user's display name, if it is set. For bots, this is the application name */ global_name: string | null; /** * The user's avatar hash * * @see {@link https://discord.com/developers/docs/reference#image-formatting} */ avatar: string | null; /** * Whether the user belongs to an OAuth2 application */ bot?: boolean; /** * Whether the user is an Official Discord System user (part of the urgent message system) */ system?: boolean; /** * Whether the user has two factor enabled on their account */ mfa_enabled?: boolean; /** * The user's banner hash * * @see {@link https://discord.com/developers/docs/reference#image-formatting} */ banner?: string | null; /** * The user's banner color encoded as an integer representation of hexadecimal color code */ accent_color?: number | null; /** * The user's chosen language option */ locale?: string; /** * Whether the email on this account has been verified */ verified?: boolean; /** * The user's email */ email?: string | null; /** * The flags on a user's account * * @see {@link https://discord.com/developers/docs/resources/user#user-object-user-flags} */ flags?: UserFlags; /** * The type of Nitro subscription on a user's account * * @see {@link https://discord.com/developers/docs/resources/user#user-object-premium-types} */ premium_type?: UserPremiumType; /** * The public flags on a user's account * * @see {@link https://discord.com/developers/docs/resources/user#user-object-user-flags} */ public_flags?: UserFlags; /** * The user's avatar decoration hash * * @see {@link https://discord.com/developers/docs/reference#image-formatting} * @deprecated Use {@link APIUser.avatar_decoration_data} instead */ avatar_decoration?: string | null; /** * The data for the user's avatar decoration * * @see {@link https://discord.com/developers/docs/resources/user#avatar-decoration-data-object} */ avatar_decoration_data?: APIAvatarDecorationData | null; /** * The data for the user's collectibles * * @see {@link https://discord.com/developers/docs/resources/user#collectibles} */ collectibles?: APICollectibles | null; } /** * @see {@link https://discord.com/developers/docs/resources/user#user-object-user-flags} */ export declare enum UserFlags { /** * Discord Employee */ Staff = 1, /** * Partnered Server Owner */ Partner = 2, /** * HypeSquad Events Member */ Hypesquad = 4, /** * Bug Hunter Level 1 */ BugHunterLevel1 = 8, /** * @unstable This user flag is currently not documented by Discord but has a known value which we will try to keep up to date. */ MFASMS = 16, /** * @unstable This user flag is currently not documented by Discord but has a known value which we will try to keep up to date. */ PremiumPromoDismissed = 32, /** * House Bravery Member */ HypeSquadOnlineHouse1 = 64, /** * House Brilliance Member */ HypeSquadOnlineHouse2 = 128, /** * House Balance Member */ HypeSquadOnlineHouse3 = 256, /** * Early Nitro Supporter */ PremiumEarlySupporter = 512, /** * User is a {@link https://discord.com/developers/docs/topics/teams | team} */ TeamPseudoUser = 1024, /** * @unstable This user flag is currently not documented by Discord but has a known value which we will try to keep up to date. */ HasUnreadUrgentMessages = 8192, /** * Bug Hunter Level 2 */ BugHunterLevel2 = 16384, /** * Verified Bot */ VerifiedBot = 65536, /** * Early Verified Bot Developer */ VerifiedDeveloper = 131072, /** * Moderator Programs Alumni */ CertifiedModerator = 262144, /** * Bot uses only {@link https://discord.com/developers/docs/interactions/receiving-and-responding#receiving-an-interaction | HTTP interactions} and is shown in the online member list */ BotHTTPInteractions = 524288, /** * User has been identified as spammer * * @unstable This user flag is currently not documented by Discord but has a known value which we will try to keep up to date. */ Spammer = 1048576, /** * @unstable This user flag is currently not documented by Discord but has a known value which we will try to keep up to date. */ DisablePremium = 2097152, /** * User is an {@link https://support-dev.discord.com/hc/articles/10113997751447 | Active Developer} */ ActiveDeveloper = 4194304, /** * User's account has been {@link https://support.discord.com/hc/articles/6461420677527 | quarantined} based on recent activity * * @unstable This user flag is currently not documented by Discord but has a known value which we will try to keep up to date. * @privateRemarks * * This value would be `1 << 44`, but bit shifting above `1 << 30` requires bigints */ Quarantined = 17592186044416, /** * @unstable This user flag is currently not documented by Discord but has a known value which we will try to keep up to date. * @privateRemarks * * This value would be `1 << 50`, but bit shifting above `1 << 30` requires bigints */ Collaborator = 1125899906842624, /** * @unstable This user flag is currently not documented by Discord but has a known value which we will try to keep up to date. * @privateRemarks * * This value would be `1 << 51`, but bit shifting above `1 << 30` requires bigints */ RestrictedCollaborator = 2251799813685248 } /** * @see {@link https://discord.com/developers/docs/resources/user#user-object-premium-types} */ export declare enum UserPremiumType { None = 0, NitroClassic = 1, Nitro = 2, NitroBasic = 3 } /** * @see {@link https://discord.com/developers/docs/resources/user#connection-object} */ export interface APIConnection { /** * ID of the connection account */ id: string; /** * The username of the connection account */ name: string; /** * The service of the connection * * @see {@link https://discord.com/developers/docs/resources/user#connection-object-services} */ type: ConnectionService; /** * Whether the connection is revoked */ revoked?: boolean; /** * An array of partial server integrations * * @see {@link https://discord.com/developers/docs/resources/guild#integration-object} */ integrations?: Partial<APIGuildIntegration>[]; /** * Whether the connection is verified */ verified: boolean; /** * Whether friend sync is enabled for this connection */ friend_sync: boolean; /** * Whether activities related to this connection will be shown in presence updates */ show_activity: boolean; /** * Whether this connection supports console voice transfer */ two_way_link: boolean; /** * Visibility of this connection * * @see {@link https://discord.com/developers/docs/resources/user#connection-object-visibility-types} */ visibility: ConnectionVisibility; } export declare enum ConnectionService { AmazonMusic = "amazon-music", BattleNet = "battlenet", Bluesky = "bluesky", BungieNet = "bungie", Crunchyroll = "crunchyroll", Domain = "domain", eBay = "ebay", EpicGames = "epicgames", Facebook = "facebook", GitHub = "github", Instagram = "instagram", LeagueOfLegends = "leagueoflegends", Mastodon = "mastodon", PayPal = "paypal", PlayStationNetwork = "playstation", Reddit = "reddit", RiotGames = "riotgames", Roblox = "roblox", Spotify = "spotify", Skype = "skype", Steam = "steam", TikTok = "tiktok", Twitch = "twitch", X = "twitter", /** * @deprecated This is the old name for {@link ConnectionService.X} */ Twitter = "twitter", Xbox = "xbox", YouTube = "youtube" } export declare enum ConnectionVisibility { /** * Invisible to everyone except the user themselves */ None = 0, /** * Visible to everyone */ Everyone = 1 } /** * @see {@link https://discord.com/developers/docs/resources/user#application-role-connection-object-application-role-connection-structure} */ export interface APIApplicationRoleConnection { /** * The vanity name of the platform a bot has connected (max 50 characters) */ platform_name: string | null; /** * The username on the platform a bot has connected (max 100 characters) */ platform_username: string | null; /** * Object mapping application role connection metadata keys to their `string`-ified value (max 100 characters) for the user on the platform a bot has connected */ metadata: Record<string, number | string>; } /** * @see {@link https://discord.com/developers/docs/resources/user#avatar-decoration-data-object} */ export interface APIAvatarDecorationData { /** * The avatar decoration hash * * @see {@link https://discord.com/developers/docs/reference#image-formatting} */ asset: string; /** * The id of the avatar decoration's SKU */ sku_id: Snowflake; } /** * The collectibles the user has, excluding Avatar Decorations and Profile Effects. * * @see {@link https://discord.com/developers/docs/resources/user#collectibles} */ export interface APICollectibles { /** * Object mapping of {@link APINameplateData} */ nameplate?: APINameplateData; } /** * @see {@link https://discord.com/developers/docs/resources/user#nameplate} */ export interface APINameplateData { /** * ID of the nameplate SKU */ sku_id: Snowflake; /** * Path to the nameplate asset * * @example `nameplates/nameplates/twilight/` */ asset: string; /** * The label of this nameplate. Currently unused */ label: string; /** * Background color of the nameplate */ palette: NameplatePalette; } /** * Background color of a nameplate. */ export declare enum NameplatePalette { Berry = "berry", BubbleGum = "bubble_gum", Clover = "clover", Cobalt = "cobalt", Crimson = "crimson", Forest = "forest", Lemon = "lemon", Sky = "sky", Teal = "teal", Violet = "violet", White = "white" } //# sourceMappingURL=user.d.ts.map node_modules/discord-api-types/payloads/v9/index.js 0000664 00000003215 15114741631 0016406 0 ustar 00 "use strict"; var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { if (k2 === undefined) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { return m[k]; } }; } Object.defineProperty(o, k2, desc); }) : (function(o, m, k, k2) { if (k2 === undefined) k2 = k; o[k2] = m[k]; })); var __exportStar = (this && this.__exportStar) || function(m, exports) { for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); }; Object.defineProperty(exports, "__esModule", { value: true }); __exportStar(require("../common"), exports); __exportStar(require("./application"), exports); __exportStar(require("./auditLog"), exports); __exportStar(require("./autoModeration"), exports); __exportStar(require("./channel"), exports); __exportStar(require("./gateway"), exports); __exportStar(require("./guild"), exports); __exportStar(require("./guildScheduledEvent"), exports); __exportStar(require("./interactions"), exports); __exportStar(require("./invite"), exports); __exportStar(require("./monetization"), exports); __exportStar(require("./oauth2"), exports); __exportStar(require("./permissions"), exports); __exportStar(require("./poll"), exports); __exportStar(require("./stageInstance"), exports); __exportStar(require("./sticker"), exports); __exportStar(require("./teams"), exports); __exportStar(require("./user"), exports); __exportStar(require("./webhook"), exports); //# sourceMappingURL=index.js.map node_modules/discord-api-types/payloads/v9/permissions.d.ts.map 0000664 00000002026 15114741631 0020661 0 ustar 00 {"version":3,"file":"permissions.d.ts","sourceRoot":"","sources":["permissions.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAE5D;;GAEG;AACH,MAAM,WAAW,OAAO;IACvB;;OAEG;IACH,EAAE,EAAE,SAAS,CAAC;IACd;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,KAAK,EAAE,OAAO,CAAC;IACf;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB;;OAEG;IACH,aAAa,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC9B;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC;IACjB;;;;OAIG;IACH,WAAW,EAAE,WAAW,CAAC;IACzB;;OAEG;IACH,OAAO,EAAE,OAAO,CAAC;IACjB;;OAEG;IACH,WAAW,EAAE,OAAO,CAAC;IACrB;;OAEG;IACH,IAAI,CAAC,EAAE,WAAW,CAAC;IACnB;;OAEG;IACH,KAAK,EAAE,SAAS,CAAC;CACjB;AAED;;GAEG;AACH,MAAM,WAAW,WAAW;IAC3B;;OAEG;IACH,MAAM,CAAC,EAAE,SAAS,CAAC;IACnB;;OAEG;IACH,kBAAkB,CAAC,EAAE,IAAI,CAAC;IAC1B;;OAEG;IACH,cAAc,CAAC,EAAE,SAAS,CAAC;IAC3B;;OAEG;IACH,uBAAuB,CAAC,EAAE,SAAS,CAAC;IACpC;;OAEG;IACH,sBAAsB,CAAC,EAAE,IAAI,CAAC;IAC9B;;OAEG;IACH,iBAAiB,CAAC,EAAE,IAAI,CAAC;CACzB;AAED;;GAEG;AACH,oBAAY,SAAS;IACpB;;OAEG;IACH,QAAQ,IAAS;CACjB"} node_modules/discord-api-types/payloads/v9/voice.d.ts.map 0000664 00000002050 15114741631 0017410 0 ustar 00 {"version":3,"file":"voice.d.ts","sourceRoot":"","sources":["voice.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC/C,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAE9C;;;GAGG;AACH,MAAM,MAAM,iBAAiB,GAAG,aAAa,CAAC;AAE9C,MAAM,WAAW,iBAAiB;IACjC;;OAEG;IACH,UAAU,EAAE,SAAS,GAAG,IAAI,CAAC;IAC7B;;OAEG;IACH,OAAO,EAAE,SAAS,CAAC;IACnB;;;;OAIG;IACH,MAAM,CAAC,EAAE,cAAc,CAAC;IACxB;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC;IACnB;;OAEG;IACH,IAAI,EAAE,OAAO,CAAC;IACd;;OAEG;IACH,IAAI,EAAE,OAAO,CAAC;IACd;;OAEG;IACH,SAAS,EAAE,OAAO,CAAC;IACnB;;OAEG;IACH,SAAS,EAAE,OAAO,CAAC;IACnB;;OAEG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB;;OAEG;IACH,UAAU,EAAE,OAAO,CAAC;IACpB;;OAEG;IACH,QAAQ,EAAE,OAAO,CAAC;IAClB;;OAEG;IACH,0BAA0B,EAAE,MAAM,GAAG,IAAI,CAAC;CAC1C;AAED;;GAEG;AACH,MAAM,WAAW,aAAc,SAAQ,iBAAiB;IACvD;;OAEG;IACH,QAAQ,CAAC,EAAE,SAAS,CAAC;CACrB;AAED;;GAEG;AACH,MAAM,WAAW,cAAc;IAC9B;;OAEG;IACH,EAAE,EAAE,MAAM,CAAC;IACX;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;OAEG;IACH,OAAO,EAAE,OAAO,CAAC;IACjB;;OAEG;IACH,UAAU,EAAE,OAAO,CAAC;IACpB;;OAEG;IACH,MAAM,EAAE,OAAO,CAAC;CAChB"} node_modules/discord-api-types/payloads/v9/emoji.d.ts.map 0000664 00000002024 15114741631 0017407 0 ustar 00 {"version":3,"file":"emoji.d.ts","sourceRoot":"","sources":["emoji.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC/C,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAChE,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAC7C,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,QAAQ,CAAC;AAEtC;;GAEG;AACH,MAAM,WAAW,eAAe;IAC/B;;OAEG;IACH,EAAE,EAAE,SAAS,GAAG,IAAI,CAAC;IACrB;;OAEG;IACH,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IACpB;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;CACnB;AAED;;GAEG;AACH,MAAM,WAAW,QAAS,SAAQ,eAAe;IAChD;;OAEG;IACH,KAAK,CAAC,EAAE,OAAO,CAAC,IAAI,CAAC,EAAE,CAAC;IACxB;;OAEG;IACH,IAAI,CAAC,EAAE,OAAO,CAAC;IACf;;OAEG;IACH,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB;;OAEG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB;;OAEG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;CACpB;AAED;;GAEG;AACH,MAAM,MAAM,mBAAmB,GAAG,kBAAkB,CAAC,QAAQ,CAAC,IAAI,CAAC,QAAQ,EAAE,UAAU,GAAG,IAAI,GAAG,MAAM,GAAG,MAAM,CAAC,CAAC,CAAC,GAAG;IACrH;;;;OAIG;IACH,KAAK,EAAE,EAAE,CAAC;IACV;;;;OAIG;IACH,cAAc,EAAE,IAAI,CAAC;IACrB;;;;OAIG;IACH,OAAO,EAAE,KAAK,CAAC;IACf;;;;OAIG;IACH,SAAS,EAAE,IAAI,CAAC;CAChB,CAAC"} node_modules/discord-api-types/payloads/v9/application.d.ts.map 0000664 00000006532 15114741631 0020617 0 ustar 00 {"version":3,"file":"application.d.ts","sourceRoot":"","sources":["application.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC5D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,WAAW,CAAC;AACjD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAC/C,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,gBAAgB,CAAC;AACjE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAC7C,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AACvC,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,QAAQ,CAAC;AACtC,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,WAAW,CAAC;AAE7D;;GAEG;A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ClB;;OAEG;IACH,qBAAqB,SAAU;IAC/B;;;OAGG;IACH,4BAA4B,SAAU;IACtC;;OAEG;IACH,kBAAkB,UAAU;IAC5B;;OAEG;IACH,uBAAuB,UAAU;CACjC;AAED;;GAEG;AACH,MAAM,WAAW,oCAAoC;IACpD;;OAEG;IACH,IAAI,EAAE,qCAAqC,CAAC;IAC5C;;OAEG;IACH,GAAG,EAAE,MAAM,CAAC;IACZ;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;OAEG;IACH,kBAAkB,CAAC,EAAE,eAAe,CAAC;IACrC;;OAEG;IACH,WAAW,EAAE,MAAM,CAAC;IACpB;;OAEG;IACH,yBAAyB,CAAC,EAAE,eAAe,CAAC;CAC5C;AAED;;GAEG;AACH,oBAAY,qCAAqC;IAChD;;OAEG;IACH,sBAAsB,IAAI;IAC1B;;OAEG;IACH,yBAAyB,IAAA;IACzB;;OAEG;IACH,YAAY,IAAA;IACZ;;OAEG;IACH,eAAe,IAAA;IACf;;OAEG;IACH,uBAAuB,IAAA;IACvB;;OAEG;IACH,0BAA0B,IAAA;IAC1B;;OAEG;IACH,YAAY,IAAA;IACZ;;OAEG;IACH,eAAe,IAAA;CACf;AAED;;GAEG;AACH,oBAAY,6BAA6B;IACxC;;OAEG;IACH,QAAQ,IAAI;IACZ;;OAEG;IACH,OAAO,IAAA;IACP;;OAEG;IACH,iBAAiB,IAAA;CACjB"} node_modules/discord-api-types/payloads/v9/interactions.js.map 0000664 00000000226 15114741631 0020554 0 ustar 00 {"version":3,"file":"interactions.js","sourceRoot":"","sources":["interactions.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAsBA,sEAAoD;AAMpD,4DAA0C"} node_modules/discord-api-types/payloads/v9/webhook.js.map 0000664 00000001156 15114741631 0017513 0 ustar 00 {"version":3,"file":"webhook.js","sourceRoot":"","sources":["webhook.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AA8IH;;GAEG;AACH,IAAY,sBASX;AATD,WAAY,sBAAsB;IACjC;;OAEG;IACH,mEAAI,CAAA;IACJ;;OAEG;IACH,qEAAK,CAAA;AACN,CAAC,EATW,sBAAsB,sCAAtB,sBAAsB,QASjC;AAiBD;;GAEG;AACH,IAAY,2BAiBX;AAjBD,WAAY,2BAA2B;IACtC;;OAEG;IACH,+EAAgD,CAAA;IAChD;;OAEG;IACH,mFAAoD,CAAA;IACpD;;OAEG;IACH,uEAAwC,CAAA;IACxC;;OAEG;IACH,4EAA6C,CAAA;AAC9C,CAAC,EAjBW,2BAA2B,2CAA3B,2BAA2B,QAiBtC;AAED;;GAEG;AACH,IAAY,WAaX;AAbD,WAAY,WAAW;IACtB;;OAEG;IACH,qDAAY,CAAA;IACZ;;OAEG;IACH,mEAAe,CAAA;IACf;;OAEG;IACH,2DAAW,CAAA;AACZ,CAAC,EAbW,WAAW,2BAAX,WAAW,QAatB"} node_modules/discord-api-types/payloads/v9/teams.d.ts 0000664 00000004054 15114741631 0016646 0 ustar 00 /** * Types extracted from https://discord.com/developers/docs/topics/teams */ import type { Snowflake } from '../../globals'; import type { APIUser } from './user'; /** * @see {@link https://discord.com/developers/docs/topics/teams#data-models-team-object} */ export interface APITeam { /** * A hash of the image of the team's icon */ icon: string | null; /** * The unique id of the team */ id: Snowflake; /** * The members of the team */ members: APITeamMember[]; /** * The name of the team */ name: string; /** * The user id of the current team owner */ owner_user_id: Snowflake; } /** * @see {@link https://discord.com/developers/docs/topics/teams#data-models-team-member-object} */ export interface APITeamMember { /** * The user's membership state on the team * * @see {@link https://discord.com/developers/docs/topics/teams#data-models-membership-state-enum} */ membership_state: TeamMemberMembershipState; /** * Will always be `["*"]` * * @deprecated Use {@link APITeamMember.role} instead. */ permissions: ['*']; /** * The id of the parent team of which they are a member */ team_id: Snowflake; /** * The avatar, discriminator, id, and username of the user * * @see {@link https://discord.com/developers/docs/resources/user#user-object} */ user: APIUser; /** * The user's role in the team. * * @see {@link https://discord.com/developers/docs/topics/teams#team-member-roles} */ role: TeamMemberRole; } /** * @see {@link https://discord.com/developers/docs/topics/teams#data-models-membership-state-enum} */ export declare enum TeamMemberMembershipState { Invited = 1, Accepted = 2 } /** * @see {@link https://discord.com/developers/docs/topics/teams#team-member-roles-team-member-role-types} */ export declare enum TeamMemberRole { Admin = "admin", Developer = "developer", ReadOnly = "read_only" } //# sourceMappingURL=teams.d.ts.map node_modules/discord-api-types/payloads/v9/template.js.map 0000664 00000000160 15114741631 0017662 0 ustar 00 {"version":3,"file":"template.js","sourceRoot":"","sources":["template.ts"],"names":[],"mappings":";AAAA;;GAEG"} node_modules/discord-api-types/payloads/v9/teams.d.ts.map 0000664 00000001466 15114741631 0017426 0 ustar 00 {"version":3,"file":"teams.d.ts","sourceRoot":"","sources":["teams.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC/C,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,QAAQ,CAAC;AAEtC;;GAEG;AACH,MAAM,WAAW,OAAO;IACvB;;OAEG;IACH,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IACpB;;OAEG;IACH,EAAE,EAAE,SAAS,CAAC;IACd;;OAEG;IACH,OAAO,EAAE,aAAa,EAAE,CAAC;IACzB;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;OAEG;IACH,aAAa,EAAE,SAAS,CAAC;CACzB;AAED;;GAEG;AACH,MAAM,WAAW,aAAa;IAC7B;;;;OAIG;IACH,gBAAgB,EAAE,yBAAyB,CAAC;IAC5C;;;;OAIG;IACH,WAAW,EAAE,CAAC,GAAG,CAAC,CAAC;IACnB;;OAEG;IACH,OAAO,EAAE,SAAS,CAAC;IACnB;;;;OAIG;IACH,IAAI,EAAE,OAAO,CAAC;IACd;;;;OAIG;IACH,IAAI,EAAE,cAAc,CAAC;CACrB;AAED;;GAEG;AACH,oBAAY,yBAAyB;IACpC,OAAO,IAAI;IACX,QAAQ,IAAA;CACR;AAED;;GAEG;AACH,oBAAY,cAAc;IACzB,KAAK,UAAU;IACf,SAAS,cAAc;IACvB,QAAQ,cAAc;CACtB"} node_modules/discord-api-types/payloads/v9/oauth2.d.ts.map 0000664 00000001566 15114741631 0017520 0 ustar 00 {"version":3,"file":"oauth2.d.ts","sourceRoot":"","sources":["oauth2.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,oBAAY,YAAY;IACvB;;OAEG;IACH,GAAG,QAAQ;IACX;;;;;OAKG;IACH,WAAW,gBAAgB;IAC3B;;OAEG;IACH,cAAc,qBAAqB;IACnC;;;;OAIG;IACH,KAAK,UAAU;IACf;;;;OAIG;IACH,QAAQ,aAAa;IACrB;;;;;OAKG;IACH,MAAM,WAAW;IACjB;;;;;OAKG;IACH,UAAU,gBAAgB;IAC1B;;;;OAIG;IACH,iBAAiB,wBAAwB;IACzC;;;;OAIG;IACH,YAAY,aAAa;IACzB;;;OAGG;IACH,YAAY,kBAAkB;IAC9B;;OAEG;IACH,oBAAoB,2BAA2B;IAC/C;;OAEG;IACH,GAAG,QAAQ;IACX;;OAEG;IACH,oBAAoB,2BAA2B;IAC/C;;OAEG;IACH,eAAe,qBAAqB;IACpC;;OAEG;IACH,KAAK,UAAU;IACf;;OAEG;IACH,wBAAwB,+BAA+B;IACvD;;OAEG;IACH,sBAAsB,6BAA6B;IACnD;;OAEG;IACH,uBAAuB,8BAA8B;IACrD;;OAEG;IACH,wBAAwB,8BAA8B;IACtD;;OAEG;IACH,iBAAiB,uBAAuB;IACxC;;OAEG;IACH,cAAc,oBAAoB;IAClC;;;;OAIG;IACH,eAAe,qBAAqB;IACpC;;;;OAIG;IACH,oBAAoB,0BAA0B;IAC9C;;;;OAIG;IACH,0BAA0B,iCAAiC;IAC3D;;;;OAIG;IACH,oCAAoC,6CAA6C;CACjF"} node_modules/discord-api-types/payloads/v9/channel.d.ts.map 0000664 00000055365 15114741631 0017734 0 ustar 00 {"version":3,"file":"channel.d.ts","sourceRoot":"","sources":["channel.ts"],"names":[],"mappings":"AAA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BAAqB,CAAC;AAEzB;;GAEG;AACH,MAAM,MAAM,2BAA2B,GACpC,qBAAqB,CAAC,8BAA8B,CAAC,GACrD,qBAAqB,GACrB,gBAAgB,GAChB,wBAAwB,GACxB,mBAAmB,GACnB,qBAAqB,GACrB,uBAAuB,CAAC;AAE3B;;GAEG;AACH,MAAM,MAAM,iBAAiB,GAAG,qBAAqB,CAAC,4BAA4B,CAAC,GAAG,4BAA4B,CAAC;AAEnH;;GAEG;AACH,MAAM,MAAM,uBAAuB,GAAG,8BAA8B,GAAG,4BAA4B,CAAC;AAEpG;;GAEG;AACH,MAAM,MAAM,8BAA8B,GAAG,kBAAkB,GAAG,sBAAsB,CAAC;AAEzF;;GAEG;AACH,MAAM,MAAM,4BAA4B,GAAG,qBAAqB,CAAC;AAEjE;;GAEG;AACH,MAAM,MAAM,4BAA4B,GAAG,kBAAkB,GAAG,qBAAqB,CAAC;AAEtF;;GAEG;AACH,MAAM,MAAM,uBAAuB,GAChC,qBAAqB,CAAC,8BAA8B,CAAC,GACrD,gBAAgB,GAChB,wBAAwB,GACxB,mBAAmB,GACnB,qBAAqB,GACrB,uBAAuB,CAAC;AAE3B;;GAEG;AACH,MAAM,MAAM,wBAAwB,GAAG,IAAI,CAC1C,UAAU,EACR,aAAa,GACb,YAAY,GACZ,SAAS,GACT,kBAAkB,GAClB,QAAQ,GACR,OAAO,GACP,eAAe,GACf,UAAU,GACV,eAAe,GACf,UAAU,GACV,WAAW,GACX,MAAM,CACR,CAAC"} node_modules/discord-api-types/payloads/v9/poll.d.ts.map 0000664 00000002107 15114741631 0017254 0 ustar 00 {"version":3,"file":"poll.d.ts","sourceRoot":"","sources":["poll.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAE/C,MAAM,WAAW,WAAW;IAC3B;;OAEG;IACH,QAAQ,EAAE,YAAY,CAAC;CACvB;AAED,MAAM,WAAW,eAAe;IAC/B;;;;OAIG;IACH,iBAAiB,EAAE,OAAO,CAAC;IAC3B;;;;OAIG;IACH,WAAW,EAAE,cAAc,CAAC;CAC5B;AAED;;GAEG;AACH,MAAM,WAAW,OAAQ,SAAQ,WAAW,EAAE,eAAe;IAC5D;;OAEG;IACH,OAAO,EAAE,aAAa,EAAE,CAAC;IACzB;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,OAAO,CAAC,EAAE,cAAc,CAAC;CACzB;AAED;;GAEG;AACH,oBAAY,cAAc;IACzB;;OAEG;IACH,OAAO,IAAI;CACX;AAED;;GAEG;AACH,MAAM,WAAW,YAAY;IAC5B;;;;OAIG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,KAAK,CAAC,EAAE,eAAe,CAAC;CACxB;AAED,MAAM,WAAW,iBAAiB;IACjC;;OAEG;IACH,UAAU,EAAE,YAAY,CAAC;CACzB;AAED;;GAEG;AACH,MAAM,WAAW,aAAc,SAAQ,iBAAiB;IACvD;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;CAClB;AAED;;GAEG;AACH,MAAM,WAAW,cAAc;IAC9B;;OAEG;IACH,YAAY,EAAE,OAAO,CAAC;IACtB;;OAEG;IACH,aAAa,EAAE,kBAAkB,EAAE,CAAC;CACpC;AAED;;GAEG;AACH,MAAM,WAAW,kBAAkB;IAClC;;OAEG;IACH,EAAE,EAAE,MAAM,CAAC;IACX;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,QAAQ,EAAE,OAAO,CAAC;CAClB"} node_modules/discord-api-types/payloads/v9/invite.js 0000664 00000001762 15114741631 0016602 0 ustar 00 "use strict"; /** * Types extracted from https://discord.com/developers/docs/resources/invite */ Object.defineProperty(exports, "__esModule", { value: true }); exports.InviteTargetType = exports.InviteType = void 0; /** * @see {@link https://discord.com/developers/docs/resources/invite#invite-object-invite-types} */ var InviteType; (function (InviteType) { InviteType[InviteType["Guild"] = 0] = "Guild"; InviteType[InviteType["GroupDM"] = 1] = "GroupDM"; InviteType[InviteType["Friend"] = 2] = "Friend"; })(InviteType || (exports.InviteType = InviteType = {})); /** * @see {@link https://discord.com/developers/docs/resources/invite#invite-object-invite-target-types} */ var InviteTargetType; (function (InviteTargetType) { InviteTargetType[InviteTargetType["Stream"] = 1] = "Stream"; InviteTargetType[InviteTargetType["EmbeddedApplication"] = 2] = "EmbeddedApplication"; })(InviteTargetType || (exports.InviteTargetType = InviteTargetType = {})); //# sourceMappingURL=invite.js.map node_modules/discord-api-types/payloads/v9/channel.d.ts 0000664 00000217361 15114741631 0017154 0 ustar 00 /** * Types extracted from https://discord.com/developers/docs/resources/channel */ import type { Permissions, Snowflake } from '../../globals'; import type { _NonNullableFields } from '../../utils/internals'; import type { APIApplication } from './application'; import type { APIPartialEmoji } from './emoji'; import type { APIGuildMember } from './guild'; import type { APIInteractionDataResolved, APIMessageInteraction, APIMessageInteractionMetadata } from './interactions'; import type { APIRole } from './permissions'; import type { APIPoll } from './poll'; import type { APISticker, APIStickerItem } from './sticker'; import type { APIUser } from './user'; export interface APIBasePartialChannel { /** * The id of the channel */ id: Snowflake; /** * The type of the channel * * @see {@link https://discord.com/developers/docs/resources/channel#channel-object-channel-types} */ type: ChannelType; } export interface APINameableChannel { /** * The name of the channel (1-100 characters) */ name?: string | null; } /** * Not documented, but partial only includes id, name, and type */ export interface APIPartialChannel extends APIBasePartialChannel, APINameableChannel { } /** * A channel obtained from fetching an invite. */ export interface APIInviteChannel extends Required<APIPartialChannel> { /** * Icon hash. */ icon?: string | undefined; /** * The invite channel's recipients. * * @remarks Only includes usernames of users. */ recipients?: Pick<APIUser, 'username'>[] | undefined; } /** * Source channel of channel follower webhooks. */ export type APIWebhookSourceChannel = Required<_NonNullableFields<Pick<APIPartialChannel, 'id' | 'name'>>>; /** * This interface is used to allow easy extension for other channel types. While * also allowing `APIPartialChannel` to be used without breaking. */ export interface APIChannelBase<T extends ChannelType> extends APIBasePartialChannel { type: T; flags?: ChannelFlags; } export type TextChannelType = ChannelType.AnnouncementThread | ChannelType.DM | ChannelType.GroupDM | ChannelType.GuildAnnouncement | ChannelType.GuildStageVoice | ChannelType.GuildText | ChannelType.GuildVoice | ChannelType.PrivateThread | ChannelType.PublicThread; export type GuildChannelType = Exclude<ChannelType, ChannelType.DM | ChannelType.GroupDM>; export interface APISlowmodeChannel<T extends ChannelType> extends APIChannelBase<T> { /** * Amount of seconds a user has to wait before sending another message (0-21600); * bots, as well as users with the permission `MANAGE_MESSAGES` or `MANAGE_CHANNELS`, are unaffected * * `rate_limit_per_user` also applies to thread creation. Users can send one message and create one thread during each `rate_limit_per_user` interval. * * For thread channels, `rate_limit_per_user` is only returned if the field is set to a non-zero and non-null value. * The absence of this field in API calls and Gateway events should indicate that slowmode has been reset to the default value. */ rate_limit_per_user?: number; } export interface APISortableChannel { /** * Sorting position of the channel */ position: number; } export interface APITextBasedChannel<T extends ChannelType> extends APIChannelBase<T>, APISlowmodeChannel<T> { /** * The id of the last message sent in this channel (may not point to an existing or valid message) */ last_message_id?: Snowflake | null; } export interface APIPinChannel<T extends ChannelType> extends APIChannelBase<T> { /** * When the last pinned message was pinned. * This may be `null` in events such as `GUILD_CREATE` when a message is not pinned */ last_pin_timestamp?: string | null; } export interface APIGuildChannel<T extends ChannelType> extends APIChannelBase<T> { /** * The name of the channel (1-100 characters) */ name: string; /** * The id of the guild (may be missing for some channel objects received over gateway guild dispatches) */ guild_id?: Snowflake; /** * Explicit permission overwrites for members and roles * * @see {@link https://discord.com/developers/docs/resources/channel#overwrite-object} */ permission_overwrites?: APIOverwrite[]; /** * ID of the parent category for a channel (each parent category can contain up to 50 channels) * * OR * * ID of the parent channel for a thread */ parent_id?: Snowflake | null; /** * Whether the channel is nsfw */ nsfw?: boolean; } export type GuildTextChannelType = Exclude<TextChannelType, ChannelType.DM | ChannelType.GroupDM>; export interface APIGuildTextChannel<T extends ChannelType.GuildForum | ChannelType.GuildMedia | GuildTextChannelType> extends APITextBasedChannel<T>, APISortableChannel, APIGuildChannel<T>, APIPinChannel<T> { /** * Default duration for newly created threads, in minutes, to automatically archive the thread after recent activity */ default_auto_archive_duration?: ThreadAutoArchiveDuration; /** * The initial `rate_limit_per_user` to set on newly created threads. * This field is copied to the thread at creation time and does not live update */ default_thread_rate_limit_per_user?: number; /** * The channel topic (0-1024 characters) */ topic?: string | null; } export type APITextChannel = APIGuildTextChannel<ChannelType.GuildText>; export type APINewsChannel = APIGuildTextChannel<ChannelType.GuildAnnouncement>; export interface APIGuildCategoryChannel extends APIGuildChannel<ChannelType.GuildCategory>, APISortableChannel { } export interface APIVoiceChannelBase<T extends ChannelType> extends APIGuildChannel<T>, APISortableChannel, APITextBasedChannel<T>, APISlowmodeChannel<T> { /** * The bitrate (in bits) of the voice or stage channel */ bitrate?: number; /** * The user limit of the voice or stage channel */ user_limit?: number; /** * Voice region id for the voice or stage channel, automatic when set to `null` * * @see {@link https://discord.com/developers/docs/resources/voice#voice-region-object} */ rtc_region?: string | null; /** * The camera video quality mode of the voice or stage channel, `1` when not present * * @see {@link https://discord.com/developers/docs/resources/channel#channel-object-video-quality-modes} */ video_quality_mode?: VideoQualityMode; } export type APIGuildVoiceChannel = APIVoiceChannelBase<ChannelType.GuildVoice>; export type APIGuildStageVoiceChannel = APIVoiceChannelBase<ChannelType.GuildStageVoice>; export interface APIDMChannelBase<T extends ChannelType> extends APITextBasedChannel<T>, APIPinChannel<T> { /** * The recipients of the DM * * @see {@link https://discord.com/developers/docs/resources/user#user-object} */ recipients?: APIUser[]; } export interface APIDMChannel extends APIDMChannelBase<ChannelType.DM> { /** * The name of the channel (always null for DM channels) */ name: null; } export interface APIGroupDMChannel extends APIDMChannelBase<ChannelType.GroupDM> { /** * The name of the channel (1-100 characters) */ name: string | null; /** * Application id of the group DM creator if it is bot-created */ application_id?: Snowflake; /** * Icon hash */ icon?: string | null; /** * ID of the DM creator */ owner_id?: Snowflake; /** * The id of the last message sent in this channel (may not point to an existing or valid message) */ last_message_id?: Snowflake | null; /** * Whether the channel is managed by an OAuth2 application */ managed?: boolean; } export type ThreadChannelType = ChannelType.AnnouncementThread | ChannelType.PrivateThread | ChannelType.PublicThread; export interface APIThreadChannel<Type extends ThreadChannelType = ThreadChannelType> extends APITextBasedChannel<Type>, APIGuildChannel<Type>, APIPinChannel<Type> { /** * The client users member for the thread, only included in select endpoints */ member?: APIThreadMember; /** * The metadata for a thread channel not shared by other channels */ thread_metadata?: APIThreadMetadata; /** * Number of messages (not including the initial message or deleted messages) in a thread * * If the thread was created before July 1, 2022, it stops counting at 50 messages */ message_count?: number; /** * The approximate member count of the thread, does not count above 50 even if there are more members */ member_count?: number; /** * ID of the thread creator */ owner_id?: Snowflake; /** * Number of messages ever sent in a thread * * Similar to `message_count` on message creation, but won't decrement when a message is deleted */ total_message_sent?: number; /** * The IDs of the set of tags that have been applied to a thread in a thread-only channel */ applied_tags: Snowflake[]; } export type APIPublicThreadChannel = APIThreadChannel<ChannelType.PublicThread>; export type APIPrivateThreadChannel = APIThreadChannel<ChannelType.PrivateThread>; export type APIAnnouncementThreadChannel = APIThreadChannel<ChannelType.AnnouncementThread>; /** * @see {@link https://discord.com/developers/docs/resources/channel#forum-tag-object-forum-tag-structure} */ export interface APIGuildForumTag { /** * The id of the tag */ id: Snowflake; /** * The name of the tag (0-20 characters) */ name: string; /** * Whether this tag can only be added to or removed from threads by a member with the `MANAGE_THREADS` permission */ moderated: boolean; /** * The id of a guild's custom emoji */ emoji_id: Snowflake | null; /** * The unicode character of the emoji */ emoji_name: string | null; } /** * @see {@link https://discord.com/developers/docs/resources/channel#default-reaction-object-default-reaction-structure} */ export interface APIGuildForumDefaultReactionEmoji { /** * The id of a guild's custom emoji */ emoji_id: Snowflake | null; /** * The unicode character of the emoji */ emoji_name: string | null; } /** * @see {@link https://discord.com/developers/docs/resources/channel/#channel-object-sort-order-types} */ export declare enum SortOrderType { /** * Sort forum posts by activity */ LatestActivity = 0, /** * Sort forum posts by creation time (from most recent to oldest) */ CreationDate = 1 } /** * @see {@link https://discord.com/developers/docs/resources/channel/#channel-object-forum-layout-types} */ export declare enum ForumLayoutType { /** * No default has been set for forum channel */ NotSet = 0, /** * Display posts as a list */ ListView = 1, /** * Display posts as a collection of tiles */ GalleryView = 2 } export interface APIThreadOnlyChannel<T extends ChannelType.GuildForum | ChannelType.GuildMedia> extends APIGuildChannel<T>, APISortableChannel { /** * The channel topic (0-4096 characters) */ topic?: string | null; /** * The id of the last thread created in this channel (may not point to an existing or valid thread) */ last_message_id?: Snowflake | null; /** * Amount of seconds a user has to wait before creating another thread (0-21600); * bots, as well as users with the permission `MANAGE_MESSAGES` or `MANAGE_CHANNELS`, are unaffected * * The absence of this field in API calls and Gateway events should indicate that slowmode has been reset to the default value. */ rate_limit_per_user?: number; /** * When the last pinned message was pinned. * This may be `null` in events such as `GUILD_CREATE` when a message is not pinned */ last_pin_timestamp?: string | null; /** * Default duration for newly created threads, in minutes, to automatically archive the thread after recent activity */ default_auto_archive_duration?: ThreadAutoArchiveDuration; /** * The set of tags that can be used in a thread-only channel */ available_tags: APIGuildForumTag[]; /** * The initial `rate_limit_per_user` to set on newly created threads. * This field is copied to the thread at creation time and does not live update */ default_thread_rate_limit_per_user?: number; /** * The emoji to show in the add reaction button on a thread in a thread-only channel */ default_reaction_emoji: APIGuildForumDefaultReactionEmoji | null; /** * The default sort order type used to order posts in a thread-only channel */ default_sort_order: SortOrderType | null; } export interface APIGuildForumChannel extends APIThreadOnlyChannel<ChannelType.GuildForum> { /** * The default layout type used to display posts in a forum channel * * @defaultValue `ForumLayoutType.NotSet` which indicates a layout view has not been set by a channel admin */ default_forum_layout: ForumLayoutType; } export type APIGuildMediaChannel = APIThreadOnlyChannel<ChannelType.GuildMedia>; /** * @see {@link https://discord.com/developers/docs/resources/channel#channel-object-channel-structure} */ export type APIChannel = APIAnnouncementThreadChannel | APIDMChannel | APIGroupDMChannel | APIGuildCategoryChannel | APIGuildForumChannel | APIGuildMediaChannel | APIGuildStageVoiceChannel | APIGuildVoiceChannel | APINewsChannel | APIPrivateThreadChannel | APIPublicThreadChannel | APITextChannel; /** * @see {@link https://discord.com/developers/docs/resources/channel#channel-object-channel-types} */ export declare enum ChannelType { /** * A text channel within a guild */ GuildText = 0, /** * A direct message between users */ DM = 1, /** * A voice channel within a guild */ GuildVoice = 2, /** * A direct message between multiple users */ GroupDM = 3, /** * An organizational category that contains up to 50 channels * * @see {@link https://support.discord.com/hc/articles/115001580171} */ GuildCategory = 4, /** * A channel that users can follow and crosspost into their own guild * * @see {@link https://support.discord.com/hc/articles/360032008192} */ GuildAnnouncement = 5, /** * A temporary sub-channel within a Guild Announcement channel */ AnnouncementThread = 10, /** * A temporary sub-channel within a Guild Text or Guild Forum channel */ PublicThread = 11, /** * A temporary sub-channel within a Guild Text channel that is only viewable by those invited and those with the Manage Threads permission */ PrivateThread = 12, /** * A voice channel for hosting events with an audience * * @see {@link https://support.discord.com/hc/articles/1500005513722} */ GuildStageVoice = 13, /** * The channel in a Student Hub containing the listed servers * * @see {@link https://support.discord.com/hc/articles/4406046651927} */ GuildDirectory = 14, /** * A channel that can only contain threads */ GuildForum = 15, /** * A channel like forum channels but contains media for server subscriptions * * @see {@link https://creator-support.discord.com/hc/articles/14346342766743} */ GuildMedia = 16, /** * A channel that users can follow and crosspost into their own guild * * @deprecated This is the old name for {@link ChannelType.GuildAnnouncement} * @see {@link https://support.discord.com/hc/articles/360032008192} */ GuildNews = 5, /** * A temporary sub-channel within a Guild Announcement channel * * @deprecated This is the old name for {@link ChannelType.AnnouncementThread} */ GuildNewsThread = 10, /** * A temporary sub-channel within a Guild Text channel * * @deprecated This is the old name for {@link ChannelType.PublicThread} */ GuildPublicThread = 11, /** * A temporary sub-channel within a Guild Text channel that is only viewable by those invited and those with the Manage Threads permission * * @deprecated This is the old name for {@link ChannelType.PrivateThread} */ GuildPrivateThread = 12 } export declare enum VideoQualityMode { /** * Discord chooses the quality for optimal performance */ Auto = 1, /** * 720p */ Full = 2 } export interface APIMessageMentions { /** * Users specifically mentioned in the message * * The `member` field is only present in `MESSAGE_CREATE` and `MESSAGE_UPDATE` events * from text-based guild channels * * @see {@link https://discord.com/developers/docs/resources/user#user-object} * @see {@link https://discord.com/developers/docs/resources/guild#guild-member-object} */ mentions: APIUser[]; } /** * @see {@link https://discord.com/developers/docs/resources/channel#message-object-message-structure} */ export interface APIBaseMessageNoChannel { /** * ID of the message */ id: Snowflake; /** * The author of this message (only a valid user in the case where the message is generated by a user or bot user) * * If the message is generated by a webhook, the author object corresponds to the webhook's id, * username, and avatar. You can tell if a message is generated by a webhook by checking for the `webhook_id` property * * @see {@link https://discord.com/developers/docs/resources/user#user-object} */ author: APIUser; /** * Contents of the message * * The `MESSAGE_CONTENT` privileged gateway intent is required for verified applications to receive a non-empty value from this field * * In the Discord Developers Portal, you need to enable the toggle of this intent of your application in **Bot \> Privileged Gateway Intents** * * @see {@link https://support-dev.discord.com/hc/articles/6207308062871} */ content: string; /** * When this message was sent */ timestamp: string; /** * When this message was edited (or null if never) */ edited_timestamp: string | null; /** * Whether this was a TTS message */ tts: boolean; /** * Whether this message mentions everyone */ mention_everyone: boolean; /** * Roles specifically mentioned in this message * * @see {@link https://discord.com/developers/docs/topics/permissions#role-object} */ mention_roles: APIRole['id'][]; /** * Channels specifically mentioned in this message * * Not all channel mentions in a message will appear in `mention_channels`. * - Only textual channels that are visible to everyone in a lurkable guild will ever be included * - Only crossposted messages (via Channel Following) currently include `mention_channels` at all * * If no mentions in the message meet these requirements, this field will not be sent * * @see {@link https://discord.com/developers/docs/resources/channel#channel-mention-object} */ mention_channels?: APIChannelMention[]; /** * Any attached files * * @see {@link https://discord.com/developers/docs/resources/message#attachment-object-attachment-structure} * * The `MESSAGE_CONTENT` privileged gateway intent is required for verified applications to receive a non-empty value from this field * * In the Discord Developers Portal, you need to enable the toggle of this intent of your application in **Bot \> Privileged Gateway Intents** * @see {@link https://support-dev.discord.com/hc/articles/6207308062871} */ attachments: APIAttachment[]; /** * Any embedded content * * @see {@link https://discord.com/developers/docs/resources/channel#embed-object} * * The `MESSAGE_CONTENT` privileged gateway intent is required for verified applications to receive a non-empty value from this field * * In the Discord Developers Portal, you need to enable the toggle of this intent of your application in **Bot \> Privileged Gateway Intents** * @see {@link https://support-dev.discord.com/hc/articles/6207308062871} */ embeds: APIEmbed[]; /** * Reactions to the message * * @see {@link https://discord.com/developers/docs/resources/channel#reaction-object} */ reactions?: APIReaction[]; /** * A nonce that can be used for optimistic message sending (up to 25 characters) * * **You will not receive this from further fetches. This is received only once from a `MESSAGE_CREATE` * event to ensure it got sent** */ nonce?: number | string; /** * Whether this message is pinned */ pinned: boolean; /** * If the message is generated by a webhook, this is the webhook's id */ webhook_id?: Snowflake; /** * Type of message * * @see {@link https://discord.com/developers/docs/resources/channel#message-object-message-types} */ type: MessageType; /** * Sent with Rich Presence-related chat embeds * * @see {@link https://discord.com/developers/docs/resources/channel#message-object-message-activity-structure} */ activity?: APIMessageActivity; /** * Sent with Rich Presence-related chat embeds * * @see {@link https://discord.com/developers/docs/resources/application#application-object} */ application?: Partial<APIApplication>; /** * If the message is a response to an Interaction, this is the id of the interaction's application */ application_id?: Snowflake; /** * Reference data sent with crossposted messages, replies, pins, and thread starter messages * * @see {@link https://discord.com/developers/docs/resources/channel#message-reference-object-message-reference-structure} */ message_reference?: APIMessageReference; /** * Message flags combined as a bitfield * * @see {@link https://discord.com/developers/docs/resources/channel#message-object-message-flags} * @see {@link https://en.wikipedia.org/wiki/Bit_field} */ flags?: MessageFlags; /** * The message associated with the `message_reference` * * This field is only returned for messages with a `type` of `19` (REPLY). * * If the message is a reply but the `referenced_message` field is not present, * the backend did not attempt to fetch the message that was being replied to, * so its state is unknown. * * If the field exists but is `null`, the referenced message was deleted * * @see {@link https://discord.com/developers/docs/resources/channel#message-object} */ referenced_message?: APIMessage | null; /** * Sent if the message is sent as a result of an interaction */ interaction_metadata?: APIMessageInteractionMetadata; /** * Sent if the message is a response to an Interaction * * @deprecated In favor of `interaction_metadata` */ interaction?: APIMessageInteraction; /** * Sent if a thread was started from this message */ thread?: APIChannel; /** * Sent if the message contains components like buttons, action rows, or other interactive components * * The `MESSAGE_CONTENT` privileged gateway intent is required for verified applications to receive a non-empty value from this field * * In the Discord Developers Portal, you need to enable the toggle of this intent of your application in **Bot \> Privileged Gateway Intents** * * @see {@link https://support-dev.discord.com/hc/articles/6207308062871} */ components?: APIMessageTopLevelComponent[]; /** * Sent if the message contains stickers * * @see {@link https://discord.com/developers/docs/resources/sticker#sticker-item-object} */ sticker_items?: APIStickerItem[]; /** * The stickers sent with the message * * @see {@link https://discord.com/developers/docs/resources/sticker#sticker-object} * @deprecated Use {@link APIBaseMessageNoChannel.sticker_items} instead */ stickers?: APISticker[]; /** * A generally increasing integer (there may be gaps or duplicates) that represents the approximate position of the message in a thread * * It can be used to estimate the relative position of the message in a thread in company with `total_message_sent` on parent thread */ position?: number; /** * Data of the role subscription purchase or renewal that prompted this `ROLE_SUBSCRIPTION_PURCHASE` message */ role_subscription_data?: APIMessageRoleSubscriptionData; /** * Data for users, members, channels, and roles in the message's auto-populated select menus * * @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object-resolved-data-structure} */ resolved?: APIInteractionDataResolved; /** * A poll! * * The `MESSAGE_CONTENT` privileged gateway intent is required for verified applications to receive a non-empty value from this field * * In the Discord Developers Portal, you need to enable the toggle of this intent of your application in **Bot \> Privileged Gateway Intents**. * * @see {@link https://support-dev.discord.com/hc/articles/6207308062871} */ poll?: APIPoll; /** * The message associated with the message_reference. This is a minimal subset of fields in a message (e.g. author is excluded.) */ message_snapshots?: APIMessageSnapshot[]; /** * The call associated with the message */ call?: APIMessageCall; } /** * @see {@link https://discord.com/developers/docs/resources/channel#message-object-message-structure} */ export interface APIBaseMessage extends APIBaseMessageNoChannel { /** * ID of the channel the message was sent in */ channel_id: Snowflake; } /** * @see {@link https://discord.com/developers/docs/resources/channel#message-object-message-structure} */ export interface APIMessage extends APIBaseMessage, APIMessageMentions { } /** * @see {@link https://discord.com/developers/docs/resources/channel#message-object-message-types} */ export declare enum MessageType { Default = 0, RecipientAdd = 1, RecipientRemove = 2, Call = 3, ChannelNameChange = 4, ChannelIconChange = 5, ChannelPinnedMessage = 6, UserJoin = 7, GuildBoost = 8, GuildBoostTier1 = 9, GuildBoostTier2 = 10, GuildBoostTier3 = 11, ChannelFollowAdd = 12, GuildDiscoveryDisqualified = 14, GuildDiscoveryRequalified = 15, GuildDiscoveryGracePeriodInitialWarning = 16, GuildDiscoveryGracePeriodFinalWarning = 17, ThreadCreated = 18, Reply = 19, ChatInputCommand = 20, ThreadStarterMessage = 21, GuildInviteReminder = 22, ContextMenuCommand = 23, AutoModerationAction = 24, RoleSubscriptionPurchase = 25, InteractionPremiumUpsell = 26, StageStart = 27, StageEnd = 28, StageSpeaker = 29, /** * @unstable https://github.com/discord/discord-api-docs/pull/5927#discussion_r1107678548 */ StageRaiseHand = 30, StageTopic = 31, GuildApplicationPremiumSubscription = 32, GuildIncidentAlertModeEnabled = 36, GuildIncidentAlertModeDisabled = 37, GuildIncidentReportRaid = 38, GuildIncidentReportFalseAlarm = 39, PurchaseNotification = 44, PollResult = 46 } /** * @see {@link https://discord.com/developers/docs/resources/channel#message-object-message-activity-structure} */ export interface APIMessageActivity { /** * Type of message activity * * @see {@link https://discord.com/developers/docs/resources/channel#message-object-message-activity-types} */ type: MessageActivityType; /** * `party_id` from a Rich Presence event * * @see {@link https://discord.com/developers/docs/rich-presence/how-to#updating-presence-update-presence-payload-fields} */ party_id?: string; } /** * @see {@link https://discord.com/developers/docs/resources/channel#message-reference-object-message-reference-structure} */ export interface APIMessageReference { /** * Type of reference */ type?: MessageReferenceType; /** * ID of the originating message */ message_id?: Snowflake; /** * ID of the originating message's channel */ channel_id: Snowflake; /** * ID of the originating message's guild */ guild_id?: Snowflake; } /** * @see {@link https://discord.com/developers/docs/resources/channel#message-object-message-activity-types} */ export declare enum MessageActivityType { Join = 1, Spectate = 2, Listen = 3, JoinRequest = 5 } /** * @see {@link https://discord.com/developers/docs/resources/channel#message-reference-types} */ export declare enum MessageReferenceType { /** * A standard reference used by replies */ Default = 0, /** * Reference used to point to a message at a point in time */ Forward = 1 } /** * @see {@link https://discord.com/developers/docs/resources/channel#message-object-message-flags} */ export declare enum MessageFlags { /** * This message has been published to subscribed channels (via Channel Following) */ Crossposted = 1, /** * This message originated from a message in another channel (via Channel Following) */ IsCrosspost = 2, /** * Do not include any embeds when serializing this message */ SuppressEmbeds = 4, /** * The source message for this crosspost has been deleted (via Channel Following) */ SourceMessageDeleted = 8, /** * This message came from the urgent message system */ Urgent = 16, /** * This message has an associated thread, which shares its id */ HasThread = 32, /** * This message is only visible to the user who invoked the Interaction */ Ephemeral = 64, /** * This message is an Interaction Response and the bot is "thinking" */ Loading = 128, /** * This message failed to mention some roles and add their members to the thread */ FailedToMentionSomeRolesInThread = 256, /** * @unstable This message flag is currently not documented by Discord but has a known value which we will try to keep up to date. */ ShouldShowLinkNotDiscordWarning = 1024, /** * This message will not trigger push and desktop notifications */ SuppressNotifications = 4096, /** * This message is a voice message */ IsVoiceMessage = 8192, /** * This message has a snapshot (via Message Forwarding) */ HasSnapshot = 16384, /** * Allows you to create fully component-driven messages * * @see {@link https://discord.com/developers/docs/components/overview} */ IsComponentsV2 = 32768 } /** * @see {@link https://discord.com/developers/docs/resources/channel#message-call-object-message-call-object-structure} */ export interface APIMessageCall { /** * Array of user ids that participated in the call */ participants: Snowflake[]; /** * ISO8601 timestamp when the call ended */ ended_timestamp?: string | null; } /** * @see {@link https://discord.com/developers/docs/resources/channel#role-subscription-data-object-role-subscription-data-object-structure} */ export interface APIMessageRoleSubscriptionData { /** * The id of the SKU and listing the user is subscribed to */ role_subscription_listing_id: Snowflake; /** * The name of the tier the user is subscribed to */ tier_name: string; /** * The number of months the user has been subscribed for */ total_months_subscribed: number; /** * Whether this notification is for a renewal */ is_renewal: boolean; } /** * @see {@link https://discord.com/developers/docs/resources/channel#followed-channel-object} */ export interface APIFollowedChannel { /** * Source channel id */ channel_id: Snowflake; /** * Created target webhook id */ webhook_id: Snowflake; } /** * @see {@link https://discord.com/developers/docs/resources/channel#reaction-object-reaction-structure} */ export interface APIReaction { /** * Total number of times this emoji has been used to react (including super reacts) */ count: number; /** * An object detailing the individual reaction counts for different types of reactions */ count_details: APIReactionCountDetails; /** * Whether the current user reacted using this emoji */ me: boolean; /** * Whether the current user super-reacted using this emoji */ me_burst: boolean; /** * Emoji information * * @see {@link https://discord.com/developers/docs/resources/emoji#emoji-object} */ emoji: APIPartialEmoji; /** * Hexadecimal colors used for this super reaction */ burst_colors: string[]; } /** * @see {@link https://discord.com/developers/docs/resources/channel#reaction-count-details-object-reaction-count-details-structure} */ export interface APIReactionCountDetails { /** * Count of super reactions */ burst: number; /** * Count of normal reactions */ normal: number; } /** * @see {@link https://discord.com/developers/docs/resources/channel#overwrite-object-overwrite-structure} */ export interface APIOverwrite { /** * Role or user id */ id: Snowflake; /** * Either 0 (role) or 1 (member) */ type: OverwriteType; /** * Permission bit set * * @see {@link https://discord.com/developers/docs/topics/permissions#permissions-bitwise-permission-flags} * @see {@link https://en.wikipedia.org/wiki/Bit_field} */ allow: Permissions; /** * Permission bit set * * @see {@link https://discord.com/developers/docs/topics/permissions#permissions-bitwise-permission-flags} * @see {@link https://en.wikipedia.org/wiki/Bit_field} */ deny: Permissions; } export declare enum OverwriteType { Role = 0, Member = 1 } /** * @see {@link https://discord.com/developers/docs/resources/channel#thread-metadata-object-thread-metadata-structure} */ export interface APIThreadMetadata { /** * Whether the thread is archived */ archived: boolean; /** * Duration in minutes to automatically archive the thread after recent activity, can be set to: 60, 1440, 4320, 10080 */ auto_archive_duration: ThreadAutoArchiveDuration; /** * An ISO8601 timestamp when the thread's archive status was last changed, used for calculating recent activity */ archive_timestamp: string; /** * Whether the thread is locked; when a thread is locked, only users with `MANAGE_THREADS` can unarchive it */ locked: boolean; /** * Whether non-moderators can add other non-moderators to the thread; only available on private threads */ invitable?: boolean; /** * Timestamp when the thread was created; only populated for threads created after 2022-01-09 */ create_timestamp?: string; } export declare enum ThreadAutoArchiveDuration { OneHour = 60, OneDay = 1440, ThreeDays = 4320, OneWeek = 10080 } /** * @see {@link https://discord.com/developers/docs/resources/channel#thread-member-object-thread-member-structure} */ export interface APIThreadMember { /** * The id of the thread * * **This field is omitted on the member sent within each thread in the `GUILD_CREATE` event** */ id?: Snowflake; /** * The id of the member * * **This field is omitted on the member sent within each thread in the `GUILD_CREATE` event** */ user_id?: Snowflake; /** * An ISO8601 timestamp for when the member last joined */ join_timestamp: string; /** * Member flags combined as a bitfield * * @see {@link https://en.wikipedia.org/wiki/Bit_field} */ flags: ThreadMemberFlags; /** * Additional information about the user * * **This field is omitted on the member sent within each thread in the `GUILD_CREATE` event** * * **This field is only present when `with_member` is set to true when calling `List Thread Members` or `Get Thread Member`** */ member?: APIGuildMember; } export declare enum ThreadMemberFlags { /** * @unstable This thread member flag is currently not documented by Discord but has a known value which we will try to keep up to date. */ HasInteracted = 1, /** * @unstable This thread member flag is currently not documented by Discord but has a known value which we will try to keep up to date. */ AllMessages = 2, /** * @unstable This thread member flag is currently not documented by Discord but has a known value which we will try to keep up to date. */ OnlyMentions = 4, /** * @unstable This thread member flag is currently not documented by Discord but has a known value which we will try to keep up to date. */ NoMessages = 8 } export interface APIThreadList { /** * The threads that were fetched */ threads: APIChannel[]; /** * The members for the client user in each of the fetched threads */ members: APIThreadMember[]; /** * Whether there are potentially additional threads */ has_more?: boolean; } /** * @see {@link https://discord.com/developers/docs/resources/channel#embed-object-embed-structure} * * Length limit: 6000 characters */ export interface APIEmbed { /** * Title of embed * * Length limit: 256 characters */ title?: string; /** * Type of embed (always "rich" for webhook embeds) */ type?: EmbedType; /** * Description of embed * * Length limit: 4096 characters */ description?: string; /** * URL of embed */ url?: string; /** * Timestamp of embed content */ timestamp?: string; /** * Color code of the embed */ color?: number; /** * Footer information * * @see {@link https://discord.com/developers/docs/resources/channel#embed-object-embed-footer-structure} */ footer?: APIEmbedFooter; /** * Image information * * @see {@link https://discord.com/developers/docs/resources/channel#embed-object-embed-image-structure} */ image?: APIEmbedImage; /** * Thumbnail information * * @see {@link https://discord.com/developers/docs/resources/channel#embed-object-embed-thumbnail-structure} */ thumbnail?: APIEmbedThumbnail; /** * Video information * * @see {@link https://discord.com/developers/docs/resources/channel#embed-object-embed-video-structure} */ video?: APIEmbedVideo; /** * Provider information * * @see {@link https://discord.com/developers/docs/resources/channel#embed-object-embed-provider-structure} */ provider?: APIEmbedProvider; /** * Author information * * @see {@link https://discord.com/developers/docs/resources/channel#embed-object-embed-author-structure} */ author?: APIEmbedAuthor; /** * Fields information * * Length limit: 25 field objects * * @see {@link https://discord.com/developers/docs/resources/channel#embed-object-embed-field-structure} */ fields?: APIEmbedField[]; } /** * @see {@link https://discord.com/developers/docs/resources/channel#embed-object-embed-types} */ export declare enum EmbedType { /** * Generic embed rendered from embed attributes */ Rich = "rich", /** * Image embed */ Image = "image", /** * Video embed */ Video = "video", /** * Animated gif image embed rendered as a video embed */ GIFV = "gifv", /** * Article embed */ Article = "article", /** * Link embed */ Link = "link", /** * Auto moderation alert embed * * @unstable This embed type is currently not documented by Discord, but it is returned in the auto moderation system messages. */ AutoModerationMessage = "auto_moderation_message", /** * Poll result embed */ PollResult = "poll_result" } /** * @see {@link https://discord.com/developers/docs/resources/channel#embed-object-embed-thumbnail-structure} */ export interface APIEmbedThumbnail { /** * Source url of thumbnail (only supports http(s) and attachments) */ url: string; /** * A proxied url of the thumbnail */ proxy_url?: string; /** * Height of thumbnail */ height?: number; /** * Width of thumbnail */ width?: number; } /** * @see {@link https://discord.com/developers/docs/resources/channel#embed-object-embed-video-structure} */ export interface APIEmbedVideo { /** * Source url of video */ url?: string; /** * A proxied url of the video */ proxy_url?: string; /** * Height of video */ height?: number; /** * Width of video */ width?: number; } /** * @see {@link https://discord.com/developers/docs/resources/channel#embed-object-embed-image-structure} */ export interface APIEmbedImage { /** * Source url of image (only supports http(s) and attachments) */ url: string; /** * A proxied url of the image */ proxy_url?: string; /** * Height of image */ height?: number; /** * Width of image */ width?: number; } /** * @see {@link https://discord.com/developers/docs/resources/channel#embed-object-embed-provider-structure} */ export interface APIEmbedProvider { /** * Name of provider */ name?: string; /** * URL of provider */ url?: string; } /** * @see {@link https://discord.com/developers/docs/resources/channel#embed-object-embed-author-structure} */ export interface APIEmbedAuthor { /** * Name of author * * Length limit: 256 characters */ name: string; /** * URL of author */ url?: string; /** * URL of author icon (only supports http(s) and attachments) */ icon_url?: string; /** * A proxied url of author icon */ proxy_icon_url?: string; } /** * @see {@link https://discord.com/developers/docs/resources/channel#embed-object-embed-footer-structure} */ export interface APIEmbedFooter { /** * Footer text * * Length limit: 2048 characters */ text: string; /** * URL of footer icon (only supports http(s) and attachments) */ icon_url?: string; /** * A proxied url of footer icon */ proxy_icon_url?: string; } /** * @see {@link https://discord.com/developers/docs/resources/channel#embed-object-embed-field-structure} */ export interface APIEmbedField { /** * Name of the field * * Length limit: 256 characters */ name: string; /** * Value of the field * * Length limit: 1024 characters */ value: string; /** * Whether or not this field should display inline */ inline?: boolean; } /** * @see {@link https://discord.com/developers/docs/resources/message#attachment-object-attachment-structure} */ export interface APIAttachment { /** * Attachment id */ id: Snowflake; /** * Name of file attached */ filename: string; /** * The title of the file */ title?: string; /** * Description for the file */ description?: string; /** * The attachment's media type * * @see {@link https://en.wikipedia.org/wiki/Media_type} */ content_type?: string; /** * Size of file in bytes */ size: number; /** * Source url of file */ url: string; /** * A proxied url of file */ proxy_url: string; /** * Height of file (if image) */ height?: number | null; /** * Width of file (if image) */ width?: number | null; /** * Whether this attachment is ephemeral */ ephemeral?: boolean; /** * The duration of the audio file (currently for voice messages) */ duration_secs?: number; /** * Base64 encoded bytearray representing a sampled waveform (currently for voice messages) */ waveform?: string; /** * Attachment flags combined as a bitfield */ flags?: AttachmentFlags; } /** * @see {@link https://discord.com/developers/docs/resources/channel#attachment-object-attachment-structure-attachment-flags} */ export declare enum AttachmentFlags { /** * This attachment has been edited using the remix feature on mobile */ IsRemix = 4 } /** * @see {@link https://discord.com/developers/docs/resources/channel#channel-mention-object-channel-mention-structure} */ export interface APIChannelMention { /** * ID of the channel */ id: Snowflake; /** * ID of the guild containing the channel */ guild_id: Snowflake; /** * The type of channel * * @see {@link https://discord.com/developers/docs/resources/channel#channel-object-channel-types} */ type: ChannelType; /** * The name of the channel */ name: string; } /** * @see {@link https://discord.com/developers/docs/resources/channel#allowed-mentions-object-allowed-mention-types} */ export declare enum AllowedMentionsTypes { /** * Controls `@everyone` and `@here` mentions */ Everyone = "everyone", /** * Controls role mentions */ Role = "roles", /** * Controls user mentions */ User = "users" } /** * @see {@link https://discord.com/developers/docs/resources/channel#allowed-mentions-object-allowed-mentions-structure} */ export interface APIAllowedMentions { /** * An array of allowed mention types to parse from the content * * @see {@link https://discord.com/developers/docs/resources/channel#allowed-mentions-object-allowed-mention-types} */ parse?: AllowedMentionsTypes[]; /** * Array of role_ids to mention (Max size of 100) */ roles?: Snowflake[]; /** * Array of user_ids to mention (Max size of 100) */ users?: Snowflake[]; /** * For replies, whether to mention the author of the message being replied to * * @defaultValue `false` */ replied_user?: boolean; } /** * @see {@link https://discord.com/developers/docs/components/reference#anatomy-of-a-component} */ export interface APIBaseComponent<T extends ComponentType> { /** * The type of the component */ type: T; /** * 32 bit integer used as an optional identifier for component * * The id field is optional and is used to identify components in the response from an interaction that aren't interactive components. The id must be unique within the message and is generated sequentially if left empty. Generation of ids won't use another id that exists in the message if you have one defined for another component. */ id?: number; } /** * @see {@link https://discord.com/developers/docs/components/reference#component-object-component-types} */ export declare enum ComponentType { /** * Container to display a row of interactive components */ ActionRow = 1, /** * Button component */ Button = 2, /** * Select menu for picking from defined text options */ StringSelect = 3, /** * Text Input component */ TextInput = 4, /** * Select menu for users */ UserSelect = 5, /** * Select menu for roles */ RoleSelect = 6, /** * Select menu for users and roles */ MentionableSelect = 7, /** * Select menu for channels */ ChannelSelect = 8, /** * Container to display text alongside an accessory component */ Section = 9, /** * Markdown text */ TextDisplay = 10, /** * Small image that can be used as an accessory */ Thumbnail = 11, /** * Display images and other media */ MediaGallery = 12, /** * Displays an attached file */ File = 13, /** * Component to add vertical padding between other components */ Separator = 14, /** * @unstable This component type is currently not documented by Discord but has a known value which we will try to keep up to date. */ ContentInventoryEntry = 16, /** * Container that visually groups a set of components */ Container = 17, /** * Select menu for picking from defined text options * * @deprecated This is the old name for {@link ComponentType.StringSelect} */ SelectMenu = 3 } /** * @see {@link https://discord.com/developers/docs/components/reference#action-row} */ export interface APIActionRowComponent<T extends APIComponentInActionRow> extends APIBaseComponent<ComponentType.ActionRow> { /** * The components in the ActionRow */ components: T[]; } export interface APIButtonBase<Style extends ButtonStyle> extends APIBaseComponent<ComponentType.Button> { /** * The style of the button */ style: Style; /** * The status of the button */ disabled?: boolean; } /** * @see {@link https://discord.com/developers/docs/components/reference#button} */ export interface APIButtonComponentBase<Style extends ButtonStyle> extends APIButtonBase<Style> { /** * The label to be displayed on the button */ label?: string; /** * The emoji to display to the left of the text */ emoji?: APIMessageComponentEmoji; } export interface APIMessageComponentEmoji { /** * Emoji id */ id?: Snowflake; /** * Emoji name */ name?: string; /** * Whether this emoji is animated */ animated?: boolean; } /** * @see {@link https://discord.com/developers/docs/components/reference#button} */ export interface APIButtonComponentWithCustomId extends APIButtonComponentBase<ButtonStyle.Danger | ButtonStyle.Primary | ButtonStyle.Secondary | ButtonStyle.Success> { /** * The custom_id to be sent in the interaction when clicked */ custom_id: string; } /** * @see {@link https://discord.com/developers/docs/components/reference#button} */ export interface APIButtonComponentWithURL extends APIButtonComponentBase<ButtonStyle.Link> { /** * The URL to direct users to when clicked for Link buttons */ url: string; } /** * @see {@link https://discord.com/developers/docs/components/reference#button} */ export interface APIButtonComponentWithSKUId extends APIButtonBase<ButtonStyle.Premium> { /** * The id for a purchasable SKU */ sku_id: Snowflake; } /** * A Button is an interactive component that can only be used in messages. It creates clickable elements that users can interact with, sending an interaction to your app when clicked. * * Buttons must be placed inside an Action Row or a Section's accessory field. * * @see {@link https://discord.com/developers/docs/components/reference#button} */ export type APIButtonComponent = APIButtonComponentWithCustomId | APIButtonComponentWithSKUId | APIButtonComponentWithURL; /** * @see {@link https://discord.com/developers/docs/components/reference#button-button-styles} */ export declare enum ButtonStyle { /** * The most important or recommended action in a group of options */ Primary = 1, /** * Alternative or supporting actions */ Secondary = 2, /** * Positive confirmation or completion actions */ Success = 3, /** * An action with irreversible consequences */ Danger = 4, /** * Navigates to a URL */ Link = 5, /** * Purchase */ Premium = 6 } /** * @see {@link https://discord.com/developers/docs/components/reference#text-input-text-input-styles} */ export declare enum TextInputStyle { /** * Single-line input */ Short = 1, /** * Multi-line input */ Paragraph = 2 } /** * @see {@link https://discord.com/developers/docs/components/reference} */ export interface APIBaseSelectMenuComponent<T extends ComponentType.ChannelSelect | ComponentType.MentionableSelect | ComponentType.RoleSelect | ComponentType.StringSelect | ComponentType.UserSelect> extends APIBaseComponent<T> { /** * A developer-defined identifier for the select menu, max 100 characters */ custom_id: string; /** * Custom placeholder text if nothing is selected, max 150 characters */ placeholder?: string; /** * The minimum number of items that must be chosen; min 0, max 25 * * @defaultValue `1` */ min_values?: number; /** * The maximum number of items that can be chosen; max 25 * * @defaultValue `1` */ max_values?: number; /** * Disable the select * * @defaultValue `false` */ disabled?: boolean; } /** * @see {@link https://discord.com/developers/docs/components/reference} */ export interface APIBaseAutoPopulatedSelectMenuComponent<T extends ComponentType.ChannelSelect | ComponentType.MentionableSelect | ComponentType.RoleSelect | ComponentType.UserSelect, D extends SelectMenuDefaultValueType> extends APIBaseSelectMenuComponent<T> { /** * List of default values for auto-populated select menu components */ default_values?: APISelectMenuDefaultValue<D>[]; } /** * A String Select is an interactive component that allows users to select one or more provided options in a message. * * String Selects can be configured for both single-select and multi-select behavior. When a user finishes making their choice(s) your app receives an interaction. * * String Selects must be placed inside an Action Row and are only available in messages. An Action Row can contain only one select menu and cannot contain buttons if it has a select menu. * * @see {@link https://discord.com/developers/docs/components/reference#string-select} */ export interface APIStringSelectComponent extends APIBaseSelectMenuComponent<ComponentType.StringSelect> { /** * Specified choices in a select menu; max 25 */ options: APISelectMenuOption[]; } /** * A User Select is an interactive component that allows users to select one or more users in a message. Options are automatically populated based on the server's available users. * * User Selects can be configured for both single-select and multi-select behavior. When a user finishes making their choice(s) your app receives an interaction. * * User Selects must be placed inside an Action Row and are only available in messages. An Action Row can contain only one select menu and cannot contain buttons if it has a select menu. * * @see {@link https://discord.com/developers/docs/components/reference#user-select} */ export type APIUserSelectComponent = APIBaseAutoPopulatedSelectMenuComponent<ComponentType.UserSelect, SelectMenuDefaultValueType.User>; /** * A Role Select is an interactive component that allows users to select one or more roles in a message. Options are automatically populated based on the server's available roles. * * Role Selects can be configured for both single-select and multi-select behavior. When a user finishes making their choice(s) your app receives an interaction. * * Role Selects must be placed inside an Action Row and are only available in messages. An Action Row can contain only one select menu and cannot contain buttons if it has a select menu. * * @see {@link https://discord.com/developers/docs/components/reference#role-select} */ export type APIRoleSelectComponent = APIBaseAutoPopulatedSelectMenuComponent<ComponentType.RoleSelect, SelectMenuDefaultValueType.Role>; /** * A Mentionable Select is an interactive component that allows users to select one or more mentionables in a message. Options are automatically populated based on available mentionables in the server. * * Mentionable Selects can be configured for both single-select and multi-select behavior. When a user finishes making their choice(s), your app receives an interaction. * * Mentionable Selects must be placed inside an Action Row and are only available in messages. An Action Row can contain only one select menu and cannot contain buttons if it has a select menu. * * @see {@link https://discord.com/developers/docs/components/reference#mentionable-select} */ export type APIMentionableSelectComponent = APIBaseAutoPopulatedSelectMenuComponent<ComponentType.MentionableSelect, SelectMenuDefaultValueType.Role | SelectMenuDefaultValueType.User>; /** * A Channel Select is an interactive component that allows users to select one or more channels in a message. Options are automatically populated based on available channels in the server and can be filtered by channel types. * * Channel Selects can be configured for both single-select and multi-select behavior. When a user finishes making their choice(s) your app receives an interaction. * * Channel Selects must be placed inside an Action Row and are only available in messages. An Action Row can contain only one select menu and cannot contain buttons if it has a select menu. * * @see {@link https://discord.com/developers/docs/components/reference#channel-select} */ export interface APIChannelSelectComponent extends APIBaseAutoPopulatedSelectMenuComponent<ComponentType.ChannelSelect, SelectMenuDefaultValueType.Channel> { /** * List of channel types to include in the ChannelSelect component */ channel_types?: ChannelType[]; } /** * @see {@link https://discord.com/developers/docs/components/reference#user-select-select-default-value-structure} */ export declare enum SelectMenuDefaultValueType { Channel = "channel", Role = "role", User = "user" } /** * @see {@link https://discord.com/developers/docs/components/reference#user-select-select-default-value-structure} */ export interface APISelectMenuDefaultValue<T extends SelectMenuDefaultValueType> { type: T; id: Snowflake; } /** * @see {@link https://discord.com/developers/docs/components/reference} */ export type APIAutoPopulatedSelectMenuComponent = APIChannelSelectComponent | APIMentionableSelectComponent | APIRoleSelectComponent | APIUserSelectComponent; /** * @see {@link https://discord.com/developers/docs/components/reference} */ export type APISelectMenuComponent = APIChannelSelectComponent | APIMentionableSelectComponent | APIRoleSelectComponent | APIStringSelectComponent | APIUserSelectComponent; /** * @see {@link https://discord.com/developers/docs/components/reference#string-select-select-option-structure} */ export interface APISelectMenuOption { /** * The user-facing name of the option (max 100 chars) */ label: string; /** * The dev-defined value of the option (max 100 chars) */ value: string; /** * An additional description of the option (max 100 chars) */ description?: string; /** * The emoji to display to the left of the option */ emoji?: APIMessageComponentEmoji; /** * Whether this option should be already-selected by default */ default?: boolean; } /** * Text Input is an interactive component that allows users to enter free-form text responses in modals. It supports both short, single-line inputs and longer, multi-line paragraph inputs. * * Text Inputs can only be used within modals and must be placed inside an Action Row. * * When defining a text input component, you can set attributes to customize the behavior and appearance of it. However, not all attributes will be returned in the text input interaction payload. * * @see {@link https://discord.com/developers/docs/components/reference#text-input} */ export interface APITextInputComponent extends APIBaseComponent<ComponentType.TextInput> { /** * One of text input styles */ style: TextInputStyle; /** * The custom id for the text input */ custom_id: string; /** * Text that appears on top of the text input field, max 45 characters */ label: string; /** * Placeholder for the text input */ placeholder?: string; /** * The pre-filled text in the text input */ value?: string; /** * Minimal length of text input */ min_length?: number; /** * Maximal length of text input */ max_length?: number; /** * Whether or not this text input is required or not */ required?: boolean; } export declare enum UnfurledMediaItemLoadingState { Unknown = 0, Loading = 1, LoadedSuccess = 2, LoadedNotFound = 3 } /** * @see {@link https://discord.com/developers/docs/components/reference#unfurled-media-item-structure} */ export interface APIUnfurledMediaItem { /** * Supports arbitrary urls and attachment://<filename> references */ url: string; /** * The proxied url of the media item. This field is ignored and provided by the API as part of the response */ proxy_url?: string; /** * The width of the media item. This field is ignored and provided by the API as part of the response */ width?: number | null; /** * The height of the media item. This field is ignored and provided by the API as part of the response */ height?: number | null; placeholder?: string | null; placeholder_version?: number | null; /** * The media type of the content. This field is ignored and provided by the API as part of the response * * @see {@link https://en.wikipedia.org/wiki/Media_type} */ content_type?: string | null; loading_state?: UnfurledMediaItemLoadingState; flags?: number; /** * The id of the uploaded attachment. This field is ignored and provided by the API as part of the response */ attachment_id?: Snowflake; } /** * A Section is a top-level layout component that allows you to join text contextually with an accessory. * * Sections are only available in messages. * * @see {@link https://discord.com/developers/docs/components/reference#section} */ export interface APISectionComponent extends APIBaseComponent<ComponentType.Section> { /** * One to three text components */ components: APITextDisplayComponent[]; /** * A thumbnail or a button component, with a future possibility of adding more compatible components */ accessory: APISectionAccessoryComponent; } /** * A Text Display is a top-level content component that allows you to add text to your message formatted with markdown and mention users and roles. This is similar to the content field of a message, but allows you to add multiple text components, controlling the layout of your message. * * Text Displays are only available in messages. * * @see {@link https://discord.com/developers/docs/components/reference#text-display} */ export interface APITextDisplayComponent extends APIBaseComponent<ComponentType.TextDisplay> { /** * Text that will be displayed similar to a message */ content: string; } /** * A Thumbnail is a content component that is a small image only usable as an accessory in a section. The preview comes from an url or attachment through the unfurled media item structure. * * Thumbnails are only available in messages as an accessory in a section. * * @see {@link https://discord.com/developers/docs/components/reference#thumbnail} */ export interface APIThumbnailComponent extends APIBaseComponent<ComponentType.Thumbnail> { /** * A url or attachment */ media: APIUnfurledMediaItem; /** * Alt text for the media */ description?: string | null; /** * Whether the thumbnail should be a spoiler (or blurred out) * * @defaultValue `false` */ spoiler?: boolean; } /** * @see {@link https://discord.com/developers/docs/components/reference#media-gallery-media-gallery-item-structure} */ export interface APIMediaGalleryItem { /** * A url or attachment */ media: APIUnfurledMediaItem; /** * Alt text for the media */ description?: string | null; /** * Whether the media should be a spoiler (or blurred out) * * @defaultValue `false` */ spoiler?: boolean; } /** * A Media Gallery is a top-level content component that allows you to display 1-10 media attachments in an organized gallery format. Each item can have optional descriptions and can be marked as spoilers. * * Media Galleries are only available in messages. * * @see {@link https://discord.com/developers/docs/components/reference#media-gallery} */ export interface APIMediaGalleryComponent extends APIBaseComponent<ComponentType.MediaGallery> { /** * 1 to 10 media gallery items */ items: APIMediaGalleryItem[]; } /** * A File is a top-level component that allows you to display an uploaded file as an attachment to the message and reference it in the component. * * Each file component can only display 1 attached file, but you can upload multiple files and add them to different file components within your payload. * * Files are only available in messages. * * @see {@link https://discord.com/developers/docs/components/reference#file} */ export interface APIFileComponent extends APIBaseComponent<ComponentType.File> { /** * This unfurled media item is unique in that it **only** support attachment references using the `attachment://<filename>` syntax */ file: APIUnfurledMediaItem; /** * Whether the media should be a spoiler (or blurred out) * * @defaultValue `false` */ spoiler?: boolean; } /** * @see {@link https://discord.com/developers/docs/components/reference#separator} */ export declare enum SeparatorSpacingSize { Small = 1, Large = 2 } /** * A Separator is a top-level layout component that adds vertical padding and visual division between other components. * * Separators are only available in messages. * * @see {@link https://discord.com/developers/docs/components/reference#separator} */ export interface APISeparatorComponent extends APIBaseComponent<ComponentType.Separator> { /** * Whether a visual divider should be displayed in the component * * @defaultValue `true` */ divider?: boolean; /** * Size of separator padding * * @defaultValue `SeparatorSpacingSize.Small` */ spacing?: SeparatorSpacingSize; } /** * A Container is a top-level layout component that holds up to 10 components. Containers are visually distinct from surrounding components and has an optional customizable color bar. * * Containers are only available in messages. * * @see {@link https://discord.com/developers/docs/components/reference#container} */ export interface APIContainerComponent extends APIBaseComponent<ComponentType.Container> { /** * Color for the accent on the container as RGB from `0x000000` to `0xFFFFFF` */ accent_color?: number | null; /** * Whether the container should be a spoiler (or blurred out) * * @defaultValue `false` */ spoiler?: boolean; /** * Up to 10 components of the type action row, text display, section, media gallery, separator, or file */ components: APIComponentInContainer[]; } /** * @see {@link https://discord.com/developers/docs/resources/channel#message-snapshot-object} */ export interface APIMessageSnapshot { /** * Subset of the message object fields */ message: APIMessageSnapshotFields; /** * Id of the origin message's guild * * @deprecated This field doesn't accurately reflect the Discord API as it doesn't exist nor is documented and will * be removed in the next major version. * * It was added in {@link https://github.com/discord/discord-api-docs/pull/6833/commits/d18f72d06d62e6b1d51ca2c1ef308ddc29ff3348 | d18f72d} * but was later removed before the PR ({@link https://github.com/discord/discord-api-docs/pull/6833 | discord-api-docs#6833}) was merged. * @see {@link https://github.com/discordjs/discord-api-types/pull/1084 | discord-api-types#1084} for more information. */ guild_id?: Snowflake; } /** * @see {@link https://discord.com/developers/docs/resources/channel#channel-object-channel-flags} */ export declare enum ChannelFlags { /** * @unstable This channel flag is currently not documented by Discord but has a known value which we will try to keep up to date. */ GuildFeedRemoved = 1, /** * This thread is pinned to the top of its parent forum channel */ Pinned = 2, /** * @unstable This channel flag is currently not documented by Discord but has a known value which we will try to keep up to date. */ ActiveChannelsRemoved = 4, /** * Whether a tag is required to be specified when creating a thread in a forum channel. * Tags are specified in the `applied_tags` field */ RequireTag = 16, /** * @unstable This channel flag is currently not documented by Discord but has a known value which we will try to keep up to date. */ IsSpam = 32, /** * @unstable This channel flag is currently not documented by Discord but has a known value which we will try to keep up to date. */ IsGuildResourceChannel = 128, /** * @unstable This channel flag is currently not documented by Discord but has a known value which we will try to keep up to date. */ ClydeAI = 256, /** * @unstable This channel flag is currently not documented by Discord but has a known value which we will try to keep up to date. */ IsScheduledForDeletion = 512, /** * Whether media download options are hidden. */ HideMediaDownloadOptions = 32768 } /** * All components that can appear in messages. * * For more specific sets, see {@link APIMessageTopLevelComponent}, {@link APIComponentInMessageActionRow}, {@link APIComponentInContainer}, and {@link APISectionAccessoryComponent} * * @see {@link https://discord.com/developers/docs/components/reference} */ export type APIMessageComponent = APIActionRowComponent<APIComponentInMessageActionRow> | APIButtonComponent | APIContainerComponent | APIFileComponent | APIMediaGalleryComponent | APISectionComponent | APISelectMenuComponent | APISeparatorComponent | APITextDisplayComponent | APIThumbnailComponent; /** * @see {@link https://discord.com/developers/docs/components/reference} */ export type APIMessageTopLevelComponent = APIActionRowComponent<APIComponentInMessageActionRow> | APIContainerComponent | APIFileComponent | APIMediaGalleryComponent | APISectionComponent | APISeparatorComponent | APITextDisplayComponent; /** * @see {@link https://discord.com/developers/docs/components/reference} */ export type APIModalComponent = APIActionRowComponent<APIComponentInModalActionRow> | APIComponentInModalActionRow; /** * @see {@link https://discord.com/developers/docs/components/reference#action-row} */ export type APIComponentInActionRow = APIComponentInMessageActionRow | APIComponentInModalActionRow; /** * @see {@link https://discord.com/developers/docs/components/reference#action-row} */ export type APIComponentInMessageActionRow = APIButtonComponent | APISelectMenuComponent; /** * @see {@link https://discord.com/developers/docs/components/reference#action-row} */ export type APIComponentInModalActionRow = APITextInputComponent; /** * @see {@link https://discord.com/developers/docs/components/reference#section} */ export type APISectionAccessoryComponent = APIButtonComponent | APIThumbnailComponent; /** * @see {@link https://discord.com/developers/docs/components/reference#container} */ export type APIComponentInContainer = APIActionRowComponent<APIComponentInMessageActionRow> | APIFileComponent | APIMediaGalleryComponent | APISectionComponent | APISeparatorComponent | APITextDisplayComponent; /** * https://discord.com/developers/docs/resources/message#message-snapshot-object */ export type APIMessageSnapshotFields = Pick<APIMessage, 'attachments' | 'components' | 'content' | 'edited_timestamp' | 'embeds' | 'flags' | 'mention_roles' | 'mentions' | 'sticker_items' | 'stickers' | 'timestamp' | 'type'>; //# sourceMappingURL=channel.d.ts.map node_modules/discord-api-types/payloads/v9/template.js 0000664 00000000316 15114741631 0017111 0 ustar 00 "use strict"; /** * Types extracted from https://discord.com/developers/docs/resources/guild-template */ Object.defineProperty(exports, "__esModule", { value: true }); //# sourceMappingURL=template.js.map node_modules/discord-api-types/payloads/v9/monetization.js 0000664 00000007146 15114741631 0020026 0 ustar 00 "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.SubscriptionStatus = exports.SKUType = exports.SKUFlags = exports.EntitlementType = void 0; /** * @see {@link https://discord.com/developers/docs/monetization/entitlements#entitlement-object-entitlement-types} */ var EntitlementType; (function (EntitlementType) { /** * Entitlement was purchased by user */ EntitlementType[EntitlementType["Purchase"] = 1] = "Purchase"; /** * Entitlement for Discord Nitro subscription */ EntitlementType[EntitlementType["PremiumSubscription"] = 2] = "PremiumSubscription"; /** * Entitlement was gifted by developer */ EntitlementType[EntitlementType["DeveloperGift"] = 3] = "DeveloperGift"; /** * Entitlement was purchased by a dev in application test mode */ EntitlementType[EntitlementType["TestModePurchase"] = 4] = "TestModePurchase"; /** * Entitlement was granted when the SKU was free */ EntitlementType[EntitlementType["FreePurchase"] = 5] = "FreePurchase"; /** * Entitlement was gifted by another user */ EntitlementType[EntitlementType["UserGift"] = 6] = "UserGift"; /** * Entitlement was claimed by user for free as a Nitro Subscriber */ EntitlementType[EntitlementType["PremiumPurchase"] = 7] = "PremiumPurchase"; /** * Entitlement was purchased as an app subscription */ EntitlementType[EntitlementType["ApplicationSubscription"] = 8] = "ApplicationSubscription"; })(EntitlementType || (exports.EntitlementType = EntitlementType = {})); /** * @see {@link https://discord.com/developers/docs/monetization/skus#sku-object-sku-flags} */ var SKUFlags; (function (SKUFlags) { /** * SKU is available for purchase */ SKUFlags[SKUFlags["Available"] = 4] = "Available"; /** * Recurring SKU that can be purchased by a user and applied to a single server. * Grants access to every user in that server. */ SKUFlags[SKUFlags["GuildSubscription"] = 128] = "GuildSubscription"; /** * Recurring SKU purchased by a user for themselves. Grants access to the purchasing user in every server. */ SKUFlags[SKUFlags["UserSubscription"] = 256] = "UserSubscription"; })(SKUFlags || (exports.SKUFlags = SKUFlags = {})); /** * @see {@link https://discord.com/developers/docs/resources/sku#sku-object-sku-types} */ var SKUType; (function (SKUType) { /** * Durable one-time purchase */ SKUType[SKUType["Durable"] = 2] = "Durable"; /** * Consumable one-time purchase */ SKUType[SKUType["Consumable"] = 3] = "Consumable"; /** * Represents a recurring subscription */ SKUType[SKUType["Subscription"] = 5] = "Subscription"; /** * System-generated group for each Subscription SKU created */ SKUType[SKUType["SubscriptionGroup"] = 6] = "SubscriptionGroup"; })(SKUType || (exports.SKUType = SKUType = {})); /** * @see {@link https://discord.com/developers/docs/resources/subscription#subscription-statuses} */ var SubscriptionStatus; (function (SubscriptionStatus) { /** * Subscription is active and scheduled to renew. */ SubscriptionStatus[SubscriptionStatus["Active"] = 0] = "Active"; /** * Subscription is active but will not renew. */ SubscriptionStatus[SubscriptionStatus["Ending"] = 1] = "Ending"; /** * Subscription is inactive and not being charged. */ SubscriptionStatus[SubscriptionStatus["Inactive"] = 2] = "Inactive"; })(SubscriptionStatus || (exports.SubscriptionStatus = SubscriptionStatus = {})); //# sourceMappingURL=monetization.js.map node_modules/discord-api-types/payloads/v9/sticker.js 0000664 00000002271 15114741631 0016744 0 ustar 00 "use strict"; /** * Types extracted from https://discord.com/developers/docs/resources/sticker */ Object.defineProperty(exports, "__esModule", { value: true }); exports.StickerFormatType = exports.StickerType = void 0; /** * @see {@link https://discord.com/developers/docs/resources/sticker#sticker-object-sticker-types} */ var StickerType; (function (StickerType) { /** * An official sticker in a pack */ StickerType[StickerType["Standard"] = 1] = "Standard"; /** * A sticker uploaded to a guild for the guild's members */ StickerType[StickerType["Guild"] = 2] = "Guild"; })(StickerType || (exports.StickerType = StickerType = {})); /** * @see {@link https://discord.com/developers/docs/resources/sticker#sticker-object-sticker-format-types} */ var StickerFormatType; (function (StickerFormatType) { StickerFormatType[StickerFormatType["PNG"] = 1] = "PNG"; StickerFormatType[StickerFormatType["APNG"] = 2] = "APNG"; StickerFormatType[StickerFormatType["Lottie"] = 3] = "Lottie"; StickerFormatType[StickerFormatType["GIF"] = 4] = "GIF"; })(StickerFormatType || (exports.StickerFormatType = StickerFormatType = {})); //# sourceMappingURL=sticker.js.map node_modules/discord-api-types/payloads/v9/monetization.d.ts 0000664 00000012202 15114741631 0020247 0 ustar 00 import type { Snowflake } from '../../globals'; /** * @see {@link https://discord.com/developers/docs/monetization/entitlements#entitlement-object-entitlement-structure} */ export interface APIEntitlement { /** * ID of the entitlement */ id: Snowflake; /** * ID of the SKU */ sku_id: Snowflake; /** * ID of the user that is granted access to the entitlement's sku */ user_id?: Snowflake; /** * ID of the guild that is granted access to the entitlement's sku */ guild_id?: Snowflake; /** * ID of the parent application */ application_id: Snowflake; /** * Type of entitlement */ type: EntitlementType; /** * Whether the entitlement was deleted */ deleted: boolean; /** * Start date at which the entitlement is valid. */ starts_at: string | null; /** * Date at which the entitlement is no longer valid. */ ends_at: string | null; /** * For consumable items, whether or not the entitlement has been consumed */ consumed?: boolean; } /** * @see {@link https://discord.com/developers/docs/monetization/entitlements#entitlement-object-entitlement-types} */ export declare enum EntitlementType { /** * Entitlement was purchased by user */ Purchase = 1, /** * Entitlement for Discord Nitro subscription */ PremiumSubscription = 2, /** * Entitlement was gifted by developer */ DeveloperGift = 3, /** * Entitlement was purchased by a dev in application test mode */ TestModePurchase = 4, /** * Entitlement was granted when the SKU was free */ FreePurchase = 5, /** * Entitlement was gifted by another user */ UserGift = 6, /** * Entitlement was claimed by user for free as a Nitro Subscriber */ PremiumPurchase = 7, /** * Entitlement was purchased as an app subscription */ ApplicationSubscription = 8 } /** * @see {@link https://discord.com/developers/docs/monetization/skus#sku-object-sku-structure} */ export interface APISKU { /** * ID of SKU */ id: Snowflake; /** * Type of SKU */ type: SKUType; /** * ID of the parent application */ application_id: Snowflake; /** * Customer-facing name of your premium offering */ name: string; /** * System-generated URL slug based on the SKU's name */ slug: string; /** * SKU flags combined as a bitfield * * @see {@link https://en.wikipedia.org/wiki/Bit_field} */ flags: SKUFlags; } /** * @see {@link https://discord.com/developers/docs/monetization/skus#sku-object-sku-flags} */ export declare enum SKUFlags { /** * SKU is available for purchase */ Available = 4, /** * Recurring SKU that can be purchased by a user and applied to a single server. * Grants access to every user in that server. */ GuildSubscription = 128, /** * Recurring SKU purchased by a user for themselves. Grants access to the purchasing user in every server. */ UserSubscription = 256 } /** * @see {@link https://discord.com/developers/docs/resources/sku#sku-object-sku-types} */ export declare enum SKUType { /** * Durable one-time purchase */ Durable = 2, /** * Consumable one-time purchase */ Consumable = 3, /** * Represents a recurring subscription */ Subscription = 5, /** * System-generated group for each Subscription SKU created */ SubscriptionGroup = 6 } /** * @see {@link https://discord.com/developers/docs/resources/subscription#subscription-object} */ export interface APISubscription { /** * ID of the subscription */ id: Snowflake; /** * ID of the user who is subscribed */ user_id: Snowflake; /** * List of SKUs subscribed to */ sku_ids: Snowflake[]; /** * List of entitlements granted for this subscription */ entitlement_ids: Snowflake[]; /** * List of SKUs that this user will be subscribed to at renewal */ renewal_sku_ids: Snowflake[] | null; /** * Start of the current subscription period */ current_period_start: string; /** * End of the current subscription period */ current_period_end: string; /** * Current status of the subscription */ status: SubscriptionStatus; /** * When the subscription was canceled */ canceled_at: string | null; /** * ISO3166-1 alpha-2 country code of the payment source used to purchase the subscription. Missing unless queried with a private OAuth scope. */ country?: string; } /** * @see {@link https://discord.com/developers/docs/resources/subscription#subscription-statuses} */ export declare enum SubscriptionStatus { /** * Subscription is active and scheduled to renew. */ Active = 0, /** * Subscription is active but will not renew. */ Ending = 1, /** * Subscription is inactive and not being charged. */ Inactive = 2 } //# sourceMappingURL=monetization.d.ts.map node_modules/discord-api-types/payloads/v9/guildScheduledEvent.d.ts.map 0000664 00000006117 15114741631 0022242 0 ustar 00 {"version":3,"file":"guildScheduledEvent.d.ts","sourceRoot":"","sources":["guildScheduledEvent.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC/C,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAC9C,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,QAAQ,CAAC;AAEtC,MAAM,WAAW,0BAA0B,CAAC,IAAI,SAAS,6BA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C;IACtB,eAAe,EAAE,IAAI,CAAC;CACtB;AAED,MAAM,WAAW,8BAChB,SAAQ,0BAA0B,CAAC,6BAA6B,CAAC,QAAQ,CAAC;IAC1E,UAAU,EAAE,IAAI,CAAC;IACjB,eAAe,EAAE,QAAQ,CAAC,oCAAoC,CAAC,CAAC;CAChE;AAED;;GAEG;AACH,MAAM,MAAM,sBAAsB,GAC/B,8BAA8B,GAC9B,mCAAmC,GACnC,2BAA2B,CAAC;AAE/B;;GAEG;AACH,MAAM,WAAW,oCAAoC;IACpD;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;CAClB;AAED;;GAEG;AACH,oBAAY,6BAA6B;IACxC,aAAa,IAAI;IACjB,KAAK,IAAA;IACL,QAAQ,IAAA;CACR;AAED;;GAEG;AACH,oBAAY,yBAAyB;IACpC,SAAS,IAAI;IACb,MAAM,IAAA;IACN,SAAS,IAAA;IACT,QAAQ,IAAA;CACR;AAED;;GAEG;AACH,oBAAY,+BAA+B;IAC1C;;OAEG;IACH,SAAS,IAAI;CACb;AAED;;GAEG;AACH,MAAM,WAAW,0BAA0B;IAC1C;;OAEG;IACH,wBAAwB,EAAE,SAAS,CAAC;IACpC;;OAEG;IACH,IAAI,EAAE,OAAO,CAAC;IACd;;OAEG;IACH,MAAM,CAAC,EAAE,cAAc,CAAC;CACxB"} node_modules/discord-api-types/payloads/v9/guildScheduledEvent.js 0000664 00000013775 15114741631 0021242 0 ustar 00 "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.GuildScheduledEventPrivacyLevel = exports.GuildScheduledEventStatus = exports.GuildScheduledEventEntityType = exports.GuildScheduledEventRecurrenceRuleMonth = exports.GuildScheduledEventRecurrenceRuleWeekday = exports.GuildScheduledEventRecurrenceRuleFrequency = void 0; /** * @see {@link https://discord.com/developers/docs/resources/guild-scheduled-event#guild-scheduled-event-recurrence-rule-object-guild-scheduled-event-recurrence-rule-frequency} */ var GuildScheduledEventRecurrenceRuleFrequency; (function (GuildScheduledEventRecurrenceRuleFrequency) { GuildScheduledEventRecurrenceRuleFrequency[GuildScheduledEventRecurrenceRuleFrequency["Yearly"] = 0] = "Yearly"; GuildScheduledEventRecurrenceRuleFrequency[GuildScheduledEventRecurrenceRuleFrequency["Monthly"] = 1] = "Monthly"; GuildScheduledEventRecurrenceRuleFrequency[GuildScheduledEventRecurrenceRuleFrequency["Weekly"] = 2] = "Weekly"; GuildScheduledEventRecurrenceRuleFrequency[GuildScheduledEventRecurrenceRuleFrequency["Daily"] = 3] = "Daily"; })(GuildScheduledEventRecurrenceRuleFrequency || (exports.GuildScheduledEventRecurrenceRuleFrequency = GuildScheduledEventRecurrenceRuleFrequency = {})); /** * @see {@link https://discord.com/developers/docs/resources/guild-scheduled-event#guild-scheduled-event-recurrence-rule-object-guild-scheduled-event-recurrence-rule-weekday} */ var GuildScheduledEventRecurrenceRuleWeekday; (function (GuildScheduledEventRecurrenceRuleWeekday) { GuildScheduledEventRecurrenceRuleWeekday[GuildScheduledEventRecurrenceRuleWeekday["Monday"] = 0] = "Monday"; GuildScheduledEventRecurrenceRuleWeekday[GuildScheduledEventRecurrenceRuleWeekday["Tuesday"] = 1] = "Tuesday"; GuildScheduledEventRecurrenceRuleWeekday[GuildScheduledEventRecurrenceRuleWeekday["Wednesday"] = 2] = "Wednesday"; GuildScheduledEventRecurrenceRuleWeekday[GuildScheduledEventRecurrenceRuleWeekday["Thursday"] = 3] = "Thursday"; GuildScheduledEventRecurrenceRuleWeekday[GuildScheduledEventRecurrenceRuleWeekday["Friday"] = 4] = "Friday"; GuildScheduledEventRecurrenceRuleWeekday[GuildScheduledEventRecurrenceRuleWeekday["Saturday"] = 5] = "Saturday"; GuildScheduledEventRecurrenceRuleWeekday[GuildScheduledEventRecurrenceRuleWeekday["Sunday"] = 6] = "Sunday"; })(GuildScheduledEventRecurrenceRuleWeekday || (exports.GuildScheduledEventRecurrenceRuleWeekday = GuildScheduledEventRecurrenceRuleWeekday = {})); /** * @see {@link https://discord.com/developers/docs/resources/guild-scheduled-event#guild-scheduled-event-recurrence-rule-object-guild-scheduled-event-recurrence-rule-month} */ var GuildScheduledEventRecurrenceRuleMonth; (function (GuildScheduledEventRecurrenceRuleMonth) { GuildScheduledEventRecurrenceRuleMonth[GuildScheduledEventRecurrenceRuleMonth["January"] = 1] = "January"; GuildScheduledEventRecurrenceRuleMonth[GuildScheduledEventRecurrenceRuleMonth["February"] = 2] = "February"; GuildScheduledEventRecurrenceRuleMonth[GuildScheduledEventRecurrenceRuleMonth["March"] = 3] = "March"; GuildScheduledEventRecurrenceRuleMonth[GuildScheduledEventRecurrenceRuleMonth["April"] = 4] = "April"; GuildScheduledEventRecurrenceRuleMonth[GuildScheduledEventRecurrenceRuleMonth["May"] = 5] = "May"; GuildScheduledEventRecurrenceRuleMonth[GuildScheduledEventRecurrenceRuleMonth["June"] = 6] = "June"; GuildScheduledEventRecurrenceRuleMonth[GuildScheduledEventRecurrenceRuleMonth["July"] = 7] = "July"; GuildScheduledEventRecurrenceRuleMonth[GuildScheduledEventRecurrenceRuleMonth["August"] = 8] = "August"; GuildScheduledEventRecurrenceRuleMonth[GuildScheduledEventRecurrenceRuleMonth["September"] = 9] = "September"; GuildScheduledEventRecurrenceRuleMonth[GuildScheduledEventRecurrenceRuleMonth["October"] = 10] = "October"; GuildScheduledEventRecurrenceRuleMonth[GuildScheduledEventRecurrenceRuleMonth["November"] = 11] = "November"; GuildScheduledEventRecurrenceRuleMonth[GuildScheduledEventRecurrenceRuleMonth["December"] = 12] = "December"; })(GuildScheduledEventRecurrenceRuleMonth || (exports.GuildScheduledEventRecurrenceRuleMonth = GuildScheduledEventRecurrenceRuleMonth = {})); /** * @see {@link https://discord.com/developers/docs/resources/guild-scheduled-event#guild-scheduled-event-object-guild-scheduled-event-entity-types} */ var GuildScheduledEventEntityType; (function (GuildScheduledEventEntityType) { GuildScheduledEventEntityType[GuildScheduledEventEntityType["StageInstance"] = 1] = "StageInstance"; GuildScheduledEventEntityType[GuildScheduledEventEntityType["Voice"] = 2] = "Voice"; GuildScheduledEventEntityType[GuildScheduledEventEntityType["External"] = 3] = "External"; })(GuildScheduledEventEntityType || (exports.GuildScheduledEventEntityType = GuildScheduledEventEntityType = {})); /** * @see {@link https://discord.com/developers/docs/resources/guild-scheduled-event#guild-scheduled-event-object-guild-scheduled-event-status} */ var GuildScheduledEventStatus; (function (GuildScheduledEventStatus) { GuildScheduledEventStatus[GuildScheduledEventStatus["Scheduled"] = 1] = "Scheduled"; GuildScheduledEventStatus[GuildScheduledEventStatus["Active"] = 2] = "Active"; GuildScheduledEventStatus[GuildScheduledEventStatus["Completed"] = 3] = "Completed"; GuildScheduledEventStatus[GuildScheduledEventStatus["Canceled"] = 4] = "Canceled"; })(GuildScheduledEventStatus || (exports.GuildScheduledEventStatus = GuildScheduledEventStatus = {})); /** * @see {@link https://discord.com/developers/docs/resources/guild-scheduled-event#guild-scheduled-event-object-guild-scheduled-event-privacy-level} */ var GuildScheduledEventPrivacyLevel; (function (GuildScheduledEventPrivacyLevel) { /** * The scheduled event is only accessible to guild members */ GuildScheduledEventPrivacyLevel[GuildScheduledEventPrivacyLevel["GuildOnly"] = 2] = "GuildOnly"; })(GuildScheduledEventPrivacyLevel || (exports.GuildScheduledEventPrivacyLevel = GuildScheduledEventPrivacyLevel = {})); //# sourceMappingURL=guildScheduledEvent.js.map node_modules/discord-api-types/payloads/v9/sticker.js.map 0000664 00000000615 15114741631 0017520 0 ustar 00 {"version":3,"file":"sticker.js","sourceRoot":"","sources":["sticker.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AAkEH;;GAEG;AACH,IAAY,WASX;AATD,WAAY,WAAW;IACtB;;OAEG;IACH,qDAAY,CAAA;IACZ;;OAEG;IACH,+CAAK,CAAA;AACN,CAAC,EATW,WAAW,2BAAX,WAAW,QAStB;AAED;;GAEG;AACH,IAAY,iBAKX;AALD,WAAY,iBAAiB;IAC5B,uDAAO,CAAA;IACP,yDAAI,CAAA;IACJ,6DAAM,CAAA;IACN,uDAAG,CAAA;AACJ,CAAC,EALW,iBAAiB,iCAAjB,iBAAiB,QAK5B"} node_modules/discord-api-types/payloads/common.d.ts 0000664 00000023060 15114741631 0016465 0 ustar 00 import type { Locale } from '../rest/common'; /** * @see {@link https://discord.com/developers/docs/topics/permissions#permissions-bitwise-permission-flags} * * These flags are exported as `BigInt`s and NOT numbers. Wrapping them in `Number()` * may cause issues, try to use BigInts as much as possible or modules that can * replicate them in some way */ export declare const PermissionFlagsBits: { /** * Allows creation of instant invites * * Applies to channel types: Text, Voice, Stage */ readonly CreateInstantInvite: bigint; /** * Allows kicking members */ readonly KickMembers: bigint; /** * Allows banning members */ readonly BanMembers: bigint; /** * Allows all permissions and bypasses channel permission overwrites */ readonly Administrator: bigint; /** * Allows management and editing of channels * * Applies to channel types: Text, Voice, Stage */ readonly ManageChannels: bigint; /** * Allows management and editing of the guild */ readonly ManageGuild: bigint; /** * Allows for the addition of reactions to messages * * Applies to channel types: Text, Voice, Stage */ readonly AddReactions: bigint; /** * Allows for viewing of audit logs */ readonly ViewAuditLog: bigint; /** * Allows for using priority speaker in a voice channel * * Applies to channel types: Voice */ readonly PrioritySpeaker: bigint; /** * Allows the user to go live * * Applies to channel types: Voice, Stage */ readonly Stream: bigint; /** * Allows guild members to view a channel, which includes reading messages in text channels and joining voice channels * * Applies to channel types: Text, Voice, Stage */ readonly ViewChannel: bigint; /** * Allows for sending messages in a channel and creating threads in a forum * (does not allow sending messages in threads) * * Applies to channel types: Text, Voice, Stage */ readonly SendMessages: bigint; /** * Allows for sending of `/tts` messages * * Applies to channel types: Text, Voice, Stage */ readonly SendTTSMessages: bigint; /** * Allows for deletion of other users messages * * Applies to channel types: Text, Voice, Stage */ readonly ManageMessages: bigint; /** * Links sent by users with this permission will be auto-embedded * * Applies to channel types: Text, Voice, Stage */ readonly EmbedLinks: bigint; /** * Allows for uploading images and files * * Applies to channel types: Text, Voice, Stage */ readonly AttachFiles: bigint; /** * Allows for reading of message history * * Applies to channel types: Text, Voice, Stage */ readonly ReadMessageHistory: bigint; /** * Allows for using the `@everyone` tag to notify all users in a channel, * and the `@here` tag to notify all online users in a channel * * Applies to channel types: Text, Voice, Stage */ readonly MentionEveryone: bigint; /** * Allows the usage of custom emojis from other servers * * Applies to channel types: Text, Voice, Stage */ readonly UseExternalEmojis: bigint; /** * Allows for viewing guild insights */ readonly ViewGuildInsights: bigint; /** * Allows for joining of a voice channel * * Applies to channel types: Voice, Stage */ readonly Connect: bigint; /** * Allows for speaking in a voice channel * * Applies to channel types: Voice */ readonly Speak: bigint; /** * Allows for muting members in a voice channel * * Applies to channel types: Voice, Stage */ readonly MuteMembers: bigint; /** * Allows for deafening of members in a voice channel * * Applies to channel types: Voice */ readonly DeafenMembers: bigint; /** * Allows for moving of members between voice channels * * Applies to channel types: Voice, Stage */ readonly MoveMembers: bigint; /** * Allows for using voice-activity-detection in a voice channel * * Applies to channel types: Voice */ readonly UseVAD: bigint; /** * Allows for modification of own nickname */ readonly ChangeNickname: bigint; /** * Allows for modification of other users nicknames */ readonly ManageNicknames: bigint; /** * Allows management and editing of roles * * Applies to channel types: Text, Voice, Stage */ readonly ManageRoles: bigint; /** * Allows management and editing of webhooks * * Applies to channel types: Text, Voice, Stage */ readonly ManageWebhooks: bigint; /** * Allows management and editing of emojis, stickers, and soundboard sounds * * @deprecated This is the old name for {@link PermissionFlagsBits.ManageGuildExpressions} */ readonly ManageEmojisAndStickers: bigint; /** * Allows for editing and deleting emojis, stickers, and soundboard sounds created by all users */ readonly ManageGuildExpressions: bigint; /** * Allows members to use application commands, including slash commands and context menu commands * * Applies to channel types: Text, Voice, Stage */ readonly UseApplicationCommands: bigint; /** * Allows for requesting to speak in stage channels * * Applies to channel types: Stage */ readonly RequestToSpeak: bigint; /** * Allows for editing and deleting scheduled events created by all users * * Applies to channel types: Voice, Stage */ readonly ManageEvents: bigint; /** * Allows for deleting and archiving threads, and viewing all private threads * * Applies to channel types: Text */ readonly ManageThreads: bigint; /** * Allows for creating public and announcement threads * * Applies to channel types: Text */ readonly CreatePublicThreads: bigint; /** * Allows for creating private threads * * Applies to channel types: Text */ readonly CreatePrivateThreads: bigint; /** * Allows the usage of custom stickers from other servers * * Applies to channel types: Text, Voice, Stage */ readonly UseExternalStickers: bigint; /** * Allows for sending messages in threads * * Applies to channel types: Text */ readonly SendMessagesInThreads: bigint; /** * Allows for using Activities (applications with the {@link ApplicationFlags.Embedded} flag) in a voice channel * * Applies to channel types: Voice */ readonly UseEmbeddedActivities: bigint; /** * Allows for timing out users to prevent them from sending or reacting to messages in chat and threads, * and from speaking in voice and stage channels */ readonly ModerateMembers: bigint; /** * Allows for viewing role subscription insights */ readonly ViewCreatorMonetizationAnalytics: bigint; /** * Allows for using soundboard in a voice channel * * Applies to channel types: Voice */ readonly UseSoundboard: bigint; /** * Allows for creating emojis, stickers, and soundboard sounds, and editing and deleting those created by the current user */ readonly CreateGuildExpressions: bigint; /** * Allows for creating scheduled events, and editing and deleting those created by the current user * * Applies to channel types: Voice, Stage */ readonly CreateEvents: bigint; /** * Allows the usage of custom soundboard sounds from other servers * * Applies to channel types: Voice */ readonly UseExternalSounds: bigint; /** * Allows sending voice messages * * Applies to channel types: Text, Voice, Stage */ readonly SendVoiceMessages: bigint; /** * Allows sending polls * * Applies to channel types: Text, Voice, Stage */ readonly SendPolls: bigint; /** * Allows user-installed apps to send public responses. When disabled, users will still be allowed to use their apps but the responses will be ephemeral. This only applies to apps not also installed to the server * * Applies to channel types: Text, Voice, Stage */ readonly UseExternalApps: bigint; }; export type LocalizationMap = Partial<Record<Locale, string | null>>; /** * @see {@link https://discord.com/developers/docs/topics/opcodes-and-status-codes#json} */ export interface RESTError { code: number; message: string; errors?: RESTErrorData; } export interface RESTErrorFieldInformation { code: string; message: string; } export interface RESTErrorGroupWrapper { _errors: RESTErrorData[]; } export type RESTErrorData = RESTErrorFieldInformation | RESTErrorGroupWrapper | string | { [k: string]: RESTErrorData; }; /** * @see {@link https://discord.com/developers/docs/topics/rate-limits#exceeding-a-rate-limit-rate-limit-response-structure} */ export interface RESTRateLimit { /** * An error code for some limits * * {@link RESTJSONErrorCodes} */ code?: number; /** * A value indicating if you are being globally rate limited or not */ global: boolean; /** * A message saying you are being rate limited. */ message: string; /** * The number of seconds to wait before submitting another request. */ retry_after: number; } //# sourceMappingURL=common.d.ts.map node_modules/discord-api-types/payloads/index.js 0000664 00000001760 15114741631 0016053 0 ustar 00 "use strict"; // This file exports all the payloads available in the recommended API version // Thereby, things MAY break in the future. Try sticking to imports from a specific version var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { if (k2 === undefined) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { return m[k]; } }; } Object.defineProperty(o, k2, desc); }) : (function(o, m, k, k2) { if (k2 === undefined) k2 = k; o[k2] = m[k]; })); var __exportStar = (this && this.__exportStar) || function(m, exports) { for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); }; Object.defineProperty(exports, "__esModule", { value: true }); __exportStar(require("./v10/index"), exports); //# sourceMappingURL=index.js.map node_modules/discord-api-types/v10.js.map 0000664 00000000305 15114741631 0014304 0 ustar 00 {"version":3,"file":"v10.js","sourceRoot":"","sources":["v10.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,gDAA8B;AAC9B,4CAA0B;AAC1B,uDAAqC;AACrC,mDAAiC;AACjC,4CAA0B;AAC1B,oDAAkC;AAClC,uCAAqC"} node_modules/discord-api-types/v9.mjs 0000664 00000015334 15114741631 0013645 0 ustar 00 import mod from "./v9.js"; export default mod; export const APIApplicationCommandPermissionsConstant = mod.APIApplicationCommandPermissionsConstant; export const APIVersion = mod.APIVersion; export const ActivityFlags = mod.ActivityFlags; export const ActivityPlatform = mod.ActivityPlatform; export const ActivityType = mod.ActivityType; export const AllowedMentionsTypes = mod.AllowedMentionsTypes; export const ApplicationCommandOptionType = mod.ApplicationCommandOptionType; export const ApplicationCommandPermissionType = mod.ApplicationCommandPermissionType; export const ApplicationCommandType = mod.ApplicationCommandType; export const ApplicationFlags = mod.ApplicationFlags; export const ApplicationIntegrationType = mod.ApplicationIntegrationType; export const ApplicationRoleConnectionMetadataType = mod.ApplicationRoleConnectionMetadataType; export const ApplicationWebhookEventStatus = mod.ApplicationWebhookEventStatus; export const ApplicationWebhookEventType = mod.ApplicationWebhookEventType; export const ApplicationWebhookType = mod.ApplicationWebhookType; export const AttachmentFlags = mod.AttachmentFlags; export const AuditLogEvent = mod.AuditLogEvent; export const AuditLogOptionsType = mod.AuditLogOptionsType; export const AutoModerationActionType = mod.AutoModerationActionType; export const AutoModerationRuleEventType = mod.AutoModerationRuleEventType; export const AutoModerationRuleKeywordPresetType = mod.AutoModerationRuleKeywordPresetType; export const AutoModerationRuleTriggerType = mod.AutoModerationRuleTriggerType; export const ButtonStyle = mod.ButtonStyle; export const CDNRoutes = mod.CDNRoutes; export const ChannelFlags = mod.ChannelFlags; export const ChannelType = mod.ChannelType; export const ComponentType = mod.ComponentType; export const ConnectionService = mod.ConnectionService; export const ConnectionVisibility = mod.ConnectionVisibility; export const EmbedType = mod.EmbedType; export const EntitlementOwnerType = mod.EntitlementOwnerType; export const EntitlementType = mod.EntitlementType; export const EntryPointCommandHandlerType = mod.EntryPointCommandHandlerType; export const FormattingPatterns = mod.FormattingPatterns; export const ForumLayoutType = mod.ForumLayoutType; export const GatewayCloseCodes = mod.GatewayCloseCodes; export const GatewayDispatchEvents = mod.GatewayDispatchEvents; export const GatewayIntentBits = mod.GatewayIntentBits; export const GatewayOpcodes = mod.GatewayOpcodes; export const GatewayVersion = mod.GatewayVersion; export const GuildDefaultMessageNotifications = mod.GuildDefaultMessageNotifications; export const GuildExplicitContentFilter = mod.GuildExplicitContentFilter; export const GuildFeature = mod.GuildFeature; export const GuildHubType = mod.GuildHubType; export const GuildMFALevel = mod.GuildMFALevel; export const GuildMemberFlags = mod.GuildMemberFlags; export const GuildNSFWLevel = mod.GuildNSFWLevel; export const GuildOnboardingMode = mod.GuildOnboardingMode; export const GuildOnboardingPromptType = mod.GuildOnboardingPromptType; export const GuildPremiumTier = mod.GuildPremiumTier; export const GuildScheduledEventEntityType = mod.GuildScheduledEventEntityType; export const GuildScheduledEventPrivacyLevel = mod.GuildScheduledEventPrivacyLevel; export const GuildScheduledEventRecurrenceRuleFrequency = mod.GuildScheduledEventRecurrenceRuleFrequency; export const GuildScheduledEventRecurrenceRuleMonth = mod.GuildScheduledEventRecurrenceRuleMonth; export const GuildScheduledEventRecurrenceRuleWeekday = mod.GuildScheduledEventRecurrenceRuleWeekday; export const GuildScheduledEventStatus = mod.GuildScheduledEventStatus; export const GuildSystemChannelFlags = mod.GuildSystemChannelFlags; export const GuildVerificationLevel = mod.GuildVerificationLevel; export const GuildWidgetStyle = mod.GuildWidgetStyle; export const ImageFormat = mod.ImageFormat; export const IntegrationExpireBehavior = mod.IntegrationExpireBehavior; export const InteractionContextType = mod.InteractionContextType; export const InteractionResponseType = mod.InteractionResponseType; export const InteractionType = mod.InteractionType; export const InviteTargetType = mod.InviteTargetType; export const InviteType = mod.InviteType; export const Locale = mod.Locale; export const MembershipScreeningFieldType = mod.MembershipScreeningFieldType; export const MessageActivityType = mod.MessageActivityType; export const MessageFlags = mod.MessageFlags; export const MessageReferenceType = mod.MessageReferenceType; export const MessageType = mod.MessageType; export const NameplatePalette = mod.NameplatePalette; export const OAuth2Routes = mod.OAuth2Routes; export const OAuth2Scopes = mod.OAuth2Scopes; export const OverwriteType = mod.OverwriteType; export const PermissionFlagsBits = mod.PermissionFlagsBits; export const PollLayoutType = mod.PollLayoutType; export const PresenceUpdateStatus = mod.PresenceUpdateStatus; export const RESTJSONErrorCodes = mod.RESTJSONErrorCodes; export const RPCCloseEventCodes = mod.RPCCloseEventCodes; export const RPCDeviceType = mod.RPCDeviceType; export const RPCErrorCodes = mod.RPCErrorCodes; export const RPCVoiceSettingsModeType = mod.RPCVoiceSettingsModeType; export const RPCVoiceShortcutKeyComboKeyType = mod.RPCVoiceShortcutKeyComboKeyType; export const ReactionType = mod.ReactionType; export const RelationshipType = mod.RelationshipType; export const RoleFlags = mod.RoleFlags; export const RouteBases = mod.RouteBases; export const Routes = mod.Routes; export const SKUFlags = mod.SKUFlags; export const SKUType = mod.SKUType; export const SelectMenuDefaultValueType = mod.SelectMenuDefaultValueType; export const SeparatorSpacingSize = mod.SeparatorSpacingSize; export const SortOrderType = mod.SortOrderType; export const StageInstancePrivacyLevel = mod.StageInstancePrivacyLevel; export const StickerFormatType = mod.StickerFormatType; export const StickerPackApplicationId = mod.StickerPackApplicationId; export const StickerType = mod.StickerType; export const SubscriptionStatus = mod.SubscriptionStatus; export const TeamMemberMembershipState = mod.TeamMemberMembershipState; export const TeamMemberRole = mod.TeamMemberRole; export const TextInputStyle = mod.TextInputStyle; export const ThreadAutoArchiveDuration = mod.ThreadAutoArchiveDuration; export const ThreadMemberFlags = mod.ThreadMemberFlags; export const UnfurledMediaItemLoadingState = mod.UnfurledMediaItemLoadingState; export const UserFlags = mod.UserFlags; export const UserPremiumType = mod.UserPremiumType; export const Utils = mod.Utils; export const VideoQualityMode = mod.VideoQualityMode; export const VoiceChannelEffectSendAnimationType = mod.VoiceChannelEffectSendAnimationType; export const VoiceConnectionStates = mod.VoiceConnectionStates; export const WebhookType = mod.WebhookType; export const urlSafeCharacters = mod.urlSafeCharacters; node_modules/discord-api-types/scripts/versions.mjs 0000664 00000002037 15114741631 0016642 0 ustar 00 import { exec } from 'node:child_process'; import { dirname, join } from 'node:path'; import { fileURLToPath } from 'node:url'; import { promisify } from 'node:util'; const __filename = fileURLToPath(import.meta.url); const __dirname = dirname(__filename); const rootDir = join(__dirname, '..'); const execAsync = promisify(exec); /** * @param {string} path * @param {string} version */ const fileToESMWrapperCall = async (path, version) => execAsync( `npx gen-esm-wrapper "${join(rootDir, path, `${version}.js`)}" "${join(rootDir, path, `${version}.mjs`)}"`, ); await Promise.allSettled( [ 'v6', // 'v8', 'v9', 'v10', // Voice 'v4', ].flatMap((version) => [ fileToESMWrapperCall('gateway', version), fileToESMWrapperCall(`payloads/${version}`, 'index'), fileToESMWrapperCall(`rest/${version}`, 'index'), // Voice fileToESMWrapperCall('voice', version), // RPC fileToESMWrapperCall('rpc', version), // Utils fileToESMWrapperCall('utils', version), // Shortcuts fileToESMWrapperCall('', version), ]), ); node_modules/discord-api-types/voice/index.d.ts.map 0000664 00000000164 15114741631 0016351 0 ustar 00 {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":"AAGA,cAAc,MAAM,CAAC"} node_modules/discord-api-types/voice/v4.js.map 0000664 00000002473 15114741631 0015344 0 ustar 00 {"version":3,"file":"v4.js","sourceRoot":"","sources":["v4.ts"],"names":[],"mappings":";;;AAAa,QAAA,mBAAmB,GAAG,GAAG,CAAC;AAEvC;;GAEG;AACH,IAAY,YAmGX;AAnGD,WAAY,YAAY;IACvB;;OAEG;IACH,uDAAQ,CAAA;IACR;;OAEG;IACH,mEAAc,CAAA;IACd;;OAEG;IACH,iDAAK,CAAA;IACL;;OAEG;IACH,yDAAS,CAAA;IACT;;OAEG;IACH,2EAAkB,CAAA;IAClB;;OAEG;IACH,uDAAQ,CAAA;IACR;;OAEG;IACH,+DAAY,CAAA;IACZ;;OAEG;IACH,mDAAM,CAAA;IACN;;OAEG;IACH,iDAAK,CAAA;IACL;;OAEG;IACH,qDAAO,CAAA;IACP;;OAEG;IACH,oEAAmB,CAAA;IACnB;;;;OAIG;IACH,kEAAa,CAAA;IACb;;OAEG;IACH,wEAAgB,CAAA;IAChB;;OAEG;IACH,kFAA0B,CAAA;IAC1B;;OAEG;IACH,kFAAqB,CAAA;IACrB;;OAEG;IACH,8EAAmB,CAAA;IACnB;;OAEG;IACH,wEAAgB,CAAA;IAChB;;OAEG;IACH,kFAAqB,CAAA;IACrB;;OAEG;IACH,0EAAiB,CAAA;IACjB;;OAEG;IACH,wEAAgB,CAAA;IAChB;;OAEG;IACH,gFAAoB,CAAA;IACpB;;OAEG;IACH,sGAA+B,CAAA;IAC/B;;OAEG;IACH,oEAAc,CAAA;IACd;;OAEG;IACH,8FAA2B,CAAA;AAC5B,CAAC,EAnGW,YAAY,4BAAZ,YAAY,QAmGvB;AAED;;GAEG;AACH,IAAY,eAqDX;AArDD,WAAY,eAAe;IAC1B;;OAEG;IACH,0EAAqB,CAAA;IACrB;;OAEG;IACH,4EAAc,CAAA;IACd;;OAEG;IACH,gFAAgB,CAAA;IAChB;;OAEG;IACH,wFAAoB,CAAA;IACpB;;OAEG;IACH,wFAAoB,CAAA;IACpB;;OAEG;IACH,wFAAoB,CAAA;IACpB;;OAEG;IACH,4EAAsB,CAAA;IACtB;;OAEG;IACH,4EAAsB,CAAA;IACtB;;OAEG;IACH,8EAAe,CAAA;IACf;;OAEG;IACH,wEAAoB,CAAA;IACpB;;OAEG;IACH,oFAAkB,CAAA;IAClB;;OAEG;IACH,0FAAqB,CAAA;IACrB;;OAEG;IACH,oEAAkB,CAAA;AACnB,CAAC,EArDW,eAAe,+BAAf,eAAe,QAqD1B"} node_modules/discord-api-types/voice/v8.d.ts.map 0000664 00000014426 15114741631 0015605 0 ustar 00 {"version":3,"file":"v8.d.ts","sourceRoot":"","sources":["v8.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAE5C,eAAO,MAAM,mBAAmB,MAAM,CAAC;AAEvC;;GAEG;AACH,oBAAY,YAAY;IACvB;;OAEG;IACH,QAAQ,IAAA;IACR;;OAEG;IACH,cAAc,IAAA;IACd;;OAEG;IACH,KAAK,IAAA;IACL;;OAEG;IACH,SAAS,IAAA;IACT;;OAEG;IACH,kBAAkB,IAAA;IAClB;;OAEG;IACH,QAAQ,IAAA;IACR;;OAEG;IACH,YAAY,IAAA;IACZ;;OAEG;IACH,MAAM,IAAA;IACN;;OAEG;IACH,KAAK,IAAA;IACL;;OAEG;IACH,OAAO,IAAA;IACP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CAAC;CACd;AAED;;GAEG;AACH,MAAM,WAAW,gCAAgC;IAChD,EAAE,EAAE,YAAY,CAAC,2BAA2B,CAAC;IAC7C,CAAC,EAAE,oCAAoC,CAAC;CACxC;AAED;;GAEG;AACH,MAAM,WAAW,oCAAoC;IACpD;;OAEG;IACH,aAAa,EAAE,MAAM,CAAC;CACtB;AAED;;GAEG;AACH,MAAM,MAAM,sBAAsB,GAAG,kBAAkB,CAAC;AAExD;;GAEG;AACH,MAAM,MAAM,yBAAyB,GAAG,kBAAkB,CAAC;AAI3D,MAAM,WAAW,YAAY;IAC5B;;OAEG;IACH,EAAE,EAAE,YAAY,CAAC;IACjB;;OAEG;IACH,CAAC,CAAC,EAAE,OAAO,CAAC;IACZ;;OAEG;IACH,GAAG,CAAC,EAAE,MAAM,CAAC;CACb;AAED,MAAM,WAAW,YAAY,CAAC,EAAE,SAAS,YAAY,EAAE,CAAC,GAAG,OAAO,CAAE,SAAQ,YAAY;IACvF,EAAE,EAAE,EAAE,CAAC;IACP,CAAC,EAAE,CAAC,CAAC;CACL;AAED,MAAM,MAAM,kBAAkB,GAAG,WAAW,CAAC"} node_modules/discord-api-types/voice/v8.js 0000664 00000020042 15114741631 0014564 0 ustar 00 "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.VoiceSpeakingFlags = exports.VoiceEncryptionMode = exports.VoiceCloseCodes = exports.VoiceOpcodes = exports.VoiceGatewayVersion = void 0; exports.VoiceGatewayVersion = '8'; /** * @see {@link https://discord.com/developers/docs/topics/opcodes-and-status-codes#voice-voice-opcodes} */ var VoiceOpcodes; (function (VoiceOpcodes) { /** * Begin a voice websocket connection */ VoiceOpcodes[VoiceOpcodes["Identify"] = 0] = "Identify"; /** * Select the voice protocol */ VoiceOpcodes[VoiceOpcodes["SelectProtocol"] = 1] = "SelectProtocol"; /** * Complete the websocket handshake */ VoiceOpcodes[VoiceOpcodes["Ready"] = 2] = "Ready"; /** * Keep the websocket connection alive */ VoiceOpcodes[VoiceOpcodes["Heartbeat"] = 3] = "Heartbeat"; /** * Describe the session */ VoiceOpcodes[VoiceOpcodes["SessionDescription"] = 4] = "SessionDescription"; /** * Indicate which users are speaking */ VoiceOpcodes[VoiceOpcodes["Speaking"] = 5] = "Speaking"; /** * Sent to acknowledge a received client heartbeat */ VoiceOpcodes[VoiceOpcodes["HeartbeatAck"] = 6] = "HeartbeatAck"; /** * Resume a connection */ VoiceOpcodes[VoiceOpcodes["Resume"] = 7] = "Resume"; /** * Time to wait between sending heartbeats in milliseconds */ VoiceOpcodes[VoiceOpcodes["Hello"] = 8] = "Hello"; /** * Acknowledge a successful session resume */ VoiceOpcodes[VoiceOpcodes["Resumed"] = 9] = "Resumed"; /** * One or more clients have connected to the voice channel */ VoiceOpcodes[VoiceOpcodes["ClientsConnect"] = 11] = "ClientsConnect"; /** * A client has disconnected from the voice channel */ VoiceOpcodes[VoiceOpcodes["ClientDisconnect"] = 13] = "ClientDisconnect"; /** * A downgrade from the DAVE protocol is upcoming */ VoiceOpcodes[VoiceOpcodes["DavePrepareTransition"] = 21] = "DavePrepareTransition"; /** * Execute a previously announced protocol transition */ VoiceOpcodes[VoiceOpcodes["DaveExecuteTransition"] = 22] = "DaveExecuteTransition"; /** * Acknowledge readiness previously announced transition */ VoiceOpcodes[VoiceOpcodes["DaveTransitionReady"] = 23] = "DaveTransitionReady"; /** * A DAVE protocol version or group change is upcoming */ VoiceOpcodes[VoiceOpcodes["DavePrepareEpoch"] = 24] = "DavePrepareEpoch"; /** * Credential and public key for MLS external sender */ VoiceOpcodes[VoiceOpcodes["DaveMlsExternalSender"] = 25] = "DaveMlsExternalSender"; /** * MLS Key Package for pending group member */ VoiceOpcodes[VoiceOpcodes["DaveMlsKeyPackage"] = 26] = "DaveMlsKeyPackage"; /** * MLS Proposals to be appended or revoked */ VoiceOpcodes[VoiceOpcodes["DaveMlsProposals"] = 27] = "DaveMlsProposals"; /** * MLS Commit with optional MLS Welcome messages */ VoiceOpcodes[VoiceOpcodes["DaveMlsCommitWelcome"] = 28] = "DaveMlsCommitWelcome"; /** * MLS Commit to be processed for upcoming transition */ VoiceOpcodes[VoiceOpcodes["DaveMlsAnnounceCommitTransition"] = 29] = "DaveMlsAnnounceCommitTransition"; /** * MLS Welcome to group for upcoming transition */ VoiceOpcodes[VoiceOpcodes["DaveMlsWelcome"] = 30] = "DaveMlsWelcome"; /** * Flag invalid commit or welcome, request re-add */ VoiceOpcodes[VoiceOpcodes["DaveMlsInvalidCommitWelcome"] = 31] = "DaveMlsInvalidCommitWelcome"; })(VoiceOpcodes || (exports.VoiceOpcodes = VoiceOpcodes = {})); /** * @see {@link https://discord.com/developers/docs/topics/opcodes-and-status-codes#voice-voice-close-event-codes} */ var VoiceCloseCodes; (function (VoiceCloseCodes) { /** * You sent an invalid opcode */ VoiceCloseCodes[VoiceCloseCodes["UnknownOpcode"] = 4001] = "UnknownOpcode"; /** * You sent a invalid payload in your identifying to the Gateway */ VoiceCloseCodes[VoiceCloseCodes["FailedToDecode"] = 4002] = "FailedToDecode"; /** * You sent a payload before identifying with the Gateway */ VoiceCloseCodes[VoiceCloseCodes["NotAuthenticated"] = 4003] = "NotAuthenticated"; /** * The token you sent in your identify payload is incorrect */ VoiceCloseCodes[VoiceCloseCodes["AuthenticationFailed"] = 4004] = "AuthenticationFailed"; /** * You sent more than one identify payload. Stahp */ VoiceCloseCodes[VoiceCloseCodes["AlreadyAuthenticated"] = 4005] = "AlreadyAuthenticated"; /** * Your session is no longer valid */ VoiceCloseCodes[VoiceCloseCodes["SessionNoLongerValid"] = 4006] = "SessionNoLongerValid"; /** * Your session has timed out */ VoiceCloseCodes[VoiceCloseCodes["SessionTimeout"] = 4009] = "SessionTimeout"; /** * We can't find the server you're trying to connect to */ VoiceCloseCodes[VoiceCloseCodes["ServerNotFound"] = 4011] = "ServerNotFound"; /** * We didn't recognize the protocol you sent */ VoiceCloseCodes[VoiceCloseCodes["UnknownProtocol"] = 4012] = "UnknownProtocol"; /** * Either the channel was deleted, you were kicked, or the main gateway session was dropped. Should not reconnect */ VoiceCloseCodes[VoiceCloseCodes["Disconnected"] = 4014] = "Disconnected"; /** * The server crashed. Our bad! Try resuming */ VoiceCloseCodes[VoiceCloseCodes["VoiceServerCrashed"] = 4015] = "VoiceServerCrashed"; /** * We didn't recognize your encryption */ VoiceCloseCodes[VoiceCloseCodes["UnknownEncryptionMode"] = 4016] = "UnknownEncryptionMode"; /** * You sent a malformed request */ VoiceCloseCodes[VoiceCloseCodes["BadRequest"] = 4020] = "BadRequest"; })(VoiceCloseCodes || (exports.VoiceCloseCodes = VoiceCloseCodes = {})); /** * @see {@link https://discord.com/developers/docs/topics/voice-connections#transport-encryption-modes} */ var VoiceEncryptionMode; (function (VoiceEncryptionMode) { /** * AEAD AES256-GCM (RTP Size) */ VoiceEncryptionMode["AeadAes256GcmRtpSize"] = "aead_aes256_gcm_rtpsize"; /** * AEAD XChaCha20 Poly1305 (RTP Size) */ VoiceEncryptionMode["AeadXChaCha20Poly1305RtpSize"] = "aead_xchacha20_poly1305_rtpsize"; /** * XSalsa20 Poly1305 Lite (RTP Size) * * @deprecated This encryption mode has been discontinued. */ VoiceEncryptionMode["XSalsa20Poly1305LiteRtpSize"] = "xsalsa20_poly1305_lite_rtpsize"; /** * AEAD AES256-GCM * * @deprecated This encryption mode has been discontinued. */ VoiceEncryptionMode["AeadAes256Gcm"] = "aead_aes256_gcm"; /** * XSalsa20 Poly1305 * * @deprecated This encryption mode has been discontinued. */ VoiceEncryptionMode["XSalsa20Poly1305"] = "xsalsa20_poly1305"; /** * XSalsa20 Poly1305 Suffix * * @deprecated This encryption mode has been discontinued. */ VoiceEncryptionMode["XSalsa20Poly1305Suffix"] = "xsalsa20_poly1305_suffix"; /** * XSalsa20 Poly1305 Lite * * @deprecated This encryption mode has been discontinued. */ VoiceEncryptionMode["XSalsa20Poly1305Lite"] = "xsalsa20_poly1305_lite"; })(VoiceEncryptionMode || (exports.VoiceEncryptionMode = VoiceEncryptionMode = {})); /** * @see {@link https://discord.com/developers/docs/topics/voice-connections#speaking} */ var VoiceSpeakingFlags; (function (VoiceSpeakingFlags) { /** * Normal transmission of voice audio */ VoiceSpeakingFlags[VoiceSpeakingFlags["Microphone"] = 1] = "Microphone"; /** * Transmission of context audio for video, no speaking indicator */ VoiceSpeakingFlags[VoiceSpeakingFlags["Soundshare"] = 2] = "Soundshare"; /** * Priority speaker, lowering audio of other speakers */ VoiceSpeakingFlags[VoiceSpeakingFlags["Priority"] = 4] = "Priority"; })(VoiceSpeakingFlags || (exports.VoiceSpeakingFlags = VoiceSpeakingFlags = {})); // #endregion Shared //# sourceMappingURL=v8.js.map node_modules/discord-api-types/voice/v4.mjs 0000664 00000000316 15114741631 0014737 0 ustar 00 import mod from "./v4.js"; export default mod; export const VoiceCloseCodes = mod.VoiceCloseCodes; export const VoiceGatewayVersion = mod.VoiceGatewayVersion; export const VoiceOpcodes = mod.VoiceOpcodes; node_modules/discord-api-types/voice/v8.d.ts 0000664 00000040543 15114741631 0015030 0 ustar 00 import type { Snowflake } from "../globals"; export declare const VoiceGatewayVersion = "8"; /** * @see {@link https://discord.com/developers/docs/topics/opcodes-and-status-codes#voice-voice-opcodes} */ export declare enum VoiceOpcodes { /** * Begin a voice websocket connection */ Identify = 0, /** * Select the voice protocol */ SelectProtocol = 1, /** * Complete the websocket handshake */ Ready = 2, /** * Keep the websocket connection alive */ Heartbeat = 3, /** * Describe the session */ SessionDescription = 4, /** * Indicate which users are speaking */ Speaking = 5, /** * Sent to acknowledge a received client heartbeat */ HeartbeatAck = 6, /** * Resume a connection */ Resume = 7, /** * Time to wait between sending heartbeats in milliseconds */ Hello = 8, /** * Acknowledge a successful session resume */ Resumed = 9, /** * One or more clients have connected to the voice channel */ ClientsConnect = 11, /** * A client has disconnected from the voice channel */ ClientDisconnect = 13, /** * A downgrade from the DAVE protocol is upcoming */ DavePrepareTransition = 21, /** * Execute a previously announced protocol transition */ DaveExecuteTransition = 22, /** * Acknowledge readiness previously announced transition */ DaveTransitionReady = 23, /** * A DAVE protocol version or group change is upcoming */ DavePrepareEpoch = 24, /** * Credential and public key for MLS external sender */ DaveMlsExternalSender = 25, /** * MLS Key Package for pending group member */ DaveMlsKeyPackage = 26, /** * MLS Proposals to be appended or revoked */ DaveMlsProposals = 27, /** * MLS Commit with optional MLS Welcome messages */ DaveMlsCommitWelcome = 28, /** * MLS Commit to be processed for upcoming transition */ DaveMlsAnnounceCommitTransition = 29, /** * MLS Welcome to group for upcoming transition */ DaveMlsWelcome = 30, /** * Flag invalid commit or welcome, request re-add */ DaveMlsInvalidCommitWelcome = 31 } /** * @see {@link https://discord.com/developers/docs/topics/opcodes-and-status-codes#voice-voice-close-event-codes} */ export declare enum VoiceCloseCodes { /** * You sent an invalid opcode */ UnknownOpcode = 4001, /** * You sent a invalid payload in your identifying to the Gateway */ FailedToDecode = 4002, /** * You sent a payload before identifying with the Gateway */ NotAuthenticated = 4003, /** * The token you sent in your identify payload is incorrect */ AuthenticationFailed = 4004, /** * You sent more than one identify payload. Stahp */ AlreadyAuthenticated = 4005, /** * Your session is no longer valid */ SessionNoLongerValid = 4006, /** * Your session has timed out */ SessionTimeout = 4009, /** * We can't find the server you're trying to connect to */ ServerNotFound = 4011, /** * We didn't recognize the protocol you sent */ UnknownProtocol = 4012, /** * Either the channel was deleted, you were kicked, or the main gateway session was dropped. Should not reconnect */ Disconnected = 4014, /** * The server crashed. Our bad! Try resuming */ VoiceServerCrashed = 4015, /** * We didn't recognize your encryption */ UnknownEncryptionMode = 4016, /** * You sent a malformed request */ BadRequest = 4020 } /** * @see {@link https://discord.com/developers/docs/topics/voice-connections#transport-encryption-modes} */ export declare enum VoiceEncryptionMode { /** * AEAD AES256-GCM (RTP Size) */ AeadAes256GcmRtpSize = "aead_aes256_gcm_rtpsize", /** * AEAD XChaCha20 Poly1305 (RTP Size) */ AeadXChaCha20Poly1305RtpSize = "aead_xchacha20_poly1305_rtpsize", /** * XSalsa20 Poly1305 Lite (RTP Size) * * @deprecated This encryption mode has been discontinued. */ XSalsa20Poly1305LiteRtpSize = "xsalsa20_poly1305_lite_rtpsize", /** * AEAD AES256-GCM * * @deprecated This encryption mode has been discontinued. */ AeadAes256Gcm = "aead_aes256_gcm", /** * XSalsa20 Poly1305 * * @deprecated This encryption mode has been discontinued. */ XSalsa20Poly1305 = "xsalsa20_poly1305", /** * XSalsa20 Poly1305 Suffix * * @deprecated This encryption mode has been discontinued. */ XSalsa20Poly1305Suffix = "xsalsa20_poly1305_suffix", /** * XSalsa20 Poly1305 Lite * * @deprecated This encryption mode has been discontinued. */ XSalsa20Poly1305Lite = "xsalsa20_poly1305_lite" } /** * @see {@link https://discord.com/developers/docs/topics/voice-connections#speaking} */ export declare enum VoiceSpeakingFlags { /** * Normal transmission of voice audio */ Microphone = 1, /** * Transmission of context audio for video, no speaking indicator */ Soundshare = 2, /** * Priority speaker, lowering audio of other speakers */ Priority = 4 } export type VoiceSendPayload = VoiceDaveMlsInvalidCommitWelcome | VoiceDaveTransitionReady | VoiceHeartbeat | VoiceIdentify | VoiceResume | VoiceSelectProtocol | VoiceSpeakingSend; export type VoiceReceivePayload = VoiceClientDisconnect | VoiceClientsConnect | VoiceDaveExecuteTransition | VoiceDavePrepareEpoch | VoiceDavePrepareTransition | VoiceHeartbeatAck | VoiceHello | VoiceReady | VoiceResumed | VoiceSessionDescription | VoiceSpeaking; /** * @see {@link https://discord.com/developers/docs/topics/voice-connections#heartbeating} */ export type VoiceHello = _DataPayload<VoiceOpcodes.Hello, VoiceHelloData>; /** * @see {@link https://discord.com/developers/docs/topics/voice-connections#heartbeating} */ export interface VoiceHelloData { /** * Voice gateway version * * @see {@link https://discord.com/developers/docs/topics/voice-connections#voice-gateway-versioning-gateway-versions} */ v: number; /** * The interval (in milliseconds) the client should heartbeat with */ heartbeat_interval: number; } /** * @see {@link https://discord.com/developers/docs/topics/voice-connections#establishing-a-voice-websocket-connection} */ export type VoiceReady = _DataPayload<VoiceOpcodes.Ready, VoiceReadyData>; /** * @see {@link https://discord.com/developers/docs/topics/voice-connections#establishing-a-voice-websocket-connection} */ export interface VoiceReadyData { /** * SSRC identifier */ ssrc: number; /** * UDP IP */ ip: string; /** * UDP port */ port: number; /** * Supported encryption modes * * @see {@link https://discord.com/developers/docs/topics/voice-connections#transport-encryption-modes} */ modes: VoiceEncryptionMode[]; } /** * @see {@link https://discord.com/developers/docs/topics/voice-connections#heartbeating} */ export type VoiceHeartbeatAck = _DataPayload<VoiceOpcodes.HeartbeatAck, VoiceHeartbeatAckData>; /** * @see {@link https://discord.com/developers/docs/topics/voice-connections#heartbeating} */ export interface VoiceHeartbeatAckData { /** * The integer nonce */ t: number; } /** * @see {@link https://discord.com/developers/docs/topics/voice-connections#transport-encryption-and-sending-voice} */ export type VoiceSessionDescription = _DataPayload<VoiceOpcodes.SessionDescription, VoiceSessionDescriptionData>; /** * @see {@link https://discord.com/developers/docs/topics/voice-connections#transport-encryption-and-sending-voice} */ export interface VoiceSessionDescriptionData { /** * The selected mode */ mode: VoiceEncryptionMode; /** * The secret key */ secret_key: number[]; /** * The selected DAVE protocol version * * @see {@link https://daveprotocol.com/#select_protocol_ack-4} */ dave_protocol_version: number; } /** * @see {@link https://discord.com/developers/docs/topics/voice-connections#resuming-voice-connection} */ export type VoiceResumed = _DataPayload<VoiceOpcodes.Resumed, null>; /** * @see {@link https://discord.com/developers/docs/topics/voice-connections#speaking} */ export type VoiceSpeaking = _DataPayload<VoiceOpcodes.Speaking, VoiceSpeakingData>; /** * @see {@link https://discord.com/developers/docs/topics/voice-connections#speaking} */ export interface VoiceSpeakingData { /** * The speaking mode flags */ speaking: VoiceSpeakingFlags; /** * SSRC identifier */ ssrc: number; /** * User id */ user_id: Snowflake; } /** * @see {@link https://daveprotocol.com/#clients_connect-11} */ export type VoiceClientsConnect = _DataPayload<VoiceOpcodes.ClientsConnect, VoiceClientsConnectData>; /** * @see {@link https://daveprotocol.com/#clients_connect-11} */ export interface VoiceClientsConnectData { /** * The connected user ids */ user_ids: Snowflake[]; } /** * @see {@link https://discord.com/developers/docs/topics/voice-connections} */ export type VoiceClientDisconnect = _DataPayload<VoiceOpcodes.ClientDisconnect, VoiceClientDisconnectData>; /** * @see {@link https://discord.com/developers/docs/topics/voice-connections} */ export interface VoiceClientDisconnectData { /** * The disconnected user id */ user_id: Snowflake; } /** * @see {@link https://daveprotocol.com/#dave_protocol_prepare_transition-21} */ export type VoiceDavePrepareTransition = _DataPayload<VoiceOpcodes.DavePrepareTransition, VoiceDavePrepareTransitionData>; /** * @see {@link https://daveprotocol.com/#dave_protocol_prepare_transition-21} */ export interface VoiceDavePrepareTransitionData { /** * The protocol version */ protocol_version: number; /** * The transition id */ transition_id: number; } /** * @see {@link https://daveprotocol.com/#dave_protocol_execute_transition-22} */ export type VoiceDaveExecuteTransition = _DataPayload<VoiceOpcodes.DaveExecuteTransition, VoiceDaveExecuteTransitionData>; /** * @see {@link https://daveprotocol.com/#dave_protocol_execute_transition-22} */ export interface VoiceDaveExecuteTransitionData { /** * The transition id */ transition_id: number; } /** * @see {@link https://daveprotocol.com/#dave_mls_external_sender_package-25} */ export type VoiceDaveMlsExternalSender = VoiceBinaryPayload; /** * @see {@link https://daveprotocol.com/#dave_mls_proposals-27} */ export type VoiceDaveMlsProposals = VoiceBinaryPayload; /** * @see {@link https://daveprotocol.com/#dave_mls_announce_commit_transition-29} */ export type VoiceDaveMlsAnnounceCommitTransition = VoiceBinaryPayload; /** * @see {@link https://daveprotocol.com/#dave_mls_welcome-30} */ export type VoiceDaveMlsWelcome = VoiceBinaryPayload; /** * @see {@link https://discord.com/developers/docs/topics/voice-connections#establishing-a-voice-websocket-connection} */ export interface VoiceIdentify { op: VoiceOpcodes.Identify; d: VoiceIdentifyData; } /** * @see {@link https://discord.com/developers/docs/topics/voice-connections#establishing-a-voice-websocket-connection} */ export interface VoiceIdentifyData { /** * The id of the server to connect to */ server_id: Snowflake; /** * The id of the user to connect as */ user_id: Snowflake; /** * Voice state session id */ session_id: string; /** * Voice connection token */ token: string; /** * The maximum DAVE protocol version supported */ max_dave_protocol_version?: number; } /** * @see {@link https://discord.com/developers/docs/topics/voice-connections#establishing-a-voice-websocket-connection} */ export interface VoiceHeartbeat { op: VoiceOpcodes.Heartbeat; d: VoiceHeartbeatData; } /** * @see {@link https://discord.com/developers/docs/topics/voice-connections#establishing-a-voice-websocket-connection} */ export interface VoiceHeartbeatData { /** * The integer nonce */ t: number; /** * The last sequence number recieved */ seq_ack: number; } /** * @see {@link https://discord.com/developers/docs/topics/voice-connections#establishing-a-voice-udp-connection} */ export interface VoiceSelectProtocol { op: VoiceOpcodes.SelectProtocol; d: VoiceSelectProtocolData; } /** * @see {@link https://discord.com/developers/docs/topics/voice-connections#establishing-a-voice-udp-connection} */ export interface VoiceSelectProtocolData { /** * Voice protocol */ protocol: string; /** * Data associated with the protocol */ data: VoiceUDPProtocolData; } /** * @see {@link https://discord.com/developers/docs/topics/voice-connections#establishing-a-voice-udp-connection} */ export interface VoiceUDPProtocolData { /** * External address */ address: string; /** * External UDP port */ port: number; /** * Selected mode * * @see {@link https://discord.com/developers/docs/topics/voice-connections#transport-encryption-modes} */ mode: VoiceEncryptionMode; } /** * @see {@link https://discord.com/developers/docs/topics/voice-connections#resuming-voice-connection} */ export interface VoiceResume { op: VoiceOpcodes.Resume; d: VoiceResumeData; } /** * @see {@link https://discord.com/developers/docs/topics/voice-connections#resuming-voice-connection} */ export interface VoiceResumeData { /** * The id of the server to connect to */ server_id: Snowflake; /** * Voice state session id */ session_id: string; /** * Voice connection token */ token: string; /** * Last recieved sequence number */ seq_ack: number; } /** * @see {@link https://discord.com/developers/docs/topics/voice-connections#speaking} */ export interface VoiceSpeakingSend { op: VoiceOpcodes.Speaking; d: VoiceSpeakingSendData; } /** * @see {@link https://discord.com/developers/docs/topics/voice-connections#speaking} */ export interface VoiceSpeakingSendData { /** * The speaking mode flags */ speaking: VoiceSpeakingFlags; /** * Voice delay */ delay: number; /** * SSRC identifier */ ssrc: number; } /** * @see {@link https://daveprotocol.com/#dave_protocol_ready_for_transition-23} */ export interface VoiceDaveTransitionReady { op: VoiceOpcodes.DaveTransitionReady; d: VoiceDaveTransitionReadyData; } /** * @see {@link https://daveprotocol.com/#dave_protocol_ready_for_transition-23} */ export interface VoiceDaveTransitionReadyData { /** * The transition id */ transition_id: number; } /** * @see {@link https://daveprotocol.com/#dave_protocol_prepare_epoch-24} */ export interface VoiceDavePrepareEpoch { op: VoiceOpcodes.DavePrepareEpoch; d: VoiceDavePrepareEpochData; } /** * @see {@link https://daveprotocol.com/#dave_protocol_prepare_epoch-24} */ export interface VoiceDavePrepareEpochData { /** * The protocol version */ protocol_version: number; /** * The epoch id */ epoch: number; } /** * @see {@link https://daveprotocol.com/#dave_mls_invalid_commit_welcome-31} */ export interface VoiceDaveMlsInvalidCommitWelcome { op: VoiceOpcodes.DaveMlsInvalidCommitWelcome; d: VoiceDaveMlsInvalidCommitWelcomeData; } /** * @see {@link https://daveprotocol.com/#dave_mls_invalid_commit_welcome-31} */ export interface VoiceDaveMlsInvalidCommitWelcomeData { /** * The transition id */ transition_id: number; } /** * @see {@link https://daveprotocol.com/#dave_mls_key_package-26} */ export type VoiceDaveMlsKeyPackage = VoiceBinaryPayload; /** * @see {@link https://daveprotocol.com/#dave_mls_commit_welcome-28} */ export type VoiceDaveMlsCommitWelcome = VoiceBinaryPayload; export interface _BasePayload { /** * Opcode for the payload */ op: VoiceOpcodes; /** * Event data */ d?: unknown; /** * Sequence number, used for resuming sessions and heartbeats */ seq?: number; } export interface _DataPayload<Op extends VoiceOpcodes, D = unknown> extends _BasePayload { op: Op; d: D; } export type VoiceBinaryPayload = ArrayBuffer; //# sourceMappingURL=v8.d.ts.map node_modules/discord-api-types/voice/index.d.ts 0000664 00000000071 15114741631 0015572 0 ustar 00 export * from './v8'; //# sourceMappingURL=index.d.ts.map node_modules/discord-api-types/voice/v8.js.map 0000664 00000003411 15114741631 0015341 0 ustar 00 {"version":3,"file":"v8.js","sourceRoot":"","sources":["v8.ts"],"names":[],"mappings":";;;AAEa,QAA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B;;OAEG;IACH,oFAAkB,CAAA;IAClB;;OAEG;IACH,0FAAqB,CAAA;IACrB;;OAEG;IACH,oEAAkB,CAAA;AACnB,CAAC,EArDW,eAAe,+BAAf,eAAe,QAqD1B;AAED;;GAEG;AACH,IAAY,mBAuCX;AAvCD,WAAY,mBAAmB;IAC9B;;OAEG;IACH,uEAAgD,CAAA;IAChD;;OAEG;IACH,uFAAgE,CAAA;IAChE;;;;OAIG;IACH,qFAA8D,CAAA;IAC9D;;;;OAIG;IACH,wDAAiC,CAAA;IACjC;;;;OAIG;IACH,6DAAsC,CAAA;IACtC;;;;OAIG;IACH,0EAAmD,CAAA;IACnD;;;;OAIG;IACH,sEAA+C,CAAA;AAChD,CAAC,EAvCW,mBAAmB,mCAAnB,mBAAmB,QAuC9B;AAED;;GAEG;AACH,IAAY,kBAaX;AAbD,WAAY,kBAAkB;IAC7B;;OAEG;IACH,uEAAmB,CAAA;IACnB;;OAEG;IACH,uEAAmB,CAAA;IACnB;;OAEG;IACH,mEAAiB,CAAA;AAClB,CAAC,EAbW,kBAAkB,kCAAlB,kBAAkB,QAa7B;AA6dD,oBAAoB"} node_modules/discord-api-types/voice/v8.mjs 0000664 00000000504 15114741631 0014742 0 ustar 00 import mod from "./v8.js"; export default mod; export const VoiceCloseCodes = mod.VoiceCloseCodes; export const VoiceEncryptionMode = mod.VoiceEncryptionMode; export const VoiceGatewayVersion = mod.VoiceGatewayVersion; export const VoiceOpcodes = mod.VoiceOpcodes; export const VoiceSpeakingFlags = mod.VoiceSpeakingFlags; node_modules/discord-api-types/voice/index.mjs 0000664 00000000507 15114741631 0015517 0 ustar 00 import mod from "./index.js"; export default mod; export const VoiceCloseCodes = mod.VoiceCloseCodes; export const VoiceEncryptionMode = mod.VoiceEncryptionMode; export const VoiceGatewayVersion = mod.VoiceGatewayVersion; export const VoiceOpcodes = mod.VoiceOpcodes; export const VoiceSpeakingFlags = mod.VoiceSpeakingFlags; node_modules/discord-api-types/voice/index.js.map 0000664 00000000224 15114741631 0016112 0 ustar 00 {"version":3,"file":"index.js","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":";AAAA,qFAAqF;AACrF,2FAA2F;;;;;;;;;;;;;;;;AAE3F,uCAAqB"} node_modules/discord-api-types/voice/index.js 0000664 00000001760 15114741631 0015344 0 ustar 00 "use strict"; // This file exports all the types available in the recommended voice gateway version // Thereby, things MAY break in the future. Try sticking to imports from a specific version var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { if (k2 === undefined) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { return m[k]; } }; } Object.defineProperty(o, k2, desc); }) : (function(o, m, k, k2) { if (k2 === undefined) k2 = k; o[k2] = m[k]; })); var __exportStar = (this && this.__exportStar) || function(m, exports) { for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); }; Object.defineProperty(exports, "__esModule", { value: true }); __exportStar(require("./v8"), exports); //# sourceMappingURL=index.js.map node_modules/discord-api-types/voice/v4.js 0000664 00000014046 15114741631 0014567 0 ustar 00 "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.VoiceCloseCodes = exports.VoiceOpcodes = exports.VoiceGatewayVersion = void 0; exports.VoiceGatewayVersion = '4'; /** * @see {@link https://discord.com/developers/docs/topics/opcodes-and-status-codes#voice-voice-opcodes} */ var VoiceOpcodes; (function (VoiceOpcodes) { /** * Begin a voice websocket connection */ VoiceOpcodes[VoiceOpcodes["Identify"] = 0] = "Identify"; /** * Select the voice protocol */ VoiceOpcodes[VoiceOpcodes["SelectProtocol"] = 1] = "SelectProtocol"; /** * Complete the websocket handshake */ VoiceOpcodes[VoiceOpcodes["Ready"] = 2] = "Ready"; /** * Keep the websocket connection alive */ VoiceOpcodes[VoiceOpcodes["Heartbeat"] = 3] = "Heartbeat"; /** * Describe the session */ VoiceOpcodes[VoiceOpcodes["SessionDescription"] = 4] = "SessionDescription"; /** * Indicate which users are speaking */ VoiceOpcodes[VoiceOpcodes["Speaking"] = 5] = "Speaking"; /** * Sent to acknowledge a received client heartbeat */ VoiceOpcodes[VoiceOpcodes["HeartbeatAck"] = 6] = "HeartbeatAck"; /** * Resume a connection */ VoiceOpcodes[VoiceOpcodes["Resume"] = 7] = "Resume"; /** * Time to wait between sending heartbeats in milliseconds */ VoiceOpcodes[VoiceOpcodes["Hello"] = 8] = "Hello"; /** * Acknowledge a successful session resume */ VoiceOpcodes[VoiceOpcodes["Resumed"] = 9] = "Resumed"; /** * One or more clients have connected to the voice channel */ VoiceOpcodes[VoiceOpcodes["ClientsConnect"] = 11] = "ClientsConnect"; /** * Previously for when a client has connected to the voice channel, now unused * * @deprecated Not used */ VoiceOpcodes[VoiceOpcodes["ClientConnect"] = 12] = "ClientConnect"; /** * A client has disconnected from the voice channel */ VoiceOpcodes[VoiceOpcodes["ClientDisconnect"] = 13] = "ClientDisconnect"; /** * A downgrade from the DAVE protocol is upcoming */ VoiceOpcodes[VoiceOpcodes["DavePrepareTransition"] = 21] = "DavePrepareTransition"; /** * Execute a previously announced protocol transition */ VoiceOpcodes[VoiceOpcodes["DaveExecuteTransition"] = 22] = "DaveExecuteTransition"; /** * Acknowledge readiness previously announced transition */ VoiceOpcodes[VoiceOpcodes["DaveTransitionReady"] = 23] = "DaveTransitionReady"; /** * A DAVE protocol version or group change is upcoming */ VoiceOpcodes[VoiceOpcodes["DavePrepareEpoch"] = 24] = "DavePrepareEpoch"; /** * Credential and public key for MLS external sender */ VoiceOpcodes[VoiceOpcodes["DaveMlsExternalSender"] = 25] = "DaveMlsExternalSender"; /** * MLS Key Package for pending group member */ VoiceOpcodes[VoiceOpcodes["DaveMlsKeyPackage"] = 26] = "DaveMlsKeyPackage"; /** * MLS Proposals to be appended or revoked */ VoiceOpcodes[VoiceOpcodes["DaveMlsProposals"] = 27] = "DaveMlsProposals"; /** * MLS Commit with optional MLS Welcome messages */ VoiceOpcodes[VoiceOpcodes["DaveMlsCommitWelcome"] = 28] = "DaveMlsCommitWelcome"; /** * MLS Commit to be processed for upcoming transition */ VoiceOpcodes[VoiceOpcodes["DaveMlsAnnounceCommitTransition"] = 29] = "DaveMlsAnnounceCommitTransition"; /** * MLS Welcome to group for upcoming transition */ VoiceOpcodes[VoiceOpcodes["DaveMlsWelcome"] = 30] = "DaveMlsWelcome"; /** * Flag invalid commit or welcome, request re-add */ VoiceOpcodes[VoiceOpcodes["DaveMlsInvalidCommitWelcome"] = 31] = "DaveMlsInvalidCommitWelcome"; })(VoiceOpcodes || (exports.VoiceOpcodes = VoiceOpcodes = {})); /** * @see {@link https://discord.com/developers/docs/topics/opcodes-and-status-codes#voice-voice-close-event-codes} */ var VoiceCloseCodes; (function (VoiceCloseCodes) { /** * You sent an invalid opcode */ VoiceCloseCodes[VoiceCloseCodes["UnknownOpcode"] = 4001] = "UnknownOpcode"; /** * You sent a invalid payload in your identifying to the Gateway */ VoiceCloseCodes[VoiceCloseCodes["FailedToDecode"] = 4002] = "FailedToDecode"; /** * You sent a payload before identifying with the Gateway */ VoiceCloseCodes[VoiceCloseCodes["NotAuthenticated"] = 4003] = "NotAuthenticated"; /** * The token you sent in your identify payload is incorrect */ VoiceCloseCodes[VoiceCloseCodes["AuthenticationFailed"] = 4004] = "AuthenticationFailed"; /** * You sent more than one identify payload. Stahp */ VoiceCloseCodes[VoiceCloseCodes["AlreadyAuthenticated"] = 4005] = "AlreadyAuthenticated"; /** * Your session is no longer valid */ VoiceCloseCodes[VoiceCloseCodes["SessionNoLongerValid"] = 4006] = "SessionNoLongerValid"; /** * Your session has timed out */ VoiceCloseCodes[VoiceCloseCodes["SessionTimeout"] = 4009] = "SessionTimeout"; /** * We can't find the server you're trying to connect to */ VoiceCloseCodes[VoiceCloseCodes["ServerNotFound"] = 4011] = "ServerNotFound"; /** * We didn't recognize the protocol you sent */ VoiceCloseCodes[VoiceCloseCodes["UnknownProtocol"] = 4012] = "UnknownProtocol"; /** * Either the channel was deleted, you were kicked, or the main gateway session was dropped. Should not reconnect */ VoiceCloseCodes[VoiceCloseCodes["Disconnected"] = 4014] = "Disconnected"; /** * The server crashed. Our bad! Try resuming */ VoiceCloseCodes[VoiceCloseCodes["VoiceServerCrashed"] = 4015] = "VoiceServerCrashed"; /** * We didn't recognize your encryption */ VoiceCloseCodes[VoiceCloseCodes["UnknownEncryptionMode"] = 4016] = "UnknownEncryptionMode"; /** * You sent a malformed request */ VoiceCloseCodes[VoiceCloseCodes["BadRequest"] = 4020] = "BadRequest"; })(VoiceCloseCodes || (exports.VoiceCloseCodes = VoiceCloseCodes = {})); //# sourceMappingURL=v4.js.map node_modules/discord-api-types/voice/v4.d.ts 0000664 00000007541 15114741631 0015025 0 ustar 00 export declare const VoiceGatewayVersion = "4"; /** * @see {@link https://discord.com/developers/docs/topics/opcodes-and-status-codes#voice-voice-opcodes} */ export declare enum VoiceOpcodes { /** * Begin a voice websocket connection */ Identify = 0, /** * Select the voice protocol */ SelectProtocol = 1, /** * Complete the websocket handshake */ Ready = 2, /** * Keep the websocket connection alive */ Heartbeat = 3, /** * Describe the session */ SessionDescription = 4, /** * Indicate which users are speaking */ Speaking = 5, /** * Sent to acknowledge a received client heartbeat */ HeartbeatAck = 6, /** * Resume a connection */ Resume = 7, /** * Time to wait between sending heartbeats in milliseconds */ Hello = 8, /** * Acknowledge a successful session resume */ Resumed = 9, /** * One or more clients have connected to the voice channel */ ClientsConnect = 11, /** * Previously for when a client has connected to the voice channel, now unused * * @deprecated Not used */ ClientConnect = 12, /** * A client has disconnected from the voice channel */ ClientDisconnect = 13, /** * A downgrade from the DAVE protocol is upcoming */ DavePrepareTransition = 21, /** * Execute a previously announced protocol transition */ DaveExecuteTransition = 22, /** * Acknowledge readiness previously announced transition */ DaveTransitionReady = 23, /** * A DAVE protocol version or group change is upcoming */ DavePrepareEpoch = 24, /** * Credential and public key for MLS external sender */ DaveMlsExternalSender = 25, /** * MLS Key Package for pending group member */ DaveMlsKeyPackage = 26, /** * MLS Proposals to be appended or revoked */ DaveMlsProposals = 27, /** * MLS Commit with optional MLS Welcome messages */ DaveMlsCommitWelcome = 28, /** * MLS Commit to be processed for upcoming transition */ DaveMlsAnnounceCommitTransition = 29, /** * MLS Welcome to group for upcoming transition */ DaveMlsWelcome = 30, /** * Flag invalid commit or welcome, request re-add */ DaveMlsInvalidCommitWelcome = 31 } /** * @see {@link https://discord.com/developers/docs/topics/opcodes-and-status-codes#voice-voice-close-event-codes} */ export declare enum VoiceCloseCodes { /** * You sent an invalid opcode */ UnknownOpcode = 4001, /** * You sent a invalid payload in your identifying to the Gateway */ FailedToDecode = 4002, /** * You sent a payload before identifying with the Gateway */ NotAuthenticated = 4003, /** * The token you sent in your identify payload is incorrect */ AuthenticationFailed = 4004, /** * You sent more than one identify payload. Stahp */ AlreadyAuthenticated = 4005, /** * Your session is no longer valid */ SessionNoLongerValid = 4006, /** * Your session has timed out */ SessionTimeout = 4009, /** * We can't find the server you're trying to connect to */ ServerNotFound = 4011, /** * We didn't recognize the protocol you sent */ UnknownProtocol = 4012, /** * Either the channel was deleted, you were kicked, or the main gateway session was dropped. Should not reconnect */ Disconnected = 4014, /** * The server crashed. Our bad! Try resuming */ VoiceServerCrashed = 4015, /** * We didn't recognize your encryption */ UnknownEncryptionMode = 4016, /** * You sent a malformed request */ BadRequest = 4020 } //# sourceMappingURL=v4.d.ts.map node_modules/discord-api-types/voice/v4.d.ts.map 0000664 00000002275 15114741631 0015600 0 ustar 00 {"version":3,"file":"v4.d.ts","sourceRoot":"","sources":["v4.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,mBAAmB,MAAM,CAAC;AAEvC;;GAEG;AACH,oBAAY,YAAY;IACvB;;OAEG;IACH,QAAQ,IAAA;IACR;;OAEG;IACH,cAAc,IAAA;IACd;;OAEG;IACH,KAAK,IAAA;IACL;;OAEG;IACH,SAAS,IAAA;IACT;;OAEG;IACH,kBAAkB,IAAA;IAClB;;OAEG;IACH,QAAQ,IAAA;IACR;;OAEG;IACH,YAAY,IAAA;IACZ;;OAEG;IACH,MAAM,IAAA;IACN;;OAEG;IACH,KAAK,IAAA;IACL;;OAEG;IACH,OAAO,IAAA;IACP;;OAEG;IACH,cAAc,KAAK;IACnB;;;;OAIG;IACH,aAAa,KAAA;IACb;;OAEG;IACH,gBAAgB,KAAA;IAChB;;OAEG;IACH,qBAAqB,KAAK;IAC1B;;OAEG;IACH,qBAAqB,KAAA;IACrB;;OAEG;IACH,mBAAmB,KAAA;IACnB;;OAEG;IACH,gBAAgB,KAAA;IAChB;;OAEG;IACH,qBAAqB,KAAA;IACrB;;OAEG;IACH,iBAAiB,KAAA;IACjB;;OAEG;IACH,gBAAgB,KAAA;IAChB;;OAEG;IACH,oBAAoB,KAAA;IACpB;;OAEG;IACH,+BAA+B,KAAA;IAC/B;;OAEG;IACH,cAAc,KAAA;IACd;;OAEG;IACH,2BAA2B,KAAA;CAC3B;AAED;;GAEG;AACH,oBAAY,eAAe;IAC1B;;OAEG;IACH,aAAa,OAAQ;IACrB;;OAEG;IACH,cAAc,OAAA;IACd;;OAEG;IACH,gBAAgB,OAAA;IAChB;;OAEG;IACH,oBAAoB,OAAA;IACpB;;OAEG;IACH,oBAAoB,OAAA;IACpB;;OAEG;IACH,oBAAoB,OAAA;IACpB;;OAEG;IACH,cAAc,OAAQ;IACtB;;OAEG;IACH,cAAc,OAAQ;IACtB;;OAEG;IACH,eAAe,OAAA;IACf;;OAEG;IACH,YAAY,OAAQ;IACpB;;OAEG;IACH,kBAAkB,OAAA;IAClB;;OAEG;IACH,qBAAqB,OAAA;IACrB;;OAEG;IACH,UAAU,OAAQ;CAClB"} node_modules/discord-api-types/rpc/common.d.ts.map 0000664 00000010240 15114741631 0016205 0 ustar 00 {"version":3,"file":"common.d.ts","sourceRoot":"","sources":["common.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAE5C;;;GAGG;AACH,MAAM,WAAW,4BAA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IACH,cAAc,OAAA;IACd;;OAEG;IACH,kBAAkB,OAAA;IAClB;;OAEG;IACH,eAAe,OAAA;IACf;;OAEG;IACH,aAAa,OAAA;IACb;;OAEG;IACH,YAAY,OAAA;IACZ;;OAEG;IACH,WAAW,OAAA;IACX;;OAEG;IACH,aAAa,OAAA;IACb;;OAEG;IACH,0BAA0B,OAAA;IAC1B;;OAEG;IACH,kBAAkB,OAAA;IAClB;;OAEG;IACH,eAAe,OAAA;IACf;;OAEG;IACH,WAAW,OAAQ;IACnB;;OAEG;IACH,qBAAqB,OAAA;IACrB;;OAEG;IACH,gBAAgB,OAAA;IAChB;;OAEG;IACH,wBAAwB,OAAA;IACxB;;OAEG;IACH,+BAA+B,OAAA;IAC/B;;OAEG;IACH,qBAAqB,OAAA;IACrB;;OAEG;IACH,kBAAkB,OAAA;IAClB;;OAEG;IACH,gBAAgB,OAAA;IAChB;;OAEG;IACH,aAAa,OAAA;IACb;;OAEG;IACH,0BAA0B,OAAA;IAC1B;;OAEG;IACH,WAAW,OAAA;CACX;AAED;;GAEG;AACH,oBAAY,kBAAkB;IAC7B;;OAEG;IACH,WAAW,OAAQ;IACnB;;OAEG;IACH,gBAAgB,OAAQ;IACxB;;OAEG;IACH,aAAa,OAAQ;IACrB;;OAEG;IACH,eAAe,OAAQ;IACvB;;OAEG;IACH,aAAa,OAAA;IACb;;OAEG;IACH,WAAW,OAAA;IACX;;OAEG;IACH,YAAY,OAAA;IACZ;;OAEG;IACH,cAAc,OAAA;IACd;;OAEG;IACH,eAAe,OAAA;CACf"} node_modules/discord-api-types/rpc/common.js.map 0000664 00000004322 15114741631 0015755 0 ustar 00 {"version":3,"file":"common.js","sourceRoot":"","sources":["common.ts"],"names":[],"mappings":";;;AAuGA,IAAY,aAIX;AAJD,WAAY,aAAa;IACxB,0CAAyB,CAAA;IACzB,4CAA2B,CAAA;IAC3B,0CAAyB,CAAA;AAC1B,CAAC,EAJW,aAAa,6BAAb,aAAa,QAIxB;AAiGD,IAAY,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A;IACd;;OAEG;IACH,gFAAkB,CAAA;IAClB;;OAEG;IACH,0EAAe,CAAA;IACf;;OAEG;IACH,sEAAa,CAAA;IACb;;OAEG;IACH,oEAAY,CAAA;IACZ;;OAEG;IACH,kEAAW,CAAA;IACX;;OAEG;IACH,sEAAa,CAAA;IACb;;OAEG;IACH,gGAA0B,CAAA;IAC1B;;OAEG;IACH,gFAAkB,CAAA;IAClB;;OAEG;IACH,0EAAe,CAAA;IACf;;OAEG;IACH,kEAAmB,CAAA;IACnB;;OAEG;IACH,sFAAqB,CAAA;IACrB;;OAEG;IACH,4EAAgB,CAAA;IAChB;;OAEG;IACH,4FAAwB,CAAA;IACxB;;OAEG;IACH,0GAA+B,CAAA;IAC/B;;OAEG;IACH,sFAAqB,CAAA;IACrB;;OAEG;IACH,gFAAkB,CAAA;IAClB;;OAEG;IACH,4EAAgB,CAAA;IAChB;;OAEG;IACH,sEAAa,CAAA;IACb;;OAEG;IACH,gGAA0B,CAAA;IAC1B;;OAEG;IACH,kEAAW,CAAA;AACZ,CAAC,EAjHW,aAAa,6BAAb,aAAa,QAiHxB;AAED;;GAEG;AACH,IAAY,kBAqCX;AArCD,WAAY,kBAAkB;IAC7B;;OAEG;IACH,4EAAmB,CAAA;IACnB;;OAEG;IACH,sFAAwB,CAAA;IACxB;;OAEG;IACH,gFAAqB,CAAA;IACrB;;OAEG;IACH,oFAAuB,CAAA;IACvB;;OAEG;IACH,gFAAa,CAAA;IACb;;OAEG;IACH,4EAAW,CAAA;IACX;;OAEG;IACH,8EAAY,CAAA;IACZ;;OAEG;IACH,kFAAc,CAAA;IACd;;OAEG;IACH,oFAAe,CAAA;AAChB,CAAC,EArCW,kBAAkB,kCAAlB,kBAAkB,QAqC7B"} node_modules/discord-api-types/rpc/v10.d.ts.map 0000664 00000105515 15114741631 0015335 0 ustar 00 {"version":3,"file":"v10.d.ts","sourceRoot":"","sources":["v10.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACX,uBAAuB,EACvB,S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xB,yCAAyC,GACzC,oCAAoC,GACpC,oCAAoC,GACpC,yBAAyB,GACzB,qCAAqC,GACrC,2BAA2B,GAC3B,4BAA4B,GAC5B,gCAAgC,GAChC,qCAAqC,GACrC,yBAAyB,GACzB,0BAA0B,GAC1B,yBAAyB,GACzB,oCAAoC,GACpC,iCAAiC,GACjC,wCAAwC,GACxC,wBAAwB,GACxB,wBAAwB,GACxB,iCAAiC,GACjC,gCAAgC,GAChC,qCAAqC,GACrC,8BAA8B,GAC9B,sCAAsC,GACtC,sCAAsC,GACtC,wCAAwC,GACxC,0CAA0C,GAC1C,uCAAuC,GACvC,yCAAyC,GACzC,wBAAwB,GACxB,kCAAkC,GAClC,mCAAmC,GACnC,uCAAuC,GACvC,4BAA4B,GAC5B,oCAAoC,GACpC,iCAAiC,GACjC,sCAAsC,GACtC,qCAAqC,GACrC,kCAAkC,GAClC,iCAAiC,GACjC,8BAA8B,GAC9B,0BAA0B,GAC1B,4BAA4B,GAC5B,oCAAoC,CAAC"} node_modules/discord-api-types/rpc/index.d.ts.map 0000664 00000000164 15114741631 0016030 0 ustar 00 {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":"AAGA,cAAc,OAAO,CAAC"} node_modules/discord-api-types/rpc/v9.d.ts 0000664 00000001717 15114741631 0014510 0 ustar 00 import type { Snowflake } from '../globals'; import type { APIBaseMessageNoChannel, APIMessageMentions, APIUser } from '../v9'; import type { RelationshipType, RPCAPIMessageParsedContentMention, RPCAPIMessageParsedContentText } from './common'; export * from './common'; /** * @unstable */ export interface Relationship { /** * The id of the user */ id: Snowflake; /** * Relationship type */ type: RelationshipType; /** * User */ user: APIUser; } /** * @unstable */ export interface RPCAPIMessage extends APIBaseMessageNoChannel, APIMessageMentions { /** * The nickname of the user who sent the message */ nick?: string; /** * The color of the author's name */ author_color?: number; /** * The content of the message parsed into an array */ content_parsed: (RPCAPIMessageParsedContentMention | RPCAPIMessageParsedContentText)[]; } //# sourceMappingURL=v9.d.ts.map node_modules/discord-api-types/rpc/v10.js 0000664 00000022132 15114741631 0014316 0 ustar 00 "use strict"; var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { if (k2 === undefined) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { return m[k]; } }; } Object.defineProperty(o, k2, desc); }) : (function(o, m, k, k2) { if (k2 === undefined) k2 = k; o[k2] = m[k]; })); var __exportStar = (this && this.__exportStar) || function(m, exports) { for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); }; Object.defineProperty(exports, "__esModule", { value: true }); exports.RPCEvents = exports.RPCCommands = exports.RPCVersion = void 0; __exportStar(require("./common"), exports); exports.RPCVersion = '1'; /** * @see {@link https://discord.com/developers/docs/topics/rpc#commands-and-events-rpc-commands} */ var RPCCommands; (function (RPCCommands) { /** * @unstable */ RPCCommands["AcceptActivityInvite"] = "ACCEPT_ACTIVITY_INVITE"; /** * @unstable */ RPCCommands["ActivityInviteUser"] = "ACTIVITY_INVITE_USER"; /** * Used to authenticate an existing client with your app */ RPCCommands["Authenticate"] = "AUTHENTICATE"; /** * Used to authorize a new client with your app */ RPCCommands["Authorize"] = "AUTHORIZE"; /** * @unstable */ RPCCommands["BraintreePopupBridgeCallback"] = "BRAINTREE_POPUP_BRIDGE_CALLBACK"; /** * @unstable */ RPCCommands["BrowserHandoff"] = "BROWSER_HANDOFF"; /** * used to reject a Rich Presence Ask to Join request * * @unstable the documented similarly named command `CLOSE_ACTIVITY_REQUEST` does not exist, but `CLOSE_ACTIVITY_JOIN_REQUEST` does */ RPCCommands["CloseActivityJoinRequest"] = "CLOSE_ACTIVITY_JOIN_REQUEST"; /** * @unstable */ RPCCommands["ConnectionsCallback"] = "CONNECTIONS_CALLBACK"; RPCCommands["CreateChannelInvite"] = "CREATE_CHANNEL_INVITE"; /** * @unstable */ RPCCommands["DeepLink"] = "DEEP_LINK"; /** * Event dispatch */ RPCCommands["Dispatch"] = "DISPATCH"; /** * @unstable */ RPCCommands["GetApplicationTicket"] = "GET_APPLICATION_TICKET"; /** * Used to retrieve channel information from the client */ RPCCommands["GetChannel"] = "GET_CHANNEL"; /** * Used to retrieve a list of channels for a guild from the client */ RPCCommands["GetChannels"] = "GET_CHANNELS"; /** * @unstable */ RPCCommands["GetEntitlementTicket"] = "GET_ENTITLEMENT_TICKET"; /** * @unstable */ RPCCommands["GetEntitlements"] = "GET_ENTITLEMENTS"; /** * Used to retrieve guild information from the client */ RPCCommands["GetGuild"] = "GET_GUILD"; /** * Used to retrieve a list of guilds from the client */ RPCCommands["GetGuilds"] = "GET_GUILDS"; /** * @unstable */ RPCCommands["GetImage"] = "GET_IMAGE"; /** * @unstable */ RPCCommands["GetNetworkingConfig"] = "GET_NETWORKING_CONFIG"; /** * @unstable */ RPCCommands["GetRelationships"] = "GET_RELATIONSHIPS"; /** * Used to get the current voice channel the client is in */ RPCCommands["GetSelectedVoiceChannel"] = "GET_SELECTED_VOICE_CHANNEL"; /** * @unstable */ RPCCommands["GetSkus"] = "GET_SKUS"; /** * @unstable */ RPCCommands["GetUser"] = "GET_USER"; /** * Used to retrieve the client's voice settings */ RPCCommands["GetVoiceSettings"] = "GET_VOICE_SETTINGS"; /** * @unstable */ RPCCommands["GiftCodeBrowser"] = "GIFT_CODE_BROWSER"; /** * @unstable */ RPCCommands["GuildTemplateBrowser"] = "GUILD_TEMPLATE_BROWSER"; /** * @unstable */ RPCCommands["InviteBrowser"] = "INVITE_BROWSER"; /** * @unstable */ RPCCommands["NetworkingCreateToken"] = "NETWORKING_CREATE_TOKEN"; /** * @unstable */ RPCCommands["NetworkingPeerMetrics"] = "NETWORKING_PEER_METRICS"; /** * @unstable */ RPCCommands["NetworkingSystemMetrics"] = "NETWORKING_SYSTEM_METRICS"; /** * @unstable */ RPCCommands["OpenOverlayActivityInvite"] = "OPEN_OVERLAY_ACTIVITY_INVITE"; /** * @unstable */ RPCCommands["OpenOverlayGuildInvite"] = "OPEN_OVERLAY_GUILD_INVITE"; /** * @unstable */ RPCCommands["OpenOverlayVoiceSettings"] = "OPEN_OVERLAY_VOICE_SETTINGS"; /** * @unstable */ RPCCommands["Overlay"] = "OVERLAY"; /** * Used to join or leave a text channel, group dm, or dm */ RPCCommands["SelectTextChannel"] = "SELECT_TEXT_CHANNEL"; /** * Used to join or leave a voice channel, group dm, or dm */ RPCCommands["SelectVoiceChannel"] = "SELECT_VOICE_CHANNEL"; /** * Used to consent to a Rich Presence Ask to Join request */ RPCCommands["SendActivityJoinInvite"] = "SEND_ACTIVITY_JOIN_INVITE"; /** * Used to update a user's Rich Presence */ RPCCommands["SetActivity"] = "SET_ACTIVITY"; /** * Used to send info about certified hardware devices */ RPCCommands["SetCertifiedDevices"] = "SET_CERTIFIED_DEVICES"; /** * @unstable */ RPCCommands["SetOverlayLocked"] = "SET_OVERLAY_LOCKED"; /** * Used to change voice settings of users in voice channels */ RPCCommands["SetUserVoiceSettings"] = "SET_USER_VOICE_SETTINGS"; RPCCommands["SetUserVoiceSettings2"] = "SET_USER_VOICE_SETTINGS_2"; /** * Used to set the client's voice settings */ RPCCommands["SetVoiceSettings"] = "SET_VOICE_SETTINGS"; RPCCommands["SetVoiceSettings2"] = "SET_VOICE_SETTINGS_2"; /** * @unstable */ RPCCommands["StartPurchase"] = "START_PURCHASE"; /** * Used to subscribe to an RPC event */ RPCCommands["Subscribe"] = "SUBSCRIBE"; /** * Used to unsubscribe from an RPC event */ RPCCommands["Unsubscribe"] = "UNSUBSCRIBE"; /** * @unstable */ RPCCommands["ValidateApplication"] = "VALIDATE_APPLICATION"; })(RPCCommands || (exports.RPCCommands = RPCCommands = {})); /** * @see {@link https://discord.com/developers/docs/topics/rpc#commands-and-events-rpc-events} */ var RPCEvents; (function (RPCEvents) { /** * @unstable */ RPCEvents["ActivityInvite"] = "ACTIVITY_INVITE"; RPCEvents["ActivityJoin"] = "ACTIVITY_JOIN"; RPCEvents["ActivityJoinRequest"] = "ACTIVITY_JOIN_REQUEST"; RPCEvents["ActivitySpectate"] = "ACTIVITY_SPECTATE"; RPCEvents["ChannelCreate"] = "CHANNEL_CREATE"; RPCEvents["CurrentUserUpdate"] = "CURRENT_USER_UPDATE"; /** * @unstable */ RPCEvents["EntitlementCreate"] = "ENTITLEMENT_CREATE"; /** * @unstable */ RPCEvents["EntitlementDelete"] = "ENTITLEMENT_DELETE"; RPCEvents["Error"] = "ERROR"; /** * @unstable */ RPCEvents["GameJoin"] = "GAME_JOIN"; /** * @unstable */ RPCEvents["GameSpectate"] = "GAME_SPECTATE"; RPCEvents["GuildCreate"] = "GUILD_CREATE"; RPCEvents["GuildStatus"] = "GUILD_STATUS"; /** * Dispatches message objects, with the exception of deletions, which only contains the id in the message object. */ RPCEvents["MessageCreate"] = "MESSAGE_CREATE"; /** * Dispatches message objects, with the exception of deletions, which only contains the id in the message object. */ RPCEvents["MessageDelete"] = "MESSAGE_DELETE"; /** * Dispatches message objects, with the exception of deletions, which only contains the id in the message object. */ RPCEvents["MessageUpdate"] = "MESSAGE_UPDATE"; /** * This event requires the `rpc.notifications.read` {@link https://discord.com/developers/docs/topics/oauth2#shared-resources-oauth2-scopes | OAuth2 scope}. */ RPCEvents["NotificationCreate"] = "NOTIFICATION_CREATE"; /** * @unstable */ RPCEvents["Overlay"] = "OVERLAY"; /** * @unstable */ RPCEvents["OverlayUpdate"] = "OVERLAY_UPDATE"; RPCEvents["Ready"] = "READY"; /** * @unstable */ RPCEvents["RelationshipUpdate"] = "RELATIONSHIP_UPDATE"; RPCEvents["SpeakingStart"] = "SPEAKING_START"; RPCEvents["SpeakingStop"] = "SPEAKING_STOP"; RPCEvents["VoiceChannelSelect"] = "VOICE_CHANNEL_SELECT"; RPCEvents["VoiceConnectionStatus"] = "VOICE_CONNECTION_STATUS"; RPCEvents["VoiceSettingsUpdate"] = "VOICE_SETTINGS_UPDATE"; /** * @unstable */ RPCEvents["VoiceSettingsUpdate2"] = "VOICE_SETTINGS_UPDATE_2"; /** * Dispatches channel voice state objects */ RPCEvents["VoiceStateCreate"] = "VOICE_STATE_CREATE"; /** * Dispatches channel voice state objects */ RPCEvents["VoiceStateDelete"] = "VOICE_STATE_DELETE"; /** * Dispatches channel voice state objects */ RPCEvents["VoiceStateUpdate"] = "VOICE_STATE_UPDATE"; })(RPCEvents || (exports.RPCEvents = RPCEvents = {})); //# sourceMappingURL=v10.js.map node_modules/discord-api-types/rpc/v8.d.ts.map 0000664 00000001217 15114741631 0015256 0 ustar 00 {"version":3,"file":"v8.d.ts","sourceRoot":"","sources":["v8.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAC5C,OAAO,KAAK,EAAE,UAAU,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AACjD,OAAO,KAAK,EAAE,gBAAgB,EAAE,iCAAiC,EAAE,8BAA8B,EAAE,MAAM,UAAU,CAAC;AAEpH,cAAc,UAAU,CAAC;AAEzB;;GAEG;AACH,MAAM,WAAW,YAAY;IACzB;;OAEG;IACH,EAAE,EAAE,SAAS,CAAC;IACd;;OAEG;IACH,IAAI,EAAE,gBAAgB,CAAC;IACvB;;OAEG;IACH,IAAI,EAAE,OAAO,CAAC;CACjB;AAED;;GAEG;AACH,MAAM,WAAW,aAAc,SAAQ,IAAI,CAAC,UAAU,EAAE,YAAY,CAAC;IACjE;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB;;OAEG;IACH,cAAc,EAAE,CAAC,iCAAiC,GAAG,8BAA8B,CAAC,EAAE,CAAC;CAC1F"} node_modules/discord-api-types/rpc/v8.js 0000664 00000001477 15114741631 0014256 0 ustar 00 "use strict"; var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { if (k2 === undefined) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { return m[k]; } }; } Object.defineProperty(o, k2, desc); }) : (function(o, m, k, k2) { if (k2 === undefined) k2 = k; o[k2] = m[k]; })); var __exportStar = (this && this.__exportStar) || function(m, exports) { for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); }; Object.defineProperty(exports, "__esModule", { value: true }); __exportStar(require("./common"), exports); //# sourceMappingURL=v8.js.map node_modules/discord-api-types/rpc/v9.js.map 0000664 00000000164 15114741631 0015023 0 ustar 00 {"version":3,"file":"v9.js","sourceRoot":"","sources":["v9.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAIA,2CAAyB"} node_modules/discord-api-types/rpc/v10.d.ts 0000664 00000211163 15114741631 0014556 0 ustar 00 import type { APIBaseMessageNoChannel, APIInvite, APIMessage, APIMessageMentions, APIPartialChannel, APIPartialGuild, APIUser, APIVoiceState, ChannelType, GatewayActivity, OAuth2Scopes, Snowflake } from '../v10'; import type { RelationshipType, RPCAPIMessageParsedContentMention, RPCAPIMessageParsedContentText, RPCCertifiedDevice, RPCErrorCodes, RPCOAuth2Application, RPCVoiceConnectionStatusPing, RPCVoiceSettingsInput, RPCVoiceSettingsMode, RPCVoiceSettingsOutput, VoiceConnectionStates } from './common'; export * from './common'; export declare const RPCVersion = "1"; /** * @unstable */ export interface Relationship { /** * The id of the user */ id: Snowflake; /** * Relationship type */ type: RelationshipType; /** * User */ user: APIUser; } /** * @unstable */ export interface RPCAPIMessage extends APIBaseMessageNoChannel, APIMessageMentions { /** * The nickname of the user who sent the message */ nick?: string; /** * The color of the author's name */ author_color?: number; /** * The content of the message parsed into an array */ content_parsed: (RPCAPIMessageParsedContentMention | RPCAPIMessageParsedContentText)[]; } /** * @see {@link https://discord.com/developers/docs/topics/rpc#commands-and-events-rpc-commands} */ export declare enum RPCCommands { /** * @unstable */ AcceptActivityInvite = "ACCEPT_ACTIVITY_INVITE", /** * @unstable */ ActivityInviteUser = "ACTIVITY_INVITE_USER", /** * Used to authenticate an existing client with your app */ Authenticate = "AUTHENTICATE", /** * Used to authorize a new client with your app */ Authorize = "AUTHORIZE", /** * @unstable */ BraintreePopupBridgeCallback = "BRAINTREE_POPUP_BRIDGE_CALLBACK", /** * @unstable */ BrowserHandoff = "BROWSER_HANDOFF", /** * used to reject a Rich Presence Ask to Join request * * @unstable the documented similarly named command `CLOSE_ACTIVITY_REQUEST` does not exist, but `CLOSE_ACTIVITY_JOIN_REQUEST` does */ CloseActivityJoinRequest = "CLOSE_ACTIVITY_JOIN_REQUEST", /** * @unstable */ ConnectionsCallback = "CONNECTIONS_CALLBACK", CreateChannelInvite = "CREATE_CHANNEL_INVITE", /** * @unstable */ DeepLink = "DEEP_LINK", /** * Event dispatch */ Dispatch = "DISPATCH", /** * @unstable */ GetApplicationTicket = "GET_APPLICATION_TICKET", /** * Used to retrieve channel information from the client */ GetChannel = "GET_CHANNEL", /** * Used to retrieve a list of channels for a guild from the client */ GetChannels = "GET_CHANNELS", /** * @unstable */ GetEntitlementTicket = "GET_ENTITLEMENT_TICKET", /** * @unstable */ GetEntitlements = "GET_ENTITLEMENTS", /** * Used to retrieve guild information from the client */ GetGuild = "GET_GUILD", /** * Used to retrieve a list of guilds from the client */ GetGuilds = "GET_GUILDS", /** * @unstable */ GetImage = "GET_IMAGE", /** * @unstable */ GetNetworkingConfig = "GET_NETWORKING_CONFIG", /** * @unstable */ GetRelationships = "GET_RELATIONSHIPS", /** * Used to get the current voice channel the client is in */ GetSelectedVoiceChannel = "GET_SELECTED_VOICE_CHANNEL", /** * @unstable */ GetSkus = "GET_SKUS", /** * @unstable */ GetUser = "GET_USER", /** * Used to retrieve the client's voice settings */ GetVoiceSettings = "GET_VOICE_SETTINGS", /** * @unstable */ GiftCodeBrowser = "GIFT_CODE_BROWSER", /** * @unstable */ GuildTemplateBrowser = "GUILD_TEMPLATE_BROWSER", /** * @unstable */ InviteBrowser = "INVITE_BROWSER", /** * @unstable */ NetworkingCreateToken = "NETWORKING_CREATE_TOKEN", /** * @unstable */ NetworkingPeerMetrics = "NETWORKING_PEER_METRICS", /** * @unstable */ NetworkingSystemMetrics = "NETWORKING_SYSTEM_METRICS", /** * @unstable */ OpenOverlayActivityInvite = "OPEN_OVERLAY_ACTIVITY_INVITE", /** * @unstable */ OpenOverlayGuildInvite = "OPEN_OVERLAY_GUILD_INVITE", /** * @unstable */ OpenOverlayVoiceSettings = "OPEN_OVERLAY_VOICE_SETTINGS", /** * @unstable */ Overlay = "OVERLAY", /** * Used to join or leave a text channel, group dm, or dm */ SelectTextChannel = "SELECT_TEXT_CHANNEL", /** * Used to join or leave a voice channel, group dm, or dm */ SelectVoiceChannel = "SELECT_VOICE_CHANNEL", /** * Used to consent to a Rich Presence Ask to Join request */ SendActivityJoinInvite = "SEND_ACTIVITY_JOIN_INVITE", /** * Used to update a user's Rich Presence */ SetActivity = "SET_ACTIVITY", /** * Used to send info about certified hardware devices */ SetCertifiedDevices = "SET_CERTIFIED_DEVICES", /** * @unstable */ SetOverlayLocked = "SET_OVERLAY_LOCKED", /** * Used to change voice settings of users in voice channels */ SetUserVoiceSettings = "SET_USER_VOICE_SETTINGS", SetUserVoiceSettings2 = "SET_USER_VOICE_SETTINGS_2", /** * Used to set the client's voice settings */ SetVoiceSettings = "SET_VOICE_SETTINGS", SetVoiceSettings2 = "SET_VOICE_SETTINGS_2", /** * @unstable */ StartPurchase = "START_PURCHASE", /** * Used to subscribe to an RPC event */ Subscribe = "SUBSCRIBE", /** * Used to unsubscribe from an RPC event */ Unsubscribe = "UNSUBSCRIBE", /** * @unstable */ ValidateApplication = "VALIDATE_APPLICATION" } /** * @see {@link https://discord.com/developers/docs/topics/rpc#authorize-authorize-response-structure} */ export interface RPCAuthorizeResultData { /** * OAuth2 authorization code */ code: string; } /** * @see {@link https://discord.com/developers/docs/topics/rpc#authorize-authorize-argument-structure} */ export interface RPCAuthorizeArgs { /** * OAuth2 application id */ client_id: Snowflake; /** * Scopes to authorize */ scopes: OAuth2Scopes[]; /** * username to create a guest account with if the user does not have Discord */ username?: string; } /** * @see {@link https://discord.com/developers/docs/topics/rpc#authenticate-authenticate-argument-structure} */ export interface RPCAuthenticateArgs { /** * OAuth2 access token */ access_token: string; } /** * @see {@link https://discord.com/developers/docs/topics/rpc#authenticate-authenticate-response-structure} */ export interface RPCAuthenticateResultData { /** * The authed user */ user: APIUser; /** * Authorized scopes */ scopes: OAuth2Scopes[]; /** * Expiration date of OAuth2 token */ expires: string; /** * Application the user authorized */ application: RPCOAuth2Application; } export interface RPCGetGuildsArgs { } /** * @see {@link https://discord.com/developers/docs/topics/rpc#getguilds-get-guilds-response-structure} */ export interface RPCGetGuildsResultData { /** * The guilds the user is in */ guilds: APIPartialGuild[]; } /** * @see {@link https://discord.com/developers/docs/topics/rpc#getguild-get-guild-argument-structure} */ export interface RPCGetGuildArgs { /** * Id of the guild to get */ guild_id: Snowflake; /** * Asynchronously get guild with time to wait before timing out */ timeout?: number; } /** * @see {@link https://discord.com/developers/docs/topics/rpc#getguild-get-guild-response-structure} */ export interface RPCGetGuildResultData { /** * Guild id */ id: Snowflake; /** * Guild name */ name: string; /** * Guild icon url */ icon_url: string | null; /** * Members of the guild * * @deprecated This will always be an empty array */ members: []; } /** * @see {@link https://discord.com/developers/docs/topics/rpc#getchannel} */ export interface RPCGetChannelArgs { /** * Id of the channel to get */ channel_id: Snowflake; } /** * @see {@link https://discord.com/developers/docs/topics/rpc#getchannel-get-channel-response-structure} */ export interface RPCGetChannelResultData { /** * Channel id */ id: Snowflake; /** * Channel's guild id */ guild_id: Snowflake; /** * Channel name */ name: string; /** * Channel type */ type: ChannelType; /** * (text) channel topic */ topic?: string; /** * (voice) bitrate of voice channel */ bitrate?: number; /** * (voice) user limit of voice channel (0 for none) */ user_limit?: number; /** * Position of channel in channel list */ position: number; /** * (voice) channel's voice states */ voice_states?: APIVoiceState[]; /** * (text) channel's messages */ messages?: APIMessage[]; } /** * @see {@link https://discord.com/developers/docs/topics/rpc#getchannels-get-channels-argument-structure} */ export interface RPCGetChannelsArgs { /** * Id of the guild to get channels for */ guild_id: Snowflake; } /** * @see {@link https://discord.com/developers/docs/topics/rpc#getchannels-get-channels-response-structure} */ export interface RPCGetChannelsResultData { /** * Guild channels the user is in */ channels: APIPartialChannel[]; } /** * @see {@link https://discord.com/developers/docs/topics/rpc#setuservoicesettings-pan-object} */ export interface RPCVoicePan { /** * Left pan of user (min: 0.0, max: 1.0) */ left: number; /** * Right pan of user (min: 0.0, max: 1.0) */ right: number; } /** * @see {@link https://discord.com/developers/docs/topics/rpc#setuservoicesettings} * @remarks Discord only supports a single modifier of voice settings at a time over RPC. If an app changes voice settings, it will lock voice settings so that other apps connected simultaneously lose the ability to change voice settings. Settings reset to what they were before being changed after the controlling app disconnects. When an app that has previously set voice settings connects, the client will swap to that app's configured voice settings and lock voice settings again. */ export interface RPCSetUserVoiceSettingsArgs { /** * User id */ user_id: Snowflake; /** * Set the pan of the user */ pan?: RPCVoicePan; /** * Set the volume of user (min 0, max 200) * * @defaultValue `100` */ volume?: number; /** * Set the mute state of the user */ mute?: boolean; } /** * @see {@link https://discord.com/developers/docs/topics/rpc#setuservoicesettings-set-user-voice-settings-argument-and-response-structure} */ export type RPCSetUserVoiceSettingsResultData = Required<RPCSetUserVoiceSettingsArgs>; /** * @see {@link https://discord.com/developers/docs/topics/rpc#selectvoicechannel-select-voice-channel-argument-structure} * @remarks When trying to join the user to a voice channel, you will receive a {@link RPCErrorCodes.SelectVoiceForceRequired} error coded response if the user is already in a voice channel. The `force` parameter should only be specified in response to the case where a user is already in a voice channel and they have approved to be moved by your app to a new voice channel. */ export interface RPCSelectVoiceChannelArgs { /** * Channel id to join (or `null` to leave) */ channel_id: Snowflake | null; /** * Asynchronously join channel with time to wait before timing out */ timeout?: number; /** * Forces a user to join a voice channel */ force?: boolean; /** * After joining the voice channel, navigate to it in the client */ navigate?: boolean; } /** * @see {@link https://discord.com/developers/docs/topics/rpc#selectvoicechannel} */ export type RPCSelectVoiceChannelResultData = RPCGetChannelResultData | null; /** * @see {@link https://discord.com/developers/docs/topics/rpc#getselectedvoicechannel} */ export type RPCGetSelectedVoiceChannelResultData = RPCGetChannelResultData | null; /** * @see {@link https://discord.com/developers/docs/topics/rpc#getselectedvoicechannel} */ export interface RPCGetSelectedVoiceChannelArgs { } /** * @unstable */ export type RPCGetUserResultData = APIUser; /** * @unstable */ export interface RPCGetUserArgs { /** * @unstable Id of the user to get */ id: Snowflake; } /** * @see {@link https://discord.com/developers/docs/topics/rpc#getvoicesettings-get-voice-settings-response-structure} */ export interface RPCGetVoiceSettingsResultData { /** * Input settings */ input: RPCVoiceSettingsInput; /** * Output settings */ output: RPCVoiceSettingsOutput; /** * Voice mode settings */ mode: RPCVoiceSettingsMode; /** * State of automatic gain control */ automatic_gain_control: boolean; /** * State of echo cancellation */ echo_cancellation: boolean; /** * State of noise suppression */ noise_suppression: boolean; /** * State of voice quality of service */ qos: boolean; /** * State of silence warning notice */ silence_warning: boolean; /** * State of self-deafen */ deaf: boolean; /** * State of self-mute */ mute: boolean; } export interface RPCGetVoiceSettingsArgs { } /** * Returns the {@link https://discord.com/developers/docs/topics/rpc#getchannel | Get Channel} response, or `null` if none. */ export type RPCSelectTextChannelResultData = RPCGetChannelResultData | null; /** * @see {@link https://discord.com/developers/docs/topics/rpc#selecttextchannel-select-text-channel-argument-structure} */ export interface RPCSelectTextChannelArgs { /** * Channel id to join (or `null` to leave) */ channel_id: Snowflake | null; /** * Asynchronously join channel with time to wait before timing out */ timeout?: number; } export interface RPCSetActivityResultData { } /** * @see {@link https://discord.com/developers/docs/topics/rpc#setactivity-set-activity-argument-structure} */ export interface RPCSetActivityArgs { /** * The application's process id */ pid: number; /** * The rich presence to assign to the user */ activity?: Partial<Omit<GatewayActivity, 'created_at' | 'id'>>; } /** * @see {@link https://discord.com/developers/docs/topics/rpc#setvoicesettings-set-voice-settings-argument-and-response-structure} */ export type RPCSetVoiceSettingsResultData = RPCGetVoiceSettingsResultData; /** * @see {@link https://discord.com/developers/docs/topics/rpc#setvoicesettings-set-voice-settings-argument-and-response-structure} * @remarks Discord only supports a single modifier of voice settings at a time over RPC. If an app changes voice settings, it will lock voice settings so that other apps connected simultaneously lose the ability to change voice settings. Settings reset to what they were before being changed after the controlling app disconnects. When an app that has previously set voice settings connects, the client will swap to that app's configured voice settings and lock voice settings again. */ export type RPCSetVoiceSettingsArgs = RPCGetVoiceSettingsResultData; /** * @see {@link https://discord.com/developers/docs/topics/rpc#subscribe-subscribe-response-structure} */ export interface RPCSubscribeResultData { /** * Event name now subscribed to */ evt: RPCEvents; } /** * @see {@link https://discord.com/developers/docs/topics/rpc#subscribe} */ export type RPCSubscribeArgs = RPCSubscribeActivityInviteArgs | RPCSubscribeActivityJoinArgs | RPCSubscribeActivityJoinRequestArgs | RPCSubscribeActivitySpectateArgs | RPCSubscribeChannelCreateArgs | RPCSubscribeCurrentUserUpdateArgs | RPCSubscribeEntitlementCreateArgs | RPCSubscribeEntitlementDeleteArgs | RPCSubscribeGameJoinArgs | RPCSubscribeGameSpectateArgs | RPCSubscribeGuildCreateArgs | RPCSubscribeGuildStatusArgs | RPCSubscribeMessageCreateArgs | RPCSubscribeMessageDeleteArgs | RPCSubscribeMessageUpdateArgs | RPCSubscribeNotificationCreateArgs | RPCSubscribeOverlayArgs | RPCSubscribeOverlayUpdateArgs | RPCSubscribeRelationshipUpdateArgs | RPCSubscribeSpeakingStartArgs | RPCSubscribeSpeakingStopArgs | RPCSubscribeVoiceChannelSelectArgs | RPCSubscribeVoiceConnectionStatusArgs | RPCSubscribeVoiceSettingsUpdate2Args | RPCSubscribeVoiceSettingsUpdateArgs | RPCSubscribeVoiceStateCreateArgs | RPCSubscribeVoiceStateDeleteArgs | RPCSubscribeVoiceStateUpdateArgs; /** * @see {@link https://discord.com/developers/docs/topics/rpc#unsubscribe-unsubscribe-response-structure} */ export interface RPCUnsubscribeResultData { /** * Event name now unsubscribed from */ evt: RPCEvents; } /** * @see {@link https://discord.com/developers/docs/topics/rpc#unsubscribe} */ export type RPCUnsubscribeArgs = RPCSubscribeArgs; /** * @unstable */ export interface RPCAcceptActivityInviteResultData { } /** * @unstable */ export interface RPCAcceptActivityInviteArgs { /** * @unstable Invite type */ type: 1; /** * @unstable Id of the user who sent the invite */ user_id: Snowflake; /** * @unstable Id of the session */ session_id: Snowflake; /** * @unstable Id of the channel that the invite comes from */ channel_id: Snowflake; /** * @unstable Id of the message that the invite comes from */ message_id: Snowflake; } /** * @unstable */ export interface RPCActivityInviteUserResultData { } /** * @unstable */ export interface RPCActivityInviteUserArgs { /** * @unstable Invite type */ type: 1; /** * @unstable Id of the user to invite */ user_id: Snowflake; /** * @unstable Process id */ pid: number; } /** * @unstable */ export interface RPCBraintreePopupBridgeCallbackResultData { } /** * @unstable */ export interface RPCBraintreePopupBridgeCallbackArgs { } /** * @unstable */ export interface RPCBrowserHandoffResultData { } /** * @unstable */ export interface RPCBrowserHandoffArgs { } export interface RPCCloseActivityJoinRequestResultData { } /** * @see {@link https://discord.com/developers/docs/topics/rpc#closeactivityrequest-close-activity-request-argument-structure} */ export interface RPCCloseActivityJoinRequestArgs { /** * The id of the requesting user */ user_id: Snowflake; } /** * @unstable */ export interface RPCConnectionsCallbackResultData { } /** * @unstable */ export interface RPCConnectionsCallbackArgs { } /** * @unstable Channel invite */ export type RPCCreateChannelInviteResultData = APIInvite & { /** * @unstable Timestamp of when the invite was created */ created_at: string; /** * @unstable Max age of the invite */ max_age: number; /** * @unstable Max uses of the invite */ max_uses: number; /** * @unstable Whether the invite is temporary */ temporary: boolean; /** * @unstable Uses of the invite */ uses: number; /** * @unstable Id of the guild */ guild_id: Snowflake; }; /** * @unstable Arguments to create channel invite */ export interface RPCCreateChannelInviteArgs { /** * Id of the channel to create an invite for */ channel_id: Snowflake; } /** * @unstable */ export interface RPCDeepLinkResultData { } /** * @unstable */ export interface RPCDeepLinkArgs { } /** * @unstable */ export interface RPCGetApplicationTicketResultData { } /** * @unstable */ export interface RPCGetApplicationTicketArgs { } /** * @unstable */ export interface RPCGetEntitlementTicketResultData { } /** * @unstable */ export interface RPCGetEntitlementTicketArgs { } /** * @unstable */ export interface RPCGetEntitlementsResultData { } /** * @unstable */ export interface RPCGetEntitlementsArgs { } /** * @unstable */ export interface RPCGetImageResultData { /** * @unstable Base64 image data */ data_url: string; } /** * @unstable */ export interface RPCGetImageArgs { /** * @unstable Image type */ type: 'user'; /** * @unstable Id of the image */ id: Snowflake; /** * @unstable Image format */ format: 'jpg' | 'png' | 'webp'; /** * @unstable Size of the image */ size: 1024 | 16 | 32 | 64 | 128 | 256 | 512; } /** * @unstable */ export interface RPCGetNetworkingConfigResultData { } /** * @unstable */ export interface RPCGetNetworkingConfigArgs { } /** * @unstable */ export type RPCGetRelationshipsResultData = Relationship[]; /** * @unstable */ export interface RPCGetRelationshipsArgs { } /** * @unstable */ export type RPCGetSkusResultData = unknown[]; /** * @unstable */ export interface RPCGetSkusArgs { } /** * @unstable */ export interface RPCGiftCodeBrowserResultData { } /** * @unstable */ export interface RPCGiftCodeBrowserArgs { } /** * @unstable */ export interface RPCGuildTemplateBrowserResultData { } /** * @unstable */ export interface RPCGuildTemplateBrowserArgs { } /** * @unstable */ export interface RPCInviteBrowserResultData { } /** * @unstable */ export interface RPCInviteBrowserArgs { } /** * @unstable */ export interface RPCNetworkingCreateTokenResultData { } /** * @unstable */ export interface RPCNetworkingCreateTokenArgs { } /** * @unstable */ export interface RPCNetworkingPeerMetricsResultData { } /** * @unstable */ export interface RPCNetworkingPeerMetricsArgs { } /** * @unstable */ export interface RPCNetworkingSystemMetricsResultData { } /** * @unstable */ export interface RPCNetworkingSystemMetricsArgs { } /** * @unstable */ export interface RPCOpenOverlayActivityInviteResultData { } /** * @unstable */ export interface RPCOpenOverlayActivityInviteArgs { /** * @unstable */ type: 1; /** * @unstable Process id */ pid: number; } /** * @unstable */ export interface RPCOpenOverlayGuildInviteResultData { } /** * @unstable */ export interface RPCOpenOverlayGuildInviteArgs { /** * @unstable Guild invite code */ code: string; /** * @unstable Process id */ pid: number; } /** * @unstable */ export interface RPCOpenOverlayVoiceSettingsResultData { } /** * @unstable */ export interface RPCOpenOverlayVoiceSettingsArgs { /** * @unstable Process id */ pid: number; } /** * @unstable */ export interface RPCOverlayResultData { } /** * @unstable */ export interface RPCOverlayArgs { } export interface RPCSendActivityJoinInviteResultData { } /** * @see {@link https://discord.com/developers/docs/topics/rpc#sendactivityjoininvite-send-activity-join-invite-argument-structure} */ export interface RPCSendActivityJoinInviteArgs { /** * The id of the requesting user */ user_id: Snowflake; } export type RPCSetCertifiedDevicesResultData = null; /** * @see {@link https://discord.com/developers/docs/topics/rpc#setcertifieddevices-set-certified-devices-argument-structure} */ export interface RPCSetCertifiedDevicesArgs { /** * A list of devices for your manufacturer, in order of priority */ devices: RPCCertifiedDevice[]; } /** * @unstable */ export interface RPCSetOverlayLockedResultData { } /** * @unstable */ export interface RPCSetOverlayLockedArgs { /** * @unstable Whether the overlay is locked */ locked: boolean; /** * @unstable Process id */ pid: number; } /** * @unstable */ export type RPCSetUserVoiceSettings2ResultData = RPCSetUserVoiceSettingsResultData; /** * @unstable */ export type RPCSetUserVoiceSettings2Args = RPCSetUserVoiceSettingsArgs; /** * @unstable */ export type RPCSetVoiceSettings2ResultData = RPCSetVoiceSettingsResultData; /** * @unstable */ export type RPCSetVoiceSettings2Args = RPCSetVoiceSettingsArgs; /** * @unstable */ export interface RPCStartPurchaseResultData { } /** * @unstable */ export interface RPCStartPurchaseArgs { /** * Id of the sku */ sku_id: Snowflake; } /** * @unstable */ export interface RPCValidateApplicationResultData { } /** * @unstable */ export interface RPCValidateApplicationArgs { } /** * @see {@link https://discord.com/developers/docs/topics/rpc#commands-and-events-rpc-events} */ export declare enum RPCEvents { /** * @unstable */ ActivityInvite = "ACTIVITY_INVITE", ActivityJoin = "ACTIVITY_JOIN", ActivityJoinRequest = "ACTIVITY_JOIN_REQUEST", ActivitySpectate = "ACTIVITY_SPECTATE", ChannelCreate = "CHANNEL_CREATE", CurrentUserUpdate = "CURRENT_USER_UPDATE", /** * @unstable */ EntitlementCreate = "ENTITLEMENT_CREATE", /** * @unstable */ EntitlementDelete = "ENTITLEMENT_DELETE", Error = "ERROR", /** * @unstable */ GameJoin = "GAME_JOIN", /** * @unstable */ GameSpectate = "GAME_SPECTATE", GuildCreate = "GUILD_CREATE", GuildStatus = "GUILD_STATUS", /** * Dispatches message objects, with the exception of deletions, which only contains the id in the message object. */ MessageCreate = "MESSAGE_CREATE", /** * Dispatches message objects, with the exception of deletions, which only contains the id in the message object. */ MessageDelete = "MESSAGE_DELETE", /** * Dispatches message objects, with the exception of deletions, which only contains the id in the message object. */ MessageUpdate = "MESSAGE_UPDATE", /** * This event requires the `rpc.notifications.read` {@link https://discord.com/developers/docs/topics/oauth2#shared-resources-oauth2-scopes | OAuth2 scope}. */ NotificationCreate = "NOTIFICATION_CREATE", /** * @unstable */ Overlay = "OVERLAY", /** * @unstable */ OverlayUpdate = "OVERLAY_UPDATE", Ready = "READY", /** * @unstable */ RelationshipUpdate = "RELATIONSHIP_UPDATE", SpeakingStart = "SPEAKING_START", SpeakingStop = "SPEAKING_STOP", VoiceChannelSelect = "VOICE_CHANNEL_SELECT", VoiceConnectionStatus = "VOICE_CONNECTION_STATUS", VoiceSettingsUpdate = "VOICE_SETTINGS_UPDATE", /** * @unstable */ VoiceSettingsUpdate2 = "VOICE_SETTINGS_UPDATE_2", /** * Dispatches channel voice state objects */ VoiceStateCreate = "VOICE_STATE_CREATE", /** * Dispatches channel voice state objects */ VoiceStateDelete = "VOICE_STATE_DELETE", /** * Dispatches channel voice state objects */ VoiceStateUpdate = "VOICE_STATE_UPDATE" } /** * @unstable */ export type RPCSubscribeActivityInviteArgs = Record<string, never>; export type RPCSubscribeActivityJoinArgs = Record<string, never>; export type RPCSubscribeActivityJoinRequestArgs = Record<string, never>; export type RPCSubscribeActivitySpectateArgs = Record<string, never>; export type RPCSubscribeChannelCreateArgs = Record<string, never>; /** * @unstable */ export type RPCSubscribeCurrentUserUpdateArgs = Record<string, never>; /** * @unstable */ export type RPCSubscribeEntitlementCreateArgs = Record<string, never>; /** * @unstable */ export type RPCSubscribeEntitlementDeleteArgs = Record<string, never>; /** * @unstable */ export type RPCSubscribeGameJoinArgs = Record<string, never>; /** * @unstable */ export type RPCSubscribeGameSpectateArgs = Record<string, never>; export type RPCSubscribeGuildCreateArgs = Record<string, never>; /** * @see {@link https://discord.com/developers/docs/topics/rpc#guildstatus-guild-status-argument-structure} */ export interface RPCSubscribeGuildStatusArgs { /** * Id of guild to listen to updates of */ guild_id: Snowflake; } /** * @see {@link https://discord.com/developers/docs/topics/rpc#messagecreatemessageupdatemessagedelete-message-argument-structure} */ export interface RPCSubscribeMessageCreateArgs { /** * Id of channel to listen to updates of */ channel_id: Snowflake; } /** * @see {@link https://discord.com/developers/docs/topics/rpc#messagecreatemessageupdatemessagedelete-message-argument-structure} */ export interface RPCSubscribeMessageDeleteArgs { /** * Id of channel to listen to updates of */ channel_id: Snowflake; } /** * @see {@link https://discord.com/developers/docs/topics/rpc#messagecreatemessageupdatemessagedelete-message-argument-structure} */ export interface RPCSubscribeMessageUpdateArgs { /** * Id of channel to listen to updates of */ channel_id: Snowflake; } export type RPCSubscribeNotificationCreateArgs = Record<string, never>; /** * @unstable */ export type RPCSubscribeOverlayArgs = Record<string, never>; /** * @unstable */ export type RPCSubscribeOverlayUpdateArgs = Record<string, never>; /** * @unstable */ export type RPCSubscribeRelationshipUpdateArgs = Record<string, never>; /** * @see {@link https://discord.com/developers/docs/topics/rpc#speakingstartspeakingstop-speaking-argument-structure} */ export interface RPCSubscribeSpeakingStartArgs { /** * Id of channel to listen to updates of */ channel_id: Snowflake; } /** * @see {@link https://discord.com/developers/docs/topics/rpc#speakingstartspeakingstop-speaking-argument-structure} */ export interface RPCSubscribeSpeakingStopArgs { /** * Id of channel to listen to updates of */ channel_id: Snowflake; } export type RPCSubscribeVoiceChannelSelectArgs = Record<string, never>; /** * @unstable */ export type RPCSubscribeVoiceConnectionStatusArgs = Record<string, never>; export type RPCSubscribeVoiceSettingsUpdateArgs = Record<string, never>; /** * @unstable */ export type RPCSubscribeVoiceSettingsUpdate2Args = Record<string, never>; /** * @see {@link https://discord.com/developers/docs/topics/rpc#voicestatecreatevoicestateupdatevoicestatedelete-voice-state-argument-structure} */ export interface RPCSubscribeVoiceStateCreateArgs { /** * id of channel to listen to updates of */ channel_id: Snowflake; } /** * @see {@link https://discord.com/developers/docs/topics/rpc#voicestatecreatevoicestateupdatevoicestatedelete-voice-state-argument-structure} */ export interface RPCSubscribeVoiceStateDeleteArgs { /** * Id of channel to listen to updates of */ channel_id: Snowflake; } /** * @see {@link https://discord.com/developers/docs/topics/rpc#voicestatecreatevoicestateupdatevoicestatedelete-voice-state-argument-structure} */ export interface RPCSubscribeVoiceStateUpdateArgs { /** * Id of channel to listen to updates of */ channel_id: Snowflake; } /** * @unstable */ export interface RPCActivityInviteDispatchData { } /** * @see {@link https://discord.com/developers/docs/topics/rpc#activityjoin-activity-join-dispatch-data-structure} */ export interface RPCActivityJoinDispatchData { /** * The {@link https://discord.com/developers/docs/developer-tools/game-sdk#activitysecrets-struct | `join_secret`} for the given invite */ secret: string; } /** * @see {@link https://discord.com/developers/docs/topics/rpc#activityjoinrequest-activity-join-request-data-structure} */ export interface RPCActivityJoinRequestDispatchData { /** * Information about the user requesting to join */ user: APIUser; } /** * @see {@link https://discord.com/developers/docs/topics/rpc#activityspectate-activity-spectate-dispatch-data-structure} */ export interface RPCActivitySpectateDispatchData { /** * The {@link https://discord.com/developers/docs/developer-tools/game-sdk#activitysecrets-struct | `spectate_secret`} for the given invite */ secret: string; } /** * @see {@link https://discord.com/developers/docs/topics/rpc#channelcreate-channel-create-dispatch-data-structure} */ export interface RPCChannelCreateDispatchData { /** * Channel id */ id: Snowflake; /** * Name of the channel */ name: string; /** * Channel type */ type: ChannelType; } /** * @unstable */ export interface RPCCurrentUserUpdateDispatchData { } /** * @unstable */ export interface RPCEntitlementCreateDispatchData { } /** * @unstable */ export interface RPCEntitlementDeleteDispatchData { } /** * @see {@link https://discord.com/developers/docs/topics/rpc#error-error-data-structure} */ export interface RPCErrorDispatchData { /** * RPC Error Code */ code: RPCErrorCodes; /** * Error description */ message: string; } /** * @unstable */ export interface RPCGameJoinDispatchData { } /** * @unstable */ export interface RPCGameSpectateDispatchData { } /** * @see {@link https://discord.com/developers/docs/topics/rpc#guildcreate-guild-create-dispatch-data-structure} */ export interface RPCGuildCreateDispatchData { /** * Guild id */ id: Snowflake; /** * Name of the guild */ name: string; } /** * @see {@link https://discord.com/developers/docs/topics/rpc#guildstatus-guild-status-dispatch-data-structure} */ export interface RPCGuildStatusDispatchData { /** * Guild with requested id */ guild: APIPartialGuild; /** * Number of online users in guild * * @deprecated This will always be `0` */ online: 0; } /** * @see {@link https://discord.com/developers/docs/topics/rpc#messagecreatemessageupdatemessagedelete-example-message-dispatch-payload} */ export interface RPCMessageCreateDispatchData { /** * Id of channel where message was sent */ channel_id: Snowflake; /** * message that was created */ message: RPCAPIMessage; } /** * @see {@link https://discord.com/developers/docs/topics/rpc#messagecreatemessageupdatemessagedelete-example-message-dispatch-payload} */ export interface RPCMessageDeleteDispatchData { /** * Id of channel where message was deleted */ channel_id: Snowflake; /** * Message that was deleted (only id) */ message: Pick<RPCAPIMessage, 'id'>; } /** * @see {@link https://discord.com/developers/docs/topics/rpc#messagecreatemessageupdatemessagedelete-example-message-dispatch-payload} */ export interface RPCMessageUpdateDispatchData { /** * Id of channel where message was updated */ channel_id: Snowflake; /** * message that was updated */ message: RPCAPIMessage; } /** * @see {@link https://discord.com/developers/docs/topics/rpc#notificationcreate-notification-create-dispatch-data-structure} */ export interface RPCNotificationCreateDispatchData { /** * Id of channel where notification occurred */ channel_id: Snowflake; /** * Message that generated this notification */ message: RPCAPIMessage; /** * Icon url of the notification */ icon_url: string; /** * Title of the notification */ title: string; /** * Body of the notification */ body: string; } /** * @unstable */ export interface RPCOverlayDispatchData { } /** * @unstable */ export interface RPCOverlayUpdateDispatchData { } /** * @see {@link https://discord.com/developers/docs/topics/rpc#ready-rpc-server-configuration-object} */ export interface RPCServerConfiguration { /** * Server's cdn */ cdn_host: string; /** * Server's api endpoint */ api_endpoint: string; /** * Server's environment */ environment: string; } /** * @see {@link https://discord.com/developers/docs/topics/rpc#ready-ready-dispatch-data-structure} */ export interface RPCReadyDispatchData { /** * RPC version */ v: 1; /** * Server configuration */ config: RPCServerConfiguration; /** * The user to whom you are connected */ user: APIUser; } /** * @unstable */ export interface RPCRelationshipUpdateDispatchData { } /** * @see {@link https://discord.com/developers/docs/topics/rpc#speakingstartspeakingstop-speaking-dispatch-data-structure} */ export interface RPCSpeakingStartDispatchData { /** * Id of user who started speaking */ user_id: Snowflake; /** * @unstable * id of channel where user is speaking */ channel_id: Snowflake; } /** * @see {@link https://discord.com/developers/docs/topics/rpc#speakingstartspeakingstop-speaking-dispatch-data-structure} */ export interface RPCSpeakingStopDispatchData { /** * Id of user who stopped speaking */ user_id: Snowflake; /** * @unstable * id of channel where user is speaking */ channel_id: Snowflake; } /** * @see {@link https://discord.com/developers/docs/topics/rpc#voicechannelselect-voice-channel-select-dispatch-data-structure} */ export interface RPCVoiceChannelSelectDispatchData { /** * Id of channel (`null` if leaving channel) */ channel_id: Snowflake | null; /** * Id of guild (`null` if not in a guild. field is omitted when leaving any voice channel) */ guild_id?: Snowflake | null; } /** * @see {@link https://discord.com/developers/docs/topics/rpc#voiceconnectionstatus-voice-connection-status-dispatch-data-structure} */ export interface RPCVoiceConnectionStatusDispatchData<State extends VoiceConnectionStates = VoiceConnectionStates> { /** * Voice connection states */ state: State; /** * Hostname of the connected voice server */ hostname: State extends VoiceConnectionStates.AwaitingEndpoint ? null : string; /** * All of the accumulated pings since connection */ pings: RPCVoiceConnectionStatusPing[]; /** * Average ping (in ms) */ average_ping: number; /** * Last ping (in ms) */ last_ping: number; } export type RPCVoiceSettingsUpdateDispatchData = RPCGetVoiceSettingsResultData; /** * @unstable */ export interface RPCVoiceSettingsUpdate2DispatchData { /** * @unstable */ input_mode: Pick<RPCVoiceSettingsMode, 'shortcut' | 'type'>; /** * @unstable */ local_mutes: unknown[]; /** * @unstable */ local_volumes: unknown; /** * @unstable */ self_mute: boolean; /** * @unstable */ self_deaf: boolean; } /** * @see {@link https://discord.com/developers/docs/topics/rpc#voicestatecreatevoicestateupdatevoicestatedelete-example-voice-state-dispatch-payload} */ export interface RPCVoiceStateCreateDispatchData { /** * Voice state of user */ voice_state: Pick<APIVoiceState, 'deaf' | 'mute' | 'self_deaf' | 'self_mute' | 'suppress'>; /** * User who joined voice channel */ user: APIUser; /** * Nickname of user */ nick: string; /** * Volume of user */ volume: number; /** * Is user muted for the client user */ mute: boolean; /** * Pan of user */ pan: RPCVoicePan; } /** * @see {@link https://discord.com/developers/docs/topics/rpc#voicestatecreatevoicestateupdatevoicestatedelete-example-voice-state-dispatch-payload} */ export interface RPCVoiceStateDeleteDispatchData { /** * Voice state of user */ voice_state: APIVoiceState; /** * User who joined voice channel */ user: APIUser; /** * Nickname of user */ nick: string; /** * Volume of user */ volume: number; /** * Is user muted for the client user */ mute: boolean; /** * Pan of user */ pan: RPCVoicePan; } /** * @see {@link https://discord.com/developers/docs/topics/rpc#voicestatecreatevoicestateupdatevoicestatedelete-example-voice-state-dispatch-payload} */ export interface RPCVoiceStateUpdateDispatchData { /** * Voice state of user */ voice_state: APIVoiceState; /** * User who joined voice channel */ user: APIUser; /** * Nickname of user */ nick: string; /** * Volume of user */ volume: number; /** * Is user muted for the client user */ mute: boolean; /** * Pan of user */ pan: RPCVoicePan; } export interface BaseRPCMessage<Cmd extends RPCCommands> { cmd: Cmd; } export interface RPCCommandMessage<Cmd extends RPCCommands> extends BaseRPCMessage<Cmd> { nonce: string; } export interface RPCSubscribeMessage<Evt extends RPCEvents, Cmd extends RPCCommands.Subscribe | RPCCommands.Unsubscribe = RPCCommands.Subscribe | RPCCommands.Unsubscribe> extends RPCCommandMessage<Cmd> { evt: Evt; } export interface RPCCommandAuthorizePayload extends RPCCommandMessage<RPCCommands.Authorize> { args: RPCAuthorizeArgs; } export interface RPCCommandAuthenticatePayload extends RPCCommandMessage<RPCCommands.Authenticate> { args: RPCAuthenticateArgs; } export interface RPCCommandGetChannelPayload extends RPCCommandMessage<RPCCommands.GetChannel> { args: RPCGetChannelArgs; } export interface RPCCommandGetChannelsPayload extends RPCCommandMessage<RPCCommands.GetChannels> { args: RPCGetChannelsArgs; } export interface RPCCommandGetGuildPayload extends RPCCommandMessage<RPCCommands.GetGuild> { args: RPCGetGuildArgs; } export interface RPCCommandGetGuildsPayload extends RPCCommandMessage<RPCCommands.GetGuilds> { args: RPCGetGuildsArgs; } export interface RPCCommandGetUserPayload extends RPCCommandMessage<RPCCommands.GetUser> { args: RPCGetUserArgs; } export interface RPCCommandGetVoiceSettingsPayload extends RPCCommandMessage<RPCCommands.GetVoiceSettings> { args: RPCGetVoiceSettingsArgs; } export interface RPCCommandSelectTextChannelPayload extends RPCCommandMessage<RPCCommands.SelectTextChannel> { args: RPCSelectTextChannelArgs; } export interface RPCCommandSelectVoiceChannelPayload extends RPCCommandMessage<RPCCommands.SelectVoiceChannel> { args: RPCSelectVoiceChannelArgs; } export interface RPCCommandSetActivityPayload extends RPCCommandMessage<RPCCommands.SetActivity> { args: RPCSetActivityArgs; } export interface RPCCommandSetVoiceSettingsPayload extends RPCCommandMessage<RPCCommands.SetVoiceSettings> { args: RPCSetVoiceSettingsArgs; } export type RPCCommandSubscribePayload = RPCSubscribeActivityInvite | RPCSubscribeActivityJoin | RPCSubscribeActivityJoinRequest | RPCSubscribeActivitySpectate | RPCSubscribeChannelCreate | RPCSubscribeCurrentUserUpdate | RPCSubscribeEntitlementCreate | RPCSubscribeEntitlementDelete | RPCSubscribeGameJoin | RPCSubscribeGameSpectate | RPCSubscribeGuildCreate | RPCSubscribeGuildStatus | RPCSubscribeMessageCreate | RPCSubscribeMessageDelete | RPCSubscribeMessageUpdate | RPCSubscribeNotificationCreate | RPCSubscribeOverlay | RPCSubscribeOverlayUpdate | RPCSubscribeRelationshipUpdate | RPCSubscribeSpeakingStart | RPCSubscribeSpeakingStop | RPCSubscribeVoiceChannelSelect | RPCSubscribeVoiceConnectionStatus | RPCSubscribeVoiceSettingsUpdate | RPCSubscribeVoiceSettingsUpdate2 | RPCSubscribeVoiceStateCreate | RPCSubscribeVoiceStateDelete | RPCSubscribeVoiceStateUpdate; export type RPCCommandUnsubscribePayload = RPCCommandSubscribePayload; export interface RPCCommandAcceptActivityInvitePayload extends RPCCommandMessage<RPCCommands.AcceptActivityInvite> { args: RPCAcceptActivityInviteArgs; } export interface RPCCommandActivityInviteUserPayload extends RPCCommandMessage<RPCCommands.ActivityInviteUser> { args: RPCActivityInviteUserArgs; } export interface RPCCommandBraintreePopupBridgeCallbackPayload extends RPCCommandMessage<RPCCommands.BraintreePopupBridgeCallback> { args: RPCBraintreePopupBridgeCallbackArgs; } export interface RPCCommandBrowserPayload extends RPCCommandMessage<RPCCommands.BrowserHandoff> { args: RPCBrowserHandoffArgs; } export interface RPCCommandCloseActivityJoinRequestPayload extends RPCCommandMessage<RPCCommands.CloseActivityJoinRequest> { args: RPCCloseActivityJoinRequestArgs; } export interface RPCCommandConnectionsCallbackPayload extends RPCCommandMessage<RPCCommands.ConnectionsCallback> { args: RPCConnectionsCallbackArgs; } export interface RPCCommandCreateChannelInvitePayload extends RPCCommandMessage<RPCCommands.CreateChannelInvite> { args: RPCCreateChannelInviteArgs; } export interface RPCCommandDeepLinkPayload extends RPCCommandMessage<RPCCommands.DeepLink> { args: RPCDeepLinkArgs; } export interface RPCCommandGetApplicationTicketPayload extends RPCCommandMessage<RPCCommands.GetApplicationTicket> { args: RPCGetApplicationTicketArgs; } export interface RPCCommandGetEntitlementTicketPayload extends RPCCommandMessage<RPCCommands.GetEntitlementTicket> { args: RPCGetEntitlementTicketArgs; } export interface RPCCommandGetEntitlementsPayload extends RPCCommandMessage<RPCCommands.GetEntitlements> { args: RPCGetEntitlementsArgs; } export interface RPCCommandGetImagePayload extends RPCCommandMessage<RPCCommands.GetImage> { args: RPCGetImageArgs; } export interface RPCCommandGetNetworkingConfigPayload extends RPCCommandMessage<RPCCommands.GetNetworkingConfig> { args: RPCGetNetworkingConfigArgs; } export interface RPCCommandGetRelationshipsPayload extends RPCCommandMessage<RPCCommands.GetRelationships> { args: RPCGetRelationshipsArgs; } export interface RPCCommandGetSelectedVoiceChannelPayload extends RPCCommandMessage<RPCCommands.GetSelectedVoiceChannel> { args: RPCGetSelectedVoiceChannelArgs; } export interface RPCCommandGetSkusPayload extends RPCCommandMessage<RPCCommands.GetSkus> { args: RPCGetSkusArgs; } export interface RPCCommandGiftCodeBrowserPayload extends RPCCommandMessage<RPCCommands.GiftCodeBrowser> { args: RPCGiftCodeBrowserArgs; } export interface RPCCommandGuildTemplateBrowserPayload extends RPCCommandMessage<RPCCommands.GuildTemplateBrowser> { args: RPCGuildTemplateBrowserArgs; } export interface RPCCommandInviteBrowserPayload extends RPCCommandMessage<RPCCommands.InviteBrowser> { args: RPCInviteBrowserArgs; } export interface RPCCommandNetworkingCreateTokenPayload extends RPCCommandMessage<RPCCommands.NetworkingCreateToken> { args: RPCNetworkingCreateTokenArgs; } export interface RPCCommandNetworkingPeerMetricsPayload extends RPCCommandMessage<RPCCommands.NetworkingPeerMetrics> { args: RPCNetworkingPeerMetricsArgs; } export interface RPCCommandNetworkingSystemMetricsPayload extends RPCCommandMessage<RPCCommands.NetworkingSystemMetrics> { args: RPCNetworkingSystemMetricsArgs; } export interface RPCCommandOpenOverlayActivityInvitePayload extends RPCCommandMessage<RPCCommands.OpenOverlayActivityInvite> { args: RPCOpenOverlayActivityInviteArgs; } export interface RPCCommandOpenOverlayGuildInvitePayload extends RPCCommandMessage<RPCCommands.OpenOverlayGuildInvite> { args: RPCOpenOverlayGuildInviteArgs; } export interface RPCCommandOpenOverlayVoiceSettingsPayload extends RPCCommandMessage<RPCCommands.OpenOverlayVoiceSettings> { args: RPCOpenOverlayVoiceSettingsArgs; } export interface RPCCommandOverlayPayload extends RPCCommandMessage<RPCCommands.Overlay> { args: RPCOverlayArgs; } export interface RPCCommandSendActivityJoinInvitePayload extends RPCCommandMessage<RPCCommands.SendActivityJoinInvite> { args: RPCSendActivityJoinInviteArgs; } export interface RPCCommandSetCertifiedDevicesPayload extends RPCCommandMessage<RPCCommands.SetCertifiedDevices> { args: RPCSetCertifiedDevicesArgs; } export interface RPCCommandSetOverlayLockedPayload extends RPCCommandMessage<RPCCommands.SetOverlayLocked> { args: RPCSetOverlayLockedArgs; } export interface RPCCommandSetUserVoiceSettingsPayload extends RPCCommandMessage<RPCCommands.SetUserVoiceSettings> { args: RPCSetUserVoiceSettingsArgs; } export interface RPCCommandSetUserVoiceSettings2Payload extends RPCCommandMessage<RPCCommands.SetUserVoiceSettings2> { args: RPCSetUserVoiceSettings2Args; } export interface RPCCommandSetVoiceSettings2Payload extends RPCCommandMessage<RPCCommands.SetVoiceSettings2> { args: RPCSetVoiceSettings2Args; } export interface RPCCommandStartPurchasePayload extends RPCCommandMessage<RPCCommands.StartPurchase> { args: RPCStartPurchaseArgs; } export interface RPCCommandValidateApplicationPayload extends RPCCommandMessage<RPCCommands.ValidateApplication> { args: RPCValidateApplicationArgs; } export interface RPCSubscribeActivityInvite extends RPCSubscribeMessage<RPCEvents.ActivityInvite> { args: RPCSubscribeActivityInviteArgs; evt: RPCEvents.ActivityInvite; } export interface RPCSubscribeActivityJoin extends RPCSubscribeMessage<RPCEvents.ActivityJoin> { args: RPCSubscribeActivityJoinArgs; evt: RPCEvents.ActivityJoin; } export interface RPCSubscribeActivityJoinRequest extends RPCSubscribeMessage<RPCEvents.ActivityJoinRequest> { args: RPCSubscribeActivityJoinRequestArgs; evt: RPCEvents.ActivityJoinRequest; } export interface RPCSubscribeActivitySpectate extends RPCSubscribeMessage<RPCEvents.ActivitySpectate> { args: RPCSubscribeActivitySpectateArgs; evt: RPCEvents.ActivitySpectate; } export interface RPCSubscribeChannelCreate extends RPCSubscribeMessage<RPCEvents.ChannelCreate> { args: RPCSubscribeChannelCreateArgs; evt: RPCEvents.ChannelCreate; } export interface RPCSubscribeCurrentUserUpdate extends RPCSubscribeMessage<RPCEvents.CurrentUserUpdate> { args: RPCSubscribeCurrentUserUpdateArgs; evt: RPCEvents.CurrentUserUpdate; } export interface RPCSubscribeEntitlementCreate extends RPCSubscribeMessage<RPCEvents.EntitlementCreate> { args: RPCSubscribeEntitlementCreateArgs; evt: RPCEvents.EntitlementCreate; } export interface RPCSubscribeEntitlementDelete extends RPCSubscribeMessage<RPCEvents.EntitlementDelete> { args: RPCSubscribeEntitlementDeleteArgs; evt: RPCEvents.EntitlementDelete; } export interface RPCSubscribeGameJoin extends RPCSubscribeMessage<RPCEvents.GameJoin> { args: RPCSubscribeGameJoinArgs; evt: RPCEvents.GameJoin; } export interface RPCSubscribeGameSpectate extends RPCSubscribeMessage<RPCEvents.GameSpectate> { args: RPCSubscribeGameSpectateArgs; evt: RPCEvents.GameSpectate; } export interface RPCSubscribeGuildCreate extends RPCSubscribeMessage<RPCEvents.GuildCreate> { args: RPCSubscribeGuildCreateArgs; evt: RPCEvents.GuildCreate; } export interface RPCSubscribeGuildStatus extends RPCSubscribeMessage<RPCEvents.GuildStatus> { args: RPCSubscribeGuildStatusArgs; evt: RPCEvents.GuildStatus; } export interface RPCSubscribeMessageCreate extends RPCSubscribeMessage<RPCEvents.MessageCreate> { args: RPCSubscribeMessageCreateArgs; evt: RPCEvents.MessageCreate; } export interface RPCSubscribeMessageDelete extends RPCSubscribeMessage<RPCEvents.MessageDelete> { args: RPCSubscribeMessageDeleteArgs; evt: RPCEvents.MessageDelete; } export interface RPCSubscribeMessageUpdate extends RPCSubscribeMessage<RPCEvents.MessageUpdate> { args: RPCSubscribeMessageUpdateArgs; evt: RPCEvents.MessageUpdate; } export interface RPCSubscribeNotificationCreate extends RPCSubscribeMessage<RPCEvents.NotificationCreate> { args: RPCSubscribeNotificationCreateArgs; evt: RPCEvents.NotificationCreate; } export interface RPCSubscribeOverlay extends RPCSubscribeMessage<RPCEvents.Overlay> { args: RPCSubscribeOverlayArgs; evt: RPCEvents.Overlay; } export interface RPCSubscribeOverlayUpdate extends RPCSubscribeMessage<RPCEvents.OverlayUpdate> { args: RPCSubscribeOverlayUpdateArgs; evt: RPCEvents.OverlayUpdate; } export interface RPCSubscribeRelationshipUpdate extends RPCSubscribeMessage<RPCEvents.RelationshipUpdate> { args: RPCSubscribeRelationshipUpdateArgs; evt: RPCEvents.RelationshipUpdate; } export interface RPCSubscribeSpeakingStart extends RPCSubscribeMessage<RPCEvents.SpeakingStart> { args: RPCSubscribeSpeakingStartArgs; evt: RPCEvents.SpeakingStart; } export interface RPCSubscribeSpeakingStop extends RPCSubscribeMessage<RPCEvents.SpeakingStop> { args: RPCSubscribeSpeakingStopArgs; evt: RPCEvents.SpeakingStop; } export interface RPCSubscribeVoiceChannelSelect extends RPCSubscribeMessage<RPCEvents.VoiceChannelSelect> { args: RPCSubscribeVoiceChannelSelectArgs; evt: RPCEvents.VoiceChannelSelect; } export interface RPCSubscribeVoiceConnectionStatus extends RPCSubscribeMessage<RPCEvents.VoiceConnectionStatus> { args: RPCSubscribeVoiceConnectionStatusArgs; evt: RPCEvents.VoiceConnectionStatus; } export interface RPCSubscribeVoiceSettingsUpdate extends RPCSubscribeMessage<RPCEvents.VoiceSettingsUpdate> { args: RPCSubscribeVoiceSettingsUpdateArgs; evt: RPCEvents.VoiceSettingsUpdate; } export interface RPCSubscribeVoiceSettingsUpdate2 extends RPCSubscribeMessage<RPCEvents.VoiceSettingsUpdate2> { args: RPCSubscribeVoiceSettingsUpdate2Args; evt: RPCEvents.VoiceSettingsUpdate2; } export interface RPCSubscribeVoiceStateCreate extends RPCSubscribeMessage<RPCEvents.VoiceStateCreate> { args: RPCSubscribeVoiceStateCreateArgs; evt: RPCEvents.VoiceStateCreate; } export interface RPCSubscribeVoiceStateDelete extends RPCSubscribeMessage<RPCEvents.VoiceStateDelete> { args: RPCSubscribeVoiceStateDeleteArgs; evt: RPCEvents.VoiceStateDelete; } export interface RPCSubscribeVoiceStateUpdate extends RPCSubscribeMessage<RPCEvents.VoiceStateUpdate> { args: RPCSubscribeVoiceStateUpdateArgs; evt: RPCEvents.VoiceStateUpdate; } export interface RPCAuthorizeResult extends RPCCommandMessage<RPCCommands.Authorize> { data: RPCAuthorizeResultData; } export interface RPCAuthenticateResult extends RPCCommandMessage<RPCCommands.Authenticate> { data: RPCAuthenticateResultData; } export interface RPCGetChannelResult extends RPCCommandMessage<RPCCommands.GetChannel> { data: RPCGetChannelResultData; } export interface RPCGetChannelsResult extends RPCCommandMessage<RPCCommands.GetChannels> { data: RPCGetChannelsResultData; } export interface RPCGetGuildResult extends RPCCommandMessage<RPCCommands.GetGuild> { data: RPCGetGuildResultData; } export interface RPCGetGuildsResult extends RPCCommandMessage<RPCCommands.GetGuilds> { data: RPCGetGuildsResultData; } export interface RPCGetUserResult extends RPCCommandMessage<RPCCommands.GetUser> { data: RPCGetUserResultData; } export interface RPCGetVoiceSettingsResult extends RPCCommandMessage<RPCCommands.GetVoiceSettings> { data: RPCGetVoiceSettingsResultData; } export interface RPCSelectTextChannelResult extends RPCCommandMessage<RPCCommands.SelectTextChannel> { data: RPCSelectTextChannelResultData; } export interface RPCSelectVoiceChannelResult extends RPCCommandMessage<RPCCommands.SelectVoiceChannel> { data: RPCSelectVoiceChannelResultData; } export interface RPCSetActivityResult extends RPCCommandMessage<RPCCommands.SetActivity> { data: RPCSetActivityResultData; } export interface RPCSetVoiceSettingsResult extends RPCCommandMessage<RPCCommands.SetVoiceSettings> { data: RPCSetVoiceSettingsResultData; } export interface RPCSubscribeResult extends RPCCommandMessage<RPCCommands.Subscribe> { data: RPCSubscribeResultData; } export interface RPCUnsubscribeResult extends RPCCommandMessage<RPCCommands.Unsubscribe> { data: RPCUnsubscribeResultData; } export interface RPCAcceptActivityInviteResult extends RPCCommandMessage<RPCCommands.AcceptActivityInvite> { data: RPCAcceptActivityInviteResultData; } export interface RPCActivityInviteUserResult extends RPCCommandMessage<RPCCommands.ActivityInviteUser> { data: RPCActivityInviteUserResultData; } export interface RPCBraintreePopupBridgeCallbackResult extends RPCCommandMessage<RPCCommands.BraintreePopupBridgeCallback> { data: RPCBraintreePopupBridgeCallbackResultData; } export interface RPCBrowserResult extends RPCCommandMessage<RPCCommands.BrowserHandoff> { data: RPCBrowserHandoffResultData; } export interface RPCCloseActivityJoinRequestResult extends RPCCommandMessage<RPCCommands.CloseActivityJoinRequest> { data: RPCCloseActivityJoinRequestResultData; } export interface RPCConnectionsCallbackResult extends RPCCommandMessage<RPCCommands.ConnectionsCallback> { data: RPCConnectionsCallbackResultData; } export interface RPCCreateChannelInviteResult extends RPCCommandMessage<RPCCommands.CreateChannelInvite> { data: RPCCreateChannelInviteResultData; } export interface RPCDeepLinkResult extends RPCCommandMessage<RPCCommands.DeepLink> { data: RPCDeepLinkResultData; } export interface RPCGetApplicationTicketResult extends RPCCommandMessage<RPCCommands.GetApplicationTicket> { data: RPCGetApplicationTicketResultData; } export interface RPCGetEntitlementTicketResult extends RPCCommandMessage<RPCCommands.GetEntitlementTicket> { data: RPCGetEntitlementTicketResultData; } export interface RPCGetEntitlementsResult extends RPCCommandMessage<RPCCommands.GetEntitlements> { data: RPCGetEntitlementsResultData; } export interface RPCGetImageResult extends RPCCommandMessage<RPCCommands.GetImage> { data: RPCGetImageResultData; } export interface RPCGetNetworkingConfigResult extends RPCCommandMessage<RPCCommands.GetNetworkingConfig> { data: RPCGetNetworkingConfigResultData; } export interface RPCGetRelationshipsResult extends RPCCommandMessage<RPCCommands.GetRelationships> { data: RPCGetRelationshipsResultData; } export interface RPCGetSelectedVoiceChannelResult extends RPCCommandMessage<RPCCommands.GetSelectedVoiceChannel> { data: RPCGetSelectedVoiceChannelResultData; } export interface RPCGetSkusResult extends RPCCommandMessage<RPCCommands.GetSkus> { data: RPCGetSkusResultData; } export interface RPCGiftCodeBrowserResult extends RPCCommandMessage<RPCCommands.GiftCodeBrowser> { data: RPCGiftCodeBrowserResultData; } export interface RPCGuildTemplateBrowserResult extends RPCCommandMessage<RPCCommands.GuildTemplateBrowser> { data: RPCGuildTemplateBrowserResultData; } export interface RPCInviteBrowserResult extends RPCCommandMessage<RPCCommands.InviteBrowser> { data: RPCInviteBrowserResultData; } export interface RPCNetworkingCreateTokenResult extends RPCCommandMessage<RPCCommands.NetworkingCreateToken> { data: RPCNetworkingCreateTokenResultData; } export interface RPCNetworkingPeerMetricsResult extends RPCCommandMessage<RPCCommands.NetworkingPeerMetrics> { data: RPCNetworkingPeerMetricsResultData; } export interface RPCNetworkingSystemMetricsResult extends RPCCommandMessage<RPCCommands.NetworkingSystemMetrics> { data: RPCNetworkingSystemMetricsResultData; } export interface RPCOpenOverlayActivityInviteResult extends RPCCommandMessage<RPCCommands.OpenOverlayActivityInvite> { data: RPCOpenOverlayActivityInviteResultData; } export interface RPCOpenOverlayGuildInviteResult extends RPCCommandMessage<RPCCommands.OpenOverlayGuildInvite> { data: RPCOpenOverlayGuildInviteResultData; } export interface RPCOpenOverlayVoiceSettingsResult extends RPCCommandMessage<RPCCommands.OpenOverlayVoiceSettings> { data: RPCOpenOverlayVoiceSettingsResultData; } export interface RPCOverlayResult extends RPCCommandMessage<RPCCommands.Overlay> { data: RPCOverlayResultData; } export interface RPCSendActivityJoinInviteResult extends RPCCommandMessage<RPCCommands.SendActivityJoinInvite> { data: RPCSendActivityJoinInviteResultData; } export interface RPCSetCertifiedDevicesResult extends RPCCommandMessage<RPCCommands.SetCertifiedDevices> { data: RPCSetCertifiedDevicesResultData; } export interface RPCSetOverlayLockedResult extends RPCCommandMessage<RPCCommands.SetOverlayLocked> { data: RPCSetOverlayLockedResultData; } export interface RPCSetUserVoiceSettingsResult extends RPCCommandMessage<RPCCommands.SetUserVoiceSettings> { data: RPCSetUserVoiceSettingsResultData; } export interface RPCSetUserVoiceSettings2Result extends RPCCommandMessage<RPCCommands.SetUserVoiceSettings2> { data: RPCSetUserVoiceSettings2ResultData; } export interface RPCSetVoiceSettings2Result extends RPCCommandMessage<RPCCommands.SetVoiceSettings2> { data: RPCSetVoiceSettings2ResultData; } export interface RPCStartPurchaseResult extends RPCCommandMessage<RPCCommands.StartPurchase> { data: RPCStartPurchaseResultData; } export interface RPCValidateApplicationResult extends RPCCommandMessage<RPCCommands.ValidateApplication> { data: RPCValidateApplicationResultData; } export type RPCCommandsResult = RPCAcceptActivityInviteResult | RPCActivityInviteUserResult | RPCAuthenticateResult | RPCAuthorizeResult | RPCBraintreePopupBridgeCallbackResult | RPCBrowserResult | RPCCloseActivityJoinRequestResult | RPCConnectionsCallbackResult | RPCCreateChannelInviteResult | RPCDeepLinkResult | RPCGetApplicationTicketResult | RPCGetChannelResult | RPCGetChannelsResult | RPCGetEntitlementsResult | RPCGetEntitlementTicketResult | RPCGetGuildResult | RPCGetGuildsResult | RPCGetImageResult | RPCGetNetworkingConfigResult | RPCGetRelationshipsResult | RPCGetSelectedVoiceChannelResult | RPCGetSkusResult | RPCGetUserResult | RPCGetVoiceSettingsResult | RPCGiftCodeBrowserResult | RPCGuildTemplateBrowserResult | RPCInviteBrowserResult | RPCNetworkingCreateTokenResult | RPCNetworkingPeerMetricsResult | RPCNetworkingSystemMetricsResult | RPCOpenOverlayActivityInviteResult | RPCOpenOverlayGuildInviteResult | RPCOpenOverlayVoiceSettingsResult | RPCOverlayResult | RPCSelectTextChannelResult | RPCSelectVoiceChannelResult | RPCSendActivityJoinInviteResult | RPCSetActivityResult | RPCSetCertifiedDevicesResult | RPCSetOverlayLockedResult | RPCSetUserVoiceSettings2Result | RPCSetUserVoiceSettingsResult | RPCSetVoiceSettings2Result | RPCSetVoiceSettingsResult | RPCStartPurchaseResult | RPCSubscribeResult | RPCUnsubscribeResult | RPCValidateApplicationResult; export interface RPCActivityInviteDispatch extends BaseRPCMessage<RPCCommands.Dispatch> { data: RPCActivityInviteDispatchData; evt: RPCEvents.ActivityInvite; } export interface RPCActivityJoinDispatch extends BaseRPCMessage<RPCCommands.Dispatch> { data: RPCActivityJoinDispatchData; evt: RPCEvents.ActivityJoin; } export interface RPCActivityJoinRequestDispatch extends BaseRPCMessage<RPCCommands.Dispatch> { data: RPCActivityJoinRequestDispatchData; evt: RPCEvents.ActivityJoinRequest; } export interface RPCActivitySpectateDispatch extends BaseRPCMessage<RPCCommands.Dispatch> { data: RPCActivitySpectateDispatchData; evt: RPCEvents.ActivitySpectate; } export interface RPCChannelCreateDispatch extends BaseRPCMessage<RPCCommands.Dispatch> { data: RPCChannelCreateDispatchData; evt: RPCEvents.ChannelCreate; } export interface RPCCurrentUserUpdateDispatch extends BaseRPCMessage<RPCCommands.Dispatch> { data: RPCCurrentUserUpdateDispatchData; evt: RPCEvents.CurrentUserUpdate; } export interface RPCEntitlementCreateDispatch extends BaseRPCMessage<RPCCommands.Dispatch> { data: RPCEntitlementCreateDispatchData; evt: RPCEvents.EntitlementCreate; } export interface RPCEntitlementDeleteDispatch extends BaseRPCMessage<RPCCommands.Dispatch> { data: RPCEntitlementDeleteDispatchData; evt: RPCEvents.EntitlementDelete; } export interface RPCErrorDispatch<Cmd extends Exclude<RPCCommands, RPCCommands.Dispatch> = Exclude<RPCCommands, RPCCommands.Dispatch>> extends RPCCommandMessage<Cmd> { data: RPCErrorDispatchData; evt: RPCEvents.Error; } export interface RPCGameJoinDispatch extends BaseRPCMessage<RPCCommands.Dispatch> { data: RPCGameJoinDispatchData; evt: RPCEvents.GameJoin; } export interface RPCGameSpectateDispatch extends BaseRPCMessage<RPCCommands.Dispatch> { data: RPCGameSpectateDispatchData; evt: RPCEvents.GameSpectate; } export interface RPCGuildCreateDispatch extends BaseRPCMessage<RPCCommands.Dispatch> { data: RPCGuildCreateDispatchData; evt: RPCEvents.GuildCreate; } export interface RPCGuildStatusDispatch extends BaseRPCMessage<RPCCommands.Dispatch> { data: RPCGuildStatusDispatchData; evt: RPCEvents.GuildStatus; } export interface RPCMessageCreateDispatch extends BaseRPCMessage<RPCCommands.Dispatch> { data: RPCMessageCreateDispatchData; evt: RPCEvents.MessageCreate; } export interface RPCMessageDeleteDispatch extends BaseRPCMessage<RPCCommands.Dispatch> { data: RPCMessageDeleteDispatchData; evt: RPCEvents.MessageDelete; } export interface RPCMessageUpdateDispatch extends BaseRPCMessage<RPCCommands.Dispatch> { data: RPCMessageUpdateDispatchData; evt: RPCEvents.MessageUpdate; } export interface RPCNotificationCreateDispatch extends BaseRPCMessage<RPCCommands.Dispatch> { data: RPCNotificationCreateDispatchData; evt: RPCEvents.NotificationCreate; } export interface RPCOverlayDispatch extends BaseRPCMessage<RPCCommands.Dispatch> { data: RPCOverlayDispatchData; evt: RPCEvents.Overlay; } export interface RPCOverlayUpdateDispatch extends BaseRPCMessage<RPCCommands.Dispatch> { data: RPCOverlayUpdateDispatchData; evt: RPCEvents.OverlayUpdate; } export interface RPCReadyDispatch extends BaseRPCMessage<RPCCommands.Dispatch> { data: RPCReadyDispatchData; evt: RPCEvents.Ready; } export interface RPCRelationshipUpdateDispatch extends BaseRPCMessage<RPCCommands.Dispatch> { data: RPCRelationshipUpdateDispatchData; evt: RPCEvents.RelationshipUpdate; } export interface RPCSpeakingStartDispatch extends BaseRPCMessage<RPCCommands.Dispatch> { data: RPCSpeakingStartDispatchData; evt: RPCEvents.SpeakingStart; } export interface RPCSpeakingStopDispatch extends BaseRPCMessage<RPCCommands.Dispatch> { data: RPCSpeakingStopDispatchData; evt: RPCEvents.SpeakingStop; } export interface RPCVoiceChannelSelectDispatch extends BaseRPCMessage<RPCCommands.Dispatch> { data: RPCVoiceChannelSelectDispatchData; evt: RPCEvents.VoiceChannelSelect; } export interface RPCVoiceConnectionStatusDispatch extends BaseRPCMessage<RPCCommands.Dispatch> { data: RPCVoiceConnectionStatusDispatchData; evt: RPCEvents.VoiceConnectionStatus; } export interface RPCVoiceSettingsUpdateDispatch extends BaseRPCMessage<RPCCommands.Dispatch> { data: RPCVoiceSettingsUpdateDispatchData; evt: RPCEvents.VoiceSettingsUpdate; } export interface RPCVoiceSettingsUpdate2Dispatch extends BaseRPCMessage<RPCCommands.Dispatch> { data: RPCVoiceSettingsUpdate2DispatchData; evt: RPCEvents.VoiceSettingsUpdate2; } export interface RPCVoiceStateCreateDispatch extends BaseRPCMessage<RPCCommands.Dispatch> { data: RPCVoiceStateCreateDispatchData; evt: RPCEvents.VoiceStateCreate; } export interface RPCVoiceStateDeleteDispatch extends BaseRPCMessage<RPCCommands.Dispatch> { data: RPCVoiceStateDeleteDispatchData; evt: RPCEvents.VoiceStateDelete; } export interface RPCVoiceStateUpdateDispatch extends BaseRPCMessage<RPCCommands.Dispatch> { data: RPCVoiceStateUpdateDispatchData; evt: RPCEvents.VoiceStateUpdate; } export type RPCEventsDispatch = RPCActivityInviteDispatch | RPCActivityJoinDispatch | RPCActivityJoinRequestDispatch | RPCActivitySpectateDispatch | RPCChannelCreateDispatch | RPCCurrentUserUpdateDispatch | RPCEntitlementCreateDispatch | RPCEntitlementDeleteDispatch | RPCErrorDispatch | RPCGameJoinDispatch | RPCGameSpectateDispatch | RPCGuildCreateDispatch | RPCGuildStatusDispatch | RPCMessageCreateDispatch | RPCMessageDeleteDispatch | RPCMessageUpdateDispatch | RPCNotificationCreateDispatch | RPCOverlayDispatch | RPCOverlayUpdateDispatch | RPCReadyDispatch | RPCRelationshipUpdateDispatch | RPCSpeakingStartDispatch | RPCSpeakingStopDispatch | RPCVoiceChannelSelectDispatch | RPCVoiceConnectionStatusDispatch | RPCVoiceSettingsUpdate2Dispatch | RPCVoiceSettingsUpdateDispatch | RPCVoiceStateCreateDispatch | RPCVoiceStateDeleteDispatch | RPCVoiceStateUpdateDispatch; export type RPCMessage = RPCCommandsResult | RPCEventsDispatch; export type RPCMessagePayload = RPCCommandAcceptActivityInvitePayload | RPCCommandActivityInviteUserPayload | RPCCommandAuthenticatePayload | RPCCommandAuthorizePayload | RPCCommandBraintreePopupBridgeCallbackPayload | RPCCommandBrowserPayload | RPCCommandCloseActivityJoinRequestPayload | RPCCommandConnectionsCallbackPayload | RPCCommandCreateChannelInvitePayload | RPCCommandDeepLinkPayload | RPCCommandGetApplicationTicketPayload | RPCCommandGetChannelPayload | RPCCommandGetChannelsPayload | RPCCommandGetEntitlementsPayload | RPCCommandGetEntitlementTicketPayload | RPCCommandGetGuildPayload | RPCCommandGetGuildsPayload | RPCCommandGetImagePayload | RPCCommandGetNetworkingConfigPayload | RPCCommandGetRelationshipsPayload | RPCCommandGetSelectedVoiceChannelPayload | RPCCommandGetSkusPayload | RPCCommandGetUserPayload | RPCCommandGetVoiceSettingsPayload | RPCCommandGiftCodeBrowserPayload | RPCCommandGuildTemplateBrowserPayload | RPCCommandInviteBrowserPayload | RPCCommandNetworkingCreateTokenPayload | RPCCommandNetworkingPeerMetricsPayload | RPCCommandNetworkingSystemMetricsPayload | RPCCommandOpenOverlayActivityInvitePayload | RPCCommandOpenOverlayGuildInvitePayload | RPCCommandOpenOverlayVoiceSettingsPayload | RPCCommandOverlayPayload | RPCCommandSelectTextChannelPayload | RPCCommandSelectVoiceChannelPayload | RPCCommandSendActivityJoinInvitePayload | RPCCommandSetActivityPayload | RPCCommandSetCertifiedDevicesPayload | RPCCommandSetOverlayLockedPayload | RPCCommandSetUserVoiceSettings2Payload | RPCCommandSetUserVoiceSettingsPayload | RPCCommandSetVoiceSettings2Payload | RPCCommandSetVoiceSettingsPayload | RPCCommandStartPurchasePayload | RPCCommandSubscribePayload | RPCCommandUnsubscribePayload | RPCCommandValidateApplicationPayload; //# sourceMappingURL=v10.d.ts.map node_modules/discord-api-types/rpc/v8.d.ts 0000664 00000001641 15114741631 0014503 0 ustar 00 import type { Snowflake } from '../globals'; import type { APIMessage, APIUser } from '../v8'; import type { RelationshipType, RPCAPIMessageParsedContentMention, RPCAPIMessageParsedContentText } from './common'; export * from './common'; /** * @unstable */ export interface Relationship { /** * The id of the user */ id: Snowflake; /** * Relationship type */ type: RelationshipType; /** * User */ user: APIUser; } /** * @unstable */ export interface RPCAPIMessage extends Omit<APIMessage, 'channel_id'> { /** * The nickname of the user who sent the message */ nick?: string; /** * The color of the author's name */ author_color?: number; /** * The content of the message parsed into an array */ content_parsed: (RPCAPIMessageParsedContentMention | RPCAPIMessageParsedContentText)[]; } //# sourceMappingURL=v8.d.ts.map node_modules/discord-api-types/rpc/index.d.ts 0000664 00000000072 15114741631 0015252 0 ustar 00 export * from './v10'; //# sourceMappingURL=index.d.ts.map node_modules/discord-api-types/rpc/v9.js 0000664 00000001477 15114741631 0014257 0 ustar 00 "use strict"; var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { if (k2 === undefined) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { return m[k]; } }; } Object.defineProperty(o, k2, desc); }) : (function(o, m, k, k2) { if (k2 === undefined) k2 = k; o[k2] = m[k]; })); var __exportStar = (this && this.__exportStar) || function(m, exports) { for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); }; Object.defineProperty(exports, "__esModule", { value: true }); __exportStar(require("./common"), exports); //# sourceMappingURL=v9.js.map node_modules/discord-api-types/rpc/v10.mjs 0000664 00000001131 15114741631 0014467 0 ustar 00 import mod from "./v10.js"; export default mod; export const RPCCloseEventCodes = mod.RPCCloseEventCodes; export const RPCCommands = mod.RPCCommands; export const RPCDeviceType = mod.RPCDeviceType; export const RPCErrorCodes = mod.RPCErrorCodes; export const RPCEvents = mod.RPCEvents; export const RPCVersion = mod.RPCVersion; export const RPCVoiceSettingsModeType = mod.RPCVoiceSettingsModeType; export const RPCVoiceShortcutKeyComboKeyType = mod.RPCVoiceShortcutKeyComboKeyType; export const RelationshipType = mod.RelationshipType; export const VoiceConnectionStates = mod.VoiceConnectionStates; node_modules/discord-api-types/rpc/v8.js.map 0000664 00000000164 15114741631 0015022 0 ustar 00 {"version":3,"file":"v8.js","sourceRoot":"","sources":["v8.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAIA,2CAAyB"} node_modules/discord-api-types/rpc/v9.d.ts.map 0000664 00000001221 15114741631 0015252 0 ustar 00 {"version":3,"file":"v9.d.ts","sourceRoot":"","sources":["v9.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAC5C,OAAO,KAAK,EAAE,uBAAuB,EAAE,kBAAkB,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAClF,OAAO,KAAK,EAAE,gBAAgB,EAAE,iCAAiC,EAAE,8BAA8B,EAAE,MAAM,UAAU,CAAC;AAEpH,cAAc,UAAU,CAAC;AAEzB;;GAEG;AACH,MAAM,WAAW,YAAY;IAC5B;;OAEG;IACH,EAAE,EAAE,SAAS,CAAC;IACd;;OAEG;IACH,IAAI,EAAE,gBAAgB,CAAC;IACvB;;OAEG;IACH,IAAI,EAAE,OAAO,CAAC;CACd;AAED;;GAEG;AACH,MAAM,WAAW,aAAc,SAAQ,uBAAuB,EAAE,kBAAkB;IACjF;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB;;OAEG;IACH,cAAc,EAAE,CAAC,iCAAiC,GAAG,8BAA8B,CAAC,EAAE,CAAC;CACvF"} node_modules/discord-api-types/rpc/common.js 0000664 00000021774 15114741631 0015213 0 ustar 00 "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.RPCCloseEventCodes = exports.RPCErrorCodes = exports.RelationshipType = exports.VoiceConnectionStates = exports.RPCVoiceShortcutKeyComboKeyType = exports.RPCVoiceSettingsModeType = exports.RPCDeviceType = void 0; var RPCDeviceType; (function (RPCDeviceType) { RPCDeviceType["AudioInput"] = "audioinput"; RPCDeviceType["AudioOutput"] = "audiooutput"; RPCDeviceType["VideoInput"] = "videoinput"; })(RPCDeviceType || (exports.RPCDeviceType = RPCDeviceType = {})); var RPCVoiceSettingsModeType; (function (RPCVoiceSettingsModeType) { RPCVoiceSettingsModeType["PushToTalk"] = "PUSH_TO_TALK"; RPCVoiceSettingsModeType["VoiceActivity"] = "VOICE_ACTIVITY"; })(RPCVoiceSettingsModeType || (exports.RPCVoiceSettingsModeType = RPCVoiceSettingsModeType = {})); /** * @see {@link https://discord.com/developers/docs/topics/rpc#getvoicesettings-key-types} */ var RPCVoiceShortcutKeyComboKeyType; (function (RPCVoiceShortcutKeyComboKeyType) { RPCVoiceShortcutKeyComboKeyType[RPCVoiceShortcutKeyComboKeyType["KeyboardKey"] = 0] = "KeyboardKey"; RPCVoiceShortcutKeyComboKeyType[RPCVoiceShortcutKeyComboKeyType["MouseButton"] = 1] = "MouseButton"; RPCVoiceShortcutKeyComboKeyType[RPCVoiceShortcutKeyComboKeyType["KeyboardModifierKey"] = 2] = "KeyboardModifierKey"; RPCVoiceShortcutKeyComboKeyType[RPCVoiceShortcutKeyComboKeyType["GamepadButton"] = 3] = "GamepadButton"; })(RPCVoiceShortcutKeyComboKeyType || (exports.RPCVoiceShortcutKeyComboKeyType = RPCVoiceShortcutKeyComboKeyType = {})); var VoiceConnectionStates; (function (VoiceConnectionStates) { /** * TCP disconnected */ VoiceConnectionStates["Disconnected"] = "DISCONNECTED"; /** * Waiting for voice endpoint */ VoiceConnectionStates["AwaitingEndpoint"] = "AWAITING_ENDPOINT"; /** * TCP authenticating */ VoiceConnectionStates["Authenticating"] = "AUTHENTICATING"; /** * TCP connecting */ VoiceConnectionStates["Connecting"] = "CONNECTING"; /** * TCP connected */ VoiceConnectionStates["Connected"] = "CONNECTED"; /** * TCP connected, Voice disconnected */ VoiceConnectionStates["VoiceDisconnected"] = "VOICE_DISCONNECTED"; /** * TCP connected, Voice connecting */ VoiceConnectionStates["VoiceConnecting"] = "VOICE_CONNECTING"; /** * TCP connected, Voice connected */ VoiceConnectionStates["VoiceConnected"] = "VOICE_CONNECTED"; /** * No route to host */ VoiceConnectionStates["NoRoute"] = "NO_ROUTE"; /** * WebRTC ice checking */ VoiceConnectionStates["IceChecking"] = "ICE_CHECKING"; })(VoiceConnectionStates || (exports.VoiceConnectionStates = VoiceConnectionStates = {})); /** * @unstable */ var RelationshipType; (function (RelationshipType) { RelationshipType[RelationshipType["None"] = 0] = "None"; RelationshipType[RelationshipType["Friend"] = 1] = "Friend"; RelationshipType[RelationshipType["Blocked"] = 2] = "Blocked"; RelationshipType[RelationshipType["PendingIncoming"] = 3] = "PendingIncoming"; RelationshipType[RelationshipType["PendingOutgoing"] = 4] = "PendingOutgoing"; RelationshipType[RelationshipType["Implicit"] = 5] = "Implicit"; })(RelationshipType || (exports.RelationshipType = RelationshipType = {})); /** * @see {@link https://discord.com/developers/docs/topics/opcodes-and-status-codes#rpc-rpc-error-codes} */ var RPCErrorCodes; (function (RPCErrorCodes) { /** * An unknown error occurred. */ RPCErrorCodes[RPCErrorCodes["UnknownError"] = 1000] = "UnknownError"; /** * @unstable */ RPCErrorCodes[RPCErrorCodes["ServiceUnavailable"] = 1001] = "ServiceUnavailable"; /** * @unstable */ RPCErrorCodes[RPCErrorCodes["TransactionAborted"] = 1002] = "TransactionAborted"; /** * You sent an invalid payload. */ RPCErrorCodes[RPCErrorCodes["InvalidPayload"] = 4000] = "InvalidPayload"; /** * Invalid command name specified. */ RPCErrorCodes[RPCErrorCodes["InvalidCommand"] = 4002] = "InvalidCommand"; /** * Invalid guild ID specified. */ RPCErrorCodes[RPCErrorCodes["InvalidGuild"] = 4003] = "InvalidGuild"; /** * Invalid event name specified. */ RPCErrorCodes[RPCErrorCodes["InvalidEvent"] = 4004] = "InvalidEvent"; /** * Invalid channel ID specified. */ RPCErrorCodes[RPCErrorCodes["InvalidChannel"] = 4005] = "InvalidChannel"; /** * You lack permissions to access the given resource. */ RPCErrorCodes[RPCErrorCodes["InvalidPermissions"] = 4006] = "InvalidPermissions"; /** * An invalid OAuth2 application ID was used to authorize or authenticate with. */ RPCErrorCodes[RPCErrorCodes["InvalidClientId"] = 4007] = "InvalidClientId"; /** * An invalid OAuth2 application origin was used to authorize or authenticate with. */ RPCErrorCodes[RPCErrorCodes["InvalidOrigin"] = 4008] = "InvalidOrigin"; /** * An invalid OAuth2 token was used to authorize or authenticate with. */ RPCErrorCodes[RPCErrorCodes["InvalidToken"] = 4009] = "InvalidToken"; /** * The specified user ID was invalid. */ RPCErrorCodes[RPCErrorCodes["InvalidUser"] = 4010] = "InvalidUser"; /** * @unstable */ RPCErrorCodes[RPCErrorCodes["InvalidInvite"] = 4011] = "InvalidInvite"; /** * @unstable */ RPCErrorCodes[RPCErrorCodes["InvalidActivityJoinRequest"] = 4012] = "InvalidActivityJoinRequest"; /** * @unstable */ RPCErrorCodes[RPCErrorCodes["InvalidEntitlement"] = 4013] = "InvalidEntitlement"; /** * @unstable */ RPCErrorCodes[RPCErrorCodes["InvalidGiftCode"] = 4014] = "InvalidGiftCode"; /** * A standard OAuth2 error occurred; check the data object for the OAuth2 error details. */ RPCErrorCodes[RPCErrorCodes["OAuth2Error"] = 5000] = "OAuth2Error"; /** * An asynchronous `SELECT_TEXT_CHANNEL`/`SELECT_VOICE_CHANNEL` command timed out. */ RPCErrorCodes[RPCErrorCodes["SelectChannelTimedOut"] = 5001] = "SelectChannelTimedOut"; /** * An asynchronous `GET_GUILD` command timed out. */ RPCErrorCodes[RPCErrorCodes["GetGuildTimedOut"] = 5002] = "GetGuildTimedOut"; /** * You tried to join a user to a voice channel but the user was already in one. */ RPCErrorCodes[RPCErrorCodes["SelectVoiceForceRequired"] = 5003] = "SelectVoiceForceRequired"; /** * You tried to capture more than one shortcut key at once. */ RPCErrorCodes[RPCErrorCodes["CaptureShortcutAlreadyListening"] = 5004] = "CaptureShortcutAlreadyListening"; /** * @unstable */ RPCErrorCodes[RPCErrorCodes["InvalidActivitySecret"] = 5005] = "InvalidActivitySecret"; /** * @unstable */ RPCErrorCodes[RPCErrorCodes["NoEligibleActivity"] = 5006] = "NoEligibleActivity"; /** * @unstable */ RPCErrorCodes[RPCErrorCodes["PurchaseCanceled"] = 5007] = "PurchaseCanceled"; /** * @unstable */ RPCErrorCodes[RPCErrorCodes["PurchaseError"] = 5008] = "PurchaseError"; /** * @unstable */ RPCErrorCodes[RPCErrorCodes["UnauthorizedForAchievement"] = 5009] = "UnauthorizedForAchievement"; /** * @unstable */ RPCErrorCodes[RPCErrorCodes["RateLimited"] = 5010] = "RateLimited"; })(RPCErrorCodes || (exports.RPCErrorCodes = RPCErrorCodes = {})); /** * @see {@link https://discord.com/developers/docs/topics/opcodes-and-status-codes#rpc-rpc-close-event-codes} */ var RPCCloseEventCodes; (function (RPCCloseEventCodes) { /** * @unstable */ RPCCloseEventCodes[RPCCloseEventCodes["CloseNormal"] = 1000] = "CloseNormal"; /** * @unstable */ RPCCloseEventCodes[RPCCloseEventCodes["CloseUnsupported"] = 1003] = "CloseUnsupported"; /** * @unstable */ RPCCloseEventCodes[RPCCloseEventCodes["CloseAbnormal"] = 1006] = "CloseAbnormal"; /** * You connected to the RPC server with an invalid client ID. */ RPCCloseEventCodes[RPCCloseEventCodes["InvalidClientId"] = 4000] = "InvalidClientId"; /** * You connected to the RPC server with an invalid origin. */ RPCCloseEventCodes[RPCCloseEventCodes["InvalidOrigin"] = 4001] = "InvalidOrigin"; /** * You are being rate limited. */ RPCCloseEventCodes[RPCCloseEventCodes["RateLimited"] = 4002] = "RateLimited"; /** * The OAuth2 token associated with a connection was revoked, get a new one! */ RPCCloseEventCodes[RPCCloseEventCodes["TokenRevoked"] = 4003] = "TokenRevoked"; /** * The RPC Server version specified in the connection string was not valid. */ RPCCloseEventCodes[RPCCloseEventCodes["InvalidVersion"] = 4004] = "InvalidVersion"; /** * The encoding specified in the connection string was not valid. */ RPCCloseEventCodes[RPCCloseEventCodes["InvalidEncoding"] = 4005] = "InvalidEncoding"; })(RPCCloseEventCodes || (exports.RPCCloseEventCodes = RPCCloseEventCodes = {})); //# sourceMappingURL=common.js.map node_modules/discord-api-types/rpc/v8.mjs 0000664 00000000732 15114741631 0014424 0 ustar 00 import mod from "./v8.js"; export default mod; export const RPCCloseEventCodes = mod.RPCCloseEventCodes; export const RPCDeviceType = mod.RPCDeviceType; export const RPCErrorCodes = mod.RPCErrorCodes; export const RPCVoiceSettingsModeType = mod.RPCVoiceSettingsModeType; export const RPCVoiceShortcutKeyComboKeyType = mod.RPCVoiceShortcutKeyComboKeyType; export const RelationshipType = mod.RelationshipType; export const VoiceConnectionStates = mod.VoiceConnectionStates; node_modules/discord-api-types/rpc/v10.js.map 0000664 00000004566 15114741631 0015105 0 ustar 00 {"version":3,"file":"v10.js","sourceRoot":"","sources":["v10.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AA6BA,2CAAyB;AAEZ,QAAA,UAAU,GAAG,GAAG,CAAC;AAsC9B;;GAEG;AACH,IAAY,WA8LX;AA9LD,WAAY,WAAW;IACtB;;OAEG;IACH,8DAA+C,CAAA;IAC/C;;OAEG;IACH,0DAA2C,CAAA;IAC3C;;OAEG;IACH,4CAA6B,CAAA;IAC7B;;OAEG;IACH,sCAAuB,CAAA;IACvB;;OAEG;IACH,+EAAgE,CAAA;IAChE;;OAEG;IACH,iDAAkC,CAAA;IAClC;;;;OAIG;IACH,uEAAwD,CAAA;IACxD;;OAEG;IACH,2DAA4C,CAAA;IAC5C,4DAA6C,CAAA;IAC7C;;OAEG;IACH,qCAAsB,CAAA;IACtB;;OAEG;IACH,oCAAqB,CAAA;IACrB;;OAEG;IACH,8DAA+C,CAAA;IAC/C;;OAEG;IACH,yCAA0B,CAAA;IAC1B;;OAEG;IACH,2CAA4B,CAAA;IAC5B;;OAEG;IACH,8DAA+C,CAAA;IAC/C;;OAEG;IACH,mDAAoC,CAAA;IACpC;;OAEG;IACH,qCAAsB,CAAA;IACtB;;OAEG;IACH,uCAAwB,CAAA;IACxB;;OAEG;IACH,qCAAsB,CAAA;IACtB;;OAEG;IACH,4DAA6C,CAAA;IAC7C;;OAEG;IACH,qDAAsC,CAAA;IACtC;;OAEG;IACH,qEAAsD,CAAA;IACtD;;OAEG;IACH,mCAAoB,CAAA;IACpB;;OAEG;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CAA4B,CAAA;IAC5B;;OAEG;IACH,6CAAgC,CAAA;IAChC;;OAEG;IACH,6CAAgC,CAAA;IAChC;;OAEG;IACH,6CAAgC,CAAA;IAChC;;OAEG;IACH,uDAA0C,CAAA;IAC1C;;OAEG;IACH,gCAAmB,CAAA;IACnB;;OAEG;IACH,6CAAgC,CAAA;IAChC,4BAAe,CAAA;IACf;;OAEG;IACH,uDAA0C,CAAA;IAC1C,6CAAgC,CAAA;IAChC,2CAA8B,CAAA;IAC9B,wDAA2C,CAAA;IAC3C,8DAAiD,CAAA;IACjD,0DAA6C,CAAA;IAC7C;;OAEG;IACH,6DAAgD,CAAA;IAChD;;OAEG;IACH,oDAAuC,CAAA;IACvC;;OAEG;IACH,oDAAuC,CAAA;IACvC;;OAEG;IACH,oDAAuC,CAAA;AACxC,CAAC,EA/EW,SAAS,yBAAT,SAAS,QA+EpB"} node_modules/discord-api-types/rpc/index.mjs 0000664 00000001133 15114741631 0015172 0 ustar 00 import mod from "./index.js"; export default mod; export const RPCCloseEventCodes = mod.RPCCloseEventCodes; export const RPCCommands = mod.RPCCommands; export const RPCDeviceType = mod.RPCDeviceType; export const RPCErrorCodes = mod.RPCErrorCodes; export const RPCEvents = mod.RPCEvents; export const RPCVersion = mod.RPCVersion; export const RPCVoiceSettingsModeType = mod.RPCVoiceSettingsModeType; export const RPCVoiceShortcutKeyComboKeyType = mod.RPCVoiceShortcutKeyComboKeyType; export const RelationshipType = mod.RelationshipType; export const VoiceConnectionStates = mod.VoiceConnectionStates; node_modules/discord-api-types/rpc/index.js.map 0000664 00000000224 15114741631 0015571 0 ustar 00 {"version":3,"file":"index.js","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":";AAAA,2EAA2E;AAC3E,2FAA2F;;;;;;;;;;;;;;;;AAE3F,wCAAsB"} node_modules/discord-api-types/rpc/v9.mjs 0000664 00000000732 15114741631 0014425 0 ustar 00 import mod from "./v9.js"; export default mod; export const RPCCloseEventCodes = mod.RPCCloseEventCodes; export const RPCDeviceType = mod.RPCDeviceType; export const RPCErrorCodes = mod.RPCErrorCodes; export const RPCVoiceSettingsModeType = mod.RPCVoiceSettingsModeType; export const RPCVoiceShortcutKeyComboKeyType = mod.RPCVoiceShortcutKeyComboKeyType; export const RelationshipType = mod.RelationshipType; export const VoiceConnectionStates = mod.VoiceConnectionStates; node_modules/discord-api-types/rpc/common.d.ts 0000664 00000024070 15114741631 0015437 0 ustar 00 import type { Snowflake } from '../globals'; /** * @unstable The ping object for the `VOICE_CONNECTION_STATUS` dispatched {@link RPCVoiceConnectionStatusDispatchData.pings} field, * but discord's documentation incorrectly documents it as an 'array of integers'. */ export interface RPCVoiceConnectionStatusPing { /** * The time the ping was sent */ time: number; /** * The latency of the ping in milliseconds */ value: number; } /** * @unstable */ export interface RPCAPIMessageParsedContentOriginalMatch { 0: string; index: 0; } /** * @unstable */ export interface RPCAPIBaseMessageParsedContentText { type: 'text'; content: string; } /** * @unstable */ export interface RPCAPIMessageParsedContentText extends RPCAPIBaseMessageParsedContentText { originalMatch: RPCAPIMessageParsedContentOriginalMatch; } /** * @unstable */ export interface RPCAPIMessageParsedContentMention { type: 'mention'; userId: Snowflake; channelId: Snowflake; guildId: Snowflake; /** * Same as {@link RPCAPIMessageParsedContentMention.userId} */ parsedUserId: RPCAPIMessageParsedContentMention['userId']; content: RPCAPIBaseMessageParsedContentText; } /** * @see {@link https://discord.com/developers/docs/topics/rpc#authenticate-oauth2-application-structure} */ export interface RPCOAuth2Application { /** * Application description */ description: string; /** * Hash of the icon */ icon: string; /** * Application client id */ id: Snowflake; /** * Array of RPC origin urls */ rpc_origins: string[]; /** * Application name */ name: string; } export interface RPCDeviceVendor { /** * Name of the vendor */ name: string; /** * Url for the vendor */ url: string; } export interface RPCDeviceModel { /** * Name of the model */ name: string; /** * Url for the model */ url: string; } export declare enum RPCDeviceType { AudioInput = "audioinput", AudioOutput = "audiooutput", VideoInput = "videoinput" } export interface BaseRPCCertifiedDevice<Type extends RPCDeviceType> { /** * The type of device */ type: Type; /** * The device's Windows UUID */ id: string; /** * The hardware vendor */ vendor: RPCDeviceVendor; /** * The model of the product */ model: RPCDeviceModel; /** * UUIDs of related devices */ related: string[]; } /** * @see {@link https://discord.com/developers/docs/topics/rpc#setcertifieddevices-device-object} */ export type RPCCertifiedDevice<Type extends RPCDeviceType = RPCDeviceType> = Type extends RPCDeviceType.AudioInput ? BaseRPCCertifiedDevice<Type> & { /** * If the device's native echo cancellation is enabled */ echo_cancellation: boolean; /** * If the device's native noise suppression is enabled */ noise_suppression: boolean; /** * If the device's native automatic gain control is enabled */ automatic_gain_control: boolean; /** * If the device is hardware muted */ hardware_mute: boolean; } : BaseRPCCertifiedDevice<Type>; export interface RPCVoiceAvailableDevice { /** * Device id */ id: string; /** * Device name */ name: string; } /** * @see {@link https://discord.com/developers/docs/topics/rpc#getvoicesettings-voice-settings-input-object} */ export interface RPCVoiceSettingsInput { /** * Device id */ device_id: string; /** * Input voice level (min: 0.0, max: 100.0) */ volume: number; /** * Array of read-only device objects containing `id` and `name` string keys */ available_devices: RPCVoiceAvailableDevice[]; } /** * @see {@link https://discord.com/developers/docs/topics/rpc#getvoicesettings-voice-settings-output-object} */ export interface RPCVoiceSettingsOutput { /** * Device id */ device_id: string; /** * Input voice level (min: 0.0, max: 200.0) */ volume: number; /** * Array of read-only device objects containing `id` and `name` string keys */ available_devices: RPCVoiceAvailableDevice[]; } export declare enum RPCVoiceSettingsModeType { PushToTalk = "PUSH_TO_TALK", VoiceActivity = "VOICE_ACTIVITY" } /** * @see {@link https://discord.com/developers/docs/topics/rpc#getvoicesettings-key-types} */ export declare enum RPCVoiceShortcutKeyComboKeyType { KeyboardKey = 0, MouseButton = 1, KeyboardModifierKey = 2, GamepadButton = 3 } /** * @see {@link https://discord.com/developers/docs/topics/rpc#getvoicesettings-shortcut-key-combo-object} */ export interface RPCVoiceShortcutKeyCombo { /** * Type of key */ type: RPCVoiceShortcutKeyComboKeyType; /** * Key code */ code: number; /** * Key name */ name: string; } /** * @see {@link https://discord.com/developers/docs/topics/rpc#getvoicesettings-voice-settings-mode-object} */ export interface RPCVoiceSettingsMode { /** * Voice setting mode type */ type: RPCVoiceSettingsModeType; /** * Voice activity threshold automatically sets its threshold */ auto_threshold: boolean; /** * Threshold for voice activity (in dB) (min: -100.0, max: 0.0) */ threshold: number; /** * Shortcut key combos for PTT */ shortcut: RPCVoiceShortcutKeyCombo; /** * The PTT release delay (in ms) (min: 0, max: 2000) */ delay: number; } export declare enum VoiceConnectionStates { /** * TCP disconnected */ Disconnected = "DISCONNECTED", /** * Waiting for voice endpoint */ AwaitingEndpoint = "AWAITING_ENDPOINT", /** * TCP authenticating */ Authenticating = "AUTHENTICATING", /** * TCP connecting */ Connecting = "CONNECTING", /** * TCP connected */ Connected = "CONNECTED", /** * TCP connected, Voice disconnected */ VoiceDisconnected = "VOICE_DISCONNECTED", /** * TCP connected, Voice connecting */ VoiceConnecting = "VOICE_CONNECTING", /** * TCP connected, Voice connected */ VoiceConnected = "VOICE_CONNECTED", /** * No route to host */ NoRoute = "NO_ROUTE", /** * WebRTC ice checking */ IceChecking = "ICE_CHECKING" } /** * @unstable */ export declare enum RelationshipType { None = 0, Friend = 1, Blocked = 2, PendingIncoming = 3, PendingOutgoing = 4, Implicit = 5 } /** * @see {@link https://discord.com/developers/docs/topics/opcodes-and-status-codes#rpc-rpc-error-codes} */ export declare enum RPCErrorCodes { /** * An unknown error occurred. */ UnknownError = 1000, /** * @unstable */ ServiceUnavailable = 1001, /** * @unstable */ TransactionAborted = 1002, /** * You sent an invalid payload. */ InvalidPayload = 4000, /** * Invalid command name specified. */ InvalidCommand = 4002, /** * Invalid guild ID specified. */ InvalidGuild = 4003, /** * Invalid event name specified. */ InvalidEvent = 4004, /** * Invalid channel ID specified. */ InvalidChannel = 4005, /** * You lack permissions to access the given resource. */ InvalidPermissions = 4006, /** * An invalid OAuth2 application ID was used to authorize or authenticate with. */ InvalidClientId = 4007, /** * An invalid OAuth2 application origin was used to authorize or authenticate with. */ InvalidOrigin = 4008, /** * An invalid OAuth2 token was used to authorize or authenticate with. */ InvalidToken = 4009, /** * The specified user ID was invalid. */ InvalidUser = 4010, /** * @unstable */ InvalidInvite = 4011, /** * @unstable */ InvalidActivityJoinRequest = 4012, /** * @unstable */ InvalidEntitlement = 4013, /** * @unstable */ InvalidGiftCode = 4014, /** * A standard OAuth2 error occurred; check the data object for the OAuth2 error details. */ OAuth2Error = 5000, /** * An asynchronous `SELECT_TEXT_CHANNEL`/`SELECT_VOICE_CHANNEL` command timed out. */ SelectChannelTimedOut = 5001, /** * An asynchronous `GET_GUILD` command timed out. */ GetGuildTimedOut = 5002, /** * You tried to join a user to a voice channel but the user was already in one. */ SelectVoiceForceRequired = 5003, /** * You tried to capture more than one shortcut key at once. */ CaptureShortcutAlreadyListening = 5004, /** * @unstable */ InvalidActivitySecret = 5005, /** * @unstable */ NoEligibleActivity = 5006, /** * @unstable */ PurchaseCanceled = 5007, /** * @unstable */ PurchaseError = 5008, /** * @unstable */ UnauthorizedForAchievement = 5009, /** * @unstable */ RateLimited = 5010 } /** * @see {@link https://discord.com/developers/docs/topics/opcodes-and-status-codes#rpc-rpc-close-event-codes} */ export declare enum RPCCloseEventCodes { /** * @unstable */ CloseNormal = 1000, /** * @unstable */ CloseUnsupported = 1003, /** * @unstable */ CloseAbnormal = 1006, /** * You connected to the RPC server with an invalid client ID. */ InvalidClientId = 4000, /** * You connected to the RPC server with an invalid origin. */ InvalidOrigin = 4001, /** * You are being rate limited. */ RateLimited = 4002, /** * The OAuth2 token associated with a connection was revoked, get a new one! */ TokenRevoked = 4003, /** * The RPC Server version specified in the connection string was not valid. */ InvalidVersion = 4004, /** * The encoding specified in the connection string was not valid. */ InvalidEncoding = 4005 } //# sourceMappingURL=common.d.ts.map node_modules/discord-api-types/rpc/index.js 0000664 00000001747 15114741631 0015030 0 ustar 00 "use strict"; // This file exports all the types available in the recommended API version // Thereby, things MAY break in the future. Try sticking to imports from a specific version var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { if (k2 === undefined) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { return m[k]; } }; } Object.defineProperty(o, k2, desc); }) : (function(o, m, k, k2) { if (k2 === undefined) k2 = k; o[k2] = m[k]; })); var __exportStar = (this && this.__exportStar) || function(m, exports) { for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); }; Object.defineProperty(exports, "__esModule", { value: true }); __exportStar(require("./v10"), exports); //# sourceMappingURL=index.js.map node_modules/discord-api-types/rest/common.d.ts.map 0000664 00000011054 15114741631 0016402 0 ustar 00 {"version":3,"file":"common.d.ts","sourceRoot":"","sources":["common.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,oBAAY,kBAAkB;IAC7B,YAAY,IAAA;IAEZ,cAAc,QAAS;IACvB,kBAAkB,QAAA;IAClB,cAAc,QAAA;IACd,YAAY,QAAA;IACZ,kBAAkB,QAAA;IAClB,aAAa,QAAA;IACb,aAAa,QAAA;IACb,cAAc,QAAA;IACd,0BAA0B,QAAA;IAC1B,eAAe,QAAA;IACf,WAAW,QAAA;IACX,YAAY,QAAA;IACZ,WAAW,QAAA;IACX,YAAY,QAAA;IACZ,cAAc,QAAA;IACd,qBAAqB,QAAA;IAErB,cAAc,QAAS;IACvB,YAAY,QAAA;IAEZ,UAAU,QAAS;IACnB,UAAU,QAAA;IACV,mBAAmB,QAAA;IACnB,kBAAkB,QAAA;IAClB,YAAY,QAAA;IACZ,YAAY,QAAA;IACZ,aAAa,QAAA;IACb,2BAA2B,QAAA;IAE3B,sBAAsB,QAAS;IAE/B,eAAe,QAAS;IAExB,aAAa,QAAS;IACtB,qCAAqC,QAAA;IAErC,oBAAoB,QAAS;IAE7B,iCAAiC,QAAS;IAC1C,cAAc,QAAA;IACd,kBAAkB,QAAA;IAClB,kBAAkB,QAAA;IAClB,yBAA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A;IAC3C,0CAA0C,SAAA;IAE1C,kCAAkC,SAAU;IAE5C,2CAA2C,SAAU;IACrD,4CAA4C,SAAA;IAE5C,gBAAgB,SAAU;IAE1B,iBAAiB,SAAU;IAC3B,WAAW,SAAA;IACX,iCAAiC,SAAA;IACjC,sBAAsB,SAAA;IACtB,mCAAmC,SAAA;IAEnC,2BAA2B,SAAU;CACrC;AAED;;GAEG;AACH,oBAAY,MAAM;IACjB,UAAU,OAAO;IACjB,SAAS,UAAU;IACnB,SAAS,UAAU;IACnB,SAAS,OAAO;IAChB,SAAS,UAAU;IACnB,SAAS,UAAU;IACnB,QAAQ,OAAO;IACf,KAAK,OAAO;IACZ,MAAM,OAAO;IACb,KAAK,OAAO;IACZ,OAAO,OAAO;IACd,MAAM,OAAO;IACb,MAAM,OAAO;IACb,KAAK,OAAO;IACZ,KAAK,OAAO;IACZ,SAAS,OAAO;IAChB,OAAO,OAAO;IACd,QAAQ,OAAO;IACf,MAAM,OAAO;IACb,UAAU,OAAO;IACjB,SAAS,OAAO;IAChB,MAAM,OAAO;IACb,YAAY,UAAU;IACtB,QAAQ,OAAO;IACf,OAAO,OAAO;IACd,SAAS,UAAU;IACnB,YAAY,WAAW;IACvB,OAAO,UAAU;IACjB,IAAI,OAAO;IACX,OAAO,OAAO;IACd,SAAS,OAAO;IAChB,UAAU,OAAO;CACjB;AAED;;GAEG;AACH,MAAM,MAAM,YAAY,GAAG,GAAG,MAAM,EAAE,CAAC"} node_modules/discord-api-types/rest/common.js.map 0000664 00000011275 15114741631 0016153 0 ustar 00 {"version":3,"file":"common.js","sourceRoot":"","sources":["common.ts"],"names":[],"mappings":";;;AAAA;;GAEG;AACH,IAAY,kBAiUX;AAjUD,WAAY,kBAAkB;IAC7B,2EAAY,CAAA;IAEZ,mFAAuB,CAAA;IACvB,2FAAkB,CAAA;IAClB,mFAAc,CAAA;IACd,+EAAY,CAAA;IACZ,2FAAkB,CAAA;IAClB,iFAAa,CAAA;IACb,iFAAa,CAAA;IAC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ChB,wBAAc,CAAA;IACd,yBAAe,CAAA;IACf,uBAAa,CAAA;IACb,2BAAiB,CAAA;IACjB,0BAAgB,CAAA;IAChB,uBAAa,CAAA;IACb,gCAAsB,CAAA;IACtB,yBAAe,CAAA;IACf,wBAAc,CAAA;IACd,6BAAmB,CAAA;IACnB,iCAAuB,CAAA;IACvB,2BAAiB,CAAA;IACjB,qBAAW,CAAA;IACX,wBAAc,CAAA;IACd,0BAAgB,CAAA;IAChB,2BAAiB,CAAA;AAClB,CAAC,EAjCW,MAAM,sBAAN,MAAM,QAiCjB"} node_modules/discord-api-types/rest/index.d.ts.map 0000664 00000000164 15114741631 0016221 0 ustar 00 {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":"AAGA,cAAc,aAAa,CAAC"} node_modules/discord-api-types/rest/v10/stageInstance.js.map 0000664 00000000157 15114741631 0020056 0 ustar 00 {"version":3,"file":"stageInstance.js","sourceRoot":"","sources":["stageInstance.ts"],"names":[],"mappings":""} node_modules/discord-api-types/rest/v10/user.js.map 0000664 00000000135 15114741631 0016240 0 ustar 00 {"version":3,"file":"user.js","sourceRoot":"","sources":["user.ts"],"names":[],"mappings":""} node_modules/discord-api-types/rest/v10/soundboard.js.map 0000664 00000000151 15114741631 0017420 0 ustar 00 {"version":3,"file":"soundboard.js","sourceRoot":"","sources":["soundboard.ts"],"names":[],"mappings":""} node_modules/discord-api-types/rest/v10/autoModeration.d.ts.map 0000664 00000002013 15114741631 0020505 0 ustar 00 {"version":3,"file":"autoModeration.d.ts","sourceRoot":"","sources":["autoModeration.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC/C,OAAO,KAAK,EACX,uBAAuB,EACvB,qBAAqB,EACrB,2BAA2B,EAC3B,oCAAoC,EACpC,6BAA6B,EAC7B,MAAM,0BAA0B,CAAC;AAElC;;GAEG;AACH,MAAM,MAAM,mCAAmC,GAAG,qBAAqB,EAAE,CAAC;AAE1E;;GAEG;AACH,MAAM,MAAM,kCAAkC,GAAG,qBAAqB,CAAC;AAEvE;;GAEG;AACH,MAAM,WAAW,qCAAqC;IACrD;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;OAEG;IACH,UAAU,EAAE,2BAA2B,CAAC;IACxC;;OAEG;IACH,YAAY,EAAE,6BAA6B,CAAC;IAC5C;;;;OAIG;IACH,gBAAgB,CAAC,EAAE,oCAAoC,GAAG,SAAS,CAAC;IACpE;;OAEG;IACH,OAAO,EAAE,uBAAuB,EAAE,CAAC;IACnC;;;;OAIG;IACH,OAAO,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IAC9B;;OAEG;IACH,YAAY,CAAC,EAAE,SAAS,EAAE,GAAG,SAAS,CAAC;IACvC;;OAEG;IACH,eAAe,CAAC,EAAE,SAAS,EAAE,GAAG,SAAS,CAAC;CAC1C;AAED;;GAEG;AACH,MAAM,MAAM,mCAAmC,GAAG,qBAAqB,CAAC;AAExE;;GAEG;AACH,MAAM,MAAM,sCAAsC,GAAG,IAAI,CACxD,OAAO,CAAC,qCAAqC,CAAC,EAC9C,cAAc,CACd,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,oCAAoC,GAAG,qBAAqB,CAAC;AAEzE;;GAEG;AACH,MAAM,MAAM,qCAAqC,GAAG,KAAK,CAAC"} node_modules/discord-api-types/rest/v10/emoji.js 0000664 00000000156 15114741631 0015614 0 ustar 00 "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); //# sourceMappingURL=emoji.js.map node_modules/discord-api-types/rest/v10/interactions.d.ts 0000664 00000035525 15114741631 0017457 0 ustar 00 import type { Snowflake } from '../../globals'; import type { APIApplicationCommand, APIApplicationCommandPermission, APIGuildApplicationCommandPermissions, APIInteractionResponse, APIInteractionResponseCallbackData, ApplicationCommandType, InteractionResponseType, APIMessage, InteractionType } from '../../payloads/v10/index'; import type { _AddUndefinedToPossiblyUndefinedPropertiesOfInterface, _NonNullableFields, _StrictPartial } from '../../utils/internals'; import type { RESTDeleteAPIWebhookWithTokenMessageResult, RESTGetAPIWebhookWithTokenMessageResult, RESTPatchAPIWebhookWithTokenMessageFormDataBody, RESTPatchAPIWebhookWithTokenMessageJSONBody, RESTPatchAPIWebhookWithTokenMessageResult, RESTPostAPIWebhookWithTokenWaitResult } from './webhook'; /** * @see {@link https://discord.com/developers/docs/interactions/application-commands#get-global-application-commands} */ export interface RESTGetAPIApplicationCommandsQuery { /** * Whether to include full localization dictionaries (name_localizations and description_localizations) * in the returned objects, instead of the name_localized and description_localized fields. * * @defaultValue `false` */ with_localizations?: boolean; } /** * @see {@link https://discord.com/developers/docs/interactions/application-commands#get-global-application-commands} */ export type RESTGetAPIApplicationCommandsResult = APIApplicationCommand[]; /** * @see {@link https://discord.com/developers/docs/interactions/application-commands#get-global-application-command} */ export type RESTGetAPIApplicationCommandResult = APIApplicationCommand; export interface RESTPostAPIBaseApplicationCommandsJSONBody extends _AddUndefinedToPossiblyUndefinedPropertiesOfInterface<Omit<APIApplicationCommand, 'application_id' | 'contexts' | 'default_member_permissions' | 'description_localized' | 'description' | 'guild_id' | 'id' | 'integration_types' | 'name_localized' | 'type' | 'version'>>, _AddUndefinedToPossiblyUndefinedPropertiesOfInterface<Partial<_NonNullableFields<Pick<APIApplicationCommand, 'contexts'>> & Pick<APIApplicationCommand, 'default_member_permissions' | 'integration_types'>>> { } /** * @see {@link https://discord.com/developers/docs/interactions/application-commands#create-global-application-command} */ export interface RESTPostAPIChatInputApplicationCommandsJSONBody extends RESTPostAPIBaseApplicationCommandsJSONBody { type?: ApplicationCommandType.ChatInput | undefined; description: string; } /** * @see {@link https://discord.com/developers/docs/interactions/application-commands#create-global-application-command} */ export interface RESTPostAPIContextMenuApplicationCommandsJSONBody extends RESTPostAPIBaseApplicationCommandsJSONBody { type: ApplicationCommandType.Message | ApplicationCommandType.User; } /** * @see {@link https://discord.com/developers/docs/interactions/application-commands#create-global-application-command} */ export interface RESTPostAPIPrimaryEntryPointApplicationCommandJSONBody extends RESTPostAPIBaseApplicationCommandsJSONBody { type: ApplicationCommandType.PrimaryEntryPoint; } /** * @see {@link https://discord.com/developers/docs/interactions/application-commands#create-global-application-command} */ export type RESTPostAPIApplicationCommandsJSONBody = RESTPostAPIChatInputApplicationCommandsJSONBody | RESTPostAPIContextMenuApplicationCommandsJSONBody | RESTPostAPIPrimaryEntryPointApplicationCommandJSONBody; /** * @see {@link https://discord.com/developers/docs/interactions/application-commands#create-global-application-command} */ export type RESTPostAPIApplicationCommandsResult = APIApplicationCommand; /** * @see {@link https://discord.com/developers/docs/interactions/application-commands#edit-global-application-command} */ export type RESTPatchAPIApplicationCommandJSONBody = _StrictPartial<RESTPostAPIApplicationCommandsJSONBody>; /** * @see {@link https://discord.com/developers/docs/interactions/application-commands#edit-global-application-command} */ export type RESTPatchAPIApplicationCommandResult = APIApplicationCommand; /** * @see {@link https://discord.com/developers/docs/interactions/application-commands#bulk-overwrite-global-application-commands} */ export type RESTPutAPIApplicationCommandsJSONBody = RESTPostAPIApplicationCommandsJSONBody[]; /** * @see {@link https://discord.com/developers/docs/interactions/application-commands#bulk-overwrite-global-application-commands} */ export type RESTPutAPIApplicationCommandsResult = APIApplicationCommand[]; /** * @see {@link https://discord.com/developers/docs/interactions/application-commands#get-guild-application-commands} */ export type RESTGetAPIApplicationGuildCommandsQuery = RESTGetAPIApplicationCommandsQuery; /** * @see {@link https://discord.com/developers/docs/interactions/application-commands#get-guild-application-commands} */ export type RESTGetAPIApplicationGuildCommandsResult = Omit<APIApplicationCommand, 'dm_permission'>[]; /** * @see {@link https://discord.com/developers/docs/interactions/application-commands#get-guild-application-commands} */ export type RESTGetAPIApplicationGuildCommandResult = Omit<APIApplicationCommand, 'dm_permission'>; /** * @see {@link https://discord.com/developers/docs/interactions/application-commands#create-guild-application-command} */ export type RESTPostAPIApplicationGuildCommandsJSONBody = Omit<RESTPostAPIChatInputApplicationCommandsJSONBody, 'dm_permission'> | Omit<RESTPostAPIContextMenuApplicationCommandsJSONBody, 'dm_permission'>; /** * @see {@link https://discord.com/developers/docs/interactions/application-commands#create-guild-application-command} */ export type RESTPostAPIApplicationGuildCommandsResult = Omit<APIApplicationCommand, 'dm_permission'>; /** * @see {@link https://discord.com/developers/docs/interactions/application-commands#edit-guild-application-command} */ export type RESTPatchAPIApplicationGuildCommandJSONBody = _StrictPartial<Omit<RESTPostAPIChatInputApplicationCommandsJSONBody, 'dm_permission'> | Omit<RESTPostAPIContextMenuApplicationCommandsJSONBody, 'dm_permission'>>; /** * @see {@link https://discord.com/developers/docs/interactions/application-commands#edit-guild-application-command} */ export type RESTPatchAPIApplicationGuildCommandResult = Omit<APIApplicationCommand, 'dm_permission'>; /** * @see {@link https://discord.com/developers/docs/interactions/application-commands#bulk-overwrite-guild-application-commands} */ export type RESTPutAPIApplicationGuildCommandsJSONBody = ((Omit<RESTPostAPIChatInputApplicationCommandsJSONBody, 'dm_permission'> & Pick<Partial<APIApplicationCommand>, 'id'>) | (Omit<RESTPostAPIContextMenuApplicationCommandsJSONBody, 'dm_permission'> & Pick<Partial<APIApplicationCommand>, 'id'>))[]; /** * @see {@link https://discord.com/developers/docs/interactions/application-commands#bulk-overwrite-guild-application-commands} */ export type RESTPutAPIApplicationGuildCommandsResult = Omit<APIApplicationCommand, 'dm_permission'>[]; /** * @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#create-interaction-response} */ export type RESTPostAPIInteractionCallbackJSONBody = APIInteractionResponse; /** * @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#create-interaction-response} */ export interface RESTPostAPIInteractionCallbackQuery { /** * Whether to include a interaction callback response as the response instead of a 204 */ with_response?: boolean; } /** * @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#create-interaction-response} */ export type RESTPostAPIInteractionCallbackFormDataBody = (Record<`files[${bigint}]`, unknown> & { /** * JSON stringified message body */ payload_json?: string | undefined; }) | (Record<`files[${bigint}]`, unknown> & RESTPostAPIInteractionCallbackJSONBody); /** * @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#create-interaction-response} */ export type RESTPostAPIInteractionCallbackResult = never; /** * @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-callback-interaction-callback-response-object} */ export interface RESTPostAPIInteractionCallbackWithResponseResult { /** * The interaction object associated with the interaction */ interaction: RESTAPIInteractionCallbackObject; /** * The resource that was created by the interaction response */ resource?: RESTAPIInteractionCallbackResourceObject; } /** * @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-callback-interaction-callback-object} */ export interface RESTAPIInteractionCallbackObject { /** * ID of the interaction */ id: Snowflake; /** * Interaction type */ type: InteractionType; /** * Instance ID of the Activity if one was launched or joined */ activity_instance_id?: string; /** * ID of the message that was created by the interaction */ response_message_id?: Snowflake; /** * Whether or not the message is in a loading state */ response_message_loading?: boolean; /** * Whether or not the response message was ephemeral */ response_message_ephemeral?: boolean; } /** * @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-callback-interaction-callback-resource-object} */ export interface RESTAPIInteractionCallbackResourceObject { /** * Interaction callback type */ type: InteractionResponseType; /** * Represents the Activity launched by this interaction * * @remarks * Only present if `type` is {@link InteractionResponseType.LaunchActivity} */ activity_instance?: RESTAPIInteractionCallbackActivityInstanceResource; /** * Message created by the interaction * * @remarks * Only present if `type` is {@link InteractionResponseType.ChannelMessageWithSource} * or {@link InteractionResponseType.UpdateMessage} */ message?: APIMessage; } /** * @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-callback-interaction-callback-activity-instance-resource} */ export interface RESTAPIInteractionCallbackActivityInstanceResource { /** * Instance ID of the Activity if one was launched or joined. */ id: string; } /** * @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#get-original-interaction-response} */ export type RESTGetAPIInteractionOriginalResponseResult = RESTGetAPIWebhookWithTokenMessageResult; /** * @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#edit-original-interaction-response} */ export type RESTPatchAPIInteractionOriginalResponseJSONBody = RESTPatchAPIWebhookWithTokenMessageJSONBody; /** * @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#edit-original-interaction-response} */ export type RESTPatchAPIInteractionOriginalResponseFormDataBody = RESTPatchAPIWebhookWithTokenMessageFormDataBody; /** * @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#edit-original-interaction-response} */ export type RESTPatchAPIInteractionOriginalResponseResult = RESTPatchAPIWebhookWithTokenMessageResult; /** * @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#delete-original-interaction-response} */ export type RESTDeleteAPIInteractionOriginalResponseResult = RESTDeleteAPIWebhookWithTokenMessageResult; /** * @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#create-followup-message} */ export type RESTPostAPIInteractionFollowupJSONBody = APIInteractionResponseCallbackData; /** * @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#create-followup-message} */ export type RESTPostAPIInteractionFollowupFormDataBody = (Record<`files[${bigint}]`, unknown> & { /** * JSON stringified message body */ payload_json?: string | undefined; }) | (Record<`files[${bigint}]`, unknown> & RESTPostAPIInteractionFollowupJSONBody); /** * @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#create-followup-message} */ export type RESTPostAPIInteractionFollowupResult = RESTPostAPIWebhookWithTokenWaitResult; /** * @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#get-followup-message} */ export type RESTGetAPIInteractionFollowupResult = RESTGetAPIWebhookWithTokenMessageResult; /** * @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#edit-followup-message} */ export type RESTPatchAPIInteractionFollowupJSONBody = RESTPatchAPIWebhookWithTokenMessageJSONBody; /** * @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#edit-followup-message} */ export type RESTPatchAPIInteractionFollowupFormDataBody = RESTPatchAPIWebhookWithTokenMessageFormDataBody; /** * @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#edit-followup-message} */ export type RESTPatchAPIInteractionFollowupResult = RESTPatchAPIWebhookWithTokenMessageResult; /** * @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#delete-followup-message} */ export type RESTDeleteAPIInteractionFollowupResult = RESTDeleteAPIWebhookWithTokenMessageResult; /** * @see {@link https://discord.com/developers/docs/interactions/application-commands#get-guild-application-command-permissions} */ export type RESTGetAPIGuildApplicationCommandsPermissionsResult = APIGuildApplicationCommandPermissions[]; /** * @see {@link https://discord.com/developers/docs/interactions/application-commands#get-application-command-permissions} */ export type RESTGetAPIApplicationCommandPermissionsResult = APIGuildApplicationCommandPermissions; /** * @see {@link https://discord.com/developers/docs/interactions/application-commands#edit-application-command-permissions} */ export interface RESTPutAPIApplicationCommandPermissionsJSONBody { permissions: APIApplicationCommandPermission[]; } /** * @see {@link https://discord.com/developers/docs/interactions/application-commands#edit-application-command-permissions} */ export type RESTPutAPIApplicationCommandPermissionsResult = APIGuildApplicationCommandPermissions; /** * @see {@link https://discord.com/developers/docs/interactions/application-commands#batch-edit-application-command-permissions} */ export type RESTPutAPIGuildApplicationCommandsPermissionsJSONBody = Pick<APIGuildApplicationCommandPermissions, 'id' | 'permissions'>[]; /** * @see {@link https://discord.com/developers/docs/interactions/application-commands#batch-edit-application-command-permissions} */ export type RESTPutAPIGuildApplicationCommandsPermissionsResult = APIGuildApplicationCommandPermissions[]; //# sourceMappingURL=interactions.d.ts.map node_modules/discord-api-types/rest/v10/stageInstance.d.ts.map 0000664 00000001512 15114741631 0020306 0 ustar 00 {"version":3,"file":"stageInstance.d.ts","sourceRoot":"","sources":["stageInstance.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC/C,OAAO,KAAK,EAAE,gBAAgB,EAAE,yBAAyB,EAAE,MAAM,0BAA0B,CAAC;AAE5F;;GAEG;AACH,MAAM,WAAW,gCAAgC;IAChD;;OAEG;IACH,UAAU,EAAE,SAAS,CAAC;IACtB;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;;;OAIG;IACH,aAAa,CAAC,EAAE,yBAAyB,GAAG,SAAS,CAAC;IACtD;;OAEG;IACH,uBAAuB,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IAC9C;;OAEG;IACH,wBAAwB,CAAC,EAAE,SAAS,GAAG,SAAS,CAAC;CACjD;AAED;;GAEG;AACH,MAAM,MAAM,8BAA8B,GAAG,gBAAgB,CAAC;AAE9D;;GAEG;AACH,MAAM,MAAM,6BAA6B,GAAG,gBAAgB,CAAC;AAE7D;;GAEG;AACH,MAAM,WAAW,iCAAiC;IACjD;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC3B;;OAEG;IACH,aAAa,CAAC,EAAE,yBAAyB,GAAG,SAAS,CAAC;CACtD;AAED;;GAEG;AACH,MAAM,MAAM,+BAA+B,GAAG,gBAAgB,CAAC;AAE/D;;GAEG;AACH,MAAM,MAAM,gCAAgC,GAAG,KAAK,CAAC"} node_modules/discord-api-types/rest/v10/index.d.ts.map 0000664 00000017513 15114741631 0016635 0 ustar 00 {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAG/C,cAAc,WAAW,CAAC;AAC1B,mBAAmB,eAAe,CAAC;AACnC,mBAAmB,YAAY,CAAC;AAChC,mBAAmB,kBAAkB,CAAC;AACtC,cAAc,WAAW,CAAC;AAC1B,mBAAmB,SAAS,CAAC;AAC7B,mBAAmB,WAAW,CAAC;AAC/B,mBAAmB,SAAS,CAAC;AAC7B,mBAAmB,uBAAuB,CAAC;AAC3C,mBAAmB,gBAAgB,CAAC;AACpC,mBAAmB,UAAU,CAAC;AAC9B,cAAc,gBAAgB,CAAC;AAC/B,mBAAmB,UAAU,CAAC;AAC9B,mBAAmB,QAAQ,CAAC;AAC5B,mBAAmB,cAAc,CAAC;AAClC,mBAAmB,iBAAiB,CAAC;AACrC,mBAAmB,WAAW,CAAC;AAC/B,mBAAmB,YAAY,CAAC;AAChC,m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IACxB;;;;OAIG;IACH,IAAI,CAAC,EAAE,SAAS,CAAC;CACjB;AAED,eAAO,MAAM,UAAU;;;;;;;;CAQb,CAAC;AAKX,eAAO,MAAM,YAAY;;;IAGxB;;OAEG;;CAEM,CAAC"} node_modules/discord-api-types/rest/v10/guildScheduledEvent.js.map 0000664 00000000173 15114741631 0021213 0 ustar 00 {"version":3,"file":"guildScheduledEvent.js","sourceRoot":"","sources":["guildScheduledEvent.ts"],"names":[],"mappings":""} node_modules/discord-api-types/rest/v10/oauth2.js.map 0000664 00000000141 15114741631 0016461 0 ustar 00 {"version":3,"file":"oauth2.js","sourceRoot":"","sources":["oauth2.ts"],"names":[],"mappings":""} node_modules/discord-api-types/rest/v10/channel.js.map 0000664 00000000325 15114741631 0016673 0 ustar 00 {"version":3,"file":"channel.js","sourceRoot":"","sources":["channel.ts"],"names":[],"mappings":";;;AAgZA;;GAEG;AACH,IAAY,YAGX;AAHD,WAAY,YAAY;IACvB,mDAAM,CAAA;IACN,iDAAK,CAAA;AACN,CAAC,EAHW,YAAY,4BAAZ,YAAY,QAGvB"} node_modules/discord-api-types/rest/v10/poll.js.map 0000664 00000000135 15114741631 0016230 0 ustar 00 {"version":3,"file":"poll.js","sourceRoot":"","sources":["poll.ts"],"names":[],"mappings":""} node_modules/discord-api-types/rest/v10/oauth2.d.ts 0000664 00000015316 15114741631 0016153 0 ustar 00 import type { Permissions, Snowflake } from '../../globals'; import type { APIApplication, APIGuild, APIUser, APIWebhook, OAuth2Scopes } from '../../payloads/v10/index'; /** * @see {@link https://discord.com/developers/docs/topics/oauth2#get-current-bot-application-information} */ export type RESTGetAPIOAuth2CurrentApplicationResult = Omit<APIApplication, 'flags'>; /** * @see {@link https://discord.com/developers/docs/topics/oauth2#get-current-authorization-information} */ export interface RESTGetAPIOAuth2CurrentAuthorizationResult { /** * the current application */ application: Partial<APIApplication>; /** * the scopes the user has authorized the application for */ scopes: OAuth2Scopes[]; /** * when the access token expires */ expires: string; /** * the user who has authorized, if the user has authorized with the `identify` scope */ user?: APIUser; } /** * @see {@link https://discord.com/developers/docs/topics/oauth2#authorization-code-grant} */ export interface RESTOAuth2AuthorizationQuery { response_type: 'code'; client_id: Snowflake; scope: string; redirect_uri?: string; state?: string; prompt?: 'consent' | 'none'; } /** * @see {@link https://discord.com/developers/docs/topics/oauth2#authorization-code-grant-token-revocation-example} */ export interface RESTPostOAuth2TokenRevocationQuery { token: string; token_type_hint?: 'access_token' | 'refresh_token'; } /** * @see {@link https://discord.com/developers/docs/topics/oauth2#authorization-code-grant-redirect-url-example} */ export interface RESTPostOAuth2AuthorizationQueryResult { code: string; state?: string; } /** * @deprecated Use {@link RESTPostOAuth2AuthorizationQueryResult} instead */ export type RESTOAuth2AuthorizationQueryResult = RESTPostOAuth2AuthorizationQueryResult; /** * @remarks * This endpoint requires either HTTP Basic authentication using `client_id:client_secret`, * or the `client_id` and `client_secret` must be provided in the form body. * @see {@link https://discord.com/developers/docs/topics/oauth2#authorization-code-grant-redirect-url-example} */ export type RESTPostOAuth2AccessTokenURLEncodedData = RESTOAuth2TokenOptionalClientCredentials & { grant_type: 'authorization_code'; code: string; redirect_uri?: string; }; export type RESTOAuth2TokenOptionalClientCredentials = { client_id: Snowflake; client_secret: string; } | { client_id?: never; client_secret?: never; }; /** * @see {@link https://discord.com/developers/docs/topics/oauth2#authorization-code-grant-access-token-response} */ export interface RESTPostOAuth2AccessTokenResult { access_token: string; token_type: string; expires_in: number; refresh_token: string; scope: string; } /** * @remarks * This endpoint requires either HTTP Basic authentication using `client_id:client_secret`, * or the `client_id` and `client_secret` must be provided in the form body. * @see {@link https://discord.com/developers/docs/topics/oauth2#authorization-code-grant-refresh-token-exchange-example} */ export type RESTPostOAuth2RefreshTokenURLEncodedData = RESTOAuth2TokenOptionalClientCredentials & { grant_type: 'refresh_token'; refresh_token: string; }; export type RESTPostOAuth2RefreshTokenResult = RESTPostOAuth2AccessTokenResult; /** * @see {@link https://discord.com/developers/docs/topics/oauth2#implicit-grant} */ export interface RESTOAuth2ImplicitAuthorizationQuery { response_type: 'token'; client_id: Snowflake; scope: string; redirect_uri?: string; state?: string; prompt?: 'consent' | 'none'; } /** * @see {@link https://discord.com/developers/docs/topics/oauth2#implicit-grant-redirect-url-example} */ export type RESTOAuth2ImplicitAuthorizationURLFragmentResult = Omit<RESTPostOAuth2AccessTokenResult, 'refresh_token'>; /** * @see {@link https://discord.com/developers/docs/topics/oauth2#client-credentials-grant} */ export interface RESTPostOAuth2ClientCredentialsURLEncodedData { grant_type: 'client_credentials'; scope: string; } export type RESTPostOAuth2ClientCredentialsResult = RESTOAuth2ImplicitAuthorizationURLFragmentResult; /** * @see {@link https://discord.com/developers/docs/topics/oauth2#bot-authorization-flow-bot-auth-parameters} */ export interface RESTOAuth2BotAuthorizationQuery { /** * Your app's client id */ client_id: Snowflake; /** * Needs to include bot for the bot flow */ scope: `${OAuth2Scopes.Bot} ${string}` | `${OAuth2Scopes.Bot}` | `${string} ${OAuth2Scopes.Bot} ${string}` | `${string} ${OAuth2Scopes.Bot}`; /** * The permissions you're requesting * * @see {@link https://discord.com/developers/docs/topics/permissions} */ permissions?: Permissions; /** * Pre-fills the dropdown picker with a guild for the user */ guild_id?: Snowflake; /** * `true` or `false`—disallows the user from changing the guild dropdown */ disable_guild_select?: boolean; } /** * @see {@link https://discord.com/developers/docs/topics/oauth2#advanced-bot-authorization} */ export interface RESTOAuth2AdvancedBotAuthorizationQuery { client_id: Snowflake; /** * This assumes you include the `bot` scope alongside others (like `identify` for example) */ scope: `${OAuth2Scopes.Bot} ${string}` | `${OAuth2Scopes.Bot}` | `${string} ${OAuth2Scopes.Bot} ${string}` | `${string} ${OAuth2Scopes.Bot}`; /** * The required permissions bitfield, stringified */ permissions?: Permissions; guild_id?: Snowflake; disable_guild_select?: boolean; response_type: string; redirect_uri?: string; } export interface RESTOAuth2AdvancedBotAuthorizationQueryResult { code: string; state?: string; guild_id: Snowflake; permissions: Permissions; } /** * @see {@link https://discord.com/developers/docs/topics/oauth2#advanced-bot-authorization-extended-bot-authorization-access-token-example} */ export interface RESTPostOAuth2AccessTokenWithBotAndGuildsScopeResult { access_token: string; token_type: string; expires_in: number; refresh_token: string; scope: string; guild: APIGuild; } /** * @see {@link https://discord.com/developers/docs/topics/oauth2#webhooks-webhook-token-response-example} */ export interface RESTPostOAuth2AccessTokenWithBotAndWebhookIncomingScopeResult { access_token: string; token_type: string; expires_in: number; refresh_token: string; scope: string; webhook: APIWebhook; } export type RESTPostOAuth2AccessTokenWithBotAndGuildsAndWebhookIncomingScopeResult = RESTPostOAuth2AccessTokenWithBotAndGuildsScopeResult & RESTPostOAuth2AccessTokenWithBotAndWebhookIncomingScopeResult; //# sourceMappingURL=oauth2.d.ts.map node_modules/discord-api-types/rest/v10/template.d.ts 0000664 00000004451 15114741631 0016562 0 ustar 00 import type { APIGuild, APITemplate } from '../../payloads/v10/index'; import type { _StrictPartial } from '../../utils/internals'; /** * @see {@link https://discord.com/developers/docs/resources/guild-template#get-guild-template} */ export type RESTGetAPITemplateResult = APITemplate; /** * @see {@link https://discord.com/developers/docs/resources/guild-template#create-guild-from-guild-template} */ export interface RESTPostAPITemplateCreateGuildJSONBody { /** * Name of the guild (2-100 characters) */ name: string; /** * base64 1024x1024 png/jpeg image for the guild icon * * @see {@link https://discord.com/developers/docs/reference#image-data} */ icon?: string | undefined; } /** * @see {@link https://discord.com/developers/docs/resources/guild-template#create-guild-from-guild-template} */ export type RESTPostAPITemplateCreateGuildResult = APIGuild; /** * @see {@link https://discord.com/developers/docs/resources/guild-template#get-guild-templates} */ export type RESTGetAPIGuildTemplatesResult = APITemplate[]; /** * @see {@link https://discord.com/developers/docs/resources/guild-template#create-guild-template} */ export interface RESTPostAPIGuildTemplatesJSONBody { /** * Name of the template (1-100 characters) */ name: string; /** * Description for the template (0-120 characters) */ description?: string | null | undefined; } /** * @see {@link https://discord.com/developers/docs/resources/guild-template#create-guild-template} */ export type RESTPostAPIGuildTemplatesResult = APITemplate; /** * @see {@link https://discord.com/developers/docs/resources/guild-template#sync-guild-template} */ export type RESTPutAPIGuildTemplateSyncResult = APITemplate; /** * @see {@link https://discord.com/developers/docs/resources/guild-template#modify-guild-template} */ export type RESTPatchAPIGuildTemplateJSONBody = _StrictPartial<RESTPostAPIGuildTemplatesJSONBody>; /** * @see {@link https://discord.com/developers/docs/resources/guild-template#modify-guild-template} */ export type RESTPatchAPIGuildTemplateResult = APITemplate; /** * @see {@link https://discord.com/developers/docs/resources/guild-template#delete-guild-template} */ export type RESTDeleteAPIGuildTemplateResult = APITemplate; //# sourceMappingURL=template.d.ts.map node_modules/discord-api-types/rest/v10/sticker.d.ts.map 0000664 00000002055 15114741631 0017165 0 ustar 00 {"version":3,"file":"sticker.d.ts","sourceRoot":"","sources":["sticker.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAE3E;;GAEG;AACH,MAAM,MAAM,uBAAuB,GAAG,UAAU,CAAC;AAEjD;;GAEG;AACH,MAAM,WAAW,yBAAyB;IACzC,aAAa,EAAE,cAAc,EAAE,CAAC;CAChC;AAED;;GAEG;AACH,MAAM,MAAM,2BAA2B,GAAG,cAAc,CAAC;AAEzD;;GAEG;AACH,MAAM,MAAM,qBAAqB,GAAG,2BAA2B,CAAC;AAEhE;;;GAGG;AACH,MAAM,MAAM,8BAA8B,GAAG,yBAAyB,CAAC;AAEvE;;GAEG;AACH,MAAM,MAAM,6BAA6B,GAAG,UAAU,EAAE,CAAC;AAEzD;;GAEG;AACH,MAAM,MAAM,4BAA4B,GAAG,UAAU,CAAC;AAEtD;;GAEG;AACH,MAAM,WAAW,mCAAmC;IACnD;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;OAEG;IACH,WAAW,EAAE,MAAM,CAAC;IACpB;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;;;OAIG;IACH,IAAI,EAAE,OAAO,CAAC;CACd;AAED;;GAEG;AACH,MAAM,MAAM,6BAA6B,GAAG,UAAU,CAAC;AAEvD;;GAEG;AACH,MAAM,WAAW,gCAAgC;IAChD;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC1B;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;IACxC;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CAC1B;AAED;;GAEG;AACH,MAAM,MAAM,8BAA8B,GAAG,UAAU,CAAC;AAExD;;GAEG;AACH,MAAM,MAAM,+BAA+B,GAAG,KAAK,CAAC"} node_modules/discord-api-types/rest/v10/application.js.map 0000664 00000000153 15114741631 0017565 0 ustar 00 {"version":3,"file":"application.js","sourceRoot":"","sources":["application.ts"],"names":[],"mappings":""} node_modules/discord-api-types/rest/v10/user.d.ts.map 0000664 00000003373 15114741631 0016503 0 ustar 00 {"version":3,"file":"user.d.ts","sourceRoot":"","sources":["user.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC5D,OAAO,KAAK,EACX,UAAU,EACV,aAAa,EACb,cAAc,EACd,OAAO,EACP,4BAA4B,EAC5B,YAAY,EACZ,MAAM,0BAA0B,CAAC;AAElC;;GAEG;AACH,MAAM,MAAM,2BAA2B,GAAG,OAAO,CAAC;AAElD;;GAEG;AACH,MAAM,MAAM,oBAAoB,GAAG,OAAO,CAAC;AAE3C;;GAEG;AACH,MAAM,MAAM,mCAAmC,GAAG,cAAc,CAAC;AAEjE;;GAEG;AACH,MAAM,WAAW,+BAA+B;IAC/C;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC9B;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;IACnC;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;CACnC;AAED;;G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AC,MAAM,EAAE,MAAM,GAAG,MAAM,CAAC,GAAG,SAAS,CAAC;CACvD;AAED;;GAEG;AACH,MAAM,MAAM,oDAAoD,GAAG,4BAA4B,CAAC"} node_modules/discord-api-types/rest/v10/guild.d.ts.map 0000664 00000026151 15114741631 0016630 0 ustar 00 {"version":3,"file":"guild.d.ts","sourceRoot":"","sources":["guild.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC5D,OAAO,KAAK,EACX,MAAM,EACN,UAAU,EACV,YAAY,EACZ,iBAAiB,EACjB,iBAAiB,EACjB,QAAQ,EACR,mBAAmB,EACnB,cAAc,EACd,2BAA2B,EAC3B,kBAAkB,EAClB,eAAe,EACf,qBAAqB,EACrB,cAAc,EACd,sBAAsB,EACtB,OAAO,EACP,aAAa,EACb,cAAc,EACd,gCAAgC,EAChC,0BAA0B,EAC1B,YAAY,EACZ,aAAa,EACb,uBAAuB,EACvB,sBAAsB,EACtB,gBAAgB,EAChB,wBAAwB,EACxB,8BAA8B,EAC9B,MAAM,0BAA0B,CAAC;AAClC,OAAO,KAAK,EACX,qDAAqD,EACrD,iBAAiB,EACjB,iBAAiB,EACjB,SAAS,EACT,cAAc,EACd,eAAe,EACf,MAAM,uBAAuB,CAAC;AAC/B,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AACxC,OAAO,KAAK,EAAE,mCAAmC,EAAE,MAAM,WAAW,CAAC;AAErE,MAAM,WAAW,2BAA4B,SAAQ,mCAAmC;IACvF,EAAE,EAAE,MAAM,GAAG,MAAM,CAAC;CACpB;AAED;;GAEG;AACH,MAAM,MAAM,uBAAuB,GAAG,2BAA2B,CAAC;AAElE,MAAM,MAAM,6BAA6B,GAAG,OAAO,CAAC,UAAU,EAAE,YAAY,GAAG,iBAAiB,CAAC,CAAC;AAElG;;GAEG;AACH,MAAM,MAAM,yBAAyB,GAAG,6BAA6B,CAAC;AAEtE,M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EG;IACH,OAAO,CAAC,EAAE,4BAA4B,EAAE,GAAG,SAAS,CAAC;CACrD,CAAC;AAEF,MAAM,WAAW,4BAChB,SAAQ,qDAAqD,CAC3D,OAAO,CAAC,IAAI,CAAC,wBAAwB,EAAE,UAAU,GAAG,IAAI,GAAG,SAAS,GAAG,OAAO,CAAC,CAAC,CAChF,EACD,IAAI,CAAC,wBAAwB,EAAE,IAAI,GAAG,OAAO,CAAC;IAC/C;;OAEG;IACH,OAAO,EAAE,kCAAkC,EAAE,CAAC;CAC9C;AAED;;GAEG;AACH,MAAM,MAAM,sCAAsC,GAAG,4BAA4B,CAAC;AAElF,MAAM,WAAW,kCAChB,SAAQ,qDAAqD,CAC3D,OAAO,CAAC,IAAI,CAAC,8BAA8B,EAAE,OAAO,GAAG,UAAU,GAAG,OAAO,CAAC,CAAC,CAC7E,EACD,IAAI,CAAC,8BAA8B,EAAE,OAAO,CAAC;IAC9C;;OAEG;IACH,QAAQ,CAAC,EAAE,SAAS,GAAG,IAAI,GAAG,SAAS,CAAC;IACxC;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;IACvC;;OAEG;IACH,cAAc,CAAC,EAAE,OAAO,GAAG,IAAI,GAAG,SAAS,CAAC;CAC5C;AAED;;GAEG;AACH,MAAM,MAAM,4CAA4C,GAAG,kCAAkC,CAAC;AAE9F;;GAEG;AACH,MAAM,MAAM,+BAA+B,GAAG,kBAAkB,CAAC;AAEjE;;GAEG;AACH,MAAM,WAAW,sCAAsC;IACtD;;OAEG;IACH,sBAAsB,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC5C;;OAEG;IACH,kBAAkB,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CACxC"} node_modules/discord-api-types/rest/v10/poll.js 0000664 00000000155 15114741631 0015456 0 ustar 00 "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); //# sourceMappingURL=poll.js.map node_modules/discord-api-types/rest/v10/stageInstance.d.ts 0000664 00000003754 15114741631 0017544 0 ustar 00 import type { Snowflake } from '../../globals'; import type { APIStageInstance, StageInstancePrivacyLevel } from '../../payloads/v10/index'; /** * @see {@link https://discord.com/developers/docs/resources/stage-instance#create-stage-instance} */ export interface RESTPostAPIStageInstanceJSONBody { /** * The id of the stage channel */ channel_id: Snowflake; /** * The topic of the stage instance (1-120 characters) */ topic: string; /** * The privacy level of the stage instance * * @defaultValue `StageInstancePrivacyLevel.GuildOnly` */ privacy_level?: StageInstancePrivacyLevel | undefined; /** * Notify `@everyone` that a stage instance has started */ send_start_notification?: boolean | undefined; /** * The guild scheduled event associated with this stage instance */ guild_scheduled_event_id?: Snowflake | undefined; } /** * @see {@link https://discord.com/developers/docs/resources/stage-instance#create-stage-instance} */ export type RESTPostAPIStageInstanceResult = APIStageInstance; /** * @see {@link https://discord.com/developers/docs/resources/stage-instance#get-stage-instance} */ export type RESTGetAPIStageInstanceResult = APIStageInstance; /** * @see {@link https://discord.com/developers/docs/resources/stage-instance#modify-stage-instance} */ export interface RESTPatchAPIStageInstanceJSONBody { /** * The topic of the stage instance (1-120 characters) */ topic?: string | undefined; /** * The privacy level of the stage instance */ privacy_level?: StageInstancePrivacyLevel | undefined; } /** * @see {@link https://discord.com/developers/docs/resources/stage-instance#modify-stage-instance} */ export type RESTPatchAPIStageInstanceResult = APIStageInstance; /** * @see {@link https://discord.com/developers/docs/resources/stage-instance#delete-stage-instance} */ export type RESTDeleteAPIStageInstanceResult = never; //# sourceMappingURL=stageInstance.d.ts.map node_modules/discord-api-types/rest/v10/autoModeration.d.ts 0000664 00000005052 15114741631 0017737 0 ustar 00 import type { Snowflake } from '../../globals'; import type { APIAutoModerationAction, APIAutoModerationRule, AutoModerationRuleEventType, APIAutoModerationRuleTriggerMetadata, AutoModerationRuleTriggerType } from '../../payloads/v10/index'; /** * @see {@link https://discord.com/developers/docs/resources/auto-moderation#list-auto-moderation-rules-for-guild} */ export type RESTGetAPIAutoModerationRulesResult = APIAutoModerationRule[]; /** * @see {@link https://discord.com/developers/docs/resources/auto-moderation#get-auto-moderation-rule} */ export type RESTGetAPIAutoModerationRuleResult = APIAutoModerationRule; /** * @see {@link https://discord.com/developers/docs/resources/auto-moderation#create-auto-moderation-rule} */ export interface RESTPostAPIAutoModerationRuleJSONBody { /** * The rule name */ name: string; /** * The rule event type */ event_type: AutoModerationRuleEventType; /** * The rule trigger type */ trigger_type: AutoModerationRuleTriggerType; /** * The rule trigger metadata * * Can be omitted if the trigger type is {@link AutoModerationRuleTriggerType.Spam} */ trigger_metadata?: APIAutoModerationRuleTriggerMetadata | undefined; /** * The actions which will execute when this rule is triggered */ actions: APIAutoModerationAction[]; /** * Whether this rule is enabled * * @defaultValue `false` */ enabled?: boolean | undefined; /** * The role ids that shouldn't be affected by this rule (Maximum of 20) */ exempt_roles?: Snowflake[] | undefined; /** * The channel ids that shouldn't be affected by this rule (Maximum of 50) */ exempt_channels?: Snowflake[] | undefined; } /** * @see {@link https://discord.com/developers/docs/resources/auto-moderation#create-auto-moderation-rule} */ export type RESTPostAPIAutoModerationRuleResult = APIAutoModerationRule; /** * @see {@link https://discord.com/developers/docs/resources/auto-moderation#modify-auto-moderation-rule} */ export type RESTPatchAPIAutoModerationRuleJSONBody = Omit<Partial<RESTPostAPIAutoModerationRuleJSONBody>, 'trigger_type'>; /** * @see {@link https://discord.com/developers/docs/resources/auto-moderation#modify-auto-moderation-rule} */ export type RESTPatchAPIAutoModerationRuleResult = APIAutoModerationRule; /** * @see {@link https://discord.com/developers/docs/resources/auto-moderation#delete-auto-moderation-rule} */ export type RESTDeleteAPIAutoModerationRuleResult = never; //# sourceMappingURL=autoModeration.d.ts.map node_modules/discord-api-types/rest/v10/gateway.js 0000664 00000000160 15114741631 0016145 0 ustar 00 "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); //# sourceMappingURL=gateway.js.map node_modules/discord-api-types/rest/v10/emoji.js.map 0000664 00000000137 15114741631 0016367 0 ustar 00 {"version":3,"file":"emoji.js","sourceRoot":"","sources":["emoji.ts"],"names":[],"mappings":""} node_modules/discord-api-types/rest/v10/application.js 0000664 00000000164 15114741631 0017013 0 ustar 00 "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); //# sourceMappingURL=application.js.map node_modules/discord-api-types/rest/v10/poll.d.ts 0000664 00000002652 15114741631 0015716 0 ustar 00 import type { Snowflake } from '../../globals'; import type { APIBasePoll, APIBasePollAnswer, APIMessage, APIPollDefaults, APIUser } from '../../v10'; /** * @see {@link https://discord.com/developers/docs/resources/poll#get-answer-voters} */ export interface RESTGetAPIPollAnswerVotersQuery { /** * Get users after this user ID */ after?: Snowflake; /** * Max number of users to return (1-100) * * @defaultValue `25` */ limit?: number; } /** * @see {@link https://discord.com/developers/docs/resources/poll#poll-create-request-object-poll-create-request-object-structure} */ export interface RESTAPIPoll extends APIBasePoll, Partial<APIPollDefaults> { /** * Each of the answers available in the poll, up to 10 */ answers: APIBasePollAnswer[]; /** * Number of hours the poll should be open for, up to 32 days * * @defaultValue `24` */ duration?: number; } /** * @deprecated Use {@link RESTAPIPoll} instead */ export type RESTAPIPollCreate = RESTAPIPoll; /** * @see {@link https://discord.com/developers/docs/resources/poll#get-answer-voters} */ export interface RESTGetAPIPollAnswerVotersResult { /** * Users who voted for this answer */ users: APIUser[]; } /** * @see {@link https://discord.com/developers/docs/resources/poll#expire-poll} */ export type RESTPostAPIPollExpireResult = APIMessage; //# sourceMappingURL=poll.d.ts.map node_modules/discord-api-types/rest/v10/gateway.d.ts 0000664 00000000634 15114741631 0016407 0 ustar 00 import type { APIGatewayBotInfo, APIGatewayInfo } from '../../payloads/v10/index'; /** * @see {@link https://discord.com/developers/docs/topics/gateway#get-gateway} */ export type RESTGetAPIGatewayResult = APIGatewayInfo; /** * @see {@link https://discord.com/developers/docs/topics/gateway#get-gateway-bot} */ export type RESTGetAPIGatewayBotResult = APIGatewayBotInfo; //# sourceMappingURL=gateway.d.ts.map node_modules/discord-api-types/rest/v10/webhook.d.ts 0000664 00000024521 15114741631 0016405 0 ustar 00 import type { Snowflake } from '../../globals'; import type { APIAllowedMentions, APIEmbed, APIMessage, APIWebhook, MessageFlags, APIMessageTopLevelComponent } from '../../payloads/v10/index'; import type { _AddUndefinedToPossiblyUndefinedPropertiesOfInterface, _Nullable } from '../../utils/internals'; import type { RESTAPIAttachment } from './channel'; import type { RESTAPIPoll } from './poll'; /** * @see {@link https://discord.com/developers/docs/resources/webhook#create-webhook} */ export interface RESTPostAPIChannelWebhookJSONBody { /** * Name of the webhook (1-80 characters) */ name: string; /** * Image for the default webhook avatar * * @see {@link https://discord.com/developers/docs/reference#image-data} */ avatar?: string | null | undefined; } /** * @see {@link https://discord.com/developers/docs/resources/webhook#create-webhook} */ export type RESTPostAPIChannelWebhookResult = APIWebhook; /** * @see {@link https://discord.com/developers/docs/resources/webhook#get-channel-webhooks} */ export type RESTGetAPIChannelWebhooksResult = APIWebhook[]; /** * @see {@link https://discord.com/developers/docs/resources/webhook#get-guild-webhooks} */ export type RESTGetAPIGuildWebhooksResult = APIWebhook[]; /** * @see {@link https://discord.com/developers/docs/resources/webhook#get-webhook} */ export type RESTGetAPIWebhookResult = APIWebhook; /** * @see {@link https://discord.com/developers/docs/resources/webhook#get-webhook-with-token} */ export type RESTGetAPIWebhookWithTokenResult = Omit<APIWebhook, 'user'>; /** * @see {@link https://discord.com/developers/docs/resources/webhook#modify-webhook} */ export interface RESTPatchAPIWebhookJSONBody { /** * The default name of the webhook */ name?: string | undefined; /** * Image for the default webhook avatar * * @see {@link https://discord.com/developers/docs/reference#image-data} */ avatar?: string | null | undefined; /** * The new channel id this webhook should be moved to */ channel_id?: Snowflake | undefined; } /** * @see {@link https://discord.com/developers/docs/resources/webhook#modify-webhook} */ export type RESTPatchAPIWebhookResult = APIWebhook; /** * @see {@link https://discord.com/developers/docs/resources/webhook#modify-webhook-with-token} */ export type RESTPatchAPIWebhookWithTokenJSONBody = Omit<RESTPatchAPIWebhookJSONBody, 'channel_id'>; /** * @see {@link https://discord.com/developers/docs/resources/webhook#modify-webhook-with-token} */ export type RESTPatchAPIWebhookWithTokenResult = RESTGetAPIWebhookWithTokenResult; /** * @see {@link https://discord.com/developers/docs/resources/webhook#delete-webhook} */ export type RESTDeleteAPIWebhookResult = never; /** * @see {@link https://discord.com/developers/docs/resources/webhook#delete-webhook-with-token} */ export type RESTDeleteAPIWebhookWithTokenResult = never; /** * @see {@link https://discord.com/developers/docs/resources/webhook#execute-webhook} */ export interface RESTPostAPIWebhookWithTokenJSONBody { /** * The message contents (up to 2000 characters) */ content?: string | undefined; /** * Override the default username of the webhook */ username?: string | undefined; /** * Override the default avatar of the webhook */ avatar_url?: string | undefined; /** * `true` if this is a TTS message */ tts?: boolean | undefined; /** * Embedded `rich` content * * @see {@link https://discord.com/developers/docs/resources/channel#embed-object} */ embeds?: APIEmbed[] | undefined; /** * Allowed mentions for the message * * @see {@link https://discord.com/developers/docs/resources/channel#allowed-mentions-object} */ allowed_mentions?: APIAllowedMentions | undefined; /** * The components to include with the message * * Application-owned webhooks can always send components. Non-application-owned webhooks cannot send interactive components, and the `components` field will be ignored unless they set the `with_components` query param. * * @see {@link https://discord.com/developers/docs/components/reference} */ components?: APIMessageTopLevelComponent[] | undefined; /** * Attachment objects with filename and description */ attachments?: RESTAPIAttachment[] | undefined; /** * Message flags combined as a bitfield */ flags?: MessageFlags | undefined; /** * Name of thread to create * * Available only if the webhook is in a forum channel and a thread is not specified in {@link RESTPostAPIWebhookWithTokenQuery.thread_id} query parameter */ thread_name?: string | undefined; /** * Array of tag ids to apply to the thread */ applied_tags?: Snowflake[] | undefined; /** * A poll! */ poll?: RESTAPIPoll | undefined; } /** * @see {@link https://discord.com/developers/docs/resources/webhook#execute-webhook} */ export type RESTPostAPIWebhookWithTokenFormDataBody = (Record<`files[${bigint}]`, unknown> & { /** * JSON stringified message body */ payload_json?: string | undefined; }) | (Record<`files[${bigint}]`, unknown> & RESTPostAPIWebhookWithTokenJSONBody); /** * @see {@link https://discord.com/developers/docs/resources/webhook#execute-webhook-query-string-params} */ export interface RESTPostAPIWebhookWithTokenQuery { /** * Waits for server confirmation of message send before response, and returns the created message body * (when `false` a message that is not saved does not return an error) * * @defaultValue `false` */ wait?: boolean; /** * Send a message to the specified thread within a webhook's channel. The thread will automatically be unarchived. * * Available only if the {@link RESTPostAPIWebhookWithTokenJSONBody.thread_name} JSON body property is not specified */ thread_id?: Snowflake; /** * Whether to allow sending (non-interactive) components for non-application-owned webhooks * (ignored for application-owned webhooks) * * @defaultValue `false` */ with_components?: boolean; } /** * @see {@link https://discord.com/developers/docs/resources/webhook#execute-webhook} */ export type RESTPostAPIWebhookWithTokenResult = never; /** * Received when a call to https://discord.com/developers/docs/resources/webhook#execute-webhook receives * the `wait` query parameter set to `true` * * @see {@link https://discord.com/developers/docs/resources/webhook#execute-webhook-query-string-params} */ export type RESTPostAPIWebhookWithTokenWaitResult = APIMessage; /** * @see {@link https://discord.com/developers/docs/resources/webhook#execute-slackcompatible-webhook-query-string-params} */ export type RESTPostAPIWebhookWithTokenSlackQuery = Pick<RESTPostAPIWebhookWithTokenQuery, 'thread_id' | 'wait'>; /** * @see {@link https://discord.com/developers/docs/resources/webhook#execute-slackcompatible-webhook} */ export type RESTPostAPIWebhookWithTokenSlackResult = never; /** * Received when a call to https://discord.com/developers/docs/resources/webhook#execute-webhook receives * the `wait` query parameter set to `true` * * @see {@link https://discord.com/developers/docs/resources/webhook#execute-slackcompatible-webhook-query-string-params} */ export type RESTPostAPIWebhookWithTokenSlackWaitResult = APIMessage; /** * @see {@link https://discord.com/developers/docs/resources/webhook#execute-githubcompatible-webhook-query-string-params} */ export type RESTPostAPIWebhookWithTokenGitHubQuery = Pick<RESTPostAPIWebhookWithTokenQuery, 'thread_id' | 'wait'>; /** * @see {@link https://discord.com/developers/docs/resources/webhook#execute-githubcompatible-webhook} */ export type RESTPostAPIWebhookWithTokenGitHubResult = never; /** * Received when a call to https://discord.com/developers/docs/resources/webhook#execute-webhook receives * the `wait` query parameter set to `true` * * @see {@link https://discord.com/developers/docs/resources/webhook#execute-githubcompatible-webhook-query-string-params} */ export type RESTPostAPIWebhookWithTokenGitHubWaitResult = APIMessage; /** * @see {@link https://discord.com/developers/docs/resources/webhook#get-webhook-message} */ export type RESTGetAPIWebhookWithTokenMessageResult = APIMessage; /** * @see {@link https://discord.com/developers/docs/resources/webhook#get-webhook-message-query-string-params} */ export interface RESTGetAPIWebhookWithTokenMessageQuery { thread_id?: string; } /** * @see {@link https://discord.com/developers/docs/resources/webhook#edit-webhook-message} */ export type RESTPatchAPIWebhookWithTokenMessageJSONBody = _AddUndefinedToPossiblyUndefinedPropertiesOfInterface<_Nullable<Pick<RESTPostAPIWebhookWithTokenJSONBody, 'allowed_mentions' | 'components' | 'content' | 'embeds'>>> & { /** * Attached files to keep * * Starting with API v10, the `attachments` array must contain all attachments that should be present after edit, including **retained and new** attachments provided in the request body. * * @see {@link https://discord.com/developers/docs/resources/message#attachment-object-attachment-structure} */ attachments?: RESTAPIAttachment[] | undefined; /** * A poll! * * @remarks * Polls can only be added when editing a deferred interaction response. */ poll?: RESTAPIPoll | undefined; }; /** * @see {@link https://discord.com/developers/docs/resources/webhook#edit-webhook-message} */ export type RESTPatchAPIWebhookWithTokenMessageFormDataBody = (Record<`files[${bigint}]`, unknown> & { /** * JSON stringified message body */ payload_json?: string | undefined; }) | (Record<`files[${bigint}]`, unknown> & RESTPatchAPIWebhookWithTokenMessageJSONBody); /** * @see {@link https://discord.com/developers/docs/resources/webhook#edit-webhook-message-query-string-params} */ export type RESTPatchAPIWebhookWithTokenMessageQuery = Pick<RESTPostAPIWebhookWithTokenQuery, 'thread_id' | 'with_components'>; /** * @see {@link https://discord.com/developers/docs/resources/webhook#edit-webhook-message} */ export type RESTPatchAPIWebhookWithTokenMessageResult = APIMessage; /** * @see {@link https://discord.com/developers/docs/resources/webhook#delete-webhook-message} */ export type RESTDeleteAPIWebhookWithTokenMessageResult = never; //# sourceMappingURL=webhook.d.ts.map node_modules/discord-api-types/rest/v10/interactions.js 0000664 00000000165 15114741631 0017213 0 ustar 00 "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); //# sourceMappingURL=interactions.js.map node_modules/discord-api-types/rest/v10/channel.js 0000664 00000000727 15114741631 0016125 0 ustar 00 "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.ReactionType = void 0; /** * @see {@link https://discord.com/developers/docs/resources/channel#get-reactions-reaction-types} */ var ReactionType; (function (ReactionType) { ReactionType[ReactionType["Normal"] = 0] = "Normal"; ReactionType[ReactionType["Super"] = 1] = "Super"; })(ReactionType || (exports.ReactionType = ReactionType = {})); //# sourceMappingURL=channel.js.map node_modules/discord-api-types/rest/v10/emoji.d.ts 0000664 00000005625 15114741631 0016056 0 ustar 00 import type { Snowflake } from '../../globals'; import type { APIApplicationEmoji, APIEmoji } from '../../payloads/v10'; /** * @see {@link https://discord.com/developers/docs/resources/emoji#list-guild-emojis} */ export type RESTGetAPIGuildEmojisResult = APIEmoji[]; /** * @see {@link https://discord.com/developers/docs/resources/emoji#get-guild-emoji} */ export type RESTGetAPIGuildEmojiResult = APIEmoji; /** * @see {@link https://discord.com/developers/docs/resources/emoji#create-guild-emoji-json-params} */ export interface RESTPostAPIGuildEmojiJSONBody { /** * Name of the emoji */ name: string; /** * The 128x128 emoji image * * @see {@link https://discord.com/developers/docs/reference#image-data} */ image: string; /** * Roles for which this emoji will be whitelisted */ roles?: Snowflake[] | undefined; } /** * @see {@link https://discord.com/developers/docs/resources/emoji#create-guild-emoji} */ export type RESTPostAPIGuildEmojiResult = APIEmoji; /** * @see {@link https://discord.com/developers/docs/resources/emoji#modify-guild-emoji} */ export interface RESTPatchAPIGuildEmojiJSONBody { /** * Name of the emoji */ name?: string | undefined; /** * Roles for which this emoji will be whitelisted */ roles?: Snowflake[] | null | undefined; } /** * @see {@link https://discord.com/developers/docs/resources/emoji#modify-guild-emoji} */ export type RESTPatchAPIGuildEmojiResult = APIEmoji; /** * @see {@link https://discord.com/developers/docs/resources/emoji#delete-guild-emoji} */ export type RESTDeleteAPIGuildEmojiResult = never; /** * @see {@link https://discord.com/developers/docs/resources/emoji#list-application-emojis} */ export interface RESTGetAPIApplicationEmojisResult { items: APIApplicationEmoji[]; } /** * @see {@link https://discord.com/developers/docs/resources/emoji#get-application-emoji} */ export type RESTGetAPIApplicationEmojiResult = APIApplicationEmoji; /** * @see {@link https://discord.com/developers/docs/resources/emoji#create-application-emoji-json-params} */ export type RESTPostAPIApplicationEmojiJSONBody = Pick<RESTPostAPIGuildEmojiJSONBody, 'image' | 'name'>; /** * @see {@link https://discord.com/developers/docs/resources/emoji#create-application-emoji} */ export type RESTPostAPIApplicationEmojiResult = APIApplicationEmoji; /** * @see {@link https://discord.com/developers/docs/resources/emoji#modify-application-emoji} */ export type RESTPatchAPIApplicationEmojiJSONBody = Pick<RESTPatchAPIGuildEmojiJSONBody, 'name'>; /** * @see {@link https://discord.com/developers/docs/resources/emoji#modify-application-emoji} */ export type RESTPatchAPIApplicationEmojiResult = APIApplicationEmoji; /** * @see {@link https://discord.com/developers/docs/resources/emoji#delete-application-emoji} */ export type RESTDeleteAPIApplicationEmojiResult = never; //# sourceMappingURL=emoji.d.ts.map node_modules/discord-api-types/rest/v10/guild.js.map 0000664 00000000137 15114741631 0016370 0 ustar 00 {"version":3,"file":"guild.js","sourceRoot":"","sources":["guild.ts"],"names":[],"mappings":""} node_modules/discord-api-types/rest/v10/auditLog.js 0000664 00000000161 15114741631 0016255 0 ustar 00 "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); //# sourceMappingURL=auditLog.js.map node_modules/discord-api-types/rest/v10/webhook.js 0000664 00000000160 15114741631 0016142 0 ustar 00 "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); //# sourceMappingURL=webhook.js.map node_modules/discord-api-types/rest/v10/autoModeration.js.map 0000664 00000000161 15114741631 0020253 0 ustar 00 {"version":3,"file":"autoModeration.js","sourceRoot":"","sources":["autoModeration.ts"],"names":[],"mappings":""} node_modules/discord-api-types/rest/v10/sticker.d.ts 0000664 00000005601 15114741631 0016411 0 ustar 00 import type { APISticker, APIStickerPack } from '../../payloads/v10/index'; /** * @see {@link https://discord.com/developers/docs/resources/sticker#get-sticker} */ export type RESTGetAPIStickerResult = APISticker; /** * @see {@link https://discord.com/developers/docs/resources/sticker#list-sticker-packs} */ export interface RESTGetStickerPacksResult { sticker_packs: APIStickerPack[]; } /** * @see {@link https://discord.com/developers/docs/resources/sticker#get-sticker-pack} */ export type RESTGetAPIStickerPackResult = APIStickerPack; /** * @deprecated Use {@link RESTGetAPIStickerPackResult} instead */ export type RESTGetAPIStickerPack = RESTGetAPIStickerPackResult; /** * @see {@link https://discord.com/developers/docs/resources/sticker#list-sticker-packs} * @deprecated Use {@link RESTGetStickerPacksResult} instead */ export type RESTGetNitroStickerPacksResult = RESTGetStickerPacksResult; /** * @see {@link https://discord.com/developers/docs/resources/sticker#list-guild-stickers} */ export type RESTGetAPIGuildStickersResult = APISticker[]; /** * @see {@link https://discord.com/developers/docs/resources/sticker#get-guild-sticker} */ export type RESTGetAPIGuildStickerResult = APISticker; /** * @see {@link https://discord.com/developers/docs/resources/sticker#create-guild-sticker} */ export interface RESTPostAPIGuildStickerFormDataBody { /** * Name of the sticker (2-30 characters) */ name: string; /** * Description of the sticker (empty or 2-100 characters) */ description: string; /** * The Discord name of a unicode emoji representing the sticker's expression (2-200 characters) */ tags: string; /** * The sticker file to upload, must be a PNG, APNG, GIF, or Lottie JSON file, max 512 KB * * Uploaded stickers are constrained to 5 seconds in length for animated stickers, and 320 x 320 pixels. */ file: unknown; } /** * @see {@link https://discord.com/developers/docs/resources/sticker#create-guild-sticker} */ export type RESTPostAPIGuildStickerResult = APISticker; /** * @see {@link https://discord.com/developers/docs/resources/sticker#modify-guild-sticker} */ export interface RESTPatchAPIGuildStickerJSONBody { /** * Name of the sticker (2-30 characters) */ name?: string | undefined; /** * Description of the sticker (2-100 characters) */ description?: string | null | undefined; /** * The Discord name of a unicode emoji representing the sticker's expression (2-200 characters) */ tags?: string | undefined; } /** * @see {@link https://discord.com/developers/docs/resources/sticker#modify-guild-sticker} */ export type RESTPatchAPIGuildStickerResult = APISticker; /** * @see {@link https://discord.com/developers/docs/resources/sticker#delete-guild-sticker} */ export type RESTDeleteAPIGuildStickerResult = never; //# sourceMappingURL=sticker.d.ts.map node_modules/discord-api-types/rest/v10/voice.js 0000664 00000000156 15114741631 0015616 0 ustar 00 "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); //# sourceMappingURL=voice.js.map node_modules/discord-api-types/rest/v10/guild.d.ts 0000664 00000073142 15114741631 0016056 0 ustar 00 import type { Permissions, Snowflake } from '../../globals'; import type { APIBan, APIChannel, APIDMChannel, APIExtendedInvite, APIGroupDMChannel, APIGuild, APIGuildIntegration, APIGuildMember, APIGuildMembershipScreening, APIGuildOnboarding, APIGuildPreview, APIGuildWelcomeScreen, APIGuildWidget, APIGuildWidgetSettings, APIRole, APIThreadList, APIVoiceRegion, GuildDefaultMessageNotifications, GuildExplicitContentFilter, GuildFeature, GuildMFALevel, GuildSystemChannelFlags, GuildVerificationLevel, GuildWidgetStyle, APIGuildOnboardingPrompt, APIGuildOnboardingPromptOption } from '../../payloads/v10/index'; import type { _AddUndefinedToPossiblyUndefinedPropertiesOfInterface, _DistributiveOmit, _DistributivePick, _Nullable, _StrictPartial, _StrictRequired } from '../../utils/internals'; import type { Locale } from '../common'; import type { RESTPutAPIChannelPermissionJSONBody } from './channel'; export interface RESTAPIGuildCreateOverwrite extends RESTPutAPIChannelPermissionJSONBody { id: number | string; } /** * @deprecated Use {@link RESTAPIGuildCreateOverwrite} instead */ export type APIGuildCreateOverwrite = RESTAPIGuildCreateOverwrite; export type RESTAPIGuildChannelResolvable = Exclude<APIChannel, APIDMChannel | APIGroupDMChannel>; /** * @deprecated Use {@link RESTAPIGuildChannelResolvable} instead */ export type APIGuildChannelResolvable = RESTAPIGuildChannelResolvable; export type RESTAPIGuildCreatePartialChannel = _StrictPartial<_DistributivePick<RESTAPIGuildChannelResolvable, 'available_tags' | 'bitrate' | 'default_auto_archive_duration' | 'default_forum_layout' | 'default_reaction_emoji' | 'default_sort_order' | 'default_thread_rate_limit_per_user' | 'flags' | 'nsfw' | 'position' | 'rate_limit_per_user' | 'rtc_region' | 'topic' | 'type' | 'user_limit' | 'video_quality_mode'>> & { name: string; id?: number | string | undefined; parent_id?: number | string | null | undefined; permission_overwrites?: RESTAPIGuildCreateOverwrite[] | undefined; }; /** * @deprecated Use {@link RESTAPIGuildCreatePartialChannel} instead */ export type APIGuildCreatePartialChannel = RESTAPIGuildCreatePartialChannel; export interface RESTAPIGuildCreateRole extends RESTPostAPIGuildRoleJSONBody { id: number | string; } /** * @deprecated Use {@link RESTAPIGuildCreateRole} instead */ export type APIGuildCreateRole = RESTAPIGuildCreateRole; /** * @see {@link https://discord.com/developers/docs/resources/guild#create-guild} */ export interface RESTPostAPIGuildsJSONBody { /** * Name of the guild (2-100 characters) */ name: string; /** * Voice region id * * @see {@link https://discord.com/developers/docs/resources/voice#voice-region-object} */ region?: string | undefined; /** * base64 1024x1024 png/jpeg image for the guild icon * * @see {@link https://discord.com/developers/docs/reference#image-data} */ icon?: string | undefined; /** * Verification level * * @see {@link https://discord.com/developers/docs/resources/guild#guild-object-verification-level} */ verification_level?: GuildVerificationLevel | undefined; /** * Default message notification level * * @see {@link https://discord.com/developers/docs/resources/guild#guild-object-default-message-notification-level} */ default_message_notifications?: GuildDefaultMessageNotifications | undefined; /** * Explicit content filter level * * @see {@link https://discord.com/developers/docs/resources/guild#guild-object-explicit-content-filter-level} */ explicit_content_filter?: GuildExplicitContentFilter | undefined; /** * New guild roles * * @remarks * When using this parameter, the first member of the array is used to change properties of the guild's `@everyone` role. * If you are trying to bootstrap a guild with additional roles, keep this in mind. * * Also, the required `id` field within each role object is an integer placeholder, * and will be replaced by the API upon consumption. Its purpose is to allow you to overwrite a role's permissions * in a channel when also passing in channels with the channels array. * @see {@link https://discord.com/developers/docs/topics/permissions#role-object} */ roles?: RESTAPIGuildCreateRole[] | undefined; /** * New guild's channels * * @remarks * When using the channels parameter, the `position` field is ignored, and none of the default channels are created. * * Also, the `id` field within each channel object may be set to an integer placeholder, * and will be replaced by the API upon consumption. Its purpose is to allow you to create `GUILD_CATEGORY` channels * by setting the `parent_id` field on any children to the category's id field. * Category channels must be listed before any children. * @see {@link https://discord.com/developers/docs/resources/channel#channel-object} */ channels?: RESTAPIGuildCreatePartialChannel[] | undefined; /** * ID for afk channel */ afk_channel_id?: Snowflake | number | null | undefined; /** * afk timeout in seconds, can be set to: `60`, `300`, `900`, `1800`, `3600` */ afk_timeout?: 1800 | 3600 | 60 | 300 | 900 | undefined; /** * The id of the channel where guild notices such as welcome messages and boost events are posted */ system_channel_id?: Snowflake | number | null | undefined; /** * System channel flags * * @see {@link https://discord.com/developers/docs/resources/guild#guild-object-system-channel-flags} */ system_channel_flags?: GuildSystemChannelFlags | undefined; /** * Whether the boosts progress bar should be enabled. */ premium_progress_bar_enabled?: boolean | undefined; } /** * @see {@link https://discord.com/developers/docs/resources/guild#create-guild} */ export type RESTPostAPIGuildsResult = APIGuild; /** * @see {@link https://discord.com/developers/docs/resources/guild#modify-guild-mfa-level} */ export interface RESTPostAPIGuildsMFAJSONBody { /** * MFA level * * @see {@link https://discord.com/developers/docs/resources/guild#guild-object-mfa-level} */ level: GuildMFALevel; } /** * @see {@link https://discord.com/developers/docs/resources/guild#modify-guild-mfa-level} */ export type RESTPostAPIGuildsMFAResult = RESTPostAPIGuildsMFAJSONBody; /** * @see {@link https://discord.com/developers/docs/resources/guild#get-guild} */ export interface RESTGetAPIGuildQuery { /** * When `true`, will return approximate member and presence counts for the guild * * @defaultValue `false` */ with_counts?: boolean; } /** * @see {@link https://discord.com/developers/docs/resources/guild#get-guild} */ export type RESTGetAPIGuildResult = APIGuild; /** * @see {@link https://discord.com/developers/docs/resources/guild#get-guild-preview} */ export type RESTGetAPIGuildPreviewResult = APIGuildPreview; /** * @see {@link https://discord.com/developers/docs/resources/guild#modify-guild} */ export interface RESTPatchAPIGuildJSONBody { /** * New name for the guild (2-100 characters) */ name?: string | undefined; /** * Voice region id * * @see {@link https://discord.com/developers/docs/resources/voice#voice-region-object} */ region?: string | null | undefined; /** * Verification level * * @see {@link https://discord.com/developers/docs/resources/guild#guild-object-verification-level} */ verification_level?: GuildVerificationLevel | null | undefined; /** * Default message notification level * * @see {@link https://discord.com/developers/docs/resources/guild#guild-object-default-message-notification-level} */ default_message_notifications?: GuildDefaultMessageNotifications | null | undefined; /** * Explicit content filter level * * @see {@link https://discord.com/developers/docs/resources/guild#guild-object-explicit-content-filter-level} */ explicit_content_filter?: GuildExplicitContentFilter | null | undefined; /** * ID for afk channel */ afk_channel_id?: Snowflake | null | undefined; /** * afk timeout in seconds, can be set to: `60`, `300`, `900`, `1800`, `3600` */ afk_timeout?: 1800 | 3600 | 60 | 300 | 900 | undefined; /** * base64 1024x1024 png/jpeg/gif image for the guild icon (can be animated gif when the guild has `ANIMATED_ICON` feature) * * @see {@link https://discord.com/developers/docs/reference#image-data} */ icon?: string | null | undefined; /** * User id to transfer guild ownership to (must be owner) */ owner_id?: Snowflake | undefined; /** * base64 16:9 png/jpeg image for the guild splash (when the guild has `INVITE_SPLASH` feature) * * @see {@link https://discord.com/developers/docs/reference#image-data} */ splash?: string | null | undefined; /** * base64 png/jpeg image for the guild discovery splash (when the guild has `DISCOVERABLE` feature) */ discovery_splash?: string | null | undefined; /** * base64 16:9 png/jpeg image for the guild banner (when the server has the `BANNER` feature; can be animated gif when the server has the `ANIMATED_BANNER` feature) */ banner?: string | null | undefined; /** * The id of the channel where guild notices such as welcome messages and boost events are posted */ system_channel_id?: Snowflake | null | undefined; /** * System channel flags * * @see {@link https://discord.com/developers/docs/resources/guild#guild-object-system-channel-flags} */ system_channel_flags?: GuildSystemChannelFlags | undefined; /** * The id of the channel where Community guilds display rules and/or guidelines */ rules_channel_id?: Snowflake | null | undefined; /** * The id of the channel where admins and moderators of Community guilds receive notices from Discord */ public_updates_channel_id?: Snowflake | null | undefined; /** * The preferred locale of a Community guild used in server discovery and notices from Discord * * @defaultValue `"en-US"` (if the value is set to `null`) */ preferred_locale?: Locale | null | undefined; /** * Enabled guild features * * @see {@link https://discord.com/developers/docs/resources/guild#guild-object-guild-features} */ features?: GuildFeature[] | undefined; /** * The description for the guild */ description?: string | null | undefined; /** * Whether the boosts progress bar should be enabled. */ premium_progress_bar_enabled?: boolean | undefined; /** * The id of the channel where admins and moderators of Community guilds receive safety alerts from Discord */ safety_alerts_channel_id?: Snowflake | null | undefined; } /** * @see {@link https://discord.com/developers/docs/resources/guild#modify-guild} */ export type RESTPatchAPIGuildResult = APIGuild; /** * @see {@link https://discord.com/developers/docs/resources/guild#delete-guild} */ export type RESTDeleteAPIGuildResult = never; /** * @see {@link https://discord.com/developers/docs/resources/guild#get-guild-channels} */ export type RESTGetAPIGuildChannelsResult = APIChannel[]; /** * @see {@link https://discord.com/developers/docs/resources/guild#create-guild-channel} */ export type RESTPostAPIGuildChannelJSONBody = _DistributiveOmit<RESTAPIGuildCreatePartialChannel, 'id'>; /** * @see {@link https://discord.com/developers/docs/resources/guild#create-guild-channel} */ export type RESTPostAPIGuildChannelResult = APIChannel; /** * @see {@link https://discord.com/developers/docs/resources/guild#modify-guild-channel-positions} */ export type RESTPatchAPIGuildChannelPositionsJSONBody = { /** * Channel id */ id: Snowflake; /** * Sorting position of the channel */ position: number; /** * Sync channel overwrites with the new parent, when moving to a new `parent_id` */ lock_permissions?: boolean | undefined; /** * The new parent id of this channel */ parent_id?: Snowflake | null | undefined; }[]; /** * @see {@link https://discord.com/developers/docs/resources/guild#modify-guild-channel-positions} */ export type RESTPatchAPIGuildChannelPositionsResult = never; /** * @see {@link https://discord.com/developers/docs/resources/guild#list-active-guild-threads} */ export type RESTGetAPIGuildThreadsResult = APIThreadList; /** * @see {@link https://discord.com/developers/docs/resources/guild#get-guild-member} */ export type RESTGetAPIGuildMemberResult = APIGuildMember; /** * @see {@link https://discord.com/developers/docs/resources/guild#list-guild-members} */ export interface RESTGetAPIGuildMembersQuery { /** * Max number of members to return (1-1000) * * @defaultValue `1` */ limit?: number; /** * The highest user id in the previous page * * @defaultValue `0` */ after?: Snowflake; } /** * @see {@link https://discord.com/developers/docs/resources/guild#list-guild-members} */ export type RESTGetAPIGuildMembersResult = APIGuildMember[]; /** * @see {@link https://discord.com/developers/docs/resources/guild#search-guild-members} */ export interface RESTGetAPIGuildMembersSearchQuery { /** * Query string to match username(s) and nickname(s) against */ query: string; /** * Max number of members to return (1-1000) * * @defaultValue `1` */ limit?: number; } export type RESTGetAPIGuildMembersSearchResult = APIGuildMember[]; /** * @see {@link https://discord.com/developers/docs/resources/guild#add-guild-member} */ export interface RESTPutAPIGuildMemberJSONBody { /** * An oauth2 access token granted with the `guilds.join` to the bot's application for the user you want to add to the guild */ access_token: string; /** * Value to set users nickname to * * Requires `MANAGE_NICKNAMES` permission */ nick?: string | undefined; /** * Array of role ids the member is assigned * * Requires `MANAGE_ROLES` permission */ roles?: Snowflake[] | undefined; /** * Whether the user is muted in voice channels * * Requires `MUTE_MEMBERS` permission */ mute?: boolean | undefined; /** * Whether the user is deafened in voice channels * * Requires `DEAFEN_MEMBERS` permission */ deaf?: boolean | undefined; } export type RESTPutAPIGuildMemberResult = APIGuildMember | undefined; /** * @see {@link https://discord.com/developers/docs/resources/guild#modify-guild-member} */ export interface RESTPatchAPIGuildMemberJSONBody { /** * Value to set users nickname to * * Requires `MANAGE_NICKNAMES` permission */ nick?: string | null | undefined; /** * Array of role ids the member is assigned * * Requires `MANAGE_ROLES` permission */ roles?: Snowflake[] | null | undefined; /** * Whether the user is muted in voice channels. Will throw a 400 if the user is not in a voice channel * * Requires `MUTE_MEMBERS` permission */ mute?: boolean | null | undefined; /** * Whether the user is deafened in voice channels. Will throw a 400 if the user is not in a voice channel * * Requires `DEAFEN_MEMBERS` permission */ deaf?: boolean | null | undefined; /** * ID of channel to move user to (if they are connected to voice) * * Requires `MOVE_MEMBERS` permission */ channel_id?: Snowflake | null | undefined; /** * Timestamp of when the time out will be removed; until then, they cannot interact with the guild */ communication_disabled_until?: string | null | undefined; } /** * @see {@link https://discord.com/developers/docs/resources/guild#add-guild-member} */ export type RESTPatchAPIGuildMemberResult = APIGuildMember; /** * @see {@link https://discord.com/developers/docs/resources/guild#modify-current-user-nick} * @deprecated Use {@link https://discord.com/developers/docs/resources/guild#modify-current-member | Modify Current Member} instead. */ export interface RESTPatchAPICurrentGuildMemberNicknameJSONBody { /** * Value to set users nickname to * * Requires `CHANGE_NICKNAME` permission */ nick?: string | null | undefined; } /** * @see {@link https://discord.com/developers/docs/resources/guild#modify-current-member} */ export interface RESTPatchAPICurrentGuildMemberJSONBody { /** * Value to set users nickname to * * Requires `CHANGE_NICKNAME` permission */ nick?: string | null | undefined; } /** * @see {@link https://discord.com/developers/docs/resources/guild#modify-current-user-nick} * @deprecated Use {@link https://discord.com/developers/docs/resources/guild#modify-current-member | Modify Current Member} instead. */ export type RESTPatchAPICurrentGuildMemberNicknameResult = _StrictRequired<RESTPatchAPICurrentGuildMemberNicknameJSONBody>; /** * @see {@link https://discord.com/developers/docs/resources/guild#add-guild-member-role} */ export type RESTPutAPIGuildMemberRoleResult = never; /** * @see {@link https://discord.com/developers/docs/resources/guild#remove-guild-member-role} */ export type RESTDeleteAPIGuildMemberRoleResult = never; /** * @see {@link https://discord.com/developers/docs/resources/guild#remove-guild-member} */ export type RESTDeleteAPIGuildMemberResult = never; /** * @see {@link https://discord.com/developers/docs/resources/guild#get-guild-bans} */ export type RESTGetAPIGuildBansResult = APIBan[]; /** * @see {@link https://discord.com/developers/docs/resources/guild#get-guild-bans} */ export interface RESTGetAPIGuildBansQuery { /** * Consider only users before given user id */ before?: Snowflake; /** * Consider only users after given user id */ after?: Snowflake; /** * Number of users to return (1-1000) * * @defaultValue `1000` */ limit?: number; } /** * @see {@link https://discord.com/developers/docs/resources/guild#get-guild-ban} */ export type RESTGetAPIGuildBanResult = APIBan; /** * @see {@link https://discord.com/developers/docs/resources/guild#create-guild-ban} */ export interface RESTPutAPIGuildBanJSONBody { /** * Number of days to delete messages for (0-7) * * @deprecated Use {@link RESTPutAPIGuildBanJSONBody.delete_message_seconds} instead */ delete_message_days?: number | undefined; /** * Number of seconds to delete messages for, between 0 and 604800 (7 days) */ delete_message_seconds?: number | undefined; } /** * @see {@link https://discord.com/developers/docs/resources/guild#create-guild-ban} */ export type RESTPutAPIGuildBanResult = never; /** * @see {@link https://discord.com/developers/docs/resources/guild#remove-guild-ban} */ export type RESTDeleteAPIGuildBanResult = never; /** * @see {@link https://discord.com/developers/docs/resources/guild#bulk-guild-ban} */ export interface RESTPostAPIGuildBulkBanJSONBody { /** * List of user ids to ban (max 200) */ user_ids: Snowflake[]; /** * Number of seconds to delete messages for, between 0 and 604800 (7 days) */ delete_message_seconds?: number | undefined; } /** * @see {@link https://discord.com/developers/docs/resources/guild#bulk-guild-ban} */ export interface RESTPostAPIGuildBulkBanResult { /** * List of user ids, that were successfully banned */ banned_users: Snowflake[]; /** * List of user ids, that were not banned */ failed_users: Snowflake[]; } /** * @see {@link https://discord.com/developers/docs/resources/guild#get-guild-roles} */ export type RESTGetAPIGuildRolesResult = APIRole[]; /** * @see {@link https://discord.com/developers/docs/resources/guild#create-guild-role} */ export interface RESTPostAPIGuildRoleJSONBody { /** * Name of the role * * @defaultValue `"new role"` */ name?: string | null | undefined; /** * Bitwise value of the enabled/disabled permissions * * @defaultValue * Default role permissions in guild */ permissions?: Permissions | null | undefined; /** * RGB color value * * @defaultValue `0` */ color?: number | null | undefined; /** * Whether the role should be displayed separately in the sidebar * * @defaultValue `false` */ hoist?: boolean | null | undefined; /** * The role's icon image (if the guild has the `ROLE_ICONS` feature) */ icon?: string | null | undefined; /** * The role's unicode emoji as a standard emoji (if the guild has the `ROLE_ICONS` feature) */ unicode_emoji?: string | null | undefined; /** * Whether the role should be mentionable * * @defaultValue `false` */ mentionable?: boolean | null | undefined; } /** * @see {@link https://discord.com/developers/docs/resources/guild#create-guild-role} */ export type RESTPostAPIGuildRoleResult = APIRole; /** * @see {@link https://discord.com/developers/docs/resources/guild#modify-guild-role-positions} */ export type RESTPatchAPIGuildRolePositionsJSONBody = { /** * Role id */ id: Snowflake; /** * Sorting position of the role */ position?: number | undefined; }[]; /** * @see {@link https://discord.com/developers/docs/resources/guild#modify-guild-role-positions} */ export type RESTPatchAPIGuildRolePositionsResult = APIRole[]; /** * @see {@link https://discord.com/developers/docs/resources/guild#modify-guild-role} */ export interface RESTPatchAPIGuildRoleJSONBody { /** * Name of the role */ name?: string | null | undefined; /** * Bitwise value of the enabled/disabled permissions */ permissions?: Permissions | null | undefined; /** * RGB color value */ color?: number | null | undefined; /** * Whether the role should be displayed separately in the sidebar */ hoist?: boolean | null | undefined; /** * The role's icon image (if the guild has the `ROLE_ICONS` feature) */ icon?: string | null | undefined; /** * The role's unicode emoji as a standard emoji (if the guild has the `ROLE_ICONS` feature) */ unicode_emoji?: string | null | undefined; /** * Whether the role should be mentionable */ mentionable?: boolean | null | undefined; } /** * @see {@link https://discord.com/developers/docs/resources/guild#get-guild-role} */ export type RESTGetAPIGuildRoleResult = APIRole; /** * @see {@link https://discord.com/developers/docs/resources/guild#modify-guild-role} */ export type RESTPatchAPIGuildRoleResult = APIRole; /** * @see {@link https://discord.com/developers/docs/resources/guild#delete-guild-role} */ export type RESTDeleteAPIGuildRoleResult = never; /** * @see {@link https://discord.com/developers/docs/resources/guild#get-guild-prune-count} */ export interface RESTGetAPIGuildPruneCountQuery { /** * Number of days to count prune for (1 or more) * * @defaultValue `7` */ days?: number; /** * Role(s) to include * * While this is typed as a string, it represents an array of * role IDs delimited by commas * * @see {@link https://discord.com/developers/docs/resources/guild#get-guild-prune-count-query-string-params} */ include_roles?: string; } /** * @see {@link https://discord.com/developers/docs/resources/guild#get-guild-prune-count} */ export interface RESTGetAPIGuildPruneCountResult { pruned: number; } /** * @see {@link https://discord.com/developers/docs/resources/guild#begin-guild-prune} */ export interface RESTPostAPIGuildPruneJSONBody { /** * Number of days to count prune for (1 or more) * * @defaultValue `7` */ days?: number | undefined; /** * Whether `pruned` is returned, discouraged for large guilds * * @defaultValue `true` */ compute_prune_count?: boolean | undefined; /** * Role(s) to include */ include_roles?: Snowflake[] | undefined; } /** * @see {@link https://discord.com/developers/docs/resources/guild#begin-guild-prune} */ export interface RESTPostAPIGuildPruneResult { pruned: number | null; } /** * @see {@link https://discord.com/developers/docs/resources/guild#get-guild-voice-regions} */ export type RESTGetAPIGuildVoiceRegionsResult = APIVoiceRegion[]; /** * @see {@link https://discord.com/developers/docs/resources/guild#get-guild-invites} */ export type RESTGetAPIGuildInvitesResult = APIExtendedInvite[]; /** * @see {@link https://discord.com/developers/docs/resources/guild#get-guild-integrations} */ export type RESTGetAPIGuildIntegrationsResult = APIGuildIntegration[]; /** * @see {@link https://discord.com/developers/docs/resources/guild#delete-guild-integration} */ export type RESTDeleteAPIGuildIntegrationResult = never; /** * @see {@link https://discord.com/developers/docs/resources/guild#get-guild-widget-settings} */ export type RESTGetAPIGuildWidgetSettingsResult = APIGuildWidgetSettings; /** * @see {@link https://discord.com/developers/docs/resources/guild#modify-guild-widget} */ export type RESTPatchAPIGuildWidgetSettingsJSONBody = _StrictPartial<APIGuildWidgetSettings>; /** * @see {@link https://discord.com/developers/docs/resources/guild#modify-guild-widget} */ export type RESTPatchAPIGuildWidgetSettingsResult = APIGuildWidgetSettings; /** * @see {@link https://discord.com/developers/docs/resources/guild#get-guild-widget} */ export type RESTGetAPIGuildWidgetJSONResult = APIGuildWidget; /** * @see {@link https://discord.com/developers/docs/resources/guild#get-guild-vanity-url} */ export interface RESTGetAPIGuildVanityUrlResult { code: string | null; uses: number; } /** * @see {@link https://discord.com/developers/docs/resources/guild#get-guild-widget-image} */ export interface RESTGetAPIGuildWidgetImageQuery { /** * Style of the widget image returned * * @defaultValue `"shield"` */ style?: GuildWidgetStyle; } /** * Note: while the return type is `ArrayBuffer`, the expected result is * a buffer of sorts (depends if in browser or on node.js/deno). */ export type RESTGetAPIGuildWidgetImageResult = ArrayBuffer; export type RESTGetAPIGuildMemberVerificationResult = APIGuildMembershipScreening; export interface RESTPatchAPIGuildMemberVerificationJSONBody { /** * Whether Membership Screening is enabled */ enabled?: boolean | undefined; /** * Array of field objects serialized in a string */ form_fields?: string | undefined; /** * The server description to show in the screening form */ description?: string | null | undefined; } export type RESTPatchAPIGuildMemberVerificationResult = APIGuildMembershipScreening; /** * @see {@link https://discord.com/developers/docs/resources/guild#get-guild-welcome-screen} */ export type RESTGetAPIGuildWelcomeScreenResult = APIGuildWelcomeScreen; /** * @see {@link https://discord.com/developers/docs/resources/guild#modify-guild-welcome-screen} */ export type RESTPatchAPIGuildWelcomeScreenJSONBody = _Nullable<_StrictPartial<APIGuildWelcomeScreen>> & { /** * Whether the welcome screen is enabled */ enabled?: boolean | null | undefined; }; /** * @see {@link https://discord.com/developers/docs/resources/guild#modify-guild-welcome-screen} */ export type RESTPatchAPIGuildWelcomeScreenResult = APIGuildWelcomeScreen; /** * @see {@link https://discord.com/developers/docs/resources/guild#get-guild-onboarding} */ export type RESTGetAPIGuildOnboardingResult = APIGuildOnboarding; /** * @see {@link https://discord.com/developers/docs/resources/guild#modify-guild-onboarding} */ export type RESTPutAPIGuildOnboardingJSONBody = _AddUndefinedToPossiblyUndefinedPropertiesOfInterface<Partial<Pick<APIGuildOnboarding, 'default_channel_ids' | 'enabled' | 'mode'>>> & { /** * Prompts shown during onboarding and in customize community */ prompts?: RESTAPIGuildOnboardingPrompt[] | undefined; }; export interface RESTAPIGuildOnboardingPrompt extends _AddUndefinedToPossiblyUndefinedPropertiesOfInterface<Partial<Omit<APIGuildOnboardingPrompt, 'guild_id' | 'id' | 'options' | 'title'>>>, Pick<APIGuildOnboardingPrompt, 'id' | 'title'> { /** * Options available within the prompt */ options: RESTAPIGuildOnboardingPromptOption[]; } /** * @deprecated Use {@link RESTAPIGuildOnboardingPrompt} instead. */ export type RESTAPIModifyGuildOnboardingPromptData = RESTAPIGuildOnboardingPrompt; export interface RESTAPIGuildOnboardingPromptOption extends _AddUndefinedToPossiblyUndefinedPropertiesOfInterface<Partial<Omit<APIGuildOnboardingPromptOption, 'emoji' | 'guild_id' | 'title'>>>, Pick<APIGuildOnboardingPromptOption, 'title'> { /** * Emoji id */ emoji_id?: Snowflake | null | undefined; /** * Emoji name */ emoji_name?: string | null | undefined; /** * Whether this emoji is animated */ emoji_animated?: boolean | null | undefined; } /** * @deprecated Use {@link RESTAPIGuildOnboardingPromptOption} instead. */ export type RESTAPIModifyGuildOnboardingPromptOptionData = RESTAPIGuildOnboardingPromptOption; /** * @see {@link https://discord.com/developers/docs/resources/guild#modify-guild-onboarding} */ export type RESTPutAPIGuildOnboardingResult = APIGuildOnboarding; /** * @see {@link https://discord.com/developers/docs/resources/guild#modify-incidents-actions} */ export interface RESTPutAPIGuildIncidentActionsJSONBody { /** * When invites will be enabled again */ invites_disabled_until?: string | undefined; /** * When direct messages will be enabled again */ dms_disabled_until?: string | undefined; } //# sourceMappingURL=guild.d.ts.map node_modules/discord-api-types/rest/v10/index.d.ts 0000664 00000114011 15114741631 0016050 0 ustar 00 import type { Snowflake } from '../../globals'; export * from '../common'; export type * from './application'; export type * from './auditLog'; export type * from './autoModeration'; export * from './channel'; export type * from './emoji'; export type * from './gateway'; export type * from './guild'; export type * from './guildScheduledEvent'; export type * from './interactions'; export type * from './invite'; export * from './monetization'; export type * from './oauth2'; export type * from './poll'; export type * from './soundboard'; export type * from './stageInstance'; export type * from './sticker'; export type * from './template'; export type * from './user'; export type * from './voice'; export type * from './webhook'; export declare const APIVersion = "10"; export declare const Routes: { /** * Route for: * - GET `/applications/{application.id}/role-connections/metadata` * - PUT `/applications/{application.id}/role-connections/metadata` */ applicationRoleConnectionMetadata(applicationId: Snowflake): `/applications/${string}/role-connections/metadata`; /** * Route for: * - GET `/guilds/{guild.id}/auto-moderation/rules` * - POST `/guilds/{guild.id}/auto-moderation/rules` */ guildAutoModerationRules(guildId: Snowflake): `/guilds/${string}/auto-moderation/rules`; /** * Routes for: * - GET `/guilds/{guild.id}/auto-moderation/rules/{rule.id}` * - PATCH `/guilds/{guild.id}/auto-moderation/rules/{rule.id}` * - DELETE `/guilds/{guild.id}/auto-moderation/rules/{rule.id}` */ guildAutoModerationRule(guildId: Snowflake, ruleId: Snowflake): `/guilds/${string}/auto-moderation/rules/${string}`; /** * Route for: * - GET `/guilds/{guild.id}/audit-logs` */ guildAuditLog(guildId: Snowflake): `/guilds/${string}/audit-logs`; /** * Route for: * - GET `/channels/{channel.id}` * - PATCH `/channels/{channel.id}` * - DELETE `/channels/{channel.id}` */ channel(channelId: Snowflake): `/channels/${string}`; /** * Route for: * - GET `/channels/{channel.id}/messages` * - POST `/channels/{channel.id}/messages` */ channelMessages(channelId: Snowflake): `/channels/${string}/messages`; /** * Route for: * - GET `/channels/{channel.id}/messages/{message.id}` * - PATCH `/channels/{channel.id}/messages/{message.id}` * - DELETE `/channels/{channel.id}/messages/{message.id}` */ channelMessage(channelId: Snowflake, messageId: Snowflake): `/channels/${string}/messages/${string}`; /** * Route for: * - POST `/channels/{channel.id}/messages/{message.id}/crosspost` */ channelMessageCrosspost(channelId: Snowflake, messageId: Snowflake): `/channels/${string}/messages/${string}/crosspost`; /** * Route for: * - PUT `/channels/{channel.id}/messages/{message.id}/reactions/{emoji}/@me` * - DELETE `/channels/{channel.id}/messages/{message.id}/reactions/{emoji}/@me` * * **Note**: You need to URL encode the emoji yourself */ channelMessageOwnReaction(channelId: Snowflake, messageId: Snowflake, emoji: string): `/channels/${string}/messages/${string}/reactions/${string}/@me`; /** * Route for: * - DELETE `/channels/{channel.id}/messages/{message.id}/reactions/{emoji}/{user.id}` * * **Note**: You need to URL encode the emoji yourself */ channelMessageUserReaction(channelId: Snowflake, messageId: Snowflake, emoji: string, userId: Snowflake): `/channels/${string}/messages/${string}/reactions/${string}/${string}`; /** * Route for: * - GET `/channels/{channel.id}/messages/{message.id}/reactions/{emoji}` * - DELETE `/channels/{channel.id}/messages/{message.id}/reactions/{emoji}` * * **Note**: You need to URL encode the emoji yourself */ channelMessageReaction(channelId: Snowflake, messageId: Snowflake, emoji: string): `/channels/${string}/messages/${string}/reactions/${string}`; /** * Route for: * - DELETE `/channels/{channel.id}/messages/{message.id}/reactions` */ channelMessageAllReactions(channelId: Snowflake, messageId: Snowflake): `/channels/${string}/messages/${string}/reactions`; /** * Route for: * - POST `/channels/{channel.id}/messages/bulk-delete` */ channelBulkDelete(channelId: Snowflake): `/channels/${string}/messages/bulk-delete`; /** * Route for: * - PUT `/channels/{channel.id}/permissions/{overwrite.id}` * - DELETE `/channels/{channel.id}/permissions/{overwrite.id}` */ channelPermission(channelId: Snowflake, overwriteId: Snowflake): `/channels/${string}/permissions/${string}`; /** * Route for: * - GET `/channels/{channel.id}/invites` * - POST `/channels/{channel.id}/invites` */ channelInvites(channelId: Snowflake): `/channels/${string}/invites`; /** * Route for: * - POST `/channels/{channel.id}/followers` */ channelFollowers(channelId: Snowflake): `/channels/${string}/followers`; /** * Route for: * - POST `/channels/{channel.id}/typing` */ channelTyping(channelId: Snowflake): `/channels/${string}/typing`; /** * Route for: * - GET `/channels/{channel.id}/pins` */ channelPins(channelId: Snowflake): `/channels/${string}/pins`; /** * Route for: * - PUT `/channels/{channel.id}/pins/{message.id}` * - DELETE `/channels/{channel.id}/pins/{message.id}` */ channelPin(channelId: Snowflake, messageId: Snowflake): `/channels/${string}/pins/${string}`; /** * Route for: * - PUT `/channels/{channel.id}/recipients/{user.id}` * - DELETE `/channels/{channel.id}/recipients/{user.id}` */ channelRecipient(channelId: Snowflake, userId: Snowflake): `/channels/${string}/recipients/${string}`; /** * Route for: * - GET `/guilds/{guild.id}/emojis` * - POST `/guilds/{guild.id}/emojis` */ guildEmojis(guildId: Snowflake): `/guilds/${string}/emojis`; /** * Route for: * - GET `/guilds/{guild.id}/emojis/{emoji.id}` * - PATCH `/guilds/{guild.id}/emojis/{emoji.id}` * - DELETE `/guilds/{guild.id}/emojis/{emoji.id}` */ guildEmoji(guildId: Snowflake, emojiId: Snowflake): `/guilds/${string}/emojis/${string}`; /** * Route for: * - POST `/guilds` */ guilds(): "/guilds"; /** * Route for: * - GET `/guilds/{guild.id}` * - PATCH `/guilds/{guild.id}` * - DELETE `/guilds/{guild.id}` */ guild(guildId: Snowflake): `/guilds/${string}`; /** * Route for: * - GET `/guilds/{guild.id}/preview` */ guildPreview(guildId: Snowflake): `/guilds/${string}/preview`; /** * Route for: * - GET `/guilds/{guild.id}/channels` * - POST `/guilds/{guild.id}/channels` * - PATCH `/guilds/{guild.id}/channels` */ guildChannels(guildId: Snowflake): `/guilds/${string}/channels`; /** * Route for: * - GET `/guilds/{guild.id}/members/{user.id}` * - PUT `/guilds/{guild.id}/members/{user.id}` * - PATCH `/guilds/{guild.id}/members/@me` * - PATCH `/guilds/{guild.id}/members/{user.id}` * - DELETE `/guilds/{guild.id}/members/{user.id}` */ guildMember(guildId: Snowflake, userId?: Snowflake | "@me"): `/guilds/${string}/members/${string}`; /** * Route for: * - GET `/guilds/{guild.id}/members` */ guildMembers(guildId: Snowflake): `/guilds/${string}/members`; /** * Route for: * - GET `/guilds/{guild.id}/members/search` */ guildMembersSearch(guildId: Snowflake): `/guilds/${string}/members/search`; /** * Route for: * - PATCH `/guilds/{guild.id}/members/@me/nick` * * @deprecated Use {@link Routes.guildMember} instead. */ guildCurrentMemberNickname(guildId: Snowflake): `/guilds/${string}/members/@me/nick`; /** * Route for: * - PUT `/guilds/{guild.id}/members/{user.id}/roles/{role.id}` * - DELETE `/guilds/{guild.id}/members/{user.id}/roles/{role.id}` */ guildMemberRole(guildId: Snowflake, memberId: Snowflake, roleId: Snowflake): `/guilds/${string}/members/${string}/roles/${string}`; /** * Route for: * - POST `/guilds/{guild.id}/mfa` */ guildMFA(guildId: Snowflake): `/guilds/${string}/mfa`; /** * Route for: * - GET `/guilds/{guild.id}/bans` */ guildBans(guildId: Snowflake): `/guilds/${string}/bans`; /** * Route for: * - GET `/guilds/{guild.id}/bans/{user.id}` * - PUT `/guilds/{guild.id}/bans/{user.id}` * - DELETE `/guilds/{guild.id}/bans/{user.id}` */ guildBan(guildId: Snowflake, userId: Snowflake): `/guilds/${string}/bans/${string}`; /** * Route for: * - GET `/guilds/{guild.id}/roles` * - POST `/guilds/{guild.id}/roles` * - PATCH `/guilds/{guild.id}/roles` */ guildRoles(guildId: Snowflake): `/guilds/${string}/roles`; /** * Route for: * - GET `/guilds/{guild.id}/roles/{role.id}` * - PATCH `/guilds/{guild.id}/roles/{role.id}` * - DELETE `/guilds/{guild.id}/roles/{role.id}` */ guildRole(guildId: Snowflake, roleId: Snowflake): `/guilds/${string}/roles/${string}`; /** * Route for: * - GET `/guilds/{guild.id}/prune` * - POST `/guilds/{guild.id}/prune` */ guildPrune(guildId: Snowflake): `/guilds/${string}/prune`; /** * Route for: * - GET `/guilds/{guild.id}/regions` */ guildVoiceRegions(guildId: Snowflake): `/guilds/${string}/regions`; /** * Route for: * - GET `/guilds/{guild.id}/invites` */ guildInvites(guildId: Snowflake): `/guilds/${string}/invites`; /** * Route for: * - GET `/guilds/{guild.id}/integrations` */ guildIntegrations(guildId: Snowflake): `/guilds/${string}/integrations`; /** * Route for: * - DELETE `/guilds/{guild.id}/integrations/{integration.id}` */ guildIntegration(guildId: Snowflake, integrationId: Snowflake): `/guilds/${string}/integrations/${string}`; /** * Route for: * - GET `/guilds/{guild.id}/widget` * - PATCH `/guilds/{guild.id}/widget` */ guildWidgetSettings(guildId: Snowflake): `/guilds/${string}/widget`; /** * Route for: * - GET `/guilds/{guild.id}/widget.json` */ guildWidgetJSON(guildId: Snowflake): `/guilds/${string}/widget.json`; /** * Route for: * - GET `/guilds/{guild.id}/vanity-url` */ guildVanityUrl(guildId: Snowflake): `/guilds/${string}/vanity-url`; /** * Route for: * - GET `/guilds/{guild.id}/widget.png` */ guildWidgetImage(guildId: Snowflake): `/guilds/${string}/widget.png`; /** * Route for: * - GET `/invites/{invite.code}` * - DELETE `/invites/{invite.code}` */ invite(code: string): `/invites/${string}`; /** * Route for: * - GET `/guilds/templates/{template.code}` * - POST `/guilds/templates/{template.code}` */ template(code: string): `/guilds/templates/${string}`; /** * Route for: * - GET `/guilds/{guild.id}/templates` * - POST `/guilds/{guild.id}/templates` */ guildTemplates(guildId: Snowflake): `/guilds/${string}/templates`; /** * Route for: * - PUT `/guilds/{guild.id}/templates/{template.code}` * - PATCH `/guilds/{guild.id}/templates/{template.code}` * - DELETE `/guilds/{guild.id}/templates/{template.code}` */ guildTemplate(guildId: Snowflake, code: string): `/guilds/${string}/templates/${string}`; /** * Route for: * - GET `/channels/{channel.id}/polls/{message.id}/answers/{answer_id}` */ pollAnswerVoters(channelId: Snowflake, messageId: Snowflake, answerId: number): `/channels/${string}/polls/${string}/answers/${number}`; /** * Route for: * - POST `/channels/{channel.id}/polls/{message.id}/expire` */ expirePoll(channelId: Snowflake, messageId: Snowflake): `/channels/${string}/polls/${string}/expire`; /** * Route for: * - POST `/channels/{channel.id}/threads` * - POST `/channels/{channel.id}/messages/{message.id}/threads` */ threads(parentId: Snowflake, messageId?: Snowflake): `/channels/${Snowflake}/messages/${Snowflake}/threads` | `/channels/${Snowflake}/threads`; /** * Route for: * - GET `/guilds/{guild.id}/threads/active` */ guildActiveThreads(guildId: Snowflake): `/guilds/${string}/threads/active`; /** * Route for: * - GET `/channels/{channel.id}/threads/archived/public` * - GET `/channels/{channel.id}/threads/archived/private` */ channelThreads(channelId: Snowflake, archivedStatus: "private" | "public"): `/channels/${string}/threads/archived/private` | `/channels/${string}/threads/archived/public`; /** * Route for: * - GET `/channels/{channel.id}/users/@me/threads/archived/private` */ channelJoinedArchivedThreads(channelId: Snowflake): `/channels/${string}/users/@me/threads/archived/private`; /** * Route for: * - GET `/channels/{thread.id}/thread-members` * - GET `/channels/{thread.id}/thread-members/{user.id}` * - PUT `/channels/{thread.id}/thread-members/@me` * - PUT `/channels/{thread.id}/thread-members/{user.id}` * - DELETE `/channels/{thread.id}/thread-members/@me` * - DELETE `/channels/{thread.id}/thread-members/{user.id}` */ threadMembers(threadId: Snowflake, userId?: Snowflake | "@me"): `/channels/${Snowflake}/thread-members/${Snowflake | "@me"}` | `/channels/${Snowflake}/thread-members`; /** * Route for: * - GET `/users/@me` * - GET `/users/{user.id}` * - PATCH `/users/@me` * * @param userId - The user ID, defaulted to `@me` */ user(userId?: Snowflake | "@me"): `/users/${string}`; /** * Route for: * - GET `/users/@me/applications/{application.id}/role-connection` * - PUT `/users/@me/applications/{application.id}/role-connection` */ userApplicationRoleConnection(applicationId: Snowflake): `/users/@me/applications/${string}/role-connection`; /** * Route for: * - GET `/users/@me/guilds` */ userGuilds(): "/users/@me/guilds"; /** * Route for: * - GET `/users/@me/guilds/{guild.id}/member` */ userGuildMember(guildId: Snowflake): `/users/@me/guilds/${string}/member`; /** * Route for: * - DELETE `/users/@me/guilds/{guild.id}` */ userGuild(guildId: Snowflake): `/users/@me/guilds/${string}`; /** * Route for: * - POST `/users/@me/channels` */ userChannels(): "/users/@me/channels"; /** * Route for: * - GET `/users/@me/connections` */ userConnections(): "/users/@me/connections"; /** * Route for: * - GET `/voice/regions` */ voiceRegions(): "/voice/regions"; /** * Route for: * - GET `/channels/{channel.id}/webhooks` * - POST `/channels/{channel.id}/webhooks` */ channelWebhooks(channelId: Snowflake): `/channels/${string}/webhooks`; /** * Route for: * - GET `/guilds/{guild.id}/webhooks` */ guildWebhooks(guildId: Snowflake): `/guilds/${string}/webhooks`; /** * Route for: * - GET `/webhooks/{webhook.id}` * - GET `/webhooks/{webhook.id}/{webhook.token}` * - PATCH `/webhooks/{webhook.id}` * - PATCH `/webhooks/{webhook.id}/{webhook.token}` * - DELETE `/webhooks/{webhook.id}` * - DELETE `/webhooks/{webhook.id}/{webhook.token}` * - POST `/webhooks/{webhook.id}/{webhook.token}` * * - POST `/webhooks/{application.id}/{interaction.token}` */ webhook(webhookId: Snowflake, webhookToken?: string): `/webhooks/${Snowflake}/${string}` | `/webhooks/${Snowflake}`; /** * Route for: * - GET `/webhooks/{webhook.id}/{webhook.token}/messages/@original` * - GET `/webhooks/{webhook.id}/{webhook.token}/messages/{message.id}` * - PATCH `/webhooks/{webhook.id}/{webhook.token}/messages/@original` * - PATCH `/webhooks/{webhook.id}/{webhook.token}/messages/{message.id}` * - DELETE `/webhooks/{webhook.id}/{webhook.token}/messages/@original` * - DELETE `/webhooks/{webhook.id}/{webhook.token}/messages/{message.id}` * * - PATCH `/webhooks/{application.id}/{interaction.token}/messages/@original` * - PATCH `/webhooks/{application.id}/{interaction.token}/messages/{message.id}` * - DELETE `/webhooks/{application.id}/{interaction.token}/messages/{message.id}` */ webhookMessage(webhookId: Snowflake, webhookToken: string, messageId?: Snowflake | "@original"): `/webhooks/${string}/${string}/messages/${string}`; /** * Route for: * - POST `/webhooks/{webhook.id}/{webhook.token}/github` * - POST `/webhooks/{webhook.id}/{webhook.token}/slack` */ webhookPlatform(webhookId: Snowflake, webhookToken: string, platform: "github" | "slack"): `/webhooks/${string}/${string}/github` | `/webhooks/${string}/${string}/slack`; /** * Route for: * - GET `/gateway` */ gateway(): "/gateway"; /** * Route for: * - GET `/gateway/bot` */ gatewayBot(): "/gateway/bot"; /** * Route for: * - GET `/oauth2/applications/@me` */ oauth2CurrentApplication(): "/oauth2/applications/@me"; /** * Route for: * - GET `/oauth2/@me` */ oauth2CurrentAuthorization(): "/oauth2/@me"; /** * Route for: * - GET `/oauth2/authorize` */ oauth2Authorization(): "/oauth2/authorize"; /** * Route for: * - POST `/oauth2/token` */ oauth2TokenExchange(): "/oauth2/token"; /** * Route for: * - POST `/oauth2/token/revoke` */ oauth2TokenRevocation(): "/oauth2/token/revoke"; /** * Route for: * - GET `/applications/{application.id}/commands` * - PUT `/applications/{application.id}/commands` * - POST `/applications/{application.id}/commands` */ applicationCommands(applicationId: Snowflake): `/applications/${string}/commands`; /** * Route for: * - GET `/applications/{application.id}/commands/{command.id}` * - PATCH `/applications/{application.id}/commands/{command.id}` * - DELETE `/applications/{application.id}/commands/{command.id}` */ applicationCommand(applicationId: Snowflake, commandId: Snowflake): `/applications/${string}/commands/${string}`; /** * Route for: * - GET `/applications/{application.id}/guilds/{guild.id}/commands` * - PUT `/applications/{application.id}/guilds/{guild.id}/commands` * - POST `/applications/{application.id}/guilds/{guild.id}/commands` */ applicationGuildCommands(applicationId: Snowflake, guildId: Snowflake): `/applications/${string}/guilds/${string}/commands`; /** * Route for: * - GET `/applications/{application.id}/guilds/{guild.id}/commands/{command.id}` * - PATCH `/applications/{application.id}/guilds/{guild.id}/commands/{command.id}` * - DELETE `/applications/{application.id}/guilds/{guild.id}/commands/{command.id}` */ applicationGuildCommand(applicationId: Snowflake, guildId: Snowflake, commandId: Snowflake): `/applications/${string}/guilds/${string}/commands/${string}`; /** * Route for: * - POST `/interactions/{interaction.id}/{interaction.token}/callback` */ interactionCallback(interactionId: Snowflake, interactionToken: string): `/interactions/${string}/${string}/callback`; /** * Route for: * - GET `/guilds/{guild.id}/member-verification` * - PATCH `/guilds/{guild.id}/member-verification` */ guildMemberVerification(guildId: Snowflake): `/guilds/${string}/member-verification`; /** * Route for: * - GET `/guilds/{guild.id}/voice-states/@me` * - GET `/guilds/{guild.id}/voice-states/{user.id}` * - PATCH `/guilds/{guild.id}/voice-states/@me` * - PATCH `/guilds/{guild.id}/voice-states/{user.id}` */ guildVoiceState(guildId: Snowflake, userId?: Snowflake | "@me"): `/guilds/${string}/voice-states/${string}`; /** * Route for: * - GET `/applications/{application.id}/guilds/{guild.id}/commands/permissions` * - PUT `/applications/{application.id}/guilds/{guild.id}/commands/permissions` */ guildApplicationCommandsPermissions(applicationId: Snowflake, guildId: Snowflake): `/applications/${string}/guilds/${string}/commands/permissions`; /** * Route for: * - GET `/applications/{application.id}/guilds/{guild.id}/commands/{command.id}/permissions` * - PUT `/applications/{application.id}/guilds/{guild.id}/commands/{command.id}/permissions` */ applicationCommandPermissions(applicationId: Snowflake, guildId: Snowflake, commandId: Snowflake): `/applications/${string}/guilds/${string}/commands/${string}/permissions`; /** * Route for: * - GET `/guilds/{guild.id}/welcome-screen` * - PATCH `/guilds/{guild.id}/welcome-screen` */ guildWelcomeScreen(guildId: Snowflake): `/guilds/${string}/welcome-screen`; /** * Route for: * - POST `/stage-instances` */ stageInstances(): "/stage-instances"; /** * Route for: * - GET `/stage-instances/{channel.id}` * - PATCH `/stage-instances/{channel.id}` * - DELETE `/stage-instances/{channel.id}` */ stageInstance(channelId: Snowflake): `/stage-instances/${string}`; /** * Route for: * - GET `/stickers/{sticker.id}` */ sticker(stickerId: Snowflake): `/stickers/${string}`; /** * Route for: * - GET `/sticker-packs` */ stickerPacks(): "/sticker-packs"; /** * Route for: * - GET `/sticker-packs/{pack.id}` */ stickerPack(packId: Snowflake): `/sticker-packs/${string}`; /** * Route for: * - GET `/sticker-packs` * * @deprecated Use {@link Routes.stickerPacks} instead. */ nitroStickerPacks(): "/sticker-packs"; /** * Route for: * - GET `/guilds/{guild.id}/stickers` * - POST `/guilds/{guild.id}/stickers` */ guildStickers(guildId: Snowflake): `/guilds/${string}/stickers`; /** * Route for: * - GET `/guilds/{guild.id}/stickers/{sticker.id}` * - PATCH `/guilds/{guild.id}/stickers/{sticker.id}` * - DELETE `/guilds/{guild.id}/stickers/{sticker.id}` */ guildSticker(guildId: Snowflake, stickerId: Snowflake): `/guilds/${string}/stickers/${string}`; /** * Route for: * - GET `/guilds/{guild.id}/scheduled-events` * - POST `/guilds/{guild.id}/scheduled-events` */ guildScheduledEvents(guildId: Snowflake): `/guilds/${string}/scheduled-events`; /** * Route for: * - GET `/guilds/{guild.id}/scheduled-events/{guildScheduledEvent.id}` * - PATCH `/guilds/{guild.id}/scheduled-events/{guildScheduledEvent.id}` * - DELETE `/guilds/{guild.id}/scheduled-events/{guildScheduledEvent.id}` */ guildScheduledEvent(guildId: Snowflake, guildScheduledEventId: Snowflake): `/guilds/${string}/scheduled-events/${string}`; /** * Route for: * - GET `/guilds/{guild.id}/scheduled-events/{guildScheduledEvent.id}/users` */ guildScheduledEventUsers(guildId: Snowflake, guildScheduledEventId: Snowflake): `/guilds/${string}/scheduled-events/${string}/users`; /** * Route for: * - GET `/guilds/{guild.id}/onboarding` * - PUT `/guilds/{guild.id}/onboarding` */ guildOnboarding(guildId: Snowflake): `/guilds/${string}/onboarding`; /** * Route for: * - PUT `/guilds/${guild.id}/incident-actions` */ guildIncidentActions(guildId: Snowflake): `/guilds/${string}/incident-actions`; /** * Route for: * - GET `/applications/@me` * - PATCH `/applications/@me` */ currentApplication(): "/applications/@me"; /** * Route for: * - GET `/applications/{application.id}/entitlements` * - POST `/applications/{application.id}/entitlements` */ entitlements(applicationId: Snowflake): `/applications/${string}/entitlements`; /** * Route for: * - GET `/applications/{application.id}/entitlements/{entitlement.id}` * - DELETE `/applications/{application.id}/entitlements/{entitlement.id}` */ entitlement(applicationId: Snowflake, entitlementId: Snowflake): `/applications/${string}/entitlements/${string}`; /** * Route for: * - GET `/applications/{application.id}/skus` */ skus(applicationId: Snowflake): `/applications/${string}/skus`; /** * Route for: * - POST `/guilds/{guild.id}/bulk-ban` */ guildBulkBan(guildId: Snowflake): `/guilds/${string}/bulk-ban`; /** * Route for: * - POST `/applications/{application.id}/entitlements/{entitlement.id}/consume` */ consumeEntitlement(applicationId: Snowflake, entitlementId: Snowflake): `/applications/${string}/entitlements/${string}/consume`; /** * Route for: * - GET `/applications/{application.id}/emojis` * - POST `/applications/{application.id}/emojis` */ applicationEmojis(applicationId: Snowflake): `/applications/${string}/emojis`; /** * Route for: * - GET `/applications/{application.id}/emojis/{emoji.id}` * - PATCH `/applications/{application.id}/emojis/{emoji.id}` * - DELETE `/applications/{application.id}/emojis/{emoji.id}` */ applicationEmoji(applicationId: Snowflake, emojiId: Snowflake): `/applications/${string}/emojis/${string}`; /** * Route for: * - GET `/skus/{sku.id}/subscriptions` */ skuSubscriptions(skuId: Snowflake): `/skus/${string}/subscriptions`; /** * Route for: * - GET `/skus/{sku.id}/subscriptions/{subscription.id}` */ skuSubscription(skuId: Snowflake, subscriptionId: Snowflake): `/skus/${string}/subscriptions/${string}`; /** * Route for: * - POST `/channels/{channel.id}/send-soundboard-sound` */ sendSoundboardSound(channelId: Snowflake): `/channels/${string}/send-soundboard-sound`; /** * Route for: * - GET `/soundboard-default-sounds` */ soundboardDefaultSounds(): "/soundboard-default-sounds"; /** * Route for: * - GET `/guilds/{guild.id}/soundboard-sounds` * - POST `/guilds/{guild.id}/soundboard-sounds` */ guildSoundboardSounds(guildId: Snowflake): `/guilds/${string}/soundboard-sounds`; /** * Route for: * - GET `/guilds/{guild.id}/soundboard-sounds/{sound.id}` * - PATCH `/guilds/{guild.id}/soundboard-sounds/{sound.id}` * - DELETE `/guilds/{guild.id}/soundboard-sounds/{sound.id}` */ guildSoundboardSound(guildId: Snowflake, soundId: Snowflake): `/guilds/${string}/soundboard-sounds/${string}`; }; export declare const StickerPackApplicationId = "710982414301790216"; export type ImageSize = 1024 | 2048 | 4096 | 16 | 32 | 64 | 128 | 256 | 512 | (number & {}); export declare enum ImageFormat { JPEG = "jpeg", PNG = "png", WebP = "webp", GIF = "gif", Lottie = "json" } export declare const CDNRoutes: { /** * Route for: * - GET `/emojis/{emoji.id}.{png|jpeg|webp|gif}` * * As this route supports GIFs, the hash will begin with `a_` if it is available in GIF format * * This route supports the extensions: PNG, JPEG, WebP, GIF */ emoji<Format extends EmojiFormat>(emojiId: Snowflake, format: Format): `/emojis/${string}.${Format}`; /** * Route for: * - GET `/icons/{guild.id}/{guild.icon}.{png|jpeg|webp|gif}` * * As this route supports GIFs, the hash will begin with `a_` if it is available in GIF format * * This route supports the extensions: PNG, JPEG, WebP, GIF */ guildIcon<Format extends GuildIconFormat>(guildId: Snowflake, guildIcon: string, format: Format): `/icons/${string}/${string}.${Format}`; /** * Route for: * - GET `/splashes/{guild.id}/{guild.splash}.{png|jpeg|webp}` * * This route supports the extensions: PNG, JPEG, WebP */ guildSplash<Format extends GuildSplashFormat>(guildId: Snowflake, guildSplash: string, format: Format): `/splashes/${string}/${string}.${Format}`; /** * Route for: * - GET `/discovery-splashes/{guild.id}/{guild.discovery_splash}.{png|jpeg|webp}` * * This route supports the extensions: PNG, JPEG, WebP */ guildDiscoverySplash<Format extends GuildDiscoverySplashFormat>(guildId: Snowflake, guildDiscoverySplash: string, format: Format): `/discovery-splashes/${string}/${string}.${Format}`; /** * Route for: * - GET `/banners/{guild.id}/{guild.banner}.{png|jpeg|webp|gif}` * * As this route supports GIFs, the hash will begin with `a_` if it is available in GIF format * * This route supports the extensions: PNG, JPEG, WebP, GIF */ guildBanner<Format extends GuildBannerFormat>(guildId: Snowflake, guildBanner: string, format: Format): `/banners/${string}/${string}.${Format}`; /** * Route for: * - GET `/banners/{user.id}/{user.banner}.{png|jpeg|webp|gif}` * * As this route supports GIFs, the hash will begin with `a_` if it is available in GIF format * * This route supports the extensions: PNG, JPEG, WebP, GIF */ userBanner<Format extends UserBannerFormat>(userId: Snowflake, userBanner: string, format: Format): `/banners/${string}/${string}.${Format}`; /** * Route for: * - GET `/embed/avatars/{index}.png` * * The value for `index` parameter depends on whether the user is {@link https://discord.com/developers/docs/change-log#unique-usernames-on-discord | migrated to the new username system}. * For users on the new username system, `index` will be `(user.id >> 22) % 6`. * For users on the legacy username system, `index` will be `user.discriminator % 5`. * * This route supports the extension: PNG */ defaultUserAvatar<Index extends DefaultUserAvatarAssets>(index: Index): `/embed/avatars/${Index}.png`; /** * Route for: * - GET `/avatars/{user.id}/{user.avatar}.{png|jpeg|webp|gif}` * * As this route supports GIFs, the hash will begin with `a_` if it is available in GIF format * * This route supports the extensions: PNG, JPEG, WebP, GIF */ userAvatar<Format extends UserAvatarFormat>(userId: Snowflake, userAvatar: string, format: Format): `/avatars/${string}/${string}.${Format}`; /** * Route for: * - GET `/guilds/{guild.id}/users/{user.id}/avatars/{guild_member.avatar}.{png|jpeg|webp|gif}` * * As this route supports GIFs, the hash will begin with `a_` if it is available in GIF format * * This route supports the extensions: PNG, JPEG, WebP, GIF */ guildMemberAvatar<Format extends GuildMemberAvatarFormat>(guildId: Snowflake, userId: Snowflake, memberAvatar: string, format: Format): `/guilds/${string}/users/${string}/avatars/${string}.${Format}`; /** * Route for: * - GET `/avatar-decorations/{user.id}/{user.avatar_decoration}.png` * * This route supports the extension: PNG * * @deprecated Use {@link CDNRoutes.avatarDecoration} instead. */ userAvatarDecoration(userId: Snowflake, userAvatarDecoration: string): `/avatar-decorations/${string}/${string}.png`; /** * Route for: * - GET `/avatar-decoration-presets/{avatar_decoration_data_asset}.png` * * This route supports the extension: PNG */ avatarDecoration(avatarDecorationDataAsset: string): `/avatar-decoration-presets/${string}.png`; /** * Route for: * - GET `/app-icons/{application.id}/{application.icon}.{png|jpeg|webp}` * * This route supports the extensions: PNG, JPEG, WebP */ applicationIcon<Format extends ApplicationIconFormat>(applicationId: Snowflake, applicationIcon: string, format: Format): `/app-icons/${string}/${string}.${Format}`; /** * Route for: * - GET `/app-icons/{application.id}/{application.cover_image}.{png|jpeg|webp}` * * This route supports the extensions: PNG, JPEG, WebP */ applicationCover<Format extends ApplicationCoverFormat>(applicationId: Snowflake, applicationCoverImage: string, format: Format): `/app-icons/${string}/${string}.${Format}`; /** * Route for: * - GET `/app-assets/{application.id}/{application.asset_id}.{png|jpeg|webp}` * * This route supports the extensions: PNG, JPEG, WebP */ applicationAsset<Format extends ApplicationAssetFormat>(applicationId: Snowflake, applicationAssetId: string, format: Format): `/app-assets/${string}/${string}.${Format}`; /** * Route for: * - GET `/app-assets/{application.id}/achievements/{achievement.id}/icons/{achievement.icon}.{png|jpeg|webp}` * * This route supports the extensions: PNG, JPEG, WebP */ achievementIcon<Format extends AchievementIconFormat>(applicationId: Snowflake, achievementId: Snowflake, achievementIconHash: string, format: Format): `/app-assets/${string}/achievements/${string}/icons/${string}.${Format}`; /** * Route for: * - GET `/app-assets/710982414301790216/store/{sticker_pack.banner.asset_id}.{png|jpeg|webp}` * * This route supports the extensions: PNG, JPEG, WebP */ stickerPackBanner<Format extends StickerPackBannerFormat>(stickerPackBannerAssetId: Snowflake, format: Format): `/app-assets/710982414301790216/store/${string}.${Format}`; /** * Route for: * - GET `/app-assets/${application.id}/store/${asset.id}.{png|jpeg|webp}}` * * This route supports the extensions: PNG, JPEG, WebP */ storePageAsset<Format extends StorePageAssetFormat = ImageFormat.PNG>(applicationId: Snowflake, assetId: string, format?: Format): `/app-assets/${string}/store/${string}.${Format}`; /** * Route for: * - GET `/team-icons/{team.id}/{team.icon}.{png|jpeg|webp}` * * This route supports the extensions: PNG, JPEG, WebP */ teamIcon<Format extends TeamIconFormat>(teamId: Snowflake, teamIcon: string, format: Format): `/team-icons/${string}/${string}.${Format}`; /** * Route for: * - GET `/stickers/{sticker.id}.{png|json}` * * This route supports the extensions: PNG, Lottie, GIF */ sticker<Format extends StickerFormat>(stickerId: Snowflake, format: Format): `/stickers/${string}.${Format}`; /** * Route for: * - GET `/role-icons/{role.id}/{role.icon}.{png|jpeg|webp}` * * This route supports the extensions: PNG, JPEG, WebP */ roleIcon<Format extends RoleIconFormat>(roleId: Snowflake, roleIcon: string, format: Format): `/role-icons/${string}/${string}.${Format}`; /** * Route for: * - GET `/guild-events/{guild_scheduled_event.id}/{guild_scheduled_event.image}.{png|jpeg|webp}` * * This route supports the extensions: PNG, JPEG, WebP */ guildScheduledEventCover<Format extends GuildScheduledEventCoverFormat>(guildScheduledEventId: Snowflake, guildScheduledEventCoverImage: string, format: Format): `/guild-events/${string}/${string}.${Format}`; /** * Route for: * - GET `/guilds/${guild.id}/users/${user.id}/banners/${guild_member.banner}.{png|jpeg|webp|gif}` * * This route supports the extensions: PNG, JPEG, WebP, GIF */ guildMemberBanner<Format extends GuildMemberBannerFormat>(guildId: Snowflake, userId: Snowflake, guildMemberBanner: string, format: Format): `/guilds/${string}/users/${string}/banners/${string}.${Format}`; /** * Route for: * - GET `/soundboard-sounds/${sound.id}` */ soundboardSound(soundId: Snowflake): `/soundboard-sounds/${string}`; }; export type DefaultUserAvatarAssets = 0 | 1 | 2 | 3 | 4 | 5; export type EmojiFormat = Exclude<ImageFormat, ImageFormat.Lottie>; export type GuildIconFormat = Exclude<ImageFormat, ImageFormat.Lottie>; export type GuildSplashFormat = Exclude<ImageFormat, ImageFormat.GIF | ImageFormat.Lottie>; export type GuildDiscoverySplashFormat = Exclude<ImageFormat, ImageFormat.GIF | ImageFormat.Lottie>; export type GuildBannerFormat = Exclude<ImageFormat, ImageFormat.Lottie>; export type UserBannerFormat = Exclude<ImageFormat, ImageFormat.Lottie>; export type DefaultUserAvatarFormat = Extract<ImageFormat, ImageFormat.PNG>; export type UserAvatarFormat = Exclude<ImageFormat, ImageFormat.Lottie>; export type GuildMemberAvatarFormat = Exclude<ImageFormat, ImageFormat.Lottie>; export type ApplicationIconFormat = Exclude<ImageFormat, ImageFormat.GIF | ImageFormat.Lottie>; export type ApplicationCoverFormat = Exclude<ImageFormat, ImageFormat.GIF | ImageFormat.Lottie>; export type ApplicationAssetFormat = Exclude<ImageFormat, ImageFormat.GIF | ImageFormat.Lottie>; export type AchievementIconFormat = Exclude<ImageFormat, ImageFormat.GIF | ImageFormat.Lottie>; export type StickerPackBannerFormat = Exclude<ImageFormat, ImageFormat.GIF | ImageFormat.Lottie>; export type TeamIconFormat = Exclude<ImageFormat, ImageFormat.GIF | ImageFormat.Lottie>; export type StorePageAssetFormat = Exclude<ImageFormat, ImageFormat.GIF | ImageFormat.Lottie>; export type StickerFormat = Extract<ImageFormat, ImageFormat.GIF | ImageFormat.Lottie | ImageFormat.PNG>; export type RoleIconFormat = Exclude<ImageFormat, ImageFormat.GIF | ImageFormat.Lottie>; export type GuildScheduledEventCoverFormat = Exclude<ImageFormat, ImageFormat.GIF | ImageFormat.Lottie>; export type GuildMemberBannerFormat = Exclude<ImageFormat, ImageFormat.Lottie>; /** * @deprecated Use {@link DefaultUserAvatarFormat} instead. */ export type DefaultUserAvatar = DefaultUserAvatarFormat; export interface CDNQuery { /** * The returned image can have the size changed by using this query parameter * * Image size can be any power of two between 16 and 4096 */ size?: ImageSize; } export declare const RouteBases: { readonly api: "https://discord.com/api/v10"; readonly cdn: "https://cdn.discordapp.com"; readonly media: "https://media.discordapp.net"; readonly invite: "https://discord.gg"; readonly template: "https://discord.new"; readonly gift: "https://discord.gift"; readonly scheduledEvent: "https://discord.com/events"; }; export declare const OAuth2Routes: { readonly authorizationURL: "https://discord.com/api/v10/oauth2/authorize"; readonly tokenURL: "https://discord.com/api/v10/oauth2/token"; /** * @see {@link https://tools.ietf.org/html/rfc7009} */ readonly tokenRevocationURL: "https://discord.com/api/v10/oauth2/token/revoke"; }; //# sourceMappingURL=index.d.ts.map node_modules/discord-api-types/rest/v10/guildScheduledEvent.d.ts 0000664 00000010745 15114741631 0020701 0 ustar 00 import type { Snowflake } from '../../globals'; import type { _Nullable, _StrictPartial } from '../../utils/internals'; import type { APIGuildScheduledEvent, APIGuildScheduledEventEntityMetadata, APIGuildScheduledEventRecurrenceRule, APIGuildScheduledEventUser, GuildScheduledEventEntityType, GuildScheduledEventPrivacyLevel, GuildScheduledEventStatus } from '../../v10'; /** * @see {@link https://discord.com/developers/docs/resources/guild-scheduled-event#list-scheduled-events-for-guild} */ export interface RESTGetAPIGuildScheduledEventsQuery { /** * Whether to include number of users subscribed to each event */ with_user_count?: boolean; } /** * @see {@link https://discord.com/developers/docs/resources/guild-scheduled-event#list-scheduled-events-for-guild} */ export type RESTGetAPIGuildScheduledEventsResult = APIGuildScheduledEvent[]; /** * @see {@link https://discord.com/developers/docs/resources/guild-scheduled-event#create-guild-scheduled-event} */ export interface RESTPostAPIGuildScheduledEventJSONBody { /** * The stage channel id of the guild event */ channel_id?: Snowflake | undefined; /** * The name of the guild event */ name: string; /** * The privacy level of the guild event */ privacy_level: GuildScheduledEventPrivacyLevel; /** * The time to schedule the guild event at */ scheduled_start_time: string; /** * The time when the scheduled event is scheduled to end */ scheduled_end_time?: string | undefined; /** * The description of the guild event */ description?: string | undefined; /** * The scheduled entity type of the guild event */ entity_type?: GuildScheduledEventEntityType | undefined; /** * The entity metadata of the scheduled event */ entity_metadata?: APIGuildScheduledEventEntityMetadata | undefined; /** * The cover image of the scheduled event */ image?: string | null | undefined; /** * The definition for how often this event should recur */ recurrence_rule?: APIGuildScheduledEventRecurrenceRule | undefined; } /** * @see {@link https://discord.com/developers/docs/resources/guild-scheduled-event#create-guild-scheduled-event} */ export type RESTPostAPIGuildScheduledEventResult = APIGuildScheduledEvent; /** * @see {@link https://discord.com/developers/docs/resources/guild-scheduled-event#get-guild-scheduled-event} */ export interface RESTGetAPIGuildScheduledEventQuery { /** * Whether to include number of users subscribed to this event */ with_user_count?: boolean; } /** * @see {@link https://discord.com/developers/docs/resources/guild-scheduled-event#get-guild-scheduled-event} */ export type RESTGetAPIGuildScheduledEventResult = APIGuildScheduledEvent; /** * @see {@link https://discord.com/developers/docs/resources/guild-scheduled-event#modify-guild-scheduled-event} */ export interface RESTPatchAPIGuildScheduledEventJSONBody extends _Nullable<Pick<RESTPostAPIGuildScheduledEventJSONBody, 'description' | 'entity_metadata' | 'recurrence_rule'>>, _StrictPartial<Omit<RESTPostAPIGuildScheduledEventJSONBody, 'description' | 'entity_metadata' | 'recurrence_rule'>> { /** * The status of the scheduled event */ status?: GuildScheduledEventStatus | undefined; } /** * @see {@link https://discord.com/developers/docs/resources/guild-scheduled-event#modify-guild-scheduled-event} */ export type RESTPatchAPIGuildScheduledEventResult = APIGuildScheduledEvent; /** * @see {@link https://discord.com/developers/docs/resources/guild-scheduled-event#delete-guild-scheduled-event} */ export type RESTDeleteAPIGuildScheduledEventResult = never; /** * @see {@link https://discord.com/developers/docs/resources/guild-scheduled-event#get-guild-scheduled-event-users} */ export interface RESTGetAPIGuildScheduledEventUsersQuery { /** * Number of users to receive from the event * * @defaultValue `100` */ limit?: number; /** * Whether to include guild member data if it exists */ with_member?: boolean; /** * Consider only users before given user id */ before?: Snowflake; /** * Consider only users after given user id */ after?: Snowflake; } /** * @see {@link https://discord.com/developers/docs/resources/guild-scheduled-event#get-guild-scheduled-event-users} */ export type RESTGetAPIGuildScheduledEventUsersResult = APIGuildScheduledEventUser[]; //# sourceMappingURL=guildScheduledEvent.d.ts.map node_modules/discord-api-types/rest/v10/auditLog.js.map 0000664 00000000145 15114741631 0017033 0 ustar 00 {"version":3,"file":"auditLog.js","sourceRoot":"","sources":["auditLog.ts"],"names":[],"mappings":""} node_modules/discord-api-types/rest/v10/soundboard.js 0000664 00000000163 15114741631 0016647 0 ustar 00 "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); //# sourceMappingURL=soundboard.js.map node_modules/discord-api-types/rest/v10/monetization.js.map 0000664 00000000347 15114741631 0020007 0 ustar 00 {"version":3,"file":"monetization.js","sourceRoot":"","sources":["monetization.ts"],"names":[],"mappings":";;;AAsFA;;GAEG;AACH,IAAY,oBAGX;AAHD,WAAY,oBAAoB;IAC/B,iEAAS,CAAA;IACT,+DAAI,CAAA;AACL,CAAC,EAHW,oBAAoB,oCAApB,oBAAoB,QAG/B"} node_modules/discord-api-types/rest/v10/template.d.ts.map 0000664 00000001567 15114741631 0017343 0 ustar 00 {"version":3,"file":"template.d.ts","sourceRoot":"","sources":["template.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AACtE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAE5D;;GAEG;AACH,MAAM,MAAM,wBAAwB,GAAG,WAAW,CAAC;AAEnD;;GAEG;AACH,MAAM,WAAW,sCAAsC;IACtD;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;;;OAIG;IACH,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CAC1B;AAED;;GAEG;AACH,MAAM,MAAM,oCAAoC,GAAG,QAAQ,CAAC;AAE5D;;GAEG;AACH,MAAM,MAAM,8BAA8B,GAAG,WAAW,EAAE,CAAC;AAE3D;;GAEG;AACH,MAAM,WAAW,iCAAiC;IACjD;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;CACxC;AAED;;GAEG;AACH,MAAM,MAAM,+BAA+B,GAAG,WAAW,CAAC;AAE1D;;GAEG;AACH,MAAM,MAAM,iCAAiC,GAAG,WAAW,CAAC;AAE5D;;GAEG;AACH,MAAM,MAAM,iCAAiC,GAAG,cAAc,CAAC,iCAAiC,CAAC,CAAC;AAElG;;GAEG;AACH,MAAM,MAAM,+BAA+B,GAAG,WAAW,CAAC;AAE1D;;GAEG;AACH,MAAM,MAAM,gCAAgC,GAAG,WAAW,CAAC"} node_modules/discord-api-types/rest/v10/gateway.d.ts.map 0000664 00000000403 15114741631 0017155 0 ustar 00 {"version":3,"file":"gateway.d.ts","sourceRoot":"","sources":["gateway.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAElF;;GAEG;AACH,MAAM,MAAM,uBAAuB,GAAG,cAAc,CAAC;AAErD;;GAEG;AACH,MAAM,MAAM,0BAA0B,GAAG,iBAAiB,CAAC"} node_modules/discord-api-types/rest/v10/voice.js.map 0000664 00000000137 15114741631 0016371 0 ustar 00 {"version":3,"file":"voice.js","sourceRoot":"","sources":["voice.ts"],"names":[],"mappings":""} node_modules/discord-api-types/rest/v10/user.js 0000664 00000000155 15114741631 0015466 0 ustar 00 "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); //# sourceMappingURL=user.js.map node_modules/discord-api-types/rest/v10/guild.js 0000664 00000000156 15114741631 0015615 0 ustar 00 "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); //# sourceMappingURL=guild.js.map node_modules/discord-api-types/rest/v10/autoModeration.js 0000664 00000000167 15114741631 0017505 0 ustar 00 "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); //# sourceMappingURL=autoModeration.js.map node_modules/discord-api-types/rest/v10/oauth2.js 0000664 00000000157 15114741631 0015714 0 ustar 00 "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); //# sourceMappingURL=oauth2.js.map node_modules/discord-api-types/rest/v10/soundboard.d.ts 0000664 00000006550 15114741631 0017111 0 ustar 00 import type { Snowflake } from '../../globals'; import type { APISoundboardSound } from '../../payloads/v10/index'; /** * @see {@link https://discord.com/developers/docs/resources/soundboard#send-soundboard-sound} */ export type RESTPostAPISendSoundboardSoundResult = APISoundboardSound; /** * @see {@link https://discord.com/developers/docs/resources/soundboard#send-soundboard-sound-json-params} */ export interface RESTPostAPISoundboardSendSoundJSONBody { /** * The id of the soundboard sound to play */ sound_id: Snowflake; /** * The id of the guild the soundboard sound is from, required to play sounds from different servers */ source_guild_id?: Snowflake | undefined; } /** * @see {@link https://discord.com/developers/docs/resources/soundboard#list-soundboard-default-sounds} */ export type RESTGetAPISoundboardDefaultSoundsResult = APISoundboardSound[]; /** * @see {@link https://discord.com/developers/docs/resources/soundboard#list-guild-soundboard-sounds} */ export interface RESTGetAPIGuildSoundboardSoundsResult { items: APISoundboardSound[]; } /** * @see {@link https://discord.com/developers/docs/resources/soundboard#get-guild-soundboard-sound} */ export type RESTGetAPIGuildSoundboardSoundResult = APISoundboardSound; /** * @see {@link https://discord.com/developers/docs/resources/soundboard#create-guild-soundboard-sound-json-params} */ export interface RESTPostAPIGuildSoundboardSoundJSONBody { /** * The name of the soundboard sound (2-32 characters) */ name: string; /** * The data uri of the mp3 or ogg sound data, base64 encoded, similar to image data * * @see {@link https://discord.com/developers/docs/reference#image-data} */ sound: string; /** * The volume of the soundboard sound, from 0 to 1 * * @defaultValue `1` */ volume?: number | null | undefined; /** * The id of the custom emoji for the soundboard sound */ emoji_id?: Snowflake | null | undefined; /** * The unicode character of a standard emoji for the soundboard sound */ emoji_name?: string | null | undefined; } /** * @see {@link https://discord.com/developers/docs/resources/soundboard#create-guild-soundboard-sound} */ export type RESTPostAPIGuildSoundboardSoundResult = APISoundboardSound; /** * @see {@link https://discord.com/developers/docs/resources/soundboard#modify-guild-soundboard-sound-json-params} */ export interface RESTPatchAPIGuildSoundboardSoundJSONBody { /** * The name of the soundboard sound (2-32 characters) */ name?: string | undefined; /** * The volume of the soundboard sound, from 0 to 1 * * @defaultValue `1` */ volume?: number | null | undefined; /** * The id of the custom emoji for the soundboard sound */ emoji_id?: Snowflake | null | undefined; /** * The unicode character of a standard emoji for the soundboard sound */ emoji_name?: string | null | undefined; } /** * @see {@link https://discord.com/developers/docs/resources/soundboard#modify-guild-soundboard-sound} */ export type RESTPatchAPIGuildSoundboardSoundResult = APISoundboardSound; /** * @see {@link https://discord.com/developers/docs/resources/soundboard#delete-guild-soundboard-sound} */ export type RESTDeleteAPIGuildSoundboardSoundResult = never; //# sourceMappingURL=soundboard.d.ts.map node_modules/discord-api-types/rest/v10/invite.d.ts.map 0000664 00000000700 15114741631 0017012 0 ustar 00 {"version":3,"file":"invite.d.ts","sourceRoot":"","sources":["invite.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC/C,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAC;AAE1D;;GAEG;AACH,MAAM,WAAW,qBAAqB;IACrC;;OAEG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB;;;;;OAKG;IACH,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B;;OAEG;IACH,wBAAwB,CAAC,EAAE,SAAS,CAAC;CACrC;AAED,MAAM,MAAM,sBAAsB,GAAG,SAAS,CAAC;AAE/C;;GAEG;AACH,MAAM,MAAM,yBAAyB,GAAG,SAAS,CAAC"} node_modules/discord-api-types/rest/v10/interactions.d.ts.map 0000664 00000011507 15114741631 0020225 0 ustar 00 {"version":3,"file":"interactions.d.ts","sourceRoot":"","sources":["interactions.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC/C,OAAO,KAAK,EACX,qBAAqB,EACrB,+BAA+B,EAC/B,qCAAqC,EACrC,sBAAsB,EACtB,kCAAkC,EAClC,sBAAsB,EACtB,uBAAuB,EACvB,UAAU,EACV,eAAe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AEG;AACH,MAAM,MAAM,sCAAsC,GAAG,0CAA0C,CAAC;AAEhG;;GAEG;AACH,MAAM,MAAM,mDAAmD,GAAG,qCAAqC,EAAE,CAAC;AAE1G;;GAEG;AACH,MAAM,MAAM,6CAA6C,GAAG,qCAAqC,CAAC;AAElG;;GAEG;AACH,MAAM,WAAW,+CAA+C;IAC/D,WAAW,EAAE,+BAA+B,EAAE,CAAC;CAC/C;AAED;;GAEG;AACH,MAAM,MAAM,6CAA6C,GAAG,qCAAqC,CAAC;AAElG;;GAEG;AACH,MAAM,MAAM,qDAAqD,GAAG,IAAI,CACvE,qCAAqC,EACrC,IAAI,GAAG,aAAa,CACpB,EAAE,CAAC;AAEJ;;GAEG;AACH,MAAM,MAAM,mDAAmD,GAAG,qCAAqC,EAAE,CAAC"} node_modules/discord-api-types/rest/v10/auditLog.d.ts 0000664 00000001526 15114741631 0016517 0 ustar 00 import type { Snowflake } from '../../globals'; import type { APIAuditLog, AuditLogEvent } from '../../payloads/v10/auditLog'; /** * @see {@link https://discord.com/developers/docs/resources/audit-log#get-guild-audit-log} */ export interface RESTGetAPIAuditLogQuery { /** * Filter the log for actions made by a user */ user_id?: Snowflake; /** * The type of audit log events */ action_type?: AuditLogEvent; /** * Filter the log before a certain entry ID */ before?: Snowflake; /** * Filter the log after a certain entry ID */ after?: Snowflake; /** * How many entries are returned (default 50, minimum 1, maximum 100) * * @defaultValue `50` */ limit?: number; } export type RESTGetAPIAuditLogResult = APIAuditLog; //# sourceMappingURL=auditLog.d.ts.map node_modules/discord-api-types/rest/v10/auditLog.d.ts.map 0000664 00000000755 15114741631 0017276 0 ustar 00 {"version":3,"file":"auditLog.d.ts","sourceRoot":"","sources":["auditLog.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC/C,OAAO,KAAK,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAE9E;;GAEG;AACH,MAAM,WAAW,uBAAuB;IACvC;;OAEG;IACH,OAAO,CAAC,EAAE,SAAS,CAAC;IACpB;;OAEG;IACH,WAAW,CAAC,EAAE,aAAa,CAAC;IAC5B;;OAEG;IACH,MAAM,CAAC,EAAE,SAAS,CAAC;IACnB;;OAEG;IACH,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB;;;;OAIG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;CACf;AAED,MAAM,MAAM,wBAAwB,GAAG,WAAW,CAAC"} node_modules/discord-api-types/rest/v10/webhook.d.ts.map 0000664 00000007135 15114741631 0017163 0 ustar 00 {"version":3,"file":"webhook.d.ts","sourceRoot":"","sources":["webhook.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC/C,OAAO,KAAK,EACX,kBAAkB,EAClB,QAAQ,EACR,UAAU,EACV,UAAU,EACV,YAAY,EACZ,2BAA2B,EAC3B,MAAM,0BAA0B,CAAC;AAClC,OAAO,KAAK,EAAE,qDAAqD,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAC9G,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,WAAW,CAAC;AACnD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,QAAQ,CAAC;AAC1C;;GAEG;AACH,MAAM,WAAW,iCAAiC;IACjD;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;;;OAIG;IACH,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;CACnC;AAED;;GAEG;AACH,MAAM,MAAM,+BAA+B,GAAG,UAAU,CAAC;AAEzD;;GAEG;AACH,MAAM,MAAM,+BAA+B,GAAG,UAAU,EAAE,CAAC;AAE3D;;GAEG;AACH,MAAM,MAAM,6BAA6B,GAAG,UAAU,EAAE,CAAC;AAEzD;;GAEG;AACH,MAAM,MAAM,uBAAuB,GAAG,UAAU,CAAC;AAEjD;;GAEG;AACH,MAAM,MAAM,gCAAgC,GAAG,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AM,MAAM,uCAAuC,GAAG,UAAU,CAAC;AAEjE;;GAEG;AACH,MAAM,WAAW,sCAAsC;IACtD,SAAS,CAAC,EAAE,MAAM,CAAC;CACnB;AAED;;GAEG;AACH,MAAM,MAAM,2CAA2C,GAAG,qDAAqD,CAC9G,SAAS,CAAC,IAAI,CAAC,mCAAmC,EAAE,kBAAkB,GAAG,YAAY,GAAG,SAAS,GAAG,QAAQ,CAAC,CAAC,CAC9G,GAAG;IACH;;;;;;OAMG;IACH,WAAW,CAAC,EAAE,iBAAiB,EAAE,GAAG,SAAS,CAAC;IAC9C;;;;;OAKG;IACH,IAAI,CAAC,EAAE,WAAW,GAAG,SAAS,CAAC;CAC/B,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,+CAA+C,GACxD,CAAC,MAAM,CAAC,SAAS,MAAM,GAAG,EAAE,OAAO,CAAC,GAAG;IACvC;;OAEG;IACH,YAAY,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CACjC,CAAC,GACF,CAAC,MAAM,CAAC,SAAS,MAAM,GAAG,EAAE,OAAO,CAAC,GAAG,2CAA2C,CAAC,CAAC;AAEvF;;GAEG;AACH,MAAM,MAAM,wCAAwC,GAAG,IAAI,CAC1D,gCAAgC,EAChC,WAAW,GAAG,iBAAiB,CAC/B,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,yCAAyC,GAAG,UAAU,CAAC;AAEnE;;GAEG;AACH,MAAM,MAAM,0CAA0C,GAAG,KAAK,CAAC"} node_modules/discord-api-types/rest/v10/monetization.d.ts.map 0000664 00000003171 15114741631 0020241 0 ustar 00 {"version":3,"file":"monetization.d.ts","sourceRoot":"","sources":["monetization.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC/C,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,EAAE,eAAe,EAAE,MAAM,WAAW,CAAC;AAEzE;;GAEG;AACH,MAAM,WAAW,2BAA2B;IAC3C;;O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H,MAAM,WAAW,+BAA+B;IAC/C;;OAEG;IACH,MAAM,CAAC,EAAE,SAAS,GAAG,SAAS,CAAC;IAC/B;;OAEG;IACH,KAAK,CAAC,EAAE,SAAS,GAAG,SAAS,CAAC;IAC9B;;;;OAIG;IACH,KAAK,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC3B;;OAEG;IACH,OAAO,CAAC,EAAE,SAAS,GAAG,SAAS,CAAC;CAChC;AAED;;GAEG;AACH,MAAM,MAAM,gCAAgC,GAAG,eAAe,EAAE,CAAC;AAEjE;;GAEG;AACH,MAAM,MAAM,+BAA+B,GAAG,eAAe,CAAC"} node_modules/discord-api-types/rest/v10/stageInstance.js 0000664 00000000166 15114741631 0017302 0 ustar 00 "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); //# sourceMappingURL=stageInstance.js.map node_modules/discord-api-types/rest/v10/gateway.js.map 0000664 00000000143 15114741631 0016722 0 ustar 00 {"version":3,"file":"gateway.js","sourceRoot":"","sources":["gateway.ts"],"names":[],"mappings":""} node_modules/discord-api-types/rest/v10/soundboard.d.ts.map 0000664 00000002412 15114741631 0017656 0 ustar 00 {"version":3,"file":"soundboard.d.ts","sourceRoot":"","sources":["soundboard.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC/C,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AAEnE;;GAEG;AACH,MAAM,MAAM,oCAAoC,GAAG,kBAAkB,CAAC;AAEtE;;GAEG;AACH,MAAM,WAAW,sCAAsC;IACtD;;OAEG;IACH,QAAQ,EAAE,SAAS,CAAC;IACpB;;OAEG;IACH,eAAe,CAAC,EAAE,SAAS,GAAG,SAAS,CAAC;CACxC;AAED;;GAEG;AACH,MAAM,MAAM,uCAAuC,GAAG,kBAAkB,EAAE,CAAC;AAE3E;;GAEG;AACH,MAAM,WAAW,qCAAqC;IACrD,KAAK,EAAE,kBAAkB,EAAE,CAAC;CAC5B;AAED;;GAEG;AACH,MAAM,MAAM,oCAAoC,GAAG,kBAAkB,CAAC;AAEtE;;GAEG;AACH,MAAM,WAAW,uCAAuC;IACvD;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;;;OAIG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;;;OAIG;IACH,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;IACnC;;OAEG;IACH,QAAQ,CAAC,EAAE,SAAS,GAAG,IAAI,GAAG,SAAS,CAAC;IACxC;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;CACvC;AAED;;GAEG;AACH,MAAM,MAAM,qCAAqC,GAAG,kBAAkB,CAAC;AAEvE;;GAEG;AACH,MAAM,WAAW,wCAAwC;IACxD;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC1B;;;;OAIG;IACH,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;IACnC;;OAEG;IACH,QAAQ,CAAC,EAAE,SAAS,GAAG,IAAI,GAAG,SAAS,CAAC;IACxC;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;CACvC;AAED;;GAEG;AACH,MAAM,MAAM,sCAAsC,GAAG,kBAAkB,CAAC;AAExE;;GAEG;AACH,MAAM,MAAM,uCAAuC,GAAG,KAAK,CAAC"} node_modules/discord-api-types/rest/v10/application.d.ts 0000664 00000003356 15114741631 0017255 0 ustar 00 import type { APIApplication, APIApplicationRoleConnectionMetadata } from '../../payloads/v10/application'; import type { _Nullable, _StrictPartial } from '../../utils/internals'; /** * @see {@link https://discord.com/developers/docs/resources/application-role-connection-metadata#get-application-role-connection-metadata-records} */ export type RESTGetAPIApplicationRoleConnectionMetadataResult = APIApplicationRoleConnectionMetadata[]; /** * @see {@link https://discord.com/developers/docs/resources/application-role-connection-metadata#update-application-role-connection-metadata-records} */ export type RESTPutAPIApplicationRoleConnectionMetadataJSONBody = APIApplicationRoleConnectionMetadata[]; /** * @see {@link https://discord.com/developers/docs/resources/application-role-connection-metadata#update-application-role-connection-metadata-records} */ export type RESTPutAPIApplicationRoleConnectionMetadataResult = APIApplicationRoleConnectionMetadata[]; /** * @see {@link https://discord.com/developers/docs/resources/application#get-current-application} */ export type RESTGetCurrentApplicationResult = APIApplication; /** * @see {@link https://discord.com/developers/docs/resources/application#edit-current-application} */ export type RESTPatchCurrentApplicationJSONBody = _StrictPartial<_Nullable<Pick<APIApplication, 'cover_image' | 'icon'>> & Pick<APIApplication, 'custom_install_url' | 'description' | 'flags' | 'install_params' | 'integration_types_config' | 'interactions_endpoint_url' | 'role_connections_verification_url' | 'tags'>>; /** * @see {@link https://discord.com/developers/docs/resources/application#edit-current-application} */ export type RESTPatchCurrentApplicationResult = APIApplication; //# sourceMappingURL=application.d.ts.map node_modules/discord-api-types/rest/v10/index.mjs 0000664 00000001071 15114741631 0015772 0 ustar 00 import mod from "./index.js"; export default mod; export const APIVersion = mod.APIVersion; export const CDNRoutes = mod.CDNRoutes; export const EntitlementOwnerType = mod.EntitlementOwnerType; export const ImageFormat = mod.ImageFormat; export const Locale = mod.Locale; export const OAuth2Routes = mod.OAuth2Routes; export const RESTJSONErrorCodes = mod.RESTJSONErrorCodes; export const ReactionType = mod.ReactionType; export const RouteBases = mod.RouteBases; export const Routes = mod.Routes; export const StickerPackApplicationId = mod.StickerPackApplicationId; node_modules/discord-api-types/rest/v10/invite.js.map 0000664 00000000141 15114741631 0016555 0 ustar 00 {"version":3,"file":"invite.js","sourceRoot":"","sources":["invite.ts"],"names":[],"mappings":""} node_modules/discord-api-types/rest/v10/index.js.map 0000664 00000035033 15114741631 0016376 0 ustar 00 {"version":3,"file":"index.js","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AACA,qDAA0D;AAE1D,4CAA0B;AAI1B,4CAA0B;AAO1B,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EAAE,CAAC;gBACT,2BAA2B;gBAC3B,IAAI,6BAAiB,CAAC,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC;oBACzC,OAAO,GAAG,CAAC;gBACZ,CAAC;gBAED,OAAO,kBAAkB,CAAC,GAAG,CAAC,CAAC;YAChC,CAAC;YAED,OAAO,GAAG,CAAC;QACZ,CAAC,CAAC,CAAC;QACH,2CAA2C;QAC3C,OAAO,EAAE,CAAC,IAAI,CAAC,IAAI,EAAE,GAAG,OAAO,CAAC,CAAC;IAClC,CAAC,CAAC;AACH,CAAC;AAED,2CAA2C;AAC3C,MAAM,CAAC,MAAM,CAAC,iBAAS,CAAC,CAAC;AAuCZ,QAAA,UAAU,GAAG;IACzB,GAAG,EAAE,4BAA4B,kBAAU,EAAE;IAC7C,GAAG,EAAE,4BAA4B;IACjC,KAAK,EAAE,8BAA8B;IACrC,MAAM,EAAE,oBAAoB;IAC5B,QAAQ,EAAE,qBAAqB;IAC/B,IAAI,EAAE,sBAAsB;IAC5B,cAAc,EAAE,4BAA4B;CACnC,CAAC;AAEX,sBAAsB;AACtB,MAAM,CAAC,MAAM,CAAC,kBAAU,CAAC,CAAC;AAEb,QAAA,YAAY,GAAG;IAC3B,gBAAgB,EAAE,GAAG,kBAAU,CAAC,GAAG,GAAG,cAAM,CAAC,mBAAmB,EAAE,EAAE;IACpE,QAAQ,EAAE,GAAG,kBAAU,CAAC,GAAG,GAAG,cAAM,CAAC,mBAAmB,EAAE,EAAE;IAC5D;;OAEG;IACH,kBAAkB,EAAE,GAAG,kBAAU,CAAC,GAAG,GAAG,cAAM,CAAC,qBAAqB,EAAE,EAAE;CAC/D,CAAC;AAEX,6BAA6B;AAC7B,MAAM,CAAC,MAAM,CAAC,oBAAY,CAAC,CAAC"} node_modules/discord-api-types/rest/v10/voice.d.ts 0000664 00000003746 15114741631 0016062 0 ustar 00 import type { Snowflake } from '../../globals'; import type { APIVoiceRegion, APIVoiceState } from '../../payloads/v10/index'; /** * @see {@link https://discord.com/developers/docs/resources/voice#list-voice-regions} */ export type RESTGetAPIVoiceRegionsResult = APIVoiceRegion[]; /** * @deprecated This was exported with the wrong name, use {@link RESTGetAPIVoiceRegionsResult} instead */ export type GetAPIVoiceRegionsResult = RESTGetAPIVoiceRegionsResult; /** * @see {@link https://discord.com/developers/docs/resources/voice#get-current-user-voice-state} */ export type RESTGetAPIGuildVoiceStateCurrentMemberResult = APIVoiceState; /** * @see {@link https://discord.com/developers/docs/resources/voice#get-user-voice-state} */ export type RESTGetAPIGuildVoiceStateUserResult = APIVoiceState; /** * @see {@link https://discord.com/developers/docs/resources/voice#modify-current-user-voice-state} */ export interface RESTPatchAPIGuildVoiceStateCurrentMemberJSONBody { /** * The id of the channel the user is currently in */ channel_id?: Snowflake | undefined; /** * Toggles the user's suppress state */ suppress?: boolean | undefined; /** * Sets the user's request to speak */ request_to_speak_timestamp?: string | null | undefined; } /** * @see {@link https://discord.com/developers/docs/resources/voice#modify-current-user-voice-state} */ export type RESTPatchAPIGuildVoiceStateCurrentMemberResult = never; /** * @see {@link https://discord.com/developers/docs/resources/voice#modify-user-voice-state} */ export interface RESTPatchAPIGuildVoiceStateUserJSONBody { /** * The id of the channel the user is currently in */ channel_id: Snowflake; /** * Toggles the user's suppress state */ suppress?: boolean | undefined; } /** * @see {@link https://discord.com/developers/docs/resources/voice#modify-user-voice-state} */ export type RESTPatchAPIGuildVoiceStateUserResult = never; //# sourceMappingURL=voice.d.ts.map node_modules/discord-api-types/rest/v10/invite.d.ts 0000664 00000001720 15114741631 0016241 0 ustar 00 import type { Snowflake } from '../../globals'; import type { APIInvite } from '../../payloads/v10/index'; /** * @see {@link https://discord.com/developers/docs/resources/invite#get-invite} */ export interface RESTGetAPIInviteQuery { /** * Whether the invite should contain approximate member counts */ with_counts?: boolean; /** * Whether the invite should contain the expiration date * * @deprecated The expiration date is always returned, regardless of this query parameter. * @see {@link https://github.com/discord/discord-api-docs/pull/7424} */ with_expiration?: boolean; /** * The guild scheduled event to include with the invite */ guild_scheduled_event_id?: Snowflake; } export type RESTGetAPIInviteResult = APIInvite; /** * @see {@link https://discord.com/developers/docs/resources/invite#delete-invite} */ export type RESTDeleteAPIInviteResult = APIInvite; //# sourceMappingURL=invite.d.ts.map node_modules/discord-api-types/rest/v10/user.d.ts 0000664 00000010147 15114741631 0015724 0 ustar 00 import type { Permissions, Snowflake } from '../../globals'; import type { APIChannel, APIConnection, APIGuildMember, APIUser, APIApplicationRoleConnection, GuildFeature } from '../../payloads/v10/index'; /** * @see {@link https://discord.com/developers/docs/resources/user#get-current-user} */ export type RESTGetAPICurrentUserResult = APIUser; /** * @see {@link https://discord.com/developers/docs/resources/user#get-user} */ export type RESTGetAPIUserResult = APIUser; /** * @see {@link https://discord.com/developers/docs/resources/user#get-current-user-guild-member} */ export type RESTGetCurrentUserGuildMemberResult = APIGuildMember; /** * @see {@link https://discord.com/developers/docs/resources/user#modify-current-user} */ export interface RESTPatchAPICurrentUserJSONBody { /** * User's username, if changed may cause the user's discriminator to be randomized */ username?: string | undefined; /** * If passed, modifies the user's avatar */ avatar?: string | null | undefined; /** * If passed, modifies the user's banner */ banner?: string | null | undefined; } /** * @see {@link https://discord.com/developers/docs/resources/user#modify-current-user} */ export type RESTPatchAPICurrentUserResult = APIUser; /** * @see {@link https://discord.com/developers/docs/resources/user#get-current-user-guilds} */ export interface RESTGetAPICurrentUserGuildsQuery { /** * Get guilds before this guild ID */ before?: Snowflake; /** * Get guilds after this guild ID */ after?: Snowflake; /** * Max number of guilds to return (1-200) * * @defaultValue `200` */ limit?: number; /** * Include approximate member and presence counts in response * * @defaultValue `false` */ with_counts?: boolean; } export interface RESTAPIPartialCurrentUserGuild { id: Snowflake; name: string; icon: string | null; banner: string | null; owner: boolean; features: GuildFeature[]; permissions: Permissions; approximate_member_count?: number; approximate_presence_count?: number; } /** * @see {@link https://discord.com/developers/docs/resources/user#get-current-user-guilds} */ export type RESTGetAPICurrentUserGuildsResult = RESTAPIPartialCurrentUserGuild[]; /** * @see {@link https://discord.com/developers/docs/resources/user#leave-guild} */ export type RESTDeleteAPICurrentUserGuildResult = never; /** * @see {@link https://discord.com/developers/docs/resources/user#create-dm} */ export interface RESTPostAPICurrentUserCreateDMChannelJSONBody { /** * The recipient to open a DM channel with */ recipient_id: string; } /** * @see {@link https://discord.com/developers/docs/resources/user#create-dm} */ export type RESTPostAPICurrentUserCreateDMChannelResult = APIChannel; /** * @see {@link https://discord.com/developers/docs/resources/user#get-user-connections} */ export type RESTGetAPICurrentUserConnectionsResult = APIConnection[]; /** * @see {@link https://discord.com/developers/docs/resources/user#get-user-application-role-connection} */ export type RESTGetAPICurrentUserApplicationRoleConnectionResult = APIApplicationRoleConnection; /** * @see {@link https://discord.com/developers/docs/resources/user#update-user-application-role-connection} */ export interface RESTPutAPICurrentUserApplicationRoleConnectionJSONBody { /** * The vanity name of the platform a bot has connected (max 50 characters) */ platform_name?: string | undefined; /** * The username on the platform a bot has connected (max 100 characters) */ platform_username?: string | undefined; /** * Object mapping application role connection metadata keys to their `string`-ified value (max 100 characters) for the user on the platform a bot has connected */ metadata?: Record<string, number | string> | undefined; } /** * @see {@link https://discord.com/developers/docs/resources/user#update-user-application-role-connection} */ export type RESTPutAPICurrentUserApplicationRoleConnectionResult = APIApplicationRoleConnection; //# sourceMappingURL=user.d.ts.map node_modules/discord-api-types/rest/v10/index.js 0000664 00000114762 15114741631 0015631 0 ustar 00 "use strict"; var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { if (k2 === undefined) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { return m[k]; } }; } Object.defineProperty(o, k2, desc); }) : (function(o, m, k, k2) { if (k2 === undefined) k2 = k; o[k2] = m[k]; })); var __exportStar = (this && this.__exportStar) || function(m, exports) { for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); }; Object.defineProperty(exports, "__esModule", { value: true }); exports.OAuth2Routes = exports.RouteBases = exports.CDNRoutes = exports.ImageFormat = exports.StickerPackApplicationId = exports.Routes = exports.APIVersion = void 0; const internals_1 = require("../../utils/internals"); __exportStar(require("../common"), exports); __exportStar(require("./channel"), exports); __exportStar(require("./monetization"), exports); exports.APIVersion = '10'; exports.Routes = { /** * Route for: * - GET `/applications/{application.id}/role-connections/metadata` * - PUT `/applications/{application.id}/role-connections/metadata` */ applicationRoleConnectionMetadata(applicationId) { return `/applications/${applicationId}/role-connections/metadata`; }, /** * Route for: * - GET `/guilds/{guild.id}/auto-moderation/rules` * - POST `/guilds/{guild.id}/auto-moderation/rules` */ guildAutoModerationRules(guildId) { return `/guilds/${guildId}/auto-moderation/rules`; }, /** * Routes for: * - GET `/guilds/{guild.id}/auto-moderation/rules/{rule.id}` * - PATCH `/guilds/{guild.id}/auto-moderation/rules/{rule.id}` * - DELETE `/guilds/{guild.id}/auto-moderation/rules/{rule.id}` */ guildAutoModerationRule(guildId, ruleId) { return `/guilds/${guildId}/auto-moderation/rules/${ruleId}`; }, /** * Route for: * - GET `/guilds/{guild.id}/audit-logs` */ guildAuditLog(guildId) { return `/guilds/${guildId}/audit-logs`; }, /** * Route for: * - GET `/channels/{channel.id}` * - PATCH `/channels/{channel.id}` * - DELETE `/channels/{channel.id}` */ channel(channelId) { return `/channels/${channelId}`; }, /** * Route for: * - GET `/channels/{channel.id}/messages` * - POST `/channels/{channel.id}/messages` */ channelMessages(channelId) { return `/channels/${channelId}/messages`; }, /** * Route for: * - GET `/channels/{channel.id}/messages/{message.id}` * - PATCH `/channels/{channel.id}/messages/{message.id}` * - DELETE `/channels/{channel.id}/messages/{message.id}` */ channelMessage(channelId, messageId) { return `/channels/${channelId}/messages/${messageId}`; }, /** * Route for: * - POST `/channels/{channel.id}/messages/{message.id}/crosspost` */ channelMessageCrosspost(channelId, messageId) { return `/channels/${channelId}/messages/${messageId}/crosspost`; }, /** * Route for: * - PUT `/channels/{channel.id}/messages/{message.id}/reactions/{emoji}/@me` * - DELETE `/channels/{channel.id}/messages/{message.id}/reactions/{emoji}/@me` * * **Note**: You need to URL encode the emoji yourself */ channelMessageOwnReaction(channelId, messageId, emoji) { return `/channels/${channelId}/messages/${messageId}/reactions/${emoji}/@me`; }, /** * Route for: * - DELETE `/channels/{channel.id}/messages/{message.id}/reactions/{emoji}/{user.id}` * * **Note**: You need to URL encode the emoji yourself */ channelMessageUserReaction(channelId, messageId, emoji, userId) { return `/channels/${channelId}/messages/${messageId}/reactions/${emoji}/${userId}`; }, /** * Route for: * - GET `/channels/{channel.id}/messages/{message.id}/reactions/{emoji}` * - DELETE `/channels/{channel.id}/messages/{message.id}/reactions/{emoji}` * * **Note**: You need to URL encode the emoji yourself */ channelMessageReaction(channelId, messageId, emoji) { return `/channels/${channelId}/messages/${messageId}/reactions/${emoji}`; }, /** * Route for: * - DELETE `/channels/{channel.id}/messages/{message.id}/reactions` */ channelMessageAllReactions(channelId, messageId) { return `/channels/${channelId}/messages/${messageId}/reactions`; }, /** * Route for: * - POST `/channels/{channel.id}/messages/bulk-delete` */ channelBulkDelete(channelId) { return `/channels/${channelId}/messages/bulk-delete`; }, /** * Route for: * - PUT `/channels/{channel.id}/permissions/{overwrite.id}` * - DELETE `/channels/{channel.id}/permissions/{overwrite.id}` */ channelPermission(channelId, overwriteId) { return `/channels/${channelId}/permissions/${overwriteId}`; }, /** * Route for: * - GET `/channels/{channel.id}/invites` * - POST `/channels/{channel.id}/invites` */ channelInvites(channelId) { return `/channels/${channelId}/invites`; }, /** * Route for: * - POST `/channels/{channel.id}/followers` */ channelFollowers(channelId) { return `/channels/${channelId}/followers`; }, /** * Route for: * - POST `/channels/{channel.id}/typing` */ channelTyping(channelId) { return `/channels/${channelId}/typing`; }, /** * Route for: * - GET `/channels/{channel.id}/pins` */ channelPins(channelId) { return `/channels/${channelId}/pins`; }, /** * Route for: * - PUT `/channels/{channel.id}/pins/{message.id}` * - DELETE `/channels/{channel.id}/pins/{message.id}` */ channelPin(channelId, messageId) { return `/channels/${channelId}/pins/${messageId}`; }, /** * Route for: * - PUT `/channels/{channel.id}/recipients/{user.id}` * - DELETE `/channels/{channel.id}/recipients/{user.id}` */ channelRecipient(channelId, userId) { return `/channels/${channelId}/recipients/${userId}`; }, /** * Route for: * - GET `/guilds/{guild.id}/emojis` * - POST `/guilds/{guild.id}/emojis` */ guildEmojis(guildId) { return `/guilds/${guildId}/emojis`; }, /** * Route for: * - GET `/guilds/{guild.id}/emojis/{emoji.id}` * - PATCH `/guilds/{guild.id}/emojis/{emoji.id}` * - DELETE `/guilds/{guild.id}/emojis/{emoji.id}` */ guildEmoji(guildId, emojiId) { return `/guilds/${guildId}/emojis/${emojiId}`; }, /** * Route for: * - POST `/guilds` */ guilds() { return '/guilds'; }, /** * Route for: * - GET `/guilds/{guild.id}` * - PATCH `/guilds/{guild.id}` * - DELETE `/guilds/{guild.id}` */ guild(guildId) { return `/guilds/${guildId}`; }, /** * Route for: * - GET `/guilds/{guild.id}/preview` */ guildPreview(guildId) { return `/guilds/${guildId}/preview`; }, /** * Route for: * - GET `/guilds/{guild.id}/channels` * - POST `/guilds/{guild.id}/channels` * - PATCH `/guilds/{guild.id}/channels` */ guildChannels(guildId) { return `/guilds/${guildId}/channels`; }, /** * Route for: * - GET `/guilds/{guild.id}/members/{user.id}` * - PUT `/guilds/{guild.id}/members/{user.id}` * - PATCH `/guilds/{guild.id}/members/@me` * - PATCH `/guilds/{guild.id}/members/{user.id}` * - DELETE `/guilds/{guild.id}/members/{user.id}` */ guildMember(guildId, userId = '@me') { return `/guilds/${guildId}/members/${userId}`; }, /** * Route for: * - GET `/guilds/{guild.id}/members` */ guildMembers(guildId) { return `/guilds/${guildId}/members`; }, /** * Route for: * - GET `/guilds/{guild.id}/members/search` */ guildMembersSearch(guildId) { return `/guilds/${guildId}/members/search`; }, /** * Route for: * - PATCH `/guilds/{guild.id}/members/@me/nick` * * @deprecated Use {@link Routes.guildMember} instead. */ guildCurrentMemberNickname(guildId) { return `/guilds/${guildId}/members/@me/nick`; }, /** * Route for: * - PUT `/guilds/{guild.id}/members/{user.id}/roles/{role.id}` * - DELETE `/guilds/{guild.id}/members/{user.id}/roles/{role.id}` */ guildMemberRole(guildId, memberId, roleId) { return `/guilds/${guildId}/members/${memberId}/roles/${roleId}`; }, /** * Route for: * - POST `/guilds/{guild.id}/mfa` */ guildMFA(guildId) { return `/guilds/${guildId}/mfa`; }, /** * Route for: * - GET `/guilds/{guild.id}/bans` */ guildBans(guildId) { return `/guilds/${guildId}/bans`; }, /** * Route for: * - GET `/guilds/{guild.id}/bans/{user.id}` * - PUT `/guilds/{guild.id}/bans/{user.id}` * - DELETE `/guilds/{guild.id}/bans/{user.id}` */ guildBan(guildId, userId) { return `/guilds/${guildId}/bans/${userId}`; }, /** * Route for: * - GET `/guilds/{guild.id}/roles` * - POST `/guilds/{guild.id}/roles` * - PATCH `/guilds/{guild.id}/roles` */ guildRoles(guildId) { return `/guilds/${guildId}/roles`; }, /** * Route for: * - GET `/guilds/{guild.id}/roles/{role.id}` * - PATCH `/guilds/{guild.id}/roles/{role.id}` * - DELETE `/guilds/{guild.id}/roles/{role.id}` */ guildRole(guildId, roleId) { return `/guilds/${guildId}/roles/${roleId}`; }, /** * Route for: * - GET `/guilds/{guild.id}/prune` * - POST `/guilds/{guild.id}/prune` */ guildPrune(guildId) { return `/guilds/${guildId}/prune`; }, /** * Route for: * - GET `/guilds/{guild.id}/regions` */ guildVoiceRegions(guildId) { return `/guilds/${guildId}/regions`; }, /** * Route for: * - GET `/guilds/{guild.id}/invites` */ guildInvites(guildId) { return `/guilds/${guildId}/invites`; }, /** * Route for: * - GET `/guilds/{guild.id}/integrations` */ guildIntegrations(guildId) { return `/guilds/${guildId}/integrations`; }, /** * Route for: * - DELETE `/guilds/{guild.id}/integrations/{integration.id}` */ guildIntegration(guildId, integrationId) { return `/guilds/${guildId}/integrations/${integrationId}`; }, /** * Route for: * - GET `/guilds/{guild.id}/widget` * - PATCH `/guilds/{guild.id}/widget` */ guildWidgetSettings(guildId) { return `/guilds/${guildId}/widget`; }, /** * Route for: * - GET `/guilds/{guild.id}/widget.json` */ guildWidgetJSON(guildId) { return `/guilds/${guildId}/widget.json`; }, /** * Route for: * - GET `/guilds/{guild.id}/vanity-url` */ guildVanityUrl(guildId) { return `/guilds/${guildId}/vanity-url`; }, /** * Route for: * - GET `/guilds/{guild.id}/widget.png` */ guildWidgetImage(guildId) { return `/guilds/${guildId}/widget.png`; }, /** * Route for: * - GET `/invites/{invite.code}` * - DELETE `/invites/{invite.code}` */ invite(code) { return `/invites/${code}`; }, /** * Route for: * - GET `/guilds/templates/{template.code}` * - POST `/guilds/templates/{template.code}` */ template(code) { return `/guilds/templates/${code}`; }, /** * Route for: * - GET `/guilds/{guild.id}/templates` * - POST `/guilds/{guild.id}/templates` */ guildTemplates(guildId) { return `/guilds/${guildId}/templates`; }, /** * Route for: * - PUT `/guilds/{guild.id}/templates/{template.code}` * - PATCH `/guilds/{guild.id}/templates/{template.code}` * - DELETE `/guilds/{guild.id}/templates/{template.code}` */ guildTemplate(guildId, code) { return `/guilds/${guildId}/templates/${code}`; }, /** * Route for: * - GET `/channels/{channel.id}/polls/{message.id}/answers/{answer_id}` */ pollAnswerVoters(channelId, messageId, answerId) { return `/channels/${channelId}/polls/${messageId}/answers/${answerId}`; }, /** * Route for: * - POST `/channels/{channel.id}/polls/{message.id}/expire` */ expirePoll(channelId, messageId) { return `/channels/${channelId}/polls/${messageId}/expire`; }, /** * Route for: * - POST `/channels/{channel.id}/threads` * - POST `/channels/{channel.id}/messages/{message.id}/threads` */ threads(parentId, messageId) { const parts = ['', 'channels', parentId]; if (messageId) parts.push('messages', messageId); parts.push('threads'); return parts.join('/'); }, /** * Route for: * - GET `/guilds/{guild.id}/threads/active` */ guildActiveThreads(guildId) { return `/guilds/${guildId}/threads/active`; }, /** * Route for: * - GET `/channels/{channel.id}/threads/archived/public` * - GET `/channels/{channel.id}/threads/archived/private` */ channelThreads(channelId, archivedStatus) { return `/channels/${channelId}/threads/archived/${archivedStatus}`; }, /** * Route for: * - GET `/channels/{channel.id}/users/@me/threads/archived/private` */ channelJoinedArchivedThreads(channelId) { return `/channels/${channelId}/users/@me/threads/archived/private`; }, /** * Route for: * - GET `/channels/{thread.id}/thread-members` * - GET `/channels/{thread.id}/thread-members/{user.id}` * - PUT `/channels/{thread.id}/thread-members/@me` * - PUT `/channels/{thread.id}/thread-members/{user.id}` * - DELETE `/channels/{thread.id}/thread-members/@me` * - DELETE `/channels/{thread.id}/thread-members/{user.id}` */ threadMembers(threadId, userId) { const parts = ['', 'channels', threadId, 'thread-members']; if (userId) parts.push(userId); return parts.join('/'); }, /** * Route for: * - GET `/users/@me` * - GET `/users/{user.id}` * - PATCH `/users/@me` * * @param userId - The user ID, defaulted to `@me` */ user(userId = '@me') { return `/users/${userId}`; }, /** * Route for: * - GET `/users/@me/applications/{application.id}/role-connection` * - PUT `/users/@me/applications/{application.id}/role-connection` */ userApplicationRoleConnection(applicationId) { return `/users/@me/applications/${applicationId}/role-connection`; }, /** * Route for: * - GET `/users/@me/guilds` */ userGuilds() { return `/users/@me/guilds`; }, /** * Route for: * - GET `/users/@me/guilds/{guild.id}/member` */ userGuildMember(guildId) { return `/users/@me/guilds/${guildId}/member`; }, /** * Route for: * - DELETE `/users/@me/guilds/{guild.id}` */ userGuild(guildId) { return `/users/@me/guilds/${guildId}`; }, /** * Route for: * - POST `/users/@me/channels` */ userChannels() { return `/users/@me/channels`; }, /** * Route for: * - GET `/users/@me/connections` */ userConnections() { return `/users/@me/connections`; }, /** * Route for: * - GET `/voice/regions` */ voiceRegions() { return `/voice/regions`; }, /** * Route for: * - GET `/channels/{channel.id}/webhooks` * - POST `/channels/{channel.id}/webhooks` */ channelWebhooks(channelId) { return `/channels/${channelId}/webhooks`; }, /** * Route for: * - GET `/guilds/{guild.id}/webhooks` */ guildWebhooks(guildId) { return `/guilds/${guildId}/webhooks`; }, /** * Route for: * - GET `/webhooks/{webhook.id}` * - GET `/webhooks/{webhook.id}/{webhook.token}` * - PATCH `/webhooks/{webhook.id}` * - PATCH `/webhooks/{webhook.id}/{webhook.token}` * - DELETE `/webhooks/{webhook.id}` * - DELETE `/webhooks/{webhook.id}/{webhook.token}` * - POST `/webhooks/{webhook.id}/{webhook.token}` * * - POST `/webhooks/{application.id}/{interaction.token}` */ webhook(webhookId, webhookToken) { const parts = ['', 'webhooks', webhookId]; if (webhookToken) parts.push(webhookToken); return parts.join('/'); }, /** * Route for: * - GET `/webhooks/{webhook.id}/{webhook.token}/messages/@original` * - GET `/webhooks/{webhook.id}/{webhook.token}/messages/{message.id}` * - PATCH `/webhooks/{webhook.id}/{webhook.token}/messages/@original` * - PATCH `/webhooks/{webhook.id}/{webhook.token}/messages/{message.id}` * - DELETE `/webhooks/{webhook.id}/{webhook.token}/messages/@original` * - DELETE `/webhooks/{webhook.id}/{webhook.token}/messages/{message.id}` * * - PATCH `/webhooks/{application.id}/{interaction.token}/messages/@original` * - PATCH `/webhooks/{application.id}/{interaction.token}/messages/{message.id}` * - DELETE `/webhooks/{application.id}/{interaction.token}/messages/{message.id}` */ webhookMessage(webhookId, webhookToken, messageId = '@original') { return `/webhooks/${webhookId}/${webhookToken}/messages/${messageId}`; }, /** * Route for: * - POST `/webhooks/{webhook.id}/{webhook.token}/github` * - POST `/webhooks/{webhook.id}/{webhook.token}/slack` */ webhookPlatform(webhookId, webhookToken, platform) { return `/webhooks/${webhookId}/${webhookToken}/${platform}`; }, /** * Route for: * - GET `/gateway` */ gateway() { return `/gateway`; }, /** * Route for: * - GET `/gateway/bot` */ gatewayBot() { return `/gateway/bot`; }, /** * Route for: * - GET `/oauth2/applications/@me` */ oauth2CurrentApplication() { return `/oauth2/applications/@me`; }, /** * Route for: * - GET `/oauth2/@me` */ oauth2CurrentAuthorization() { return `/oauth2/@me`; }, /** * Route for: * - GET `/oauth2/authorize` */ oauth2Authorization() { return `/oauth2/authorize`; }, /** * Route for: * - POST `/oauth2/token` */ oauth2TokenExchange() { return `/oauth2/token`; }, /** * Route for: * - POST `/oauth2/token/revoke` */ oauth2TokenRevocation() { return `/oauth2/token/revoke`; }, /** * Route for: * - GET `/applications/{application.id}/commands` * - PUT `/applications/{application.id}/commands` * - POST `/applications/{application.id}/commands` */ applicationCommands(applicationId) { return `/applications/${applicationId}/commands`; }, /** * Route for: * - GET `/applications/{application.id}/commands/{command.id}` * - PATCH `/applications/{application.id}/commands/{command.id}` * - DELETE `/applications/{application.id}/commands/{command.id}` */ applicationCommand(applicationId, commandId) { return `/applications/${applicationId}/commands/${commandId}`; }, /** * Route for: * - GET `/applications/{application.id}/guilds/{guild.id}/commands` * - PUT `/applications/{application.id}/guilds/{guild.id}/commands` * - POST `/applications/{application.id}/guilds/{guild.id}/commands` */ applicationGuildCommands(applicationId, guildId) { return `/applications/${applicationId}/guilds/${guildId}/commands`; }, /** * Route for: * - GET `/applications/{application.id}/guilds/{guild.id}/commands/{command.id}` * - PATCH `/applications/{application.id}/guilds/{guild.id}/commands/{command.id}` * - DELETE `/applications/{application.id}/guilds/{guild.id}/commands/{command.id}` */ applicationGuildCommand(applicationId, guildId, commandId) { return `/applications/${applicationId}/guilds/${guildId}/commands/${commandId}`; }, /** * Route for: * - POST `/interactions/{interaction.id}/{interaction.token}/callback` */ interactionCallback(interactionId, interactionToken) { return `/interactions/${interactionId}/${interactionToken}/callback`; }, /** * Route for: * - GET `/guilds/{guild.id}/member-verification` * - PATCH `/guilds/{guild.id}/member-verification` */ guildMemberVerification(guildId) { return `/guilds/${guildId}/member-verification`; }, /** * Route for: * - GET `/guilds/{guild.id}/voice-states/@me` * - GET `/guilds/{guild.id}/voice-states/{user.id}` * - PATCH `/guilds/{guild.id}/voice-states/@me` * - PATCH `/guilds/{guild.id}/voice-states/{user.id}` */ guildVoiceState(guildId, userId = '@me') { return `/guilds/${guildId}/voice-states/${userId}`; }, /** * Route for: * - GET `/applications/{application.id}/guilds/{guild.id}/commands/permissions` * - PUT `/applications/{application.id}/guilds/{guild.id}/commands/permissions` */ guildApplicationCommandsPermissions(applicationId, guildId) { return `/applications/${applicationId}/guilds/${guildId}/commands/permissions`; }, /** * Route for: * - GET `/applications/{application.id}/guilds/{guild.id}/commands/{command.id}/permissions` * - PUT `/applications/{application.id}/guilds/{guild.id}/commands/{command.id}/permissions` */ applicationCommandPermissions(applicationId, guildId, commandId) { return `/applications/${applicationId}/guilds/${guildId}/commands/${commandId}/permissions`; }, /** * Route for: * - GET `/guilds/{guild.id}/welcome-screen` * - PATCH `/guilds/{guild.id}/welcome-screen` */ guildWelcomeScreen(guildId) { return `/guilds/${guildId}/welcome-screen`; }, /** * Route for: * - POST `/stage-instances` */ stageInstances() { return `/stage-instances`; }, /** * Route for: * - GET `/stage-instances/{channel.id}` * - PATCH `/stage-instances/{channel.id}` * - DELETE `/stage-instances/{channel.id}` */ stageInstance(channelId) { return `/stage-instances/${channelId}`; }, /** * Route for: * - GET `/stickers/{sticker.id}` */ sticker(stickerId) { return `/stickers/${stickerId}`; }, /** * Route for: * - GET `/sticker-packs` */ stickerPacks() { return '/sticker-packs'; }, /** * Route for: * - GET `/sticker-packs/{pack.id}` */ stickerPack(packId) { return `/sticker-packs/${packId}`; }, /** * Route for: * - GET `/sticker-packs` * * @deprecated Use {@link Routes.stickerPacks} instead. */ nitroStickerPacks() { return '/sticker-packs'; }, /** * Route for: * - GET `/guilds/{guild.id}/stickers` * - POST `/guilds/{guild.id}/stickers` */ guildStickers(guildId) { return `/guilds/${guildId}/stickers`; }, /** * Route for: * - GET `/guilds/{guild.id}/stickers/{sticker.id}` * - PATCH `/guilds/{guild.id}/stickers/{sticker.id}` * - DELETE `/guilds/{guild.id}/stickers/{sticker.id}` */ guildSticker(guildId, stickerId) { return `/guilds/${guildId}/stickers/${stickerId}`; }, /** * Route for: * - GET `/guilds/{guild.id}/scheduled-events` * - POST `/guilds/{guild.id}/scheduled-events` */ guildScheduledEvents(guildId) { return `/guilds/${guildId}/scheduled-events`; }, /** * Route for: * - GET `/guilds/{guild.id}/scheduled-events/{guildScheduledEvent.id}` * - PATCH `/guilds/{guild.id}/scheduled-events/{guildScheduledEvent.id}` * - DELETE `/guilds/{guild.id}/scheduled-events/{guildScheduledEvent.id}` */ guildScheduledEvent(guildId, guildScheduledEventId) { return `/guilds/${guildId}/scheduled-events/${guildScheduledEventId}`; }, /** * Route for: * - GET `/guilds/{guild.id}/scheduled-events/{guildScheduledEvent.id}/users` */ guildScheduledEventUsers(guildId, guildScheduledEventId) { return `/guilds/${guildId}/scheduled-events/${guildScheduledEventId}/users`; }, /** * Route for: * - GET `/guilds/{guild.id}/onboarding` * - PUT `/guilds/{guild.id}/onboarding` */ guildOnboarding(guildId) { return `/guilds/${guildId}/onboarding`; }, /** * Route for: * - PUT `/guilds/${guild.id}/incident-actions` */ guildIncidentActions(guildId) { return `/guilds/${guildId}/incident-actions`; }, /** * Route for: * - GET `/applications/@me` * - PATCH `/applications/@me` */ currentApplication() { return '/applications/@me'; }, /** * Route for: * - GET `/applications/{application.id}/entitlements` * - POST `/applications/{application.id}/entitlements` */ entitlements(applicationId) { return `/applications/${applicationId}/entitlements`; }, /** * Route for: * - GET `/applications/{application.id}/entitlements/{entitlement.id}` * - DELETE `/applications/{application.id}/entitlements/{entitlement.id}` */ entitlement(applicationId, entitlementId) { return `/applications/${applicationId}/entitlements/${entitlementId}`; }, /** * Route for: * - GET `/applications/{application.id}/skus` */ skus(applicationId) { return `/applications/${applicationId}/skus`; }, /** * Route for: * - POST `/guilds/{guild.id}/bulk-ban` */ guildBulkBan(guildId) { return `/guilds/${guildId}/bulk-ban`; }, /** * Route for: * - POST `/applications/{application.id}/entitlements/{entitlement.id}/consume` */ consumeEntitlement(applicationId, entitlementId) { return `/applications/${applicationId}/entitlements/${entitlementId}/consume`; }, /** * Route for: * - GET `/applications/{application.id}/emojis` * - POST `/applications/{application.id}/emojis` */ applicationEmojis(applicationId) { return `/applications/${applicationId}/emojis`; }, /** * Route for: * - GET `/applications/{application.id}/emojis/{emoji.id}` * - PATCH `/applications/{application.id}/emojis/{emoji.id}` * - DELETE `/applications/{application.id}/emojis/{emoji.id}` */ applicationEmoji(applicationId, emojiId) { return `/applications/${applicationId}/emojis/${emojiId}`; }, /** * Route for: * - GET `/skus/{sku.id}/subscriptions` */ skuSubscriptions(skuId) { return `/skus/${skuId}/subscriptions`; }, /** * Route for: * - GET `/skus/{sku.id}/subscriptions/{subscription.id}` */ skuSubscription(skuId, subscriptionId) { return `/skus/${skuId}/subscriptions/${subscriptionId}`; }, /** * Route for: * - POST `/channels/{channel.id}/send-soundboard-sound` */ sendSoundboardSound(channelId) { return `/channels/${channelId}/send-soundboard-sound`; }, /** * Route for: * - GET `/soundboard-default-sounds` */ soundboardDefaultSounds() { return '/soundboard-default-sounds'; }, /** * Route for: * - GET `/guilds/{guild.id}/soundboard-sounds` * - POST `/guilds/{guild.id}/soundboard-sounds` */ guildSoundboardSounds(guildId) { return `/guilds/${guildId}/soundboard-sounds`; }, /** * Route for: * - GET `/guilds/{guild.id}/soundboard-sounds/{sound.id}` * - PATCH `/guilds/{guild.id}/soundboard-sounds/{sound.id}` * - DELETE `/guilds/{guild.id}/soundboard-sounds/{sound.id}` */ guildSoundboardSound(guildId, soundId) { return `/guilds/${guildId}/soundboard-sounds/${soundId}`; }, }; for (const [key, fn] of Object.entries(exports.Routes)) { exports.Routes[key] = (...args) => { const escaped = args.map((arg) => { if (arg) { // Skip already "safe" urls if (internals_1.urlSafeCharacters.test(String(arg))) { return arg; } return encodeURIComponent(arg); } return arg; }); // eslint-disable-next-line no-useless-call return fn.call(null, ...escaped); }; } // Freeze the object so it can't be changed Object.freeze(exports.Routes); exports.StickerPackApplicationId = '710982414301790216'; var ImageFormat; (function (ImageFormat) { ImageFormat["JPEG"] = "jpeg"; ImageFormat["PNG"] = "png"; ImageFormat["WebP"] = "webp"; ImageFormat["GIF"] = "gif"; ImageFormat["Lottie"] = "json"; })(ImageFormat || (exports.ImageFormat = ImageFormat = {})); exports.CDNRoutes = { /** * Route for: * - GET `/emojis/{emoji.id}.{png|jpeg|webp|gif}` * * As this route supports GIFs, the hash will begin with `a_` if it is available in GIF format * * This route supports the extensions: PNG, JPEG, WebP, GIF */ emoji(emojiId, format) { return `/emojis/${emojiId}.${format}`; }, /** * Route for: * - GET `/icons/{guild.id}/{guild.icon}.{png|jpeg|webp|gif}` * * As this route supports GIFs, the hash will begin with `a_` if it is available in GIF format * * This route supports the extensions: PNG, JPEG, WebP, GIF */ guildIcon(guildId, guildIcon, format) { return `/icons/${guildId}/${guildIcon}.${format}`; }, /** * Route for: * - GET `/splashes/{guild.id}/{guild.splash}.{png|jpeg|webp}` * * This route supports the extensions: PNG, JPEG, WebP */ guildSplash(guildId, guildSplash, format) { return `/splashes/${guildId}/${guildSplash}.${format}`; }, /** * Route for: * - GET `/discovery-splashes/{guild.id}/{guild.discovery_splash}.{png|jpeg|webp}` * * This route supports the extensions: PNG, JPEG, WebP */ guildDiscoverySplash(guildId, guildDiscoverySplash, format) { return `/discovery-splashes/${guildId}/${guildDiscoverySplash}.${format}`; }, /** * Route for: * - GET `/banners/{guild.id}/{guild.banner}.{png|jpeg|webp|gif}` * * As this route supports GIFs, the hash will begin with `a_` if it is available in GIF format * * This route supports the extensions: PNG, JPEG, WebP, GIF */ guildBanner(guildId, guildBanner, format) { return `/banners/${guildId}/${guildBanner}.${format}`; }, /** * Route for: * - GET `/banners/{user.id}/{user.banner}.{png|jpeg|webp|gif}` * * As this route supports GIFs, the hash will begin with `a_` if it is available in GIF format * * This route supports the extensions: PNG, JPEG, WebP, GIF */ userBanner(userId, userBanner, format) { return `/banners/${userId}/${userBanner}.${format}`; }, /** * Route for: * - GET `/embed/avatars/{index}.png` * * The value for `index` parameter depends on whether the user is {@link https://discord.com/developers/docs/change-log#unique-usernames-on-discord | migrated to the new username system}. * For users on the new username system, `index` will be `(user.id >> 22) % 6`. * For users on the legacy username system, `index` will be `user.discriminator % 5`. * * This route supports the extension: PNG */ defaultUserAvatar(index) { return `/embed/avatars/${index}.png`; }, /** * Route for: * - GET `/avatars/{user.id}/{user.avatar}.{png|jpeg|webp|gif}` * * As this route supports GIFs, the hash will begin with `a_` if it is available in GIF format * * This route supports the extensions: PNG, JPEG, WebP, GIF */ userAvatar(userId, userAvatar, format) { return `/avatars/${userId}/${userAvatar}.${format}`; }, /** * Route for: * - GET `/guilds/{guild.id}/users/{user.id}/avatars/{guild_member.avatar}.{png|jpeg|webp|gif}` * * As this route supports GIFs, the hash will begin with `a_` if it is available in GIF format * * This route supports the extensions: PNG, JPEG, WebP, GIF */ guildMemberAvatar(guildId, userId, memberAvatar, format) { return `/guilds/${guildId}/users/${userId}/avatars/${memberAvatar}.${format}`; }, /** * Route for: * - GET `/avatar-decorations/{user.id}/{user.avatar_decoration}.png` * * This route supports the extension: PNG * * @deprecated Use {@link CDNRoutes.avatarDecoration} instead. */ userAvatarDecoration(userId, userAvatarDecoration) { return `/avatar-decorations/${userId}/${userAvatarDecoration}.png`; }, /** * Route for: * - GET `/avatar-decoration-presets/{avatar_decoration_data_asset}.png` * * This route supports the extension: PNG */ avatarDecoration(avatarDecorationDataAsset) { return `/avatar-decoration-presets/${avatarDecorationDataAsset}.png`; }, /** * Route for: * - GET `/app-icons/{application.id}/{application.icon}.{png|jpeg|webp}` * * This route supports the extensions: PNG, JPEG, WebP */ applicationIcon(applicationId, applicationIcon, format) { return `/app-icons/${applicationId}/${applicationIcon}.${format}`; }, /** * Route for: * - GET `/app-icons/{application.id}/{application.cover_image}.{png|jpeg|webp}` * * This route supports the extensions: PNG, JPEG, WebP */ applicationCover(applicationId, applicationCoverImage, format) { return `/app-icons/${applicationId}/${applicationCoverImage}.${format}`; }, /** * Route for: * - GET `/app-assets/{application.id}/{application.asset_id}.{png|jpeg|webp}` * * This route supports the extensions: PNG, JPEG, WebP */ applicationAsset(applicationId, applicationAssetId, format) { return `/app-assets/${applicationId}/${applicationAssetId}.${format}`; }, /** * Route for: * - GET `/app-assets/{application.id}/achievements/{achievement.id}/icons/{achievement.icon}.{png|jpeg|webp}` * * This route supports the extensions: PNG, JPEG, WebP */ achievementIcon(applicationId, achievementId, achievementIconHash, format) { return `/app-assets/${applicationId}/achievements/${achievementId}/icons/${achievementIconHash}.${format}`; }, /** * Route for: * - GET `/app-assets/710982414301790216/store/{sticker_pack.banner.asset_id}.{png|jpeg|webp}` * * This route supports the extensions: PNG, JPEG, WebP */ stickerPackBanner(stickerPackBannerAssetId, format) { return `/app-assets/${exports.StickerPackApplicationId}/store/${stickerPackBannerAssetId}.${format}`; }, /** * Route for: * - GET `/app-assets/${application.id}/store/${asset.id}.{png|jpeg|webp}}` * * This route supports the extensions: PNG, JPEG, WebP */ storePageAsset(applicationId, assetId, format = ImageFormat.PNG) { return `/app-assets/${applicationId}/store/${assetId}.${format}`; }, /** * Route for: * - GET `/team-icons/{team.id}/{team.icon}.{png|jpeg|webp}` * * This route supports the extensions: PNG, JPEG, WebP */ teamIcon(teamId, teamIcon, format) { return `/team-icons/${teamId}/${teamIcon}.${format}`; }, /** * Route for: * - GET `/stickers/{sticker.id}.{png|json}` * * This route supports the extensions: PNG, Lottie, GIF */ sticker(stickerId, format) { return `/stickers/${stickerId}.${format}`; }, /** * Route for: * - GET `/role-icons/{role.id}/{role.icon}.{png|jpeg|webp}` * * This route supports the extensions: PNG, JPEG, WebP */ roleIcon(roleId, roleIcon, format) { return `/role-icons/${roleId}/${roleIcon}.${format}`; }, /** * Route for: * - GET `/guild-events/{guild_scheduled_event.id}/{guild_scheduled_event.image}.{png|jpeg|webp}` * * This route supports the extensions: PNG, JPEG, WebP */ guildScheduledEventCover(guildScheduledEventId, guildScheduledEventCoverImage, format) { return `/guild-events/${guildScheduledEventId}/${guildScheduledEventCoverImage}.${format}`; }, /** * Route for: * - GET `/guilds/${guild.id}/users/${user.id}/banners/${guild_member.banner}.{png|jpeg|webp|gif}` * * This route supports the extensions: PNG, JPEG, WebP, GIF */ guildMemberBanner(guildId, userId, guildMemberBanner, format) { return `/guilds/${guildId}/users/${userId}/banners/${guildMemberBanner}.${format}`; }, /** * Route for: * - GET `/soundboard-sounds/${sound.id}` */ soundboardSound(soundId) { return `/soundboard-sounds/${soundId}`; }, }; for (const [key, fn] of Object.entries(exports.CDNRoutes)) { exports.CDNRoutes[key] = (...args) => { const escaped = args.map((arg) => { if (arg) { // Skip already "safe" urls if (internals_1.urlSafeCharacters.test(String(arg))) { return arg; } return encodeURIComponent(arg); } return arg; }); // eslint-disable-next-line no-useless-call return fn.call(null, ...escaped); }; } // Freeze the object so it can't be changed Object.freeze(exports.CDNRoutes); exports.RouteBases = { api: `https://discord.com/api/v${exports.APIVersion}`, cdn: 'https://cdn.discordapp.com', media: 'https://media.discordapp.net', invite: 'https://discord.gg', template: 'https://discord.new', gift: 'https://discord.gift', scheduledEvent: 'https://discord.com/events', }; // Freeze bases object Object.freeze(exports.RouteBases); exports.OAuth2Routes = { authorizationURL: `${exports.RouteBases.api}${exports.Routes.oauth2Authorization()}`, tokenURL: `${exports.RouteBases.api}${exports.Routes.oauth2TokenExchange()}`, /** * @see {@link https://tools.ietf.org/html/rfc7009} */ tokenRevocationURL: `${exports.RouteBases.api}${exports.Routes.oauth2TokenRevocation()}`, }; // Freeze OAuth2 route object Object.freeze(exports.OAuth2Routes); //# sourceMappingURL=index.js.map node_modules/discord-api-types/rest/v10/voice.d.ts.map 0000664 00000001503 15114741631 0016623 0 ustar 00 {"version":3,"file":"voice.d.ts","sourceRoot":"","sources":["voice.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC/C,OAAO,KAAK,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AAE9E;;GAEG;AACH,MAAM,MAAM,4BAA4B,GAAG,cAAc,EAAE,CAAC;AAE5D;;GAEG;AACH,MAAM,MAAM,wBAAwB,GAAG,4BAA4B,CAAC;AAEpE;;GAEG;AACH,MAAM,MAAM,4CAA4C,GAAG,aAAa,CAAC;AAEzE;;GAEG;AACH,MAAM,MAAM,mCAAmC,GAAG,aAAa,CAAC;AAEhE;;GAEG;AACH,MAAM,WAAW,gDAAgD;IAChE;;OAEG;IACH,UAAU,CAAC,EAAE,SAAS,GAAG,SAAS,CAAC;IACnC;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IAC/B;;OAEG;IACH,0BAA0B,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;CACvD;AAED;;GAEG;AACH,MAAM,MAAM,8CAA8C,GAAG,KAAK,CAAC;AAEnE;;GAEG;AACH,MAAM,WAAW,uCAAuC;IACvD;;OAEG;IACH,UAAU,EAAE,SAAS,CAAC;IACtB;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;CAC/B;AAED;;GAEG;AACH,MAAM,MAAM,qCAAqC,GAAG,KAAK,CAAC"} node_modules/discord-api-types/rest/v10/emoji.d.ts.map 0000664 00000002277 15114741631 0016632 0 ustar 00 {"version":3,"file":"emoji.d.ts","sourceRoot":"","sources":["emoji.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC/C,OAAO,KAAK,EAAE,mBAAmB,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAExE;;GAEG;AACH,MAAM,MAAM,2BAA2B,GAAG,QAAQ,EAAE,CAAC;AAErD;;GAEG;AACH,MAAM,MAAM,0BAA0B,GAAG,QAAQ,CAAC;AAElD;;GAEG;AACH,MAAM,WAAW,6BAA6B;IAC7C;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;;;OAIG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,KAAK,CAAC,EAAE,SAAS,EAAE,GAAG,SAAS,CAAC;CAChC;AAED;;GAEG;AACH,MAAM,MAAM,2BAA2B,GAAG,QAAQ,CAAC;AAEnD;;GAEG;AACH,MAAM,WAAW,8BAA8B;IAC9C;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC1B;;OAEG;IACH,KAAK,CAAC,EAAE,SAAS,EAAE,GAAG,IAAI,GAAG,SAAS,CAAC;CACvC;AAED;;GAEG;AACH,MAAM,MAAM,4BAA4B,GAAG,QAAQ,CAAC;AAEpD;;GAEG;AACH,MAAM,MAAM,6BAA6B,GAAG,KAAK,CAAC;AAElD;;GAEG;AACH,MAAM,WAAW,iCAAiC;IACjD,KAAK,EAAE,mBAAmB,EAAE,CAAC;CAC7B;AAED;;GAEG;AACH,MAAM,MAAM,gCAAgC,GAAG,mBAAmB,CAAC;AAEnE;;GAEG;AACH,MAAM,MAAM,mCAAmC,GAAG,IAAI,CAAC,6BAA6B,EAAE,OAAO,GAAG,MAAM,CAAC,CAAC;AAExG;;GAEG;AACH,MAAM,MAAM,iCAAiC,GAAG,mBAAmB,CAAC;AAEpE;;GAEG;AACH,MAAM,MAAM,oCAAoC,GAAG,IAAI,CAAC,8BAA8B,EAAE,MAAM,CAAC,CAAC;AAEhG;;GAEG;AACH,MAAM,MAAM,kCAAkC,GAAG,mBAAmB,CAAC;AAErE;;GAEG;AACH,MAAM,MAAM,mCAAmC,GAAG,KAAK,CAAC"} node_modules/discord-api-types/rest/v10/application.d.ts.map 0000664 00000001326 15114741631 0020024 0 ustar 00 {"version":3,"file":"application.d.ts","sourceRoot":"","sources":["application.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,oCAAoC,EAAE,MAAM,gCAAgC,CAAC;AAC3G,OAAO,KAAK,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAEvE;;GAEG;AACH,MAAM,MAAM,iDAAiD,GAAG,oCAAoC,EAAE,CAAC;AAEvG;;GAEG;AACH,MAAM,MAAM,mDAAmD,GAAG,oCAAoC,EAAE,CAAC;AAEzG;;GAEG;AACH,MAAM,MAAM,iDAAiD,GAAG,oCAAoC,EAAE,CAAC;AAEvG;;GAEG;AACH,MAAM,MAAM,+BAA+B,GAAG,cAAc,CAAC;AAE7D;;GAEG;AACH,MAAM,MAAM,mCAAmC,GAAG,cAAc,CAC/D,SAAS,CAAC,IAAI,CAAC,cAAc,EAAE,aAAa,GAAG,MAAM,CAAC,CAAC,GACtD,IAAI,CACH,cAAc,EACZ,oBAAoB,GACpB,aAAa,GACb,OAAO,GACP,gBAAgB,GAChB,0BAA0B,GAC1B,2BAA2B,GAC3B,mCAAmC,GACnC,MAAM,CACR,CACF,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,iCAAiC,GAAG,cAAc,CAAC"} node_modules/discord-api-types/rest/v10/interactions.js.map 0000664 00000000155 15114741631 0017766 0 ustar 00 {"version":3,"file":"interactions.js","sourceRoot":"","sources":["interactions.ts"],"names":[],"mappings":""} node_modules/discord-api-types/rest/v10/webhook.js.map 0000664 00000000143 15114741631 0016717 0 ustar 00 {"version":3,"file":"webhook.js","sourceRoot":"","sources":["webhook.ts"],"names":[],"mappings":""} node_modules/discord-api-types/rest/v10/template.js.map 0000664 00000000145 15114741631 0017076 0 ustar 00 {"version":3,"file":"template.js","sourceRoot":"","sources":["template.ts"],"names":[],"mappings":""} node_modules/discord-api-types/rest/v10/oauth2.d.ts.map 0000664 00000006563 15114741631 0016733 0 ustar 00 {"version":3,"file":"oauth2.d.ts","sourceRoot":"","sources":["oauth2.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC5D,OAAO,KAAK,EAAE,cAAc,EAAE,QAAQ,EAAE,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAE5G;;GAEG;AACH,MAAM,MAAM,wCAAwC,GAAG,IAAI,CAAC,cAAc,EAAE,OAAO,CAAC,CAAC;AAErF;;GAEG;AACH,MAAM,WAAW,0CAA0C;IAC1D;;OAEG;IACH,WAAW,EAAE,OAAO,CAAC,cAAc,CAAC,CAAC;IAC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,KAAK,EACF,GAAG,YAAY,CAAC,GAAG,IAAI,MAAM,EAAE,GAC/B,GAAG,YAAY,CAAC,GAAG,EAAE,GACrB,GAAG,MAAM,IAAI,YAAY,CAAC,GAAG,IAAI,MAAM,EAAE,GACzC,GAAG,MAAM,IAAI,YAAY,CAAC,GAAG,EAAE,CAAC;IACnC;;OAEG;IACH,WAAW,CAAC,EAAE,WAAW,CAAC;IAC1B,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAC/B,aAAa,EAAE,MAAM,CAAC;IACtB,YAAY,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,MAAM,WAAW,6CAA6C;IAC7D,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,SAAS,CAAC;IACpB,WAAW,EAAE,WAAW,CAAC;CACzB;AAED;;GAEG;AACH,MAAM,WAAW,oDAAoD;IACpE,YAAY,EAAE,MAAM,CAAC;IACrB,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;IACnB,aAAa,EAAE,MAAM,CAAC;IACtB,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,QAAQ,CAAC;CAChB;AAED;;GAEG;AACH,MAAM,WAAW,6DAA6D;IAC7E,YAAY,EAAE,MAAM,CAAC;IACrB,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;IACnB,aAAa,EAAE,MAAM,CAAC;IACtB,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,UAAU,CAAC;CACpB;AAED,MAAM,MAAM,sEAAsE,GACjF,oDAAoD,GACnD,6DAA6D,CAAC"} node_modules/discord-api-types/rest/v10/channel.d.ts.map 0000664 00000020661 15114741631 0017134 0 ustar 00 {"version":3,"file":"channel.d.ts","sourceRoot":"","sources":["channel.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,S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OAEG;IACH,QAAQ,EAAE,OAAO,CAAC;CAClB"} node_modules/discord-api-types/rest/v10/poll.d.ts.map 0000664 00000001262 15114741631 0016466 0 ustar 00 {"version":3,"file":"poll.d.ts","sourceRoot":"","sources":["poll.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC/C,OAAO,KAAK,EAAE,WAAW,EAAE,iBAAiB,EAAE,UAAU,EAAE,eAAe,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEtG;;GAEG;AACH,MAAM,WAAW,+BAA+B;IAC/C;;OAEG;IACH,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB;;;;OAIG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;CACf;AAED;;GAEG;AACH,MAAM,WAAW,WAAY,SAAQ,WAAW,EAAE,OAAO,CAAC,eAAe,CAAC;IACzE;;OAEG;IACH,OAAO,EAAE,iBAAiB,EAAE,CAAC;IAC7B;;;;OAIG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;CAClB;AAED;;GAEG;AACH,MAAM,MAAM,iBAAiB,GAAG,WAAW,CAAC;AAE5C;;GAEG;AACH,MAAM,WAAW,gCAAgC;IAChD;;OAEG;IACH,KAAK,EAAE,OAAO,EAAE,CAAC;CACjB;AAED;;GAEG;AACH,MAAM,MAAM,2BAA2B,GAAG,UAAU,CAAC"} node_modules/discord-api-types/rest/v10/invite.js 0000664 00000000157 15114741631 0016010 0 ustar 00 "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); //# sourceMappingURL=invite.js.map node_modules/discord-api-types/rest/v10/channel.d.ts 0000664 00000061050 15114741631 0016355 0 ustar 00 import type { Permissions, Snowflake } from '../../globals'; import type { APIAllowedMentions, APIChannel, APIEmbed, APIExtendedInvite, APIFollowedChannel, APIMessage, APIMessageReference, APIThreadList, APIThreadMember, APIUser, ChannelType, InviteTargetType, MessageFlags, OverwriteType, ThreadAutoArchiveDuration, ThreadChannelType, VideoQualityMode, APIGuildForumTag, APIGuildForumDefaultReactionEmoji, SortOrderType, ForumLayoutType, ChannelFlags, APIAttachment, APIMessageTopLevelComponent } from '../../payloads/v10/index'; import type { _AddUndefinedToPossiblyUndefinedPropertiesOfInterface, _StrictPartial } from '../../utils/internals'; import type { RESTAPIPoll } from './poll'; export interface RESTAPIChannelPatchOverwrite extends RESTPutAPIChannelPermissionJSONBody { id: Snowflake; } /** * @deprecated Use {@link RESTAPIChannelPatchOverwrite} instead */ export type APIChannelPatchOverwrite = RESTAPIChannelPatchOverwrite; /** * @see {@link https://discord.com/developers/docs/resources/channel#get-channel} */ export type RESTGetAPIChannelResult = APIChannel; /** * @see {@link https://discord.com/developers/docs/resources/channel#modify-channel} */ export interface RESTPatchAPIChannelJSONBody { /** * 1-100 character channel name * * Channel types: all */ name?: string | undefined; /** * The type of channel; only conversion between `text` and `news` * is supported and only in guilds with the "NEWS" feature * * Channel types: text, news */ type?: ChannelType.GuildAnnouncement | ChannelType.GuildText | undefined; /** * The position of the channel in the left-hand listing * * Channel types: all excluding newsThread, publicThread, privateThread */ position?: number | null | undefined; /** * 0-1024 character channel topic (0-4096 characters for thread-only channels) * * Channel types: text, news, forum, media */ topic?: string | null | undefined; /** * Whether the channel is nsfw * * Channel types: text, voice, news, forum, media */ nsfw?: boolean | null | undefined; /** * Amount of seconds a user has to wait before sending another message (0-21600); * bots, as well as users with the permission `MANAGE_MESSAGES` or `MANAGE_CHANNELS`, * are unaffected * * Channel types: text, newsThread, publicThread, privateThread, forum, media */ rate_limit_per_user?: number | null | undefined; /** * The bitrate (in bits) of the voice channel; 8000 to 96000 (128000 for VIP servers) * * Channel types: voice */ bitrate?: number | null | undefined; /** * The user limit of the voice channel; 0 refers to no limit, 1 to 99 refers to a user limit * * Channel types: voice */ user_limit?: number | null | undefined; /** * Channel or category-specific permissions * * Channel types: all excluding newsThread, publicThread, privateThread */ permission_overwrites?: RESTAPIChannelPatchOverwrite[] | null | undefined; /** * ID of the new parent category for a channel * * Channel types: text, voice, news, stage, forum, media */ parent_id?: Snowflake | null | undefined; /** * Voice region id for the voice or stage channel, automatic when set to `null` * * @see {@link https://discord.com/developers/docs/resources/voice#voice-region-object} */ rtc_region?: string | null | undefined; /** * The camera video quality mode of the voice channel * * @see {@link https://discord.com/developers/docs/resources/channel#channel-object-video-quality-modes} */ video_quality_mode?: VideoQualityMode | null | undefined; /** * Whether the thread should be archived * * Channel types: newsThread, publicThread, privateThread */ archived?: boolean | undefined; /** * The amount of time in minutes to wait before automatically archiving the thread * * Channel types: newsThread, publicThread, privateThread */ auto_archive_duration?: ThreadAutoArchiveDuration | undefined; /** * Whether the thread should be locked * * Channel types: newsThread, publicThread, privateThread */ locked?: boolean | undefined; /** * Default duration for newly created threads, in minutes, to automatically archive the thread after recent activity * * Channel types: text, news, forum, media */ default_auto_archive_duration?: ThreadAutoArchiveDuration | undefined; /** * Channel flags combined as a bit field. */ flags?: ChannelFlags | undefined; /** * The set of tags that can be used in a thread-only channel; limited to 20 * * Channel types: forum, media */ available_tags?: (Partial<APIGuildForumTag> & Pick<APIGuildForumTag, 'name'>)[] | undefined; /** * Whether non-moderators can add other non-moderators to the thread * * Channel types: privateThread */ invitable?: boolean | undefined; /** * The emoji to show in the add reaction button on a thread in a thread-only channel * * Channel types: forum, media */ default_reaction_emoji?: APIGuildForumDefaultReactionEmoji | undefined; /** * The initial `rate_limit_per_user` to set on newly created threads in a channel. * This field is copied to the thread at creation time and does not live update * * Channel types: text, forum, media */ default_thread_rate_limit_per_user?: number | null | undefined; /** * The default sort order type used to order posts in a thread-only channel * * Channel types: forum, media */ default_sort_order?: SortOrderType | null | undefined; /** * The default layout type used to display posts in a forum channel * * Channel types: forum */ default_forum_layout?: ForumLayoutType | undefined; /** * The ids of the set of tags that have been applied to a thread-only channel; limited to 5 * * Channel types: forum, media */ applied_tags?: Snowflake[] | undefined; } /** * @see {@link https://discord.com/developers/docs/resources/channel#modify-channel} */ export type RESTPatchAPIChannelResult = APIChannel; /** * @see {@link https://discord.com/developers/docs/resources/channel#deleteclose-channel} */ export type RESTDeleteAPIChannelResult = APIChannel; /** * @see {@link https://discord.com/developers/docs/resources/channel#get-channel-messages} */ export interface RESTGetAPIChannelMessagesQuery { /** * Get messages around this message ID */ around?: Snowflake; /** * Get messages before this message ID */ before?: Snowflake; /** * Get messages after this message ID */ after?: Snowflake; /** * Max number of messages to return (1-100) * * @defaultValue `50` */ limit?: number; } /** * @see {@link https://discord.com/developers/docs/resources/channel#get-channel-messages} */ export type RESTGetAPIChannelMessagesResult = APIMessage[]; /** * @see {@link https://discord.com/developers/docs/resources/channel#get-channel-message} */ export type RESTGetAPIChannelMessageResult = APIMessage; /** * @see {@link https://discord.com/developers/docs/resources/channel#message-reference-object-message-reference-structure} */ export type RESTAPIMessageReference = _AddUndefinedToPossiblyUndefinedPropertiesOfInterface<Required<Pick<APIMessageReference, 'message_id'>>> & _StrictPartial<APIMessageReference> & { /** * Whether to error if the referenced message doesn't exist instead of sending as a normal (non-reply) message * * @defaultValue `true` */ fail_if_not_exists?: boolean | undefined; }; /** * @deprecated Use {@link RESTAPIMessageReference} instead */ export type APIMessageReferenceSend = RESTAPIMessageReference; /** * @see {@link https://discord.com/developers/docs/resources/message#attachment-object-attachment-structure} */ export type RESTAPIAttachment = Partial<Pick<APIAttachment, 'description' | 'duration_secs' | 'filename' | 'title' | 'waveform'>> & { /** * Attachment id or a number that matches `n` in `files[n]` */ id: Snowflake | number; }; /** * @see {@link https://discord.com/developers/docs/resources/channel#create-message} */ export interface RESTPostAPIChannelMessageJSONBody { /** * The message contents (up to 2000 characters) */ content?: string | undefined; /** * A nonce that can be used for optimistic message sending */ nonce?: number | string | undefined; /** * `true` if this is a TTS message */ tts?: boolean | undefined; /** * Embedded `rich` content (up to 6000 characters) * * @see {@link https://discord.com/developers/docs/resources/channel#embed-object} */ embeds?: APIEmbed[] | undefined; /** * Allowed mentions for a message * * @see {@link https://discord.com/developers/docs/resources/channel#allowed-mentions-object} */ allowed_mentions?: APIAllowedMentions | undefined; /** * Include to make your message a reply or a forward * * @see {@link https://discord.com/developers/docs/resources/channel#message-reference-object-message-reference-structure} */ message_reference?: RESTAPIMessageReference | undefined; /** * The components to include with the message * * @see {@link https://discord.com/developers/docs/components/reference} */ components?: APIMessageTopLevelComponent[] | undefined; /** * IDs of up to 3 stickers in the server to send in the message * * @see {@link https://discord.com/developers/docs/resources/sticker#sticker-object} */ sticker_ids?: [Snowflake, Snowflake, Snowflake] | [Snowflake, Snowflake] | [Snowflake] | undefined; /** * Attachment objects with filename and description */ attachments?: RESTAPIAttachment[] | undefined; /** * Message flags combined as a bitfield */ flags?: MessageFlags | undefined; /** * If `true` and nonce is present, it will be checked for uniqueness in the past few minutes. * If another message was created by the same author with the same nonce, that message will be returned and no new message will be created. */ enforce_nonce?: boolean | undefined; /** * A poll! */ poll?: RESTAPIPoll | undefined; } /** * @see {@link https://discord.com/developers/docs/resources/channel#create-message} */ export type RESTPostAPIChannelMessageFormDataBody = (Record<`files[${bigint}]`, unknown> & { /** * JSON stringified message body */ payload_json?: string | undefined; }) | (Record<`files[${bigint}]`, unknown> & RESTPostAPIChannelMessageJSONBody); /** * @see {@link https://discord.com/developers/docs/resources/channel#create-message} */ export type RESTPostAPIChannelMessageResult = APIMessage; /** * @see {@link https://discord.com/developers/docs/resources/channel#crosspost-message} */ export type RESTPostAPIChannelMessageCrosspostResult = APIMessage; /** * @see {@link https://discord.com/developers/docs/resources/channel#create-reaction} */ export type RESTPutAPIChannelMessageReactionResult = never; /** * @see {@link https://discord.com/developers/docs/resources/channel#delete-own-reaction} */ export type RESTDeleteAPIChannelMessageOwnReactionResult = never; /** * @deprecated Use {@link RESTDeleteAPIChannelMessageOwnReactionResult} instead */ export type RESTDeleteAPIChannelMessageOwnReaction = RESTDeleteAPIChannelMessageOwnReactionResult; /** * @see {@link https://discord.com/developers/docs/resources/channel#delete-user-reaction} */ export type RESTDeleteAPIChannelMessageUserReactionResult = never; /** * @see {@link https://discord.com/developers/docs/resources/channel#get-reactions} */ export interface RESTGetAPIChannelMessageReactionUsersQuery { /** * The reaction type */ type?: ReactionType; /** * Get users after this user ID */ after?: Snowflake; /** * Max number of users to return (1-100) * * @defaultValue `25` */ limit?: number; } /** * @see {@link https://discord.com/developers/docs/resources/channel#get-reactions-reaction-types} */ export declare enum ReactionType { Normal = 0, Super = 1 } /** * @see {@link https://discord.com/developers/docs/resources/channel#get-reactions} */ export type RESTGetAPIChannelMessageReactionUsersResult = APIUser[]; /** * @see {@link https://discord.com/developers/docs/resources/channel#delete-all-reactions} */ export type RESTDeleteAPIChannelAllMessageReactionsResult = never; /** * @see {@link https://discord.com/developers/docs/resources/channel#delete-all-reactions-for-emoji} */ export type RESTDeleteAPIChannelMessageReactionResult = never; /** * @see {@link https://discord.com/developers/docs/resources/channel#edit-message} */ export interface RESTPatchAPIChannelMessageJSONBody { /** * The new message contents (up to 2000 characters) */ content?: string | null | undefined; /** * Embedded `rich` content (up to 6000 characters) * * @see {@link https://discord.com/developers/docs/resources/channel#embed-object} */ embeds?: APIEmbed[] | null | undefined; /** * Edit the flags of a message (only `SUPPRESS_EMBEDS` can currently be set/unset) * * When specifying flags, ensure to include all previously set flags/bits * in addition to ones that you are modifying * * @see {@link https://discord.com/developers/docs/resources/channel#message-object-message-flags} */ flags?: MessageFlags | null | undefined; /** * Allowed mentions for the message * * @see {@link https://discord.com/developers/docs/resources/channel#allowed-mentions-object} */ allowed_mentions?: APIAllowedMentions | null | undefined; /** * Attached files to keep * * Starting with API v10, the `attachments` array must contain all attachments that should be present after edit, including **retained and new** attachments provided in the request body. * * @see {@link https://discord.com/developers/docs/resources/message#attachment-object-attachment-structure} */ attachments?: RESTAPIAttachment[] | undefined; /** * The components to include with the message * * @see {@link https://discord.com/developers/docs/components/reference} */ components?: APIMessageTopLevelComponent[] | null | undefined; } /** * @see {@link https://discord.com/developers/docs/resources/channel#edit-message} */ export type RESTPatchAPIChannelMessageFormDataBody = (Record<`files[${bigint}]`, unknown> & { /** * JSON stringified message body */ payload_json?: string | undefined; }) | (Record<`files[${bigint}]`, unknown> & RESTPatchAPIChannelMessageJSONBody); /** * @see {@link https://discord.com/developers/docs/resources/channel#edit-message} */ export type RESTPatchAPIChannelMessageResult = APIMessage; /** * @see {@link https://discord.com/developers/docs/resources/channel#delete-message} */ export type RESTDeleteAPIChannelMessageResult = never; /** * @see {@link https://discord.com/developers/docs/resources/channel#bulk-delete-messages} */ export interface RESTPostAPIChannelMessagesBulkDeleteJSONBody { /** * An array of message ids to delete (2-100) */ messages: Snowflake[]; } /** * @see {@link https://discord.com/developers/docs/resources/channel#bulk-delete-messages} */ export type RESTPostAPIChannelMessagesBulkDeleteResult = never; /** * @see {@link https://discord.com/developers/docs/resources/channel#edit-channel-permissions} */ export interface RESTPutAPIChannelPermissionJSONBody { /** * The bitwise value of all allowed permissions * * @see {@link https://en.wikipedia.org/wiki/Bit_field} * @defaultValue `"0"` */ allow?: Permissions | null | undefined; /** * The bitwise value of all disallowed permissions * * @see {@link https://en.wikipedia.org/wiki/Bit_field} * @defaultValue `"0"` */ deny?: Permissions | null | undefined; /** * `0` for a role or `1` for a member */ type: OverwriteType; } /** * @see {@link https://discord.com/developers/docs/resources/channel#edit-channel-permissions} */ export type RESTPutAPIChannelPermissionResult = never; /** * @see {@link https://discord.com/developers/docs/resources/channel#get-channel-invites} */ export type RESTGetAPIChannelInvitesResult = APIExtendedInvite[]; /** * @see {@link https://discord.com/developers/docs/resources/channel#create-channel-invite} */ export interface RESTPostAPIChannelInviteJSONBody { /** * Duration of invite in seconds before expiry, or 0 for never * * @defaultValue `86400` (24 hours) */ max_age?: number | undefined; /** * Max number of uses or 0 for unlimited * * @defaultValue `0` */ max_uses?: number | undefined; /** * Whether this invite only grants temporary membership * * @defaultValue `false` */ temporary?: boolean | undefined; /** * If true, don't try to reuse a similar invite * (useful for creating many unique one time use invites) * * @defaultValue `false` */ unique?: boolean | undefined; /** * The type of target for this voice channel invite * * @see {@link https://discord.com/developers/docs/resources/invite#invite-object-invite-target-types} */ target_type?: InviteTargetType | undefined; /** * The id of the user whose stream to display for this invite * - Required if `target_type` is 1 * - The user must be streaming in the channel */ target_user_id?: Snowflake | undefined; /** * The id of the embedded application to open for this invite * - Required if `target_type` is 2 * - The application must have the `EMBEDDED` flag */ target_application_id?: Snowflake | undefined; } /** * @see {@link https://discord.com/developers/docs/resources/channel#create-channel-invite} */ export type RESTPostAPIChannelInviteResult = APIExtendedInvite; /** * @see {@link https://discord.com/developers/docs/resources/channel#delete-channel-permission} */ export type RESTDeleteAPIChannelPermissionResult = never; /** * @see {@link https://discord.com/developers/docs/resources/channel#follow-news-channel} */ export interface RESTPostAPIChannelFollowersJSONBody { /** * ID of target channel */ webhook_channel_id: Snowflake; } /** * @see {@link https://discord.com/developers/docs/resources/channel#follow-news-channel} */ export type RESTPostAPIChannelFollowersResult = APIFollowedChannel; /** * @see {@link https://discord.com/developers/docs/resources/channel#trigger-typing-indicator} */ export type RESTPostAPIChannelTypingResult = never; /** * @see {@link https://discord.com/developers/docs/resources/channel#get-pinned-messages} */ export type RESTGetAPIChannelPinsResult = APIMessage[]; /** * @see {@link https://discord.com/developers/docs/resources/channel#pin-message} */ export type RESTPutAPIChannelPinResult = never; /** * @see {@link https://discord.com/developers/docs/resources/channel#unpin-message} */ export type RESTDeleteAPIChannelPinResult = never; /** * @see {@link https://discord.com/developers/docs/resources/channel#group-dm-add-recipient} */ export interface RESTPutAPIChannelRecipientJSONBody { /** * Access token of a user that has granted your app the `gdm.join` scope */ access_token: string; /** * Nickname of the user being added */ nick?: string | undefined; } /** * @see {@link https://discord.com/developers/docs/resources/channel#group-dm-add-recipient} */ export type RESTPutAPIChannelRecipientResult = unknown; /** * @see {@link https://discord.com/developers/docs/resources/channel#group-dm-remove-recipient} */ export type RESTDeleteAPIChannelRecipientResult = unknown; /** * @see {@link https://discord.com/developers/docs/resources/channel#start-thread-from-message} */ export interface RESTPostAPIChannelMessagesThreadsJSONBody { /** * 1-100 character thread name */ name: string; /** * The amount of time in minutes to wait before automatically archiving the thread */ auto_archive_duration?: ThreadAutoArchiveDuration | undefined; /** * Amount of seconds a user has to wait before sending another message (0-21600) */ rate_limit_per_user?: number | undefined; } /** * @see {@link https://discord.com/developers/docs/resources/channel#start-thread-in-forum-or-media-channel} */ export type RESTPostAPIGuildForumThreadsJSONBody = RESTPostAPIChannelMessagesThreadsJSONBody & { /** * The initial message of the thread */ message: RESTPostAPIChannelMessageJSONBody; /** * The IDs of the set of tags to apply to the thread; limited to 5 */ applied_tags?: Snowflake[] | undefined; }; /** * @see {@link https://discord.com/developers/docs/resources/channel#start-thread-in-forum-or-media-channel} */ export type RESTPostAPIGuildForumThreadsFormDataBody = RESTPostAPIChannelMessagesThreadsJSONBody & { /** * The initial message of the thread */ message: string; }; /** * @see {@link https://discord.com/developers/docs/resources/channel#start-thread-from-message} */ export type RESTPostAPIChannelMessagesThreadsResult = APIChannel; /** * @see {@link https://discord.com/developers/docs/resources/channel#start-thread-without-message} */ export interface RESTPostAPIChannelThreadsJSONBody extends RESTPostAPIChannelMessagesThreadsJSONBody { /** * The type of thread to create * * @see {@link https://discord.com/developers/docs/resources/channel#channel-object-channel-types} * @defaultValue `ChannelType.PrivateThread` in API v9 and v10. * In a future API version this will be changed to be a required field, with no default. */ type?: ThreadChannelType | undefined; /** * Whether non-moderators can add other non-moderators to the thread; only available when creating a private thread */ invitable?: boolean | undefined; } /** * @see {@link https://discord.com/developers/docs/resources/channel#start-thread-without-message} */ export type RESTPostAPIChannelThreadsResult = APIChannel; /** * @see {@link https://discord.com/developers/docs/resources/channel#join-thread} */ export type RESTPutAPIChannelThreadMembersResult = never; /** * @see {@link https://discord.com/developers/docs/resources/channel#leave-thread} */ export type RESTDeleteAPIChannelThreadMembersResult = never; /** * @see {@link https://discord.com/developers/docs/resources/channel#get-thread-member} */ export interface RESTGetAPIChannelThreadMemberQuery { /** * Whether to include a guild member object for the thread member */ with_member?: boolean; } /** * @see {@link https://discord.com/developers/docs/resources/channel#get-thread-member} */ export type RESTGetAPIChannelThreadMemberResult = APIThreadMember; /** * @see {@link https://discord.com/developers/docs/resources/channel#list-thread-members} */ export interface RESTGetAPIChannelThreadMembersQuery { /** * Whether to include a guild member object for each thread member */ with_member?: boolean; /** * Get thread members after this user ID */ after?: Snowflake; /** * Max number of thread members to return (1-100) * * @defaultValue `100` */ limit?: number; } /** * @see {@link https://discord.com/developers/docs/resources/channel#list-thread-members} */ export type RESTGetAPIChannelThreadMembersResult = APIThreadMember[]; /** * @see {@link https://discord.com/developers/docs/resources/channel#list-public-archived-threads} */ export interface RESTGetAPIChannelThreadsArchivedQuery { /** * Get threads before this id or ISO8601 timestamp */ before?: Snowflake | string; /** * Max number of thread to return */ limit?: number; } /** * @see {@link https://discord.com/developers/docs/resources/channel#list-public-archived-threads} */ export type RESTGetAPIChannelThreadsArchivedPublicResult = RESTGetAPIChannelUsersThreadsArchivedResult; /** * @see {@link https://discord.com/developers/docs/resources/channel#list-private-archived-threads} */ export type RESTGetAPIChannelThreadsArchivedPrivateResult = RESTGetAPIChannelUsersThreadsArchivedResult; /** * @see {@link https://discord.com/developers/docs/resources/channel#list-joined-private-archived-threads} */ export interface RESTGetAPIChannelUsersThreadsArchivedResult extends APIThreadList { /** * Whether there are potentially additional threads */ has_more: boolean; } //# sourceMappingURL=channel.d.ts.map node_modules/discord-api-types/rest/v10/template.js 0000664 00000000161 15114741631 0016320 0 ustar 00 "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); //# sourceMappingURL=template.js.map node_modules/discord-api-types/rest/v10/monetization.js 0000664 00000001047 15114741631 0017231 0 ustar 00 "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.EntitlementOwnerType = void 0; /** * @see {@link https://discord.com/developers/docs/resources/entitlement#create-test-entitlement} */ var EntitlementOwnerType; (function (EntitlementOwnerType) { EntitlementOwnerType[EntitlementOwnerType["Guild"] = 1] = "Guild"; EntitlementOwnerType[EntitlementOwnerType["User"] = 2] = "User"; })(EntitlementOwnerType || (exports.EntitlementOwnerType = EntitlementOwnerType = {})); //# sourceMappingURL=monetization.js.map node_modules/discord-api-types/rest/v10/sticker.js 0000664 00000000160 15114741631 0016150 0 ustar 00 "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); //# sourceMappingURL=sticker.js.map node_modules/discord-api-types/rest/v10/monetization.d.ts 0000664 00000007742 15114741631 0017475 0 ustar 00 import type { Snowflake } from '../../globals'; import type { APIEntitlement, APISKU, APISubscription } from '../../v10'; /** * @see {@link https://discord.com/developers/docs/resources/entitlement#list-entitlements} */ export interface RESTGetAPIEntitlementsQuery { /** * User ID to look up entitlements for */ user_id?: Snowflake | undefined; /** * Optional list of SKU IDs to check entitlements for * Comma-delimited set of snowflakes */ sku_ids?: string | undefined; /** * Retrieve entitlements before this entitlement ID */ before?: Snowflake | undefined; /** * Retrieve entitlements after this entitlement ID */ after?: Snowflake | undefined; /** * Number of entitlements to return (1-100) * * @defaultValue `100` */ limit?: number | undefined; /** * Guild ID to look up entitlements for */ guild_id?: Snowflake | undefined; /** * Whether ended entitlements should be omitted * * @defaultValue `false` ended entitlements are included by default */ exclude_ended?: boolean | undefined; /** * Whether deleted entitlements should be omitted * * @defaultValue `true` deleted entitlements are not included by default */ exclude_deleted?: boolean | undefined; } /** * @see {@link https://discord.com/developers/docs/resources/entitlement#list-entitlements} */ export type RESTGetAPIEntitlementsResult = APIEntitlement[]; /** * @see {@link https://discord.com/developers/docs/resources/entitlement#get-entitlement} */ export type RESTGetAPIEntitlementResult = APIEntitlement; /** * @see {@link https://discord.com/developers/docs/resources/entitlement#create-test-entitlement} */ export interface RESTPostAPIEntitlementJSONBody { /** * ID of the SKU to grant the entitlement to */ sku_id: Snowflake; /** * ID of the guild or user to grant the entitlement to */ owner_id: Snowflake; /** * The type of entitlement owner */ owner_type: EntitlementOwnerType; } /** * @deprecated Use {@link RESTPostAPIEntitlementJSONBody} instead */ export type RESTPostAPIEntitlementBody = RESTPostAPIEntitlementJSONBody; /** * @see {@link https://discord.com/developers/docs/resources/entitlement#create-test-entitlement} */ export type RESTPostAPIEntitlementResult = Partial<Omit<APIEntitlement, 'ends_at' | 'starts_at'>>; /** * @see {@link https://discord.com/developers/docs/resources/entitlement#create-test-entitlement} */ export declare enum EntitlementOwnerType { Guild = 1, User = 2 } /** * @see {@link https://discord.com/developers/docs/resources/entitlement#delete-test-entitlement} */ export type RESTDeleteAPIEntitlementResult = never; /** * @see {@link https://discord.com/developers/docs/resources/sku#list-skus} */ export type RESTGetAPISKUsResult = APISKU[]; /** * @see {@link https://discord.com/developers/docs/resources/entitlement#consume-an-entitlement} */ export type RESTPostAPIEntitlementConsumeResult = never; /** * @see {@link https://discord.com/developers/docs/resources/subscription#query-string-params} */ export interface RESTGetAPISKUSubscriptionsQuery { /** * List subscriptions before this ID */ before?: Snowflake | undefined; /** * List subscriptions after this ID */ after?: Snowflake | undefined; /** * Number of subscriptions to return (1-100) * * @defaultValue `50` */ limit?: number | undefined; /** * User ID for which to return subscriptions. Required except for OAuth queries. */ user_id?: Snowflake | undefined; } /** * @see {@link https://discord.com/developers/docs/resources/subscription#list-sku-subscriptions} */ export type RESTGetAPISKUSubscriptionsResult = APISubscription[]; /** * @see {@link https://discord.com/developers/docs/resources/subscription#get-sku-subscription} */ export type RESTGetAPISKUSubscriptionResult = APISubscription; //# sourceMappingURL=monetization.d.ts.map node_modules/discord-api-types/rest/v10/guildScheduledEvent.d.ts.map 0000664 00000003433 15114741631 0021451 0 ustar 00 {"version":3,"file":"guildScheduledEvent.d.ts","sourceRoot":"","sources":["guildScheduledEvent.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC/C,OAAO,KAAK,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AACvE,OAAO,KAAK,EACX,sBAAsB,EACtB,oCAAoC,EACpC,oCAAoC,EACpC,0BAA0B,EAC1B,6BAA6B,EAC7B,+BAA+B,EAC/B,yBAAyB,EACzB,MAAM,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;IACH,MAAM,CAAC,EAAE,yBAAyB,GAAG,SAAS,CAAC;CAC/C;AAED;;GAEG;AACH,MAAM,MAAM,qCAAqC,GAAG,sBAAsB,CAAC;AAE3E;;GAEG;AACH,MAAM,MAAM,sCAAsC,GAAG,KAAK,CAAC;AAE3D;;GAEG;AACH,MAAM,WAAW,uCAAuC;IACvD;;;;OAIG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB;;OAEG;IACH,MAAM,CAAC,EAAE,SAAS,CAAC;IACnB;;OAEG;IACH,KAAK,CAAC,EAAE,SAAS,CAAC;CAClB;AAED;;GAEG;AACH,MAAM,MAAM,wCAAwC,GAAG,0BAA0B,EAAE,CAAC"} node_modules/discord-api-types/rest/v10/guildScheduledEvent.js 0000664 00000000174 15114741631 0020440 0 ustar 00 "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); //# sourceMappingURL=guildScheduledEvent.js.map node_modules/discord-api-types/rest/v10/sticker.js.map 0000664 00000000143 15114741631 0016725 0 ustar 00 {"version":3,"file":"sticker.js","sourceRoot":"","sources":["sticker.ts"],"names":[],"mappings":""} node_modules/discord-api-types/rest/index.d.ts 0000664 00000000100 15114741631 0015433 0 ustar 00 export * from './v10/index'; //# sourceMappingURL=index.d.ts.map node_modules/discord-api-types/rest/v8/stageInstance.js.map 0000664 00000000157 15114741631 0020005 0 ustar 00 {"version":3,"file":"stageInstance.js","sourceRoot":"","sources":["stageInstance.ts"],"names":[],"mappings":""} node_modules/discord-api-types/rest/v8/user.js.map 0000664 00000000135 15114741631 0016167 0 ustar 00 {"version":3,"file":"user.js","sourceRoot":"","sources":["user.ts"],"names":[],"mappings":""} node_modules/discord-api-types/rest/v8/emoji.js 0000664 00000000156 15114741631 0015543 0 ustar 00 "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); //# sourceMappingURL=emoji.js.map node_modules/discord-api-types/rest/v8/interactions.d.ts 0000664 00000034212 15114741631 0017376 0 ustar 00 import type { APIApplicationCommand, APIApplicationCommandPermission, APIGuildApplicationCommandPermissions, APIInteractionResponse, APIInteractionResponseCallbackData, ApplicationCommandType } from '../../payloads/v8/index'; import type { _AddUndefinedToPossiblyUndefinedPropertiesOfInterface, _StrictPartial } from '../../utils/internals'; import type { RESTDeleteAPIWebhookWithTokenMessageResult, RESTGetAPIWebhookWithTokenMessageResult, RESTPatchAPIWebhookWithTokenMessageFormDataBody, RESTPatchAPIWebhookWithTokenMessageJSONBody, RESTPatchAPIWebhookWithTokenMessageResult, RESTPostAPIWebhookWithTokenWaitResult } from './webhook'; /** * https://discord.com/developers/docs/interactions/application-commands#get-global-application-commands * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type RESTGetAPIApplicationCommandsResult = APIApplicationCommand[]; /** * https://discord.com/developers/docs/interactions/application-commands#get-global-application-command * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type RESTGetAPIApplicationCommandResult = APIApplicationCommand; type RESTPostAPIBaseApplicationCommandsJSONBody = _AddUndefinedToPossiblyUndefinedPropertiesOfInterface<Omit<APIApplicationCommand, 'application_id' | 'description' | 'guild_id' | 'id' | 'type' | 'version'>>; /** * https://discord.com/developers/docs/interactions/application-commands#create-global-application-command * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export interface RESTPostAPIChatInputApplicationCommandsJSONBody extends RESTPostAPIBaseApplicationCommandsJSONBody { type?: ApplicationCommandType.ChatInput | undefined; description: string; } /** * https://discord.com/developers/docs/interactions/application-commands#create-global-application-command * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export interface RESTPostAPIContextMenuApplicationCommandsJSONBody extends RESTPostAPIBaseApplicationCommandsJSONBody { type: ApplicationCommandType.Message | ApplicationCommandType.User; } /** * https://discord.com/developers/docs/interactions/application-commands#create-global-application-command * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type RESTPostAPIApplicationCommandsJSONBody = RESTPostAPIChatInputApplicationCommandsJSONBody | RESTPostAPIContextMenuApplicationCommandsJSONBody; /** * https://discord.com/developers/docs/interactions/application-commands#create-global-application-command * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type RESTPostAPIApplicationCommandsResult = APIApplicationCommand; /** * https://discord.com/developers/docs/interactions/application-commands#edit-global-application-command * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type RESTPatchAPIApplicationCommandJSONBody = _StrictPartial<RESTPostAPIApplicationCommandsJSONBody>; /** * https://discord.com/developers/docs/interactions/application-commands#edit-global-application-command * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type RESTPatchAPIApplicationCommandResult = APIApplicationCommand; /** * https://discord.com/developers/docs/interactions/application-commands#bulk-overwrite-global-application-commands * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type RESTPutAPIApplicationCommandsJSONBody = RESTPostAPIApplicationCommandsJSONBody[]; /** * https://discord.com/developers/docs/interactions/application-commands#bulk-overwrite-global-application-commands * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type RESTPutAPIApplicationCommandsResult = APIApplicationCommand[]; /** * https://discord.com/developers/docs/interactions/application-commands#get-guild-application-commands * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type RESTGetAPIApplicationGuildCommandsResult = APIApplicationCommand[]; /** * https://discord.com/developers/docs/interactions/application-commands#get-guild-application-commands * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type RESTGetAPIApplicationGuildCommandResult = APIApplicationCommand; /** * https://discord.com/developers/docs/interactions/application-commands#create-guild-application-command * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type RESTPostAPIApplicationGuildCommandsJSONBody = RESTPostAPIApplicationCommandsJSONBody; /** * https://discord.com/developers/docs/interactions/application-commands#create-guild-application-command * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type RESTPostAPIApplicationGuildCommandsResult = APIApplicationCommand; /** * https://discord.com/developers/docs/interactions/application-commands#edit-guild-application-command * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type RESTPatchAPIApplicationGuildCommandJSONBody = _StrictPartial<RESTPostAPIApplicationCommandsJSONBody>; /** * https://discord.com/developers/docs/interactions/application-commands#edit-guild-application-command * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type RESTPatchAPIApplicationGuildCommandResult = APIApplicationCommand; /** * https://discord.com/developers/docs/interactions/application-commands#bulk-overwrite-guild-application-commands * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type RESTPutAPIApplicationGuildCommandsJSONBody = RESTPostAPIApplicationCommandsJSONBody[]; /** * https://discord.com/developers/docs/interactions/application-commands#bulk-overwrite-guild-application-commands * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type RESTPutAPIApplicationGuildCommandsResult = APIApplicationCommand[]; /** * https://discord.com/developers/docs/interactions/receiving-and-responding#create-interaction-response * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type RESTPostAPIInteractionCallbackJSONBody = APIInteractionResponse; /** * https://discord.com/developers/docs/interactions/receiving-and-responding#create-interaction-response * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type RESTPostAPIInteractionCallbackFormDataBody = (Record<`files[${bigint}]`, unknown> & { /** * JSON stringified message body */ payload_json?: string | undefined; }) | (Record<`files[${bigint}]`, unknown> & RESTPostAPIInteractionCallbackJSONBody); /** * https://discord.com/developers/docs/interactions/receiving-and-responding#get-original-interaction-response * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type RESTGetAPIInteractionOriginalResponseResult = RESTGetAPIWebhookWithTokenMessageResult; /** * https://discord.com/developers/docs/interactions/receiving-and-responding#edit-original-interaction-response * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type RESTPatchAPIInteractionOriginalResponseJSONBody = RESTPatchAPIWebhookWithTokenMessageJSONBody; /** * https://discord.com/developers/docs/interactions/receiving-and-responding#edit-original-interaction-response * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type RESTPatchAPIInteractionOriginalResponseFormDataBody = RESTPatchAPIWebhookWithTokenMessageFormDataBody; /** * https://discord.com/developers/docs/interactions/receiving-and-responding#edit-original-interaction-response * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type RESTPatchAPIInteractionOriginalResponseResult = RESTPatchAPIWebhookWithTokenMessageResult; /** * https://discord.com/developers/docs/interactions/receiving-and-responding#delete-original-interaction-response * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type RESTDeleteAPIInteractionOriginalResponseResult = RESTDeleteAPIWebhookWithTokenMessageResult; /** * https://discord.com/developers/docs/interactions/receiving-and-responding#create-followup-message * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type RESTPostAPIInteractionFollowupJSONBody = APIInteractionResponseCallbackData; /** * https://discord.com/developers/docs/interactions/receiving-and-responding#create-followup-message * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type RESTPostAPIInteractionFollowupFormDataBody = (Record<`files[${bigint}]`, unknown> & { /** * JSON stringified message body */ payload_json?: string | undefined; }) | (Record<`files[${bigint}]`, unknown> & RESTPostAPIInteractionFollowupJSONBody); /** * https://discord.com/developers/docs/interactions/receiving-and-responding#create-followup-message * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type RESTPostAPIInteractionFollowupResult = RESTPostAPIWebhookWithTokenWaitResult; /** * https://discord.com/developers/docs/interactions/receiving-and-responding#get-followup-message * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type RESTGetAPIInteractionFollowupResult = RESTGetAPIWebhookWithTokenMessageResult; /** * https://discord.com/developers/docs/interactions/receiving-and-responding#edit-followup-message * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type RESTPatchAPIInteractionFollowupJSONBody = RESTPatchAPIWebhookWithTokenMessageJSONBody; /** * https://discord.com/developers/docs/interactions/receiving-and-responding#edit-followup-message * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type RESTPatchAPIInteractionFollowupFormDataBody = RESTPatchAPIWebhookWithTokenMessageFormDataBody; /** * https://discord.com/developers/docs/interactions/receiving-and-responding#edit-followup-message * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type RESTPatchAPIInteractionFollowupResult = RESTPatchAPIWebhookWithTokenMessageResult; /** * https://discord.com/developers/docs/interactions/receiving-and-responding#delete-followup-message * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type RESTDeleteAPIInteractionFollowupResult = RESTDeleteAPIWebhookWithTokenMessageResult; /** * https://discord.com/developers/docs/interactions/application-commands#get-guild-application-command-permissions * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type RESTGetAPIGuildApplicationCommandsPermissionsResult = APIGuildApplicationCommandPermissions[]; /** * https://discord.com/developers/docs/interactions/application-commands#get-application-command-permissions * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type RESTGetAPIApplicationCommandPermissionsResult = APIGuildApplicationCommandPermissions; /** * https://discord.com/developers/docs/interactions/application-commands#edit-application-command-permissions * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export interface RESTPutAPIApplicationCommandPermissionsJSONBody { permissions: APIApplicationCommandPermission[]; } /** * https://discord.com/developers/docs/interactions/application-commands#edit-application-command-permissions * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type RESTPutAPIApplicationCommandPermissionsResult = APIGuildApplicationCommandPermissions; /** * https://discord.com/developers/docs/interactions/application-commands#batch-edit-application-command-permissions * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type RESTPutAPIGuildApplicationCommandsPermissionsJSONBody = Pick<APIGuildApplicationCommandPermissions, 'id' | 'permissions'>[]; /** * https://discord.com/developers/docs/interactions/application-commands#batch-edit-application-command-permissions * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type RESTPutAPIGuildApplicationCommandsPermissionsResult = APIGuildApplicationCommandPermissions[]; export {}; //# sourceMappingURL=interactions.d.ts.map node_modules/discord-api-types/rest/v8/stageInstance.d.ts.map 0000664 00000001352 15114741631 0020237 0 ustar 00 {"version":3,"file":"stageInstance.d.ts","sourceRoot":"","sources":["stageInstance.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC/C,OAAO,KAAK,EAAE,gBAAgB,EAAE,yBAAyB,EAAE,MAAM,yBAAyB,CAAC;AAE3F;;;;GAIG;AACH,MAAM,WAAW,gCAAgC;IAChD;;OAEG;IACH,UAAU,EAAE,SAAS,CAAC;IACtB;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;;;OAIG;IACH,aAAa,CAAC,EAAE,yBAAyB,GAAG,SAAS,CAAC;CACtD;AAED;;;;GAIG;AACH,MAAM,MAAM,8BAA8B,GAAG,gBAAgB,CAAC;AAE9D;;;;GAIG;AACH,MAAM,MAAM,6BAA6B,GAAG,gBAAgB,CAAC;AAE7D;;;;GAIG;AACH,MAAM,WAAW,iCAAiC;IACjD;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC3B;;OAEG;IACH,aAAa,CAAC,EAAE,yBAAyB,GAAG,SAAS,CAAC;CACtD;AAED;;;;GAIG;AACH,MAAM,MAAM,+BAA+B,GAAG,gBAAgB,CAAC;AAE/D;;;;GAIG;AACH,MAAM,MAAM,gCAAgC,GAAG,KAAK,CAAC"} node_modules/discord-api-types/rest/v8/index.d.ts.map 0000664 00000006077 15114741631 0016567 0 ustar 00 {"version":3,"file":"index.d.ts","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Event.js","sourceRoot":"","sources":["guildScheduledEvent.ts"],"names":[],"mappings":""} node_modules/discord-api-types/rest/v8/oauth2.js.map 0000664 00000000141 15114741631 0016410 0 ustar 00 {"version":3,"file":"oauth2.js","sourceRoot":"","sources":["oauth2.ts"],"names":[],"mappings":""} node_modules/discord-api-types/rest/v8/channel.js.map 0000664 00000000143 15114741631 0016620 0 ustar 00 {"version":3,"file":"channel.js","sourceRoot":"","sources":["channel.ts"],"names":[],"mappings":""} node_modules/discord-api-types/rest/v8/oauth2.d.ts 0000664 00000017547 15114741631 0016112 0 ustar 00 import type { Permissions, Snowflake } from '../../globals'; import type { APIApplication, APIGuild, APIUser, APIWebhook, OAuth2Scopes } from '../../payloads/v8/index'; /** * https://discord.com/developers/docs/topics/oauth2#get-current-application-information * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type RESTGetAPIOAuth2CurrentApplicationResult = Omit<APIApplication, 'flags'>; /** * https://discord.com/developers/docs/topics/oauth2#get-current-authorization-information * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export interface RESTGetAPIOAuth2CurrentAuthorizationResult { /** * the current application */ application: Partial<APIApplication>; /** * the scopes the user has authorized the application for */ scopes: OAuth2Scopes[]; /** * when the access token expires */ expires: string; /** * the user who has authorized, if the user has authorized with the `identify` scope */ user?: APIUser; } /** * https://discord.com/developers/docs/topics/oauth2#authorization-code-grant * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export interface RESTOAuth2AuthorizationQuery { response_type: 'code'; client_id: Snowflake; scope: string; redirect_uri?: string; state?: string; prompt?: 'consent' | 'none'; } /** * https://discord.com/developers/docs/topics/oauth2#authorization-code-grant-redirect-url-example * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export interface RESTOAuth2AuthorizationQueryResult { code: string; state?: string; } /** * https://discord.com/developers/docs/topics/oauth2#authorization-code-grant-redirect-url-example * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export interface RESTPostOAuth2AccessTokenURLEncodedData { client_id: Snowflake; client_secret: string; grant_type: 'authorization_code'; code: string; redirect_uri?: string; } /** * https://discord.com/developers/docs/topics/oauth2#authorization-code-grant-access-token-response * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export interface RESTPostOAuth2AccessTokenResult { access_token: string; token_type: string; expires_in: number; refresh_token: string; scope: string; } /** * https://discord.com/developers/docs/topics/oauth2#authorization-code-grant-refresh-token-exchange-example * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export interface RESTPostOAuth2RefreshTokenURLEncodedData { client_id: Snowflake; client_secret: string; grant_type: 'refresh_token'; refresh_token: string; } /** * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type RESTPostOAuth2RefreshTokenResult = RESTPostOAuth2AccessTokenResult; /** * https://discord.com/developers/docs/topics/oauth2#implicit-grant * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export interface RESTOAuth2ImplicitAuthorizationQuery { response_type: 'token'; client_id: Snowflake; scope: string; redirect_uri?: string; state?: string; prompt?: 'consent' | 'none'; } /** * https://discord.com/developers/docs/topics/oauth2#implicit-grant-redirect-url-example * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type RESTOAuth2ImplicitAuthorizationURLFragmentResult = Omit<RESTPostOAuth2AccessTokenResult, 'refresh_token'>; /** * https://discord.com/developers/docs/topics/oauth2#client-credentials-grant * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export interface RESTPostOAuth2ClientCredentialsURLEncodedData { grant_type: 'client_credentials'; scope: string; } /** * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type RESTPostOAuth2ClientCredentialsResult = RESTOAuth2ImplicitAuthorizationURLFragmentResult; /** * https://discord.com/developers/docs/topics/oauth2#bot-authorization-flow-bot-auth-parameters * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export interface RESTOAuth2BotAuthorizationQuery { /** * Your app's client id */ client_id: Snowflake; /** * Needs to include bot for the bot flow */ scope: OAuth2Scopes.Bot | `${OAuth2Scopes.Bot}${' ' | '%20'}${string}` | `${string}${' ' | '%20'}${OAuth2Scopes.Bot}` | `${string}${' ' | '%20'}${OAuth2Scopes.Bot}${string}${' ' | '%20'}`; /** * The permissions you're requesting * * See https://discord.com/developers/docs/topics/permissions */ permissions?: Permissions; /** * Pre-fills the dropdown picker with a guild for the user */ guild_id?: Snowflake; /** * `true` or `false`—disallows the user from changing the guild dropdown */ disable_guild_select?: boolean; } /** * https://discord.com/developers/docs/topics/oauth2#advanced-bot-authorization * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export interface RESTOAuth2AdvancedBotAuthorizationQuery { client_id: Snowflake; /** * This assumes you include the `bot` scope alongside others (like `identify` for example) */ scope: OAuth2Scopes.Bot | `${OAuth2Scopes.Bot}${' ' | '%20'}${string}` | `${string}${' ' | '%20'}${OAuth2Scopes.Bot}` | `${string}${' ' | '%20'}${OAuth2Scopes.Bot}${string}${' ' | '%20'}`; /** * The required permissions bitfield, stringified */ permissions?: Permissions; guild_id?: Snowflake; disable_guild_select?: boolean; response_type: string; redirect_uri?: string; } /** * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export interface RESTOAuth2AdvancedBotAuthorizationQueryResult { code: string; state?: string; guild_id: Snowflake; permissions: Permissions; } /** * https://discord.com/developers/docs/topics/oauth2#advanced-bot-authorization-extended-bot-authorization-access-token-example * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export interface RESTPostOAuth2AccessTokenWithBotAndGuildsScopeResult { access_token: string; token_type: string; expires_in: number; refresh_token: string; scope: string; guild: APIGuild; } /** * https://discord.com/developers/docs/topics/oauth2#webhooks-webhook-token-response-example * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export interface RESTPostOAuth2AccessTokenWithBotAndWebhookIncomingScopeResult { access_token: string; token_type: string; expires_in: number; refresh_token: string; scope: string; webhook: APIWebhook; } /** * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type RESTPostOAuth2AccessTokenWithBotAndGuildsAndWebhookIncomingScopeResult = RESTPostOAuth2AccessTokenWithBotAndGuildsScopeResult & RESTPostOAuth2AccessTokenWithBotAndWebhookIncomingScopeResult; //# sourceMappingURL=oauth2.d.ts.map node_modules/discord-api-types/rest/v8/template.d.ts 0000664 00000006423 15114741631 0016512 0 ustar 00 import type { APIGuild, APITemplate } from '../../payloads/v8/index'; import type { _StrictPartial } from '../../utils/internals'; /** * https://discord.com/developers/docs/resources/template#get-template * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type RESTGetAPITemplateResult = APITemplate; /** * https://discord.com/developers/docs/resources/template#create-guild-from-template * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export interface RESTPostAPITemplateCreateGuildJSONBody { /** * Name of the guild (2-100 characters) */ name: string; /** * base64 1024x1024 png/jpeg image for the guild icon * * See https://discord.com/developers/docs/reference#image-data */ icon?: string | undefined; } /** * https://discord.com/developers/docs/resources/template#create-guild-from-template * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type RESTPostAPITemplateCreateGuildResult = APIGuild; /** * https://discord.com/developers/docs/resources/template#get-guild-templates * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type RESTGetAPIGuildTemplatesResult = APITemplate[]; /** * https://discord.com/developers/docs/resources/template#create-guild-template * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export interface RESTPostAPIGuildTemplatesJSONBody { /** * Name of the template (1-100 characters) */ name: string; /** * Description for the template (0-120 characters) */ description?: string | null | undefined; } /** * https://discord.com/developers/docs/resources/template#create-guild-template * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type RESTPostAPIGuildTemplatesResult = APITemplate; /** * https://discord.com/developers/docs/resources/template#sync-guild-template * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type RESTPutAPIGuildTemplateSyncResult = APITemplate; /** * https://discord.com/developers/docs/resources/template#modify-guild-template * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type RESTPatchAPIGuildTemplateJSONBody = _StrictPartial<RESTPostAPIGuildTemplatesJSONBody>; /** * https://discord.com/developers/docs/resources/template#modify-guild-template * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type RESTPatchAPIGuildTemplateResult = APITemplate; /** * https://discord.com/developers/docs/resources/template#delete-guild-template * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type RESTDeleteAPIGuildTemplateResult = APITemplate; //# sourceMappingURL=template.d.ts.map node_modules/discord-api-types/rest/v8/sticker.d.ts.map 0000664 00000001623 15114741631 0017114 0 ustar 00 {"version":3,"file":"sticker.d.ts","sourceRoot":"","sources":["sticker.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAE1E;;GAEG;AACH,MAAM,MAAM,uBAAuB,GAAG,UAAU,CAAC;AAEjD;;GAEG;AACH,MAAM,WAAW,8BAA8B;IAC9C,aAAa,EAAE,cAAc,EAAE,CAAC;CAChC;AAED;;GAEG;AACH,MAAM,MAAM,6BAA6B,GAAG,UAAU,EAAE,CAAC;AAEzD;;GAEG;AACH,MAAM,MAAM,4BAA4B,GAAG,UAAU,CAAC;AAEtD;;GAEG;AACH,MAAM,WAAW,mCAAmC;IACnD;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;OAEG;IACH,WAAW,EAAE,MAAM,CAAC;IACpB;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;OAEG;IACH,IAAI,EAAE,OAAO,CAAC;CACd;AAED;;GAEG;AACH,MAAM,MAAM,6BAA6B,GAAG,UAAU,CAAC;AAEvD;;GAEG;AACH,MAAM,WAAW,gCAAgC;IAChD;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC1B;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;IACxC;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CAC1B;AAED;;GAEG;AACH,MAAM,MAAM,8BAA8B,GAAG,UAAU,CAAC;AAExD;;GAEG;AACH,MAAM,MAAM,+BAA+B,GAAG,KAAK,CAAC"} node_modules/discord-api-types/rest/v8/user.d.ts.map 0000664 00000002361 15114741631 0016426 0 ustar 00 {"version":3,"file":"user.d.ts","sourceRoot":"","sources":["user.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC5D,OAAO,KAAK,EAAE,UAAU,EAAE,aAAa,EAAE,cAAc,EAAE,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AAEhH;;;;GAIG;AACH,MAAM,MAAM,2BAA2B,GAAG,OAAO,CAAC;AAElD;;;;GAIG;AACH,MAAM,MAAM,oBAAoB,GAAG,OAAO,CAAC;AAE3C;;;;GAIG;AACH,MAAM,MAAM,mCAAmC,GAAG,cAAc,CAAC;AAEjE;;;;GAIG;AACH,MAAM,WAAW,+BAA+B;IAC/C;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC9B;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;CACnC;AAED;;;;GAIG;AACH,MAAM,MAAM,6BAA6B,GAAG,OAAO,CAAC;AAEpD;;;;GAIG;AACH,MAAM,WAAW,gCAAgC;IAChD;;OAEG;IACH,MAAM,CAAC,EAAE,SAAS,CAAC;IACnB;;OAEG;IACH,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB;;;;OAIG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;CACf;AAED;;GAEG;AACH,MAAM,WAAW,8BAA8B;IAC9C,EAAE,EAAE,SAAS,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IACpB,KAAK,EAAE,OAAO,CAAC;IACf,QAAQ,EAAE,YAAY,EAAE,CAAC;IACzB,WAAW,EAAE,WAAW,CAAC;CACzB;AAED;;;;GAIG;AACH,MAAM,MAAM,iCAAiC,GAAG,8BAA8B,EAAE,CAAC;AAEjF;;;;GAIG;AACH,MAAM,MAAM,mCAAmC,GAAG,KAAK,CAAC;AAExD;;;;GAIG;AACH,MAAM,WAAW,6CAA6C;IAC7D;;OAEG;IACH,YAAY,EAAE,MAAM,CAAC;CACrB;AAED;;;;GAIG;AACH,MAAM,MAAM,2CAA2C,GAAG,UAAU,CAAC;AAErE;;;;GAIG;AACH,MAAM,MAAM,sCAAsC,GAAG,aAAa,EAAE,CAAC"} node_modules/discord-api-types/rest/v8/guild.d.ts.map 0000664 00000022427 15114741631 0016561 0 ustar 00 {"version":3,"file":"guild.d.ts","sourceRoot":"","sources":["guild.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC5D,OAAO,KAAK,EACX,MAAM,EACN,UAAU,EACV,YAAY,EACZ,iBAAiB,EACjB,iBAAiB,EACjB,QAAQ,EACR,mBAAmB,EACnB,cAAc,EACd,2BAA2B,EAC3B,eAAe,EACf,qBAAqB,EACrB,cAAc,EACd,sBAAsB,EACtB,OAAO,EACP,cAAc,EACd,gCAAgC,EAChC,0BAA0B,EAC1B,YAAY,EACZ,uBAAuB,EACvB,sBAAsB,EACtB,gBAAgB,EAChB,MAAM,yBAAyB,CAAC;AACjC,OAAO,KAAK,EAAE,SAAS,EAAE,cAAc,EAAE,eAAe,EAAE,oBAAoB,EAAE,MAAM,uBAAuB,CAAC;AAC9G,OAAO,KAAK,E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CAAC;AAEpF;;GAEG;AACH,MAAM,WAAW,gDAAgD;IAChE;;OAEG;IACH,UAAU,EAAE,SAAS,CAAC;IACtB;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IAC/B;;OAEG;IACH,0BAA0B,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;CACvD;AAED;;GAEG;AACH,MAAM,WAAW,uCAAuC;IACvD;;OAEG;IACH,UAAU,EAAE,SAAS,CAAC;IACtB;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;CAC/B;AAED;;;;GAIG;AACH,MAAM,MAAM,kCAAkC,GAAG,qBAAqB,CAAC;AAEvE;;;;GAIG;AACH,MAAM,MAAM,sCAAsC,GAAG,SAAS,CAAC,cAAc,CAAC,qBAAqB,CAAC,CAAC,GAAG;IACvG;;OAEG;IACH,OAAO,CAAC,EAAE,OAAO,GAAG,IAAI,GAAG,SAAS,CAAC;CACrC,CAAC"} node_modules/discord-api-types/rest/v8/stageInstance.d.ts 0000664 00000004516 15114741631 0017470 0 ustar 00 import type { Snowflake } from '../../globals'; import type { APIStageInstance, StageInstancePrivacyLevel } from '../../payloads/v8/index'; /** * https://discord.com/developers/docs/resources/stage-instance#create-stage-instance * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export interface RESTPostAPIStageInstanceJSONBody { /** * The id of the stage channel */ channel_id: Snowflake; /** * The topic of the stage instance (1-120 characters) */ topic: string; /** * The privacy level of the stage instance * * @default GuildOnly */ privacy_level?: StageInstancePrivacyLevel | undefined; } /** * https://discord.com/developers/docs/resources/stage-instance#create-stage-instance * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type RESTPostAPIStageInstanceResult = APIStageInstance; /** * https://discord.com/developers/docs/resources/stage-instance#get-stage-instance * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type RESTGetAPIStageInstanceResult = APIStageInstance; /** * https://discord.com/developers/docs/resources/stage-instance#update-stage-instance * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export interface RESTPatchAPIStageInstanceJSONBody { /** * The topic of the stage instance (1-120 characters) */ topic?: string | undefined; /** * The privacy level of the stage instance */ privacy_level?: StageInstancePrivacyLevel | undefined; } /** * https://discord.com/developers/docs/resources/stage-instance#update-stage-instance * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type RESTPatchAPIStageInstanceResult = APIStageInstance; /** * https://discord.com/developers/docs/resources/stage-instance#delete-stage-instance * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type RESTDeleteAPIStageInstanceResult = never; //# sourceMappingURL=stageInstance.d.ts.map node_modules/discord-api-types/rest/v8/gateway.js 0000664 00000000160 15114741631 0016074 0 ustar 00 "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); //# sourceMappingURL=gateway.js.map node_modules/discord-api-types/rest/v8/emoji.js.map 0000664 00000000137 15114741631 0016316 0 ustar 00 {"version":3,"file":"emoji.js","sourceRoot":"","sources":["emoji.ts"],"names":[],"mappings":""} node_modules/discord-api-types/rest/v8/gateway.d.ts 0000664 00000001165 15114741631 0016336 0 ustar 00 import type { APIGatewayBotInfo, APIGatewayInfo } from '../../payloads/v8/index'; /** * https://discord.com/developers/docs/topics/gateway#get-gateway * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type RESTGetAPIGatewayResult = APIGatewayInfo; /** * https://discord.com/developers/docs/topics/gateway#get-gateway-bot * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type RESTGetAPIGatewayBotResult = APIGatewayBotInfo; //# sourceMappingURL=gateway.d.ts.map node_modules/discord-api-types/rest/v8/webhook.d.ts 0000664 00000027454 15114741631 0016344 0 ustar 00 import type { Snowflake } from '../../globals'; import type { APIActionRowComponent, APIAllowedMentions, APIAttachment, APIEmbed, APIMessage, APIMessageActionRowComponent, APIWebhook, MessageFlags } from '../../payloads/v8/index'; import type { _AddUndefinedToPossiblyUndefinedPropertiesOfInterface, _Nullable } from '../../utils/internals'; /** * https://discord.com/developers/docs/resources/webhook#create-webhook * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export interface RESTPostAPIChannelWebhookJSONBody { /** * Name of the webhook (1-80 characters) */ name: string; /** * Image for the default webhook avatar * * See https://discord.com/developers/docs/reference#image-data */ avatar?: string | null | undefined; } /** * https://discord.com/developers/docs/resources/webhook#create-webhook * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type RESTPostAPIChannelWebhookResult = APIWebhook; /** * https://discord.com/developers/docs/resources/webhook#get-channel-webhooks * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type RESTGetAPIChannelWebhooksResult = APIWebhook[]; /** * https://discord.com/developers/docs/resources/webhook#get-guild-webhooks * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type RESTGetAPIGuildWebhooksResult = APIWebhook[]; /** * https://discord.com/developers/docs/resources/webhook#get-webhook * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type RESTGetAPIWebhookResult = APIWebhook; /** * https://discord.com/developers/docs/resources/webhook#get-webhook-with-token * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type RESTGetAPIWebhookWithTokenResult = Omit<APIWebhook, 'user'>; /** * https://discord.com/developers/docs/resources/webhook#modify-webhook * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export interface RESTPatchAPIWebhookJSONBody { /** * The default name of the webhook */ name?: string | undefined; /** * Image for the default webhook avatar * * See https://discord.com/developers/docs/reference#image-data */ avatar?: string | null | undefined; /** * The new channel id this webhook should be moved to */ channel_id?: Snowflake | undefined; } /** * https://discord.com/developers/docs/resources/webhook#modify-webhook * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type RESTPatchAPIWebhookResult = APIWebhook; /** * https://discord.com/developers/docs/resources/webhook#modify-webhook-with-token * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type RESTPatchAPIWebhookWithTokenJSONBody = Omit<RESTPatchAPIWebhookJSONBody, 'channel_id'>; /** * https://discord.com/developers/docs/resources/webhook#modify-webhook-with-token * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type RESTPatchAPIWebhookWithTokenResult = RESTGetAPIWebhookWithTokenResult; /** * https://discord.com/developers/docs/resources/webhook#delete-webhook * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type RESTDeleteAPIWebhookResult = never; /** * https://discord.com/developers/docs/resources/webhook#delete-webhook-with-token * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type RESTDeleteAPIWebhookWithTokenResult = never; /** * https://discord.com/developers/docs/resources/webhook#execute-webhook * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export interface RESTPostAPIWebhookWithTokenJSONBody { /** * The message contents (up to 2000 characters) */ content?: string | undefined; /** * Override the default username of the webhook */ username?: string | undefined; /** * Override the default avatar of the webhook */ avatar_url?: string | undefined; /** * `true` if this is a TTS message */ tts?: boolean | undefined; /** * Embedded `rich` content * * See https://discord.com/developers/docs/resources/channel#embed-object */ embeds?: APIEmbed[] | undefined; /** * Allowed mentions for the message * * See https://discord.com/developers/docs/resources/channel#allowed-mentions-object */ allowed_mentions?: APIAllowedMentions | undefined; /** * The components to include with the message * * Requires an application-owned webhook * * See https://discord.com/developers/docs/interactions/message-components#component-object */ components?: APIActionRowComponent<APIMessageActionRowComponent>[] | undefined; /** * Attachment objects with filename and description */ attachments?: (Partial<Pick<APIAttachment, 'filename'>> & Pick<APIAttachment, 'description' | 'id'>)[] | undefined; /** * Message flags combined as a bitfield */ flags?: MessageFlags | undefined; } /** * https://discord.com/developers/docs/resources/webhook#execute-webhook * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type RESTPostAPIWebhookWithTokenFormDataBody = (Record<`files[${bigint}]`, unknown> & { /** * JSON stringified message body */ payload_json?: string | undefined; }) | (Record<`files[${bigint}]`, unknown> & RESTPostAPIWebhookWithTokenJSONBody); /** * https://discord.com/developers/docs/resources/webhook#execute-webhook-querystring-params * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export interface RESTPostAPIWebhookWithTokenQuery { /** * Waits for server confirmation of message send before response, and returns the created message body * (defaults to `false`; when `false` a message that is not saved does not return an error) * * @default false */ wait?: boolean; /** * Send a message to the specified thread within a webhook's channel. The thread will automatically be unarchived. */ thread_id?: Snowflake; } /** * https://discord.com/developers/docs/resources/webhook#execute-webhook * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type RESTPostAPIWebhookWithTokenResult = never; /** * Received when a call to https://discord.com/developers/docs/resources/webhook#execute-webhook receives * the `wait` query parameter set to `true` * * See https://discord.com/developers/docs/resources/webhook#execute-webhook-querystring-params * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type RESTPostAPIWebhookWithTokenWaitResult = APIMessage; /** * https://discord.com/developers/docs/resources/webhook#execute-slackcompatible-webhook-querystring-params * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type RESTPostAPIWebhookWithTokenSlackQuery = RESTPostAPIWebhookWithTokenQuery; /** * https://discord.com/developers/docs/resources/webhook#execute-slackcompatible-webhook * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type RESTPostAPIWebhookWithTokenSlackResult = never; /** * Received when a call to https://discord.com/developers/docs/resources/webhook#execute-webhook receives * the `wait` query parameter set to `true` * * See https://discord.com/developers/docs/resources/webhook#execute-slackcompatible-webhook-querystring-params * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type RESTPostAPIWebhookWithTokenSlackWaitResult = APIMessage; /** * https://discord.com/developers/docs/resources/webhook#execute-githubcompatible-webhook-querystring-params * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type RESTPostAPIWebhookWithTokenGitHubQuery = RESTPostAPIWebhookWithTokenQuery; /** * https://discord.com/developers/docs/resources/webhook#execute-githubcompatible-webhook * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type RESTPostAPIWebhookWithTokenGitHubResult = never; /** * Received when a call to https://discord.com/developers/docs/resources/webhook#execute-webhook receives * the `wait` query parameter set to `true` * * See https://discord.com/developers/docs/resources/webhook#execute-githubcompatible-webhook-querystring-params * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type RESTPostAPIWebhookWithTokenGitHubWaitResult = APIMessage; /** * https://discord.com/developers/docs/resources/webhook#get-webhook-message * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type RESTGetAPIWebhookWithTokenMessageResult = APIMessage; /** * https://discord.com/developers/docs/resources/webhook#edit-webhook-message * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type RESTPatchAPIWebhookWithTokenMessageJSONBody = _AddUndefinedToPossiblyUndefinedPropertiesOfInterface<_Nullable<Pick<RESTPostAPIWebhookWithTokenJSONBody, 'allowed_mentions' | 'components' | 'content' | 'embeds'>>> & { /** * Attached files to keep * * Starting with API v10, the `attachments` array must contain all attachments that should be present after edit, including **retained and new** attachments provided in the request body. * * See https://discord.com/developers/docs/resources/channel#attachment-object */ attachments?: (Partial<Pick<APIAttachment, 'description' | 'filename'>> & Pick<APIAttachment, 'id'>)[] | undefined; }; /** * https://discord.com/developers/docs/resources/webhook#edit-webhook-message * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type RESTPatchAPIWebhookWithTokenMessageFormDataBody = (Record<`files[${bigint}]`, unknown> & { /** * JSON stringified message body */ payload_json?: string | undefined; }) | (Record<`files[${bigint}]`, unknown> & RESTPatchAPIWebhookWithTokenMessageJSONBody); /** * https://discord.com/developers/docs/resources/webhook#edit-webhook-message * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type RESTPatchAPIWebhookWithTokenMessageResult = APIMessage; /** * https://discord.com/developers/docs/resources/webhook#delete-webhook-message * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type RESTDeleteAPIWebhookWithTokenMessageResult = never; //# sourceMappingURL=webhook.d.ts.map node_modules/discord-api-types/rest/v8/interactions.js 0000664 00000000165 15114741631 0017142 0 ustar 00 "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); //# sourceMappingURL=interactions.js.map node_modules/discord-api-types/rest/v8/channel.js 0000664 00000000160 15114741631 0016043 0 ustar 00 "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); //# sourceMappingURL=channel.js.map node_modules/discord-api-types/rest/v8/emoji.d.ts 0000664 00000004575 15114741631 0016010 0 ustar 00 import type { Snowflake } from '../../globals'; import type { APIEmoji } from '../../payloads/v8/index'; /** * https://discord.com/developers/docs/resources/emoji#list-guild-emojis * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type RESTGetAPIGuildEmojisResult = APIEmoji[]; /** * https://discord.com/developers/docs/resources/emoji#get-guild-emoji * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type RESTGetAPIGuildEmojiResult = APIEmoji; /** * https://discord.com/developers/docs/resources/emoji#create-guild-emoji-json-params * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export interface RESTPostAPIGuildEmojiJSONBody { /** * Name of the emoji */ name: string; /** * The 128x128 emoji image * * https://discord.com/developers/docs/reference#image-data */ image: string; /** * Roles for which this emoji will be whitelisted */ roles?: Snowflake[] | undefined; } /** * https://discord.com/developers/docs/resources/emoji#create-guild-emoji * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type RESTPostAPIGuildEmojiResult = APIEmoji; /** * https://discord.com/developers/docs/resources/emoji#modify-guild-emoji * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export interface RESTPatchAPIGuildEmojiJSONBody { /** * Name of the emoji */ name?: string | undefined; /** * Roles for which this emoji will be whitelisted */ roles?: Snowflake[] | null | undefined; } /** * https://discord.com/developers/docs/resources/emoji#modify-guild-emoji * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type RESTPatchAPIGuildEmojiResult = APIEmoji; /** * https://discord.com/developers/docs/resources/emoji#delete-guild-emoji * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type RESTDeleteAPIGuildEmojiResult = never; //# sourceMappingURL=emoji.d.ts.map node_modules/discord-api-types/rest/v8/guild.js.map 0000664 00000000137 15114741631 0016317 0 ustar 00 {"version":3,"file":"guild.js","sourceRoot":"","sources":["guild.ts"],"names":[],"mappings":""} node_modules/discord-api-types/rest/v8/auditLog.js 0000664 00000000161 15114741631 0016204 0 ustar 00 "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); //# sourceMappingURL=auditLog.js.map node_modules/discord-api-types/rest/v8/webhook.js 0000664 00000000160 15114741631 0016071 0 ustar 00 "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); //# sourceMappingURL=webhook.js.map node_modules/discord-api-types/rest/v8/sticker.d.ts 0000664 00000005020 15114741631 0016333 0 ustar 00 import type { APISticker, APIStickerPack } from '../../payloads/v8/index'; /** * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type RESTGetAPIStickerResult = APISticker; /** * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export interface RESTGetNitroStickerPacksResult { sticker_packs: APIStickerPack[]; } /** * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type RESTGetAPIGuildStickersResult = APISticker[]; /** * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type RESTGetAPIGuildStickerResult = APISticker; /** * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export interface RESTPostAPIGuildStickerFormDataBody { /** * Name of the sticker (2-30 characters) */ name: string; /** * Description of the sticker (empty or 2-100 characters) */ description: string; /** * The Discord name of a unicode emoji representing the sticker's expression (2-200 characters) */ tags: string; /** * The sticker file to upload, must be a PNG, APNG, or Lottie JSON file, max 500 KB */ file: unknown; } /** * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type RESTPostAPIGuildStickerResult = APISticker; /** * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export interface RESTPatchAPIGuildStickerJSONBody { /** * Name of the sticker (2-30 characters) */ name?: string | undefined; /** * Description of the sticker (2-100 characters) */ description?: string | null | undefined; /** * The Discord name of a unicode emoji representing the sticker's expression (2-200 characters) */ tags?: string | undefined; } /** * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type RESTPatchAPIGuildStickerResult = APISticker; /** * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type RESTDeleteAPIGuildStickerResult = never; //# sourceMappingURL=sticker.d.ts.map node_modules/discord-api-types/rest/v8/voice.js 0000664 00000000156 15114741631 0015545 0 ustar 00 "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); //# sourceMappingURL=voice.js.map node_modules/discord-api-types/rest/v8/guild.d.ts 0000664 00000077170 15114741631 0016012 0 ustar 00 import type { Permissions, Snowflake } from '../../globals'; import type { APIBan, APIChannel, APIDMChannel, APIExtendedInvite, APIGroupDMChannel, APIGuild, APIGuildIntegration, APIGuildMember, APIGuildMembershipScreening, APIGuildPreview, APIGuildWelcomeScreen, APIGuildWidget, APIGuildWidgetSettings, APIRole, APIVoiceRegion, GuildDefaultMessageNotifications, GuildExplicitContentFilter, GuildFeature, GuildSystemChannelFlags, GuildVerificationLevel, GuildWidgetStyle } from '../../payloads/v8/index'; import type { _Nullable, _StrictPartial, _StrictRequired, _UnionToIntersection } from '../../utils/internals'; import type { RESTPutAPIChannelPermissionJSONBody } from './channel'; /** * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export interface APIGuildCreateOverwrite extends RESTPutAPIChannelPermissionJSONBody { id: number | string; } /** * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type APIGuildChannelResolvable = Exclude<APIChannel, APIDMChannel | APIGroupDMChannel>; /** * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type APIGuildCreatePartialChannel = _StrictPartial<Pick<_UnionToIntersection<APIGuildChannelResolvable>, 'bitrate' | 'nsfw' | 'rate_limit_per_user' | 'topic' | 'type' | 'user_limit'>> & { name: string; id?: number | string | undefined; parent_id?: number | string | null | undefined; permission_overwrites?: APIGuildCreateOverwrite[] | undefined; }; /** * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export interface APIGuildCreateRole extends RESTPostAPIGuildRoleJSONBody { id: number | string; } /** * https://discord.com/developers/docs/resources/guild#create-guild * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export interface RESTPostAPIGuildsJSONBody { /** * Name of the guild (2-100 characters) */ name: string; /** * Voice region id * * See https://discord.com/developers/docs/resources/voice#voice-region-object */ region?: string | undefined; /** * base64 1024x1024 png/jpeg image for the guild icon * * See https://discord.com/developers/docs/reference#image-data */ icon?: string | undefined; /** * Verification level * * See https://discord.com/developers/docs/resources/guild#guild-object-verification-level */ verification_level?: GuildVerificationLevel | undefined; /** * Default message notification level * * See https://discord.com/developers/docs/resources/guild#guild-object-default-message-notification-level */ default_message_notifications?: GuildDefaultMessageNotifications | undefined; /** * Explicit content filter level * * See https://discord.com/developers/docs/resources/guild#guild-object-explicit-content-filter-level */ explicit_content_filter?: GuildExplicitContentFilter | undefined; /** * New guild roles * * @remarks * When using this parameter, the first member of the array is used to change properties of the guild's `@everyone` role. * If you are trying to bootstrap a guild with additional roles, keep this in mind. * * Also, the required `id` field within each role object is an integer placeholder, * and will be replaced by the API upon consumption. Its purpose is to allow you to overwrite a role's permissions * in a channel when also passing in channels with the channels array. * * See https://discord.com/developers/docs/topics/permissions#role-object */ roles?: APIGuildCreateRole[] | undefined; /** * New guild's channels * * @remarks * When using the channels parameter, the `position` field is ignored, and none of the default channels are created. * * Also, the `id` field within each channel object may be set to an integer placeholder, * and will be replaced by the API upon consumption. Its purpose is to allow you to create `GUILD_CATEGORY` channels * by setting the `parent_id` field on any children to the category's id field. * Category channels must be listed before any children. * * See https://discord.com/developers/docs/resources/channel#channel-object */ channels?: APIGuildCreatePartialChannel[] | undefined; /** * ID for afk channel */ afk_channel_id?: Snowflake | number | null | undefined; /** * AFK timeout in seconds */ afk_timeout?: number | undefined; /** * The id of the channel where guild notices such as welcome messages and boost events are posted */ system_channel_id?: Snowflake | number | null | undefined; /** * System channel flags * * See https://discord.com/developers/docs/resources/guild#guild-object-system-channel-flags */ system_channel_flags?: GuildSystemChannelFlags | undefined; /** * Whether the boosts progress bar should be enabled. */ premium_progress_bar_enabled?: boolean | undefined; } /** * https://discord.com/developers/docs/resources/guild#create-guild * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type RESTPostAPIGuildsResult = APIGuild; /** * https://discord.com/developers/docs/resources/guild#get-guild * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export interface RESTGetAPIGuildQuery { /** * When `true`, will return approximate member and presence counts for the guild * * @default false */ with_counts?: boolean; } /** * https://discord.com/developers/docs/resources/guild#get-guild * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type RESTGetAPIGuildResult = APIGuild; /** * https://discord.com/developers/docs/resources/guild#get-guild-preview * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type RESTGetAPIGuildPreviewResult = APIGuildPreview; /** * https://discord.com/developers/docs/resources/guild#modify-guild * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export interface RESTPatchAPIGuildJSONBody { /** * New name for the guild (2-100 characters) */ name?: string | undefined; /** * Voice region id * * See https://discord.com/developers/docs/resources/voice#voice-region-object */ region?: string | null | undefined; /** * Verification level * * See https://discord.com/developers/docs/resources/guild#guild-object-verification-level */ verification_level?: GuildVerificationLevel | null | undefined; /** * Default message notification level * * See https://discord.com/developers/docs/resources/guild#guild-object-default-message-notification-level */ default_message_notifications?: GuildDefaultMessageNotifications | null | undefined; /** * Explicit content filter level * * See https://discord.com/developers/docs/resources/guild#guild-object-explicit-content-filter-level */ explicit_content_filter?: GuildExplicitContentFilter | null | undefined; /** * ID for afk channel */ afk_channel_id?: Snowflake | null | undefined; /** * AFK timeout in seconds */ afk_timeout?: number | undefined; /** * base64 1024x1024 png/jpeg/gif image for the guild icon (can be animated gif when the guild has `ANIMATED_ICON` feature) * * See https://discord.com/developers/docs/reference#image-data */ icon?: string | null | undefined; /** * User id to transfer guild ownership to (must be owner) */ owner_id?: Snowflake | undefined; /** * base64 16:9 png/jpeg image for the guild splash (when the guild has `INVITE_SPLASH` feature) * * See https://discord.com/developers/docs/reference#image-data */ splash?: string | null | undefined; /** * base64 png/jpeg image for the guild discovery splash (when the guild has `DISCOVERABLE` feature) */ discovery_splash?: string | null | undefined; /** * base64 16:9 png/jpeg image for the guild banner (when the server has the `BANNER` feature; can be animated gif when the server has the `ANIMATED_BANNER` feature) */ banner?: string | null | undefined; /** * The id of the channel where guild notices such as welcome messages and boost events are posted */ system_channel_id?: Snowflake | null | undefined; /** * System channel flags * * See https://discord.com/developers/docs/resources/guild#guild-object-system-channel-flags */ system_channel_flags?: GuildSystemChannelFlags | undefined; /** * The id of the channel where Community guilds display rules and/or guidelines */ rules_channel_id?: Snowflake | null | undefined; /** * The id of the channel where admins and moderators of Community guilds receive notices from Discord */ public_updates_channel_id?: Snowflake | null | undefined; /** * The preferred locale of a Community guild used in server discovery and notices from Discord; defaults to "en-US" * * @default "en-US" (if the value is set to `null`) */ preferred_locale?: string | null | undefined; /** * Enabled guild features * * See https://discord.com/developers/docs/resources/guild#guild-object-guild-features */ features?: GuildFeature[] | undefined; /** * The description for the guild, if the guild is discoverable */ description?: string | null | undefined; /** * Whether the boosts progress bar should be enabled. */ premium_progress_bar_enabled?: boolean | undefined; } /** * https://discord.com/developers/docs/resources/guild#modify-guild * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type RESTPatchAPIGuildResult = APIGuild; /** * https://discord.com/developers/docs/resources/guild#delete-guild * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type RESTDeleteAPIGuildResult = never; /** * https://discord.com/developers/docs/resources/guild#get-guild-channels * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type RESTGetAPIGuildChannelsResult = APIChannel[]; /** * https://discord.com/developers/docs/resources/guild#create-guild-channel * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type RESTPostAPIGuildChannelJSONBody = Omit<APIGuildCreatePartialChannel, 'id'>; /** * https://discord.com/developers/docs/resources/guild#create-guild-channel * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type RESTPostAPIGuildChannelResult = APIChannel; /** * https://discord.com/developers/docs/resources/guild#modify-guild-channel-positions * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type RESTPatchAPIGuildChannelPositionsJSONBody = { /** * Channel id */ id: Snowflake; /** * Sorting position of the channel */ position: number; /** * Sync channel overwrites with the new parent, when moving to a new `parent_id` */ lock_permissions?: boolean | undefined; /** * The new parent id of this channel */ parent_id?: Snowflake | null | undefined; }[]; /** * https://discord.com/developers/docs/resources/guild#modify-guild-channel-positions * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type RESTPatchAPIGuildChannelPositionsResult = never; /** * https://discord.com/developers/docs/resources/guild#get-guild-member * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type RESTGetAPIGuildMemberResult = APIGuildMember; /** * https://discord.com/developers/docs/resources/guild#list-guild-members * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export interface RESTGetAPIGuildMembersQuery { /** * Max number of members to return (1-1000) * * @default 1 */ limit?: number; /** * The highest user id in the previous page * * @default 0 */ after?: Snowflake; } /** * https://discord.com/developers/docs/resources/guild#list-guild-members * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type RESTGetAPIGuildMembersResult = APIGuildMember[]; /** * https://discord.com/developers/docs/resources/guild#search-guild-members * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export interface RESTGetAPIGuildMembersSearchQuery { /** * Query string to match username(s) and nickname(s) against */ query: string; /** * Max number of members to return (1-1000) * * @default 1 */ limit?: number; } /** * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type RESTGetAPIGuildMembersSearchResult = APIGuildMember[]; /** * https://discord.com/developers/docs/resources/guild#add-guild-member * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export interface RESTPutAPIGuildMemberJSONBody { /** * An oauth2 access token granted with the `guilds.join` to the bot's application for the user you want to add to the guild */ access_token: string; /** * Value to set users nickname to * * Requires `MANAGE_NICKNAMES` permission */ nick?: string | undefined; /** * Array of role ids the member is assigned * * Requires `MANAGE_ROLES` permission */ roles?: Snowflake[] | undefined; /** * Whether the user is muted in voice channels * * Requires `MUTE_MEMBERS` permission */ mute?: boolean | undefined; /** * Whether the user is deafened in voice channels * * Requires `DEAFEN_MEMBERS` permission */ deaf?: boolean | undefined; } /** * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type RESTPutAPIGuildMemberResult = APIGuildMember | undefined; /** * https://discord.com/developers/docs/resources/guild#modify-guild-member * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export interface RESTPatchAPIGuildMemberJSONBody { /** * Value to set users nickname to * * Requires `MANAGE_NICKNAMES` permission */ nick?: string | null | undefined; /** * Array of role ids the member is assigned * * Requires `MANAGE_ROLES` permission */ roles?: Snowflake[] | null | undefined; /** * Whether the user is muted in voice channels. Will throw a 400 if the user is not in a voice channel * * Requires `MUTE_MEMBERS` permission */ mute?: boolean | null | undefined; /** * Whether the user is deafened in voice channels. Will throw a 400 if the user is not in a voice channel * * Requires `DEAFEN_MEMBERS` permission */ deaf?: boolean | null | undefined; /** * ID of channel to move user to (if they are connected to voice) * * Requires `MOVE_MEMBERS` permission */ channel_id?: Snowflake | null | undefined; /** * Timestamp of when the time out will be removed; until then, they cannot interact with the guild */ communication_disabled_until?: string | null | undefined; } /** * https://discord.com/developers/docs/resources/guild#add-guild-member * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type RESTPatchAPIGuildMemberResult = APIGuildMember; /** * https://discord.com/developers/docs/resources/guild#modify-current-user-nick * * @deprecated Use [Modify Current Member](https://discord.com/developers/docs/resources/guild#modify-current-member) instead. * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export interface RESTPatchAPICurrentGuildMemberNicknameJSONBody { /** * Value to set users nickname to * * Requires `CHANGE_NICKNAME` permission */ nick?: string | null | undefined; } /** * https://discord.com/developers/docs/resources/guild#modify-current-member * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export interface RESTPatchAPICurrentGuildMemberJSONBody { /** * Value to set users nickname to * * Requires `CHANGE_NICKNAME` permission */ nick?: string | null | undefined; } /** * https://discord.com/developers/docs/resources/guild#modify-current-user-nick * * @deprecated Use [Modify Current Member](https://discord.com/developers/docs/resources/guild#modify-current-member) instead. * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type RESTPatchAPICurrentGuildMemberNicknameResult = _StrictRequired<RESTPatchAPICurrentGuildMemberNicknameJSONBody>; /** * https://discord.com/developers/docs/resources/guild#add-guild-member-role * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type RESTPutAPIGuildMemberRoleResult = never; /** * https://discord.com/developers/docs/resources/guild#remove-guild-member-role * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type RESTDeleteAPIGuildMemberRoleResult = never; /** * https://discord.com/developers/docs/resources/guild#remove-guild-member * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type RESTDeleteAPIGuildMemberResult = never; /** * https://discord.com/developers/docs/resources/guild#get-guild-bans * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type RESTGetAPIGuildBansResult = APIBan[]; /** * https://discord.com/developers/docs/resources/guild#get-guild-ban * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type RESTGetAPIGuildBanResult = APIBan; /** * https://discord.com/developers/docs/resources/guild#create-guild-ban * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export interface RESTPutAPIGuildBanJSONBody { /** * Number of days to delete messages for (0-7) */ delete_message_days?: number | undefined; /** * Reason for the ban * * @deprecated Removed in API v10, use the `X-Audit-Log-Reason` header instead. */ reason?: string | undefined; } /** * https://discord.com/developers/docs/resources/guild#create-guild-ban * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type RESTPutAPIGuildBanResult = never; /** * https://discord.com/developers/docs/resources/guild#remove-guild-ban * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type RESTDeleteAPIGuildBanResult = never; /** * https://discord.com/developers/docs/resources/guild#get-guild-roles * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type RESTGetAPIGuildRolesResult = APIRole[]; /** * https://discord.com/developers/docs/resources/guild#create-guild-role * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export interface RESTPostAPIGuildRoleJSONBody { /** * Name of the role * * @default "new role" */ name?: string | null | undefined; /** * Bitwise value of the enabled/disabled permissions * * @default "default role permissions in guild" */ permissions?: Permissions | null | undefined; /** * RGB color value * * @default 0 */ color?: number | null | undefined; /** * Whether the role should be displayed separately in the sidebar * * @default false */ hoist?: boolean | null | undefined; /** * The role's icon image (if the guild has the `ROLE_ICONS` feature) */ icon?: string | null | undefined; /** * The role's unicode emoji as a standard emoji (if the guild has the `ROLE_ICONS` feature) */ unicode_emoji?: string | null | undefined; /** * Whether the role should be mentionable * * @default false */ mentionable?: boolean | null | undefined; } /** * https://discord.com/developers/docs/resources/guild#create-guild-role * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type RESTPostAPIGuildRoleResult = APIRole; /** * https://discord.com/developers/docs/resources/guild#modify-guild-role-positions * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type RESTPatchAPIGuildRolePositionsJSONBody = { /** * Role id */ id: Snowflake; /** * Sorting position of the role */ position?: number | undefined; }[]; /** * https://discord.com/developers/docs/resources/guild#modify-guild-role-positions * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type RESTPatchAPIGuildRolePositionsResult = APIRole[]; /** * https://discord.com/developers/docs/resources/guild#modify-guild-role * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export interface RESTPatchAPIGuildRoleJSONBody { /** * Name of the role */ name?: string | null | undefined; /** * Bitwise value of the enabled/disabled permissions */ permissions?: Permissions | null | undefined; /** * RGB color value */ color?: number | null | undefined; /** * Whether the role should be displayed separately in the sidebar */ hoist?: boolean | null | undefined; /** * The role's icon image (if the guild has the `ROLE_ICONS` feature) */ icon?: string | null | undefined; /** * The role's unicode emoji as a standard emoji (if the guild has the `ROLE_ICONS` feature) */ unicode_emoji?: string | null | undefined; /** * Whether the role should be mentionable */ mentionable?: boolean | null | undefined; } /** * https://discord.com/developers/docs/resources/guild#modify-guild-role * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type RESTPatchAPIGuildRoleResult = APIRole; /** * https://discord.com/developers/docs/resources/guild#delete-guild-role * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type RESTDeleteAPIGuildRoleResult = never; /** * https://discord.com/developers/docs/resources/guild#get-guild-prune-count * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export interface RESTGetAPIGuildPruneCountQuery { /** * Number of days to count prune for (1 or more) * * @default 7 */ days?: number; /** * Role(s) to include * * While this is typed as a string, it represents an array of * role IDs delimited by commas * * See https://discord.com/developers/docs/resources/guild#get-guild-prune-count-query-string-params */ include_roles?: string; } /** * https://discord.com/developers/docs/resources/guild#get-guild-prune-count * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export interface RESTGetAPIGuildPruneCountResult { pruned: number; } /** * https://discord.com/developers/docs/resources/guild#begin-guild-prune * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export interface RESTPostAPIGuildPruneJSONBody { /** * Number of days to count prune for (1 or more) * * @default 7 */ days?: number | undefined; /** * Whether `pruned is returned, discouraged for large guilds * * @default true */ compute_prune_count?: boolean | undefined; /** * Role(s) to include */ include_roles?: Snowflake[] | undefined; } /** * https://discord.com/developers/docs/resources/guild#begin-guild-prune * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export interface RESTPostAPIGuildPruneResult { pruned: number | null; } /** * https://discord.com/developers/docs/resources/guild#get-guild-voice-regions * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type RESTGetAPIGuildVoiceRegionsResult = APIVoiceRegion[]; /** * https://discord.com/developers/docs/resources/guild#get-guild-invites * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type RESTGetAPIGuildInvitesResult = APIExtendedInvite[]; /** * https://discord.com/developers/docs/resources/guild#get-guild-integrations * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type RESTGetAPIGuildIntegrationsResult = APIGuildIntegration[]; /** * https://discord.com/developers/docs/resources/guild#delete-guild-integration * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type RESTDeleteAPIGuildIntegrationResult = never; /** * https://discord.com/developers/docs/resources/guild#get-guild-widget-settings * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type RESTGetAPIGuildWidgetSettingsResult = APIGuildWidgetSettings; /** * https://discord.com/developers/docs/resources/guild#modify-guild-widget * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type RESTPatchAPIGuildWidgetSettingsJSONBody = _StrictPartial<APIGuildWidgetSettings>; /** * https://discord.com/developers/docs/resources/guild#modify-guild-widget * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type RESTPatchAPIGuildWidgetSettingsResult = APIGuildWidgetSettings; /** * https://discord.com/developers/docs/resources/guild#get-guild-widget * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type RESTGetAPIGuildWidgetJSONResult = APIGuildWidget; /** * https://discord.com/developers/docs/resources/guild#get-guild-vanity-url * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export interface RESTGetAPIGuildVanityUrlResult { code: string | null; uses: number; } /** * https://discord.com/developers/docs/resources/guild#get-guild-widget-image * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export interface RESTGetAPIGuildWidgetImageQuery { /** * Style of the widget image returned * * @default "shield" */ style?: GuildWidgetStyle; } /** * Note: while the return type is `ArrayBuffer`, the expected result is * a buffer of sorts (depends if in browser or on node.js/deno). * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type RESTGetAPIGuildWidgetImageResult = ArrayBuffer; /** * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type RESTGetAPIGuildMemberVerificationResult = APIGuildMembershipScreening; /** * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export interface RESTPatchAPIGuildMemberVerificationJSONBody { /** * Whether Membership Screening is enabled */ enabled?: boolean | undefined; /** * Array of field objects serialized in a string */ form_fields?: string | undefined; /** * The server description to show in the screening form */ description?: string | null | undefined; } /** * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type RESTPatchAPIGuildMemberVerificationResult = APIGuildMembershipScreening; /** * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export interface RESTPatchAPIGuildVoiceStateCurrentMemberJSONBody { /** * The id of the channel the user is currently in */ channel_id: Snowflake; /** * Toggles the user's suppress state */ suppress?: boolean | undefined; /** * Sets the user's request to speak */ request_to_speak_timestamp?: string | null | undefined; } /** * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export interface RESTPatchAPIGuildVoiceStateUserJSONBody { /** * The id of the channel the user is currently in */ channel_id: Snowflake; /** * Toggles the user's suppress state */ suppress?: boolean | undefined; } /** * https://discord.com/developers/docs/resources/guild#get-guild-welcome-screen * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type RESTGetAPIGuildWelcomeScreenResult = APIGuildWelcomeScreen; /** * https://discord.com/developers/docs/resources/guild#modify-guild-welcome-screen * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type RESTPatchAPIGuildWelcomeScreenJSONBody = _Nullable<_StrictPartial<APIGuildWelcomeScreen>> & { /** * Whether the welcome screen is enabled */ enabled?: boolean | null | undefined; }; //# sourceMappingURL=guild.d.ts.map node_modules/discord-api-types/rest/v8/index.d.ts 0000664 00000047212 15114741631 0016007 0 ustar 00 import type { Snowflake } from '../../globals'; export * from '../common'; export * from './auditLog'; export * from './channel'; export * from './emoji'; export * from './gateway'; export * from './guild'; export * from './guildScheduledEvent'; export * from './interactions'; export * from './invite'; export * from './oauth2'; export * from './stageInstance'; export * from './sticker'; export * from './template'; export * from './user'; export * from './voice'; export * from './webhook'; export declare const APIVersion = "8"; export declare const Routes: { /** * Route for: * - GET `/guilds/{guild.id}/audit-logs` */ guildAuditLog(guildId: Snowflake): `/guilds/${string}/audit-logs`; /** * Route for: * - GET `/channels/{channel.id}` * - PATCH `/channels/{channel.id}` * - DELETE `/channels/{channel.id}` */ channel(channelId: Snowflake): `/channels/${string}`; /** * Route for: * - GET `/channels/{channel.id}/messages` * - POST `/channels/{channel.id}/messages` */ channelMessages(channelId: Snowflake): `/channels/${string}/messages`; /** * Route for: * - GET `/channels/{channel.id}/messages/{message.id}` * - PATCH `/channels/{channel.id}/messages/{message.id}` * - DELETE `/channels/{channel.id}/messages/{message.id}` */ channelMessage(channelId: Snowflake, messageId: Snowflake): `/channels/${string}/messages/${string}`; /** * Route for: * - POST `/channels/{channel.id}/messages/{message.id}/crosspost` */ channelMessageCrosspost(channelId: Snowflake, messageId: Snowflake): `/channels/${string}/messages/${string}/crosspost`; /** * Route for: * - PUT `/channels/{channel.id}/messages/{message.id}/reactions/{emoji}/@me` * - DELETE `/channels/{channel.id}/messages/{message.id}/reactions/{emoji}/@me` * * **Note**: You need to URL encode the emoji yourself */ channelMessageOwnReaction(channelId: Snowflake, messageId: Snowflake, emoji: string): `/channels/${string}/messages/${string}/reactions/${string}/@me`; /** * Route for: * - DELETE `/channels/{channel.id}/messages/{message.id}/reactions/{emoji}/{user.id}` * * **Note**: You need to URL encode the emoji yourself */ channelMessageUserReaction(channelId: Snowflake, messageId: Snowflake, emoji: string, userId: Snowflake): `/channels/${string}/messages/${string}/reactions/${string}/${string}`; /** * Route for: * - GET `/channels/{channel.id}/messages/{message.id}/reactions/{emoji}` * - DELETE `/channels/{channel.id}/messages/{message.id}/reactions/{emoji}` * * **Note**: You need to URL encode the emoji yourself */ channelMessageReaction(channelId: Snowflake, messageId: Snowflake, emoji: string): `/channels/${string}/messages/${string}/reactions/${string}`; /** * Route for: * - DELETE `/channels/{channel.id}/messages/{message.id}/reactions` */ channelMessageAllReactions(channelId: Snowflake, messageId: Snowflake): `/channels/${string}/messages/${string}/reactions`; /** * Route for: * - POST `/channels/{channel.id}/messages/bulk-delete` */ channelBulkDelete(channelId: Snowflake): `/channels/${string}/messages/bulk-delete`; /** * Route for: * - PUT `/channels/{channel.id}/permissions/{overwrite.id}` * - DELETE `/channels/{channel.id}/permissions/{overwrite.id}` */ channelPermission(channelId: Snowflake, overwriteId: Snowflake): `/channels/${string}/permissions/${string}`; /** * Route for: * - GET `/channels/{channel.id}/invites` * - POST `/channels/{channel.id}/invites` */ channelInvites(channelId: Snowflake): `/channels/${string}/invites`; /** * Route for: * - POST `/channels/{channel.id}/followers` */ channelFollowers(channelId: Snowflake): `/channels/${string}/followers`; /** * Route for: * - POST `/channels/{channel.id}/typing` */ channelTyping(channelId: Snowflake): `/channels/${string}/typing`; /** * Route for: * - GET `/channels/{channel.id}/pins` */ channelPins(channelId: Snowflake): `/channels/${string}/pins`; /** * Route for: * - PUT `/channels/{channel.id}/pins/{message.id}` * - DELETE `/channels/{channel.id}/pins/{message.id}` */ channelPin(channelId: Snowflake, messageId: Snowflake): `/channels/${string}/pins/${string}`; /** * Route for: * - PUT `/channels/{channel.id}/recipients/{user.id}` * - DELETE `/channels/{channel.id}/recipients/{user.id}` */ channelRecipient(channelId: Snowflake, userId: Snowflake): `/channels/${string}/recipients/${string}`; /** * Route for: * - GET `/guilds/{guild.id}/emojis` * - POST `/guilds/{guild.id}/emojis` */ guildEmojis(guildId: Snowflake): `/guilds/${string}/emojis`; /** * Route for: * - GET `/guilds/{guild.id}/emojis/{emoji.id}` * - PATCH `/guilds/{guild.id}/emojis/{emoji.id}` * - DELETE `/guilds/{guild.id}/emojis/{emoji.id}` */ guildEmoji(guildId: Snowflake, emojiId: Snowflake): `/guilds/${string}/emojis/${string}`; /** * Route for: * - POST `/guilds` */ guilds(): "/guilds"; /** * Route for: * - GET `/guilds/{guild.id}` * - PATCH `/guilds/{guild.id}` * - DELETE `/guilds/{guild.id}` */ guild(guildId: Snowflake): `/guilds/${string}`; /** * Route for: * - GET `/guilds/{guild.id}/preview` */ guildPreview(guildId: Snowflake): `/guilds/${string}/preview`; /** * Route for: * - GET `/guilds/{guild.id}/channels` * - POST `/guilds/{guild.id}/channels` * - PATCH `/guilds/{guild.id}/channels` */ guildChannels(guildId: Snowflake): `/guilds/${string}/channels`; /** * Route for: * - GET `/guilds/{guild.id}/members/{user.id}` * - PUT `/guilds/{guild.id}/members/{user.id}` * - PATCH `/guilds/{guild.id}/members/@me` * - PATCH `/guilds/{guild.id}/members/{user.id}` * - DELETE `/guilds/{guild.id}/members/{user.id}` */ guildMember(guildId: Snowflake, userId?: Snowflake | "@me"): `/guilds/${string}/members/${string}`; /** * Route for: * - GET `/guilds/{guild.id}/members` */ guildMembers(guildId: Snowflake): `/guilds/${string}/members`; /** * Route for: * - GET `/guilds/{guild.id}/members/search` */ guildMembersSearch(guildId: Snowflake): `/guilds/${string}/members/search`; /** * Route for: * - PATCH `/guilds/{guild.id}/members/@me/nick` * * @deprecated Use {@link Routes.guildMember} instead. */ guildCurrentMemberNickname(guildId: Snowflake): `/guilds/${string}/members/@me/nick`; /** * Route for: * - PUT `/guilds/{guild.id}/members/{user.id}/roles/{role.id}` * - DELETE `/guilds/{guild.id}/members/{user.id}/roles/{role.id}` */ guildMemberRole(guildId: Snowflake, memberId: Snowflake, roleId: Snowflake): `/guilds/${string}/members/${string}/roles/${string}`; /** * Route for: * - GET `/guilds/{guild.id}/bans` */ guildBans(guildId: Snowflake): `/guilds/${string}/bans`; /** * Route for: * - GET `/guilds/{guild.id}/bans/{user.id}` * - PUT `/guilds/{guild.id}/bans/{user.id}` * - DELETE `/guilds/{guild.id}/bans/{user.id}` */ guildBan(guildId: Snowflake, userId: Snowflake): `/guilds/${string}/bans/${string}`; /** * Route for: * - GET `/guilds/{guild.id}/roles` * - POST `/guilds/{guild.id}/roles` * - PATCH `/guilds/{guild.id}/roles` */ guildRoles(guildId: Snowflake): `/guilds/${string}/roles`; /** * Route for: * - PATCH `/guilds/{guild.id}/roles/{role.id}` * - DELETE `/guilds/{guild.id}/roles/{role.id}` */ guildRole(guildId: Snowflake, roleId: Snowflake): `/guilds/${string}/roles/${string}`; /** * Route for: * - GET `/guilds/{guild.id}/prune` * - POST `/guilds/{guild.id}/prune` */ guildPrune(guildId: Snowflake): `/guilds/${string}/prune`; /** * Route for: * - GET `/guilds/{guild.id}/regions` */ guildVoiceRegions(guildId: Snowflake): `/guilds/${string}/regions`; /** * Route for: * - GET `/guilds/{guild.id}/invites` */ guildInvites(guildId: Snowflake): `/guilds/${string}/invites`; /** * Route for: * - GET `/guilds/{guild.id}/integrations` */ guildIntegrations(guildId: Snowflake): `/guilds/${string}/integrations`; /** * Route for: * - DELETE `/guilds/{guild.id}/integrations/{integration.id}` */ guildIntegration(guildId: Snowflake, integrationId: Snowflake): `/guilds/${string}/integrations/${string}`; /** * Route for: * - GET `/guilds/{guild.id}/widget` * - PATCH `/guilds/{guild.id}/widget` */ guildWidgetSettings(guildId: Snowflake): `/guilds/${string}/widget`; /** * Route for: * - GET `/guilds/{guild.id}/widget.json` */ guildWidgetJSON(guildId: Snowflake): `/guilds/${string}/widget.json`; /** * Route for: * - GET `/guilds/{guild.id}/vanity-url` */ guildVanityUrl(guildId: Snowflake): `/guilds/${string}/vanity-url`; /** * Route for: * - GET `/guilds/{guild.id}/widget.png` */ guildWidgetImage(guildId: Snowflake): `/guilds/${string}/widget.png`; /** * Route for: * - GET `/invites/{invite.code}` * - DELETE `/invites/{invite.code}` */ invite(code: string): `/invites/${string}`; /** * Route for: * - GET `/guilds/templates/{template.code}` * - POST `/guilds/templates/{template.code}` */ template(code: string): `/guilds/templates/${string}`; /** * Route for: * - GET `/guilds/{guild.id}/templates` * - POST `/guilds/{guild.id}/templates` */ guildTemplates(guildId: Snowflake): `/guilds/${string}/templates`; /** * Route for: * - PUT `/guilds/{guild.id}/templates/{template.code}` * - PATCH `/guilds/{guild.id}/templates/{template.code}` * - DELETE `/guilds/{guild.id}/templates/{template.code}` */ guildTemplate(guildId: Snowflake, code: string): `/guilds/${string}/templates/${string}`; /** * Route for: * - GET `/users/@me` * - GET `/users/{user.id}` * - PATCH `/users/@me` * * @param [userId] The user ID, defaulted to `@me` */ user(userId?: Snowflake | "@me"): `/users/${string}`; /** * Route for: * - GET `/users/@me/guilds` */ userGuilds(): "/users/@me/guilds"; /** * Route for: * - GET `/users/@me/guilds/{guild.id}/member` */ userGuildMember(guildId: Snowflake): `/users/@me/guilds/${string}/member`; /** * Route for: * - DELETE `/users/@me/guilds/{guild.id}` */ userGuild(guildId: Snowflake): `/users/@me/guilds/${string}`; /** * Route for: * - POST `/users/@me/channels` */ userChannels(): "/users/@me/channels"; /** * Route for: * - GET `/users/@me/connections` */ userConnections(): "/users/@me/connections"; /** * Route for: * - GET `/voice/regions` */ voiceRegions(): "/voice/regions"; /** * Route for: * - GET `/channels/{channel.id}/webhooks` * - POST `/channels/{channel.id}/webhooks` */ channelWebhooks(channelId: Snowflake): `/channels/${string}/webhooks`; /** * Route for: * - GET `/guilds/{guild.id}/webhooks` */ guildWebhooks(guildId: Snowflake): `/guilds/${string}/webhooks`; /** * Route for: * - GET `/webhooks/{webhook.id}` * - GET `/webhooks/{webhook.id}/{webhook.token}` * - PATCH `/webhooks/{webhook.id}` * - PATCH `/webhooks/{webhook.id}/{webhook.token}` * - DELETE `/webhooks/{webhook.id}` * - DELETE `/webhooks/{webhook.id}/{webhook.token}` * - POST `/webhooks/{webhook.id}/{webhook.token}` * * - POST `/webhooks/{application.id}/{interaction.token}` */ webhook(webhookId: Snowflake, webhookToken?: string): `/webhooks/${Snowflake}/${string}` | `/webhooks/${Snowflake}`; /** * Route for: * - GET `/webhooks/{webhook.id}/{webhook.token}/messages/@original` * - GET `/webhooks/{webhook.id}/{webhook.token}/messages/{message.id}` * - PATCH `/webhooks/{webhook.id}/{webhook.token}/messages/@original` * - PATCH `/webhooks/{webhook.id}/{webhook.token}/messages/{message.id}` * - DELETE `/webhooks/{webhook.id}/{webhook.token}/messages/@original` * - DELETE `/webhooks/{webhook.id}/{webhook.token}/messages/{message.id}` * * - PATCH `/webhooks/{application.id}/{interaction.token}/messages/@original` * - PATCH `/webhooks/{application.id}/{interaction.token}/messages/{message.id}` * - DELETE `/webhooks/{application.id}/{interaction.token}/messages/{message.id}` */ webhookMessage(webhookId: Snowflake, webhookToken: string, messageId?: Snowflake | "@original"): `/webhooks/${string}/${string}/messages/${string}`; /** * Route for: * - POST `/webhooks/{webhook.id}/{webhook.token}/github` * - POST `/webhooks/{webhook.id}/{webhook.token}/slack` */ webhookPlatform(webhookId: Snowflake, webhookToken: string, platform: "github" | "slack"): `/webhooks/${string}/${string}/github` | `/webhooks/${string}/${string}/slack`; /** * Route for: * - GET `/gateway` */ gateway(): "/gateway"; /** * Route for: * - GET `/gateway/bot` */ gatewayBot(): "/gateway/bot"; /** * Route for: * - GET `/oauth2/applications/@me` */ oauth2CurrentApplication(): "/oauth2/applications/@me"; /** * Route for: * - GET `/oauth2/@me` */ oauth2CurrentAuthorization(): "/oauth2/@me"; /** * Route for: * - GET `/oauth2/authorize` */ oauth2Authorization(): "/oauth2/authorize"; /** * Route for: * - POST `/oauth2/token` */ oauth2TokenExchange(): "/oauth2/token"; /** * Route for: * - POST `/oauth2/token/revoke` */ oauth2TokenRevocation(): "/oauth2/token/revoke"; /** * Route for: * - GET `/applications/{application.id}/commands` * - PUT `/applications/{application.id}/commands` * - POST `/applications/{application.id}/commands` */ applicationCommands(applicationId: Snowflake): `/applications/${string}/commands`; /** * Route for: * - GET `/applications/{application.id}/commands/{command.id}` * - PATCH `/applications/{application.id}/commands/{command.id}` * - DELETE `/applications/{application.id}/commands/{command.id}` */ applicationCommand(applicationId: Snowflake, commandId: Snowflake): `/applications/${string}/commands/${string}`; /** * Route for: * - GET `/applications/{application.id}/guilds/{guild.id}/commands` * - PUT `/applications/{application.id}/guilds/{guild.id}/commands` * - POST `/applications/{application.id}/guilds/{guild.id}/commands` */ applicationGuildCommands(applicationId: Snowflake, guildId: Snowflake): `/applications/${string}/guilds/${string}/commands`; /** * Route for: * - GET `/applications/{application.id}/guilds/{guild.id}/commands/{command.id}` * - PATCH `/applications/{application.id}/guilds/{guild.id}/commands/{command.id}` * - DELETE `/applications/{application.id}/guilds/{guild.id}/commands/{command.id}` */ applicationGuildCommand(applicationId: Snowflake, guildId: Snowflake, commandId: Snowflake): `/applications/${string}/guilds/${string}/commands/${string}`; /** * Route for: * - POST `/interactions/{interaction.id}/{interaction.token}/callback` */ interactionCallback(interactionId: Snowflake, interactionToken: string): `/interactions/${string}/${string}/callback`; /** * Route for: * - GET `/guilds/{guild.id}/member-verification` * - PATCH `/guilds/{guild.id}/member-verification` */ guildMemberVerification(guildId: Snowflake): `/guilds/${string}/member-verification`; /** * Route for: * - PATCH `/guilds/{guild.id}/voice-states/@me` * - PATCH `/guilds/{guild.id}/voice-states/{user.id}` */ guildVoiceState(guildId: Snowflake, userId?: Snowflake | "@me"): `/guilds/${string}/voice-states/${string}`; /** * Route for: * - GET `/applications/{application.id}/guilds/{guild.id}/commands/permissions` * - PUT `/applications/{application.id}/guilds/{guild.id}/commands/permissions` */ guildApplicationCommandsPermissions(applicationId: Snowflake, guildId: Snowflake): `/applications/${string}/guilds/${string}/commands/permissions`; /** * Route for: * - GET `/applications/{application.id}/guilds/{guild.id}/commands/{command.id}/permissions` * - PUT `/applications/{application.id}/guilds/{guild.id}/commands/{command.id}/permissions` */ applicationCommandPermissions(applicationId: Snowflake, guildId: Snowflake, commandId: Snowflake): `/applications/${string}/guilds/${string}/commands/${string}/permissions`; /** * Route for: * - GET `/guilds/{guild.id}/welcome-screen` * - PATCH `/guilds/{guild.id}/welcome-screen` */ guildWelcomeScreen(guildId: Snowflake): `/guilds/${string}/welcome-screen`; /** * Route for: * - POST `/stage-instances` */ stageInstances(): "/stage-instances"; /** * Route for: * - GET `/stage-instances/{channel.id}` * - PATCH `/stage-instances/{channel.id}` * - DELETE `/stage-instances/{channel.id}` */ stageInstance(channelId: Snowflake): `/stage-instances/${string}`; /** * Route for: * - GET `/stickers/{sticker.id}` */ sticker(stickerId: Snowflake): `/stickers/${string}`; /** * Route for: * - GET `/sticker-packs` */ nitroStickerPacks(): "/sticker-packs"; /** * Route for: * - GET `/guilds/{guild.id}/stickers` * - POST `/guilds/{guild.id}/stickers` */ guildStickers(guildId: Snowflake): `/guilds/${string}/stickers`; /** * Route for: * - GET `/guilds/{guild.id}/stickers/{sticker.id}` * - PATCH `/guilds/{guild.id}/stickers/{sticker.id}` * - DELETE `/guilds/{guild.id}/stickers/{sticker.id}` */ guildSticker(guildId: Snowflake, stickerId: Snowflake): `/guilds/${string}/stickers/${string}`; /** * Route for: * - GET `/guilds/{guild.id}/scheduled-events` * - POST `/guilds/{guild.id}/scheduled-events` */ guildScheduledEvents(guildId: Snowflake): string; /** * Route for: * - GET `/guilds/{guild.id}/scheduled-events/{guildScheduledEvent.id}` * - PATCH `/guilds/{guild.id}/scheduled-events/{guildScheduledEvent.id}` * - DELETE `/guilds/{guild.id}/scheduled-events/{guildScheduledEvent.id}` */ guildScheduledEvent(guildId: Snowflake, guildScheduledEventId: Snowflake): string; /** * Route for: * - GET `/guilds/{guild.id}/scheduled-events/{guildScheduledEvent.id}/users` */ guildScheduledEventUsers(guildId: Snowflake, guildScheduledEventId: Snowflake): string; }; export declare const RouteBases: { readonly api: "https://discord.com/api/v8"; readonly cdn: "https://cdn.discordapp.com"; readonly invite: "https://discord.gg"; readonly template: "https://discord.new"; readonly gift: "https://discord.gift"; readonly scheduledEvent: "https://discord.com/events"; }; export declare const OAuth2Routes: { readonly authorizationURL: "https://discord.com/api/v8/oauth2/authorize"; readonly tokenURL: "https://discord.com/api/v8/oauth2/token"; /** * See https://tools.ietf.org/html/rfc7009 */ readonly tokenRevocationURL: "https://discord.com/api/v8/oauth2/token/revoke"; }; //# sourceMappingURL=index.d.ts.map node_modules/discord-api-types/rest/v8/guildScheduledEvent.d.ts 0000664 00000012422 15114741631 0020622 0 ustar 00 import type { Snowflake } from '../../globals'; import type { _StrictPartial } from '../../utils/internals'; import type { APIGuildScheduledEvent, APIGuildScheduledEventEntityMetadata, APIGuildScheduledEventUser, GuildScheduledEventEntityType, GuildScheduledEventPrivacyLevel, GuildScheduledEventStatus } from '../../v8'; /** * https://discord.com/developers/docs/resources/guild-scheduled-event#list-scheduled-events-for-guild * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export interface RESTGetAPIGuildScheduledEventsQuery { /** * Whether to include number of users subscribed to each event */ with_user_count?: boolean; } /** * https://discord.com/developers/docs/resources/guild-scheduled-event#list-scheduled-events-for-guild * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type RESTGetAPIGuildScheduledEventsResult = APIGuildScheduledEvent[]; /** * https://discord.com/developers/docs/resources/guild-scheduled-event#create-guild-scheduled-event * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export interface RESTPostAPIGuildScheduledEventJSONBody { /** * The stage channel id of the guild event */ channel_id?: Snowflake | undefined; /** * The name of the guild event */ name: string; /** * The privacy level of the guild event */ privacy_level: GuildScheduledEventPrivacyLevel; /** * The time to schedule the guild event at */ scheduled_start_time: string; /** * The time when the scheduled event is scheduled to end */ scheduled_end_time?: string | undefined; /** * The description of the guild event */ description?: string | undefined; /** * The scheduled entity type of the guild event */ entity_type?: GuildScheduledEventEntityType | undefined; /** * The entity metadata of the scheduled event */ entity_metadata?: APIGuildScheduledEventEntityMetadata | undefined; /** * The cover image of the scheduled event */ image?: string | null | undefined; } /** * https://discord.com/developers/docs/resources/guild-scheduled-event#create-guild-scheduled-event * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type RESTPostAPIGuildScheduledEventResult = APIGuildScheduledEvent; /** * https://discord.com/developers/docs/resources/guild-scheduled-event#get-guild-scheduled-event * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export interface RESTGetAPIGuildScheduledEventQuery { /** * Whether to include number of users subscribed to this event */ with_user_count?: boolean; } /** * https://discord.com/developers/docs/resources/guild-scheduled-event#get-guild-scheduled-event * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type RESTGetAPIGuildScheduledEventResult = APIGuildScheduledEvent; /** * https://discord.com/developers/docs/resources/guild-scheduled-event#modify-guild-scheduled-event * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type RESTPatchAPIGuildScheduledEventJSONBody = _StrictPartial<RESTPostAPIGuildScheduledEventJSONBody> & { /** * The status of the scheduled event */ status?: GuildScheduledEventStatus | undefined; }; /** * https://discord.com/developers/docs/resources/guild-scheduled-event#modify-guild-scheduled-event * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type RESTPatchAPIGuildScheduledEventResult = APIGuildScheduledEvent; /** * https://discord.com/developers/docs/resources/guild-scheduled-event#delete-guild-scheduled-event * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type RESTDeleteAPIGuildScheduledEventResult = never; /** * https://discord.com/developers/docs/resources/guild-scheduled-event#get-guild-scheduled-event-users * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export interface RESTGetAPIGuildScheduledEventUsersQuery { /** * Number of users to receive from the event * * @default 100 */ limit?: number; /** * Whether to include guild member data if it exists */ with_member?: boolean; /** * Consider only users before given user id */ before?: Snowflake; /** * Consider only users after given user id */ after?: Snowflake; } /** * https://discord.com/developers/docs/resources/guild-scheduled-event#get-guild-scheduled-event-users * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type RESTGetAPIGuildScheduledEventUsersResult = APIGuildScheduledEventUser[]; //# sourceMappingURL=guildScheduledEvent.d.ts.map node_modules/discord-api-types/rest/v8/auditLog.js.map 0000664 00000000145 15114741631 0016762 0 ustar 00 {"version":3,"file":"auditLog.js","sourceRoot":"","sources":["auditLog.ts"],"names":[],"mappings":""} node_modules/discord-api-types/rest/v8/template.d.ts.map 0000664 00000001613 15114741631 0017262 0 ustar 00 {"version":3,"file":"template.d.ts","sourceRoot":"","sources":["template.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AACrE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAE5D;;;;GAIG;AACH,MAAM,MAAM,wBAAwB,GAAG,WAAW,CAAC;AAEnD;;;;GAIG;AACH,MAAM,WAAW,sCAAsC;IACtD;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;;;OAIG;IACH,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CAC1B;AAED;;;;GAIG;AACH,MAAM,MAAM,oCAAoC,GAAG,QAAQ,CAAC;AAE5D;;;;GAIG;AACH,MAAM,MAAM,8BAA8B,GAAG,WAAW,EAAE,CAAC;AAE3D;;;;GAIG;AACH,MAAM,WAAW,iCAAiC;IACjD;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;CACxC;AAED;;;;GAIG;AACH,MAAM,MAAM,+BAA+B,GAAG,WAAW,CAAC;AAE1D;;;;GAIG;AACH,MAAM,MAAM,iCAAiC,GAAG,WAAW,CAAC;AAE5D;;;;GAIG;AACH,MAAM,MAAM,iCAAiC,GAAG,cAAc,CAAC,iCAAiC,CAAC,CAAC;AAElG;;;;GAIG;AACH,MAAM,MAAM,+BAA+B,GAAG,WAAW,CAAC;AAE1D;;;;GAIG;AACH,MAAM,MAAM,gCAAgC,GAAG,WAAW,CAAC"} node_modules/discord-api-types/rest/v8/gateway.d.ts.map 0000664 00000000407 15114741631 0017110 0 ustar 00 {"version":3,"file":"gateway.d.ts","sourceRoot":"","sources":["gateway.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAEjF;;;;GAIG;AACH,MAAM,MAAM,uBAAuB,GAAG,cAAc,CAAC;AAErD;;;;GAIG;AACH,MAAM,MAAM,0BAA0B,GAAG,iBAAiB,CAAC"} node_modules/discord-api-types/rest/v8/voice.js.map 0000664 00000000137 15114741631 0016320 0 ustar 00 {"version":3,"file":"voice.js","sourceRoot":"","sources":["voice.ts"],"names":[],"mappings":""} node_modules/discord-api-types/rest/v8/user.js 0000664 00000000155 15114741631 0015415 0 ustar 00 "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); //# sourceMappingURL=user.js.map node_modules/discord-api-types/rest/v8/guild.js 0000664 00000000156 15114741631 0015544 0 ustar 00 "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); //# sourceMappingURL=guild.js.map node_modules/discord-api-types/rest/v8/oauth2.js 0000664 00000000157 15114741631 0015643 0 ustar 00 "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); //# sourceMappingURL=oauth2.js.map node_modules/discord-api-types/rest/v8/invite.d.ts.map 0000664 00000000714 15114741631 0016746 0 ustar 00 {"version":3,"file":"invite.d.ts","sourceRoot":"","sources":["invite.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC/C,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AAEzD;;;;GAIG;AACH,MAAM,WAAW,qBAAqB;IACrC;;OAEG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB;;OAEG;IACH,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B;;OAEG;IACH,wBAAwB,CAAC,EAAE,SAAS,CAAC;CACrC;AAED;;GAEG;AACH,MAAM,MAAM,sBAAsB,GAAG,SAAS,CAAC;AAE/C;;;;GAIG;AACH,MAAM,MAAM,yBAAyB,GAAG,SAAS,CAAC"} node_modules/discord-api-types/rest/v8/interactions.d.ts.map 0000664 00000006236 15114741631 0020157 0 ustar 00 {"version":3,"file":"interactions.d.ts","sourceRoot":"","sources":["interactions.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACX,qBAAqB,EACrB,+BAA+B,EAC/B,qCAAqC,EACrC,sBAAsB,EACtB,kCAAkC,EAClC,sBAAsB,EACtB,MAAM,yBAAyB,CAAC;AACjC,OAAO,KAAK,EAAE,qDAAqD,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AACnH,OAAO,KAAK,EACX,0CAA0C,EAC1C,uCAAuC,EACvC,+CAA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AC;CACjC,CAAC,GACF,CAAC,MAAM,CAAC,SAAS,MAAM,GAAG,EAAE,OAAO,CAAC,GAAG,sCAAsC,CAAC,CAAC;AAElF;;;;GAIG;AACH,MAAM,MAAM,oCAAoC,GAAG,qCAAqC,CAAC;AAEzF;;;;GAIG;AACH,MAAM,MAAM,mCAAmC,GAAG,uCAAuC,CAAC;AAE1F;;;;GAIG;AACH,MAAM,MAAM,uCAAuC,GAAG,2CAA2C,CAAC;AAElG;;;;GAIG;AACH,MAAM,MAAM,2CAA2C,GAAG,+CAA+C,CAAC;AAE1G;;;;GAIG;AACH,MAAM,MAAM,qCAAqC,GAAG,yCAAyC,CAAC;AAE9F;;;;GAIG;AACH,MAAM,MAAM,sCAAsC,GAAG,0CAA0C,CAAC;AAEhG;;;;GAIG;AACH,MAAM,MAAM,mDAAmD,GAAG,qCAAqC,EAAE,CAAC;AAE1G;;;;GAIG;AACH,MAAM,MAAM,6CAA6C,GAAG,qCAAqC,CAAC;AAElG;;;;GAIG;AACH,MAAM,WAAW,+CAA+C;IAC/D,WAAW,EAAE,+BAA+B,EAAE,CAAC;CAC/C;AAED;;;;GAIG;AACH,MAAM,MAAM,6CAA6C,GAAG,qCAAqC,CAAC;AAElG;;;;GAIG;AACH,MAAM,MAAM,qDAAqD,GAAG,IAAI,CACvE,qCAAqC,EACrC,IAAI,GAAG,aAAa,CACpB,EAAE,CAAC;AAEJ;;;;GAIG;AACH,MAAM,MAAM,mDAAmD,GAAG,qCAAqC,EAAE,CAAC"} node_modules/discord-api-types/rest/v8/auditLog.d.ts 0000664 00000001744 15114741631 0016450 0 ustar 00 import type { Snowflake } from '../../globals'; import type { APIAuditLog, AuditLogEvent } from '../../payloads/v8/auditLog'; /** * https://discord.com/developers/docs/resources/audit-log#get-guild-audit-log * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export interface RESTGetAPIAuditLogQuery { /** * Filter the log for actions made by a user */ user_id?: Snowflake; /** * The type of audit log events */ action_type?: AuditLogEvent; /** * Filter the log before a certain entry ID */ before?: Snowflake; /** * How many entries are returned (default 50, minimum 1, maximum 100) * * @default 50 */ limit?: number; } /** * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type RESTGetAPIAuditLogResult = APIAuditLog; //# sourceMappingURL=auditLog.d.ts.map node_modules/discord-api-types/rest/v8/auditLog.d.ts.map 0000664 00000000720 15114741631 0017215 0 ustar 00 {"version":3,"file":"auditLog.d.ts","sourceRoot":"","sources":["auditLog.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC/C,OAAO,KAAK,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAE7E;;;;GAIG;AACH,MAAM,WAAW,uBAAuB;IACvC;;OAEG;IACH,OAAO,CAAC,EAAE,SAAS,CAAC;IACpB;;OAEG;IACH,WAAW,CAAC,EAAE,aAAa,CAAC;IAC5B;;OAEG;IACH,MAAM,CAAC,EAAE,SAAS,CAAC;IACnB;;;;OAIG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;CACf;AAED;;GAEG;AACH,MAAM,MAAM,wBAAwB,GAAG,WAAW,CAAC"} node_modules/discord-api-types/rest/v8/webhook.d.ts.map 0000664 00000006452 15114741631 0017113 0 ustar 00 {"version":3,"file":"webhook.d.ts","sourceRoot":"","sources":["webhook.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC/C,OAAO,KAAK,EACX,qBAAqB,EACrB,kBAAkB,EAClB,aAAa,EACb,QAAQ,EACR,UAAU,EACV,4BAA4B,EAC5B,UAAU,EACV,YAAY,EACZ,MAAM,yBAAyB,CAAC;AACjC,OAAO,KAAK,EAAE,qDAAqD,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAE9G;;;;GAIG;AACH,MAAM,WAAW,iCAAiC;IACjD;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC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AG,UAAU,CAAC;AAEpE;;;;GAIG;AACH,MAAM,MAAM,sCAAsC,GAAG,gCAAgC,CAAC;AAEtF;;;;GAIG;AACH,MAAM,MAAM,uCAAuC,GAAG,KAAK,CAAC;AAE5D;;;;;;;GAOG;AACH,MAAM,MAAM,2CAA2C,GAAG,UAAU,CAAC;AAErE;;;;GAIG;AACH,MAAM,MAAM,uCAAuC,GAAG,UAAU,CAAC;AAEjE;;;;GAIG;AACH,MAAM,MAAM,2CAA2C,GAAG,qDAAqD,CAC9G,SAAS,CAAC,IAAI,CAAC,mCAAmC,EAAE,kBAAkB,GAAG,YAAY,GAAG,SAAS,GAAG,QAAQ,CAAC,CAAC,CAC9G,GAAG;IACH;;;;;;OAMG;IACH,WAAW,CAAC,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC,aAAa,EAAE,aAAa,GAAG,UAAU,CAAC,CAAC,GAAG,IAAI,CAAC,aAAa,EAAE,IAAI,CAAC,CAAC,EAAE,GAAG,SAAS,CAAC;CACnH,CAAC;AAEF;;;;GAIG;AACH,MAAM,MAAM,+CAA+C,GACxD,CAAC,MAAM,CAAC,SAAS,MAAM,GAAG,EAAE,OAAO,CAAC,GAAG;IACvC;;OAEG;IACH,YAAY,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CACjC,CAAC,GACF,CAAC,MAAM,CAAC,SAAS,MAAM,GAAG,EAAE,OAAO,CAAC,GAAG,2CAA2C,CAAC,CAAC;AAEvF;;;;GAIG;AACH,MAAM,MAAM,yCAAyC,GAAG,UAAU,CAAC;AAEnE;;;;GAIG;AACH,MAAM,MAAM,0CAA0C,GAAG,KAAK,CAAC"} node_modules/discord-api-types/rest/v8/stageInstance.js 0000664 00000000166 15114741631 0017231 0 ustar 00 "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); //# sourceMappingURL=stageInstance.js.map node_modules/discord-api-types/rest/v8/gateway.js.map 0000664 00000000143 15114741631 0016651 0 ustar 00 {"version":3,"file":"gateway.js","sourceRoot":"","sources":["gateway.ts"],"names":[],"mappings":""} node_modules/discord-api-types/rest/v8/index.mjs 0000664 00000000463 15114741631 0015725 0 ustar 00 import mod from "./index.js"; export default mod; export const APIVersion = mod.APIVersion; export const Locale = mod.Locale; export const OAuth2Routes = mod.OAuth2Routes; export const RESTJSONErrorCodes = mod.RESTJSONErrorCodes; export const RouteBases = mod.RouteBases; export const Routes = mod.Routes; node_modules/discord-api-types/rest/v8/invite.js.map 0000664 00000000141 15114741631 0016504 0 ustar 00 {"version":3,"file":"invite.js","sourceRoot":"","sources":["invite.ts"],"names":[],"mappings":""} node_modules/discord-api-types/rest/v8/index.js.map 0000664 00000020701 15114741631 0016321 0 ustar 00 {"version":3,"file":"index.js","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AACA,qDAA0D;AAE1D,4CAA0B;AAE1B,6CAA2B;AAC3B,4CAA0B;AAC1B,0CAAwB;AACxB,4CAA0B;AAC1B,0CAAwB;AACxB,wDAAsC;AACtC,iDAA+B;AAC/B,2CAAyB;AACzB,2CAAyB;AACzB,kDAAgC;AAChC,4CAA0B;AAC1B,6CAA2B;AAC3B,yCAAuB;AACvB,0CAAwB;AACxB,4CAA0B;AAEb,QAAA,UAAU,GAAG,GAAG,CAAC;AAEjB,QAAA,MAAM,GAAG;IACrB;;;OAGG;IACH,aAAa,CAAC,OAAkB;QAC/B,OAAO,WAAW,OAAO,aAAsB,CAAC;IACjD,CAAC;IAED;;;;;OAKG;IACH,OAAO,CAAC,SAAoB;QAC3B,OAAO,aAAa,SAAS,EAAW,CAAC;IAC1C,CAAC;IAED;;;;OAIG;IACH,eAAe,CAAC,SAAoB;QACnC,OAAO,aAAa,SAAS,WAAoB,CAAC;IACnD,CAAC;IAED;;;;;OAKG;IACH,cAAc,CAAC,SAAoB,EAAE,SAAoB;QACxD,OAAO,aAAa,SAAS,aAAa,SAAS,EAAW,CAAC;IAChE,CAAC;IAED;;;OAGG;IACH,uBAAuB,CAAC,SAAoB,E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ACjC,MAAM,EAAE,oBAAoB;IAC5B,QAAQ,EAAE,qBAAqB;IAC/B,IAAI,EAAE,sBAAsB;IAC5B,cAAc,EAAE,4BAA4B;CACnC,CAAC;AAEX,sBAAsB;AACtB,MAAM,CAAC,MAAM,CAAC,kBAAU,CAAC,CAAC;AAEb,QAAA,YAAY,GAAG;IAC3B,gBAAgB,EAAE,GAAG,kBAAU,CAAC,GAAG,GAAG,cAAM,CAAC,mBAAmB,EAAE,EAAE;IACpE,QAAQ,EAAE,GAAG,kBAAU,CAAC,GAAG,GAAG,cAAM,CAAC,mBAAmB,EAAE,EAAE;IAC5D;;OAEG;IACH,kBAAkB,EAAE,GAAG,kBAAU,CAAC,GAAG,GAAG,cAAM,CAAC,qBAAqB,EAAE,EAAE;CAC/D,CAAC;AAEX,6BAA6B;AAC7B,MAAM,CAAC,MAAM,CAAC,oBAAY,CAAC,CAAC"} node_modules/discord-api-types/rest/v8/voice.d.ts 0000664 00000000547 15114741631 0016005 0 ustar 00 import type { APIVoiceRegion } from '../../payloads/v8/index'; /** * https://discord.com/developers/docs/resources/voice#list-voice-regions * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type GetAPIVoiceRegionsResult = APIVoiceRegion[]; //# sourceMappingURL=voice.d.ts.map node_modules/discord-api-types/rest/v8/invite.d.ts 0000664 00000002170 15114741631 0016170 0 ustar 00 import type { Snowflake } from '../../globals'; import type { APIInvite } from '../../payloads/v8/index'; /** * https://discord.com/developers/docs/resources/invite#get-invite * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export interface RESTGetAPIInviteQuery { /** * Whether the invite should contain approximate member counts */ with_counts?: boolean; /** * Whether the invite should contain the expiration date */ with_expiration?: boolean; /** * The guild scheduled event to include with the invite */ guild_scheduled_event_id?: Snowflake; } /** * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type RESTGetAPIInviteResult = APIInvite; /** * https://discord.com/developers/docs/resources/invite#delete-invite * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type RESTDeleteAPIInviteResult = APIInvite; //# sourceMappingURL=invite.d.ts.map node_modules/discord-api-types/rest/v8/user.d.ts 0000664 00000007653 15114741631 0015663 0 ustar 00 import type { Permissions, Snowflake } from '../../globals'; import type { APIChannel, APIConnection, APIGuildMember, APIUser, GuildFeature } from '../../payloads/v8/index'; /** * https://discord.com/developers/docs/resources/user#get-current-user * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type RESTGetAPICurrentUserResult = APIUser; /** * https://discord.com/developers/docs/resources/user#get-user * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type RESTGetAPIUserResult = APIUser; /** * https://discord.com/developers/docs/resources/guild#get-current-user-guild-member * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type RESTGetCurrentUserGuildMemberResult = APIGuildMember; /** * https://discord.com/developers/docs/resources/user#modify-current-user * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export interface RESTPatchAPICurrentUserJSONBody { /** * User's username, if changed may cause the user's discriminator to be randomized */ username?: string | undefined; /** * If passed, modifies the user's avatar */ avatar?: string | null | undefined; } /** * https://discord.com/developers/docs/resources/user#modify-current-user * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type RESTPatchAPICurrentUserResult = APIUser; /** * https://discord.com/developers/docs/resources/user#get-current-user-guilds * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export interface RESTGetAPICurrentUserGuildsQuery { /** * Get guilds before this guild ID */ before?: Snowflake; /** * Get guilds after this guild ID */ after?: Snowflake; /** * Max number of guilds to return (1-100) * * @default 100 */ limit?: number; } /** * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export interface RESTAPIPartialCurrentUserGuild { id: Snowflake; name: string; icon: string | null; owner: boolean; features: GuildFeature[]; permissions: Permissions; } /** * https://discord.com/developers/docs/resources/user#get-current-user-guilds * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type RESTGetAPICurrentUserGuildsResult = RESTAPIPartialCurrentUserGuild[]; /** * https://discord.com/developers/docs/resources/user#leave-guild * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type RESTDeleteAPICurrentUserGuildResult = never; /** * https://discord.com/developers/docs/resources/user#create-dm * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export interface RESTPostAPICurrentUserCreateDMChannelJSONBody { /** * The recipient to open a DM channel with */ recipient_id: string; } /** * https://discord.com/developers/docs/resources/user#create-dm * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type RESTPostAPICurrentUserCreateDMChannelResult = APIChannel; /** * https://discord.com/developers/docs/resources/user#get-user-connections * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type RESTGetAPICurrentUserConnectionsResult = APIConnection[]; //# sourceMappingURL=user.d.ts.map node_modules/discord-api-types/rest/v8/index.js 0000664 00000055046 15114741631 0015557 0 ustar 00 "use strict"; var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { if (k2 === undefined) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { return m[k]; } }; } Object.defineProperty(o, k2, desc); }) : (function(o, m, k, k2) { if (k2 === undefined) k2 = k; o[k2] = m[k]; })); var __exportStar = (this && this.__exportStar) || function(m, exports) { for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); }; Object.defineProperty(exports, "__esModule", { value: true }); exports.OAuth2Routes = exports.RouteBases = exports.Routes = exports.APIVersion = void 0; const internals_1 = require("../../utils/internals"); __exportStar(require("../common"), exports); __exportStar(require("./auditLog"), exports); __exportStar(require("./channel"), exports); __exportStar(require("./emoji"), exports); __exportStar(require("./gateway"), exports); __exportStar(require("./guild"), exports); __exportStar(require("./guildScheduledEvent"), exports); __exportStar(require("./interactions"), exports); __exportStar(require("./invite"), exports); __exportStar(require("./oauth2"), exports); __exportStar(require("./stageInstance"), exports); __exportStar(require("./sticker"), exports); __exportStar(require("./template"), exports); __exportStar(require("./user"), exports); __exportStar(require("./voice"), exports); __exportStar(require("./webhook"), exports); exports.APIVersion = '8'; exports.Routes = { /** * Route for: * - GET `/guilds/{guild.id}/audit-logs` */ guildAuditLog(guildId) { return `/guilds/${guildId}/audit-logs`; }, /** * Route for: * - GET `/channels/{channel.id}` * - PATCH `/channels/{channel.id}` * - DELETE `/channels/{channel.id}` */ channel(channelId) { return `/channels/${channelId}`; }, /** * Route for: * - GET `/channels/{channel.id}/messages` * - POST `/channels/{channel.id}/messages` */ channelMessages(channelId) { return `/channels/${channelId}/messages`; }, /** * Route for: * - GET `/channels/{channel.id}/messages/{message.id}` * - PATCH `/channels/{channel.id}/messages/{message.id}` * - DELETE `/channels/{channel.id}/messages/{message.id}` */ channelMessage(channelId, messageId) { return `/channels/${channelId}/messages/${messageId}`; }, /** * Route for: * - POST `/channels/{channel.id}/messages/{message.id}/crosspost` */ channelMessageCrosspost(channelId, messageId) { return `/channels/${channelId}/messages/${messageId}/crosspost`; }, /** * Route for: * - PUT `/channels/{channel.id}/messages/{message.id}/reactions/{emoji}/@me` * - DELETE `/channels/{channel.id}/messages/{message.id}/reactions/{emoji}/@me` * * **Note**: You need to URL encode the emoji yourself */ channelMessageOwnReaction(channelId, messageId, emoji) { return `/channels/${channelId}/messages/${messageId}/reactions/${emoji}/@me`; }, /** * Route for: * - DELETE `/channels/{channel.id}/messages/{message.id}/reactions/{emoji}/{user.id}` * * **Note**: You need to URL encode the emoji yourself */ channelMessageUserReaction(channelId, messageId, emoji, userId) { return `/channels/${channelId}/messages/${messageId}/reactions/${emoji}/${userId}`; }, /** * Route for: * - GET `/channels/{channel.id}/messages/{message.id}/reactions/{emoji}` * - DELETE `/channels/{channel.id}/messages/{message.id}/reactions/{emoji}` * * **Note**: You need to URL encode the emoji yourself */ channelMessageReaction(channelId, messageId, emoji) { return `/channels/${channelId}/messages/${messageId}/reactions/${emoji}`; }, /** * Route for: * - DELETE `/channels/{channel.id}/messages/{message.id}/reactions` */ channelMessageAllReactions(channelId, messageId) { return `/channels/${channelId}/messages/${messageId}/reactions`; }, /** * Route for: * - POST `/channels/{channel.id}/messages/bulk-delete` */ channelBulkDelete(channelId) { return `/channels/${channelId}/messages/bulk-delete`; }, /** * Route for: * - PUT `/channels/{channel.id}/permissions/{overwrite.id}` * - DELETE `/channels/{channel.id}/permissions/{overwrite.id}` */ channelPermission(channelId, overwriteId) { return `/channels/${channelId}/permissions/${overwriteId}`; }, /** * Route for: * - GET `/channels/{channel.id}/invites` * - POST `/channels/{channel.id}/invites` */ channelInvites(channelId) { return `/channels/${channelId}/invites`; }, /** * Route for: * - POST `/channels/{channel.id}/followers` */ channelFollowers(channelId) { return `/channels/${channelId}/followers`; }, /** * Route for: * - POST `/channels/{channel.id}/typing` */ channelTyping(channelId) { return `/channels/${channelId}/typing`; }, /** * Route for: * - GET `/channels/{channel.id}/pins` */ channelPins(channelId) { return `/channels/${channelId}/pins`; }, /** * Route for: * - PUT `/channels/{channel.id}/pins/{message.id}` * - DELETE `/channels/{channel.id}/pins/{message.id}` */ channelPin(channelId, messageId) { return `/channels/${channelId}/pins/${messageId}`; }, /** * Route for: * - PUT `/channels/{channel.id}/recipients/{user.id}` * - DELETE `/channels/{channel.id}/recipients/{user.id}` */ channelRecipient(channelId, userId) { return `/channels/${channelId}/recipients/${userId}`; }, /** * Route for: * - GET `/guilds/{guild.id}/emojis` * - POST `/guilds/{guild.id}/emojis` */ guildEmojis(guildId) { return `/guilds/${guildId}/emojis`; }, /** * Route for: * - GET `/guilds/{guild.id}/emojis/{emoji.id}` * - PATCH `/guilds/{guild.id}/emojis/{emoji.id}` * - DELETE `/guilds/{guild.id}/emojis/{emoji.id}` */ guildEmoji(guildId, emojiId) { return `/guilds/${guildId}/emojis/${emojiId}`; }, /** * Route for: * - POST `/guilds` */ guilds() { return '/guilds'; }, /** * Route for: * - GET `/guilds/{guild.id}` * - PATCH `/guilds/{guild.id}` * - DELETE `/guilds/{guild.id}` */ guild(guildId) { return `/guilds/${guildId}`; }, /** * Route for: * - GET `/guilds/{guild.id}/preview` */ guildPreview(guildId) { return `/guilds/${guildId}/preview`; }, /** * Route for: * - GET `/guilds/{guild.id}/channels` * - POST `/guilds/{guild.id}/channels` * - PATCH `/guilds/{guild.id}/channels` */ guildChannels(guildId) { return `/guilds/${guildId}/channels`; }, /** * Route for: * - GET `/guilds/{guild.id}/members/{user.id}` * - PUT `/guilds/{guild.id}/members/{user.id}` * - PATCH `/guilds/{guild.id}/members/@me` * - PATCH `/guilds/{guild.id}/members/{user.id}` * - DELETE `/guilds/{guild.id}/members/{user.id}` */ guildMember(guildId, userId = '@me') { return `/guilds/${guildId}/members/${userId}`; }, /** * Route for: * - GET `/guilds/{guild.id}/members` */ guildMembers(guildId) { return `/guilds/${guildId}/members`; }, /** * Route for: * - GET `/guilds/{guild.id}/members/search` */ guildMembersSearch(guildId) { return `/guilds/${guildId}/members/search`; }, /** * Route for: * - PATCH `/guilds/{guild.id}/members/@me/nick` * * @deprecated Use {@link Routes.guildMember} instead. */ guildCurrentMemberNickname(guildId) { return `/guilds/${guildId}/members/@me/nick`; }, /** * Route for: * - PUT `/guilds/{guild.id}/members/{user.id}/roles/{role.id}` * - DELETE `/guilds/{guild.id}/members/{user.id}/roles/{role.id}` */ guildMemberRole(guildId, memberId, roleId) { return `/guilds/${guildId}/members/${memberId}/roles/${roleId}`; }, /** * Route for: * - GET `/guilds/{guild.id}/bans` */ guildBans(guildId) { return `/guilds/${guildId}/bans`; }, /** * Route for: * - GET `/guilds/{guild.id}/bans/{user.id}` * - PUT `/guilds/{guild.id}/bans/{user.id}` * - DELETE `/guilds/{guild.id}/bans/{user.id}` */ guildBan(guildId, userId) { return `/guilds/${guildId}/bans/${userId}`; }, /** * Route for: * - GET `/guilds/{guild.id}/roles` * - POST `/guilds/{guild.id}/roles` * - PATCH `/guilds/{guild.id}/roles` */ guildRoles(guildId) { return `/guilds/${guildId}/roles`; }, /** * Route for: * - PATCH `/guilds/{guild.id}/roles/{role.id}` * - DELETE `/guilds/{guild.id}/roles/{role.id}` */ guildRole(guildId, roleId) { return `/guilds/${guildId}/roles/${roleId}`; }, /** * Route for: * - GET `/guilds/{guild.id}/prune` * - POST `/guilds/{guild.id}/prune` */ guildPrune(guildId) { return `/guilds/${guildId}/prune`; }, /** * Route for: * - GET `/guilds/{guild.id}/regions` */ guildVoiceRegions(guildId) { return `/guilds/${guildId}/regions`; }, /** * Route for: * - GET `/guilds/{guild.id}/invites` */ guildInvites(guildId) { return `/guilds/${guildId}/invites`; }, /** * Route for: * - GET `/guilds/{guild.id}/integrations` */ guildIntegrations(guildId) { return `/guilds/${guildId}/integrations`; }, /** * Route for: * - DELETE `/guilds/{guild.id}/integrations/{integration.id}` */ guildIntegration(guildId, integrationId) { return `/guilds/${guildId}/integrations/${integrationId}`; }, /** * Route for: * - GET `/guilds/{guild.id}/widget` * - PATCH `/guilds/{guild.id}/widget` */ guildWidgetSettings(guildId) { return `/guilds/${guildId}/widget`; }, /** * Route for: * - GET `/guilds/{guild.id}/widget.json` */ guildWidgetJSON(guildId) { return `/guilds/${guildId}/widget.json`; }, /** * Route for: * - GET `/guilds/{guild.id}/vanity-url` */ guildVanityUrl(guildId) { return `/guilds/${guildId}/vanity-url`; }, /** * Route for: * - GET `/guilds/{guild.id}/widget.png` */ guildWidgetImage(guildId) { return `/guilds/${guildId}/widget.png`; }, /** * Route for: * - GET `/invites/{invite.code}` * - DELETE `/invites/{invite.code}` */ invite(code) { return `/invites/${code}`; }, /** * Route for: * - GET `/guilds/templates/{template.code}` * - POST `/guilds/templates/{template.code}` */ template(code) { return `/guilds/templates/${code}`; }, /** * Route for: * - GET `/guilds/{guild.id}/templates` * - POST `/guilds/{guild.id}/templates` */ guildTemplates(guildId) { return `/guilds/${guildId}/templates`; }, /** * Route for: * - PUT `/guilds/{guild.id}/templates/{template.code}` * - PATCH `/guilds/{guild.id}/templates/{template.code}` * - DELETE `/guilds/{guild.id}/templates/{template.code}` */ guildTemplate(guildId, code) { return `/guilds/${guildId}/templates/${code}`; }, /** * Route for: * - GET `/users/@me` * - GET `/users/{user.id}` * - PATCH `/users/@me` * * @param [userId] The user ID, defaulted to `@me` */ user(userId = '@me') { return `/users/${userId}`; }, /** * Route for: * - GET `/users/@me/guilds` */ userGuilds() { return `/users/@me/guilds`; }, /** * Route for: * - GET `/users/@me/guilds/{guild.id}/member` */ userGuildMember(guildId) { return `/users/@me/guilds/${guildId}/member`; }, /** * Route for: * - DELETE `/users/@me/guilds/{guild.id}` */ userGuild(guildId) { return `/users/@me/guilds/${guildId}`; }, /** * Route for: * - POST `/users/@me/channels` */ userChannels() { return `/users/@me/channels`; }, /** * Route for: * - GET `/users/@me/connections` */ userConnections() { return `/users/@me/connections`; }, /** * Route for: * - GET `/voice/regions` */ voiceRegions() { return `/voice/regions`; }, /** * Route for: * - GET `/channels/{channel.id}/webhooks` * - POST `/channels/{channel.id}/webhooks` */ channelWebhooks(channelId) { return `/channels/${channelId}/webhooks`; }, /** * Route for: * - GET `/guilds/{guild.id}/webhooks` */ guildWebhooks(guildId) { return `/guilds/${guildId}/webhooks`; }, /** * Route for: * - GET `/webhooks/{webhook.id}` * - GET `/webhooks/{webhook.id}/{webhook.token}` * - PATCH `/webhooks/{webhook.id}` * - PATCH `/webhooks/{webhook.id}/{webhook.token}` * - DELETE `/webhooks/{webhook.id}` * - DELETE `/webhooks/{webhook.id}/{webhook.token}` * - POST `/webhooks/{webhook.id}/{webhook.token}` * * - POST `/webhooks/{application.id}/{interaction.token}` */ webhook(webhookId, webhookToken) { const parts = ['', 'webhooks', webhookId]; if (webhookToken) parts.push(webhookToken); return parts.join('/'); }, /** * Route for: * - GET `/webhooks/{webhook.id}/{webhook.token}/messages/@original` * - GET `/webhooks/{webhook.id}/{webhook.token}/messages/{message.id}` * - PATCH `/webhooks/{webhook.id}/{webhook.token}/messages/@original` * - PATCH `/webhooks/{webhook.id}/{webhook.token}/messages/{message.id}` * - DELETE `/webhooks/{webhook.id}/{webhook.token}/messages/@original` * - DELETE `/webhooks/{webhook.id}/{webhook.token}/messages/{message.id}` * * - PATCH `/webhooks/{application.id}/{interaction.token}/messages/@original` * - PATCH `/webhooks/{application.id}/{interaction.token}/messages/{message.id}` * - DELETE `/webhooks/{application.id}/{interaction.token}/messages/{message.id}` */ webhookMessage(webhookId, webhookToken, messageId = '@original') { return `/webhooks/${webhookId}/${webhookToken}/messages/${messageId}`; }, /** * Route for: * - POST `/webhooks/{webhook.id}/{webhook.token}/github` * - POST `/webhooks/{webhook.id}/{webhook.token}/slack` */ webhookPlatform(webhookId, webhookToken, platform) { return `/webhooks/${webhookId}/${webhookToken}/${platform}`; }, /** * Route for: * - GET `/gateway` */ gateway() { return `/gateway`; }, /** * Route for: * - GET `/gateway/bot` */ gatewayBot() { return `/gateway/bot`; }, /** * Route for: * - GET `/oauth2/applications/@me` */ oauth2CurrentApplication() { return `/oauth2/applications/@me`; }, /** * Route for: * - GET `/oauth2/@me` */ oauth2CurrentAuthorization() { return `/oauth2/@me`; }, /** * Route for: * - GET `/oauth2/authorize` */ oauth2Authorization() { return `/oauth2/authorize`; }, /** * Route for: * - POST `/oauth2/token` */ oauth2TokenExchange() { return `/oauth2/token`; }, /** * Route for: * - POST `/oauth2/token/revoke` */ oauth2TokenRevocation() { return `/oauth2/token/revoke`; }, /** * Route for: * - GET `/applications/{application.id}/commands` * - PUT `/applications/{application.id}/commands` * - POST `/applications/{application.id}/commands` */ applicationCommands(applicationId) { return `/applications/${applicationId}/commands`; }, /** * Route for: * - GET `/applications/{application.id}/commands/{command.id}` * - PATCH `/applications/{application.id}/commands/{command.id}` * - DELETE `/applications/{application.id}/commands/{command.id}` */ applicationCommand(applicationId, commandId) { return `/applications/${applicationId}/commands/${commandId}`; }, /** * Route for: * - GET `/applications/{application.id}/guilds/{guild.id}/commands` * - PUT `/applications/{application.id}/guilds/{guild.id}/commands` * - POST `/applications/{application.id}/guilds/{guild.id}/commands` */ applicationGuildCommands(applicationId, guildId) { return `/applications/${applicationId}/guilds/${guildId}/commands`; }, /** * Route for: * - GET `/applications/{application.id}/guilds/{guild.id}/commands/{command.id}` * - PATCH `/applications/{application.id}/guilds/{guild.id}/commands/{command.id}` * - DELETE `/applications/{application.id}/guilds/{guild.id}/commands/{command.id}` */ applicationGuildCommand(applicationId, guildId, commandId) { return `/applications/${applicationId}/guilds/${guildId}/commands/${commandId}`; }, /** * Route for: * - POST `/interactions/{interaction.id}/{interaction.token}/callback` */ interactionCallback(interactionId, interactionToken) { return `/interactions/${interactionId}/${interactionToken}/callback`; }, /** * Route for: * - GET `/guilds/{guild.id}/member-verification` * - PATCH `/guilds/{guild.id}/member-verification` */ guildMemberVerification(guildId) { return `/guilds/${guildId}/member-verification`; }, /** * Route for: * - PATCH `/guilds/{guild.id}/voice-states/@me` * - PATCH `/guilds/{guild.id}/voice-states/{user.id}` */ guildVoiceState(guildId, userId = '@me') { return `/guilds/${guildId}/voice-states/${userId}`; }, /** * Route for: * - GET `/applications/{application.id}/guilds/{guild.id}/commands/permissions` * - PUT `/applications/{application.id}/guilds/{guild.id}/commands/permissions` */ guildApplicationCommandsPermissions(applicationId, guildId) { return `/applications/${applicationId}/guilds/${guildId}/commands/permissions`; }, /** * Route for: * - GET `/applications/{application.id}/guilds/{guild.id}/commands/{command.id}/permissions` * - PUT `/applications/{application.id}/guilds/{guild.id}/commands/{command.id}/permissions` */ applicationCommandPermissions(applicationId, guildId, commandId) { return `/applications/${applicationId}/guilds/${guildId}/commands/${commandId}/permissions`; }, /** * Route for: * - GET `/guilds/{guild.id}/welcome-screen` * - PATCH `/guilds/{guild.id}/welcome-screen` */ guildWelcomeScreen(guildId) { return `/guilds/${guildId}/welcome-screen`; }, /** * Route for: * - POST `/stage-instances` */ stageInstances() { return `/stage-instances`; }, /** * Route for: * - GET `/stage-instances/{channel.id}` * - PATCH `/stage-instances/{channel.id}` * - DELETE `/stage-instances/{channel.id}` */ stageInstance(channelId) { return `/stage-instances/${channelId}`; }, /** * Route for: * - GET `/stickers/{sticker.id}` */ sticker(stickerId) { return `/stickers/${stickerId}`; }, /** * Route for: * - GET `/sticker-packs` */ nitroStickerPacks() { return '/sticker-packs'; }, /** * Route for: * - GET `/guilds/{guild.id}/stickers` * - POST `/guilds/{guild.id}/stickers` */ guildStickers(guildId) { return `/guilds/${guildId}/stickers`; }, /** * Route for: * - GET `/guilds/{guild.id}/stickers/{sticker.id}` * - PATCH `/guilds/{guild.id}/stickers/{sticker.id}` * - DELETE `/guilds/{guild.id}/stickers/{sticker.id}` */ guildSticker(guildId, stickerId) { return `/guilds/${guildId}/stickers/${stickerId}`; }, /** * Route for: * - GET `/guilds/{guild.id}/scheduled-events` * - POST `/guilds/{guild.id}/scheduled-events` */ guildScheduledEvents(guildId) { return `/guilds/${guildId}/scheduled-events`; }, /** * Route for: * - GET `/guilds/{guild.id}/scheduled-events/{guildScheduledEvent.id}` * - PATCH `/guilds/{guild.id}/scheduled-events/{guildScheduledEvent.id}` * - DELETE `/guilds/{guild.id}/scheduled-events/{guildScheduledEvent.id}` */ guildScheduledEvent(guildId, guildScheduledEventId) { return `/guilds/${guildId}/scheduled-events/${guildScheduledEventId}`; }, /** * Route for: * - GET `/guilds/{guild.id}/scheduled-events/{guildScheduledEvent.id}/users` */ guildScheduledEventUsers(guildId, guildScheduledEventId) { return `/guilds/${guildId}/scheduled-events/${guildScheduledEventId}/users`; }, }; for (const [key, fn] of Object.entries(exports.Routes)) { exports.Routes[key] = (...args) => { const escaped = args.map((arg) => { if (arg) { // Skip already "safe" urls if (internals_1.urlSafeCharacters.test(String(arg))) { return arg; } return encodeURIComponent(arg); } return arg; }); // eslint-disable-next-line no-useless-call return fn.call(null, ...escaped); }; } // Freeze the object so it can't be changed Object.freeze(exports.Routes); exports.RouteBases = { api: `https://discord.com/api/v${exports.APIVersion}`, cdn: 'https://cdn.discordapp.com', invite: 'https://discord.gg', template: 'https://discord.new', gift: 'https://discord.gift', scheduledEvent: 'https://discord.com/events', }; // Freeze bases object Object.freeze(exports.RouteBases); exports.OAuth2Routes = { authorizationURL: `${exports.RouteBases.api}${exports.Routes.oauth2Authorization()}`, tokenURL: `${exports.RouteBases.api}${exports.Routes.oauth2TokenExchange()}`, /** * See https://tools.ietf.org/html/rfc7009 */ tokenRevocationURL: `${exports.RouteBases.api}${exports.Routes.oauth2TokenRevocation()}`, }; // Freeze OAuth2 route object Object.freeze(exports.OAuth2Routes); //# sourceMappingURL=index.js.map node_modules/discord-api-types/rest/v8/voice.d.ts.map 0000664 00000000307 15114741631 0016553 0 ustar 00 {"version":3,"file":"voice.d.ts","sourceRoot":"","sources":["voice.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAE9D;;;;GAIG;AACH,MAAM,MAAM,wBAAwB,GAAG,cAAc,EAAE,CAAC"} node_modules/discord-api-types/rest/v8/emoji.d.ts.map 0000664 00000001415 15114741631 0016552 0 ustar 00 {"version":3,"file":"emoji.d.ts","sourceRoot":"","sources":["emoji.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC/C,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAC;AAExD;;;;GAIG;AACH,MAAM,MAAM,2BAA2B,GAAG,QAAQ,EAAE,CAAC;AAErD;;;;GAIG;AACH,MAAM,MAAM,0BAA0B,GAAG,QAAQ,CAAC;AAElD;;;;GAIG;AACH,MAAM,WAAW,6BAA6B;IAC7C;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;;;OAIG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,KAAK,CAAC,EAAE,SAAS,EAAE,GAAG,SAAS,CAAC;CAChC;AAED;;;;GAIG;AACH,MAAM,MAAM,2BAA2B,GAAG,QAAQ,CAAC;AAEnD;;;;GAIG;AACH,MAAM,WAAW,8BAA8B;IAC9C;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC1B;;OAEG;IACH,KAAK,CAAC,EAAE,SAAS,EAAE,GAAG,IAAI,GAAG,SAAS,CAAC;CACvC;AAED;;;;GAIG;AACH,MAAM,MAAM,4BAA4B,GAAG,QAAQ,CAAC;AAEpD;;;;GAIG;AACH,MAAM,MAAM,6BAA6B,GAAG,KAAK,CAAC"} node_modules/discord-api-types/rest/v8/interactions.js.map 0000664 00000000155 15114741631 0017715 0 ustar 00 {"version":3,"file":"interactions.js","sourceRoot":"","sources":["interactions.ts"],"names":[],"mappings":""} node_modules/discord-api-types/rest/v8/webhook.js.map 0000664 00000000143 15114741631 0016646 0 ustar 00 {"version":3,"file":"webhook.js","sourceRoot":"","sources":["webhook.ts"],"names":[],"mappings":""} node_modules/discord-api-types/rest/v8/template.js.map 0000664 00000000145 15114741631 0017025 0 ustar 00 {"version":3,"file":"template.js","sourceRoot":"","sources":["template.ts"],"names":[],"mappings":""} node_modules/discord-api-types/rest/v8/oauth2.d.ts.map 0000664 00000006501 15114741631 0016652 0 ustar 00 {"version":3,"file":"oauth2.d.ts","sourceRoot":"","sources":["oauth2.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC5D,OAAO,KAAK,EAAE,cAAc,EAAE,QAAQ,EAAE,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AAE3G;;;;GAIG;AACH,MAAM,MAAM,wCAAwC,GAAG,IAAI,CAAC,cAAc,EAAE,OAAO,CAAC,CAAC;AAErF;;;;GAIG;AACH,MAAM,WAAW,0CAA0C;IAC1D;;OAEG;IACH,WAAW,EAAE,OAAO,CAAC,cAAc,CAAC,CAAC;IACrC;;OAE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,MAAM,GAAG,GAAG,GAAG,KAAK,GAAG,YAAY,CAAC,GAAG,GAAG,MAAM,GAAG,GAAG,GAAG,KAAK,EAAE,CAAC;IACvE;;OAEG;IACH,WAAW,CAAC,EAAE,WAAW,CAAC;IAC1B,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAC/B,aAAa,EAAE,MAAM,CAAC;IACtB,YAAY,CAAC,EAAE,MAAM,CAAC;CACtB;AAED;;GAEG;AACH,MAAM,WAAW,6CAA6C;IAC7D,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,SAAS,CAAC;IACpB,WAAW,EAAE,WAAW,CAAC;CACzB;AAED;;;;GAIG;AACH,MAAM,WAAW,oDAAoD;IACpE,YAAY,EAAE,MAAM,CAAC;IACrB,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;IACnB,aAAa,EAAE,MAAM,CAAC;IACtB,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,QAAQ,CAAC;CAChB;AAED;;;;GAIG;AACH,MAAM,WAAW,6DAA6D;IAC7E,YAAY,EAAE,MAAM,CAAC;IACrB,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;IACnB,aAAa,EAAE,MAAM,CAAC;IACtB,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,UAAU,CAAC;CACpB;AAED;;GAEG;AACH,MAAM,MAAM,sEAAsE,GACjF,oDAAoD,GACnD,6DAA6D,CAAC"} node_modules/discord-api-types/rest/v8/channel.d.ts.map 0000664 00000014002 15114741631 0017053 0 ustar 00 {"version":3,"file":"channel.d.ts","sourceRoot":"","sources":["channel.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC5D,OAAO,KAAK,EACX,qBAAqB,EACrB,kBAAk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CAC9C;AAED;;;;GAIG;AACH,MAAM,MAAM,8BAA8B,GAAG,iBAAiB,CAAC;AAE/D;;;;GAIG;AACH,MAAM,MAAM,oCAAoC,GAAG,KAAK,CAAC;AAEzD;;;;GAIG;AACH,MAAM,WAAW,mCAAmC;IACnD;;OAEG;IACH,kBAAkB,EAAE,SAAS,CAAC;CAC9B;AAED;;;;GAIG;AACH,MAAM,MAAM,iCAAiC,GAAG,kBAAkB,CAAC;AAEnE;;;;GAIG;AACH,MAAM,MAAM,8BAA8B,GAAG,KAAK,CAAC;AAEnD;;;;GAIG;AACH,MAAM,MAAM,2BAA2B,GAAG,UAAU,EAAE,CAAC;AAEvD;;;;GAIG;AACH,MAAM,MAAM,0BAA0B,GAAG,KAAK,CAAC;AAE/C;;;;GAIG;AACH,MAAM,MAAM,6BAA6B,GAAG,KAAK,CAAC;AAElD;;;;GAIG;AACH,MAAM,WAAW,kCAAkC;IAClD;;OAEG;IACH,YAAY,EAAE,MAAM,CAAC;IACrB;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CAC1B;AAED;;;;GAIG;AACH,MAAM,MAAM,gCAAgC,GAAG,OAAO,CAAC;AAEvD;;;;GAIG;AACH,MAAM,MAAM,mCAAmC,GAAG,OAAO,CAAC"} node_modules/discord-api-types/rest/v8/invite.js 0000664 00000000157 15114741631 0015737 0 ustar 00 "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); //# sourceMappingURL=invite.js.map node_modules/discord-api-types/rest/v8/channel.d.ts 0000664 00000050703 15114741631 0016307 0 ustar 00 import type { Permissions, Snowflake } from '../../globals'; import type { APIActionRowComponent, APIAllowedMentions, APIAttachment, APIChannel, APIEmbed, APIExtendedInvite, APIFollowedChannel, APIMessage, APIMessageActionRowComponent, APIMessageReference, APIUser, ChannelType, InviteTargetType, MessageFlags, OverwriteType, VideoQualityMode } from '../../payloads/v8/index'; import type { _AddUndefinedToPossiblyUndefinedPropertiesOfInterface, _StrictPartial } from '../../utils/internals'; /** * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export interface APIChannelPatchOverwrite extends RESTPutAPIChannelPermissionJSONBody { id: Snowflake; } /** * https://discord.com/developers/docs/resources/channel#get-channel * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type RESTGetAPIChannelResult = APIChannel; /** * https://discord.com/developers/docs/resources/channel#modify-channel * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export interface RESTPatchAPIChannelJSONBody { /** * 1-100 character channel name * * Channel types: all */ name?: string | undefined; /** * The type of channel; only conversion between `text` and `news` * is supported and only in guilds with the "NEWS" feature * * Channel types: text, news */ type?: ChannelType.GuildNews | ChannelType.GuildText | undefined; /** * The position of the channel in the left-hand listing * * Channel types: all */ position?: number | null | undefined; /** * 0-1024 character channel topic * * Channel types: text, news */ topic?: string | null | undefined; /** * Whether the channel is nsfw * * Channel types: text, news, store */ nsfw?: boolean | null | undefined; /** * Amount of seconds a user has to wait before sending another message (0-21600); * bots, as well as users with the permission `MANAGE_MESSAGES` or `MANAGE_CHANNELS`, * are unaffected * * Channel types: text */ rate_limit_per_user?: number | null | undefined; /** * The bitrate (in bits) of the voice channel; 8000 to 96000 (128000 for VIP servers) * * Channel types: voice */ bitrate?: number | null | undefined; /** * The user limit of the voice channel; 0 refers to no limit, 1 to 99 refers to a user limit * * Channel types: voice */ user_limit?: number | null | undefined; /** * Channel or category-specific permissions * * Channel types: all */ permission_overwrites?: APIChannelPatchOverwrite[] | null | undefined; /** * ID of the new parent category for a channel * * Channel types: text, news, store, voice */ parent_id?: Snowflake | null | undefined; /** * Voice region id for the voice or stage channel, automatic when set to `null` * * See https://discord.com/developers/docs/resources/voice#voice-region-object */ rtc_region?: string | null | undefined; /** * The camera video quality mode of the voice channel * * See https://discord.com/developers/docs/resources/channel#channel-object-video-quality-modes */ video_quality_mode?: VideoQualityMode | null | undefined; } /** * https://discord.com/developers/docs/resources/channel#modify-channel * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type RESTPatchAPIChannelResult = APIChannel; /** * https://discord.com/developers/docs/resources/channel#deleteclose-channel * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type RESTDeleteAPIChannelResult = APIChannel; /** * https://discord.com/developers/docs/resources/channel#get-channel-messages * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export interface RESTGetAPIChannelMessagesQuery { /** * Get messages around this message ID */ around?: Snowflake; /** * Get messages before this message ID */ before?: Snowflake; /** * Get messages after this message ID */ after?: Snowflake; /** * Max number of messages to return (1-100) * * @default 50 */ limit?: number; } /** * https://discord.com/developers/docs/resources/channel#get-channel-messages * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type RESTGetAPIChannelMessagesResult = APIMessage[]; /** * https://discord.com/developers/docs/resources/channel#get-channel-message * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type RESTGetAPIChannelMessageResult = APIMessage; /** * https://discord.com/developers/docs/resources/channel#message-object-message-reference-structure * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type APIMessageReferenceSend = _AddUndefinedToPossiblyUndefinedPropertiesOfInterface<Required<Pick<APIMessageReference, 'message_id'>>> & _StrictPartial<APIMessageReference> & { /** * Whether to error if the referenced message doesn't exist instead of sending as a normal (non-reply) message * * @default true */ fail_if_not_exists?: boolean | undefined; }; /** * https://discord.com/developers/docs/resources/channel#create-message * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export interface RESTPostAPIChannelMessageJSONBody { /** * The message contents (up to 2000 characters) */ content?: string | undefined; /** * A nonce that can be used for optimistic message sending */ nonce?: number | string | undefined; /** * `true` if this is a TTS message */ tts?: boolean | undefined; /** * Embedded `rich` content (up to 6000 characters) * * See https://discord.com/developers/docs/resources/channel#embed-object */ embeds?: APIEmbed[] | undefined; /** * Embedded `rich` content * * See https://discord.com/developers/docs/resources/channel#embed-object * * @deprecated Use `embeds` instead */ embed?: APIEmbed | undefined; /** * Allowed mentions for a message * * See https://discord.com/developers/docs/resources/channel#allowed-mentions-object */ allowed_mentions?: APIAllowedMentions | undefined; /** * Include to make your message a reply * * See https://discord.com/developers/docs/resources/channel#message-object-message-reference-structure */ message_reference?: APIMessageReferenceSend | undefined; /** * The components to include with the message * * See https://discord.com/developers/docs/interactions/message-components#component-object */ components?: APIActionRowComponent<APIMessageActionRowComponent>[] | undefined; /** * IDs of up to 3 stickers in the server to send in the message * * See https://discord.com/developers/docs/resources/sticker#sticker-object */ sticker_ids?: [Snowflake, Snowflake, Snowflake] | [Snowflake, Snowflake] | [Snowflake] | undefined; /** * Attachment objects with filename and description */ attachments?: (Partial<Pick<APIAttachment, 'filename'>> & Pick<APIAttachment, 'description' | 'id'>)[] | undefined; /** * Message flags combined as a bitfield */ flags?: MessageFlags | undefined; } /** * https://discord.com/developers/docs/resources/channel#create-message * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type RESTPostAPIChannelMessageFormDataBody = (Record<`files[${bigint}]`, unknown> & { /** * JSON stringified message body */ payload_json?: string | undefined; }) | (Record<`files[${bigint}]`, unknown> & RESTPostAPIChannelMessageJSONBody); /** * https://discord.com/developers/docs/resources/channel#create-message * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type RESTPostAPIChannelMessageResult = APIMessage; /** * https://discord.com/developers/docs/resources/channel#crosspost-message * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type RESTPostAPIChannelMessageCrosspostResult = APIMessage; /** * https://discord.com/developers/docs/resources/channel#create-reaction * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type RESTPutAPIChannelMessageReactionResult = never; /** * https://discord.com/developers/docs/resources/channel#delete-own-reaction * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type RESTDeleteAPIChannelMessageOwnReaction = never; /** * https://discord.com/developers/docs/resources/channel#delete-user-reaction * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type RESTDeleteAPIChannelMessageUserReactionResult = never; /** * https://discord.com/developers/docs/resources/channel#get-reactions * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export interface RESTGetAPIChannelMessageReactionUsersQuery { /** * Get users after this user ID */ after?: Snowflake; /** * Max number of users to return (1-100) * * @default 25 */ limit?: number; } /** * https://discord.com/developers/docs/resources/channel#get-reactions * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type RESTGetAPIChannelMessageReactionUsersResult = APIUser[]; /** * https://discord.com/developers/docs/resources/channel#delete-all-reactions * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type RESTDeleteAPIChannelAllMessageReactionsResult = never; /** * https://discord.com/developers/docs/resources/channel#delete-all-reactions-for-emoji * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type RESTDeleteAPIChannelMessageReactionResult = never; /** * https://discord.com/developers/docs/resources/channel#edit-message * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export interface RESTPatchAPIChannelMessageJSONBody { /** * The new message contents (up to 2000 characters) */ content?: string | null | undefined; /** * Embedded `rich` content (up to 6000 characters) * * See https://discord.com/developers/docs/resources/channel#embed-object */ embeds?: APIEmbed[] | null | undefined; /** * Embedded `rich` content * * See https://discord.com/developers/docs/resources/channel#embed-object * * @deprecated Use `embeds` instead */ embed?: APIEmbed | null | undefined; /** * Edit the flags of a message (only `SUPPRESS_EMBEDS` can currently be set/unset) * * When specifying flags, ensure to include all previously set flags/bits * in addition to ones that you are modifying * * See https://discord.com/developers/docs/resources/channel#message-object-message-flags */ flags?: MessageFlags | null | undefined; /** * Allowed mentions for the message * * See https://discord.com/developers/docs/resources/channel#allowed-mentions-object */ allowed_mentions?: APIAllowedMentions | null | undefined; /** * Attached files to keep * * Starting with API v10, the `attachments` array must contain all attachments that should be present after edit, including **retained and new** attachments provided in the request body. * * See https://discord.com/developers/docs/resources/channel#attachment-object */ attachments?: (Partial<Pick<APIAttachment, 'description' | 'filename'>> & Pick<APIAttachment, 'id'>)[] | undefined; /** * The components to include with the message * * See https://discord.com/developers/docs/interactions/message-components#component-object */ components?: APIActionRowComponent<APIMessageActionRowComponent>[] | null | undefined; } /** * https://discord.com/developers/docs/resources/channel#edit-message * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type RESTPatchAPIChannelMessageFormDataBody = (Record<`files[${bigint}]`, unknown> & { /** * JSON stringified message body */ payload_json?: string | undefined; }) | (Record<`files[${bigint}]`, unknown> & RESTPatchAPIChannelMessageJSONBody); /** * https://discord.com/developers/docs/resources/channel#edit-message * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type RESTPatchAPIChannelMessageResult = APIMessage; /** * https://discord.com/developers/docs/resources/channel#delete-message * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type RESTDeleteAPIChannelMessageResult = never; /** * https://discord.com/developers/docs/resources/channel#bulk-delete-messages * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export interface RESTPostAPIChannelMessagesBulkDeleteJSONBody { /** * An array of message ids to delete (2-100) */ messages: Snowflake[]; } /** * https://discord.com/developers/docs/resources/channel#bulk-delete-messages * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type RESTPostAPIChannelMessagesBulkDeleteResult = never; /** * https://discord.com/developers/docs/resources/channel#edit-channel-permissions * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export interface RESTPutAPIChannelPermissionJSONBody { /** * The bitwise value of all allowed permissions * * See https://en.wikipedia.org/wiki/Bit_field * * @default "0" */ allow?: Permissions | null | undefined; /** * The bitwise value of all disallowed permissions * * See https://en.wikipedia.org/wiki/Bit_field * * @default "0" */ deny?: Permissions | null | undefined; /** * `0` for a role or `1` for a member */ type: OverwriteType; } /** * https://discord.com/developers/docs/resources/channel#edit-channel-permissions * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type RESTPutAPIChannelPermissionResult = never; /** * https://discord.com/developers/docs/resources/channel#get-channel-invites * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type RESTGetAPIChannelInvitesResult = APIExtendedInvite[]; /** * https://discord.com/developers/docs/resources/channel#create-channel-invite * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export interface RESTPostAPIChannelInviteJSONBody { /** * Duration of invite in seconds before expiry, or 0 for never * * @default 86400 (24 hours) */ max_age?: number | undefined; /** * Max number of uses or 0 for unlimited * * @default 0 */ max_uses?: number | undefined; /** * Whether this invite only grants temporary membership * * @default false */ temporary?: boolean | undefined; /** * If true, don't try to reuse a similar invite * (useful for creating many unique one time use invites) * * @default false */ unique?: boolean | undefined; /** * The type of target for this voice channel invite * * See https://discord.com/developers/docs/resources/invite#invite-object-invite-target-types */ target_type?: InviteTargetType | undefined; /** * The id of the user whose stream to display for this invite * - Required if `target_type` is 1 * - The user must be streaming in the channel */ target_user_id?: Snowflake | undefined; /** * The id of the embedded application to open for this invite * - Required if `target_type` is 2 * - The application must have the `EMBEDDED` flag */ target_application_id?: Snowflake | undefined; } /** * https://discord.com/developers/docs/resources/channel#create-channel-invite * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type RESTPostAPIChannelInviteResult = APIExtendedInvite; /** * https://discord.com/developers/docs/resources/channel#delete-channel-permission * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type RESTDeleteAPIChannelPermissionResult = never; /** * https://discord.com/developers/docs/resources/channel#follow-news-channel * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export interface RESTPostAPIChannelFollowersJSONBody { /** * ID of target channel */ webhook_channel_id: Snowflake; } /** * https://discord.com/developers/docs/resources/channel#follow-news-channel * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type RESTPostAPIChannelFollowersResult = APIFollowedChannel; /** * https://discord.com/developers/docs/resources/channel#trigger-typing-indicator * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type RESTPostAPIChannelTypingResult = never; /** * https://discord.com/developers/docs/resources/channel#get-pinned-messages * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type RESTGetAPIChannelPinsResult = APIMessage[]; /** * https://discord.com/developers/docs/resources/channel#add-pinned-channel-message * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type RESTPutAPIChannelPinResult = never; /** * https://discord.com/developers/docs/resources/channel#delete-pinned-channel-message * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type RESTDeleteAPIChannelPinResult = never; /** * https://discord.com/developers/docs/resources/channel#group-dm-add-recipient * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export interface RESTPutAPIChannelRecipientJSONBody { /** * Access token of a user that has granted your app the `gdm.join` scope */ access_token: string; /** * Nickname of the user being added */ nick?: string | undefined; } /** * https://discord.com/developers/docs/resources/channel#group-dm-add-recipient * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type RESTPutAPIChannelRecipientResult = unknown; /** * https://discord.com/developers/docs/resources/channel#group-dm-remove-recipient * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type RESTDeleteAPIChannelRecipientResult = unknown; //# sourceMappingURL=channel.d.ts.map node_modules/discord-api-types/rest/v8/template.js 0000664 00000000161 15114741631 0016247 0 ustar 00 "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); //# sourceMappingURL=template.js.map node_modules/discord-api-types/rest/v8/sticker.js 0000664 00000000160 15114741631 0016077 0 ustar 00 "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); //# sourceMappingURL=sticker.js.map node_modules/discord-api-types/rest/v8/guildScheduledEvent.d.ts.map 0000664 00000003160 15114741631 0021375 0 ustar 00 {"version":3,"file":"guildScheduledEvent.d.ts","sourceRoot":"","sources":["guildScheduledEvent.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC/C,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,KAAK,EACX,sBAAsB,EACtB,oCAAoC,EACpC,0BAA0B,EAC1B,6BAA6B,EAC7B,+BAA+B,EAC/B,yBAAyB,EACzB,MAAM,UAAU,CAAC;AAElB;;;;GAIG;AACH,MAAM,WAAW,mCAAmC;IACnD;;OAEG;IACH,eAAe,CAAC,EAAE,OAAO,CAAC;CAC1B;AAED;;;;GAIG;AACH,MAAM,MAAM,oCAAoC,GAAG,sBAAsB,EAAE,CAAC;AAE5E;;;;GAIG;AACH,MAAM,WAAW,sCAAsC;IACtD;;OAEG;IACH,UAAU,CAAC,EAAE,SAAS,GAAG,SAAS,CAAC;IACnC;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;OAEG;IACH,aAAa,EAAE,+BAA+B,CAAC;IAC/C;;OAEG;IACH,oBAAoB,EAAE,MAAM,CAAC;IAC7B;;OAEG;IACH,kBAAkB,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACxC;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACjC;;OAEG;IACH,WAAW,CAAC,EAAE,6BAA6B,GAAG,SAAS,CAAC;IACxD;;OAEG;IACH,eAAe,CAAC,EAAE,oCAAoC,GAAG,SAAS,CAAC;IACnE;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;CAClC;AAED;;;;GAIG;AACH,MAAM,MAAM,oCAAoC,GAAG,sBAAsB,CAAC;AAE1E;;;;GAIG;AACH,MAAM,WAAW,kCAAkC;IAClD;;OAEG;IACH,eAAe,CAAC,EAAE,OAAO,CAAC;CAC1B;AAED;;;;GAIG;AACH,MAAM,MAAM,mCAAmC,GAAG,sBAAsB,CAAC;AAEzE;;;;GAIG;AACH,MAAM,MAAM,uCAAuC,GAAG,cAAc,CAAC,sCAAsC,CAAC,GAAG;IAC9G;;OAEG;IACH,MAAM,CAAC,EAAE,yBAAyB,GAAG,SAAS,CAAC;CAC/C,CAAC;AAEF;;;;GAIG;AACH,MAAM,MAAM,qCAAqC,GAAG,sBAAsB,CAAC;AAE3E;;;;GAIG;AACH,MAAM,MAAM,sCAAsC,GAAG,KAAK,CAAC;AAE3D;;;;GAIG;AACH,MAAM,WAAW,uCAAuC;IACvD;;;;OAIG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB;;OAEG;IACH,MAAM,CAAC,EAAE,SAAS,CAAC;IACnB;;OAEG;IACH,KAAK,CAAC,EAAE,SAAS,CAAC;CAClB;AAED;;;;GAIG;AACH,MAAM,MAAM,wCAAwC,GAAG,0BAA0B,EAAE,CAAC"} node_modules/discord-api-types/rest/v8/guildScheduledEvent.js 0000664 00000000174 15114741631 0020367 0 ustar 00 "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); //# sourceMappingURL=guildScheduledEvent.js.map node_modules/discord-api-types/rest/v8/sticker.js.map 0000664 00000000143 15114741631 0016654 0 ustar 00 {"version":3,"file":"sticker.js","sourceRoot":"","sources":["sticker.ts"],"names":[],"mappings":""} node_modules/discord-api-types/rest/common.js 0000664 00000067627 15114741631 0015413 0 ustar 00 "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.Locale = exports.RESTJSONErrorCodes = void 0; /** * @see {@link https://discord.com/developers/docs/topics/opcodes-and-status-codes#json-json-error-codes} */ var RESTJSONErrorCodes; (function (RESTJSONErrorCodes) { RESTJSONErrorCodes[RESTJSONErrorCodes["GeneralError"] = 0] = "GeneralError"; RESTJSONErrorCodes[RESTJSONErrorCodes["UnknownAccount"] = 10001] = "UnknownAccount"; RESTJSONErrorCodes[RESTJSONErrorCodes["UnknownApplication"] = 10002] = "UnknownApplication"; RESTJSONErrorCodes[RESTJSONErrorCodes["UnknownChannel"] = 10003] = "UnknownChannel"; RESTJSONErrorCodes[RESTJSONErrorCodes["UnknownGuild"] = 10004] = "UnknownGuild"; RESTJSONErrorCodes[RESTJSONErrorCodes["UnknownIntegration"] = 10005] = "UnknownIntegration"; RESTJSONErrorCodes[RESTJSONErrorCodes["UnknownInvite"] = 10006] = "UnknownInvite"; RESTJSONErrorCodes[RESTJSONErrorCodes["UnknownMember"] = 10007] = "UnknownMember"; RESTJSONErrorCodes[RESTJSONErrorCodes["UnknownMessage"] = 10008] = "UnknownMessage"; RESTJSONErrorCodes[RESTJSONErrorCodes["UnknownPermissionOverwrite"] = 10009] = "UnknownPermissionOverwrite"; RESTJSONErrorCodes[RESTJSONErrorCodes["UnknownProvider"] = 10010] = "UnknownProvider"; RESTJSONErrorCodes[RESTJSONErrorCodes["UnknownRole"] = 10011] = "UnknownRole"; RESTJSONErrorCodes[RESTJSONErrorCodes["UnknownToken"] = 10012] = "UnknownToken"; RESTJSONErrorCodes[RESTJSONErrorCodes["UnknownUser"] = 10013] = "UnknownUser"; RESTJSONErrorCodes[RESTJSONErrorCodes["UnknownEmoji"] = 10014] = "UnknownEmoji"; RESTJSONErrorCodes[RESTJSONErrorCodes["UnknownWebhook"] = 10015] = "UnknownWebhook"; RESTJSONErrorCodes[RESTJSONErrorCodes["UnknownWebhookService"] = 10016] = "UnknownWebhookService"; RESTJSONErrorCodes[RESTJSONErrorCodes["UnknownSession"] = 10020] = "UnknownSession"; RESTJSONErrorCodes[RESTJSONErrorCodes["UnknownAsset"] = 10021] = "UnknownAsset"; RESTJSONErrorCodes[RESTJSONErrorCodes["UnknownBan"] = 10026] = "UnknownBan"; RESTJSONErrorCodes[RESTJSONErrorCodes["UnknownSKU"] = 10027] = "UnknownSKU"; RESTJSONErrorCodes[RESTJSONErrorCodes["UnknownStoreListing"] = 10028] = "UnknownStoreListing"; RESTJSONErrorCodes[RESTJSONErrorCodes["UnknownEntitlement"] = 10029] = "UnknownEntitlement"; RESTJSONErrorCodes[RESTJSONErrorCodes["UnknownBuild"] = 10030] = "UnknownBuild"; RESTJSONErrorCodes[RESTJSONErrorCodes["UnknownLobby"] = 10031] = "UnknownLobby"; RESTJSONErrorCodes[RESTJSONErrorCodes["UnknownBranch"] = 10032] = "UnknownBranch"; RESTJSONErrorCodes[RESTJSONErrorCodes["UnknownStoreDirectoryLayout"] = 10033] = "UnknownStoreDirectoryLayout"; RESTJSONErrorCodes[RESTJSONErrorCodes["UnknownRedistributable"] = 10036] = "UnknownRedistributable"; RESTJSONErrorCodes[RESTJSONErrorCodes["UnknownGiftCode"] = 10038] = "UnknownGiftCode"; RESTJSONErrorCodes[RESTJSONErrorCodes["UnknownStream"] = 10049] = "UnknownStream"; RESTJSONErrorCodes[RESTJSONErrorCodes["UnknownPremiumServerSubscribeCooldown"] = 10050] = "UnknownPremiumServerSubscribeCooldown"; RESTJSONErrorCodes[RESTJSONErrorCodes["UnknownGuildTemplate"] = 10057] = "UnknownGuildTemplate"; RESTJSONErrorCodes[RESTJSONErrorCodes["UnknownDiscoverableServerCategory"] = 10059] = "UnknownDiscoverableServerCategory"; RESTJSONErrorCodes[RESTJSONErrorCodes["UnknownSticker"] = 10060] = "UnknownSticker"; RESTJSONErrorCodes[RESTJSONErrorCodes["UnknownStickerPack"] = 10061] = "UnknownStickerPack"; RESTJSONErrorCodes[RESTJSONErrorCodes["UnknownInteraction"] = 10062] = "UnknownInteraction"; RESTJSONErrorCodes[RESTJSONErrorCodes["UnknownApplicationCommand"] = 10063] = "UnknownApplicationCommand"; RESTJSONErrorCodes[RESTJSONErrorCodes["UnknownVoiceState"] = 10065] = "UnknownVoiceState"; RESTJSONErrorCodes[RESTJSONErrorCodes["UnknownApplicationCommandPermissions"] = 10066] = "UnknownApplicationCommandPermissions"; RESTJSONErrorCodes[RESTJSONErrorCodes["UnknownStageInstance"] = 10067] = "UnknownStageInstance"; RESTJSONErrorCodes[RESTJSONErrorCodes["UnknownGuildMemberVerificationForm"] = 10068] = "UnknownGuildMemberVerificationForm"; RESTJSONErrorCodes[RESTJSONErrorCodes["UnknownGuildWelcomeScreen"] = 10069] = "UnknownGuildWelcomeScreen"; RESTJSONErrorCodes[RESTJSONErrorCodes["UnknownGuildScheduledEvent"] = 10070] = "UnknownGuildScheduledEvent"; RESTJSONErrorCodes[RESTJSONErrorCodes["UnknownGuildScheduledEventUser"] = 10071] = "UnknownGuildScheduledEventUser"; RESTJSONErrorCodes[RESTJSONErrorCodes["UnknownTag"] = 10087] = "UnknownTag"; RESTJSONErrorCodes[RESTJSONErrorCodes["UnknownSound"] = 10097] = "UnknownSound"; RESTJSONErrorCodes[RESTJSONErrorCodes["BotsCannotUseThisEndpoint"] = 20001] = "BotsCannotUseThisEndpoint"; RESTJSONErrorCodes[RESTJSONErrorCodes["OnlyBotsCanUseThisEndpoint"] = 20002] = "OnlyBotsCanUseThisEndpoint"; RESTJSONErrorCodes[RESTJSONErrorCodes["ExplicitContentCannotBeSentToTheDesiredRecipient"] = 20009] = "ExplicitContentCannotBeSentToTheDesiredRecipient"; RESTJSONErrorCodes[RESTJSONErrorCodes["NotAuthorizedToPerformThisActionOnThisApplication"] = 20012] = "NotAuthorizedToPerformThisActionOnThisApplication"; RESTJSONErrorCodes[RESTJSONErrorCodes["ActionCannotBePerformedDueToSlowmodeRateLimit"] = 20016] = "ActionCannotBePerformedDueToSlowmodeRateLimit"; RESTJSONErrorCodes[RESTJSONErrorCodes["TheMazeIsntMeantForYou"] = 20017] = "TheMazeIsntMeantForYou"; RESTJSONErrorCodes[RESTJSONErrorCodes["OnlyTheOwnerOfThisAccountCanPerformThisAction"] = 20018] = "OnlyTheOwnerOfThisAccountCanPerformThisAction"; RESTJSONErrorCodes[RESTJSONErrorCodes["AnnouncementEditLimitExceeded"] = 20022] = "AnnouncementEditLimitExceeded"; RESTJSONErrorCodes[RESTJSONErrorCodes["UnderMinimumAge"] = 20024] = "UnderMinimumAge"; RESTJSONErrorCodes[RESTJSONErrorCodes["ChannelSendRateLimit"] = 20028] = "ChannelSendRateLimit"; RESTJSONErrorCodes[RESTJSONErrorCodes["ServerSendRateLimit"] = 20029] = "ServerSendRateLimit"; RESTJSONErrorCodes[RESTJSONErrorCodes["StageTopicServerNameServerDescriptionOrChannelNamesContainDisallowedWords"] = 20031] = "StageTopicServerNameServerDescriptionOrChannelNamesContainDisallowedWords"; RESTJSONErrorCodes[RESTJSONErrorCodes["GuildPremiumSubscriptionLevelTooLow"] = 20035] = "GuildPremiumSubscriptionLevelTooLow"; RESTJSONErrorCodes[RESTJSONErrorCodes["MaximumNumberOfGuildsReached"] = 30001] = "MaximumNumberOfGuildsReached"; RESTJSONErrorCodes[RESTJSONErrorCodes["MaximumNumberOfFriendsReached"] = 30002] = "MaximumNumberOfFriendsReached"; RESTJSONErrorCodes[RESTJSONErrorCodes["MaximumNumberOfPinsReachedForTheChannel"] = 30003] = "MaximumNumberOfPinsReachedForTheChannel"; RESTJSONErrorCodes[RESTJSONErrorCodes["MaximumNumberOfRecipientsReached"] = 30004] = "MaximumNumberOfRecipientsReached"; RESTJSONErrorCodes[RESTJSONErrorCodes["MaximumNumberOfGuildRolesReached"] = 30005] = "MaximumNumberOfGuildRolesReached"; RESTJSONErrorCodes[RESTJSONErrorCodes["MaximumNumberOfWebhooksReached"] = 30007] = "MaximumNumberOfWebhooksReached"; RESTJSONErrorCodes[RESTJSONErrorCodes["MaximumNumberOfEmojisReached"] = 30008] = "MaximumNumberOfEmojisReached"; RESTJSONErrorCodes[RESTJSONErrorCodes["MaximumNumberOfReactionsReached"] = 30010] = "MaximumNumberOfReactionsReached"; RESTJSONErrorCodes[RESTJSONErrorCodes["MaximumNumberOfGroupDMsReached"] = 30011] = "MaximumNumberOfGroupDMsReached"; RESTJSONErrorCodes[RESTJSONErrorCodes["MaximumNumberOfGuildChannelsReached"] = 30013] = "MaximumNumberOfGuildChannelsReached"; RESTJSONErrorCodes[RESTJSONErrorCodes["MaximumNumberOfAttachmentsInAMessageReached"] = 30015] = "MaximumNumberOfAttachmentsInAMessageReached"; RESTJSONErrorCodes[RESTJSONErrorCodes["MaximumNumberOfInvitesReached"] = 30016] = "MaximumNumberOfInvitesReached"; RESTJSONErrorCodes[RESTJSONErrorCodes["MaximumNumberOfAnimatedEmojisReached"] = 30018] = "MaximumNumberOfAnimatedEmojisReached"; RESTJSONErrorCodes[RESTJSONErrorCodes["MaximumNumberOfServerMembersReached"] = 30019] = "MaximumNumberOfServerMembersReached"; RESTJSONErrorCodes[RESTJSONErrorCodes["MaximumNumberOfServerCategoriesReached"] = 30030] = "MaximumNumberOfServerCategoriesReached"; RESTJSONErrorCodes[RESTJSONErrorCodes["GuildAlreadyHasTemplate"] = 30031] = "GuildAlreadyHasTemplate"; RESTJSONErrorCodes[RESTJSONErrorCodes["MaximumNumberOfApplicationCommandsReached"] = 30032] = "MaximumNumberOfApplicationCommandsReached"; RESTJSONErrorCodes[RESTJSONErrorCodes["MaximumThreadParticipantsReached"] = 30033] = "MaximumThreadParticipantsReached"; RESTJSONErrorCodes[RESTJSONErrorCodes["MaximumDailyApplicationCommandCreatesReached"] = 30034] = "MaximumDailyApplicationCommandCreatesReached"; RESTJSONErrorCodes[RESTJSONErrorCodes["MaximumNumberOfNonGuildMemberBansHasBeenExceeded"] = 30035] = "MaximumNumberOfNonGuildMemberBansHasBeenExceeded"; RESTJSONErrorCodes[RESTJSONErrorCodes["MaximumNumberOfBanFetchesHasBeenReached"] = 30037] = "MaximumNumberOfBanFetchesHasBeenReached"; RESTJSONErrorCodes[RESTJSONErrorCodes["MaximumNumberOfUncompletedGuildScheduledEventsReached"] = 30038] = "MaximumNumberOfUncompletedGuildScheduledEventsReached"; RESTJSONErrorCodes[RESTJSONErrorCodes["MaximumNumberOfStickersReached"] = 30039] = "MaximumNumberOfStickersReached"; RESTJSONErrorCodes[RESTJSONErrorCodes["MaximumNumberOfPruneRequestsHasBeenReached"] = 30040] = "MaximumNumberOfPruneRequestsHasBeenReached"; RESTJSONErrorCodes[RESTJSONErrorCodes["MaximumNumberOfGuildWidgetSettingsUpdatesHasBeenReached"] = 30042] = "MaximumNumberOfGuildWidgetSettingsUpdatesHasBeenReached"; RESTJSONErrorCodes[RESTJSONErrorCodes["MaximumNumberOfSoundboardSoundsReached"] = 30045] = "MaximumNumberOfSoundboardSoundsReached"; RESTJSONErrorCodes[RESTJSONErrorCodes["MaximumNumberOfEditsToMessagesOlderThanOneHourReached"] = 30046] = "MaximumNumberOfEditsToMessagesOlderThanOneHourReached"; RESTJSONErrorCodes[RESTJSONErrorCodes["MaximumNumberOfPinnedThreadsInForumHasBeenReached"] = 30047] = "MaximumNumberOfPinnedThreadsInForumHasBeenReached"; RESTJSONErrorCodes[RESTJSONErrorCodes["MaximumNumberOfTagsInForumHasBeenReached"] = 30048] = "MaximumNumberOfTagsInForumHasBeenReached"; RESTJSONErrorCodes[RESTJSONErrorCodes["BitrateIsTooHighForChannelOfThisType"] = 30052] = "BitrateIsTooHighForChannelOfThisType"; RESTJSONErrorCodes[RESTJSONErrorCodes["MaximumNumberOfPremiumEmojisReached"] = 30056] = "MaximumNumberOfPremiumEmojisReached"; RESTJSONErrorCodes[RESTJSONErrorCodes["MaximumNumberOfWebhooksPerGuildReached"] = 30058] = "MaximumNumberOfWebhooksPerGuildReached"; RESTJSONErrorCodes[RESTJSONErrorCodes["MaximumNumberOfChannelPermissionOverwritesReached"] = 30060] = "MaximumNumberOfChannelPermissionOverwritesReached"; RESTJSONErrorCodes[RESTJSONErrorCodes["TheChannelsForThisGuildAreTooLarge"] = 30061] = "TheChannelsForThisGuildAreTooLarge"; RESTJSONErrorCodes[RESTJSONErrorCodes["Unauthorized"] = 40001] = "Unauthorized"; RESTJSONErrorCodes[RESTJSONErrorCodes["VerifyYourAccount"] = 40002] = "VerifyYourAccount"; RESTJSONErrorCodes[RESTJSONErrorCodes["OpeningDirectMessagesTooFast"] = 40003] = "OpeningDirectMessagesTooFast"; RESTJSONErrorCodes[RESTJSONErrorCodes["SendMessagesHasBeenTemporarilyDisabled"] = 40004] = "SendMessagesHasBeenTemporarilyDisabled"; RESTJSONErrorCodes[RESTJSONErrorCodes["RequestEntityTooLarge"] = 40005] = "RequestEntityTooLarge"; RESTJSONErrorCodes[RESTJSONErrorCodes["FeatureTemporarilyDisabledServerSide"] = 40006] = "FeatureTemporarilyDisabledServerSide"; RESTJSONErrorCodes[RESTJSONErrorCodes["UserBannedFromThisGuild"] = 40007] = "UserBannedFromThisGuild"; RESTJSONErrorCodes[RESTJSONErrorCodes["ConnectionHasBeenRevoked"] = 40012] = "ConnectionHasBeenRevoked"; RESTJSONErrorCodes[RESTJSONErrorCodes["OnlyConsumableSKUsCanBeConsumed"] = 40018] = "OnlyConsumableSKUsCanBeConsumed"; RESTJSONErrorCodes[RESTJSONErrorCodes["YouCanOnlyDeleteSandboxEntitlements"] = 40019] = "YouCanOnlyDeleteSandboxEntitlements"; RESTJSONErrorCodes[RESTJSONErrorCodes["TargetUserIsNotConnectedToVoice"] = 40032] = "TargetUserIsNotConnectedToVoice"; RESTJSONErrorCodes[RESTJSONErrorCodes["ThisMessageWasAlreadyCrossposted"] = 40033] = "ThisMessageWasAlreadyCrossposted"; RESTJSONErrorCodes[RESTJSONErrorCodes["ApplicationCommandWithThatNameAlreadyExists"] = 40041] = "ApplicationCommandWithThatNameAlreadyExists"; RESTJSONErrorCodes[RESTJSONErrorCodes["ApplicationInteractionFailedToSend"] = 40043] = "ApplicationInteractionFailedToSend"; RESTJSONErrorCodes[RESTJSONErrorCodes["CannotSendAMessageInAForumChannel"] = 40058] = "CannotSendAMessageInAForumChannel"; RESTJSONErrorCodes[RESTJSONErrorCodes["InteractionHasAlreadyBeenAcknowledged"] = 40060] = "InteractionHasAlreadyBeenAcknowledged"; RESTJSONErrorCodes[RESTJSONErrorCodes["TagNamesMustBeUnique"] = 40061] = "TagNamesMustBeUnique"; RESTJSONErrorCodes[RESTJSONErrorCodes["ServiceResourceIsBeingRateLimited"] = 40062] = "ServiceResourceIsBeingRateLimited"; RESTJSONErrorCodes[RESTJSONErrorCodes["ThereAreNoTagsAvailableThatCanBeSetByNonModerators"] = 40066] = "ThereAreNoTagsAvailableThatCanBeSetByNonModerators"; RESTJSONErrorCodes[RESTJSONErrorCodes["TagRequiredToCreateAForumPostInThisChannel"] = 40067] = "TagRequiredToCreateAForumPostInThisChannel"; RESTJSONErrorCodes[RESTJSONErrorCodes["AnEntitlementHasAlreadyBeenGrantedForThisResource"] = 40074] = "AnEntitlementHasAlreadyBeenGrantedForThisResource"; RESTJSONErrorCodes[RESTJSONErrorCodes["ThisInteractionHasHitTheMaximumNumberOfFollowUpMessages"] = 40094] = "ThisInteractionHasHitTheMaximumNumberOfFollowUpMessages"; RESTJSONErrorCodes[RESTJSONErrorCodes["CloudflareIsBlockingYourRequest"] = 40333] = "CloudflareIsBlockingYourRequest"; RESTJSONErrorCodes[RESTJSONErrorCodes["MissingAccess"] = 50001] = "MissingAccess"; RESTJSONErrorCodes[RESTJSONErrorCodes["InvalidAccountType"] = 50002] = "InvalidAccountType"; RESTJSONErrorCodes[RESTJSONErrorCodes["CannotExecuteActionOnDMChannel"] = 50003] = "CannotExecuteActionOnDMChannel"; RESTJSONErrorCodes[RESTJSONErrorCodes["GuildWidgetDisabled"] = 50004] = "GuildWidgetDisabled"; RESTJSONErrorCodes[RESTJSONErrorCodes["CannotEditMessageAuthoredByAnotherUser"] = 50005] = "CannotEditMessageAuthoredByAnotherUser"; RESTJSONErrorCodes[RESTJSONErrorCodes["CannotSendAnEmptyMessage"] = 50006] = "CannotSendAnEmptyMessage"; RESTJSONErrorCodes[RESTJSONErrorCodes["CannotSendMessagesToThisUser"] = 50007] = "CannotSendMessagesToThisUser"; RESTJSONErrorCodes[RESTJSONErrorCodes["CannotSendMessagesInNonTextChannel"] = 50008] = "CannotSendMessagesInNonTextChannel"; RESTJSONErrorCodes[RESTJSONErrorCodes["ChannelVerificationLevelTooHighForYouToGainAccess"] = 50009] = "ChannelVerificationLevelTooHighForYouToGainAccess"; RESTJSONErrorCodes[RESTJSONErrorCodes["OAuth2ApplicationDoesNotHaveBot"] = 50010] = "OAuth2ApplicationDoesNotHaveBot"; RESTJSONErrorCodes[RESTJSONErrorCodes["OAuth2ApplicationLimitReached"] = 50011] = "OAuth2ApplicationLimitReached"; RESTJSONErrorCodes[RESTJSONErrorCodes["InvalidOAuth2State"] = 50012] = "InvalidOAuth2State"; RESTJSONErrorCodes[RESTJSONErrorCodes["MissingPermissions"] = 50013] = "MissingPermissions"; RESTJSONErrorCodes[RESTJSONErrorCodes["InvalidToken"] = 50014] = "InvalidToken"; RESTJSONErrorCodes[RESTJSONErrorCodes["NoteWasTooLong"] = 50015] = "NoteWasTooLong"; RESTJSONErrorCodes[RESTJSONErrorCodes["ProvidedTooFewOrTooManyMessagesToDelete"] = 50016] = "ProvidedTooFewOrTooManyMessagesToDelete"; RESTJSONErrorCodes[RESTJSONErrorCodes["InvalidMFALevel"] = 50017] = "InvalidMFALevel"; RESTJSONErrorCodes[RESTJSONErrorCodes["MessageCanOnlyBePinnedInTheChannelItWasSentIn"] = 50019] = "MessageCanOnlyBePinnedInTheChannelItWasSentIn"; RESTJSONErrorCodes[RESTJSONErrorCodes["InviteCodeInvalidOrTaken"] = 50020] = "InviteCodeInvalidOrTaken"; RESTJSONErrorCodes[RESTJSONErrorCodes["CannotExecuteActionOnSystemMessage"] = 50021] = "CannotExecuteActionOnSystemMessage"; RESTJSONErrorCodes[RESTJSONErrorCodes["CannotExecuteActionOnThisChannelType"] = 50024] = "CannotExecuteActionOnThisChannelType"; RESTJSONErrorCodes[RESTJSONErrorCodes["InvalidOAuth2AccessToken"] = 50025] = "InvalidOAuth2AccessToken"; RESTJSONErrorCodes[RESTJSONErrorCodes["MissingRequiredOAuth2Scope"] = 50026] = "MissingRequiredOAuth2Scope"; RESTJSONErrorCodes[RESTJSONErrorCodes["InvalidWebhookToken"] = 50027] = "InvalidWebhookToken"; RESTJSONErrorCodes[RESTJSONErrorCodes["InvalidRole"] = 50028] = "InvalidRole"; RESTJSONErrorCodes[RESTJSONErrorCodes["InvalidRecipients"] = 50033] = "InvalidRecipients"; RESTJSONErrorCodes[RESTJSONErrorCodes["OneOfTheMessagesProvidedWasTooOldForBulkDelete"] = 50034] = "OneOfTheMessagesProvidedWasTooOldForBulkDelete"; RESTJSONErrorCodes[RESTJSONErrorCodes["InvalidFormBodyOrContentType"] = 50035] = "InvalidFormBodyOrContentType"; RESTJSONErrorCodes[RESTJSONErrorCodes["InviteAcceptedToGuildWithoutTheBotBeingIn"] = 50036] = "InviteAcceptedToGuildWithoutTheBotBeingIn"; RESTJSONErrorCodes[RESTJSONErrorCodes["InvalidActivityAction"] = 50039] = "InvalidActivityAction"; RESTJSONErrorCodes[RESTJSONErrorCodes["InvalidAPIVersion"] = 50041] = "InvalidAPIVersion"; RESTJSONErrorCodes[RESTJSONErrorCodes["FileUploadedExceedsMaximumSize"] = 50045] = "FileUploadedExceedsMaximumSize"; RESTJSONErrorCodes[RESTJSONErrorCodes["InvalidFileUploaded"] = 50046] = "InvalidFileUploaded"; RESTJSONErrorCodes[RESTJSONErrorCodes["CannotSelfRedeemThisGift"] = 50054] = "CannotSelfRedeemThisGift"; RESTJSONErrorCodes[RESTJSONErrorCodes["InvalidGuild"] = 50055] = "InvalidGuild"; RESTJSONErrorCodes[RESTJSONErrorCodes["InvalidSKU"] = 50057] = "InvalidSKU"; RESTJSONErrorCodes[RESTJSONErrorCodes["InvalidRequestOrigin"] = 50067] = "InvalidRequestOrigin"; RESTJSONErrorCodes[RESTJSONErrorCodes["InvalidMessageType"] = 50068] = "InvalidMessageType"; RESTJSONErrorCodes[RESTJSONErrorCodes["PaymentSourceRequiredToRedeemGift"] = 50070] = "PaymentSourceRequiredToRedeemGift"; RESTJSONErrorCodes[RESTJSONErrorCodes["CannotModifyASystemWebhook"] = 50073] = "CannotModifyASystemWebhook"; RESTJSONErrorCodes[RESTJSONErrorCodes["CannotDeleteChannelRequiredForCommunityGuilds"] = 50074] = "CannotDeleteChannelRequiredForCommunityGuilds"; RESTJSONErrorCodes[RESTJSONErrorCodes["CannotEditStickersWithinMessage"] = 50080] = "CannotEditStickersWithinMessage"; RESTJSONErrorCodes[RESTJSONErrorCodes["InvalidStickerSent"] = 50081] = "InvalidStickerSent"; RESTJSONErrorCodes[RESTJSONErrorCodes["InvalidActionOnArchivedThread"] = 50083] = "InvalidActionOnArchivedThread"; RESTJSONErrorCodes[RESTJSONErrorCodes["InvalidThreadNotificationSettings"] = 50084] = "InvalidThreadNotificationSettings"; RESTJSONErrorCodes[RESTJSONErrorCodes["ParameterEarlierThanCreation"] = 50085] = "ParameterEarlierThanCreation"; RESTJSONErrorCodes[RESTJSONErrorCodes["CommunityServerChannelsMustBeTextChannels"] = 50086] = "CommunityServerChannelsMustBeTextChannels"; RESTJSONErrorCodes[RESTJSONErrorCodes["TheEntityTypeOfTheEventIsDifferentFromTheEntityYouAreTryingToStartTheEventFor"] = 50091] = "TheEntityTypeOfTheEventIsDifferentFromTheEntityYouAreTryingToStartTheEventFor"; RESTJSONErrorCodes[RESTJSONErrorCodes["ServerNotAvailableInYourLocation"] = 50095] = "ServerNotAvailableInYourLocation"; RESTJSONErrorCodes[RESTJSONErrorCodes["ServerNeedsMonetizationEnabledToPerformThisAction"] = 50097] = "ServerNeedsMonetizationEnabledToPerformThisAction"; RESTJSONErrorCodes[RESTJSONErrorCodes["ServerNeedsMoreBoostsToPerformThisAction"] = 50101] = "ServerNeedsMoreBoostsToPerformThisAction"; RESTJSONErrorCodes[RESTJSONErrorCodes["RequestBodyContainsInvalidJSON"] = 50109] = "RequestBodyContainsInvalidJSON"; RESTJSONErrorCodes[RESTJSONErrorCodes["ProvidedFileIsInvalid"] = 50110] = "ProvidedFileIsInvalid"; RESTJSONErrorCodes[RESTJSONErrorCodes["ProvidedFileTypeIsInvalid"] = 50123] = "ProvidedFileTypeIsInvalid"; RESTJSONErrorCodes[RESTJSONErrorCodes["ProvidedFileDurationExceedsMaximumLength"] = 50124] = "ProvidedFileDurationExceedsMaximumLength"; RESTJSONErrorCodes[RESTJSONErrorCodes["OwnerCannotBePendingMember"] = 50131] = "OwnerCannotBePendingMember"; RESTJSONErrorCodes[RESTJSONErrorCodes["OwnershipCannotBeMovedToABotUser"] = 50132] = "OwnershipCannotBeMovedToABotUser"; RESTJSONErrorCodes[RESTJSONErrorCodes["FailedToResizeAssetBelowTheMinimumSize"] = 50138] = "FailedToResizeAssetBelowTheMinimumSize"; RESTJSONErrorCodes[RESTJSONErrorCodes["CannotMixSubscriptionAndNonSubscriptionRolesForAnEmoji"] = 50144] = "CannotMixSubscriptionAndNonSubscriptionRolesForAnEmoji"; RESTJSONErrorCodes[RESTJSONErrorCodes["CannotConvertBetweenPremiumEmojiAndNormalEmoji"] = 50145] = "CannotConvertBetweenPremiumEmojiAndNormalEmoji"; RESTJSONErrorCodes[RESTJSONErrorCodes["UploadedFileNotFound"] = 50146] = "UploadedFileNotFound"; RESTJSONErrorCodes[RESTJSONErrorCodes["SpecifiedEmojiIsInvalid"] = 50151] = "SpecifiedEmojiIsInvalid"; RESTJSONErrorCodes[RESTJSONErrorCodes["VoiceMessagesDoNotSupportAdditionalContent"] = 50159] = "VoiceMessagesDoNotSupportAdditionalContent"; RESTJSONErrorCodes[RESTJSONErrorCodes["VoiceMessagesMustHaveASingleAudioAttachment"] = 50160] = "VoiceMessagesMustHaveASingleAudioAttachment"; RESTJSONErrorCodes[RESTJSONErrorCodes["VoiceMessagesMustHaveSupportingMetadata"] = 50161] = "VoiceMessagesMustHaveSupportingMetadata"; RESTJSONErrorCodes[RESTJSONErrorCodes["VoiceMessagesCannotBeEdited"] = 50162] = "VoiceMessagesCannotBeEdited"; RESTJSONErrorCodes[RESTJSONErrorCodes["CannotDeleteGuildSubscriptionIntegration"] = 50163] = "CannotDeleteGuildSubscriptionIntegration"; RESTJSONErrorCodes[RESTJSONErrorCodes["YouCannotSendVoiceMessagesInThisChannel"] = 50173] = "YouCannotSendVoiceMessagesInThisChannel"; RESTJSONErrorCodes[RESTJSONErrorCodes["TheUserAccountMustFirstBeVerified"] = 50178] = "TheUserAccountMustFirstBeVerified"; RESTJSONErrorCodes[RESTJSONErrorCodes["ProvidedFileDoesNotHaveAValidDuration"] = 50192] = "ProvidedFileDoesNotHaveAValidDuration"; RESTJSONErrorCodes[RESTJSONErrorCodes["YouDoNotHavePermissionToSendThisSticker"] = 50600] = "YouDoNotHavePermissionToSendThisSticker"; RESTJSONErrorCodes[RESTJSONErrorCodes["TwoFactorAuthenticationIsRequired"] = 60003] = "TwoFactorAuthenticationIsRequired"; RESTJSONErrorCodes[RESTJSONErrorCodes["NoUsersWithDiscordTagExist"] = 80004] = "NoUsersWithDiscordTagExist"; RESTJSONErrorCodes[RESTJSONErrorCodes["ReactionWasBlocked"] = 90001] = "ReactionWasBlocked"; RESTJSONErrorCodes[RESTJSONErrorCodes["UserCannotUseBurstReactions"] = 90002] = "UserCannotUseBurstReactions"; RESTJSONErrorCodes[RESTJSONErrorCodes["ApplicationNotYetAvailable"] = 110001] = "ApplicationNotYetAvailable"; RESTJSONErrorCodes[RESTJSONErrorCodes["APIResourceOverloaded"] = 130000] = "APIResourceOverloaded"; RESTJSONErrorCodes[RESTJSONErrorCodes["TheStageIsAlreadyOpen"] = 150006] = "TheStageIsAlreadyOpen"; RESTJSONErrorCodes[RESTJSONErrorCodes["CannotReplyWithoutPermissionToReadMessageHistory"] = 160002] = "CannotReplyWithoutPermissionToReadMessageHistory"; RESTJSONErrorCodes[RESTJSONErrorCodes["ThreadAlreadyCreatedForMessage"] = 160004] = "ThreadAlreadyCreatedForMessage"; RESTJSONErrorCodes[RESTJSONErrorCodes["ThreadLocked"] = 160005] = "ThreadLocked"; RESTJSONErrorCodes[RESTJSONErrorCodes["MaximumActiveThreads"] = 160006] = "MaximumActiveThreads"; RESTJSONErrorCodes[RESTJSONErrorCodes["MaximumActiveAnnouncementThreads"] = 160007] = "MaximumActiveAnnouncementThreads"; RESTJSONErrorCodes[RESTJSONErrorCodes["InvalidJSONForUploadedLottieFile"] = 170001] = "InvalidJSONForUploadedLottieFile"; RESTJSONErrorCodes[RESTJSONErrorCodes["UploadedLottiesCannotContainRasterizedImages"] = 170002] = "UploadedLottiesCannotContainRasterizedImages"; RESTJSONErrorCodes[RESTJSONErrorCodes["StickerMaximumFramerateExceeded"] = 170003] = "StickerMaximumFramerateExceeded"; RESTJSONErrorCodes[RESTJSONErrorCodes["StickerFrameCountExceedsMaximumOf1000Frames"] = 170004] = "StickerFrameCountExceedsMaximumOf1000Frames"; RESTJSONErrorCodes[RESTJSONErrorCodes["LottieAnimationMaximumDimensionsExceeded"] = 170005] = "LottieAnimationMaximumDimensionsExceeded"; RESTJSONErrorCodes[RESTJSONErrorCodes["StickerFramerateIsTooSmallOrTooLarge"] = 170006] = "StickerFramerateIsTooSmallOrTooLarge"; RESTJSONErrorCodes[RESTJSONErrorCodes["StickerAnimationDurationExceedsMaximumOf5Seconds"] = 170007] = "StickerAnimationDurationExceedsMaximumOf5Seconds"; RESTJSONErrorCodes[RESTJSONErrorCodes["CannotUpdateAFinishedEvent"] = 180000] = "CannotUpdateAFinishedEvent"; RESTJSONErrorCodes[RESTJSONErrorCodes["FailedToCreateStageNeededForStageEvent"] = 180002] = "FailedToCreateStageNeededForStageEvent"; RESTJSONErrorCodes[RESTJSONErrorCodes["MessageWasBlockedByAutomaticModeration"] = 200000] = "MessageWasBlockedByAutomaticModeration"; RESTJSONErrorCodes[RESTJSONErrorCodes["TitleWasBlockedByAutomaticModeration"] = 200001] = "TitleWasBlockedByAutomaticModeration"; RESTJSONErrorCodes[RESTJSONErrorCodes["WebhooksPostedToForumChannelsMustHaveAThreadNameOrThreadId"] = 220001] = "WebhooksPostedToForumChannelsMustHaveAThreadNameOrThreadId"; RESTJSONErrorCodes[RESTJSONErrorCodes["WebhooksPostedToForumChannelsCannotHaveBothAThreadNameAndThreadId"] = 220002] = "WebhooksPostedToForumChannelsCannotHaveBothAThreadNameAndThreadId"; RESTJSONErrorCodes[RESTJSONErrorCodes["WebhooksCanOnlyCreateThreadsInForumChannels"] = 220003] = "WebhooksCanOnlyCreateThreadsInForumChannels"; RESTJSONErrorCodes[RESTJSONErrorCodes["WebhookServicesCannotBeUsedInForumChannels"] = 220004] = "WebhookServicesCannotBeUsedInForumChannels"; RESTJSONErrorCodes[RESTJSONErrorCodes["MessageBlockedByHarmfulLinksFilter"] = 240000] = "MessageBlockedByHarmfulLinksFilter"; RESTJSONErrorCodes[RESTJSONErrorCodes["CannotEnableOnboardingRequirementsAreNotMet"] = 350000] = "CannotEnableOnboardingRequirementsAreNotMet"; RESTJSONErrorCodes[RESTJSONErrorCodes["CannotUpdateOnboardingWhileBelowRequirements"] = 350001] = "CannotUpdateOnboardingWhileBelowRequirements"; RESTJSONErrorCodes[RESTJSONErrorCodes["FailedToBanUsers"] = 500000] = "FailedToBanUsers"; RESTJSONErrorCodes[RESTJSONErrorCodes["PollVotingBlocked"] = 520000] = "PollVotingBlocked"; RESTJSONErrorCodes[RESTJSONErrorCodes["PollExpired"] = 520001] = "PollExpired"; RESTJSONErrorCodes[RESTJSONErrorCodes["InvalidChannelTypeForPollCreation"] = 520002] = "InvalidChannelTypeForPollCreation"; RESTJSONErrorCodes[RESTJSONErrorCodes["CannotEditAPollMessage"] = 520003] = "CannotEditAPollMessage"; RESTJSONErrorCodes[RESTJSONErrorCodes["CannotUseAnEmojiIncludedWithThePoll"] = 520004] = "CannotUseAnEmojiIncludedWithThePoll"; RESTJSONErrorCodes[RESTJSONErrorCodes["CannotExpireANonPollMessage"] = 520006] = "CannotExpireANonPollMessage"; })(RESTJSONErrorCodes || (exports.RESTJSONErrorCodes = RESTJSONErrorCodes = {})); /** * @see {@link https://discord.com/developers/docs/reference#locales} */ var Locale; (function (Locale) { Locale["Indonesian"] = "id"; Locale["EnglishUS"] = "en-US"; Locale["EnglishGB"] = "en-GB"; Locale["Bulgarian"] = "bg"; Locale["ChineseCN"] = "zh-CN"; Locale["ChineseTW"] = "zh-TW"; Locale["Croatian"] = "hr"; Locale["Czech"] = "cs"; Locale["Danish"] = "da"; Locale["Dutch"] = "nl"; Locale["Finnish"] = "fi"; Locale["French"] = "fr"; Locale["German"] = "de"; Locale["Greek"] = "el"; Locale["Hindi"] = "hi"; Locale["Hungarian"] = "hu"; Locale["Italian"] = "it"; Locale["Japanese"] = "ja"; Locale["Korean"] = "ko"; Locale["Lithuanian"] = "lt"; Locale["Norwegian"] = "no"; Locale["Polish"] = "pl"; Locale["PortugueseBR"] = "pt-BR"; Locale["Romanian"] = "ro"; Locale["Russian"] = "ru"; Locale["SpanishES"] = "es-ES"; Locale["SpanishLATAM"] = "es-419"; Locale["Swedish"] = "sv-SE"; Locale["Thai"] = "th"; Locale["Turkish"] = "tr"; Locale["Ukrainian"] = "uk"; Locale["Vietnamese"] = "vi"; })(Locale || (exports.Locale = Locale = {})); //# sourceMappingURL=common.js.map node_modules/discord-api-types/rest/v6/user.js.map 0000664 00000000135 15114741631 0016165 0 ustar 00 {"version":3,"file":"user.js","sourceRoot":"","sources":["user.ts"],"names":[],"mappings":""} node_modules/discord-api-types/rest/v6/emoji.js 0000664 00000000156 15114741631 0015541 0 ustar 00 "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); //# sourceMappingURL=emoji.js.map node_modules/discord-api-types/rest/v6/index.d.ts.map 0000664 00000003725 15114741631 0016562 0 ustar 00 {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":"AAEA,cAAc,WAAW,CAAC;AAE1B,cAAc,YAAY,CAAC;AAC3B,cAAc,WAAW,CAAC;AAC1B,cAAc,SAAS,CAAC;AACxB,cAAc,WAAW,CAAC;AAC1B,cAAc,SAAS,CAAC;AACxB,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,QAAQ,CAAC;AACvB,cAAc,SAAS,CAAC;AACxB,cAAc,WAAW,CAAC;AAE1B;;GAEG;AACH,eAA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,MAAM;IAIzC;;;;OAIG;wBACiB,MAAM;IAI1B;;;OAGG;+BACwB,MAAM;IAIjC;;;OAGG;0BACmB,MAAM;IAI5B;;;;OAIG;+BACwB,MAAM;IAIjC;;;;OAIG;8BACuB,MAAM,iBAAiB,MAAM;IAIvD;;;OAGG;kCAC2B,MAAM,iBAAiB,MAAM;IAI3D;;OAEG;yBACkB,MAAM;IAI3B;;;;OAIG;iCAC0B,MAAM;IAInC;;;OAGG;4BACqB,MAAM;IAI9B;;;OAGG;8BACuB,MAAM;IAIhC;;;;OAIG;iBACU,MAAM;IAInB;;;;;OAKG;;IAKH;;;OAGG;;IAKH;;;OAGG;uBACgB,MAAM;IAIzB;;;OAGG;;IAKH;;;OAGG;;IAKH;;;OAGG;;IAKH;;;;OAIG;8BACuB,MAAM;IAIhC;;;OAGG;2BACoB,MAAM;IAI7B;;;;;;;;;OASG;uBACgB,MAAM,iBAAiB,MAAM;IAQhD;;;;OAIG;+BACwB,MAAM,gBAAgB,MAAM,YAAY,QAAQ,GAAG,OAAO;IAIrF;;;OAGG;;IAKH;;;OAGG;;IAKH;;;OAGG;;CAIH,CAAC"} node_modules/discord-api-types/rest/v6/oauth2.js.map 0000664 00000000141 15114741631 0016406 0 ustar 00 {"version":3,"file":"oauth2.js","sourceRoot":"","sources":["oauth2.ts"],"names":[],"mappings":""} node_modules/discord-api-types/rest/v6/channel.js.map 0000664 00000000361 15114741631 0016620 0 ustar 00 {"version":3,"file":"channel.js","sourceRoot":"","sources":["channel.ts"],"names":[],"mappings":";;;AA6BA;;;;GAIG;AACH,IAAY,oBAIX;AAJD,WAAY,oBAAoB;IAC/B,6CAAqB,CAAA;IACrB,sCAAc,CAAA;IACd,sCAAc,CAAA;AACf,CAAC,EAJW,oBAAoB,oCAApB,oBAAoB,QAI/B"} node_modules/discord-api-types/rest/v6/oauth2.d.ts 0000664 00000014230 15114741631 0016072 0 ustar 00 import type { APIApplication, APIGuild, APIWebhook } from '../../payloads/v6/index'; /** * https://discord.com/developers/docs/topics/oauth2#get-current-application-information * * @deprecated API v6 is deprecated and the types will not receive further updates, please update to v8. */ export type RESTGetAPIOauth2CurrentApplicationResult = APIApplication; /** * https://discord.com/developers/docs/topics/oauth2#authorization-code-grant * * @deprecated API v6 is deprecated and the types will not receive further updates, please update to v8. */ export interface RESTOAuth2AuthorizationQuery { response_type: 'code'; client_id: string; scope: string; redirect_uri?: string; state?: string; prompt?: 'consent' | 'none'; } /** * https://discord.com/developers/docs/topics/oauth2#authorization-code-grant-redirect-url-example * * @deprecated API v6 is deprecated and the types will not receive further updates, please update to v8. */ export interface RESTOAuth2AuthorizationQueryResult { code: string; state?: string; } /** * https://discord.com/developers/docs/topics/oauth2#authorization-code-grant-redirect-url-example * * @deprecated API v6 is deprecated and the types will not receive further updates, please update to v8. */ export interface RESTPostOAuth2AccessTokenURIEncodedData { client_id: string; client_secret: string; grant_type: 'authorization_code'; code: string; redirect_uri?: string; scope: string; } /** * https://discord.com/developers/docs/topics/oauth2#authorization-code-grant-access-token-response * * @deprecated API v6 is deprecated and the types will not receive further updates, please update to v8. */ export interface RESTPostOAuth2AccessTokenResult { access_token: string; token_type: string; expires_in: number; refresh_token: string; scope: string; } /** * https://discord.com/developers/docs/topics/oauth2#authorization-code-grant-refresh-token-exchange-example * * @deprecated API v6 is deprecated and the types will not receive further updates, please update to v8. */ export interface RESTPostOAuth2RefreshTokenURIEncodedData { client_id: string; client_secret: string; grant_type: 'refresh_token'; refresh_token: string; redirect_uri?: string; scope: string; } export type RESTPostOAuth2RefreshTokenResult = RESTPostOAuth2AccessTokenResult; /** * https://discord.com/developers/docs/topics/oauth2#implicit-grant * * @deprecated API v6 is deprecated and the types will not receive further updates, please update to v8. */ export interface RESTOAuth2ImplicitAuthorizationQuery { response_type: 'token'; client_id: string; scope: string; redirect_uri?: string; state?: string; prompt?: 'consent' | 'none'; } /** * https://discord.com/developers/docs/topics/oauth2#implicit-grant-redirect-url-example * * @deprecated API v6 is deprecated and the types will not receive further updates, please update to v8. */ export type RESTOAuth2ImplicitAuthorizationURIFragmentResult = Omit<RESTPostOAuth2AccessTokenResult, 'refresh_token'>; /** * https://discord.com/developers/docs/topics/oauth2#client-credentials-grant * * @deprecated API v6 is deprecated and the types will not receive further updates, please update to v8. */ export interface RESTPostOAuth2ClientCredentialsURIEncodedData { client_id: string; client_secret: string; grant_type: 'client_credentials'; scope: string; } /** * @deprecated API v6 is deprecated and the types will not receive further updates, please update to v8. */ export type RESTPostOAuth2ClientCredentialsResult = RESTOAuth2ImplicitAuthorizationURIFragmentResult; /** * https://discord.com/developers/docs/topics/oauth2#bot-authorization-flow-bot-auth-parameters * * @deprecated API v6 is deprecated and the types will not receive further updates, please update to v8. */ export interface RESTOAuth2BotAuthorizationQuery { client_id: string; scope: string; /** * The required permissions bitfield, stringified */ permissions?: string; guild_id?: string; disable_guild_select?: boolean; } /** * https://discord.com/developers/docs/topics/oauth2#advanced-bot-authorization * * @deprecated API v6 is deprecated and the types will not receive further updates, please update to v8. */ export interface RESTOAuth2AdvancedBotAuthorizationQuery { client_id: string; /** * This assumes you include the `bot` scope alongside others (like `identify` for example) */ scope: string; /** * The required permissions bitfield, stringified */ permissions?: string; guild_id?: string; disable_guild_select?: boolean; response_type: string; redirect_uri?: string; } /** * @deprecated API v6 is deprecated and the types will not receive further updates, please update to v8. */ export interface RESTOAuth2AdvancedBotAuthorizationQueryResult { code: string; state?: string; guild_id: string; permissions: string; } /** * https://discord.com/developers/docs/topics/oauth2#advanced-bot-authorization-extended-bot-authorization-access-token-example * * @deprecated API v6 is deprecated and the types will not receive further updates, please update to v8. */ export interface RESTPostOAuth2AccessTokenWithBotAndGuildsScopeResult { access_token: string; token_type: string; expires_in: number; refresh_token: string; scope: string; guild: APIGuild; } /** * https://discord.com/developers/docs/topics/oauth2#webhooks-webhook-token-response-example * * @deprecated API v6 is deprecated and the types will not receive further updates, please update to v8. */ export interface RESTPostOAuth2AccessTokenWithBotAndWebhookIncomingScopeResult { access_token: string; token_type: string; expires_in: number; refresh_token: string; scope: string; webhook: APIWebhook; } /** * @deprecated API v6 is deprecated and the types will not receive further updates, please update to v8. */ export type RESTPostOAuth2AccessTokenWithBotAndGuildsAndWebhookIncomingScopeResult = RESTPostOAuth2AccessTokenWithBotAndGuildsScopeResult & RESTPostOAuth2AccessTokenWithBotAndWebhookIncomingScopeResult; //# sourceMappingURL=oauth2.d.ts.map node_modules/discord-api-types/rest/v6/user.d.ts.map 0000664 00000002126 15114741631 0016423 0 ustar 00 {"version":3,"file":"user.d.ts","sourceRoot":"","sources":["user.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,aAAa,EAAE,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AAEhG;;;;GAIG;AACH,MAAM,MAAM,2BAA2B,GAAG,OAAO,CAAC;AAElD;;;;GAIG;AACH,MAAM,MAAM,oBAAoB,GAAG,OAAO,CAAC;AAE3C;;;;GAIG;AACH,MAAM,WAAW,+BAA+B;IAC/C,QAAQ,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC9B,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;CACnC;AAED;;GAEG;AACH,MAAM,MAAM,6BAA6B,GAAG,OAAO,CAAC;AAEpD;;;;GAIG;AACH,MAAM,WAAW,gCAAgC;IAChD,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;CACf;AAED;;GAEG;AACH,MAAM,WAAW,8BAA8B;IAC9C,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IACpB,KAAK,EAAE,OAAO,CAAC;IACf,QAAQ,EAAE,YAAY,EAAE,CAAC;IACzB;;OAEG;IACH,WAAW,EAAE,MAAM,CAAC;IACpB,eAAe,EAAE,MAAM,CAAC;CACxB;AAED;;GAEG;AACH,MAAM,MAAM,iCAAiC,GAAG,8BAA8B,EAAE,CAAC;AAEjF;;;;GAIG;AACH,MAAM,MAAM,mCAAmC,GAAG,KAAK,CAAC;AAExD;;;;GAIG;AACH,MAAM,WAAW,6CAA6C;IAC7D,YAAY,EAAE,MAAM,CAAC;CACrB;AAED;;GAEG;AACH,MAAM,MAAM,2CAA2C,GAAG,UAAU,CAAC;AAErE;;;;GAIG;AACH,MAAM,MAAM,sCAAsC,GAAG,aAAa,EAAE,CAAC"} node_modules/discord-api-types/rest/v6/guild.d.ts.map 0000664 00000016506 15114741631 0016560 0 ustar 00 {"version":3,"file":"guild.d.ts","sourceRoot":"","sources":["guild.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACX,MAAM,EACN,UAAU,EACV,QAAQ,EACR,mBAAmB,EACnB,cAAc,EACd,eAAe,EACf,sBAAsB,EACtB,SAAS,EACT,OAAO,EACP,cAAc,EACd,gCAAgC,EAChC,0BAA0B,EAC1B,YAAY,EACZ,sBAAsB,EACtB,gBAAgB,EAChB,yBAAyB,EACzB,MAAM,yBAAyB,CAAC;AACjC,OAAO,KAAK,EAAE,oCAAoC,EAAE,MAAM,WAAW,CAAC;AAEtE;;GAEG;AACH,MAAM,WAAW,uBAAwB,SAAQ,oCAAoC;IACpF,EAAE,EAAE,MAAM,GAAG,MAAM,CAAC;CACpB;AAED;;GAEG;AACH,MAAM,MAAM,4BAA4B,GAAG,OAAO,CACjD,IAAI,CAAC,UAAU,EAAE,SAAS,GAAG,MAAM,GAAG,qBAAqB,GAAG,OAAO,GAAG,MAAM,GAAG,YAAY,CAAC,CAC9F,GAAG;IACH,IAAI,EAAE,MAAM,CAAC;IACb,EAAE,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAAC;IACjC,SAAS,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAAC;IACxC,qBAAqB,CAAC,EAAE,uBAAuB,EAAE,GAAG,SAAS,CAAC;CAC9D,CAAC;A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,OAAO,CAAC,sBAAsB,CAAC,CAAC;AAE9E;;;;GAIG;AACH,MAAM,MAAM,uCAAuC,GAAG,OAAO,CAAC,sBAAsB,CAAC,CAAC;AAEtF;;;GAGG;AACH,MAAM,MAAM,6BAA6B,GAAG,sBAAsB,CAAC;AAEnE;;GAEG;AACH,MAAM,MAAM,qCAAqC,GAAG,sBAAsB,CAAC;AAE3E;;;;GAIG;AACH,MAAM,WAAW,8BAA8B;IAC9C,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IACpB,IAAI,EAAE,MAAM,CAAC;CACb;AAED;;;;GAIG;AACH,MAAM,WAAW,+BAA+B;IAC/C,KAAK,CAAC,EAAE,gBAAgB,CAAC;CACzB;AAED;;;;;GAKG;AACH,MAAM,MAAM,gCAAgC,GAAG,WAAW,CAAC"} node_modules/discord-api-types/rest/v6/gateway.js 0000664 00000000160 15114741631 0016072 0 ustar 00 "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); //# sourceMappingURL=gateway.js.map node_modules/discord-api-types/rest/v6/emoji.js.map 0000664 00000000137 15114741631 0016314 0 ustar 00 {"version":3,"file":"emoji.js","sourceRoot":"","sources":["emoji.ts"],"names":[],"mappings":""} node_modules/discord-api-types/rest/v6/gateway.d.ts 0000664 00000001131 15114741631 0016325 0 ustar 00 import type { APIGatewayBotInfo, APIGatewayInfo } from '../../payloads/v6/index'; /** * https://discord.com/developers/docs/topics/gateway#get-gateway * * @deprecated API v6 is deprecated and the types will not receive further updates, please update to v8. */ export type RESTGetAPIGatewayResult = APIGatewayInfo; /** * https://discord.com/developers/docs/topics/gateway#get-gateway-bot * * @deprecated API v6 is deprecated and the types will not receive further updates, please update to v8. */ export type RESTGetAPIGatewayBotResult = APIGatewayBotInfo; //# sourceMappingURL=gateway.d.ts.map node_modules/discord-api-types/rest/v6/webhook.d.ts 0000664 00000012616 15114741631 0016334 0 ustar 00 import type { APIEmbed, APIMessage, APIWebhook } from '../../payloads/v6/index'; import type { APIAllowedMentionsSend } from './channel'; /** * https://discord.com/developers/docs/resources/webhook#create-webhook * * @deprecated API v6 is deprecated and the types will not receive further updates, please update to v8. */ export interface RESTPostAPIChannelWebhookJSONBody { name: string; avatar?: string | null | undefined; } /** * @deprecated API v6 is deprecated and the types will not receive further updates, please update to v8. */ export type RESTPostAPIChannelWebhookResult = APIWebhook; /** * https://discord.com/developers/docs/resources/webhook#get-channel-webhooks * * @deprecated API v6 is deprecated and the types will not receive further updates, please update to v8. */ export type RESTGetAPIChannelWebhooksResult = APIWebhook[]; /** * https://discord.com/developers/docs/resources/webhook#get-guild-webhooks * * @deprecated API v6 is deprecated and the types will not receive further updates, please update to v8. */ export type RESTGetAPIGuildWebhooksResult = APIWebhook[]; /** * https://discord.com/developers/docs/resources/webhook#get-webhook * * @deprecated API v6 is deprecated and the types will not receive further updates, please update to v8. */ export type RESTGetAPIWebhookResult = APIWebhook; /** * https://discord.com/developers/docs/resources/webhook#get-webhook-with-token * * @deprecated API v6 is deprecated and the types will not receive further updates, please update to v8. */ export type RESTGetAPIWebhookWithTokenResult = Omit<APIWebhook, 'user'>; /** * https://discord.com/developers/docs/resources/webhook#modify-webhook * * @deprecated API v6 is deprecated and the types will not receive further updates, please update to v8. */ export interface RESTPatchAPIWebhookJSONBody { name?: string | undefined; avatar?: string | null | undefined; channel_id?: string | undefined; } /** * @deprecated API v6 is deprecated and the types will not receive further updates, please update to v8. */ export type RESTPatchAPIWebhookResult = APIWebhook; /** * https://discord.com/developers/docs/resources/webhook#modify-webhook-with-token * * @deprecated API v6 is deprecated and the types will not receive further updates, please update to v8. */ export type RESTPatchAPIWebhookWithTokenJSONBody = Omit<RESTPatchAPIWebhookJSONBody, 'channel_id'>; /** * @deprecated API v6 is deprecated and the types will not receive further updates, please update to v8. */ export type RESTPatchAPIWebhookWithTokenResult = Omit<APIWebhook, 'user'>; /** * https://discord.com/developers/docs/resources/webhook#delete-webhook * * @deprecated API v6 is deprecated and the types will not receive further updates, please update to v8. */ export type RESTDeleteAPIWebhookResult = never; /** * @deprecated API v6 is deprecated and the types will not receive further updates, please update to v8. */ export type RESTDeleteAPIWebhookWithTokenResult = never; /** * https://discord.com/developers/docs/resources/webhook#execute-webhook * * @deprecated API v6 is deprecated and the types will not receive further updates, please update to v8. */ export interface RESTPostAPIWebhookWithTokenJSONBody { content?: string | undefined; username?: string | undefined; avatar_url?: string | undefined; tts?: boolean | undefined; embeds?: APIEmbed[] | undefined; allowed_mentions?: APIAllowedMentionsSend | undefined; } /** * https://discord.com/developers/docs/resources/webhook#execute-webhook * * @deprecated API v6 is deprecated and the types will not receive further updates, please update to v8. */ export type RESTPostAPIWebhookWithTokenFormDataBody = { /** * JSON stringified message body */ payload_json?: string | undefined; /** * The file contents */ file: unknown; } | (RESTPostAPIWebhookWithTokenJSONBody & { /** * The file contents */ file: unknown; }); /** * https://discord.com/developers/docs/resources/webhook#execute-webhook-querystring-params * * @deprecated API v6 is deprecated and the types will not receive further updates, please update to v8. */ export interface RESTPostAPIWebhookWithTokenQuery { wait?: boolean; } /** * @deprecated API v6 is deprecated and the types will not receive further updates, please update to v8. */ export type RESTPostAPIWebhookWithTokenResult = never; /** * Received when a call to POST `/webhooks/{webhook.id}/{webhook.token}` receives * the `wait` query parameter set to `true` * * @see https://discord.com/developers/docs/resources/webhook#execute-webhook-querystring-params * @deprecated API v6 is deprecated and the types will not receive further updates, please update to v8. */ export type RESTPostAPIWebhookWithTokenWaitResult = APIMessage; /** * https://discord.com/developers/docs/resources/webhook#execute-slackcompatible-webhook-querystring-params * * @deprecated API v6 is deprecated and the types will not receive further updates, please update to v8. */ export type RESTPostAPIWebhookWithTokenSlackQuery = RESTPostAPIWebhookWithTokenQuery; /** * https://discord.com/developers/docs/resources/webhook#execute-githubcompatible-webhook-querystring-params * * @deprecated API v6 is deprecated and the types will not receive further updates, please update to v8. */ export type RESTPostAPIWebhookWithTokenGitHubQuery = RESTPostAPIWebhookWithTokenQuery; //# sourceMappingURL=webhook.d.ts.map node_modules/discord-api-types/rest/v6/channel.js 0000664 00000001222 15114741631 0016041 0 ustar 00 "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.AllowedMentionsTypes = void 0; /** * https://discord.com/developers/docs/resources/channel#allowed-mentions-object-allowed-mention-types * * @deprecated API v6 is deprecated and the types will not receive further updates, please update to v8. */ var AllowedMentionsTypes; (function (AllowedMentionsTypes) { AllowedMentionsTypes["Everyone"] = "everyone"; AllowedMentionsTypes["Role"] = "roles"; AllowedMentionsTypes["User"] = "users"; })(AllowedMentionsTypes || (exports.AllowedMentionsTypes = AllowedMentionsTypes = {})); //# sourceMappingURL=channel.js.map node_modules/discord-api-types/rest/v6/emoji.d.ts 0000664 00000003551 15114741631 0015777 0 ustar 00 import type { APIEmoji } from '../../payloads/v6/index'; /** * https://discord.com/developers/docs/resources/emoji#list-guild-emojis * * @deprecated API v6 is deprecated and the types will not receive further updates, please update to v8. */ export type RESTGetAPIGuildEmojisResult = APIEmoji[]; /** * https://discord.com/developers/docs/resources/emoji#get-guild-emoji * * @deprecated API v6 is deprecated and the types will not receive further updates, please update to v8. */ export type RESTGetAPIGuildEmojiResult = APIEmoji; /** * https://discord.com/developers/docs/resources/emoji#create-guild-emoji-json-params * * @deprecated API v6 is deprecated and the types will not receive further updates, please update to v8. */ export interface RESTPostAPIGuildEmojiJSONBody { name: string; /** * The image data, read more [here](https://discord.com/developers/docs/reference#image-data) */ image: string; roles?: string[] | undefined; } /** * @deprecated API v6 is deprecated and the types will not receive further updates, please update to v8. */ export type RESTPostAPIGuildEmojiResult = APIEmoji; /** * https://discord.com/developers/docs/resources/emoji#modify-guild-emoji * * @deprecated API v6 is deprecated and the types will not receive further updates, please update to v8. */ export interface RESTPatchAPIGuildEmojiJSONBody { name?: string | undefined; roles?: string[] | null | undefined; } /** * @deprecated API v6 is deprecated and the types will not receive further updates, please update to v8. */ export type RESTPatchAPIGuildEmojiResult = APIEmoji; /** * https://discord.com/developers/docs/resources/emoji#delete-guild-emoji * * @deprecated API v6 is deprecated and the types will not receive further updates, please update to v8. */ export type RESTDeleteAPIGuildEmojiResult = never; //# sourceMappingURL=emoji.d.ts.map node_modules/discord-api-types/rest/v6/guild.js.map 0000664 00000000137 15114741631 0016315 0 ustar 00 {"version":3,"file":"guild.js","sourceRoot":"","sources":["guild.ts"],"names":[],"mappings":""} node_modules/discord-api-types/rest/v6/auditLog.js 0000664 00000000161 15114741631 0016202 0 ustar 00 "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); //# sourceMappingURL=auditLog.js.map node_modules/discord-api-types/rest/v6/webhook.js 0000664 00000000160 15114741631 0016067 0 ustar 00 "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); //# sourceMappingURL=webhook.js.map node_modules/discord-api-types/rest/v6/voice.js 0000664 00000000156 15114741631 0015543 0 ustar 00 "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); //# sourceMappingURL=voice.js.map node_modules/discord-api-types/rest/v6/guild.d.ts 0000664 00000044622 15114741631 0016004 0 ustar 00 import type { APIBan, APIChannel, APIGuild, APIGuildIntegration, APIGuildMember, APIGuildPreview, APIGuildWidgetSettings, APIInvite, APIRole, APIVoiceRegion, GuildDefaultMessageNotifications, GuildExplicitContentFilter, GuildFeature, GuildVerificationLevel, GuildWidgetStyle, IntegrationExpireBehavior } from '../../payloads/v6/index'; import type { RESTPutAPIChannelPermissionsJSONBody } from './channel'; /** * @deprecated API v6 is deprecated and the types will not receive further updates, please update to v8. */ export interface APIGuildCreateOverwrite extends RESTPutAPIChannelPermissionsJSONBody { id: number | string; } /** * @deprecated API v6 is deprecated and the types will not receive further updates, please update to v8. */ export type APIGuildCreatePartialChannel = Partial<Pick<APIChannel, 'bitrate' | 'nsfw' | 'rate_limit_per_user' | 'topic' | 'type' | 'user_limit'>> & { name: string; id?: number | string | undefined; parent_id?: number | string | undefined; permission_overwrites?: APIGuildCreateOverwrite[] | undefined; }; /** * @deprecated API v6 is deprecated and the types will not receive further updates, please update to v8. */ export interface APIGuildCreateRole extends RESTPostAPIGuildRoleJSONBody { id: number | string; } /** * https://discord.com/developers/docs/resources/guild#create-guild * * @deprecated API v6 is deprecated and the types will not receive further updates, please update to v8. */ export interface RESTPostAPIGuildsJSONBody { name: string; region?: string | undefined; icon?: string | undefined; verification_level?: GuildVerificationLevel | undefined; default_message_notifications?: GuildDefaultMessageNotifications | undefined; explicit_content_filter?: GuildExplicitContentFilter | undefined; roles?: APIGuildCreateRole[] | undefined; channels?: APIGuildCreatePartialChannel[] | undefined; afk_channel_id?: number | string | undefined; afk_timeout?: number | undefined; system_channel_id?: number | string | undefined; } /** * @deprecated API v6 is deprecated and the types will not receive further updates, please update to v8. */ export type RESTPostAPIGuildsResult = APIGuild; /** * https://discord.com/developers/docs/resources/guild#get-guild * * @deprecated API v6 is deprecated and the types will not receive further updates, please update to v8. */ export interface RESTGetAPIGuildQuery { with_counts?: boolean; } /** * @deprecated API v6 is deprecated and the types will not receive further updates, please update to v8. */ export type RESTGetAPIGuildResult = APIGuild; /** * https://discord.com/developers/docs/resources/guild#get-guild-preview * * @deprecated API v6 is deprecated and the types will not receive further updates, please update to v8. */ export type RESTGetAPIGuildPreviewResult = APIGuildPreview; /** * https://discord.com/developers/docs/resources/guild#modify-guild * * @deprecated API v6 is deprecated and the types will not receive further updates, please update to v8. */ export interface RESTPatchAPIGuildJSONBody { name?: string | undefined; region?: string | undefined; verification_level?: GuildVerificationLevel | undefined; default_message_notifications?: GuildDefaultMessageNotifications | undefined; explicit_content_filter?: GuildExplicitContentFilter | undefined; afk_channel_id?: string | null | undefined; afk_timeout?: number | undefined; icon?: string | null | undefined; owner_id?: string | undefined; splash?: string | null | undefined; discovery_splash?: string | null | undefined; banner?: string | null | undefined; system_channel_id?: string | null | undefined; rules_channel_id?: string | null | undefined; public_updates_channel_id?: string | null | undefined; preferred_locale?: string | undefined; features?: GuildFeature[] | undefined; description?: string | null | undefined; } /** * @deprecated API v6 is deprecated and the types will not receive further updates, please update to v8. */ export type RESTPatchAPIGuildResult = APIGuild; /** * https://discord.com/developers/docs/resources/guild#delete-guild * * @deprecated API v6 is deprecated and the types will not receive further updates, please update to v8. */ export type RESTDeleteAPIGuildResult = never; /** * https://discord.com/developers/docs/resources/guild#get-guild-channels * * @deprecated API v6 is deprecated and the types will not receive further updates, please update to v8. */ export type RESTGetAPIGuildChannelsResult = APIChannel[]; /** * https://discord.com/developers/docs/resources/guild#create-guild-channel * * @deprecated API v6 is deprecated and the types will not receive further updates, please update to v8. */ export type RESTPostAPIGuildChannelJSONBody = Partial<Pick<APIChannel, 'bitrate' | 'nsfw' | 'parent_id' | 'permission_overwrites' | 'rate_limit_per_user' | 'topic' | 'type' | 'user_limit'>> & Required<Pick<APIChannel, 'name'>>; /** * @deprecated API v6 is deprecated and the types will not receive further updates, please update to v8. */ export type RESTPostAPIGuildChannelResult = APIChannel; /** * https://discord.com/developers/docs/resources/guild#modify-guild-channel-positions * * @deprecated API v6 is deprecated and the types will not receive further updates, please update to v8. */ export type RESTPatchAPIGuildChannelPositionsJSONBody = { id: string; position: number; lock_permissions?: boolean | undefined; parent_id?: string | null | undefined; }[]; /** * @deprecated API v6 is deprecated and the types will not receive further updates, please update to v8. */ export type RESTPatchAPIGuildChannelPositionsResult = never; /** * https://discord.com/developers/docs/resources/guild#get-guild-member * * @deprecated API v6 is deprecated and the types will not receive further updates, please update to v8. */ export type RESTGetAPIGuildMemberResult = APIGuildMember; /** * https://discord.com/developers/docs/resources/guild#list-guild-members * * @deprecated API v6 is deprecated and the types will not receive further updates, please update to v8. */ export interface RESTGetAPIGuildMembersQuery { limit?: number; after?: string; } /** * @deprecated API v6 is deprecated and the types will not receive further updates, please update to v8. */ export type RESTGetAPIGuildMembersResult = APIGuildMember[]; /** * @deprecated API v6 is deprecated and the types will not receive further updates, please update to v8. */ export interface RESTGetAPIGuildMembersSearchQuery { query: string; limit?: number; } /** * @deprecated API v6 is deprecated and the types will not receive further updates, please update to v8. */ export type RESTGetAPIGuildMembersSearchResult = APIGuildMember[]; /** * https://discord.com/developers/docs/resources/guild#add-guild-member * * @deprecated API v6 is deprecated and the types will not receive further updates, please update to v8. */ export interface RESTPutAPIGuildMemberJSONBody { access_token: string; nick?: string | undefined; roles?: string[] | undefined; mute?: boolean | undefined; deaf?: boolean | undefined; } /** * @deprecated API v6 is deprecated and the types will not receive further updates, please update to v8. */ export type RESTPutAPIGuildMemberResult = APIGuildMember | undefined; /** * https://discord.com/developers/docs/resources/guild#modify-guild-member * * @deprecated API v6 is deprecated and the types will not receive further updates, please update to v8. */ export interface RESTPatchAPIGuildMemberJSONBody { nick?: string | null | undefined; roles?: string[] | null | undefined; mute?: boolean | null | undefined; deaf?: boolean | null | undefined; channel_id?: string | null | undefined; } /** * @deprecated API v6 is deprecated and the types will not receive further updates, please update to v8. */ export type RESTPatchAPIGuildMemberResult = never; /** * https://discord.com/developers/docs/resources/guild#modify-current-user-nick * * @deprecated API v6 is deprecated and the types will not receive further updates, please update to v8. */ export interface RESTPatchAPICurrentGuildMemberNicknameJSONBody { nick?: string | null | undefined; } /** * @deprecated API v6 is deprecated and the types will not receive further updates, please update to v8. */ export type RESTPatchAPICurrentGuildMemberNicknameResult = Required<RESTPatchAPICurrentGuildMemberNicknameJSONBody>; /** * https://discord.com/developers/docs/resources/guild#add-guild-member-role * * @deprecated API v6 is deprecated and the types will not receive further updates, please update to v8. */ export type RESTPutAPIGuildMemberRoleResult = never; /** * https://discord.com/developers/docs/resources/guild#remove-guild-member-role * * @deprecated API v6 is deprecated and the types will not receive further updates, please update to v8. */ export type RESTDeleteAPIGuildMemberRoleResult = never; /** * https://discord.com/developers/docs/resources/guild#remove-guild-member * * @deprecated API v6 is deprecated and the types will not receive further updates, please update to v8. */ export type RESTDeleteAPIGuildMemberResult = never; /** * https://discord.com/developers/docs/resources/guild#get-guild-bans * * @deprecated API v6 is deprecated and the types will not receive further updates, please update to v8. */ export type RESTGetAPIGuildBansResult = APIBan[]; /** * https://discord.com/developers/docs/resources/guild#get-guild-ban * * @deprecated API v6 is deprecated and the types will not receive further updates, please update to v8. */ export type RESTGetAPIGuildBanResult = APIBan; /** * https://discord.com/developers/docs/resources/guild#create-guild-ban * * @deprecated API v6 is deprecated and the types will not receive further updates, please update to v8. */ export interface RESTPutAPIGuildBanJSONBody { delete_message_days?: number | undefined; reason?: string | undefined; } /** * @deprecated API v6 is deprecated and the types will not receive further updates, please update to v8. */ export type RESTPutAPIGuildBanResult = never; /** * https://discord.com/developers/docs/resources/guild#remove-guild-ban * * @deprecated API v6 is deprecated and the types will not receive further updates, please update to v8. */ export type RESTDeleteAPIGuildBanResult = never; /** * https://discord.com/developers/docs/resources/guild#get-guild-roles * * @deprecated API v6 is deprecated and the types will not receive further updates, please update to v8. */ export type RESTGetAPIGuildRolesResult = APIRole[]; /** * https://discord.com/developers/docs/resources/guild#create-guild-role * * @deprecated API v6 is deprecated and the types will not receive further updates, please update to v8. */ export interface RESTPostAPIGuildRoleJSONBody { name?: string | null | undefined; permissions?: number | string | null | undefined; color?: number | null | undefined; hoist?: boolean | null | undefined; mentionable?: boolean | null | undefined; } /** * @deprecated API v6 is deprecated and the types will not receive further updates, please update to v8. */ export type RESTPostAPIGuildRoleResult = APIRole; /** * https://discord.com/developers/docs/resources/guild#modify-guild-role-positions * * @deprecated API v6 is deprecated and the types will not receive further updates, please update to v8. */ export type RESTPatchAPIGuildRolePositionsJSONBody = { id: string; position?: number | undefined; }[]; /** * @deprecated API v6 is deprecated and the types will not receive further updates, please update to v8. */ export type RESTPatchAPIGuildRolePositionsResult = APIRole[]; /** * https://discord.com/developers/docs/resources/guild#modify-guild-role * * @deprecated API v6 is deprecated and the types will not receive further updates, please update to v8. */ export interface RESTPatchAPIGuildRoleJSONBody { name?: string | undefined; permissions?: number | string | undefined; color?: number | undefined; hoist?: boolean | undefined; mentionable?: boolean | undefined; } /** * @deprecated API v6 is deprecated and the types will not receive further updates, please update to v8. */ export type RESTPatchAPIGuildRoleResult = APIRole; /** * https://discord.com/developers/docs/resources/guild#delete-guild-role * * @deprecated API v6 is deprecated and the types will not receive further updates, please update to v8. */ export type RESTDeleteAPIGuildRoleResult = never; /** * https://discord.com/developers/docs/resources/guild#get-guild-prune-count * * @deprecated API v6 is deprecated and the types will not receive further updates, please update to v8. */ export interface RESTGetAPIGuildPruneCountQuery { days?: number; /** * While this is typed as a string, it represents an array of * role IDs delimited by commas. * * @see https://discord.com/developers/docs/resources/guild#get-guild-prune-count-query-string-params */ include_roles?: string; } /** * @deprecated API v6 is deprecated and the types will not receive further updates, please update to v8. */ export interface RESTGetAPIGuildPruneCountResult { pruned: number; } /** * https://discord.com/developers/docs/resources/guild#begin-guild-prune * * @deprecated API v6 is deprecated and the types will not receive further updates, please update to v8. */ export interface RESTPostAPIGuildPruneJSONBody { days?: number | undefined; compute_prune_count?: boolean | undefined; include_roles?: string[] | undefined; } /** * @deprecated API v6 is deprecated and the types will not receive further updates, please update to v8. */ export interface RESTPostAPIGuildPruneResult { pruned: number | null; } /** * https://discord.com/developers/docs/resources/guild#get-guild-voice-regions * * @deprecated API v6 is deprecated and the types will not receive further updates, please update to v8. */ export type RESTGetAPIGuildVoiceRegionsResult = APIVoiceRegion[]; /** * https://discord.com/developers/docs/resources/guild#get-guild-invites * * @deprecated API v6 is deprecated and the types will not receive further updates, please update to v8. */ export type RESTGetAPIGuildInvitesResult = APIInvite[]; /** * https://discord.com/developers/docs/resources/guild#get-guild-integrations * * @deprecated API v6 is deprecated and the types will not receive further updates, please update to v8. */ export interface RESTGetAPIGuildIntegrationsQuery { include_applications?: boolean; } /** * @deprecated API v6 is deprecated and the types will not receive further updates, please update to v8. */ export type RESTGetAPIGuildIntegrationsResult = APIGuildIntegration[]; /** * https://discord.com/developers/docs/resources/guild#create-guild-integration * * @deprecated API v6 is deprecated and the types will not receive further updates, please update to v8. */ export interface RESTPostAPIGuildIntegrationJSONBody { type: string; id: string; } /** * @deprecated API v6 is deprecated and the types will not receive further updates, please update to v8. */ export type RESTPostAPIGuildIntegrationResult = never; /** * https://discord.com/developers/docs/resources/guild#modify-guild-integration * * @deprecated API v6 is deprecated and the types will not receive further updates, please update to v8. */ export interface RESTPatchAPIGuildIntegrationJSONBody { expire_behavior?: IntegrationExpireBehavior | null | undefined; expire_grace_period?: number | null | undefined; enable_emoticons?: boolean | null | undefined; } /** * @deprecated API v6 is deprecated and the types will not receive further updates, please update to v8. */ export type RESTPatchAPIGuildIntegrationResult = never; /** * https://discord.com/developers/docs/resources/guild#delete-guild-integration * * @deprecated API v6 is deprecated and the types will not receive further updates, please update to v8. */ export type RESTDeleteAPIGuildIntegrationResult = never; /** * https://discord.com/developers/docs/resources/guild#sync-guild-integration * * @deprecated API v6 is deprecated and the types will not receive further updates, please update to v8. */ export type RESTPostAPIGuildIntegrationSyncResult = never; /** * @deprecated Renamed to RESTGetAPIGuildWidgetSettingsResult * @deprecated API v6 is deprecated and the types will not receive further updates, please update to v8. */ export type RESTGetAPIGuildWidgetResult = APIGuildWidgetSettings; /** * https://discord.com/developers/docs/resources/guild#get-guild-widget-settings * * @deprecated API v6 is deprecated and the types will not receive further updates, please update to v8. */ export type RESTGetAPIGuildWidgetSettingsResult = APIGuildWidgetSettings; /** * @deprecated Renamed to RESTPatchAPIGuildWidgetSettingsJSONBody * @deprecated API v6 is deprecated and the types will not receive further updates, please update to v8. */ export type RESTPatchAPIGuildWidgetJSONBody = Partial<APIGuildWidgetSettings>; /** * https://discord.com/developers/docs/resources/guild#modify-guild-widget * * @deprecated API v6 is deprecated and the types will not receive further updates, please update to v8. */ export type RESTPatchAPIGuildWidgetSettingsJSONBody = Partial<APIGuildWidgetSettings>; /** * @deprecated Use `RESTPatchAPIGuildWidgetSettingsResult` instead * @deprecated API v6 is deprecated and the types will not receive further updates, please update to v8. */ export type RESTPatchAPIGuildWidgetResult = APIGuildWidgetSettings; /** * @deprecated API v6 is deprecated and the types will not receive further updates, please update to v8. */ export type RESTPatchAPIGuildWidgetSettingsResult = APIGuildWidgetSettings; /** * https://discord.com/developers/docs/resources/guild#get-guild-vanity-url * * @deprecated API v6 is deprecated and the types will not receive further updates, please update to v8. */ export interface RESTGetAPIGuildVanityUrlResult { code: string | null; uses: number; } /** * https://discord.com/developers/docs/resources/guild#get-guild-widget-image * * @deprecated API v6 is deprecated and the types will not receive further updates, please update to v8. */ export interface RESTGetAPIGuildWidgetImageQuery { style?: GuildWidgetStyle; } /** * Note: while the return type is `ArrayBuffer`, the expected result is * a buffer of sorts (depends if in browser or on node.js/deno). * * @deprecated API v6 is deprecated and the types will not receive further updates, please update to v8. */ export type RESTGetAPIGuildWidgetImageResult = ArrayBuffer; //# sourceMappingURL=guild.d.ts.map node_modules/discord-api-types/rest/v6/index.d.ts 0000664 00000024311 15114741631 0016000 0 ustar 00 export * from '../common'; export * from './auditLog'; export * from './channel'; export * from './emoji'; export * from './gateway'; export * from './guild'; export * from './invite'; export * from './oauth2'; export * from './user'; export * from './voice'; export * from './webhook'; /** * @deprecated API v6 is deprecated and the types will not receive further updates, please update to v8. */ export declare const APIVersion = "6"; /** * @deprecated API v6 is deprecated and the types will not receive further updates, please update to v8. */ export declare const Routes: { /** * Route for: * - GET `/guilds/{guild.id}/audit-logs` */ guildAuditLog(guildID: string): string; /** * Route for: * - GET `/channels/{channel.id}` * - PATCH `/channels/{channel.id}` * - DELETE `/channels/{channel.id}` */ channel(channelID: string): string; /** * Route for: * - GET `/channels/{channel.id}/messages` * - POST `/channels/{channel.id}/messages` */ channelMessages(channelID: string): string; /** * Route for: * - GET `/channels/{channel.id}/messages/{message.id}` * - PATCH `/channels/{channel.id}/messages/{message.id}` * - DELETE `/channels/{channel.id}/messages/{message.id}` */ channelMessage(channelID: string, messageID: string): string; /** * Route for: * - POST `/channels/{channel.id}/messages/{message.id}/crosspost` */ channelCrosspost(channelID: string, messageID: string): string; /** * Route for: * - PUT `/channels/{channel.id}/messages/{message.id}/reactions/{emoji}/@me` * - DELETE `/channels/{channel.id}/messages/{message.id}/reactions/{emoji}/@me` * * **Note**: You need to URL encode the emoji yourself. */ channelMessageOwnReaction(channelID: string, messageID: string, emoji: string): string; /** * Route for: * - DELETE `/channels/{channel.id}/messages/{message.id}/reactions/{emoji}/{user.id}` * * **Note**: You need to URL encode the emoji yourself. */ channelMessageUserReaction(channelID: string, messageID: string, emoji: string, userID: string): string; /** * Route for: * - GET `/channels/{channel.id}/messages/{message.id}/reactions/{emoji}` * - DELETE `/channels/{channel.id}/messages/{message.id}/reactions/{emoji}` * * **Note**: You need to URL encode the emoji yourself. */ channelMessageSpecificReaction(channelID: string, messageID: string, emoji: string): string; /** * Route for: * - DELETE `/channels/{channel.id}/messages/{message.id}/reactions` */ channelMessageAllReactions(channelID: string, messageID: string): string; /** * Route for: * - POST `/channels/{channel.id}/messages/bulk-delete` */ channelBulkDelete(channelID: string): string; /** * Route for: * - PUT `/channels/{channel.id}/permissions/{overwrite.id}` * - DELETE `/channels/{channel.id}/permissions/{overwrite.id}` */ channelPermissions(channelID: string, overwriteID: string): string; /** * Route for: * - GET `/channels/{channel.id}/invites` * - POST `/channels/{channel.id}/invites` */ channelInvite(channelID: string): string; /** * Route for: * - POST `/channels/{channel.id}/followers` */ channelFollowers(channelID: string): string; /** * Route for: * - POST `/channels/{channel.id}/typing` */ channelTyping(channelID: string): string; /** * Route for: * - GET `/channels/{channel.id}/pins` */ channelPins(channelID: string): string; /** * Route for: * - PUT `/channels/{channel.id}/pins/{message.id}` * - DELETE `/channels/{channel.id}/pins/{message.id}` */ channelPin(channelID: string, messageID: string): string; /** * Route for: * - PUT `/channels/{channel.id}/recipients/{user.id}` * - DELETE `/channels/{channel.id}/recipients/{user.id}` */ channelRecipient(channelID: string, userID: string): string; /** * Route for: * - GET `/guilds/{guild.id}/emojis` * - POST `/guilds/{guild.id}/emojis` */ guildEmojis(guildID: string): string; /** * Route for: * - GET `/guilds/{guild.id}/emojis/{emoji.id}` * - PATCH `/guilds/{guild.id}/emojis/{emoji.id}` * - DELETE `/guilds/{guild.id}/emojis/{emoji.id}` */ guildEmoji(guildID: string, emojiID: string): string; /** * Route for: * - POST `/guilds` */ guilds(): string; /** * Route for: * - GET `/guilds/{guild.id}` * - PATCH `/guilds/{guild.id}` * - DELETE `/guilds/{guild.id}` */ guild(guildID: string): string; /** * Route for: * - GET `/guilds/{guild.id}/preview` */ guildPreview(guildID: string): string; /** * Route for: * - GET `/guilds/{guild.id}/channels` * - POST `/guilds/{guild.id}/channels` * - PATCH `/guilds/{guild.id}/channels` */ guildChannels(guildID: string): string; /** * Route for: * - GET `/guilds/{guild.id}/members/{user.id}` * - PUT `/guilds/{guild.id}/members/{user.id}` * - PATCH `/guilds/{guild.id}/members/{user.id}` * - DELETE `/guilds/{guild.id}/members/{user.id}` */ guildMember(guildID: string, userID: string): string; /** * Route for: * - GET `/guilds/{guild.id}/members` */ guildMembers(guildID: string): string; /** * Route for: * - GET `/guilds/{guild.id}/members/search` */ guildMembersSearch(guildID: string): string; /** * Route for: * - PATCH `/guilds/{guild.id}/members/@me/nick` */ guildCurrentMemberNickname(guildID: string): string; /** * Route for: * - PUT `/guilds/{guild.id}/members/{user.id}/roles/{role.id}` * - DELETE `/guilds/{guild.id}/members/{user.id}/roles/{role.id}` */ guildMemberRole(guildID: string, memberID: string, roleID: string): string; /** * Route for: * - GET `/guilds/{guild.id}/bans` */ guildBans(guildID: string): string; /** * Route for: * - GET `/guilds/{guild.id}/bans/{user.id}` * - PUT `/guilds/{guild.id}/bans/{user.id}` * - DELETE `/guilds/{guild.id}/bans/{user.id}` */ guildBan(guildID: string, userID: string): string; /** * Route for: * - GET `/guilds/{guild.id}/roles` * - POST `/guilds/{guild.id}/roles` * - PATCH `/guilds/{guild.id}/roles` */ guildRoles(guildID: string): string; /** * Route for: * - PATCH `/guilds/{guild.id}/roles/{role.id}` * - DELETE `/guilds/{guild.id}/roles/{role.id}` */ guildRole(guildID: string, roleID: string): string; /** * Route for: * - GET `/guilds/{guild.id}/prune` * - POST `/guilds/{guild.id}/prune` */ guildPrune(guildID: string): string; /** * Route for: * - GET `/guilds/{guild.id}/regions` */ guildVoiceRegions(guildID: string): string; /** * Route for: * - GET `/guilds/{guild.id}/invites` */ guildInvites(guildID: string): string; /** * Route for: * - GET `/guilds/{guild.id}/integrations` * - POST `/guilds/{guild.id}/integrations` */ guildIntegrations(guildID: string): string; /** * Route for: * - PATCH `/guilds/{guild.id}/integrations/{integration.id}` * - DELETE `/guilds/{guild.id}/integrations/{integration.id}` */ guildIntegration(guildID: string, integrationID: string): string; /** * Route for: * - POST `/guilds/{guild.id}/integrations/{integration.id}/sync` */ guildIntegrationSync(guildID: string, integrationID: string): string; /** * @deprecated Use `guildWidgetSettings` instead */ guildWidget(guildID: string): string; /** * Route for: * - GET `/guilds/{guild.id}/widget` * - PATCH `/guilds/{guild.id}/widget` */ guildWidgetSettings(guildID: string): string; /** * Route for: * - GET `/guilds/{guild.id}/vanity-url` */ guildVanityUrl(guildID: string): string; /** * Route for: * - GET `/guilds/{guild.id}/widget.png` */ guildWidgetImage(guildID: string): string; /** * Route for: * - GET `/invites/{invite.code}` * - DELETE `/invites/{invite.code}` */ invite(code: string): string; /** * Route for: * - GET `/users/@me` * - GET `/users/{user.id}` * - PATCH `/users/@me` */ user(userID?: string): string; /** * Route for: * - GET `/users/@me/guilds` */ userGuilds(): string; /** * Route for: * - DELETE `/users/@me/guilds/{guild.id}` */ userGuild(guildID: string): string; /** * Route for: * - POST `/users/@me/channels` */ userChannels(): string; /** * Route for: * - GET `/users/@me/connections` */ userConnections(): string; /** * Route for: * - GET `/voice/regions` */ voiceRegions(): string; /** * Route for: * - POST `/channels/{channel.id}/webhooks` * - GET `/channels/{channel.id}/webhooks` */ channelWebhook(channelID: string): string; /** * Route for: * - GET `/guilds/{guild.id}/webhooks` */ guildWebhooks(guildID: string): string; /** * Route for: * - GET `/webhooks/{webhook.id}` * - GET `/webhooks/{webhook.id}/{webhook.token}` * - PATCH `/webhooks/{webhook.id}` * - PATCH `/webhooks/{webhook.id}/{webhook.token}` * - DELETE `/webhooks/{webhook.id}` * - DELETE `/webhooks/{webhook.id}/{webhook.token}` * - POST `/webhooks/{webhook.id}/{webhook.token}` */ webhook(webhookID: string, webhookToken?: string): string; /** * Route for: * - POST `/webhooks/{webhook.id}/{webhook.token}/slack` * - POST `/webhooks/{webhook.id}/{webhook.token}/github` */ webhookPlatform(webhookID: string, webhookToken: string, platform: "github" | "slack"): string; /** * Route for: * - GET `/gateway` */ gateway(): string; /** * Route for: * - GET `/gateway/bot` */ gatewayBot(): string; /** * Route for: * - GET `/oauth2/applications/@me` */ oauth2CurrentApplication(): string; }; //# sourceMappingURL=index.d.ts.map node_modules/discord-api-types/rest/v6/auditLog.js.map 0000664 00000000145 15114741631 0016760 0 ustar 00 {"version":3,"file":"auditLog.js","sourceRoot":"","sources":["auditLog.ts"],"names":[],"mappings":""} node_modules/discord-api-types/rest/v6/gateway.d.ts.map 0000664 00000000407 15114741631 0017106 0 ustar 00 {"version":3,"file":"gateway.d.ts","sourceRoot":"","sources":["gateway.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAEjF;;;;GAIG;AACH,MAAM,MAAM,uBAAuB,GAAG,cAAc,CAAC;AAErD;;;;GAIG;AACH,MAAM,MAAM,0BAA0B,GAAG,iBAAiB,CAAC"} node_modules/discord-api-types/rest/v6/voice.js.map 0000664 00000000137 15114741631 0016316 0 ustar 00 {"version":3,"file":"voice.js","sourceRoot":"","sources":["voice.ts"],"names":[],"mappings":""} node_modules/discord-api-types/rest/v6/user.js 0000664 00000000155 15114741631 0015413 0 ustar 00 "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); //# sourceMappingURL=user.js.map node_modules/discord-api-types/rest/v6/guild.js 0000664 00000000156 15114741631 0015542 0 ustar 00 "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); //# sourceMappingURL=guild.js.map node_modules/discord-api-types/rest/v6/oauth2.js 0000664 00000000157 15114741631 0015641 0 ustar 00 "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); //# sourceMappingURL=oauth2.js.map node_modules/discord-api-types/rest/v6/invite.d.ts.map 0000664 00000000475 15114741631 0016750 0 ustar 00 {"version":3,"file":"invite.d.ts","sourceRoot":"","sources":["invite.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AAEzD;;;;GAIG;AACH,MAAM,WAAW,qBAAqB;IACrC,WAAW,CAAC,EAAE,OAAO,CAAC;CACtB;AAED;;GAEG;AACH,MAAM,MAAM,sBAAsB,GAAG,SAAS,CAAC;AAE/C;;;;GAIG;AACH,MAAM,MAAM,yBAAyB,GAAG,SAAS,CAAC"} node_modules/discord-api-types/rest/v6/auditLog.d.ts 0000664 00000001151 15114741631 0016436 0 ustar 00 import type { APIAuditLog, AuditLogEvent } from '../../payloads/v6/auditLog'; /** * https://discord.com/developers/docs/resources/audit-log#get-guild-audit-log * * @deprecated API v6 is deprecated and the types will not receive further updates, please update to v8. */ export interface RESTGetAPIAuditLogQuery { user_id?: string; action_type?: AuditLogEvent; before?: string; limit?: number; } /** * @deprecated API v6 is deprecated and the types will not receive further updates, please update to v8. */ export type RESTGetAPIAuditLogResult = APIAuditLog; //# sourceMappingURL=auditLog.d.ts.map node_modules/discord-api-types/rest/v6/auditLog.d.ts.map 0000664 00000000564 15114741631 0017221 0 ustar 00 {"version":3,"file":"auditLog.d.ts","sourceRoot":"","sources":["auditLog.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAE7E;;;;GAIG;AACH,MAAM,WAAW,uBAAuB;IACvC,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,WAAW,CAAC,EAAE,aAAa,CAAC;IAC5B,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;CACf;AAED;;GAEG;AACH,MAAM,MAAM,wBAAwB,GAAG,WAAW,CAAC"} node_modules/discord-api-types/rest/v6/webhook.d.ts.map 0000664 00000003526 15114741631 0017110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KAAK,CAAC;AAExD;;;;GAIG;AACH,MAAM,WAAW,mCAAmC;IACnD,OAAO,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC7B,QAAQ,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC9B,UAAU,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAChC,GAAG,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IAC1B,MAAM,CAAC,EAAE,QAAQ,EAAE,GAAG,SAAS,CAAC;IAChC,gBAAgB,CAAC,EAAE,sBAAsB,GAAG,SAAS,CAAC;CACtD;AAED;;;;GAIG;AACH,MAAM,MAAM,uCAAuC,GAChD;IACA;;OAEG;IACH,YAAY,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAClC;;OAEG;IACH,IAAI,EAAE,OAAO,CAAC;CACb,GACD,CAAC,mCAAmC,GAAG;IACvC;;OAEG;IACH,IAAI,EAAE,OAAO,CAAC;CACb,CAAC,CAAC;AAEN;;;;GAIG;AACH,MAAM,WAAW,gCAAgC;IAChD,IAAI,CAAC,EAAE,OAAO,CAAC;CACf;AAED;;GAEG;AACH,MAAM,MAAM,iCAAiC,GAAG,KAAK,CAAC;AAEtD;;;;;;GAMG;AACH,MAAM,MAAM,qCAAqC,GAAG,UAAU,CAAC;AAE/D;;;;GAIG;AACH,MAAM,MAAM,qCAAqC,GAAG,gCAAgC,CAAC;AAErF;;;;GAIG;AACH,MAAM,MAAM,sCAAsC,GAAG,gCAAgC,CAAC"} node_modules/discord-api-types/rest/v6/gateway.js.map 0000664 00000000143 15114741631 0016647 0 ustar 00 {"version":3,"file":"gateway.js","sourceRoot":"","sources":["gateway.ts"],"names":[],"mappings":""} node_modules/discord-api-types/rest/v6/index.mjs 0000664 00000000431 15114741631 0015716 0 ustar 00 import mod from "./index.js"; export default mod; export const APIVersion = mod.APIVersion; export const AllowedMentionsTypes = mod.AllowedMentionsTypes; export const Locale = mod.Locale; export const RESTJSONErrorCodes = mod.RESTJSONErrorCodes; export const Routes = mod.Routes; node_modules/discord-api-types/rest/v6/invite.js.map 0000664 00000000141 15114741631 0016502 0 ustar 00 {"version":3,"file":"invite.js","sourceRoot":"","sources":["invite.ts"],"names":[],"mappings":""} node_modules/discord-api-types/rest/v6/index.js.map 0000664 00000013037 15114741631 0016323 0 ustar 00 {"version":3,"file":"index.js","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,qDAA0D;AAE1D,4CAA0B;AAE1B,6CAA2B;AAC3B,4CAA0B;AAC1B,0CAAwB;AACxB,4CAA0B;AAC1B,0CAAwB;AACxB,2CAAyB;AACzB,2CAAyB;AACzB,yCAAuB;AACvB,0CAAwB;AACxB,4CAA0B;AAE1B;;GAEG;AACU,QAAA,UAAU,GAAG,GAAG,CAAC;AAE9B;;GAEG;AACU,QAAA,MAAM,GAAG;IACrB;;;OAGG;IACH,aAAa,CAAC,OAAe;QAC5B,OAAO,WAAW,OAAO,aAAa,CAAC;IACxC,CAAC;IAED;;;;;OAKG;IACH,OAAO,CAAC,SAAiB;QACxB,OAAO,aAAa,SAAS,EAAE,CAAC;IACjC,CAAC;IAED;;;;OAIG;IACH,eAAe,CAAC,SAAiB;QAChC,OAAO,aAAa,SAAS,WAAW,CAAC;IAC1C,CAAC;IAED;;;;;OAKG;IACH,cAAc,CAAC,SAAiB,EAAE,SAAiB;QAClD,OAAO,aAAa,SAAS,aAAa,SAAS,EAAE,CAAC;IACvD,CAAC;IAED;;;OAGG;IACH,gBAAgB,CAAC,SAAiB,EAAE,SAAiB;QACpD,OAAO,aAAa,SAAS,YAAY,SAAS,YAAY,CAAC;IAChE,CAAC;IAED;;;;;;OAMG;IACH,yBAAyB,CAAC,SAAiB,EAAE,SAAiB,EAAE,KAAa;QAC5E,OAAO,aAAa,SAAS,aAAa,SAAS,cAAc,KAAK,MAAM,CAAC;IAC9E,CAAC;IAED;;;;;OAKG;IACH,0BAA0B,CAAC,SAAiB,EAAE,SAAiB,EAAE,KAAa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AC,GAAG,IAA+C,EAAE,EAAE;QACpE,MAAM,OAAO,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE;YAChC,IAAI,GAAG,EAAE,CAAC;gBACT,2BAA2B;gBAC3B,IAAI,6BAAiB,CAAC,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC;oBACzC,OAAO,GAAG,CAAC;gBACZ,CAAC;gBAED,OAAO,kBAAkB,CAAC,GAAG,CAAC,CAAC;YAChC,CAAC;YAED,OAAO,GAAG,CAAC;QACZ,CAAC,CAAC,CAAC;QACH,2CAA2C;QAC3C,OAAO,EAAE,CAAC,IAAI,CAAC,IAAI,EAAE,GAAG,OAAO,CAAC,CAAC;IAClC,CAAC,CAAC;AACH,CAAC;AAED,2CAA2C;AAC3C,MAAM,CAAC,MAAM,CAAC,cAAM,CAAC,CAAC"} node_modules/discord-api-types/rest/v6/voice.d.ts 0000664 00000000531 15114741631 0015774 0 ustar 00 import type { APIVoiceRegion } from '../../payloads/v6/index'; /** * https://discord.com/developers/docs/resources/voice#list-voice-regions * * @deprecated API v6 is deprecated and the types will not receive further updates, please update to v8. */ export type GetAPIVoiceRegionsResult = APIVoiceRegion[]; //# sourceMappingURL=voice.d.ts.map node_modules/discord-api-types/rest/v6/invite.d.ts 0000664 00000001351 15114741631 0016166 0 ustar 00 import type { APIInvite } from '../../payloads/v6/index'; /** * https://discord.com/developers/docs/resources/invite#get-invite * * @deprecated API v6 is deprecated and the types will not receive further updates, please update to v8. */ export interface RESTGetAPIInviteQuery { with_counts?: boolean; } /** * @deprecated API v6 is deprecated and the types will not receive further updates, please update to v8. */ export type RESTGetAPIInviteResult = APIInvite; /** * https://discord.com/developers/docs/resources/invite#delete-invite * * @deprecated API v6 is deprecated and the types will not receive further updates, please update to v8. */ export type RESTDeleteAPIInviteResult = APIInvite; //# sourceMappingURL=invite.d.ts.map node_modules/discord-api-types/rest/v6/user.d.ts 0000664 00000005561 15114741631 0015655 0 ustar 00 import type { APIChannel, APIConnection, APIUser, GuildFeature } from '../../payloads/v6/index'; /** * https://discord.com/developers/docs/resources/user#get-current-user * * @deprecated API v6 is deprecated and the types will not receive further updates, please update to v8. */ export type RESTGetAPICurrentUserResult = APIUser; /** * https://discord.com/developers/docs/resources/user#get-user * * @deprecated API v6 is deprecated and the types will not receive further updates, please update to v8. */ export type RESTGetAPIUserResult = APIUser; /** * https://discord.com/developers/docs/resources/user#modify-current-user * * @deprecated API v6 is deprecated and the types will not receive further updates, please update to v8. */ export interface RESTPatchAPICurrentUserJSONBody { username?: string | undefined; avatar?: string | null | undefined; } /** * @deprecated API v6 is deprecated and the types will not receive further updates, please update to v8. */ export type RESTPatchAPICurrentUserResult = APIUser; /** * https://discord.com/developers/docs/resources/user#get-current-user-guilds * * @deprecated API v6 is deprecated and the types will not receive further updates, please update to v8. */ export interface RESTGetAPICurrentUserGuildsQuery { before?: string; after?: string; limit?: number; } /** * @deprecated API v6 is deprecated and the types will not receive further updates, please update to v8. */ export interface RESTAPIPartialCurrentUserGuild { id: string; name: string; icon: string | null; owner: boolean; features: GuildFeature[]; /** * @deprecated Use `permissions_new` instead */ permissions: number; permissions_new: string; } /** * @deprecated API v6 is deprecated and the types will not receive further updates, please update to v8. */ export type RESTGetAPICurrentUserGuildsResult = RESTAPIPartialCurrentUserGuild[]; /** * https://discord.com/developers/docs/resources/user#leave-guild * * @deprecated API v6 is deprecated and the types will not receive further updates, please update to v8. */ export type RESTDeleteAPICurrentUserGuildResult = never; /** * https://discord.com/developers/docs/resources/user#create-dm * * @deprecated API v6 is deprecated and the types will not receive further updates, please update to v8. */ export interface RESTPostAPICurrentUserCreateDMChannelJSONBody { recipient_id: string; } /** * @deprecated API v6 is deprecated and the types will not receive further updates, please update to v8. */ export type RESTPostAPICurrentUserCreateDMChannelResult = APIChannel; /** * https://discord.com/developers/docs/resources/user#get-user-connections * * @deprecated API v6 is deprecated and the types will not receive further updates, please update to v8. */ export type RESTGetAPICurrentUserConnectionsResult = APIConnection[]; //# sourceMappingURL=user.d.ts.map node_modules/discord-api-types/rest/v6/index.js 0000664 00000034120 15114741631 0015543 0 ustar 00 "use strict"; var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { if (k2 === undefined) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { return m[k]; } }; } Object.defineProperty(o, k2, desc); }) : (function(o, m, k, k2) { if (k2 === undefined) k2 = k; o[k2] = m[k]; })); var __exportStar = (this && this.__exportStar) || function(m, exports) { for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); }; Object.defineProperty(exports, "__esModule", { value: true }); exports.Routes = exports.APIVersion = void 0; const internals_1 = require("../../utils/internals"); __exportStar(require("../common"), exports); __exportStar(require("./auditLog"), exports); __exportStar(require("./channel"), exports); __exportStar(require("./emoji"), exports); __exportStar(require("./gateway"), exports); __exportStar(require("./guild"), exports); __exportStar(require("./invite"), exports); __exportStar(require("./oauth2"), exports); __exportStar(require("./user"), exports); __exportStar(require("./voice"), exports); __exportStar(require("./webhook"), exports); /** * @deprecated API v6 is deprecated and the types will not receive further updates, please update to v8. */ exports.APIVersion = '6'; /** * @deprecated API v6 is deprecated and the types will not receive further updates, please update to v8. */ exports.Routes = { /** * Route for: * - GET `/guilds/{guild.id}/audit-logs` */ guildAuditLog(guildID) { return `/guilds/${guildID}/audit-logs`; }, /** * Route for: * - GET `/channels/{channel.id}` * - PATCH `/channels/{channel.id}` * - DELETE `/channels/{channel.id}` */ channel(channelID) { return `/channels/${channelID}`; }, /** * Route for: * - GET `/channels/{channel.id}/messages` * - POST `/channels/{channel.id}/messages` */ channelMessages(channelID) { return `/channels/${channelID}/messages`; }, /** * Route for: * - GET `/channels/{channel.id}/messages/{message.id}` * - PATCH `/channels/{channel.id}/messages/{message.id}` * - DELETE `/channels/{channel.id}/messages/{message.id}` */ channelMessage(channelID, messageID) { return `/channels/${channelID}/messages/${messageID}`; }, /** * Route for: * - POST `/channels/{channel.id}/messages/{message.id}/crosspost` */ channelCrosspost(channelID, messageID) { return `/channels/${channelID}/message/${messageID}/crosspost`; }, /** * Route for: * - PUT `/channels/{channel.id}/messages/{message.id}/reactions/{emoji}/@me` * - DELETE `/channels/{channel.id}/messages/{message.id}/reactions/{emoji}/@me` * * **Note**: You need to URL encode the emoji yourself. */ channelMessageOwnReaction(channelID, messageID, emoji) { return `/channels/${channelID}/messages/${messageID}/reactions/${emoji}/@me`; }, /** * Route for: * - DELETE `/channels/{channel.id}/messages/{message.id}/reactions/{emoji}/{user.id}` * * **Note**: You need to URL encode the emoji yourself. */ channelMessageUserReaction(channelID, messageID, emoji, userID) { return `/channels/${channelID}/messages/${messageID}/reactions/${emoji}/${userID}`; }, /** * Route for: * - GET `/channels/{channel.id}/messages/{message.id}/reactions/{emoji}` * - DELETE `/channels/{channel.id}/messages/{message.id}/reactions/{emoji}` * * **Note**: You need to URL encode the emoji yourself. */ channelMessageSpecificReaction(channelID, messageID, emoji) { return `/channels/${channelID}/messages/${messageID}/reactions/${emoji}`; }, /** * Route for: * - DELETE `/channels/{channel.id}/messages/{message.id}/reactions` */ channelMessageAllReactions(channelID, messageID) { return `/channels/${channelID}/messages/${messageID}`; }, /** * Route for: * - POST `/channels/{channel.id}/messages/bulk-delete` */ channelBulkDelete(channelID) { return `/channels/${channelID}/bulk-delete`; }, /** * Route for: * - PUT `/channels/{channel.id}/permissions/{overwrite.id}` * - DELETE `/channels/{channel.id}/permissions/{overwrite.id}` */ channelPermissions(channelID, overwriteID) { return `/channels/${channelID}/permissions/${overwriteID}`; }, /** * Route for: * - GET `/channels/{channel.id}/invites` * - POST `/channels/{channel.id}/invites` */ channelInvite(channelID) { return `/channels/${channelID}`; }, /** * Route for: * - POST `/channels/{channel.id}/followers` */ channelFollowers(channelID) { return `/channels/${channelID}/followers`; }, /** * Route for: * - POST `/channels/{channel.id}/typing` */ channelTyping(channelID) { return `/channels/${channelID}/typing`; }, /** * Route for: * - GET `/channels/{channel.id}/pins` */ channelPins(channelID) { return `/channels/${channelID}/pins`; }, /** * Route for: * - PUT `/channels/{channel.id}/pins/{message.id}` * - DELETE `/channels/{channel.id}/pins/{message.id}` */ channelPin(channelID, messageID) { return `/channels/${channelID}/pins/${messageID}`; }, /** * Route for: * - PUT `/channels/{channel.id}/recipients/{user.id}` * - DELETE `/channels/{channel.id}/recipients/{user.id}` */ channelRecipient(channelID, userID) { return `/channels/${channelID}/recipients/${userID}`; }, /** * Route for: * - GET `/guilds/{guild.id}/emojis` * - POST `/guilds/{guild.id}/emojis` */ guildEmojis(guildID) { return `/guilds/${guildID}/emojis`; }, /** * Route for: * - GET `/guilds/{guild.id}/emojis/{emoji.id}` * - PATCH `/guilds/{guild.id}/emojis/{emoji.id}` * - DELETE `/guilds/{guild.id}/emojis/{emoji.id}` */ guildEmoji(guildID, emojiID) { return `/guilds/${guildID}/emojis/${emojiID}`; }, /** * Route for: * - POST `/guilds` */ guilds() { return '/guilds'; }, /** * Route for: * - GET `/guilds/{guild.id}` * - PATCH `/guilds/{guild.id}` * - DELETE `/guilds/{guild.id}` */ guild(guildID) { return `/guilds/${guildID}`; }, /** * Route for: * - GET `/guilds/{guild.id}/preview` */ guildPreview(guildID) { return `/guilds/${guildID}/preview`; }, /** * Route for: * - GET `/guilds/{guild.id}/channels` * - POST `/guilds/{guild.id}/channels` * - PATCH `/guilds/{guild.id}/channels` */ guildChannels(guildID) { return `/guilds/${guildID}/channels`; }, /** * Route for: * - GET `/guilds/{guild.id}/members/{user.id}` * - PUT `/guilds/{guild.id}/members/{user.id}` * - PATCH `/guilds/{guild.id}/members/{user.id}` * - DELETE `/guilds/{guild.id}/members/{user.id}` */ guildMember(guildID, userID) { return `/guilds/${guildID}/members/${userID}`; }, /** * Route for: * - GET `/guilds/{guild.id}/members` */ guildMembers(guildID) { return `/guilds/${guildID}/members`; }, /** * Route for: * - GET `/guilds/{guild.id}/members/search` */ guildMembersSearch(guildID) { return `/guilds/${guildID}/members/search`; }, /** * Route for: * - PATCH `/guilds/{guild.id}/members/@me/nick` */ guildCurrentMemberNickname(guildID) { return `/guilds/${guildID}/members/@me/nick`; }, /** * Route for: * - PUT `/guilds/{guild.id}/members/{user.id}/roles/{role.id}` * - DELETE `/guilds/{guild.id}/members/{user.id}/roles/{role.id}` */ guildMemberRole(guildID, memberID, roleID) { return `/guilds/${guildID}/members/${memberID}/roles/${roleID}`; }, /** * Route for: * - GET `/guilds/{guild.id}/bans` */ guildBans(guildID) { return `/guilds/${guildID}/bans`; }, /** * Route for: * - GET `/guilds/{guild.id}/bans/{user.id}` * - PUT `/guilds/{guild.id}/bans/{user.id}` * - DELETE `/guilds/{guild.id}/bans/{user.id}` */ guildBan(guildID, userID) { return `/guilds/${guildID}/bans/${userID}`; }, /** * Route for: * - GET `/guilds/{guild.id}/roles` * - POST `/guilds/{guild.id}/roles` * - PATCH `/guilds/{guild.id}/roles` */ guildRoles(guildID) { return `/guilds/${guildID}/roles`; }, /** * Route for: * - PATCH `/guilds/{guild.id}/roles/{role.id}` * - DELETE `/guilds/{guild.id}/roles/{role.id}` */ guildRole(guildID, roleID) { return `/guilds/${guildID}/roles/${roleID}`; }, /** * Route for: * - GET `/guilds/{guild.id}/prune` * - POST `/guilds/{guild.id}/prune` */ guildPrune(guildID) { return `/guilds/${guildID}/prune`; }, /** * Route for: * - GET `/guilds/{guild.id}/regions` */ guildVoiceRegions(guildID) { return `/guilds/${guildID}/regions`; }, /** * Route for: * - GET `/guilds/{guild.id}/invites` */ guildInvites(guildID) { return `/guilds/${guildID}/invites`; }, /** * Route for: * - GET `/guilds/{guild.id}/integrations` * - POST `/guilds/{guild.id}/integrations` */ guildIntegrations(guildID) { return `/guilds/${guildID}/integrations`; }, /** * Route for: * - PATCH `/guilds/{guild.id}/integrations/{integration.id}` * - DELETE `/guilds/{guild.id}/integrations/{integration.id}` */ guildIntegration(guildID, integrationID) { return `/guilds/${guildID}/integrations/${integrationID}`; }, /** * Route for: * - POST `/guilds/{guild.id}/integrations/{integration.id}/sync` */ guildIntegrationSync(guildID, integrationID) { return `/guilds/${guildID}/integrations/${integrationID}/sync`; }, /** * @deprecated Use `guildWidgetSettings` instead */ guildWidget(guildID) { return `/guilds/${guildID}/widget`; }, /** * Route for: * - GET `/guilds/{guild.id}/widget` * - PATCH `/guilds/{guild.id}/widget` */ guildWidgetSettings(guildID) { return `/guilds/${guildID}/widget`; }, /** * Route for: * - GET `/guilds/{guild.id}/vanity-url` */ guildVanityUrl(guildID) { return `/guilds/${guildID}/vanity-url`; }, /** * Route for: * - GET `/guilds/{guild.id}/widget.png` */ guildWidgetImage(guildID) { return `/guilds/${guildID}/widget.png`; }, /** * Route for: * - GET `/invites/{invite.code}` * - DELETE `/invites/{invite.code}` */ invite(code) { return `/invites/${code}`; }, /** * Route for: * - GET `/users/@me` * - GET `/users/{user.id}` * - PATCH `/users/@me` */ user(userID = '@me') { return `/users/${userID}`; }, /** * Route for: * - GET `/users/@me/guilds` */ userGuilds() { return `/users/@me/guilds`; }, /** * Route for: * - DELETE `/users/@me/guilds/{guild.id}` */ userGuild(guildID) { return `/users/@me/guilds/${guildID}`; }, /** * Route for: * - POST `/users/@me/channels` */ userChannels() { return `/users/@me/channels`; }, /** * Route for: * - GET `/users/@me/connections` */ userConnections() { return `/users/@me/connections`; }, /** * Route for: * - GET `/voice/regions` */ voiceRegions() { return `/voice/regions`; }, /** * Route for: * - POST `/channels/{channel.id}/webhooks` * - GET `/channels/{channel.id}/webhooks` */ channelWebhook(channelID) { return `/channels/${channelID}/webhooks`; }, /** * Route for: * - GET `/guilds/{guild.id}/webhooks` */ guildWebhooks(guildID) { return `/guilds/${guildID}/webhooks`; }, /** * Route for: * - GET `/webhooks/{webhook.id}` * - GET `/webhooks/{webhook.id}/{webhook.token}` * - PATCH `/webhooks/{webhook.id}` * - PATCH `/webhooks/{webhook.id}/{webhook.token}` * - DELETE `/webhooks/{webhook.id}` * - DELETE `/webhooks/{webhook.id}/{webhook.token}` * - POST `/webhooks/{webhook.id}/{webhook.token}` */ webhook(webhookID, webhookToken) { const parts = ['', 'webhooks', webhookID]; if (webhookToken) parts.push(webhookToken); return parts.join('/'); }, /** * Route for: * - POST `/webhooks/{webhook.id}/{webhook.token}/slack` * - POST `/webhooks/{webhook.id}/{webhook.token}/github` */ webhookPlatform(webhookID, webhookToken, platform) { return `/${webhookID}/${webhookToken}/${platform}`; }, /** * Route for: * - GET `/gateway` */ gateway() { return `/gateway`; }, /** * Route for: * - GET `/gateway/bot` */ gatewayBot() { return `/gateway/bot`; }, /** * Route for: * - GET `/oauth2/applications/@me` */ oauth2CurrentApplication() { return `/oauth2/applications/@me`; }, }; for (const [key, fn] of Object.entries(exports.Routes)) { exports.Routes[key] = (...args) => { const escaped = args.map((arg) => { if (arg) { // Skip already "safe" urls if (internals_1.urlSafeCharacters.test(String(arg))) { return arg; } return encodeURIComponent(arg); } return arg; }); // eslint-disable-next-line no-useless-call return fn.call(null, ...escaped); }; } // Freeze the object so it can't be changed Object.freeze(exports.Routes); //# sourceMappingURL=index.js.map node_modules/discord-api-types/rest/v6/voice.d.ts.map 0000664 00000000307 15114741631 0016551 0 ustar 00 {"version":3,"file":"voice.d.ts","sourceRoot":"","sources":["voice.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAE9D;;;;GAIG;AACH,MAAM,MAAM,wBAAwB,GAAG,cAAc,EAAE,CAAC"} node_modules/discord-api-types/rest/v6/emoji.d.ts.map 0000664 00000001255 15114741631 0016552 0 ustar 00 {"version":3,"file":"emoji.d.ts","sourceRoot":"","sources":["emoji.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAC;AAExD;;;;GAIG;AACH,MAAM,MAAM,2BAA2B,GAAG,QAAQ,EAAE,CAAC;AAErD;;;;GAIG;AACH,MAAM,MAAM,0BAA0B,GAAG,QAAQ,CAAC;AAElD;;;;GAIG;AACH,MAAM,WAAW,6BAA6B;IAC7C,IAAI,EAAE,MAAM,CAAC;IACb;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,EAAE,GAAG,SAAS,CAAC;CAC7B;AAED;;GAEG;AACH,MAAM,MAAM,2BAA2B,GAAG,QAAQ,CAAC;AAEnD;;;;GAIG;AACH,MAAM,WAAW,8BAA8B;IAC9C,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC1B,KAAK,CAAC,EAAE,MAAM,EAAE,GAAG,IAAI,GAAG,SAAS,CAAC;CACpC;AAED;;GAEG;AACH,MAAM,MAAM,4BAA4B,GAAG,QAAQ,CAAC;AAEpD;;;;GAIG;AACH,MAAM,MAAM,6BAA6B,GAAG,KAAK,CAAC"} node_modules/discord-api-types/rest/v6/webhook.js.map 0000664 00000000143 15114741631 0016644 0 ustar 00 {"version":3,"file":"webhook.js","sourceRoot":"","sources":["webhook.ts"],"names":[],"mappings":""} node_modules/discord-api-types/rest/v6/oauth2.d.ts.map 0000664 00000005223 15114741631 0016650 0 ustar 00 {"version":3,"file":"oauth2.d.ts","sourceRoot":"","sources":["oauth2.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAEpF;;;;GAIG;AACH,MAAM,MAAM,wCAAwC,GAAG,cAAc,CAAC;AAEtE;;;;GAIG;AACH,MAAM,WAAW,4BAA4B;IAC5C,aAAa,EAAE,MAAM,CAAC;IACtB,SAAS,EAAE,MAAM,CAAC;IAClB,KAAK,EAAE,MAAM,CAAC;IACd,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,SAAS,GAAG,MAAM,CAAC;CAC5B;AAED;;;;GAIG;AACH,MAAM,WAAW,kCAAkC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AAE,MAAM,CAAC;IACd,OAAO,EAAE,UAAU,CAAC;CACpB;AAED;;GAEG;AACH,MAAM,MAAM,sEAAsE,GACjF,oDAAoD,GACnD,6DAA6D,CAAC"} node_modules/discord-api-types/rest/v6/channel.d.ts.map 0000664 00000010412 15114741631 0017052 0 ustar 00 {"version":3,"file":"channel.d.ts","sourceRoot":"","sources":["channel.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACX,UAAU,EACV,QAAQ,EACR,kBAAkB,EAClB,SAAS,EACT,UAAU,EACV,mBAAmB,EACnB,YAAY,EACZ,OAAO,EACP,WAAW,EACX,oBAAoB,EACpB,YAAY,EACZ,aAAa,EACb,MAAM,yBAAyB,CAAC;AAIjC;;;;GAIG;AACH,MAAM,WAAW,gBAAgB;IAChC,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,aAAa,CAAC;IACpB,KAAK,EAAE,MAAM,GAAG,MAAM,CAAC;IACvB,IAAI,EAAE,MAAM,GAAG,MAAM,CAAC;CACtB;AAED;;;;GAIG;AACH,oBAAY,oBAAoB;IAC/B,QAAQ,aAAa;IACrB,IAAI,UAAU;IACd,IAAI,UAAU;CACd;AAED;;;;GAIG;AACH,MAAM,WAAW,sBAAsB;IACtC,KAAK,CAAC,EAAE,oBAAoB,EAAE,CAAC;IAC/B,KAAK,CAAC,EAAE,MAAM,EAAE,CAAC;IACjB,KAAK,CAAC,EAAE,MAAM,EAAE,CAAC;CACjB;AAID;;;;GAIG;AACH,MAAM,WAAW,2BAA2B;IAC3C,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC1B,IAAI,CAAC,EAAE,WAAW,CAAC,UAAU,GAAG,WAAW,CAAC,UAAU,GAAG,SAAS,CAAC;IACnE,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;IACrC,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;IAClC,IAAI,CAAC,EAAE,OAAO,GAAG,I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B;AAED;;GAEG;AACH,MAAM,MAAM,gCAAgC,GAAG,OAAO,CAAC;AAEvD;;GAEG;AACH,MAAM,MAAM,mCAAmC,GAAG,OAAO,CAAC;AAI1D;;GAEG;AACH,MAAM,MAAM,wCAAwC,GAAG,UAAU,CAAC;AAElE;;GAEG;AACH,MAAM,WAAW,mCAAmC;IACnD,kBAAkB,EAAE,MAAM,CAAC;CAC3B;AAED;;GAEG;AACH,MAAM,MAAM,iCAAiC,GAAG,kBAAkB,CAAC"} node_modules/discord-api-types/rest/v6/invite.js 0000664 00000000157 15114741631 0015735 0 ustar 00 "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); //# sourceMappingURL=invite.js.map node_modules/discord-api-types/rest/v6/channel.d.ts 0000664 00000023734 15114741631 0016311 0 ustar 00 import type { APIChannel, APIEmbed, APIFollowedChannel, APIInvite, APIMessage, APIMessageReference, APIOverwrite, APIUser, ChannelType, InviteTargetUserType, MessageFlags, OverwriteType } from '../../payloads/v6/index'; /** * https://discord.com/developers/docs/resources/channel#overwrite-object-overwrite-structure * * @deprecated API v6 is deprecated and the types will not receive further updates, please update to v8. */ export interface APIOverwriteSend { id: string; type: OverwriteType; allow: number | string; deny: number | string; } /** * https://discord.com/developers/docs/resources/channel#allowed-mentions-object-allowed-mention-types * * @deprecated API v6 is deprecated and the types will not receive further updates, please update to v8. */ export declare enum AllowedMentionsTypes { Everyone = "everyone", Role = "roles", User = "users" } /** * https://discord.com/developers/docs/resources/channel#allowed-mentions-object-allowed-mentions-structure * * @deprecated API v6 is deprecated and the types will not receive further updates, please update to v8. */ export interface APIAllowedMentionsSend { parse?: AllowedMentionsTypes[]; roles?: string[]; users?: string[]; } /** * https://discord.com/developers/docs/resources/channel#modify-channel * * @deprecated API v6 is deprecated and the types will not receive further updates, please update to v8. */ export interface RESTPatchAPIChannelJSONBody { name?: string | undefined; type?: ChannelType.GUILD_NEWS | ChannelType.GUILD_TEXT | undefined; position?: number | null | undefined; topic?: string | null | undefined; nsfw?: boolean | null | undefined; rate_limit_per_user?: number | null | undefined; user_limit?: number | null | undefined; permission_overwrites?: APIOverwrite[] | null | undefined; parent_id?: string | null | undefined; } /** * @deprecated API v6 is deprecated and the types will not receive further updates, please update to v8. */ export type RESTGetAPIChannelResult = APIChannel; /** * @deprecated API v6 is deprecated and the types will not receive further updates, please update to v8. */ export type RESTPatchAPIChannelResult = APIChannel; /** * @deprecated API v6 is deprecated and the types will not receive further updates, please update to v8. */ export type RESTDeleteAPIChannelResult = APIChannel; /** * https://discord.com/developers/docs/resources/channel#get-channel-messages * * @deprecated API v6 is deprecated and the types will not receive further updates, please update to v8. */ export interface RESTGetAPIChannelMessagesQuery { around?: string; before?: string; after?: string; limit?: number; } /** * @deprecated API v6 is deprecated and the types will not receive further updates, please update to v8. */ export type RESTGetAPIChannelMessagesResult = APIMessage[]; /** * https://discord.com/developers/docs/resources/channel#create-message * * @deprecated API v6 is deprecated and the types will not receive further updates, please update to v8. */ export interface RESTPostAPIChannelMessageJSONBody { content?: string | undefined; nonce?: number | string | undefined; tts?: boolean | undefined; embed?: APIEmbed | undefined; allowed_mentions?: APIAllowedMentionsSend | undefined; message_reference?: APIMessageReference | undefined; } /** * https://discord.com/developers/docs/resources/channel#create-message * * @deprecated API v6 is deprecated and the types will not receive further updates, please update to v8. */ export type RESTPostAPIChannelMessageFormDataBody = { /** * JSON stringified message body */ payload_json?: string | undefined; /** * The file contents */ file: unknown; } | { content?: string | undefined; nonce?: number | string | undefined; tts?: boolean | undefined; embed?: APIEmbed | undefined; allowed_mentions?: APIAllowedMentionsSend | undefined; message_reference?: APIMessageReference | undefined; /** * The file contents */ file: unknown; }; /** * https://discord.com/developers/docs/resources/channel#edit-message * * @deprecated API v6 is deprecated and the types will not receive further updates, please update to v8. */ export interface RESTPatchAPIChannelMessageJSONBody { content?: string | null | undefined; embed?: APIEmbed | null | undefined; allowed_mentions?: APIAllowedMentionsSend | null | undefined; flags?: MessageFlags | null | undefined; } /** * @deprecated API v6 is deprecated and the types will not receive further updates, please update to v8. */ export type RESTGetAPIChannelMessageResult = APIMessage; /** * @deprecated API v6 is deprecated and the types will not receive further updates, please update to v8. */ export type RESTPostAPIChannelMessageResult = APIMessage; /** * @deprecated API v6 is deprecated and the types will not receive further updates, please update to v8. */ export type RESTPatchAPIChannelMessageResult = APIMessage; /** * @deprecated API v6 is deprecated and the types will not receive further updates, please update to v8. */ export type RESTDeleteAPIChannelMessageResult = never; /** * https://discord.com/developers/docs/resources/channel#get-reactions * * @deprecated API v6 is deprecated and the types will not receive further updates, please update to v8. */ export interface RESTGetAPIChannelMessageReactionsQuery { before?: string; after?: string; limit?: number; } /** * @deprecated API v6 is deprecated and the types will not receive further updates, please update to v8. */ export type RESTGetAPIChannelMessageReactionsResult = APIUser[]; /** * @deprecated API v6 is deprecated and the types will not receive further updates, please update to v8. */ export type RESTPutAPIChannelMessageReactionResult = never; /** * @deprecated API v6 is deprecated and the types will not receive further updates, please update to v8. */ export type RESTDeleteAPIChannelMessageReactionResult = never; /** * @deprecated API v6 is deprecated and the types will not receive further updates, please update to v8. */ export type RESTDeleteAPIChannelAllMessageReactionsResult = never; /** * https://discord.com/developers/docs/resources/channel#bulk-delete-messages * * @deprecated API v6 is deprecated and the types will not receive further updates, please update to v8. */ export interface RESTPostAPIChannelMessagesBulkDeleteJSONBody { messages: string[]; } /** * @deprecated API v6 is deprecated and the types will not receive further updates, please update to v8. */ export type RESTPostAPIChannelMessagesBulkDeleteResult = never; /** * https://discord.com/developers/docs/resources/channel#edit-channel-permissions * * @deprecated API v6 is deprecated and the types will not receive further updates, please update to v8. */ export interface RESTPutAPIChannelPermissionsJSONBody { allow: number | string; deny: number | string; type: OverwriteType; } /** * @deprecated API v6 is deprecated and the types will not receive further updates, please update to v8. */ export type RESTPutAPIChannelPermissionsResult = never; /** * @deprecated API v6 is deprecated and the types will not receive further updates, please update to v8. */ export type RESTDeleteAPIChannelPermissionsResult = never; /** * https://discord.com/developers/docs/resources/channel#get-channel-invites * * @deprecated API v6 is deprecated and the types will not receive further updates, please update to v8. */ export type RESTGetAPIChannelInvitesResult = APIInvite[]; /** * @deprecated API v6 is deprecated and the types will not receive further updates, please update to v8. */ export interface RESTPostAPIChannelInviteJSONBody { max_age?: number | undefined; max_uses?: number | undefined; temporary?: boolean | undefined; unique?: boolean | undefined; target_user_id?: string | undefined; target_user_type?: InviteTargetUserType | undefined; } /** * https://discord.com/developers/docs/resources/channel#trigger-typing-indicator * * @deprecated API v6 is deprecated and the types will not receive further updates, please update to v8. */ export type RESTPostAPIChannelTypingResult = never; /** * https://discord.com/developers/docs/resources/channel#get-pinned-messages * * @deprecated API v6 is deprecated and the types will not receive further updates, please update to v8. */ export type RESTGetAPIChannelPinsResult = APIMessage[]; /** * https://discord.com/developers/docs/resources/channel#add-pinned-channel-message * * @deprecated API v6 is deprecated and the types will not receive further updates, please update to v8. */ export type RESTPutAPIChannelPinResult = never; /** * @deprecated API v6 is deprecated and the types will not receive further updates, please update to v8. */ export type RESTDeleteAPIChannelPinResult = never; /** * https://discord.com/developers/docs/resources/channel#group-dm-add-recipient * * @deprecated API v6 is deprecated and the types will not receive further updates, please update to v8. */ export interface RESTPutAPIChannelRecipientJSONBody { access_token: string; nick?: string | undefined; } /** * @deprecated API v6 is deprecated and the types will not receive further updates, please update to v8. */ export type RESTPutAPIChannelRecipientResult = unknown; /** * @deprecated API v6 is deprecated and the types will not receive further updates, please update to v8. */ export type RESTDeleteAPIChannelRecipientResult = unknown; /** * @deprecated API v6 is deprecated and the types will not receive further updates, please update to v8. */ export type RESTPostAPIChannelMessageCrosspostResult = APIMessage; /** * @deprecated API v6 is deprecated and the types will not receive further updates, please update to v8. */ export interface RESTPostAPIChannelFollowersJSONBody { webhook_channel_id: string; } /** * @deprecated API v6 is deprecated and the types will not receive further updates, please update to v8. */ export type RESTPostAPIChannelFollowersResult = APIFollowedChannel; //# sourceMappingURL=channel.d.ts.map node_modules/discord-api-types/rest/index.mjs 0000664 00000001071 15114741631 0015364 0 ustar 00 import mod from "./index.js"; export default mod; export const APIVersion = mod.APIVersion; export const CDNRoutes = mod.CDNRoutes; export const EntitlementOwnerType = mod.EntitlementOwnerType; export const ImageFormat = mod.ImageFormat; export const Locale = mod.Locale; export const OAuth2Routes = mod.OAuth2Routes; export const RESTJSONErrorCodes = mod.RESTJSONErrorCodes; export const ReactionType = mod.ReactionType; export const RouteBases = mod.RouteBases; export const Routes = mod.Routes; export const StickerPackApplicationId = mod.StickerPackApplicationId; node_modules/discord-api-types/rest/index.js.map 0000664 00000000224 15114741631 0015762 0 ustar 00 {"version":3,"file":"index.js","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":";AAAA,2EAA2E;AAC3E,2FAA2F;;;;;;;;;;;;;;;;AAE3F,8CAA4B"} node_modules/discord-api-types/rest/v9/stageInstance.js.map 0000664 00000000157 15114741631 0020006 0 ustar 00 {"version":3,"file":"stageInstance.js","sourceRoot":"","sources":["stageInstance.ts"],"names":[],"mappings":""} node_modules/discord-api-types/rest/v9/user.js.map 0000664 00000000135 15114741631 0016170 0 ustar 00 {"version":3,"file":"user.js","sourceRoot":"","sources":["user.ts"],"names":[],"mappings":""} node_modules/discord-api-types/rest/v9/soundboard.js.map 0000664 00000000151 15114741631 0017350 0 ustar 00 {"version":3,"file":"soundboard.js","sourceRoot":"","sources":["soundboard.ts"],"names":[],"mappings":""} node_modules/discord-api-types/rest/v9/autoModeration.d.ts.map 0000664 00000002013 15114741631 0020435 0 ustar 00 {"version":3,"file":"autoModeration.d.ts","sourceRoot":"","sources":["autoModeration.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC/C,OAAO,KAAK,EACX,uBAAuB,EACvB,qBAAqB,EACrB,2BAA2B,EAC3B,oCAAoC,EACpC,6BAA6B,EAC7B,MAAM,yBAAyB,CAAC;AAEjC;;GAEG;AACH,MAAM,MAAM,mCAAmC,GAAG,qBAAqB,EAAE,CAAC;AAE1E;;GAEG;AACH,MAAM,MAAM,kCAAkC,GAAG,qBAAqB,CAAC;AAEvE;;GAEG;AACH,MAAM,WAAW,qCAAqC;IACrD;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;OAEG;IACH,UAAU,EAAE,2BAA2B,CAAC;IACxC;;OAEG;IACH,YAAY,EAAE,6BAA6B,CAAC;IAC5C;;;;OAIG;IACH,gBAAgB,CAAC,EAAE,oCAAoC,GAAG,SAAS,CAAC;IACpE;;OAEG;IACH,OAAO,EAAE,uBAAuB,EAAE,CAAC;IACnC;;;;OAIG;IACH,OAAO,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IAC9B;;OAEG;IACH,YAAY,CAAC,EAAE,SAAS,EAAE,GAAG,SAAS,CAAC;IACvC;;OAEG;IACH,eAAe,CAAC,EAAE,SAAS,EAAE,GAAG,SAAS,CAAC;CAC1C;AAED;;GAEG;AACH,MAAM,MAAM,mCAAmC,GAAG,qBAAqB,CAAC;AAExE;;GAEG;AACH,MAAM,MAAM,sCAAsC,GAAG,IAAI,CACxD,OAAO,CAAC,qCAAqC,CAAC,EAC9C,cAAc,CACd,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,oCAAoC,GAAG,qBAAqB,CAAC;AAEzE;;GAEG;AACH,MAAM,MAAM,qCAAqC,GAAG,KAAK,CAAC"} node_modules/discord-api-types/rest/v9/emoji.js 0000664 00000000156 15114741631 0015544 0 ustar 00 "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); //# sourceMappingURL=emoji.js.map node_modules/discord-api-types/rest/v9/interactions.d.ts 0000664 00000035524 15114741631 0017406 0 ustar 00 import type { Snowflake } from '../../globals'; import type { APIApplicationCommand, APIApplicationCommandPermission, APIGuildApplicationCommandPermissions, APIInteractionResponse, APIInteractionResponseCallbackData, ApplicationCommandType, InteractionResponseType, APIMessage, InteractionType } from '../../payloads/v9/index'; import type { _AddUndefinedToPossiblyUndefinedPropertiesOfInterface, _NonNullableFields, _StrictPartial } from '../../utils/internals'; import type { RESTDeleteAPIWebhookWithTokenMessageResult, RESTGetAPIWebhookWithTokenMessageResult, RESTPatchAPIWebhookWithTokenMessageFormDataBody, RESTPatchAPIWebhookWithTokenMessageJSONBody, RESTPatchAPIWebhookWithTokenMessageResult, RESTPostAPIWebhookWithTokenWaitResult } from './webhook'; /** * @see {@link https://discord.com/developers/docs/interactions/application-commands#get-global-application-commands} */ export interface RESTGetAPIApplicationCommandsQuery { /** * Whether to include full localization dictionaries (name_localizations and description_localizations) * in the returned objects, instead of the name_localized and description_localized fields. * * @defaultValue `false` */ with_localizations?: boolean; } /** * @see {@link https://discord.com/developers/docs/interactions/application-commands#get-global-application-commands} */ export type RESTGetAPIApplicationCommandsResult = APIApplicationCommand[]; /** * @see {@link https://discord.com/developers/docs/interactions/application-commands#get-global-application-command} */ export type RESTGetAPIApplicationCommandResult = APIApplicationCommand; export interface RESTPostAPIBaseApplicationCommandsJSONBody extends _AddUndefinedToPossiblyUndefinedPropertiesOfInterface<Omit<APIApplicationCommand, 'application_id' | 'contexts' | 'default_member_permissions' | 'description_localized' | 'description' | 'guild_id' | 'id' | 'integration_types' | 'name_localized' | 'type' | 'version'>>, _AddUndefinedToPossiblyUndefinedPropertiesOfInterface<Partial<_NonNullableFields<Pick<APIApplicationCommand, 'contexts'>> & Pick<APIApplicationCommand, 'default_member_permissions' | 'integration_types'>>> { } /** * @see {@link https://discord.com/developers/docs/interactions/application-commands#create-global-application-command} */ export interface RESTPostAPIChatInputApplicationCommandsJSONBody extends RESTPostAPIBaseApplicationCommandsJSONBody { type?: ApplicationCommandType.ChatInput | undefined; description: string; } /** * @see {@link https://discord.com/developers/docs/interactions/application-commands#create-global-application-command} */ export interface RESTPostAPIContextMenuApplicationCommandsJSONBody extends RESTPostAPIBaseApplicationCommandsJSONBody { type: ApplicationCommandType.Message | ApplicationCommandType.User; } /** * @see {@link https://discord.com/developers/docs/interactions/application-commands#create-global-application-command} */ export interface RESTPostAPIPrimaryEntryPointApplicationCommandJSONBody extends RESTPostAPIBaseApplicationCommandsJSONBody { type: ApplicationCommandType.PrimaryEntryPoint; } /** * @see {@link https://discord.com/developers/docs/interactions/application-commands#create-global-application-command} */ export type RESTPostAPIApplicationCommandsJSONBody = RESTPostAPIChatInputApplicationCommandsJSONBody | RESTPostAPIContextMenuApplicationCommandsJSONBody | RESTPostAPIPrimaryEntryPointApplicationCommandJSONBody; /** * @see {@link https://discord.com/developers/docs/interactions/application-commands#create-global-application-command} */ export type RESTPostAPIApplicationCommandsResult = APIApplicationCommand; /** * @see {@link https://discord.com/developers/docs/interactions/application-commands#edit-global-application-command} */ export type RESTPatchAPIApplicationCommandJSONBody = _StrictPartial<RESTPostAPIApplicationCommandsJSONBody>; /** * @see {@link https://discord.com/developers/docs/interactions/application-commands#edit-global-application-command} */ export type RESTPatchAPIApplicationCommandResult = APIApplicationCommand; /** * @see {@link https://discord.com/developers/docs/interactions/application-commands#bulk-overwrite-global-application-commands} */ export type RESTPutAPIApplicationCommandsJSONBody = RESTPostAPIApplicationCommandsJSONBody[]; /** * @see {@link https://discord.com/developers/docs/interactions/application-commands#bulk-overwrite-global-application-commands} */ export type RESTPutAPIApplicationCommandsResult = APIApplicationCommand[]; /** * @see {@link https://discord.com/developers/docs/interactions/application-commands#get-guild-application-commands} */ export type RESTGetAPIApplicationGuildCommandsQuery = RESTGetAPIApplicationCommandsQuery; /** * @see {@link https://discord.com/developers/docs/interactions/application-commands#get-guild-application-commands} */ export type RESTGetAPIApplicationGuildCommandsResult = Omit<APIApplicationCommand, 'dm_permission'>[]; /** * @see {@link https://discord.com/developers/docs/interactions/application-commands#get-guild-application-commands} */ export type RESTGetAPIApplicationGuildCommandResult = Omit<APIApplicationCommand, 'dm_permission'>; /** * @see {@link https://discord.com/developers/docs/interactions/application-commands#create-guild-application-command} */ export type RESTPostAPIApplicationGuildCommandsJSONBody = Omit<RESTPostAPIChatInputApplicationCommandsJSONBody, 'dm_permission'> | Omit<RESTPostAPIContextMenuApplicationCommandsJSONBody, 'dm_permission'>; /** * @see {@link https://discord.com/developers/docs/interactions/application-commands#create-guild-application-command} */ export type RESTPostAPIApplicationGuildCommandsResult = Omit<APIApplicationCommand, 'dm_permission'>; /** * @see {@link https://discord.com/developers/docs/interactions/application-commands#edit-guild-application-command} */ export type RESTPatchAPIApplicationGuildCommandJSONBody = _StrictPartial<Omit<RESTPostAPIChatInputApplicationCommandsJSONBody, 'dm_permission'> | Omit<RESTPostAPIContextMenuApplicationCommandsJSONBody, 'dm_permission'>>; /** * @see {@link https://discord.com/developers/docs/interactions/application-commands#edit-guild-application-command} */ export type RESTPatchAPIApplicationGuildCommandResult = Omit<APIApplicationCommand, 'dm_permission'>; /** * @see {@link https://discord.com/developers/docs/interactions/application-commands#bulk-overwrite-guild-application-commands} */ export type RESTPutAPIApplicationGuildCommandsJSONBody = ((Omit<RESTPostAPIChatInputApplicationCommandsJSONBody, 'dm_permission'> & Pick<Partial<APIApplicationCommand>, 'id'>) | (Omit<RESTPostAPIContextMenuApplicationCommandsJSONBody, 'dm_permission'> & Pick<Partial<APIApplicationCommand>, 'id'>))[]; /** * @see {@link https://discord.com/developers/docs/interactions/application-commands#bulk-overwrite-guild-application-commands} */ export type RESTPutAPIApplicationGuildCommandsResult = Omit<APIApplicationCommand, 'dm_permission'>[]; /** * @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#create-interaction-response} */ export type RESTPostAPIInteractionCallbackJSONBody = APIInteractionResponse; /** * @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#create-interaction-response} */ export interface RESTPostAPIInteractionCallbackQuery { /** * Whether to include a interaction callback response as the response instead of a 204 */ with_response?: boolean; } /** * @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#create-interaction-response} */ export type RESTPostAPIInteractionCallbackFormDataBody = (Record<`files[${bigint}]`, unknown> & { /** * JSON stringified message body */ payload_json?: string | undefined; }) | (Record<`files[${bigint}]`, unknown> & RESTPostAPIInteractionCallbackJSONBody); /** * @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#create-interaction-response} */ export type RESTPostAPIInteractionCallbackResult = never; /** * @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-callback-interaction-callback-response-object} */ export interface RESTPostAPIInteractionCallbackWithResponseResult { /** * The interaction object associated with the interaction */ interaction: RESTAPIInteractionCallbackObject; /** * The resource that was created by the interaction response */ resource?: RESTAPIInteractionCallbackResourceObject; } /** * @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-callback-interaction-callback-object} */ export interface RESTAPIInteractionCallbackObject { /** * ID of the interaction */ id: Snowflake; /** * Interaction type */ type: InteractionType; /** * Instance ID of the Activity if one was launched or joined */ activity_instance_id?: string; /** * ID of the message that was created by the interaction */ response_message_id?: Snowflake; /** * Whether or not the message is in a loading state */ response_message_loading?: boolean; /** * Whether or not the response message was ephemeral */ response_message_ephemeral?: boolean; } /** * @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-callback-interaction-callback-resource-object} */ export interface RESTAPIInteractionCallbackResourceObject { /** * Interaction callback type */ type: InteractionResponseType; /** * Represents the Activity launched by this interaction * * @remarks * Only present if `type` is {@link InteractionResponseType.LaunchActivity} */ activity_instance?: RESTAPIInteractionCallbackActivityInstanceResource; /** * Message created by the interaction * * @remarks * Only present if `type` is {@link InteractionResponseType.ChannelMessageWithSource} * or {@link InteractionResponseType.UpdateMessage} */ message?: APIMessage; } /** * @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-callback-interaction-callback-activity-instance-resource} */ export interface RESTAPIInteractionCallbackActivityInstanceResource { /** * Instance ID of the Activity if one was launched or joined. */ id: string; } /** * @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#get-original-interaction-response} */ export type RESTGetAPIInteractionOriginalResponseResult = RESTGetAPIWebhookWithTokenMessageResult; /** * @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#edit-original-interaction-response} */ export type RESTPatchAPIInteractionOriginalResponseJSONBody = RESTPatchAPIWebhookWithTokenMessageJSONBody; /** * @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#edit-original-interaction-response} */ export type RESTPatchAPIInteractionOriginalResponseFormDataBody = RESTPatchAPIWebhookWithTokenMessageFormDataBody; /** * @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#edit-original-interaction-response} */ export type RESTPatchAPIInteractionOriginalResponseResult = RESTPatchAPIWebhookWithTokenMessageResult; /** * @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#delete-original-interaction-response} */ export type RESTDeleteAPIInteractionOriginalResponseResult = RESTDeleteAPIWebhookWithTokenMessageResult; /** * @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#create-followup-message} */ export type RESTPostAPIInteractionFollowupJSONBody = APIInteractionResponseCallbackData; /** * @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#create-followup-message} */ export type RESTPostAPIInteractionFollowupFormDataBody = (Record<`files[${bigint}]`, unknown> & { /** * JSON stringified message body */ payload_json?: string | undefined; }) | (Record<`files[${bigint}]`, unknown> & RESTPostAPIInteractionFollowupJSONBody); /** * @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#create-followup-message} */ export type RESTPostAPIInteractionFollowupResult = RESTPostAPIWebhookWithTokenWaitResult; /** * @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#get-followup-message} */ export type RESTGetAPIInteractionFollowupResult = RESTGetAPIWebhookWithTokenMessageResult; /** * @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#edit-followup-message} */ export type RESTPatchAPIInteractionFollowupJSONBody = RESTPatchAPIWebhookWithTokenMessageJSONBody; /** * @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#edit-followup-message} */ export type RESTPatchAPIInteractionFollowupFormDataBody = RESTPatchAPIWebhookWithTokenMessageFormDataBody; /** * @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#edit-followup-message} */ export type RESTPatchAPIInteractionFollowupResult = RESTPatchAPIWebhookWithTokenMessageResult; /** * @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#delete-followup-message} */ export type RESTDeleteAPIInteractionFollowupResult = RESTDeleteAPIWebhookWithTokenMessageResult; /** * @see {@link https://discord.com/developers/docs/interactions/application-commands#get-guild-application-command-permissions} */ export type RESTGetAPIGuildApplicationCommandsPermissionsResult = APIGuildApplicationCommandPermissions[]; /** * @see {@link https://discord.com/developers/docs/interactions/application-commands#get-application-command-permissions} */ export type RESTGetAPIApplicationCommandPermissionsResult = APIGuildApplicationCommandPermissions; /** * @see {@link https://discord.com/developers/docs/interactions/application-commands#edit-application-command-permissions} */ export interface RESTPutAPIApplicationCommandPermissionsJSONBody { permissions: APIApplicationCommandPermission[]; } /** * @see {@link https://discord.com/developers/docs/interactions/application-commands#edit-application-command-permissions} */ export type RESTPutAPIApplicationCommandPermissionsResult = APIGuildApplicationCommandPermissions; /** * @see {@link https://discord.com/developers/docs/interactions/application-commands#batch-edit-application-command-permissions} */ export type RESTPutAPIGuildApplicationCommandsPermissionsJSONBody = Pick<APIGuildApplicationCommandPermissions, 'id' | 'permissions'>[]; /** * @see {@link https://discord.com/developers/docs/interactions/application-commands#batch-edit-application-command-permissions} */ export type RESTPutAPIGuildApplicationCommandsPermissionsResult = APIGuildApplicationCommandPermissions[]; //# sourceMappingURL=interactions.d.ts.map node_modules/discord-api-types/rest/v9/stageInstance.d.ts.map 0000664 00000001512 15114741631 0020236 0 ustar 00 {"version":3,"file":"stageInstance.d.ts","sourceRoot":"","sources":["stageInstance.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC/C,OAAO,KAAK,EAAE,gBAAgB,EAAE,yBAAyB,EAAE,MAAM,yBAAyB,CAAC;AAE3F;;GAEG;AACH,MAAM,WAAW,gCAAgC;IAChD;;OAEG;IACH,UAAU,EAAE,SAAS,CAAC;IACtB;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;;;OAIG;IACH,aAAa,CAAC,EAAE,yBAAyB,GAAG,SAAS,CAAC;IACtD;;OAEG;IACH,uBAAuB,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IAC9C;;OAEG;IACH,wBAAwB,CAAC,EAAE,SAAS,GAAG,SAAS,CAAC;CACjD;AAED;;GAEG;AACH,MAAM,MAAM,8BAA8B,GAAG,gBAAgB,CAAC;AAE9D;;GAEG;AACH,MAAM,MAAM,6BAA6B,GAAG,gBAAgB,CAAC;AAE7D;;GAEG;AACH,MAAM,WAAW,iCAAiC;IACjD;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC3B;;OAEG;IACH,aAAa,CAAC,EAAE,yBAAyB,GAAG,SAAS,CAAC;CACtD;AAED;;GAEG;AACH,MAAM,MAAM,+BAA+B,GAAG,gBAAgB,CAAC;AAE/D;;GAEG;AACH,MAAM,MAAM,gCAAgC,GAAG,KAAK,CAAC"} node_modules/discord-api-types/rest/v9/index.d.ts.map 0000664 00000017615 15114741631 0016570 0 ustar 00 {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAG/C,cAAc,WAAW,CAAC;AAC1B,mBAAmB,eAAe,CAAC;AACnC,mBAAmB,YAAY,CAAC;AAChC,mBAAmB,kBAAkB,CAAC;AACtC,cAAc,WAAW,CAAC;AAC1B,mBAAmB,SAAS,CAAC;AAC7B,mBAAmB,WAAW,CAAC;AAC/B,mBAAmB,SAAS,CAAC;AAC7B,mBAAmB,uBAAuB,CAAC;AAC3C,mBAAmB,gBAAgB,CAAC;AACpC,mBAAmB,UAAU,CAAC;AAC9B,cAAc,gBAAgB,CAAC;AAC/B,mBAAmB,UAAU,CAAC;AAC9B,mBAAmB,QAAQ,CAAC;AAC5B,mBAAmB,cAAc,CAAC;AAClC,mBAAmB,iBAAiB,CAAC;AACrC,mBAAmB,WAAW,CAAC;AAC/B,mBAAmB,YAAY,CAAC;AAChC,mBAAmB,QAAQ,CAAC;AAC5B,mBAAm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GAAG,uBAAuB,CAAC;AAExD,MAAM,WAAW,QAAQ;IACxB;;;;OAIG;IACH,IAAI,CAAC,EAAE,SAAS,CAAC;CACjB;AAED,eAAO,MAAM,UAAU;;;;;;;;CAQb,CAAC;AAKX,eAAO,MAAM,YAAY;;;IAGxB;;OAEG;;CAEM,CAAC"} node_modules/discord-api-types/rest/v9/guildScheduledEvent.js.map 0000664 00000000173 15114741631 0021143 0 ustar 00 {"version":3,"file":"guildScheduledEvent.js","sourceRoot":"","sources":["guildScheduledEvent.ts"],"names":[],"mappings":""} node_modules/discord-api-types/rest/v9/oauth2.js.map 0000664 00000000141 15114741631 0016411 0 ustar 00 {"version":3,"file":"oauth2.js","sourceRoot":"","sources":["oauth2.ts"],"names":[],"mappings":""} node_modules/discord-api-types/rest/v9/channel.js.map 0000664 00000000325 15114741631 0016623 0 ustar 00 {"version":3,"file":"channel.js","sourceRoot":"","sources":["channel.ts"],"names":[],"mappings":";;;AAuZA;;GAEG;AACH,IAAY,YAGX;AAHD,WAAY,YAAY;IACvB,mDAAM,CAAA;IACN,iDAAK,CAAA;AACN,CAAC,EAHW,YAAY,4BAAZ,YAAY,QAGvB"} node_modules/discord-api-types/rest/v9/poll.js.map 0000664 00000000135 15114741631 0016160 0 ustar 00 {"version":3,"file":"poll.js","sourceRoot":"","sources":["poll.ts"],"names":[],"mappings":""} node_modules/discord-api-types/rest/v9/oauth2.d.ts 0000664 00000015315 15114741631 0016102 0 ustar 00 import type { Permissions, Snowflake } from '../../globals'; import type { APIApplication, APIGuild, APIUser, APIWebhook, OAuth2Scopes } from '../../payloads/v9/index'; /** * @see {@link https://discord.com/developers/docs/topics/oauth2#get-current-bot-application-information} */ export type RESTGetAPIOAuth2CurrentApplicationResult = Omit<APIApplication, 'flags'>; /** * @see {@link https://discord.com/developers/docs/topics/oauth2#get-current-authorization-information} */ export interface RESTGetAPIOAuth2CurrentAuthorizationResult { /** * the current application */ application: Partial<APIApplication>; /** * the scopes the user has authorized the application for */ scopes: OAuth2Scopes[]; /** * when the access token expires */ expires: string; /** * the user who has authorized, if the user has authorized with the `identify` scope */ user?: APIUser; } /** * @see {@link https://discord.com/developers/docs/topics/oauth2#authorization-code-grant} */ export interface RESTOAuth2AuthorizationQuery { response_type: 'code'; client_id: Snowflake; scope: string; redirect_uri?: string; state?: string; prompt?: 'consent' | 'none'; } /** * @see {@link https://discord.com/developers/docs/topics/oauth2#authorization-code-grant-token-revocation-example} */ export interface RESTPostOAuth2TokenRevocationQuery { token: string; token_type_hint?: 'access_token' | 'refresh_token'; } /** * @see {@link https://discord.com/developers/docs/topics/oauth2#authorization-code-grant-redirect-url-example} */ export interface RESTPostOAuth2AuthorizationQueryResult { code: string; state?: string; } /** * @deprecated Use {@link RESTPostOAuth2AuthorizationQueryResult} instead */ export type RESTOAuth2AuthorizationQueryResult = RESTPostOAuth2AuthorizationQueryResult; /** * @remarks * This endpoint requires either HTTP Basic authentication using `client_id:client_secret`, * or the `client_id` and `client_secret` must be provided in the form body. * @see {@link https://discord.com/developers/docs/topics/oauth2#authorization-code-grant-redirect-url-example} */ export type RESTPostOAuth2AccessTokenURLEncodedData = RESTOAuth2TokenOptionalClientCredentials & { grant_type: 'authorization_code'; code: string; redirect_uri?: string; }; export type RESTOAuth2TokenOptionalClientCredentials = { client_id: Snowflake; client_secret: string; } | { client_id?: never; client_secret?: never; }; /** * @see {@link https://discord.com/developers/docs/topics/oauth2#authorization-code-grant-access-token-response} */ export interface RESTPostOAuth2AccessTokenResult { access_token: string; token_type: string; expires_in: number; refresh_token: string; scope: string; } /** * @remarks * This endpoint requires either HTTP Basic authentication using `client_id:client_secret`, * or the `client_id` and `client_secret` must be provided in the form body. * @see {@link https://discord.com/developers/docs/topics/oauth2#authorization-code-grant-refresh-token-exchange-example} */ export type RESTPostOAuth2RefreshTokenURLEncodedData = RESTOAuth2TokenOptionalClientCredentials & { grant_type: 'refresh_token'; refresh_token: string; }; export type RESTPostOAuth2RefreshTokenResult = RESTPostOAuth2AccessTokenResult; /** * @see {@link https://discord.com/developers/docs/topics/oauth2#implicit-grant} */ export interface RESTOAuth2ImplicitAuthorizationQuery { response_type: 'token'; client_id: Snowflake; scope: string; redirect_uri?: string; state?: string; prompt?: 'consent' | 'none'; } /** * @see {@link https://discord.com/developers/docs/topics/oauth2#implicit-grant-redirect-url-example} */ export type RESTOAuth2ImplicitAuthorizationURLFragmentResult = Omit<RESTPostOAuth2AccessTokenResult, 'refresh_token'>; /** * @see {@link https://discord.com/developers/docs/topics/oauth2#client-credentials-grant} */ export interface RESTPostOAuth2ClientCredentialsURLEncodedData { grant_type: 'client_credentials'; scope: string; } export type RESTPostOAuth2ClientCredentialsResult = RESTOAuth2ImplicitAuthorizationURLFragmentResult; /** * @see {@link https://discord.com/developers/docs/topics/oauth2#bot-authorization-flow-bot-auth-parameters} */ export interface RESTOAuth2BotAuthorizationQuery { /** * Your app's client id */ client_id: Snowflake; /** * Needs to include bot for the bot flow */ scope: `${OAuth2Scopes.Bot} ${string}` | `${OAuth2Scopes.Bot}` | `${string} ${OAuth2Scopes.Bot} ${string}` | `${string} ${OAuth2Scopes.Bot}`; /** * The permissions you're requesting * * @see {@link https://discord.com/developers/docs/topics/permissions} */ permissions?: Permissions; /** * Pre-fills the dropdown picker with a guild for the user */ guild_id?: Snowflake; /** * `true` or `false`—disallows the user from changing the guild dropdown */ disable_guild_select?: boolean; } /** * @see {@link https://discord.com/developers/docs/topics/oauth2#advanced-bot-authorization} */ export interface RESTOAuth2AdvancedBotAuthorizationQuery { client_id: Snowflake; /** * This assumes you include the `bot` scope alongside others (like `identify` for example) */ scope: `${OAuth2Scopes.Bot} ${string}` | `${OAuth2Scopes.Bot}` | `${string} ${OAuth2Scopes.Bot} ${string}` | `${string} ${OAuth2Scopes.Bot}`; /** * The required permissions bitfield, stringified */ permissions?: Permissions; guild_id?: Snowflake; disable_guild_select?: boolean; response_type: string; redirect_uri?: string; } export interface RESTOAuth2AdvancedBotAuthorizationQueryResult { code: string; state?: string; guild_id: Snowflake; permissions: Permissions; } /** * @see {@link https://discord.com/developers/docs/topics/oauth2#advanced-bot-authorization-extended-bot-authorization-access-token-example} */ export interface RESTPostOAuth2AccessTokenWithBotAndGuildsScopeResult { access_token: string; token_type: string; expires_in: number; refresh_token: string; scope: string; guild: APIGuild; } /** * @see {@link https://discord.com/developers/docs/topics/oauth2#webhooks-webhook-token-response-example} */ export interface RESTPostOAuth2AccessTokenWithBotAndWebhookIncomingScopeResult { access_token: string; token_type: string; expires_in: number; refresh_token: string; scope: string; webhook: APIWebhook; } export type RESTPostOAuth2AccessTokenWithBotAndGuildsAndWebhookIncomingScopeResult = RESTPostOAuth2AccessTokenWithBotAndGuildsScopeResult & RESTPostOAuth2AccessTokenWithBotAndWebhookIncomingScopeResult; //# sourceMappingURL=oauth2.d.ts.map node_modules/discord-api-types/rest/v9/template.d.ts 0000664 00000004450 15114741631 0016511 0 ustar 00 import type { APIGuild, APITemplate } from '../../payloads/v9/index'; import type { _StrictPartial } from '../../utils/internals'; /** * @see {@link https://discord.com/developers/docs/resources/guild-template#get-guild-template} */ export type RESTGetAPITemplateResult = APITemplate; /** * @see {@link https://discord.com/developers/docs/resources/guild-template#create-guild-from-guild-template} */ export interface RESTPostAPITemplateCreateGuildJSONBody { /** * Name of the guild (2-100 characters) */ name: string; /** * base64 1024x1024 png/jpeg image for the guild icon * * @see {@link https://discord.com/developers/docs/reference#image-data} */ icon?: string | undefined; } /** * @see {@link https://discord.com/developers/docs/resources/guild-template#create-guild-from-guild-template} */ export type RESTPostAPITemplateCreateGuildResult = APIGuild; /** * @see {@link https://discord.com/developers/docs/resources/guild-template#get-guild-templates} */ export type RESTGetAPIGuildTemplatesResult = APITemplate[]; /** * @see {@link https://discord.com/developers/docs/resources/guild-template#create-guild-template} */ export interface RESTPostAPIGuildTemplatesJSONBody { /** * Name of the template (1-100 characters) */ name: string; /** * Description for the template (0-120 characters) */ description?: string | null | undefined; } /** * @see {@link https://discord.com/developers/docs/resources/guild-template#create-guild-template} */ export type RESTPostAPIGuildTemplatesResult = APITemplate; /** * @see {@link https://discord.com/developers/docs/resources/guild-template#sync-guild-template} */ export type RESTPutAPIGuildTemplateSyncResult = APITemplate; /** * @see {@link https://discord.com/developers/docs/resources/guild-template#modify-guild-template} */ export type RESTPatchAPIGuildTemplateJSONBody = _StrictPartial<RESTPostAPIGuildTemplatesJSONBody>; /** * @see {@link https://discord.com/developers/docs/resources/guild-template#modify-guild-template} */ export type RESTPatchAPIGuildTemplateResult = APITemplate; /** * @see {@link https://discord.com/developers/docs/resources/guild-template#delete-guild-template} */ export type RESTDeleteAPIGuildTemplateResult = APITemplate; //# sourceMappingURL=template.d.ts.map node_modules/discord-api-types/rest/v9/sticker.d.ts.map 0000664 00000002055 15114741631 0017115 0 ustar 00 {"version":3,"file":"sticker.d.ts","sourceRoot":"","sources":["sticker.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAE1E;;GAEG;AACH,MAAM,MAAM,uBAAuB,GAAG,UAAU,CAAC;AAEjD;;GAEG;AACH,MAAM,WAAW,yBAAyB;IACzC,aAAa,EAAE,cAAc,EAAE,CAAC;CAChC;AAED;;GAEG;AACH,MAAM,MAAM,2BAA2B,GAAG,cAAc,CAAC;AAEzD;;GAEG;AACH,MAAM,MAAM,qBAAqB,GAAG,2BAA2B,CAAC;AAEhE;;;GAGG;AACH,MAAM,MAAM,8BAA8B,GAAG,yBAAyB,CAAC;AAEvE;;GAEG;AACH,MAAM,MAAM,6BAA6B,GAAG,UAAU,EAAE,CAAC;AAEzD;;GAEG;AACH,MAAM,MAAM,4BAA4B,GAAG,UAAU,CAAC;AAEtD;;GAEG;AACH,MAAM,WAAW,mCAAmC;IACnD;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;OAEG;IACH,WAAW,EAAE,MAAM,CAAC;IACpB;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;;;OAIG;IACH,IAAI,EAAE,OAAO,CAAC;CACd;AAED;;GAEG;AACH,MAAM,MAAM,6BAA6B,GAAG,UAAU,CAAC;AAEvD;;GAEG;AACH,MAAM,WAAW,gCAAgC;IAChD;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC1B;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;IACxC;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CAC1B;AAED;;GAEG;AACH,MAAM,MAAM,8BAA8B,GAAG,UAAU,CAAC;AAExD;;GAEG;AACH,MAAM,MAAM,+BAA+B,GAAG,KAAK,CAAC"} node_modules/discord-api-types/rest/v9/application.js.map 0000664 00000000153 15114741631 0017515 0 ustar 00 {"version":3,"file":"application.js","sourceRoot":"","sources":["application.ts"],"names":[],"mappings":""} node_modules/discord-api-types/rest/v9/user.d.ts.map 0000664 00000003373 15114741631 0016433 0 ustar 00 {"version":3,"file":"user.d.ts","sourceRoot":"","sources":["user.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC5D,OAAO,KAAK,EACX,UAAU,EACV,aAAa,EACb,cAAc,EACd,OAAO,EACP,4BAA4B,EAC5B,YAAY,EACZ,MAAM,yBAAyB,CAAC;AAEjC;;GAEG;AACH,MAAM,MAAM,2BAA2B,GAAG,OAAO,CAAC;AAElD;;GAEG;AACH,MAAM,MAAM,oBAAoB,GAAG,OAAO,CAAC;AAE3C;;GAEG;AACH,MAAM,MAAM,mCAAmC,GAAG,cAAc,CAAC;AAEjE;;GAEG;AACH,MAAM,WAAW,+BAA+B;IAC/C;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC9B;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;IACnC;;OAEG;IACH,MAAM,CAAC,EAAE,MA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;IACvC;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAAC,GAAG,SAAS,CAAC;CACvD;AAED;;GAEG;AACH,MAAM,MAAM,oDAAoD,GAAG,4BAA4B,CAAC"} node_modules/discord-api-types/rest/v9/guild.d.ts.map 0000664 00000026270 15114741631 0016562 0 ustar 00 {"version":3,"file":"guild.d.ts","sourceRoot":"","sources":["guild.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC5D,OAAO,KAAK,EACX,MAAM,EACN,UAAU,EACV,iBAAiB,EACjB,QAAQ,EACR,mBAAmB,EACnB,cAAc,EACd,2BAA2B,EAC3B,kBAAkB,EAClB,eAAe,EACf,qBAAqB,EACrB,cAAc,EACd,sBAAsB,EACtB,OAAO,EACP,aAAa,EACb,cAAc,EACd,gCAAgC,EAChC,0BAA0B,EAC1B,YAAY,EACZ,aAAa,EACb,uBAAuB,EACvB,sBAAsB,EACtB,gBAAgB,EAChB,YAAY,EACZ,iBAAiB,EACjB,wBAAwB,EACxB,8BAA8B,EAC9B,MAAM,yBAAyB,CAAC;AACjC,OAAO,KAAK,EACX,qDAAqD,EACrD,iBAAiB,EACjB,iBAAiB,EACjB,SAAS,EACT,cAAc,EACd,eAAe,EACf,MAAM,uBAAuB,CAAC;AAC/B,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AACxC,OAAO,KAAK,EAAE,mCAAmC,EAAE,MAAM,WAAW,CAAC;AAErE,MAAM,WAAW,2BAA4B,SAAQ,mCAAmC;IACvF,EAAE,EAAE,MAAM,GAAG,MAAM,CAAC;CACpB;AAED;;GAEG;AACH,MAAM,MAAM,uBAAuB,GAAG,2BAA2B,CAAC;AAElE,MAAM,MAAM,6BAA6B,GAAG,OAAO,CAAC,UAAU,EAAE,YAAY,GAAG,iBAAiB,CAAC,CAAC;AAElG;;GAEG;AACH,MA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/discord-api-types/rest/v9/poll.js 0000664 00000000155 15114741631 0015406 0 ustar 00 "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); //# sourceMappingURL=poll.js.map node_modules/discord-api-types/rest/v9/stageInstance.d.ts 0000664 00000003753 15114741631 0017473 0 ustar 00 import type { Snowflake } from '../../globals'; import type { APIStageInstance, StageInstancePrivacyLevel } from '../../payloads/v9/index'; /** * @see {@link https://discord.com/developers/docs/resources/stage-instance#create-stage-instance} */ export interface RESTPostAPIStageInstanceJSONBody { /** * The id of the stage channel */ channel_id: Snowflake; /** * The topic of the stage instance (1-120 characters) */ topic: string; /** * The privacy level of the stage instance * * @defaultValue `StageInstancePrivacyLevel.GuildOnly` */ privacy_level?: StageInstancePrivacyLevel | undefined; /** * Notify `@everyone` that a stage instance has started */ send_start_notification?: boolean | undefined; /** * The guild scheduled event associated with this stage instance */ guild_scheduled_event_id?: Snowflake | undefined; } /** * @see {@link https://discord.com/developers/docs/resources/stage-instance#create-stage-instance} */ export type RESTPostAPIStageInstanceResult = APIStageInstance; /** * @see {@link https://discord.com/developers/docs/resources/stage-instance#get-stage-instance} */ export type RESTGetAPIStageInstanceResult = APIStageInstance; /** * @see {@link https://discord.com/developers/docs/resources/stage-instance#modify-stage-instance} */ export interface RESTPatchAPIStageInstanceJSONBody { /** * The topic of the stage instance (1-120 characters) */ topic?: string | undefined; /** * The privacy level of the stage instance */ privacy_level?: StageInstancePrivacyLevel | undefined; } /** * @see {@link https://discord.com/developers/docs/resources/stage-instance#modify-stage-instance} */ export type RESTPatchAPIStageInstanceResult = APIStageInstance; /** * @see {@link https://discord.com/developers/docs/resources/stage-instance#delete-stage-instance} */ export type RESTDeleteAPIStageInstanceResult = never; //# sourceMappingURL=stageInstance.d.ts.map node_modules/discord-api-types/rest/v9/autoModeration.d.ts 0000664 00000005051 15114741631 0017666 0 ustar 00 import type { Snowflake } from '../../globals'; import type { APIAutoModerationAction, APIAutoModerationRule, AutoModerationRuleEventType, APIAutoModerationRuleTriggerMetadata, AutoModerationRuleTriggerType } from '../../payloads/v9/index'; /** * @see {@link https://discord.com/developers/docs/resources/auto-moderation#list-auto-moderation-rules-for-guild} */ export type RESTGetAPIAutoModerationRulesResult = APIAutoModerationRule[]; /** * @see {@link https://discord.com/developers/docs/resources/auto-moderation#get-auto-moderation-rule} */ export type RESTGetAPIAutoModerationRuleResult = APIAutoModerationRule; /** * @see {@link https://discord.com/developers/docs/resources/auto-moderation#create-auto-moderation-rule} */ export interface RESTPostAPIAutoModerationRuleJSONBody { /** * The rule name */ name: string; /** * The rule event type */ event_type: AutoModerationRuleEventType; /** * The rule trigger type */ trigger_type: AutoModerationRuleTriggerType; /** * The rule trigger metadata * * Can be omitted if the trigger type is {@link AutoModerationRuleTriggerType.Spam} */ trigger_metadata?: APIAutoModerationRuleTriggerMetadata | undefined; /** * The actions which will execute when this rule is triggered */ actions: APIAutoModerationAction[]; /** * Whether this rule is enabled * * @defaultValue `false` */ enabled?: boolean | undefined; /** * The role ids that shouldn't be affected by this rule (Maximum of 20) */ exempt_roles?: Snowflake[] | undefined; /** * The channel ids that shouldn't be affected by this rule (Maximum of 50) */ exempt_channels?: Snowflake[] | undefined; } /** * @see {@link https://discord.com/developers/docs/resources/auto-moderation#create-auto-moderation-rule} */ export type RESTPostAPIAutoModerationRuleResult = APIAutoModerationRule; /** * @see {@link https://discord.com/developers/docs/resources/auto-moderation#modify-auto-moderation-rule} */ export type RESTPatchAPIAutoModerationRuleJSONBody = Omit<Partial<RESTPostAPIAutoModerationRuleJSONBody>, 'trigger_type'>; /** * @see {@link https://discord.com/developers/docs/resources/auto-moderation#modify-auto-moderation-rule} */ export type RESTPatchAPIAutoModerationRuleResult = APIAutoModerationRule; /** * @see {@link https://discord.com/developers/docs/resources/auto-moderation#delete-auto-moderation-rule} */ export type RESTDeleteAPIAutoModerationRuleResult = never; //# sourceMappingURL=autoModeration.d.ts.map node_modules/discord-api-types/rest/v9/gateway.js 0000664 00000000160 15114741631 0016075 0 ustar 00 "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); //# sourceMappingURL=gateway.js.map node_modules/discord-api-types/rest/v9/emoji.js.map 0000664 00000000137 15114741631 0016317 0 ustar 00 {"version":3,"file":"emoji.js","sourceRoot":"","sources":["emoji.ts"],"names":[],"mappings":""} node_modules/discord-api-types/rest/v9/application.js 0000664 00000000164 15114741631 0016743 0 ustar 00 "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); //# sourceMappingURL=application.js.map node_modules/discord-api-types/rest/v9/poll.d.ts 0000664 00000002651 15114741631 0015645 0 ustar 00 import type { Snowflake } from '../../globals'; import type { APIBasePoll, APIBasePollAnswer, APIMessage, APIPollDefaults, APIUser } from '../../v9'; /** * @see {@link https://discord.com/developers/docs/resources/poll#get-answer-voters} */ export interface RESTGetAPIPollAnswerVotersQuery { /** * Get users after this user ID */ after?: Snowflake; /** * Max number of users to return (1-100) * * @defaultValue `25` */ limit?: number; } /** * @see {@link https://discord.com/developers/docs/resources/poll#poll-create-request-object-poll-create-request-object-structure} */ export interface RESTAPIPoll extends APIBasePoll, Partial<APIPollDefaults> { /** * Each of the answers available in the poll, up to 10 */ answers: APIBasePollAnswer[]; /** * Number of hours the poll should be open for, up to 32 days * * @defaultValue `24` */ duration?: number; } /** * @deprecated Use {@link RESTAPIPoll} instead */ export type RESTAPIPollCreate = RESTAPIPoll; /** * @see {@link https://discord.com/developers/docs/resources/poll#get-answer-voters} */ export interface RESTGetAPIPollAnswerVotersResult { /** * Users who voted for this answer */ users: APIUser[]; } /** * @see {@link https://discord.com/developers/docs/resources/poll#expire-poll} */ export type RESTPostAPIPollExpireResult = APIMessage; //# sourceMappingURL=poll.d.ts.map node_modules/discord-api-types/rest/v9/gateway.d.ts 0000664 00000000633 15114741631 0016336 0 ustar 00 import type { APIGatewayBotInfo, APIGatewayInfo } from '../../payloads/v9/index'; /** * @see {@link https://discord.com/developers/docs/topics/gateway#get-gateway} */ export type RESTGetAPIGatewayResult = APIGatewayInfo; /** * @see {@link https://discord.com/developers/docs/topics/gateway#get-gateway-bot} */ export type RESTGetAPIGatewayBotResult = APIGatewayBotInfo; //# sourceMappingURL=gateway.d.ts.map node_modules/discord-api-types/rest/v9/webhook.d.ts 0000664 00000024520 15114741631 0016334 0 ustar 00 import type { Snowflake } from '../../globals'; import type { APIAllowedMentions, APIEmbed, APIMessage, APIWebhook, MessageFlags, APIMessageTopLevelComponent } from '../../payloads/v9/index'; import type { _AddUndefinedToPossiblyUndefinedPropertiesOfInterface, _Nullable } from '../../utils/internals'; import type { RESTAPIAttachment } from './channel'; import type { RESTAPIPoll } from './poll'; /** * @see {@link https://discord.com/developers/docs/resources/webhook#create-webhook} */ export interface RESTPostAPIChannelWebhookJSONBody { /** * Name of the webhook (1-80 characters) */ name: string; /** * Image for the default webhook avatar * * @see {@link https://discord.com/developers/docs/reference#image-data} */ avatar?: string | null | undefined; } /** * @see {@link https://discord.com/developers/docs/resources/webhook#create-webhook} */ export type RESTPostAPIChannelWebhookResult = APIWebhook; /** * @see {@link https://discord.com/developers/docs/resources/webhook#get-channel-webhooks} */ export type RESTGetAPIChannelWebhooksResult = APIWebhook[]; /** * @see {@link https://discord.com/developers/docs/resources/webhook#get-guild-webhooks} */ export type RESTGetAPIGuildWebhooksResult = APIWebhook[]; /** * @see {@link https://discord.com/developers/docs/resources/webhook#get-webhook} */ export type RESTGetAPIWebhookResult = APIWebhook; /** * @see {@link https://discord.com/developers/docs/resources/webhook#get-webhook-with-token} */ export type RESTGetAPIWebhookWithTokenResult = Omit<APIWebhook, 'user'>; /** * @see {@link https://discord.com/developers/docs/resources/webhook#modify-webhook} */ export interface RESTPatchAPIWebhookJSONBody { /** * The default name of the webhook */ name?: string | undefined; /** * Image for the default webhook avatar * * @see {@link https://discord.com/developers/docs/reference#image-data} */ avatar?: string | null | undefined; /** * The new channel id this webhook should be moved to */ channel_id?: Snowflake | undefined; } /** * @see {@link https://discord.com/developers/docs/resources/webhook#modify-webhook} */ export type RESTPatchAPIWebhookResult = APIWebhook; /** * @see {@link https://discord.com/developers/docs/resources/webhook#modify-webhook-with-token} */ export type RESTPatchAPIWebhookWithTokenJSONBody = Omit<RESTPatchAPIWebhookJSONBody, 'channel_id'>; /** * @see {@link https://discord.com/developers/docs/resources/webhook#modify-webhook-with-token} */ export type RESTPatchAPIWebhookWithTokenResult = RESTGetAPIWebhookWithTokenResult; /** * @see {@link https://discord.com/developers/docs/resources/webhook#delete-webhook} */ export type RESTDeleteAPIWebhookResult = never; /** * @see {@link https://discord.com/developers/docs/resources/webhook#delete-webhook-with-token} */ export type RESTDeleteAPIWebhookWithTokenResult = never; /** * @see {@link https://discord.com/developers/docs/resources/webhook#execute-webhook} */ export interface RESTPostAPIWebhookWithTokenJSONBody { /** * The message contents (up to 2000 characters) */ content?: string | undefined; /** * Override the default username of the webhook */ username?: string | undefined; /** * Override the default avatar of the webhook */ avatar_url?: string | undefined; /** * `true` if this is a TTS message */ tts?: boolean | undefined; /** * Embedded `rich` content * * @see {@link https://discord.com/developers/docs/resources/channel#embed-object} */ embeds?: APIEmbed[] | undefined; /** * Allowed mentions for the message * * @see {@link https://discord.com/developers/docs/resources/channel#allowed-mentions-object} */ allowed_mentions?: APIAllowedMentions | undefined; /** * The components to include with the message * * Application-owned webhooks can always send components. Non-application-owned webhooks cannot send interactive components, and the `components` field will be ignored unless they set the `with_components` query param. * * @see {@link https://discord.com/developers/docs/components/reference} */ components?: APIMessageTopLevelComponent[] | undefined; /** * Attachment objects with filename and description */ attachments?: RESTAPIAttachment[] | undefined; /** * Message flags combined as a bitfield */ flags?: MessageFlags | undefined; /** * Name of thread to create * * Available only if the webhook is in a forum channel and a thread is not specified in {@link RESTPostAPIWebhookWithTokenQuery.thread_id} query parameter */ thread_name?: string | undefined; /** * Array of tag ids to apply to the thread */ applied_tags?: Snowflake[] | undefined; /** * A poll! */ poll?: RESTAPIPoll | undefined; } /** * @see {@link https://discord.com/developers/docs/resources/webhook#execute-webhook} */ export type RESTPostAPIWebhookWithTokenFormDataBody = (Record<`files[${bigint}]`, unknown> & { /** * JSON stringified message body */ payload_json?: string | undefined; }) | (Record<`files[${bigint}]`, unknown> & RESTPostAPIWebhookWithTokenJSONBody); /** * @see {@link https://discord.com/developers/docs/resources/webhook#execute-webhook-query-string-params} */ export interface RESTPostAPIWebhookWithTokenQuery { /** * Waits for server confirmation of message send before response, and returns the created message body * (when `false` a message that is not saved does not return an error) * * @defaultValue `false` */ wait?: boolean; /** * Send a message to the specified thread within a webhook's channel. The thread will automatically be unarchived. * * Available only if the {@link RESTPostAPIWebhookWithTokenJSONBody.thread_name} JSON body property is not specified */ thread_id?: Snowflake; /** * Whether to allow sending (non-interactive) components for non-application-owned webhooks * (ignored for application-owned webhooks) * * @defaultValue `false` */ with_components?: boolean; } /** * @see {@link https://discord.com/developers/docs/resources/webhook#execute-webhook} */ export type RESTPostAPIWebhookWithTokenResult = never; /** * Received when a call to https://discord.com/developers/docs/resources/webhook#execute-webhook receives * the `wait` query parameter set to `true` * * @see {@link https://discord.com/developers/docs/resources/webhook#execute-webhook-query-string-params} */ export type RESTPostAPIWebhookWithTokenWaitResult = APIMessage; /** * @see {@link https://discord.com/developers/docs/resources/webhook#execute-slackcompatible-webhook-query-string-params} */ export type RESTPostAPIWebhookWithTokenSlackQuery = Pick<RESTPostAPIWebhookWithTokenQuery, 'thread_id' | 'wait'>; /** * @see {@link https://discord.com/developers/docs/resources/webhook#execute-slackcompatible-webhook} */ export type RESTPostAPIWebhookWithTokenSlackResult = never; /** * Received when a call to https://discord.com/developers/docs/resources/webhook#execute-webhook receives * the `wait` query parameter set to `true` * * @see {@link https://discord.com/developers/docs/resources/webhook#execute-slackcompatible-webhook-query-string-params} */ export type RESTPostAPIWebhookWithTokenSlackWaitResult = APIMessage; /** * @see {@link https://discord.com/developers/docs/resources/webhook#execute-githubcompatible-webhook-query-string-params} */ export type RESTPostAPIWebhookWithTokenGitHubQuery = Pick<RESTPostAPIWebhookWithTokenQuery, 'thread_id' | 'wait'>; /** * @see {@link https://discord.com/developers/docs/resources/webhook#execute-githubcompatible-webhook} */ export type RESTPostAPIWebhookWithTokenGitHubResult = never; /** * Received when a call to https://discord.com/developers/docs/resources/webhook#execute-webhook receives * the `wait` query parameter set to `true` * * @see {@link https://discord.com/developers/docs/resources/webhook#execute-githubcompatible-webhook-query-string-params} */ export type RESTPostAPIWebhookWithTokenGitHubWaitResult = APIMessage; /** * @see {@link https://discord.com/developers/docs/resources/webhook#get-webhook-message} */ export type RESTGetAPIWebhookWithTokenMessageResult = APIMessage; /** * @see {@link https://discord.com/developers/docs/resources/webhook#get-webhook-message-query-string-params} */ export interface RESTGetAPIWebhookWithTokenMessageQuery { thread_id?: string; } /** * @see {@link https://discord.com/developers/docs/resources/webhook#edit-webhook-message} */ export type RESTPatchAPIWebhookWithTokenMessageJSONBody = _AddUndefinedToPossiblyUndefinedPropertiesOfInterface<_Nullable<Pick<RESTPostAPIWebhookWithTokenJSONBody, 'allowed_mentions' | 'components' | 'content' | 'embeds'>>> & { /** * Attached files to keep * * Starting with API v10, the `attachments` array must contain all attachments that should be present after edit, including **retained and new** attachments provided in the request body. * * @see {@link https://discord.com/developers/docs/resources/message#attachment-object-attachment-structure} */ attachments?: RESTAPIAttachment[] | undefined; /** * A poll! * * @remarks * Polls can only be added when editing a deferred interaction response. */ poll?: RESTAPIPoll | undefined; }; /** * @see {@link https://discord.com/developers/docs/resources/webhook#edit-webhook-message} */ export type RESTPatchAPIWebhookWithTokenMessageFormDataBody = (Record<`files[${bigint}]`, unknown> & { /** * JSON stringified message body */ payload_json?: string | undefined; }) | (Record<`files[${bigint}]`, unknown> & RESTPatchAPIWebhookWithTokenMessageJSONBody); /** * @see {@link https://discord.com/developers/docs/resources/webhook#edit-webhook-message-query-string-params} */ export type RESTPatchAPIWebhookWithTokenMessageQuery = Pick<RESTPostAPIWebhookWithTokenQuery, 'thread_id' | 'with_components'>; /** * @see {@link https://discord.com/developers/docs/resources/webhook#edit-webhook-message} */ export type RESTPatchAPIWebhookWithTokenMessageResult = APIMessage; /** * @see {@link https://discord.com/developers/docs/resources/webhook#delete-webhook-message} */ export type RESTDeleteAPIWebhookWithTokenMessageResult = never; //# sourceMappingURL=webhook.d.ts.map node_modules/discord-api-types/rest/v9/interactions.js 0000664 00000000165 15114741631 0017143 0 ustar 00 "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); //# sourceMappingURL=interactions.js.map node_modules/discord-api-types/rest/v9/channel.js 0000664 00000000727 15114741631 0016055 0 ustar 00 "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.ReactionType = void 0; /** * @see {@link https://discord.com/developers/docs/resources/channel#get-reactions-reaction-types} */ var ReactionType; (function (ReactionType) { ReactionType[ReactionType["Normal"] = 0] = "Normal"; ReactionType[ReactionType["Super"] = 1] = "Super"; })(ReactionType || (exports.ReactionType = ReactionType = {})); //# sourceMappingURL=channel.js.map node_modules/discord-api-types/rest/v9/emoji.d.ts 0000664 00000005624 15114741631 0016005 0 ustar 00 import type { Snowflake } from '../../globals'; import type { APIApplicationEmoji, APIEmoji } from '../../payloads/v9'; /** * @see {@link https://discord.com/developers/docs/resources/emoji#list-guild-emojis} */ export type RESTGetAPIGuildEmojisResult = APIEmoji[]; /** * @see {@link https://discord.com/developers/docs/resources/emoji#get-guild-emoji} */ export type RESTGetAPIGuildEmojiResult = APIEmoji; /** * @see {@link https://discord.com/developers/docs/resources/emoji#create-guild-emoji-json-params} */ export interface RESTPostAPIGuildEmojiJSONBody { /** * Name of the emoji */ name: string; /** * The 128x128 emoji image * * @see {@link https://discord.com/developers/docs/reference#image-data} */ image: string; /** * Roles for which this emoji will be whitelisted */ roles?: Snowflake[] | undefined; } /** * @see {@link https://discord.com/developers/docs/resources/emoji#create-guild-emoji} */ export type RESTPostAPIGuildEmojiResult = APIEmoji; /** * @see {@link https://discord.com/developers/docs/resources/emoji#modify-guild-emoji} */ export interface RESTPatchAPIGuildEmojiJSONBody { /** * Name of the emoji */ name?: string | undefined; /** * Roles for which this emoji will be whitelisted */ roles?: Snowflake[] | null | undefined; } /** * @see {@link https://discord.com/developers/docs/resources/emoji#modify-guild-emoji} */ export type RESTPatchAPIGuildEmojiResult = APIEmoji; /** * @see {@link https://discord.com/developers/docs/resources/emoji#delete-guild-emoji} */ export type RESTDeleteAPIGuildEmojiResult = never; /** * @see {@link https://discord.com/developers/docs/resources/emoji#list-application-emojis} */ export interface RESTGetAPIApplicationEmojisResult { items: APIApplicationEmoji[]; } /** * @see {@link https://discord.com/developers/docs/resources/emoji#get-application-emoji} */ export type RESTGetAPIApplicationEmojiResult = APIApplicationEmoji; /** * @see {@link https://discord.com/developers/docs/resources/emoji#create-application-emoji-json-params} */ export type RESTPostAPIApplicationEmojiJSONBody = Pick<RESTPostAPIGuildEmojiJSONBody, 'image' | 'name'>; /** * @see {@link https://discord.com/developers/docs/resources/emoji#create-application-emoji} */ export type RESTPostAPIApplicationEmojiResult = APIApplicationEmoji; /** * @see {@link https://discord.com/developers/docs/resources/emoji#modify-application-emoji} */ export type RESTPatchAPIApplicationEmojiJSONBody = Pick<RESTPatchAPIGuildEmojiJSONBody, 'name'>; /** * @see {@link https://discord.com/developers/docs/resources/emoji#modify-application-emoji} */ export type RESTPatchAPIApplicationEmojiResult = APIApplicationEmoji; /** * @see {@link https://discord.com/developers/docs/resources/emoji#delete-application-emoji} */ export type RESTDeleteAPIApplicationEmojiResult = never; //# sourceMappingURL=emoji.d.ts.map node_modules/discord-api-types/rest/v9/guild.js.map 0000664 00000000137 15114741631 0016320 0 ustar 00 {"version":3,"file":"guild.js","sourceRoot":"","sources":["guild.ts"],"names":[],"mappings":""} node_modules/discord-api-types/rest/v9/auditLog.js 0000664 00000000161 15114741631 0016205 0 ustar 00 "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); //# sourceMappingURL=auditLog.js.map node_modules/discord-api-types/rest/v9/webhook.js 0000664 00000000160 15114741631 0016072 0 ustar 00 "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); //# sourceMappingURL=webhook.js.map node_modules/discord-api-types/rest/v9/autoModeration.js.map 0000664 00000000161 15114741631 0020203 0 ustar 00 {"version":3,"file":"autoModeration.js","sourceRoot":"","sources":["autoModeration.ts"],"names":[],"mappings":""} node_modules/discord-api-types/rest/v9/sticker.d.ts 0000664 00000005600 15114741631 0016340 0 ustar 00 import type { APISticker, APIStickerPack } from '../../payloads/v9/index'; /** * @see {@link https://discord.com/developers/docs/resources/sticker#get-sticker} */ export type RESTGetAPIStickerResult = APISticker; /** * @see {@link https://discord.com/developers/docs/resources/sticker#list-sticker-packs} */ export interface RESTGetStickerPacksResult { sticker_packs: APIStickerPack[]; } /** * @see {@link https://discord.com/developers/docs/resources/sticker#get-sticker-pack} */ export type RESTGetAPIStickerPackResult = APIStickerPack; /** * @deprecated Use {@link RESTGetAPIStickerPackResult} instead */ export type RESTGetAPIStickerPack = RESTGetAPIStickerPackResult; /** * @see {@link https://discord.com/developers/docs/resources/sticker#list-sticker-packs} * @deprecated Use {@link RESTGetStickerPacksResult} instead */ export type RESTGetNitroStickerPacksResult = RESTGetStickerPacksResult; /** * @see {@link https://discord.com/developers/docs/resources/sticker#list-guild-stickers} */ export type RESTGetAPIGuildStickersResult = APISticker[]; /** * @see {@link https://discord.com/developers/docs/resources/sticker#get-guild-sticker} */ export type RESTGetAPIGuildStickerResult = APISticker; /** * @see {@link https://discord.com/developers/docs/resources/sticker#create-guild-sticker} */ export interface RESTPostAPIGuildStickerFormDataBody { /** * Name of the sticker (2-30 characters) */ name: string; /** * Description of the sticker (empty or 2-100 characters) */ description: string; /** * The Discord name of a unicode emoji representing the sticker's expression (2-200 characters) */ tags: string; /** * The sticker file to upload, must be a PNG, APNG, GIF, or Lottie JSON file, max 512 KB * * Uploaded stickers are constrained to 5 seconds in length for animated stickers, and 320 x 320 pixels. */ file: unknown; } /** * @see {@link https://discord.com/developers/docs/resources/sticker#create-guild-sticker} */ export type RESTPostAPIGuildStickerResult = APISticker; /** * @see {@link https://discord.com/developers/docs/resources/sticker#modify-guild-sticker} */ export interface RESTPatchAPIGuildStickerJSONBody { /** * Name of the sticker (2-30 characters) */ name?: string | undefined; /** * Description of the sticker (2-100 characters) */ description?: string | null | undefined; /** * The Discord name of a unicode emoji representing the sticker's expression (2-200 characters) */ tags?: string | undefined; } /** * @see {@link https://discord.com/developers/docs/resources/sticker#modify-guild-sticker} */ export type RESTPatchAPIGuildStickerResult = APISticker; /** * @see {@link https://discord.com/developers/docs/resources/sticker#delete-guild-sticker} */ export type RESTDeleteAPIGuildStickerResult = never; //# sourceMappingURL=sticker.d.ts.map node_modules/discord-api-types/rest/v9/voice.js 0000664 00000000156 15114741631 0015546 0 ustar 00 "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); //# sourceMappingURL=voice.js.map node_modules/discord-api-types/rest/v9/guild.d.ts 0000664 00000073432 15114741631 0016010 0 ustar 00 import type { Permissions, Snowflake } from '../../globals'; import type { APIBan, APIChannel, APIExtendedInvite, APIGuild, APIGuildIntegration, APIGuildMember, APIGuildMembershipScreening, APIGuildOnboarding, APIGuildPreview, APIGuildWelcomeScreen, APIGuildWidget, APIGuildWidgetSettings, APIRole, APIThreadList, APIVoiceRegion, GuildDefaultMessageNotifications, GuildExplicitContentFilter, GuildFeature, GuildMFALevel, GuildSystemChannelFlags, GuildVerificationLevel, GuildWidgetStyle, APIDMChannel, APIGroupDMChannel, APIGuildOnboardingPrompt, APIGuildOnboardingPromptOption } from '../../payloads/v9/index'; import type { _AddUndefinedToPossiblyUndefinedPropertiesOfInterface, _DistributiveOmit, _DistributivePick, _Nullable, _StrictPartial, _StrictRequired } from '../../utils/internals'; import type { Locale } from '../common'; import type { RESTPutAPIChannelPermissionJSONBody } from './channel'; export interface RESTAPIGuildCreateOverwrite extends RESTPutAPIChannelPermissionJSONBody { id: number | string; } /** * @deprecated Use {@link RESTAPIGuildCreateOverwrite} instead */ export type APIGuildCreateOverwrite = RESTAPIGuildCreateOverwrite; export type RESTAPIGuildChannelResolvable = Exclude<APIChannel, APIDMChannel | APIGroupDMChannel>; /** * @deprecated Use {@link RESTAPIGuildChannelResolvable} instead */ export type APIGuildChannelResolvable = RESTAPIGuildChannelResolvable; export type RESTAPIGuildCreatePartialChannel = _StrictPartial<_DistributivePick<RESTAPIGuildChannelResolvable, 'available_tags' | 'bitrate' | 'default_auto_archive_duration' | 'default_forum_layout' | 'default_reaction_emoji' | 'default_sort_order' | 'default_thread_rate_limit_per_user' | 'flags' | 'nsfw' | 'position' | 'rate_limit_per_user' | 'rtc_region' | 'topic' | 'type' | 'user_limit' | 'video_quality_mode'>> & { name: string; id?: number | string | undefined; parent_id?: number | string | null | undefined; permission_overwrites?: RESTAPIGuildCreateOverwrite[] | undefined; }; /** * @deprecated Use {@link RESTAPIGuildCreatePartialChannel} instead */ export type APIGuildCreatePartialChannel = RESTAPIGuildCreatePartialChannel; export interface RESTAPIGuildCreateRole extends RESTPostAPIGuildRoleJSONBody { id: number | string; } /** * @deprecated Use {@link RESTAPIGuildCreateRole} instead */ export type APIGuildCreateRole = RESTAPIGuildCreateRole; /** * @see {@link https://discord.com/developers/docs/resources/guild#create-guild} */ export interface RESTPostAPIGuildsJSONBody { /** * Name of the guild (2-100 characters) */ name: string; /** * Voice region id * * @see {@link https://discord.com/developers/docs/resources/voice#voice-region-object} */ region?: string | undefined; /** * base64 1024x1024 png/jpeg image for the guild icon * * @see {@link https://discord.com/developers/docs/reference#image-data} */ icon?: string | undefined; /** * Verification level * * @see {@link https://discord.com/developers/docs/resources/guild#guild-object-verification-level} */ verification_level?: GuildVerificationLevel | undefined; /** * Default message notification level * * @see {@link https://discord.com/developers/docs/resources/guild#guild-object-default-message-notification-level} */ default_message_notifications?: GuildDefaultMessageNotifications | undefined; /** * Explicit content filter level * * @see {@link https://discord.com/developers/docs/resources/guild#guild-object-explicit-content-filter-level} */ explicit_content_filter?: GuildExplicitContentFilter | undefined; /** * New guild roles * * @remarks * When using this parameter, the first member of the array is used to change properties of the guild's `@everyone` role. * If you are trying to bootstrap a guild with additional roles, keep this in mind. * * Also, the required `id` field within each role object is an integer placeholder, * and will be replaced by the API upon consumption. Its purpose is to allow you to overwrite a role's permissions * in a channel when also passing in channels with the channels array. * @see {@link https://discord.com/developers/docs/topics/permissions#role-object} */ roles?: RESTAPIGuildCreateRole[] | undefined; /** * New guild's channels * * @remarks * When using the channels parameter, the `position` field is ignored, and none of the default channels are created. * * Also, the `id` field within each channel object may be set to an integer placeholder, * and will be replaced by the API upon consumption. Its purpose is to allow you to create `GUILD_CATEGORY` channels * by setting the `parent_id` field on any children to the category's id field. * Category channels must be listed before any children.* * @see {@link https://discord.com/developers/docs/resources/channel#channel-object} */ channels?: RESTAPIGuildCreatePartialChannel[] | undefined; /** * ID for afk channel */ afk_channel_id?: Snowflake | number | null | undefined; /** * afk timeout in seconds, can be set to: `60`, `300`, `900`, `1800`, `3600` */ afk_timeout?: 1800 | 3600 | 60 | 300 | 900 | undefined; /** * The id of the channel where guild notices such as welcome messages and boost events are posted */ system_channel_id?: Snowflake | number | null | undefined; /** * System channel flags * * @see {@link https://discord.com/developers/docs/resources/guild#guild-object-system-channel-flags} */ system_channel_flags?: GuildSystemChannelFlags | undefined; /** * Whether the boosts progress bar should be enabled. */ premium_progress_bar_enabled?: boolean | undefined; } /** * @see {@link https://discord.com/developers/docs/resources/guild#create-guild} */ export type RESTPostAPIGuildsResult = APIGuild; /** * @see {@link https://discord.com/developers/docs/resources/guild#modify-guild-mfa-level} */ export interface RESTPostAPIGuildsMFAJSONBody { /** * MFA level * * @see {@link https://discord.com/developers/docs/resources/guild#guild-object-mfa-level} */ level: GuildMFALevel; } /** * @see {@link https://discord.com/developers/docs/resources/guild#modify-guild-mfa-level} */ export type RESTPostAPIGuildsMFAResult = RESTPostAPIGuildsMFAJSONBody; /** * @see {@link https://discord.com/developers/docs/resources/guild#get-guild} */ export interface RESTGetAPIGuildQuery { /** * When `true`, will return approximate member and presence counts for the guild * * @defaultValue `false` */ with_counts?: boolean; } /** * @see {@link https://discord.com/developers/docs/resources/guild#get-guild} */ export type RESTGetAPIGuildResult = APIGuild; /** * @see {@link https://discord.com/developers/docs/resources/guild#get-guild-preview} */ export type RESTGetAPIGuildPreviewResult = APIGuildPreview; /** * @see {@link https://discord.com/developers/docs/resources/guild#modify-guild} */ export interface RESTPatchAPIGuildJSONBody { /** * New name for the guild (2-100 characters) */ name?: string | undefined; /** * Voice region id * * @see {@link https://discord.com/developers/docs/resources/voice#voice-region-object} */ region?: string | null | undefined; /** * Verification level * * @see {@link https://discord.com/developers/docs/resources/guild#guild-object-verification-level} */ verification_level?: GuildVerificationLevel | null | undefined; /** * Default message notification level * * @see {@link https://discord.com/developers/docs/resources/guild#guild-object-default-message-notification-level} */ default_message_notifications?: GuildDefaultMessageNotifications | null | undefined; /** * Explicit content filter level * * @see {@link https://discord.com/developers/docs/resources/guild#guild-object-explicit-content-filter-level} */ explicit_content_filter?: GuildExplicitContentFilter | null | undefined; /** * ID for afk channel */ afk_channel_id?: Snowflake | null | undefined; /** * afk timeout in seconds, can be set to: `60`, `300`, `900`, `1800`, `3600` */ afk_timeout?: 1800 | 3600 | 60 | 300 | 900 | undefined; /** * base64 1024x1024 png/jpeg/gif image for the guild icon (can be animated gif when the guild has `ANIMATED_ICON` feature) * * @see {@link https://discord.com/developers/docs/reference#image-data} */ icon?: string | null | undefined; /** * User id to transfer guild ownership to (must be owner) */ owner_id?: Snowflake | undefined; /** * base64 16:9 png/jpeg image for the guild splash (when the guild has `INVITE_SPLASH` feature) * * @see {@link https://discord.com/developers/docs/reference#image-data} */ splash?: string | null | undefined; /** * base64 png/jpeg image for the guild discovery splash (when the guild has `DISCOVERABLE` feature) */ discovery_splash?: string | null | undefined; /** * base64 16:9 png/jpeg image for the guild banner (when the server has the `BANNER` feature; can be animated gif when the server has the `ANIMATED_BANNER` feature) */ banner?: string | null | undefined; /** * The id of the channel where guild notices such as welcome messages and boost events are posted */ system_channel_id?: Snowflake | null | undefined; /** * System channel flags * * @see {@link https://discord.com/developers/docs/resources/guild#guild-object-system-channel-flags} */ system_channel_flags?: GuildSystemChannelFlags | undefined; /** * The id of the channel where Community guilds display rules and/or guidelines */ rules_channel_id?: Snowflake | null | undefined; /** * The id of the channel where admins and moderators of Community guilds receive notices from Discord */ public_updates_channel_id?: Snowflake | null | undefined; /** * The preferred locale of a Community guild used in server discovery and notices from Discord * * @defaultValue `"en-US"` (if the value is set to `null`) */ preferred_locale?: Locale | null | undefined; /** * Enabled guild features * * @see {@link https://discord.com/developers/docs/resources/guild#guild-object-guild-features} */ features?: GuildFeature[] | undefined; /** * The description for the guild */ description?: string | null | undefined; /** * Whether the boosts progress bar should be enabled. */ premium_progress_bar_enabled?: boolean | undefined; /** * The id of the channel where admins and moderators of Community guilds receive safety alerts from Discord */ safety_alerts_channel_id?: Snowflake | null | undefined; } /** * @see {@link https://discord.com/developers/docs/resources/guild#modify-guild} */ export type RESTPatchAPIGuildResult = APIGuild; /** * @see {@link https://discord.com/developers/docs/resources/guild#delete-guild} */ export type RESTDeleteAPIGuildResult = never; /** * @see {@link https://discord.com/developers/docs/resources/guild#get-guild-channels} */ export type RESTGetAPIGuildChannelsResult = APIChannel[]; /** * @see {@link https://discord.com/developers/docs/resources/guild#create-guild-channel} */ export type RESTPostAPIGuildChannelJSONBody = _DistributiveOmit<RESTAPIGuildCreatePartialChannel, 'id'>; /** * @see {@link https://discord.com/developers/docs/resources/guild#create-guild-channel} */ export type RESTPostAPIGuildChannelResult = APIChannel; /** * @see {@link https://discord.com/developers/docs/resources/guild#modify-guild-channel-positions} */ export type RESTPatchAPIGuildChannelPositionsJSONBody = { /** * Channel id */ id: Snowflake; /** * Sorting position of the channel */ position: number; /** * Sync channel overwrites with the new parent, when moving to a new `parent_id` */ lock_permissions?: boolean | undefined; /** * The new parent id of this channel */ parent_id?: Snowflake | null | undefined; }[]; /** * @see {@link https://discord.com/developers/docs/resources/guild#modify-guild-channel-positions} */ export type RESTPatchAPIGuildChannelPositionsResult = never; /** * @see {@link https://discord.com/developers/docs/resources/guild#list-active-guild-threads} */ export type RESTGetAPIGuildThreadsResult = Omit<APIThreadList, 'has_more'>; /** * @see {@link https://discord.com/developers/docs/resources/guild#get-guild-member} */ export type RESTGetAPIGuildMemberResult = APIGuildMember; /** * @see {@link https://discord.com/developers/docs/resources/guild#list-guild-members} */ export interface RESTGetAPIGuildMembersQuery { /** * Max number of members to return (1-1000) * * @defaultValue `1` */ limit?: number; /** * The highest user id in the previous page * * @defaultValue `0` */ after?: Snowflake; } /** * @see {@link https://discord.com/developers/docs/resources/guild#list-guild-members} */ export type RESTGetAPIGuildMembersResult = APIGuildMember[]; /** * @see {@link https://discord.com/developers/docs/resources/guild#search-guild-members} */ export interface RESTGetAPIGuildMembersSearchQuery { /** * Query string to match username(s) and nickname(s) against */ query: string; /** * Max number of members to return (1-1000) * * @defaultValue `1` */ limit?: number; } export type RESTGetAPIGuildMembersSearchResult = APIGuildMember[]; /** * @see {@link https://discord.com/developers/docs/resources/guild#add-guild-member} */ export interface RESTPutAPIGuildMemberJSONBody { /** * An oauth2 access token granted with the `guilds.join` to the bot's application for the user you want to add to the guild */ access_token: string; /** * Value to set users nickname to * * Requires `MANAGE_NICKNAMES` permission */ nick?: string | undefined; /** * Array of role ids the member is assigned * * Requires `MANAGE_ROLES` permission */ roles?: Snowflake[] | undefined; /** * Whether the user is muted in voice channels * * Requires `MUTE_MEMBERS` permission */ mute?: boolean | undefined; /** * Whether the user is deafened in voice channels * * Requires `DEAFEN_MEMBERS` permission */ deaf?: boolean | undefined; } export type RESTPutAPIGuildMemberResult = APIGuildMember | undefined; /** * @see {@link https://discord.com/developers/docs/resources/guild#modify-guild-member} */ export interface RESTPatchAPIGuildMemberJSONBody { /** * Value to set users nickname to * * Requires `MANAGE_NICKNAMES` permission */ nick?: string | null | undefined; /** * Array of role ids the member is assigned * * Requires `MANAGE_ROLES` permission */ roles?: Snowflake[] | null | undefined; /** * Whether the user is muted in voice channels. Will throw a 400 if the user is not in a voice channel * * Requires `MUTE_MEMBERS` permission */ mute?: boolean | null | undefined; /** * Whether the user is deafened in voice channels. Will throw a 400 if the user is not in a voice channel * * Requires `DEAFEN_MEMBERS` permission */ deaf?: boolean | null | undefined; /** * ID of channel to move user to (if they are connected to voice) * * Requires `MOVE_MEMBERS` permission */ channel_id?: Snowflake | null | undefined; /** * Timestamp of when the time out will be removed; until then, they cannot interact with the guild */ communication_disabled_until?: string | null | undefined; } /** * @see {@link https://discord.com/developers/docs/resources/guild#add-guild-member} */ export type RESTPatchAPIGuildMemberResult = APIGuildMember; /** * @see {@link https://discord.com/developers/docs/resources/guild#modify-current-user-nick} * @deprecated Use {@link https://discord.com/developers/docs/resources/guild#modify-current-member | Modify Current Member} instead. */ export interface RESTPatchAPICurrentGuildMemberNicknameJSONBody { /** * Value to set users nickname to * * Requires `CHANGE_NICKNAME` permission */ nick?: string | null | undefined; } /** * @see {@link https://discord.com/developers/docs/resources/guild#modify-current-member} */ export interface RESTPatchAPICurrentGuildMemberJSONBody { /** * Value to set users nickname to * * Requires `CHANGE_NICKNAME` permission */ nick?: string | null | undefined; } /** * @see {@link https://discord.com/developers/docs/resources/guild#modify-current-user-nick} * @deprecated Use {@link https://discord.com/developers/docs/resources/guild#modify-current-member | Modify Current Member} instead. */ export type RESTPatchAPICurrentGuildMemberNicknameResult = _StrictRequired<RESTPatchAPICurrentGuildMemberNicknameJSONBody>; /** * @see {@link https://discord.com/developers/docs/resources/guild#add-guild-member-role} */ export type RESTPutAPIGuildMemberRoleResult = never; /** * @see {@link https://discord.com/developers/docs/resources/guild#remove-guild-member-role} */ export type RESTDeleteAPIGuildMemberRoleResult = never; /** * @see {@link https://discord.com/developers/docs/resources/guild#remove-guild-member} */ export type RESTDeleteAPIGuildMemberResult = never; /** * @see {@link https://discord.com/developers/docs/resources/guild#get-guild-bans} */ export type RESTGetAPIGuildBansResult = APIBan[]; /** * @see {@link https://discord.com/developers/docs/resources/guild#get-guild-bans} */ export interface RESTGetAPIGuildBansQuery { /** * Consider only users before given user id */ before?: Snowflake; /** * Consider only users after given user id */ after?: Snowflake; /** * Number of users to return (1-1000) * * @defaultValue `1000` */ limit?: number; } /** * @see {@link https://discord.com/developers/docs/resources/guild#get-guild-ban} */ export type RESTGetAPIGuildBanResult = APIBan; /** * @see {@link https://discord.com/developers/docs/resources/guild#create-guild-ban} */ export interface RESTPutAPIGuildBanJSONBody { /** * Number of days to delete messages for (0-7) * * @deprecated Use {@link RESTPutAPIGuildBanJSONBody.delete_message_seconds} instead */ delete_message_days?: number | undefined; /** * Number of seconds to delete messages for, between 0 and 604800 (7 days) */ delete_message_seconds?: number | undefined; /** * Reason for the ban * * @deprecated Removed in API v10, use the `X-Audit-Log-Reason` header instead. */ reason?: string | undefined; } /** * @see {@link https://discord.com/developers/docs/resources/guild#create-guild-ban} */ export type RESTPutAPIGuildBanResult = never; /** * @see {@link https://discord.com/developers/docs/resources/guild#remove-guild-ban} */ export type RESTDeleteAPIGuildBanResult = never; /** * @see {@link https://discord.com/developers/docs/resources/guild#bulk-guild-ban} */ export interface RESTPostAPIGuildBulkBanJSONBody { /** * List of user ids to ban (max 200) */ user_ids: Snowflake[]; /** * Number of seconds to delete messages for, between 0 and 604800 (7 days) */ delete_message_seconds?: number | undefined; } /** * @see {@link https://discord.com/developers/docs/resources/guild#bulk-guild-ban} */ export interface RESTPostAPIGuildBulkBanResult { /** * List of user ids, that were successfully banned */ banned_users: Snowflake[]; /** * List of user ids, that were not banned */ failed_users: Snowflake[]; } /** * @see {@link https://discord.com/developers/docs/resources/guild#get-guild-roles} */ export type RESTGetAPIGuildRolesResult = APIRole[]; /** * @see {@link https://discord.com/developers/docs/resources/guild#create-guild-role} */ export interface RESTPostAPIGuildRoleJSONBody { /** * Name of the role * * @defaultValue `"new role"` */ name?: string | null | undefined; /** * Bitwise value of the enabled/disabled permissions * * @defaultValue * Default role permissions in guild */ permissions?: Permissions | null | undefined; /** * RGB color value * * @defaultValue `0` */ color?: number | null | undefined; /** * Whether the role should be displayed separately in the sidebar * * @defaultValue `false` */ hoist?: boolean | null | undefined; /** * The role's icon image (if the guild has the `ROLE_ICONS` feature) */ icon?: string | null | undefined; /** * The role's unicode emoji as a standard emoji (if the guild has the `ROLE_ICONS` feature) */ unicode_emoji?: string | null | undefined; /** * Whether the role should be mentionable * * @defaultValue `false` */ mentionable?: boolean | null | undefined; } /** * @see {@link https://discord.com/developers/docs/resources/guild#create-guild-role} */ export type RESTPostAPIGuildRoleResult = APIRole; /** * @see {@link https://discord.com/developers/docs/resources/guild#modify-guild-role-positions} */ export type RESTPatchAPIGuildRolePositionsJSONBody = { /** * Role id */ id: Snowflake; /** * Sorting position of the role */ position?: number | undefined; }[]; /** * @see {@link https://discord.com/developers/docs/resources/guild#modify-guild-role-positions} */ export type RESTPatchAPIGuildRolePositionsResult = APIRole[]; /** * @see {@link https://discord.com/developers/docs/resources/guild#modify-guild-role} */ export interface RESTPatchAPIGuildRoleJSONBody { /** * Name of the role */ name?: string | null | undefined; /** * Bitwise value of the enabled/disabled permissions */ permissions?: Permissions | null | undefined; /** * RGB color value */ color?: number | null | undefined; /** * Whether the role should be displayed separately in the sidebar */ hoist?: boolean | null | undefined; /** * The role's icon image (if the guild has the `ROLE_ICONS` feature) */ icon?: string | null | undefined; /** * The role's unicode emoji as a standard emoji (if the guild has the `ROLE_ICONS` feature) */ unicode_emoji?: string | null | undefined; /** * Whether the role should be mentionable */ mentionable?: boolean | null | undefined; } /** * @see {@link https://discord.com/developers/docs/resources/guild#get-guild-role} */ export type RESTGetAPIGuildRoleResult = APIRole; /** * @see {@link https://discord.com/developers/docs/resources/guild#modify-guild-role} */ export type RESTPatchAPIGuildRoleResult = APIRole; /** * @see {@link https://discord.com/developers/docs/resources/guild#delete-guild-role} */ export type RESTDeleteAPIGuildRoleResult = never; /** * @see {@link https://discord.com/developers/docs/resources/guild#get-guild-prune-count} */ export interface RESTGetAPIGuildPruneCountQuery { /** * Number of days to count prune for (1 or more) * * @defaultValue `7` */ days?: number; /** * Role(s) to include * * While this is typed as a string, it represents an array of * role IDs delimited by commas * * @see {@link https://discord.com/developers/docs/resources/guild#get-guild-prune-count-query-string-params} */ include_roles?: string; } /** * @see {@link https://discord.com/developers/docs/resources/guild#get-guild-prune-count} */ export interface RESTGetAPIGuildPruneCountResult { pruned: number; } /** * @see {@link https://discord.com/developers/docs/resources/guild#begin-guild-prune} */ export interface RESTPostAPIGuildPruneJSONBody { /** * Number of days to count prune for (1 or more) * * @defaultValue `7` */ days?: number | undefined; /** * Whether `pruned` is returned, discouraged for large guilds * * @defaultValue `true` */ compute_prune_count?: boolean | undefined; /** * Role(s) to include */ include_roles?: Snowflake[] | undefined; } /** * @see {@link https://discord.com/developers/docs/resources/guild#begin-guild-prune} */ export interface RESTPostAPIGuildPruneResult { pruned: number | null; } /** * @see {@link https://discord.com/developers/docs/resources/guild#get-guild-voice-regions} */ export type RESTGetAPIGuildVoiceRegionsResult = APIVoiceRegion[]; /** * @see {@link https://discord.com/developers/docs/resources/guild#get-guild-invites} */ export type RESTGetAPIGuildInvitesResult = APIExtendedInvite[]; /** * @see {@link https://discord.com/developers/docs/resources/guild#get-guild-integrations} */ export type RESTGetAPIGuildIntegrationsResult = APIGuildIntegration[]; /** * @see {@link https://discord.com/developers/docs/resources/guild#delete-guild-integration} */ export type RESTDeleteAPIGuildIntegrationResult = never; /** * @see {@link https://discord.com/developers/docs/resources/guild#get-guild-widget-settings} */ export type RESTGetAPIGuildWidgetSettingsResult = APIGuildWidgetSettings; /** * @see {@link https://discord.com/developers/docs/resources/guild#modify-guild-widget} */ export type RESTPatchAPIGuildWidgetSettingsJSONBody = _StrictPartial<APIGuildWidgetSettings>; /** * @see {@link https://discord.com/developers/docs/resources/guild#modify-guild-widget} */ export type RESTPatchAPIGuildWidgetSettingsResult = APIGuildWidgetSettings; /** * @see {@link https://discord.com/developers/docs/resources/guild#get-guild-widget} */ export type RESTGetAPIGuildWidgetJSONResult = APIGuildWidget; /** * @see {@link https://discord.com/developers/docs/resources/guild#get-guild-vanity-url} */ export interface RESTGetAPIGuildVanityUrlResult { code: string | null; uses: number; } /** * @see {@link https://discord.com/developers/docs/resources/guild#get-guild-widget-image} */ export interface RESTGetAPIGuildWidgetImageQuery { /** * Style of the widget image returned * * @defaultValue `"shield"` */ style?: GuildWidgetStyle; } /** * Note: while the return type is `ArrayBuffer`, the expected result is * a buffer of sorts (depends if in browser or on node.js/deno). */ export type RESTGetAPIGuildWidgetImageResult = ArrayBuffer; export type RESTGetAPIGuildMemberVerificationResult = APIGuildMembershipScreening; export interface RESTPatchAPIGuildMemberVerificationJSONBody { /** * Whether Membership Screening is enabled */ enabled?: boolean | undefined; /** * Array of field objects serialized in a string */ form_fields?: string | undefined; /** * The server description to show in the screening form */ description?: string | null | undefined; } export type RESTPatchAPIGuildMemberVerificationResult = APIGuildMembershipScreening; /** * @see {@link https://discord.com/developers/docs/resources/guild#get-guild-welcome-screen} */ export type RESTGetAPIGuildWelcomeScreenResult = APIGuildWelcomeScreen; /** * @see {@link https://discord.com/developers/docs/resources/guild#modify-guild-welcome-screen} */ export type RESTPatchAPIGuildWelcomeScreenJSONBody = _Nullable<_StrictPartial<APIGuildWelcomeScreen>> & { /** * Whether the welcome screen is enabled */ enabled?: boolean | null | undefined; }; /** * @see {@link https://discord.com/developers/docs/resources/guild#modify-guild-welcome-screen} */ export type RESTPatchAPIGuildWelcomeScreenResult = APIGuildWelcomeScreen; /** * @see {@link https://discord.com/developers/docs/resources/guild#get-guild-onboarding} */ export type RESTGetAPIGuildOnboardingResult = APIGuildOnboarding; /** * @see {@link https://discord.com/developers/docs/resources/guild#modify-guild-onboarding} */ export type RESTPutAPIGuildOnboardingJSONBody = _AddUndefinedToPossiblyUndefinedPropertiesOfInterface<Partial<Pick<APIGuildOnboarding, 'default_channel_ids' | 'enabled' | 'mode'>>> & { /** * Prompts shown during onboarding and in customize community */ prompts?: RESTAPIGuildOnboardingPrompt[] | undefined; }; export interface RESTAPIGuildOnboardingPrompt extends _AddUndefinedToPossiblyUndefinedPropertiesOfInterface<Partial<Omit<APIGuildOnboardingPrompt, 'guild_id' | 'id' | 'options' | 'title'>>>, Pick<APIGuildOnboardingPrompt, 'id' | 'title'> { /** * Options available within the prompt */ options: RESTAPIGuildOnboardingPromptOption[]; } /** * @deprecated Use {@link RESTAPIGuildOnboardingPrompt} instead. */ export type RESTAPIModifyGuildOnboardingPromptData = RESTAPIGuildOnboardingPrompt; export interface RESTAPIGuildOnboardingPromptOption extends _AddUndefinedToPossiblyUndefinedPropertiesOfInterface<Partial<Omit<APIGuildOnboardingPromptOption, 'emoji' | 'guild_id' | 'title'>>>, Pick<APIGuildOnboardingPromptOption, 'title'> { /** * Emoji id */ emoji_id?: Snowflake | null | undefined; /** * Emoji name */ emoji_name?: string | null | undefined; /** * Whether this emoji is animated */ emoji_animated?: boolean | null | undefined; } /** * @deprecated Use {@link RESTAPIGuildOnboardingPromptOption} instead. */ export type RESTAPIModifyGuildOnboardingPromptOptionData = RESTAPIGuildOnboardingPromptOption; /** * @see {@link https://discord.com/developers/docs/resources/guild#modify-guild-onboarding} */ export type RESTPutAPIGuildOnboardingResult = APIGuildOnboarding; /** * @see {@link https://discord.com/developers/docs/resources/guild#modify-incidents-actions} */ export interface RESTPutAPIGuildIncidentActionsJSONBody { /** * When invites will be enabled again */ invites_disabled_until?: string | undefined; /** * When direct messages will be enabled again */ dms_disabled_until?: string | undefined; } //# sourceMappingURL=guild.d.ts.map node_modules/discord-api-types/rest/v9/index.d.ts 0000664 00000114345 15114741631 0016012 0 ustar 00 import type { Snowflake } from '../../globals'; export * from '../common'; export type * from './application'; export type * from './auditLog'; export type * from './autoModeration'; export * from './channel'; export type * from './emoji'; export type * from './gateway'; export type * from './guild'; export type * from './guildScheduledEvent'; export type * from './interactions'; export type * from './invite'; export * from './monetization'; export type * from './oauth2'; export type * from './poll'; export type * from './soundboard'; export type * from './stageInstance'; export type * from './sticker'; export type * from './template'; export type * from './user'; export type * from './voice'; export type * from './webhook'; export declare const APIVersion = "9"; export declare const Routes: { /** * Route for: * - GET `/applications/{application.id}/role-connections/metadata` * - PUT `/applications/{application.id}/role-connections/metadata` */ applicationRoleConnectionMetadata(applicationId: Snowflake): `/applications/${string}/role-connections/metadata`; /** * Route for: * - GET `/guilds/{guild.id}/auto-moderation/rules` * - POST `/guilds/{guild.id}/auto-moderation/rules` */ guildAutoModerationRules(guildId: Snowflake): `/guilds/${string}/auto-moderation/rules`; /** * Routes for: * - GET `/guilds/{guild.id}/auto-moderation/rules/{rule.id}` * - PATCH `/guilds/{guild.id}/auto-moderation/rules/{rule.id}` * - DELETE `/guilds/{guild.id}/auto-moderation/rules/{rule.id}` */ guildAutoModerationRule(guildId: Snowflake, ruleId: Snowflake): `/guilds/${string}/auto-moderation/rules/${string}`; /** * Route for: * - GET `/guilds/{guild.id}/audit-logs` */ guildAuditLog(guildId: Snowflake): `/guilds/${string}/audit-logs`; /** * Route for: * - GET `/channels/{channel.id}` * - PATCH `/channels/{channel.id}` * - DELETE `/channels/{channel.id}` */ channel(channelId: Snowflake): `/channels/${string}`; /** * Route for: * - GET `/channels/{channel.id}/messages` * - POST `/channels/{channel.id}/messages` */ channelMessages(channelId: Snowflake): `/channels/${string}/messages`; /** * Route for: * - GET `/channels/{channel.id}/messages/{message.id}` * - PATCH `/channels/{channel.id}/messages/{message.id}` * - DELETE `/channels/{channel.id}/messages/{message.id}` */ channelMessage(channelId: Snowflake, messageId: Snowflake): `/channels/${string}/messages/${string}`; /** * Route for: * - POST `/channels/{channel.id}/messages/{message.id}/crosspost` */ channelMessageCrosspost(channelId: Snowflake, messageId: Snowflake): `/channels/${string}/messages/${string}/crosspost`; /** * Route for: * - PUT `/channels/{channel.id}/messages/{message.id}/reactions/{emoji}/@me` * - DELETE `/channels/{channel.id}/messages/{message.id}/reactions/{emoji}/@me` * * **Note**: You need to URL encode the emoji yourself */ channelMessageOwnReaction(channelId: Snowflake, messageId: Snowflake, emoji: string): `/channels/${string}/messages/${string}/reactions/${string}/@me`; /** * Route for: * - DELETE `/channels/{channel.id}/messages/{message.id}/reactions/{emoji}/{user.id}` * * **Note**: You need to URL encode the emoji yourself */ channelMessageUserReaction(channelId: Snowflake, messageId: Snowflake, emoji: string, userId: Snowflake): `/channels/${string}/messages/${string}/reactions/${string}/${string}`; /** * Route for: * - GET `/channels/{channel.id}/messages/{message.id}/reactions/{emoji}` * - DELETE `/channels/{channel.id}/messages/{message.id}/reactions/{emoji}` * * **Note**: You need to URL encode the emoji yourself */ channelMessageReaction(channelId: Snowflake, messageId: Snowflake, emoji: string): `/channels/${string}/messages/${string}/reactions/${string}`; /** * Route for: * - DELETE `/channels/{channel.id}/messages/{message.id}/reactions` */ channelMessageAllReactions(channelId: Snowflake, messageId: Snowflake): `/channels/${string}/messages/${string}/reactions`; /** * Route for: * - POST `/channels/{channel.id}/messages/bulk-delete` */ channelBulkDelete(channelId: Snowflake): `/channels/${string}/messages/bulk-delete`; /** * Route for: * - PUT `/channels/{channel.id}/permissions/{overwrite.id}` * - DELETE `/channels/{channel.id}/permissions/{overwrite.id}` */ channelPermission(channelId: Snowflake, overwriteId: Snowflake): `/channels/${string}/permissions/${string}`; /** * Route for: * - GET `/channels/{channel.id}/invites` * - POST `/channels/{channel.id}/invites` */ channelInvites(channelId: Snowflake): `/channels/${string}/invites`; /** * Route for: * - POST `/channels/{channel.id}/followers` */ channelFollowers(channelId: Snowflake): `/channels/${string}/followers`; /** * Route for: * - POST `/channels/{channel.id}/typing` */ channelTyping(channelId: Snowflake): `/channels/${string}/typing`; /** * Route for: * - GET `/channels/{channel.id}/pins` */ channelPins(channelId: Snowflake): `/channels/${string}/pins`; /** * Route for: * - PUT `/channels/{channel.id}/pins/{message.id}` * - DELETE `/channels/{channel.id}/pins/{message.id}` */ channelPin(channelId: Snowflake, messageId: Snowflake): `/channels/${string}/pins/${string}`; /** * Route for: * - PUT `/channels/{channel.id}/recipients/{user.id}` * - DELETE `/channels/{channel.id}/recipients/{user.id}` */ channelRecipient(channelId: Snowflake, userId: Snowflake): `/channels/${string}/recipients/${string}`; /** * Route for: * - GET `/guilds/{guild.id}/emojis` * - POST `/guilds/{guild.id}/emojis` */ guildEmojis(guildId: Snowflake): `/guilds/${string}/emojis`; /** * Route for: * - GET `/guilds/{guild.id}/emojis/{emoji.id}` * - PATCH `/guilds/{guild.id}/emojis/{emoji.id}` * - DELETE `/guilds/{guild.id}/emojis/{emoji.id}` */ guildEmoji(guildId: Snowflake, emojiId: Snowflake): `/guilds/${string}/emojis/${string}`; /** * Route for: * - POST `/guilds` */ guilds(): "/guilds"; /** * Route for: * - GET `/guilds/{guild.id}` * - PATCH `/guilds/{guild.id}` * - DELETE `/guilds/{guild.id}` */ guild(guildId: Snowflake): `/guilds/${string}`; /** * Route for: * - GET `/guilds/{guild.id}/preview` */ guildPreview(guildId: Snowflake): `/guilds/${string}/preview`; /** * Route for: * - GET `/guilds/{guild.id}/channels` * - POST `/guilds/{guild.id}/channels` * - PATCH `/guilds/{guild.id}/channels` */ guildChannels(guildId: Snowflake): `/guilds/${string}/channels`; /** * Route for: * - GET `/guilds/{guild.id}/members/{user.id}` * - PUT `/guilds/{guild.id}/members/{user.id}` * - PATCH `/guilds/{guild.id}/members/@me` * - PATCH `/guilds/{guild.id}/members/{user.id}` * - DELETE `/guilds/{guild.id}/members/{user.id}` */ guildMember(guildId: Snowflake, userId?: Snowflake | "@me"): `/guilds/${string}/members/${string}`; /** * Route for: * - GET `/guilds/{guild.id}/members` */ guildMembers(guildId: Snowflake): `/guilds/${string}/members`; /** * Route for: * - GET `/guilds/{guild.id}/members/search` */ guildMembersSearch(guildId: Snowflake): `/guilds/${string}/members/search`; /** * Route for: * - PATCH `/guilds/{guild.id}/members/@me/nick` * * @deprecated Use {@link Routes.guildMember} instead. */ guildCurrentMemberNickname(guildId: Snowflake): `/guilds/${string}/members/@me/nick`; /** * Route for: * - PUT `/guilds/{guild.id}/members/{user.id}/roles/{role.id}` * - DELETE `/guilds/{guild.id}/members/{user.id}/roles/{role.id}` */ guildMemberRole(guildId: Snowflake, memberId: Snowflake, roleId: Snowflake): `/guilds/${string}/members/${string}/roles/${string}`; /** * Route for: * - POST `/guilds/{guild.id}/mfa` */ guildMFA(guildId: Snowflake): `/guilds/${string}/mfa`; /** * Route for: * - GET `/guilds/{guild.id}/bans` */ guildBans(guildId: Snowflake): `/guilds/${string}/bans`; /** * Route for: * - GET `/guilds/{guild.id}/bans/{user.id}` * - PUT `/guilds/{guild.id}/bans/{user.id}` * - DELETE `/guilds/{guild.id}/bans/{user.id}` */ guildBan(guildId: Snowflake, userId: Snowflake): `/guilds/${string}/bans/${string}`; /** * Route for: * - GET `/guilds/{guild.id}/roles` * - POST `/guilds/{guild.id}/roles` * - PATCH `/guilds/{guild.id}/roles` */ guildRoles(guildId: Snowflake): `/guilds/${string}/roles`; /** * Route for: * - GET `/guilds/{guild.id}/roles/{role.id}` * - PATCH `/guilds/{guild.id}/roles/{role.id}` * - DELETE `/guilds/{guild.id}/roles/{role.id}` */ guildRole(guildId: Snowflake, roleId: Snowflake): `/guilds/${string}/roles/${string}`; /** * Route for: * - GET `/guilds/{guild.id}/prune` * - POST `/guilds/{guild.id}/prune` */ guildPrune(guildId: Snowflake): `/guilds/${string}/prune`; /** * Route for: * - GET `/guilds/{guild.id}/regions` */ guildVoiceRegions(guildId: Snowflake): `/guilds/${string}/regions`; /** * Route for: * - GET `/guilds/{guild.id}/invites` */ guildInvites(guildId: Snowflake): `/guilds/${string}/invites`; /** * Route for: * - GET `/guilds/{guild.id}/integrations` */ guildIntegrations(guildId: Snowflake): `/guilds/${string}/integrations`; /** * Route for: * - DELETE `/guilds/{guild.id}/integrations/{integration.id}` */ guildIntegration(guildId: Snowflake, integrationId: Snowflake): `/guilds/${string}/integrations/${string}`; /** * Route for: * - GET `/guilds/{guild.id}/widget` * - PATCH `/guilds/{guild.id}/widget` */ guildWidgetSettings(guildId: Snowflake): `/guilds/${string}/widget`; /** * Route for: * - GET `/guilds/{guild.id}/widget.json` */ guildWidgetJSON(guildId: Snowflake): `/guilds/${string}/widget.json`; /** * Route for: * - GET `/guilds/{guild.id}/vanity-url` */ guildVanityUrl(guildId: Snowflake): `/guilds/${string}/vanity-url`; /** * Route for: * - GET `/guilds/{guild.id}/widget.png` */ guildWidgetImage(guildId: Snowflake): `/guilds/${string}/widget.png`; /** * Route for: * - GET `/invites/{invite.code}` * - DELETE `/invites/{invite.code}` */ invite(code: string): `/invites/${string}`; /** * Route for: * - GET `/guilds/templates/{template.code}` * - POST `/guilds/templates/{template.code}` */ template(code: string): `/guilds/templates/${string}`; /** * Route for: * - GET `/guilds/{guild.id}/templates` * - POST `/guilds/{guild.id}/templates` */ guildTemplates(guildId: Snowflake): `/guilds/${string}/templates`; /** * Route for: * - PUT `/guilds/{guild.id}/templates/{template.code}` * - PATCH `/guilds/{guild.id}/templates/{template.code}` * - DELETE `/guilds/{guild.id}/templates/{template.code}` */ guildTemplate(guildId: Snowflake, code: string): `/guilds/${string}/templates/${string}`; /** * Route for: * - GET `/channels/{channel.id}/polls/{message.id}/answers/{answer_id}` */ pollAnswerVoters(channelId: Snowflake, messageId: Snowflake, answerId: number): `/channels/${string}/polls/${string}/answers/${number}`; /** * Route for: * - POST `/channels/{channel.id}/polls/{message.id}/expire` */ expirePoll(channelId: Snowflake, messageId: Snowflake): `/channels/${string}/polls/${string}/expire`; /** * Route for: * - POST `/channels/{channel.id}/threads` * - POST `/channels/{channel.id}/messages/{message.id}/threads` */ threads(parentId: Snowflake, messageId?: Snowflake): `/channels/${Snowflake}/messages/${Snowflake}/threads` | `/channels/${Snowflake}/threads`; /** * Route for: * - GET `/guilds/{guild.id}/threads/active` */ guildActiveThreads(guildId: Snowflake): `/guilds/${string}/threads/active`; /** * Route for: * - GET `/channels/{channel.id}/threads/active` * (deprecated, removed in API v10, use {@link https://discord.com/developers/docs/resources/guild#list-active-threads | List Active Guild Threads} instead.) * - GET `/channels/{channel.id}/threads/archived/public` * - GET `/channels/{channel.id}/threads/archived/private` */ channelThreads(channelId: Snowflake, archived?: "private" | "public"): `/channels/${Snowflake}/threads/active` | `/channels/${Snowflake}/threads/archived/${"private" | "public"}`; /** * Route for: * - GET `/channels/{channel.id}/users/@me/threads/archived/private` */ channelJoinedArchivedThreads(channelId: Snowflake): `/channels/${string}/users/@me/threads/archived/private`; /** * Route for: * - GET `/channels/{thread.id}/thread-members` * - GET `/channels/{thread.id}/thread-members/{user.id}` * - PUT `/channels/{thread.id}/thread-members/@me` * - PUT `/channels/{thread.id}/thread-members/{user.id}` * - DELETE `/channels/{thread.id}/thread-members/@me` * - DELETE `/channels/{thread.id}/thread-members/{user.id}` */ threadMembers(threadId: Snowflake, userId?: Snowflake | "@me"): `/channels/${Snowflake}/thread-members/${Snowflake | "@me"}` | `/channels/${Snowflake}/thread-members`; /** * Route for: * - GET `/users/@me` * - GET `/users/{user.id}` * - PATCH `/users/@me` * * @param userId - The user ID, defaulted to `@me` */ user(userId?: Snowflake | "@me"): `/users/${string}`; /** * Route for: * - GET `/users/@me/applications/{application.id}/role-connection` * - PUT `/users/@me/applications/{application.id}/role-connection` */ userApplicationRoleConnection(applicationId: Snowflake): `/users/@me/applications/${string}/role-connection`; /** * Route for: * - GET `/users/@me/guilds` */ userGuilds(): "/users/@me/guilds"; /** * Route for: * - GET `/users/@me/guilds/{guild.id}/member` */ userGuildMember(guildId: Snowflake): `/users/@me/guilds/${string}/member`; /** * Route for: * - DELETE `/users/@me/guilds/{guild.id}` */ userGuild(guildId: Snowflake): `/users/@me/guilds/${string}`; /** * Route for: * - POST `/users/@me/channels` */ userChannels(): "/users/@me/channels"; /** * Route for: * - GET `/users/@me/connections` */ userConnections(): "/users/@me/connections"; /** * Route for: * - GET `/voice/regions` */ voiceRegions(): "/voice/regions"; /** * Route for: * - GET `/channels/{channel.id}/webhooks` * - POST `/channels/{channel.id}/webhooks` */ channelWebhooks(channelId: Snowflake): `/channels/${string}/webhooks`; /** * Route for: * - GET `/guilds/{guild.id}/webhooks` */ guildWebhooks(guildId: Snowflake): `/guilds/${string}/webhooks`; /** * Route for: * - GET `/webhooks/{webhook.id}` * - GET `/webhooks/{webhook.id}/{webhook.token}` * - PATCH `/webhooks/{webhook.id}` * - PATCH `/webhooks/{webhook.id}/{webhook.token}` * - DELETE `/webhooks/{webhook.id}` * - DELETE `/webhooks/{webhook.id}/{webhook.token}` * - POST `/webhooks/{webhook.id}/{webhook.token}` * * - POST `/webhooks/{application.id}/{interaction.token}` */ webhook(webhookId: Snowflake, webhookToken?: string): `/webhooks/${Snowflake}/${string}` | `/webhooks/${Snowflake}`; /** * Route for: * - GET `/webhooks/{webhook.id}/{webhook.token}/messages/@original` * - GET `/webhooks/{webhook.id}/{webhook.token}/messages/{message.id}` * - PATCH `/webhooks/{webhook.id}/{webhook.token}/messages/@original` * - PATCH `/webhooks/{webhook.id}/{webhook.token}/messages/{message.id}` * - DELETE `/webhooks/{webhook.id}/{webhook.token}/messages/@original` * - DELETE `/webhooks/{webhook.id}/{webhook.token}/messages/{message.id}` * * - PATCH `/webhooks/{application.id}/{interaction.token}/messages/@original` * - PATCH `/webhooks/{application.id}/{interaction.token}/messages/{message.id}` * - DELETE `/webhooks/{application.id}/{interaction.token}/messages/{message.id}` */ webhookMessage(webhookId: Snowflake, webhookToken: string, messageId?: Snowflake | "@original"): `/webhooks/${string}/${string}/messages/${string}`; /** * Route for: * - POST `/webhooks/{webhook.id}/{webhook.token}/github` * - POST `/webhooks/{webhook.id}/{webhook.token}/slack` */ webhookPlatform(webhookId: Snowflake, webhookToken: string, platform: "github" | "slack"): `/webhooks/${string}/${string}/github` | `/webhooks/${string}/${string}/slack`; /** * Route for: * - GET `/gateway` */ gateway(): "/gateway"; /** * Route for: * - GET `/gateway/bot` */ gatewayBot(): "/gateway/bot"; /** * Route for: * - GET `/oauth2/applications/@me` */ oauth2CurrentApplication(): "/oauth2/applications/@me"; /** * Route for: * - GET `/oauth2/@me` */ oauth2CurrentAuthorization(): "/oauth2/@me"; /** * Route for: * - GET `/oauth2/authorize` */ oauth2Authorization(): "/oauth2/authorize"; /** * Route for: * - POST `/oauth2/token` */ oauth2TokenExchange(): "/oauth2/token"; /** * Route for: * - POST `/oauth2/token/revoke` */ oauth2TokenRevocation(): "/oauth2/token/revoke"; /** * Route for: * - GET `/applications/{application.id}/commands` * - PUT `/applications/{application.id}/commands` * - POST `/applications/{application.id}/commands` */ applicationCommands(applicationId: Snowflake): `/applications/${string}/commands`; /** * Route for: * - GET `/applications/{application.id}/commands/{command.id}` * - PATCH `/applications/{application.id}/commands/{command.id}` * - DELETE `/applications/{application.id}/commands/{command.id}` */ applicationCommand(applicationId: Snowflake, commandId: Snowflake): `/applications/${string}/commands/${string}`; /** * Route for: * - GET `/applications/{application.id}/guilds/{guild.id}/commands` * - PUT `/applications/{application.id}/guilds/{guild.id}/commands` * - POST `/applications/{application.id}/guilds/{guild.id}/commands` */ applicationGuildCommands(applicationId: Snowflake, guildId: Snowflake): `/applications/${string}/guilds/${string}/commands`; /** * Route for: * - GET `/applications/{application.id}/guilds/{guild.id}/commands/{command.id}` * - PATCH `/applications/{application.id}/guilds/{guild.id}/commands/{command.id}` * - DELETE `/applications/{application.id}/guilds/{guild.id}/commands/{command.id}` */ applicationGuildCommand(applicationId: Snowflake, guildId: Snowflake, commandId: Snowflake): `/applications/${string}/guilds/${string}/commands/${string}`; /** * Route for: * - POST `/interactions/{interaction.id}/{interaction.token}/callback` */ interactionCallback(interactionId: Snowflake, interactionToken: string): `/interactions/${string}/${string}/callback`; /** * Route for: * - GET `/guilds/{guild.id}/member-verification` * - PATCH `/guilds/{guild.id}/member-verification` */ guildMemberVerification(guildId: Snowflake): `/guilds/${string}/member-verification`; /** * Route for: * - GET `/guilds/{guild.id}/voice-states/@me` * - GET `/guilds/{guild.id}/voice-states/{user.id}` * - PATCH `/guilds/{guild.id}/voice-states/@me` * - PATCH `/guilds/{guild.id}/voice-states/{user.id}` */ guildVoiceState(guildId: Snowflake, userId?: Snowflake | "@me"): `/guilds/${string}/voice-states/${string}`; /** * Route for: * - GET `/applications/{application.id}/guilds/{guild.id}/commands/permissions` * - PUT `/applications/{application.id}/guilds/{guild.id}/commands/permissions` */ guildApplicationCommandsPermissions(applicationId: Snowflake, guildId: Snowflake): `/applications/${string}/guilds/${string}/commands/permissions`; /** * Route for: * - GET `/applications/{application.id}/guilds/{guild.id}/commands/{command.id}/permissions` * - PUT `/applications/{application.id}/guilds/{guild.id}/commands/{command.id}/permissions` */ applicationCommandPermissions(applicationId: Snowflake, guildId: Snowflake, commandId: Snowflake): `/applications/${string}/guilds/${string}/commands/${string}/permissions`; /** * Route for: * - GET `/guilds/{guild.id}/welcome-screen` * - PATCH `/guilds/{guild.id}/welcome-screen` */ guildWelcomeScreen(guildId: Snowflake): `/guilds/${string}/welcome-screen`; /** * Route for: * - POST `/stage-instances` */ stageInstances(): "/stage-instances"; /** * Route for: * - GET `/stage-instances/{channel.id}` * - PATCH `/stage-instances/{channel.id}` * - DELETE `/stage-instances/{channel.id}` */ stageInstance(channelId: Snowflake): `/stage-instances/${string}`; /** * Route for: * - GET `/stickers/{sticker.id}` */ sticker(stickerId: Snowflake): `/stickers/${string}`; /** * Route for: * - GET `/sticker-packs` */ stickerPacks(): "/sticker-packs"; /** * Route for: * - GET `/sticker-packs/{pack.id}` */ stickerPack(packId: Snowflake): `/sticker-packs/${string}`; /** * Route for: * - GET `/sticker-packs` * * @deprecated Use {@link Routes.stickerPacks} instead. */ nitroStickerPacks(): "/sticker-packs"; /** * Route for: * - GET `/guilds/{guild.id}/stickers` * - POST `/guilds/{guild.id}/stickers` */ guildStickers(guildId: Snowflake): `/guilds/${string}/stickers`; /** * Route for: * - GET `/guilds/{guild.id}/stickers/{sticker.id}` * - PATCH `/guilds/{guild.id}/stickers/{sticker.id}` * - DELETE `/guilds/{guild.id}/stickers/{sticker.id}` */ guildSticker(guildId: Snowflake, stickerId: Snowflake): `/guilds/${string}/stickers/${string}`; /** * Route for: * - GET `/guilds/{guild.id}/scheduled-events` * - POST `/guilds/{guild.id}/scheduled-events` */ guildScheduledEvents(guildId: Snowflake): `/guilds/${string}/scheduled-events`; /** * Route for: * - GET `/guilds/{guild.id}/scheduled-events/{guildScheduledEvent.id}` * - PATCH `/guilds/{guild.id}/scheduled-events/{guildScheduledEvent.id}` * - DELETE `/guilds/{guild.id}/scheduled-events/{guildScheduledEvent.id}` */ guildScheduledEvent(guildId: Snowflake, guildScheduledEventId: Snowflake): `/guilds/${string}/scheduled-events/${string}`; /** * Route for: * - GET `/guilds/{guild.id}/scheduled-events/{guildScheduledEvent.id}/users` */ guildScheduledEventUsers(guildId: Snowflake, guildScheduledEventId: Snowflake): `/guilds/${string}/scheduled-events/${string}/users`; /** * Route for: * - GET `/guilds/{guild.id}/onboarding` * - PUT `/guilds/{guild.id}/onboarding` */ guildOnboarding(guildId: Snowflake): `/guilds/${string}/onboarding`; /** * Route for: * - PUT `/guilds/${guild.id}/incident-actions` */ guildIncidentActions(guildId: Snowflake): `/guilds/${string}/incident-actions`; /** * Route for: * - GET `/applications/@me` * - PATCH `/applications/@me` */ currentApplication(): "/applications/@me"; /** * Route for: * - GET `/applications/{application.id}/entitlements` * - POST `/applications/{application.id}/entitlements` */ entitlements(applicationId: Snowflake): `/applications/${string}/entitlements`; /** * Route for: * - GET `/applications/{application.id}/entitlements/{entitlement.id}` * - DELETE `/applications/{application.id}/entitlements/{entitlement.id}` */ entitlement(applicationId: Snowflake, entitlementId: Snowflake): `/applications/${string}/entitlements/${string}`; /** * Route for: * - GET `/applications/{application.id}/skus` */ skus(applicationId: Snowflake): `/applications/${string}/skus`; /** * Route for: * - POST `/guilds/{guild.id}/bulk-ban` */ guildBulkBan(guildId: Snowflake): `/guilds/${string}/bulk-ban`; /** * Route for: * - POST `/applications/{application.id}/entitlements/{entitlement.id}/consume` */ consumeEntitlement(applicationId: Snowflake, entitlementId: Snowflake): `/applications/${string}/entitlements/${string}/consume`; /** * Route for: * - GET `/applications/{application.id}/emojis` * - POST `/applications/{application.id}/emojis` */ applicationEmojis(applicationId: Snowflake): `/applications/${string}/emojis`; /** * Route for: * - GET `/applications/{application.id}/emojis/{emoji.id}` * - PATCH `/applications/{application.id}/emojis/{emoji.id}` * - DELETE `/applications/{application.id}/emojis/{emoji.id}` */ applicationEmoji(applicationId: Snowflake, emojiId: Snowflake): `/applications/${string}/emojis/${string}`; /** * Route for: * - GET `/skus/{sku.id}/subscriptions` */ skuSubscriptions(skuId: Snowflake): `/skus/${string}/subscriptions`; /** * Route for: * - GET `/skus/{sku.id}/subscriptions/{subscription.id}` */ skuSubscription(skuId: Snowflake, subscriptionId: Snowflake): `/skus/${string}/subscriptions/${string}`; /** * Route for: * - POST `/channels/{channel.id}/send-soundboard-sound` */ sendSoundboardSound(channelId: Snowflake): `/channels/${string}/send-soundboard-sound`; /** * Route for: * - GET `/soundboard-default-sounds` */ soundboardDefaultSounds(): "/soundboard-default-sounds"; /** * Route for: * - GET `/guilds/{guild.id}/soundboard-sounds` * - POST `/guilds/{guild.id}/soundboard-sounds` */ guildSoundboardSounds(guildId: Snowflake): `/guilds/${string}/soundboard-sounds`; /** * Route for: * - GET `/guilds/{guild.id}/soundboard-sounds/{sound.id}` * - PATCH `/guilds/{guild.id}/soundboard-sounds/{sound.id}` * - DELETE `/guilds/{guild.id}/soundboard-sounds/{sound.id}` */ guildSoundboardSound(guildId: Snowflake, soundId: Snowflake): `/guilds/${string}/soundboard-sounds/${string}`; }; export declare const StickerPackApplicationId = "710982414301790216"; export type ImageSize = 1024 | 2048 | 4096 | 16 | 32 | 64 | 128 | 256 | 512 | (number & {}); export declare enum ImageFormat { JPEG = "jpeg", PNG = "png", WebP = "webp", GIF = "gif", Lottie = "json" } export declare const CDNRoutes: { /** * Route for: * - GET `/emojis/{emoji.id}.{png|jpeg|webp|gif}` * * As this route supports GIFs, the hash will begin with `a_` if it is available in GIF format * * This route supports the extensions: PNG, JPEG, WebP, GIF */ emoji<Format extends EmojiFormat>(emojiId: Snowflake, format: Format): `/emojis/${string}.${Format}`; /** * Route for: * - GET `/icons/{guild.id}/{guild.icon}.{png|jpeg|webp|gif}` * * As this route supports GIFs, the hash will begin with `a_` if it is available in GIF format * * This route supports the extensions: PNG, JPEG, WebP, GIF */ guildIcon<Format extends GuildIconFormat>(guildId: Snowflake, guildIcon: string, format: Format): `/icons/${string}/${string}.${Format}`; /** * Route for: * - GET `/splashes/{guild.id}/{guild.splash}.{png|jpeg|webp}` * * This route supports the extensions: PNG, JPEG, WebP */ guildSplash<Format extends GuildSplashFormat>(guildId: Snowflake, guildSplash: string, format: Format): `/splashes/${string}/${string}.${Format}`; /** * Route for: * - GET `/discovery-splashes/{guild.id}/{guild.discovery_splash}.{png|jpeg|webp}` * * This route supports the extensions: PNG, JPEG, WebP */ guildDiscoverySplash<Format extends GuildDiscoverySplashFormat>(guildId: Snowflake, guildDiscoverySplash: string, format: Format): `/discovery-splashes/${string}/${string}.${Format}`; /** * Route for: * - GET `/banners/{guild.id}/{guild.banner}.{png|jpeg|webp|gif}` * * As this route supports GIFs, the hash will begin with `a_` if it is available in GIF format * * This route supports the extensions: PNG, JPEG, WebP, GIF */ guildBanner<Format extends GuildBannerFormat>(guildId: Snowflake, guildBanner: string, format: Format): `/banners/${string}/${string}.${Format}`; /** * Route for: * - GET `/banners/{user.id}/{user.banner}.{png|jpeg|webp|gif}` * * As this route supports GIFs, the hash will begin with `a_` if it is available in GIF format * * This route supports the extensions: PNG, JPEG, WebP, GIF */ userBanner<Format extends UserBannerFormat>(userId: Snowflake, userBanner: string, format: Format): `/banners/${string}/${string}.${Format}`; /** * Route for: * - GET `/embed/avatars/{index}.png` * * The value for `index` parameter depends on whether the user is {@link https://discord.com/developers/docs/change-log#unique-usernames-on-discord | migrated to the new username system}. * For users on the new username system, `index` will be `(user.id >> 22) % 6`. * For users on the legacy username system, `index` will be `user.discriminator % 5`. * * This route supports the extension: PNG */ defaultUserAvatar<Index extends DefaultUserAvatarAssets>(index: Index): `/embed/avatars/${Index}.png`; /** * Route for: * - GET `/avatars/{user.id}/{user.avatar}.{png|jpeg|webp|gif}` * * As this route supports GIFs, the hash will begin with `a_` if it is available in GIF format * * This route supports the extensions: PNG, JPEG, WebP, GIF */ userAvatar<Format extends UserAvatarFormat>(userId: Snowflake, userAvatar: string, format: Format): `/avatars/${string}/${string}.${Format}`; /** * Route for: * - GET `/guilds/{guild.id}/users/{user.id}/avatars/{guild_member.avatar}.{png|jpeg|webp|gif}` * * As this route supports GIFs, the hash will begin with `a_` if it is available in GIF format * * This route supports the extensions: PNG, JPEG, WebP, GIF */ guildMemberAvatar<Format extends GuildMemberAvatarFormat>(guildId: Snowflake, userId: Snowflake, memberAvatar: string, format: Format): `/guilds/${string}/users/${string}/avatars/${string}.${Format}`; /** * Route for: * - GET `/avatar-decorations/{user.id}/{user.avatar_decoration}.png` * * This route supports the extension: PNG * * @deprecated Use {@link CDNRoutes.avatarDecoration} instead. */ userAvatarDecoration(userId: Snowflake, userAvatarDecoration: string): `/avatar-decorations/${string}/${string}.png`; /** * Route for: * - GET `/avatar-decoration-presets/{avatar_decoration_data_asset}.png` * * This route supports the extension: PNG */ avatarDecoration(avatarDecorationDataAsset: string): `/avatar-decoration-presets/${string}.png`; /** * Route for: * - GET `/app-icons/{application.id}/{application.icon}.{png|jpeg|webp}` * * This route supports the extensions: PNG, JPEG, WebP */ applicationIcon<Format extends ApplicationIconFormat>(applicationId: Snowflake, applicationIcon: string, format: Format): `/app-icons/${string}/${string}.${Format}`; /** * Route for: * - GET `/app-icons/{application.id}/{application.cover_image}.{png|jpeg|webp}` * * This route supports the extensions: PNG, JPEG, WebP */ applicationCover<Format extends ApplicationCoverFormat>(applicationId: Snowflake, applicationCoverImage: string, format: Format): `/app-icons/${string}/${string}.${Format}`; /** * Route for: * - GET `/app-assets/{application.id}/{application.asset_id}.{png|jpeg|webp}` * * This route supports the extensions: PNG, JPEG, WebP */ applicationAsset<Format extends ApplicationAssetFormat>(applicationId: Snowflake, applicationAssetId: string, format: Format): `/app-assets/${string}/${string}.${Format}`; /** * Route for: * - GET `/app-assets/{application.id}/achievements/{achievement.id}/icons/{achievement.icon}.{png|jpeg|webp}` * * This route supports the extensions: PNG, JPEG, WebP */ achievementIcon<Format extends AchievementIconFormat>(applicationId: Snowflake, achievementId: Snowflake, achievementIconHash: string, format: Format): `/app-assets/${string}/achievements/${string}/icons/${string}.${Format}`; /** * Route for: * - GET `/app-assets/710982414301790216/store/{sticker_pack.banner.asset_id}.{png|jpeg|webp}` * * This route supports the extensions: PNG, JPEG, WebP */ stickerPackBanner<Format extends StickerPackBannerFormat>(stickerPackBannerAssetId: Snowflake, format: Format): `/app-assets/710982414301790216/store/${string}.${Format}`; /** * Route for: * - GET `/app-assets/${application.id}/store/${asset.id}.{png|jpeg|webp}}` * * This route supports the extensions: PNG, JPEG, WebP */ storePageAsset<Format extends StorePageAssetFormat = ImageFormat.PNG>(applicationId: Snowflake, assetId: string, format?: Format): `/app-assets/${string}/store/${string}.${Format}`; /** * Route for: * - GET `/team-icons/{team.id}/{team.icon}.{png|jpeg|webp}` * * This route supports the extensions: PNG, JPEG, WebP */ teamIcon<Format extends TeamIconFormat>(teamId: Snowflake, teamIcon: string, format: Format): `/team-icons/${string}/${string}.${Format}`; /** * Route for: * - GET `/stickers/{sticker.id}.{png|json}` * * This route supports the extensions: PNG, Lottie, GIF */ sticker<Format extends StickerFormat>(stickerId: Snowflake, format: Format): `/stickers/${string}.${Format}`; /** * Route for: * - GET `/role-icons/{role.id}/{role.icon}.{png|jpeg|webp}` * * This route supports the extensions: PNG, JPEG, WebP */ roleIcon<Format extends RoleIconFormat>(roleId: Snowflake, roleIcon: string, format: Format): `/role-icons/${string}/${string}.${Format}`; /** * Route for: * - GET `/guild-events/{guild_scheduled_event.id}/{guild_scheduled_event.image}.{png|jpeg|webp}` * * This route supports the extensions: PNG, JPEG, WebP */ guildScheduledEventCover<Format extends GuildScheduledEventCoverFormat>(guildScheduledEventId: Snowflake, guildScheduledEventCoverImage: string, format: Format): `/guild-events/${string}/${string}.${Format}`; /** * Route for: * - GET `/guilds/${guild.id}/users/${user.id}/banners/${guild_member.banner}.{png|jpeg|webp|gif}` * * This route supports the extensions: PNG, JPEG, WebP, GIF */ guildMemberBanner<Format extends GuildMemberBannerFormat>(guildId: Snowflake, userId: Snowflake, guildMemberBanner: string, format: Format): `/guilds/${string}/users/${string}/banners/${string}.${Format}`; /** * Route for: * - GET `/soundboard-sounds/${sound.id}` */ soundboardSound(soundId: Snowflake): `/soundboard-sounds/${string}`; }; export type DefaultUserAvatarAssets = 0 | 1 | 2 | 3 | 4 | 5; export type EmojiFormat = Exclude<ImageFormat, ImageFormat.Lottie>; export type GuildIconFormat = Exclude<ImageFormat, ImageFormat.Lottie>; export type GuildSplashFormat = Exclude<ImageFormat, ImageFormat.GIF | ImageFormat.Lottie>; export type GuildDiscoverySplashFormat = Exclude<ImageFormat, ImageFormat.GIF | ImageFormat.Lottie>; export type GuildBannerFormat = Exclude<ImageFormat, ImageFormat.Lottie>; export type UserBannerFormat = Exclude<ImageFormat, ImageFormat.Lottie>; export type DefaultUserAvatarFormat = Extract<ImageFormat, ImageFormat.PNG>; export type UserAvatarFormat = Exclude<ImageFormat, ImageFormat.Lottie>; export type GuildMemberAvatarFormat = Exclude<ImageFormat, ImageFormat.Lottie>; export type ApplicationIconFormat = Exclude<ImageFormat, ImageFormat.GIF | ImageFormat.Lottie>; export type ApplicationCoverFormat = Exclude<ImageFormat, ImageFormat.GIF | ImageFormat.Lottie>; export type ApplicationAssetFormat = Exclude<ImageFormat, ImageFormat.GIF | ImageFormat.Lottie>; export type AchievementIconFormat = Exclude<ImageFormat, ImageFormat.GIF | ImageFormat.Lottie>; export type StickerPackBannerFormat = Exclude<ImageFormat, ImageFormat.GIF | ImageFormat.Lottie>; export type TeamIconFormat = Exclude<ImageFormat, ImageFormat.GIF | ImageFormat.Lottie>; export type StorePageAssetFormat = Exclude<ImageFormat, ImageFormat.GIF | ImageFormat.Lottie>; export type StickerFormat = Extract<ImageFormat, ImageFormat.GIF | ImageFormat.Lottie | ImageFormat.PNG>; export type RoleIconFormat = Exclude<ImageFormat, ImageFormat.GIF | ImageFormat.Lottie>; export type GuildScheduledEventCoverFormat = Exclude<ImageFormat, ImageFormat.GIF | ImageFormat.Lottie>; export type GuildMemberBannerFormat = Exclude<ImageFormat, ImageFormat.Lottie>; /** * @deprecated Use {@link DefaultUserAvatarFormat} instead. */ export type DefaultUserAvatar = DefaultUserAvatarFormat; export interface CDNQuery { /** * The returned image can have the size changed by using this query parameter * * Image size can be any power of two between 16 and 4096 */ size?: ImageSize; } export declare const RouteBases: { readonly api: "https://discord.com/api/v9"; readonly cdn: "https://cdn.discordapp.com"; readonly media: "https://media.discordapp.net"; readonly invite: "https://discord.gg"; readonly template: "https://discord.new"; readonly gift: "https://discord.gift"; readonly scheduledEvent: "https://discord.com/events"; }; export declare const OAuth2Routes: { readonly authorizationURL: "https://discord.com/api/v9/oauth2/authorize"; readonly tokenURL: "https://discord.com/api/v9/oauth2/token"; /** * @see {@link https://tools.ietf.org/html/rfc7009} */ readonly tokenRevocationURL: "https://discord.com/api/v9/oauth2/token/revoke"; }; //# sourceMappingURL=index.d.ts.map node_modules/discord-api-types/rest/v9/guildScheduledEvent.d.ts 0000664 00000010744 15114741631 0020630 0 ustar 00 import type { Snowflake } from '../../globals'; import type { _Nullable, _StrictPartial } from '../../utils/internals'; import type { APIGuildScheduledEvent, APIGuildScheduledEventEntityMetadata, APIGuildScheduledEventRecurrenceRule, APIGuildScheduledEventUser, GuildScheduledEventEntityType, GuildScheduledEventPrivacyLevel, GuildScheduledEventStatus } from '../../v9'; /** * @see {@link https://discord.com/developers/docs/resources/guild-scheduled-event#list-scheduled-events-for-guild} */ export interface RESTGetAPIGuildScheduledEventsQuery { /** * Whether to include number of users subscribed to each event */ with_user_count?: boolean; } /** * @see {@link https://discord.com/developers/docs/resources/guild-scheduled-event#list-scheduled-events-for-guild} */ export type RESTGetAPIGuildScheduledEventsResult = APIGuildScheduledEvent[]; /** * @see {@link https://discord.com/developers/docs/resources/guild-scheduled-event#create-guild-scheduled-event} */ export interface RESTPostAPIGuildScheduledEventJSONBody { /** * The stage channel id of the guild event */ channel_id?: Snowflake | undefined; /** * The name of the guild event */ name: string; /** * The privacy level of the guild event */ privacy_level: GuildScheduledEventPrivacyLevel; /** * The time to schedule the guild event at */ scheduled_start_time: string; /** * The time when the scheduled event is scheduled to end */ scheduled_end_time?: string | undefined; /** * The description of the guild event */ description?: string | undefined; /** * The scheduled entity type of the guild event */ entity_type?: GuildScheduledEventEntityType | undefined; /** * The entity metadata of the scheduled event */ entity_metadata?: APIGuildScheduledEventEntityMetadata | undefined; /** * The cover image of the scheduled event */ image?: string | null | undefined; /** * The definition for how often this event should recur */ recurrence_rule?: APIGuildScheduledEventRecurrenceRule | undefined; } /** * @see {@link https://discord.com/developers/docs/resources/guild-scheduled-event#create-guild-scheduled-event} */ export type RESTPostAPIGuildScheduledEventResult = APIGuildScheduledEvent; /** * @see {@link https://discord.com/developers/docs/resources/guild-scheduled-event#get-guild-scheduled-event} */ export interface RESTGetAPIGuildScheduledEventQuery { /** * Whether to include number of users subscribed to this event */ with_user_count?: boolean; } /** * @see {@link https://discord.com/developers/docs/resources/guild-scheduled-event#get-guild-scheduled-event} */ export type RESTGetAPIGuildScheduledEventResult = APIGuildScheduledEvent; /** * @see {@link https://discord.com/developers/docs/resources/guild-scheduled-event#modify-guild-scheduled-event} */ export interface RESTPatchAPIGuildScheduledEventJSONBody extends _Nullable<Pick<RESTPostAPIGuildScheduledEventJSONBody, 'description' | 'entity_metadata' | 'recurrence_rule'>>, _StrictPartial<Omit<RESTPostAPIGuildScheduledEventJSONBody, 'description' | 'entity_metadata' | 'recurrence_rule'>> { /** * The status of the scheduled event */ status?: GuildScheduledEventStatus | undefined; } /** * @see {@link https://discord.com/developers/docs/resources/guild-scheduled-event#modify-guild-scheduled-event} */ export type RESTPatchAPIGuildScheduledEventResult = APIGuildScheduledEvent; /** * @see {@link https://discord.com/developers/docs/resources/guild-scheduled-event#delete-guild-scheduled-event} */ export type RESTDeleteAPIGuildScheduledEventResult = never; /** * @see {@link https://discord.com/developers/docs/resources/guild-scheduled-event#get-guild-scheduled-event-users} */ export interface RESTGetAPIGuildScheduledEventUsersQuery { /** * Number of users to receive from the event * * @defaultValue `100` */ limit?: number; /** * Whether to include guild member data if it exists */ with_member?: boolean; /** * Consider only users before given user id */ before?: Snowflake; /** * Consider only users after given user id */ after?: Snowflake; } /** * @see {@link https://discord.com/developers/docs/resources/guild-scheduled-event#get-guild-scheduled-event-users} */ export type RESTGetAPIGuildScheduledEventUsersResult = APIGuildScheduledEventUser[]; //# sourceMappingURL=guildScheduledEvent.d.ts.map node_modules/discord-api-types/rest/v9/auditLog.js.map 0000664 00000000145 15114741631 0016763 0 ustar 00 {"version":3,"file":"auditLog.js","sourceRoot":"","sources":["auditLog.ts"],"names":[],"mappings":""} node_modules/discord-api-types/rest/v9/soundboard.js 0000664 00000000163 15114741631 0016577 0 ustar 00 "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); //# sourceMappingURL=soundboard.js.map node_modules/discord-api-types/rest/v9/monetization.js.map 0000664 00000000347 15114741631 0017737 0 ustar 00 {"version":3,"file":"monetization.js","sourceRoot":"","sources":["monetization.ts"],"names":[],"mappings":";;;AAsFA;;GAEG;AACH,IAAY,oBAGX;AAHD,WAAY,oBAAoB;IAC/B,iEAAS,CAAA;IACT,+DAAI,CAAA;AACL,CAAC,EAHW,oBAAoB,oCAApB,oBAAoB,QAG/B"} node_modules/discord-api-types/rest/v9/template.d.ts.map 0000664 00000001567 15114741631 0017273 0 ustar 00 {"version":3,"file":"template.d.ts","sourceRoot":"","sources":["template.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AACrE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAE5D;;GAEG;AACH,MAAM,MAAM,wBAAwB,GAAG,WAAW,CAAC;AAEnD;;GAEG;AACH,MAAM,WAAW,sCAAsC;IACtD;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;;;OAIG;IACH,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CAC1B;AAED;;GAEG;AACH,MAAM,MAAM,oCAAoC,GAAG,QAAQ,CAAC;AAE5D;;GAEG;AACH,MAAM,MAAM,8BAA8B,GAAG,WAAW,EAAE,CAAC;AAE3D;;GAEG;AACH,MAAM,WAAW,iCAAiC;IACjD;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;CACxC;AAED;;GAEG;AACH,MAAM,MAAM,+BAA+B,GAAG,WAAW,CAAC;AAE1D;;GAEG;AACH,MAAM,MAAM,iCAAiC,GAAG,WAAW,CAAC;AAE5D;;GAEG;AACH,MAAM,MAAM,iCAAiC,GAAG,cAAc,CAAC,iCAAiC,CAAC,CAAC;AAElG;;GAEG;AACH,MAAM,MAAM,+BAA+B,GAAG,WAAW,CAAC;AAE1D;;GAEG;AACH,MAAM,MAAM,gCAAgC,GAAG,WAAW,CAAC"} node_modules/discord-api-types/rest/v9/gateway.d.ts.map 0000664 00000000403 15114741631 0017105 0 ustar 00 {"version":3,"file":"gateway.d.ts","sourceRoot":"","sources":["gateway.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAEjF;;GAEG;AACH,MAAM,MAAM,uBAAuB,GAAG,cAAc,CAAC;AAErD;;GAEG;AACH,MAAM,MAAM,0BAA0B,GAAG,iBAAiB,CAAC"} node_modules/discord-api-types/rest/v9/voice.js.map 0000664 00000000137 15114741631 0016321 0 ustar 00 {"version":3,"file":"voice.js","sourceRoot":"","sources":["voice.ts"],"names":[],"mappings":""} node_modules/discord-api-types/rest/v9/user.js 0000664 00000000155 15114741631 0015416 0 ustar 00 "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); //# sourceMappingURL=user.js.map node_modules/discord-api-types/rest/v9/guild.js 0000664 00000000156 15114741631 0015545 0 ustar 00 "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); //# sourceMappingURL=guild.js.map node_modules/discord-api-types/rest/v9/autoModeration.js 0000664 00000000167 15114741631 0017435 0 ustar 00 "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); //# sourceMappingURL=autoModeration.js.map node_modules/discord-api-types/rest/v9/oauth2.js 0000664 00000000157 15114741631 0015644 0 ustar 00 "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); //# sourceMappingURL=oauth2.js.map node_modules/discord-api-types/rest/v9/soundboard.d.ts 0000664 00000006547 15114741631 0017047 0 ustar 00 import type { Snowflake } from '../../globals'; import type { APISoundboardSound } from '../../payloads/v9/index'; /** * @see {@link https://discord.com/developers/docs/resources/soundboard#send-soundboard-sound} */ export type RESTPostAPISendSoundboardSoundResult = APISoundboardSound; /** * @see {@link https://discord.com/developers/docs/resources/soundboard#send-soundboard-sound-json-params} */ export interface RESTPostAPISoundboardSendSoundJSONBody { /** * The id of the soundboard sound to play */ sound_id: Snowflake; /** * The id of the guild the soundboard sound is from, required to play sounds from different servers */ source_guild_id?: Snowflake | undefined; } /** * @see {@link https://discord.com/developers/docs/resources/soundboard#list-soundboard-default-sounds} */ export type RESTGetAPISoundboardDefaultSoundsResult = APISoundboardSound[]; /** * @see {@link https://discord.com/developers/docs/resources/soundboard#list-guild-soundboard-sounds} */ export interface RESTGetAPIGuildSoundboardSoundsResult { items: APISoundboardSound[]; } /** * @see {@link https://discord.com/developers/docs/resources/soundboard#get-guild-soundboard-sound} */ export type RESTGetAPIGuildSoundboardSoundResult = APISoundboardSound; /** * @see {@link https://discord.com/developers/docs/resources/soundboard#create-guild-soundboard-sound-json-params} */ export interface RESTPostAPIGuildSoundboardSoundJSONBody { /** * The name of the soundboard sound (2-32 characters) */ name: string; /** * The data uri of the mp3 or ogg sound data, base64 encoded, similar to image data * * @see {@link https://discord.com/developers/docs/reference#image-data} */ sound: string; /** * The volume of the soundboard sound, from 0 to 1 * * @defaultValue `1` */ volume?: number | null | undefined; /** * The id of the custom emoji for the soundboard sound */ emoji_id?: Snowflake | null | undefined; /** * The unicode character of a standard emoji for the soundboard sound */ emoji_name?: string | null | undefined; } /** * @see {@link https://discord.com/developers/docs/resources/soundboard#create-guild-soundboard-sound} */ export type RESTPostAPIGuildSoundboardSoundResult = APISoundboardSound; /** * @see {@link https://discord.com/developers/docs/resources/soundboard#modify-guild-soundboard-sound-json-params} */ export interface RESTPatchAPIGuildSoundboardSoundJSONBody { /** * The name of the soundboard sound (2-32 characters) */ name?: string | undefined; /** * The volume of the soundboard sound, from 0 to 1 * * @defaultValue `1` */ volume?: number | null | undefined; /** * The id of the custom emoji for the soundboard sound */ emoji_id?: Snowflake | null | undefined; /** * The unicode character of a standard emoji for the soundboard sound */ emoji_name?: string | null | undefined; } /** * @see {@link https://discord.com/developers/docs/resources/soundboard#modify-guild-soundboard-sound} */ export type RESTPatchAPIGuildSoundboardSoundResult = APISoundboardSound; /** * @see {@link https://discord.com/developers/docs/resources/soundboard#delete-guild-soundboard-sound} */ export type RESTDeleteAPIGuildSoundboardSoundResult = never; //# sourceMappingURL=soundboard.d.ts.map node_modules/discord-api-types/rest/v9/invite.d.ts.map 0000664 00000000700 15114741631 0016742 0 ustar 00 {"version":3,"file":"invite.d.ts","sourceRoot":"","sources":["invite.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC/C,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AAEzD;;GAEG;AACH,MAAM,WAAW,qBAAqB;IACrC;;OAEG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB;;;;;OAKG;IACH,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B;;OAEG;IACH,wBAAwB,CAAC,EAAE,SAAS,CAAC;CACrC;AAED,MAAM,MAAM,sBAAsB,GAAG,SAAS,CAAC;AAE/C;;GAEG;AACH,MAAM,MAAM,yBAAyB,GAAG,SAAS,CAAC"} node_modules/discord-api-types/rest/v9/interactions.d.ts.map 0000664 00000011507 15114741631 0020155 0 ustar 00 {"version":3,"file":"interactions.d.ts","sourceRoot":"","sources":["interactions.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC/C,OAAO,KAAK,EACX,qBAAqB,EACrB,+BAA+B,EAC/B,qCAAqC,EACrC,sBAAsB,EACtB,kCAAkC,EAClC,sBAAsB,EACtB,uBAAuB,EACvB,UAAU,EACV,eAAe,EACf,MAAM,yBAAyB,CAAC;AACjC,OAAO,KAAK,EACX,qDAAqD,EACrD,kBAAkB,EAClB,cAAc,EACd,MAAM,uBAAuB,CAAC;AAC/B,OAAO,KAAK,EACX,0CAA0C,EAC1C,uCAAuC,EACvC,+CAA+C,EAC/C,2CAA2C,EAC3C,yCAAyC,EACzC,qCAAqC,EACrC,MAAM,WAAW,CAAC;AAEnB;;GAEG;AACH,MAAM,WAAW,kCAAkC;IAClD;;;;;OAKG;IACH,kBAAkB,CAAC,EAAE,OAAO,CAAC;CAC7B;AAED;;GAEG;AACH,MAAM,MAAM,mCAAmC,GAAG,qBAAqB,EAAE,CAAC;AAE1E;;GAEG;AACH,MAAM,MAAM,kCAAkC,GAAG,qBAAqB,CAAC;AAEvE,MAAM,WAAW,0CAChB,SAAQ,qDAAqD,CAC3D,IAAI,CACH,qBAAqB,EACnB,gBAAgB,GAChB,UAAU,GACV,4BAA4B,GAC5B,uBAAuB,GACvB,aAAa,GACb,UAAU,GACV,IAAI,GACJ,mBAAmB,GACnB,gBAAgB,GAChB,MAAM,GACN,SAAS,CACX,CACD,EACD,qDAAqD,CACpD,OAAO,CACN,kBAAkB,CAAC,IAAI,CAAC,qBAAqB,EAAE,UAAU,CAAC,CAAC,GAC1D,IAAI,CAAC,qBAAqB,EAAE,4BAA4B,GAAG,mBAAmB,CAAC,CAChF,CACD;CAAG;AAEN;;GAEG;AACH,MAAM,WAAW,+CAAgD,SAAQ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AAG,sCAAsC,CAAC,CAAC;AAElF;;GAEG;AACH,MAAM,MAAM,oCAAoC,GAAG,qCAAqC,CAAC;AAEzF;;GAEG;AACH,MAAM,MAAM,mCAAmC,GAAG,uCAAuC,CAAC;AAE1F;;GAEG;AACH,MAAM,MAAM,uCAAuC,GAAG,2CAA2C,CAAC;AAElG;;GAEG;AACH,MAAM,MAAM,2CAA2C,GAAG,+CAA+C,CAAC;AAE1G;;GAEG;AACH,MAAM,MAAM,qCAAqC,GAAG,yCAAyC,CAAC;AAE9F;;GAEG;AACH,MAAM,MAAM,sCAAsC,GAAG,0CAA0C,CAAC;AAEhG;;GAEG;AACH,MAAM,MAAM,mDAAmD,GAAG,qCAAqC,EAAE,CAAC;AAE1G;;GAEG;AACH,MAAM,MAAM,6CAA6C,GAAG,qCAAqC,CAAC;AAElG;;GAEG;AACH,MAAM,WAAW,+CAA+C;IAC/D,WAAW,EAAE,+BAA+B,EAAE,CAAC;CAC/C;AAED;;GAEG;AACH,MAAM,MAAM,6CAA6C,GAAG,qCAAqC,CAAC;AAElG;;GAEG;AACH,MAAM,MAAM,qDAAqD,GAAG,IAAI,CACvE,qCAAqC,EACrC,IAAI,GAAG,aAAa,CACpB,EAAE,CAAC;AAEJ;;GAEG;AACH,MAAM,MAAM,mDAAmD,GAAG,qCAAqC,EAAE,CAAC"} node_modules/discord-api-types/rest/v9/auditLog.d.ts 0000664 00000001525 15114741631 0016446 0 ustar 00 import type { Snowflake } from '../../globals'; import type { APIAuditLog, AuditLogEvent } from '../../payloads/v9/auditLog'; /** * @see {@link https://discord.com/developers/docs/resources/audit-log#get-guild-audit-log} */ export interface RESTGetAPIAuditLogQuery { /** * Filter the log for actions made by a user */ user_id?: Snowflake; /** * The type of audit log events */ action_type?: AuditLogEvent; /** * Filter the log before a certain entry ID */ before?: Snowflake; /** * Filter the log after a certain entry ID */ after?: Snowflake; /** * How many entries are returned (default 50, minimum 1, maximum 100) * * @defaultValue `50` */ limit?: number; } export type RESTGetAPIAuditLogResult = APIAuditLog; //# sourceMappingURL=auditLog.d.ts.map node_modules/discord-api-types/rest/v9/auditLog.d.ts.map 0000664 00000000755 15114741631 0017226 0 ustar 00 {"version":3,"file":"auditLog.d.ts","sourceRoot":"","sources":["auditLog.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC/C,OAAO,KAAK,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAE7E;;GAEG;AACH,MAAM,WAAW,uBAAuB;IACvC;;OAEG;IACH,OAAO,CAAC,EAAE,SAAS,CAAC;IACpB;;OAEG;IACH,WAAW,CAAC,EAAE,aAAa,CAAC;IAC5B;;OAEG;IACH,MAAM,CAAC,EAAE,SAAS,CAAC;IACnB;;OAEG;IACH,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB;;;;OAIG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;CACf;AAED,MAAM,MAAM,wBAAwB,GAAG,WAAW,CAAC"} node_modules/discord-api-types/rest/v9/webhook.d.ts.map 0000664 00000007135 15114741631 0017113 0 ustar 00 {"version":3,"file":"webhook.d.ts","sourceRoot":"","sources":["webhook.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC/C,OAAO,KAAK,EACX,kBAAkB,EAClB,QAAQ,EACR,UAAU,EACV,UAAU,EACV,YAAY,EACZ,2BAA2B,EAC3B,MAAM,yBAAyB,CAAC;AACjC,OAAO,KAAK,EAAE,qDAAqD,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAC9G,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,WAAW,CAAC;AACnD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,QAAQ,CAAC;AAC1C;;GAEG;AACH,MAAM,WAAW,iCAAiC;IACjD;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;;;OAIG;IACH,MAAM,CAAC,E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0C,GAAG,KAAK,CAAC"} node_modules/discord-api-types/rest/v9/monetization.d.ts.map 0000664 00000003171 15114741631 0020171 0 ustar 00 {"version":3,"file":"monetization.d.ts","sourceRoot":"","sources":["monetization.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC/C,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAExE;;GAEG;AACH,MAAM,WAAW,2BAA2B;IAC3C;;OAEG;IACH,OAAO,CAAC,EAAE,SAAS,GAAG,SAAS,CAAC;IAChC;;;OAGG;IACH,OAAO,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC7B;;OAEG;IACH,MAAM,CAAC,EAAE,SAAS,GAAG,SAAS,CAAC;IAC/B;;OAEG;IACH,KAAK,CAAC,EAAE,SAAS,GAAG,SAAS,CAAC;IAC9B;;;;OAIG;IACH,KAAK,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC3B;;OAEG;IACH,QAAQ,CAAC,EAAE,SAAS,GAAG,SAAS,CAAC;IACjC;;;;OAIG;IACH,aAAa,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IACpC;;;;OAIG;IACH,eAAe,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;CACtC;AAED;;GAEG;AACH,MAAM,MAAM,4BAA4B,GAAG,cAAc,EAAE,CAAC;AAE5D;;GAEG;AACH,MAAM,MAAM,2BAA2B,GAAG,cAAc,CAAC;AAEzD;;GAEG;AACH,MAAM,WAAW,8BAA8B;IAC9C;;OAEG;IACH,MAAM,EAAE,SAAS,CAAC;IAClB;;OAEG;IACH,QAAQ,EAAE,SAAS,CAAC;IACpB;;OAEG;IACH,UAAU,EAAE,oBAAoB,CAAC;CACjC;AAED;;GAEG;AACH,MAAM,MAAM,0BAA0B,GAAG,8BAA8B,CAAC;AAExE;;GAEG;AACH,MAAM,MAAM,4BAA4B,GAAG,OAAO,CAAC,IAAI,CAAC,cAAc,EAAE,SAAS,GAAG,WAAW,CAAC,CAAC,CAAC;AAElG;;GAEG;AACH,oBAAY,oBAAoB;IAC/B,KAAK,IAAI;IACT,IAAI,IAAA;CACJ;AAED;;GAEG;AACH,MAAM,MAAM,8BAA8B,GAAG,KAAK,CAAC;AAEnD;;GAEG;AACH,MAAM,MAAM,oBAAoB,GAAG,MAAM,EAAE,CAAC;AAE5C;;GAEG;AACH,MAAM,MAAM,mCAAmC,GAAG,KAAK,CAAC;AAExD;;GAEG;AACH,MAAM,WAAW,+BAA+B;IAC/C;;OAEG;IACH,MAAM,CAAC,EAAE,SAAS,GAAG,SAAS,CAAC;IAC/B;;OAEG;IACH,KAAK,CAAC,EAAE,SAAS,GAAG,SAAS,CAAC;IAC9B;;;;OAIG;IACH,KAAK,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC3B;;OAEG;IACH,OAAO,CAAC,EAAE,SAAS,GAAG,SAAS,CAAC;CAChC;AAED;;GAEG;AACH,MAAM,MAAM,gCAAgC,GAAG,eAAe,EAAE,CAAC;AAEjE;;GAEG;AACH,MAAM,MAAM,+BAA+B,GAAG,eAAe,CAAC"} node_modules/discord-api-types/rest/v9/stageInstance.js 0000664 00000000166 15114741631 0017232 0 ustar 00 "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); //# sourceMappingURL=stageInstance.js.map node_modules/discord-api-types/rest/v9/gateway.js.map 0000664 00000000143 15114741631 0016652 0 ustar 00 {"version":3,"file":"gateway.js","sourceRoot":"","sources":["gateway.ts"],"names":[],"mappings":""} node_modules/discord-api-types/rest/v9/soundboard.d.ts.map 0000664 00000002412 15114741631 0017606 0 ustar 00 {"version":3,"file":"soundboard.d.ts","sourceRoot":"","sources":["soundboard.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC/C,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAElE;;GAEG;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,GAAG,KAAK,CAAC"} node_modules/discord-api-types/rest/v9/application.d.ts 0000664 00000003355 15114741631 0017204 0 ustar 00 import type { APIApplication, APIApplicationRoleConnectionMetadata } from '../../payloads/v9/application'; import type { _StrictPartial, _Nullable } from '../../utils/internals'; /** * @see {@link https://discord.com/developers/docs/resources/application-role-connection-metadata#get-application-role-connection-metadata-records} */ export type RESTGetAPIApplicationRoleConnectionMetadataResult = APIApplicationRoleConnectionMetadata[]; /** * @see {@link https://discord.com/developers/docs/resources/application-role-connection-metadata#update-application-role-connection-metadata-records} */ export type RESTPutAPIApplicationRoleConnectionMetadataJSONBody = APIApplicationRoleConnectionMetadata[]; /** * @see {@link https://discord.com/developers/docs/resources/application-role-connection-metadata#update-application-role-connection-metadata-records} */ export type RESTPutAPIApplicationRoleConnectionMetadataResult = APIApplicationRoleConnectionMetadata[]; /** * @see {@link https://discord.com/developers/docs/resources/application#get-current-application} */ export type RESTGetCurrentApplicationResult = APIApplication; /** * @see {@link https://discord.com/developers/docs/resources/application#edit-current-application} */ export type RESTPatchCurrentApplicationJSONBody = _StrictPartial<_Nullable<Pick<APIApplication, 'cover_image' | 'icon'>> & Pick<APIApplication, 'custom_install_url' | 'description' | 'flags' | 'install_params' | 'integration_types_config' | 'interactions_endpoint_url' | 'role_connections_verification_url' | 'tags'>>; /** * @see {@link https://discord.com/developers/docs/resources/application#edit-current-application} */ export type RESTPatchCurrentApplicationResult = APIApplication; //# sourceMappingURL=application.d.ts.map node_modules/discord-api-types/rest/v9/index.mjs 0000664 00000001071 15114741631 0015722 0 ustar 00 import mod from "./index.js"; export default mod; export const APIVersion = mod.APIVersion; export const CDNRoutes = mod.CDNRoutes; export const EntitlementOwnerType = mod.EntitlementOwnerType; export const ImageFormat = mod.ImageFormat; export const Locale = mod.Locale; export const OAuth2Routes = mod.OAuth2Routes; export const RESTJSONErrorCodes = mod.RESTJSONErrorCodes; export const ReactionType = mod.ReactionType; export const RouteBases = mod.RouteBases; export const Routes = mod.Routes; export const StickerPackApplicationId = mod.StickerPackApplicationId; node_modules/discord-api-types/rest/v9/invite.js.map 0000664 00000000141 15114741631 0016505 0 ustar 00 {"version":3,"file":"invite.js","sourceRoot":"","sources":["invite.ts"],"names":[],"mappings":""} node_modules/discord-api-types/rest/v9/index.js.map 0000664 00000035324 15114741631 0016331 0 ustar 00 {"version":3,"file":"index.js","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AACA,qDAA0D;AAE1D,4CAA0B;AAI1B,4CAA0B;AAO1B,iDAA+B;AAWlB,QAAA,UAAU,GAAG,GAAG,CAAC;AAEjB,QAAA,MAAM,GAAG;IACrB;;;;OAIG;IACH,iCAAiC,CAAC,aAAwB;QACzD,OAAO,iBAAiB,aAAa,4BAAqC,CAAC;IAC5E,CAAC;IAED;;;;OAIG;IACH,wBAAwB,CAAC,OAAkB;QAC1C,OAAO,WAAW,OAAO,wBAAiC,CAAC;IAC5D,CAAC;IAED;;;;;OAKG;IACH,uBAAuB,CAAC,OAAkB,EAAE,MAAiB;QAC5D,OAAO,WAAW,OAAO,0BAA0B,MAAM,EAAW,CAAC;IACtE,CAAC;IAED;;;OAGG;IACH,aAAa,CAAC,OAAkB;QAC/B,OAAO,WAAW,OAAO,aAAsB,CAAC;IACjD,CAAC;IAED;;;;;OAKG;IACH,OAAO,CAAC,SAAoB;QAC3B,OAAO,aAAa,SAAS,EAAW,CAAC;IAC1C,CAAC;IAED;;;;OAIG;IACH,eAAe,CAAC,SAAoB;QACnC,OAAO,aAAa,SAAS,WAAoB,CAAC;IACnD,CAAC;IAED;;;;;OAKG;IACH,cAAc,CAAC,SAAoB,EAAE,SAAoB;QACxD,OAAO,aAAa,SAAS,aAAa,SAAS,EAAW,CAAC;IAChE,CAAC;IAED;;;OAGG;IACH,uBAAuB,CAAC,SAAoB,EAAE,SAAoB;QACjE,OAAO,aAAa,SAAS,aAAa,SAAS,YAAqB,CAAC;IAC1E,CAAC;IAED;;;;;;OAMG;IACH,yBAA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EX,sBAAsB;AACtB,MAAM,CAAC,MAAM,CAAC,kBAAU,CAAC,CAAC;AAEb,QAAA,YAAY,GAAG;IAC3B,gBAAgB,EAAE,GAAG,kBAAU,CAAC,GAAG,GAAG,cAAM,CAAC,mBAAmB,EAAE,EAAE;IACpE,QAAQ,EAAE,GAAG,kBAAU,CAAC,GAAG,GAAG,cAAM,CAAC,mBAAmB,EAAE,EAAE;IAC5D;;OAEG;IACH,kBAAkB,EAAE,GAAG,kBAAU,CAAC,GAAG,GAAG,cAAM,CAAC,qBAAqB,EAAE,EAAE;CAC/D,CAAC;AAEX,6BAA6B;AAC7B,MAAM,CAAC,MAAM,CAAC,oBAAY,CAAC,CAAC"} node_modules/discord-api-types/rest/v9/voice.d.ts 0000664 00000003745 15114741631 0016011 0 ustar 00 import type { Snowflake } from '../../globals'; import type { APIVoiceRegion, APIVoiceState } from '../../payloads/v9/index'; /** * @see {@link https://discord.com/developers/docs/resources/voice#list-voice-regions} */ export type RESTGetAPIVoiceRegionsResult = APIVoiceRegion[]; /** * @deprecated This was exported with the wrong name, use {@link RESTGetAPIVoiceRegionsResult} instead */ export type GetAPIVoiceRegionsResult = RESTGetAPIVoiceRegionsResult; /** * @see {@link https://discord.com/developers/docs/resources/voice#get-current-user-voice-state} */ export type RESTGetAPIGuildVoiceStateCurrentMemberResult = APIVoiceState; /** * @see {@link https://discord.com/developers/docs/resources/voice#get-user-voice-state} */ export type RESTGetAPIGuildVoiceStateUserResult = APIVoiceState; /** * @see {@link https://discord.com/developers/docs/resources/voice#modify-current-user-voice-state} */ export interface RESTPatchAPIGuildVoiceStateCurrentMemberJSONBody { /** * The id of the channel the user is currently in */ channel_id?: Snowflake | undefined; /** * Toggles the user's suppress state */ suppress?: boolean | undefined; /** * Sets the user's request to speak */ request_to_speak_timestamp?: string | null | undefined; } /** * @see {@link https://discord.com/developers/docs/resources/voice#modify-current-user-voice-state} */ export type RESTPatchAPIGuildVoiceStateCurrentMemberResult = never; /** * @see {@link https://discord.com/developers/docs/resources/voice#modify-user-voice-state} */ export interface RESTPatchAPIGuildVoiceStateUserJSONBody { /** * The id of the channel the user is currently in */ channel_id: Snowflake; /** * Toggles the user's suppress state */ suppress?: boolean | undefined; } /** * @see {@link https://discord.com/developers/docs/resources/voice#modify-user-voice-state} */ export type RESTPatchAPIGuildVoiceStateUserResult = never; //# sourceMappingURL=voice.d.ts.map node_modules/discord-api-types/rest/v9/invite.d.ts 0000664 00000001717 15114741631 0016177 0 ustar 00 import type { Snowflake } from '../../globals'; import type { APIInvite } from '../../payloads/v9/index'; /** * @see {@link https://discord.com/developers/docs/resources/invite#get-invite} */ export interface RESTGetAPIInviteQuery { /** * Whether the invite should contain approximate member counts */ with_counts?: boolean; /** * Whether the invite should contain the expiration date * * @deprecated The expiration date is always returned, regardless of this query parameter. * @see {@link https://github.com/discord/discord-api-docs/pull/7424} */ with_expiration?: boolean; /** * The guild scheduled event to include with the invite */ guild_scheduled_event_id?: Snowflake; } export type RESTGetAPIInviteResult = APIInvite; /** * @see {@link https://discord.com/developers/docs/resources/invite#delete-invite} */ export type RESTDeleteAPIInviteResult = APIInvite; //# sourceMappingURL=invite.d.ts.map node_modules/discord-api-types/rest/v9/user.d.ts 0000664 00000010146 15114741631 0015653 0 ustar 00 import type { Permissions, Snowflake } from '../../globals'; import type { APIChannel, APIConnection, APIGuildMember, APIUser, APIApplicationRoleConnection, GuildFeature } from '../../payloads/v9/index'; /** * @see {@link https://discord.com/developers/docs/resources/user#get-current-user} */ export type RESTGetAPICurrentUserResult = APIUser; /** * @see {@link https://discord.com/developers/docs/resources/user#get-user} */ export type RESTGetAPIUserResult = APIUser; /** * @see {@link https://discord.com/developers/docs/resources/user#get-current-user-guild-member} */ export type RESTGetCurrentUserGuildMemberResult = APIGuildMember; /** * @see {@link https://discord.com/developers/docs/resources/user#modify-current-user} */ export interface RESTPatchAPICurrentUserJSONBody { /** * User's username, if changed may cause the user's discriminator to be randomized */ username?: string | undefined; /** * If passed, modifies the user's avatar */ avatar?: string | null | undefined; /** * If passed, modifies the user's banner */ banner?: string | null | undefined; } /** * @see {@link https://discord.com/developers/docs/resources/user#modify-current-user} */ export type RESTPatchAPICurrentUserResult = APIUser; /** * @see {@link https://discord.com/developers/docs/resources/user#get-current-user-guilds} */ export interface RESTGetAPICurrentUserGuildsQuery { /** * Get guilds before this guild ID */ before?: Snowflake; /** * Get guilds after this guild ID */ after?: Snowflake; /** * Max number of guilds to return (1-200) * * @defaultValue `200` */ limit?: number; /** * Include approximate member and presence counts in response * * @defaultValue `false` */ with_counts?: boolean; } export interface RESTAPIPartialCurrentUserGuild { id: Snowflake; name: string; icon: string | null; banner: string | null; owner: boolean; features: GuildFeature[]; permissions: Permissions; approximate_member_count?: number; approximate_presence_count?: number; } /** * @see {@link https://discord.com/developers/docs/resources/user#get-current-user-guilds} */ export type RESTGetAPICurrentUserGuildsResult = RESTAPIPartialCurrentUserGuild[]; /** * @see {@link https://discord.com/developers/docs/resources/user#leave-guild} */ export type RESTDeleteAPICurrentUserGuildResult = never; /** * @see {@link https://discord.com/developers/docs/resources/user#create-dm} */ export interface RESTPostAPICurrentUserCreateDMChannelJSONBody { /** * The recipient to open a DM channel with */ recipient_id: string; } /** * @see {@link https://discord.com/developers/docs/resources/user#create-dm} */ export type RESTPostAPICurrentUserCreateDMChannelResult = APIChannel; /** * @see {@link https://discord.com/developers/docs/resources/user#get-user-connections} */ export type RESTGetAPICurrentUserConnectionsResult = APIConnection[]; /** * @see {@link https://discord.com/developers/docs/resources/user#get-user-application-role-connection} */ export type RESTGetAPICurrentUserApplicationRoleConnectionResult = APIApplicationRoleConnection; /** * @see {@link https://discord.com/developers/docs/resources/user#update-user-application-role-connection} */ export interface RESTPutAPICurrentUserApplicationRoleConnectionJSONBody { /** * The vanity name of the platform a bot has connected (max 50 characters) */ platform_name?: string | undefined; /** * The username on the platform a bot has connected (max 100 characters) */ platform_username?: string | undefined; /** * Object mapping application role connection metadata keys to their `string`-ified value (max 100 characters) for the user on the platform a bot has connected */ metadata?: Record<string, number | string> | undefined; } /** * @see {@link https://discord.com/developers/docs/resources/user#update-user-application-role-connection} */ export type RESTPutAPICurrentUserApplicationRoleConnectionResult = APIApplicationRoleConnection; //# sourceMappingURL=user.d.ts.map node_modules/discord-api-types/rest/v9/index.js 0000664 00000115511 15114741631 0015552 0 ustar 00 "use strict"; var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { if (k2 === undefined) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { return m[k]; } }; } Object.defineProperty(o, k2, desc); }) : (function(o, m, k, k2) { if (k2 === undefined) k2 = k; o[k2] = m[k]; })); var __exportStar = (this && this.__exportStar) || function(m, exports) { for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); }; Object.defineProperty(exports, "__esModule", { value: true }); exports.OAuth2Routes = exports.RouteBases = exports.CDNRoutes = exports.ImageFormat = exports.StickerPackApplicationId = exports.Routes = exports.APIVersion = void 0; const internals_1 = require("../../utils/internals"); __exportStar(require("../common"), exports); __exportStar(require("./channel"), exports); __exportStar(require("./monetization"), exports); exports.APIVersion = '9'; exports.Routes = { /** * Route for: * - GET `/applications/{application.id}/role-connections/metadata` * - PUT `/applications/{application.id}/role-connections/metadata` */ applicationRoleConnectionMetadata(applicationId) { return `/applications/${applicationId}/role-connections/metadata`; }, /** * Route for: * - GET `/guilds/{guild.id}/auto-moderation/rules` * - POST `/guilds/{guild.id}/auto-moderation/rules` */ guildAutoModerationRules(guildId) { return `/guilds/${guildId}/auto-moderation/rules`; }, /** * Routes for: * - GET `/guilds/{guild.id}/auto-moderation/rules/{rule.id}` * - PATCH `/guilds/{guild.id}/auto-moderation/rules/{rule.id}` * - DELETE `/guilds/{guild.id}/auto-moderation/rules/{rule.id}` */ guildAutoModerationRule(guildId, ruleId) { return `/guilds/${guildId}/auto-moderation/rules/${ruleId}`; }, /** * Route for: * - GET `/guilds/{guild.id}/audit-logs` */ guildAuditLog(guildId) { return `/guilds/${guildId}/audit-logs`; }, /** * Route for: * - GET `/channels/{channel.id}` * - PATCH `/channels/{channel.id}` * - DELETE `/channels/{channel.id}` */ channel(channelId) { return `/channels/${channelId}`; }, /** * Route for: * - GET `/channels/{channel.id}/messages` * - POST `/channels/{channel.id}/messages` */ channelMessages(channelId) { return `/channels/${channelId}/messages`; }, /** * Route for: * - GET `/channels/{channel.id}/messages/{message.id}` * - PATCH `/channels/{channel.id}/messages/{message.id}` * - DELETE `/channels/{channel.id}/messages/{message.id}` */ channelMessage(channelId, messageId) { return `/channels/${channelId}/messages/${messageId}`; }, /** * Route for: * - POST `/channels/{channel.id}/messages/{message.id}/crosspost` */ channelMessageCrosspost(channelId, messageId) { return `/channels/${channelId}/messages/${messageId}/crosspost`; }, /** * Route for: * - PUT `/channels/{channel.id}/messages/{message.id}/reactions/{emoji}/@me` * - DELETE `/channels/{channel.id}/messages/{message.id}/reactions/{emoji}/@me` * * **Note**: You need to URL encode the emoji yourself */ channelMessageOwnReaction(channelId, messageId, emoji) { return `/channels/${channelId}/messages/${messageId}/reactions/${emoji}/@me`; }, /** * Route for: * - DELETE `/channels/{channel.id}/messages/{message.id}/reactions/{emoji}/{user.id}` * * **Note**: You need to URL encode the emoji yourself */ channelMessageUserReaction(channelId, messageId, emoji, userId) { return `/channels/${channelId}/messages/${messageId}/reactions/${emoji}/${userId}`; }, /** * Route for: * - GET `/channels/{channel.id}/messages/{message.id}/reactions/{emoji}` * - DELETE `/channels/{channel.id}/messages/{message.id}/reactions/{emoji}` * * **Note**: You need to URL encode the emoji yourself */ channelMessageReaction(channelId, messageId, emoji) { return `/channels/${channelId}/messages/${messageId}/reactions/${emoji}`; }, /** * Route for: * - DELETE `/channels/{channel.id}/messages/{message.id}/reactions` */ channelMessageAllReactions(channelId, messageId) { return `/channels/${channelId}/messages/${messageId}/reactions`; }, /** * Route for: * - POST `/channels/{channel.id}/messages/bulk-delete` */ channelBulkDelete(channelId) { return `/channels/${channelId}/messages/bulk-delete`; }, /** * Route for: * - PUT `/channels/{channel.id}/permissions/{overwrite.id}` * - DELETE `/channels/{channel.id}/permissions/{overwrite.id}` */ channelPermission(channelId, overwriteId) { return `/channels/${channelId}/permissions/${overwriteId}`; }, /** * Route for: * - GET `/channels/{channel.id}/invites` * - POST `/channels/{channel.id}/invites` */ channelInvites(channelId) { return `/channels/${channelId}/invites`; }, /** * Route for: * - POST `/channels/{channel.id}/followers` */ channelFollowers(channelId) { return `/channels/${channelId}/followers`; }, /** * Route for: * - POST `/channels/{channel.id}/typing` */ channelTyping(channelId) { return `/channels/${channelId}/typing`; }, /** * Route for: * - GET `/channels/{channel.id}/pins` */ channelPins(channelId) { return `/channels/${channelId}/pins`; }, /** * Route for: * - PUT `/channels/{channel.id}/pins/{message.id}` * - DELETE `/channels/{channel.id}/pins/{message.id}` */ channelPin(channelId, messageId) { return `/channels/${channelId}/pins/${messageId}`; }, /** * Route for: * - PUT `/channels/{channel.id}/recipients/{user.id}` * - DELETE `/channels/{channel.id}/recipients/{user.id}` */ channelRecipient(channelId, userId) { return `/channels/${channelId}/recipients/${userId}`; }, /** * Route for: * - GET `/guilds/{guild.id}/emojis` * - POST `/guilds/{guild.id}/emojis` */ guildEmojis(guildId) { return `/guilds/${guildId}/emojis`; }, /** * Route for: * - GET `/guilds/{guild.id}/emojis/{emoji.id}` * - PATCH `/guilds/{guild.id}/emojis/{emoji.id}` * - DELETE `/guilds/{guild.id}/emojis/{emoji.id}` */ guildEmoji(guildId, emojiId) { return `/guilds/${guildId}/emojis/${emojiId}`; }, /** * Route for: * - POST `/guilds` */ guilds() { return '/guilds'; }, /** * Route for: * - GET `/guilds/{guild.id}` * - PATCH `/guilds/{guild.id}` * - DELETE `/guilds/{guild.id}` */ guild(guildId) { return `/guilds/${guildId}`; }, /** * Route for: * - GET `/guilds/{guild.id}/preview` */ guildPreview(guildId) { return `/guilds/${guildId}/preview`; }, /** * Route for: * - GET `/guilds/{guild.id}/channels` * - POST `/guilds/{guild.id}/channels` * - PATCH `/guilds/{guild.id}/channels` */ guildChannels(guildId) { return `/guilds/${guildId}/channels`; }, /** * Route for: * - GET `/guilds/{guild.id}/members/{user.id}` * - PUT `/guilds/{guild.id}/members/{user.id}` * - PATCH `/guilds/{guild.id}/members/@me` * - PATCH `/guilds/{guild.id}/members/{user.id}` * - DELETE `/guilds/{guild.id}/members/{user.id}` */ guildMember(guildId, userId = '@me') { return `/guilds/${guildId}/members/${userId}`; }, /** * Route for: * - GET `/guilds/{guild.id}/members` */ guildMembers(guildId) { return `/guilds/${guildId}/members`; }, /** * Route for: * - GET `/guilds/{guild.id}/members/search` */ guildMembersSearch(guildId) { return `/guilds/${guildId}/members/search`; }, /** * Route for: * - PATCH `/guilds/{guild.id}/members/@me/nick` * * @deprecated Use {@link Routes.guildMember} instead. */ guildCurrentMemberNickname(guildId) { return `/guilds/${guildId}/members/@me/nick`; }, /** * Route for: * - PUT `/guilds/{guild.id}/members/{user.id}/roles/{role.id}` * - DELETE `/guilds/{guild.id}/members/{user.id}/roles/{role.id}` */ guildMemberRole(guildId, memberId, roleId) { return `/guilds/${guildId}/members/${memberId}/roles/${roleId}`; }, /** * Route for: * - POST `/guilds/{guild.id}/mfa` */ guildMFA(guildId) { return `/guilds/${guildId}/mfa`; }, /** * Route for: * - GET `/guilds/{guild.id}/bans` */ guildBans(guildId) { return `/guilds/${guildId}/bans`; }, /** * Route for: * - GET `/guilds/{guild.id}/bans/{user.id}` * - PUT `/guilds/{guild.id}/bans/{user.id}` * - DELETE `/guilds/{guild.id}/bans/{user.id}` */ guildBan(guildId, userId) { return `/guilds/${guildId}/bans/${userId}`; }, /** * Route for: * - GET `/guilds/{guild.id}/roles` * - POST `/guilds/{guild.id}/roles` * - PATCH `/guilds/{guild.id}/roles` */ guildRoles(guildId) { return `/guilds/${guildId}/roles`; }, /** * Route for: * - GET `/guilds/{guild.id}/roles/{role.id}` * - PATCH `/guilds/{guild.id}/roles/{role.id}` * - DELETE `/guilds/{guild.id}/roles/{role.id}` */ guildRole(guildId, roleId) { return `/guilds/${guildId}/roles/${roleId}`; }, /** * Route for: * - GET `/guilds/{guild.id}/prune` * - POST `/guilds/{guild.id}/prune` */ guildPrune(guildId) { return `/guilds/${guildId}/prune`; }, /** * Route for: * - GET `/guilds/{guild.id}/regions` */ guildVoiceRegions(guildId) { return `/guilds/${guildId}/regions`; }, /** * Route for: * - GET `/guilds/{guild.id}/invites` */ guildInvites(guildId) { return `/guilds/${guildId}/invites`; }, /** * Route for: * - GET `/guilds/{guild.id}/integrations` */ guildIntegrations(guildId) { return `/guilds/${guildId}/integrations`; }, /** * Route for: * - DELETE `/guilds/{guild.id}/integrations/{integration.id}` */ guildIntegration(guildId, integrationId) { return `/guilds/${guildId}/integrations/${integrationId}`; }, /** * Route for: * - GET `/guilds/{guild.id}/widget` * - PATCH `/guilds/{guild.id}/widget` */ guildWidgetSettings(guildId) { return `/guilds/${guildId}/widget`; }, /** * Route for: * - GET `/guilds/{guild.id}/widget.json` */ guildWidgetJSON(guildId) { return `/guilds/${guildId}/widget.json`; }, /** * Route for: * - GET `/guilds/{guild.id}/vanity-url` */ guildVanityUrl(guildId) { return `/guilds/${guildId}/vanity-url`; }, /** * Route for: * - GET `/guilds/{guild.id}/widget.png` */ guildWidgetImage(guildId) { return `/guilds/${guildId}/widget.png`; }, /** * Route for: * - GET `/invites/{invite.code}` * - DELETE `/invites/{invite.code}` */ invite(code) { return `/invites/${code}`; }, /** * Route for: * - GET `/guilds/templates/{template.code}` * - POST `/guilds/templates/{template.code}` */ template(code) { return `/guilds/templates/${code}`; }, /** * Route for: * - GET `/guilds/{guild.id}/templates` * - POST `/guilds/{guild.id}/templates` */ guildTemplates(guildId) { return `/guilds/${guildId}/templates`; }, /** * Route for: * - PUT `/guilds/{guild.id}/templates/{template.code}` * - PATCH `/guilds/{guild.id}/templates/{template.code}` * - DELETE `/guilds/{guild.id}/templates/{template.code}` */ guildTemplate(guildId, code) { return `/guilds/${guildId}/templates/${code}`; }, /** * Route for: * - GET `/channels/{channel.id}/polls/{message.id}/answers/{answer_id}` */ pollAnswerVoters(channelId, messageId, answerId) { return `/channels/${channelId}/polls/${messageId}/answers/${answerId}`; }, /** * Route for: * - POST `/channels/{channel.id}/polls/{message.id}/expire` */ expirePoll(channelId, messageId) { return `/channels/${channelId}/polls/${messageId}/expire`; }, /** * Route for: * - POST `/channels/{channel.id}/threads` * - POST `/channels/{channel.id}/messages/{message.id}/threads` */ threads(parentId, messageId) { const parts = ['', 'channels', parentId]; if (messageId) parts.push('messages', messageId); parts.push('threads'); return parts.join('/'); }, /** * Route for: * - GET `/guilds/{guild.id}/threads/active` */ guildActiveThreads(guildId) { return `/guilds/${guildId}/threads/active`; }, /** * Route for: * - GET `/channels/{channel.id}/threads/active` * (deprecated, removed in API v10, use {@link https://discord.com/developers/docs/resources/guild#list-active-threads | List Active Guild Threads} instead.) * - GET `/channels/{channel.id}/threads/archived/public` * - GET `/channels/{channel.id}/threads/archived/private` */ channelThreads(channelId, archived) { const parts = ['', 'channels', channelId, 'threads']; if (archived) parts.push('archived', archived); else parts.push('active'); return parts.join('/'); }, /** * Route for: * - GET `/channels/{channel.id}/users/@me/threads/archived/private` */ channelJoinedArchivedThreads(channelId) { return `/channels/${channelId}/users/@me/threads/archived/private`; }, /** * Route for: * - GET `/channels/{thread.id}/thread-members` * - GET `/channels/{thread.id}/thread-members/{user.id}` * - PUT `/channels/{thread.id}/thread-members/@me` * - PUT `/channels/{thread.id}/thread-members/{user.id}` * - DELETE `/channels/{thread.id}/thread-members/@me` * - DELETE `/channels/{thread.id}/thread-members/{user.id}` */ threadMembers(threadId, userId) { const parts = ['', 'channels', threadId, 'thread-members']; if (userId) parts.push(userId); return parts.join('/'); }, /** * Route for: * - GET `/users/@me` * - GET `/users/{user.id}` * - PATCH `/users/@me` * * @param userId - The user ID, defaulted to `@me` */ user(userId = '@me') { return `/users/${userId}`; }, /** * Route for: * - GET `/users/@me/applications/{application.id}/role-connection` * - PUT `/users/@me/applications/{application.id}/role-connection` */ userApplicationRoleConnection(applicationId) { return `/users/@me/applications/${applicationId}/role-connection`; }, /** * Route for: * - GET `/users/@me/guilds` */ userGuilds() { return `/users/@me/guilds`; }, /** * Route for: * - GET `/users/@me/guilds/{guild.id}/member` */ userGuildMember(guildId) { return `/users/@me/guilds/${guildId}/member`; }, /** * Route for: * - DELETE `/users/@me/guilds/{guild.id}` */ userGuild(guildId) { return `/users/@me/guilds/${guildId}`; }, /** * Route for: * - POST `/users/@me/channels` */ userChannels() { return `/users/@me/channels`; }, /** * Route for: * - GET `/users/@me/connections` */ userConnections() { return `/users/@me/connections`; }, /** * Route for: * - GET `/voice/regions` */ voiceRegions() { return `/voice/regions`; }, /** * Route for: * - GET `/channels/{channel.id}/webhooks` * - POST `/channels/{channel.id}/webhooks` */ channelWebhooks(channelId) { return `/channels/${channelId}/webhooks`; }, /** * Route for: * - GET `/guilds/{guild.id}/webhooks` */ guildWebhooks(guildId) { return `/guilds/${guildId}/webhooks`; }, /** * Route for: * - GET `/webhooks/{webhook.id}` * - GET `/webhooks/{webhook.id}/{webhook.token}` * - PATCH `/webhooks/{webhook.id}` * - PATCH `/webhooks/{webhook.id}/{webhook.token}` * - DELETE `/webhooks/{webhook.id}` * - DELETE `/webhooks/{webhook.id}/{webhook.token}` * - POST `/webhooks/{webhook.id}/{webhook.token}` * * - POST `/webhooks/{application.id}/{interaction.token}` */ webhook(webhookId, webhookToken) { const parts = ['', 'webhooks', webhookId]; if (webhookToken) parts.push(webhookToken); return parts.join('/'); }, /** * Route for: * - GET `/webhooks/{webhook.id}/{webhook.token}/messages/@original` * - GET `/webhooks/{webhook.id}/{webhook.token}/messages/{message.id}` * - PATCH `/webhooks/{webhook.id}/{webhook.token}/messages/@original` * - PATCH `/webhooks/{webhook.id}/{webhook.token}/messages/{message.id}` * - DELETE `/webhooks/{webhook.id}/{webhook.token}/messages/@original` * - DELETE `/webhooks/{webhook.id}/{webhook.token}/messages/{message.id}` * * - PATCH `/webhooks/{application.id}/{interaction.token}/messages/@original` * - PATCH `/webhooks/{application.id}/{interaction.token}/messages/{message.id}` * - DELETE `/webhooks/{application.id}/{interaction.token}/messages/{message.id}` */ webhookMessage(webhookId, webhookToken, messageId = '@original') { return `/webhooks/${webhookId}/${webhookToken}/messages/${messageId}`; }, /** * Route for: * - POST `/webhooks/{webhook.id}/{webhook.token}/github` * - POST `/webhooks/{webhook.id}/{webhook.token}/slack` */ webhookPlatform(webhookId, webhookToken, platform) { return `/webhooks/${webhookId}/${webhookToken}/${platform}`; }, /** * Route for: * - GET `/gateway` */ gateway() { return `/gateway`; }, /** * Route for: * - GET `/gateway/bot` */ gatewayBot() { return `/gateway/bot`; }, /** * Route for: * - GET `/oauth2/applications/@me` */ oauth2CurrentApplication() { return `/oauth2/applications/@me`; }, /** * Route for: * - GET `/oauth2/@me` */ oauth2CurrentAuthorization() { return `/oauth2/@me`; }, /** * Route for: * - GET `/oauth2/authorize` */ oauth2Authorization() { return `/oauth2/authorize`; }, /** * Route for: * - POST `/oauth2/token` */ oauth2TokenExchange() { return `/oauth2/token`; }, /** * Route for: * - POST `/oauth2/token/revoke` */ oauth2TokenRevocation() { return `/oauth2/token/revoke`; }, /** * Route for: * - GET `/applications/{application.id}/commands` * - PUT `/applications/{application.id}/commands` * - POST `/applications/{application.id}/commands` */ applicationCommands(applicationId) { return `/applications/${applicationId}/commands`; }, /** * Route for: * - GET `/applications/{application.id}/commands/{command.id}` * - PATCH `/applications/{application.id}/commands/{command.id}` * - DELETE `/applications/{application.id}/commands/{command.id}` */ applicationCommand(applicationId, commandId) { return `/applications/${applicationId}/commands/${commandId}`; }, /** * Route for: * - GET `/applications/{application.id}/guilds/{guild.id}/commands` * - PUT `/applications/{application.id}/guilds/{guild.id}/commands` * - POST `/applications/{application.id}/guilds/{guild.id}/commands` */ applicationGuildCommands(applicationId, guildId) { return `/applications/${applicationId}/guilds/${guildId}/commands`; }, /** * Route for: * - GET `/applications/{application.id}/guilds/{guild.id}/commands/{command.id}` * - PATCH `/applications/{application.id}/guilds/{guild.id}/commands/{command.id}` * - DELETE `/applications/{application.id}/guilds/{guild.id}/commands/{command.id}` */ applicationGuildCommand(applicationId, guildId, commandId) { return `/applications/${applicationId}/guilds/${guildId}/commands/${commandId}`; }, /** * Route for: * - POST `/interactions/{interaction.id}/{interaction.token}/callback` */ interactionCallback(interactionId, interactionToken) { return `/interactions/${interactionId}/${interactionToken}/callback`; }, /** * Route for: * - GET `/guilds/{guild.id}/member-verification` * - PATCH `/guilds/{guild.id}/member-verification` */ guildMemberVerification(guildId) { return `/guilds/${guildId}/member-verification`; }, /** * Route for: * - GET `/guilds/{guild.id}/voice-states/@me` * - GET `/guilds/{guild.id}/voice-states/{user.id}` * - PATCH `/guilds/{guild.id}/voice-states/@me` * - PATCH `/guilds/{guild.id}/voice-states/{user.id}` */ guildVoiceState(guildId, userId = '@me') { return `/guilds/${guildId}/voice-states/${userId}`; }, /** * Route for: * - GET `/applications/{application.id}/guilds/{guild.id}/commands/permissions` * - PUT `/applications/{application.id}/guilds/{guild.id}/commands/permissions` */ guildApplicationCommandsPermissions(applicationId, guildId) { return `/applications/${applicationId}/guilds/${guildId}/commands/permissions`; }, /** * Route for: * - GET `/applications/{application.id}/guilds/{guild.id}/commands/{command.id}/permissions` * - PUT `/applications/{application.id}/guilds/{guild.id}/commands/{command.id}/permissions` */ applicationCommandPermissions(applicationId, guildId, commandId) { return `/applications/${applicationId}/guilds/${guildId}/commands/${commandId}/permissions`; }, /** * Route for: * - GET `/guilds/{guild.id}/welcome-screen` * - PATCH `/guilds/{guild.id}/welcome-screen` */ guildWelcomeScreen(guildId) { return `/guilds/${guildId}/welcome-screen`; }, /** * Route for: * - POST `/stage-instances` */ stageInstances() { return `/stage-instances`; }, /** * Route for: * - GET `/stage-instances/{channel.id}` * - PATCH `/stage-instances/{channel.id}` * - DELETE `/stage-instances/{channel.id}` */ stageInstance(channelId) { return `/stage-instances/${channelId}`; }, /** * Route for: * - GET `/stickers/{sticker.id}` */ sticker(stickerId) { return `/stickers/${stickerId}`; }, /** * Route for: * - GET `/sticker-packs` */ stickerPacks() { return '/sticker-packs'; }, /** * Route for: * - GET `/sticker-packs/{pack.id}` */ stickerPack(packId) { return `/sticker-packs/${packId}`; }, /** * Route for: * - GET `/sticker-packs` * * @deprecated Use {@link Routes.stickerPacks} instead. */ nitroStickerPacks() { return '/sticker-packs'; }, /** * Route for: * - GET `/guilds/{guild.id}/stickers` * - POST `/guilds/{guild.id}/stickers` */ guildStickers(guildId) { return `/guilds/${guildId}/stickers`; }, /** * Route for: * - GET `/guilds/{guild.id}/stickers/{sticker.id}` * - PATCH `/guilds/{guild.id}/stickers/{sticker.id}` * - DELETE `/guilds/{guild.id}/stickers/{sticker.id}` */ guildSticker(guildId, stickerId) { return `/guilds/${guildId}/stickers/${stickerId}`; }, /** * Route for: * - GET `/guilds/{guild.id}/scheduled-events` * - POST `/guilds/{guild.id}/scheduled-events` */ guildScheduledEvents(guildId) { return `/guilds/${guildId}/scheduled-events`; }, /** * Route for: * - GET `/guilds/{guild.id}/scheduled-events/{guildScheduledEvent.id}` * - PATCH `/guilds/{guild.id}/scheduled-events/{guildScheduledEvent.id}` * - DELETE `/guilds/{guild.id}/scheduled-events/{guildScheduledEvent.id}` */ guildScheduledEvent(guildId, guildScheduledEventId) { return `/guilds/${guildId}/scheduled-events/${guildScheduledEventId}`; }, /** * Route for: * - GET `/guilds/{guild.id}/scheduled-events/{guildScheduledEvent.id}/users` */ guildScheduledEventUsers(guildId, guildScheduledEventId) { return `/guilds/${guildId}/scheduled-events/${guildScheduledEventId}/users`; }, /** * Route for: * - GET `/guilds/{guild.id}/onboarding` * - PUT `/guilds/{guild.id}/onboarding` */ guildOnboarding(guildId) { return `/guilds/${guildId}/onboarding`; }, /** * Route for: * - PUT `/guilds/${guild.id}/incident-actions` */ guildIncidentActions(guildId) { return `/guilds/${guildId}/incident-actions`; }, /** * Route for: * - GET `/applications/@me` * - PATCH `/applications/@me` */ currentApplication() { return '/applications/@me'; }, /** * Route for: * - GET `/applications/{application.id}/entitlements` * - POST `/applications/{application.id}/entitlements` */ entitlements(applicationId) { return `/applications/${applicationId}/entitlements`; }, /** * Route for: * - GET `/applications/{application.id}/entitlements/{entitlement.id}` * - DELETE `/applications/{application.id}/entitlements/{entitlement.id}` */ entitlement(applicationId, entitlementId) { return `/applications/${applicationId}/entitlements/${entitlementId}`; }, /** * Route for: * - GET `/applications/{application.id}/skus` */ skus(applicationId) { return `/applications/${applicationId}/skus`; }, /** * Route for: * - POST `/guilds/{guild.id}/bulk-ban` */ guildBulkBan(guildId) { return `/guilds/${guildId}/bulk-ban`; }, /** * Route for: * - POST `/applications/{application.id}/entitlements/{entitlement.id}/consume` */ consumeEntitlement(applicationId, entitlementId) { return `/applications/${applicationId}/entitlements/${entitlementId}/consume`; }, /** * Route for: * - GET `/applications/{application.id}/emojis` * - POST `/applications/{application.id}/emojis` */ applicationEmojis(applicationId) { return `/applications/${applicationId}/emojis`; }, /** * Route for: * - GET `/applications/{application.id}/emojis/{emoji.id}` * - PATCH `/applications/{application.id}/emojis/{emoji.id}` * - DELETE `/applications/{application.id}/emojis/{emoji.id}` */ applicationEmoji(applicationId, emojiId) { return `/applications/${applicationId}/emojis/${emojiId}`; }, /** * Route for: * - GET `/skus/{sku.id}/subscriptions` */ skuSubscriptions(skuId) { return `/skus/${skuId}/subscriptions`; }, /** * Route for: * - GET `/skus/{sku.id}/subscriptions/{subscription.id}` */ skuSubscription(skuId, subscriptionId) { return `/skus/${skuId}/subscriptions/${subscriptionId}`; }, /** * Route for: * - POST `/channels/{channel.id}/send-soundboard-sound` */ sendSoundboardSound(channelId) { return `/channels/${channelId}/send-soundboard-sound`; }, /** * Route for: * - GET `/soundboard-default-sounds` */ soundboardDefaultSounds() { return '/soundboard-default-sounds'; }, /** * Route for: * - GET `/guilds/{guild.id}/soundboard-sounds` * - POST `/guilds/{guild.id}/soundboard-sounds` */ guildSoundboardSounds(guildId) { return `/guilds/${guildId}/soundboard-sounds`; }, /** * Route for: * - GET `/guilds/{guild.id}/soundboard-sounds/{sound.id}` * - PATCH `/guilds/{guild.id}/soundboard-sounds/{sound.id}` * - DELETE `/guilds/{guild.id}/soundboard-sounds/{sound.id}` */ guildSoundboardSound(guildId, soundId) { return `/guilds/${guildId}/soundboard-sounds/${soundId}`; }, }; for (const [key, fn] of Object.entries(exports.Routes)) { exports.Routes[key] = (...args) => { const escaped = args.map((arg) => { if (arg) { // Skip already "safe" urls if (internals_1.urlSafeCharacters.test(String(arg))) { return arg; } return encodeURIComponent(arg); } return arg; }); // eslint-disable-next-line no-useless-call return fn.call(null, ...escaped); }; } // Freeze the object so it can't be changed Object.freeze(exports.Routes); exports.StickerPackApplicationId = '710982414301790216'; var ImageFormat; (function (ImageFormat) { ImageFormat["JPEG"] = "jpeg"; ImageFormat["PNG"] = "png"; ImageFormat["WebP"] = "webp"; ImageFormat["GIF"] = "gif"; ImageFormat["Lottie"] = "json"; })(ImageFormat || (exports.ImageFormat = ImageFormat = {})); exports.CDNRoutes = { /** * Route for: * - GET `/emojis/{emoji.id}.{png|jpeg|webp|gif}` * * As this route supports GIFs, the hash will begin with `a_` if it is available in GIF format * * This route supports the extensions: PNG, JPEG, WebP, GIF */ emoji(emojiId, format) { return `/emojis/${emojiId}.${format}`; }, /** * Route for: * - GET `/icons/{guild.id}/{guild.icon}.{png|jpeg|webp|gif}` * * As this route supports GIFs, the hash will begin with `a_` if it is available in GIF format * * This route supports the extensions: PNG, JPEG, WebP, GIF */ guildIcon(guildId, guildIcon, format) { return `/icons/${guildId}/${guildIcon}.${format}`; }, /** * Route for: * - GET `/splashes/{guild.id}/{guild.splash}.{png|jpeg|webp}` * * This route supports the extensions: PNG, JPEG, WebP */ guildSplash(guildId, guildSplash, format) { return `/splashes/${guildId}/${guildSplash}.${format}`; }, /** * Route for: * - GET `/discovery-splashes/{guild.id}/{guild.discovery_splash}.{png|jpeg|webp}` * * This route supports the extensions: PNG, JPEG, WebP */ guildDiscoverySplash(guildId, guildDiscoverySplash, format) { return `/discovery-splashes/${guildId}/${guildDiscoverySplash}.${format}`; }, /** * Route for: * - GET `/banners/{guild.id}/{guild.banner}.{png|jpeg|webp|gif}` * * As this route supports GIFs, the hash will begin with `a_` if it is available in GIF format * * This route supports the extensions: PNG, JPEG, WebP, GIF */ guildBanner(guildId, guildBanner, format) { return `/banners/${guildId}/${guildBanner}.${format}`; }, /** * Route for: * - GET `/banners/{user.id}/{user.banner}.{png|jpeg|webp|gif}` * * As this route supports GIFs, the hash will begin with `a_` if it is available in GIF format * * This route supports the extensions: PNG, JPEG, WebP, GIF */ userBanner(userId, userBanner, format) { return `/banners/${userId}/${userBanner}.${format}`; }, /** * Route for: * - GET `/embed/avatars/{index}.png` * * The value for `index` parameter depends on whether the user is {@link https://discord.com/developers/docs/change-log#unique-usernames-on-discord | migrated to the new username system}. * For users on the new username system, `index` will be `(user.id >> 22) % 6`. * For users on the legacy username system, `index` will be `user.discriminator % 5`. * * This route supports the extension: PNG */ defaultUserAvatar(index) { return `/embed/avatars/${index}.png`; }, /** * Route for: * - GET `/avatars/{user.id}/{user.avatar}.{png|jpeg|webp|gif}` * * As this route supports GIFs, the hash will begin with `a_` if it is available in GIF format * * This route supports the extensions: PNG, JPEG, WebP, GIF */ userAvatar(userId, userAvatar, format) { return `/avatars/${userId}/${userAvatar}.${format}`; }, /** * Route for: * - GET `/guilds/{guild.id}/users/{user.id}/avatars/{guild_member.avatar}.{png|jpeg|webp|gif}` * * As this route supports GIFs, the hash will begin with `a_` if it is available in GIF format * * This route supports the extensions: PNG, JPEG, WebP, GIF */ guildMemberAvatar(guildId, userId, memberAvatar, format) { return `/guilds/${guildId}/users/${userId}/avatars/${memberAvatar}.${format}`; }, /** * Route for: * - GET `/avatar-decorations/{user.id}/{user.avatar_decoration}.png` * * This route supports the extension: PNG * * @deprecated Use {@link CDNRoutes.avatarDecoration} instead. */ userAvatarDecoration(userId, userAvatarDecoration) { return `/avatar-decorations/${userId}/${userAvatarDecoration}.png`; }, /** * Route for: * - GET `/avatar-decoration-presets/{avatar_decoration_data_asset}.png` * * This route supports the extension: PNG */ avatarDecoration(avatarDecorationDataAsset) { return `/avatar-decoration-presets/${avatarDecorationDataAsset}.png`; }, /** * Route for: * - GET `/app-icons/{application.id}/{application.icon}.{png|jpeg|webp}` * * This route supports the extensions: PNG, JPEG, WebP */ applicationIcon(applicationId, applicationIcon, format) { return `/app-icons/${applicationId}/${applicationIcon}.${format}`; }, /** * Route for: * - GET `/app-icons/{application.id}/{application.cover_image}.{png|jpeg|webp}` * * This route supports the extensions: PNG, JPEG, WebP */ applicationCover(applicationId, applicationCoverImage, format) { return `/app-icons/${applicationId}/${applicationCoverImage}.${format}`; }, /** * Route for: * - GET `/app-assets/{application.id}/{application.asset_id}.{png|jpeg|webp}` * * This route supports the extensions: PNG, JPEG, WebP */ applicationAsset(applicationId, applicationAssetId, format) { return `/app-assets/${applicationId}/${applicationAssetId}.${format}`; }, /** * Route for: * - GET `/app-assets/{application.id}/achievements/{achievement.id}/icons/{achievement.icon}.{png|jpeg|webp}` * * This route supports the extensions: PNG, JPEG, WebP */ achievementIcon(applicationId, achievementId, achievementIconHash, format) { return `/app-assets/${applicationId}/achievements/${achievementId}/icons/${achievementIconHash}.${format}`; }, /** * Route for: * - GET `/app-assets/710982414301790216/store/{sticker_pack.banner.asset_id}.{png|jpeg|webp}` * * This route supports the extensions: PNG, JPEG, WebP */ stickerPackBanner(stickerPackBannerAssetId, format) { return `/app-assets/${exports.StickerPackApplicationId}/store/${stickerPackBannerAssetId}.${format}`; }, /** * Route for: * - GET `/app-assets/${application.id}/store/${asset.id}.{png|jpeg|webp}}` * * This route supports the extensions: PNG, JPEG, WebP */ storePageAsset(applicationId, assetId, format = ImageFormat.PNG) { return `/app-assets/${applicationId}/store/${assetId}.${format}`; }, /** * Route for: * - GET `/team-icons/{team.id}/{team.icon}.{png|jpeg|webp}` * * This route supports the extensions: PNG, JPEG, WebP */ teamIcon(teamId, teamIcon, format) { return `/team-icons/${teamId}/${teamIcon}.${format}`; }, /** * Route for: * - GET `/stickers/{sticker.id}.{png|json}` * * This route supports the extensions: PNG, Lottie, GIF */ sticker(stickerId, format) { return `/stickers/${stickerId}.${format}`; }, /** * Route for: * - GET `/role-icons/{role.id}/{role.icon}.{png|jpeg|webp}` * * This route supports the extensions: PNG, JPEG, WebP */ roleIcon(roleId, roleIcon, format) { return `/role-icons/${roleId}/${roleIcon}.${format}`; }, /** * Route for: * - GET `/guild-events/{guild_scheduled_event.id}/{guild_scheduled_event.image}.{png|jpeg|webp}` * * This route supports the extensions: PNG, JPEG, WebP */ guildScheduledEventCover(guildScheduledEventId, guildScheduledEventCoverImage, format) { return `/guild-events/${guildScheduledEventId}/${guildScheduledEventCoverImage}.${format}`; }, /** * Route for: * - GET `/guilds/${guild.id}/users/${user.id}/banners/${guild_member.banner}.{png|jpeg|webp|gif}` * * This route supports the extensions: PNG, JPEG, WebP, GIF */ guildMemberBanner(guildId, userId, guildMemberBanner, format) { return `/guilds/${guildId}/users/${userId}/banners/${guildMemberBanner}.${format}`; }, /** * Route for: * - GET `/soundboard-sounds/${sound.id}` */ soundboardSound(soundId) { return `/soundboard-sounds/${soundId}`; }, }; for (const [key, fn] of Object.entries(exports.CDNRoutes)) { exports.CDNRoutes[key] = (...args) => { const escaped = args.map((arg) => { if (arg) { // Skip already "safe" urls if (internals_1.urlSafeCharacters.test(String(arg))) { return arg; } return encodeURIComponent(arg); } return arg; }); // eslint-disable-next-line no-useless-call return fn.call(null, ...escaped); }; } // Freeze the object so it can't be changed Object.freeze(exports.CDNRoutes); exports.RouteBases = { api: `https://discord.com/api/v${exports.APIVersion}`, cdn: 'https://cdn.discordapp.com', media: 'https://media.discordapp.net', invite: 'https://discord.gg', template: 'https://discord.new', gift: 'https://discord.gift', scheduledEvent: 'https://discord.com/events', }; // Freeze bases object Object.freeze(exports.RouteBases); exports.OAuth2Routes = { authorizationURL: `${exports.RouteBases.api}${exports.Routes.oauth2Authorization()}`, tokenURL: `${exports.RouteBases.api}${exports.Routes.oauth2TokenExchange()}`, /** * @see {@link https://tools.ietf.org/html/rfc7009} */ tokenRevocationURL: `${exports.RouteBases.api}${exports.Routes.oauth2TokenRevocation()}`, }; // Freeze OAuth2 route object Object.freeze(exports.OAuth2Routes); //# sourceMappingURL=index.js.map node_modules/discord-api-types/rest/v9/voice.d.ts.map 0000664 00000001503 15114741631 0016553 0 ustar 00 {"version":3,"file":"voice.d.ts","sourceRoot":"","sources":["voice.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC/C,OAAO,KAAK,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAE7E;;GAEG;AACH,MAAM,MAAM,4BAA4B,GAAG,cAAc,EAAE,CAAC;AAE5D;;GAEG;AACH,MAAM,MAAM,wBAAwB,GAAG,4BAA4B,CAAC;AAEpE;;GAEG;AACH,MAAM,MAAM,4CAA4C,GAAG,aAAa,CAAC;AAEzE;;GAEG;AACH,MAAM,MAAM,mCAAmC,GAAG,aAAa,CAAC;AAEhE;;GAEG;AACH,MAAM,WAAW,gDAAgD;IAChE;;OAEG;IACH,UAAU,CAAC,EAAE,SAAS,GAAG,SAAS,CAAC;IACnC;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IAC/B;;OAEG;IACH,0BAA0B,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;CACvD;AAED;;GAEG;AACH,MAAM,MAAM,8CAA8C,GAAG,KAAK,CAAC;AAEnE;;GAEG;AACH,MAAM,WAAW,uCAAuC;IACvD;;OAEG;IACH,UAAU,EAAE,SAAS,CAAC;IACtB;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;CAC/B;AAED;;GAEG;AACH,MAAM,MAAM,qCAAqC,GAAG,KAAK,CAAC"} node_modules/discord-api-types/rest/v9/emoji.d.ts.map 0000664 00000002277 15114741631 0016562 0 ustar 00 {"version":3,"file":"emoji.d.ts","sourceRoot":"","sources":["emoji.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC/C,OAAO,KAAK,EAAE,mBAAmB,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAEvE;;GAEG;AACH,MAAM,MAAM,2BAA2B,GAAG,QAAQ,EAAE,CAAC;AAErD;;GAEG;AACH,MAAM,MAAM,0BAA0B,GAAG,QAAQ,CAAC;AAElD;;GAEG;AACH,MAAM,WAAW,6BAA6B;IAC7C;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;;;OAIG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,KAAK,CAAC,EAAE,SAAS,EAAE,GAAG,SAAS,CAAC;CAChC;AAED;;GAEG;AACH,MAAM,MAAM,2BAA2B,GAAG,QAAQ,CAAC;AAEnD;;GAEG;AACH,MAAM,WAAW,8BAA8B;IAC9C;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC1B;;OAEG;IACH,KAAK,CAAC,EAAE,SAAS,EAAE,GAAG,IAAI,GAAG,SAAS,CAAC;CACvC;AAED;;GAEG;AACH,MAAM,MAAM,4BAA4B,GAAG,QAAQ,CAAC;AAEpD;;GAEG;AACH,MAAM,MAAM,6BAA6B,GAAG,KAAK,CAAC;AAElD;;GAEG;AACH,MAAM,WAAW,iCAAiC;IACjD,KAAK,EAAE,mBAAmB,EAAE,CAAC;CAC7B;AAED;;GAEG;AACH,MAAM,MAAM,gCAAgC,GAAG,mBAAmB,CAAC;AAEnE;;GAEG;AACH,MAAM,MAAM,mCAAmC,GAAG,IAAI,CAAC,6BAA6B,EAAE,OAAO,GAAG,MAAM,CAAC,CAAC;AAExG;;GAEG;AACH,MAAM,MAAM,iCAAiC,GAAG,mBAAmB,CAAC;AAEpE;;GAEG;AACH,MAAM,MAAM,oCAAoC,GAAG,IAAI,CAAC,8BAA8B,EAAE,MAAM,CAAC,CAAC;AAEhG;;GAEG;AACH,MAAM,MAAM,kCAAkC,GAAG,mBAAmB,CAAC;AAErE;;GAEG;AACH,MAAM,MAAM,mCAAmC,GAAG,KAAK,CAAC"} node_modules/discord-api-types/rest/v9/application.d.ts.map 0000664 00000001326 15114741631 0017754 0 ustar 00 {"version":3,"file":"application.d.ts","sourceRoot":"","sources":["application.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,oCAAoC,EAAE,MAAM,+BAA+B,CAAC;AAC1G,OAAO,KAAK,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAEvE;;GAEG;AACH,MAAM,MAAM,iDAAiD,GAAG,oCAAoC,EAAE,CAAC;AAEvG;;GAEG;AACH,MAAM,MAAM,mDAAmD,GAAG,oCAAoC,EAAE,CAAC;AAEzG;;GAEG;AACH,MAAM,MAAM,iDAAiD,GAAG,oCAAoC,EAAE,CAAC;AAEvG;;GAEG;AACH,MAAM,MAAM,+BAA+B,GAAG,cAAc,CAAC;AAE7D;;GAEG;AACH,MAAM,MAAM,mCAAmC,GAAG,cAAc,CAC/D,SAAS,CAAC,IAAI,CAAC,cAAc,EAAE,aAAa,GAAG,MAAM,CAAC,CAAC,GACtD,IAAI,CACH,cAAc,EACZ,oBAAoB,GACpB,aAAa,GACb,OAAO,GACP,gBAAgB,GAChB,0BAA0B,GAC1B,2BAA2B,GAC3B,mCAAmC,GACnC,MAAM,CACR,CACF,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,iCAAiC,GAAG,cAAc,CAAC"} node_modules/discord-api-types/rest/v9/interactions.js.map 0000664 00000000155 15114741631 0017716 0 ustar 00 {"version":3,"file":"interactions.js","sourceRoot":"","sources":["interactions.ts"],"names":[],"mappings":""} node_modules/discord-api-types/rest/v9/webhook.js.map 0000664 00000000143 15114741631 0016647 0 ustar 00 {"version":3,"file":"webhook.js","sourceRoot":"","sources":["webhook.ts"],"names":[],"mappings":""} node_modules/discord-api-types/rest/v9/template.js.map 0000664 00000000145 15114741631 0017026 0 ustar 00 {"version":3,"file":"template.js","sourceRoot":"","sources":["template.ts"],"names":[],"mappings":""} node_modules/discord-api-types/rest/v9/oauth2.d.ts.map 0000664 00000006563 15114741631 0016663 0 ustar 00 {"version":3,"file":"oauth2.d.ts","sourceRoot":"","sources":["oauth2.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC5D,OAAO,KAAK,EAAE,cAAc,EAAE,QAAQ,EAAE,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AAE3G;;GAEG;AACH,MAAM,MAAM,wCAAwC,GAAG,IAAI,CAAC,cAAc,EAAE,OAAO,CAAC,CAAC;AAErF;;GAEG;AACH,MAAM,WAAW,0CAA0C;IAC1D;;OAEG;IACH,WAAW,EAAE,OAAO,CAAC,cAAc,CAAC,CAAC;IACrC;;OAEG;IACH,MAAM,EAAE,YAAY,EAAE,CAAC;IACvB;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC;IAChB;;OAEG;IACH,IAAI,CAAC,EAAE,OAAO,CAAC;CACf;AAED;;GAEG;AACH,MAAM,WAAW,4BAA4B;IAC5C,aAAa,EAAE,MAAM,CAAC;IACtB,SAAS,EAAE,SAAS,CAAC;IACrB,KAAK,EAAE,MAAM,CAAC;IACd,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,SAAS,GAAG,MAAM,CAAC;CAC5B;AAED;;GAEG;AACH,MAAM,WAAW,kCAAkC;IAClD,KAAK,EAAE,MAAM,CAAC;IACd,eAAe,CAAC,EAAE,cAAc,GAAG,eAAe,CAAC;CACnD;AAED;;GAEG;AACH,MAAM,WAAW,sCAAsC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AAC;CACzB;AAED;;GAEG;AACH,MAAM,WAAW,oDAAoD;IACpE,YAAY,EAAE,MAAM,CAAC;IACrB,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;IACnB,aAAa,EAAE,MAAM,CAAC;IACtB,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,QAAQ,CAAC;CAChB;AAED;;GAEG;AACH,MAAM,WAAW,6DAA6D;IAC7E,YAAY,EAAE,MAAM,CAAC;IACrB,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;IACnB,aAAa,EAAE,MAAM,CAAC;IACtB,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,UAAU,CAAC;CACpB;AAED,MAAM,MAAM,sEAAsE,GACjF,oDAAoD,GACnD,6DAA6D,CAAC"} node_modules/discord-api-types/rest/v9/channel.d.ts.map 0000664 00000021065 15114741631 0017063 0 ustar 00 {"version":3,"file":"channel.d.ts","sourceRoot":"","sources":["channel.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC5D,OAAO,KAAK,EACX,kBAAkB,EAClB,UAAU,EACV,QAAQ,EACR,iBAAiB,EACjB,kBAAkB,EAClB,UAAU,EACV,mBAAmB,EACnB,aAAa,EACb,eAAe,EACf,OAAO,EACP,WAAW,EACX,gBAAgB,EAChB,YAAY,EACZ,aAAa,EACb,yBAAyB,EACzB,iBAAiB,EACjB,gBAAgB,EAChB,gBAAgB,EAChB,iCAAiC,EACjC,aAAa,EACb,eAAe,EACf,YAAY,EACZ,aAAa,EACb,2BAA2B,EAC3B,MAAM,yBAAyB,CAAC;AACjC,OAAO,KAAK,EAAE,qDAAqD,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AACnH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,QAAQ,CAAC;AAE1C,MAAM,WAAW,4BAA6B,SAAQ,mCAAmC;IACx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M,MAAM,oCAAoC,GAAG,KAAK,CAAC;AAEzD;;GAEG;AACH,MAAM,MAAM,uCAAuC,GAAG,KAAK,CAAC;AAE5D;;GAEG;AACH,MAAM,WAAW,kCAAkC;IAClD;;OAEG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;CACtB;AAED;;GAEG;AACH,MAAM,MAAM,mCAAmC,GAAG,eAAe,CAAC;AAElE;;GAEG;AACH,MAAM,WAAW,mCAAmC;IACnD;;OAEG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB;;OAEG;IACH,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB;;;;OAIG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;CACf;AAED;;GAEG;AACH,MAAM,MAAM,oCAAoC,GAAG,eAAe,EAAE,CAAC;AAErE;;GAEG;AACH,MAAM,WAAW,qCAAqC;IACrD;;OAEG;IACH,MAAM,CAAC,EAAE,SAAS,GAAG,MAAM,CAAC;IAC5B;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;CACf;AAED;;GAEG;AACH,MAAM,MAAM,4CAA4C,GAAG,2CAA2C,CAAC;AAEvG;;GAEG;AACH,MAAM,MAAM,6CAA6C,GAAG,2CAA2C,CAAC;AAExG;;;GAGG;AACH,MAAM,MAAM,8BAA8B,GAAG,aAAa,CAAC;AAE3D;;GAEG;AACH,MAAM,MAAM,2CAA2C,GAAG,aAAa,CAAC"} node_modules/discord-api-types/rest/v9/poll.d.ts.map 0000664 00000001262 15114741631 0016416 0 ustar 00 {"version":3,"file":"poll.d.ts","sourceRoot":"","sources":["poll.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC/C,OAAO,KAAK,EAAE,WAAW,EAAE,iBAAiB,EAAE,UAAU,EAAE,eAAe,EAAE,OAAO,EAAE,MAAM,UAAU,CAAC;AAErG;;GAEG;AACH,MAAM,WAAW,+BAA+B;IAC/C;;OAEG;IACH,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB;;;;OAIG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;CACf;AAED;;GAEG;AACH,MAAM,WAAW,WAAY,SAAQ,WAAW,EAAE,OAAO,CAAC,eAAe,CAAC;IACzE;;OAEG;IACH,OAAO,EAAE,iBAAiB,EAAE,CAAC;IAC7B;;;;OAIG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;CAClB;AAED;;GAEG;AACH,MAAM,MAAM,iBAAiB,GAAG,WAAW,CAAC;AAE5C;;GAEG;AACH,MAAM,WAAW,gCAAgC;IAChD;;OAEG;IACH,KAAK,EAAE,OAAO,EAAE,CAAC;CACjB;AAED;;GAEG;AACH,MAAM,MAAM,2BAA2B,GAAG,UAAU,CAAC"} node_modules/discord-api-types/rest/v9/invite.js 0000664 00000000157 15114741631 0015740 0 ustar 00 "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); //# sourceMappingURL=invite.js.map node_modules/discord-api-types/rest/v9/channel.d.ts 0000664 00000062364 15114741631 0016316 0 ustar 00 import type { Permissions, Snowflake } from '../../globals'; import type { APIAllowedMentions, APIChannel, APIEmbed, APIExtendedInvite, APIFollowedChannel, APIMessage, APIMessageReference, APIThreadList, APIThreadMember, APIUser, ChannelType, InviteTargetType, MessageFlags, OverwriteType, ThreadAutoArchiveDuration, ThreadChannelType, VideoQualityMode, APIGuildForumTag, APIGuildForumDefaultReactionEmoji, SortOrderType, ForumLayoutType, ChannelFlags, APIAttachment, APIMessageTopLevelComponent } from '../../payloads/v9/index'; import type { _AddUndefinedToPossiblyUndefinedPropertiesOfInterface, _StrictPartial } from '../../utils/internals'; import type { RESTAPIPoll } from './poll'; export interface RESTAPIChannelPatchOverwrite extends RESTPutAPIChannelPermissionJSONBody { id: Snowflake; } /** * @deprecated Use {@link RESTAPIChannelPatchOverwrite} instead */ export type APIChannelPatchOverwrite = RESTAPIChannelPatchOverwrite; /** * @see {@link https://discord.com/developers/docs/resources/channel#get-channel} */ export type RESTGetAPIChannelResult = APIChannel; /** * @see {@link https://discord.com/developers/docs/resources/channel#modify-channel} */ export interface RESTPatchAPIChannelJSONBody { /** * 1-100 character channel name * * Channel types: all */ name?: string | undefined; /** * The type of channel; only conversion between `text` and `news` * is supported and only in guilds with the "NEWS" feature * * Channel types: text, news */ type?: ChannelType.GuildAnnouncement | ChannelType.GuildText | undefined; /** * The position of the channel in the left-hand listing * * Channel types: all excluding newsThread, publicThread, privateThread */ position?: number | null | undefined; /** * 0-1024 character channel topic (0-4096 characters for thread-only channels) * * Channel types: text, news, forum, media */ topic?: string | null | undefined; /** * Whether the channel is nsfw * * Channel types: text, voice, news, forum, media */ nsfw?: boolean | null | undefined; /** * Amount of seconds a user has to wait before sending another message (0-21600); * bots, as well as users with the permission `MANAGE_MESSAGES` or `MANAGE_CHANNELS`, * are unaffected * * Channel types: text, newsThread, publicThread, privateThread, forum, media */ rate_limit_per_user?: number | null | undefined; /** * The bitrate (in bits) of the voice channel; 8000 to 96000 (128000 for VIP servers) * * Channel types: voice */ bitrate?: number | null | undefined; /** * The user limit of the voice channel; 0 refers to no limit, 1 to 99 refers to a user limit * * Channel types: voice */ user_limit?: number | null | undefined; /** * Channel or category-specific permissions * * Channel types: all excluding newsThread, publicThread, privateThread */ permission_overwrites?: APIChannelPatchOverwrite[] | null | undefined; /** * ID of the new parent category for a channel * * Channel types: text, voice, news, stage, forum, media */ parent_id?: Snowflake | null | undefined; /** * Voice region id for the voice or stage channel, automatic when set to `null` * * @see {@link https://discord.com/developers/docs/resources/voice#voice-region-object} */ rtc_region?: string | null | undefined; /** * The camera video quality mode of the voice channel * * @see {@link https://discord.com/developers/docs/resources/channel#channel-object-video-quality-modes} */ video_quality_mode?: VideoQualityMode | null | undefined; /** * Whether the thread should be archived * * Channel types: newsThread, publicThread, privateThread */ archived?: boolean | undefined; /** * The amount of time in minutes to wait before automatically archiving the thread * * Channel types: newsThread, publicThread, privateThread */ auto_archive_duration?: ThreadAutoArchiveDuration | undefined; /** * Whether the thread should be locked * * Channel types: newsThread, publicThread, privateThread */ locked?: boolean | undefined; /** * Default duration for newly created threads, in minutes, to automatically archive the thread after recent activity * * Channel types: text, news, forum, media */ default_auto_archive_duration?: ThreadAutoArchiveDuration | undefined; /** * Channel flags combined as a bit field. */ flags?: ChannelFlags | undefined; /** * The set of tags that can be used in a thread-only channel; limited to 20 * * Channel types: forum, media */ available_tags?: (Partial<APIGuildForumTag> & Pick<APIGuildForumTag, 'name'>)[] | undefined; /** * Whether non-moderators can add other non-moderators to the thread * * Channel types: privateThread */ invitable?: boolean | undefined; /** * The emoji to show in the add reaction button on a thread in a thread-only channel * * Channel types: forum, media */ default_reaction_emoji?: APIGuildForumDefaultReactionEmoji | undefined; /** * The initial `rate_limit_per_user` to set on newly created threads in a channel. * This field is copied to the thread at creation time and does not live update * * Channel types: text, forum, media */ default_thread_rate_limit_per_user?: number | null | undefined; /** * The default sort order type used to order posts in a thread-only channel * * Channel types: forum, media */ default_sort_order?: SortOrderType | null | undefined; /** * The default layout type used to display posts in a forum channel * * Channel types: forum */ default_forum_layout?: ForumLayoutType | undefined; /** * The ids of the set of tags that have been applied to a thread-only channel; limited to 5 * * Channel types: forum, media */ applied_tags?: Snowflake[] | undefined; } /** * @see {@link https://discord.com/developers/docs/resources/channel#modify-channel} */ export type RESTPatchAPIChannelResult = APIChannel; /** * @see {@link https://discord.com/developers/docs/resources/channel#deleteclose-channel} */ export type RESTDeleteAPIChannelResult = APIChannel; /** * @see {@link https://discord.com/developers/docs/resources/channel#get-channel-messages} */ export interface RESTGetAPIChannelMessagesQuery { /** * Get messages around this message ID */ around?: Snowflake; /** * Get messages before this message ID */ before?: Snowflake; /** * Get messages after this message ID */ after?: Snowflake; /** * Max number of messages to return (1-100) * * @defaultValue `50` */ limit?: number; } /** * @see {@link https://discord.com/developers/docs/resources/channel#get-channel-messages} */ export type RESTGetAPIChannelMessagesResult = APIMessage[]; /** * @see {@link https://discord.com/developers/docs/resources/channel#get-channel-message} */ export type RESTGetAPIChannelMessageResult = APIMessage; /** * @see {@link https://discord.com/developers/docs/resources/channel#message-reference-object-message-reference-structure} */ export type RESTAPIMessageReference = _AddUndefinedToPossiblyUndefinedPropertiesOfInterface<Required<Pick<APIMessageReference, 'message_id'>>> & _StrictPartial<APIMessageReference> & { /** * Whether to error if the referenced message doesn't exist instead of sending as a normal (non-reply) message * * @defaultValue `true` */ fail_if_not_exists?: boolean | undefined; }; /** * @deprecated Use {@link RESTAPIMessageReference} instead */ export type APIMessageReferenceSend = RESTAPIMessageReference; /** * @see {@link https://discord.com/developers/docs/resources/message#attachment-object-attachment-structure} */ export type RESTAPIAttachment = Partial<Pick<APIAttachment, 'description' | 'duration_secs' | 'filename' | 'title' | 'waveform'>> & { /** * Attachment id or a number that matches `n` in `files[n]` */ id: Snowflake | number; }; /** * @see {@link https://discord.com/developers/docs/resources/channel#create-message} */ export interface RESTPostAPIChannelMessageJSONBody { /** * The message contents (up to 2000 characters) */ content?: string | undefined; /** * A nonce that can be used for optimistic message sending */ nonce?: number | string | undefined; /** * `true` if this is a TTS message */ tts?: boolean | undefined; /** * Embedded `rich` content (up to 6000 characters) * * @see {@link https://discord.com/developers/docs/resources/channel#embed-object} */ embeds?: APIEmbed[] | undefined; /** * Embedded `rich` content * * @see {@link https://discord.com/developers/docs/resources/channel#embed-object} * @deprecated Use {@link RESTPostAPIChannelMessageJSONBody.embeds} instead */ embed?: APIEmbed | undefined; /** * Allowed mentions for a message * * @see {@link https://discord.com/developers/docs/resources/channel#allowed-mentions-object} */ allowed_mentions?: APIAllowedMentions | undefined; /** * Include to make your message a reply or a forward * * @see {@link https://discord.com/developers/docs/resources/channel#message-reference-object-message-reference-structure} */ message_reference?: RESTAPIMessageReference | undefined; /** * The components to include with the message * * @see {@link https://discord.com/developers/docs/components/reference} */ components?: APIMessageTopLevelComponent[] | undefined; /** * IDs of up to 3 stickers in the server to send in the message * * @see {@link https://discord.com/developers/docs/resources/sticker#sticker-object} */ sticker_ids?: [Snowflake, Snowflake, Snowflake] | [Snowflake, Snowflake] | [Snowflake] | undefined; /** * Attachment objects with filename and description */ attachments?: RESTAPIAttachment[] | undefined; /** * Message flags combined as a bitfield */ flags?: MessageFlags | undefined; /** * If `true` and nonce is present, it will be checked for uniqueness in the past few minutes. * If another message was created by the same author with the same nonce, that message will be returned and no new message will be created. */ enforce_nonce?: boolean | undefined; /** * A poll! */ poll?: RESTAPIPoll | undefined; } /** * @see {@link https://discord.com/developers/docs/resources/channel#create-message} */ export type RESTPostAPIChannelMessageFormDataBody = (Record<`files[${bigint}]`, unknown> & { /** * JSON stringified message body */ payload_json?: string | undefined; }) | (Record<`files[${bigint}]`, unknown> & RESTPostAPIChannelMessageJSONBody); /** * @see {@link https://discord.com/developers/docs/resources/channel#create-message} */ export type RESTPostAPIChannelMessageResult = APIMessage; /** * @see {@link https://discord.com/developers/docs/resources/channel#crosspost-message} */ export type RESTPostAPIChannelMessageCrosspostResult = APIMessage; /** * @see {@link https://discord.com/developers/docs/resources/channel#create-reaction} */ export type RESTPutAPIChannelMessageReactionResult = never; /** * @see {@link https://discord.com/developers/docs/resources/channel#delete-own-reaction} */ export type RESTDeleteAPIChannelMessageOwnReactionResult = never; /** * @deprecated Use {@link RESTDeleteAPIChannelMessageOwnReactionResult} instead */ export type RESTDeleteAPIChannelMessageOwnReaction = RESTDeleteAPIChannelMessageOwnReactionResult; /** * @see {@link https://discord.com/developers/docs/resources/channel#delete-user-reaction} */ export type RESTDeleteAPIChannelMessageUserReactionResult = never; /** * @see {@link https://discord.com/developers/docs/resources/channel#get-reactions} */ export interface RESTGetAPIChannelMessageReactionUsersQuery { /** * The reaction type */ type?: ReactionType; /** * Get users after this user ID */ after?: Snowflake; /** * Max number of users to return (1-100) * * @defaultValue `25` */ limit?: number; } /** * @see {@link https://discord.com/developers/docs/resources/channel#get-reactions-reaction-types} */ export declare enum ReactionType { Normal = 0, Super = 1 } /** * @see {@link https://discord.com/developers/docs/resources/channel#get-reactions} */ export type RESTGetAPIChannelMessageReactionUsersResult = APIUser[]; /** * @see {@link https://discord.com/developers/docs/resources/channel#delete-all-reactions} */ export type RESTDeleteAPIChannelAllMessageReactionsResult = never; /** * @see {@link https://discord.com/developers/docs/resources/channel#delete-all-reactions-for-emoji} */ export type RESTDeleteAPIChannelMessageReactionResult = never; /** * @see {@link https://discord.com/developers/docs/resources/channel#edit-message} */ export interface RESTPatchAPIChannelMessageJSONBody { /** * The new message contents (up to 2000 characters) */ content?: string | null | undefined; /** * Embedded `rich` content (up to 6000 characters) * * @see {@link https://discord.com/developers/docs/resources/channel#embed-object} */ embeds?: APIEmbed[] | null | undefined; /** * Embedded `rich` content * * @see {@link https://discord.com/developers/docs/resources/channel#embed-object} * @deprecated Use {@link RESTPatchAPIChannelMessageJSONBody.embeds} instead */ embed?: APIEmbed | null | undefined; /** * Edit the flags of a message (only `SUPPRESS_EMBEDS` can currently be set/unset) * * When specifying flags, ensure to include all previously set flags/bits * in addition to ones that you are modifying * * @see {@link https://discord.com/developers/docs/resources/channel#message-object-message-flags} */ flags?: MessageFlags | null | undefined; /** * Allowed mentions for the message * * @see {@link https://discord.com/developers/docs/resources/channel#allowed-mentions-object} */ allowed_mentions?: APIAllowedMentions | null | undefined; /** * Attached files to keep * * Starting with API v10, the `attachments` array must contain all attachments that should be present after edit, including **retained and new** attachments provided in the request body. * * @see {@link https://discord.com/developers/docs/resources/message#attachment-object-attachment-structure} */ attachments?: RESTAPIAttachment[] | undefined; /** * The components to include with the message * * @see {@link https://discord.com/developers/docs/components/reference} */ components?: APIMessageTopLevelComponent[] | null | undefined; } /** * @see {@link https://discord.com/developers/docs/resources/channel#edit-message} */ export type RESTPatchAPIChannelMessageFormDataBody = (Record<`files[${bigint}]`, unknown> & { /** * JSON stringified message body */ payload_json?: string | undefined; }) | (Record<`files[${bigint}]`, unknown> & RESTPatchAPIChannelMessageJSONBody); /** * @see {@link https://discord.com/developers/docs/resources/channel#edit-message} */ export type RESTPatchAPIChannelMessageResult = APIMessage; /** * @see {@link https://discord.com/developers/docs/resources/channel#delete-message} */ export type RESTDeleteAPIChannelMessageResult = never; /** * @see {@link https://discord.com/developers/docs/resources/channel#bulk-delete-messages} */ export interface RESTPostAPIChannelMessagesBulkDeleteJSONBody { /** * An array of message ids to delete (2-100) */ messages: Snowflake[]; } /** * @see {@link https://discord.com/developers/docs/resources/channel#bulk-delete-messages} */ export type RESTPostAPIChannelMessagesBulkDeleteResult = never; /** * @see {@link https://discord.com/developers/docs/resources/channel#edit-channel-permissions} */ export interface RESTPutAPIChannelPermissionJSONBody { /** * The bitwise value of all allowed permissions * * @see {@link https://en.wikipedia.org/wiki/Bit_field} * @defaultValue `"0"` */ allow?: Permissions | null | undefined; /** * The bitwise value of all disallowed permissions * * @see {@link https://en.wikipedia.org/wiki/Bit_field} * @defaultValue `"0"` */ deny?: Permissions | null | undefined; /** * `0` for a role or `1` for a member */ type: OverwriteType; } /** * @see {@link https://discord.com/developers/docs/resources/channel#edit-channel-permissions} */ export type RESTPutAPIChannelPermissionResult = never; /** * @see {@link https://discord.com/developers/docs/resources/channel#get-channel-invites} */ export type RESTGetAPIChannelInvitesResult = APIExtendedInvite[]; /** * @see {@link https://discord.com/developers/docs/resources/channel#create-channel-invite} */ export interface RESTPostAPIChannelInviteJSONBody { /** * Duration of invite in seconds before expiry, or 0 for never * * @defaultValue `86400` (24 hours) */ max_age?: number | undefined; /** * Max number of uses or 0 for unlimited * * @defaultValue `0` */ max_uses?: number | undefined; /** * Whether this invite only grants temporary membership * * @defaultValue `false` */ temporary?: boolean | undefined; /** * If true, don't try to reuse a similar invite * (useful for creating many unique one time use invites) * * @defaultValue `false` */ unique?: boolean | undefined; /** * The type of target for this voice channel invite * * @see {@link https://discord.com/developers/docs/resources/invite#invite-object-invite-target-types} */ target_type?: InviteTargetType | undefined; /** * The id of the user whose stream to display for this invite * - Required if `target_type` is 1 * - The user must be streaming in the channel */ target_user_id?: Snowflake | undefined; /** * The id of the embedded application to open for this invite * - Required if `target_type` is 2 * - The application must have the `EMBEDDED` flag */ target_application_id?: Snowflake | undefined; } /** * @see {@link https://discord.com/developers/docs/resources/channel#create-channel-invite} */ export type RESTPostAPIChannelInviteResult = APIExtendedInvite; /** * @see {@link https://discord.com/developers/docs/resources/channel#delete-channel-permission} */ export type RESTDeleteAPIChannelPermissionResult = never; /** * @see {@link https://discord.com/developers/docs/resources/channel#follow-news-channel} */ export interface RESTPostAPIChannelFollowersJSONBody { /** * ID of target channel */ webhook_channel_id: Snowflake; } /** * @see {@link https://discord.com/developers/docs/resources/channel#follow-news-channel} */ export type RESTPostAPIChannelFollowersResult = APIFollowedChannel; /** * @see {@link https://discord.com/developers/docs/resources/channel#trigger-typing-indicator} */ export type RESTPostAPIChannelTypingResult = never; /** * @see {@link https://discord.com/developers/docs/resources/channel#get-pinned-messages} */ export type RESTGetAPIChannelPinsResult = APIMessage[]; /** * @see {@link https://discord.com/developers/docs/resources/channel#pin-message} */ export type RESTPutAPIChannelPinResult = never; /** * @see {@link https://discord.com/developers/docs/resources/channel#unpin-message} */ export type RESTDeleteAPIChannelPinResult = never; /** * @see {@link https://discord.com/developers/docs/resources/channel#group-dm-add-recipient} */ export interface RESTPutAPIChannelRecipientJSONBody { /** * Access token of a user that has granted your app the `gdm.join` scope */ access_token: string; /** * Nickname of the user being added */ nick?: string | undefined; } /** * @see {@link https://discord.com/developers/docs/resources/channel#group-dm-add-recipient} */ export type RESTPutAPIChannelRecipientResult = unknown; /** * @see {@link https://discord.com/developers/docs/resources/channel#group-dm-remove-recipient} */ export type RESTDeleteAPIChannelRecipientResult = unknown; /** * @see {@link https://discord.com/developers/docs/resources/channel#start-thread-from-message} */ export interface RESTPostAPIChannelMessagesThreadsJSONBody { /** * 1-100 character thread name */ name: string; /** * The amount of time in minutes to wait before automatically archiving the thread */ auto_archive_duration?: ThreadAutoArchiveDuration | undefined; /** * Amount of seconds a user has to wait before sending another message (0-21600) */ rate_limit_per_user?: number | undefined; } /** * @see {@link https://discord.com/developers/docs/resources/channel#start-thread-in-forum-or-media-channel} */ export type RESTPostAPIGuildForumThreadsJSONBody = RESTPostAPIChannelMessagesThreadsJSONBody & { /** * The initial message of the thread */ message: RESTPostAPIChannelMessageJSONBody; /** * The IDs of the set of tags to apply to the thread; limited to 5 */ applied_tags?: Snowflake[] | undefined; }; /** * @see {@link https://discord.com/developers/docs/resources/channel#start-thread-in-forum-or-media-channel} */ export type RESTPostAPIGuildForumThreadsFormDataBody = RESTPostAPIChannelMessagesThreadsJSONBody & { /** * The initial message of the thread */ message: string; }; /** * @see {@link https://discord.com/developers/docs/resources/channel#start-thread-from-message} */ export type RESTPostAPIChannelMessagesThreadsResult = APIChannel; /** * @see {@link https://discord.com/developers/docs/resources/channel#start-thread-without-message} */ export interface RESTPostAPIChannelThreadsJSONBody extends RESTPostAPIChannelMessagesThreadsJSONBody { /** * The type of thread to create * * @see {@link https://discord.com/developers/docs/resources/channel#channel-object-channel-types} * @defaultValue `ChannelType.PrivateThread` in API v9. * In a future API version this will be changed to be a required field, with no default. */ type?: ThreadChannelType | undefined; /** * Whether non-moderators can add other non-moderators to the thread; only available when creating a private thread */ invitable?: boolean | undefined; } /** * @see {@link https://discord.com/developers/docs/resources/channel#start-thread-without-message} */ export type RESTPostAPIChannelThreadsResult = APIChannel; /** * @see {@link https://discord.com/developers/docs/resources/channel#join-thread} */ export type RESTPutAPIChannelThreadMembersResult = never; /** * @see {@link https://discord.com/developers/docs/resources/channel#leave-thread} */ export type RESTDeleteAPIChannelThreadMembersResult = never; /** * @see {@link https://discord.com/developers/docs/resources/channel#get-thread-member} */ export interface RESTGetAPIChannelThreadMemberQuery { /** * Whether to include a guild member object for the thread member */ with_member?: boolean; } /** * @see {@link https://discord.com/developers/docs/resources/channel#get-thread-member} */ export type RESTGetAPIChannelThreadMemberResult = APIThreadMember; /** * @see {@link https://discord.com/developers/docs/resources/channel#list-thread-members} */ export interface RESTGetAPIChannelThreadMembersQuery { /** * Whether to include a guild member object for each thread member */ with_member?: boolean; /** * Get thread members after this user ID */ after?: Snowflake; /** * Max number of thread members to return (1-100) * * @defaultValue `100` */ limit?: number; } /** * @see {@link https://discord.com/developers/docs/resources/channel#list-thread-members} */ export type RESTGetAPIChannelThreadMembersResult = APIThreadMember[]; /** * @see {@link https://discord.com/developers/docs/resources/channel#list-public-archived-threads} */ export interface RESTGetAPIChannelThreadsArchivedQuery { /** * Get threads before this id or ISO8601 timestamp */ before?: Snowflake | string; /** * Max number of thread to return */ limit?: number; } /** * @see {@link https://discord.com/developers/docs/resources/channel#list-public-archived-threads} */ export type RESTGetAPIChannelThreadsArchivedPublicResult = RESTGetAPIChannelUsersThreadsArchivedResult; /** * @see {@link https://discord.com/developers/docs/resources/channel#list-private-archived-threads} */ export type RESTGetAPIChannelThreadsArchivedPrivateResult = RESTGetAPIChannelUsersThreadsArchivedResult; /** * @see {@link https://discord.com/developers/docs/resources/channel#list-active-threads} * @deprecated Removed in API v10, use {@link https://discord.com/developers/docs/resources/guild#list-active-guild-threads | List Active Guild Threads} instead. */ export type RESTGetAPIChannelThreadsResult = APIThreadList; /** * @see {@link https://discord.com/developers/docs/resources/channel#list-joined-private-archived-threads} */ export type RESTGetAPIChannelUsersThreadsArchivedResult = APIThreadList; //# sourceMappingURL=channel.d.ts.map node_modules/discord-api-types/rest/v9/template.js 0000664 00000000161 15114741631 0016250 0 ustar 00 "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); //# sourceMappingURL=template.js.map node_modules/discord-api-types/rest/v9/monetization.js 0000664 00000001047 15114741631 0017161 0 ustar 00 "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.EntitlementOwnerType = void 0; /** * @see {@link https://discord.com/developers/docs/resources/entitlement#create-test-entitlement} */ var EntitlementOwnerType; (function (EntitlementOwnerType) { EntitlementOwnerType[EntitlementOwnerType["Guild"] = 1] = "Guild"; EntitlementOwnerType[EntitlementOwnerType["User"] = 2] = "User"; })(EntitlementOwnerType || (exports.EntitlementOwnerType = EntitlementOwnerType = {})); //# sourceMappingURL=monetization.js.map node_modules/discord-api-types/rest/v9/sticker.js 0000664 00000000160 15114741631 0016100 0 ustar 00 "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); //# sourceMappingURL=sticker.js.map node_modules/discord-api-types/rest/v9/monetization.d.ts 0000664 00000007741 15114741631 0017424 0 ustar 00 import type { Snowflake } from '../../globals'; import type { APIEntitlement, APISKU, APISubscription } from '../../v9'; /** * @see {@link https://discord.com/developers/docs/resources/entitlement#list-entitlements} */ export interface RESTGetAPIEntitlementsQuery { /** * User ID to look up entitlements for */ user_id?: Snowflake | undefined; /** * Optional list of SKU IDs to check entitlements for * Comma-delimited set of snowflakes */ sku_ids?: string | undefined; /** * Retrieve entitlements before this entitlement ID */ before?: Snowflake | undefined; /** * Retrieve entitlements after this entitlement ID */ after?: Snowflake | undefined; /** * Number of entitlements to return (1-100) * * @defaultValue `100` */ limit?: number | undefined; /** * Guild ID to look up entitlements for */ guild_id?: Snowflake | undefined; /** * Whether ended entitlements should be omitted * * @defaultValue `false` ended entitlements are included by default */ exclude_ended?: boolean | undefined; /** * Whether deleted entitlements should be omitted * * @defaultValue `true` deleted entitlements are not included by default */ exclude_deleted?: boolean | undefined; } /** * @see {@link https://discord.com/developers/docs/resources/entitlement#list-entitlements} */ export type RESTGetAPIEntitlementsResult = APIEntitlement[]; /** * @see {@link https://discord.com/developers/docs/resources/entitlement#get-entitlement} */ export type RESTGetAPIEntitlementResult = APIEntitlement; /** * @see {@link https://discord.com/developers/docs/resources/entitlement#create-test-entitlement} */ export interface RESTPostAPIEntitlementJSONBody { /** * ID of the SKU to grant the entitlement to */ sku_id: Snowflake; /** * ID of the guild or user to grant the entitlement to */ owner_id: Snowflake; /** * The type of entitlement owner */ owner_type: EntitlementOwnerType; } /** * @deprecated Use {@link RESTPostAPIEntitlementJSONBody} instead */ export type RESTPostAPIEntitlementBody = RESTPostAPIEntitlementJSONBody; /** * @see {@link https://discord.com/developers/docs/resources/entitlement#create-test-entitlement} */ export type RESTPostAPIEntitlementResult = Partial<Omit<APIEntitlement, 'ends_at' | 'starts_at'>>; /** * @see {@link https://discord.com/developers/docs/resources/entitlement#create-test-entitlement} */ export declare enum EntitlementOwnerType { Guild = 1, User = 2 } /** * @see {@link https://discord.com/developers/docs/resources/entitlement#delete-test-entitlement} */ export type RESTDeleteAPIEntitlementResult = never; /** * @see {@link https://discord.com/developers/docs/resources/sku#list-skus} */ export type RESTGetAPISKUsResult = APISKU[]; /** * @see {@link https://discord.com/developers/docs/resources/entitlement#consume-an-entitlement} */ export type RESTPostAPIEntitlementConsumeResult = never; /** * @see {@link https://discord.com/developers/docs/resources/subscription#query-string-params} */ export interface RESTGetAPISKUSubscriptionsQuery { /** * List subscriptions before this ID */ before?: Snowflake | undefined; /** * List subscriptions after this ID */ after?: Snowflake | undefined; /** * Number of subscriptions to return (1-100) * * @defaultValue `50` */ limit?: number | undefined; /** * User ID for which to return subscriptions. Required except for OAuth queries. */ user_id?: Snowflake | undefined; } /** * @see {@link https://discord.com/developers/docs/resources/subscription#list-sku-subscriptions} */ export type RESTGetAPISKUSubscriptionsResult = APISubscription[]; /** * @see {@link https://discord.com/developers/docs/resources/subscription#get-sku-subscription} */ export type RESTGetAPISKUSubscriptionResult = APISubscription; //# sourceMappingURL=monetization.d.ts.map node_modules/discord-api-types/rest/v9/guildScheduledEvent.d.ts.map 0000664 00000003433 15114741631 0021401 0 ustar 00 {"version":3,"file":"guildScheduledEvent.d.ts","sourceRoot":"","sources":["guildScheduledEvent.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC/C,OAAO,KAAK,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AACvE,OAAO,KAAK,EACX,sBAAsB,EACtB,oCAAoC,EACpC,oCAAoC,EACpC,0BAA0B,EAC1B,6BAA6B,EAC7B,+BAA+B,EAC/B,yBAAyB,EACzB,MAAM,UAAU,CAAC;AAElB;;GAEG;AACH,MAAM,WAAW,mCAAmC;IACn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C;AAED;;GAEG;AACH,MAAM,MAAM,qCAAqC,GAAG,sBAAsB,CAAC;AAE3E;;GAEG;AACH,MAAM,MAAM,sCAAsC,GAAG,KAAK,CAAC;AAE3D;;GAEG;AACH,MAAM,WAAW,uCAAuC;IACvD;;;;OAIG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB;;OAEG;IACH,MAAM,CAAC,EAAE,SAAS,CAAC;IACnB;;OAEG;IACH,KAAK,CAAC,EAAE,SAAS,CAAC;CAClB;AAED;;GAEG;AACH,MAAM,MAAM,wCAAwC,GAAG,0BAA0B,EAAE,CAAC"} node_modules/discord-api-types/rest/v9/guildScheduledEvent.js 0000664 00000000174 15114741631 0020370 0 ustar 00 "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); //# sourceMappingURL=guildScheduledEvent.js.map node_modules/discord-api-types/rest/v9/sticker.js.map 0000664 00000000143 15114741631 0016655 0 ustar 00 {"version":3,"file":"sticker.js","sourceRoot":"","sources":["sticker.ts"],"names":[],"mappings":""} node_modules/discord-api-types/rest/common.d.ts 0000664 00000025212 15114741631 0015627 0 ustar 00 /** * @see {@link https://discord.com/developers/docs/topics/opcodes-and-status-codes#json-json-error-codes} */ export declare enum RESTJSONErrorCodes { GeneralError = 0, UnknownAccount = 10001, UnknownApplication = 10002, UnknownChannel = 10003, UnknownGuild = 10004, UnknownIntegration = 10005, UnknownInvite = 10006, UnknownMember = 10007, UnknownMessage = 10008, UnknownPermissionOverwrite = 10009, UnknownProvider = 10010, UnknownRole = 10011, UnknownToken = 10012, UnknownUser = 10013, UnknownEmoji = 10014, UnknownWebhook = 10015, UnknownWebhookService = 10016, UnknownSession = 10020, UnknownAsset = 10021, UnknownBan = 10026, UnknownSKU = 10027, UnknownStoreListing = 10028, UnknownEntitlement = 10029, UnknownBuild = 10030, UnknownLobby = 10031, UnknownBranch = 10032, UnknownStoreDirectoryLayout = 10033, UnknownRedistributable = 10036, UnknownGiftCode = 10038, UnknownStream = 10049, UnknownPremiumServerSubscribeCooldown = 10050, UnknownGuildTemplate = 10057, UnknownDiscoverableServerCategory = 10059, UnknownSticker = 10060, UnknownStickerPack = 10061, UnknownInteraction = 10062, UnknownApplicationCommand = 10063, UnknownVoiceState = 10065, UnknownApplicationCommandPermissions = 10066, UnknownStageInstance = 10067, UnknownGuildMemberVerificationForm = 10068, UnknownGuildWelcomeScreen = 10069, UnknownGuildScheduledEvent = 10070, UnknownGuildScheduledEventUser = 10071, UnknownTag = 10087, UnknownSound = 10097, BotsCannotUseThisEndpoint = 20001, OnlyBotsCanUseThisEndpoint = 20002, ExplicitContentCannotBeSentToTheDesiredRecipient = 20009, NotAuthorizedToPerformThisActionOnThisApplication = 20012, ActionCannotBePerformedDueToSlowmodeRateLimit = 20016, TheMazeIsntMeantForYou = 20017, OnlyTheOwnerOfThisAccountCanPerformThisAction = 20018, AnnouncementEditLimitExceeded = 20022, UnderMinimumAge = 20024, ChannelSendRateLimit = 20028, ServerSendRateLimit = 20029, StageTopicServerNameServerDescriptionOrChannelNamesContainDisallowedWords = 20031, GuildPremiumSubscriptionLevelTooLow = 20035, MaximumNumberOfGuildsReached = 30001, MaximumNumberOfFriendsReached = 30002, MaximumNumberOfPinsReachedForTheChannel = 30003, MaximumNumberOfRecipientsReached = 30004, MaximumNumberOfGuildRolesReached = 30005, MaximumNumberOfWebhooksReached = 30007, MaximumNumberOfEmojisReached = 30008, MaximumNumberOfReactionsReached = 30010, MaximumNumberOfGroupDMsReached = 30011, MaximumNumberOfGuildChannelsReached = 30013, MaximumNumberOfAttachmentsInAMessageReached = 30015, MaximumNumberOfInvitesReached = 30016, MaximumNumberOfAnimatedEmojisReached = 30018, MaximumNumberOfServerMembersReached = 30019, MaximumNumberOfServerCategoriesReached = 30030, GuildAlreadyHasTemplate = 30031, MaximumNumberOfApplicationCommandsReached = 30032, MaximumThreadParticipantsReached = 30033, MaximumDailyApplicationCommandCreatesReached = 30034, MaximumNumberOfNonGuildMemberBansHasBeenExceeded = 30035, MaximumNumberOfBanFetchesHasBeenReached = 30037, MaximumNumberOfUncompletedGuildScheduledEventsReached = 30038, MaximumNumberOfStickersReached = 30039, MaximumNumberOfPruneRequestsHasBeenReached = 30040, MaximumNumberOfGuildWidgetSettingsUpdatesHasBeenReached = 30042, MaximumNumberOfSoundboardSoundsReached = 30045, MaximumNumberOfEditsToMessagesOlderThanOneHourReached = 30046, MaximumNumberOfPinnedThreadsInForumHasBeenReached = 30047, MaximumNumberOfTagsInForumHasBeenReached = 30048, BitrateIsTooHighForChannelOfThisType = 30052, MaximumNumberOfPremiumEmojisReached = 30056, MaximumNumberOfWebhooksPerGuildReached = 30058, MaximumNumberOfChannelPermissionOverwritesReached = 30060, TheChannelsForThisGuildAreTooLarge = 30061, Unauthorized = 40001, VerifyYourAccount = 40002, OpeningDirectMessagesTooFast = 40003, SendMessagesHasBeenTemporarilyDisabled = 40004, RequestEntityTooLarge = 40005, FeatureTemporarilyDisabledServerSide = 40006, UserBannedFromThisGuild = 40007, ConnectionHasBeenRevoked = 40012, OnlyConsumableSKUsCanBeConsumed = 40018, YouCanOnlyDeleteSandboxEntitlements = 40019, TargetUserIsNotConnectedToVoice = 40032, ThisMessageWasAlreadyCrossposted = 40033, ApplicationCommandWithThatNameAlreadyExists = 40041, ApplicationInteractionFailedToSend = 40043, CannotSendAMessageInAForumChannel = 40058, InteractionHasAlreadyBeenAcknowledged = 40060, TagNamesMustBeUnique = 40061, ServiceResourceIsBeingRateLimited = 40062, ThereAreNoTagsAvailableThatCanBeSetByNonModerators = 40066, TagRequiredToCreateAForumPostInThisChannel = 40067, AnEntitlementHasAlreadyBeenGrantedForThisResource = 40074, ThisInteractionHasHitTheMaximumNumberOfFollowUpMessages = 40094, CloudflareIsBlockingYourRequest = 40333, MissingAccess = 50001, InvalidAccountType = 50002, CannotExecuteActionOnDMChannel = 50003, GuildWidgetDisabled = 50004, CannotEditMessageAuthoredByAnotherUser = 50005, CannotSendAnEmptyMessage = 50006, CannotSendMessagesToThisUser = 50007, CannotSendMessagesInNonTextChannel = 50008, ChannelVerificationLevelTooHighForYouToGainAccess = 50009, OAuth2ApplicationDoesNotHaveBot = 50010, OAuth2ApplicationLimitReached = 50011, InvalidOAuth2State = 50012, MissingPermissions = 50013, InvalidToken = 50014, NoteWasTooLong = 50015, ProvidedTooFewOrTooManyMessagesToDelete = 50016, InvalidMFALevel = 50017, MessageCanOnlyBePinnedInTheChannelItWasSentIn = 50019, InviteCodeInvalidOrTaken = 50020, CannotExecuteActionOnSystemMessage = 50021, CannotExecuteActionOnThisChannelType = 50024, InvalidOAuth2AccessToken = 50025, MissingRequiredOAuth2Scope = 50026, InvalidWebhookToken = 50027, InvalidRole = 50028, InvalidRecipients = 50033, OneOfTheMessagesProvidedWasTooOldForBulkDelete = 50034, InvalidFormBodyOrContentType = 50035, InviteAcceptedToGuildWithoutTheBotBeingIn = 50036, InvalidActivityAction = 50039, InvalidAPIVersion = 50041, FileUploadedExceedsMaximumSize = 50045, InvalidFileUploaded = 50046, CannotSelfRedeemThisGift = 50054, InvalidGuild = 50055, InvalidSKU = 50057, InvalidRequestOrigin = 50067, InvalidMessageType = 50068, PaymentSourceRequiredToRedeemGift = 50070, CannotModifyASystemWebhook = 50073, CannotDeleteChannelRequiredForCommunityGuilds = 50074, CannotEditStickersWithinMessage = 50080, InvalidStickerSent = 50081, InvalidActionOnArchivedThread = 50083, InvalidThreadNotificationSettings = 50084, ParameterEarlierThanCreation = 50085, CommunityServerChannelsMustBeTextChannels = 50086, TheEntityTypeOfTheEventIsDifferentFromTheEntityYouAreTryingToStartTheEventFor = 50091, ServerNotAvailableInYourLocation = 50095, ServerNeedsMonetizationEnabledToPerformThisAction = 50097, ServerNeedsMoreBoostsToPerformThisAction = 50101, RequestBodyContainsInvalidJSON = 50109, ProvidedFileIsInvalid = 50110, ProvidedFileTypeIsInvalid = 50123, ProvidedFileDurationExceedsMaximumLength = 50124, OwnerCannotBePendingMember = 50131, OwnershipCannotBeMovedToABotUser = 50132, FailedToResizeAssetBelowTheMinimumSize = 50138, CannotMixSubscriptionAndNonSubscriptionRolesForAnEmoji = 50144, CannotConvertBetweenPremiumEmojiAndNormalEmoji = 50145, UploadedFileNotFound = 50146, SpecifiedEmojiIsInvalid = 50151, VoiceMessagesDoNotSupportAdditionalContent = 50159, VoiceMessagesMustHaveASingleAudioAttachment = 50160, VoiceMessagesMustHaveSupportingMetadata = 50161, VoiceMessagesCannotBeEdited = 50162, CannotDeleteGuildSubscriptionIntegration = 50163, YouCannotSendVoiceMessagesInThisChannel = 50173, TheUserAccountMustFirstBeVerified = 50178, ProvidedFileDoesNotHaveAValidDuration = 50192, YouDoNotHavePermissionToSendThisSticker = 50600, TwoFactorAuthenticationIsRequired = 60003, NoUsersWithDiscordTagExist = 80004, ReactionWasBlocked = 90001, UserCannotUseBurstReactions = 90002, ApplicationNotYetAvailable = 110001, APIResourceOverloaded = 130000, TheStageIsAlreadyOpen = 150006, CannotReplyWithoutPermissionToReadMessageHistory = 160002, ThreadAlreadyCreatedForMessage = 160004, ThreadLocked = 160005, MaximumActiveThreads = 160006, MaximumActiveAnnouncementThreads = 160007, InvalidJSONForUploadedLottieFile = 170001, UploadedLottiesCannotContainRasterizedImages = 170002, StickerMaximumFramerateExceeded = 170003, StickerFrameCountExceedsMaximumOf1000Frames = 170004, LottieAnimationMaximumDimensionsExceeded = 170005, StickerFramerateIsTooSmallOrTooLarge = 170006, StickerAnimationDurationExceedsMaximumOf5Seconds = 170007, CannotUpdateAFinishedEvent = 180000, FailedToCreateStageNeededForStageEvent = 180002, MessageWasBlockedByAutomaticModeration = 200000, TitleWasBlockedByAutomaticModeration = 200001, WebhooksPostedToForumChannelsMustHaveAThreadNameOrThreadId = 220001, WebhooksPostedToForumChannelsCannotHaveBothAThreadNameAndThreadId = 220002, WebhooksCanOnlyCreateThreadsInForumChannels = 220003, WebhookServicesCannotBeUsedInForumChannels = 220004, MessageBlockedByHarmfulLinksFilter = 240000, CannotEnableOnboardingRequirementsAreNotMet = 350000, CannotUpdateOnboardingWhileBelowRequirements = 350001, FailedToBanUsers = 500000, PollVotingBlocked = 520000, PollExpired = 520001, InvalidChannelTypeForPollCreation = 520002, CannotEditAPollMessage = 520003, CannotUseAnEmojiIncludedWithThePoll = 520004, CannotExpireANonPollMessage = 520006 } /** * @see {@link https://discord.com/developers/docs/reference#locales} */ export declare enum Locale { Indonesian = "id", EnglishUS = "en-US", EnglishGB = "en-GB", Bulgarian = "bg", ChineseCN = "zh-CN", ChineseTW = "zh-TW", Croatian = "hr", Czech = "cs", Danish = "da", Dutch = "nl", Finnish = "fi", French = "fr", German = "de", Greek = "el", Hindi = "hi", Hungarian = "hu", Italian = "it", Japanese = "ja", Korean = "ko", Lithuanian = "lt", Norwegian = "no", Polish = "pl", PortugueseBR = "pt-BR", Romanian = "ro", Russian = "ru", SpanishES = "es-ES", SpanishLATAM = "es-419", Swedish = "sv-SE", Thai = "th", Turkish = "tr", Ukrainian = "uk", Vietnamese = "vi" } /** * @deprecated Use {@link Locale} instead. */ export type LocaleString = `${Locale}`; //# sourceMappingURL=common.d.ts.map node_modules/discord-api-types/rest/index.js 0000664 00000001755 15114741631 0015220 0 ustar 00 "use strict"; // This file exports all the types available in the recommended API version // Thereby, things MAY break in the future. Try sticking to imports from a specific version var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { if (k2 === undefined) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { return m[k]; } }; } Object.defineProperty(o, k2, desc); }) : (function(o, m, k, k2) { if (k2 === undefined) k2 = k; o[k2] = m[k]; })); var __exportStar = (this && this.__exportStar) || function(m, exports) { for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); }; Object.defineProperty(exports, "__esModule", { value: true }); __exportStar(require("./v10/index"), exports); //# sourceMappingURL=index.js.map node_modules/discord-api-types/CHANGELOG.md 0000664 00000451237 15114741631 0014413 0 ustar 00 ## [0.38.13](https://github.com/discordjs/discord-api-types/compare/0.38.12...0.38.13) (2025-06-23) ### Features * **APIUser:** add `collectibles` ([#1274](https://github.com/discordjs/discord-api-types/issues/1274)) ([77cb327](https://github.com/discordjs/discord-api-types/commit/77cb32746f47247a4229910db8ec64f844038529)) ## [0.38.12](https://github.com/discordjs/discord-api-types/compare/0.38.11...0.38.12) (2025-06-16) ### Features * **APIApplication:** add `approximate_user_authorization_count` ([#1272](https://github.com/discordjs/discord-api-types/issues/1272)) ([91d8516](https://github.com/discordjs/discord-api-types/commit/91d851628d2078e70b79e4aa7e464297eca745ce)) * **APIUnfurledMediaItem:** add `attachment_id` ([#1273](https://github.com/discordjs/discord-api-types/issues/1273)) ([b2da18c](https://github.com/discordjs/discord-api-types/commit/b2da18c634c4e20112ce13a8e0a5e6db50063acc)) ## [0.38.11](https://github.com/discordjs/discord-api-types/compare/0.38.10...0.38.11) (2025-06-04) ### Bug Fixes * **voice:** add `max_dave_protocol_version` to identify ([#1260](https://github.com/discordjs/discord-api-types/issues/1260)) ([83d34ef](https://github.com/discordjs/discord-api-types/commit/83d34ef00c4e25d5050c7fc47562b3faa9125215)) * **voice:** add clients connect and client disconnect recieve payload ([#1261](https://github.com/discordjs/discord-api-types/issues/1261)) ([121fb47](https://github.com/discordjs/discord-api-types/commit/121fb47f4c0c51d6149bcf051ffc5bae04b1bba8)) * **voice:** fix remaining payload typos ([#1262](https://github.com/discordjs/discord-api-types/issues/1262)) ([d71276c](https://github.com/discordjs/discord-api-types/commit/d71276cb5f3423a81780494d041694356b8cb49c)) ### Features * voice v8 payloads & MLS voice opcodes ([#1257](https://github.com/discordjs/discord-api-types/issues/1257)) ([ebf313c](https://github.com/discordjs/discord-api-types/commit/ebf313c49c1d78cb1aaf238cfbae7c114f6215cf)) ## [0.38.10](https://github.com/discordjs/discord-api-types/compare/0.38.9...0.38.10) (2025-06-02) ## [0.38.9](https://github.com/discordjs/discord-api-types/compare/0.38.8...0.38.9) (2025-05-31) ### Bug Fixes * discriminated thread channel types ([#1247](https://github.com/discordjs/discord-api-types/issues/1247)) ([72b8c83](https://github.com/discordjs/discord-api-types/commit/72b8c830ee6ed369085644e93b3e27849b0274ed)) * optional `client_id` and `client_secret` in access token data ([#1248](https://github.com/discordjs/discord-api-types/issues/1248)) ([b360b2e](https://github.com/discordjs/discord-api-types/commit/b360b2e6a767fa34d48b2f02fd19511a2db98ecb)) ### Features * deauthorised webhook events ([#1253](https://github.com/discordjs/discord-api-types/issues/1253)) ([9daac44](https://github.com/discordjs/discord-api-types/commit/9daac44f1d056115755e92fcc22995a9c05012be)) ## [0.38.8](https://github.com/discordjs/discord-api-types/compare/0.38.7...0.38.8) (2025-05-15) ## [0.38.7](https://github.com/discordjs/discord-api-types/compare/0.38.6...0.38.7) (2025-05-15) ## [0.38.6](https://github.com/discordjs/discord-api-types/compare/0.38.5...0.38.6) (2025-05-15) ### Bug Fixes * wrong exports reported by ae ([#1239](https://github.com/discordjs/discord-api-types/issues/1239)) ([a5d949e](https://github.com/discordjs/discord-api-types/commit/a5d949e650fbc325c6b619da00edfa66d28abc72)) ### Features * experimental new docs gen ([#1240](https://github.com/discordjs/discord-api-types/issues/1240)) ([3af2ae2](https://github.com/discordjs/discord-api-types/commit/3af2ae2b85550c83ec9bf1e124226d16e6a8ca7e)) ## [0.38.5](https://github.com/discordjs/discord-api-types/compare/0.38.4...0.38.5) (2025-05-12) ### Bug Fixes * imports ([#1237](https://github.com/discordjs/discord-api-types/issues/1237)) ([c64362a](https://github.com/discordjs/discord-api-types/commit/c64362a711940a5fb5b0cb56c374ebc003fb3b0d)) ### Features * `APIWebhookSourceChannel` ([#1235](https://github.com/discordjs/discord-api-types/issues/1235)) ([ca20659](https://github.com/discordjs/discord-api-types/commit/ca206593efd1dd8f09a59c832baef0187a7cc963)) * `APIWebhookSourceGuild` ([#1236](https://github.com/discordjs/discord-api-types/issues/1236)) ([21420c3](https://github.com/discordjs/discord-api-types/commit/21420c3028afd8cc0e73cd1081c6ecdd02c81571)) * invite channel ([#1232](https://github.com/discordjs/discord-api-types/issues/1232)) ([0479caf](https://github.com/discordjs/discord-api-types/commit/0479cafa1bedd549d54b7cc6c915fc6beb2ba6ec)) ## [0.38.4](https://github.com/discordjs/discord-api-types/compare/0.38.3...0.38.4) (2025-05-08) ### Features * Specific typings for application emojis ([#1228](https://github.com/discordjs/discord-api-types/issues/1228)) ([4b0a3af](https://github.com/discordjs/discord-api-types/commit/4b0a3af12badba5221604a3304efaeb3d0b46dd7)) ## [0.38.3](https://github.com/discordjs/discord-api-types/compare/0.38.2...0.38.3) (2025-05-05) ## [0.38.2](https://github.com/discordjs/discord-api-types/compare/0.38.1...0.38.2) (2025-05-01) # [0.38.1](https://github.com/discordjs/discord-api-types/compare/0.37.120...0.38.1) (2025-04-22) ### Features * components v2 ([9f769c3](https://github.com/discordjs/discord-api-types/commit/9f769c319eed0cb3d26d5a5c0cb06f8f4a78c071)) * **CDNQuery:** add ImageSize type ([527ac2f](https://github.com/discordjs/discord-api-types/commit/527ac2fe0f80d88e62c025bcdab48d251ac171d6)) ### BREAKING CHANGES * Certain Component alias types have been renamed (for example APIMessageActionRowComponent is now APIComponentInMessageActionRow ## [0.37.120](https://github.com/discordjs/discord-api-types/compare/0.37.119...0.37.120) (2025-04-10) ### Bug Fixes * Ensure autocomplete option values resolve to string for numerical types ([#1198](https://github.com/discordjs/discord-api-types/issues/1198)) ([cfac62e](https://github.com/discordjs/discord-api-types/commit/cfac62e44a02a535b8ed412dae263b8c31475c4a)) ### Features * **APIBaseInteraction:** add `attachment_size_limit` ([#1214](https://github.com/discordjs/discord-api-types/issues/1214)) ([5b6f0d4](https://github.com/discordjs/discord-api-types/commit/5b6f0d43a4e4886a924af840b388c3f482b79f5e)) * **RPC:** types ([#1200](https://github.com/discordjs/discord-api-types/issues/1200)) ([ac4d59d](https://github.com/discordjs/discord-api-types/commit/ac4d59d17edfa77cf28c644f8797204035508a0a)) * **webhook:** add `with_components` query param ([#1208](https://github.com/discordjs/discord-api-types/issues/1208)) ([def67db](https://github.com/discordjs/discord-api-types/commit/def67dbe90206a2a5c7d08ce734a2db6a9175ca3)) ## [0.37.119](https://github.com/discordjs/discord-api-types/compare/0.37.118...0.37.119) (2025-02-02) ### Bug Fixes * route escaping round three ([d5cdb37](https://github.com/discordjs/discord-api-types/commit/d5cdb37a8f06128e472f1ef13ec4d7823f956e7d)) ## [0.37.118](https://github.com/discordjs/discord-api-types/compare/0.37.117...0.37.118) (2025-01-27) ### Features * **APIGuild:** add `incidents_data` ([#822](https://github.com/discordjs/discord-api-types/issues/822)) ([8fe9c07](https://github.com/discordjs/discord-api-types/commit/8fe9c072b3188c51bb3713dae640ba227a266438)) * **MessageFlags:** add HasSnapshot ([#1141](https://github.com/discordjs/discord-api-types/issues/1141)) ([d446be5](https://github.com/discordjs/discord-api-types/commit/d446be5ecdcc3889e30a8af1ce2ac598ffe1b49d)) ## [0.37.117](https://github.com/discordjs/discord-api-types/compare/0.37.116...0.37.117) (2025-01-20) ## [0.37.116](https://github.com/discordjs/discord-api-types/compare/0.37.115...0.37.116) (2025-01-16) ### Features * **VoiceCloseCodes:** add `BadRequest` ([#1191](https://github.com/discordjs/discord-api-types/issues/1191)) ([d9b6935](https://github.com/discordjs/discord-api-types/commit/d9b6935b01665db70ddf8971be5ee42c96f12706)) ## [0.37.115](https://github.com/discordjs/discord-api-types/compare/0.37.114...0.37.115) (2025-01-02) ## [0.37.114](https://github.com/discordjs/discord-api-types/compare/0.37.113...0.37.114) (2024-12-23) ### Bug Fixes * reset pattern index after testing an input ([ee53ef7](https://github.com/discordjs/discord-api-types/commit/ee53ef7306e73d6b9bf341503231186ef27403fb)), closes [/github.com/discordjs/discord-api-types/issues/1181#issuecomment-2558971449](https://github.com//github.com/discordjs/discord-api-types/issues/1181/issues/issuecomment-2558971449) ## [0.37.113](https://github.com/discordjs/discord-api-types/compare/0.37.112...0.37.113) (2024-12-22) ### Bug Fixes * skip encoded url parts from re-encoding ([fc4e7be](https://github.com/discordjs/discord-api-types/commit/fc4e7bebc50fe67a0aa5c49a95793e53d3ff0da9)) ### Features * **ConnectionService:** `Bluesky` and `Mastodon` ([#1174](https://github.com/discordjs/discord-api-types/issues/1174)) ([61592d6](https://github.com/discordjs/discord-api-types/commit/61592d6a85232a6d675a6faeddc096ae3467df6a)) * **payloads:** add entrypoint command payloads ([#1166](https://github.com/discordjs/discord-api-types/issues/1166)) ([bcb13de](https://github.com/discordjs/discord-api-types/commit/bcb13de75b6b45e2a5c1ebde5fa77719123b7993)) ## [0.37.112](https://github.com/discordjs/discord-api-types/compare/0.37.111...0.37.112) (2024-12-19) ### Features * **APISubscription:** add `renewal_sku_ids` ([#1172](https://github.com/discordjs/discord-api-types/issues/1172)) ([fb7c6b8](https://github.com/discordjs/discord-api-types/commit/fb7c6b8903bded49c379ba61a520818ba5ab15ba)) ## [0.37.111](https://github.com/discordjs/discord-api-types/compare/0.37.110...0.37.111) (2024-12-09) ## [0.37.110](https://github.com/discordjs/discord-api-types/compare/0.37.109...0.37.110) (2024-11-28) ### Features * add Chrunchyroll ([#1159](https://github.com/discordjs/discord-api-types/issues/1159)) ([92b1ce2](https://github.com/discordjs/discord-api-types/commit/92b1ce2faee4c4b43bfe524e78cfde1fbbfa5792)) ## [0.37.109](https://github.com/discordjs/discord-api-types/compare/0.37.108...0.37.109) (2024-11-26) ### Features * New entitlement endpoint behaviour ([#1145](https://github.com/discordjs/discord-api-types/issues/1145)) ([079fcd6](https://github.com/discordjs/discord-api-types/commit/079fcd6c006759193ea0b4b97d0d5a34c0459041)) ## [0.37.108](https://github.com/discordjs/discord-api-types/compare/0.37.107...0.37.108) (2024-11-25) ### Features * webhook events ([#1128](https://github.com/discordjs/discord-api-types/issues/1128)) ([ced86e4](https://github.com/discordjs/discord-api-types/commit/ced86e4b42c170c855ee148fb9bdb699ddf1a15b)) ## [0.37.107](https://github.com/discordjs/discord-api-types/compare/0.37.106...0.37.107) (2024-11-21) ### Bug Fixes * **security:** escape path parameters ([1ba3472](https://github.com/discordjs/discord-api-types/commit/1ba34729386c9b9dece237e761114f6d1ef11143)) ## [0.37.106](https://github.com/discordjs/discord-api-types/compare/0.37.105...0.37.106) (2024-11-21) ## [0.37.105](https://github.com/discordjs/discord-api-types/compare/0.37.104...0.37.105) (2024-11-14) ### Features * **_interactions:** Support partial guild objects ([#1142](https://github.com/discordjs/discord-api-types/issues/1142)) ([408165e](https://github.com/discordjs/discord-api-types/commit/408165e96fdd08d56183cf3c5348ee08e8aec056)) * full message object on message update ([#1140](https://github.com/discordjs/discord-api-types/issues/1140)) ([3512262](https://github.com/discordjs/discord-api-types/commit/35122621946ab797d4c0b83cecdec1c3df05b6e0)) * guild member banners ([#1057](https://github.com/discordjs/discord-api-types/issues/1057)) ([3f489f1](https://github.com/discordjs/discord-api-types/commit/3f489f18dccf5efe9e4983e66606998fafffc4dd)) ## [0.37.104](https://github.com/discordjs/discord-api-types/compare/0.37.103...0.37.104) (2024-11-07) ### Bug Fixes * add missing soundboard types ([#1134](https://github.com/discordjs/discord-api-types/issues/1134)) ([88d8bed](https://github.com/discordjs/discord-api-types/commit/88d8bed1caa88b604fec8f60ae1450f556c26c8e)) * **isInteractionButton:** handle `ButtonStyle.Premium` ([#1135](https://github.com/discordjs/discord-api-types/issues/1135)) ([736479c](https://github.com/discordjs/discord-api-types/commit/736479cab3332f6be122965963d37c8d4c99fc7f)) ## [0.37.103](https://github.com/discordjs/discord-api-types/compare/0.37.102...0.37.103) (2024-10-21) ### Features * audit log change key for boost bar ([#1120](https://github.com/discordjs/discord-api-types/issues/1120)) ([0fe6059](https://github.com/discordjs/discord-api-types/commit/0fe605975312829702df02b6432fce6d58a00e1f)) * soundboard audit log events ([#1122](https://github.com/discordjs/discord-api-types/issues/1122)) ([76fc8f0](https://github.com/discordjs/discord-api-types/commit/76fc8f035b4c92329896eb8110eaa8d640bf8ec8)) ## [0.37.102](https://github.com/discordjs/discord-api-types/compare/0.37.101...0.37.102) (2024-10-14) ### Features * recurrence rule change key on audit logs ([#1112](https://github.com/discordjs/discord-api-types/issues/1112)) ([4746e8d](https://github.com/discordjs/discord-api-types/commit/4746e8d48600edf905037a9cb9507884876d9508)) * soundboard ([#1113](https://github.com/discordjs/discord-api-types/issues/1113)) ([8d46830](https://github.com/discordjs/discord-api-types/commit/8d468300467db1c0a1726b4dfc6e92018e40e800)) ## [0.37.101](https://github.com/discordjs/discord-api-types/compare/0.37.100...0.37.101) (2024-09-23) ### Bug Fixes * **rest/oauth2:** correct string literal types containing bot scope ([#1101](https://github.com/discordjs/discord-api-types/issues/1101)) ([2ae2324](https://github.com/discordjs/discord-api-types/commit/2ae232477a1362eb0bd5c4aeee4a97bfbca7b2a2)) ### Features * add `VoiceChannelEffectSend` event ([#739](https://github.com/discordjs/discord-api-types/issues/739)) ([240226f](https://github.com/discordjs/discord-api-types/commit/240226f3d2d32df378400671a6bf31ceb2468a3c)) * missing subscription dispatch types ([#1105](https://github.com/discordjs/discord-api-types/issues/1105)) ([2b653a0](https://github.com/discordjs/discord-api-types/commit/2b653a00b3acb04979b7656142f3d8ef986fd561)) ## [0.37.100](https://github.com/discordjs/discord-api-types/compare/0.37.99...0.37.100) (2024-09-05) ### Bug Fixes * **APIMessageSnapshot:** mark `guild_id` as deprecated ([#1084](https://github.com/discordjs/discord-api-types/issues/1084)) ([3f3fe21](https://github.com/discordjs/discord-api-types/commit/3f3fe21e153f2fbe6c76ba1cc916367551b175b6)) * **GatewayGuildDeleteDispatchData:** make `unavailable` optional ([#1092](https://github.com/discordjs/discord-api-types/issues/1092)) ([258fb72](https://github.com/discordjs/discord-api-types/commit/258fb72f38c0513030dc5e1ae60e34fc3f83006d)) * replace deprecated `RESTAPIPollCreate` with `RESTAPIPoll` ([#1091](https://github.com/discordjs/discord-api-types/issues/1091)) ([d3b5187](https://github.com/discordjs/discord-api-types/commit/d3b5187c77f845eba29ab56de41408bcea7e9cb4)) ### Features * add subscriptions ([#1078](https://github.com/discordjs/discord-api-types/issues/1078)) ([8f78190](https://github.com/discordjs/discord-api-types/commit/8f781909f1f5a0d1db8c3e134f4e9e1e22837277)) * **APIMessageSnapshotFields:** add more fields ([#1085](https://github.com/discordjs/discord-api-types/issues/1085)) ([3de4ca8](https://github.com/discordjs/discord-api-types/commit/3de4ca8933be23ac05bf780957aea99e4a70c2fe)) * **ConnectionService:** add Amazon Music connection ([#1074](https://github.com/discordjs/discord-api-types/issues/1074)) ([011d439](https://github.com/discordjs/discord-api-types/commit/011d439971e1f5ee11ba7caea5ed10131cafd6a6)) * entry point commands and interaction callback response ([#1077](https://github.com/discordjs/discord-api-types/issues/1077)) ([b4b70d8](https://github.com/discordjs/discord-api-types/commit/b4b70d8bdcdbc175497366e6bb74dd3bc22c6738)) * **FormattingPatterns:** `GuildNavigation` and `LinkedRole` ([#1089](https://github.com/discordjs/discord-api-types/issues/1089)) ([0938b66](https://github.com/discordjs/discord-api-types/commit/0938b664cef8fd3758506a2f689bb20ead616bb4)) * **MessageType:** `PurchaseNotification` and `PollResult` ([#1040](https://github.com/discordjs/discord-api-types/issues/1040)) ([344274b](https://github.com/discordjs/discord-api-types/commit/344274b56c25b9a35a64fc61b170c177ee702e95)) * **RESTJSONErrorCodes:** add `40018`, `40019`, and `40094` ([#1056](https://github.com/discordjs/discord-api-types/issues/1056)) ([93e649a](https://github.com/discordjs/discord-api-types/commit/93e649a20de0fda31b3276f8affb3cf6890ea693)) * **RESTPatchAPIWebhookWithTokenMessageJSONBody:** `poll` ([#1067](https://github.com/discordjs/discord-api-types/issues/1067)) ([f770290](https://github.com/discordjs/discord-api-types/commit/f7702907172f84b57175b6f6c80eb2de210f6a7b)) ## [0.37.99](https://github.com/discordjs/discord-api-types/compare/0.37.98...0.37.99) (2024-09-02) ### Features * **GuildMemberFlags:** `IsGuest` and `DmSettingsUpsellAcknowledged` ([#1079](https://github.com/discordjs/discord-api-types/issues/1079)) ([2803e8d](https://github.com/discordjs/discord-api-types/commit/2803e8df2f2105099a1dc6e04193355a926718b9)) * remove unstable from stable fields ([#1086](https://github.com/discordjs/discord-api-types/issues/1086)) ([4b64f84](https://github.com/discordjs/discord-api-types/commit/4b64f84ddf0390f0a8979f57623c5f8c9051484d)) ## [0.37.98](https://github.com/discordjs/discord-api-types/compare/0.37.97...0.37.98) (2024-08-26) ### Features * **RESTAPIAttachment:** add more properties ([#1073](https://github.com/discordjs/discord-api-types/issues/1073)) ([f019f0f](https://github.com/discordjs/discord-api-types/commit/f019f0fe97ad47471dd6656e5fb148dc5761e1e0)) ## [0.37.97](https://github.com/discordjs/discord-api-types/compare/0.37.96...0.37.97) (2024-08-22) ## [0.37.96](https://github.com/discordjs/discord-api-types/compare/0.37.95...0.37.96) (2024-08-20) ### Bug Fixes * nullable `recurrence_rule` on patch ([#1063](https://github.com/discordjs/discord-api-types/issues/1063)) ([19d2aeb](https://github.com/discordjs/discord-api-types/commit/19d2aeb4a82dc781558240a674c36eadce270abf)) * nullable fields for scheduled event editing ([#1064](https://github.com/discordjs/discord-api-types/issues/1064)) ([f67043b](https://github.com/discordjs/discord-api-types/commit/f67043b3f46eea7286e959d223b78d140deac318)) ## [0.37.95](https://github.com/discordjs/discord-api-types/compare/0.37.94...0.37.95) (2024-08-19) ### Bug Fixes * interface name ([#1059](https://github.com/discordjs/discord-api-types/issues/1059)) ([147e459](https://github.com/discordjs/discord-api-types/commit/147e459a16c8b0e15a0dd50f75d62c6dd9098815)) ### Features * recurring scheduled events ([#1058](https://github.com/discordjs/discord-api-types/issues/1058)) ([fbfbc6b](https://github.com/discordjs/discord-api-types/commit/fbfbc6b23f2696f6db5fad8ea1543327d5b3cf07)) * **RESTJSONErrorCodes:** `UnknownStickerPack` ([#1055](https://github.com/discordjs/discord-api-types/issues/1055)) ([906dd8e](https://github.com/discordjs/discord-api-types/commit/906dd8e241be6acdf4d6d7b10ce4e7c139b0fd8b)) * **Routes:** voice state endpoint ([#1046](https://github.com/discordjs/discord-api-types/issues/1046)) ([1b1a865](https://github.com/discordjs/discord-api-types/commit/1b1a865efe4d95b34055616ed18dc3613b58f317)) ## [0.37.94](https://github.com/discordjs/discord-api-types/compare/0.37.93...0.37.94) (2024-08-15) ### Features * add Get Sticker Pack endpoint ([#1053](https://github.com/discordjs/discord-api-types/issues/1053)) ([822956f](https://github.com/discordjs/discord-api-types/commit/822956fe788f8eeda5da683189973bd6667cbc96)) * **APIApplication:** `approximate_user_install_count` ([#1052](https://github.com/discordjs/discord-api-types/issues/1052)) ([d504763](https://github.com/discordjs/discord-api-types/commit/d5047639e691cc26e865cc6c06a312e09f0fb4c7)) * **RESTOAuth2:** add RESTPostOAuth2TokenRevocationQuery ([#1050](https://github.com/discordjs/discord-api-types/issues/1050)) ([6ead98b](https://github.com/discordjs/discord-api-types/commit/6ead98b78218830fee308a0425d9078957a662b2)) * **Routes:** get method on role endpoint ([#1051](https://github.com/discordjs/discord-api-types/issues/1051)) ([ea1a6c3](https://github.com/discordjs/discord-api-types/commit/ea1a6c3c86ec0d4c663e2191a488a3716ecdd7cc)) ## [0.37.93](https://github.com/discordjs/discord-api-types/compare/0.37.92...0.37.93) (2024-07-22) ### Bug Fixes * **CDNRoutes:** inconsistency in route and wrong JSDoc ([#1033](https://github.com/discordjs/discord-api-types/issues/1033)) ([eb7b3d9](https://github.com/discordjs/discord-api-types/commit/eb7b3d90dd6a847b80d051006a597e77d70caab2)) ### Features * add support for message forwarding ([#971](https://github.com/discordjs/discord-api-types/issues/971)) ([2c1ff0e](https://github.com/discordjs/discord-api-types/commit/2c1ff0ea3443fb500315d6c69674a875a11addf6)) * application emojis ([#1036](https://github.com/discordjs/discord-api-types/issues/1036)) ([5f22a6b](https://github.com/discordjs/discord-api-types/commit/5f22a6bacabef6b11e170a6f67694359bb3180e8)) * **ConnectionService:** add `Roblox` ([#1032](https://github.com/discordjs/discord-api-types/issues/1032)) ([4f66b4d](https://github.com/discordjs/discord-api-types/commit/4f66b4dd049d2ace638374c09a06272bd517ad3a)) * **RESTAPIPartialCurrentUserGuild:** add `banner` ([#1028](https://github.com/discordjs/discord-api-types/issues/1028)) ([da9496f](https://github.com/discordjs/discord-api-types/commit/da9496f291fff364b8d35b02363b93933c19823a)) ## [0.37.92](https://github.com/discordjs/discord-api-types/compare/0.37.91...0.37.92) (2024-07-04) ### Bug Fixes * **RESTAPIPollCreate:** optional properties ([#1022](https://github.com/discordjs/discord-api-types/issues/1022)) ([c05998d](https://github.com/discordjs/discord-api-types/commit/c05998de274ef7a8d570db9d23c9ad9c228eeccc)) ## [0.37.91](https://github.com/discordjs/discord-api-types/compare/0.37.90...0.37.91) (2024-06-27) ### Features * **APIAttachment:** add `title` ([#1015](https://github.com/discordjs/discord-api-types/issues/1015)) ([897fd90](https://github.com/discordjs/discord-api-types/commit/897fd90bf2705d6ff5eebbb21fa8e735fc1e1e22)) ## [0.37.90](https://github.com/discordjs/discord-api-types/compare/0.37.89...0.37.90) (2024-06-18) ### Features * add premium buttons ([#1010](https://github.com/discordjs/discord-api-types/issues/1010)) ([088dbe0](https://github.com/discordjs/discord-api-types/commit/088dbe016fdb72fb751931938bf7240c34fa64c0)) ## [0.37.89](https://github.com/discordjs/discord-api-types/compare/0.37.88...0.37.89) (2024-06-13) ### Features * Add use external apps permission ([#999](https://github.com/discordjs/discord-api-types/issues/999)) ([d63bea7](https://github.com/discordjs/discord-api-types/commit/d63bea7dfc748472b2e5ed4e2d45752acc1a3d2a)) ## [0.37.88](https://github.com/discordjs/discord-api-types/compare/0.37.87...0.37.88) (2024-06-10) ### Bug Fixes * **APIGuildMember:** make user required and omit in messages ([#998](https://github.com/discordjs/discord-api-types/issues/998)) ([98544fa](https://github.com/discordjs/discord-api-types/commit/98544fa56aa7d6e98b23ead4e898a5f8424a437a)) ### Features * **AuditLogEvent:** home settings events ([#1000](https://github.com/discordjs/discord-api-types/issues/1000)) ([c6a72a5](https://github.com/discordjs/discord-api-types/commit/c6a72a55e5aa77413cfdb639b1c89b1a0774b624)) * **MessageType:** add incident related types ([#1004](https://github.com/discordjs/discord-api-types/issues/1004)) ([173f9ed](https://github.com/discordjs/discord-api-types/commit/173f9ed0fa9daf838c050aa246bc533f4c788c3b)) * **RouteBases:** Add media URL ([#1001](https://github.com/discordjs/discord-api-types/issues/1001)) ([fdc0408](https://github.com/discordjs/discord-api-types/commit/fdc04089e17e682c7db46990580a853c7b852957)) ## [0.37.87](https://github.com/discordjs/discord-api-types/compare/0.37.86...0.37.87) (2024-06-03) ### Bug Fixes * Correct types for `APIAuditLogChangeKey$Add` and `APIAuditLogChangeKey$Remove` ([#955](https://github.com/discordjs/discord-api-types/issues/955)) ([f859a96](https://github.com/discordjs/discord-api-types/commit/f859a96974e3188a18df575466e09b32fb70fbda)) ### Features * **AutoModeration:** add blocking words in member profile ([#740](https://github.com/discordjs/discord-api-types/issues/740)) ([5097460](https://github.com/discordjs/discord-api-types/commit/509746003a5544fc1b1a28a5a58a3cfe27e200ca)) ## [0.37.86](https://github.com/discordjs/discord-api-types/compare/0.37.85...0.37.86) (2024-05-27) ## [0.37.85](https://github.com/discordjs/discord-api-types/compare/0.37.84...0.37.85) (2024-05-23) ### Features * add gateway events payload for super reactions ([#878](https://github.com/discordjs/discord-api-types/issues/878)) ([16a6a46](https://github.com/discordjs/discord-api-types/commit/16a6a4683204cbf101372a233e235ebf6cb4df4e)) * add type query param for get reactions endpoint ([#879](https://github.com/discordjs/discord-api-types/issues/879)) ([ddb2bde](https://github.com/discordjs/discord-api-types/commit/ddb2bde07776f0b9f370ab8ff6bf5c95be0138fd)) * **APIMessage:** add `call` ([#983](https://github.com/discordjs/discord-api-types/issues/983)) ([79d9875](https://github.com/discordjs/discord-api-types/commit/79d9875c5d480b4ff4817edfecb58cd5c19c0d7b)) ## [0.37.84](https://github.com/discordjs/discord-api-types/compare/0.37.83...0.37.84) (2024-05-16) ### Features * **RESTJSONErrorCodes:** add error code 40333 ([#854](https://github.com/discordjs/discord-api-types/issues/854)) ([65eebd9](https://github.com/discordjs/discord-api-types/commit/65eebd92d636d4ea8e3319c8df84208f1d6ce94f)) * support avatar decorations ([#834](https://github.com/discordjs/discord-api-types/issues/834)) ([7650ce4](https://github.com/discordjs/discord-api-types/commit/7650ce4f7244c04f30e31938965e5023aa858945)) * user-installable apps ([#921](https://github.com/discordjs/discord-api-types/issues/921)) ([c457b8d](https://github.com/discordjs/discord-api-types/commit/c457b8d0596561fd1122e1d96bd168b322de368e)) ## [0.37.83](https://github.com/discordjs/discord-api-types/compare/0.37.82...0.37.83) (2024-04-27) ### Features * **APIAuditLogChange:** add missing keys ([#964](https://github.com/discordjs/discord-api-types/issues/964)) ([4e37de7](https://github.com/discordjs/discord-api-types/commit/4e37de7f72ad6b9502d3e3db97b10910d9970a92)) * one time premium app purchases ([#966](https://github.com/discordjs/discord-api-types/issues/966)) ([c9f2c5b](https://github.com/discordjs/discord-api-types/commit/c9f2c5b020b4c7a36330fe06463106e9cfd38fca)) ## [0.37.82](https://github.com/discordjs/discord-api-types/compare/0.37.81...0.37.82) (2024-04-25) ### Features * **APIInvite:** add `type` ([#858](https://github.com/discordjs/discord-api-types/issues/858)) ([c4ee790](https://github.com/discordjs/discord-api-types/commit/c4ee7907c2acf334e898862ed3d7d468dbdaaf5f)) * **AuditLogEvent:** onboarding events ([#795](https://github.com/discordjs/discord-api-types/issues/795)) ([fddb225](https://github.com/discordjs/discord-api-types/commit/fddb2257db7aac29129ec5d941c46fba167e2de8)) * **ConnectionService:** add `domain` ([#818](https://github.com/discordjs/discord-api-types/issues/818)) ([3ae6d72](https://github.com/discordjs/discord-api-types/commit/3ae6d722fd0b5aa18eb932a51172bba144c2d4ff)) ## [0.37.81](https://github.com/discordjs/discord-api-types/compare/0.37.80...0.37.81) (2024-04-22) ### Bug Fixes * **Polls:** correct APIPollAnswer properties ([#962](https://github.com/discordjs/discord-api-types/issues/962)) ([308d7d4](https://github.com/discordjs/discord-api-types/commit/308d7d40f45b7e3e78a6b13350d3ad7c8fd81b47)) ## [0.37.80](https://github.com/discordjs/discord-api-types/compare/0.37.79...0.37.80) (2024-04-22) ### Features * add support for polls ([#925](https://github.com/discordjs/discord-api-types/issues/925)) ([a36449a](https://github.com/discordjs/discord-api-types/commit/a36449a0283b733c59f5fdc0d6c3f2f786f0514d)) ## [0.37.79](https://github.com/discordjs/discord-api-types/compare/0.37.78...0.37.79) (2024-04-04) ### Features * **ConnectionService:** add bungie connection ([#907](https://github.com/discordjs/discord-api-types/issues/907)) ([22b5f47](https://github.com/discordjs/discord-api-types/commit/22b5f4778778baec7f414c4b253e96b0949de948)) ## [0.37.78](https://github.com/discordjs/discord-api-types/compare/0.37.77...0.37.78) (2024-04-01) ### Features * bot banners ([#906](https://github.com/discordjs/discord-api-types/issues/906)) ([495148d](https://github.com/discordjs/discord-api-types/commit/495148dc466fcc3cd47ff62377369a97a9cec13d)) * **Guild:** add `RESTPostAPIGuildBulkBan` result and json body ([#910](https://github.com/discordjs/discord-api-types/issues/910)) ([61ce329](https://github.com/discordjs/discord-api-types/commit/61ce329f614d5bc923c3ab4d2b318aa2e66c767b)) * **RESTJSONErrorCodes:** Add `500_000` ([#908](https://github.com/discordjs/discord-api-types/issues/908)) ([4db44b5](https://github.com/discordjs/discord-api-types/commit/4db44b553d7164415b9f20468716beb5223fcec0)) * **Routes:** Add `guildBulkBan()` route ([#909](https://github.com/discordjs/discord-api-types/issues/909)) ([7dcad58](https://github.com/discordjs/discord-api-types/commit/7dcad582ce2fa16ac7bde35f5b158648c2c7c9bf)) ## [0.37.77](https://github.com/discordjs/discord-api-types/compare/0.37.76...0.37.77) (2024-03-28) ### Features * **APIAuditLogChange:** add `APIAuditLogChangeKeySystemChannelFlags` ([#933](https://github.com/discordjs/discord-api-types/issues/933)) ([47c9ad0](https://github.com/discordjs/discord-api-types/commit/47c9ad0e7043c098d103107e95f8a97e67ad3eb4)) ## [0.37.76](https://github.com/discordjs/discord-api-types/compare/0.37.75...0.37.76) (2024-03-21) ## [0.37.75](https://github.com/discordjs/discord-api-types/compare/0.37.74...0.37.75) (2024-03-18) ## [0.37.74](https://github.com/discordjs/discord-api-types/compare/0.37.73...0.37.74) (2024-03-14) ## [0.37.73](https://github.com/discordjs/discord-api-types/compare/0.37.71...0.37.73) (2024-03-07) ## [0.37.72](https://github.com/discordjs/discord-api-types/compare/0.37.71...0.37.72) (2024-03-07) ## [0.37.71](https://github.com/discordjs/discord-api-types/compare/0.37.70...0.37.71) (2024-02-26) ### Features - add initial support for super reactions ([#744](https://github.com/discordjs/discord-api-types/issues/744)) ([150dc46](https://github.com/discordjs/discord-api-types/commit/150dc46b8739ca9cf10a46bb48d390f70c679b6e)) ## [0.37.70](https://github.com/discordjs/discord-api-types/compare/0.37.69...0.37.70) (2024-02-15) ### Features - **RESTPostAPIChannelMessageJSONBody:** add enforce_nonce ([#874](https://github.com/discordjs/discord-api-types/issues/874)) ([9564941](https://github.com/discordjs/discord-api-types/commit/9564941b3ae51c8bc9b1f915d66b43775089db18)) ## [0.37.69](https://github.com/discordjs/discord-api-types/compare/0.37.68...0.37.69) (2024-02-08) ### Features - **Locale:** add `SpanishLATAM` ([#859](https://github.com/discordjs/discord-api-types/issues/859)) ([0cfe05d](https://github.com/discordjs/discord-api-types/commit/0cfe05dad8271513a2ef58e4f183c530555c7c2d)) ## [0.37.68](https://github.com/discordjs/discord-api-types/compare/0.37.67...0.37.68) (2024-02-05) ### Bug Fixes - **CDNRoutes:** fix store page wrong extension ([#867](https://github.com/discordjs/discord-api-types/issues/867)) ([6f541d5](https://github.com/discordjs/discord-api-types/commit/6f541d58d278f1e610916250c003c1344831e3ad)) - **CDNRoutes:** make format optional and default to png ([#869](https://github.com/discordjs/discord-api-types/issues/869)) ([55efcca](https://github.com/discordjs/discord-api-types/commit/55efcca4f8480f96243d9d802ce632833ac8e3ff)) ## [0.37.67](https://github.com/discordjs/discord-api-types/compare/0.37.66...0.37.67) (2023-12-28) ### Bug Fixes - **GatewayThreadDispatch:** properly type thread create/update/delete dispatches ([#861](https://github.com/discordjs/discord-api-types/issues/861)) ([819d852](https://github.com/discordjs/discord-api-types/commit/819d85207ae7e07322e404a5ef9e3eb283b4aa03)) ## [0.37.66](https://github.com/discordjs/discord-api-types/compare/0.37.65...0.37.66) (2023-12-07) ### Features - **RESTPostAPIWebhookWithTokenJSONBody:** add `applied_tags` ([#855](https://github.com/discordjs/discord-api-types/issues/855)) ([b4226bb](https://github.com/discordjs/discord-api-types/commit/b4226bb708763ebe04d9f7abcafa148bb5588ba4)) ## [0.37.65](https://github.com/discordjs/discord-api-types/compare/0.37.64...0.37.65) (2023-11-23) ### Bug Fixes - **TextChannelType:** Remove forum and media channels ([#849](https://github.com/discordjs/discord-api-types/issues/849)) ([9574881](https://github.com/discordjs/discord-api-types/commit/957488134e48c482324e9678dd53c11bf946b6cd)) ## [0.37.64](https://github.com/discordjs/discord-api-types/compare/0.37.63...0.37.64) (2023-11-20) ### Features - **PermissionFlagsBits:** split up expressions and events perms ([#790](https://github.com/discordjs/discord-api-types/issues/790)) ([ca05ee5](https://github.com/discordjs/discord-api-types/commit/ca05ee5eb21acdba866de7997cbf980d598e3ee1)) ## [0.37.63](https://github.com/discordjs/discord-api-types/compare/0.37.62...0.37.63) (2023-11-09) ### Bug Fixes - **RESTPutAPIGuildOnboardingJSONBody:** optional keys and flattened emoji ([#839](https://github.com/discordjs/discord-api-types/issues/839)) ([a8efb19](https://github.com/discordjs/discord-api-types/commit/a8efb1949ad4b554d5c59f7b55a251ee12abc93d)) ## [0.37.62](https://github.com/discordjs/discord-api-types/compare/0.37.61...0.37.62) (2023-10-30) ### Features - **RESTJSONErrorCodes:** add `40074` and `50057` ([#844](https://github.com/discordjs/discord-api-types/issues/844)) ([28ed370](https://github.com/discordjs/discord-api-types/commit/28ed3701e6105d0d15fb988194c13079a27e4369)) ## [0.37.61](https://github.com/discordjs/discord-api-types/compare/0.37.60...0.37.61) (2023-10-23) ### Features - premium app subscriptions ([#833](https://github.com/discordjs/discord-api-types/issues/833)) ([ba08061](https://github.com/discordjs/discord-api-types/commit/ba080619170b484f671011abe3b0a61c0e69cca9)) ## [0.37.60](https://github.com/discordjs/discord-api-types/compare/0.37.59...0.37.60) (2023-10-05) ### Features - Application patch and new properties ([#810](https://github.com/discordjs/discord-api-types/issues/810)) ([17f42e0](https://github.com/discordjs/discord-api-types/commit/17f42e0b38d431505ee56cdeb0bb85bff94e97c6)) ## [0.37.59](https://github.com/discordjs/discord-api-types/compare/0.37.58...0.37.59) (2023-10-02) ### Features - **RESTPostAPIStageInstanceJSONBody:** add `guild_scheduled_event_id` ([#656](https://github.com/discordjs/discord-api-types/issues/656)) ([ecef5b4](https://github.com/discordjs/discord-api-types/commit/ecef5b492bd54b3c61c04a6784fd39c29e282780)) ## [0.37.58](https://github.com/discordjs/discord-api-types/compare/0.37.57...0.37.58) (2023-09-25) ### Bug Fixes - **RESTPatchAPIChannelJSONBody:** add missing `applied_tags` field ([#828](https://github.com/discordjs/discord-api-types/issues/828)) ([a4cdbbf](https://github.com/discordjs/discord-api-types/commit/a4cdbbfdf87f32e6108140260f163afeca3e0788)) ### Features - default select menu values ([#824](https://github.com/discordjs/discord-api-types/issues/824)) ([1290c94](https://github.com/discordjs/discord-api-types/commit/1290c942abdd8c2d9bf97aa2807f45073970f823)) ## [0.37.57](https://github.com/discordjs/discord-api-types/compare/0.37.56...0.37.57) (2023-09-21) ### Features - **ConnectionService:** support twitter rebrand update ([#819](https://github.com/discordjs/discord-api-types/issues/819)) ([32ba5ce](https://github.com/discordjs/discord-api-types/commit/32ba5ce36ce3b89293d540b06b74c2643ced7119)) ## [0.37.56](https://github.com/discordjs/discord-api-types/compare/0.37.55...0.37.56) (2023-08-31) ### Bug Fixes - **RESTPostAPIChannelMessageJSONBody:** `number` for attachment ids ([#811](https://github.com/discordjs/discord-api-types/issues/811)) ([1eb0161](https://github.com/discordjs/discord-api-types/commit/1eb01618a3d7421012b0423aea7a8bde032c08fc)) - standard stickers are now free ([#789](https://github.com/discordjs/discord-api-types/issues/789)) ([018d889](https://github.com/discordjs/discord-api-types/commit/018d889d9aeb35b64dd914ade9ac93e8b98390ac)) ### Features - add support for teams update ([#813](https://github.com/discordjs/discord-api-types/issues/813)) ([a26629c](https://github.com/discordjs/discord-api-types/commit/a26629c0e83504299af4bc5eb85e101c63b9ced8)) - **APIAuditLogOptions:** add `integration_type` ([#809](https://github.com/discordjs/discord-api-types/issues/809)) ([31c8549](https://github.com/discordjs/discord-api-types/commit/31c8549fe3e461ad120a3af434e27c61091bbb9c)) ## [0.37.55](https://github.com/discordjs/discord-api-types/compare/0.37.54...0.37.55) (2023-08-24) ## [0.37.54](https://github.com/discordjs/discord-api-types/compare/0.37.53...0.37.54) (2023-08-17) ### Bug Fixes - **Guild:** union with never type ([#797](https://github.com/discordjs/discord-api-types/issues/797)) ([b919e72](https://github.com/discordjs/discord-api-types/commit/b919e721bca4ff19340a40b58f6a20d34641bb05)) ### Features - Add Media channels ([#777](https://github.com/discordjs/discord-api-types/issues/777)) ([138b9f2](https://github.com/discordjs/discord-api-types/commit/138b9f2bf2fa7dcaada81de222543fa8a03bd52f)) ## [0.37.53](https://github.com/discordjs/discord-api-types/compare/0.37.52...0.37.53) (2023-08-14) ### Features - **GatewayActivityUpdateData:** allow sending state ([#801](https://github.com/discordjs/discord-api-types/issues/801)) ([e095e09](https://github.com/discordjs/discord-api-types/commit/e095e09b0b5e3c85107705de124858e1fbb29bf0)) ## [0.37.52](https://github.com/discordjs/discord-api-types/compare/0.37.51...0.37.52) (2023-08-07) ### Bug Fixes - **RESTPatchAPIChannelJSONBody:** `available_tags` requires `name` only ([#802](https://github.com/discordjs/discord-api-types/issues/802)) ([5261124](https://github.com/discordjs/discord-api-types/commit/52611242fb73ac56d8cfedd8953ce558bf6e842e)) ## [0.37.51](https://github.com/discordjs/discord-api-types/compare/0.37.50...0.37.51) (2023-07-31) ### Bug Fixes - **Presence:** cannot receive invisible status ([#799](https://github.com/discordjs/discord-api-types/issues/799)) ([1071d24](https://github.com/discordjs/discord-api-types/commit/1071d24362bbf1d39d528f73c3233f22aee99778)) ## [0.37.50](https://github.com/discordjs/discord-api-types/compare/0.37.49...0.37.50) (2023-07-20) ### Features - onboarding updates, mode field, and error codes ([#773](https://github.com/discordjs/discord-api-types/issues/773)) ([773556a](https://github.com/discordjs/discord-api-types/commit/773556aa329750839262874b4af6c4113d9906d3)) ## [0.37.49](https://github.com/discordjs/discord-api-types/compare/0.37.48...0.37.49) (2023-07-17) ### Features - **APIApplication:** approx guild count and get self application endpoint ([#728](https://github.com/discordjs/discord-api-types/issues/728)) ([874f135](https://github.com/discordjs/discord-api-types/commit/874f13573b35fe1e5e40549d007aebe5ec3bbcc0)) - **APIAttachment:** add `flags` ([#783](https://github.com/discordjs/discord-api-types/issues/783)) ([7f9a7e5](https://github.com/discordjs/discord-api-types/commit/7f9a7e5b94529fbcd254ffdd1fcac1ceff62e890)) - **APIRole:** role flags ([#782](https://github.com/discordjs/discord-api-types/issues/782)) ([488b5ad](https://github.com/discordjs/discord-api-types/commit/488b5adf04d3b2c7f457bea787c2a5d1b0bf8ba6)) - **APIUser:** add avatar decorations ([#664](https://github.com/discordjs/discord-api-types/issues/664)) ([f556455](https://github.com/discordjs/discord-api-types/commit/f556455ba6e396e1b798e85f71d2a58e1aacf043)) - **AuditLogEvent:** Add creator monetisation events ([#787](https://github.com/discordjs/discord-api-types/issues/787)) ([47f78bc](https://github.com/discordjs/discord-api-types/commit/47f78bcc691ee6d551f2eb441e427384a928dd11)) - **GatewayMessageReactionAddDispatch:** add `message_author_id` ([#754](https://github.com/discordjs/discord-api-types/issues/754)) ([82d7024](https://github.com/discordjs/discord-api-types/commit/82d7024dfd0e30178e9e38647bfa882fdddd1681)) ## [0.37.48](https://github.com/discordjs/discord-api-types/compare/0.37.47...0.37.48) (2023-07-10) ## [0.37.47](https://github.com/discordjs/discord-api-types/compare/0.37.46...0.37.47) (2023-06-29) ### Features - **Guild:** add join raid and mention raid protection ([#677](https://github.com/discordjs/discord-api-types/issues/677)) ([844ad56](https://github.com/discordjs/discord-api-types/commit/844ad568c4e6bb379aee59e4e2256a8281276991)) ## [0.37.46](https://github.com/discordjs/discord-api-types/compare/0.37.45...0.37.46) (2023-06-19) ### Features - **RESTJSONErrorCodes:** add error `50131` ([#753](https://github.com/discordjs/discord-api-types/issues/753)) ([300e31b](https://github.com/discordjs/discord-api-types/commit/300e31b51490c81bfd96c2ed5e0f810a7e3ee4ae)) ## [0.37.45](https://github.com/discordjs/discord-api-types/compare/0.37.44...0.37.45) (2023-06-15) ## [0.37.44](https://github.com/discordjs/discord-api-types/compare/0.37.43...0.37.44) (2023-06-15) ### Features - guild onboarding ([#713](https://github.com/discordjs/discord-api-types/issues/713)) ([eced39c](https://github.com/discordjs/discord-api-types/commit/eced39cc3fa305e336d5752827812cb790ac485d)) ## [0.37.43](https://github.com/discordjs/discord-api-types/compare/0.37.42...0.37.43) (2023-05-29) ### Features - **RESTJSONErrorCodes:** add error `50178` ([#752](https://github.com/discordjs/discord-api-types/issues/752)) ([30fb497](https://github.com/discordjs/discord-api-types/commit/30fb4978b76f30a00453470f643d71e8f1d1f817)) ## [0.37.42](https://github.com/discordjs/discord-api-types/compare/0.37.41...0.37.42) (2023-05-08) ### Bug Fixes - allow sending empty choices with autocomplete: true ([#762](https://github.com/discordjs/discord-api-types/issues/762)) ([0e6b19d](https://github.com/discordjs/discord-api-types/commit/0e6b19d2bcfe6e9806d3d20125668b3464845517)) ## [0.37.41](https://github.com/discordjs/discord-api-types/compare/0.37.40...0.37.41) (2023-05-01) ### Bug Fixes - **GatewayGuildMembersChunkDispatchData:** Omit `guild_id` for presences ([#761](https://github.com/discordjs/discord-api-types/issues/761)) ([5079b16](https://github.com/discordjs/discord-api-types/commit/5079b164db3ac3bda25675a553a586f099555667)) - **types:** move `types` condition to the front ([#763](https://github.com/discordjs/discord-api-types/issues/763)) ([9dce6ed](https://github.com/discordjs/discord-api-types/commit/9dce6ed392b64e602c3cc05946bc0f30bac7279e)) ## [0.37.40](https://github.com/discordjs/discord-api-types/compare/0.37.39...0.37.40) (2023-04-24) ### Features - add support for voice messages ([#749](https://github.com/discordjs/discord-api-types/issues/749)) ([3dac5b9](https://github.com/discordjs/discord-api-types/commit/3dac5b93e7568ba2fbd3bc30d229d2df80f96eed)) ## [0.37.39](https://github.com/discordjs/discord-api-types/compare/0.37.38...0.37.39) (2023-04-17) ### Bug Fixes - **RESTPostAPIChannelMessagesThreadsJSONBody:** mark `auto_archive_duration` as optional ([ca6a95d](https://github.com/discordjs/discord-api-types/commit/ca6a95d69c7b93f564f10cce422faf5ea4133be7)) ### Features - **APIGuild:** add `max_stage_video_channel_users` ([#550](https://github.com/discordjs/discord-api-types/issues/550)) ([9a66d21](https://github.com/discordjs/discord-api-types/commit/9a66d21f4913c63ed7c192cf9340febe603bf516)) ## [0.37.38](https://github.com/discordjs/discord-api-types/compare/0.37.37...0.37.38) (2023-04-10) ### Features - **APIBaseInteraction:** add `channel` ([#741](https://github.com/discordjs/discord-api-types/issues/741)) ([311b7a2](https://github.com/discordjs/discord-api-types/commit/311b7a2eb9bdc6ad9d6ed7af2b7faf6f95631698)) - **RESTJSONErrorCodes:** add error `50163` ([#725](https://github.com/discordjs/discord-api-types/issues/725)) ([9074621](https://github.com/discordjs/discord-api-types/commit/9074621085d0e2d7b32b82c0bf0604e3cf42bbdf)) ## [0.37.37](https://github.com/discordjs/discord-api-types/compare/0.37.36...0.37.37) (2023-03-23) ### Bug Fixes - add missing `RESTGetAPIWebhookWithTokenQuery` ([#735](https://github.com/discordjs/discord-api-types/issues/735)) ([2a78a51](https://github.com/discordjs/discord-api-types/commit/2a78a517d2a3511913a8b2b74bba942db097b577)) ### Features - add various new flags ([#733](https://github.com/discordjs/discord-api-types/issues/733)) ([4723d29](https://github.com/discordjs/discord-api-types/commit/4723d29c9ee17c3efa8e8e86351754dee13428ef)) - **RESTGetAPICurrentUserGuildsQuery:** add `with_counts` ([#641](https://github.com/discordjs/discord-api-types/issues/641)) ([0cd9b0d](https://github.com/discordjs/discord-api-types/commit/0cd9b0debbf17f60267bf2f42349fcebea5bf588)) - **RESTPostAPIGuildChannelJSONBody:** add `default_thread_rate_limit_per_user` ([#730](https://github.com/discordjs/discord-api-types/issues/730)) ([8f9370d](https://github.com/discordjs/discord-api-types/commit/8f9370d2592d6a450820bee52fe153eb00ba830f)) ## [0.37.36](https://github.com/discordjs/discord-api-types/compare/0.37.35...0.37.36) (2023-03-13) ### Features - **AutoModeration:** add `custom_message` field support ([#727](https://github.com/discordjs/discord-api-types/issues/727)) ([0d47c69](https://github.com/discordjs/discord-api-types/commit/0d47c69ca80909205f14004aaf26645f367c06d0)) ## [0.37.35](https://github.com/discordjs/discord-api-types/compare/0.37.34...0.37.35) (2023-02-17) ### Bug Fixes - `StageRaiseHand` should be unstable ([#722](https://github.com/discordjs/discord-api-types/issues/722)) ([85051ea](https://github.com/discordjs/discord-api-types/commit/85051eaab7e262b4f60e3f5565bf8a7a5225513e)) ## [0.37.34](https://github.com/discordjs/discord-api-types/compare/0.37.33...0.37.34) (2023-02-16) ### Bug Fixes - **GuildSystemChannelFlags:** "suppress" typo ([#719](https://github.com/discordjs/discord-api-types/issues/719)) ([8d37bc5](https://github.com/discordjs/discord-api-types/commit/8d37bc5e30f76552bca402c858cc67bb8a5ddc9c)) ### Features - add `managed` field to `ChannelType.GroupDM` ([#698](https://github.com/discordjs/discord-api-types/issues/698)) ([8477deb](https://github.com/discordjs/discord-api-types/commit/8477deb6a832b0c985fa0f6d1df4b99eaeab2a87)) - **CDNRoutes:** add `storePageAsset()` ([#695](https://github.com/discordjs/discord-api-types/issues/695)) ([4cf6fd2](https://github.com/discordjs/discord-api-types/commit/4cf6fd2cecd92a9c3ffa32368ccc7b1994295be3)) - **ConnectionService:** add `instagram` ([#701](https://github.com/discordjs/discord-api-types/issues/701)) ([c65e214](https://github.com/discordjs/discord-api-types/commit/c65e214fddeb3aa959034ac14de39edab38ff0f3)) - **RESTJSONErrorCodes:** add error `30011` ([#697](https://github.com/discordjs/discord-api-types/issues/697)) ([41b31eb](https://github.com/discordjs/discord-api-types/commit/41b31ebfd62a8dba32da1e748c49877924c0602d)) - **RESTJSONErrorCodes:** add error `30060` ([#720](https://github.com/discordjs/discord-api-types/issues/720)) ([20153f6](https://github.com/discordjs/discord-api-types/commit/20153f6fe24676d73bcb41e92c6d9d52961f1f73)) - **RESTJSONErrorCodes:** add error `30061` ([#717](https://github.com/discordjs/discord-api-types/issues/717)) ([d609efc](https://github.com/discordjs/discord-api-types/commit/d609efc746df620925237575dd24fd0f38213f09)) ## [0.37.33](https://github.com/discordjs/discord-api-types/compare/0.37.32...0.37.33) (2023-02-11) ### Bug Fixes - **GatewayDispatchPayload:** add missing GuildAuditLogEntry ([#715](https://github.com/discordjs/discord-api-types/issues/715)) ([602c16e](https://github.com/discordjs/discord-api-types/commit/602c16eee12e85a8052f40c695314a42b1d15979)) ## [0.37.32](https://github.com/discordjs/discord-api-types/compare/0.37.31...0.37.32) (2023-02-09) ### Features - **MessageType:** add `SuppressNotifications` ([#710](https://github.com/discordjs/discord-api-types/issues/710)) ([b14aea6](https://github.com/discordjs/discord-api-types/commit/b14aea65f886db047ea9fcbd1b8f49f1bc38f594)) ## [0.37.31](https://github.com/discordjs/discord-api-types/compare/0.37.30...0.37.31) (2023-01-30) ## [0.37.30](https://github.com/discordjs/discord-api-types/compare/0.37.29...0.37.30) (2023-01-26) ### Features - **APIGuildMember:** add support for guild member flags ([#700](https://github.com/discordjs/discord-api-types/issues/700)) ([e902671](https://github.com/discordjs/discord-api-types/commit/e902671411b518504b9adc6b0d7310501fd531ad)) - **GatewayDispatchEvents:** add `GuildAuditLogEntryCreate` ([#692](https://github.com/discordjs/discord-api-types/issues/692)) ([31ca234](https://github.com/discordjs/discord-api-types/commit/31ca234decd6d62b503aadd88111a2af3778f455)) ## [0.37.29](https://github.com/discordjs/discord-api-types/compare/0.37.28...0.37.29) (2023-01-23) ## [0.37.28](https://github.com/discordjs/discord-api-types/compare/0.37.27...0.37.28) (2023-01-12) ### Bug Fixes - **GuildIntegration:** `enabled` and `user` are present on bots ([#660](https://github.com/discordjs/discord-api-types/issues/660)) ([b10e9bb](https://github.com/discordjs/discord-api-types/commit/b10e9bbe5ab450df065fc78da85d49f335db2b82)) ### Features - Add role subscription data and system channel flags ([#686](https://github.com/discordjs/discord-api-types/issues/686)) ([792c60b](https://github.com/discordjs/discord-api-types/commit/792c60b3328d8440de79546bf43d6b317400c788)) - **APIRoleTags:** add `guild_connections` ([#675](https://github.com/discordjs/discord-api-types/issues/675)) ([3dbe985](https://github.com/discordjs/discord-api-types/commit/3dbe985b6e05e6aa68248e79f45d550e783bc6a7)) - **APIThreadMember:** add support for thread member pagination ([#689](https://github.com/discordjs/discord-api-types/issues/689)) ([e2fb5ee](https://github.com/discordjs/discord-api-types/commit/e2fb5ee4886a33bb752a75d5894f726f6f76340f)) - **ConnectionService:** add TikTok ([#632](https://github.com/discordjs/discord-api-types/issues/632)) ([af06df6](https://github.com/discordjs/discord-api-types/commit/af06df6cae224a60e7a35e356028677e8736ed89)) - **RESTJSONErrorCodes:** add error `50091` ([#671](https://github.com/discordjs/discord-api-types/issues/671)) ([8869e92](https://github.com/discordjs/discord-api-types/commit/8869e923362740e491f267d71073d4266d36cb42)) - role subscriptions ([#665](https://github.com/discordjs/discord-api-types/issues/665)) ([0b4058b](https://github.com/discordjs/discord-api-types/commit/0b4058bdd48b74fcd9944dcf4b6f98d5e0bee105)) - **StickerFormatType:** add `GIF` ([#688](https://github.com/discordjs/discord-api-types/issues/688)) ([a6bcb3f](https://github.com/discordjs/discord-api-types/commit/a6bcb3f0fe7bc4edceee61b7cdab0e46db9c7109)) ## [0.37.27](https://github.com/discordjs/discord-api-types/compare/0.37.26...0.37.27) (2023-01-09) ### Features - **MessageType:** add missing types ([#681](https://github.com/discordjs/discord-api-types/issues/681)) ([7d55b33](https://github.com/discordjs/discord-api-types/commit/7d55b33bacb96e156f41fb67a1819c07c8fa959f)) ## [0.37.26](https://github.com/discordjs/discord-api-types/compare/0.37.25...0.37.26) (2023-01-05) ### Features - add RESTJSONErrorCode `40062` and RESTRateLimit.code ([#620](https://github.com/discordjs/discord-api-types/issues/620)) ([4a25caf](https://github.com/discordjs/discord-api-types/commit/4a25caf506c685a8e0af630eef3bd3d2735d64ed)) - **RESTGetAPIAuditLogQuery:** support `after` ([#682](https://github.com/discordjs/discord-api-types/issues/682)) ([bb2ef84](https://github.com/discordjs/discord-api-types/commit/bb2ef843133b29e3042bdfde20b5adb1c3639e01)) - **RESTJSONErrorCodes:** add error `30058` ([#676](https://github.com/discordjs/discord-api-types/issues/676)) ([921bffd](https://github.com/discordjs/discord-api-types/commit/921bffd1b210b6cf2dc6971e451fa0a9e6f6c185)) - **RESTJSONErrorCodes:** add error `50067` ([#640](https://github.com/discordjs/discord-api-types/issues/640)) ([6e4a611](https://github.com/discordjs/discord-api-types/commit/6e4a6115ae44aca5c0b61f621ad75829632850f4)) ## [0.37.25](https://github.com/discordjs/discord-api-types/compare/0.37.24...0.37.25) (2022-12-29) ## [0.37.24](https://github.com/discordjs/discord-api-types/compare/0.37.23...0.37.24) (2022-12-19) ### Bug Fixes - **APIApplicationRoleConnection:** `metadata` values can be numbers ([#673](https://github.com/discordjs/discord-api-types/issues/673)) ([8df9f14](https://github.com/discordjs/discord-api-types/commit/8df9f14a24b714d3b009711eec894cad1e199881)) ## [0.37.23](https://github.com/discordjs/discord-api-types/compare/0.37.22...0.37.23) (2022-12-15) ### Bug Fixes - **APIChannel:** correctly type present properties based on channel type ([#669](https://github.com/discordjs/discord-api-types/issues/669)) ([2a5413d](https://github.com/discordjs/discord-api-types/commit/2a5413def49dbb413227d9b02be500b9184b731d)) - **Interactions:** make app_permissions required ([#652](https://github.com/discordjs/discord-api-types/issues/652)) ([89bc0f4](https://github.com/discordjs/discord-api-types/commit/89bc0f40b60434a768abac95188a2e4e47c2acd9)) ### Features - add role connections ([#651](https://github.com/discordjs/discord-api-types/issues/651)) ([d7b666c](https://github.com/discordjs/discord-api-types/commit/d7b666c739bb848ead5a3af09e37e64ed962014b)) - **APIApplicationCommand:** add `nsfw` field ([#637](https://github.com/discordjs/discord-api-types/issues/637)) ([c3fda99](https://github.com/discordjs/discord-api-types/commit/c3fda99637b4d7688111180f90d6aa41c008ed17)) - **APIGuildForumChannel:** add `default_forum_layout` ([#658](https://github.com/discordjs/discord-api-types/issues/658)) ([190242a](https://github.com/discordjs/discord-api-types/commit/190242a59d5512fdc766217ec9f7c9c54a7b2dcb)) - **Locale:** add Indonesian locale ([#643](https://github.com/discordjs/discord-api-types/issues/643)) ([2b75d13](https://github.com/discordjs/discord-api-types/commit/2b75d13b393f8f9011ec68617cb4e9f9d3fa09e7)) ## [0.37.22](https://github.com/discordjs/discord-api-types/compare/0.37.21...0.37.22) (2022-12-12) ### Bug Fixes - **APIChannel:** correctly type `name` based on channel type ([#666](https://github.com/discordjs/discord-api-types/issues/666)) ([995126e](https://github.com/discordjs/discord-api-types/commit/995126e2cc1494f9fad2ad7c44ecc87898994e44)) ## [0.37.21](https://github.com/discordjs/discord-api-types/compare/0.37.20...0.37.21) (2022-12-05) ## [0.37.20](https://github.com/discordjs/discord-api-types/compare/0.37.19...0.37.20) (2022-11-24) ## [0.37.19](https://github.com/discordjs/discord-api-types/compare/0.37.18...0.37.19) (2022-11-21) ### Bug Fixes - **APIGuildChannel:** make position of guild channel non optional ([#647](https://github.com/discordjs/discord-api-types/issues/647)) ([9d72e82](https://github.com/discordjs/discord-api-types/commit/9d72e82e07e3a3bb9a894081d955bdc5c6b64089)) - **channel:** add missing type aliases ([#648](https://github.com/discordjs/discord-api-types/issues/648)) ([2695dad](https://github.com/discordjs/discord-api-types/commit/2695dade8be818cf5bacbe69ec9aca0b50b9f9b0)) ### Features - **GuildFeatures:** Add `APPLICATION_COMMAND_PERMISSIONS_V2` ([#646](https://github.com/discordjs/discord-api-types/issues/646)) ([a1869a6](https://github.com/discordjs/discord-api-types/commit/a1869a6a6d4e15adf7a3cf64cade1ed051b330fc)) ## [0.37.18](https://github.com/discordjs/discord-api-types/compare/0.37.17...0.37.18) (2022-11-14) ### Features - **UserFlags:** add `ActiveDeveloper` ([#638](https://github.com/discordjs/discord-api-types/issues/638)) ([65da837](https://github.com/discordjs/discord-api-types/commit/65da837673142267a92aea28ecd65d3c05aa0706)) ## [0.37.17](https://github.com/discordjs/discord-api-types/compare/0.37.16...0.37.17) (2022-11-07) ### Features - **APIAutoMod:** add support for regex matching ([#603](https://github.com/discordjs/discord-api-types/issues/603)) ([88a60f7](https://github.com/discordjs/discord-api-types/commit/88a60f78efb6498d861b33d54c809d9d1b39b3d7)) ## [0.37.16](https://github.com/discordjs/discord-api-types/compare/0.37.15...0.37.16) (2022-10-31) ### Bug Fixes - **docs:** update gateway documentation links ([#628](https://github.com/discordjs/discord-api-types/issues/628)) ([7040d9b](https://github.com/discordjs/discord-api-types/commit/7040d9b33370a5d1d7d3c3cb10a25c0e5fb7d0b8)) - export `RESTGetAPIVoiceRegionsResult` with the correct name ([#627](https://github.com/discordjs/discord-api-types/issues/627)) ([69aa717](https://github.com/discordjs/discord-api-types/commit/69aa7179028e0a011e6ba246cc1faa55f463c619)) - **UserFlags:** hardcode the value of `Quarantined` ([#624](https://github.com/discordjs/discord-api-types/issues/624)) ([5091f6e](https://github.com/discordjs/discord-api-types/commit/5091f6e70774fd97ec7dd3ae3f500c3850f81d94)) ## [0.37.15](https://github.com/discordjs/discord-api-types/compare/0.37.14...0.37.15) (2022-10-27) ### Bug Fixes - `default_thread_rate_limit_per_user` is only for forum channels ([#596](https://github.com/discordjs/discord-api-types/issues/596)) ([88ce291](https://github.com/discordjs/discord-api-types/commit/88ce2910fb3640d9be165ac9f6488cc7e4c32663)) - add missing gateway dispatch payloads to gateway event union ([#619](https://github.com/discordjs/discord-api-types/issues/619)) ([348dd41](https://github.com/discordjs/discord-api-types/commit/348dd416d1c94231fdfda88fa0ef03b34a384bb4)) - **APIGuild:** change type of `afk_timeout` to allowed values ([#590](https://github.com/discordjs/discord-api-types/issues/590)) ([aaa57b4](https://github.com/discordjs/discord-api-types/commit/aaa57b4fe96b4f045b312c1a6a2ed17f9fcb3552)) ### Features - add some missing REST types ([#612](https://github.com/discordjs/discord-api-types/issues/612)) ([8d25f23](https://github.com/discordjs/discord-api-types/commit/8d25f233a5366f1d43de942f465e696c73f26c86)) - **Components:** new select menus ([#602](https://github.com/discordjs/discord-api-types/issues/602)) ([df1452d](https://github.com/discordjs/discord-api-types/commit/df1452dc28f2fddb32a20912ca3ca3634556a3da)) - **GuildFeature:** add `DeveloperSupportServer` ([#618](https://github.com/discordjs/discord-api-types/issues/618)) ([8c1484e](https://github.com/discordjs/discord-api-types/commit/8c1484ebbe95afbd850b22262d6223b2f3d40017)) - **RESTJSONErrorCodes:** add 50039 error ([#607](https://github.com/discordjs/discord-api-types/issues/607)) ([131637f](https://github.com/discordjs/discord-api-types/commit/131637fbd20573750a60df2281f94b339443c82c)) - **UserPremiumType:** add `NitroBasic` ([#616](https://github.com/discordjs/discord-api-types/issues/616)) ([9448e9b](https://github.com/discordjs/discord-api-types/commit/9448e9befdfff38ecbf186e5dc9c1fcd88596422)) ## [0.37.14](https://github.com/discordjs/discord-api-types/compare/0.37.13...0.37.14) (2022-10-15) ### Bug Fixes - **APIAutoModeration:** export v10 json payloads and correct route types ([#608](https://github.com/discordjs/discord-api-types/issues/608)) ([bce0795](https://github.com/discordjs/discord-api-types/commit/bce07950fdfec7ae5e96ce3158f73cfb5db0a890)) ### Features - **RESTJSONErrorCodes:** add error `50073` ([#594](https://github.com/discordjs/discord-api-types/issues/594)) ([70826ed](https://github.com/discordjs/discord-api-types/commit/70826ed76e4b4880fb7425a07d04921823954c95)) ## [0.37.13](https://github.com/discordjs/discord-api-types/compare/0.37.12...0.37.13) (2022-10-14) ### Features - **APIAutoModeration:** add support for auto moderation ([#418](https://github.com/discordjs/discord-api-types/issues/418)) ([b216f7a](https://github.com/discordjs/discord-api-types/commit/b216f7a8bee2c02fe0e75189fe31f95973bfbe2e)) ## [0.37.12](https://github.com/discordjs/discord-api-types/compare/0.37.11...0.37.12) (2022-10-06) ## [0.37.11](https://github.com/discordjs/discord-api-types/compare/0.37.10...0.37.11) (2022-09-26) ### Features - **APIGuildForumChannel:** add `default_sort_order` ([#589](https://github.com/discordjs/discord-api-types/issues/589)) ([143b003](https://github.com/discordjs/discord-api-types/commit/143b003fbe5a86eda225e9da1d0914d6e48cddfd)) - **APIGuildForumChannel:** update and add missing features ([#575](https://github.com/discordjs/discord-api-types/issues/575)) ([0f118d3](https://github.com/discordjs/discord-api-types/commit/0f118d382f94151b1c9be42620520c91b20a05f6)) ## [0.37.10](https://github.com/discordjs/discord-api-types/compare/0.37.9...0.37.10) (2022-09-15) ### Features - add `RESTRateLimit` ([#585](https://github.com/discordjs/discord-api-types/issues/585)) ([f4d3f4d](https://github.com/discordjs/discord-api-types/commit/f4d3f4d5b1c1b6e42c2a8f8184f43d67b586c8c1)) - **APIConnection:** add `two_way_link` ([#546](https://github.com/discordjs/discord-api-types/issues/546)) ([d452f63](https://github.com/discordjs/discord-api-types/commit/d452f6346bd4953a8d777f3818797c4285b1b842)) - **APIGuild:** document afk timeout values ([#570](https://github.com/discordjs/discord-api-types/issues/570)) ([32f5a7b](https://github.com/discordjs/discord-api-types/commit/32f5a7b9814b69da7fc3772ec1f0307d39cda087)) ## [0.37.9](https://github.com/discordjs/discord-api-types/compare/0.37.8...0.37.9) (2022-09-12) ### Features - **ConnectionService:** add new connections ([#548](https://github.com/discordjs/discord-api-types/issues/548)) ([afd3b55](https://github.com/discordjs/discord-api-types/commit/afd3b55c08b0cf75cc4f5a06d3574b6cf532cb6c)) ## [0.37.8](https://github.com/discordjs/discord-api-types/compare/0.37.7...0.37.8) (2022-09-08) ### Features - **GuildFeature:** add `InvitesDisabled` ([#549](https://github.com/discordjs/discord-api-types/issues/549)) ([2708cb9](https://github.com/discordjs/discord-api-types/commit/2708cb9dcaa07d19ca71e9ca211e78939b9d1ff4)) ## [0.37.7](https://github.com/discordjs/discord-api-types/compare/0.37.6...0.37.7) (2022-09-05) ### Bug Fixes - **ChannelType:** bring back old names ([b08f2e3](https://github.com/discordjs/discord-api-types/commit/b08f2e34dbe9afccca6f565db6c7b27a21453d85)) ## [0.37.6](https://github.com/discordjs/discord-api-types/compare/0.37.5...0.37.6) (2022-09-05) ### Bug Fixes - **APIModalSubmission:** `components` is not optional ([#574](https://github.com/discordjs/discord-api-types/issues/574)) ([f69b586](https://github.com/discordjs/discord-api-types/commit/f69b586d0148afd017e6da70ab8d745b6ba04ba4)) - **GuildChannelType:** add missing `GuildCategory` type ([#579](https://github.com/discordjs/discord-api-types/issues/579)) ([815c68f](https://github.com/discordjs/discord-api-types/commit/815c68fe46034029200a8e2903748a3d2e6af7b9)) - **RESTPatchAPIGuildVoiceStateCurrentMemberJSONBody:** `channel_id` is optional ([#547](https://github.com/discordjs/discord-api-types/issues/547)) ([b7b855b](https://github.com/discordjs/discord-api-types/commit/b7b855b2005bb3989810850d6e00bec443a15c92)) ### Features - **APIGuildIntegration:** add `scopes` ([#563](https://github.com/discordjs/discord-api-types/issues/563)) ([73d15dd](https://github.com/discordjs/discord-api-types/commit/73d15ddcbbc676efac876602a3cd726bfe4c378a)) - **ApplicationFlags:** add `ApplicationCommandBadge` ([#537](https://github.com/discordjs/discord-api-types/issues/537)) ([48f0f56](https://github.com/discordjs/discord-api-types/commit/48f0f562bab10d2a1e331474fb963af8631b788b)) - **RESTPutAPIGuildBanJSONBody:** add `delete_message_seconds` ([#534](https://github.com/discordjs/discord-api-types/issues/534)) ([4e362d5](https://github.com/discordjs/discord-api-types/commit/4e362d52608e99d466b43cd37ec6b6bb1222b660)) ## [0.37.5](https://github.com/discordjs/discord-api-types/compare/0.37.4...0.37.5) (2022-08-25) ### Features - **FormattingPatterns:** add `ApplicationCommand` ([#525](https://github.com/discordjs/discord-api-types/issues/525)) ([0098889](https://github.com/discordjs/discord-api-types/commit/00988894995f7ac5e8ddc34125704a230329137c)) ## [0.37.4](https://github.com/discordjs/discord-api-types/compare/0.37.3...0.37.4) (2022-08-22) ### Features - add common JSON error types ([#568](https://github.com/discordjs/discord-api-types/issues/568)) ([956f289](https://github.com/discordjs/discord-api-types/commit/956f289e885763a620cb67a36e7e42683b5c08bf)) - **ApplicationCommand:** export base chat input types ([#569](https://github.com/discordjs/discord-api-types/issues/569)) ([248484e](https://github.com/discordjs/discord-api-types/commit/248484e55613e2da3f1d659395e1f4c010cb51b5)) ## [0.37.3](https://github.com/discordjs/discord-api-types/compare/0.37.2...0.37.3) (2022-08-18) ### Features - **RESTJSONErrorCodes:** add 240000 ([#565](https://github.com/discordjs/discord-api-types/issues/565)) ([5bb50ae](https://github.com/discordjs/discord-api-types/commit/5bb50ae7ea6859845c9d9996f02ac42c61413df0)) ## [0.37.2](https://github.com/discordjs/discord-api-types/compare/0.37.1...0.37.2) (2022-08-11) ### Bug Fixes - **GatewayGuildMembersChunkDispatchData:** make chunk pagination properties mandatory ([#558](https://github.com/discordjs/discord-api-types/issues/558)) ([0e03e39](https://github.com/discordjs/discord-api-types/commit/0e03e39aa2bf8f1b9a58113a3242c4722e64922b)) - **GatewayRequestGuildMembersData:** limit being required with user_ids ([#559](https://github.com/discordjs/discord-api-types/issues/559)) ([dc3d5df](https://github.com/discordjs/discord-api-types/commit/dc3d5df0a2931eff63991987166634661d5bd1d8)) - **RESTGetAPIChannelUsersThreadsArchivedResult:** add `has_more` missing field ([#543](https://github.com/discordjs/discord-api-types/issues/543)) ([796f6d8](https://github.com/discordjs/discord-api-types/commit/796f6d8a3b2f55d2a120137801e0450ddf30576e)) ### Features - add search that might or might not work ([f8a9c8b](https://github.com/discordjs/discord-api-types/commit/f8a9c8b5c6bdd73bcbf9dd6fff66fafac2594ba4)) - **APIVoiceChannel:** support text in voice, properties `last_message_id` and `rate_limit_per_user` ([#544](https://github.com/discordjs/discord-api-types/issues/544)) ([4488d8f](https://github.com/discordjs/discord-api-types/commit/4488d8fd2611a6547fc6149ba1cec5682340a119)) - **GatewayReadyDispatchData:** add `resume_gateway_url` ([#552](https://github.com/discordjs/discord-api-types/issues/552)) ([9a50367](https://github.com/discordjs/discord-api-types/commit/9a50367dad3a06fbca6e8d1fdd98fbf144595d4e)) ## [0.37.1](https://github.com/discordjs/discord-api-types/compare/0.37.0...0.37.1) (2022-08-04) # [0.37.0](https://github.com/discordjs/discord-api-types/compare/0.36.3...0.37.0) (2022-07-28) ### Code Refactoring - **RESTJSONErrorCodes:** use `MaximumThreadParticipantsReached` instead in error code 30033 ([#540](https://github.com/discordjs/discord-api-types/issues/540)) ([cecf17b](https://github.com/discordjs/discord-api-types/commit/cecf17b4158fbebb3ee508518a9e9a7b1297356f)) ### BREAKING CHANGES - **RESTJSONErrorCodes:** `MaximumThreadParticipants` was renamed to `MaximumThreadParticipantsReached` for consistency with the rest of the codes ## [0.36.3](https://github.com/discordjs/discord-api-types/compare/0.36.2...0.36.3) (2022-07-21) ### Features - **APIConnection:** add `ConnectionService` to `type` ([#491](https://github.com/discordjs/discord-api-types/issues/491)) ([4577ac2](https://github.com/discordjs/discord-api-types/commit/4577ac2609f4a861505bc41f4293f482db251cdc)) - **APIThreadChannel:** add fields about new message counter capability ([#532](https://github.com/discordjs/discord-api-types/issues/532)) ([2b53b20](https://github.com/discordjs/discord-api-types/commit/2b53b20b84b7434b9a35b715d8ebdeb040835dca)) - **GatewayGuildCreateDispatchData:** add missing `unavailable` ([#504](https://github.com/discordjs/discord-api-types/issues/504)) ([59e2477](https://github.com/discordjs/discord-api-types/commit/59e247729fcd27be839c88516939ec22843781ce)) - **RESTJSONErrorCodes:** add `ApplicationNotYetAvailable` ([#507](https://github.com/discordjs/discord-api-types/issues/507)) ([09a1141](https://github.com/discordjs/discord-api-types/commit/09a114133c7599cc14d4a0eb61425162091c45ee)) - **RESTJSONErrorCodes:** add error `30034` ([#530](https://github.com/discordjs/discord-api-types/issues/530)) ([0a2e778](https://github.com/discordjs/discord-api-types/commit/0a2e7787c672ffb4af83e055df632aae36811445)) - **RESTJSONErrorCodes:** add error `50132` ([#505](https://github.com/discordjs/discord-api-types/issues/505)) ([907d88a](https://github.com/discordjs/discord-api-types/commit/907d88ada93221802a4aefe7dc0ca3b2b73f94f0)) - **RESTJSONErrorCodes:** add error `50146` ([#527](https://github.com/discordjs/discord-api-types/issues/527)) ([e78de0c](https://github.com/discordjs/discord-api-types/commit/e78de0c83ba93145a2302ddea2e55b5050291c52)) - **RESTJSONErrorCodes:** add new errors ([#506](https://github.com/discordjs/discord-api-types/issues/506)) ([65b672e](https://github.com/discordjs/discord-api-types/commit/65b672e2afd2135333272d4e7b771eba237a21b6)) ## [0.36.2](https://github.com/discordjs/discord-api-types/compare/0.36.1...0.36.2) (2022-07-14) ### Features - **RESTJSONErrorCodes:** add error `30032` ([#521](https://github.com/discordjs/discord-api-types/issues/521)) ([f2c3451](https://github.com/discordjs/discord-api-types/commit/f2c3451c2a8bc91bcca65372d2944a07a3c34a9a)) - **RESTPutAPIApplicationGuildCommandsJSONBody:** add missing `id` ([#522](https://github.com/discordjs/discord-api-types/issues/522)) ([4af2ea9](https://github.com/discordjs/discord-api-types/commit/4af2ea91415a5662171d342379c4bd33bfa5a6d5)) ## [0.36.1](https://github.com/discordjs/discord-api-types/compare/0.36.0...0.36.1) (2022-07-04) ### Features - **APIApplicationCommandStringOption:** add `min_length` and `max_length` ([#513](https://github.com/discordjs/discord-api-types/issues/513)) ([2cade98](https://github.com/discordjs/discord-api-types/commit/2cade98ed0a0a074254fbc1580fc56d0e0b3dc9c)) # [0.36.0](https://github.com/discordjs/discord-api-types/compare/0.35.0...0.36.0) (2022-06-30) ### Features - **APIBaseInteraction:** add `app_permissions` ([#509](https://github.com/discordjs/discord-api-types/issues/509)) ([0c65d40](https://github.com/discordjs/discord-api-types/commit/0c65d40af00499233830ce272a2a274bcd5b9e8c)) - **MessageType:** update names ([#498](https://github.com/discordjs/discord-api-types/issues/498)) ([12072b7](https://github.com/discordjs/discord-api-types/commit/12072b70a0c70e1e1f9de920789e26829268de12)) - **RESTJSONErrorCodes:** add error 20024 ([#480](https://github.com/discordjs/discord-api-types/issues/480)) ([34908aa](https://github.com/discordjs/discord-api-types/commit/34908aa4ceeca4b58276cc207f5bdb77cef04296)) ### BREAKING CHANGES - **MessageType:** The following message types have been renamed: * `GuildMemberJoin` -> `UserJoin` * `UserPremiumGuildSubscription` -> `GuildBoost` * `UserPremiumGuildSubscriptionTier1` -> `GuildBoostTier1` * `UserPremiumGuildSubscriptionTier2` -> `GuildBoostTier2` * `UserPremiumGuildSubscriptionTier3` -> `GuildBoostTier3` # [0.35.0](https://github.com/discordjs/discord-api-types/compare/0.34.0...0.35.0) (2022-06-23) ### Code Refactoring - **GatewayIdentifyProperties:** remove `$` prefix from keys ([#493](https://github.com/discordjs/discord-api-types/issues/493)) ([3b10c60](https://github.com/discordjs/discord-api-types/commit/3b10c60faa5943501ab1f7cfa0d5f3c5317cdbbd)) ### Features - **APIEmbedVideo:** add missing `proxy_url` property ([#496](https://github.com/discordjs/discord-api-types/issues/496)) ([56d491f](https://github.com/discordjs/discord-api-types/commit/56d491fa6808d9a8762bff606ca8feb5e11f13a4)) - **REST:** add `CDNRoutes` ([#502](https://github.com/discordjs/discord-api-types/issues/502)) ([0609886](https://github.com/discordjs/discord-api-types/commit/06098869d552139fadcc204b5ce4e1a7e5352b68)) - **UserFlags:** add `Quarantined` flag ([#495](https://github.com/discordjs/discord-api-types/issues/495)) ([fc3aa1c](https://github.com/discordjs/discord-api-types/commit/fc3aa1c9110e4730c6b8ba3e36815ecd2da66c68)) ### BREAKING CHANGES - **GatewayIdentifyProperties:** The fields for identify no longer use the `$` prefix for the values. # [0.34.0](https://github.com/discordjs/discord-api-types/compare/0.33.5...0.34.0) (2022-06-13) ### Code Refactoring - separate `MESSAGE_CREATE` fields from `APIMessage` object ([#434](https://github.com/discordjs/discord-api-types/issues/434)) ([0bb2204](https://github.com/discordjs/discord-api-types/commit/0bb2204b5ddd32b791641a33d52669bc739bc208)) ### Features - add guild mfa endpoint and error `50017` ([#476](https://github.com/discordjs/discord-api-types/issues/476)) ([292c6b5](https://github.com/discordjs/discord-api-types/commit/292c6b58ee9384db2ce06addb80d2ea2bcd32de2)) - **RESTJSONErrorCodes:** add 220003 error ([#466](https://github.com/discordjs/discord-api-types/issues/466)) ([20653b3](https://github.com/discordjs/discord-api-types/commit/20653b34819f6adf8116bef2a1e5edc3233c4117)) ### BREAKING CHANGES - Certain fields that come only through the gateway are now correctly typed as such ## [0.33.5](https://github.com/discordjs/discord-api-types/compare/0.33.4...0.33.5) (2022-06-07) ### Bug Fixes - **GatewayGuildCreateDispatch:** add missing `GatewayGuildCreateDispatch` ([#477](https://github.com/discordjs/discord-api-types/issues/477)) ([d268e0b](https://github.com/discordjs/discord-api-types/commit/d268e0bff7429e1cde43174fdf6d2342569860d5)) - **RESTPostAPIWebhookWithTokenJSONBody:** `thread_name` should be optional ([#479](https://github.com/discordjs/discord-api-types/issues/479)) ([eff8892](https://github.com/discordjs/discord-api-types/commit/eff8892b03656cfc2b709c6c30edb98e38bf2a1e)) ### Features - **RESTJSONErrorCodes:** add error `30052` ([#469](https://github.com/discordjs/discord-api-types/issues/469)) ([d854317](https://github.com/discordjs/discord-api-types/commit/d8543177cd978a19daa32fbb183892b6f8c24772)) ## [0.33.4](https://github.com/discordjs/discord-api-types/compare/0.33.3...0.33.4) (2022-06-06) ### Features - **RESTPostAPIWebhookWithTokenJSONBody:** add `thread_name` ([#463](https://github.com/discordjs/discord-api-types/issues/463)) ([8e5f07e](https://github.com/discordjs/discord-api-types/commit/8e5f07e2eebc14e5777dbfb932ef54f252165524)) ## [0.33.3](https://github.com/discordjs/discord-api-types/compare/0.33.2...0.33.3) (2022-06-04) ### Bug Fixes - **AddUndefinedToPossiblyUndefinedProperties:** recurse down objects ([#471](https://github.com/discordjs/discord-api-types/issues/471)) ([43c372d](https://github.com/discordjs/discord-api-types/commit/43c372d81722e48b105d5121a2cfdf614f1e7704)) ## [0.33.2](https://github.com/discordjs/discord-api-types/compare/0.33.1...0.33.2) (2022-06-01) ### Bug Fixes - **docs-site:** website link colors ([#457](https://github.com/discordjs/discord-api-types/issues/457)) ([51e664d](https://github.com/discordjs/discord-api-types/commit/51e664d8e826e7f0aa467c000f3a1707fc283a36)) - **GatewayGuildCreateDispatch:** add extra fields that were missing ([#458](https://github.com/discordjs/discord-api-types/issues/458)) ([15fcd1b](https://github.com/discordjs/discord-api-types/commit/15fcd1b2a85e8d1e136416a66326a4aadcc301fb)) - **RestPostAPIBaseApplicationJSONBody:** make `default_member_permissions` optional ([#460](https://github.com/discordjs/discord-api-types/issues/460)) ([6a813be](https://github.com/discordjs/discord-api-types/commit/6a813be83382e1606f1921cf00179fe1ce75c04f)) ## [0.33.1](https://github.com/discordjs/discord-api-types/compare/0.33.0...0.33.1) (2022-05-26) ### Bug Fixes - **RESTPostAPIApplicationGuildCommands:** correct types due to unions ([#447](https://github.com/discordjs/discord-api-types/issues/447)) ([6d85ad6](https://github.com/discordjs/discord-api-types/commit/6d85ad6b1d707b980f9897ea68dd4b7573b3a770)) ### Features - **RESTJSONErrorCodes:** add error `50600` ([#444](https://github.com/discordjs/discord-api-types/issues/444)) ([5ef49f4](https://github.com/discordjs/discord-api-types/commit/5ef49f41cecaa1d5937428a5c58f1d88bfc61266)) - **RESTPostAPIGuildChannels:** update post body fields ([#419](https://github.com/discordjs/discord-api-types/issues/419)) ([748db34](https://github.com/discordjs/discord-api-types/commit/748db34e30338cf4a9fd8ce7b86d1d5c7dde63b1)) # [0.33.0](https://github.com/discordjs/discord-api-types/compare/0.32.1...0.33.0) (2022-05-16) ### Code Refactoring - **GuildFeature:** thread archive durations are no longer boost locked ([#412](https://github.com/discordjs/discord-api-types/issues/412)) ([1737ade](https://github.com/discordjs/discord-api-types/commit/1737adea1fc3d5050db30266e49c63277b7a77fc)) - separate `GUILD_CREATE` fields from `APIGuild` object ([#423](https://github.com/discordjs/discord-api-types/issues/423)) ([17f5caa](https://github.com/discordjs/discord-api-types/commit/17f5caa671da50a79d61393f5a970ce59c5d875e)) ### Features - add support for application command permissions v2 ([#415](https://github.com/discordjs/discord-api-types/issues/415)) ([d3163ca](https://github.com/discordjs/discord-api-types/commit/d3163ca22e5b7d8292f9f6ccd444aa5c93771d92)) - **OAuth2Scopes:** add new OAuth2 scopes ([#435](https://github.com/discordjs/discord-api-types/issues/435)) ([8f16f45](https://github.com/discordjs/discord-api-types/commit/8f16f452ac7dc8988617d1211fc6a9547d254795)) - **rest:** add missing guild routes results ([#438](https://github.com/discordjs/discord-api-types/issues/438)) ([1afce87](https://github.com/discordjs/discord-api-types/commit/1afce87fbef8e43ee040010e36019a4ebc6fecfe)) ### BREAKING CHANGES - APIGuild now correctly shows just the properties that are obtainable through rest/GUILD_UPDATE, while the extra fields have been moved to GatewayGuildCreateDispatchData to correctly represent the data received - **GuildFeature:** `SevenDayThreadArchive` and `ThreeDayThreadArchive` have been removed as they are no longer valid ## [0.32.1](https://github.com/discordjs/discord-api-types/compare/0.32.0...0.32.1) (2022-05-05) ### Features - **RESTJSONErrorCodes:** add error `50080` ([#408](https://github.com/discordjs/discord-api-types/issues/408)) ([43cfbcb](https://github.com/discordjs/discord-api-types/commit/43cfbcba284a96de6bde101b866ad9ac306992b5)) - **RESTPostAPIGuildForumThreads:** add `message` field ([#416](https://github.com/discordjs/discord-api-types/issues/416)) ([a28c824](https://github.com/discordjs/discord-api-types/commit/a28c824f82014b15a715b51b4426356428bb4ba2)) # [0.32.0](https://github.com/discordjs/discord-api-types/compare/0.31.2...0.32.0) (2022-04-25) ### Bug Fixes - add `position` property to create channel options ([#409](https://github.com/discordjs/discord-api-types/issues/409)) ([3fe53ce](https://github.com/discordjs/discord-api-types/commit/3fe53ced9f0e61473a8b92d0503c51084e6a58f3)) ### Code Refactoring - **APIGuildIntegration:** make `enabled` optional ([#406](https://github.com/discordjs/discord-api-types/issues/406)) ([1212eb9](https://github.com/discordjs/discord-api-types/commit/1212eb933e6bf1d82b1b41164030bd317e9c59eb)) ### BREAKING CHANGES - **APIGuildIntegration:** `enabled` is now properly marked as optional ## [0.31.2](https://github.com/discordjs/discord-api-types/compare/0.31.1...0.31.2) (2022-04-18) ### Features - **RESTPostAPIGuildChannelJSONBody:** add `default_auto_archive` prop ([#400](https://github.com/discordjs/discord-api-types/issues/400)) ([6a192b1](https://github.com/discordjs/discord-api-types/commit/6a192b132c11f13d95ea3e7ed1eb556600f2f415)) ## [0.31.1](https://github.com/discordjs/discord-api-types/compare/0.31.0...0.31.1) (2022-04-11) ### Features - **APIApplicationCommandInteractionData:** add `guild_id` ([#396](https://github.com/discordjs/discord-api-types/issues/396)) ([bc6e97f](https://github.com/discordjs/discord-api-types/commit/bc6e97f309b1f5e0bc0063ada3aed77f34214e9f)) - **APIGuildForum:** add support for forums, part 1 ([#398](https://github.com/discordjs/discord-api-types/issues/398)) ([bf08484](https://github.com/discordjs/discord-api-types/commit/bf084849885dd15b19f4f46aa260815037131600)) - student hubs ([#215](https://github.com/discordjs/discord-api-types/issues/215)) ([69079ee](https://github.com/discordjs/discord-api-types/commit/69079ee132777977e9a9e163696ffdc8db82fe38)) # [0.31.0](https://github.com/discordjs/discord-api-types/compare/0.30.0...0.31.0) (2022-04-04) ### Code Refactoring - **APIGroupDMChannel:** make `name` nullable ([#347](https://github.com/discordjs/discord-api-types/issues/347)) ([ed0049b](https://github.com/discordjs/discord-api-types/commit/ed0049b78f4008460b0c7a2ec68eb38f018be3bd)) - remove `summary` from applications ([#386](https://github.com/discordjs/discord-api-types/issues/386)) ([f0ab4e8](https://github.com/discordjs/discord-api-types/commit/f0ab4e8c48895f8daee7fa296b8319a98fb7d4e1)) - remove store channels ([#364](https://github.com/discordjs/discord-api-types/issues/364)) ([25677ff](https://github.com/discordjs/discord-api-types/commit/25677fff43533b3b11b88f01efe98f0875014cb5)) ### Features - add `RESTGetAPIGuildBansQuery` ([#391](https://github.com/discordjs/discord-api-types/issues/391)) ([b1bf7bf](https://github.com/discordjs/discord-api-types/commit/b1bf7bf0f9a37fa391a67e4b5b1dd288821d0ebb)) - **APIApplication:** app authorization links and tags ([#239](https://github.com/discordjs/discord-api-types/issues/239)) ([93eab11](https://github.com/discordjs/discord-api-types/commit/93eab113cdcfd3bdd868f1d86bb4bc2a5247d844)) - **APIApplicationCommand:** add missing localization props ([#383](https://github.com/discordjs/discord-api-types/issues/383)) ([9c12718](https://github.com/discordjs/discord-api-types/commit/9c1271816312382be3471cb2fdbb6260e973b4f6)) - **APIAuditLogChange:** add `APIAuditLogChangeKeyImageHash` ([#379](https://github.com/discordjs/discord-api-types/issues/379)) ([f532002](https://github.com/discordjs/discord-api-types/commit/f532002574b655d87151c325be6c02fe6f65bbe0)) - **GuildFeatures:** add animated banners ([#219](https://github.com/discordjs/discord-api-types/issues/219)) ([c23f2ac](https://github.com/discordjs/discord-api-types/commit/c23f2accf998ffa0c068d222fd9f34228a86a699)) - **RESTPostAPIStageInstanceJSONBody:** add `send_start_notification` ([#378](https://github.com/discordjs/discord-api-types/issues/378)) ([b764e8d](https://github.com/discordjs/discord-api-types/commit/b764e8dc1a92e254161f3a443e17148a81240b66)) ### BREAKING CHANGES - The deprecated `summary` field has been removed - Store channels have been removed, alongside their types - **APIGroupDMChannel:** The `name` field is now also nullable for Group DM Channels # [0.30.0](https://github.com/discordjs/discord-api-types/compare/0.29.0...0.30.0) (2022-03-24) ### Bug Fixes - **APIGuildIntegrationType:** correct name of type ([#366](https://github.com/discordjs/discord-api-types/issues/366)) ([fa740eb](https://github.com/discordjs/discord-api-types/commit/fa740eb16c8bba9d2c9c915d2e0139e5e1211040)) ### Features - **APIApplicationCommand:** add command localization ([#370](https://github.com/discordjs/discord-api-types/issues/370)) ([f702988](https://github.com/discordjs/discord-api-types/commit/f70298811242d946cee01b112c34382f0e54cb78)) ### Reverts - fix(GatewayVoiceState): some fields are optional instead of nullable ([#367](https://github.com/discordjs/discord-api-types/issues/367)) ([e822e45](https://github.com/discordjs/discord-api-types/commit/e822e45b3b6e07eb85a45039975cb33636765f5e)) ### BREAKING CHANGES - **APIGuildIntegrationType:** `APIGuildInteractionType` is now correctly named `APIGuildIntegrationType` # [0.29.0](https://github.com/discordjs/discord-api-types/compare/0.28.0...0.29.0) (2022-03-10) ### Bug Fixes - **GatewayVoiceState:** some fields are optional instead of nullable ([#345](https://github.com/discordjs/discord-api-types/issues/345)) ([fddff21](https://github.com/discordjs/discord-api-types/commit/fddff2167c858832d6c61f3efca8d944fd356a85)) - **RESTJSONErrorCodes:** typo in error `30046` ([#362](https://github.com/discordjs/discord-api-types/issues/362)) ([854aa36](https://github.com/discordjs/discord-api-types/commit/854aa3691c4d16a2c7fec7421cf25ea03a030e55)) ### Code Refactoring - **APIGuildScheduledEventBase:** make `description` nullable ([#359](https://github.com/discordjs/discord-api-types/issues/359)) ([e5710d0](https://github.com/discordjs/discord-api-types/commit/e5710d0e42d4f597bc9ed5594619a5032bf59bcb)) - make things optional and nullable where applicable ([#361](https://github.com/discordjs/discord-api-types/issues/361)) ([10fdeaa](https://github.com/discordjs/discord-api-types/commit/10fdeaa68df9b3b61b20b8d90b9587d03d95a450)) - **RESTJSONErrorCodes:** update error `50008` key ([#338](https://github.com/discordjs/discord-api-types/issues/338)) ([9a57848](https://github.com/discordjs/discord-api-types/commit/9a578489ad05b2ba8ed8d496db19cb86fa572ef7)) ### Features - **APIInviteGuild:** add boost count ([#323](https://github.com/discordjs/discord-api-types/issues/323)) ([cb92843](https://github.com/discordjs/discord-api-types/commit/cb92843991307d59c61d017d8ab1adcd469b4512)) - **APIStageInstance:** add `guild_scheduled_event_id` ([#350](https://github.com/discordjs/discord-api-types/issues/350)) ([d06d2d6](https://github.com/discordjs/discord-api-types/commit/d06d2d6a9a8ccc84337b2ce9c59430694ae93e8a)) - **RESTJSONErrorCodes:** add error `10065` ([#336](https://github.com/discordjs/discord-api-types/issues/336)) ([e8127b8](https://github.com/discordjs/discord-api-types/commit/e8127b89f89c4612fab0d3702ce512e41ab75b6e)) ### BREAKING CHANGES - **RESTJSONErrorCodes:** `MaximumNumberOfEditsToMessagesOlderThanOneHourReached` is no longer mistyped as `MaxmimumNumberOfEditsToMessagesOlderThanOneHourReached` - **APIGuildScheduledEventBase:** The type for `description` can also be null, not just optional - **RESTJSONErrorCodes:** The error code `50008` has been renamed from `CannotSendMessagesInVoiceChannel` to `CannotSendMessagesInNonTextChannel` - The deprecated `asset` field for stickers is correctly marked as optional now. The `image` field for Guild Scheduled Events is now correctly typed as optional. - **GatewayVoiceState:** `channel_id` and `request_to_speak_timestamp` are correctly typed as optional, not nullable now. # [0.28.0](https://github.com/discordjs/discord-api-types/compare/0.27.3...0.28.0) (2022-03-07) ### Code Refactoring - **PermissionFlagsBits:** rename `StartEmbeddedActivities` to `UseEmbeddedActivities` ([#342](https://github.com/discordjs/discord-api-types/issues/342)) ([3e3acb5](https://github.com/discordjs/discord-api-types/commit/3e3acb5297e3e546fbb7fc82acddb50170ffc1de)) ### Features - add support for TS module: NodeNext ([#356](https://github.com/discordjs/discord-api-types/issues/356)) ([e9ee696](https://github.com/discordjs/discord-api-types/commit/e9ee6966c38c82544536ece85af0c1b3bd592bfc)) - **MessageComponentInteraction:** export specific interaction aliases ([#353](https://github.com/discordjs/discord-api-types/issues/353)) ([3503a4f](https://github.com/discordjs/discord-api-types/commit/3503a4fd384be8459a1628a6f019a1bc164c0386)) - **Utils:** add more typeguard functions to determine the interaction types ([#355](https://github.com/discordjs/discord-api-types/issues/355)) ([dec7717](https://github.com/discordjs/discord-api-types/commit/dec7717bc76ac86c8b7d45ed4e0b506e532f7cb9)) ### BREAKING CHANGES - **PermissionFlagsBits:** The `StartEmbeddedActivities` permission flag has been renamed to `UseEmbeddedActivities` ## [0.27.3](https://github.com/discordjs/discord-api-types/compare/0.27.2...0.27.3) (2022-02-24) ### Bug Fixes - **APIApplicationCommandAutocompleteInteraction:** make `options` field required for v10 (PR [#332](https://github.com/discordjs/discord-api-types/issues/332) redo) ([#339](https://github.com/discordjs/discord-api-types/issues/339)) ([8d432f2](https://github.com/discordjs/discord-api-types/commit/8d432f2ebe54904cc0285b1e05706ca105ece7b8)) ## [0.27.2](https://github.com/discordjs/discord-api-types/compare/0.27.1...0.27.2) (2022-02-17) ### Bug Fixes - **APIApplicationCommandAutocompleteInteraction:** make `options` field required ([#332](https://github.com/discordjs/discord-api-types/issues/332)) ([5396daf](https://github.com/discordjs/discord-api-types/commit/5396daf0dbbe7ed54d94c621649b746b1131dee9)) - **APIInteractionResponse:** add `APIModalInteractionResponse` to union ([#333](https://github.com/discordjs/discord-api-types/issues/333)) ([a8f19e6](https://github.com/discordjs/discord-api-types/commit/a8f19e6a19cbefd99c8c8bd35e565ab3584c9eeb)) ### Features - api v10 ([#331](https://github.com/discordjs/discord-api-types/issues/331)) ([8e87b3e](https://github.com/discordjs/discord-api-types/commit/8e87b3e1ce35201503623839602c44fe2a52a27b)) ## [0.27.1](https://github.com/discordjs/discord-api-types/compare/0.27.0...0.27.1) (2022-02-14) ### Bug Fixes - **APIInteraction:** add modal submit interaction & make `data` required in APIModalSubmit ([#321](https://github.com/discordjs/discord-api-types/issues/321)) ([f88727b](https://github.com/discordjs/discord-api-types/commit/f88727bd80d32f3ddf4374b1fd46ce50c36eea4d)) - **APIInteractions:** export ApplicationCommandAutocomplete ([#309](https://github.com/discordjs/discord-api-types/issues/309)) ([5056da5](https://github.com/discordjs/discord-api-types/commit/5056da523af6154fbf2fbcf10e30ce437ec42ce8)) - **CI:** skip pull request checks for runs that don't include the token ([#327](https://github.com/discordjs/discord-api-types/issues/327)) ([0ad06fc](https://github.com/discordjs/discord-api-types/commit/0ad06fc639d7f8bdff135a58d435e6cb15029842)) - make `data` required in autocomplete interaction and add separate dm/guild types ([#322](https://github.com/discordjs/discord-api-types/issues/322)) ([7abeb2e](https://github.com/discordjs/discord-api-types/commit/7abeb2e0391d6e47517edba63342ba9c4adc4fcb)) ### Features - **RESTJSONErrorCodes:** add error 40060 ([#320](https://github.com/discordjs/discord-api-types/issues/320)) ([72e9617](https://github.com/discordjs/discord-api-types/commit/72e9617fee6e05d2eb4b715c0261d316ff0e1f1e)) # [0.27.0](https://github.com/discordjs/discord-api-types/compare/0.26.1...0.27.0) (2022-02-10) ### Bug Fixes - **GatewayThreadCreateDispatchData:** `newly_created` is optional, and `true` when present ([#312](https://github.com/discordjs/discord-api-types/issues/312)) ([87b9b08](https://github.com/discordjs/discord-api-types/commit/87b9b0885a3734b376e64da51d7667b74558f7e5)) ### Code Refactoring - **ActivityType:** change `Game` to `Playing` ([#298](https://github.com/discordjs/discord-api-types/issues/298)) ([08a8b28](https://github.com/discordjs/discord-api-types/commit/08a8b28ee1ed2041744d922db35dab24f3861469)) - **UserFlags:** remove `None` ([#308](https://github.com/discordjs/discord-api-types/issues/308)) ([8e13cd8](https://github.com/discordjs/discord-api-types/commit/8e13cd80c66d11d93157a053e329ad98ece4a457)) ### Features - **APIGuildPreview:** add `stickers` ([#279](https://github.com/discordjs/discord-api-types/issues/279)) ([310c68f](https://github.com/discordjs/discord-api-types/commit/310c68f034812072ca3cacbeaff1f5b9454e3409)) - **APIInteraction:** add locale props to interactions ([#273](https://github.com/discordjs/discord-api-types/issues/273)) ([03b8d3f](https://github.com/discordjs/discord-api-types/commit/03b8d3fee032fb77213389019baa2b80377dcfdc)) - **APIMessageInteraction:** add `member` field ([#299](https://github.com/discordjs/discord-api-types/issues/299)) ([80ed7ba](https://github.com/discordjs/discord-api-types/commit/80ed7ba1c1ebb2e12d3a04339d4ff0209be9bbef)) - **APIScheduledEvent:** add `image` prop ([#303](https://github.com/discordjs/discord-api-types/issues/303)) ([663c4e9](https://github.com/discordjs/discord-api-types/commit/663c4e97fbe2029ab040388b50d5600bfe281c4f)) - **APIThreadMetadata:** add `create_timestamp` field ([#301](https://github.com/discordjs/discord-api-types/issues/301)) ([d95d956](https://github.com/discordjs/discord-api-types/commit/d95d9562dcc514556f3a4ced3e8f3ee4c5ed1282)) - **ApplicationCommand:** attachment application command option type ([#272](https://github.com/discordjs/discord-api-types/issues/272)) ([71c4e6a](https://github.com/discordjs/discord-api-types/commit/71c4e6aecd044ce5282742c0e47bff7b64b890f7)) - **GatewayThreadCreateDispatch:** Add `newly_created` field ([#311](https://github.com/discordjs/discord-api-types/issues/311)) ([7e54215](https://github.com/discordjs/discord-api-types/commit/7e542152da2e58f44c2314d5bd3b04a518fa979e)) - **Interactions:** add modal and text input interactions ([#243](https://github.com/discordjs/discord-api-types/issues/243)) ([bf0f66b](https://github.com/discordjs/discord-api-types/commit/bf0f66b60a97f79c0e80ace5b408baee343bc82c)) - **Locales:** add locale string enum ([#297](https://github.com/discordjs/discord-api-types/issues/297)) ([b07d5a0](https://github.com/discordjs/discord-api-types/commit/b07d5a0c2273b6b51b44542b638a768c36d0f184)) - **MessageFlags:** add `FailedToMentionSomeRolesInThread` ([#280](https://github.com/discordjs/discord-api-types/issues/280)) ([76588d9](https://github.com/discordjs/discord-api-types/commit/76588d9d384f71ace05d96de17889e4490874462)) - **RESTPostAPIChannelMessage, RESTPostAPIWebhookMessage:** add flags for creation ([#300](https://github.com/discordjs/discord-api-types/issues/300)) ([4194bd9](https://github.com/discordjs/discord-api-types/commit/4194bd9054a7e4b004f9244706f423292a8a0e56)) - **RESTJSONErrorCodes:** add error 30042 ([#305](https://github.com/discordjs/discord-api-types/issues/305)) ([9c2b185](https://github.com/discordjs/discord-api-types/commit/9c2b185367b1ea2e432355d76af8f19e8fca7398)) - **RESTJSONErrorCodes:** add error 30046 ([#304](https://github.com/discordjs/discord-api-types/issues/304)) ([56d3975](https://github.com/discordjs/discord-api-types/commit/56d39756c0d973ec56fe6e1eeb75d827f50aac81)) - **RESTJSONErrorCodes:** add error 40004 ([#314](https://github.com/discordjs/discord-api-types/issues/314)) ([269a75c](https://github.com/discordjs/discord-api-types/commit/269a75ccf7b413bfc031849713e919ebb8d87a1a)) - **RESTJSONErrorCodes:** add error 50068 ([#302](https://github.com/discordjs/discord-api-types/issues/302)) ([7655e20](https://github.com/discordjs/discord-api-types/commit/7655e2024800abc4431011668b83373e0868485e)) - **RESTJSONErrorCodes:** add error code 50086 ([#286](https://github.com/discordjs/discord-api-types/issues/286)) ([51fb37c](https://github.com/discordjs/discord-api-types/commit/51fb37cbba44677870f0f916bd1416bdbd34e052)) - **RESTPatchAPIGuildMember:** add `communication_disabled_until` field ([#289](https://github.com/discordjs/discord-api-types/issues/289)) ([5056b0f](https://github.com/discordjs/discord-api-types/commit/5056b0f2b3798480dbbc193fd80dedfefedff4fc)) - **RESTPatchAPIGuildMember:** add modify current member and deprecate nick route ([#262](https://github.com/discordjs/discord-api-types/issues/262)) ([9a982ff](https://github.com/discordjs/discord-api-types/commit/9a982ff8d9592a02d78f24295efd756dc0c69fa8)) - **RouteBases:** add base for guild scheduled events ([#293](https://github.com/discordjs/discord-api-types/issues/293)) ([83f29b6](https://github.com/discordjs/discord-api-types/commit/83f29b692839cc51869bcafdaf387b68731e0a28)) - **UserFlags:** add `Spammer` flag ([#294](https://github.com/discordjs/discord-api-types/issues/294)) ([03f12d7](https://github.com/discordjs/discord-api-types/commit/03f12d71eef2661ee5290152952ea1adc9a92383)) ### types - Add tagged `type` unions for channel types ([#200](https://github.com/discordjs/discord-api-types/issues/200)) ([2c1fbda](https://github.com/discordjs/discord-api-types/commit/2c1fbda621fc1c1ea227295c578e6d8486dbc4f2)) ### BREAKING CHANGES - **Interactions:** `APIBaseMessageComponent` was renamed to `APIBaseComponent` - **UserFlags:** The `None` user flag is bye-bye (although I doubt anyone is using it) - All of the channel types are now split based on their type. As such, you will need to assert the type (either by checking it with the enum or by casting the data as the correct channel) before accessing data. _If you encounter any missing properties due to this, please open an issue! This is a big change, and we hope nothing is missing_ - **ActivityType:** `Game` was renamed to `Playing` ## [0.26.1](https://github.com/discordjs/discord-api-types/compare/0.26.0...0.26.1) (2022-01-02) ### Bug Fixes - **APIApplicationCommandOption:** correct type for integer and number ([#284](https://github.com/discordjs/discord-api-types/issues/284)) ([fe1f531](https://github.com/discordjs/discord-api-types/commit/fe1f5313a8fc13d0a2433738cce9be37f5d9eeb5)) ### Features - **APIAuditLogChangeData:** Add `communication_disabled_until` ([#281](https://github.com/discordjs/discord-api-types/issues/281)) ([0cf51ab](https://github.com/discordjs/discord-api-types/commit/0cf51abc267bd6246a7952e7f6a23fa8c5db290a)) - **APIGuildScheduledEvent:** add more precise types for stage instance/voice/external events ([#278](https://github.com/discordjs/discord-api-types/issues/278)) ([751aee6](https://github.com/discordjs/discord-api-types/commit/751aee6fa7d4c542324a30e9b9bc641b0e7a8bf4)) - **ApplicationFlags:** add embedded application flags ([#277](https://github.com/discordjs/discord-api-types/issues/277)) ([9f4f59c](https://github.com/discordjs/discord-api-types/commit/9f4f59c8e55f78caf614e27e28b6bca939665ca5)) # [0.26.0](https://github.com/discordjs/discord-api-types/compare/0.25.2...0.26.0) (2021-12-24) ### Bug Fixes - **APIInvite:** channel can be null ([#182](https://github.com/discordjs/discord-api-types/issues/182)) ([c67d426](https://github.com/discordjs/discord-api-types/commit/c67d426e3d3634eb0756f07029b9176cfc5873ce)) - **GatewayStageInstance:** Stage Instance dispatches not included in `GatewayDispatchPayload` ([#267](https://github.com/discordjs/discord-api-types/issues/267)) ([46db72d](https://github.com/discordjs/discord-api-types/commit/46db72da2fd14a51047b4e66e934738785e72d96)) - **NonDispatchPayload:** `t` & `s` fields are always null on non-dispatch payloads ([#259](https://github.com/discordjs/discord-api-types/issues/259)) ([315ce35](https://github.com/discordjs/discord-api-types/commit/315ce3584917635b93a26123470f37a10bd8d846)) - only a partial object is needed when updating attachments ([#263](https://github.com/discordjs/discord-api-types/issues/263)) ([7ab780b](https://github.com/discordjs/discord-api-types/commit/7ab780b3aefb3c8c34a8114db3ace6c4e6ae3206)) - **StickerPack:** Optional `banner_asset_id` ([#270](https://github.com/discordjs/discord-api-types/issues/270)) ([7eee39d](https://github.com/discordjs/discord-api-types/commit/7eee39d86c0d40857d0bf6fc0d4d1e31cda1895c)) ### Features - Add API error code `50055` ([#256](https://github.com/discordjs/discord-api-types/issues/256)) ([b01716b](https://github.com/discordjs/discord-api-types/commit/b01716bf22fba617c0a09084ff607127366432b6)) - Add API error code 50109 ([#268](https://github.com/discordjs/discord-api-types/issues/268)) ([bfc5e46](https://github.com/discordjs/discord-api-types/commit/bfc5e46f5374289997219c35aa0b992dfaa4ec40)) - add support for user guild member read oauth2 scope and route ([#254](https://github.com/discordjs/discord-api-types/issues/254)) ([e9d02a1](https://github.com/discordjs/discord-api-types/commit/e9d02a19fc3b4fad2f488b0db3b63d6301878730)) - **APIAuditLog:** add `guild_scheduled_events` prop ([#251](https://github.com/discordjs/discord-api-types/issues/251)) ([c7efcd5](https://github.com/discordjs/discord-api-types/commit/c7efcd55059673ab9fc8e6ef9711050700274057)) - **APIGuildMember:** add guild timeouts ([#235](https://github.com/discordjs/discord-api-types/issues/235)) ([0bbc972](https://github.com/discordjs/discord-api-types/commit/0bbc9721f6e18eb559c40e207f60218e7862d4ea)) - **GatewayThreadMemberUpdateDispatchData:** add `guild_id` extra field ([#266](https://github.com/discordjs/discord-api-types/issues/266)) ([2c72242](https://github.com/discordjs/discord-api-types/commit/2c72242a03bd5adfd0fc145bf5645d1bad59254e)) - **RESTJSONErrorCodes:** add error 20029 ([#257](https://github.com/discordjs/discord-api-types/issues/257)) ([9e619fc](https://github.com/discordjs/discord-api-types/commit/9e619fc460337d53c85fc3977c89489c14bd8254)) - bring in support for TS 4.5's `exactOptionalPropertyTypes` ([#275](https://github.com/discordjs/discord-api-types/issues/275)) ([c20e5ae](https://github.com/discordjs/discord-api-types/commit/c20e5ae2a9edcca529e233a4deb634bc760076d2)) ### Cleanups - Make application command option union easier to use ([#250](https://github.com/discordjs/discord-api-types/issues/250)) ([8bbb819](https://github.com/discordjs/discord-api-types/commit/8bbb81942b3f87e46273bb75a12e2db4ef7ee797)) - **ChatInputCommandOptions:** cleanup chat input options ([#274](https://github.com/discordjs/discord-api-types/issues/274)) ([7fe78ce](https://github.com/discordjs/discord-api-types/commit/7fe78cec25a07dcd5d7ba2af3a5d773620c2d3cf)) ### BREAKING CHANGES - **StickerPack:** `banner_asset_id` is now optional. Reference PR: https://github.com/discord/discord-api-docs/pull/4245 - **APIInvite:** this marks the channel property of invites as possibly null - **ChatInputCommandOptions:** A lot of the options were renamed and split up to clean up internal code. All option interfaces that ended in a plural (`*Options`) have had their pluralization removed (`*Option` now). `APIApplicationCommandInteractionDataOptionWithValues` has been renamed to `APIApplicationCommandInteractionDataBasicOption`, and every `*InteractionDataOptions{Type}` interfaces have been renamed to `*InteractionData{Type}Option` (i.e.: `ApplicationCommandInteractionDataOptionString` -> `APIApplicationCommandInteractionDataStringOption`). ## [0.25.2](https://github.com/discordjs/discord-api-types/compare/0.25.1...0.25.2) (2021-11-30) ### Bug Fixes - **APISelectMenuComponent:** `options` property is required ([#248](https://github.com/discordjs/discord-api-types/issues/248)) ([51dee6e](https://github.com/discordjs/discord-api-types/commit/51dee6e0e5bb4d749b9f0436e7ec9d4793e56567)) ### Features - **Guild:** boost progress bars ([#227](https://github.com/discordjs/discord-api-types/issues/227)) ([47382b6](https://github.com/discordjs/discord-api-types/commit/47382b6183a1d232053fef23691d423f8af88f88)) ## [0.25.1](https://github.com/discordjs/discord-api-types/compare/0.25.0...0.25.1) (2021-11-30) ### Bug Fixes - **deno:** faulty import paths for guild scheduled events ([#245](https://github.com/discordjs/discord-api-types/issues/245)) ([44c0f05](https://github.com/discordjs/discord-api-types/commit/44c0f05cb2fc2b9ea50745530ae94a669a839594)) # [0.25.0](https://github.com/discordjs/discord-api-types/compare/0.24.0...0.25.0) (2021-11-29) ### Bug Fixes - **APIApplicationCommandOption:** remove `default` property ([#242](https://github.com/discordjs/discord-api-types/issues/242)) ([faa8bf4](https://github.com/discordjs/discord-api-types/commit/faa8bf494bc79b844ce73e1892461e8440dc7abc)) - correct types for autocomplete interaction data ([#234](https://github.com/discordjs/discord-api-types/issues/234)) ([691abb5](https://github.com/discordjs/discord-api-types/commit/691abb581fb17093b5fa139f3ff53cbc0ad0b2a1)) - correct types for REST attachments ([#238](https://github.com/discordjs/discord-api-types/issues/238)) ([fa54b9d](https://github.com/discordjs/discord-api-types/commit/fa54b9de5522b9fa9d5367650950f8b0e44f6e14)) - make subcommand options optional ([#241](https://github.com/discordjs/discord-api-types/issues/241)) ([7379a34](https://github.com/discordjs/discord-api-types/commit/7379a345e820703a59a2d754c8ee7c0f0c710e09)) ### Code Refactoring - **UserFlags:** update flag names ([#229](https://github.com/discordjs/discord-api-types/issues/229)) ([f2d62e3](https://github.com/discordjs/discord-api-types/commit/f2d62e3cdf6128357f65e946fe1926cf915a6395)) ### Features - add guild scheduled event ([#186](https://github.com/discordjs/discord-api-types/issues/186)) ([d333962](https://github.com/discordjs/discord-api-types/commit/d333962715a58bd5ac14ad80e900b43b02777794)) - **RESTPostAPIChannelThreadsJSONBody:** add `rate_limit_per_user` ([#237](https://github.com/discordjs/discord-api-types/issues/237)) ([1e52e0c](https://github.com/discordjs/discord-api-types/commit/1e52e0ceab31465c7bbd820e332ef219ad715916)) - add max/min option for number-based options ([#221](https://github.com/discordjs/discord-api-types/issues/221)) ([bc1d03e](https://github.com/discordjs/discord-api-types/commit/bc1d03e527b9d37fac6d76cfbb51f4eeb8238e7b)) - add maze api error ([#228](https://github.com/discordjs/discord-api-types/issues/228)) ([7a15c97](https://github.com/discordjs/discord-api-types/commit/7a15c9786333fb6f2259f42536cfbf2cf0e43db8)) - **ActivityFlags:** add new flags ([#207](https://github.com/discordjs/discord-api-types/issues/207)) ([0f51d8e](https://github.com/discordjs/discord-api-types/commit/0f51d8e83f8aa53efde5c01849aaf09b91d15cbd)) - **ApplicationFlags:** add message content intent flags ([#226](https://github.com/discordjs/discord-api-types/issues/226)) ([d189e36](https://github.com/discordjs/discord-api-types/commit/d189e36c49cd230f98798ff57b668a6fe56df11b)) - **Attachments:** multi uploads and alt text ([#223](https://github.com/discordjs/discord-api-types/issues/223)) ([fdf133e](https://github.com/discordjs/discord-api-types/commit/fdf133ef45d3871defb46e47079c2acdd65e69d7)) - **GuildSystemChannelFlags:** add suppress member join sticker replies flag ([#222](https://github.com/discordjs/discord-api-types/issues/222)) ([4021dae](https://github.com/discordjs/discord-api-types/commit/4021dae44b331198d164a7c93dbc1242184efdf7)) - **Interactions:** add autocomplete api types ([#205](https://github.com/discordjs/discord-api-types/issues/205)) ([3b9320d](https://github.com/discordjs/discord-api-types/commit/3b9320dbf2cbbae7db44f00e8deaf336ab052e8b)) - **UserFlags:** add `BOT_HTTP_INTERACTIONS` flag ([#212](https://github.com/discordjs/discord-api-types/issues/212)) ([a015f96](https://github.com/discordjs/discord-api-types/commit/a015f96fcb4a74866f884db87732876095788111)) ### BREAKING CHANGES - **UserFlags:** All user flags now follow the internal name, with descriptions added for what they represent. This means you'll have to do some minor renaming in your code if you check for flags. - **APIApplicationCommandOption:** If you were using the `default` property for ApplicationCommandOptions, it has been removed, as Discord wasn't even taking it into account anymore. - The types for autocomplete interactions have been corrected. # [0.24.0](https://github.com/discordjs/discord-api-types/compare/0.23.1...0.24.0) (2021-10-16) ### Bug Fixes - **APISelectMenuComponent:** make options field optional ([#209](https://github.com/discordjs/discord-api-types/issues/209)) ([0c592a0](https://github.com/discordjs/discord-api-types/commit/0c592a0950431f43143bf1c32589bce2dd842b44)) ### Code Refactoring - **APIVoiceRegion:** removed `vip` property ([#214](https://github.com/discordjs/discord-api-types/issues/214)) ([7db6953](https://github.com/discordjs/discord-api-types/commit/7db69531d86fe5bdd462747b1e1287ee6b2dc496)) ### Features - **APIApplicationCommand:** add `channel_types` field to channel options ([#198](https://github.com/discordjs/discord-api-types/issues/198)) ([77396b5](https://github.com/discordjs/discord-api-types/commit/77396b557c6f3d4f85cfc4cd3b253638bc5b449d)) - **APIAttachment:** add ephemeral field ([#199](https://github.com/discordjs/discord-api-types/issues/199)) ([2aee879](https://github.com/discordjs/discord-api-types/commit/2aee87960070cb56979d3ced453c8cd64e81f150)) - **APIGuildMember:** add per guild avatars ([#208](https://github.com/discordjs/discord-api-types/issues/208)) ([0331518](https://github.com/discordjs/discord-api-types/commit/0331518c49c4761f900bacd8ca8a92e38b36b6e9)) - **APIRole:** add role icons ([#204](https://github.com/discordjs/discord-api-types/issues/204)) ([1076822](https://github.com/discordjs/discord-api-types/commit/1076822b90a1b6facf74aa3f2a6750566b3feb53)) - **InteractionResolvedChannels:** add `parent_id` and `thread_metadata` fields to resolved channels ([#210](https://github.com/discordjs/discord-api-types/issues/210)) ([64e4e52](https://github.com/discordjs/discord-api-types/commit/64e4e5246cd61eadf35591b8afdf4c5922fd4086)) - **PermissionFlagBits:** update thread permissions ([#181](https://github.com/discordjs/discord-api-types/issues/181)) ([68d97ae](https://github.com/discordjs/discord-api-types/commit/68d97aed1425002677acdf1d5444b36d3cfcc322)) - **PermissionFlagsBits:** add `StartEmbeddedActivities` ([#197](https://github.com/discordjs/discord-api-types/issues/197)) ([4bbe1ea](https://github.com/discordjs/discord-api-types/commit/4bbe1eaa867da810a1d039b21c3fc78208a50801)) - **RESTJSONErrorCodes:** add error 50101 ([#202](https://github.com/discordjs/discord-api-types/issues/202)) ([b453d75](https://github.com/discordjs/discord-api-types/commit/b453d75e4d13d34836247929be56c042cbc4b762)) - **Routes:** add missing OAuth2 routes ([#218](https://github.com/discordjs/discord-api-types/issues/218)) ([9dd3446](https://github.com/discordjs/discord-api-types/commit/9dd3446b64f31ae0831944f5c608095d650142d7)) ### BREAKING CHANGES - **APIVoiceRegion:** The `vip` property has been removed. ## [0.23.1](https://github.com/discordjs/discord-api-types/compare/0.23.0...0.23.1) (2021-09-08) ### Bug Fixes - **RESTPostAPIBaseApplicationCommandsJSONBody:** omit `version` field ([#195](https://github.com/discordjs/discord-api-types/issues/195)) ([43cc755](https://github.com/discordjs/discord-api-types/commit/43cc755e3390437d11f7733477a2c86afd6daf23)) # [0.23.0](https://github.com/discordjs/discord-api-types/compare/0.22.0...0.23.0) (2021-09-07) ### Bug Fixes - **AuditLog:** correct `nickname` type ([#189](https://github.com/discordjs/discord-api-types/issues/189)) ([64937e2](https://github.com/discordjs/discord-api-types/commit/64937e2311bf5e688f6789d9e66827e980e4e01c)) - **Embed:** correct certain optional types as being required ([#192](https://github.com/discordjs/discord-api-types/issues/192)) ([e628f0f](https://github.com/discordjs/discord-api-types/commit/e628f0f6f089a0840b9d69bea930dd3ad7fa7462)) - import causing error 404 on deno ([#178](https://github.com/discordjs/discord-api-types/issues/178)) ([8fcd0f2](https://github.com/discordjs/discord-api-types/commit/8fcd0f2222a77a1a0b19888d699e98d450268cc8)) ### chore - **Gateway:** remove `APPLICATION_COMMAND_*` events ([#191](https://github.com/discordjs/discord-api-types/issues/191)) ([d590caf](https://github.com/discordjs/discord-api-types/commit/d590caf359b61aa77780385437929f443cbf4a26)) ### Features - **APIApplicationCommand:** add `version` field ([#193](https://github.com/discordjs/discord-api-types/issues/193)) ([ecbed18](https://github.com/discordjs/discord-api-types/commit/ecbed180424c0975c52208f0f803b08f105df04a)) - **APIUser:** add `banner` and `accent_color` ([#183](https://github.com/discordjs/discord-api-types/issues/183)) ([b07b903](https://github.com/discordjs/discord-api-types/commit/b07b9030c134fdaf53f500d319c88067c1a8a175)) - **Interactions:** context menu items ([#166](https://github.com/discordjs/discord-api-types/issues/166)) ([fdc1c1a](https://github.com/discordjs/discord-api-types/commit/fdc1c1a5b411d8ef3d635ad90bd97c2b1bf77cf1)) - **JSONErrorCodes:** add `160002` ([#190](https://github.com/discordjs/discord-api-types/issues/190)) ([8b49887](https://github.com/discordjs/discord-api-types/commit/8b49887c7f732fe88cadb1e6ca17e0dc12db25f9)) - **MessageType:** add ContextMenuCommand and rename ApplicationCommand to ChatInputCommand ([#180](https://github.com/discordjs/discord-api-types/issues/180)) ([0024823](https://github.com/discordjs/discord-api-types/commit/0024823d053c15491011eb6d11c314e299689ba5)) - **Threads:** add `invitable` ([#185](https://github.com/discordjs/discord-api-types/issues/185)) ([b6babf2](https://github.com/discordjs/discord-api-types/commit/b6babf2ee2c66817ac99752d14feed2d574ecb14)) ### BREAKING CHANGES - **Gateway:** The three Application Command events have been removed - **Embed:** - `APIEmbedAuthor#name` is required, not optional - `APIEmbedThumbnail#url` is required, not optional - `APIEmbedImage#url` is required, not optional # [0.22.0](https://github.com/discordjs/discord-api-types/compare/0.21.0...0.22.0) (2021-07-31) ### Bug Fixes - **Gateway:** thread list sync now sends an array as documented ([#174](https://github.com/discordjs/discord-api-types/issues/174)) ([a93235c](https://github.com/discordjs/discord-api-types/commit/a93235c9df2bc36a337c03e8ba08986e6e377483)) - **MessageComponent:** correct type for emoji ([#176](https://github.com/discordjs/discord-api-types/issues/176)) ([b75b05f](https://github.com/discordjs/discord-api-types/commit/b75b05f0d50014335fefc8bb8969d519ed0076d3)) ### chore - **ApplicationCommandOptionType:** casing changes for subcommands ([#175](https://github.com/discordjs/discord-api-types/issues/175)) ([f93b6be](https://github.com/discordjs/discord-api-types/commit/f93b6be2528c80f8dc038282a7d6ddb3c4685c2f)) ### Features - thread updates ([#167](https://github.com/discordjs/discord-api-types/issues/167)) ([47100bc](https://github.com/discordjs/discord-api-types/commit/47100bcf2c154146baecb359e1c00ecca9939ffa)) ### BREAKING CHANGES - **ApplicationCommandOptionType:** This renames `SubCommand` to `Subcommand`, and `SubCommandGroup` to `SubcommandGroup` - `Routes#channelJoinedArchivedThreads` is now spelled right (from `Routes#channelJoinedArhivedThreads`) - **Gateway:** `GatewayThreadListSync#members` is now an array of APIThreadMember instead of a Record of GatewayThreadListSyncMember # [0.21.0](https://github.com/discordjs/discord-api-types/compare/0.20.1...0.21.0) (2021-07-30) ### Bug Fixes - change resolved index types to string ([#169](https://github.com/discordjs/discord-api-types/issues/169)) ([d338409](https://github.com/discordjs/discord-api-types/commit/d338409410854cc1f97f9903fdc2565e1f45e778)) - export APIPingInteraction ([#168](https://github.com/discordjs/discord-api-types/issues/168)) ([ef2a0ae](https://github.com/discordjs/discord-api-types/commit/ef2a0aeb07cdd04b47e6cb0d40dd8a1b2a77b491)) - **APIInteraction:** bring back Ping type ([#164](https://github.com/discordjs/discord-api-types/issues/164)) ([ff75eb3](https://github.com/discordjs/discord-api-types/commit/ff75eb3f5dfd7597968c26133d125cfe40ee5838)) ### Features - **ApplicationCommandOptionType:** add Number (10) ([#153](https://github.com/discordjs/discord-api-types/issues/153)) ([6f15e53](https://github.com/discordjs/discord-api-types/commit/6f15e537dfee5bda383572cd725c05246c97ca62)) - **Globals:** revert template bigint type to string type ([#171](https://github.com/discordjs/discord-api-types/issues/171)) ([f299507](https://github.com/discordjs/discord-api-types/commit/f2995073e033b050ab459c42b480e626f3f6ae8e)) ### Reverts - fix: change resolved index types to string ([#172](https://github.com/discordjs/discord-api-types/issues/172)) ([647905e](https://github.com/discordjs/discord-api-types/commit/647905e16bfeb689e644695657ac5f05920c0c4c)) ### BREAKING CHANGES - **Globals:** The type for Snowflake and Permissions is reverted from the `${bigint}` template type back to a normal string type ## [0.20.2](https://github.com/discordjs/discord-api-types/compare/0.21.0...0.20.2) (2021-07-21) ### Bug Fixes - **APIInteraction:** bring back Ping type ([#164](https://github.com/discordjs/discord-api-types/issues/164)) ([ff75eb3](https://github.com/discordjs/discord-api-types/commit/ff75eb3f5dfd7597968c26133d125cfe40ee5838)) ## [0.20.1](https://github.com/discordjs/discord-api-types/compare/0.20.0...0.20.1) (2021-07-20) ### Features - **Interactions:** add interaction response and followup route ([#162](https://github.com/discordjs/discord-api-types/issues/162)) ([f99f07f](https://github.com/discordjs/discord-api-types/commit/f99f07f72e95a9537a955eb942b52e345c1067d6)) # [0.20.0](https://github.com/discordjs/discord-api-types/compare/0.19.0...0.20.0) (2021-07-20) ### chore - Add more missing stuff ([#160](https://github.com/discordjs/discord-api-types/issues/160)) ([d009554](https://github.com/discordjs/discord-api-types/commit/d009554caed6c738c4a801f00806ab7cc4ac7e16)) ### Code Refactoring - change `xID` to `xId` ([#159](https://github.com/discordjs/discord-api-types/issues/159)) ([323e531](https://github.com/discordjs/discord-api-types/commit/323e531a77aa75397ee1ce59f0db35b08b80b606)) - rename `isStyledButton` to `isInteractionButton` ([#158](https://github.com/discordjs/discord-api-types/issues/158)) ([634f64d](https://github.com/discordjs/discord-api-types/commit/634f64d4ce143bd0a6b9ccf0ffb1241c21550958)) ### Features - **PermissionFlagsBits:** add `UseExternalStickers` (1n << 37n) ([#154](https://github.com/discordjs/discord-api-types/issues/154)) ([5dccc6b](https://github.com/discordjs/discord-api-types/commit/5dccc6b2a3711e14d499ee9a2122403a80da99fe)) - **RESTJSONErrorCodes:** add sticker errors ([#155](https://github.com/discordjs/discord-api-types/issues/155)) ([8dbeca0](https://github.com/discordjs/discord-api-types/commit/8dbeca0fc91cafef59eb8ee30bcfee9ab14a422c)) ### BREAKING CHANGES - `GatewayGuildMemberUpdateDispatchData#joined_at` is properly marked as nullable now - In v9, `thread_id` was incorrectly placed in `RESTPostAPIWebhookWithTokenJSONBody` and has been moved to `RESTPostAPIWebhookWithTokenQuery` - All types that contained the `ID` word in them have had it renamed to `Id` (ex: `APIButtonComponentWithCustomID` is now `APIButtonComponentWithCustomId`) - The `isStyledButton` util has been renamed to `isInteractionButton` # [0.19.0](https://github.com/discordjs/discord-api-types/compare/0.18.1...0.19.0) (2021-07-19) ### Bug Fixes - **FormattingPatterns:** fix StyledTimestamp ([#147](https://github.com/discordjs/discord-api-types/issues/147)) ([dd12c6a](https://github.com/discordjs/discord-api-types/commit/dd12c6ac9902d1b300a167f0acd9fba5192aaa91)) - **RESTOAuth2:** correct casing of `OAuth` ([#134](https://github.com/discordjs/discord-api-types/issues/134)) ([f0b2766](https://github.com/discordjs/discord-api-types/commit/f0b2766d5b55bd9b8b8ba9c506a868dafcdca568)) - **RESTPostAPIWebhookWithTokenJSONBody:** add missing components ([#152](https://github.com/discordjs/discord-api-types/issues/152)) ([ca933ae](https://github.com/discordjs/discord-api-types/commit/ca933ae84d54456f0a443e5e8bd10b7613271f62)) - fix autopublish CD ([#140](https://github.com/discordjs/discord-api-types/issues/140)) ([8627c9d](https://github.com/discordjs/discord-api-types/commit/8627c9d2195aaa0a97de2fdf9f64ba0c0ff6db02)) ### chore - Get up to date _again_ ([#156](https://github.com/discordjs/discord-api-types/issues/156)) ([86e0736](https://github.com/discordjs/discord-api-types/commit/86e0736726fb4ef13736510fa6d69f20383d5ea5)) - **RESTErrorCodes:** correct casing for OAuth ([ca6612e](https://github.com/discordjs/discord-api-types/commit/ca6612e0a4f313731009a37a81c3a0834e6a0cd8)) ### Code Refactoring - **Enums:** make property casing consistent ([#131](https://github.com/discordjs/discord-api-types/issues/131)) ([aa5e26d](https://github.com/discordjs/discord-api-types/commit/aa5e26d92b587bf9b4fc33e038a6d3c8586597c2)) ### Features - **Stickers:** sticker packs, sticker routes, and guild stickers ([#145](https://github.com/discordjs/discord-api-types/issues/145)) ([4a83629](https://github.com/discordjs/discord-api-types/commit/4a836293d5224a6cad19c50bc074a9ef9b0f0af4)) - add stage instance related typings to audit logs ([#151](https://github.com/discordjs/discord-api-types/issues/151)) ([836e8fb](https://github.com/discordjs/discord-api-types/commit/836e8fb29491f8df72c0caf2eb5c05ed2bda3191)) - **APIGuild:** add `nsfw_level` ([#149](https://github.com/discordjs/discord-api-types/issues/149)) ([5256ac7](https://github.com/discordjs/discord-api-types/commit/5256ac7f97d35200f1676721a80ad0f57d05cab7)) - **Channel:** add embeds to post / patch ([#143](https://github.com/discordjs/discord-api-types/issues/143)) ([13d483e](https://github.com/discordjs/discord-api-types/commit/13d483ef2e53373438e8b03fed681232626b2670)) - **FormattingPatterns:** add timestamp ([#146](https://github.com/discordjs/discord-api-types/issues/146)) ([16eae7e](https://github.com/discordjs/discord-api-types/commit/16eae7eafe9ef6001f664a30c0f78d6982d2e54c)) - **RESTErrors:** add types for rest errors ([#122](https://github.com/discordjs/discord-api-types/issues/122)) ([7b47fc9](https://github.com/discordjs/discord-api-types/commit/7b47fc96809aed2b28e15064f308651b08a5b74d)) - **Threads:** add typed thread creation ([#148](https://github.com/discordjs/discord-api-types/issues/148)) ([f393ba5](https://github.com/discordjs/discord-api-types/commit/f393ba520d7d6d2aacaca7b3ca5d355fab614f6e)) - add typings for stage instance ([#144](https://github.com/discordjs/discord-api-types/issues/144)) ([e36ef9e](https://github.com/discordjs/discord-api-types/commit/e36ef9e1d225d8e8c849c3198e628202eedbd20b)) - **Interactions:** components and component interactions ([#132](https://github.com/discordjs/discord-api-types/issues/132)) ([036bb03](https://github.com/discordjs/discord-api-types/commit/036bb035c9d6ddf780bab5af4884861d08f04d24)) - **Threads:** add default auto archive and minor tweaks ([#142](https://github.com/discordjs/discord-api-types/issues/142)) ([d2b6276](https://github.com/discordjs/discord-api-types/commit/d2b62761194064b38e38045a72ee8b38c920ada6)) - api v9 and threads ([#133](https://github.com/discordjs/discord-api-types/issues/133)) ([d1498c3](https://github.com/discordjs/discord-api-types/commit/d1498c3ce2eaea11c9946726ef758f7de489253b)) ### BREAKING CHANGES - `APISelectOption` has been renamed to `APISelectMenuOption` - APISelectMenuOption#default is now properly marked as optional - Updated OAuth2 Application types - `APIApplication#owner` is now marked as optional, per the docs - Correct APIAuditLogChangeKeyNick's key - This renames APIAuditLogChangeKeyNick's key from `mute` to `nick` - Add `application_id` to APIMessage - Correct type of `id` and `user_id` in APIThreadMember - The type of `id` and `user_id` in APIThreadMember are now marked as optional; read the TSDoc for when it's actually optional - Correctly version API route in RouteBases - This changes the `RouteBases.api` to be versioned based on the API version you're importing. **Make sure to update your code to handle that** - Added new guild features ref: https://github.com/discordjs/discord-api-types/pull/156/commits/4d36e533cffecbcce13e968a7803e5a68e021106 - Cleaned up interaction types - While this shouldn't be necessary, this is a warning that types for interactions HAVE changed and you may need to update your code. For the most part, the types _should_ be the same, more accurate and strictly typed. You will also see that every type of interaction has a Guild/DM counterpart exported (ex: APIApplicationCommandGuildInteraction vs APIApplicationCommandInteraction, where the former has all the guild properties, while the latter has all properties that depend on context marked as optional). - Add message property to MessageComponent interactions - **RESTErrorCodes:** This properly capitalizes certain error codes with the right OAuth capitalization - **RESTOAuth2:** `RESTGetAPIOauth2CurrentApplicationResult` and `RESTGetAPIOauth2CurrentAuthorizationResult` have been renamed to `RESTGetAPIOAuth2CurrentApplicationResult ` and `RESTGetAPIOAuth2CurrentAuthorizationResult`, to correct the casing of `OAuth` - **Enums:** Enum keys have been normalized, and they are all PascalCased now (for API v8 and above). API v6 did not receive these changes. ## [0.18.1](https://github.com/discordjs/discord-api-types/compare/0.18.0...0.18.1) (2021-05-03) ### Bug Fixes - **APIInvite:** `expires_at` is nullable ([#128](https://github.com/discordjs/discord-api-types/issues/128)) ([44b956a](https://github.com/discordjs/discord-api-types/commit/44b956ad858a457e7671ced38529b433b02efbde)) ### Features - add new interfaces for interaction-related structures ([#129](https://github.com/discordjs/discord-api-types/issues/129)) ([bd638b9](https://github.com/discordjs/discord-api-types/commit/bd638b97e5d26abd8a4f1edbd0f56ddc7d3a30a0)) - **APIInvite:** add `expires_at` field and `with_expiration` param ([#127](https://github.com/discordjs/discord-api-types/issues/127)) ([82ca0ce](https://github.com/discordjs/discord-api-types/commit/82ca0ce5c44ad2e93b3c4875baa82720ea8dd221)) - **ApplicationCommandOptionType:** add `MENTIONABLE` (9) ([#126](https://github.com/discordjs/discord-api-types/issues/126)) ([91afb0b](https://github.com/discordjs/discord-api-types/commit/91afb0bb49015c02b6000c27d07e703011dc540d)) # [0.18.0](https://github.com/discordjs/discord-api-types/compare/0.16.0...0.18.0) (2021-04-18) ### Bug Fixes - **APIInvite:** `channel` is not optional ([#123](https://github.com/discordjs/discord-api-types/issues/123)) ([abe0513](https://github.com/discordjs/discord-api-types/commit/abe05136fd169f483fe09a213259b4cbd526497b)) ### Code Refactoring - **Invite:** rename `InviteTargetUserType` to `InviteTargetType` ([#124](https://github.com/discordjs/discord-api-types/issues/124)) ([bc9ab45](https://github.com/discordjs/discord-api-types/commit/bc9ab4556ca8a7c8e4c7942c87fa322c91b733dc)) ### BREAKING CHANGES - **Invite:** `InviteTargetUserType` is renamed to `InviteTargetType`, to match the documentation. - Reference: https://github.com/discord/discord-api-docs/pull/2690 # [0.17.0](https://github.com/discordjs/discord-api-types/compare/0.16.0...0.17.0) (2021-04-17) ### Bug Fixes - **APIChannel:** `rtc_region` is optional ([#118](https://github.com/discordjs/discord-api-types/issues/118)) ([617f507](https://github.com/discordjs/discord-api-types/commit/617f507427fae6456de228a23809ab04c1df13f6)) ### Code Refactoring - **APISticker:** remove `preview_asset` ([#119](https://github.com/discordjs/discord-api-types/issues/119)) ([9817623](https://github.com/discordjs/discord-api-types/commit/9817623291ec852a831c3de225e90a65d83dac7f)) ### Features - **WebhookMessage:** add `GET` route types ([#120](https://github.com/discordjs/discord-api-types/issues/120)) ([3294fb1](https://github.com/discordjs/discord-api-types/commit/3294fb15ae6c259c1b53b7f2eca4ea8dca2f2372)) ### BREAKING CHANGES - **APISticker:** This removes the `preview_asset` property from sticket objects - Reference: https://github.com/discord/discord-api-docs/commit/b9b8db2 - **APIChannel:** This corrects the fact that `rtc_region` isn't present on non-voice-like channels # [0.16.0](https://github.com/discordjs/discord-api-types/compare/0.15.1...0.16.0) (2021-04-14) ### Features - **Guild:** add `nsfw` property ([#116](https://github.com/discordjs/discord-api-types/issues/116)) ([21b572b](https://github.com/discordjs/discord-api-types/commit/21b572b7f25a320e40f8ca2e63d6bd8b111403aa)) - **RESTJSONErrorCode:** add `UnknownInteraction` error code ([#115](https://github.com/discordjs/discord-api-types/issues/115)) ([ced37d0](https://github.com/discordjs/discord-api-types/commit/ced37d0a5ebdc80887662529922c57e2531e1e5b)) ### docs - **Routes:** add `GET` routes to `webhookMessages` ([#114](https://github.com/discordjs/discord-api-types/issues/114)) ([6451679](https://github.com/discordjs/discord-api-types/commit/6451679c9acb9d7fde593914452577669473841d)) ### BREAKING CHANGES - **Routes:** possibly a breaking change due to the fact that the messageID is now strictly typed as a Snowflake or `@me` - Reference: discord/discord-api-docs#2410 ## [0.15.1](https://github.com/discordjs/discord-api-types/compare/0.15.0...0.15.1) (2021-04-12) ### Bug Fixes - **TypeScript:** imports not working in TypeScript ([4738c33](https://github.com/discordjs/discord-api-types/commit/4738c33b062d359a1c2fbb35cdd2daf128ab6e5b)) # [0.15.0](https://github.com/discordjs/discord-api-types/compare/0.14.0...0.15.0) (2021-04-11) ### Bug Fixes - **APIApplicationCommand:** default_permission ([#111](https://github.com/discordjs/discord-api-types/issues/111)) ([9420c3e](https://github.com/discordjs/discord-api-types/commit/9420c3e0af7b2486f0e49bb680ed98e0d9f5c625)) - **Scripts:** `await` in `versions` script, log any errors from deno one ([9113eb1](https://github.com/discordjs/discord-api-types/commit/9113eb133c4627445e2bcd4583c243dde74a20ee)) ### BREAKING CHANGES - **APIApplicationCommand:** This renames the `default_permissions` property to `default_permission`, the correct spelling. # [0.14.0](https://github.com/discordjs/discord-api-types/compare/0.13.3...0.14.0) (2021-04-11) ### Bug Fixes - **APIMessage:** correct type for `application` ([ed2cbe8](https://github.com/discordjs/discord-api-types/commit/ed2cbe82c56f872ee01a9eb6991ef70dc22d8c1f)) - **GatewayGuildMemberUpdateDispatchData:** correct types ([14f14e2](https://github.com/discordjs/discord-api-types/commit/14f14e227955af41ed2823f11c6e8d03d12549ba)) - **GatewayPresenceUpdateData:** `activities` may not be `null` ([bb3cb04](https://github.com/discordjs/discord-api-types/commit/bb3cb04e016840f66eecbe39c2e07aea8ea12bc8)) - **GatewayVoiceServerUpdateDispatchData:** `endpoint` is nullable ([e8203a1](https://github.com/discordjs/discord-api-types/commit/e8203a1112a834ce9aaae4ab95f711d3aaffc20f)) - **GuildWelcomeScreenChannel:** document missing `description` property ([238695b](https://github.com/discordjs/discord-api-types/commit/238695b44d8547d51782e3d9d9729e2db85bc444)) - **OAuth2:** `scope` can be optional / not required ([bbe56a9](https://github.com/discordjs/discord-api-types/commit/bbe56a97564ce8c317f291080327484f0d987e1c)) - **OAuth2:** remove invalid parameters from refresh token request ([1c02450](https://github.com/discordjs/discord-api-types/commit/1c024507f3f55b922565845c2bedac615ffa24d5)) - **RPC:** version `RPC` same as` rest`, export again in `shortcuts` ([67e0ba1](https://github.com/discordjs/discord-api-types/commit/67e0ba1834e6d9de9ad00bd452f5e8da59ff1cc6)) - **Utils:** correct import for deno users ([42dd75f](https://github.com/discordjs/discord-api-types/commit/42dd75f2581b2a8862e4f0446b42ff838f923de0)) ### chore - **Gateway:** remove `guild_subscriptions` ([ab8b289](https://github.com/discordjs/discord-api-types/commit/ab8b289ac8f99fe1a998ef06320ad9046aafa1d2)) - **GatewayReady:** un-document `private_channels` ([457edf4](https://github.com/discordjs/discord-api-types/commit/457edf4ed43327fb871d3b1638745b905518ef91)) - **Integrations:** remove routes that bots can no longer interact with ([577c5bd](https://github.com/discordjs/discord-api-types/commit/577c5bd040dd1dc258ca6c414cf6ac69ae84916c)) - **MessageGetReactions:** remove `before` pagination ([0ec26b7](https://github.com/discordjs/discord-api-types/commit/0ec26b731cda570f34e59e05a8c21f272b1fd64e)) - **Oauth2Scopes:** remove `rpc.api` ([7ee8511](https://github.com/discordjs/discord-api-types/commit/7ee85113ea8107106460889a2eaa42b251ee05d0)) - **Permissions:** rename `USE_APPLICATION_COMMANDS` to `USE_SLASH_COMMANDS` ([2aa7f7a](https://github.com/discordjs/discord-api-types/commit/2aa7f7a7b8da3d4d46a7743830562d996d32120b)) - **UserFlags:** un-document `SYSTEM` flag ([1774d4c](https://github.com/discordjs/discord-api-types/commit/1774d4c4749d303f24bfb3c754cf79a4ca7ef699)) ### Code Refactoring - restructure module ([81cdfc2](https://github.com/discordjs/discord-api-types/commit/81cdfc2d9c523d98edd0a69f976879e848e1167b)) ### Features - **APIApplication:** document `terms_of_service` and `privacy_policy` ([598cbfb](https://github.com/discordjs/discord-api-types/commit/598cbfb958a67d5ba61696ba877ea0bae4c4be55)) - **APIAttachment:** add `content_type` ([2d432d1](https://github.com/discordjs/discord-api-types/commit/2d432d145eb8a009b092b27b6231252d7b2f2823)) - **APIChannel:** add `rtc_region` ([#108](https://github.com/discordjs/discord-api-types/issues/108)) ([07ba907](https://github.com/discordjs/discord-api-types/commit/07ba9072429dec85a13479dc211ec1f9d8788acf)) - **APIChannel:** add `video_quality_mode` ([#106](https://github.com/discordjs/discord-api-types/issues/106)) ([d8d7bcc](https://github.com/discordjs/discord-api-types/commit/d8d7bccea617ad0d1150b9d2aed3b26ec1e4f99a)) - **APIInteraction:** add type-check utilities ([3307201](https://github.com/discordjs/discord-api-types/commit/33072011c2ea9ace8350dedc0cd1068660dc2ece)) - **Exports:** add `globals` to the exported sub-modules ([5d35f61](https://github.com/discordjs/discord-api-types/commit/5d35f61334480af983c4767373ef05e395da2e18)) - **Gateway:** add `INTEGRATION_*` events ([9c3fab0](https://github.com/discordjs/discord-api-types/commit/9c3fab052619609eb543ff400c2b813b69c6b99f)) - **GuildWelcomeScreen:** document `welcome-screen` endpoint ([169ecde](https://github.com/discordjs/discord-api-types/commit/169ecde47a6a911309630e952ab26b805ac87cf0)) - **Interactions:** add batch command create / update ([edfe70a](https://github.com/discordjs/discord-api-types/commit/edfe70a1eeec9be1104ec68a20d95e83512b3268)) - **Interactions:** add Slash Command Permissions ([f517f35](https://github.com/discordjs/discord-api-types/commit/f517f3596f458a2c2e4c4a26d5c13bbed4c4a71f)) - **Invites:** document `target_application` & correct property names ([97c8ab3](https://github.com/discordjs/discord-api-types/commit/97c8ab3f5165c6f161e9338e944cff8b296756d5)) - **MessageFlags:** `EPHEMERAL` desc and added `LOADING` ([#109](https://github.com/discordjs/discord-api-types/issues/109)) ([4462255](https://github.com/discordjs/discord-api-types/commit/4462255168af2ad66c9c7405500e80d3fa41de33)) - **PatchAPIWebhookMessage:** add `file` property ([fc2f3c5](https://github.com/discordjs/discord-api-types/commit/fc2f3c58cf5ea2a8c0a1a14a62a16f432b1776e2)) - **Webhook:** add & document `url` property ([77e5bb6](https://github.com/discordjs/discord-api-types/commit/77e5bb624d86e4bc8696c8dac4f513c27eb8aff1)) - invite reminder system message type and flag ([#105](https://github.com/discordjs/discord-api-types/issues/105)) ([b90714f](https://github.com/discordjs/discord-api-types/commit/b90714f677c67c009ddb6d00734ab8998c194350)) - stage channels! ([#107](https://github.com/discordjs/discord-api-types/issues/107)) ([6cd7542](https://github.com/discordjs/discord-api-types/commit/6cd75426c6d7da145b40a656e4c1a1d3d26bfb1f)) ### BREAKING CHANGES - **APIInteraction:** This commit removes the `guild_id` property from `APIDMInteraction` which allows type-checks to work with the `in` operator. Because of that, we also provide utility functions that help with those type checks. Use them in your code by importing the `Utils` object, or by directly importing them. Check the README for examples - **OAuth2:** This commit removes parameters that are not expected in the refresh token request body Reference: https://github.com/discord/discord-api-docs/commit/eaa12cbc8f96cf7cfe8c530f88e60582c24ca5dd - **GatewayReady:** This property has been deprecated for a while, and was returning an empty array for bot users. This commit removes it entirely Reference: https://github.com/discord/discord-api-docs/commit/f36156dbb641f5c4d4f4593f345bfd6e27fdee08 - **Permissions:** This commit brings consistency with the documentation, where the permission is documented as `USE_SLASH_COMMANDS`, whereas the client has it as `USE_APPLICATION_COMMANDS` internally Reference: https://github.com/discord/discord-api-docs/commit/c7d25885c5cd80a49b31609a40b70603b35f9dec - **MessageGetReactions:** This query parameter is not usable and was not respected by the API. Reference: https://github.com/discord/discord-api-docs/commit/f72b084773d4d3989fb19be4fb4d9cf276a1e6b3 - **OAuth2:** This removes the `scope` property from the authorization code flow, as it is not expected there. Reference: https://github.com/discord/discord-api-docs/commit/57965033ab4216a0bb853e85d6912531cd5a9981 - **Gateway:** This removes `guild_subscriptions`, as it has been deprecated in favor of `intents`. Reference: https://github.com/discord/discord-api-docs/commit/8de017436d37e56fab14cb8f68f0448a45ebc731 - **Oauth2Scopes:** This removes the `rpc.api` scope, as it has been removed from the documentation. Reference: https://github.com/discord/discord-api-docs/commit/2641d9808f676e7316483d152cdb37ed1168f968 - **APIMessage:** This removes the `APIMessageApplication` interface, as it has been removed from the documentation, being replaced with the OAuth2 application. Reference: https://github.com/discord/discord-api-docs/commit/ff0c831e424f1bc17dd3cde62da48d5c3d933e88 - **APIApplication:** This renames the `GatewayPresenceLimit` flag to `GatewayPresenceLimited`, for consistency with `GatewayGuildMembersLimited` and the documented name. Reference: https://github.com/discord/discord-api-docs/commit/39b254bed1cc396c475e508a3f2bf328815605c9 - **GatewayVoiceServerUpdateDispatchData:** Any code that expects `endpoint` to never be null needs to be updated, and the conditions specified in the documentation need to be respected regarding that. Reference: https://github.com/discord/discord-api-docs/commit/e887382fafd4c4417f7ba62963984f25bcb643f6 - **Invites:** This renames `target_user_type` to `target_type`, the actual value the API expects. Reference: https://github.com/discord/discord-api-docs/commit/1b4e363e324eb1f49a47e32cb0108fbe276c8e0e - **GatewayPresenceUpdateData:** Clearing `activities` is done by setting them to an empty array, not by setting them to `null`. Reference: https://github.com/discord/discord-api-docs/commit/5bf598b864fb89262fce07137f68ce6e7e583432 - **UserFlags:** This removes a flag that bots should not use, as Discord said this is an internal flag. Reference: https://github.com/discord/discord-api-docs/commit/9293f0d490ac6acf9d627e429e5a8131b303b528 - **Integrations:** This removes the 3 routes that bots can no longer access. Reference: https://github.com/discord/discord-api-docs/commit/efe4e5808b6826d40302e265a5ae9b5b65d92fe7 - **Exports:** Certain objects from this file have been moved to their appropriate spot (such as JSON Error Codes) - Files have been moved around in order to keep them organized. Exports might also be missing, so please report if that is the case. ## [0.13.3](https://github.com/discordjs/discord-api-types/compare/0.13.2...0.13.3) (2021-03-28) ## [0.13.2](https://github.com/discordjs/discord-api-types/compare/0.13.1...0.13.2) (2021-03-28) ### Bug Fixes - **ApplicationCommandInteractionDataOptionSubCommandGroup:** typo ([#102](https://github.com/discordjs/discord-api-types/issues/102)) ([15c171c](https://github.com/discordjs/discord-api-types/commit/15c171c558a10cd6d1c4880e725af0e63dd82255)) ## [0.13.1](https://github.com/discordjs/discord-api-types/compare/0.13.0...0.13.1) (2021-03-27) ### Bug Fixes - **APIInteractionResponse:** `data` should not always be present ([#100](https://github.com/discordjs/discord-api-types/issues/100)) ([ffcd95d](https://github.com/discordjs/discord-api-types/commit/ffcd95d597a5d1c5b3ea072cd1dfb44f079de4b7)) # [0.13.0](https://github.com/discordjs/discord-api-types/compare/0.12.1...0.13.0) (2021-03-27) ### Bug Fixes - **deno:** replace `const enum` exports in deno with normal `enum`s ([#89](https://github.com/discordjs/discord-api-types/issues/89)) ([7343fab](https://github.com/discordjs/discord-api-types/commit/7343fabe82e4321808bac784aed600afa8cf4249)) - **RESTPostAPIChannelMessageJSONBody:** mark `tts` as a full boolean ([#96](https://github.com/discordjs/discord-api-types/issues/96)) ([9d8d090](https://github.com/discordjs/discord-api-types/commit/9d8d090c9c6cd5be1f7b578b2f6a6387544f3359)) - **RESTPostAPIGuildsJSONBody:** make some fields nullable ([#91](https://github.com/discordjs/discord-api-types/issues/91)) ([ae1900d](https://github.com/discordjs/discord-api-types/commit/ae1900dc2f65065153b1bf2437348e63b63db49e)) ### Features - **APIApplication:** add ApplicationFlags ([#92](https://github.com/discordjs/discord-api-types/issues/92)) ([92f76f1](https://github.com/discordjs/discord-api-types/commit/92f76f1a3c8acf80689b994e9bfaec70d198aaa1)) - **APIApplicationCommandInteractionData:** add `resolved` ([#86](https://github.com/discordjs/discord-api-types/issues/86)) ([24155ae](https://github.com/discordjs/discord-api-types/commit/24155aeb71d46de48353ce01bfb48e197a84e59b)) - **APIBaseInteraction:** add application_id ([#98](https://github.com/discordjs/discord-api-types/issues/98)) ([0582f88](https://github.com/discordjs/discord-api-types/commit/0582f883c517e5fdc2373ac0a85717a7bfeec018)) - **APIInteraction:** DM slash commands and property descriptions ([#84](https://github.com/discordjs/discord-api-types/issues/84)) ([d0b3106](https://github.com/discordjs/discord-api-types/commit/d0b310675848f4724e47c490b06d828f7ede204c)) - **APIInteractionResponse, APIInteractionResponseType:** update for UI changes ([#90](https://github.com/discordjs/discord-api-types/issues/90)) ([eafe7ba](https://github.com/discordjs/discord-api-types/commit/eafe7ba96fc6e771579850a8a7de36adade8efdc)) - **APIMessage:** add `interaction` ([#93](https://github.com/discordjs/discord-api-types/issues/93)) ([0f29b32](https://github.com/discordjs/discord-api-types/commit/0f29b32e05abe89f70f72989024b9c63493782fa)) - **APIMessageReferenceSend:** add `fail_if_not_exists` ([#82](https://github.com/discordjs/discord-api-types/issues/82)) ([855f36d](https://github.com/discordjs/discord-api-types/commit/855f36d9309ae69f57da723648d3791e3134089e)) - **PermissionFlagsBits:** add `USE_APPLICATION_COMMANDS` ([#85](https://github.com/discordjs/discord-api-types/issues/85)) ([ceb787b](https://github.com/discordjs/discord-api-types/commit/ceb787ba36ed05f25f9acab86496d3054cb15013)) - **rest:** api base routes ([#87](https://github.com/discordjs/discord-api-types/issues/87)) ([466fa95](https://github.com/discordjs/discord-api-types/commit/466fa95b0e239b7984275959886b995a5020640a)) - add Application Command events ([#75](https://github.com/discordjs/discord-api-types/issues/75)) ([da2c2e9](https://github.com/discordjs/discord-api-types/commit/da2c2e9ada39482fce095c47339b40d6c24e683a)) - add GET single Application Command ([#76](https://github.com/discordjs/discord-api-types/issues/76)) ([5826da2](https://github.com/discordjs/discord-api-types/commit/5826da22e30839b1f9fcd73479f8bc0f213001bd)) - implement FormatPatterns ([#79](https://github.com/discordjs/discord-api-types/issues/79)) ([4e4a084](https://github.com/discordjs/discord-api-types/commit/4e4a0840036eddb89a1d49d69f59905dba206afb)) - **OAuth2:** add `/oauth2/[@me](https://github.com/me)` route ([#73](https://github.com/discordjs/discord-api-types/issues/73)) ([84759d1](https://github.com/discordjs/discord-api-types/commit/84759d19bc4cd0f33f0a94608c1af2b4d6a820c6)) - **Webhook:** add Edit Webhook Message result and error 50027 ([#71](https://github.com/discordjs/discord-api-types/issues/71)) ([4c77a5d](https://github.com/discordjs/discord-api-types/commit/4c77a5d90acf627574eff571a92a6703c6ea2d13)) ## [0.12.1](https://github.com/discordjs/discord-api-types/compare/0.12.0...0.12.1) (2021-01-05) ### Bug Fixes - run deno workflow only on branch push ([#66](https://github.com/discordjs/discord-api-types/issues/66)) ([0ef4620](https://github.com/discordjs/discord-api-types/commit/0ef46202f6c8c257e6300e634b675e7e1b6ffa90)) ### Features - add Snowflake and Permissions types ([#69](https://github.com/discordjs/discord-api-types/issues/69)) ([549a6f0](https://github.com/discordjs/discord-api-types/commit/549a6f023698f05829f1dfdf1190c027a994d6cd)) # [0.12.0](https://github.com/discordjs/discord-api-types/compare/0.11.2...0.12.0) (2021-01-01) ### Bug Fixes - **APIApplication:** flags should be omitted in REST, not optional everywhere ([#57](https://github.com/discordjs/discord-api-types/issues/57)) ([664ad80](https://github.com/discordjs/discord-api-types/commit/664ad800ccdfb84cc1547dd151c0f6e16157e04b)) - **RESTPatchAPIChannelJSONBody:** add missing bitrate field ([#60](https://github.com/discordjs/discord-api-types/issues/60)) ([15892ec](https://github.com/discordjs/discord-api-types/commit/15892ec870ff818d7f66bd9b57969638e5f17e1f)) ### Features - **GatewayActivity:** add missing fields ([#39](https://github.com/discordjs/discord-api-types/issues/39)) ([dccdfe0](https://github.com/discordjs/discord-api-types/commit/dccdfe044fb4c02b6cfc910e2d39e469ebd9c75a)) ## [0.11.2](https://github.com/discordjs/discord-api-types/compare/0.11.1...0.11.2) (2020-12-20) ## [0.11.1](https://github.com/discordjs/discord-api-types/compare/0.11.0...0.11.1) (2020-12-19) ### Bug Fixes - **APIAuditLogEntry:** user_id is not nullable ([#52](https://github.com/discordjs/discord-api-types/issues/52)) ([2b89beb](https://github.com/discordjs/discord-api-types/commit/2b89beb52b66a4865124b75069ca6bc3d5886c48)) - **RESTPostAPIGuildsJSONBody:** system_channel_flags is optional ([#53](https://github.com/discordjs/discord-api-types/issues/53)) ([ba4c0d7](https://github.com/discordjs/discord-api-types/commit/ba4c0d78f4ba3755f524b5f63420a36580a1a08e)) # [0.11.0](https://github.com/discordjs/discord-api-types/compare/0.10.0...0.11.0) (2020-12-19) ### Bug Fixes - **APIGuildMember:** drop nullability of `pending` prop ([#49](https://github.com/discordjs/discord-api-types/issues/49)) ([c2f0dee](https://github.com/discordjs/discord-api-types/commit/c2f0deeebd28fa3a09f795d1b263ff8fd5d9ae4d)) - **RESTPatchAPIGuildJSONBody:** multiple properties are actually nullable ([#48](https://github.com/discordjs/discord-api-types/issues/48)) ([018fc4f](https://github.com/discordjs/discord-api-types/commit/018fc4f8ea4d50f719820001822778079a055fa3)) # [0.10.0](https://github.com/discordjs/discord-api-types/compare/0.9.1...0.10.0) (2020-12-09) ### Features - server templates ([#25](https://github.com/discordjs/discord-api-types/issues/25)) ([7d873f7](https://github.com/discordjs/discord-api-types/commit/7d873f73c7a8c64630c57d3eaf33d8c4913ed835)) ## [0.9.1](https://github.com/discordjs/discord-api-types/compare/0.9.0...0.9.1) (2020-11-22) # [0.9.0](https://github.com/discordjs/discord-api-types/compare/0.8.0...0.9.0) (2020-11-22) ### Features - **Message:** reply updates ([#34](https://github.com/discordjs/discord-api-types/issues/34)) ([21b9ae4](https://github.com/discordjs/discord-api-types/commit/21b9ae4aaf29c276d1a6ccc4c79ace8d64a53e9d)) - **Message:** Stickers ([#32](https://github.com/discordjs/discord-api-types/issues/32)) ([39ea1f4](https://github.com/discordjs/discord-api-types/commit/39ea1f4429e5194576200635f885ab102763060b)) # [0.8.0](https://github.com/discordjs/discord-api-types/compare/0.7.0...0.8.0) (2020-11-03) ### Bug Fixes - webhookPlatform route ([#36](https://github.com/discordjs/discord-api-types/issues/36)) ([666a0c7](https://github.com/discordjs/discord-api-types/commit/666a0c71528e385677570b5359ba266276202a95)) - **GatewayPresence:** correct type for sent activity objects ([#30](https://github.com/discordjs/discord-api-types/issues/30)) ([61db1ee](https://github.com/discordjs/discord-api-types/commit/61db1eee256037588ef27533c234cb01f1f699a4)) # [0.7.0](https://github.com/discordjs/discord-api-types/compare/0.6.0...0.7.0) (2020-10-18) ### Bug Fixes - **GatewayHeartbeat:** d is nullable ([#26](https://github.com/discordjs/discord-api-types/issues/26)) ([0982610](https://github.com/discordjs/discord-api-types/commit/098261073163eeb4fcfc217dea3511ccea1f27c5)) - **GatewayIdentify:** use correct presence interface ([#28](https://github.com/discordjs/discord-api-types/issues/28)) ([91c63f0](https://github.com/discordjs/discord-api-types/commit/91c63f05ca1e8e92c4c1df124365405fe8d34108)) ### Features - **APIGuildWidgetMember:** add activity and use proper status type ([#24](https://github.com/discordjs/discord-api-types/issues/24)) ([f058ed6](https://github.com/discordjs/discord-api-types/commit/f058ed6aa1f7593c22e4a3f0c9dd2f4bbd0190dc)) # [0.6.0](https://github.com/discordjs/discord-api-types/compare/0.5.0...0.6.0) (2020-10-04) ### Bug Fixes - **APIChannel:** position is optional ([#21](https://github.com/discordjs/discord-api-types/issues/21)) ([061a147](https://github.com/discordjs/discord-api-types/commit/061a147fbb381738b28ca3fb73fa1a7be0e1b108)) - **RESTPostAPIGuildsJSONBody:** use correct types ([#22](https://github.com/discordjs/discord-api-types/issues/22)) ([dcf8ddf](https://github.com/discordjs/discord-api-types/commit/dcf8ddf25b26a9c72dbb1b5712503e6d5e516ad1)) ### Features - v8 support ([#14](https://github.com/discordjs/discord-api-types/issues/14)) ([11b95c8](https://github.com/discordjs/discord-api-types/commit/11b95c86099e609128a8ca76d06d43498fae72f5)) # [0.5.0](https://github.com/discordjs/discord-api-types/compare/0.4.1...0.5.0) (2020-09-19) ### Bug Fixes - correct typos ([#18](https://github.com/discordjs/discord-api-types/issues/18)) ([97c7b4e](https://github.com/discordjs/discord-api-types/commit/97c7b4ea24852f49b5f952e81a0e6f21ed405316)) - **APIUser:** premium_type is optional ([#19](https://github.com/discordjs/discord-api-types/issues/19)) ([8cf1ba3](https://github.com/discordjs/discord-api-types/commit/8cf1ba3f4f3c28f962afad4bfcc02f5bb897286a)) - **GatewayIdentifyProperties:** rename `device` to `$device` ([#17](https://github.com/discordjs/discord-api-types/issues/17)) ([9e5c5b5](https://github.com/discordjs/discord-api-types/commit/9e5c5b5aac30e931255f39790123b4bd3458a16f)) ## [0.4.1](https://github.com/discordjs/discord-api-types/compare/0.4.0...0.4.1) (2020-09-18) ### Features - add oauth2 types ([#16](https://github.com/discordjs/discord-api-types/issues/16)) ([10fdeba](https://github.com/discordjs/discord-api-types/commit/10fdeba1286e385e087d6c9405872f948507f183)) # [0.4.0](https://github.com/discordjs/discord-api-types/compare/0.3.0...0.4.0) (2020-09-16) ### Features - **ActivityType:** add Competing activity type ([#11](https://github.com/discordjs/discord-api-types/issues/11)) ([94d0a16](https://github.com/discordjs/discord-api-types/commit/94d0a1680532412c8d5f9659056f87a37d1def7d)) # [0.3.0](https://github.com/discordjs/discord-api-types/compare/v0.2.0...0.3.0) (2020-09-14) ### Bug Fixes - **APIMessage:** Correct APIMessage#mentions type ([#9](https://github.com/discordjs/discord-api-types/issues/9)) ([fe1868b](https://github.com/discordjs/discord-api-types/commit/fe1868b04f8a9f4be1c09ffba0afa60f4def8595)) # [0.2.0](https://github.com/discordjs/discord-api-types/compare/v0.1.1...v0.2.0) (2020-09-10) ### Bug Fixes - **Readme:** add missing semicolon ([#1](https://github.com/discordjs/discord-api-types/issues/1)) ([5e3e101](https://github.com/discordjs/discord-api-types/commit/5e3e1016b5fe274d33503d36771fc276fd384ccf)) ## [0.1.1](https://github.com/discordjs/discord-api-types/compare/767a833a12a8268b9f1b780f338da6f28cefa5cd...v0.1.1) (2020-08-22) ### Bug Fixes - set target version to ES2020 ([767a833](https://github.com/discordjs/discord-api-types/commit/767a833a12a8268b9f1b780f338da6f28cefa5cd)) node_modules/discord-api-types/v6.js 0000664 00000001732 15114741631 0013462 0 ustar 00 "use strict"; var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { if (k2 === undefined) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { return m[k]; } }; } Object.defineProperty(o, k2, desc); }) : (function(o, m, k, k2) { if (k2 === undefined) k2 = k; o[k2] = m[k]; })); var __exportStar = (this && this.__exportStar) || function(m, exports) { for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); }; Object.defineProperty(exports, "__esModule", { value: true }); __exportStar(require("./gateway/v6"), exports); __exportStar(require("./globals"), exports); __exportStar(require("./payloads/v6/index"), exports); __exportStar(require("./rest/v6/index"), exports); //# sourceMappingURL=v6.js.map node_modules/discord-api-types/README.md 0000664 00000012773 15114741631 0014057 0 ustar 00 # Discord API Types [](https://github.com/discordjs/discord-api-types) [](https://github.com/discordjs/discord-api-types/blob/main/LICENSE.md) [](https://www.npmjs.com/package/discord-api-types) [](https://deno.land/x/discord_api_types) [](https://www.patreon.com/vladfrangu) [](https://ko-fi.com/wolfgalvlad) [](https://github.com/sponsors/vladfrangu) [](https://vercel.com?utm_source=discordjs&utm_campaign=oss) Simple type definitions for the [Discord API](https://discord.com/developers/docs/intro). ## Installation Install with [npm](https://www.npmjs.com/) / [yarn](https://yarnpkg.com) / [pnpm](https://pnpm.js.org/): ```sh npm install discord-api-types yarn add discord-api-types pnpm add discord-api-types ``` ### Usage You can only import this module by specifying the API version you want to target. Append `/v*` to the import path, where the `*` represents the API version. Below are some examples ```js const { APIUser } = require('discord-api-types/v10'); ``` ```ts // TypeScript/ES Module support import { APIUser } from 'discord-api-types/v10'; ``` You may also import just certain parts of the module that you need. The possible values are: `globals`, `gateway`, `gateway/v*`, `payloads`, `payloads/v*`, `rest`, `rest/v*`, `rpc`, `rpc/v*`, `utils`, `utils/v*`, `voice`, and `voice/v*`. Below are some examples ```js const { GatewayVersion } = require('discord-api-types/gateway/v10'); ``` ```ts // TypeScript/ES Module support import { GatewayVersion } from 'discord-api-types/gateway/v10'; ``` > _**Note:** The `v*` exports (`discord-api-types/v*`) include the appropriate version of `gateway`, `payloads`, `rest`, `rpc`, and `utils` you specified, alongside the `globals` exports_ ### Deno We also provide typings compatible with the [deno](https://deno.land/) runtime. You have 3 ways you can import them: 1. Directly from GitHub ```ts // Importing a specific API version import { APIUser } from 'https://raw.githubusercontent.com/discordjs/discord-api-types/main/deno/v10.ts'; ``` 2. From [deno.land/x](https://deno.land/x) ```ts // Importing a specific API version import { APIUser } from 'https://deno.land/x/discord_api_types/v10.ts'; ``` 3. From [skypack.dev](https://www.skypack.dev/) ```ts // Importing a specific API version import { APIUser } from 'https://cdn.skypack.dev/discord-api-types/v10?dts'; ``` ## Project Structure The exports of each API version is split into three main parts: - Everything exported with the `API` prefix represents a payload you may get from the REST API _or_ the Gateway. - Everything exported with the `Gateway` prefix represents data that ONLY comes from or is directly related to the Gateway. - Everything exported with the `REST` prefix represents data that ONLY comes from or is directly related to the REST API. - For endpoint options, they will follow the following structure: `REST<HTTP Method><Type><Query|(JSON|FormData)Body|Result>` where the type represents what it will return. - For example, `RESTPostAPIChannelMessageJSONBody` or `RESTGetAPIGatewayBotInfoResult`. - Some exported types (specifically OAuth2 related ones) may not respect this entire structure due to the nature of the fields. They will start with either `RESTOAuth2` or with something similar to `REST<HTTP Method>OAuth2` - If a type ends with `Result`, then it represents the expected result by calling its accompanying route. - Types that are exported as `never` usually mean the result will be a `204 No Content`, so you can safely ignore it. This does **not** account for errors. - Anything else that is miscellaneous will be exported based on what it represents (for example the `REST` route object). - There may be types exported that are identical for all versions. These will be exported as is and can be found in the `globals` file. They will still be prefixed accordingly as described above. **A note about how types are documented**: This package will add types only for known and documented properties that are present in Discord's [API Documentation repository](https://github.com/discord/discord-api-docs), that are mentioned in an open pull request, or known through other means _and have received the green light to be used_. Anything else will not be documented (for example client only types). With that aside, we may allow certain types that are not documented in the [API Documentation repository](https://github.com/discord/discord-api-docs) on a case by case basis. They will be documented with an `@unstable` tag and are not subject with the same versioning rules. node_modules/readdirp/package.json 0000664 00000004732 15114741631 0013314 0 ustar 00 { "name": "readdirp", "description": "Recursive version of fs.readdir with streaming API.", "version": "3.6.0", "homepage": "https://github.com/paulmillr/readdirp", "repository": { "type": "git", "url": "git://github.com/paulmillr/readdirp.git" }, "license": "MIT", "bugs": { "url": "https://github.com/paulmillr/readdirp/issues" }, "author": "Thorsten Lorenz <thlorenz@gmx.de> (thlorenz.com)", "contributors": [ "Thorsten Lorenz <thlorenz@gmx.de> (thlorenz.com)", "Paul Miller (https://paulmillr.com)" ], "main": "index.js", "engines": { "node": ">=8.10.0" }, "files": [ "index.js", "index.d.ts" ], "keywords": [ "recursive", "fs", "stream", "streams", "readdir", "filesystem", "find", "filter" ], "scripts": { "dtslint": "dtslint", "nyc": "nyc", "mocha": "mocha --exit", "lint": "eslint --report-unused-disable-directives --ignore-path .gitignore .", "test": "npm run lint && nyc npm run mocha" }, "dependencies": { "picomatch": "^2.2.1" }, "devDependencies": { "@types/node": "^14", "chai": "^4.2", "chai-subset": "^1.6", "dtslint": "^3.3.0", "eslint": "^7.0.0", "mocha": "^7.1.1", "nyc": "^15.0.0", "rimraf": "^3.0.0", "typescript": "^4.0.3" }, "nyc": { "reporter": [ "html", "text" ] }, "eslintConfig": { "root": true, "extends": "eslint:recommended", "parserOptions": { "ecmaVersion": 9, "sourceType": "script" }, "env": { "node": true, "es6": true }, "rules": { "array-callback-return": "error", "no-empty": [ "error", { "allowEmptyCatch": true } ], "no-else-return": [ "error", { "allowElseIf": false } ], "no-lonely-if": "error", "no-var": "error", "object-shorthand": "error", "prefer-arrow-callback": [ "error", { "allowNamedFunctions": true } ], "prefer-const": [ "error", { "ignoreReadBeforeAssign": true } ], "prefer-destructuring": [ "error", { "object": true, "array": false } ], "prefer-spread": "error", "prefer-template": "error", "radix": "error", "semi": "error", "strict": "error", "quotes": [ "error", "single" ] } } } node_modules/readdirp/LICENSE 0000664 00000002132 15114741631 0012023 0 ustar 00 MIT License Copyright (c) 2012-2019 Thorsten Lorenz, Paul Miller (https://paulmillr.com) Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. node_modules/readdirp/index.d.ts 0000664 00000001772 15114741631 0012730 0 ustar 00 // TypeScript Version: 3.2 /// <reference types="node" lib="esnext" /> import * as fs from 'fs'; import { Readable } from 'stream'; declare namespace readdir { interface EntryInfo { path: string; fullPath: string; basename: string; stats?: fs.Stats; dirent?: fs.Dirent; } interface ReaddirpOptions { root?: string; fileFilter?: string | string[] | ((entry: EntryInfo) => boolean); directoryFilter?: string | string[] | ((entry: EntryInfo) => boolean); type?: 'files' | 'directories' | 'files_directories' | 'all'; lstat?: boolean; depth?: number; alwaysStat?: boolean; } interface ReaddirpStream extends Readable, AsyncIterable<EntryInfo> { read(): EntryInfo; [Symbol.asyncIterator](): AsyncIterableIterator<EntryInfo>; } function promise( root: string, options?: ReaddirpOptions ): Promise<EntryInfo[]>; } declare function readdir( root: string, options?: readdir.ReaddirpOptions ): readdir.ReaddirpStream; export = readdir; node_modules/readdirp/index.js 0000664 00000021254 15114741631 0012471 0 ustar 00 'use strict'; const fs = require('fs'); const { Readable } = require('stream'); const sysPath = require('path'); const { promisify } = require('util'); const picomatch = require('picomatch'); const readdir = promisify(fs.readdir); const stat = promisify(fs.stat); const lstat = promisify(fs.lstat); const realpath = promisify(fs.realpath); /** * @typedef {Object} EntryInfo * @property {String} path * @property {String} fullPath * @property {fs.Stats=} stats * @property {fs.Dirent=} dirent * @property {String} basename */ const BANG = '!'; const RECURSIVE_ERROR_CODE = 'READDIRP_RECURSIVE_ERROR'; const NORMAL_FLOW_ERRORS = new Set(['ENOENT', 'EPERM', 'EACCES', 'ELOOP', RECURSIVE_ERROR_CODE]); const FILE_TYPE = 'files'; const DIR_TYPE = 'directories'; const FILE_DIR_TYPE = 'files_directories'; const EVERYTHING_TYPE = 'all'; const ALL_TYPES = [FILE_TYPE, DIR_TYPE, FILE_DIR_TYPE, EVERYTHING_TYPE]; const isNormalFlowError = error => NORMAL_FLOW_ERRORS.has(error.code); const [maj, min] = process.versions.node.split('.').slice(0, 2).map(n => Number.parseInt(n, 10)); const wantBigintFsStats = process.platform === 'win32' && (maj > 10 || (maj === 10 && min >= 5)); const normalizeFilter = filter => { if (filter === undefined) return; if (typeof filter === 'function') return filter; if (typeof filter === 'string') { const glob = picomatch(filter.trim()); return entry => glob(entry.basename); } if (Array.isArray(filter)) { const positive = []; const negative = []; for (const item of filter) { const trimmed = item.trim(); if (trimmed.charAt(0) === BANG) { negative.push(picomatch(trimmed.slice(1))); } else { positive.push(picomatch(trimmed)); } } if (negative.length > 0) { if (positive.length > 0) { return entry => positive.some(f => f(entry.basename)) && !negative.some(f => f(entry.basename)); } return entry => !negative.some(f => f(entry.basename)); } return entry => positive.some(f => f(entry.basename)); } }; class ReaddirpStream extends Readable { static get defaultOptions() { return { root: '.', /* eslint-disable no-unused-vars */ fileFilter: (path) => true, directoryFilter: (path) => true, /* eslint-enable no-unused-vars */ type: FILE_TYPE, lstat: false, depth: 2147483648, alwaysStat: false }; } constructor(options = {}) { super({ objectMode: true, autoDestroy: true, highWaterMark: options.highWaterMark || 4096 }); const opts = { ...ReaddirpStream.defaultOptions, ...options }; const { root, type } = opts; this._fileFilter = normalizeFilter(opts.fileFilter); this._directoryFilter = normalizeFilter(opts.directoryFilter); const statMethod = opts.lstat ? lstat : stat; // Use bigint stats if it's windows and stat() supports options (node 10+). if (wantBigintFsStats) { this._stat = path => statMethod(path, { bigint: true }); } else { this._stat = statMethod; } this._maxDepth = opts.depth; this._wantsDir = [DIR_TYPE, FILE_DIR_TYPE, EVERYTHING_TYPE].includes(type); this._wantsFile = [FILE_TYPE, FILE_DIR_TYPE, EVERYTHING_TYPE].includes(type); this._wantsEverything = type === EVERYTHING_TYPE; this._root = sysPath.resolve(root); this._isDirent = ('Dirent' in fs) && !opts.alwaysStat; this._statsProp = this._isDirent ? 'dirent' : 'stats'; this._rdOptions = { encoding: 'utf8', withFileTypes: this._isDirent }; // Launch stream with one parent, the root dir. this.parents = [this._exploreDir(root, 1)]; this.reading = false; this.parent = undefined; } async _read(batch) { if (this.reading) return; this.reading = true; try { while (!this.destroyed && batch > 0) { const { path, depth, files = [] } = this.parent || {}; if (files.length > 0) { const slice = files.splice(0, batch).map(dirent => this._formatEntry(dirent, path)); for (const entry of await Promise.all(slice)) { if (this.destroyed) return; const entryType = await this._getEntryType(entry); if (entryType === 'directory' && this._directoryFilter(entry)) { if (depth <= this._maxDepth) { this.parents.push(this._exploreDir(entry.fullPath, depth + 1)); } if (this._wantsDir) { this.push(entry); batch--; } } else if ((entryType === 'file' || this._includeAsFile(entry)) && this._fileFilter(entry)) { if (this._wantsFile) { this.push(entry); batch--; } } } } else { const parent = this.parents.pop(); if (!parent) { this.push(null); break; } this.parent = await parent; if (this.destroyed) return; } } } catch (error) { this.destroy(error); } finally { this.reading = false; } } async _exploreDir(path, depth) { let files; try { files = await readdir(path, this._rdOptions); } catch (error) { this._onError(error); } return { files, depth, path }; } async _formatEntry(dirent, path) { let entry; try { const basename = this._isDirent ? dirent.name : dirent; const fullPath = sysPath.resolve(sysPath.join(path, basename)); entry = { path: sysPath.relative(this._root, fullPath), fullPath, basename }; entry[this._statsProp] = this._isDirent ? dirent : await this._stat(fullPath); } catch (err) { this._onError(err); } return entry; } _onError(err) { if (isNormalFlowError(err) && !this.destroyed) { this.emit('warn', err); } else { this.destroy(err); } } async _getEntryType(entry) { // entry may be undefined, because a warning or an error were emitted // and the statsProp is undefined const stats = entry && entry[this._statsProp]; if (!stats) { return; } if (stats.isFile()) { return 'file'; } if (stats.isDirectory()) { return 'directory'; } if (stats && stats.isSymbolicLink()) { const full = entry.fullPath; try { const entryRealPath = await realpath(full); const entryRealPathStats = await lstat(entryRealPath); if (entryRealPathStats.isFile()) { return 'file'; } if (entryRealPathStats.isDirectory()) { const len = entryRealPath.length; if (full.startsWith(entryRealPath) && full.substr(len, 1) === sysPath.sep) { const recursiveError = new Error( `Circular symlink detected: "${full}" points to "${entryRealPath}"` ); recursiveError.code = RECURSIVE_ERROR_CODE; return this._onError(recursiveError); } return 'directory'; } } catch (error) { this._onError(error); } } } _includeAsFile(entry) { const stats = entry && entry[this._statsProp]; return stats && this._wantsEverything && !stats.isDirectory(); } } /** * @typedef {Object} ReaddirpArguments * @property {Function=} fileFilter * @property {Function=} directoryFilter * @property {String=} type * @property {Number=} depth * @property {String=} root * @property {Boolean=} lstat * @property {Boolean=} bigint */ /** * Main function which ends up calling readdirRec and reads all files and directories in given root recursively. * @param {String} root Root directory * @param {ReaddirpArguments=} options Options to specify root (start directory), filters and recursion depth */ const readdirp = (root, options = {}) => { let type = options.entryType || options.type; if (type === 'both') type = FILE_DIR_TYPE; // backwards-compatibility if (type) options.type = type; if (!root) { throw new Error('readdirp: root argument is required. Usage: readdirp(root, options)'); } else if (typeof root !== 'string') { throw new TypeError('readdirp: root argument must be a string. Usage: readdirp(root, options)'); } else if (type && !ALL_TYPES.includes(type)) { throw new Error(`readdirp: Invalid type passed. Use one of ${ALL_TYPES.join(', ')}`); } options.root = root; return new ReaddirpStream(options); }; const readdirpPromise = (root, options = {}) => { return new Promise((resolve, reject) => { const files = []; readdirp(root, options) .on('data', entry => files.push(entry)) .on('end', () => resolve(files)) .on('error', error => reject(error)); }); }; readdirp.promise = readdirpPromise; readdirp.ReaddirpStream = ReaddirpStream; readdirp.default = readdirp; module.exports = readdirp; node_modules/readdirp/README.md 0000664 00000015436 15114741631 0012310 0 ustar 00 # readdirp [](https://github.com/paulmillr/readdirp) Recursive version of [fs.readdir](https://nodejs.org/api/fs.html#fs_fs_readdir_path_options_callback). Exposes a **stream API** and a **promise API**. ```sh npm install readdirp ``` ```javascript const readdirp = require('readdirp'); // Use streams to achieve small RAM & CPU footprint. // 1) Streams example with for-await. for await (const entry of readdirp('.')) { const {path} = entry; console.log(`${JSON.stringify({path})}`); } // 2) Streams example, non for-await. // Print out all JS files along with their size within the current folder & subfolders. readdirp('.', {fileFilter: '*.js', alwaysStat: true}) .on('data', (entry) => { const {path, stats: {size}} = entry; console.log(`${JSON.stringify({path, size})}`); }) // Optionally call stream.destroy() in `warn()` in order to abort and cause 'close' to be emitted .on('warn', error => console.error('non-fatal error', error)) .on('error', error => console.error('fatal error', error)) .on('end', () => console.log('done')); // 3) Promise example. More RAM and CPU than streams / for-await. const files = await readdirp.promise('.'); console.log(files.map(file => file.path)); // Other options. readdirp('test', { fileFilter: '*.js', directoryFilter: ['!.git', '!*modules'] // directoryFilter: (di) => di.basename.length === 9 type: 'files_directories', depth: 1 }); ``` For more examples, check out `examples` directory. ## API `const stream = readdirp(root[, options])` — **Stream API** - Reads given root recursively and returns a `stream` of [entry infos](#entryinfo) - Optionally can be used like `for await (const entry of stream)` with node.js 10+ (`asyncIterator`). - `on('data', (entry) => {})` [entry info](#entryinfo) for every file / dir. - `on('warn', (error) => {})` non-fatal `Error` that prevents a file / dir from being processed. Example: inaccessible to the user. - `on('error', (error) => {})` fatal `Error` which also ends the stream. Example: illegal options where passed. - `on('end')` — we are done. Called when all entries were found and no more will be emitted. - `on('close')` — stream is destroyed via `stream.destroy()`. Could be useful if you want to manually abort even on a non fatal error. At that point the stream is no longer `readable` and no more entries, warning or errors are emitted - To learn more about streams, consult the very detailed [nodejs streams documentation](https://nodejs.org/api/stream.html) or the [stream-handbook](https://github.com/substack/stream-handbook) `const entries = await readdirp.promise(root[, options])` — **Promise API**. Returns a list of [entry infos](#entryinfo). First argument is awalys `root`, path in which to start reading and recursing into subdirectories. ### options - `fileFilter: ["*.js"]`: filter to include or exclude files. A `Function`, Glob string or Array of glob strings. - **Function**: a function that takes an entry info as a parameter and returns true to include or false to exclude the entry - **Glob string**: a string (e.g., `*.js`) which is matched using [picomatch](https://github.com/micromatch/picomatch), so go there for more information. Globstars (`**`) are not supported since specifying a recursive pattern for an already recursive function doesn't make sense. Negated globs (as explained in the minimatch documentation) are allowed, e.g., `!*.txt` matches everything but text files. - **Array of glob strings**: either need to be all inclusive or all exclusive (negated) patterns otherwise an error is thrown. `['*.json', '*.js']` includes all JavaScript and Json files. `['!.git', '!node_modules']` includes all directories except the '.git' and 'node_modules'. - Directories that do not pass a filter will not be recursed into. - `directoryFilter: ['!.git']`: filter to include/exclude directories found and to recurse into. Directories that do not pass a filter will not be recursed into. - `depth: 5`: depth at which to stop recursing even if more subdirectories are found - `type: 'files'`: determines if data events on the stream should be emitted for `'files'` (default), `'directories'`, `'files_directories'`, or `'all'`. Setting to `'all'` will also include entries for other types of file descriptors like character devices, unix sockets and named pipes. - `alwaysStat: false`: always return `stats` property for every file. Default is `false`, readdirp will return `Dirent` entries. Setting it to `true` can double readdir execution time - use it only when you need file `size`, `mtime` etc. Cannot be enabled on node <10.10.0. - `lstat: false`: include symlink entries in the stream along with files. When `true`, `fs.lstat` would be used instead of `fs.stat` ### `EntryInfo` Has the following properties: - `path: 'assets/javascripts/react.js'`: path to the file/directory (relative to given root) - `fullPath: '/Users/dev/projects/app/assets/javascripts/react.js'`: full path to the file/directory found - `basename: 'react.js'`: name of the file/directory - `dirent: fs.Dirent`: built-in [dir entry object](https://nodejs.org/api/fs.html#fs_class_fs_dirent) - only with `alwaysStat: false` - `stats: fs.Stats`: built in [stat object](https://nodejs.org/api/fs.html#fs_class_fs_stats) - only with `alwaysStat: true` ## Changelog - 3.5 (Oct 13, 2020) disallows recursive directory-based symlinks. Before, it could have entered infinite loop. - 3.4 (Mar 19, 2020) adds support for directory-based symlinks. - 3.3 (Dec 6, 2019) stabilizes RAM consumption and enables perf management with `highWaterMark` option. Fixes race conditions related to `for-await` looping. - 3.2 (Oct 14, 2019) improves performance by 250% and makes streams implementation more idiomatic. - 3.1 (Jul 7, 2019) brings `bigint` support to `stat` output on Windows. This is backwards-incompatible for some cases. Be careful. It you use it incorrectly, you'll see "TypeError: Cannot mix BigInt and other types, use explicit conversions". - 3.0 brings huge performance improvements and stream backpressure support. - Upgrading 2.x to 3.x: - Signature changed from `readdirp(options)` to `readdirp(root, options)` - Replaced callback API with promise API. - Renamed `entryType` option to `type` - Renamed `entryType: 'both'` to `'files_directories'` - `EntryInfo` - Renamed `stat` to `stats` - Emitted only when `alwaysStat: true` - `dirent` is emitted instead of `stats` by default with `alwaysStat: false` - Renamed `name` to `basename` - Removed `parentDir` and `fullParentDir` properties - Supported node.js versions: - 3.x: node 8+ - 2.x: node 0.6+ ## License Copyright (c) 2012-2019 Thorsten Lorenz, Paul Miller (<https://paulmillr.com>) MIT License, see [LICENSE](LICENSE) file. node_modules/brace-expansion/package.json 0000664 00000002204 15114741631 0014570 0 ustar 00 { "name": "brace-expansion", "description": "Brace expansion as known from sh/bash", "version": "1.1.12", "repository": { "type": "git", "url": "git://github.com/juliangruber/brace-expansion.git" }, "homepage": "https://github.com/juliangruber/brace-expansion", "main": "index.js", "scripts": { "test": "tape test/*.js", "gentest": "bash test/generate.sh", "bench": "matcha test/perf/bench.js" }, "dependencies": { "balanced-match": "^1.0.0", "concat-map": "0.0.1" }, "devDependencies": { "matcha": "^0.7.0", "tape": "^4.6.0" }, "keywords": [], "author": { "name": "Julian Gruber", "email": "mail@juliangruber.com", "url": "http://juliangruber.com" }, "license": "MIT", "testling": { "files": "test/*.js", "browsers": [ "ie/8..latest", "firefox/20..latest", "firefox/nightly", "chrome/25..latest", "chrome/canary", "opera/12..latest", "opera/next", "safari/5.1..latest", "ipad/6.0..latest", "iphone/6.0..latest", "android-browser/4.2..latest" ] }, "publishConfig": { "tag": "1.x" } } node_modules/brace-expansion/LICENSE 0000664 00000002110 15114741631 0013303 0 ustar 00 MIT License Copyright (c) 2013 Julian Gruber <julian@juliangruber.com> Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. node_modules/brace-expansion/index.js 0000664 00000011275 15114741631 0013757 0 ustar 00 var concatMap = require('concat-map'); var balanced = require('balanced-match'); module.exports = expandTop; var escSlash = '\0SLASH'+Math.random()+'\0'; var escOpen = '\0OPEN'+Math.random()+'\0'; var escClose = '\0CLOSE'+Math.random()+'\0'; var escComma = '\0COMMA'+Math.random()+'\0'; var escPeriod = '\0PERIOD'+Math.random()+'\0'; function numeric(str) { return parseInt(str, 10) == str ? parseInt(str, 10) : str.charCodeAt(0); } function escapeBraces(str) { return str.split('\\\\').join(escSlash) .split('\\{').join(escOpen) .split('\\}').join(escClose) .split('\\,').join(escComma) .split('\\.').join(escPeriod); } function unescapeBraces(str) { return str.split(escSlash).join('\\') .split(escOpen).join('{') .split(escClose).join('}') .split(escComma).join(',') .split(escPeriod).join('.'); } // Basically just str.split(","), but handling cases // where we have nested braced sections, which should be // treated as individual members, like {a,{b,c},d} function parseCommaParts(str) { if (!str) return ['']; var parts = []; var m = balanced('{', '}', str); if (!m) return str.split(','); var pre = m.pre; var body = m.body; var post = m.post; var p = pre.split(','); p[p.length-1] += '{' + body + '}'; var postParts = parseCommaParts(post); if (post.length) { p[p.length-1] += postParts.shift(); p.push.apply(p, postParts); } parts.push.apply(parts, p); return parts; } function expandTop(str) { if (!str) return []; // I don't know why Bash 4.3 does this, but it does. // Anything starting with {} will have the first two bytes preserved // but *only* at the top level, so {},a}b will not expand to anything, // but a{},b}c will be expanded to [a}c,abc]. // One could argue that this is a bug in Bash, but since the goal of // this module is to match Bash's rules, we escape a leading {} if (str.substr(0, 2) === '{}') { str = '\\{\\}' + str.substr(2); } return expand(escapeBraces(str), true).map(unescapeBraces); } function identity(e) { return e; } function embrace(str) { return '{' + str + '}'; } function isPadded(el) { return /^-?0\d/.test(el); } function lte(i, y) { return i <= y; } function gte(i, y) { return i >= y; } function expand(str, isTop) { var expansions = []; var m = balanced('{', '}', str); if (!m || /\$$/.test(m.pre)) return [str]; var isNumericSequence = /^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(m.body); var isAlphaSequence = /^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(m.body); var isSequence = isNumericSequence || isAlphaSequence; var isOptions = m.body.indexOf(',') >= 0; if (!isSequence && !isOptions) { // {a},b} if (m.post.match(/,(?!,).*\}/)) { str = m.pre + '{' + m.body + escClose + m.post; return expand(str); } return [str]; } var n; if (isSequence) { n = m.body.split(/\.\./); } else { n = parseCommaParts(m.body); if (n.length === 1) { // x{{a,b}}y ==> x{a}y x{b}y n = expand(n[0], false).map(embrace); if (n.length === 1) { var post = m.post.length ? expand(m.post, false) : ['']; return post.map(function(p) { return m.pre + n[0] + p; }); } } } // at this point, n is the parts, and we know it's not a comma set // with a single entry. // no need to expand pre, since it is guaranteed to be free of brace-sets var pre = m.pre; var post = m.post.length ? expand(m.post, false) : ['']; var N; if (isSequence) { var x = numeric(n[0]); var y = numeric(n[1]); var width = Math.max(n[0].length, n[1].length) var incr = n.length == 3 ? Math.abs(numeric(n[2])) : 1; var test = lte; var reverse = y < x; if (reverse) { incr *= -1; test = gte; } var pad = n.some(isPadded); N = []; for (var i = x; test(i, y); i += incr) { var c; if (isAlphaSequence) { c = String.fromCharCode(i); if (c === '\\') c = ''; } else { c = String(i); if (pad) { var need = width - c.length; if (need > 0) { var z = new Array(need + 1).join('0'); if (i < 0) c = '-' + z + c.slice(1); else c = z + c; } } } N.push(c); } } else { N = concatMap(n, function(el) { return expand(el, false) }); } for (var j = 0; j < N.length; j++) { for (var k = 0; k < post.length; k++) { var expansion = pre + N[j] + post[k]; if (!isTop || isSequence || expansion) expansions.push(expansion); } } return expansions; } node_modules/brace-expansion/README.md 0000664 00000007732 15114741631 0013574 0 ustar 00 # brace-expansion [Brace expansion](https://www.gnu.org/software/bash/manual/html_node/Brace-Expansion.html), as known from sh/bash, in JavaScript. [](http://travis-ci.org/juliangruber/brace-expansion) [](https://www.npmjs.org/package/brace-expansion) [](https://greenkeeper.io/) [](https://ci.testling.com/juliangruber/brace-expansion) ## Example ```js var expand = require('brace-expansion'); expand('file-{a,b,c}.jpg') // => ['file-a.jpg', 'file-b.jpg', 'file-c.jpg'] expand('-v{,,}') // => ['-v', '-v', '-v'] expand('file{0..2}.jpg') // => ['file0.jpg', 'file1.jpg', 'file2.jpg'] expand('file-{a..c}.jpg') // => ['file-a.jpg', 'file-b.jpg', 'file-c.jpg'] expand('file{2..0}.jpg') // => ['file2.jpg', 'file1.jpg', 'file0.jpg'] expand('file{0..4..2}.jpg') // => ['file0.jpg', 'file2.jpg', 'file4.jpg'] expand('file-{a..e..2}.jpg') // => ['file-a.jpg', 'file-c.jpg', 'file-e.jpg'] expand('file{00..10..5}.jpg') // => ['file00.jpg', 'file05.jpg', 'file10.jpg'] expand('{{A..C},{a..c}}') // => ['A', 'B', 'C', 'a', 'b', 'c'] expand('ppp{,config,oe{,conf}}') // => ['ppp', 'pppconfig', 'pppoe', 'pppoeconf'] ``` ## API ```js var expand = require('brace-expansion'); ``` ### var expanded = expand(str) Return an array of all possible and valid expansions of `str`. If none are found, `[str]` is returned. Valid expansions are: ```js /^(.*,)+(.+)?$/ // {a,b,...} ``` A comma separated list of options, like `{a,b}` or `{a,{b,c}}` or `{,a,}`. ```js /^-?\d+\.\.-?\d+(\.\.-?\d+)?$/ // {x..y[..incr]} ``` A numeric sequence from `x` to `y` inclusive, with optional increment. If `x` or `y` start with a leading `0`, all the numbers will be padded to have equal length. Negative numbers and backwards iteration work too. ```js /^-?\d+\.\.-?\d+(\.\.-?\d+)?$/ // {x..y[..incr]} ``` An alphabetic sequence from `x` to `y` inclusive, with optional increment. `x` and `y` must be exactly one character, and if given, `incr` must be a number. For compatibility reasons, the string `${` is not eligible for brace expansion. ## Installation With [npm](https://npmjs.org) do: ```bash npm install brace-expansion ``` ## Contributors - [Julian Gruber](https://github.com/juliangruber) - [Isaac Z. Schlueter](https://github.com/isaacs) ## Sponsors This module is proudly supported by my [Sponsors](https://github.com/juliangruber/sponsors)! Do you want to support modules like this to improve their quality, stability and weigh in on new features? Then please consider donating to my [Patreon](https://www.patreon.com/juliangruber). Not sure how much of my modules you're using? Try [feross/thanks](https://github.com/feross/thanks)! ## License (MIT) Copyright (c) 2013 Julian Gruber <julian@juliangruber.com> Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. node_modules/touch/bin/nodetouch.js 0000775 00000005064 15114741631 0013456 0 ustar 00 #!/usr/bin/env node const touch = require("../index.js") const usage = code => { console[code ? 'error' : 'log']( 'usage:\n' + 'touch [-acfm] [-r file] [-t [[CC]YY]MMDDhhmm[.SS]] file ...' ) process.exit(code) } const singleFlags = { a: 'atime', m: 'mtime', c: 'nocreate', f: 'force' } const singleOpts = { r: 'ref', t: 'time' } const files = [] const args = process.argv.slice(2) const options = {} for (let i = 0; i < args.length; i++) { const arg = args[i] if (!arg.match(/^-/)) { files.push(arg) continue } // expand shorthands if (arg.charAt(1) !== '-') { const expand = [] for (let f = 1; f < arg.length; f++) { const fc = arg.charAt(f) const sf = singleFlags[fc] const so = singleOpts[fc] if (sf) expand.push('--' + sf) else if (so) { const soslice = arg.slice(f + 1) const soval = soslice.charAt(0) === '=' ? soslice : '=' + soslice expand.push('--' + so + soval) f = arg.length } else if (arg !== '-' + fc) expand.push('-' + fc) } if (expand.length) { args.splice.apply(args, [i, 1].concat(expand)) i-- continue } } const argsplit = arg.split('=') const key = argsplit.shift().replace(/^\-\-/, '') const val = argsplit.length ? argsplit.join('=') : null switch (key) { case 'time': const timestr = val || args[++i] // [-t [[CC]YY]MMDDhhmm[.SS]] const parsedtime = timestr.match( /^(([0-9]{2})?([0-9]{2}))?([0-9]{2})([0-9]{2})([0-9]{2})([0-9]{2})(\.([0-9]{2}))?$/ ) if (!parsedtime) { console.error('touch: out of range or illegal ' + 'time specification: ' + '[[CC]YY]MMDDhhmm[.SS]') process.exit(1) } else { const y = +parsedtime[1] const year = parsedtime[2] ? y : y <= 68 ? 2000 + y : 1900 + y const MM = +parsedtime[4] - 1 const dd = +parsedtime[5] const hh = +parsedtime[6] const mm = +parsedtime[7] const ss = +parsedtime[8] options.time = new Date(Date.UTC(year, MM, dd, hh, mm, ss)) } continue case 'ref': options.ref = val || args[++i] continue case 'mtime': case 'nocreate': case 'atime': case 'force': options[key] = true continue default: console.error('touch: illegal option -- ' + arg) usage(1) } } if (!files.length) usage() process.exitCode = 0 Promise.all(files.map(f => touch(f, options))) .catch(er => process.exitCode = 1) node_modules/semver/bin/semver.js 0000775 00000011203 15114741631 0013136 0 ustar 00 #!/usr/bin/env node // Standalone semver comparison program. // Exits successfully and prints matching version(s) if // any supplied version is valid and passes all tests. 'use strict' const argv = process.argv.slice(2) let versions = [] const range = [] let inc = null const version = require('../package.json').version let loose = false let includePrerelease = false let coerce = false let rtl = false let identifier let identifierBase const semver = require('../') const parseOptions = require('../internal/parse-options') let reverse = false let options = {} const main = () => { if (!argv.length) { return help() } while (argv.length) { let a = argv.shift() const indexOfEqualSign = a.indexOf('=') if (indexOfEqualSign !== -1) { const value = a.slice(indexOfEqualSign + 1) a = a.slice(0, indexOfEqualSign) argv.unshift(value) } switch (a) { case '-rv': case '-rev': case '--rev': case '--reverse': reverse = true break case '-l': case '--loose': loose = true break case '-p': case '--include-prerelease': includePrerelease = true break case '-v': case '--version': versions.push(argv.shift()) break case '-i': case '--inc': case '--increment': switch (argv[0]) { case 'major': case 'minor': case 'patch': case 'prerelease': case 'premajor': case 'preminor': case 'prepatch': case 'release': inc = argv.shift() break default: inc = 'patch' break } break case '--preid': identifier = argv.shift() break case '-r': case '--range': range.push(argv.shift()) break case '-n': identifierBase = argv.shift() if (identifierBase === 'false') { identifierBase = false } break case '-c': case '--coerce': coerce = true break case '--rtl': rtl = true break case '--ltr': rtl = false break case '-h': case '--help': case '-?': return help() default: versions.push(a) break } } options = parseOptions({ loose, includePrerelease, rtl }) versions = versions.map((v) => { return coerce ? (semver.coerce(v, options) || { version: v }).version : v }).filter((v) => { return semver.valid(v) }) if (!versions.length) { return fail() } if (inc && (versions.length !== 1 || range.length)) { return failInc() } for (let i = 0, l = range.length; i < l; i++) { versions = versions.filter((v) => { return semver.satisfies(v, range[i], options) }) if (!versions.length) { return fail() } } versions .sort((a, b) => semver[reverse ? 'rcompare' : 'compare'](a, b, options)) .map(v => semver.clean(v, options)) .map(v => inc ? semver.inc(v, inc, options, identifier, identifierBase) : v) .forEach(v => console.log(v)) } const failInc = () => { console.error('--inc can only be used on a single version with no range') fail() } const fail = () => process.exit(1) const help = () => console.log( `SemVer ${version} A JavaScript implementation of the https://semver.org/ specification Copyright Isaac Z. Schlueter Usage: semver [options] <version> [<version> [...]] Prints valid versions sorted by SemVer precedence Options: -r --range <range> Print versions that match the specified range. -i --increment [<level>] Increment a version by the specified level. Level can be one of: major, minor, patch, premajor, preminor, prepatch, prerelease, or release. Default level is 'patch'. Only one version may be specified. --preid <identifier> Identifier to be used to prefix premajor, preminor, prepatch or prerelease version increments. -l --loose Interpret versions and ranges loosely -p --include-prerelease Always include prerelease versions in range matching -c --coerce Coerce a string into SemVer if possible (does not imply --loose) --rtl Coerce version strings right to left --ltr Coerce version strings left to right (default) -n <base> Base number to be used for the prerelease identifier. Can be either 0 or 1, or false to omit the number altogether. Defaults to 0. Program exits successfully if any valid version satisfies all supplied ranges, and prints all satisfying versions. If no satisfying versions are found, then exits failure. Versions are printed in ascending order, so supplying multiple versions to the utility will just sort them.`) main() node_modules/nodemon/bin/nodemon.js 0000775 00000000664 15114741631 0013443 0 ustar 00 #!/usr/bin/env node const cli = require('../lib/cli'); const nodemon = require('../lib/'); const options = cli.parse(process.argv); nodemon(options); const fs = require('fs'); // checks for available update and returns an instance const pkg = JSON.parse(fs.readFileSync(__dirname + '/../package.json')); if (pkg.version.indexOf('0.0.0') !== 0 && options.noUpdateNotifier !== true) { require('simple-update-notifier')({ pkg }); } node_modules/braces/package.json 0000664 00000003157 15114741631 0012761 0 ustar 00 { "name": "braces", "description": "Bash-like brace expansion, implemented in JavaScript. Safer than other brace expansion libs, with complete support for the Bash 4.3 braces specification, without sacrificing speed.", "version": "3.0.3", "homepage": "https://github.com/micromatch/braces", "author": "Jon Schlinkert (https://github.com/jonschlinkert)", "contributors": [ "Brian Woodward (https://twitter.com/doowb)", "Elan Shanker (https://github.com/es128)", "Eugene Sharygin (https://github.com/eush77)", "hemanth.hm (http://h3manth.com)", "Jon Schlinkert (http://twitter.com/jonschlinkert)" ], "repository": "micromatch/braces", "bugs": { "url": "https://github.com/micromatch/braces/issues" }, "license": "MIT", "files": [ "index.js", "lib" ], "main": "index.js", "engines": { "node": ">=8" }, "scripts": { "test": "mocha", "benchmark": "node benchmark" }, "dependencies": { "fill-range": "^7.1.1" }, "devDependencies": { "ansi-colors": "^3.2.4", "bash-path": "^2.0.1", "gulp-format-md": "^2.0.0", "mocha": "^6.1.1" }, "keywords": [ "alpha", "alphabetical", "bash", "brace", "braces", "expand", "expansion", "filepath", "fill", "fs", "glob", "globbing", "letter", "match", "matches", "matching", "number", "numerical", "path", "range", "ranges", "sh" ], "verb": { "toc": false, "layout": "default", "tasks": [ "readme" ], "lint": { "reflinks": true }, "plugins": [ "gulp-format-md" ] } } node_modules/braces/LICENSE 0000664 00000002103 15114741631 0011466 0 ustar 00 The MIT License (MIT) Copyright (c) 2014-present, Jon Schlinkert. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. node_modules/braces/lib/utils.js 0000664 00000004726 15114741631 0012742 0 ustar 00 'use strict'; exports.isInteger = num => { if (typeof num === 'number') { return Number.isInteger(num); } if (typeof num === 'string' && num.trim() !== '') { return Number.isInteger(Number(num)); } return false; }; /** * Find a node of the given type */ exports.find = (node, type) => node.nodes.find(node => node.type === type); /** * Find a node of the given type */ exports.exceedsLimit = (min, max, step = 1, limit) => { if (limit === false) return false; if (!exports.isInteger(min) || !exports.isInteger(max)) return false; return ((Number(max) - Number(min)) / Number(step)) >= limit; }; /** * Escape the given node with '\\' before node.value */ exports.escapeNode = (block, n = 0, type) => { const node = block.nodes[n]; if (!node) return; if ((type && node.type === type) || node.type === 'open' || node.type === 'close') { if (node.escaped !== true) { node.value = '\\' + node.value; node.escaped = true; } } }; /** * Returns true if the given brace node should be enclosed in literal braces */ exports.encloseBrace = node => { if (node.type !== 'brace') return false; if ((node.commas >> 0 + node.ranges >> 0) === 0) { node.invalid = true; return true; } return false; }; /** * Returns true if a brace node is invalid. */ exports.isInvalidBrace = block => { if (block.type !== 'brace') return false; if (block.invalid === true || block.dollar) return true; if ((block.commas >> 0 + block.ranges >> 0) === 0) { block.invalid = true; return true; } if (block.open !== true || block.close !== true) { block.invalid = true; return true; } return false; }; /** * Returns true if a node is an open or close node */ exports.isOpenOrClose = node => { if (node.type === 'open' || node.type === 'close') { return true; } return node.open === true || node.close === true; }; /** * Reduce an array of text nodes. */ exports.reduce = nodes => nodes.reduce((acc, node) => { if (node.type === 'text') acc.push(node.value); if (node.type === 'range') node.type = 'text'; return acc; }, []); /** * Flatten an array */ exports.flatten = (...args) => { const result = []; const flat = arr => { for (let i = 0; i < arr.length; i++) { const ele = arr[i]; if (Array.isArray(ele)) { flat(ele); continue; } if (ele !== undefined) { result.push(ele); } } return result; }; flat(args); return result; }; node_modules/braces/lib/stringify.js 0000664 00000001304 15114741631 0013605 0 ustar 00 'use strict'; const utils = require('./utils'); module.exports = (ast, options = {}) => { const stringify = (node, parent = {}) => { const invalidBlock = options.escapeInvalid && utils.isInvalidBrace(parent); const invalidNode = node.invalid === true && options.escapeInvalid === true; let output = ''; if (node.value) { if ((invalidBlock || invalidNode) && utils.isOpenOrClose(node)) { return '\\' + node.value; } return node.value; } if (node.value) { return node.value; } if (node.nodes) { for (const child of node.nodes) { output += stringify(child); } } return output; }; return stringify(ast); }; node_modules/braces/lib/parse.js 0000664 00000015363 15114741631 0012713 0 ustar 00 'use strict'; const stringify = require('./stringify'); /** * Constants */ const { MAX_LENGTH, CHAR_BACKSLASH, /* \ */ CHAR_BACKTICK, /* ` */ CHAR_COMMA, /* , */ CHAR_DOT, /* . */ CHAR_LEFT_PARENTHESES, /* ( */ CHAR_RIGHT_PARENTHESES, /* ) */ CHAR_LEFT_CURLY_BRACE, /* { */ CHAR_RIGHT_CURLY_BRACE, /* } */ CHAR_LEFT_SQUARE_BRACKET, /* [ */ CHAR_RIGHT_SQUARE_BRACKET, /* ] */ CHAR_DOUBLE_QUOTE, /* " */ CHAR_SINGLE_QUOTE, /* ' */ CHAR_NO_BREAK_SPACE, CHAR_ZERO_WIDTH_NOBREAK_SPACE } = require('./constants'); /** * parse */ const parse = (input, options = {}) => { if (typeof input !== 'string') { throw new TypeError('Expected a string'); } const opts = options || {}; const max = typeof opts.maxLength === 'number' ? Math.min(MAX_LENGTH, opts.maxLength) : MAX_LENGTH; if (input.length > max) { throw new SyntaxError(`Input length (${input.length}), exceeds max characters (${max})`); } const ast = { type: 'root', input, nodes: [] }; const stack = [ast]; let block = ast; let prev = ast; let brackets = 0; const length = input.length; let index = 0; let depth = 0; let value; /** * Helpers */ const advance = () => input[index++]; const push = node => { if (node.type === 'text' && prev.type === 'dot') { prev.type = 'text'; } if (prev && prev.type === 'text' && node.type === 'text') { prev.value += node.value; return; } block.nodes.push(node); node.parent = block; node.prev = prev; prev = node; return node; }; push({ type: 'bos' }); while (index < length) { block = stack[stack.length - 1]; value = advance(); /** * Invalid chars */ if (value === CHAR_ZERO_WIDTH_NOBREAK_SPACE || value === CHAR_NO_BREAK_SPACE) { continue; } /** * Escaped chars */ if (value === CHAR_BACKSLASH) { push({ type: 'text', value: (options.keepEscaping ? value : '') + advance() }); continue; } /** * Right square bracket (literal): ']' */ if (value === CHAR_RIGHT_SQUARE_BRACKET) { push({ type: 'text', value: '\\' + value }); continue; } /** * Left square bracket: '[' */ if (value === CHAR_LEFT_SQUARE_BRACKET) { brackets++; let next; while (index < length && (next = advance())) { value += next; if (next === CHAR_LEFT_SQUARE_BRACKET) { brackets++; continue; } if (next === CHAR_BACKSLASH) { value += advance(); continue; } if (next === CHAR_RIGHT_SQUARE_BRACKET) { brackets--; if (brackets === 0) { break; } } } push({ type: 'text', value }); continue; } /** * Parentheses */ if (value === CHAR_LEFT_PARENTHESES) { block = push({ type: 'paren', nodes: [] }); stack.push(block); push({ type: 'text', value }); continue; } if (value === CHAR_RIGHT_PARENTHESES) { if (block.type !== 'paren') { push({ type: 'text', value }); continue; } block = stack.pop(); push({ type: 'text', value }); block = stack[stack.length - 1]; continue; } /** * Quotes: '|"|` */ if (value === CHAR_DOUBLE_QUOTE || value === CHAR_SINGLE_QUOTE || value === CHAR_BACKTICK) { const open = value; let next; if (options.keepQuotes !== true) { value = ''; } while (index < length && (next = advance())) { if (next === CHAR_BACKSLASH) { value += next + advance(); continue; } if (next === open) { if (options.keepQuotes === true) value += next; break; } value += next; } push({ type: 'text', value }); continue; } /** * Left curly brace: '{' */ if (value === CHAR_LEFT_CURLY_BRACE) { depth++; const dollar = prev.value && prev.value.slice(-1) === '$' || block.dollar === true; const brace = { type: 'brace', open: true, close: false, dollar, depth, commas: 0, ranges: 0, nodes: [] }; block = push(brace); stack.push(block); push({ type: 'open', value }); continue; } /** * Right curly brace: '}' */ if (value === CHAR_RIGHT_CURLY_BRACE) { if (block.type !== 'brace') { push({ type: 'text', value }); continue; } const type = 'close'; block = stack.pop(); block.close = true; push({ type, value }); depth--; block = stack[stack.length - 1]; continue; } /** * Comma: ',' */ if (value === CHAR_COMMA && depth > 0) { if (block.ranges > 0) { block.ranges = 0; const open = block.nodes.shift(); block.nodes = [open, { type: 'text', value: stringify(block) }]; } push({ type: 'comma', value }); block.commas++; continue; } /** * Dot: '.' */ if (value === CHAR_DOT && depth > 0 && block.commas === 0) { const siblings = block.nodes; if (depth === 0 || siblings.length === 0) { push({ type: 'text', value }); continue; } if (prev.type === 'dot') { block.range = []; prev.value += value; prev.type = 'range'; if (block.nodes.length !== 3 && block.nodes.length !== 5) { block.invalid = true; block.ranges = 0; prev.type = 'text'; continue; } block.ranges++; block.args = []; continue; } if (prev.type === 'range') { siblings.pop(); const before = siblings[siblings.length - 1]; before.value += prev.value + value; prev = before; block.ranges--; continue; } push({ type: 'dot', value }); continue; } /** * Text */ push({ type: 'text', value }); } // Mark imbalanced braces and brackets as invalid do { block = stack.pop(); if (block.type !== 'root') { block.nodes.forEach(node => { if (!node.nodes) { if (node.type === 'open') node.isOpen = true; if (node.type === 'close') node.isClose = true; if (!node.nodes) node.type = 'text'; node.invalid = true; } }); // get the location of the block on parent.nodes (block's siblings) const parent = stack[stack.length - 1]; const index = parent.nodes.indexOf(block); // replace the (invalid) block with it's nodes parent.nodes.splice(index, 1, ...block.nodes); } } while (stack.length > 0); push({ type: 'eos' }); return ast; }; module.exports = parse; node_modules/braces/lib/expand.js 0000664 00000005355 15114741631 0013060 0 ustar 00 'use strict'; const fill = require('fill-range'); const stringify = require('./stringify'); const utils = require('./utils'); const append = (queue = '', stash = '', enclose = false) => { const result = []; queue = [].concat(queue); stash = [].concat(stash); if (!stash.length) return queue; if (!queue.length) { return enclose ? utils.flatten(stash).map(ele => `{${ele}}`) : stash; } for (const item of queue) { if (Array.isArray(item)) { for (const value of item) { result.push(append(value, stash, enclose)); } } else { for (let ele of stash) { if (enclose === true && typeof ele === 'string') ele = `{${ele}}`; result.push(Array.isArray(ele) ? append(item, ele, enclose) : item + ele); } } } return utils.flatten(result); }; const expand = (ast, options = {}) => { const rangeLimit = options.rangeLimit === undefined ? 1000 : options.rangeLimit; const walk = (node, parent = {}) => { node.queue = []; let p = parent; let q = parent.queue; while (p.type !== 'brace' && p.type !== 'root' && p.parent) { p = p.parent; q = p.queue; } if (node.invalid || node.dollar) { q.push(append(q.pop(), stringify(node, options))); return; } if (node.type === 'brace' && node.invalid !== true && node.nodes.length === 2) { q.push(append(q.pop(), ['{}'])); return; } if (node.nodes && node.ranges > 0) { const args = utils.reduce(node.nodes); if (utils.exceedsLimit(...args, options.step, rangeLimit)) { throw new RangeError('expanded array length exceeds range limit. Use options.rangeLimit to increase or disable the limit.'); } let range = fill(...args, options); if (range.length === 0) { range = stringify(node, options); } q.push(append(q.pop(), range)); node.nodes = []; return; } const enclose = utils.encloseBrace(node); let queue = node.queue; let block = node; while (block.type !== 'brace' && block.type !== 'root' && block.parent) { block = block.parent; queue = block.queue; } for (let i = 0; i < node.nodes.length; i++) { const child = node.nodes[i]; if (child.type === 'comma' && node.type === 'brace') { if (i === 1) queue.push(''); queue.push(''); continue; } if (child.type === 'close') { q.push(append(q.pop(), queue, enclose)); continue; } if (child.value && child.type !== 'open') { queue.push(append(queue.pop(), child.value)); continue; } if (child.nodes) { walk(child, node); } } return queue; }; return utils.flatten(walk(ast)); }; module.exports = expand; node_modules/braces/lib/constants.js 0000664 00000003065 15114741631 0013611 0 ustar 00 'use strict'; module.exports = { MAX_LENGTH: 10000, // Digits CHAR_0: '0', /* 0 */ CHAR_9: '9', /* 9 */ // Alphabet chars. CHAR_UPPERCASE_A: 'A', /* A */ CHAR_LOWERCASE_A: 'a', /* a */ CHAR_UPPERCASE_Z: 'Z', /* Z */ CHAR_LOWERCASE_Z: 'z', /* z */ CHAR_LEFT_PARENTHESES: '(', /* ( */ CHAR_RIGHT_PARENTHESES: ')', /* ) */ CHAR_ASTERISK: '*', /* * */ // Non-alphabetic chars. CHAR_AMPERSAND: '&', /* & */ CHAR_AT: '@', /* @ */ CHAR_BACKSLASH: '\\', /* \ */ CHAR_BACKTICK: '`', /* ` */ CHAR_CARRIAGE_RETURN: '\r', /* \r */ CHAR_CIRCUMFLEX_ACCENT: '^', /* ^ */ CHAR_COLON: ':', /* : */ CHAR_COMMA: ',', /* , */ CHAR_DOLLAR: '$', /* . */ CHAR_DOT: '.', /* . */ CHAR_DOUBLE_QUOTE: '"', /* " */ CHAR_EQUAL: '=', /* = */ CHAR_EXCLAMATION_MARK: '!', /* ! */ CHAR_FORM_FEED: '\f', /* \f */ CHAR_FORWARD_SLASH: '/', /* / */ CHAR_HASH: '#', /* # */ CHAR_HYPHEN_MINUS: '-', /* - */ CHAR_LEFT_ANGLE_BRACKET: '<', /* < */ CHAR_LEFT_CURLY_BRACE: '{', /* { */ CHAR_LEFT_SQUARE_BRACKET: '[', /* [ */ CHAR_LINE_FEED: '\n', /* \n */ CHAR_NO_BREAK_SPACE: '\u00A0', /* \u00A0 */ CHAR_PERCENT: '%', /* % */ CHAR_PLUS: '+', /* + */ CHAR_QUESTION_MARK: '?', /* ? */ CHAR_RIGHT_ANGLE_BRACKET: '>', /* > */ CHAR_RIGHT_CURLY_BRACE: '}', /* } */ CHAR_RIGHT_SQUARE_BRACKET: ']', /* ] */ CHAR_SEMICOLON: ';', /* ; */ CHAR_SINGLE_QUOTE: '\'', /* ' */ CHAR_SPACE: ' ', /* */ CHAR_TAB: '\t', /* \t */ CHAR_UNDERSCORE: '_', /* _ */ CHAR_VERTICAL_LINE: '|', /* | */ CHAR_ZERO_WIDTH_NOBREAK_SPACE: '\uFEFF' /* \uFEFF */ }; node_modules/braces/lib/compile.js 0000664 00000002735 15114741631 0013230 0 ustar 00 'use strict'; const fill = require('fill-range'); const utils = require('./utils'); const compile = (ast, options = {}) => { const walk = (node, parent = {}) => { const invalidBlock = utils.isInvalidBrace(parent); const invalidNode = node.invalid === true && options.escapeInvalid === true; const invalid = invalidBlock === true || invalidNode === true; const prefix = options.escapeInvalid === true ? '\\' : ''; let output = ''; if (node.isOpen === true) { return prefix + node.value; } if (node.isClose === true) { console.log('node.isClose', prefix, node.value); return prefix + node.value; } if (node.type === 'open') { return invalid ? prefix + node.value : '('; } if (node.type === 'close') { return invalid ? prefix + node.value : ')'; } if (node.type === 'comma') { return node.prev.type === 'comma' ? '' : invalid ? node.value : '|'; } if (node.value) { return node.value; } if (node.nodes && node.ranges > 0) { const args = utils.reduce(node.nodes); const range = fill(...args, { ...options, wrap: false, toRegex: true, strictZeros: true }); if (range.length !== 0) { return args.length > 1 && range.length > 1 ? `(${range})` : range; } } if (node.nodes) { for (const child of node.nodes) { output += walk(child, node); } } return output; }; return walk(ast); }; module.exports = compile; node_modules/braces/index.js 0000664 00000010434 15114741631 0012134 0 ustar 00 'use strict'; const stringify = require('./lib/stringify'); const compile = require('./lib/compile'); const expand = require('./lib/expand'); const parse = require('./lib/parse'); /** * Expand the given pattern or create a regex-compatible string. * * ```js * const braces = require('braces'); * console.log(braces('{a,b,c}', { compile: true })); //=> ['(a|b|c)'] * console.log(braces('{a,b,c}')); //=> ['a', 'b', 'c'] * ``` * @param {String} `str` * @param {Object} `options` * @return {String} * @api public */ const braces = (input, options = {}) => { let output = []; if (Array.isArray(input)) { for (const pattern of input) { const result = braces.create(pattern, options); if (Array.isArray(result)) { output.push(...result); } else { output.push(result); } } } else { output = [].concat(braces.create(input, options)); } if (options && options.expand === true && options.nodupes === true) { output = [...new Set(output)]; } return output; }; /** * Parse the given `str` with the given `options`. * * ```js * // braces.parse(pattern, [, options]); * const ast = braces.parse('a/{b,c}/d'); * console.log(ast); * ``` * @param {String} pattern Brace pattern to parse * @param {Object} options * @return {Object} Returns an AST * @api public */ braces.parse = (input, options = {}) => parse(input, options); /** * Creates a braces string from an AST, or an AST node. * * ```js * const braces = require('braces'); * let ast = braces.parse('foo/{a,b}/bar'); * console.log(stringify(ast.nodes[2])); //=> '{a,b}' * ``` * @param {String} `input` Brace pattern or AST. * @param {Object} `options` * @return {Array} Returns an array of expanded values. * @api public */ braces.stringify = (input, options = {}) => { if (typeof input === 'string') { return stringify(braces.parse(input, options), options); } return stringify(input, options); }; /** * Compiles a brace pattern into a regex-compatible, optimized string. * This method is called by the main [braces](#braces) function by default. * * ```js * const braces = require('braces'); * console.log(braces.compile('a/{b,c}/d')); * //=> ['a/(b|c)/d'] * ``` * @param {String} `input` Brace pattern or AST. * @param {Object} `options` * @return {Array} Returns an array of expanded values. * @api public */ braces.compile = (input, options = {}) => { if (typeof input === 'string') { input = braces.parse(input, options); } return compile(input, options); }; /** * Expands a brace pattern into an array. This method is called by the * main [braces](#braces) function when `options.expand` is true. Before * using this method it's recommended that you read the [performance notes](#performance)) * and advantages of using [.compile](#compile) instead. * * ```js * const braces = require('braces'); * console.log(braces.expand('a/{b,c}/d')); * //=> ['a/b/d', 'a/c/d']; * ``` * @param {String} `pattern` Brace pattern * @param {Object} `options` * @return {Array} Returns an array of expanded values. * @api public */ braces.expand = (input, options = {}) => { if (typeof input === 'string') { input = braces.parse(input, options); } let result = expand(input, options); // filter out empty strings if specified if (options.noempty === true) { result = result.filter(Boolean); } // filter out duplicates if specified if (options.nodupes === true) { result = [...new Set(result)]; } return result; }; /** * Processes a brace pattern and returns either an expanded array * (if `options.expand` is true), a highly optimized regex-compatible string. * This method is called by the main [braces](#braces) function. * * ```js * const braces = require('braces'); * console.log(braces.create('user-{200..300}/project-{a,b,c}-{1..10}')) * //=> 'user-(20[0-9]|2[1-9][0-9]|300)/project-(a|b|c)-([1-9]|10)' * ``` * @param {String} `pattern` Brace pattern * @param {Object} `options` * @return {Array} Returns an array of expanded values. * @api public */ braces.create = (input, options = {}) => { if (input === '' || input.length < 3) { return [input]; } return options.expand !== true ? braces.compile(input, options) : braces.expand(input, options); }; /** * Expose "braces" */ module.exports = braces; node_modules/braces/README.md 0000664 00000052001 15114741631 0011742 0 ustar 00 # braces [](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=W8YFZ425KND68) [](https://www.npmjs.com/package/braces) [](https://npmjs.org/package/braces) [](https://npmjs.org/package/braces) [](https://travis-ci.org/micromatch/braces) > Bash-like brace expansion, implemented in JavaScript. Safer than other brace expansion libs, with complete support for the Bash 4.3 braces specification, without sacrificing speed. Please consider following this project's author, [Jon Schlinkert](https://github.com/jonschlinkert), and consider starring the project to show your :heart: and support. ## Install Install with [npm](https://www.npmjs.com/): ```sh $ npm install --save braces ``` ## v3.0.0 Released!! See the [changelog](CHANGELOG.md) for details. ## Why use braces? Brace patterns make globs more powerful by adding the ability to match specific ranges and sequences of characters. - **Accurate** - complete support for the [Bash 4.3 Brace Expansion](www.gnu.org/software/bash/) specification (passes all of the Bash braces tests) - **[fast and performant](#benchmarks)** - Starts fast, runs fast and [scales well](#performance) as patterns increase in complexity. - **Organized code base** - The parser and compiler are easy to maintain and update when edge cases crop up. - **Well-tested** - Thousands of test assertions, and passes all of the Bash, minimatch, and [brace-expansion](https://github.com/juliangruber/brace-expansion) unit tests (as of the date this was written). - **Safer** - You shouldn't have to worry about users defining aggressive or malicious brace patterns that can break your application. Braces takes measures to prevent malicious regex that can be used for DDoS attacks (see [catastrophic backtracking](https://www.regular-expressions.info/catastrophic.html)). - [Supports lists](#lists) - (aka "sets") `a/{b,c}/d` => `['a/b/d', 'a/c/d']` - [Supports sequences](#sequences) - (aka "ranges") `{01..03}` => `['01', '02', '03']` - [Supports steps](#steps) - (aka "increments") `{2..10..2}` => `['2', '4', '6', '8', '10']` - [Supports escaping](#escaping) - To prevent evaluation of special characters. ## Usage The main export is a function that takes one or more brace `patterns` and `options`. ```js const braces = require('braces'); // braces(patterns[, options]); console.log(braces(['{01..05}', '{a..e}'])); //=> ['(0[1-5])', '([a-e])'] console.log(braces(['{01..05}', '{a..e}'], { expand: true })); //=> ['01', '02', '03', '04', '05', 'a', 'b', 'c', 'd', 'e'] ``` ### Brace Expansion vs. Compilation By default, brace patterns are compiled into strings that are optimized for creating regular expressions and matching. **Compiled** ```js console.log(braces('a/{x,y,z}/b')); //=> ['a/(x|y|z)/b'] console.log(braces(['a/{01..20}/b', 'a/{1..5}/b'])); //=> [ 'a/(0[1-9]|1[0-9]|20)/b', 'a/([1-5])/b' ] ``` **Expanded** Enable brace expansion by setting the `expand` option to true, or by using [braces.expand()](#expand) (returns an array similar to what you'd expect from Bash, or `echo {1..5}`, or [minimatch](https://github.com/isaacs/minimatch)): ```js console.log(braces('a/{x,y,z}/b', { expand: true })); //=> ['a/x/b', 'a/y/b', 'a/z/b'] console.log(braces.expand('{01..10}')); //=> ['01','02','03','04','05','06','07','08','09','10'] ``` ### Lists Expand lists (like Bash "sets"): ```js console.log(braces('a/{foo,bar,baz}/*.js')); //=> ['a/(foo|bar|baz)/*.js'] console.log(braces.expand('a/{foo,bar,baz}/*.js')); //=> ['a/foo/*.js', 'a/bar/*.js', 'a/baz/*.js'] ``` ### Sequences Expand ranges of characters (like Bash "sequences"): ```js console.log(braces.expand('{1..3}')); // ['1', '2', '3'] console.log(braces.expand('a/{1..3}/b')); // ['a/1/b', 'a/2/b', 'a/3/b'] console.log(braces('{a..c}', { expand: true })); // ['a', 'b', 'c'] console.log(braces('foo/{a..c}', { expand: true })); // ['foo/a', 'foo/b', 'foo/c'] // supports zero-padded ranges console.log(braces('a/{01..03}/b')); //=> ['a/(0[1-3])/b'] console.log(braces('a/{001..300}/b')); //=> ['a/(0{2}[1-9]|0[1-9][0-9]|[12][0-9]{2}|300)/b'] ``` See [fill-range](https://github.com/jonschlinkert/fill-range) for all available range-expansion options. ### Steppped ranges Steps, or increments, may be used with ranges: ```js console.log(braces.expand('{2..10..2}')); //=> ['2', '4', '6', '8', '10'] console.log(braces('{2..10..2}')); //=> ['(2|4|6|8|10)'] ``` When the [.optimize](#optimize) method is used, or [options.optimize](#optionsoptimize) is set to true, sequences are passed to [to-regex-range](https://github.com/jonschlinkert/to-regex-range) for expansion. ### Nesting Brace patterns may be nested. The results of each expanded string are not sorted, and left to right order is preserved. **"Expanded" braces** ```js console.log(braces.expand('a{b,c,/{x,y}}/e')); //=> ['ab/e', 'ac/e', 'a/x/e', 'a/y/e'] console.log(braces.expand('a/{x,{1..5},y}/c')); //=> ['a/x/c', 'a/1/c', 'a/2/c', 'a/3/c', 'a/4/c', 'a/5/c', 'a/y/c'] ``` **"Optimized" braces** ```js console.log(braces('a{b,c,/{x,y}}/e')); //=> ['a(b|c|/(x|y))/e'] console.log(braces('a/{x,{1..5},y}/c')); //=> ['a/(x|([1-5])|y)/c'] ``` ### Escaping **Escaping braces** A brace pattern will not be expanded or evaluted if _either the opening or closing brace is escaped_: ```js console.log(braces.expand('a\\{d,c,b}e')); //=> ['a{d,c,b}e'] console.log(braces.expand('a{d,c,b\\}e')); //=> ['a{d,c,b}e'] ``` **Escaping commas** Commas inside braces may also be escaped: ```js console.log(braces.expand('a{b\\,c}d')); //=> ['a{b,c}d'] console.log(braces.expand('a{d\\,c,b}e')); //=> ['ad,ce', 'abe'] ``` **Single items** Following bash conventions, a brace pattern is also not expanded when it contains a single character: ```js console.log(braces.expand('a{b}c')); //=> ['a{b}c'] ``` ## Options ### options.maxLength **Type**: `Number` **Default**: `10,000` **Description**: Limit the length of the input string. Useful when the input string is generated or your application allows users to pass a string, et cetera. ```js console.log(braces('a/{b,c}/d', { maxLength: 3 })); //=> throws an error ``` ### options.expand **Type**: `Boolean` **Default**: `undefined` **Description**: Generate an "expanded" brace pattern (alternatively you can use the `braces.expand()` method, which does the same thing). ```js console.log(braces('a/{b,c}/d', { expand: true })); //=> [ 'a/b/d', 'a/c/d' ] ``` ### options.nodupes **Type**: `Boolean` **Default**: `undefined` **Description**: Remove duplicates from the returned array. ### options.rangeLimit **Type**: `Number` **Default**: `1000` **Description**: To prevent malicious patterns from being passed by users, an error is thrown when `braces.expand()` is used or `options.expand` is true and the generated range will exceed the `rangeLimit`. You can customize `options.rangeLimit` or set it to `Inifinity` to disable this altogether. **Examples** ```js // pattern exceeds the "rangeLimit", so it's optimized automatically console.log(braces.expand('{1..1000}')); //=> ['([1-9]|[1-9][0-9]{1,2}|1000)'] // pattern does not exceed "rangeLimit", so it's NOT optimized console.log(braces.expand('{1..100}')); //=> ['1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11', '12', '13', '14', '15', '16', '17', '18', '19', '20', '21', '22', '23', '24', '25', '26', '27', '28', '29', '30', '31', '32', '33', '34', '35', '36', '37', '38', '39', '40', '41', '42', '43', '44', '45', '46', '47', '48', '49', '50', '51', '52', '53', '54', '55', '56', '57', '58', '59', '60', '61', '62', '63', '64', '65', '66', '67', '68', '69', '70', '71', '72', '73', '74', '75', '76', '77', '78', '79', '80', '81', '82', '83', '84', '85', '86', '87', '88', '89', '90', '91', '92', '93', '94', '95', '96', '97', '98', '99', '100'] ``` ### options.transform **Type**: `Function` **Default**: `undefined` **Description**: Customize range expansion. **Example: Transforming non-numeric values** ```js const alpha = braces.expand('x/{a..e}/y', { transform(value, index) { // When non-numeric values are passed, "value" is a character code. return 'foo/' + String.fromCharCode(value) + '-' + index; }, }); console.log(alpha); //=> [ 'x/foo/a-0/y', 'x/foo/b-1/y', 'x/foo/c-2/y', 'x/foo/d-3/y', 'x/foo/e-4/y' ] ``` **Example: Transforming numeric values** ```js const numeric = braces.expand('{1..5}', { transform(value) { // when numeric values are passed, "value" is a number return 'foo/' + value * 2; }, }); console.log(numeric); //=> [ 'foo/2', 'foo/4', 'foo/6', 'foo/8', 'foo/10' ] ``` ### options.quantifiers **Type**: `Boolean` **Default**: `undefined` **Description**: In regular expressions, quanitifiers can be used to specify how many times a token can be repeated. For example, `a{1,3}` will match the letter `a` one to three times. Unfortunately, regex quantifiers happen to share the same syntax as [Bash lists](#lists) The `quantifiers` option tells braces to detect when [regex quantifiers](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp#quantifiers) are defined in the given pattern, and not to try to expand them as lists. **Examples** ```js const braces = require('braces'); console.log(braces('a/b{1,3}/{x,y,z}')); //=> [ 'a/b(1|3)/(x|y|z)' ] console.log(braces('a/b{1,3}/{x,y,z}', { quantifiers: true })); //=> [ 'a/b{1,3}/(x|y|z)' ] console.log(braces('a/b{1,3}/{x,y,z}', { quantifiers: true, expand: true })); //=> [ 'a/b{1,3}/x', 'a/b{1,3}/y', 'a/b{1,3}/z' ] ``` ### options.keepEscaping **Type**: `Boolean` **Default**: `undefined` **Description**: Do not strip backslashes that were used for escaping from the result. ## What is "brace expansion"? Brace expansion is a type of parameter expansion that was made popular by unix shells for generating lists of strings, as well as regex-like matching when used alongside wildcards (globs). In addition to "expansion", braces are also used for matching. In other words: - [brace expansion](#brace-expansion) is for generating new lists - [brace matching](#brace-matching) is for filtering existing lists <details> <summary><strong>More about brace expansion</strong> (click to expand)</summary> There are two main types of brace expansion: 1. **lists**: which are defined using comma-separated values inside curly braces: `{a,b,c}` 2. **sequences**: which are defined using a starting value and an ending value, separated by two dots: `a{1..3}b`. Optionally, a third argument may be passed to define a "step" or increment to use: `a{1..100..10}b`. These are also sometimes referred to as "ranges". Here are some example brace patterns to illustrate how they work: **Sets** ``` {a,b,c} => a b c {a,b,c}{1,2} => a1 a2 b1 b2 c1 c2 ``` **Sequences** ``` {1..9} => 1 2 3 4 5 6 7 8 9 {4..-4} => 4 3 2 1 0 -1 -2 -3 -4 {1..20..3} => 1 4 7 10 13 16 19 {a..j} => a b c d e f g h i j {j..a} => j i h g f e d c b a {a..z..3} => a d g j m p s v y ``` **Combination** Sets and sequences can be mixed together or used along with any other strings. ``` {a,b,c}{1..3} => a1 a2 a3 b1 b2 b3 c1 c2 c3 foo/{a,b,c}/bar => foo/a/bar foo/b/bar foo/c/bar ``` The fact that braces can be "expanded" from relatively simple patterns makes them ideal for quickly generating test fixtures, file paths, and similar use cases. ## Brace matching In addition to _expansion_, brace patterns are also useful for performing regular-expression-like matching. For example, the pattern `foo/{1..3}/bar` would match any of following strings: ``` foo/1/bar foo/2/bar foo/3/bar ``` But not: ``` baz/1/qux baz/2/qux baz/3/qux ``` Braces can also be combined with [glob patterns](https://github.com/jonschlinkert/micromatch) to perform more advanced wildcard matching. For example, the pattern `*/{1..3}/*` would match any of following strings: ``` foo/1/bar foo/2/bar foo/3/bar baz/1/qux baz/2/qux baz/3/qux ``` ## Brace matching pitfalls Although brace patterns offer a user-friendly way of matching ranges or sets of strings, there are also some major disadvantages and potential risks you should be aware of. ### tldr **"brace bombs"** - brace expansion can eat up a huge amount of processing resources - as brace patterns increase _linearly in size_, the system resources required to expand the pattern increase exponentially - users can accidentally (or intentially) exhaust your system's resources resulting in the equivalent of a DoS attack (bonus: no programming knowledge is required!) For a more detailed explanation with examples, see the [geometric complexity](#geometric-complexity) section. ### The solution Jump to the [performance section](#performance) to see how Braces solves this problem in comparison to other libraries. ### Geometric complexity At minimum, brace patterns with sets limited to two elements have quadradic or `O(n^2)` complexity. But the complexity of the algorithm increases exponentially as the number of sets, _and elements per set_, increases, which is `O(n^c)`. For example, the following sets demonstrate quadratic (`O(n^2)`) complexity: ``` {1,2}{3,4} => (2X2) => 13 14 23 24 {1,2}{3,4}{5,6} => (2X2X2) => 135 136 145 146 235 236 245 246 ``` But add an element to a set, and we get a n-fold Cartesian product with `O(n^c)` complexity: ``` {1,2,3}{4,5,6}{7,8,9} => (3X3X3) => 147 148 149 157 158 159 167 168 169 247 248 249 257 258 259 267 268 269 347 348 349 357 358 359 367 368 369 ``` Now, imagine how this complexity grows given that each element is a n-tuple: ``` {1..100}{1..100} => (100X100) => 10,000 elements (38.4 kB) {1..100}{1..100}{1..100} => (100X100X100) => 1,000,000 elements (5.76 MB) ``` Although these examples are clearly contrived, they demonstrate how brace patterns can quickly grow out of control. **More information** Interested in learning more about brace expansion? - [linuxjournal/bash-brace-expansion](http://www.linuxjournal.com/content/bash-brace-expansion) - [rosettacode/Brace_expansion](https://rosettacode.org/wiki/Brace_expansion) - [cartesian product](https://en.wikipedia.org/wiki/Cartesian_product) </details> ## Performance Braces is not only screaming fast, it's also more accurate the other brace expansion libraries. ### Better algorithms Fortunately there is a solution to the ["brace bomb" problem](#brace-matching-pitfalls): _don't expand brace patterns into an array when they're used for matching_. Instead, convert the pattern into an optimized regular expression. This is easier said than done, and braces is the only library that does this currently. **The proof is in the numbers** Minimatch gets exponentially slower as patterns increase in complexity, braces does not. The following results were generated using `braces()` and `minimatch.braceExpand()`, respectively. | **Pattern** | **braces** | **[minimatch][]** | | --------------------------- | ------------------- | ---------------------------- | | `{1..9007199254740991}`[^1] | `298 B` (5ms 459μs) | N/A (freezes) | | `{1..1000000000000000}` | `41 B` (1ms 15μs) | N/A (freezes) | | `{1..100000000000000}` | `40 B` (890μs) | N/A (freezes) | | `{1..10000000000000}` | `39 B` (2ms 49μs) | N/A (freezes) | | `{1..1000000000000}` | `38 B` (608μs) | N/A (freezes) | | `{1..100000000000}` | `37 B` (397μs) | N/A (freezes) | | `{1..10000000000}` | `35 B` (983μs) | N/A (freezes) | | `{1..1000000000}` | `34 B` (798μs) | N/A (freezes) | | `{1..100000000}` | `33 B` (733μs) | N/A (freezes) | | `{1..10000000}` | `32 B` (5ms 632μs) | `78.89 MB` (16s 388ms 569μs) | | `{1..1000000}` | `31 B` (1ms 381μs) | `6.89 MB` (1s 496ms 887μs) | | `{1..100000}` | `30 B` (950μs) | `588.89 kB` (146ms 921μs) | | `{1..10000}` | `29 B` (1ms 114μs) | `48.89 kB` (14ms 187μs) | | `{1..1000}` | `28 B` (760μs) | `3.89 kB` (1ms 453μs) | | `{1..100}` | `22 B` (345μs) | `291 B` (196μs) | | `{1..10}` | `10 B` (533μs) | `20 B` (37μs) | | `{1..3}` | `7 B` (190μs) | `5 B` (27μs) | ### Faster algorithms When you need expansion, braces is still much faster. _(the following results were generated using `braces.expand()` and `minimatch.braceExpand()`, respectively)_ | **Pattern** | **braces** | **[minimatch][]** | | --------------- | --------------------------- | ---------------------------- | | `{1..10000000}` | `78.89 MB` (2s 698ms 642μs) | `78.89 MB` (18s 601ms 974μs) | | `{1..1000000}` | `6.89 MB` (458ms 576μs) | `6.89 MB` (1s 491ms 621μs) | | `{1..100000}` | `588.89 kB` (20ms 728μs) | `588.89 kB` (156ms 919μs) | | `{1..10000}` | `48.89 kB` (2ms 202μs) | `48.89 kB` (13ms 641μs) | | `{1..1000}` | `3.89 kB` (1ms 796μs) | `3.89 kB` (1ms 958μs) | | `{1..100}` | `291 B` (424μs) | `291 B` (211μs) | | `{1..10}` | `20 B` (487μs) | `20 B` (72μs) | | `{1..3}` | `5 B` (166μs) | `5 B` (27μs) | If you'd like to run these comparisons yourself, see [test/support/generate.js](test/support/generate.js). ## Benchmarks ### Running benchmarks Install dev dependencies: ```bash npm i -d && npm benchmark ``` ### Latest results Braces is more accurate, without sacrificing performance. ```bash ● expand - range (expanded) braces x 53,167 ops/sec ±0.12% (102 runs sampled) minimatch x 11,378 ops/sec ±0.10% (102 runs sampled) ● expand - range (optimized for regex) braces x 373,442 ops/sec ±0.04% (100 runs sampled) minimatch x 3,262 ops/sec ±0.18% (100 runs sampled) ● expand - nested ranges (expanded) braces x 33,921 ops/sec ±0.09% (99 runs sampled) minimatch x 10,855 ops/sec ±0.28% (100 runs sampled) ● expand - nested ranges (optimized for regex) braces x 287,479 ops/sec ±0.52% (98 runs sampled) minimatch x 3,219 ops/sec ±0.28% (101 runs sampled) ● expand - set (expanded) braces x 238,243 ops/sec ±0.19% (97 runs sampled) minimatch x 538,268 ops/sec ±0.31% (96 runs sampled) ● expand - set (optimized for regex) braces x 321,844 ops/sec ±0.10% (97 runs sampled) minimatch x 140,600 ops/sec ±0.15% (100 runs sampled) ● expand - nested sets (expanded) braces x 165,371 ops/sec ±0.42% (96 runs sampled) minimatch x 337,720 ops/sec ±0.28% (100 runs sampled) ● expand - nested sets (optimized for regex) braces x 242,948 ops/sec ±0.12% (99 runs sampled) minimatch x 87,403 ops/sec ±0.79% (96 runs sampled) ``` ## About <details> <summary><strong>Contributing</strong></summary> Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new). </details> <details> <summary><strong>Running Tests</strong></summary> Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command: ```sh $ npm install && npm test ``` </details> <details> <summary><strong>Building docs</strong></summary> _(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_ To generate the readme, run the following command: ```sh $ npm install -g verbose/verb#dev verb-generate-readme && verb ``` </details> ### Contributors | **Commits** | **Contributor** | | ----------- | ------------------------------------------------------------- | | 197 | [jonschlinkert](https://github.com/jonschlinkert) | | 4 | [doowb](https://github.com/doowb) | | 1 | [es128](https://github.com/es128) | | 1 | [eush77](https://github.com/eush77) | | 1 | [hemanth](https://github.com/hemanth) | | 1 | [wtgtybhertgeghgtwtg](https://github.com/wtgtybhertgeghgtwtg) | ### Author **Jon Schlinkert** - [GitHub Profile](https://github.com/jonschlinkert) - [Twitter Profile](https://twitter.com/jonschlinkert) - [LinkedIn Profile](https://linkedin.com/in/jonschlinkert) ### License Copyright © 2019, [Jon Schlinkert](https://github.com/jonschlinkert). Released under the [MIT License](LICENSE). --- _This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.8.0, on April 08, 2019._ node_modules/chokidar/package.json 0000664 00000003160 15114741631 0013300 0 ustar 00 { "name": "chokidar", "description": "Minimal and efficient cross-platform file watching library", "version": "3.6.0", "homepage": "https://github.com/paulmillr/chokidar", "author": "Paul Miller (https://paulmillr.com)", "contributors": [ "Paul Miller (https://paulmillr.com)", "Elan Shanker" ], "engines": { "node": ">= 8.10.0" }, "main": "index.js", "types": "./types/index.d.ts", "dependencies": { "anymatch": "~3.1.2", "braces": "~3.0.2", "glob-parent": "~5.1.2", "is-binary-path": "~2.1.0", "is-glob": "~4.0.1", "normalize-path": "~3.0.0", "readdirp": "~3.6.0" }, "optionalDependencies": { "fsevents": "~2.3.2" }, "devDependencies": { "@types/node": "^14", "chai": "^4.3", "dtslint": "^3.3.0", "eslint": "^7.0.0", "mocha": "^7.0.0", "rimraf": "^3.0.0", "sinon": "^9.0.1", "sinon-chai": "^3.3.0", "typescript": "^4.4.3", "upath": "^1.2.0" }, "files": [ "index.js", "lib/*.js", "types/index.d.ts" ], "repository": { "type": "git", "url": "git+https://github.com/paulmillr/chokidar.git" }, "bugs": { "url": "https://github.com/paulmillr/chokidar/issues" }, "license": "MIT", "scripts": { "dtslint": "dtslint types", "lint": "eslint --report-unused-disable-directives --ignore-path .gitignore .", "build": "npm ls", "mocha": "mocha --exit --timeout 90000", "test": "npm run lint && npm run mocha" }, "keywords": [ "fs", "watch", "watchFile", "watcher", "watching", "file", "fsevents" ], "funding": "https://paulmillr.com/funding/" } node_modules/chokidar/LICENSE 0000664 00000002151 15114741631 0012016 0 ustar 00 The MIT License (MIT) Copyright (c) 2012-2019 Paul Miller (https://paulmillr.com), Elan Shanker Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. node_modules/chokidar/lib/fsevents-handler.js 0000664 00000037760 15114741631 0015403 0 ustar 00 'use strict'; const fs = require('fs'); const sysPath = require('path'); const { promisify } = require('util'); let fsevents; try { fsevents = require('fsevents'); } catch (error) { if (process.env.CHOKIDAR_PRINT_FSEVENTS_REQUIRE_ERROR) console.error(error); } if (fsevents) { // TODO: real check const mtch = process.version.match(/v(\d+)\.(\d+)/); if (mtch && mtch[1] && mtch[2]) { const maj = Number.parseInt(mtch[1], 10); const min = Number.parseInt(mtch[2], 10); if (maj === 8 && min < 16) { fsevents = undefined; } } } const { EV_ADD, EV_CHANGE, EV_ADD_DIR, EV_UNLINK, EV_ERROR, STR_DATA, STR_END, FSEVENT_CREATED, FSEVENT_MODIFIED, FSEVENT_DELETED, FSEVENT_MOVED, // FSEVENT_CLONED, FSEVENT_UNKNOWN, FSEVENT_FLAG_MUST_SCAN_SUBDIRS, FSEVENT_TYPE_FILE, FSEVENT_TYPE_DIRECTORY, FSEVENT_TYPE_SYMLINK, ROOT_GLOBSTAR, DIR_SUFFIX, DOT_SLASH, FUNCTION_TYPE, EMPTY_FN, IDENTITY_FN } = require('./constants'); const Depth = (value) => isNaN(value) ? {} : {depth: value}; const stat = promisify(fs.stat); const lstat = promisify(fs.lstat); const realpath = promisify(fs.realpath); const statMethods = { stat, lstat }; /** * @typedef {String} Path */ /** * @typedef {Object} FsEventsWatchContainer * @property {Set<Function>} listeners * @property {Function} rawEmitter * @property {{stop: Function}} watcher */ // fsevents instance helper functions /** * Object to hold per-process fsevents instances (may be shared across chokidar FSWatcher instances) * @type {Map<Path,FsEventsWatchContainer>} */ const FSEventsWatchers = new Map(); // Threshold of duplicate path prefixes at which to start // consolidating going forward const consolidateThreshhold = 10; const wrongEventFlags = new Set([ 69888, 70400, 71424, 72704, 73472, 131328, 131840, 262912 ]); /** * Instantiates the fsevents interface * @param {Path} path path to be watched * @param {Function} callback called when fsevents is bound and ready * @returns {{stop: Function}} new fsevents instance */ const createFSEventsInstance = (path, callback) => { const stop = fsevents.watch(path, callback); return {stop}; }; /** * Instantiates the fsevents interface or binds listeners to an existing one covering * the same file tree. * @param {Path} path - to be watched * @param {Path} realPath - real path for symlinks * @param {Function} listener - called when fsevents emits events * @param {Function} rawEmitter - passes data to listeners of the 'raw' event * @returns {Function} closer */ function setFSEventsListener(path, realPath, listener, rawEmitter) { let watchPath = sysPath.extname(realPath) ? sysPath.dirname(realPath) : realPath; const parentPath = sysPath.dirname(watchPath); let cont = FSEventsWatchers.get(watchPath); // If we've accumulated a substantial number of paths that // could have been consolidated by watching one directory // above the current one, create a watcher on the parent // path instead, so that we do consolidate going forward. if (couldConsolidate(parentPath)) { watchPath = parentPath; } const resolvedPath = sysPath.resolve(path); const hasSymlink = resolvedPath !== realPath; const filteredListener = (fullPath, flags, info) => { if (hasSymlink) fullPath = fullPath.replace(realPath, resolvedPath); if ( fullPath === resolvedPath || !fullPath.indexOf(resolvedPath + sysPath.sep) ) listener(fullPath, flags, info); }; // check if there is already a watcher on a parent path // modifies `watchPath` to the parent path when it finds a match let watchedParent = false; for (const watchedPath of FSEventsWatchers.keys()) { if (realPath.indexOf(sysPath.resolve(watchedPath) + sysPath.sep) === 0) { watchPath = watchedPath; cont = FSEventsWatchers.get(watchPath); watchedParent = true; break; } } if (cont || watchedParent) { cont.listeners.add(filteredListener); } else { cont = { listeners: new Set([filteredListener]), rawEmitter, watcher: createFSEventsInstance(watchPath, (fullPath, flags) => { if (!cont.listeners.size) return; if (flags & FSEVENT_FLAG_MUST_SCAN_SUBDIRS) return; const info = fsevents.getInfo(fullPath, flags); cont.listeners.forEach(list => { list(fullPath, flags, info); }); cont.rawEmitter(info.event, fullPath, info); }) }; FSEventsWatchers.set(watchPath, cont); } // removes this instance's listeners and closes the underlying fsevents // instance if there are no more listeners left return () => { const lst = cont.listeners; lst.delete(filteredListener); if (!lst.size) { FSEventsWatchers.delete(watchPath); if (cont.watcher) return cont.watcher.stop().then(() => { cont.rawEmitter = cont.watcher = undefined; Object.freeze(cont); }); } }; } // Decide whether or not we should start a new higher-level // parent watcher const couldConsolidate = (path) => { let count = 0; for (const watchPath of FSEventsWatchers.keys()) { if (watchPath.indexOf(path) === 0) { count++; if (count >= consolidateThreshhold) { return true; } } } return false; }; // returns boolean indicating whether fsevents can be used const canUse = () => fsevents && FSEventsWatchers.size < 128; // determines subdirectory traversal levels from root to path const calcDepth = (path, root) => { let i = 0; while (!path.indexOf(root) && (path = sysPath.dirname(path)) !== root) i++; return i; }; // returns boolean indicating whether the fsevents' event info has the same type // as the one returned by fs.stat const sameTypes = (info, stats) => ( info.type === FSEVENT_TYPE_DIRECTORY && stats.isDirectory() || info.type === FSEVENT_TYPE_SYMLINK && stats.isSymbolicLink() || info.type === FSEVENT_TYPE_FILE && stats.isFile() ) /** * @mixin */ class FsEventsHandler { /** * @param {import('../index').FSWatcher} fsw */ constructor(fsw) { this.fsw = fsw; } checkIgnored(path, stats) { const ipaths = this.fsw._ignoredPaths; if (this.fsw._isIgnored(path, stats)) { ipaths.add(path); if (stats && stats.isDirectory()) { ipaths.add(path + ROOT_GLOBSTAR); } return true; } ipaths.delete(path); ipaths.delete(path + ROOT_GLOBSTAR); } addOrChange(path, fullPath, realPath, parent, watchedDir, item, info, opts) { const event = watchedDir.has(item) ? EV_CHANGE : EV_ADD; this.handleEvent(event, path, fullPath, realPath, parent, watchedDir, item, info, opts); } async checkExists(path, fullPath, realPath, parent, watchedDir, item, info, opts) { try { const stats = await stat(path) if (this.fsw.closed) return; if (sameTypes(info, stats)) { this.addOrChange(path, fullPath, realPath, parent, watchedDir, item, info, opts); } else { this.handleEvent(EV_UNLINK, path, fullPath, realPath, parent, watchedDir, item, info, opts); } } catch (error) { if (error.code === 'EACCES') { this.addOrChange(path, fullPath, realPath, parent, watchedDir, item, info, opts); } else { this.handleEvent(EV_UNLINK, path, fullPath, realPath, parent, watchedDir, item, info, opts); } } } handleEvent(event, path, fullPath, realPath, parent, watchedDir, item, info, opts) { if (this.fsw.closed || this.checkIgnored(path)) return; if (event === EV_UNLINK) { const isDirectory = info.type === FSEVENT_TYPE_DIRECTORY // suppress unlink events on never before seen files if (isDirectory || watchedDir.has(item)) { this.fsw._remove(parent, item, isDirectory); } } else { if (event === EV_ADD) { // track new directories if (info.type === FSEVENT_TYPE_DIRECTORY) this.fsw._getWatchedDir(path); if (info.type === FSEVENT_TYPE_SYMLINK && opts.followSymlinks) { // push symlinks back to the top of the stack to get handled const curDepth = opts.depth === undefined ? undefined : calcDepth(fullPath, realPath) + 1; return this._addToFsEvents(path, false, true, curDepth); } // track new paths // (other than symlinks being followed, which will be tracked soon) this.fsw._getWatchedDir(parent).add(item); } /** * @type {'add'|'addDir'|'unlink'|'unlinkDir'} */ const eventName = info.type === FSEVENT_TYPE_DIRECTORY ? event + DIR_SUFFIX : event; this.fsw._emit(eventName, path); if (eventName === EV_ADD_DIR) this._addToFsEvents(path, false, true); } } /** * Handle symlinks encountered during directory scan * @param {String} watchPath - file/dir path to be watched with fsevents * @param {String} realPath - real path (in case of symlinks) * @param {Function} transform - path transformer * @param {Function} globFilter - path filter in case a glob pattern was provided * @returns {Function} closer for the watcher instance */ _watchWithFsEvents(watchPath, realPath, transform, globFilter) { if (this.fsw.closed || this.fsw._isIgnored(watchPath)) return; const opts = this.fsw.options; const watchCallback = async (fullPath, flags, info) => { if (this.fsw.closed) return; if ( opts.depth !== undefined && calcDepth(fullPath, realPath) > opts.depth ) return; const path = transform(sysPath.join( watchPath, sysPath.relative(watchPath, fullPath) )); if (globFilter && !globFilter(path)) return; // ensure directories are tracked const parent = sysPath.dirname(path); const item = sysPath.basename(path); const watchedDir = this.fsw._getWatchedDir( info.type === FSEVENT_TYPE_DIRECTORY ? path : parent ); // correct for wrong events emitted if (wrongEventFlags.has(flags) || info.event === FSEVENT_UNKNOWN) { if (typeof opts.ignored === FUNCTION_TYPE) { let stats; try { stats = await stat(path); } catch (error) {} if (this.fsw.closed) return; if (this.checkIgnored(path, stats)) return; if (sameTypes(info, stats)) { this.addOrChange(path, fullPath, realPath, parent, watchedDir, item, info, opts); } else { this.handleEvent(EV_UNLINK, path, fullPath, realPath, parent, watchedDir, item, info, opts); } } else { this.checkExists(path, fullPath, realPath, parent, watchedDir, item, info, opts); } } else { switch (info.event) { case FSEVENT_CREATED: case FSEVENT_MODIFIED: return this.addOrChange(path, fullPath, realPath, parent, watchedDir, item, info, opts); case FSEVENT_DELETED: case FSEVENT_MOVED: return this.checkExists(path, fullPath, realPath, parent, watchedDir, item, info, opts); } } }; const closer = setFSEventsListener( watchPath, realPath, watchCallback, this.fsw._emitRaw ); this.fsw._emitReady(); return closer; } /** * Handle symlinks encountered during directory scan * @param {String} linkPath path to symlink * @param {String} fullPath absolute path to the symlink * @param {Function} transform pre-existing path transformer * @param {Number} curDepth level of subdirectories traversed to where symlink is * @returns {Promise<void>} */ async _handleFsEventsSymlink(linkPath, fullPath, transform, curDepth) { // don't follow the same symlink more than once if (this.fsw.closed || this.fsw._symlinkPaths.has(fullPath)) return; this.fsw._symlinkPaths.set(fullPath, true); this.fsw._incrReadyCount(); try { const linkTarget = await realpath(linkPath); if (this.fsw.closed) return; if (this.fsw._isIgnored(linkTarget)) { return this.fsw._emitReady(); } this.fsw._incrReadyCount(); // add the linkTarget for watching with a wrapper for transform // that causes emitted paths to incorporate the link's path this._addToFsEvents(linkTarget || linkPath, (path) => { let aliasedPath = linkPath; if (linkTarget && linkTarget !== DOT_SLASH) { aliasedPath = path.replace(linkTarget, linkPath); } else if (path !== DOT_SLASH) { aliasedPath = sysPath.join(linkPath, path); } return transform(aliasedPath); }, false, curDepth); } catch(error) { if (this.fsw._handleError(error)) { return this.fsw._emitReady(); } } } /** * * @param {Path} newPath * @param {fs.Stats} stats */ emitAdd(newPath, stats, processPath, opts, forceAdd) { const pp = processPath(newPath); const isDir = stats.isDirectory(); const dirObj = this.fsw._getWatchedDir(sysPath.dirname(pp)); const base = sysPath.basename(pp); // ensure empty dirs get tracked if (isDir) this.fsw._getWatchedDir(pp); if (dirObj.has(base)) return; dirObj.add(base); if (!opts.ignoreInitial || forceAdd === true) { this.fsw._emit(isDir ? EV_ADD_DIR : EV_ADD, pp, stats); } } initWatch(realPath, path, wh, processPath) { if (this.fsw.closed) return; const closer = this._watchWithFsEvents( wh.watchPath, sysPath.resolve(realPath || wh.watchPath), processPath, wh.globFilter ); this.fsw._addPathCloser(path, closer); } /** * Handle added path with fsevents * @param {String} path file/dir path or glob pattern * @param {Function|Boolean=} transform converts working path to what the user expects * @param {Boolean=} forceAdd ensure add is emitted * @param {Number=} priorDepth Level of subdirectories already traversed. * @returns {Promise<void>} */ async _addToFsEvents(path, transform, forceAdd, priorDepth) { if (this.fsw.closed) { return; } const opts = this.fsw.options; const processPath = typeof transform === FUNCTION_TYPE ? transform : IDENTITY_FN; const wh = this.fsw._getWatchHelpers(path); // evaluate what is at the path we're being asked to watch try { const stats = await statMethods[wh.statMethod](wh.watchPath); if (this.fsw.closed) return; if (this.fsw._isIgnored(wh.watchPath, stats)) { throw null; } if (stats.isDirectory()) { // emit addDir unless this is a glob parent if (!wh.globFilter) this.emitAdd(processPath(path), stats, processPath, opts, forceAdd); // don't recurse further if it would exceed depth setting if (priorDepth && priorDepth > opts.depth) return; // scan the contents of the dir this.fsw._readdirp(wh.watchPath, { fileFilter: entry => wh.filterPath(entry), directoryFilter: entry => wh.filterDir(entry), ...Depth(opts.depth - (priorDepth || 0)) }).on(STR_DATA, (entry) => { // need to check filterPath on dirs b/c filterDir is less restrictive if (this.fsw.closed) { return; } if (entry.stats.isDirectory() && !wh.filterPath(entry)) return; const joinedPath = sysPath.join(wh.watchPath, entry.path); const {fullPath} = entry; if (wh.followSymlinks && entry.stats.isSymbolicLink()) { // preserve the current depth here since it can't be derived from // real paths past the symlink const curDepth = opts.depth === undefined ? undefined : calcDepth(joinedPath, sysPath.resolve(wh.watchPath)) + 1; this._handleFsEventsSymlink(joinedPath, fullPath, processPath, curDepth); } else { this.emitAdd(joinedPath, entry.stats, processPath, opts, forceAdd); } }).on(EV_ERROR, EMPTY_FN).on(STR_END, () => { this.fsw._emitReady(); }); } else { this.emitAdd(wh.watchPath, stats, processPath, opts, forceAdd); this.fsw._emitReady(); } } catch (error) { if (!error || this.fsw._handleError(error)) { // TODO: Strange thing: "should not choke on an ignored watch path" will be failed without 2 ready calls -__- this.fsw._emitReady(); this.fsw._emitReady(); } } if (opts.persistent && forceAdd !== true) { if (typeof transform === FUNCTION_TYPE) { // realpath has already been resolved this.initWatch(undefined, path, wh, processPath); } else { let realPath; try { realPath = await realpath(wh.watchPath); } catch (e) {} this.initWatch(realPath, path, wh, processPath); } } } } module.exports = FsEventsHandler; module.exports.canUse = canUse; node_modules/chokidar/lib/constants.js 0000664 00000003526 15114741631 0014140 0 ustar 00 'use strict'; const {sep} = require('path'); const {platform} = process; const os = require('os'); exports.EV_ALL = 'all'; exports.EV_READY = 'ready'; exports.EV_ADD = 'add'; exports.EV_CHANGE = 'change'; exports.EV_ADD_DIR = 'addDir'; exports.EV_UNLINK = 'unlink'; exports.EV_UNLINK_DIR = 'unlinkDir'; exports.EV_RAW = 'raw'; exports.EV_ERROR = 'error'; exports.STR_DATA = 'data'; exports.STR_END = 'end'; exports.STR_CLOSE = 'close'; exports.FSEVENT_CREATED = 'created'; exports.FSEVENT_MODIFIED = 'modified'; exports.FSEVENT_DELETED = 'deleted'; exports.FSEVENT_MOVED = 'moved'; exports.FSEVENT_CLONED = 'cloned'; exports.FSEVENT_UNKNOWN = 'unknown'; exports.FSEVENT_FLAG_MUST_SCAN_SUBDIRS = 1; exports.FSEVENT_TYPE_FILE = 'file'; exports.FSEVENT_TYPE_DIRECTORY = 'directory'; exports.FSEVENT_TYPE_SYMLINK = 'symlink'; exports.KEY_LISTENERS = 'listeners'; exports.KEY_ERR = 'errHandlers'; exports.KEY_RAW = 'rawEmitters'; exports.HANDLER_KEYS = [exports.KEY_LISTENERS, exports.KEY_ERR, exports.KEY_RAW]; exports.DOT_SLASH = `.${sep}`; exports.BACK_SLASH_RE = /\\/g; exports.DOUBLE_SLASH_RE = /\/\//; exports.SLASH_OR_BACK_SLASH_RE = /[/\\]/; exports.DOT_RE = /\..*\.(sw[px])$|~$|\.subl.*\.tmp/; exports.REPLACER_RE = /^\.[/\\]/; exports.SLASH = '/'; exports.SLASH_SLASH = '//'; exports.BRACE_START = '{'; exports.BANG = '!'; exports.ONE_DOT = '.'; exports.TWO_DOTS = '..'; exports.STAR = '*'; exports.GLOBSTAR = '**'; exports.ROOT_GLOBSTAR = '/**/*'; exports.SLASH_GLOBSTAR = '/**'; exports.DIR_SUFFIX = 'Dir'; exports.ANYMATCH_OPTS = {dot: true}; exports.STRING_TYPE = 'string'; exports.FUNCTION_TYPE = 'function'; exports.EMPTY_STR = ''; exports.EMPTY_FN = () => {}; exports.IDENTITY_FN = val => val; exports.isWindows = platform === 'win32'; exports.isMacos = platform === 'darwin'; exports.isLinux = platform === 'linux'; exports.isIBMi = os.type() === 'OS400'; node_modules/chokidar/lib/nodefs-handler.js 0000664 00000047143 15114741631 0015020 0 ustar 00 'use strict'; const fs = require('fs'); const sysPath = require('path'); const { promisify } = require('util'); const isBinaryPath = require('is-binary-path'); const { isWindows, isLinux, EMPTY_FN, EMPTY_STR, KEY_LISTENERS, KEY_ERR, KEY_RAW, HANDLER_KEYS, EV_CHANGE, EV_ADD, EV_ADD_DIR, EV_ERROR, STR_DATA, STR_END, BRACE_START, STAR } = require('./constants'); const THROTTLE_MODE_WATCH = 'watch'; const open = promisify(fs.open); const stat = promisify(fs.stat); const lstat = promisify(fs.lstat); const close = promisify(fs.close); const fsrealpath = promisify(fs.realpath); const statMethods = { lstat, stat }; // TODO: emit errors properly. Example: EMFILE on Macos. const foreach = (val, fn) => { if (val instanceof Set) { val.forEach(fn); } else { fn(val); } }; const addAndConvert = (main, prop, item) => { let container = main[prop]; if (!(container instanceof Set)) { main[prop] = container = new Set([container]); } container.add(item); }; const clearItem = cont => key => { const set = cont[key]; if (set instanceof Set) { set.clear(); } else { delete cont[key]; } }; const delFromSet = (main, prop, item) => { const container = main[prop]; if (container instanceof Set) { container.delete(item); } else if (container === item) { delete main[prop]; } }; const isEmptySet = (val) => val instanceof Set ? val.size === 0 : !val; /** * @typedef {String} Path */ // fs_watch helpers // object to hold per-process fs_watch instances // (may be shared across chokidar FSWatcher instances) /** * @typedef {Object} FsWatchContainer * @property {Set} listeners * @property {Set} errHandlers * @property {Set} rawEmitters * @property {fs.FSWatcher=} watcher * @property {Boolean=} watcherUnusable */ /** * @type {Map<String,FsWatchContainer>} */ const FsWatchInstances = new Map(); /** * Instantiates the fs_watch interface * @param {String} path to be watched * @param {Object} options to be passed to fs_watch * @param {Function} listener main event handler * @param {Function} errHandler emits info about errors * @param {Function} emitRaw emits raw event data * @returns {fs.FSWatcher} new fsevents instance */ function createFsWatchInstance(path, options, listener, errHandler, emitRaw) { const handleEvent = (rawEvent, evPath) => { listener(path); emitRaw(rawEvent, evPath, {watchedPath: path}); // emit based on events occurring for files from a directory's watcher in // case the file's watcher misses it (and rely on throttling to de-dupe) if (evPath && path !== evPath) { fsWatchBroadcast( sysPath.resolve(path, evPath), KEY_LISTENERS, sysPath.join(path, evPath) ); } }; try { return fs.watch(path, options, handleEvent); } catch (error) { errHandler(error); } } /** * Helper for passing fs_watch event data to a collection of listeners * @param {Path} fullPath absolute path bound to fs_watch instance * @param {String} type listener type * @param {*=} val1 arguments to be passed to listeners * @param {*=} val2 * @param {*=} val3 */ const fsWatchBroadcast = (fullPath, type, val1, val2, val3) => { const cont = FsWatchInstances.get(fullPath); if (!cont) return; foreach(cont[type], (listener) => { listener(val1, val2, val3); }); }; /** * Instantiates the fs_watch interface or binds listeners * to an existing one covering the same file system entry * @param {String} path * @param {String} fullPath absolute path * @param {Object} options to be passed to fs_watch * @param {Object} handlers container for event listener functions */ const setFsWatchListener = (path, fullPath, options, handlers) => { const {listener, errHandler, rawEmitter} = handlers; let cont = FsWatchInstances.get(fullPath); /** @type {fs.FSWatcher=} */ let watcher; if (!options.persistent) { watcher = createFsWatchInstance( path, options, listener, errHandler, rawEmitter ); return watcher.close.bind(watcher); } if (cont) { addAndConvert(cont, KEY_LISTENERS, listener); addAndConvert(cont, KEY_ERR, errHandler); addAndConvert(cont, KEY_RAW, rawEmitter); } else { watcher = createFsWatchInstance( path, options, fsWatchBroadcast.bind(null, fullPath, KEY_LISTENERS), errHandler, // no need to use broadcast here fsWatchBroadcast.bind(null, fullPath, KEY_RAW) ); if (!watcher) return; watcher.on(EV_ERROR, async (error) => { const broadcastErr = fsWatchBroadcast.bind(null, fullPath, KEY_ERR); cont.watcherUnusable = true; // documented since Node 10.4.1 // Workaround for https://github.com/joyent/node/issues/4337 if (isWindows && error.code === 'EPERM') { try { const fd = await open(path, 'r'); await close(fd); broadcastErr(error); } catch (err) {} } else { broadcastErr(error); } }); cont = { listeners: listener, errHandlers: errHandler, rawEmitters: rawEmitter, watcher }; FsWatchInstances.set(fullPath, cont); } // const index = cont.listeners.indexOf(listener); // removes this instance's listeners and closes the underlying fs_watch // instance if there are no more listeners left return () => { delFromSet(cont, KEY_LISTENERS, listener); delFromSet(cont, KEY_ERR, errHandler); delFromSet(cont, KEY_RAW, rawEmitter); if (isEmptySet(cont.listeners)) { // Check to protect against issue gh-730. // if (cont.watcherUnusable) { cont.watcher.close(); // } FsWatchInstances.delete(fullPath); HANDLER_KEYS.forEach(clearItem(cont)); cont.watcher = undefined; Object.freeze(cont); } }; }; // fs_watchFile helpers // object to hold per-process fs_watchFile instances // (may be shared across chokidar FSWatcher instances) const FsWatchFileInstances = new Map(); /** * Instantiates the fs_watchFile interface or binds listeners * to an existing one covering the same file system entry * @param {String} path to be watched * @param {String} fullPath absolute path * @param {Object} options options to be passed to fs_watchFile * @param {Object} handlers container for event listener functions * @returns {Function} closer */ const setFsWatchFileListener = (path, fullPath, options, handlers) => { const {listener, rawEmitter} = handlers; let cont = FsWatchFileInstances.get(fullPath); /* eslint-disable no-unused-vars, prefer-destructuring */ let listeners = new Set(); let rawEmitters = new Set(); const copts = cont && cont.options; if (copts && (copts.persistent < options.persistent || copts.interval > options.interval)) { // "Upgrade" the watcher to persistence or a quicker interval. // This creates some unlikely edge case issues if the user mixes // settings in a very weird way, but solving for those cases // doesn't seem worthwhile for the added complexity. listeners = cont.listeners; rawEmitters = cont.rawEmitters; fs.unwatchFile(fullPath); cont = undefined; } /* eslint-enable no-unused-vars, prefer-destructuring */ if (cont) { addAndConvert(cont, KEY_LISTENERS, listener); addAndConvert(cont, KEY_RAW, rawEmitter); } else { // TODO // listeners.add(listener); // rawEmitters.add(rawEmitter); cont = { listeners: listener, rawEmitters: rawEmitter, options, watcher: fs.watchFile(fullPath, options, (curr, prev) => { foreach(cont.rawEmitters, (rawEmitter) => { rawEmitter(EV_CHANGE, fullPath, {curr, prev}); }); const currmtime = curr.mtimeMs; if (curr.size !== prev.size || currmtime > prev.mtimeMs || currmtime === 0) { foreach(cont.listeners, (listener) => listener(path, curr)); } }) }; FsWatchFileInstances.set(fullPath, cont); } // const index = cont.listeners.indexOf(listener); // Removes this instance's listeners and closes the underlying fs_watchFile // instance if there are no more listeners left. return () => { delFromSet(cont, KEY_LISTENERS, listener); delFromSet(cont, KEY_RAW, rawEmitter); if (isEmptySet(cont.listeners)) { FsWatchFileInstances.delete(fullPath); fs.unwatchFile(fullPath); cont.options = cont.watcher = undefined; Object.freeze(cont); } }; }; /** * @mixin */ class NodeFsHandler { /** * @param {import("../index").FSWatcher} fsW */ constructor(fsW) { this.fsw = fsW; this._boundHandleError = (error) => fsW._handleError(error); } /** * Watch file for changes with fs_watchFile or fs_watch. * @param {String} path to file or dir * @param {Function} listener on fs change * @returns {Function} closer for the watcher instance */ _watchWithNodeFs(path, listener) { const opts = this.fsw.options; const directory = sysPath.dirname(path); const basename = sysPath.basename(path); const parent = this.fsw._getWatchedDir(directory); parent.add(basename); const absolutePath = sysPath.resolve(path); const options = {persistent: opts.persistent}; if (!listener) listener = EMPTY_FN; let closer; if (opts.usePolling) { options.interval = opts.enableBinaryInterval && isBinaryPath(basename) ? opts.binaryInterval : opts.interval; closer = setFsWatchFileListener(path, absolutePath, options, { listener, rawEmitter: this.fsw._emitRaw }); } else { closer = setFsWatchListener(path, absolutePath, options, { listener, errHandler: this._boundHandleError, rawEmitter: this.fsw._emitRaw }); } return closer; } /** * Watch a file and emit add event if warranted. * @param {Path} file Path * @param {fs.Stats} stats result of fs_stat * @param {Boolean} initialAdd was the file added at watch instantiation? * @returns {Function} closer for the watcher instance */ _handleFile(file, stats, initialAdd) { if (this.fsw.closed) { return; } const dirname = sysPath.dirname(file); const basename = sysPath.basename(file); const parent = this.fsw._getWatchedDir(dirname); // stats is always present let prevStats = stats; // if the file is already being watched, do nothing if (parent.has(basename)) return; const listener = async (path, newStats) => { if (!this.fsw._throttle(THROTTLE_MODE_WATCH, file, 5)) return; if (!newStats || newStats.mtimeMs === 0) { try { const newStats = await stat(file); if (this.fsw.closed) return; // Check that change event was not fired because of changed only accessTime. const at = newStats.atimeMs; const mt = newStats.mtimeMs; if (!at || at <= mt || mt !== prevStats.mtimeMs) { this.fsw._emit(EV_CHANGE, file, newStats); } if (isLinux && prevStats.ino !== newStats.ino) { this.fsw._closeFile(path) prevStats = newStats; this.fsw._addPathCloser(path, this._watchWithNodeFs(file, listener)); } else { prevStats = newStats; } } catch (error) { // Fix issues where mtime is null but file is still present this.fsw._remove(dirname, basename); } // add is about to be emitted if file not already tracked in parent } else if (parent.has(basename)) { // Check that change event was not fired because of changed only accessTime. const at = newStats.atimeMs; const mt = newStats.mtimeMs; if (!at || at <= mt || mt !== prevStats.mtimeMs) { this.fsw._emit(EV_CHANGE, file, newStats); } prevStats = newStats; } } // kick off the watcher const closer = this._watchWithNodeFs(file, listener); // emit an add event if we're supposed to if (!(initialAdd && this.fsw.options.ignoreInitial) && this.fsw._isntIgnored(file)) { if (!this.fsw._throttle(EV_ADD, file, 0)) return; this.fsw._emit(EV_ADD, file, stats); } return closer; } /** * Handle symlinks encountered while reading a dir. * @param {Object} entry returned by readdirp * @param {String} directory path of dir being read * @param {String} path of this item * @param {String} item basename of this item * @returns {Promise<Boolean>} true if no more processing is needed for this entry. */ async _handleSymlink(entry, directory, path, item) { if (this.fsw.closed) { return; } const full = entry.fullPath; const dir = this.fsw._getWatchedDir(directory); if (!this.fsw.options.followSymlinks) { // watch symlink directly (don't follow) and detect changes this.fsw._incrReadyCount(); let linkPath; try { linkPath = await fsrealpath(path); } catch (e) { this.fsw._emitReady(); return true; } if (this.fsw.closed) return; if (dir.has(item)) { if (this.fsw._symlinkPaths.get(full) !== linkPath) { this.fsw._symlinkPaths.set(full, linkPath); this.fsw._emit(EV_CHANGE, path, entry.stats); } } else { dir.add(item); this.fsw._symlinkPaths.set(full, linkPath); this.fsw._emit(EV_ADD, path, entry.stats); } this.fsw._emitReady(); return true; } // don't follow the same symlink more than once if (this.fsw._symlinkPaths.has(full)) { return true; } this.fsw._symlinkPaths.set(full, true); } _handleRead(directory, initialAdd, wh, target, dir, depth, throttler) { // Normalize the directory name on Windows directory = sysPath.join(directory, EMPTY_STR); if (!wh.hasGlob) { throttler = this.fsw._throttle('readdir', directory, 1000); if (!throttler) return; } const previous = this.fsw._getWatchedDir(wh.path); const current = new Set(); let stream = this.fsw._readdirp(directory, { fileFilter: entry => wh.filterPath(entry), directoryFilter: entry => wh.filterDir(entry), depth: 0 }).on(STR_DATA, async (entry) => { if (this.fsw.closed) { stream = undefined; return; } const item = entry.path; let path = sysPath.join(directory, item); current.add(item); if (entry.stats.isSymbolicLink() && await this._handleSymlink(entry, directory, path, item)) { return; } if (this.fsw.closed) { stream = undefined; return; } // Files that present in current directory snapshot // but absent in previous are added to watch list and // emit `add` event. if (item === target || !target && !previous.has(item)) { this.fsw._incrReadyCount(); // ensure relativeness of path is preserved in case of watcher reuse path = sysPath.join(dir, sysPath.relative(dir, path)); this._addToNodeFs(path, initialAdd, wh, depth + 1); } }).on(EV_ERROR, this._boundHandleError); return new Promise(resolve => stream.once(STR_END, () => { if (this.fsw.closed) { stream = undefined; return; } const wasThrottled = throttler ? throttler.clear() : false; resolve(); // Files that absent in current directory snapshot // but present in previous emit `remove` event // and are removed from @watched[directory]. previous.getChildren().filter((item) => { return item !== directory && !current.has(item) && // in case of intersecting globs; // a path may have been filtered out of this readdir, but // shouldn't be removed because it matches a different glob (!wh.hasGlob || wh.filterPath({ fullPath: sysPath.resolve(directory, item) })); }).forEach((item) => { this.fsw._remove(directory, item); }); stream = undefined; // one more time for any missed in case changes came in extremely quickly if (wasThrottled) this._handleRead(directory, false, wh, target, dir, depth, throttler); }) ); } /** * Read directory to add / remove files from `@watched` list and re-read it on change. * @param {String} dir fs path * @param {fs.Stats} stats * @param {Boolean} initialAdd * @param {Number} depth relative to user-supplied path * @param {String} target child path targeted for watch * @param {Object} wh Common watch helpers for this path * @param {String} realpath * @returns {Promise<Function>} closer for the watcher instance. */ async _handleDir(dir, stats, initialAdd, depth, target, wh, realpath) { const parentDir = this.fsw._getWatchedDir(sysPath.dirname(dir)); const tracked = parentDir.has(sysPath.basename(dir)); if (!(initialAdd && this.fsw.options.ignoreInitial) && !target && !tracked) { if (!wh.hasGlob || wh.globFilter(dir)) this.fsw._emit(EV_ADD_DIR, dir, stats); } // ensure dir is tracked (harmless if redundant) parentDir.add(sysPath.basename(dir)); this.fsw._getWatchedDir(dir); let throttler; let closer; const oDepth = this.fsw.options.depth; if ((oDepth == null || depth <= oDepth) && !this.fsw._symlinkPaths.has(realpath)) { if (!target) { await this._handleRead(dir, initialAdd, wh, target, dir, depth, throttler); if (this.fsw.closed) return; } closer = this._watchWithNodeFs(dir, (dirPath, stats) => { // if current directory is removed, do nothing if (stats && stats.mtimeMs === 0) return; this._handleRead(dirPath, false, wh, target, dir, depth, throttler); }); } return closer; } /** * Handle added file, directory, or glob pattern. * Delegates call to _handleFile / _handleDir after checks. * @param {String} path to file or ir * @param {Boolean} initialAdd was the file added at watch instantiation? * @param {Object} priorWh depth relative to user-supplied path * @param {Number} depth Child path actually targeted for watch * @param {String=} target Child path actually targeted for watch * @returns {Promise} */ async _addToNodeFs(path, initialAdd, priorWh, depth, target) { const ready = this.fsw._emitReady; if (this.fsw._isIgnored(path) || this.fsw.closed) { ready(); return false; } const wh = this.fsw._getWatchHelpers(path, depth); if (!wh.hasGlob && priorWh) { wh.hasGlob = priorWh.hasGlob; wh.globFilter = priorWh.globFilter; wh.filterPath = entry => priorWh.filterPath(entry); wh.filterDir = entry => priorWh.filterDir(entry); } // evaluate what is at the path we're being asked to watch try { const stats = await statMethods[wh.statMethod](wh.watchPath); if (this.fsw.closed) return; if (this.fsw._isIgnored(wh.watchPath, stats)) { ready(); return false; } const follow = this.fsw.options.followSymlinks && !path.includes(STAR) && !path.includes(BRACE_START); let closer; if (stats.isDirectory()) { const absPath = sysPath.resolve(path); const targetPath = follow ? await fsrealpath(path) : path; if (this.fsw.closed) return; closer = await this._handleDir(wh.watchPath, stats, initialAdd, depth, target, wh, targetPath); if (this.fsw.closed) return; // preserve this symlink's target path if (absPath !== targetPath && targetPath !== undefined) { this.fsw._symlinkPaths.set(absPath, targetPath); } } else if (stats.isSymbolicLink()) { const targetPath = follow ? await fsrealpath(path) : path; if (this.fsw.closed) return; const parent = sysPath.dirname(wh.watchPath); this.fsw._getWatchedDir(parent).add(wh.watchPath); this.fsw._emit(EV_ADD, wh.watchPath, stats); closer = await this._handleDir(parent, stats, initialAdd, depth, path, wh, targetPath); if (this.fsw.closed) return; // preserve this symlink's target path if (targetPath !== undefined) { this.fsw._symlinkPaths.set(sysPath.resolve(path), targetPath); } } else { closer = this._handleFile(wh.watchPath, stats, initialAdd); } ready(); this.fsw._addPathCloser(path, closer); return false; } catch (error) { if (this.fsw._handleError(error)) { ready(); return path; } } } } module.exports = NodeFsHandler; node_modules/chokidar/types/index.d.ts 0000664 00000014303 15114741631 0014060 0 ustar 00 // TypeScript Version: 3.0 /// <reference types="node" /> import * as fs from "fs"; import { EventEmitter } from "events"; import { Matcher } from 'anymatch'; export class FSWatcher extends EventEmitter implements fs.FSWatcher { options: WatchOptions; /** * Constructs a new FSWatcher instance with optional WatchOptions parameter. */ constructor(options?: WatchOptions); /** * Add files, directories, or glob patterns for tracking. Takes an array of strings or just one * string. */ add(paths: string | ReadonlyArray<string>): this; /** * Stop watching files, directories, or glob patterns. Takes an array of strings or just one * string. */ unwatch(paths: string | ReadonlyArray<string>): this; /** * Returns an object representing all the paths on the file system being watched by this * `FSWatcher` instance. The object's keys are all the directories (using absolute paths unless * the `cwd` option was used), and the values are arrays of the names of the items contained in * each directory. */ getWatched(): { [directory: string]: string[]; }; /** * Removes all listeners from watched files. */ close(): Promise<void>; on(event: 'add'|'addDir'|'change', listener: (path: string, stats?: fs.Stats) => void): this; on(event: 'all', listener: (eventName: 'add'|'addDir'|'change'|'unlink'|'unlinkDir', path: string, stats?: fs.Stats) => void): this; /** * Error occurred */ on(event: 'error', listener: (error: Error) => void): this; /** * Exposes the native Node `fs.FSWatcher events` */ on(event: 'raw', listener: (eventName: string, path: string, details: any) => void): this; /** * Fires when the initial scan is complete */ on(event: 'ready', listener: () => void): this; on(event: 'unlink'|'unlinkDir', listener: (path: string) => void): this; on(event: string, listener: (...args: any[]) => void): this; ref(): this; unref(): this; } export interface WatchOptions { /** * Indicates whether the process should continue to run as long as files are being watched. If * set to `false` when using `fsevents` to watch, no more events will be emitted after `ready`, * even if the process continues to run. */ persistent?: boolean; /** * ([anymatch](https://github.com/micromatch/anymatch)-compatible definition) Defines files/paths to * be ignored. The whole relative or absolute path is tested, not just filename. If a function * with two arguments is provided, it gets called twice per path - once with a single argument * (the path), second time with two arguments (the path and the * [`fs.Stats`](https://nodejs.org/api/fs.html#fs_class_fs_stats) object of that path). */ ignored?: Matcher; /** * If set to `false` then `add`/`addDir` events are also emitted for matching paths while * instantiating the watching as chokidar discovers these file paths (before the `ready` event). */ ignoreInitial?: boolean; /** * When `false`, only the symlinks themselves will be watched for changes instead of following * the link references and bubbling events through the link's path. */ followSymlinks?: boolean; /** * The base directory from which watch `paths` are to be derived. Paths emitted with events will * be relative to this. */ cwd?: string; /** * If set to true then the strings passed to .watch() and .add() are treated as literal path * names, even if they look like globs. Default: false. */ disableGlobbing?: boolean; /** * Whether to use fs.watchFile (backed by polling), or fs.watch. If polling leads to high CPU * utilization, consider setting this to `false`. It is typically necessary to **set this to * `true` to successfully watch files over a network**, and it may be necessary to successfully * watch files in other non-standard situations. Setting to `true` explicitly on OS X overrides * the `useFsEvents` default. */ usePolling?: boolean; /** * Whether to use the `fsevents` watching interface if available. When set to `true` explicitly * and `fsevents` is available this supercedes the `usePolling` setting. When set to `false` on * OS X, `usePolling: true` becomes the default. */ useFsEvents?: boolean; /** * If relying upon the [`fs.Stats`](https://nodejs.org/api/fs.html#fs_class_fs_stats) object that * may get passed with `add`, `addDir`, and `change` events, set this to `true` to ensure it is * provided even in cases where it wasn't already available from the underlying watch events. */ alwaysStat?: boolean; /** * If set, limits how many levels of subdirectories will be traversed. */ depth?: number; /** * Interval of file system polling. */ interval?: number; /** * Interval of file system polling for binary files. ([see list of binary extensions](https://gi * thub.com/sindresorhus/binary-extensions/blob/master/binary-extensions.json)) */ binaryInterval?: number; /** * Indicates whether to watch files that don't have read permissions if possible. If watching * fails due to `EPERM` or `EACCES` with this set to `true`, the errors will be suppressed * silently. */ ignorePermissionErrors?: boolean; /** * `true` if `useFsEvents` and `usePolling` are `false`). Automatically filters out artifacts * that occur when using editors that use "atomic writes" instead of writing directly to the * source file. If a file is re-added within 100 ms of being deleted, Chokidar emits a `change` * event rather than `unlink` then `add`. If the default of 100 ms does not work well for you, * you can override it by setting `atomic` to a custom value, in milliseconds. */ atomic?: boolean | number; /** * can be set to an object in order to adjust timing params: */ awaitWriteFinish?: AwaitWriteFinishOptions | boolean; } export interface AwaitWriteFinishOptions { /** * Amount of time in milliseconds for a file size to remain constant before emitting its event. */ stabilityThreshold?: number; /** * File size polling interval. */ pollInterval?: number; } /** * produces an instance of `FSWatcher`. */ export function watch( paths: string | ReadonlyArray<string>, options?: WatchOptions ): FSWatcher; node_modules/chokidar/index.js 0000664 00000067333 15114741631 0012473 0 ustar 00 'use strict'; const { EventEmitter } = require('events'); const fs = require('fs'); const sysPath = require('path'); const { promisify } = require('util'); const readdirp = require('readdirp'); const anymatch = require('anymatch').default; const globParent = require('glob-parent'); const isGlob = require('is-glob'); const braces = require('braces'); const normalizePath = require('normalize-path'); const NodeFsHandler = require('./lib/nodefs-handler'); const FsEventsHandler = require('./lib/fsevents-handler'); const { EV_ALL, EV_READY, EV_ADD, EV_CHANGE, EV_UNLINK, EV_ADD_DIR, EV_UNLINK_DIR, EV_RAW, EV_ERROR, STR_CLOSE, STR_END, BACK_SLASH_RE, DOUBLE_SLASH_RE, SLASH_OR_BACK_SLASH_RE, DOT_RE, REPLACER_RE, SLASH, SLASH_SLASH, BRACE_START, BANG, ONE_DOT, TWO_DOTS, GLOBSTAR, SLASH_GLOBSTAR, ANYMATCH_OPTS, STRING_TYPE, FUNCTION_TYPE, EMPTY_STR, EMPTY_FN, isWindows, isMacos, isIBMi } = require('./lib/constants'); const stat = promisify(fs.stat); const readdir = promisify(fs.readdir); /** * @typedef {String} Path * @typedef {'all'|'add'|'addDir'|'change'|'unlink'|'unlinkDir'|'raw'|'error'|'ready'} EventName * @typedef {'readdir'|'watch'|'add'|'remove'|'change'} ThrottleType */ /** * * @typedef {Object} WatchHelpers * @property {Boolean} followSymlinks * @property {'stat'|'lstat'} statMethod * @property {Path} path * @property {Path} watchPath * @property {Function} entryPath * @property {Boolean} hasGlob * @property {Object} globFilter * @property {Function} filterPath * @property {Function} filterDir */ const arrify = (value = []) => Array.isArray(value) ? value : [value]; const flatten = (list, result = []) => { list.forEach(item => { if (Array.isArray(item)) { flatten(item, result); } else { result.push(item); } }); return result; }; const unifyPaths = (paths_) => { /** * @type {Array<String>} */ const paths = flatten(arrify(paths_)); if (!paths.every(p => typeof p === STRING_TYPE)) { throw new TypeError(`Non-string provided as watch path: ${paths}`); } return paths.map(normalizePathToUnix); }; // If SLASH_SLASH occurs at the beginning of path, it is not replaced // because "//StoragePC/DrivePool/Movies" is a valid network path const toUnix = (string) => { let str = string.replace(BACK_SLASH_RE, SLASH); let prepend = false; if (str.startsWith(SLASH_SLASH)) { prepend = true; } while (str.match(DOUBLE_SLASH_RE)) { str = str.replace(DOUBLE_SLASH_RE, SLASH); } if (prepend) { str = SLASH + str; } return str; }; // Our version of upath.normalize // TODO: this is not equal to path-normalize module - investigate why const normalizePathToUnix = (path) => toUnix(sysPath.normalize(toUnix(path))); const normalizeIgnored = (cwd = EMPTY_STR) => (path) => { if (typeof path !== STRING_TYPE) return path; return normalizePathToUnix(sysPath.isAbsolute(path) ? path : sysPath.join(cwd, path)); }; const getAbsolutePath = (path, cwd) => { if (sysPath.isAbsolute(path)) { return path; } if (path.startsWith(BANG)) { return BANG + sysPath.join(cwd, path.slice(1)); } return sysPath.join(cwd, path); }; const undef = (opts, key) => opts[key] === undefined; /** * Directory entry. * @property {Path} path * @property {Set<Path>} items */ class DirEntry { /** * @param {Path} dir * @param {Function} removeWatcher */ constructor(dir, removeWatcher) { this.path = dir; this._removeWatcher = removeWatcher; /** @type {Set<Path>} */ this.items = new Set(); } add(item) { const {items} = this; if (!items) return; if (item !== ONE_DOT && item !== TWO_DOTS) items.add(item); } async remove(item) { const {items} = this; if (!items) return; items.delete(item); if (items.size > 0) return; const dir = this.path; try { await readdir(dir); } catch (err) { if (this._removeWatcher) { this._removeWatcher(sysPath.dirname(dir), sysPath.basename(dir)); } } } has(item) { const {items} = this; if (!items) return; return items.has(item); } /** * @returns {Array<String>} */ getChildren() { const {items} = this; if (!items) return; return [...items.values()]; } dispose() { this.items.clear(); delete this.path; delete this._removeWatcher; delete this.items; Object.freeze(this); } } const STAT_METHOD_F = 'stat'; const STAT_METHOD_L = 'lstat'; class WatchHelper { constructor(path, watchPath, follow, fsw) { this.fsw = fsw; this.path = path = path.replace(REPLACER_RE, EMPTY_STR); this.watchPath = watchPath; this.fullWatchPath = sysPath.resolve(watchPath); this.hasGlob = watchPath !== path; /** @type {object|boolean} */ if (path === EMPTY_STR) this.hasGlob = false; this.globSymlink = this.hasGlob && follow ? undefined : false; this.globFilter = this.hasGlob ? anymatch(path, undefined, ANYMATCH_OPTS) : false; this.dirParts = this.getDirParts(path); this.dirParts.forEach((parts) => { if (parts.length > 1) parts.pop(); }); this.followSymlinks = follow; this.statMethod = follow ? STAT_METHOD_F : STAT_METHOD_L; } checkGlobSymlink(entry) { // only need to resolve once // first entry should always have entry.parentDir === EMPTY_STR if (this.globSymlink === undefined) { this.globSymlink = entry.fullParentDir === this.fullWatchPath ? false : {realPath: entry.fullParentDir, linkPath: this.fullWatchPath}; } if (this.globSymlink) { return entry.fullPath.replace(this.globSymlink.realPath, this.globSymlink.linkPath); } return entry.fullPath; } entryPath(entry) { return sysPath.join(this.watchPath, sysPath.relative(this.watchPath, this.checkGlobSymlink(entry)) ); } filterPath(entry) { const {stats} = entry; if (stats && stats.isSymbolicLink()) return this.filterDir(entry); const resolvedPath = this.entryPath(entry); const matchesGlob = this.hasGlob && typeof this.globFilter === FUNCTION_TYPE ? this.globFilter(resolvedPath) : true; return matchesGlob && this.fsw._isntIgnored(resolvedPath, stats) && this.fsw._hasReadPermissions(stats); } getDirParts(path) { if (!this.hasGlob) return []; const parts = []; const expandedPath = path.includes(BRACE_START) ? braces.expand(path) : [path]; expandedPath.forEach((path) => { parts.push(sysPath.relative(this.watchPath, path).split(SLASH_OR_BACK_SLASH_RE)); }); return parts; } filterDir(entry) { if (this.hasGlob) { const entryParts = this.getDirParts(this.checkGlobSymlink(entry)); let globstar = false; this.unmatchedGlob = !this.dirParts.some((parts) => { return parts.every((part, i) => { if (part === GLOBSTAR) globstar = true; return globstar || !entryParts[0][i] || anymatch(part, entryParts[0][i], ANYMATCH_OPTS); }); }); } return !this.unmatchedGlob && this.fsw._isntIgnored(this.entryPath(entry), entry.stats); } } /** * Watches files & directories for changes. Emitted events: * `add`, `addDir`, `change`, `unlink`, `unlinkDir`, `all`, `error` * * new FSWatcher() * .add(directories) * .on('add', path => log('File', path, 'was added')) */ class FSWatcher extends EventEmitter { // Not indenting methods for history sake; for now. constructor(_opts) { super(); const opts = {}; if (_opts) Object.assign(opts, _opts); // for frozen objects /** @type {Map<String, DirEntry>} */ this._watched = new Map(); /** @type {Map<String, Array>} */ this._closers = new Map(); /** @type {Set<String>} */ this._ignoredPaths = new Set(); /** @type {Map<ThrottleType, Map>} */ this._throttled = new Map(); /** @type {Map<Path, String|Boolean>} */ this._symlinkPaths = new Map(); this._streams = new Set(); this.closed = false; // Set up default options. if (undef(opts, 'persistent')) opts.persistent = true; if (undef(opts, 'ignoreInitial')) opts.ignoreInitial = false; if (undef(opts, 'ignorePermissionErrors')) opts.ignorePermissionErrors = false; if (undef(opts, 'interval')) opts.interval = 100; if (undef(opts, 'binaryInterval')) opts.binaryInterval = 300; if (undef(opts, 'disableGlobbing')) opts.disableGlobbing = false; opts.enableBinaryInterval = opts.binaryInterval !== opts.interval; // Enable fsevents on OS X when polling isn't explicitly enabled. if (undef(opts, 'useFsEvents')) opts.useFsEvents = !opts.usePolling; // If we can't use fsevents, ensure the options reflect it's disabled. const canUseFsEvents = FsEventsHandler.canUse(); if (!canUseFsEvents) opts.useFsEvents = false; // Use polling on Mac if not using fsevents. // Other platforms use non-polling fs_watch. if (undef(opts, 'usePolling') && !opts.useFsEvents) { opts.usePolling = isMacos; } // Always default to polling on IBM i because fs.watch() is not available on IBM i. if(isIBMi) { opts.usePolling = true; } // Global override (useful for end-developers that need to force polling for all // instances of chokidar, regardless of usage/dependency depth) const envPoll = process.env.CHOKIDAR_USEPOLLING; if (envPoll !== undefined) { const envLower = envPoll.toLowerCase(); if (envLower === 'false' || envLower === '0') { opts.usePolling = false; } else if (envLower === 'true' || envLower === '1') { opts.usePolling = true; } else { opts.usePolling = !!envLower; } } const envInterval = process.env.CHOKIDAR_INTERVAL; if (envInterval) { opts.interval = Number.parseInt(envInterval, 10); } // Editor atomic write normalization enabled by default with fs.watch if (undef(opts, 'atomic')) opts.atomic = !opts.usePolling && !opts.useFsEvents; if (opts.atomic) this._pendingUnlinks = new Map(); if (undef(opts, 'followSymlinks')) opts.followSymlinks = true; if (undef(opts, 'awaitWriteFinish')) opts.awaitWriteFinish = false; if (opts.awaitWriteFinish === true) opts.awaitWriteFinish = {}; const awf = opts.awaitWriteFinish; if (awf) { if (!awf.stabilityThreshold) awf.stabilityThreshold = 2000; if (!awf.pollInterval) awf.pollInterval = 100; this._pendingWrites = new Map(); } if (opts.ignored) opts.ignored = arrify(opts.ignored); let readyCalls = 0; this._emitReady = () => { readyCalls++; if (readyCalls >= this._readyCount) { this._emitReady = EMPTY_FN; this._readyEmitted = true; // use process.nextTick to allow time for listener to be bound process.nextTick(() => this.emit(EV_READY)); } }; this._emitRaw = (...args) => this.emit(EV_RAW, ...args); this._readyEmitted = false; this.options = opts; // Initialize with proper watcher. if (opts.useFsEvents) { this._fsEventsHandler = new FsEventsHandler(this); } else { this._nodeFsHandler = new NodeFsHandler(this); } // You’re frozen when your heart’s not open. Object.freeze(opts); } // Public methods /** * Adds paths to be watched on an existing FSWatcher instance * @param {Path|Array<Path>} paths_ * @param {String=} _origAdd private; for handling non-existent paths to be watched * @param {Boolean=} _internal private; indicates a non-user add * @returns {FSWatcher} for chaining */ add(paths_, _origAdd, _internal) { const {cwd, disableGlobbing} = this.options; this.closed = false; let paths = unifyPaths(paths_); if (cwd) { paths = paths.map((path) => { const absPath = getAbsolutePath(path, cwd); // Check `path` instead of `absPath` because the cwd portion can't be a glob if (disableGlobbing || !isGlob(path)) { return absPath; } return normalizePath(absPath); }); } // set aside negated glob strings paths = paths.filter((path) => { if (path.startsWith(BANG)) { this._ignoredPaths.add(path.slice(1)); return false; } // if a path is being added that was previously ignored, stop ignoring it this._ignoredPaths.delete(path); this._ignoredPaths.delete(path + SLASH_GLOBSTAR); // reset the cached userIgnored anymatch fn // to make ignoredPaths changes effective this._userIgnored = undefined; return true; }); if (this.options.useFsEvents && this._fsEventsHandler) { if (!this._readyCount) this._readyCount = paths.length; if (this.options.persistent) this._readyCount += paths.length; paths.forEach((path) => this._fsEventsHandler._addToFsEvents(path)); } else { if (!this._readyCount) this._readyCount = 0; this._readyCount += paths.length; Promise.all( paths.map(async path => { const res = await this._nodeFsHandler._addToNodeFs(path, !_internal, 0, 0, _origAdd); if (res) this._emitReady(); return res; }) ).then(results => { if (this.closed) return; results.filter(item => item).forEach(item => { this.add(sysPath.dirname(item), sysPath.basename(_origAdd || item)); }); }); } return this; } /** * Close watchers or start ignoring events from specified paths. * @param {Path|Array<Path>} paths_ - string or array of strings, file/directory paths and/or globs * @returns {FSWatcher} for chaining */ unwatch(paths_) { if (this.closed) return this; const paths = unifyPaths(paths_); const {cwd} = this.options; paths.forEach((path) => { // convert to absolute path unless relative path already matches if (!sysPath.isAbsolute(path) && !this._closers.has(path)) { if (cwd) path = sysPath.join(cwd, path); path = sysPath.resolve(path); } this._closePath(path); this._ignoredPaths.add(path); if (this._watched.has(path)) { this._ignoredPaths.add(path + SLASH_GLOBSTAR); } // reset the cached userIgnored anymatch fn // to make ignoredPaths changes effective this._userIgnored = undefined; }); return this; } /** * Close watchers and remove all listeners from watched paths. * @returns {Promise<void>}. */ close() { if (this.closed) return this._closePromise; this.closed = true; // Memory management. this.removeAllListeners(); const closers = []; this._closers.forEach(closerList => closerList.forEach(closer => { const promise = closer(); if (promise instanceof Promise) closers.push(promise); })); this._streams.forEach(stream => stream.destroy()); this._userIgnored = undefined; this._readyCount = 0; this._readyEmitted = false; this._watched.forEach(dirent => dirent.dispose()); ['closers', 'watched', 'streams', 'symlinkPaths', 'throttled'].forEach(key => { this[`_${key}`].clear(); }); this._closePromise = closers.length ? Promise.all(closers).then(() => undefined) : Promise.resolve(); return this._closePromise; } /** * Expose list of watched paths * @returns {Object} for chaining */ getWatched() { const watchList = {}; this._watched.forEach((entry, dir) => { const key = this.options.cwd ? sysPath.relative(this.options.cwd, dir) : dir; watchList[key || ONE_DOT] = entry.getChildren().sort(); }); return watchList; } emitWithAll(event, args) { this.emit(...args); if (event !== EV_ERROR) this.emit(EV_ALL, ...args); } // Common helpers // -------------- /** * Normalize and emit events. * Calling _emit DOES NOT MEAN emit() would be called! * @param {EventName} event Type of event * @param {Path} path File or directory path * @param {*=} val1 arguments to be passed with event * @param {*=} val2 * @param {*=} val3 * @returns the error if defined, otherwise the value of the FSWatcher instance's `closed` flag */ async _emit(event, path, val1, val2, val3) { if (this.closed) return; const opts = this.options; if (isWindows) path = sysPath.normalize(path); if (opts.cwd) path = sysPath.relative(opts.cwd, path); /** @type Array<any> */ const args = [event, path]; if (val3 !== undefined) args.push(val1, val2, val3); else if (val2 !== undefined) args.push(val1, val2); else if (val1 !== undefined) args.push(val1); const awf = opts.awaitWriteFinish; let pw; if (awf && (pw = this._pendingWrites.get(path))) { pw.lastChange = new Date(); return this; } if (opts.atomic) { if (event === EV_UNLINK) { this._pendingUnlinks.set(path, args); setTimeout(() => { this._pendingUnlinks.forEach((entry, path) => { this.emit(...entry); this.emit(EV_ALL, ...entry); this._pendingUnlinks.delete(path); }); }, typeof opts.atomic === 'number' ? opts.atomic : 100); return this; } if (event === EV_ADD && this._pendingUnlinks.has(path)) { event = args[0] = EV_CHANGE; this._pendingUnlinks.delete(path); } } if (awf && (event === EV_ADD || event === EV_CHANGE) && this._readyEmitted) { const awfEmit = (err, stats) => { if (err) { event = args[0] = EV_ERROR; args[1] = err; this.emitWithAll(event, args); } else if (stats) { // if stats doesn't exist the file must have been deleted if (args.length > 2) { args[2] = stats; } else { args.push(stats); } this.emitWithAll(event, args); } }; this._awaitWriteFinish(path, awf.stabilityThreshold, event, awfEmit); return this; } if (event === EV_CHANGE) { const isThrottled = !this._throttle(EV_CHANGE, path, 50); if (isThrottled) return this; } if (opts.alwaysStat && val1 === undefined && (event === EV_ADD || event === EV_ADD_DIR || event === EV_CHANGE) ) { const fullPath = opts.cwd ? sysPath.join(opts.cwd, path) : path; let stats; try { stats = await stat(fullPath); } catch (err) {} // Suppress event when fs_stat fails, to avoid sending undefined 'stat' if (!stats || this.closed) return; args.push(stats); } this.emitWithAll(event, args); return this; } /** * Common handler for errors * @param {Error} error * @returns {Error|Boolean} The error if defined, otherwise the value of the FSWatcher instance's `closed` flag */ _handleError(error) { const code = error && error.code; if (error && code !== 'ENOENT' && code !== 'ENOTDIR' && (!this.options.ignorePermissionErrors || (code !== 'EPERM' && code !== 'EACCES')) ) { this.emit(EV_ERROR, error); } return error || this.closed; } /** * Helper utility for throttling * @param {ThrottleType} actionType type being throttled * @param {Path} path being acted upon * @param {Number} timeout duration of time to suppress duplicate actions * @returns {Object|false} tracking object or false if action should be suppressed */ _throttle(actionType, path, timeout) { if (!this._throttled.has(actionType)) { this._throttled.set(actionType, new Map()); } /** @type {Map<Path, Object>} */ const action = this._throttled.get(actionType); /** @type {Object} */ const actionPath = action.get(path); if (actionPath) { actionPath.count++; return false; } let timeoutObject; const clear = () => { const item = action.get(path); const count = item ? item.count : 0; action.delete(path); clearTimeout(timeoutObject); if (item) clearTimeout(item.timeoutObject); return count; }; timeoutObject = setTimeout(clear, timeout); const thr = {timeoutObject, clear, count: 0}; action.set(path, thr); return thr; } _incrReadyCount() { return this._readyCount++; } /** * Awaits write operation to finish. * Polls a newly created file for size variations. When files size does not change for 'threshold' milliseconds calls callback. * @param {Path} path being acted upon * @param {Number} threshold Time in milliseconds a file size must be fixed before acknowledging write OP is finished * @param {EventName} event * @param {Function} awfEmit Callback to be called when ready for event to be emitted. */ _awaitWriteFinish(path, threshold, event, awfEmit) { let timeoutHandler; let fullPath = path; if (this.options.cwd && !sysPath.isAbsolute(path)) { fullPath = sysPath.join(this.options.cwd, path); } const now = new Date(); const awaitWriteFinish = (prevStat) => { fs.stat(fullPath, (err, curStat) => { if (err || !this._pendingWrites.has(path)) { if (err && err.code !== 'ENOENT') awfEmit(err); return; } const now = Number(new Date()); if (prevStat && curStat.size !== prevStat.size) { this._pendingWrites.get(path).lastChange = now; } const pw = this._pendingWrites.get(path); const df = now - pw.lastChange; if (df >= threshold) { this._pendingWrites.delete(path); awfEmit(undefined, curStat); } else { timeoutHandler = setTimeout( awaitWriteFinish, this.options.awaitWriteFinish.pollInterval, curStat ); } }); }; if (!this._pendingWrites.has(path)) { this._pendingWrites.set(path, { lastChange: now, cancelWait: () => { this._pendingWrites.delete(path); clearTimeout(timeoutHandler); return event; } }); timeoutHandler = setTimeout( awaitWriteFinish, this.options.awaitWriteFinish.pollInterval ); } } _getGlobIgnored() { return [...this._ignoredPaths.values()]; } /** * Determines whether user has asked to ignore this path. * @param {Path} path filepath or dir * @param {fs.Stats=} stats result of fs.stat * @returns {Boolean} */ _isIgnored(path, stats) { if (this.options.atomic && DOT_RE.test(path)) return true; if (!this._userIgnored) { const {cwd} = this.options; const ign = this.options.ignored; const ignored = ign && ign.map(normalizeIgnored(cwd)); const paths = arrify(ignored) .filter((path) => typeof path === STRING_TYPE && !isGlob(path)) .map((path) => path + SLASH_GLOBSTAR); const list = this._getGlobIgnored().map(normalizeIgnored(cwd)).concat(ignored, paths); this._userIgnored = anymatch(list, undefined, ANYMATCH_OPTS); } return this._userIgnored([path, stats]); } _isntIgnored(path, stat) { return !this._isIgnored(path, stat); } /** * Provides a set of common helpers and properties relating to symlink and glob handling. * @param {Path} path file, directory, or glob pattern being watched * @param {Number=} depth at any depth > 0, this isn't a glob * @returns {WatchHelper} object containing helpers for this path */ _getWatchHelpers(path, depth) { const watchPath = depth || this.options.disableGlobbing || !isGlob(path) ? path : globParent(path); const follow = this.options.followSymlinks; return new WatchHelper(path, watchPath, follow, this); } // Directory helpers // ----------------- /** * Provides directory tracking objects * @param {String} directory path of the directory * @returns {DirEntry} the directory's tracking object */ _getWatchedDir(directory) { if (!this._boundRemove) this._boundRemove = this._remove.bind(this); const dir = sysPath.resolve(directory); if (!this._watched.has(dir)) this._watched.set(dir, new DirEntry(dir, this._boundRemove)); return this._watched.get(dir); } // File helpers // ------------ /** * Check for read permissions. * Based on this answer on SO: https://stackoverflow.com/a/11781404/1358405 * @param {fs.Stats} stats - object, result of fs_stat * @returns {Boolean} indicates whether the file can be read */ _hasReadPermissions(stats) { if (this.options.ignorePermissionErrors) return true; // stats.mode may be bigint const md = stats && Number.parseInt(stats.mode, 10); const st = md & 0o777; const it = Number.parseInt(st.toString(8)[0], 10); return Boolean(4 & it); } /** * Handles emitting unlink events for * files and directories, and via recursion, for * files and directories within directories that are unlinked * @param {String} directory within which the following item is located * @param {String} item base path of item/directory * @returns {void} */ _remove(directory, item, isDirectory) { // if what is being deleted is a directory, get that directory's paths // for recursive deleting and cleaning of watched object // if it is not a directory, nestedDirectoryChildren will be empty array const path = sysPath.join(directory, item); const fullPath = sysPath.resolve(path); isDirectory = isDirectory != null ? isDirectory : this._watched.has(path) || this._watched.has(fullPath); // prevent duplicate handling in case of arriving here nearly simultaneously // via multiple paths (such as _handleFile and _handleDir) if (!this._throttle('remove', path, 100)) return; // if the only watched file is removed, watch for its return if (!isDirectory && !this.options.useFsEvents && this._watched.size === 1) { this.add(directory, item, true); } // This will create a new entry in the watched object in either case // so we got to do the directory check beforehand const wp = this._getWatchedDir(path); const nestedDirectoryChildren = wp.getChildren(); // Recursively remove children directories / files. nestedDirectoryChildren.forEach(nested => this._remove(path, nested)); // Check if item was on the watched list and remove it const parent = this._getWatchedDir(directory); const wasTracked = parent.has(item); parent.remove(item); // Fixes issue #1042 -> Relative paths were detected and added as symlinks // (https://github.com/paulmillr/chokidar/blob/e1753ddbc9571bdc33b4a4af172d52cb6e611c10/lib/nodefs-handler.js#L612), // but never removed from the map in case the path was deleted. // This leads to an incorrect state if the path was recreated: // https://github.com/paulmillr/chokidar/blob/e1753ddbc9571bdc33b4a4af172d52cb6e611c10/lib/nodefs-handler.js#L553 if (this._symlinkPaths.has(fullPath)) { this._symlinkPaths.delete(fullPath); } // If we wait for this file to be fully written, cancel the wait. let relPath = path; if (this.options.cwd) relPath = sysPath.relative(this.options.cwd, path); if (this.options.awaitWriteFinish && this._pendingWrites.has(relPath)) { const event = this._pendingWrites.get(relPath).cancelWait(); if (event === EV_ADD) return; } // The Entry will either be a directory that just got removed // or a bogus entry to a file, in either case we have to remove it this._watched.delete(path); this._watched.delete(fullPath); const eventName = isDirectory ? EV_UNLINK_DIR : EV_UNLINK; if (wasTracked && !this._isIgnored(path)) this._emit(eventName, path); // Avoid conflicts if we later create another file with the same name if (!this.options.useFsEvents) { this._closePath(path); } } /** * Closes all watchers for a path * @param {Path} path */ _closePath(path) { this._closeFile(path) const dir = sysPath.dirname(path); this._getWatchedDir(dir).remove(sysPath.basename(path)); } /** * Closes only file-specific watchers * @param {Path} path */ _closeFile(path) { const closers = this._closers.get(path); if (!closers) return; closers.forEach(closer => closer()); this._closers.delete(path); } /** * * @param {Path} path * @param {Function} closer */ _addPathCloser(path, closer) { if (!closer) return; let list = this._closers.get(path); if (!list) { list = []; this._closers.set(path, list); } list.push(closer); } _readdirp(root, opts) { if (this.closed) return; const options = {type: EV_ALL, alwaysStat: true, lstat: true, ...opts}; let stream = readdirp(root, options); this._streams.add(stream); stream.once(STR_CLOSE, () => { stream = undefined; }); stream.once(STR_END, () => { if (stream) { this._streams.delete(stream); stream = undefined; } }); return stream; } } // Export FSWatcher class exports.FSWatcher = FSWatcher; /** * Instantiates watcher with paths to be tracked. * @param {String|Array<String>} paths file/directory paths and/or globs * @param {Object=} options chokidar opts * @returns an instance of FSWatcher for chaining. */ const watch = (paths, options) => { const watcher = new FSWatcher(options); watcher.add(paths); return watcher; }; exports.watch = watch; node_modules/chokidar/README.md 0000664 00000034070 15114741631 0012275 0 ustar 00 # Chokidar [](https://github.com/paulmillr/chokidar) [](https://github.com/paulmillr/chokidar) > Minimal and efficient cross-platform file watching library [](https://www.npmjs.com/package/chokidar) ## Why? Node.js `fs.watch`: * Doesn't report filenames on MacOS. * Doesn't report events at all when using editors like Sublime on MacOS. * Often reports events twice. * Emits most changes as `rename`. * Does not provide an easy way to recursively watch file trees. * Does not support recursive watching on Linux. Node.js `fs.watchFile`: * Almost as bad at event handling. * Also does not provide any recursive watching. * Results in high CPU utilization. Chokidar resolves these problems. Initially made for **[Brunch](https://brunch.io/)** (an ultra-swift web app build tool), it is now used in [Microsoft's Visual Studio Code](https://github.com/microsoft/vscode), [gulp](https://github.com/gulpjs/gulp/), [karma](https://karma-runner.github.io/), [PM2](https://github.com/Unitech/PM2), [browserify](http://browserify.org/), [webpack](https://webpack.github.io/), [BrowserSync](https://www.browsersync.io/), and [many others](https://www.npmjs.com/browse/depended/chokidar). It has proven itself in production environments. Version 3 is out! Check out our blog post about it: [Chokidar 3: How to save 32TB of traffic every week](https://paulmillr.com/posts/chokidar-3-save-32tb-of-traffic/) ## How? Chokidar does still rely on the Node.js core `fs` module, but when using `fs.watch` and `fs.watchFile` for watching, it normalizes the events it receives, often checking for truth by getting file stats and/or dir contents. On MacOS, chokidar by default uses a native extension exposing the Darwin `FSEvents` API. This provides very efficient recursive watching compared with implementations like `kqueue` available on most \*nix platforms. Chokidar still does have to do some work to normalize the events received that way as well. On most other platforms, the `fs.watch`-based implementation is the default, which avoids polling and keeps CPU usage down. Be advised that chokidar will initiate watchers recursively for everything within scope of the paths that have been specified, so be judicious about not wasting system resources by watching much more than needed. ## Getting started Install with npm: ```sh npm install chokidar ``` Then `require` and use it in your code: ```javascript const chokidar = require('chokidar'); // One-liner for current directory chokidar.watch('.').on('all', (event, path) => { console.log(event, path); }); ``` ## API ```javascript // Example of a more typical implementation structure // Initialize watcher. const watcher = chokidar.watch('file, dir, glob, or array', { ignored: /(^|[\/\\])\../, // ignore dotfiles persistent: true }); // Something to use when events are received. const log = console.log.bind(console); // Add event listeners. watcher .on('add', path => log(`File ${path} has been added`)) .on('change', path => log(`File ${path} has been changed`)) .on('unlink', path => log(`File ${path} has been removed`)); // More possible events. watcher .on('addDir', path => log(`Directory ${path} has been added`)) .on('unlinkDir', path => log(`Directory ${path} has been removed`)) .on('error', error => log(`Watcher error: ${error}`)) .on('ready', () => log('Initial scan complete. Ready for changes')) .on('raw', (event, path, details) => { // internal log('Raw event info:', event, path, details); }); // 'add', 'addDir' and 'change' events also receive stat() results as second // argument when available: https://nodejs.org/api/fs.html#fs_class_fs_stats watcher.on('change', (path, stats) => { if (stats) console.log(`File ${path} changed size to ${stats.size}`); }); // Watch new files. watcher.add('new-file'); watcher.add(['new-file-2', 'new-file-3', '**/other-file*']); // Get list of actual paths being watched on the filesystem var watchedPaths = watcher.getWatched(); // Un-watch some files. await watcher.unwatch('new-file*'); // Stop watching. // The method is async! watcher.close().then(() => console.log('closed')); // Full list of options. See below for descriptions. // Do not use this example! chokidar.watch('file', { persistent: true, ignored: '*.txt', ignoreInitial: false, followSymlinks: true, cwd: '.', disableGlobbing: false, usePolling: false, interval: 100, binaryInterval: 300, alwaysStat: false, depth: 99, awaitWriteFinish: { stabilityThreshold: 2000, pollInterval: 100 }, ignorePermissionErrors: false, atomic: true // or a custom 'atomicity delay', in milliseconds (default 100) }); ``` `chokidar.watch(paths, [options])` * `paths` (string or array of strings). Paths to files, dirs to be watched recursively, or glob patterns. - Note: globs must not contain windows separators (`\`), because that's how they work by the standard — you'll need to replace them with forward slashes (`/`). - Note 2: for additional glob documentation, check out low-level library: [picomatch](https://github.com/micromatch/picomatch). * `options` (object) Options object as defined below: #### Persistence * `persistent` (default: `true`). Indicates whether the process should continue to run as long as files are being watched. If set to `false` when using `fsevents` to watch, no more events will be emitted after `ready`, even if the process continues to run. #### Path filtering * `ignored` ([anymatch](https://github.com/es128/anymatch)-compatible definition) Defines files/paths to be ignored. The whole relative or absolute path is tested, not just filename. If a function with two arguments is provided, it gets called twice per path - once with a single argument (the path), second time with two arguments (the path and the [`fs.Stats`](https://nodejs.org/api/fs.html#fs_class_fs_stats) object of that path). * `ignoreInitial` (default: `false`). If set to `false` then `add`/`addDir` events are also emitted for matching paths while instantiating the watching as chokidar discovers these file paths (before the `ready` event). * `followSymlinks` (default: `true`). When `false`, only the symlinks themselves will be watched for changes instead of following the link references and bubbling events through the link's path. * `cwd` (no default). The base directory from which watch `paths` are to be derived. Paths emitted with events will be relative to this. * `disableGlobbing` (default: `false`). If set to `true` then the strings passed to `.watch()` and `.add()` are treated as literal path names, even if they look like globs. #### Performance * `usePolling` (default: `false`). Whether to use fs.watchFile (backed by polling), or fs.watch. If polling leads to high CPU utilization, consider setting this to `false`. It is typically necessary to **set this to `true` to successfully watch files over a network**, and it may be necessary to successfully watch files in other non-standard situations. Setting to `true` explicitly on MacOS overrides the `useFsEvents` default. You may also set the CHOKIDAR_USEPOLLING env variable to true (1) or false (0) in order to override this option. * _Polling-specific settings_ (effective when `usePolling: true`) * `interval` (default: `100`). Interval of file system polling, in milliseconds. You may also set the CHOKIDAR_INTERVAL env variable to override this option. * `binaryInterval` (default: `300`). Interval of file system polling for binary files. ([see list of binary extensions](https://github.com/sindresorhus/binary-extensions/blob/master/binary-extensions.json)) * `useFsEvents` (default: `true` on MacOS). Whether to use the `fsevents` watching interface if available. When set to `true` explicitly and `fsevents` is available this supercedes the `usePolling` setting. When set to `false` on MacOS, `usePolling: true` becomes the default. * `alwaysStat` (default: `false`). If relying upon the [`fs.Stats`](https://nodejs.org/api/fs.html#fs_class_fs_stats) object that may get passed with `add`, `addDir`, and `change` events, set this to `true` to ensure it is provided even in cases where it wasn't already available from the underlying watch events. * `depth` (default: `undefined`). If set, limits how many levels of subdirectories will be traversed. * `awaitWriteFinish` (default: `false`). By default, the `add` event will fire when a file first appears on disk, before the entire file has been written. Furthermore, in some cases some `change` events will be emitted while the file is being written. In some cases, especially when watching for large files there will be a need to wait for the write operation to finish before responding to a file creation or modification. Setting `awaitWriteFinish` to `true` (or a truthy value) will poll file size, holding its `add` and `change` events until the size does not change for a configurable amount of time. The appropriate duration setting is heavily dependent on the OS and hardware. For accurate detection this parameter should be relatively high, making file watching much less responsive. Use with caution. * *`options.awaitWriteFinish` can be set to an object in order to adjust timing params:* * `awaitWriteFinish.stabilityThreshold` (default: 2000). Amount of time in milliseconds for a file size to remain constant before emitting its event. * `awaitWriteFinish.pollInterval` (default: 100). File size polling interval, in milliseconds. #### Errors * `ignorePermissionErrors` (default: `false`). Indicates whether to watch files that don't have read permissions if possible. If watching fails due to `EPERM` or `EACCES` with this set to `true`, the errors will be suppressed silently. * `atomic` (default: `true` if `useFsEvents` and `usePolling` are `false`). Automatically filters out artifacts that occur when using editors that use "atomic writes" instead of writing directly to the source file. If a file is re-added within 100 ms of being deleted, Chokidar emits a `change` event rather than `unlink` then `add`. If the default of 100 ms does not work well for you, you can override it by setting `atomic` to a custom value, in milliseconds. ### Methods & Events `chokidar.watch()` produces an instance of `FSWatcher`. Methods of `FSWatcher`: * `.add(path / paths)`: Add files, directories, or glob patterns for tracking. Takes an array of strings or just one string. * `.on(event, callback)`: Listen for an FS event. Available events: `add`, `addDir`, `change`, `unlink`, `unlinkDir`, `ready`, `raw`, `error`. Additionally `all` is available which gets emitted with the underlying event name and path for every event other than `ready`, `raw`, and `error`. `raw` is internal, use it carefully. * `.unwatch(path / paths)`: Stop watching files, directories, or glob patterns. Takes an array of strings or just one string. * `.close()`: **async** Removes all listeners from watched files. Asynchronous, returns Promise. Use with `await` to ensure bugs don't happen. * `.getWatched()`: Returns an object representing all the paths on the file system being watched by this `FSWatcher` instance. The object's keys are all the directories (using absolute paths unless the `cwd` option was used), and the values are arrays of the names of the items contained in each directory. ## CLI If you need a CLI interface for your file watching, check out [chokidar-cli](https://github.com/open-cli-tools/chokidar-cli), allowing you to execute a command on each change, or get a stdio stream of change events. ## Install Troubleshooting * `npm WARN optional dep failed, continuing fsevents@n.n.n` * This message is normal part of how `npm` handles optional dependencies and is not indicative of a problem. Even if accompanied by other related error messages, Chokidar should function properly. * `TypeError: fsevents is not a constructor` * Update chokidar by doing `rm -rf node_modules package-lock.json yarn.lock && npm install`, or update your dependency that uses chokidar. * Chokidar is producing `ENOSP` error on Linux, like this: * `bash: cannot set terminal process group (-1): Inappropriate ioctl for device bash: no job control in this shell` `Error: watch /home/ ENOSPC` * This means Chokidar ran out of file handles and you'll need to increase their count by executing the following command in Terminal: `echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p` ## Changelog For more detailed changelog, see [`full_changelog.md`](.github/full_changelog.md). - **v3.5 (Jan 6, 2021):** Support for ARM Macs with Apple Silicon. Fixes for deleted symlinks. - **v3.4 (Apr 26, 2020):** Support for directory-based symlinks. Fixes for macos file replacement. - **v3.3 (Nov 2, 2019):** `FSWatcher#close()` method became async. That fixes IO race conditions related to close method. - **v3.2 (Oct 1, 2019):** Improve Linux RAM usage by 50%. Race condition fixes. Windows glob fixes. Improve stability by using tight range of dependency versions. - **v3.1 (Sep 16, 2019):** dotfiles are no longer filtered out by default. Use `ignored` option if needed. Improve initial Linux scan time by 50%. - **v3 (Apr 30, 2019):** massive CPU & RAM consumption improvements; reduces deps / package size by a factor of 17x and bumps Node.js requirement to v8.16 and higher. - **v2 (Dec 29, 2017):** Globs are now posix-style-only; without windows support. Tons of bugfixes. - **v1 (Apr 7, 2015):** Glob support, symlink support, tons of bugfixes. Node 0.8+ is supported - **v0.1 (Apr 20, 2012):** Initial release, extracted from [Brunch](https://github.com/brunch/brunch/blob/9847a065aea300da99bd0753f90354cde9de1261/src/helpers.coffee#L66) ## Also Why was chokidar named this way? What's the meaning behind it? >Chowkidar is a transliteration of a Hindi word meaning 'watchman, gatekeeper', चौकीदार. This ultimately comes from Sanskrit _ चतुष्क_ (crossway, quadrangle, consisting-of-four). This word is also used in other languages like Urdu as (چوکیدار) which is widely used in Pakistan and India. ## License MIT (c) Paul Miller (<https://paulmillr.com>), see [LICENSE](LICENSE) file. node_modules/ws/package.json 0000664 00000003273 15114741631 0012152 0 ustar 00 { "name": "ws", "version": "8.18.3", "description": "Simple to use, blazing fast and thoroughly tested websocket client and server for Node.js", "keywords": [ "HyBi", "Push", "RFC-6455", "WebSocket", "WebSockets", "real-time" ], "homepage": "https://github.com/websockets/ws", "bugs": "https://github.com/websockets/ws/issues", "repository": { "type": "git", "url": "git+https://github.com/websockets/ws.git" }, "author": "Einar Otto Stangvik <einaros@gmail.com> (http://2x.io)", "license": "MIT", "main": "index.js", "exports": { ".": { "browser": "./browser.js", "import": "./wrapper.mjs", "require": "./index.js" }, "./package.json": "./package.json" }, "browser": "browser.js", "engines": { "node": ">=10.0.0" }, "files": [ "browser.js", "index.js", "lib/*.js", "wrapper.mjs" ], "scripts": { "test": "nyc --reporter=lcov --reporter=text mocha --throw-deprecation test/*.test.js", "integration": "mocha --throw-deprecation test/*.integration.js", "lint": "eslint . && prettier --check --ignore-path .gitignore \"**/*.{json,md,yaml,yml}\"" }, "peerDependencies": { "bufferutil": "^4.0.1", "utf-8-validate": ">=5.0.2" }, "peerDependenciesMeta": { "bufferutil": { "optional": true }, "utf-8-validate": { "optional": true } }, "devDependencies": { "benchmark": "^2.1.4", "bufferutil": "^4.0.1", "eslint": "^9.0.0", "eslint-config-prettier": "^10.0.1", "eslint-plugin-prettier": "^5.0.0", "globals": "^16.0.0", "mocha": "^8.4.0", "nyc": "^15.0.0", "prettier": "^3.0.0", "utf-8-validate": "^6.0.0" } } node_modules/ws/LICENSE 0000664 00000002237 15114741631 0010670 0 ustar 00 Copyright (c) 2011 Einar Otto Stangvik <einaros@gmail.com> Copyright (c) 2013 Arnout Kazemier and contributors Copyright (c) 2016 Luigi Pinca and contributors Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. node_modules/ws/lib/extension.js 0000664 00000014047 15114741631 0013005 0 ustar 00 'use strict'; const { tokenChars } = require('./validation'); /** * Adds an offer to the map of extension offers or a parameter to the map of * parameters. * * @param {Object} dest The map of extension offers or parameters * @param {String} name The extension or parameter name * @param {(Object|Boolean|String)} elem The extension parameters or the * parameter value * @private */ function push(dest, name, elem) { if (dest[name] === undefined) dest[name] = [elem]; else dest[name].push(elem); } /** * Parses the `Sec-WebSocket-Extensions` header into an object. * * @param {String} header The field value of the header * @return {Object} The parsed object * @public */ function parse(header) { const offers = Object.create(null); let params = Object.create(null); let mustUnescape = false; let isEscaping = false; let inQuotes = false; let extensionName; let paramName; let start = -1; let code = -1; let end = -1; let i = 0; for (; i < header.length; i++) { code = header.charCodeAt(i); if (extensionName === undefined) { if (end === -1 && tokenChars[code] === 1) { if (start === -1) start = i; } else if ( i !== 0 && (code === 0x20 /* ' ' */ || code === 0x09) /* '\t' */ ) { if (end === -1 && start !== -1) end = i; } else if (code === 0x3b /* ';' */ || code === 0x2c /* ',' */) { if (start === -1) { throw new SyntaxError(`Unexpected character at index ${i}`); } if (end === -1) end = i; const name = header.slice(start, end); if (code === 0x2c) { push(offers, name, params); params = Object.create(null); } else { extensionName = name; } start = end = -1; } else { throw new SyntaxError(`Unexpected character at index ${i}`); } } else if (paramName === undefined) { if (end === -1 && tokenChars[code] === 1) { if (start === -1) start = i; } else if (code === 0x20 || code === 0x09) { if (end === -1 && start !== -1) end = i; } else if (code === 0x3b || code === 0x2c) { if (start === -1) { throw new SyntaxError(`Unexpected character at index ${i}`); } if (end === -1) end = i; push(params, header.slice(start, end), true); if (code === 0x2c) { push(offers, extensionName, params); params = Object.create(null); extensionName = undefined; } start = end = -1; } else if (code === 0x3d /* '=' */ && start !== -1 && end === -1) { paramName = header.slice(start, i); start = end = -1; } else { throw new SyntaxError(`Unexpected character at index ${i}`); } } else { // // The value of a quoted-string after unescaping must conform to the // token ABNF, so only token characters are valid. // Ref: https://tools.ietf.org/html/rfc6455#section-9.1 // if (isEscaping) { if (tokenChars[code] !== 1) { throw new SyntaxError(`Unexpected character at index ${i}`); } if (start === -1) start = i; else if (!mustUnescape) mustUnescape = true; isEscaping = false; } else if (inQuotes) { if (tokenChars[code] === 1) { if (start === -1) start = i; } else if (code === 0x22 /* '"' */ && start !== -1) { inQuotes = false; end = i; } else if (code === 0x5c /* '\' */) { isEscaping = true; } else { throw new SyntaxError(`Unexpected character at index ${i}`); } } else if (code === 0x22 && header.charCodeAt(i - 1) === 0x3d) { inQuotes = true; } else if (end === -1 && tokenChars[code] === 1) { if (start === -1) start = i; } else if (start !== -1 && (code === 0x20 || code === 0x09)) { if (end === -1) end = i; } else if (code === 0x3b || code === 0x2c) { if (start === -1) { throw new SyntaxError(`Unexpected character at index ${i}`); } if (end === -1) end = i; let value = header.slice(start, end); if (mustUnescape) { value = value.replace(/\\/g, ''); mustUnescape = false; } push(params, paramName, value); if (code === 0x2c) { push(offers, extensionName, params); params = Object.create(null); extensionName = undefined; } paramName = undefined; start = end = -1; } else { throw new SyntaxError(`Unexpected character at index ${i}`); } } } if (start === -1 || inQuotes || code === 0x20 || code === 0x09) { throw new SyntaxError('Unexpected end of input'); } if (end === -1) end = i; const token = header.slice(start, end); if (extensionName === undefined) { push(offers, token, params); } else { if (paramName === undefined) { push(params, token, true); } else if (mustUnescape) { push(params, paramName, token.replace(/\\/g, '')); } else { push(params, paramName, token); } push(offers, extensionName, params); } return offers; } /** * Builds the `Sec-WebSocket-Extensions` header field value. * * @param {Object} extensions The map of extensions and parameters to format * @return {String} A string representing the given object * @public */ function format(extensions) { return Object.keys(extensions) .map((extension) => { let configurations = extensions[extension]; if (!Array.isArray(configurations)) configurations = [configurations]; return configurations .map((params) => { return [extension] .concat( Object.keys(params).map((k) => { let values = params[k]; if (!Array.isArray(values)) values = [values]; return values .map((v) => (v === true ? k : `${k}=${v}`)) .join('; '); }) ) .join('; '); }) .join(', '); }) .join(', '); } module.exports = { format, parse }; node_modules/ws/lib/limiter.js 0000664 00000002012 15114741631 0012423 0 ustar 00 'use strict'; const kDone = Symbol('kDone'); const kRun = Symbol('kRun'); /** * A very simple job queue with adjustable concurrency. Adapted from * https://github.com/STRML/async-limiter */ class Limiter { /** * Creates a new `Limiter`. * * @param {Number} [concurrency=Infinity] The maximum number of jobs allowed * to run concurrently */ constructor(concurrency) { this[kDone] = () => { this.pending--; this[kRun](); }; this.concurrency = concurrency || Infinity; this.jobs = []; this.pending = 0; } /** * Adds a job to the queue. * * @param {Function} job The job to run * @public */ add(job) { this.jobs.push(job); this[kRun](); } /** * Removes a job from the queue and runs it if possible. * * @private */ [kRun]() { if (this.pending === this.concurrency) return; if (this.jobs.length) { const job = this.jobs.shift(); this.pending++; job(this[kDone]); } } } module.exports = Limiter; node_modules/ws/lib/event-target.js 0000664 00000016231 15114741631 0013373 0 ustar 00 'use strict'; const { kForOnEventAttribute, kListener } = require('./constants'); const kCode = Symbol('kCode'); const kData = Symbol('kData'); const kError = Symbol('kError'); const kMessage = Symbol('kMessage'); const kReason = Symbol('kReason'); const kTarget = Symbol('kTarget'); const kType = Symbol('kType'); const kWasClean = Symbol('kWasClean'); /** * Class representing an event. */ class Event { /** * Create a new `Event`. * * @param {String} type The name of the event * @throws {TypeError} If the `type` argument is not specified */ constructor(type) { this[kTarget] = null; this[kType] = type; } /** * @type {*} */ get target() { return this[kTarget]; } /** * @type {String} */ get type() { return this[kType]; } } Object.defineProperty(Event.prototype, 'target', { enumerable: true }); Object.defineProperty(Event.prototype, 'type', { enumerable: true }); /** * Class representing a close event. * * @extends Event */ class CloseEvent extends Event { /** * Create a new `CloseEvent`. * * @param {String} type The name of the event * @param {Object} [options] A dictionary object that allows for setting * attributes via object members of the same name * @param {Number} [options.code=0] The status code explaining why the * connection was closed * @param {String} [options.reason=''] A human-readable string explaining why * the connection was closed * @param {Boolean} [options.wasClean=false] Indicates whether or not the * connection was cleanly closed */ constructor(type, options = {}) { super(type); this[kCode] = options.code === undefined ? 0 : options.code; this[kReason] = options.reason === undefined ? '' : options.reason; this[kWasClean] = options.wasClean === undefined ? false : options.wasClean; } /** * @type {Number} */ get code() { return this[kCode]; } /** * @type {String} */ get reason() { return this[kReason]; } /** * @type {Boolean} */ get wasClean() { return this[kWasClean]; } } Object.defineProperty(CloseEvent.prototype, 'code', { enumerable: true }); Object.defineProperty(CloseEvent.prototype, 'reason', { enumerable: true }); Object.defineProperty(CloseEvent.prototype, 'wasClean', { enumerable: true }); /** * Class representing an error event. * * @extends Event */ class ErrorEvent extends Event { /** * Create a new `ErrorEvent`. * * @param {String} type The name of the event * @param {Object} [options] A dictionary object that allows for setting * attributes via object members of the same name * @param {*} [options.error=null] The error that generated this event * @param {String} [options.message=''] The error message */ constructor(type, options = {}) { super(type); this[kError] = options.error === undefined ? null : options.error; this[kMessage] = options.message === undefined ? '' : options.message; } /** * @type {*} */ get error() { return this[kError]; } /** * @type {String} */ get message() { return this[kMessage]; } } Object.defineProperty(ErrorEvent.prototype, 'error', { enumerable: true }); Object.defineProperty(ErrorEvent.prototype, 'message', { enumerable: true }); /** * Class representing a message event. * * @extends Event */ class MessageEvent extends Event { /** * Create a new `MessageEvent`. * * @param {String} type The name of the event * @param {Object} [options] A dictionary object that allows for setting * attributes via object members of the same name * @param {*} [options.data=null] The message content */ constructor(type, options = {}) { super(type); this[kData] = options.data === undefined ? null : options.data; } /** * @type {*} */ get data() { return this[kData]; } } Object.defineProperty(MessageEvent.prototype, 'data', { enumerable: true }); /** * This provides methods for emulating the `EventTarget` interface. It's not * meant to be used directly. * * @mixin */ const EventTarget = { /** * Register an event listener. * * @param {String} type A string representing the event type to listen for * @param {(Function|Object)} handler The listener to add * @param {Object} [options] An options object specifies characteristics about * the event listener * @param {Boolean} [options.once=false] A `Boolean` indicating that the * listener should be invoked at most once after being added. If `true`, * the listener would be automatically removed when invoked. * @public */ addEventListener(type, handler, options = {}) { for (const listener of this.listeners(type)) { if ( !options[kForOnEventAttribute] && listener[kListener] === handler && !listener[kForOnEventAttribute] ) { return; } } let wrapper; if (type === 'message') { wrapper = function onMessage(data, isBinary) { const event = new MessageEvent('message', { data: isBinary ? data : data.toString() }); event[kTarget] = this; callListener(handler, this, event); }; } else if (type === 'close') { wrapper = function onClose(code, message) { const event = new CloseEvent('close', { code, reason: message.toString(), wasClean: this._closeFrameReceived && this._closeFrameSent }); event[kTarget] = this; callListener(handler, this, event); }; } else if (type === 'error') { wrapper = function onError(error) { const event = new ErrorEvent('error', { error, message: error.message }); event[kTarget] = this; callListener(handler, this, event); }; } else if (type === 'open') { wrapper = function onOpen() { const event = new Event('open'); event[kTarget] = this; callListener(handler, this, event); }; } else { return; } wrapper[kForOnEventAttribute] = !!options[kForOnEventAttribute]; wrapper[kListener] = handler; if (options.once) { this.once(type, wrapper); } else { this.on(type, wrapper); } }, /** * Remove an event listener. * * @param {String} type A string representing the event type to remove * @param {(Function|Object)} handler The listener to remove * @public */ removeEventListener(type, handler) { for (const listener of this.listeners(type)) { if (listener[kListener] === handler && !listener[kForOnEventAttribute]) { this.removeListener(type, listener); break; } } } }; module.exports = { CloseEvent, ErrorEvent, Event, EventTarget, MessageEvent }; /** * Call an event listener * * @param {(Function|Object)} listener The listener to call * @param {*} thisArg The value to use as `this`` when calling the listener * @param {Event} event The event to pass to the listener * @private */ function callListener(listener, thisArg, event) { if (typeof listener === 'object' && listener.handleEvent) { listener.handleEvent.call(listener, event); } else { listener.call(thisArg, event); } } node_modules/ws/lib/sender.js 0000664 00000040507 15114741631 0012251 0 ustar 00 /* eslint no-unused-vars: ["error", { "varsIgnorePattern": "^Duplex" }] */ 'use strict'; const { Duplex } = require('stream'); const { randomFillSync } = require('crypto'); const PerMessageDeflate = require('./permessage-deflate'); const { EMPTY_BUFFER, kWebSocket, NOOP } = require('./constants'); const { isBlob, isValidStatusCode } = require('./validation'); const { mask: applyMask, toBuffer } = require('./buffer-util'); const kByteLength = Symbol('kByteLength'); const maskBuffer = Buffer.alloc(4); const RANDOM_POOL_SIZE = 8 * 1024; let randomPool; let randomPoolPointer = RANDOM_POOL_SIZE; const DEFAULT = 0; const DEFLATING = 1; const GET_BLOB_DATA = 2; /** * HyBi Sender implementation. */ class Sender { /** * Creates a Sender instance. * * @param {Duplex} socket The connection socket * @param {Object} [extensions] An object containing the negotiated extensions * @param {Function} [generateMask] The function used to generate the masking * key */ constructor(socket, extensions, generateMask) { this._extensions = extensions || {}; if (generateMask) { this._generateMask = generateMask; this._maskBuffer = Buffer.alloc(4); } this._socket = socket; this._firstFragment = true; this._compress = false; this._bufferedBytes = 0; this._queue = []; this._state = DEFAULT; this.onerror = NOOP; this[kWebSocket] = undefined; } /** * Frames a piece of data according to the HyBi WebSocket protocol. * * @param {(Buffer|String)} data The data to frame * @param {Object} options Options object * @param {Boolean} [options.fin=false] Specifies whether or not to set the * FIN bit * @param {Function} [options.generateMask] The function used to generate the * masking key * @param {Boolean} [options.mask=false] Specifies whether or not to mask * `data` * @param {Buffer} [options.maskBuffer] The buffer used to store the masking * key * @param {Number} options.opcode The opcode * @param {Boolean} [options.readOnly=false] Specifies whether `data` can be * modified * @param {Boolean} [options.rsv1=false] Specifies whether or not to set the * RSV1 bit * @return {(Buffer|String)[]} The framed data * @public */ static frame(data, options) { let mask; let merge = false; let offset = 2; let skipMasking = false; if (options.mask) { mask = options.maskBuffer || maskBuffer; if (options.generateMask) { options.generateMask(mask); } else { if (randomPoolPointer === RANDOM_POOL_SIZE) { /* istanbul ignore else */ if (randomPool === undefined) { // // This is lazily initialized because server-sent frames must not // be masked so it may never be used. // randomPool = Buffer.alloc(RANDOM_POOL_SIZE); } randomFillSync(randomPool, 0, RANDOM_POOL_SIZE); randomPoolPointer = 0; } mask[0] = randomPool[randomPoolPointer++]; mask[1] = randomPool[randomPoolPointer++]; mask[2] = randomPool[randomPoolPointer++]; mask[3] = randomPool[randomPoolPointer++]; } skipMasking = (mask[0] | mask[1] | mask[2] | mask[3]) === 0; offset = 6; } let dataLength; if (typeof data === 'string') { if ( (!options.mask || skipMasking) && options[kByteLength] !== undefined ) { dataLength = options[kByteLength]; } else { data = Buffer.from(data); dataLength = data.length; } } else { dataLength = data.length; merge = options.mask && options.readOnly && !skipMasking; } let payloadLength = dataLength; if (dataLength >= 65536) { offset += 8; payloadLength = 127; } else if (dataLength > 125) { offset += 2; payloadLength = 126; } const target = Buffer.allocUnsafe(merge ? dataLength + offset : offset); target[0] = options.fin ? options.opcode | 0x80 : options.opcode; if (options.rsv1) target[0] |= 0x40; target[1] = payloadLength; if (payloadLength === 126) { target.writeUInt16BE(dataLength, 2); } else if (payloadLength === 127) { target[2] = target[3] = 0; target.writeUIntBE(dataLength, 4, 6); } if (!options.mask) return [target, data]; target[1] |= 0x80; target[offset - 4] = mask[0]; target[offset - 3] = mask[1]; target[offset - 2] = mask[2]; target[offset - 1] = mask[3]; if (skipMasking) return [target, data]; if (merge) { applyMask(data, mask, target, offset, dataLength); return [target]; } applyMask(data, mask, data, 0, dataLength); return [target, data]; } /** * Sends a close message to the other peer. * * @param {Number} [code] The status code component of the body * @param {(String|Buffer)} [data] The message component of the body * @param {Boolean} [mask=false] Specifies whether or not to mask the message * @param {Function} [cb] Callback * @public */ close(code, data, mask, cb) { let buf; if (code === undefined) { buf = EMPTY_BUFFER; } else if (typeof code !== 'number' || !isValidStatusCode(code)) { throw new TypeError('First argument must be a valid error code number'); } else if (data === undefined || !data.length) { buf = Buffer.allocUnsafe(2); buf.writeUInt16BE(code, 0); } else { const length = Buffer.byteLength(data); if (length > 123) { throw new RangeError('The message must not be greater than 123 bytes'); } buf = Buffer.allocUnsafe(2 + length); buf.writeUInt16BE(code, 0); if (typeof data === 'string') { buf.write(data, 2); } else { buf.set(data, 2); } } const options = { [kByteLength]: buf.length, fin: true, generateMask: this._generateMask, mask, maskBuffer: this._maskBuffer, opcode: 0x08, readOnly: false, rsv1: false }; if (this._state !== DEFAULT) { this.enqueue([this.dispatch, buf, false, options, cb]); } else { this.sendFrame(Sender.frame(buf, options), cb); } } /** * Sends a ping message to the other peer. * * @param {*} data The message to send * @param {Boolean} [mask=false] Specifies whether or not to mask `data` * @param {Function} [cb] Callback * @public */ ping(data, mask, cb) { let byteLength; let readOnly; if (typeof data === 'string') { byteLength = Buffer.byteLength(data); readOnly = false; } else if (isBlob(data)) { byteLength = data.size; readOnly = false; } else { data = toBuffer(data); byteLength = data.length; readOnly = toBuffer.readOnly; } if (byteLength > 125) { throw new RangeError('The data size must not be greater than 125 bytes'); } const options = { [kByteLength]: byteLength, fin: true, generateMask: this._generateMask, mask, maskBuffer: this._maskBuffer, opcode: 0x09, readOnly, rsv1: false }; if (isBlob(data)) { if (this._state !== DEFAULT) { this.enqueue([this.getBlobData, data, false, options, cb]); } else { this.getBlobData(data, false, options, cb); } } else if (this._state !== DEFAULT) { this.enqueue([this.dispatch, data, false, options, cb]); } else { this.sendFrame(Sender.frame(data, options), cb); } } /** * Sends a pong message to the other peer. * * @param {*} data The message to send * @param {Boolean} [mask=false] Specifies whether or not to mask `data` * @param {Function} [cb] Callback * @public */ pong(data, mask, cb) { let byteLength; let readOnly; if (typeof data === 'string') { byteLength = Buffer.byteLength(data); readOnly = false; } else if (isBlob(data)) { byteLength = data.size; readOnly = false; } else { data = toBuffer(data); byteLength = data.length; readOnly = toBuffer.readOnly; } if (byteLength > 125) { throw new RangeError('The data size must not be greater than 125 bytes'); } const options = { [kByteLength]: byteLength, fin: true, generateMask: this._generateMask, mask, maskBuffer: this._maskBuffer, opcode: 0x0a, readOnly, rsv1: false }; if (isBlob(data)) { if (this._state !== DEFAULT) { this.enqueue([this.getBlobData, data, false, options, cb]); } else { this.getBlobData(data, false, options, cb); } } else if (this._state !== DEFAULT) { this.enqueue([this.dispatch, data, false, options, cb]); } else { this.sendFrame(Sender.frame(data, options), cb); } } /** * Sends a data message to the other peer. * * @param {*} data The message to send * @param {Object} options Options object * @param {Boolean} [options.binary=false] Specifies whether `data` is binary * or text * @param {Boolean} [options.compress=false] Specifies whether or not to * compress `data` * @param {Boolean} [options.fin=false] Specifies whether the fragment is the * last one * @param {Boolean} [options.mask=false] Specifies whether or not to mask * `data` * @param {Function} [cb] Callback * @public */ send(data, options, cb) { const perMessageDeflate = this._extensions[PerMessageDeflate.extensionName]; let opcode = options.binary ? 2 : 1; let rsv1 = options.compress; let byteLength; let readOnly; if (typeof data === 'string') { byteLength = Buffer.byteLength(data); readOnly = false; } else if (isBlob(data)) { byteLength = data.size; readOnly = false; } else { data = toBuffer(data); byteLength = data.length; readOnly = toBuffer.readOnly; } if (this._firstFragment) { this._firstFragment = false; if ( rsv1 && perMessageDeflate && perMessageDeflate.params[ perMessageDeflate._isServer ? 'server_no_context_takeover' : 'client_no_context_takeover' ] ) { rsv1 = byteLength >= perMessageDeflate._threshold; } this._compress = rsv1; } else { rsv1 = false; opcode = 0; } if (options.fin) this._firstFragment = true; const opts = { [kByteLength]: byteLength, fin: options.fin, generateMask: this._generateMask, mask: options.mask, maskBuffer: this._maskBuffer, opcode, readOnly, rsv1 }; if (isBlob(data)) { if (this._state !== DEFAULT) { this.enqueue([this.getBlobData, data, this._compress, opts, cb]); } else { this.getBlobData(data, this._compress, opts, cb); } } else if (this._state !== DEFAULT) { this.enqueue([this.dispatch, data, this._compress, opts, cb]); } else { this.dispatch(data, this._compress, opts, cb); } } /** * Gets the contents of a blob as binary data. * * @param {Blob} blob The blob * @param {Boolean} [compress=false] Specifies whether or not to compress * the data * @param {Object} options Options object * @param {Boolean} [options.fin=false] Specifies whether or not to set the * FIN bit * @param {Function} [options.generateMask] The function used to generate the * masking key * @param {Boolean} [options.mask=false] Specifies whether or not to mask * `data` * @param {Buffer} [options.maskBuffer] The buffer used to store the masking * key * @param {Number} options.opcode The opcode * @param {Boolean} [options.readOnly=false] Specifies whether `data` can be * modified * @param {Boolean} [options.rsv1=false] Specifies whether or not to set the * RSV1 bit * @param {Function} [cb] Callback * @private */ getBlobData(blob, compress, options, cb) { this._bufferedBytes += options[kByteLength]; this._state = GET_BLOB_DATA; blob .arrayBuffer() .then((arrayBuffer) => { if (this._socket.destroyed) { const err = new Error( 'The socket was closed while the blob was being read' ); // // `callCallbacks` is called in the next tick to ensure that errors // that might be thrown in the callbacks behave like errors thrown // outside the promise chain. // process.nextTick(callCallbacks, this, err, cb); return; } this._bufferedBytes -= options[kByteLength]; const data = toBuffer(arrayBuffer); if (!compress) { this._state = DEFAULT; this.sendFrame(Sender.frame(data, options), cb); this.dequeue(); } else { this.dispatch(data, compress, options, cb); } }) .catch((err) => { // // `onError` is called in the next tick for the same reason that // `callCallbacks` above is. // process.nextTick(onError, this, err, cb); }); } /** * Dispatches a message. * * @param {(Buffer|String)} data The message to send * @param {Boolean} [compress=false] Specifies whether or not to compress * `data` * @param {Object} options Options object * @param {Boolean} [options.fin=false] Specifies whether or not to set the * FIN bit * @param {Function} [options.generateMask] The function used to generate the * masking key * @param {Boolean} [options.mask=false] Specifies whether or not to mask * `data` * @param {Buffer} [options.maskBuffer] The buffer used to store the masking * key * @param {Number} options.opcode The opcode * @param {Boolean} [options.readOnly=false] Specifies whether `data` can be * modified * @param {Boolean} [options.rsv1=false] Specifies whether or not to set the * RSV1 bit * @param {Function} [cb] Callback * @private */ dispatch(data, compress, options, cb) { if (!compress) { this.sendFrame(Sender.frame(data, options), cb); return; } const perMessageDeflate = this._extensions[PerMessageDeflate.extensionName]; this._bufferedBytes += options[kByteLength]; this._state = DEFLATING; perMessageDeflate.compress(data, options.fin, (_, buf) => { if (this._socket.destroyed) { const err = new Error( 'The socket was closed while data was being compressed' ); callCallbacks(this, err, cb); return; } this._bufferedBytes -= options[kByteLength]; this._state = DEFAULT; options.readOnly = false; this.sendFrame(Sender.frame(buf, options), cb); this.dequeue(); }); } /** * Executes queued send operations. * * @private */ dequeue() { while (this._state === DEFAULT && this._queue.length) { const params = this._queue.shift(); this._bufferedBytes -= params[3][kByteLength]; Reflect.apply(params[0], this, params.slice(1)); } } /** * Enqueues a send operation. * * @param {Array} params Send operation parameters. * @private */ enqueue(params) { this._bufferedBytes += params[3][kByteLength]; this._queue.push(params); } /** * Sends a frame. * * @param {(Buffer | String)[]} list The frame to send * @param {Function} [cb] Callback * @private */ sendFrame(list, cb) { if (list.length === 2) { this._socket.cork(); this._socket.write(list[0]); this._socket.write(list[1], cb); this._socket.uncork(); } else { this._socket.write(list[0], cb); } } } module.exports = Sender; /** * Calls queued callbacks with an error. * * @param {Sender} sender The `Sender` instance * @param {Error} err The error to call the callbacks with * @param {Function} [cb] The first callback * @private */ function callCallbacks(sender, err, cb) { if (typeof cb === 'function') cb(err); for (let i = 0; i < sender._queue.length; i++) { const params = sender._queue[i]; const callback = params[params.length - 1]; if (typeof callback === 'function') callback(err); } } /** * Handles a `Sender` error. * * @param {Sender} sender The `Sender` instance * @param {Error} err The error * @param {Function} [cb] The first pending callback * @private */ function onError(sender, err, cb) { callCallbacks(sender, err, cb); sender.onerror(err); } node_modules/ws/lib/constants.js 0000664 00000000737 15114741631 0013006 0 ustar 00 'use strict'; const BINARY_TYPES = ['nodebuffer', 'arraybuffer', 'fragments']; const hasBlob = typeof Blob !== 'undefined'; if (hasBlob) BINARY_TYPES.push('blob'); module.exports = { BINARY_TYPES, EMPTY_BUFFER: Buffer.alloc(0), GUID: '258EAFA5-E914-47DA-95CA-C5AB0DC85B11', hasBlob, kForOnEventAttribute: Symbol('kIsForOnEventAttribute'), kListener: Symbol('kListener'), kStatusCode: Symbol('status-code'), kWebSocket: Symbol('websocket'), NOOP: () => {} }; node_modules/ws/lib/validation.js 0000664 00000007477 15114741631 0013134 0 ustar 00 'use strict'; const { isUtf8 } = require('buffer'); const { hasBlob } = require('./constants'); // // Allowed token characters: // // '!', '#', '$', '%', '&', ''', '*', '+', '-', // '.', 0-9, A-Z, '^', '_', '`', a-z, '|', '~' // // tokenChars[32] === 0 // ' ' // tokenChars[33] === 1 // '!' // tokenChars[34] === 0 // '"' // ... // // prettier-ignore const tokenChars = [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 0 - 15 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 16 - 31 0, 1, 0, 1, 1, 1, 1, 1, 0, 0, 1, 1, 0, 1, 1, 0, // 32 - 47 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, // 48 - 63 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 64 - 79 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 1, 1, // 80 - 95 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 96 - 111 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0, 1, 0 // 112 - 127 ]; /** * Checks if a status code is allowed in a close frame. * * @param {Number} code The status code * @return {Boolean} `true` if the status code is valid, else `false` * @public */ function isValidStatusCode(code) { return ( (code >= 1000 && code <= 1014 && code !== 1004 && code !== 1005 && code !== 1006) || (code >= 3000 && code <= 4999) ); } /** * Checks if a given buffer contains only correct UTF-8. * Ported from https://www.cl.cam.ac.uk/%7Emgk25/ucs/utf8_check.c by * Markus Kuhn. * * @param {Buffer} buf The buffer to check * @return {Boolean} `true` if `buf` contains only correct UTF-8, else `false` * @public */ function _isValidUTF8(buf) { const len = buf.length; let i = 0; while (i < len) { if ((buf[i] & 0x80) === 0) { // 0xxxxxxx i++; } else if ((buf[i] & 0xe0) === 0xc0) { // 110xxxxx 10xxxxxx if ( i + 1 === len || (buf[i + 1] & 0xc0) !== 0x80 || (buf[i] & 0xfe) === 0xc0 // Overlong ) { return false; } i += 2; } else if ((buf[i] & 0xf0) === 0xe0) { // 1110xxxx 10xxxxxx 10xxxxxx if ( i + 2 >= len || (buf[i + 1] & 0xc0) !== 0x80 || (buf[i + 2] & 0xc0) !== 0x80 || (buf[i] === 0xe0 && (buf[i + 1] & 0xe0) === 0x80) || // Overlong (buf[i] === 0xed && (buf[i + 1] & 0xe0) === 0xa0) // Surrogate (U+D800 - U+DFFF) ) { return false; } i += 3; } else if ((buf[i] & 0xf8) === 0xf0) { // 11110xxx 10xxxxxx 10xxxxxx 10xxxxxx if ( i + 3 >= len || (buf[i + 1] & 0xc0) !== 0x80 || (buf[i + 2] & 0xc0) !== 0x80 || (buf[i + 3] & 0xc0) !== 0x80 || (buf[i] === 0xf0 && (buf[i + 1] & 0xf0) === 0x80) || // Overlong (buf[i] === 0xf4 && buf[i + 1] > 0x8f) || buf[i] > 0xf4 // > U+10FFFF ) { return false; } i += 4; } else { return false; } } return true; } /** * Determines whether a value is a `Blob`. * * @param {*} value The value to be tested * @return {Boolean} `true` if `value` is a `Blob`, else `false` * @private */ function isBlob(value) { return ( hasBlob && typeof value === 'object' && typeof value.arrayBuffer === 'function' && typeof value.type === 'string' && typeof value.stream === 'function' && (value[Symbol.toStringTag] === 'Blob' || value[Symbol.toStringTag] === 'File') ); } module.exports = { isBlob, isValidStatusCode, isValidUTF8: _isValidUTF8, tokenChars }; if (isUtf8) { module.exports.isValidUTF8 = function (buf) { return buf.length < 24 ? _isValidUTF8(buf) : isUtf8(buf); }; } /* istanbul ignore else */ else if (!process.env.WS_NO_UTF_8_VALIDATE) { try { const isValidUTF8 = require('utf-8-validate'); module.exports.isValidUTF8 = function (buf) { return buf.length < 32 ? _isValidUTF8(buf) : isValidUTF8(buf); }; } catch (e) { // Continue regardless of the error. } } node_modules/ws/lib/websocket.js 0000664 00000107157 15114741631 0012764 0 ustar 00 /* eslint no-unused-vars: ["error", { "varsIgnorePattern": "^Duplex|Readable$", "caughtErrors": "none" }] */ 'use strict'; const EventEmitter = require('events'); const https = require('https'); const http = require('http'); const net = require('net'); const tls = require('tls'); const { randomBytes, createHash } = require('crypto'); const { Duplex, Readable } = require('stream'); const { URL } = require('url'); const PerMessageDeflate = require('./permessage-deflate'); const Receiver = require('./receiver'); const Sender = require('./sender'); const { isBlob } = require('./validation'); const { BINARY_TYPES, EMPTY_BUFFER, GUID, kForOnEventAttribute, kListener, kStatusCode, kWebSocket, NOOP } = require('./constants'); const { EventTarget: { addEventListener, removeEventListener } } = require('./event-target'); const { format, parse } = require('./extension'); const { toBuffer } = require('./buffer-util'); const closeTimeout = 30 * 1000; const kAborted = Symbol('kAborted'); const protocolVersions = [8, 13]; const readyStates = ['CONNECTING', 'OPEN', 'CLOSING', 'CLOSED']; const subprotocolRegex = /^[!#$%&'*+\-.0-9A-Z^_`|a-z~]+$/; /** * Class representing a WebSocket. * * @extends EventEmitter */ class WebSocket extends EventEmitter { /** * Create a new `WebSocket`. * * @param {(String|URL)} address The URL to which to connect * @param {(String|String[])} [protocols] The subprotocols * @param {Object} [options] Connection options */ constructor(address, protocols, options) { super(); this._binaryType = BINARY_TYPES[0]; this._closeCode = 1006; this._closeFrameReceived = false; this._closeFrameSent = false; this._closeMessage = EMPTY_BUFFER; this._closeTimer = null; this._errorEmitted = false; this._extensions = {}; this._paused = false; this._protocol = ''; this._readyState = WebSocket.CONNECTING; this._receiver = null; this._sender = null; this._socket = null; if (address !== null) { this._bufferedAmount = 0; this._isServer = false; this._redirects = 0; if (protocols === undefined) { protocols = []; } else if (!Array.isArray(protocols)) { if (typeof protocols === 'object' && protocols !== null) { options = protocols; protocols = []; } else { protocols = [protocols]; } } initAsClient(this, address, protocols, options); } else { this._autoPong = options.autoPong; this._isServer = true; } } /** * For historical reasons, the custom "nodebuffer" type is used by the default * instead of "blob". * * @type {String} */ get binaryType() { return this._binaryType; } set binaryType(type) { if (!BINARY_TYPES.includes(type)) return; this._binaryType = type; // // Allow to change `binaryType` on the fly. // if (this._receiver) this._receiver._binaryType = type; } /** * @type {Number} */ get bufferedAmount() { if (!this._socket) return this._bufferedAmount; return this._socket._writableState.length + this._sender._bufferedBytes; } /** * @type {String} */ get extensions() { return Object.keys(this._extensions).join(); } /** * @type {Boolean} */ get isPaused() { return this._paused; } /** * @type {Function} */ /* istanbul ignore next */ get onclose() { return null; } /** * @type {Function} */ /* istanbul ignore next */ get onerror() { return null; } /** * @type {Function} */ /* istanbul ignore next */ get onopen() { return null; } /** * @type {Function} */ /* istanbul ignore next */ get onmessage() { return null; } /** * @type {String} */ get protocol() { return this._protocol; } /** * @type {Number} */ get readyState() { return this._readyState; } /** * @type {String} */ get url() { return this._url; } /** * Set up the socket and the internal resources. * * @param {Duplex} socket The network socket between the server and client * @param {Buffer} head The first packet of the upgraded stream * @param {Object} options Options object * @param {Boolean} [options.allowSynchronousEvents=false] Specifies whether * any of the `'message'`, `'ping'`, and `'pong'` events can be emitted * multiple times in the same tick * @param {Function} [options.generateMask] The function used to generate the * masking key * @param {Number} [options.maxPayload=0] The maximum allowed message size * @param {Boolean} [options.skipUTF8Validation=false] Specifies whether or * not to skip UTF-8 validation for text and close messages * @private */ setSocket(socket, head, options) { const receiver = new Receiver({ allowSynchronousEvents: options.allowSynchronousEvents, binaryType: this.binaryType, extensions: this._extensions, isServer: this._isServer, maxPayload: options.maxPayload, skipUTF8Validation: options.skipUTF8Validation }); const sender = new Sender(socket, this._extensions, options.generateMask); this._receiver = receiver; this._sender = sender; this._socket = socket; receiver[kWebSocket] = this; sender[kWebSocket] = this; socket[kWebSocket] = this; receiver.on('conclude', receiverOnConclude); receiver.on('drain', receiverOnDrain); receiver.on('error', receiverOnError); receiver.on('message', receiverOnMessage); receiver.on('ping', receiverOnPing); receiver.on('pong', receiverOnPong); sender.onerror = senderOnError; // // These methods may not be available if `socket` is just a `Duplex`. // if (socket.setTimeout) socket.setTimeout(0); if (socket.setNoDelay) socket.setNoDelay(); if (head.length > 0) socket.unshift(head); socket.on('close', socketOnClose); socket.on('data', socketOnData); socket.on('end', socketOnEnd); socket.on('error', socketOnError); this._readyState = WebSocket.OPEN; this.emit('open'); } /** * Emit the `'close'` event. * * @private */ emitClose() { if (!this._socket) { this._readyState = WebSocket.CLOSED; this.emit('close', this._closeCode, this._closeMessage); return; } if (this._extensions[PerMessageDeflate.extensionName]) { this._extensions[PerMessageDeflate.extensionName].cleanup(); } this._receiver.removeAllListeners(); this._readyState = WebSocket.CLOSED; this.emit('close', this._closeCode, this._closeMessage); } /** * Start a closing handshake. * * +----------+ +-----------+ +----------+ * - - -|ws.close()|-->|close frame|-->|ws.close()|- - - * | +----------+ +-----------+ +----------+ | * +----------+ +-----------+ | * CLOSING |ws.close()|<--|close frame|<--+-----+ CLOSING * +----------+ +-----------+ | * | | | +---+ | * +------------------------+-->|fin| - - - - * | +---+ | +---+ * - - - - -|fin|<---------------------+ * +---+ * * @param {Number} [code] Status code explaining why the connection is closing * @param {(String|Buffer)} [data] The reason why the connection is * closing * @public */ close(code, data) { if (this.readyState === WebSocket.CLOSED) return; if (this.readyState === WebSocket.CONNECTING) { const msg = 'WebSocket was closed before the connection was established'; abortHandshake(this, this._req, msg); return; } if (this.readyState === WebSocket.CLOSING) { if ( this._closeFrameSent && (this._closeFrameReceived || this._receiver._writableState.errorEmitted) ) { this._socket.end(); } return; } this._readyState = WebSocket.CLOSING; this._sender.close(code, data, !this._isServer, (err) => { // // This error is handled by the `'error'` listener on the socket. We only // want to know if the close frame has been sent here. // if (err) return; this._closeFrameSent = true; if ( this._closeFrameReceived || this._receiver._writableState.errorEmitted ) { this._socket.end(); } }); setCloseTimer(this); } /** * Pause the socket. * * @public */ pause() { if ( this.readyState === WebSocket.CONNECTING || this.readyState === WebSocket.CLOSED ) { return; } this._paused = true; this._socket.pause(); } /** * Send a ping. * * @param {*} [data] The data to send * @param {Boolean} [mask] Indicates whether or not to mask `data` * @param {Function} [cb] Callback which is executed when the ping is sent * @public */ ping(data, mask, cb) { if (this.readyState === WebSocket.CONNECTING) { throw new Error('WebSocket is not open: readyState 0 (CONNECTING)'); } if (typeof data === 'function') { cb = data; data = mask = undefined; } else if (typeof mask === 'function') { cb = mask; mask = undefined; } if (typeof data === 'number') data = data.toString(); if (this.readyState !== WebSocket.OPEN) { sendAfterClose(this, data, cb); return; } if (mask === undefined) mask = !this._isServer; this._sender.ping(data || EMPTY_BUFFER, mask, cb); } /** * Send a pong. * * @param {*} [data] The data to send * @param {Boolean} [mask] Indicates whether or not to mask `data` * @param {Function} [cb] Callback which is executed when the pong is sent * @public */ pong(data, mask, cb) { if (this.readyState === WebSocket.CONNECTING) { throw new Error('WebSocket is not open: readyState 0 (CONNECTING)'); } if (typeof data === 'function') { cb = data; data = mask = undefined; } else if (typeof mask === 'function') { cb = mask; mask = undefined; } if (typeof data === 'number') data = data.toString(); if (this.readyState !== WebSocket.OPEN) { sendAfterClose(this, data, cb); return; } if (mask === undefined) mask = !this._isServer; this._sender.pong(data || EMPTY_BUFFER, mask, cb); } /** * Resume the socket. * * @public */ resume() { if ( this.readyState === WebSocket.CONNECTING || this.readyState === WebSocket.CLOSED ) { return; } this._paused = false; if (!this._receiver._writableState.needDrain) this._socket.resume(); } /** * Send a data message. * * @param {*} data The message to send * @param {Object} [options] Options object * @param {Boolean} [options.binary] Specifies whether `data` is binary or * text * @param {Boolean} [options.compress] Specifies whether or not to compress * `data` * @param {Boolean} [options.fin=true] Specifies whether the fragment is the * last one * @param {Boolean} [options.mask] Specifies whether or not to mask `data` * @param {Function} [cb] Callback which is executed when data is written out * @public */ send(data, options, cb) { if (this.readyState === WebSocket.CONNECTING) { throw new Error('WebSocket is not open: readyState 0 (CONNECTING)'); } if (typeof options === 'function') { cb = options; options = {}; } if (typeof data === 'number') data = data.toString(); if (this.readyState !== WebSocket.OPEN) { sendAfterClose(this, data, cb); return; } const opts = { binary: typeof data !== 'string', mask: !this._isServer, compress: true, fin: true, ...options }; if (!this._extensions[PerMessageDeflate.extensionName]) { opts.compress = false; } this._sender.send(data || EMPTY_BUFFER, opts, cb); } /** * Forcibly close the connection. * * @public */ terminate() { if (this.readyState === WebSocket.CLOSED) return; if (this.readyState === WebSocket.CONNECTING) { const msg = 'WebSocket was closed before the connection was established'; abortHandshake(this, this._req, msg); return; } if (this._socket) { this._readyState = WebSocket.CLOSING; this._socket.destroy(); } } } /** * @constant {Number} CONNECTING * @memberof WebSocket */ Object.defineProperty(WebSocket, 'CONNECTING', { enumerable: true, value: readyStates.indexOf('CONNECTING') }); /** * @constant {Number} CONNECTING * @memberof WebSocket.prototype */ Object.defineProperty(WebSocket.prototype, 'CONNECTING', { enumerable: true, value: readyStates.indexOf('CONNECTING') }); /** * @constant {Number} OPEN * @memberof WebSocket */ Object.defineProperty(WebSocket, 'OPEN', { enumerable: true, value: readyStates.indexOf('OPEN') }); /** * @constant {Number} OPEN * @memberof WebSocket.prototype */ Object.defineProperty(WebSocket.prototype, 'OPEN', { enumerable: true, value: readyStates.indexOf('OPEN') }); /** * @constant {Number} CLOSING * @memberof WebSocket */ Object.defineProperty(WebSocket, 'CLOSING', { enumerable: true, value: readyStates.indexOf('CLOSING') }); /** * @constant {Number} CLOSING * @memberof WebSocket.prototype */ Object.defineProperty(WebSocket.prototype, 'CLOSING', { enumerable: true, value: readyStates.indexOf('CLOSING') }); /** * @constant {Number} CLOSED * @memberof WebSocket */ Object.defineProperty(WebSocket, 'CLOSED', { enumerable: true, value: readyStates.indexOf('CLOSED') }); /** * @constant {Number} CLOSED * @memberof WebSocket.prototype */ Object.defineProperty(WebSocket.prototype, 'CLOSED', { enumerable: true, value: readyStates.indexOf('CLOSED') }); [ 'binaryType', 'bufferedAmount', 'extensions', 'isPaused', 'protocol', 'readyState', 'url' ].forEach((property) => { Object.defineProperty(WebSocket.prototype, property, { enumerable: true }); }); // // Add the `onopen`, `onerror`, `onclose`, and `onmessage` attributes. // See https://html.spec.whatwg.org/multipage/comms.html#the-websocket-interface // ['open', 'error', 'close', 'message'].forEach((method) => { Object.defineProperty(WebSocket.prototype, `on${method}`, { enumerable: true, get() { for (const listener of this.listeners(method)) { if (listener[kForOnEventAttribute]) return listener[kListener]; } return null; }, set(handler) { for (const listener of this.listeners(method)) { if (listener[kForOnEventAttribute]) { this.removeListener(method, listener); break; } } if (typeof handler !== 'function') return; this.addEventListener(method, handler, { [kForOnEventAttribute]: true }); } }); }); WebSocket.prototype.addEventListener = addEventListener; WebSocket.prototype.removeEventListener = removeEventListener; module.exports = WebSocket; /** * Initialize a WebSocket client. * * @param {WebSocket} websocket The client to initialize * @param {(String|URL)} address The URL to which to connect * @param {Array} protocols The subprotocols * @param {Object} [options] Connection options * @param {Boolean} [options.allowSynchronousEvents=true] Specifies whether any * of the `'message'`, `'ping'`, and `'pong'` events can be emitted multiple * times in the same tick * @param {Boolean} [options.autoPong=true] Specifies whether or not to * automatically send a pong in response to a ping * @param {Function} [options.finishRequest] A function which can be used to * customize the headers of each http request before it is sent * @param {Boolean} [options.followRedirects=false] Whether or not to follow * redirects * @param {Function} [options.generateMask] The function used to generate the * masking key * @param {Number} [options.handshakeTimeout] Timeout in milliseconds for the * handshake request * @param {Number} [options.maxPayload=104857600] The maximum allowed message * size * @param {Number} [options.maxRedirects=10] The maximum number of redirects * allowed * @param {String} [options.origin] Value of the `Origin` or * `Sec-WebSocket-Origin` header * @param {(Boolean|Object)} [options.perMessageDeflate=true] Enable/disable * permessage-deflate * @param {Number} [options.protocolVersion=13] Value of the * `Sec-WebSocket-Version` header * @param {Boolean} [options.skipUTF8Validation=false] Specifies whether or * not to skip UTF-8 validation for text and close messages * @private */ function initAsClient(websocket, address, protocols, options) { const opts = { allowSynchronousEvents: true, autoPong: true, protocolVersion: protocolVersions[1], maxPayload: 100 * 1024 * 1024, skipUTF8Validation: false, perMessageDeflate: true, followRedirects: false, maxRedirects: 10, ...options, socketPath: undefined, hostname: undefined, protocol: undefined, timeout: undefined, method: 'GET', host: undefined, path: undefined, port: undefined }; websocket._autoPong = opts.autoPong; if (!protocolVersions.includes(opts.protocolVersion)) { throw new RangeError( `Unsupported protocol version: ${opts.protocolVersion} ` + `(supported versions: ${protocolVersions.join(', ')})` ); } let parsedUrl; if (address instanceof URL) { parsedUrl = address; } else { try { parsedUrl = new URL(address); } catch (e) { throw new SyntaxError(`Invalid URL: ${address}`); } } if (parsedUrl.protocol === 'http:') { parsedUrl.protocol = 'ws:'; } else if (parsedUrl.protocol === 'https:') { parsedUrl.protocol = 'wss:'; } websocket._url = parsedUrl.href; const isSecure = parsedUrl.protocol === 'wss:'; const isIpcUrl = parsedUrl.protocol === 'ws+unix:'; let invalidUrlMessage; if (parsedUrl.protocol !== 'ws:' && !isSecure && !isIpcUrl) { invalidUrlMessage = 'The URL\'s protocol must be one of "ws:", "wss:", ' + '"http:", "https:", or "ws+unix:"'; } else if (isIpcUrl && !parsedUrl.pathname) { invalidUrlMessage = "The URL's pathname is empty"; } else if (parsedUrl.hash) { invalidUrlMessage = 'The URL contains a fragment identifier'; } if (invalidUrlMessage) { const err = new SyntaxError(invalidUrlMessage); if (websocket._redirects === 0) { throw err; } else { emitErrorAndClose(websocket, err); return; } } const defaultPort = isSecure ? 443 : 80; const key = randomBytes(16).toString('base64'); const request = isSecure ? https.request : http.request; const protocolSet = new Set(); let perMessageDeflate; opts.createConnection = opts.createConnection || (isSecure ? tlsConnect : netConnect); opts.defaultPort = opts.defaultPort || defaultPort; opts.port = parsedUrl.port || defaultPort; opts.host = parsedUrl.hostname.startsWith('[') ? parsedUrl.hostname.slice(1, -1) : parsedUrl.hostname; opts.headers = { ...opts.headers, 'Sec-WebSocket-Version': opts.protocolVersion, 'Sec-WebSocket-Key': key, Connection: 'Upgrade', Upgrade: 'websocket' }; opts.path = parsedUrl.pathname + parsedUrl.search; opts.timeout = opts.handshakeTimeout; if (opts.perMessageDeflate) { perMessageDeflate = new PerMessageDeflate( opts.perMessageDeflate !== true ? opts.perMessageDeflate : {}, false, opts.maxPayload ); opts.headers['Sec-WebSocket-Extensions'] = format({ [PerMessageDeflate.extensionName]: perMessageDeflate.offer() }); } if (protocols.length) { for (const protocol of protocols) { if ( typeof protocol !== 'string' || !subprotocolRegex.test(protocol) || protocolSet.has(protocol) ) { throw new SyntaxError( 'An invalid or duplicated subprotocol was specified' ); } protocolSet.add(protocol); } opts.headers['Sec-WebSocket-Protocol'] = protocols.join(','); } if (opts.origin) { if (opts.protocolVersion < 13) { opts.headers['Sec-WebSocket-Origin'] = opts.origin; } else { opts.headers.Origin = opts.origin; } } if (parsedUrl.username || parsedUrl.password) { opts.auth = `${parsedUrl.username}:${parsedUrl.password}`; } if (isIpcUrl) { const parts = opts.path.split(':'); opts.socketPath = parts[0]; opts.path = parts[1]; } let req; if (opts.followRedirects) { if (websocket._redirects === 0) { websocket._originalIpc = isIpcUrl; websocket._originalSecure = isSecure; websocket._originalHostOrSocketPath = isIpcUrl ? opts.socketPath : parsedUrl.host; const headers = options && options.headers; // // Shallow copy the user provided options so that headers can be changed // without mutating the original object. // options = { ...options, headers: {} }; if (headers) { for (const [key, value] of Object.entries(headers)) { options.headers[key.toLowerCase()] = value; } } } else if (websocket.listenerCount('redirect') === 0) { const isSameHost = isIpcUrl ? websocket._originalIpc ? opts.socketPath === websocket._originalHostOrSocketPath : false : websocket._originalIpc ? false : parsedUrl.host === websocket._originalHostOrSocketPath; if (!isSameHost || (websocket._originalSecure && !isSecure)) { // // Match curl 7.77.0 behavior and drop the following headers. These // headers are also dropped when following a redirect to a subdomain. // delete opts.headers.authorization; delete opts.headers.cookie; if (!isSameHost) delete opts.headers.host; opts.auth = undefined; } } // // Match curl 7.77.0 behavior and make the first `Authorization` header win. // If the `Authorization` header is set, then there is nothing to do as it // will take precedence. // if (opts.auth && !options.headers.authorization) { options.headers.authorization = 'Basic ' + Buffer.from(opts.auth).toString('base64'); } req = websocket._req = request(opts); if (websocket._redirects) { // // Unlike what is done for the `'upgrade'` event, no early exit is // triggered here if the user calls `websocket.close()` or // `websocket.terminate()` from a listener of the `'redirect'` event. This // is because the user can also call `request.destroy()` with an error // before calling `websocket.close()` or `websocket.terminate()` and this // would result in an error being emitted on the `request` object with no // `'error'` event listeners attached. // websocket.emit('redirect', websocket.url, req); } } else { req = websocket._req = request(opts); } if (opts.timeout) { req.on('timeout', () => { abortHandshake(websocket, req, 'Opening handshake has timed out'); }); } req.on('error', (err) => { if (req === null || req[kAborted]) return; req = websocket._req = null; emitErrorAndClose(websocket, err); }); req.on('response', (res) => { const location = res.headers.location; const statusCode = res.statusCode; if ( location && opts.followRedirects && statusCode >= 300 && statusCode < 400 ) { if (++websocket._redirects > opts.maxRedirects) { abortHandshake(websocket, req, 'Maximum redirects exceeded'); return; } req.abort(); let addr; try { addr = new URL(location, address); } catch (e) { const err = new SyntaxError(`Invalid URL: ${location}`); emitErrorAndClose(websocket, err); return; } initAsClient(websocket, addr, protocols, options); } else if (!websocket.emit('unexpected-response', req, res)) { abortHandshake( websocket, req, `Unexpected server response: ${res.statusCode}` ); } }); req.on('upgrade', (res, socket, head) => { websocket.emit('upgrade', res); // // The user may have closed the connection from a listener of the // `'upgrade'` event. // if (websocket.readyState !== WebSocket.CONNECTING) return; req = websocket._req = null; const upgrade = res.headers.upgrade; if (upgrade === undefined || upgrade.toLowerCase() !== 'websocket') { abortHandshake(websocket, socket, 'Invalid Upgrade header'); return; } const digest = createHash('sha1') .update(key + GUID) .digest('base64'); if (res.headers['sec-websocket-accept'] !== digest) { abortHandshake(websocket, socket, 'Invalid Sec-WebSocket-Accept header'); return; } const serverProt = res.headers['sec-websocket-protocol']; let protError; if (serverProt !== undefined) { if (!protocolSet.size) { protError = 'Server sent a subprotocol but none was requested'; } else if (!protocolSet.has(serverProt)) { protError = 'Server sent an invalid subprotocol'; } } else if (protocolSet.size) { protError = 'Server sent no subprotocol'; } if (protError) { abortHandshake(websocket, socket, protError); return; } if (serverProt) websocket._protocol = serverProt; const secWebSocketExtensions = res.headers['sec-websocket-extensions']; if (secWebSocketExtensions !== undefined) { if (!perMessageDeflate) { const message = 'Server sent a Sec-WebSocket-Extensions header but no extension ' + 'was requested'; abortHandshake(websocket, socket, message); return; } let extensions; try { extensions = parse(secWebSocketExtensions); } catch (err) { const message = 'Invalid Sec-WebSocket-Extensions header'; abortHandshake(websocket, socket, message); return; } const extensionNames = Object.keys(extensions); if ( extensionNames.length !== 1 || extensionNames[0] !== PerMessageDeflate.extensionName ) { const message = 'Server indicated an extension that was not requested'; abortHandshake(websocket, socket, message); return; } try { perMessageDeflate.accept(extensions[PerMessageDeflate.extensionName]); } catch (err) { const message = 'Invalid Sec-WebSocket-Extensions header'; abortHandshake(websocket, socket, message); return; } websocket._extensions[PerMessageDeflate.extensionName] = perMessageDeflate; } websocket.setSocket(socket, head, { allowSynchronousEvents: opts.allowSynchronousEvents, generateMask: opts.generateMask, maxPayload: opts.maxPayload, skipUTF8Validation: opts.skipUTF8Validation }); }); if (opts.finishRequest) { opts.finishRequest(req, websocket); } else { req.end(); } } /** * Emit the `'error'` and `'close'` events. * * @param {WebSocket} websocket The WebSocket instance * @param {Error} The error to emit * @private */ function emitErrorAndClose(websocket, err) { websocket._readyState = WebSocket.CLOSING; // // The following assignment is practically useless and is done only for // consistency. // websocket._errorEmitted = true; websocket.emit('error', err); websocket.emitClose(); } /** * Create a `net.Socket` and initiate a connection. * * @param {Object} options Connection options * @return {net.Socket} The newly created socket used to start the connection * @private */ function netConnect(options) { options.path = options.socketPath; return net.connect(options); } /** * Create a `tls.TLSSocket` and initiate a connection. * * @param {Object} options Connection options * @return {tls.TLSSocket} The newly created socket used to start the connection * @private */ function tlsConnect(options) { options.path = undefined; if (!options.servername && options.servername !== '') { options.servername = net.isIP(options.host) ? '' : options.host; } return tls.connect(options); } /** * Abort the handshake and emit an error. * * @param {WebSocket} websocket The WebSocket instance * @param {(http.ClientRequest|net.Socket|tls.Socket)} stream The request to * abort or the socket to destroy * @param {String} message The error message * @private */ function abortHandshake(websocket, stream, message) { websocket._readyState = WebSocket.CLOSING; const err = new Error(message); Error.captureStackTrace(err, abortHandshake); if (stream.setHeader) { stream[kAborted] = true; stream.abort(); if (stream.socket && !stream.socket.destroyed) { // // On Node.js >= 14.3.0 `request.abort()` does not destroy the socket if // called after the request completed. See // https://github.com/websockets/ws/issues/1869. // stream.socket.destroy(); } process.nextTick(emitErrorAndClose, websocket, err); } else { stream.destroy(err); stream.once('error', websocket.emit.bind(websocket, 'error')); stream.once('close', websocket.emitClose.bind(websocket)); } } /** * Handle cases where the `ping()`, `pong()`, or `send()` methods are called * when the `readyState` attribute is `CLOSING` or `CLOSED`. * * @param {WebSocket} websocket The WebSocket instance * @param {*} [data] The data to send * @param {Function} [cb] Callback * @private */ function sendAfterClose(websocket, data, cb) { if (data) { const length = isBlob(data) ? data.size : toBuffer(data).length; // // The `_bufferedAmount` property is used only when the peer is a client and // the opening handshake fails. Under these circumstances, in fact, the // `setSocket()` method is not called, so the `_socket` and `_sender` // properties are set to `null`. // if (websocket._socket) websocket._sender._bufferedBytes += length; else websocket._bufferedAmount += length; } if (cb) { const err = new Error( `WebSocket is not open: readyState ${websocket.readyState} ` + `(${readyStates[websocket.readyState]})` ); process.nextTick(cb, err); } } /** * The listener of the `Receiver` `'conclude'` event. * * @param {Number} code The status code * @param {Buffer} reason The reason for closing * @private */ function receiverOnConclude(code, reason) { const websocket = this[kWebSocket]; websocket._closeFrameReceived = true; websocket._closeMessage = reason; websocket._closeCode = code; if (websocket._socket[kWebSocket] === undefined) return; websocket._socket.removeListener('data', socketOnData); process.nextTick(resume, websocket._socket); if (code === 1005) websocket.close(); else websocket.close(code, reason); } /** * The listener of the `Receiver` `'drain'` event. * * @private */ function receiverOnDrain() { const websocket = this[kWebSocket]; if (!websocket.isPaused) websocket._socket.resume(); } /** * The listener of the `Receiver` `'error'` event. * * @param {(RangeError|Error)} err The emitted error * @private */ function receiverOnError(err) { const websocket = this[kWebSocket]; if (websocket._socket[kWebSocket] !== undefined) { websocket._socket.removeListener('data', socketOnData); // // On Node.js < 14.0.0 the `'error'` event is emitted synchronously. See // https://github.com/websockets/ws/issues/1940. // process.nextTick(resume, websocket._socket); websocket.close(err[kStatusCode]); } if (!websocket._errorEmitted) { websocket._errorEmitted = true; websocket.emit('error', err); } } /** * The listener of the `Receiver` `'finish'` event. * * @private */ function receiverOnFinish() { this[kWebSocket].emitClose(); } /** * The listener of the `Receiver` `'message'` event. * * @param {Buffer|ArrayBuffer|Buffer[])} data The message * @param {Boolean} isBinary Specifies whether the message is binary or not * @private */ function receiverOnMessage(data, isBinary) { this[kWebSocket].emit('message', data, isBinary); } /** * The listener of the `Receiver` `'ping'` event. * * @param {Buffer} data The data included in the ping frame * @private */ function receiverOnPing(data) { const websocket = this[kWebSocket]; if (websocket._autoPong) websocket.pong(data, !this._isServer, NOOP); websocket.emit('ping', data); } /** * The listener of the `Receiver` `'pong'` event. * * @param {Buffer} data The data included in the pong frame * @private */ function receiverOnPong(data) { this[kWebSocket].emit('pong', data); } /** * Resume a readable stream * * @param {Readable} stream The readable stream * @private */ function resume(stream) { stream.resume(); } /** * The `Sender` error event handler. * * @param {Error} The error * @private */ function senderOnError(err) { const websocket = this[kWebSocket]; if (websocket.readyState === WebSocket.CLOSED) return; if (websocket.readyState === WebSocket.OPEN) { websocket._readyState = WebSocket.CLOSING; setCloseTimer(websocket); } // // `socket.end()` is used instead of `socket.destroy()` to allow the other // peer to finish sending queued data. There is no need to set a timer here // because `CLOSING` means that it is already set or not needed. // this._socket.end(); if (!websocket._errorEmitted) { websocket._errorEmitted = true; websocket.emit('error', err); } } /** * Set a timer to destroy the underlying raw socket of a WebSocket. * * @param {WebSocket} websocket The WebSocket instance * @private */ function setCloseTimer(websocket) { websocket._closeTimer = setTimeout( websocket._socket.destroy.bind(websocket._socket), closeTimeout ); } /** * The listener of the socket `'close'` event. * * @private */ function socketOnClose() { const websocket = this[kWebSocket]; this.removeListener('close', socketOnClose); this.removeListener('data', socketOnData); this.removeListener('end', socketOnEnd); websocket._readyState = WebSocket.CLOSING; let chunk; // // The close frame might not have been received or the `'end'` event emitted, // for example, if the socket was destroyed due to an error. Ensure that the // `receiver` stream is closed after writing any remaining buffered data to // it. If the readable side of the socket is in flowing mode then there is no // buffered data as everything has been already written and `readable.read()` // will return `null`. If instead, the socket is paused, any possible buffered // data will be read as a single chunk. // if ( !this._readableState.endEmitted && !websocket._closeFrameReceived && !websocket._receiver._writableState.errorEmitted && (chunk = websocket._socket.read()) !== null ) { websocket._receiver.write(chunk); } websocket._receiver.end(); this[kWebSocket] = undefined; clearTimeout(websocket._closeTimer); if ( websocket._receiver._writableState.finished || websocket._receiver._writableState.errorEmitted ) { websocket.emitClose(); } else { websocket._receiver.on('error', receiverOnFinish); websocket._receiver.on('finish', receiverOnFinish); } } /** * The listener of the socket `'data'` event. * * @param {Buffer} chunk A chunk of data * @private */ function socketOnData(chunk) { if (!this[kWebSocket]._receiver.write(chunk)) { this.pause(); } } /** * The listener of the socket `'end'` event. * * @private */ function socketOnEnd() { const websocket = this[kWebSocket]; websocket._readyState = WebSocket.CLOSING; websocket._receiver.end(); this.end(); } /** * The listener of the socket `'error'` event. * * @private */ function socketOnError() { const websocket = this[kWebSocket]; this.removeListener('error', socketOnError); this.on('error', NOOP); if (websocket) { websocket._readyState = WebSocket.CLOSING; this.destroy(); } } node_modules/ws/lib/stream.js 0000664 00000010154 15114741631 0012257 0 ustar 00 /* eslint no-unused-vars: ["error", { "varsIgnorePattern": "^WebSocket$" }] */ 'use strict'; const WebSocket = require('./websocket'); const { Duplex } = require('stream'); /** * Emits the `'close'` event on a stream. * * @param {Duplex} stream The stream. * @private */ function emitClose(stream) { stream.emit('close'); } /** * The listener of the `'end'` event. * * @private */ function duplexOnEnd() { if (!this.destroyed && this._writableState.finished) { this.destroy(); } } /** * The listener of the `'error'` event. * * @param {Error} err The error * @private */ function duplexOnError(err) { this.removeListener('error', duplexOnError); this.destroy(); if (this.listenerCount('error') === 0) { // Do not suppress the throwing behavior. this.emit('error', err); } } /** * Wraps a `WebSocket` in a duplex stream. * * @param {WebSocket} ws The `WebSocket` to wrap * @param {Object} [options] The options for the `Duplex` constructor * @return {Duplex} The duplex stream * @public */ function createWebSocketStream(ws, options) { let terminateOnDestroy = true; const duplex = new Duplex({ ...options, autoDestroy: false, emitClose: false, objectMode: false, writableObjectMode: false }); ws.on('message', function message(msg, isBinary) { const data = !isBinary && duplex._readableState.objectMode ? msg.toString() : msg; if (!duplex.push(data)) ws.pause(); }); ws.once('error', function error(err) { if (duplex.destroyed) return; // Prevent `ws.terminate()` from being called by `duplex._destroy()`. // // - If the `'error'` event is emitted before the `'open'` event, then // `ws.terminate()` is a noop as no socket is assigned. // - Otherwise, the error is re-emitted by the listener of the `'error'` // event of the `Receiver` object. The listener already closes the // connection by calling `ws.close()`. This allows a close frame to be // sent to the other peer. If `ws.terminate()` is called right after this, // then the close frame might not be sent. terminateOnDestroy = false; duplex.destroy(err); }); ws.once('close', function close() { if (duplex.destroyed) return; duplex.push(null); }); duplex._destroy = function (err, callback) { if (ws.readyState === ws.CLOSED) { callback(err); process.nextTick(emitClose, duplex); return; } let called = false; ws.once('error', function error(err) { called = true; callback(err); }); ws.once('close', function close() { if (!called) callback(err); process.nextTick(emitClose, duplex); }); if (terminateOnDestroy) ws.terminate(); }; duplex._final = function (callback) { if (ws.readyState === ws.CONNECTING) { ws.once('open', function open() { duplex._final(callback); }); return; } // If the value of the `_socket` property is `null` it means that `ws` is a // client websocket and the handshake failed. In fact, when this happens, a // socket is never assigned to the websocket. Wait for the `'error'` event // that will be emitted by the websocket. if (ws._socket === null) return; if (ws._socket._writableState.finished) { callback(); if (duplex._readableState.endEmitted) duplex.destroy(); } else { ws._socket.once('finish', function finish() { // `duplex` is not destroyed here because the `'end'` event will be // emitted on `duplex` after this `'finish'` event. The EOF signaling // `null` chunk is, in fact, pushed when the websocket emits `'close'`. callback(); }); ws.close(); } }; duplex._read = function () { if (ws.isPaused) ws.resume(); }; duplex._write = function (chunk, encoding, callback) { if (ws.readyState === ws.CONNECTING) { ws.once('open', function open() { duplex._write(chunk, encoding, callback); }); return; } ws.send(chunk, callback); }; duplex.on('end', duplexOnEnd); duplex.on('error', duplexOnError); return duplex; } module.exports = createWebSocketStream; node_modules/ws/lib/receiver.js 0000664 00000040114 15114741631 0012567 0 ustar 00 'use strict'; const { Writable } = require('stream'); const PerMessageDeflate = require('./permessage-deflate'); const { BINARY_TYPES, EMPTY_BUFFER, kStatusCode, kWebSocket } = require('./constants'); const { concat, toArrayBuffer, unmask } = require('./buffer-util'); const { isValidStatusCode, isValidUTF8 } = require('./validation'); const FastBuffer = Buffer[Symbol.species]; const GET_INFO = 0; const GET_PAYLOAD_LENGTH_16 = 1; const GET_PAYLOAD_LENGTH_64 = 2; const GET_MASK = 3; const GET_DATA = 4; const INFLATING = 5; const DEFER_EVENT = 6; /** * HyBi Receiver implementation. * * @extends Writable */ class Receiver extends Writable { /** * Creates a Receiver instance. * * @param {Object} [options] Options object * @param {Boolean} [options.allowSynchronousEvents=true] Specifies whether * any of the `'message'`, `'ping'`, and `'pong'` events can be emitted * multiple times in the same tick * @param {String} [options.binaryType=nodebuffer] The type for binary data * @param {Object} [options.extensions] An object containing the negotiated * extensions * @param {Boolean} [options.isServer=false] Specifies whether to operate in * client or server mode * @param {Number} [options.maxPayload=0] The maximum allowed message length * @param {Boolean} [options.skipUTF8Validation=false] Specifies whether or * not to skip UTF-8 validation for text and close messages */ constructor(options = {}) { super(); this._allowSynchronousEvents = options.allowSynchronousEvents !== undefined ? options.allowSynchronousEvents : true; this._binaryType = options.binaryType || BINARY_TYPES[0]; this._extensions = options.extensions || {}; this._isServer = !!options.isServer; this._maxPayload = options.maxPayload | 0; this._skipUTF8Validation = !!options.skipUTF8Validation; this[kWebSocket] = undefined; this._bufferedBytes = 0; this._buffers = []; this._compressed = false; this._payloadLength = 0; this._mask = undefined; this._fragmented = 0; this._masked = false; this._fin = false; this._opcode = 0; this._totalPayloadLength = 0; this._messageLength = 0; this._fragments = []; this._errored = false; this._loop = false; this._state = GET_INFO; } /** * Implements `Writable.prototype._write()`. * * @param {Buffer} chunk The chunk of data to write * @param {String} encoding The character encoding of `chunk` * @param {Function} cb Callback * @private */ _write(chunk, encoding, cb) { if (this._opcode === 0x08 && this._state == GET_INFO) return cb(); this._bufferedBytes += chunk.length; this._buffers.push(chunk); this.startLoop(cb); } /** * Consumes `n` bytes from the buffered data. * * @param {Number} n The number of bytes to consume * @return {Buffer} The consumed bytes * @private */ consume(n) { this._bufferedBytes -= n; if (n === this._buffers[0].length) return this._buffers.shift(); if (n < this._buffers[0].length) { const buf = this._buffers[0]; this._buffers[0] = new FastBuffer( buf.buffer, buf.byteOffset + n, buf.length - n ); return new FastBuffer(buf.buffer, buf.byteOffset, n); } const dst = Buffer.allocUnsafe(n); do { const buf = this._buffers[0]; const offset = dst.length - n; if (n >= buf.length) { dst.set(this._buffers.shift(), offset); } else { dst.set(new Uint8Array(buf.buffer, buf.byteOffset, n), offset); this._buffers[0] = new FastBuffer( buf.buffer, buf.byteOffset + n, buf.length - n ); } n -= buf.length; } while (n > 0); return dst; } /** * Starts the parsing loop. * * @param {Function} cb Callback * @private */ startLoop(cb) { this._loop = true; do { switch (this._state) { case GET_INFO: this.getInfo(cb); break; case GET_PAYLOAD_LENGTH_16: this.getPayloadLength16(cb); break; case GET_PAYLOAD_LENGTH_64: this.getPayloadLength64(cb); break; case GET_MASK: this.getMask(); break; case GET_DATA: this.getData(cb); break; case INFLATING: case DEFER_EVENT: this._loop = false; return; } } while (this._loop); if (!this._errored) cb(); } /** * Reads the first two bytes of a frame. * * @param {Function} cb Callback * @private */ getInfo(cb) { if (this._bufferedBytes < 2) { this._loop = false; return; } const buf = this.consume(2); if ((buf[0] & 0x30) !== 0x00) { const error = this.createError( RangeError, 'RSV2 and RSV3 must be clear', true, 1002, 'WS_ERR_UNEXPECTED_RSV_2_3' ); cb(error); return; } const compressed = (buf[0] & 0x40) === 0x40; if (compressed && !this._extensions[PerMessageDeflate.extensionName]) { const error = this.createError( RangeError, 'RSV1 must be clear', true, 1002, 'WS_ERR_UNEXPECTED_RSV_1' ); cb(error); return; } this._fin = (buf[0] & 0x80) === 0x80; this._opcode = buf[0] & 0x0f; this._payloadLength = buf[1] & 0x7f; if (this._opcode === 0x00) { if (compressed) { const error = this.createError( RangeError, 'RSV1 must be clear', true, 1002, 'WS_ERR_UNEXPECTED_RSV_1' ); cb(error); return; } if (!this._fragmented) { const error = this.createError( RangeError, 'invalid opcode 0', true, 1002, 'WS_ERR_INVALID_OPCODE' ); cb(error); return; } this._opcode = this._fragmented; } else if (this._opcode === 0x01 || this._opcode === 0x02) { if (this._fragmented) { const error = this.createError( RangeError, `invalid opcode ${this._opcode}`, true, 1002, 'WS_ERR_INVALID_OPCODE' ); cb(error); return; } this._compressed = compressed; } else if (this._opcode > 0x07 && this._opcode < 0x0b) { if (!this._fin) { const error = this.createError( RangeError, 'FIN must be set', true, 1002, 'WS_ERR_EXPECTED_FIN' ); cb(error); return; } if (compressed) { const error = this.createError( RangeError, 'RSV1 must be clear', true, 1002, 'WS_ERR_UNEXPECTED_RSV_1' ); cb(error); return; } if ( this._payloadLength > 0x7d || (this._opcode === 0x08 && this._payloadLength === 1) ) { const error = this.createError( RangeError, `invalid payload length ${this._payloadLength}`, true, 1002, 'WS_ERR_INVALID_CONTROL_PAYLOAD_LENGTH' ); cb(error); return; } } else { const error = this.createError( RangeError, `invalid opcode ${this._opcode}`, true, 1002, 'WS_ERR_INVALID_OPCODE' ); cb(error); return; } if (!this._fin && !this._fragmented) this._fragmented = this._opcode; this._masked = (buf[1] & 0x80) === 0x80; if (this._isServer) { if (!this._masked) { const error = this.createError( RangeError, 'MASK must be set', true, 1002, 'WS_ERR_EXPECTED_MASK' ); cb(error); return; } } else if (this._masked) { const error = this.createError( RangeError, 'MASK must be clear', true, 1002, 'WS_ERR_UNEXPECTED_MASK' ); cb(error); return; } if (this._payloadLength === 126) this._state = GET_PAYLOAD_LENGTH_16; else if (this._payloadLength === 127) this._state = GET_PAYLOAD_LENGTH_64; else this.haveLength(cb); } /** * Gets extended payload length (7+16). * * @param {Function} cb Callback * @private */ getPayloadLength16(cb) { if (this._bufferedBytes < 2) { this._loop = false; return; } this._payloadLength = this.consume(2).readUInt16BE(0); this.haveLength(cb); } /** * Gets extended payload length (7+64). * * @param {Function} cb Callback * @private */ getPayloadLength64(cb) { if (this._bufferedBytes < 8) { this._loop = false; return; } const buf = this.consume(8); const num = buf.readUInt32BE(0); // // The maximum safe integer in JavaScript is 2^53 - 1. An error is returned // if payload length is greater than this number. // if (num > Math.pow(2, 53 - 32) - 1) { const error = this.createError( RangeError, 'Unsupported WebSocket frame: payload length > 2^53 - 1', false, 1009, 'WS_ERR_UNSUPPORTED_DATA_PAYLOAD_LENGTH' ); cb(error); return; } this._payloadLength = num * Math.pow(2, 32) + buf.readUInt32BE(4); this.haveLength(cb); } /** * Payload length has been read. * * @param {Function} cb Callback * @private */ haveLength(cb) { if (this._payloadLength && this._opcode < 0x08) { this._totalPayloadLength += this._payloadLength; if (this._totalPayloadLength > this._maxPayload && this._maxPayload > 0) { const error = this.createError( RangeError, 'Max payload size exceeded', false, 1009, 'WS_ERR_UNSUPPORTED_MESSAGE_LENGTH' ); cb(error); return; } } if (this._masked) this._state = GET_MASK; else this._state = GET_DATA; } /** * Reads mask bytes. * * @private */ getMask() { if (this._bufferedBytes < 4) { this._loop = false; return; } this._mask = this.consume(4); this._state = GET_DATA; } /** * Reads data bytes. * * @param {Function} cb Callback * @private */ getData(cb) { let data = EMPTY_BUFFER; if (this._payloadLength) { if (this._bufferedBytes < this._payloadLength) { this._loop = false; return; } data = this.consume(this._payloadLength); if ( this._masked && (this._mask[0] | this._mask[1] | this._mask[2] | this._mask[3]) !== 0 ) { unmask(data, this._mask); } } if (this._opcode > 0x07) { this.controlMessage(data, cb); return; } if (this._compressed) { this._state = INFLATING; this.decompress(data, cb); return; } if (data.length) { // // This message is not compressed so its length is the sum of the payload // length of all fragments. // this._messageLength = this._totalPayloadLength; this._fragments.push(data); } this.dataMessage(cb); } /** * Decompresses data. * * @param {Buffer} data Compressed data * @param {Function} cb Callback * @private */ decompress(data, cb) { const perMessageDeflate = this._extensions[PerMessageDeflate.extensionName]; perMessageDeflate.decompress(data, this._fin, (err, buf) => { if (err) return cb(err); if (buf.length) { this._messageLength += buf.length; if (this._messageLength > this._maxPayload && this._maxPayload > 0) { const error = this.createError( RangeError, 'Max payload size exceeded', false, 1009, 'WS_ERR_UNSUPPORTED_MESSAGE_LENGTH' ); cb(error); return; } this._fragments.push(buf); } this.dataMessage(cb); if (this._state === GET_INFO) this.startLoop(cb); }); } /** * Handles a data message. * * @param {Function} cb Callback * @private */ dataMessage(cb) { if (!this._fin) { this._state = GET_INFO; return; } const messageLength = this._messageLength; const fragments = this._fragments; this._totalPayloadLength = 0; this._messageLength = 0; this._fragmented = 0; this._fragments = []; if (this._opcode === 2) { let data; if (this._binaryType === 'nodebuffer') { data = concat(fragments, messageLength); } else if (this._binaryType === 'arraybuffer') { data = toArrayBuffer(concat(fragments, messageLength)); } else if (this._binaryType === 'blob') { data = new Blob(fragments); } else { data = fragments; } if (this._allowSynchronousEvents) { this.emit('message', data, true); this._state = GET_INFO; } else { this._state = DEFER_EVENT; setImmediate(() => { this.emit('message', data, true); this._state = GET_INFO; this.startLoop(cb); }); } } else { const buf = concat(fragments, messageLength); if (!this._skipUTF8Validation && !isValidUTF8(buf)) { const error = this.createError( Error, 'invalid UTF-8 sequence', true, 1007, 'WS_ERR_INVALID_UTF8' ); cb(error); return; } if (this._state === INFLATING || this._allowSynchronousEvents) { this.emit('message', buf, false); this._state = GET_INFO; } else { this._state = DEFER_EVENT; setImmediate(() => { this.emit('message', buf, false); this._state = GET_INFO; this.startLoop(cb); }); } } } /** * Handles a control message. * * @param {Buffer} data Data to handle * @return {(Error|RangeError|undefined)} A possible error * @private */ controlMessage(data, cb) { if (this._opcode === 0x08) { if (data.length === 0) { this._loop = false; this.emit('conclude', 1005, EMPTY_BUFFER); this.end(); } else { const code = data.readUInt16BE(0); if (!isValidStatusCode(code)) { const error = this.createError( RangeError, `invalid status code ${code}`, true, 1002, 'WS_ERR_INVALID_CLOSE_CODE' ); cb(error); return; } const buf = new FastBuffer( data.buffer, data.byteOffset + 2, data.length - 2 ); if (!this._skipUTF8Validation && !isValidUTF8(buf)) { const error = this.createError( Error, 'invalid UTF-8 sequence', true, 1007, 'WS_ERR_INVALID_UTF8' ); cb(error); return; } this._loop = false; this.emit('conclude', code, buf); this.end(); } this._state = GET_INFO; return; } if (this._allowSynchronousEvents) { this.emit(this._opcode === 0x09 ? 'ping' : 'pong', data); this._state = GET_INFO; } else { this._state = DEFER_EVENT; setImmediate(() => { this.emit(this._opcode === 0x09 ? 'ping' : 'pong', data); this._state = GET_INFO; this.startLoop(cb); }); } } /** * Builds an error object. * * @param {function(new:Error|RangeError)} ErrorCtor The error constructor * @param {String} message The error message * @param {Boolean} prefix Specifies whether or not to add a default prefix to * `message` * @param {Number} statusCode The status code * @param {String} errorCode The exposed error code * @return {(Error|RangeError)} The error * @private */ createError(ErrorCtor, message, prefix, statusCode, errorCode) { this._loop = false; this._errored = true; const err = new ErrorCtor( prefix ? `Invalid WebSocket frame: ${message}` : message ); Error.captureStackTrace(err, this.createError); err.code = errorCode; err[kStatusCode] = statusCode; return err; } } module.exports = Receiver; node_modules/ws/lib/buffer-util.js 0000664 00000005760 15114741631 0013217 0 ustar 00 'use strict'; const { EMPTY_BUFFER } = require('./constants'); const FastBuffer = Buffer[Symbol.species]; /** * Merges an array of buffers into a new buffer. * * @param {Buffer[]} list The array of buffers to concat * @param {Number} totalLength The total length of buffers in the list * @return {Buffer} The resulting buffer * @public */ function concat(list, totalLength) { if (list.length === 0) return EMPTY_BUFFER; if (list.length === 1) return list[0]; const target = Buffer.allocUnsafe(totalLength); let offset = 0; for (let i = 0; i < list.length; i++) { const buf = list[i]; target.set(buf, offset); offset += buf.length; } if (offset < totalLength) { return new FastBuffer(target.buffer, target.byteOffset, offset); } return target; } /** * Masks a buffer using the given mask. * * @param {Buffer} source The buffer to mask * @param {Buffer} mask The mask to use * @param {Buffer} output The buffer where to store the result * @param {Number} offset The offset at which to start writing * @param {Number} length The number of bytes to mask. * @public */ function _mask(source, mask, output, offset, length) { for (let i = 0; i < length; i++) { output[offset + i] = source[i] ^ mask[i & 3]; } } /** * Unmasks a buffer using the given mask. * * @param {Buffer} buffer The buffer to unmask * @param {Buffer} mask The mask to use * @public */ function _unmask(buffer, mask) { for (let i = 0; i < buffer.length; i++) { buffer[i] ^= mask[i & 3]; } } /** * Converts a buffer to an `ArrayBuffer`. * * @param {Buffer} buf The buffer to convert * @return {ArrayBuffer} Converted buffer * @public */ function toArrayBuffer(buf) { if (buf.length === buf.buffer.byteLength) { return buf.buffer; } return buf.buffer.slice(buf.byteOffset, buf.byteOffset + buf.length); } /** * Converts `data` to a `Buffer`. * * @param {*} data The data to convert * @return {Buffer} The buffer * @throws {TypeError} * @public */ function toBuffer(data) { toBuffer.readOnly = true; if (Buffer.isBuffer(data)) return data; let buf; if (data instanceof ArrayBuffer) { buf = new FastBuffer(data); } else if (ArrayBuffer.isView(data)) { buf = new FastBuffer(data.buffer, data.byteOffset, data.byteLength); } else { buf = Buffer.from(data); toBuffer.readOnly = false; } return buf; } module.exports = { concat, mask: _mask, toArrayBuffer, toBuffer, unmask: _unmask }; /* istanbul ignore else */ if (!process.env.WS_NO_BUFFER_UTIL) { try { const bufferUtil = require('bufferutil'); module.exports.mask = function (source, mask, output, offset, length) { if (length < 48) _mask(source, mask, output, offset, length); else bufferUtil.mask(source, mask, output, offset, length); }; module.exports.unmask = function (buffer, mask) { if (buffer.length < 32) _unmask(buffer, mask); else bufferUtil.unmask(buffer, mask); }; } catch (e) { // Continue regardless of the error. } } node_modules/ws/lib/subprotocol.js 0000664 00000002732 15114741631 0013342 0 ustar 00 'use strict'; const { tokenChars } = require('./validation'); /** * Parses the `Sec-WebSocket-Protocol` header into a set of subprotocol names. * * @param {String} header The field value of the header * @return {Set} The subprotocol names * @public */ function parse(header) { const protocols = new Set(); let start = -1; let end = -1; let i = 0; for (i; i < header.length; i++) { const code = header.charCodeAt(i); if (end === -1 && tokenChars[code] === 1) { if (start === -1) start = i; } else if ( i !== 0 && (code === 0x20 /* ' ' */ || code === 0x09) /* '\t' */ ) { if (end === -1 && start !== -1) end = i; } else if (code === 0x2c /* ',' */) { if (start === -1) { throw new SyntaxError(`Unexpected character at index ${i}`); } if (end === -1) end = i; const protocol = header.slice(start, end); if (protocols.has(protocol)) { throw new SyntaxError(`The "${protocol}" subprotocol is duplicated`); } protocols.add(protocol); start = end = -1; } else { throw new SyntaxError(`Unexpected character at index ${i}`); } } if (start === -1 || end !== -1) { throw new SyntaxError('Unexpected end of input'); } const protocol = header.slice(start, i); if (protocols.has(protocol)) { throw new SyntaxError(`The "${protocol}" subprotocol is duplicated`); } protocols.add(protocol); return protocols; } module.exports = { parse }; node_modules/ws/lib/permessage-deflate.js 0000664 00000034256 15114741631 0014532 0 ustar 00 'use strict'; const zlib = require('zlib'); const bufferUtil = require('./buffer-util'); const Limiter = require('./limiter'); const { kStatusCode } = require('./constants'); const FastBuffer = Buffer[Symbol.species]; const TRAILER = Buffer.from([0x00, 0x00, 0xff, 0xff]); const kPerMessageDeflate = Symbol('permessage-deflate'); const kTotalLength = Symbol('total-length'); const kCallback = Symbol('callback'); const kBuffers = Symbol('buffers'); const kError = Symbol('error'); // // We limit zlib concurrency, which prevents severe memory fragmentation // as documented in https://github.com/nodejs/node/issues/8871#issuecomment-250915913 // and https://github.com/websockets/ws/issues/1202 // // Intentionally global; it's the global thread pool that's an issue. // let zlibLimiter; /** * permessage-deflate implementation. */ class PerMessageDeflate { /** * Creates a PerMessageDeflate instance. * * @param {Object} [options] Configuration options * @param {(Boolean|Number)} [options.clientMaxWindowBits] Advertise support * for, or request, a custom client window size * @param {Boolean} [options.clientNoContextTakeover=false] Advertise/ * acknowledge disabling of client context takeover * @param {Number} [options.concurrencyLimit=10] The number of concurrent * calls to zlib * @param {(Boolean|Number)} [options.serverMaxWindowBits] Request/confirm the * use of a custom server window size * @param {Boolean} [options.serverNoContextTakeover=false] Request/accept * disabling of server context takeover * @param {Number} [options.threshold=1024] Size (in bytes) below which * messages should not be compressed if context takeover is disabled * @param {Object} [options.zlibDeflateOptions] Options to pass to zlib on * deflate * @param {Object} [options.zlibInflateOptions] Options to pass to zlib on * inflate * @param {Boolean} [isServer=false] Create the instance in either server or * client mode * @param {Number} [maxPayload=0] The maximum allowed message length */ constructor(options, isServer, maxPayload) { this._maxPayload = maxPayload | 0; this._options = options || {}; this._threshold = this._options.threshold !== undefined ? this._options.threshold : 1024; this._isServer = !!isServer; this._deflate = null; this._inflate = null; this.params = null; if (!zlibLimiter) { const concurrency = this._options.concurrencyLimit !== undefined ? this._options.concurrencyLimit : 10; zlibLimiter = new Limiter(concurrency); } } /** * @type {String} */ static get extensionName() { return 'permessage-deflate'; } /** * Create an extension negotiation offer. * * @return {Object} Extension parameters * @public */ offer() { const params = {}; if (this._options.serverNoContextTakeover) { params.server_no_context_takeover = true; } if (this._options.clientNoContextTakeover) { params.client_no_context_takeover = true; } if (this._options.serverMaxWindowBits) { params.server_max_window_bits = this._options.serverMaxWindowBits; } if (this._options.clientMaxWindowBits) { params.client_max_window_bits = this._options.clientMaxWindowBits; } else if (this._options.clientMaxWindowBits == null) { params.client_max_window_bits = true; } return params; } /** * Accept an extension negotiation offer/response. * * @param {Array} configurations The extension negotiation offers/reponse * @return {Object} Accepted configuration * @public */ accept(configurations) { configurations = this.normalizeParams(configurations); this.params = this._isServer ? this.acceptAsServer(configurations) : this.acceptAsClient(configurations); return this.params; } /** * Releases all resources used by the extension. * * @public */ cleanup() { if (this._inflate) { this._inflate.close(); this._inflate = null; } if (this._deflate) { const callback = this._deflate[kCallback]; this._deflate.close(); this._deflate = null; if (callback) { callback( new Error( 'The deflate stream was closed while data was being processed' ) ); } } } /** * Accept an extension negotiation offer. * * @param {Array} offers The extension negotiation offers * @return {Object} Accepted configuration * @private */ acceptAsServer(offers) { const opts = this._options; const accepted = offers.find((params) => { if ( (opts.serverNoContextTakeover === false && params.server_no_context_takeover) || (params.server_max_window_bits && (opts.serverMaxWindowBits === false || (typeof opts.serverMaxWindowBits === 'number' && opts.serverMaxWindowBits > params.server_max_window_bits))) || (typeof opts.clientMaxWindowBits === 'number' && !params.client_max_window_bits) ) { return false; } return true; }); if (!accepted) { throw new Error('None of the extension offers can be accepted'); } if (opts.serverNoContextTakeover) { accepted.server_no_context_takeover = true; } if (opts.clientNoContextTakeover) { accepted.client_no_context_takeover = true; } if (typeof opts.serverMaxWindowBits === 'number') { accepted.server_max_window_bits = opts.serverMaxWindowBits; } if (typeof opts.clientMaxWindowBits === 'number') { accepted.client_max_window_bits = opts.clientMaxWindowBits; } else if ( accepted.client_max_window_bits === true || opts.clientMaxWindowBits === false ) { delete accepted.client_max_window_bits; } return accepted; } /** * Accept the extension negotiation response. * * @param {Array} response The extension negotiation response * @return {Object} Accepted configuration * @private */ acceptAsClient(response) { const params = response[0]; if ( this._options.clientNoContextTakeover === false && params.client_no_context_takeover ) { throw new Error('Unexpected parameter "client_no_context_takeover"'); } if (!params.client_max_window_bits) { if (typeof this._options.clientMaxWindowBits === 'number') { params.client_max_window_bits = this._options.clientMaxWindowBits; } } else if ( this._options.clientMaxWindowBits === false || (typeof this._options.clientMaxWindowBits === 'number' && params.client_max_window_bits > this._options.clientMaxWindowBits) ) { throw new Error( 'Unexpected or invalid parameter "client_max_window_bits"' ); } return params; } /** * Normalize parameters. * * @param {Array} configurations The extension negotiation offers/reponse * @return {Array} The offers/response with normalized parameters * @private */ normalizeParams(configurations) { configurations.forEach((params) => { Object.keys(params).forEach((key) => { let value = params[key]; if (value.length > 1) { throw new Error(`Parameter "${key}" must have only a single value`); } value = value[0]; if (key === 'client_max_window_bits') { if (value !== true) { const num = +value; if (!Number.isInteger(num) || num < 8 || num > 15) { throw new TypeError( `Invalid value for parameter "${key}": ${value}` ); } value = num; } else if (!this._isServer) { throw new TypeError( `Invalid value for parameter "${key}": ${value}` ); } } else if (key === 'server_max_window_bits') { const num = +value; if (!Number.isInteger(num) || num < 8 || num > 15) { throw new TypeError( `Invalid value for parameter "${key}": ${value}` ); } value = num; } else if ( key === 'client_no_context_takeover' || key === 'server_no_context_takeover' ) { if (value !== true) { throw new TypeError( `Invalid value for parameter "${key}": ${value}` ); } } else { throw new Error(`Unknown parameter "${key}"`); } params[key] = value; }); }); return configurations; } /** * Decompress data. Concurrency limited. * * @param {Buffer} data Compressed data * @param {Boolean} fin Specifies whether or not this is the last fragment * @param {Function} callback Callback * @public */ decompress(data, fin, callback) { zlibLimiter.add((done) => { this._decompress(data, fin, (err, result) => { done(); callback(err, result); }); }); } /** * Compress data. Concurrency limited. * * @param {(Buffer|String)} data Data to compress * @param {Boolean} fin Specifies whether or not this is the last fragment * @param {Function} callback Callback * @public */ compress(data, fin, callback) { zlibLimiter.add((done) => { this._compress(data, fin, (err, result) => { done(); callback(err, result); }); }); } /** * Decompress data. * * @param {Buffer} data Compressed data * @param {Boolean} fin Specifies whether or not this is the last fragment * @param {Function} callback Callback * @private */ _decompress(data, fin, callback) { const endpoint = this._isServer ? 'client' : 'server'; if (!this._inflate) { const key = `${endpoint}_max_window_bits`; const windowBits = typeof this.params[key] !== 'number' ? zlib.Z_DEFAULT_WINDOWBITS : this.params[key]; this._inflate = zlib.createInflateRaw({ ...this._options.zlibInflateOptions, windowBits }); this._inflate[kPerMessageDeflate] = this; this._inflate[kTotalLength] = 0; this._inflate[kBuffers] = []; this._inflate.on('error', inflateOnError); this._inflate.on('data', inflateOnData); } this._inflate[kCallback] = callback; this._inflate.write(data); if (fin) this._inflate.write(TRAILER); this._inflate.flush(() => { const err = this._inflate[kError]; if (err) { this._inflate.close(); this._inflate = null; callback(err); return; } const data = bufferUtil.concat( this._inflate[kBuffers], this._inflate[kTotalLength] ); if (this._inflate._readableState.endEmitted) { this._inflate.close(); this._inflate = null; } else { this._inflate[kTotalLength] = 0; this._inflate[kBuffers] = []; if (fin && this.params[`${endpoint}_no_context_takeover`]) { this._inflate.reset(); } } callback(null, data); }); } /** * Compress data. * * @param {(Buffer|String)} data Data to compress * @param {Boolean} fin Specifies whether or not this is the last fragment * @param {Function} callback Callback * @private */ _compress(data, fin, callback) { const endpoint = this._isServer ? 'server' : 'client'; if (!this._deflate) { const key = `${endpoint}_max_window_bits`; const windowBits = typeof this.params[key] !== 'number' ? zlib.Z_DEFAULT_WINDOWBITS : this.params[key]; this._deflate = zlib.createDeflateRaw({ ...this._options.zlibDeflateOptions, windowBits }); this._deflate[kTotalLength] = 0; this._deflate[kBuffers] = []; this._deflate.on('data', deflateOnData); } this._deflate[kCallback] = callback; this._deflate.write(data); this._deflate.flush(zlib.Z_SYNC_FLUSH, () => { if (!this._deflate) { // // The deflate stream was closed while data was being processed. // return; } let data = bufferUtil.concat( this._deflate[kBuffers], this._deflate[kTotalLength] ); if (fin) { data = new FastBuffer(data.buffer, data.byteOffset, data.length - 4); } // // Ensure that the callback will not be called again in // `PerMessageDeflate#cleanup()`. // this._deflate[kCallback] = null; this._deflate[kTotalLength] = 0; this._deflate[kBuffers] = []; if (fin && this.params[`${endpoint}_no_context_takeover`]) { this._deflate.reset(); } callback(null, data); }); } } module.exports = PerMessageDeflate; /** * The listener of the `zlib.DeflateRaw` stream `'data'` event. * * @param {Buffer} chunk A chunk of data * @private */ function deflateOnData(chunk) { this[kBuffers].push(chunk); this[kTotalLength] += chunk.length; } /** * The listener of the `zlib.InflateRaw` stream `'data'` event. * * @param {Buffer} chunk A chunk of data * @private */ function inflateOnData(chunk) { this[kTotalLength] += chunk.length; if ( this[kPerMessageDeflate]._maxPayload < 1 || this[kTotalLength] <= this[kPerMessageDeflate]._maxPayload ) { this[kBuffers].push(chunk); return; } this[kError] = new RangeError('Max payload size exceeded'); this[kError].code = 'WS_ERR_UNSUPPORTED_MESSAGE_LENGTH'; this[kError][kStatusCode] = 1009; this.removeListener('data', inflateOnData); // // The choice to employ `zlib.reset()` over `zlib.close()` is dictated by the // fact that in Node.js versions prior to 13.10.0, the callback for // `zlib.flush()` is not called if `zlib.close()` is used. Utilizing // `zlib.reset()` ensures that either the callback is invoked or an error is // emitted. // this.reset(); } /** * The listener of the `zlib.InflateRaw` stream `'error'` event. * * @param {Error} err The emitted error * @private */ function inflateOnError(err) { // // There is no need to call `Zlib#close()` as the handle is automatically // closed when an error is emitted. // this[kPerMessageDeflate]._inflate = null; if (this[kError]) { this[kCallback](this[kError]); return; } err[kStatusCode] = 1007; this[kCallback](err); } node_modules/ws/lib/websocket-server.js 0000664 00000040011 15114741631 0014251 0 ustar 00 /* eslint no-unused-vars: ["error", { "varsIgnorePattern": "^Duplex$", "caughtErrors": "none" }] */ 'use strict'; const EventEmitter = require('events'); const http = require('http'); const { Duplex } = require('stream'); const { createHash } = require('crypto'); const extension = require('./extension'); const PerMessageDeflate = require('./permessage-deflate'); const subprotocol = require('./subprotocol'); const WebSocket = require('./websocket'); const { GUID, kWebSocket } = require('./constants'); const keyRegex = /^[+/0-9A-Za-z]{22}==$/; const RUNNING = 0; const CLOSING = 1; const CLOSED = 2; /** * Class representing a WebSocket server. * * @extends EventEmitter */ class WebSocketServer extends EventEmitter { /** * Create a `WebSocketServer` instance. * * @param {Object} options Configuration options * @param {Boolean} [options.allowSynchronousEvents=true] Specifies whether * any of the `'message'`, `'ping'`, and `'pong'` events can be emitted * multiple times in the same tick * @param {Boolean} [options.autoPong=true] Specifies whether or not to * automatically send a pong in response to a ping * @param {Number} [options.backlog=511] The maximum length of the queue of * pending connections * @param {Boolean} [options.clientTracking=true] Specifies whether or not to * track clients * @param {Function} [options.handleProtocols] A hook to handle protocols * @param {String} [options.host] The hostname where to bind the server * @param {Number} [options.maxPayload=104857600] The maximum allowed message * size * @param {Boolean} [options.noServer=false] Enable no server mode * @param {String} [options.path] Accept only connections matching this path * @param {(Boolean|Object)} [options.perMessageDeflate=false] Enable/disable * permessage-deflate * @param {Number} [options.port] The port where to bind the server * @param {(http.Server|https.Server)} [options.server] A pre-created HTTP/S * server to use * @param {Boolean} [options.skipUTF8Validation=false] Specifies whether or * not to skip UTF-8 validation for text and close messages * @param {Function} [options.verifyClient] A hook to reject connections * @param {Function} [options.WebSocket=WebSocket] Specifies the `WebSocket` * class to use. It must be the `WebSocket` class or class that extends it * @param {Function} [callback] A listener for the `listening` event */ constructor(options, callback) { super(); options = { allowSynchronousEvents: true, autoPong: true, maxPayload: 100 * 1024 * 1024, skipUTF8Validation: false, perMessageDeflate: false, handleProtocols: null, clientTracking: true, verifyClient: null, noServer: false, backlog: null, // use default (511 as implemented in net.js) server: null, host: null, path: null, port: null, WebSocket, ...options }; if ( (options.port == null && !options.server && !options.noServer) || (options.port != null && (options.server || options.noServer)) || (options.server && options.noServer) ) { throw new TypeError( 'One and only one of the "port", "server", or "noServer" options ' + 'must be specified' ); } if (options.port != null) { this._server = http.createServer((req, res) => { const body = http.STATUS_CODES[426]; res.writeHead(426, { 'Content-Length': body.length, 'Content-Type': 'text/plain' }); res.end(body); }); this._server.listen( options.port, options.host, options.backlog, callback ); } else if (options.server) { this._server = options.server; } if (this._server) { const emitConnection = this.emit.bind(this, 'connection'); this._removeListeners = addListeners(this._server, { listening: this.emit.bind(this, 'listening'), error: this.emit.bind(this, 'error'), upgrade: (req, socket, head) => { this.handleUpgrade(req, socket, head, emitConnection); } }); } if (options.perMessageDeflate === true) options.perMessageDeflate = {}; if (options.clientTracking) { this.clients = new Set(); this._shouldEmitClose = false; } this.options = options; this._state = RUNNING; } /** * Returns the bound address, the address family name, and port of the server * as reported by the operating system if listening on an IP socket. * If the server is listening on a pipe or UNIX domain socket, the name is * returned as a string. * * @return {(Object|String|null)} The address of the server * @public */ address() { if (this.options.noServer) { throw new Error('The server is operating in "noServer" mode'); } if (!this._server) return null; return this._server.address(); } /** * Stop the server from accepting new connections and emit the `'close'` event * when all existing connections are closed. * * @param {Function} [cb] A one-time listener for the `'close'` event * @public */ close(cb) { if (this._state === CLOSED) { if (cb) { this.once('close', () => { cb(new Error('The server is not running')); }); } process.nextTick(emitClose, this); return; } if (cb) this.once('close', cb); if (this._state === CLOSING) return; this._state = CLOSING; if (this.options.noServer || this.options.server) { if (this._server) { this._removeListeners(); this._removeListeners = this._server = null; } if (this.clients) { if (!this.clients.size) { process.nextTick(emitClose, this); } else { this._shouldEmitClose = true; } } else { process.nextTick(emitClose, this); } } else { const server = this._server; this._removeListeners(); this._removeListeners = this._server = null; // // The HTTP/S server was created internally. Close it, and rely on its // `'close'` event. // server.close(() => { emitClose(this); }); } } /** * See if a given request should be handled by this server instance. * * @param {http.IncomingMessage} req Request object to inspect * @return {Boolean} `true` if the request is valid, else `false` * @public */ shouldHandle(req) { if (this.options.path) { const index = req.url.indexOf('?'); const pathname = index !== -1 ? req.url.slice(0, index) : req.url; if (pathname !== this.options.path) return false; } return true; } /** * Handle a HTTP Upgrade request. * * @param {http.IncomingMessage} req The request object * @param {Duplex} socket The network socket between the server and client * @param {Buffer} head The first packet of the upgraded stream * @param {Function} cb Callback * @public */ handleUpgrade(req, socket, head, cb) { socket.on('error', socketOnError); const key = req.headers['sec-websocket-key']; const upgrade = req.headers.upgrade; const version = +req.headers['sec-websocket-version']; if (req.method !== 'GET') { const message = 'Invalid HTTP method'; abortHandshakeOrEmitwsClientError(this, req, socket, 405, message); return; } if (upgrade === undefined || upgrade.toLowerCase() !== 'websocket') { const message = 'Invalid Upgrade header'; abortHandshakeOrEmitwsClientError(this, req, socket, 400, message); return; } if (key === undefined || !keyRegex.test(key)) { const message = 'Missing or invalid Sec-WebSocket-Key header'; abortHandshakeOrEmitwsClientError(this, req, socket, 400, message); return; } if (version !== 13 && version !== 8) { const message = 'Missing or invalid Sec-WebSocket-Version header'; abortHandshakeOrEmitwsClientError(this, req, socket, 400, message, { 'Sec-WebSocket-Version': '13, 8' }); return; } if (!this.shouldHandle(req)) { abortHandshake(socket, 400); return; } const secWebSocketProtocol = req.headers['sec-websocket-protocol']; let protocols = new Set(); if (secWebSocketProtocol !== undefined) { try { protocols = subprotocol.parse(secWebSocketProtocol); } catch (err) { const message = 'Invalid Sec-WebSocket-Protocol header'; abortHandshakeOrEmitwsClientError(this, req, socket, 400, message); return; } } const secWebSocketExtensions = req.headers['sec-websocket-extensions']; const extensions = {}; if ( this.options.perMessageDeflate && secWebSocketExtensions !== undefined ) { const perMessageDeflate = new PerMessageDeflate( this.options.perMessageDeflate, true, this.options.maxPayload ); try { const offers = extension.parse(secWebSocketExtensions); if (offers[PerMessageDeflate.extensionName]) { perMessageDeflate.accept(offers[PerMessageDeflate.extensionName]); extensions[PerMessageDeflate.extensionName] = perMessageDeflate; } } catch (err) { const message = 'Invalid or unacceptable Sec-WebSocket-Extensions header'; abortHandshakeOrEmitwsClientError(this, req, socket, 400, message); return; } } // // Optionally call external client verification handler. // if (this.options.verifyClient) { const info = { origin: req.headers[`${version === 8 ? 'sec-websocket-origin' : 'origin'}`], secure: !!(req.socket.authorized || req.socket.encrypted), req }; if (this.options.verifyClient.length === 2) { this.options.verifyClient(info, (verified, code, message, headers) => { if (!verified) { return abortHandshake(socket, code || 401, message, headers); } this.completeUpgrade( extensions, key, protocols, req, socket, head, cb ); }); return; } if (!this.options.verifyClient(info)) return abortHandshake(socket, 401); } this.completeUpgrade(extensions, key, protocols, req, socket, head, cb); } /** * Upgrade the connection to WebSocket. * * @param {Object} extensions The accepted extensions * @param {String} key The value of the `Sec-WebSocket-Key` header * @param {Set} protocols The subprotocols * @param {http.IncomingMessage} req The request object * @param {Duplex} socket The network socket between the server and client * @param {Buffer} head The first packet of the upgraded stream * @param {Function} cb Callback * @throws {Error} If called more than once with the same socket * @private */ completeUpgrade(extensions, key, protocols, req, socket, head, cb) { // // Destroy the socket if the client has already sent a FIN packet. // if (!socket.readable || !socket.writable) return socket.destroy(); if (socket[kWebSocket]) { throw new Error( 'server.handleUpgrade() was called more than once with the same ' + 'socket, possibly due to a misconfiguration' ); } if (this._state > RUNNING) return abortHandshake(socket, 503); const digest = createHash('sha1') .update(key + GUID) .digest('base64'); const headers = [ 'HTTP/1.1 101 Switching Protocols', 'Upgrade: websocket', 'Connection: Upgrade', `Sec-WebSocket-Accept: ${digest}` ]; const ws = new this.options.WebSocket(null, undefined, this.options); if (protocols.size) { // // Optionally call external protocol selection handler. // const protocol = this.options.handleProtocols ? this.options.handleProtocols(protocols, req) : protocols.values().next().value; if (protocol) { headers.push(`Sec-WebSocket-Protocol: ${protocol}`); ws._protocol = protocol; } } if (extensions[PerMessageDeflate.extensionName]) { const params = extensions[PerMessageDeflate.extensionName].params; const value = extension.format({ [PerMessageDeflate.extensionName]: [params] }); headers.push(`Sec-WebSocket-Extensions: ${value}`); ws._extensions = extensions; } // // Allow external modification/inspection of handshake headers. // this.emit('headers', headers, req); socket.write(headers.concat('\r\n').join('\r\n')); socket.removeListener('error', socketOnError); ws.setSocket(socket, head, { allowSynchronousEvents: this.options.allowSynchronousEvents, maxPayload: this.options.maxPayload, skipUTF8Validation: this.options.skipUTF8Validation }); if (this.clients) { this.clients.add(ws); ws.on('close', () => { this.clients.delete(ws); if (this._shouldEmitClose && !this.clients.size) { process.nextTick(emitClose, this); } }); } cb(ws, req); } } module.exports = WebSocketServer; /** * Add event listeners on an `EventEmitter` using a map of <event, listener> * pairs. * * @param {EventEmitter} server The event emitter * @param {Object.<String, Function>} map The listeners to add * @return {Function} A function that will remove the added listeners when * called * @private */ function addListeners(server, map) { for (const event of Object.keys(map)) server.on(event, map[event]); return function removeListeners() { for (const event of Object.keys(map)) { server.removeListener(event, map[event]); } }; } /** * Emit a `'close'` event on an `EventEmitter`. * * @param {EventEmitter} server The event emitter * @private */ function emitClose(server) { server._state = CLOSED; server.emit('close'); } /** * Handle socket errors. * * @private */ function socketOnError() { this.destroy(); } /** * Close the connection when preconditions are not fulfilled. * * @param {Duplex} socket The socket of the upgrade request * @param {Number} code The HTTP response status code * @param {String} [message] The HTTP response body * @param {Object} [headers] Additional HTTP response headers * @private */ function abortHandshake(socket, code, message, headers) { // // The socket is writable unless the user destroyed or ended it before calling // `server.handleUpgrade()` or in the `verifyClient` function, which is a user // error. Handling this does not make much sense as the worst that can happen // is that some of the data written by the user might be discarded due to the // call to `socket.end()` below, which triggers an `'error'` event that in // turn causes the socket to be destroyed. // message = message || http.STATUS_CODES[code]; headers = { Connection: 'close', 'Content-Type': 'text/html', 'Content-Length': Buffer.byteLength(message), ...headers }; socket.once('finish', socket.destroy); socket.end( `HTTP/1.1 ${code} ${http.STATUS_CODES[code]}\r\n` + Object.keys(headers) .map((h) => `${h}: ${headers[h]}`) .join('\r\n') + '\r\n\r\n' + message ); } /** * Emit a `'wsClientError'` event on a `WebSocketServer` if there is at least * one listener for it, otherwise call `abortHandshake()`. * * @param {WebSocketServer} server The WebSocket server * @param {http.IncomingMessage} req The request object * @param {Duplex} socket The socket of the upgrade request * @param {Number} code The HTTP response status code * @param {String} message The HTTP response body * @param {Object} [headers] The HTTP response headers * @private */ function abortHandshakeOrEmitwsClientError( server, req, socket, code, message, headers ) { if (server.listenerCount('wsClientError')) { const err = new Error(message); Error.captureStackTrace(err, abortHandshakeOrEmitwsClientError); server.emit('wsClientError', err, socket, req); } else { abortHandshake(socket, code, message, headers); } } node_modules/ws/index.js 0000664 00000000570 15114741631 0011326 0 ustar 00 'use strict'; const WebSocket = require('./lib/websocket'); WebSocket.createWebSocketStream = require('./lib/stream'); WebSocket.Server = require('./lib/websocket-server'); WebSocket.Receiver = require('./lib/receiver'); WebSocket.Sender = require('./lib/sender'); WebSocket.WebSocket = WebSocket; WebSocket.WebSocketServer = WebSocket.Server; module.exports = WebSocket; node_modules/ws/wrapper.mjs 0000664 00000000525 15114741631 0012054 0 ustar 00 import createWebSocketStream from './lib/stream.js'; import Receiver from './lib/receiver.js'; import Sender from './lib/sender.js'; import WebSocket from './lib/websocket.js'; import WebSocketServer from './lib/websocket-server.js'; export { createWebSocketStream, Receiver, Sender, WebSocket, WebSocketServer }; export default WebSocket; node_modules/ws/browser.js 0000664 00000000260 15114741631 0011676 0 ustar 00 'use strict'; module.exports = function () { throw new Error( 'ws does not work in the browser. Browser clients must use the native ' + 'WebSocket object' ); }; node_modules/ws/README.md 0000664 00000035712 15114741631 0011146 0 ustar 00 # ws: a Node.js WebSocket library [](https://www.npmjs.com/package/ws) [](https://github.com/websockets/ws/actions?query=workflow%3ACI+branch%3Amaster) [](https://coveralls.io/github/websockets/ws) ws is a simple to use, blazing fast, and thoroughly tested WebSocket client and server implementation. Passes the quite extensive Autobahn test suite: [server][server-report], [client][client-report]. **Note**: This module does not work in the browser. The client in the docs is a reference to a backend with the role of a client in the WebSocket communication. Browser clients must use the native [`WebSocket`](https://developer.mozilla.org/en-US/docs/Web/API/WebSocket) object. To make the same code work seamlessly on Node.js and the browser, you can use one of the many wrappers available on npm, like [isomorphic-ws](https://github.com/heineiuo/isomorphic-ws). ## Table of Contents - [Protocol support](#protocol-support) - [Installing](#installing) - [Opt-in for performance](#opt-in-for-performance) - [Legacy opt-in for performance](#legacy-opt-in-for-performance) - [API docs](#api-docs) - [WebSocket compression](#websocket-compression) - [Usage examples](#usage-examples) - [Sending and receiving text data](#sending-and-receiving-text-data) - [Sending binary data](#sending-binary-data) - [Simple server](#simple-server) - [External HTTP/S server](#external-https-server) - [Multiple servers sharing a single HTTP/S server](#multiple-servers-sharing-a-single-https-server) - [Client authentication](#client-authentication) - [Server broadcast](#server-broadcast) - [Round-trip time](#round-trip-time) - [Use the Node.js streams API](#use-the-nodejs-streams-api) - [Other examples](#other-examples) - [FAQ](#faq) - [How to get the IP address of the client?](#how-to-get-the-ip-address-of-the-client) - [How to detect and close broken connections?](#how-to-detect-and-close-broken-connections) - [How to connect via a proxy?](#how-to-connect-via-a-proxy) - [Changelog](#changelog) - [License](#license) ## Protocol support - **HyBi drafts 07-12** (Use the option `protocolVersion: 8`) - **HyBi drafts 13-17** (Current default, alternatively option `protocolVersion: 13`) ## Installing ``` npm install ws ``` ### Opt-in for performance [bufferutil][] is an optional module that can be installed alongside the ws module: ``` npm install --save-optional bufferutil ``` This is a binary addon that improves the performance of certain operations such as masking and unmasking the data payload of the WebSocket frames. Prebuilt binaries are available for the most popular platforms, so you don't necessarily need to have a C++ compiler installed on your machine. To force ws to not use bufferutil, use the [`WS_NO_BUFFER_UTIL`](./doc/ws.md#ws_no_buffer_util) environment variable. This can be useful to enhance security in systems where a user can put a package in the package search path of an application of another user, due to how the Node.js resolver algorithm works. #### Legacy opt-in for performance If you are running on an old version of Node.js (prior to v18.14.0), ws also supports the [utf-8-validate][] module: ``` npm install --save-optional utf-8-validate ``` This contains a binary polyfill for [`buffer.isUtf8()`][]. To force ws not to use utf-8-validate, use the [`WS_NO_UTF_8_VALIDATE`](./doc/ws.md#ws_no_utf_8_validate) environment variable. ## API docs See [`/doc/ws.md`](./doc/ws.md) for Node.js-like documentation of ws classes and utility functions. ## WebSocket compression ws supports the [permessage-deflate extension][permessage-deflate] which enables the client and server to negotiate a compression algorithm and its parameters, and then selectively apply it to the data payloads of each WebSocket message. The extension is disabled by default on the server and enabled by default on the client. It adds a significant overhead in terms of performance and memory consumption so we suggest to enable it only if it is really needed. Note that Node.js has a variety of issues with high-performance compression, where increased concurrency, especially on Linux, can lead to [catastrophic memory fragmentation][node-zlib-bug] and slow performance. If you intend to use permessage-deflate in production, it is worthwhile to set up a test representative of your workload and ensure Node.js/zlib will handle it with acceptable performance and memory usage. Tuning of permessage-deflate can be done via the options defined below. You can also use `zlibDeflateOptions` and `zlibInflateOptions`, which is passed directly into the creation of [raw deflate/inflate streams][node-zlib-deflaterawdocs]. See [the docs][ws-server-options] for more options. ```js import WebSocket, { WebSocketServer } from 'ws'; const wss = new WebSocketServer({ port: 8080, perMessageDeflate: { zlibDeflateOptions: { // See zlib defaults. chunkSize: 1024, memLevel: 7, level: 3 }, zlibInflateOptions: { chunkSize: 10 * 1024 }, // Other options settable: clientNoContextTakeover: true, // Defaults to negotiated value. serverNoContextTakeover: true, // Defaults to negotiated value. serverMaxWindowBits: 10, // Defaults to negotiated value. // Below options specified as default values. concurrencyLimit: 10, // Limits zlib concurrency for perf. threshold: 1024 // Size (in bytes) below which messages // should not be compressed if context takeover is disabled. } }); ``` The client will only use the extension if it is supported and enabled on the server. To always disable the extension on the client, set the `perMessageDeflate` option to `false`. ```js import WebSocket from 'ws'; const ws = new WebSocket('ws://www.host.com/path', { perMessageDeflate: false }); ``` ## Usage examples ### Sending and receiving text data ```js import WebSocket from 'ws'; const ws = new WebSocket('ws://www.host.com/path'); ws.on('error', console.error); ws.on('open', function open() { ws.send('something'); }); ws.on('message', function message(data) { console.log('received: %s', data); }); ``` ### Sending binary data ```js import WebSocket from 'ws'; const ws = new WebSocket('ws://www.host.com/path'); ws.on('error', console.error); ws.on('open', function open() { const array = new Float32Array(5); for (var i = 0; i < array.length; ++i) { array[i] = i / 2; } ws.send(array); }); ``` ### Simple server ```js import { WebSocketServer } from 'ws'; const wss = new WebSocketServer({ port: 8080 }); wss.on('connection', function connection(ws) { ws.on('error', console.error); ws.on('message', function message(data) { console.log('received: %s', data); }); ws.send('something'); }); ``` ### External HTTP/S server ```js import { createServer } from 'https'; import { readFileSync } from 'fs'; import { WebSocketServer } from 'ws'; const server = createServer({ cert: readFileSync('/path/to/cert.pem'), key: readFileSync('/path/to/key.pem') }); const wss = new WebSocketServer({ server }); wss.on('connection', function connection(ws) { ws.on('error', console.error); ws.on('message', function message(data) { console.log('received: %s', data); }); ws.send('something'); }); server.listen(8080); ``` ### Multiple servers sharing a single HTTP/S server ```js import { createServer } from 'http'; import { WebSocketServer } from 'ws'; const server = createServer(); const wss1 = new WebSocketServer({ noServer: true }); const wss2 = new WebSocketServer({ noServer: true }); wss1.on('connection', function connection(ws) { ws.on('error', console.error); // ... }); wss2.on('connection', function connection(ws) { ws.on('error', console.error); // ... }); server.on('upgrade', function upgrade(request, socket, head) { const { pathname } = new URL(request.url, 'wss://base.url'); if (pathname === '/foo') { wss1.handleUpgrade(request, socket, head, function done(ws) { wss1.emit('connection', ws, request); }); } else if (pathname === '/bar') { wss2.handleUpgrade(request, socket, head, function done(ws) { wss2.emit('connection', ws, request); }); } else { socket.destroy(); } }); server.listen(8080); ``` ### Client authentication ```js import { createServer } from 'http'; import { WebSocketServer } from 'ws'; function onSocketError(err) { console.error(err); } const server = createServer(); const wss = new WebSocketServer({ noServer: true }); wss.on('connection', function connection(ws, request, client) { ws.on('error', console.error); ws.on('message', function message(data) { console.log(`Received message ${data} from user ${client}`); }); }); server.on('upgrade', function upgrade(request, socket, head) { socket.on('error', onSocketError); // This function is not defined on purpose. Implement it with your own logic. authenticate(request, function next(err, client) { if (err || !client) { socket.write('HTTP/1.1 401 Unauthorized\r\n\r\n'); socket.destroy(); return; } socket.removeListener('error', onSocketError); wss.handleUpgrade(request, socket, head, function done(ws) { wss.emit('connection', ws, request, client); }); }); }); server.listen(8080); ``` Also see the provided [example][session-parse-example] using `express-session`. ### Server broadcast A client WebSocket broadcasting to all connected WebSocket clients, including itself. ```js import WebSocket, { WebSocketServer } from 'ws'; const wss = new WebSocketServer({ port: 8080 }); wss.on('connection', function connection(ws) { ws.on('error', console.error); ws.on('message', function message(data, isBinary) { wss.clients.forEach(function each(client) { if (client.readyState === WebSocket.OPEN) { client.send(data, { binary: isBinary }); } }); }); }); ``` A client WebSocket broadcasting to every other connected WebSocket clients, excluding itself. ```js import WebSocket, { WebSocketServer } from 'ws'; const wss = new WebSocketServer({ port: 8080 }); wss.on('connection', function connection(ws) { ws.on('error', console.error); ws.on('message', function message(data, isBinary) { wss.clients.forEach(function each(client) { if (client !== ws && client.readyState === WebSocket.OPEN) { client.send(data, { binary: isBinary }); } }); }); }); ``` ### Round-trip time ```js import WebSocket from 'ws'; const ws = new WebSocket('wss://websocket-echo.com/'); ws.on('error', console.error); ws.on('open', function open() { console.log('connected'); ws.send(Date.now()); }); ws.on('close', function close() { console.log('disconnected'); }); ws.on('message', function message(data) { console.log(`Round-trip time: ${Date.now() - data} ms`); setTimeout(function timeout() { ws.send(Date.now()); }, 500); }); ``` ### Use the Node.js streams API ```js import WebSocket, { createWebSocketStream } from 'ws'; const ws = new WebSocket('wss://websocket-echo.com/'); const duplex = createWebSocketStream(ws, { encoding: 'utf8' }); duplex.on('error', console.error); duplex.pipe(process.stdout); process.stdin.pipe(duplex); ``` ### Other examples For a full example with a browser client communicating with a ws server, see the examples folder. Otherwise, see the test cases. ## FAQ ### How to get the IP address of the client? The remote IP address can be obtained from the raw socket. ```js import { WebSocketServer } from 'ws'; const wss = new WebSocketServer({ port: 8080 }); wss.on('connection', function connection(ws, req) { const ip = req.socket.remoteAddress; ws.on('error', console.error); }); ``` When the server runs behind a proxy like NGINX, the de-facto standard is to use the `X-Forwarded-For` header. ```js wss.on('connection', function connection(ws, req) { const ip = req.headers['x-forwarded-for'].split(',')[0].trim(); ws.on('error', console.error); }); ``` ### How to detect and close broken connections? Sometimes, the link between the server and the client can be interrupted in a way that keeps both the server and the client unaware of the broken state of the connection (e.g. when pulling the cord). In these cases, ping messages can be used as a means to verify that the remote endpoint is still responsive. ```js import { WebSocketServer } from 'ws'; function heartbeat() { this.isAlive = true; } const wss = new WebSocketServer({ port: 8080 }); wss.on('connection', function connection(ws) { ws.isAlive = true; ws.on('error', console.error); ws.on('pong', heartbeat); }); const interval = setInterval(function ping() { wss.clients.forEach(function each(ws) { if (ws.isAlive === false) return ws.terminate(); ws.isAlive = false; ws.ping(); }); }, 30000); wss.on('close', function close() { clearInterval(interval); }); ``` Pong messages are automatically sent in response to ping messages as required by the spec. Just like the server example above, your clients might as well lose connection without knowing it. You might want to add a ping listener on your clients to prevent that. A simple implementation would be: ```js import WebSocket from 'ws'; function heartbeat() { clearTimeout(this.pingTimeout); // Use `WebSocket#terminate()`, which immediately destroys the connection, // instead of `WebSocket#close()`, which waits for the close timer. // Delay should be equal to the interval at which your server // sends out pings plus a conservative assumption of the latency. this.pingTimeout = setTimeout(() => { this.terminate(); }, 30000 + 1000); } const client = new WebSocket('wss://websocket-echo.com/'); client.on('error', console.error); client.on('open', heartbeat); client.on('ping', heartbeat); client.on('close', function clear() { clearTimeout(this.pingTimeout); }); ``` ### How to connect via a proxy? Use a custom `http.Agent` implementation like [https-proxy-agent][] or [socks-proxy-agent][]. ## Changelog We're using the GitHub [releases][changelog] for changelog entries. ## License [MIT](LICENSE) [`buffer.isutf8()`]: https://nodejs.org/api/buffer.html#bufferisutf8input [bufferutil]: https://github.com/websockets/bufferutil [changelog]: https://github.com/websockets/ws/releases [client-report]: http://websockets.github.io/ws/autobahn/clients/ [https-proxy-agent]: https://github.com/TooTallNate/node-https-proxy-agent [node-zlib-bug]: https://github.com/nodejs/node/issues/8871 [node-zlib-deflaterawdocs]: https://nodejs.org/api/zlib.html#zlib_zlib_createdeflateraw_options [permessage-deflate]: https://tools.ietf.org/html/rfc7692 [server-report]: http://websockets.github.io/ws/autobahn/servers/ [session-parse-example]: ./examples/express-session-parse [socks-proxy-agent]: https://github.com/TooTallNate/node-socks-proxy-agent [utf-8-validate]: https://github.com/websockets/utf-8-validate [ws-server-options]: ./doc/ws.md#new-websocketserveroptions-callback node_modules/fs/package.json 0000664 00000000722 15114741631 0012125 0 ustar 00 { "name": "fs", "version": "0.0.1-security", "description": "", "main": "index.js", "scripts": { "test": "echo \"Error: no test specified\" && exit 1" }, "repository": { "type": "git", "url": "git+https://github.com/npm/security-holder.git" }, "keywords": [], "author": "", "license": "ISC", "bugs": { "url": "https://github.com/npm/security-holder/issues" }, "homepage": "https://github.com/npm/security-holder#readme" } node_modules/fs/README.md 0000664 00000000510 15114741631 0011111 0 ustar 00 # Security holding package This package name is not currently in use, but was formerly occupied by another package. To avoid malicious use, npm is hanging on to the package name, but loosely, and we'll probably give it to you if you want it. You may adopt this package by contacting support@npmjs.com and requesting the name. node_modules/undici/docs/docs/api/Util.md 0000664 00000001334 15114741631 0014372 0 ustar 00 # Util Utility API for third-party implementations of the dispatcher API. ## `parseHeaders(headers, [obj])` Receives a header object and returns the parsed value. Arguments: - **headers** `(Buffer | string | (Buffer | string)[])[]` (required) - Header object. - **obj** `Record<string, string | string[]>` (optional) - Object to specify a proxy object. The parsed value is assigned to this object. But, if **headers** is an object, it is not used. Returns: `Record<string, string | string[]>` If **obj** is specified, it is equivalent to **obj**. ## `headerNameToString(value)` Retrieves a header name and returns its lowercase value. Arguments: - **value** `string | Buffer` (required) - Header name. Returns: `string` node_modules/undici/docs/docs/api/DispatchInterceptor.md 0000664 00000002764 15114741631 0017443 0 ustar 00 # Interface: DispatchInterceptor Extends: `Function` A function that can be applied to the `Dispatcher.Dispatch` function before it is invoked with a dispatch request. This allows one to write logic to intercept both the outgoing request, and the incoming response. ### Parameter: `Dispatcher.Dispatch` The base dispatch function you are decorating. ### ReturnType: `Dispatcher.Dispatch` A dispatch function that has been altered to provide additional logic ### Basic Example Here is an example of an interceptor being used to provide a JWT bearer token ```js 'use strict' const insertHeaderInterceptor = dispatch => { return function InterceptedDispatch(opts, handler){ opts.headers.push('Authorization', 'Bearer [Some token]') return dispatch(opts, handler) } } const client = new Client('https://localhost:3000', { interceptors: { Client: [insertHeaderInterceptor] } }) ``` ### Basic Example 2 Here is a contrived example of an interceptor stripping the headers from a response. ```js 'use strict' const clearHeadersInterceptor = dispatch => { const { DecoratorHandler } = require('undici') class ResultInterceptor extends DecoratorHandler { onHeaders (statusCode, headers, resume) { return super.onHeaders(statusCode, [], resume) } } return function InterceptedDispatch(opts, handler){ return dispatch(opts, new ResultInterceptor(handler)) } } const client = new Client('https://localhost:3000', { interceptors: { Client: [clearHeadersInterceptor] } }) ``` node_modules/undici/docs/docs/api/DiagnosticsChannel.md 0000664 00000014177 15114741631 0017226 0 ustar 00 # Diagnostics Channel Support Stability: Experimental. Undici supports the [`diagnostics_channel`](https://nodejs.org/api/diagnostics_channel.html) (currently available only on Node.js v16+). It is the preferred way to instrument Undici and retrieve internal information. The channels available are the following. ## `undici:request:create` This message is published when a new outgoing request is created. ```js import diagnosticsChannel from 'diagnostics_channel' diagnosticsChannel.channel('undici:request:create').subscribe(({ request }) => { console.log('origin', request.origin) console.log('completed', request.completed) console.log('method', request.method) console.log('path', request.path) console.log('headers') // array of strings, e.g: ['foo', 'bar'] request.addHeader('hello', 'world') console.log('headers', request.headers) // e.g. ['foo', 'bar', 'hello', 'world'] }) ``` Note: a request is only loosely completed to a given socket. ## `undici:request:bodySent` ```js import diagnosticsChannel from 'diagnostics_channel' diagnosticsChannel.channel('undici:request:bodySent').subscribe(({ request }) => { // request is the same object undici:request:create }) ``` ## `undici:request:headers` This message is published after the response headers have been received, i.e. the response has been completed. ```js import diagnosticsChannel from 'diagnostics_channel' diagnosticsChannel.channel('undici:request:headers').subscribe(({ request, response }) => { // request is the same object undici:request:create console.log('statusCode', response.statusCode) console.log(response.statusText) // response.headers are buffers. console.log(response.headers.map((x) => x.toString())) }) ``` ## `undici:request:trailers` This message is published after the response body and trailers have been received, i.e. the response has been completed. ```js import diagnosticsChannel from 'diagnostics_channel' diagnosticsChannel.channel('undici:request:trailers').subscribe(({ request, trailers }) => { // request is the same object undici:request:create console.log('completed', request.completed) // trailers are buffers. console.log(trailers.map((x) => x.toString())) }) ``` ## `undici:request:error` This message is published if the request is going to error, but it has not errored yet. ```js import diagnosticsChannel from 'diagnostics_channel' diagnosticsChannel.channel('undici:request:error').subscribe(({ request, error }) => { // request is the same object undici:request:create }) ``` ## `undici:client:sendHeaders` This message is published right before the first byte of the request is written to the socket. *Note*: It will publish the exact headers that will be sent to the server in raw format. ```js import diagnosticsChannel from 'diagnostics_channel' diagnosticsChannel.channel('undici:client:sendHeaders').subscribe(({ request, headers, socket }) => { // request is the same object undici:request:create console.log(`Full headers list ${headers.split('\r\n')}`); }) ``` ## `undici:client:beforeConnect` This message is published before creating a new connection for **any** request. You can not assume that this event is related to any specific request. ```js import diagnosticsChannel from 'diagnostics_channel' diagnosticsChannel.channel('undici:client:beforeConnect').subscribe(({ connectParams, connector }) => { // const { host, hostname, protocol, port, servername, version } = connectParams // connector is a function that creates the socket }) ``` ## `undici:client:connected` This message is published after a connection is established. ```js import diagnosticsChannel from 'diagnostics_channel' diagnosticsChannel.channel('undici:client:connected').subscribe(({ socket, connectParams, connector }) => { // const { host, hostname, protocol, port, servername, version } = connectParams // connector is a function that creates the socket }) ``` ## `undici:client:connectError` This message is published if it did not succeed to create new connection ```js import diagnosticsChannel from 'diagnostics_channel' diagnosticsChannel.channel('undici:client:connectError').subscribe(({ error, socket, connectParams, connector }) => { // const { host, hostname, protocol, port, servername, version } = connectParams // connector is a function that creates the socket console.log(`Connect failed with ${error.message}`) }) ``` ## `undici:websocket:open` This message is published after the client has successfully connected to a server. ```js import diagnosticsChannel from 'diagnostics_channel' diagnosticsChannel.channel('undici:websocket:open').subscribe(({ address, protocol, extensions }) => { console.log(address) // address, family, and port console.log(protocol) // negotiated subprotocols console.log(extensions) // negotiated extensions }) ``` ## `undici:websocket:close` This message is published after the connection has closed. ```js import diagnosticsChannel from 'diagnostics_channel' diagnosticsChannel.channel('undici:websocket:close').subscribe(({ websocket, code, reason }) => { console.log(websocket) // the WebSocket object console.log(code) // the closing status code console.log(reason) // the closing reason }) ``` ## `undici:websocket:socket_error` This message is published if the socket experiences an error. ```js import diagnosticsChannel from 'diagnostics_channel' diagnosticsChannel.channel('undici:websocket:socket_error').subscribe((error) => { console.log(error) }) ``` ## `undici:websocket:ping` This message is published after the client receives a ping frame, if the connection is not closing. ```js import diagnosticsChannel from 'diagnostics_channel' diagnosticsChannel.channel('undici:websocket:ping').subscribe(({ payload }) => { // a Buffer or undefined, containing the optional application data of the frame console.log(payload) }) ``` ## `undici:websocket:pong` This message is published after the client receives a pong frame. ```js import diagnosticsChannel from 'diagnostics_channel' diagnosticsChannel.channel('undici:websocket:pong').subscribe(({ payload }) => { // a Buffer or undefined, containing the optional application data of the frame console.log(payload) }) ``` node_modules/undici/docs/docs/api/Cookies.md 0000664 00000003773 15114741631 0015062 0 ustar 00 # Cookie Handling ## `Cookie` interface * **name** `string` * **value** `string` * **expires** `Date|number` (optional) * **maxAge** `number` (optional) * **domain** `string` (optional) * **path** `string` (optional) * **secure** `boolean` (optional) * **httpOnly** `boolean` (optional) * **sameSite** `'String'|'Lax'|'None'` (optional) * **unparsed** `string[]` (optional) Left over attributes that weren't parsed. ## `deleteCookie(headers, name[, attributes])` Sets the expiry time of the cookie to the unix epoch, causing browsers to delete it when received. ```js import { deleteCookie, Headers } from 'undici' const headers = new Headers() deleteCookie(headers, 'name') console.log(headers.get('set-cookie')) // name=; Expires=Thu, 01 Jan 1970 00:00:00 GMT ``` Arguments: * **headers** `Headers` * **name** `string` * **attributes** `{ path?: string, domain?: string }` (optional) Returns: `void` ## `getCookies(headers)` Parses the `Cookie` header and returns a list of attributes and values. ```js import { getCookies, Headers } from 'undici' const headers = new Headers({ cookie: 'get=cookies; and=attributes' }) console.log(getCookies(headers)) // { get: 'cookies', and: 'attributes' } ``` Arguments: * **headers** `Headers` Returns: `Record<string, string>` ## `getSetCookies(headers)` Parses all `Set-Cookie` headers. ```js import { getSetCookies, Headers } from 'undici' const headers = new Headers({ 'set-cookie': 'undici=getSetCookies; Secure' }) console.log(getSetCookies(headers)) // [ // { // name: 'undici', // value: 'getSetCookies', // secure: true // } // ] ``` Arguments: * **headers** `Headers` Returns: `Cookie[]` ## `setCookie(headers, cookie)` Appends a cookie to the `Set-Cookie` header. ```js import { setCookie, Headers } from 'undici' const headers = new Headers() setCookie(headers, { name: 'undici', value: 'setCookie' }) console.log(headers.get('Set-Cookie')) // undici=setCookie ``` Arguments: * **headers** `Headers` * **cookie** `Cookie` Returns: `void` node_modules/undici/docs/docs/api/MockClient.md 0000664 00000003745 15114741631 0015515 0 ustar 00 # Class: MockClient Extends: `undici.Client` A mock client class that implements the same api as [MockPool](MockPool.md). ## `new MockClient(origin, [options])` Arguments: * **origin** `string` - It should only include the **protocol, hostname, and port**. * **options** `MockClientOptions` - It extends the `Client` options. Returns: `MockClient` ### Parameter: `MockClientOptions` Extends: `ClientOptions` * **agent** `Agent` - the agent to associate this MockClient with. ### Example - Basic MockClient instantiation We can use MockAgent to instantiate a MockClient ready to be used to intercept specified requests. It will not do anything until registered as the agent to use and any mock request are registered. ```js import { MockAgent } from 'undici' // Connections must be set to 1 to return a MockClient instance const mockAgent = new MockAgent({ connections: 1 }) const mockClient = mockAgent.get('http://localhost:3000') ``` ## Instance Methods ### `MockClient.intercept(options)` Implements: [`MockPool.intercept(options)`](MockPool.md#mockpoolinterceptoptions) ### `MockClient.close()` Implements: [`MockPool.close()`](MockPool.md#mockpoolclose) ### `MockClient.dispatch(options, handlers)` Implements [`Dispatcher.dispatch(options, handlers)`](Dispatcher.md#dispatcherdispatchoptions-handler). ### `MockClient.request(options[, callback])` See [`Dispatcher.request(options [, callback])`](Dispatcher.md#dispatcherrequestoptions-callback). #### Example - MockClient request ```js import { MockAgent } from 'undici' const mockAgent = new MockAgent({ connections: 1 }) const mockClient = mockAgent.get('http://localhost:3000') mockClient.intercept({ path: '/foo' }).reply(200, 'foo') const { statusCode, body } = await mockClient.request({ origin: 'http://localhost:3000', path: '/foo', method: 'GET' }) console.log('response received', statusCode) // response received 200 for await (const data of body) { console.log('data', data.toString('utf8')) // data foo } ``` node_modules/undici/docs/docs/api/WebSocket.md 0000664 00000002734 15114741631 0015350 0 ustar 00 # Class: WebSocket > ⚠️ Warning: the WebSocket API is experimental. Extends: [`EventTarget`](https://developer.mozilla.org/en-US/docs/Web/API/EventTarget) The WebSocket object provides a way to manage a WebSocket connection to a server, allowing bidirectional communication. The API follows the [WebSocket spec](https://developer.mozilla.org/en-US/docs/Web/API/WebSocket) and [RFC 6455](https://datatracker.ietf.org/doc/html/rfc6455). ## `new WebSocket(url[, protocol])` Arguments: * **url** `URL | string` - The url's protocol *must* be `ws` or `wss`. * **protocol** `string | string[] | WebSocketInit` (optional) - Subprotocol(s) to request the server use, or a [`Dispatcher`](./Dispatcher.md). ### Example: This example will not work in browsers or other platforms that don't allow passing an object. ```mjs import { WebSocket, ProxyAgent } from 'undici' const proxyAgent = new ProxyAgent('my.proxy.server') const ws = new WebSocket('wss://echo.websocket.events', { dispatcher: proxyAgent, protocols: ['echo', 'chat'] }) ``` If you do not need a custom Dispatcher, it's recommended to use the following pattern: ```mjs import { WebSocket } from 'undici' const ws = new WebSocket('wss://echo.websocket.events', ['echo', 'chat']) ``` ## Read More - [MDN - WebSocket](https://developer.mozilla.org/en-US/docs/Web/API/WebSocket) - [The WebSocket Specification](https://www.rfc-editor.org/rfc/rfc6455) - [The WHATWG WebSocket Specification](https://websockets.spec.whatwg.org/) node_modules/undici/docs/docs/api/Pool.md 0000664 00000005321 15114741631 0014366 0 ustar 00 # Class: Pool Extends: `undici.Dispatcher` A pool of [Client](Client.md) instances connected to the same upstream target. Requests are not guaranteed to be dispatched in order of invocation. ## `new Pool(url[, options])` Arguments: * **url** `URL | string` - It should only include the **protocol, hostname, and port**. * **options** `PoolOptions` (optional) ### Parameter: `PoolOptions` Extends: [`ClientOptions`](Client.md#parameter-clientoptions) * **factory** `(origin: URL, opts: Object) => Dispatcher` - Default: `(origin, opts) => new Client(origin, opts)` * **connections** `number | null` (optional) - Default: `null` - The number of `Client` instances to create. When set to `null`, the `Pool` instance will create an unlimited amount of `Client` instances. * **interceptors** `{ Pool: DispatchInterceptor[] } }` - Default: `{ Pool: [] }` - A list of interceptors that are applied to the dispatch method. Additional logic can be applied (such as, but not limited to: 302 status code handling, authentication, cookies, compression and caching). ## Instance Properties ### `Pool.closed` Implements [Client.closed](Client.md#clientclosed) ### `Pool.destroyed` Implements [Client.destroyed](Client.md#clientdestroyed) ### `Pool.stats` Returns [`PoolStats`](PoolStats.md) instance for this pool. ## Instance Methods ### `Pool.close([callback])` Implements [`Dispatcher.close([callback])`](Dispatcher.md#dispatcherclosecallback-promise). ### `Pool.destroy([error, callback])` Implements [`Dispatcher.destroy([error, callback])`](Dispatcher.md#dispatcherdestroyerror-callback-promise). ### `Pool.connect(options[, callback])` See [`Dispatcher.connect(options[, callback])`](Dispatcher.md#dispatcherconnectoptions-callback). ### `Pool.dispatch(options, handler)` Implements [`Dispatcher.dispatch(options, handler)`](Dispatcher.md#dispatcherdispatchoptions-handler). ### `Pool.pipeline(options, handler)` See [`Dispatcher.pipeline(options, handler)`](Dispatcher.md#dispatcherpipelineoptions-handler). ### `Pool.request(options[, callback])` See [`Dispatcher.request(options [, callback])`](Dispatcher.md#dispatcherrequestoptions-callback). ### `Pool.stream(options, factory[, callback])` See [`Dispatcher.stream(options, factory[, callback])`](Dispatcher.md#dispatcherstreamoptions-factory-callback). ### `Pool.upgrade(options[, callback])` See [`Dispatcher.upgrade(options[, callback])`](Dispatcher.md#dispatcherupgradeoptions-callback). ## Instance Events ### Event: `'connect'` See [Dispatcher Event: `'connect'`](Dispatcher.md#event-connect). ### Event: `'disconnect'` See [Dispatcher Event: `'disconnect'`](Dispatcher.md#event-disconnect). ### Event: `'drain'` See [Dispatcher Event: `'drain'`](Dispatcher.md#event-drain). node_modules/undici/docs/docs/api/Errors.md 0000664 00000007210 15114741631 0014730 0 ustar 00 # Errors Undici exposes a variety of error objects that you can use to enhance your error handling. You can find all the error objects inside the `errors` key. ```js import { errors } from 'undici' ``` | Error | Error Codes | Description | | ------------------------------------ | ------------------------------------- | ------------------------------------------------------------------------- | | `UndiciError` | `UND_ERR` | all errors below are extended from `UndiciError`. | | `ConnectTimeoutError` | `UND_ERR_CONNECT_TIMEOUT` | socket is destroyed due to connect timeout. | | `HeadersTimeoutError` | `UND_ERR_HEADERS_TIMEOUT` | socket is destroyed due to headers timeout. | | `HeadersOverflowError` | `UND_ERR_HEADERS_OVERFLOW` | socket is destroyed due to headers' max size being exceeded. | | `BodyTimeoutError` | `UND_ERR_BODY_TIMEOUT` | socket is destroyed due to body timeout. | | `ResponseStatusCodeError` | `UND_ERR_RESPONSE_STATUS_CODE` | an error is thrown when `throwOnError` is `true` for status codes >= 400. | | `InvalidArgumentError` | `UND_ERR_INVALID_ARG` | passed an invalid argument. | | `InvalidReturnValueError` | `UND_ERR_INVALID_RETURN_VALUE` | returned an invalid value. | | `RequestAbortedError` | `UND_ERR_ABORTED` | the request has been aborted by the user | | `ClientDestroyedError` | `UND_ERR_DESTROYED` | trying to use a destroyed client. | | `ClientClosedError` | `UND_ERR_CLOSED` | trying to use a closed client. | | `SocketError` | `UND_ERR_SOCKET` | there is an error with the socket. | | `NotSupportedError` | `UND_ERR_NOT_SUPPORTED` | encountered unsupported functionality. | | `RequestContentLengthMismatchError` | `UND_ERR_REQ_CONTENT_LENGTH_MISMATCH` | request body does not match content-length header | | `ResponseContentLengthMismatchError` | `UND_ERR_RES_CONTENT_LENGTH_MISMATCH` | response body does not match content-length header | | `InformationalError` | `UND_ERR_INFO` | expected error with reason | | `ResponseExceededMaxSizeError` | `UND_ERR_RES_EXCEEDED_MAX_SIZE` | response body exceed the max size allowed | | `SecureProxyConnectionError` | `UND_ERR_PRX_TLS` | tls connection to a proxy failed | ### `SocketError` The `SocketError` has a `.socket` property which holds socket metadata: ```ts interface SocketInfo { localAddress?: string localPort?: number remoteAddress?: string remotePort?: number remoteFamily?: string timeout?: number bytesWritten?: number bytesRead?: number } ``` Be aware that in some cases the `.socket` property can be `null`. node_modules/undici/docs/docs/api/api-lifecycle.md 0000664 00000017107 15114741631 0016170 0 ustar 00 # Client Lifecycle An Undici [Client](Client.md) can be best described as a state machine. The following list is a summary of the various state transitions the `Client` will go through in its lifecycle. This document also contains detailed breakdowns of each state. > This diagram is not a perfect representation of the undici Client. Since the Client class is not actually implemented as a state-machine, actual execution may deviate slightly from what is described below. Consider this as a general resource for understanding the inner workings of the Undici client rather than some kind of formal specification. ## State Transition Overview * A `Client` begins in the **idle** state with no socket connection and no requests in queue. * The *connect* event transitions the `Client` to the **pending** state where requests can be queued prior to processing. * The *close* and *destroy* events transition the `Client` to the **destroyed** state. Since there are no requests in the queue, the *close* event immediately transitions to the **destroyed** state. * The **pending** state indicates the underlying socket connection has been successfully established and requests are queueing. * The *process* event transitions the `Client` to the **processing** state where requests are processed. * If requests are queued, the *close* event transitions to the **processing** state; otherwise, it transitions to the **destroyed** state. * The *destroy* event transitions to the **destroyed** state. * The **processing** state initializes to the **processing.running** state. * If the current request requires draining, the *needDrain* event transitions the `Client` into the **processing.busy** state which will return to the **processing.running** state with the *drainComplete* event. * After all queued requests are completed, the *keepalive* event transitions the `Client` back to the **pending** state. If no requests are queued during the timeout, the **close** event transitions the `Client` to the **destroyed** state. * If the *close* event is fired while the `Client` still has queued requests, the `Client` transitions to the **process.closing** state where it will complete all existing requests before firing the *done* event. * The *done* event gracefully transitions the `Client` to the **destroyed** state. * At any point in time, the *destroy* event will transition the `Client` from the **processing** state to the **destroyed** state, destroying any queued requests. * The **destroyed** state is a final state and the `Client` is no longer functional. A state diagram representing an Undici Client instance: ```mermaid stateDiagram-v2 [*] --> idle idle --> pending : connect idle --> destroyed : destroy/close pending --> idle : timeout pending --> destroyed : destroy state close_fork <<fork>> pending --> close_fork : close close_fork --> processing close_fork --> destroyed pending --> processing : process processing --> pending : keepalive processing --> destroyed : done processing --> destroyed : destroy destroyed --> [*] state processing { [*] --> running running --> closing : close running --> busy : needDrain busy --> running : drainComplete running --> [*] : keepalive closing --> [*] : done } ``` ## State details ### idle The **idle** state is the initial state of a `Client` instance. While an `origin` is required for instantiating a `Client` instance, the underlying socket connection will not be established until a request is queued using [`Client.dispatch()`](Client.md#clientdispatchoptions-handlers). By calling `Client.dispatch()` directly or using one of the multiple implementations ([`Client.connect()`](Client.md#clientconnectoptions-callback), [`Client.pipeline()`](Client.md#clientpipelineoptions-handler), [`Client.request()`](Client.md#clientrequestoptions-callback), [`Client.stream()`](Client.md#clientstreamoptions-factory-callback), and [`Client.upgrade()`](Client.md#clientupgradeoptions-callback)), the `Client` instance will transition from **idle** to [**pending**](#pending) and then most likely directly to [**processing**](#processing). Calling [`Client.close()`](Client.md#clientclosecallback) or [`Client.destroy()`](Client.md#clientdestroyerror-callback) transitions directly to the [**destroyed**](#destroyed) state since the `Client` instance will have no queued requests in this state. ### pending The **pending** state signifies a non-processing `Client`. Upon entering this state, the `Client` establishes a socket connection and emits the [`'connect'`](Client.md#event-connect) event signalling a connection was successfully established with the `origin` provided during `Client` instantiation. The internal queue is initially empty, and requests can start queueing. Calling [`Client.close()`](Client.md#clientclosecallback) with queued requests, transitions the `Client` to the [**processing**](#processing) state. Without queued requests, it transitions to the [**destroyed**](#destroyed) state. Calling [`Client.destroy()`](Client.md#clientdestroyerror-callback) transitions directly to the [**destroyed**](#destroyed) state regardless of existing requests. ### processing The **processing** state is a state machine within itself. It initializes to the [**processing.running**](#running) state. The [`Client.dispatch()`](Client.md#clientdispatchoptions-handlers), [`Client.close()`](Client.md#clientclosecallback), and [`Client.destroy()`](Client.md#clientdestroyerror-callback) can be called at any time while the `Client` is in this state. `Client.dispatch()` will add more requests to the queue while existing requests continue to be processed. `Client.close()` will transition to the [**processing.closing**](#closing) state. And `Client.destroy()` will transition to [**destroyed**](#destroyed). #### running In the **processing.running** sub-state, queued requests are being processed in a FIFO order. If a request body requires draining, the *needDrain* event transitions to the [**processing.busy**](#busy) sub-state. The *close* event transitions the Client to the [**process.closing**](#closing) sub-state. If all queued requests are processed and neither [`Client.close()`](Client.md#clientclosecallback) nor [`Client.destroy()`](Client.md#clientdestroyerror-callback) are called, then the [**processing**](#processing) machine will trigger a *keepalive* event transitioning the `Client` back to the [**pending**](#pending) state. During this time, the `Client` is waiting for the socket connection to timeout, and once it does, it triggers the *timeout* event and transitions to the [**idle**](#idle) state. #### busy This sub-state is only entered when a request body is an instance of [Stream](https://nodejs.org/api/stream.html) and requires draining. The `Client` cannot process additional requests while in this state and must wait until the currently processing request body is completely drained before transitioning back to [**processing.running**](#running). #### closing This sub-state is only entered when a `Client` instance has queued requests and the [`Client.close()`](Client.md#clientclosecallback) method is called. In this state, the `Client` instance continues to process requests as usual, with the one exception that no additional requests can be queued. Once all of the queued requests are processed, the `Client` will trigger the *done* event gracefully entering the [**destroyed**](#destroyed) state without an error. ### destroyed The **destroyed** state is a final state for the `Client` instance. Once in this state, a `Client` is nonfunctional. Calling any other `Client` methods will result in an `ClientDestroyedError`. node_modules/undici/docs/docs/api/MockAgent.md 0000664 00000035620 15114741631 0015332 0 ustar 00 # Class: MockAgent Extends: `undici.Dispatcher` A mocked Agent class that implements the Agent API. It allows one to intercept HTTP requests made through undici and return mocked responses instead. ## `new MockAgent([options])` Arguments: * **options** `MockAgentOptions` (optional) - It extends the `Agent` options. Returns: `MockAgent` ### Parameter: `MockAgentOptions` Extends: [`AgentOptions`](Agent.md#parameter-agentoptions) * **agent** `Agent` (optional) - Default: `new Agent([options])` - a custom agent encapsulated by the MockAgent. ### Example - Basic MockAgent instantiation This will instantiate the MockAgent. It will not do anything until registered as the agent to use with requests and mock interceptions are added. ```js import { MockAgent } from 'undici' const mockAgent = new MockAgent() ``` ### Example - Basic MockAgent instantiation with custom agent ```js import { Agent, MockAgent } from 'undici' const agent = new Agent() const mockAgent = new MockAgent({ agent }) ``` ## Instance Methods ### `MockAgent.get(origin)` This method creates and retrieves MockPool or MockClient instances which can then be used to intercept HTTP requests. If the number of connections on the mock agent is set to 1, a MockClient instance is returned. Otherwise a MockPool instance is returned. For subsequent `MockAgent.get` calls on the same origin, the same mock instance will be returned. Arguments: * **origin** `string | RegExp | (value) => boolean` - a matcher for the pool origin to be retrieved from the MockAgent. | Matcher type | Condition to pass | |:------------:| -------------------------- | | `string` | Exact match against string | | `RegExp` | Regex must pass | | `Function` | Function must return true | Returns: `MockClient | MockPool`. | `MockAgentOptions` | Mock instance returned | | -------------------- | ---------------------- | | `connections === 1` | `MockClient` | | `connections` > `1` | `MockPool` | #### Example - Basic Mocked Request ```js import { MockAgent, setGlobalDispatcher, request } from 'undici' const mockAgent = new MockAgent() setGlobalDispatcher(mockAgent) const mockPool = mockAgent.get('http://localhost:3000') mockPool.intercept({ path: '/foo' }).reply(200, 'foo') const { statusCode, body } = await request('http://localhost:3000/foo') console.log('response received', statusCode) // response received 200 for await (const data of body) { console.log('data', data.toString('utf8')) // data foo } ``` #### Example - Basic Mocked Request with local mock agent dispatcher ```js import { MockAgent, request } from 'undici' const mockAgent = new MockAgent() const mockPool = mockAgent.get('http://localhost:3000') mockPool.intercept({ path: '/foo' }).reply(200, 'foo') const { statusCode, body } = await request('http://localhost:3000/foo', { dispatcher: mockAgent }) console.log('response received', statusCode) // response received 200 for await (const data of body) { console.log('data', data.toString('utf8')) // data foo } ``` #### Example - Basic Mocked Request with local mock pool dispatcher ```js import { MockAgent, request } from 'undici' const mockAgent = new MockAgent() const mockPool = mockAgent.get('http://localhost:3000') mockPool.intercept({ path: '/foo' }).reply(200, 'foo') const { statusCode, body } = await request('http://localhost:3000/foo', { dispatcher: mockPool }) console.log('response received', statusCode) // response received 200 for await (const data of body) { console.log('data', data.toString('utf8')) // data foo } ``` #### Example - Basic Mocked Request with local mock client dispatcher ```js import { MockAgent, request } from 'undici' const mockAgent = new MockAgent({ connections: 1 }) const mockClient = mockAgent.get('http://localhost:3000') mockClient.intercept({ path: '/foo' }).reply(200, 'foo') const { statusCode, body } = await request('http://localhost:3000/foo', { dispatcher: mockClient }) console.log('response received', statusCode) // response received 200 for await (const data of body) { console.log('data', data.toString('utf8')) // data foo } ``` #### Example - Basic Mocked requests with multiple intercepts ```js import { MockAgent, setGlobalDispatcher, request } from 'undici' const mockAgent = new MockAgent() setGlobalDispatcher(mockAgent) const mockPool = mockAgent.get('http://localhost:3000') mockPool.intercept({ path: '/foo' }).reply(200, 'foo') mockPool.intercept({ path: '/hello'}).reply(200, 'hello') const result1 = await request('http://localhost:3000/foo') console.log('response received', result1.statusCode) // response received 200 for await (const data of result1.body) { console.log('data', data.toString('utf8')) // data foo } const result2 = await request('http://localhost:3000/hello') console.log('response received', result2.statusCode) // response received 200 for await (const data of result2.body) { console.log('data', data.toString('utf8')) // data hello } ``` #### Example - Mock different requests within the same file ```js const { MockAgent, setGlobalDispatcher } = require('undici'); const agent = new MockAgent(); agent.disableNetConnect(); setGlobalDispatcher(agent); describe('Test', () => { it('200', async () => { const mockAgent = agent.get('http://test.com'); // your test }); it('200', async () => { const mockAgent = agent.get('http://testing.com'); // your test }); }); ``` #### Example - Mocked request with query body, headers and trailers ```js import { MockAgent, setGlobalDispatcher, request } from 'undici' const mockAgent = new MockAgent() setGlobalDispatcher(mockAgent) const mockPool = mockAgent.get('http://localhost:3000') mockPool.intercept({ path: '/foo?hello=there&see=ya', method: 'POST', body: 'form1=data1&form2=data2' }).reply(200, { foo: 'bar' }, { headers: { 'content-type': 'application/json' }, trailers: { 'Content-MD5': 'test' } }) const { statusCode, headers, trailers, body } = await request('http://localhost:3000/foo?hello=there&see=ya', { method: 'POST', body: 'form1=data1&form2=data2' }) console.log('response received', statusCode) // response received 200 console.log('headers', headers) // { 'content-type': 'application/json' } for await (const data of body) { console.log('data', data.toString('utf8')) // '{"foo":"bar"}' } console.log('trailers', trailers) // { 'content-md5': 'test' } ``` #### Example - Mocked request with origin regex ```js import { MockAgent, setGlobalDispatcher, request } from 'undici' const mockAgent = new MockAgent() setGlobalDispatcher(mockAgent) const mockPool = mockAgent.get(new RegExp('http://localhost:3000')) mockPool.intercept({ path: '/foo' }).reply(200, 'foo') const { statusCode, body } = await request('http://localhost:3000/foo') console.log('response received', statusCode) // response received 200 for await (const data of body) { console.log('data', data.toString('utf8')) // data foo } ``` #### Example - Mocked request with origin function ```js import { MockAgent, setGlobalDispatcher, request } from 'undici' const mockAgent = new MockAgent() setGlobalDispatcher(mockAgent) const mockPool = mockAgent.get((origin) => origin === 'http://localhost:3000') mockPool.intercept({ path: '/foo' }).reply(200, 'foo') const { statusCode, body } = await request('http://localhost:3000/foo') console.log('response received', statusCode) // response received 200 for await (const data of body) { console.log('data', data.toString('utf8')) // data foo } ``` ### `MockAgent.close()` Closes the mock agent and waits for registered mock pools and clients to also close before resolving. Returns: `Promise<void>` #### Example - clean up after tests are complete ```js import { MockAgent, setGlobalDispatcher } from 'undici' const mockAgent = new MockAgent() setGlobalDispatcher(mockAgent) await mockAgent.close() ``` ### `MockAgent.dispatch(options, handlers)` Implements [`Agent.dispatch(options, handlers)`](Agent.md#parameter-agentdispatchoptions). ### `MockAgent.request(options[, callback])` See [`Dispatcher.request(options [, callback])`](Dispatcher.md#dispatcherrequestoptions-callback). #### Example - MockAgent request ```js import { MockAgent } from 'undici' const mockAgent = new MockAgent() const mockPool = mockAgent.get('http://localhost:3000') mockPool.intercept({ path: '/foo' }).reply(200, 'foo') const { statusCode, body } = await mockAgent.request({ origin: 'http://localhost:3000', path: '/foo', method: 'GET' }) console.log('response received', statusCode) // response received 200 for await (const data of body) { console.log('data', data.toString('utf8')) // data foo } ``` ### `MockAgent.deactivate()` This method disables mocking in MockAgent. Returns: `void` #### Example - Deactivate Mocking ```js import { MockAgent, setGlobalDispatcher } from 'undici' const mockAgent = new MockAgent() setGlobalDispatcher(mockAgent) mockAgent.deactivate() ``` ### `MockAgent.activate()` This method enables mocking in a MockAgent instance. When instantiated, a MockAgent is automatically activated. Therefore, this method is only effective after `MockAgent.deactivate` has been called. Returns: `void` #### Example - Activate Mocking ```js import { MockAgent, setGlobalDispatcher } from 'undici' const mockAgent = new MockAgent() setGlobalDispatcher(mockAgent) mockAgent.deactivate() // No mocking will occur // Later mockAgent.activate() ``` ### `MockAgent.enableNetConnect([host])` When requests are not matched in a MockAgent intercept, a real HTTP request is attempted. We can control this further through the use of `enableNetConnect`. This is achieved by defining host matchers so only matching requests will be attempted. When using a string, it should only include the **hostname and optionally, the port**. In addition, calling this method multiple times with a string will allow all HTTP requests that match these values. Arguments: * **host** `string | RegExp | (value) => boolean` - (optional) Returns: `void` #### Example - Allow all non-matching urls to be dispatched in a real HTTP request ```js import { MockAgent, setGlobalDispatcher, request } from 'undici' const mockAgent = new MockAgent() setGlobalDispatcher(mockAgent) mockAgent.enableNetConnect() await request('http://example.com') // A real request is made ``` #### Example - Allow requests matching a host string to make real requests ```js import { MockAgent, setGlobalDispatcher, request } from 'undici' const mockAgent = new MockAgent() setGlobalDispatcher(mockAgent) mockAgent.enableNetConnect('example-1.com') mockAgent.enableNetConnect('example-2.com:8080') await request('http://example-1.com') // A real request is made await request('http://example-2.com:8080') // A real request is made await request('http://example-3.com') // Will throw ``` #### Example - Allow requests matching a host regex to make real requests ```js import { MockAgent, setGlobalDispatcher, request } from 'undici' const mockAgent = new MockAgent() setGlobalDispatcher(mockAgent) mockAgent.enableNetConnect(new RegExp('example.com')) await request('http://example.com') // A real request is made ``` #### Example - Allow requests matching a host function to make real requests ```js import { MockAgent, setGlobalDispatcher, request } from 'undici' const mockAgent = new MockAgent() setGlobalDispatcher(mockAgent) mockAgent.enableNetConnect((value) => value === 'example.com') await request('http://example.com') // A real request is made ``` ### `MockAgent.disableNetConnect()` This method causes all requests to throw when requests are not matched in a MockAgent intercept. Returns: `void` #### Example - Disable all non-matching requests by throwing an error for each ```js import { MockAgent, request } from 'undici' const mockAgent = new MockAgent() mockAgent.disableNetConnect() await request('http://example.com') // Will throw ``` ### `MockAgent.pendingInterceptors()` This method returns any pending interceptors registered on a mock agent. A pending interceptor meets one of the following criteria: - Is registered with neither `.times(<number>)` nor `.persist()`, and has not been invoked; - Is persistent (i.e., registered with `.persist()`) and has not been invoked; - Is registered with `.times(<number>)` and has not been invoked `<number>` of times. Returns: `PendingInterceptor[]` (where `PendingInterceptor` is a `MockDispatch` with an additional `origin: string`) #### Example - List all pending inteceptors ```js const agent = new MockAgent() agent.disableNetConnect() agent .get('https://example.com') .intercept({ method: 'GET', path: '/' }) .reply(200) const pendingInterceptors = agent.pendingInterceptors() // Returns [ // { // timesInvoked: 0, // times: 1, // persist: false, // consumed: false, // pending: true, // path: '/', // method: 'GET', // body: undefined, // headers: undefined, // data: { // error: null, // statusCode: 200, // data: '', // headers: {}, // trailers: {} // }, // origin: 'https://example.com' // } // ] ``` ### `MockAgent.assertNoPendingInterceptors([options])` This method throws if the mock agent has any pending interceptors. A pending interceptor meets one of the following criteria: - Is registered with neither `.times(<number>)` nor `.persist()`, and has not been invoked; - Is persistent (i.e., registered with `.persist()`) and has not been invoked; - Is registered with `.times(<number>)` and has not been invoked `<number>` of times. #### Example - Check that there are no pending interceptors ```js const agent = new MockAgent() agent.disableNetConnect() agent .get('https://example.com') .intercept({ method: 'GET', path: '/' }) .reply(200) agent.assertNoPendingInterceptors() // Throws an UndiciError with the following message: // // 1 interceptor is pending: // // ┌─────────┬────────┬───────────────────────┬──────┬─────────────┬────────────┬─────────────┬───────────┐ // │ (index) │ Method │ Origin │ Path │ Status code │ Persistent │ Invocations │ Remaining │ // ├─────────┼────────┼───────────────────────┼──────┼─────────────┼────────────┼─────────────┼───────────┤ // │ 0 │ 'GET' │ 'https://example.com' │ '/' │ 200 │ '❌' │ 0 │ 1 │ // └─────────┴────────┴───────────────────────┴──────┴─────────────┴────────────┴─────────────┴───────────┘ ``` node_modules/undici/docs/docs/api/Debug.md 0000664 00000004371 15114741631 0014507 0 ustar 00 # Debug Undici (and subsenquently `fetch` and `websocket`) exposes a debug statement that can be enabled by setting `NODE_DEBUG` within the environment. The flags availabile are: ## `undici` This flag enables debug statements for the core undici library. ```sh NODE_DEBUG=undici node script.js UNDICI 16241: connecting to nodejs.org using https:h1 UNDICI 16241: connecting to nodejs.org using https:h1 UNDICI 16241: connected to nodejs.org using https:h1 UNDICI 16241: sending request to GET https://nodejs.org// UNDICI 16241: received response to GET https://nodejs.org// - HTTP 307 UNDICI 16241: connecting to nodejs.org using https:h1 UNDICI 16241: trailers received from GET https://nodejs.org// UNDICI 16241: connected to nodejs.org using https:h1 UNDICI 16241: sending request to GET https://nodejs.org//en UNDICI 16241: received response to GET https://nodejs.org//en - HTTP 200 UNDICI 16241: trailers received from GET https://nodejs.org//en ``` ## `fetch` This flag enables debug statements for the `fetch` API. > **Note**: statements are pretty similar to the ones in the `undici` flag, but scoped to `fetch` ```sh NODE_DEBUG=fetch node script.js FETCH 16241: connecting to nodejs.org using https:h1 FETCH 16241: connecting to nodejs.org using https:h1 FETCH 16241: connected to nodejs.org using https:h1 FETCH 16241: sending request to GET https://nodejs.org// FETCH 16241: received response to GET https://nodejs.org// - HTTP 307 FETCH 16241: connecting to nodejs.org using https:h1 FETCH 16241: trailers received from GET https://nodejs.org// FETCH 16241: connected to nodejs.org using https:h1 FETCH 16241: sending request to GET https://nodejs.org//en FETCH 16241: received response to GET https://nodejs.org//en - HTTP 200 FETCH 16241: trailers received from GET https://nodejs.org//en ``` ## `websocket` This flag enables debug statements for the `Websocket` API. > **Note**: statements can overlap with `UNDICI` ones if `undici` or `fetch` flag has been enabled as well. ```sh NODE_DEBUG=websocket node script.js WEBSOCKET 18309: connecting to echo.websocket.org using https:h1 WEBSOCKET 18309: connected to echo.websocket.org using https:h1 WEBSOCKET 18309: sending request to GET https://echo.websocket.org// WEBSOCKET 18309: connection opened <ip_address> ``` node_modules/undici/docs/docs/api/CacheStorage.md 0000664 00000002066 15114741631 0016010 0 ustar 00 # CacheStorage Undici exposes a W3C spec-compliant implementation of [CacheStorage](https://developer.mozilla.org/en-US/docs/Web/API/CacheStorage) and [Cache](https://developer.mozilla.org/en-US/docs/Web/API/Cache). ## Opening a Cache Undici exports a top-level CacheStorage instance. You can open a new Cache, or duplicate a Cache with an existing name, by using `CacheStorage.prototype.open`. If you open a Cache with the same name as an already-existing Cache, its list of cached Responses will be shared between both instances. ```mjs import { caches } from 'undici' const cache_1 = await caches.open('v1') const cache_2 = await caches.open('v1') // Although .open() creates a new instance, assert(cache_1 !== cache_2) // The same Response is matched in both. assert.deepStrictEqual(await cache_1.match('/req'), await cache_2.match('/req')) ``` ## Deleting a Cache If a Cache is deleted, the cached Responses/Requests can still be used. ```mjs const response = await cache_1.match('/req') await caches.delete('v1') await response.text() // the Response's body ``` node_modules/undici/docs/docs/api/BalancedPool.md 0000664 00000005401 15114741631 0015777 0 ustar 00 # Class: BalancedPool Extends: `undici.Dispatcher` A pool of [Pool](Pool.md) instances connected to multiple upstreams. Requests are not guaranteed to be dispatched in order of invocation. ## `new BalancedPool(upstreams [, options])` Arguments: * **upstreams** `URL | string | string[]` - It should only include the **protocol, hostname, and port**. * **options** `BalancedPoolOptions` (optional) ### Parameter: `BalancedPoolOptions` Extends: [`PoolOptions`](Pool.md#parameter-pooloptions) * **factory** `(origin: URL, opts: Object) => Dispatcher` - Default: `(origin, opts) => new Pool(origin, opts)` The `PoolOptions` are passed to each of the `Pool` instances being created. ## Instance Properties ### `BalancedPool.upstreams` Returns an array of upstreams that were previously added. ### `BalancedPool.closed` Implements [Client.closed](Client.md#clientclosed) ### `BalancedPool.destroyed` Implements [Client.destroyed](Client.md#clientdestroyed) ### `Pool.stats` Returns [`PoolStats`](PoolStats.md) instance for this pool. ## Instance Methods ### `BalancedPool.addUpstream(upstream)` Add an upstream. Arguments: * **upstream** `string` - It should only include the **protocol, hostname, and port**. ### `BalancedPool.removeUpstream(upstream)` Removes an upstream that was previously added. ### `BalancedPool.close([callback])` Implements [`Dispatcher.close([callback])`](Dispatcher.md#dispatcherclosecallback-promise). ### `BalancedPool.destroy([error, callback])` Implements [`Dispatcher.destroy([error, callback])`](Dispatcher.md#dispatcherdestroyerror-callback-promise). ### `BalancedPool.connect(options[, callback])` See [`Dispatcher.connect(options[, callback])`](Dispatcher.md#dispatcherconnectoptions-callback). ### `BalancedPool.dispatch(options, handlers)` Implements [`Dispatcher.dispatch(options, handlers)`](Dispatcher.md#dispatcherdispatchoptions-handler). ### `BalancedPool.pipeline(options, handler)` See [`Dispatcher.pipeline(options, handler)`](Dispatcher.md#dispatcherpipelineoptions-handler). ### `BalancedPool.request(options[, callback])` See [`Dispatcher.request(options [, callback])`](Dispatcher.md#dispatcherrequestoptions-callback). ### `BalancedPool.stream(options, factory[, callback])` See [`Dispatcher.stream(options, factory[, callback])`](Dispatcher.md#dispatcherstreamoptions-factory-callback). ### `BalancedPool.upgrade(options[, callback])` See [`Dispatcher.upgrade(options[, callback])`](Dispatcher.md#dispatcherupgradeoptions-callback). ## Instance Events ### Event: `'connect'` See [Dispatcher Event: `'connect'`](Dispatcher.md#event-connect). ### Event: `'disconnect'` See [Dispatcher Event: `'disconnect'`](Dispatcher.md#event-disconnect). ### Event: `'drain'` See [Dispatcher Event: `'drain'`](Dispatcher.md#event-drain). node_modules/undici/docs/docs/api/Dispatcher.md 0000664 00000122144 15114741631 0015546 0 ustar 00 # Dispatcher Extends: `events.EventEmitter` Dispatcher is the core API used to dispatch requests. Requests are not guaranteed to be dispatched in order of invocation. ## Instance Methods ### `Dispatcher.close([callback]): Promise` Closes the dispatcher and gracefully waits for enqueued requests to complete before resolving. Arguments: * **callback** `(error: Error | null, data: null) => void` (optional) Returns: `void | Promise<null>` - Only returns a `Promise` if no `callback` argument was passed ```js dispatcher.close() // -> Promise dispatcher.close(() => {}) // -> void ``` #### Example - Request resolves before Client closes ```js import { createServer } from 'http' import { Client } from 'undici' import { once } from 'events' const server = createServer((request, response) => { response.end('undici') }).listen() await once(server, 'listening') const client = new Client(`http://localhost:${server.address().port}`) try { const { body } = await client.request({ path: '/', method: 'GET' }) body.setEncoding('utf8') body.on('data', console.log) } catch (error) {} await client.close() console.log('Client closed') server.close() ``` ### `Dispatcher.connect(options[, callback])` Starts two-way communications with the requested resource using [HTTP CONNECT](https://developer.mozilla.org/en-US/docs/Web/HTTP/Methods/CONNECT). Arguments: * **options** `ConnectOptions` * **callback** `(err: Error | null, data: ConnectData | null) => void` (optional) Returns: `void | Promise<ConnectData>` - Only returns a `Promise` if no `callback` argument was passed #### Parameter: `ConnectOptions` * **path** `string` * **headers** `UndiciHeaders` (optional) - Default: `null` * **signal** `AbortSignal | events.EventEmitter | null` (optional) - Default: `null` * **opaque** `unknown` (optional) - This argument parameter is passed through to `ConnectData` #### Parameter: `ConnectData` * **statusCode** `number` * **headers** `Record<string, string | string[] | undefined>` * **socket** `stream.Duplex` * **opaque** `unknown` #### Example - Connect request with echo ```js import { createServer } from 'http' import { Client } from 'undici' import { once } from 'events' const server = createServer((request, response) => { throw Error('should never get here') }).listen() server.on('connect', (req, socket, head) => { socket.write('HTTP/1.1 200 Connection established\r\n\r\n') let data = head.toString() socket.on('data', (buf) => { data += buf.toString() }) socket.on('end', () => { socket.end(data) }) }) await once(server, 'listening') const client = new Client(`http://localhost:${server.address().port}`) try { const { socket } = await client.connect({ path: '/' }) const wanted = 'Body' let data = '' socket.on('data', d => { data += d }) socket.on('end', () => { console.log(`Data received: ${data.toString()} | Data wanted: ${wanted}`) client.close() server.close() }) socket.write(wanted) socket.end() } catch (error) { } ``` ### `Dispatcher.destroy([error, callback]): Promise` Destroy the dispatcher abruptly with the given error. All the pending and running requests will be asynchronously aborted and error. Since this operation is asynchronously dispatched there might still be some progress on dispatched requests. Both arguments are optional; the method can be called in four different ways: Arguments: * **error** `Error | null` (optional) * **callback** `(error: Error | null, data: null) => void` (optional) Returns: `void | Promise<void>` - Only returns a `Promise` if no `callback` argument was passed ```js dispatcher.destroy() // -> Promise dispatcher.destroy(new Error()) // -> Promise dispatcher.destroy(() => {}) // -> void dispatcher.destroy(new Error(), () => {}) // -> void ``` #### Example - Request is aborted when Client is destroyed ```js import { createServer } from 'http' import { Client } from 'undici' import { once } from 'events' const server = createServer((request, response) => { response.end() }).listen() await once(server, 'listening') const client = new Client(`http://localhost:${server.address().port}`) try { const request = client.request({ path: '/', method: 'GET' }) client.destroy() .then(() => { console.log('Client destroyed') server.close() }) await request } catch (error) { console.error(error) } ``` ### `Dispatcher.dispatch(options, handler)` This is the low level API which all the preceding APIs are implemented on top of. This API is expected to evolve through semver-major versions and is less stable than the preceding higher level APIs. It is primarily intended for library developers who implement higher level APIs on top of this. Arguments: * **options** `DispatchOptions` * **handler** `DispatchHandler` Returns: `Boolean` - `false` if dispatcher is busy and further dispatch calls won't make any progress until the `'drain'` event has been emitted. #### Parameter: `DispatchOptions` * **origin** `string | URL` * **path** `string` * **method** `string` * **reset** `boolean` (optional) - Default: `false` - If `false`, the request will attempt to create a long-living connection by sending the `connection: keep-alive` header,otherwise will attempt to close it immediately after response by sending `connection: close` within the request and closing the socket afterwards. * **body** `string | Buffer | Uint8Array | stream.Readable | Iterable | AsyncIterable | null` (optional) - Default: `null` * **headers** `UndiciHeaders | string[]` (optional) - Default: `null`. * **query** `Record<string, any> | null` (optional) - Default: `null` - Query string params to be embedded in the request URL. Note that both keys and values of query are encoded using `encodeURIComponent`. If for some reason you need to send them unencoded, embed query params into path directly instead. * **idempotent** `boolean` (optional) - Default: `true` if `method` is `'HEAD'` or `'GET'` - Whether the requests can be safely retried or not. If `false` the request won't be sent until all preceding requests in the pipeline has completed. * **blocking** `boolean` (optional) - Default: `false` - Whether the response is expected to take a long time and would end up blocking the pipeline. When this is set to `true` further pipelining will be avoided on the same connection until headers have been received. * **upgrade** `string | null` (optional) - Default: `null` - Upgrade the request. Should be used to specify the kind of upgrade i.e. `'Websocket'`. * **bodyTimeout** `number | null` (optional) - The timeout after which a request will time out, in milliseconds. Monitors time between receiving body data. Use `0` to disable it entirely. Defaults to 300 seconds. * **headersTimeout** `number | null` (optional) - The amount of time, in milliseconds, the parser will wait to receive the complete HTTP headers while not sending the request. Defaults to 300 seconds. * **throwOnError** `boolean` (optional) - Default: `false` - Whether Undici should throw an error upon receiving a 4xx or 5xx response from the server. * **expectContinue** `boolean` (optional) - Default: `false` - For H2, it appends the expect: 100-continue header, and halts the request body until a 100-continue is received from the remote server #### Parameter: `DispatchHandler` * **onConnect** `(abort: () => void, context: object) => void` - Invoked before request is dispatched on socket. May be invoked multiple times when a request is retried when the request at the head of the pipeline fails. * **onError** `(error: Error) => void` - Invoked when an error has occurred. May not throw. * **onUpgrade** `(statusCode: number, headers: Buffer[], socket: Duplex) => void` (optional) - Invoked when request is upgraded. Required if `DispatchOptions.upgrade` is defined or `DispatchOptions.method === 'CONNECT'`. * **onResponseStarted** `() => void` (optional) - Invoked when response is received, before headers have been read. * **onHeaders** `(statusCode: number, headers: Buffer[], resume: () => void, statusText: string) => boolean` - Invoked when statusCode and headers have been received. May be invoked multiple times due to 1xx informational headers. Not required for `upgrade` requests. * **onData** `(chunk: Buffer) => boolean` - Invoked when response payload data is received. Not required for `upgrade` requests. * **onComplete** `(trailers: Buffer[]) => void` - Invoked when response payload and trailers have been received and the request has completed. Not required for `upgrade` requests. * **onBodySent** `(chunk: string | Buffer | Uint8Array) => void` - Invoked when a body chunk is sent to the server. Not required. For a stream or iterable body this will be invoked for every chunk. For other body types, it will be invoked once after the body is sent. #### Example 1 - Dispatch GET request ```js import { createServer } from 'http' import { Client } from 'undici' import { once } from 'events' const server = createServer((request, response) => { response.end('Hello, World!') }).listen() await once(server, 'listening') const client = new Client(`http://localhost:${server.address().port}`) const data = [] client.dispatch({ path: '/', method: 'GET', headers: { 'x-foo': 'bar' } }, { onConnect: () => { console.log('Connected!') }, onError: (error) => { console.error(error) }, onHeaders: (statusCode, headers) => { console.log(`onHeaders | statusCode: ${statusCode} | headers: ${headers}`) }, onData: (chunk) => { console.log('onData: chunk received') data.push(chunk) }, onComplete: (trailers) => { console.log(`onComplete | trailers: ${trailers}`) const res = Buffer.concat(data).toString('utf8') console.log(`Data: ${res}`) client.close() server.close() } }) ``` #### Example 2 - Dispatch Upgrade Request ```js import { createServer } from 'http' import { Client } from 'undici' import { once } from 'events' const server = createServer((request, response) => { response.end() }).listen() await once(server, 'listening') server.on('upgrade', (request, socket, head) => { console.log('Node.js Server - upgrade event') socket.write('HTTP/1.1 101 Web Socket Protocol Handshake\r\n') socket.write('Upgrade: WebSocket\r\n') socket.write('Connection: Upgrade\r\n') socket.write('\r\n') socket.end() }) const client = new Client(`http://localhost:${server.address().port}`) client.dispatch({ path: '/', method: 'GET', upgrade: 'websocket' }, { onConnect: () => { console.log('Undici Client - onConnect') }, onError: (error) => { console.log('onError') // shouldn't print }, onUpgrade: (statusCode, headers, socket) => { console.log('Undici Client - onUpgrade') console.log(`onUpgrade Headers: ${headers}`) socket.on('data', buffer => { console.log(buffer.toString('utf8')) }) socket.on('end', () => { client.close() server.close() }) socket.end() } }) ``` #### Example 3 - Dispatch POST request ```js import { createServer } from 'http' import { Client } from 'undici' import { once } from 'events' const server = createServer((request, response) => { request.on('data', (data) => { console.log(`Request Data: ${data.toString('utf8')}`) const body = JSON.parse(data) body.message = 'World' response.end(JSON.stringify(body)) }) }).listen() await once(server, 'listening') const client = new Client(`http://localhost:${server.address().port}`) const data = [] client.dispatch({ path: '/', method: 'POST', headers: { 'content-type': 'application/json' }, body: JSON.stringify({ message: 'Hello' }) }, { onConnect: () => { console.log('Connected!') }, onError: (error) => { console.error(error) }, onHeaders: (statusCode, headers) => { console.log(`onHeaders | statusCode: ${statusCode} | headers: ${headers}`) }, onData: (chunk) => { console.log('onData: chunk received') data.push(chunk) }, onComplete: (trailers) => { console.log(`onComplete | trailers: ${trailers}`) const res = Buffer.concat(data).toString('utf8') console.log(`Response Data: ${res}`) client.close() server.close() } }) ``` ### `Dispatcher.pipeline(options, handler)` For easy use with [stream.pipeline](https://nodejs.org/api/stream.html#stream_stream_pipeline_source_transforms_destination_callback). The `handler` argument should return a `Readable` from which the result will be read. Usually it should just return the `body` argument unless some kind of transformation needs to be performed based on e.g. `headers` or `statusCode`. The `handler` should validate the response and save any required state. If there is an error, it should be thrown. The function returns a `Duplex` which writes to the request and reads from the response. Arguments: * **options** `PipelineOptions` * **handler** `(data: PipelineHandlerData) => stream.Readable` Returns: `stream.Duplex` #### Parameter: PipelineOptions Extends: [`RequestOptions`](#parameter-requestoptions) * **objectMode** `boolean` (optional) - Default: `false` - Set to `true` if the `handler` will return an object stream. #### Parameter: PipelineHandlerData * **statusCode** `number` * **headers** `Record<string, string | string[] | undefined>` * **opaque** `unknown` * **body** `stream.Readable` * **context** `object` * **onInfo** `({statusCode: number, headers: Record<string, string | string[]>}) => void | null` (optional) - Default: `null` - Callback collecting all the info headers (HTTP 100-199) received. #### Example 1 - Pipeline Echo ```js import { Readable, Writable, PassThrough, pipeline } from 'stream' import { createServer } from 'http' import { Client } from 'undici' import { once } from 'events' const server = createServer((request, response) => { request.pipe(response) }).listen() await once(server, 'listening') const client = new Client(`http://localhost:${server.address().port}`) let res = '' pipeline( new Readable({ read () { this.push(Buffer.from('undici')) this.push(null) } }), client.pipeline({ path: '/', method: 'GET' }, ({ statusCode, headers, body }) => { console.log(`response received ${statusCode}`) console.log('headers', headers) return pipeline(body, new PassThrough(), () => {}) }), new Writable({ write (chunk, _, callback) { res += chunk.toString() callback() }, final (callback) { console.log(`Response pipelined to writable: ${res}`) callback() } }), error => { if (error) { console.error(error) } client.close() server.close() } ) ``` ### `Dispatcher.request(options[, callback])` Performs a HTTP request. Non-idempotent requests will not be pipelined in order to avoid indirect failures. Idempotent requests will be automatically retried if they fail due to indirect failure from the request at the head of the pipeline. This does not apply to idempotent requests with a stream request body. All response bodies must always be fully consumed or destroyed. Arguments: * **options** `RequestOptions` * **callback** `(error: Error | null, data: ResponseData) => void` (optional) Returns: `void | Promise<ResponseData>` - Only returns a `Promise` if no `callback` argument was passed. #### Parameter: `RequestOptions` Extends: [`DispatchOptions`](#parameter-dispatchoptions) * **opaque** `unknown` (optional) - Default: `null` - Used for passing through context to `ResponseData`. * **signal** `AbortSignal | events.EventEmitter | null` (optional) - Default: `null`. * **onInfo** `({statusCode: number, headers: Record<string, string | string[]>}) => void | null` (optional) - Default: `null` - Callback collecting all the info headers (HTTP 100-199) received. The `RequestOptions.method` property should not be value `'CONNECT'`. #### Parameter: `ResponseData` * **statusCode** `number` * **headers** `Record<string, string | string[]>` - Note that all header keys are lower-cased, e. g. `content-type`. * **body** `stream.Readable` which also implements [the body mixin from the Fetch Standard](https://fetch.spec.whatwg.org/#body-mixin). * **trailers** `Record<string, string>` - This object starts out as empty and will be mutated to contain trailers after `body` has emitted `'end'`. * **opaque** `unknown` * **context** `object` `body` contains the following additional [body mixin](https://fetch.spec.whatwg.org/#body-mixin) methods and properties: * [`.arrayBuffer()`](https://fetch.spec.whatwg.org/#dom-body-arraybuffer) * [`.blob()`](https://fetch.spec.whatwg.org/#dom-body-blob) * [`.bytes()`](https://fetch.spec.whatwg.org/#dom-body-bytes) * [`.json()`](https://fetch.spec.whatwg.org/#dom-body-json) * [`.text()`](https://fetch.spec.whatwg.org/#dom-body-text) * `body` * `bodyUsed` `body` can not be consumed twice. For example, calling `text()` after `json()` throws `TypeError`. `body` contains the following additional extensions: - `dump({ limit: Integer })`, dump the response by reading up to `limit` bytes without killing the socket (optional) - Default: 262144. Note that body will still be a `Readable` even if it is empty, but attempting to deserialize it with `json()` will result in an exception. Recommended way to ensure there is a body to deserialize is to check if status code is not 204, and `content-type` header starts with `application/json`. #### Example 1 - Basic GET Request ```js import { createServer } from 'http' import { Client } from 'undici' import { once } from 'events' const server = createServer((request, response) => { response.end('Hello, World!') }).listen() await once(server, 'listening') const client = new Client(`http://localhost:${server.address().port}`) try { const { body, headers, statusCode, trailers } = await client.request({ path: '/', method: 'GET' }) console.log(`response received ${statusCode}`) console.log('headers', headers) body.setEncoding('utf8') body.on('data', console.log) body.on('end', () => { console.log('trailers', trailers) }) client.close() server.close() } catch (error) { console.error(error) } ``` #### Example 2 - Aborting a request > Node.js v15+ is required to run this example ```js import { createServer } from 'http' import { Client } from 'undici' import { once } from 'events' const server = createServer((request, response) => { response.end('Hello, World!') }).listen() await once(server, 'listening') const client = new Client(`http://localhost:${server.address().port}`) const abortController = new AbortController() try { client.request({ path: '/', method: 'GET', signal: abortController.signal }) } catch (error) { console.error(error) // should print an RequestAbortedError client.close() server.close() } abortController.abort() ``` Alternatively, any `EventEmitter` that emits an `'abort'` event may be used as an abort controller: ```js import { createServer } from 'http' import { Client } from 'undici' import EventEmitter, { once } from 'events' const server = createServer((request, response) => { response.end('Hello, World!') }).listen() await once(server, 'listening') const client = new Client(`http://localhost:${server.address().port}`) const ee = new EventEmitter() try { client.request({ path: '/', method: 'GET', signal: ee }) } catch (error) { console.error(error) // should print an RequestAbortedError client.close() server.close() } ee.emit('abort') ``` Destroying the request or response body will have the same effect. ```js import { createServer } from 'http' import { Client } from 'undici' import { once } from 'events' const server = createServer((request, response) => { response.end('Hello, World!') }).listen() await once(server, 'listening') const client = new Client(`http://localhost:${server.address().port}`) try { const { body } = await client.request({ path: '/', method: 'GET' }) body.destroy() } catch (error) { console.error(error) // should print an RequestAbortedError client.close() server.close() } ``` ### `Dispatcher.stream(options, factory[, callback])` A faster version of `Dispatcher.request`. This method expects the second argument `factory` to return a [`stream.Writable`](https://nodejs.org/api/stream.html#stream_class_stream_writable) stream which the response will be written to. This improves performance by avoiding creating an intermediate [`stream.Readable`](https://nodejs.org/api/stream.html#stream_readable_streams) stream when the user expects to directly pipe the response body to a [`stream.Writable`](https://nodejs.org/api/stream.html#stream_class_stream_writable) stream. As demonstrated in [Example 1 - Basic GET stream request](#example-1---basic-get-stream-request), it is recommended to use the `option.opaque` property to avoid creating a closure for the `factory` method. This pattern works well with Node.js Web Frameworks such as [Fastify](https://fastify.io). See [Example 2 - Stream to Fastify Response](#example-2---stream-to-fastify-response) for more details. Arguments: * **options** `RequestOptions` * **factory** `(data: StreamFactoryData) => stream.Writable` * **callback** `(error: Error | null, data: StreamData) => void` (optional) Returns: `void | Promise<StreamData>` - Only returns a `Promise` if no `callback` argument was passed #### Parameter: `StreamFactoryData` * **statusCode** `number` * **headers** `Record<string, string | string[] | undefined>` * **opaque** `unknown` * **onInfo** `({statusCode: number, headers: Record<string, string | string[]>}) => void | null` (optional) - Default: `null` - Callback collecting all the info headers (HTTP 100-199) received. #### Parameter: `StreamData` * **opaque** `unknown` * **trailers** `Record<string, string>` * **context** `object` #### Example 1 - Basic GET stream request ```js import { createServer } from 'http' import { Client } from 'undici' import { once } from 'events' import { Writable } from 'stream' const server = createServer((request, response) => { response.end('Hello, World!') }).listen() await once(server, 'listening') const client = new Client(`http://localhost:${server.address().port}`) const bufs = [] try { await client.stream({ path: '/', method: 'GET', opaque: { bufs } }, ({ statusCode, headers, opaque: { bufs } }) => { console.log(`response received ${statusCode}`) console.log('headers', headers) return new Writable({ write (chunk, encoding, callback) { bufs.push(chunk) callback() } }) }) console.log(Buffer.concat(bufs).toString('utf-8')) client.close() server.close() } catch (error) { console.error(error) } ``` #### Example 2 - Stream to Fastify Response In this example, a (fake) request is made to the fastify server using `fastify.inject()`. This request then executes the fastify route handler which makes a subsequent request to the raw Node.js http server using `undici.dispatcher.stream()`. The fastify response is passed to the `opaque` option so that undici can tap into the underlying writable stream using `response.raw`. This methodology demonstrates how one could use undici and fastify together to create fast-as-possible requests from one backend server to another. ```js import { createServer } from 'http' import { Client } from 'undici' import { once } from 'events' import fastify from 'fastify' const nodeServer = createServer((request, response) => { response.end('Hello, World! From Node.js HTTP Server') }).listen() await once(nodeServer, 'listening') console.log('Node Server listening') const nodeServerUndiciClient = new Client(`http://localhost:${nodeServer.address().port}`) const fastifyServer = fastify() fastifyServer.route({ url: '/', method: 'GET', handler: (request, response) => { nodeServerUndiciClient.stream({ path: '/', method: 'GET', opaque: response }, ({ opaque }) => opaque.raw) } }) await fastifyServer.listen() console.log('Fastify Server listening') const fastifyServerUndiciClient = new Client(`http://localhost:${fastifyServer.server.address().port}`) try { const { statusCode, body } = await fastifyServerUndiciClient.request({ path: '/', method: 'GET' }) console.log(`response received ${statusCode}`) body.setEncoding('utf8') body.on('data', console.log) nodeServerUndiciClient.close() fastifyServerUndiciClient.close() fastifyServer.close() nodeServer.close() } catch (error) { } ``` ### `Dispatcher.upgrade(options[, callback])` Upgrade to a different protocol. Visit [MDN - HTTP - Protocol upgrade mechanism](https://developer.mozilla.org/en-US/docs/Web/HTTP/Protocol_upgrade_mechanism) for more details. Arguments: * **options** `UpgradeOptions` * **callback** `(error: Error | null, data: UpgradeData) => void` (optional) Returns: `void | Promise<UpgradeData>` - Only returns a `Promise` if no `callback` argument was passed #### Parameter: `UpgradeOptions` * **path** `string` * **method** `string` (optional) - Default: `'GET'` * **headers** `UndiciHeaders` (optional) - Default: `null` * **protocol** `string` (optional) - Default: `'Websocket'` - A string of comma separated protocols, in descending preference order. * **signal** `AbortSignal | EventEmitter | null` (optional) - Default: `null` #### Parameter: `UpgradeData` * **headers** `http.IncomingHeaders` * **socket** `stream.Duplex` * **opaque** `unknown` #### Example 1 - Basic Upgrade Request ```js import { createServer } from 'http' import { Client } from 'undici' import { once } from 'events' const server = createServer((request, response) => { response.statusCode = 101 response.setHeader('connection', 'upgrade') response.setHeader('upgrade', request.headers.upgrade) response.end() }).listen() await once(server, 'listening') const client = new Client(`http://localhost:${server.address().port}`) try { const { headers, socket } = await client.upgrade({ path: '/', }) socket.on('end', () => { console.log(`upgrade: ${headers.upgrade}`) // upgrade: Websocket client.close() server.close() }) socket.end() } catch (error) { console.error(error) client.close() server.close() } ``` ### `Dispatcher.compose(interceptors[, interceptor])` Compose a new dispatcher from the current dispatcher and the given interceptors. > _Notes_: > - The order of the interceptors matters. The first interceptor will be the first to be called. > - It is important to note that the `interceptor` function should return a function that follows the `Dispatcher.dispatch` signature. > - Any fork of the chain of `interceptors` can lead to unexpected results. Arguments: * **interceptors** `Interceptor[interceptor[]]`: It is an array of `Interceptor` functions passed as only argument, or several interceptors passed as separate arguments. Returns: `Dispatcher`. #### Parameter: `Interceptor` A function that takes a `dispatch` method and returns a `dispatch`-like function. #### Example 1 - Basic Compose ```js const { Client, RedirectHandler } = require('undici') const redirectInterceptor = dispatch => { return (opts, handler) => { const { maxRedirections } = opts if (!maxRedirections) { return dispatch(opts, handler) } const redirectHandler = new RedirectHandler( dispatch, maxRedirections, opts, handler ) opts = { ...opts, maxRedirections: 0 } // Stop sub dispatcher from also redirecting. return dispatch(opts, redirectHandler) } } const client = new Client('http://localhost:3000') .compose(redirectInterceptor) await client.request({ path: '/', method: 'GET' }) ``` #### Example 2 - Chained Compose ```js const { Client, RedirectHandler, RetryHandler } = require('undici') const redirectInterceptor = dispatch => { return (opts, handler) => { const { maxRedirections } = opts if (!maxRedirections) { return dispatch(opts, handler) } const redirectHandler = new RedirectHandler( dispatch, maxRedirections, opts, handler ) opts = { ...opts, maxRedirections: 0 } return dispatch(opts, redirectHandler) } } const retryInterceptor = dispatch => { return function retryInterceptor (opts, handler) { return dispatch( opts, new RetryHandler(opts, { handler, dispatch }) ) } } const client = new Client('http://localhost:3000') .compose(redirectInterceptor) .compose(retryInterceptor) await client.request({ path: '/', method: 'GET' }) ``` #### Pre-built interceptors ##### `redirect` The `redirect` interceptor allows you to customize the way your dispatcher handles redirects. It accepts the same arguments as the [`RedirectHandler` constructor](./RedirectHandler.md). **Example - Basic Redirect Interceptor** ```js const { Client, interceptors } = require("undici"); const { redirect } = interceptors; const client = new Client("http://example.com").compose( redirect({ maxRedirections: 3, throwOnMaxRedirects: true }) ); client.request({ path: "/" }) ``` ##### `retry` The `retry` interceptor allows you to customize the way your dispatcher handles retries. It accepts the same arguments as the [`RetryHandler` constructor](./RetryHandler.md). **Example - Basic Redirect Interceptor** ```js const { Client, interceptors } = require("undici"); const { retry } = interceptors; const client = new Client("http://example.com").compose( retry({ maxRetries: 3, minTimeout: 1000, maxTimeout: 10000, timeoutFactor: 2, retryAfter: true, }) ); ``` ##### `dump` The `dump` interceptor enables you to dump the response body from a request upon a given limit. **Options** - `maxSize` - The maximum size (in bytes) of the response body to dump. If the size of the request's body exceeds this value then the connection will be closed. Default: `1048576`. > The `Dispatcher#options` also gets extended with the options `dumpMaxSize`, `abortOnDumped`, and `waitForTrailers` which can be used to configure the interceptor at a request-per-request basis. **Example - Basic Dump Interceptor** ```js const { Client, interceptors } = require("undici"); const { dump } = interceptors; const client = new Client("http://example.com").compose( dump({ maxSize: 1024, }) ); // or client.dispatch( { path: "/", method: "GET", dumpMaxSize: 1024, }, handler ); ``` ##### `dns` The `dns` interceptor enables you to cache DNS lookups for a given duration, per origin. >It is well suited for scenarios where you want to cache DNS lookups to avoid the overhead of resolving the same domain multiple times **Options** - `maxTTL` - The maximum time-to-live (in milliseconds) of the DNS cache. It should be a positive integer. Default: `10000`. - Set `0` to disable TTL. - `maxItems` - The maximum number of items to cache. It should be a positive integer. Default: `Infinity`. - `dualStack` - Whether to resolve both IPv4 and IPv6 addresses. Default: `true`. - It will also attempt a happy-eyeballs-like approach to connect to the available addresses in case of a connection failure. - `affinity` - Whether to use IPv4 or IPv6 addresses. Default: `4`. - It can be either `'4` or `6`. - It will only take effect if `dualStack` is `false`. - `lookup: (hostname: string, options: LookupOptions, callback: (err: NodeJS.ErrnoException | null, addresses: DNSInterceptorRecord[]) => void) => void` - Custom lookup function. Default: `dns.lookup`. - For more info see [dns.lookup](https://nodejs.org/api/dns.html#dns_dns_lookup_hostname_options_callback). - `pick: (origin: URL, records: DNSInterceptorRecords, affinity: 4 | 6) => DNSInterceptorRecord` - Custom pick function. Default: `RoundRobin`. - The function should return a single record from the records array. - By default a simplified version of Round Robin is used. - The `records` property can be mutated to store the state of the balancing algorithm. > The `Dispatcher#options` also gets extended with the options `dns.affinity`, `dns.dualStack`, `dns.lookup` and `dns.pick` which can be used to configure the interceptor at a request-per-request basis. **DNSInterceptorRecord** It represents a DNS record. - `family` - (`number`) The IP family of the address. It can be either `4` or `6`. - `address` - (`string`) The IP address. **DNSInterceptorOriginRecords** It represents a map of DNS IP addresses records for a single origin. - `4.ips` - (`DNSInterceptorRecord[] | null`) The IPv4 addresses. - `6.ips` - (`DNSInterceptorRecord[] | null`) The IPv6 addresses. **Example - Basic DNS Interceptor** ```js const { Client, interceptors } = require("undici"); const { dns } = interceptors; const client = new Agent().compose([ dns({ ...opts }) ]) const response = await client.request({ origin: `http://localhost:3030`, ...requestOpts }) ``` ##### `Response Error Interceptor` **Introduction** The Response Error Interceptor is designed to handle HTTP response errors efficiently. It intercepts responses and throws detailed errors for responses with status codes indicating failure (4xx, 5xx). This interceptor enhances error handling by providing structured error information, including response headers, data, and status codes. **ResponseError Class** The `ResponseError` class extends the `UndiciError` class and encapsulates detailed error information. It captures the response status code, headers, and data, providing a structured way to handle errors. **Definition** ```js class ResponseError extends UndiciError { constructor (message, code, { headers, data }) { super(message); this.name = 'ResponseError'; this.message = message || 'Response error'; this.code = 'UND_ERR_RESPONSE'; this.statusCode = code; this.data = data; this.headers = headers; } } ``` **Interceptor Handler** The interceptor's handler class extends `DecoratorHandler` and overrides methods to capture response details and handle errors based on the response status code. **Methods** - **onConnect**: Initializes response properties. - **onHeaders**: Captures headers and status code. Decodes body if content type is `application/json` or `text/plain`. - **onData**: Appends chunks to the body if status code indicates an error. - **onComplete**: Finalizes error handling, constructs a `ResponseError`, and invokes the `onError` method. - **onError**: Propagates errors to the handler. **Definition** ```js class Handler extends DecoratorHandler { // Private properties #handler; #statusCode; #contentType; #decoder; #headers; #body; constructor (opts, { handler }) { super(handler); this.#handler = handler; } onConnect (abort) { this.#statusCode = 0; this.#contentType = null; this.#decoder = null; this.#headers = null; this.#body = ''; return this.#handler.onConnect(abort); } onHeaders (statusCode, rawHeaders, resume, statusMessage, headers = parseHeaders(rawHeaders)) { this.#statusCode = statusCode; this.#headers = headers; this.#contentType = headers['content-type']; if (this.#statusCode < 400) { return this.#handler.onHeaders(statusCode, rawHeaders, resume, statusMessage, headers); } if (this.#contentType === 'application/json' || this.#contentType === 'text/plain') { this.#decoder = new TextDecoder('utf-8'); } } onData (chunk) { if (this.#statusCode < 400) { return this.#handler.onData(chunk); } this.#body += this.#decoder?.decode(chunk, { stream: true }) ?? ''; } onComplete (rawTrailers) { if (this.#statusCode >= 400) { this.#body += this.#decoder?.decode(undefined, { stream: false }) ?? ''; if (this.#contentType === 'application/json') { try { this.#body = JSON.parse(this.#body); } catch { // Do nothing... } } let err; const stackTraceLimit = Error.stackTraceLimit; Error.stackTraceLimit = 0; try { err = new ResponseError('Response Error', this.#statusCode, this.#headers, this.#body); } finally { Error.stackTraceLimit = stackTraceLimit; } this.#handler.onError(err); } else { this.#handler.onComplete(rawTrailers); } } onError (err) { this.#handler.onError(err); } } module.exports = (dispatch) => (opts, handler) => opts.throwOnError ? dispatch(opts, new Handler(opts, { handler })) : dispatch(opts, handler); ``` **Tests** Unit tests ensure the interceptor functions correctly, handling both error and non-error responses appropriately. **Example Tests** - **No Error if `throwOnError` is False**: ```js test('should not error if request is not meant to throw error', async (t) => { const opts = { throwOnError: false }; const handler = { onError: () => {}, onData: () => {}, onComplete: () => {} }; const interceptor = createResponseErrorInterceptor((opts, handler) => handler.onComplete()); assert.doesNotThrow(() => interceptor(opts, handler)); }); ``` - **Error if Status Code is in Specified Error Codes**: ```js test('should error if request status code is in the specified error codes', async (t) => { const opts = { throwOnError: true, statusCodes: [500] }; const response = { statusCode: 500 }; let capturedError; const handler = { onError: (err) => { capturedError = err; }, onData: () => {}, onComplete: () => {} }; const interceptor = createResponseErrorInterceptor((opts, handler) => { if (opts.throwOnError && opts.statusCodes.includes(response.statusCode)) { handler.onError(new Error('Response Error')); } else { handler.onComplete(); } }); interceptor({ ...opts, response }, handler); await new Promise(resolve => setImmediate(resolve)); assert(capturedError, 'Expected error to be captured but it was not.'); assert.strictEqual(capturedError.message, 'Response Error'); assert.strictEqual(response.statusCode, 500); }); ``` - **No Error if Status Code is Not in Specified Error Codes**: ```js test('should not error if request status code is not in the specified error codes', async (t) => { const opts = { throwOnError: true, statusCodes: [500] }; const response = { statusCode: 404 }; const handler = { onError: () => {}, onData: () => {}, onComplete: () => {} }; const interceptor = createResponseErrorInterceptor((opts, handler) => { if (opts.throwOnError && opts.statusCodes.includes(response.statusCode)) { handler.onError(new Error('Response Error')); } else { handler.onComplete(); } }); assert.doesNotThrow(() => interceptor({ ...opts, response }, handler)); }); ``` **Conclusion** The Response Error Interceptor provides a robust mechanism for handling HTTP response errors by capturing detailed error information and propagating it through a structured `ResponseError` class. This enhancement improves error handling and debugging capabilities in applications using the interceptor. ## Instance Events ### Event: `'connect'` Parameters: * **origin** `URL` * **targets** `Array<Dispatcher>` ### Event: `'disconnect'` Parameters: * **origin** `URL` * **targets** `Array<Dispatcher>` * **error** `Error` Emitted when the dispatcher has been disconnected from the origin. > **Note**: For HTTP/2, this event is also emitted when the dispatcher has received the [GOAWAY Frame](https://webconcepts.info/concepts/http2-frame-type/0x7) with an Error with the message `HTTP/2: "GOAWAY" frame received` and the code `UND_ERR_INFO`. > Due to nature of the protocol of using binary frames, it is possible that requests gets hanging as a frame can be received between the `HEADER` and `DATA` frames. > It is recommended to handle this event and close the dispatcher to create a new HTTP/2 session. ### Event: `'connectionError'` Parameters: * **origin** `URL` * **targets** `Array<Dispatcher>` * **error** `Error` Emitted when dispatcher fails to connect to origin. ### Event: `'drain'` Parameters: * **origin** `URL` Emitted when dispatcher is no longer busy. ## Parameter: `UndiciHeaders` * `Record<string, string | string[] | undefined> | string[] | Iterable<[string, string | string[] | undefined]> | null` Header arguments such as `options.headers` in [`Client.dispatch`](Client.md#clientdispatchoptions-handlers) can be specified in three forms: * As an object specified by the `Record<string, string | string[] | undefined>` (`IncomingHttpHeaders`) type. * As an array of strings. An array representation of a header list must have an even length, or an `InvalidArgumentError` will be thrown. * As an iterable that can encompass `Headers`, `Map`, or a custom iterator returning key-value pairs. Keys are lowercase and values are not modified. Response headers will derive a `host` from the `url` of the [Client](Client.md#class-client) instance if no `host` header was previously specified. ### Example 1 - Object ```js { 'content-length': '123', 'content-type': 'text/plain', connection: 'keep-alive', host: 'mysite.com', accept: '*/*' } ``` ### Example 2 - Array ```js [ 'content-length', '123', 'content-type', 'text/plain', 'connection', 'keep-alive', 'host', 'mysite.com', 'accept', '*/*' ] ``` ### Example 3 - Iterable ```js new Headers({ 'content-length': '123', 'content-type': 'text/plain', connection: 'keep-alive', host: 'mysite.com', accept: '*/*' }) ``` or ```js new Map([ ['content-length', '123'], ['content-type', 'text/plain'], ['connection', 'keep-alive'], ['host', 'mysite.com'], ['accept', '*/*'] ]) ``` or ```js { *[Symbol.iterator] () { yield ['content-length', '123'] yield ['content-type', 'text/plain'] yield ['connection', 'keep-alive'] yield ['host', 'mysite.com'] yield ['accept', '*/*'] } } ``` node_modules/undici/docs/docs/api/MockPool.md 0000664 00000037545 15114741631 0015215 0 ustar 00 # Class: MockPool Extends: `undici.Pool` A mock Pool class that implements the Pool API and is used by MockAgent to intercept real requests and return mocked responses. ## `new MockPool(origin, [options])` Arguments: * **origin** `string` - It should only include the **protocol, hostname, and port**. * **options** `MockPoolOptions` - It extends the `Pool` options. Returns: `MockPool` ### Parameter: `MockPoolOptions` Extends: `PoolOptions` * **agent** `Agent` - the agent to associate this MockPool with. ### Example - Basic MockPool instantiation We can use MockAgent to instantiate a MockPool ready to be used to intercept specified requests. It will not do anything until registered as the agent to use and any mock request are registered. ```js import { MockAgent } from 'undici' const mockAgent = new MockAgent() const mockPool = mockAgent.get('http://localhost:3000') ``` ## Instance Methods ### `MockPool.intercept(options)` This method defines the interception rules for matching against requests for a MockPool or MockPool. We can intercept multiple times on a single instance, but each intercept is only used once. For example if you expect to make 2 requests inside a test, you need to call `intercept()` twice. Assuming you use `disableNetConnect()` you will get `MockNotMatchedError` on the second request when you only call `intercept()` once. When defining interception rules, all the rules must pass for a request to be intercepted. If a request is not intercepted, a real request will be attempted. | Matcher type | Condition to pass | |:------------:| -------------------------- | | `string` | Exact match against string | | `RegExp` | Regex must pass | | `Function` | Function must return true | Arguments: * **options** `MockPoolInterceptOptions` - Interception options. Returns: `MockInterceptor` corresponding to the input options. ### Parameter: `MockPoolInterceptOptions` * **path** `string | RegExp | (path: string) => boolean` - a matcher for the HTTP request path. When a `RegExp` or callback is used, it will match against the request path including all query parameters in alphabetical order. When a `string` is provided, the query parameters can be conveniently specified through the `MockPoolInterceptOptions.query` setting. * **method** `string | RegExp | (method: string) => boolean` - (optional) - a matcher for the HTTP request method. Defaults to `GET`. * **body** `string | RegExp | (body: string) => boolean` - (optional) - a matcher for the HTTP request body. * **headers** `Record<string, string | RegExp | (body: string) => boolean`> - (optional) - a matcher for the HTTP request headers. To be intercepted, a request must match all defined headers. Extra headers not defined here may (or may not) be included in the request and do not affect the interception in any way. * **query** `Record<string, any> | null` - (optional) - a matcher for the HTTP request query string params. Only applies when a `string` was provided for `MockPoolInterceptOptions.path`. ### Return: `MockInterceptor` We can define the behaviour of an intercepted request with the following options. * **reply** `(statusCode: number, replyData: string | Buffer | object | MockInterceptor.MockResponseDataHandler, responseOptions?: MockResponseOptions) => MockScope` - define a reply for a matching request. You can define the replyData as a callback to read incoming request data. Default for `responseOptions` is `{}`. * **reply** `(callback: MockInterceptor.MockReplyOptionsCallback) => MockScope` - define a reply for a matching request, allowing dynamic mocking of all reply options rather than just the data. * **replyWithError** `(error: Error) => MockScope` - define an error for a matching request to throw. * **defaultReplyHeaders** `(headers: Record<string, string>) => MockInterceptor` - define default headers to be included in subsequent replies. These are in addition to headers on a specific reply. * **defaultReplyTrailers** `(trailers: Record<string, string>) => MockInterceptor` - define default trailers to be included in subsequent replies. These are in addition to trailers on a specific reply. * **replyContentLength** `() => MockInterceptor` - define automatically calculated `content-length` headers to be included in subsequent replies. The reply data of an intercepted request may either be a string, buffer, or JavaScript object. Objects are converted to JSON while strings and buffers are sent as-is. By default, `reply` and `replyWithError` define the behaviour for the first matching request only. Subsequent requests will not be affected (this can be changed using the returned `MockScope`). ### Parameter: `MockResponseOptions` * **headers** `Record<string, string>` - headers to be included on the mocked reply. * **trailers** `Record<string, string>` - trailers to be included on the mocked reply. ### Return: `MockScope` A `MockScope` is associated with a single `MockInterceptor`. With this, we can configure the default behaviour of a intercepted reply. * **delay** `(waitInMs: number) => MockScope` - delay the associated reply by a set amount in ms. * **persist** `() => MockScope` - any matching request will always reply with the defined response indefinitely. * **times** `(repeatTimes: number) => MockScope` - any matching request will reply with the defined response a fixed amount of times. This is overridden by **persist**. #### Example - Basic Mocked Request ```js import { MockAgent, setGlobalDispatcher, request } from 'undici' const mockAgent = new MockAgent() setGlobalDispatcher(mockAgent) // MockPool const mockPool = mockAgent.get('http://localhost:3000') mockPool.intercept({ path: '/foo' }).reply(200, 'foo') const { statusCode, body } = await request('http://localhost:3000/foo') console.log('response received', statusCode) // response received 200 for await (const data of body) { console.log('data', data.toString('utf8')) // data foo } ``` #### Example - Mocked request using reply data callbacks ```js import { MockAgent, setGlobalDispatcher, request } from 'undici' const mockAgent = new MockAgent() setGlobalDispatcher(mockAgent) const mockPool = mockAgent.get('http://localhost:3000') mockPool.intercept({ path: '/echo', method: 'GET', headers: { 'User-Agent': 'undici', Host: 'example.com' } }).reply(200, ({ headers }) => ({ message: headers.get('message') })) const { statusCode, body, headers } = await request('http://localhost:3000', { headers: { message: 'hello world!' } }) console.log('response received', statusCode) // response received 200 console.log('headers', headers) // { 'content-type': 'application/json' } for await (const data of body) { console.log('data', data.toString('utf8')) // { "message":"hello world!" } } ``` #### Example - Mocked request using reply options callback ```js import { MockAgent, setGlobalDispatcher, request } from 'undici' const mockAgent = new MockAgent() setGlobalDispatcher(mockAgent) const mockPool = mockAgent.get('http://localhost:3000') mockPool.intercept({ path: '/echo', method: 'GET', headers: { 'User-Agent': 'undici', Host: 'example.com' } }).reply(({ headers }) => ({ statusCode: 200, data: { message: headers.get('message') }}))) const { statusCode, body, headers } = await request('http://localhost:3000', { headers: { message: 'hello world!' } }) console.log('response received', statusCode) // response received 200 console.log('headers', headers) // { 'content-type': 'application/json' } for await (const data of body) { console.log('data', data.toString('utf8')) // { "message":"hello world!" } } ``` #### Example - Basic Mocked requests with multiple intercepts ```js import { MockAgent, setGlobalDispatcher, request } from 'undici' const mockAgent = new MockAgent() setGlobalDispatcher(mockAgent) const mockPool = mockAgent.get('http://localhost:3000') mockPool.intercept({ path: '/foo', method: 'GET' }).reply(200, 'foo') mockPool.intercept({ path: '/hello', method: 'GET', }).reply(200, 'hello') const result1 = await request('http://localhost:3000/foo') console.log('response received', result1.statusCode) // response received 200 for await (const data of result1.body) { console.log('data', data.toString('utf8')) // data foo } const result2 = await request('http://localhost:3000/hello') console.log('response received', result2.statusCode) // response received 200 for await (const data of result2.body) { console.log('data', data.toString('utf8')) // data hello } ``` #### Example - Mocked request with query body, request headers and response headers and trailers ```js import { MockAgent, setGlobalDispatcher, request } from 'undici' const mockAgent = new MockAgent() setGlobalDispatcher(mockAgent) const mockPool = mockAgent.get('http://localhost:3000') mockPool.intercept({ path: '/foo?hello=there&see=ya', method: 'POST', body: 'form1=data1&form2=data2', headers: { 'User-Agent': 'undici', Host: 'example.com' } }).reply(200, { foo: 'bar' }, { headers: { 'content-type': 'application/json' }, trailers: { 'Content-MD5': 'test' } }) const { statusCode, headers, trailers, body } = await request('http://localhost:3000/foo?hello=there&see=ya', { method: 'POST', body: 'form1=data1&form2=data2', headers: { foo: 'bar', 'User-Agent': 'undici', Host: 'example.com' } }) console.log('response received', statusCode) // response received 200 console.log('headers', headers) // { 'content-type': 'application/json' } for await (const data of body) { console.log('data', data.toString('utf8')) // '{"foo":"bar"}' } console.log('trailers', trailers) // { 'content-md5': 'test' } ``` #### Example - Mocked request using different matchers ```js import { MockAgent, setGlobalDispatcher, request } from 'undici' const mockAgent = new MockAgent() setGlobalDispatcher(mockAgent) const mockPool = mockAgent.get('http://localhost:3000') mockPool.intercept({ path: '/foo', method: /^GET$/, body: (value) => value === 'form=data', headers: { 'User-Agent': 'undici', Host: /^example.com$/ } }).reply(200, 'foo') const { statusCode, body } = await request('http://localhost:3000/foo', { method: 'GET', body: 'form=data', headers: { foo: 'bar', 'User-Agent': 'undici', Host: 'example.com' } }) console.log('response received', statusCode) // response received 200 for await (const data of body) { console.log('data', data.toString('utf8')) // data foo } ``` #### Example - Mocked request with reply with a defined error ```js import { MockAgent, setGlobalDispatcher, request } from 'undici' const mockAgent = new MockAgent() setGlobalDispatcher(mockAgent) const mockPool = mockAgent.get('http://localhost:3000') mockPool.intercept({ path: '/foo', method: 'GET' }).replyWithError(new Error('kaboom')) try { await request('http://localhost:3000/foo', { method: 'GET' }) } catch (error) { console.error(error) // Error: kaboom } ``` #### Example - Mocked request with defaultReplyHeaders ```js import { MockAgent, setGlobalDispatcher, request } from 'undici' const mockAgent = new MockAgent() setGlobalDispatcher(mockAgent) const mockPool = mockAgent.get('http://localhost:3000') mockPool.intercept({ path: '/foo', method: 'GET' }).defaultReplyHeaders({ foo: 'bar' }) .reply(200, 'foo') const { headers } = await request('http://localhost:3000/foo') console.log('headers', headers) // headers { foo: 'bar' } ``` #### Example - Mocked request with defaultReplyTrailers ```js import { MockAgent, setGlobalDispatcher, request } from 'undici' const mockAgent = new MockAgent() setGlobalDispatcher(mockAgent) const mockPool = mockAgent.get('http://localhost:3000') mockPool.intercept({ path: '/foo', method: 'GET' }).defaultReplyTrailers({ foo: 'bar' }) .reply(200, 'foo') const { trailers } = await request('http://localhost:3000/foo') console.log('trailers', trailers) // trailers { foo: 'bar' } ``` #### Example - Mocked request with automatic content-length calculation ```js import { MockAgent, setGlobalDispatcher, request } from 'undici' const mockAgent = new MockAgent() setGlobalDispatcher(mockAgent) const mockPool = mockAgent.get('http://localhost:3000') mockPool.intercept({ path: '/foo', method: 'GET' }).replyContentLength().reply(200, 'foo') const { headers } = await request('http://localhost:3000/foo') console.log('headers', headers) // headers { 'content-length': '3' } ``` #### Example - Mocked request with automatic content-length calculation on an object ```js import { MockAgent, setGlobalDispatcher, request } from 'undici' const mockAgent = new MockAgent() setGlobalDispatcher(mockAgent) const mockPool = mockAgent.get('http://localhost:3000') mockPool.intercept({ path: '/foo', method: 'GET' }).replyContentLength().reply(200, { foo: 'bar' }) const { headers } = await request('http://localhost:3000/foo') console.log('headers', headers) // headers { 'content-length': '13' } ``` #### Example - Mocked request with persist enabled ```js import { MockAgent, setGlobalDispatcher, request } from 'undici' const mockAgent = new MockAgent() setGlobalDispatcher(mockAgent) const mockPool = mockAgent.get('http://localhost:3000') mockPool.intercept({ path: '/foo', method: 'GET' }).reply(200, 'foo').persist() const result1 = await request('http://localhost:3000/foo') // Will match and return mocked data const result2 = await request('http://localhost:3000/foo') // Will match and return mocked data // Etc ``` #### Example - Mocked request with times enabled ```js import { MockAgent, setGlobalDispatcher, request } from 'undici' const mockAgent = new MockAgent() setGlobalDispatcher(mockAgent) const mockPool = mockAgent.get('http://localhost:3000') mockPool.intercept({ path: '/foo', method: 'GET' }).reply(200, 'foo').times(2) const result1 = await request('http://localhost:3000/foo') // Will match and return mocked data const result2 = await request('http://localhost:3000/foo') // Will match and return mocked data const result3 = await request('http://localhost:3000/foo') // Will not match and make attempt a real request ``` #### Example - Mocked request with path callback ```js import { MockAgent, setGlobalDispatcher, request } from 'undici' import querystring from 'querystring' const mockAgent = new MockAgent() setGlobalDispatcher(mockAgent) const mockPool = mockAgent.get('http://localhost:3000') const matchPath = requestPath => { const [pathname, search] = requestPath.split('?') const requestQuery = querystring.parse(search) if (!pathname.startsWith('/foo')) { return false } if (!Object.keys(requestQuery).includes('foo') || requestQuery.foo !== 'bar') { return false } return true } mockPool.intercept({ path: matchPath, method: 'GET' }).reply(200, 'foo') const result = await request('http://localhost:3000/foo?foo=bar') // Will match and return mocked data ``` ### `MockPool.close()` Closes the mock pool and de-registers from associated MockAgent. Returns: `Promise<void>` #### Example - clean up after tests are complete ```js import { MockAgent } from 'undici' const mockAgent = new MockAgent() const mockPool = mockAgent.get('http://localhost:3000') await mockPool.close() ``` ### `MockPool.dispatch(options, handlers)` Implements [`Dispatcher.dispatch(options, handlers)`](Dispatcher.md#dispatcherdispatchoptions-handler). ### `MockPool.request(options[, callback])` See [`Dispatcher.request(options [, callback])`](Dispatcher.md#dispatcherrequestoptions-callback). #### Example - MockPool request ```js import { MockAgent } from 'undici' const mockAgent = new MockAgent() const mockPool = mockAgent.get('http://localhost:3000') mockPool.intercept({ path: '/foo', method: 'GET', }).reply(200, 'foo') const { statusCode, body } = await mockPool.request({ origin: 'http://localhost:3000', path: '/foo', method: 'GET' }) console.log('response received', statusCode) // response received 200 for await (const data of body) { console.log('data', data.toString('utf8')) // data foo } ``` node_modules/undici/docs/docs/api/RetryAgent.md 0000664 00000003737 15114741631 0015552 0 ustar 00 # Class: RetryAgent Extends: `undici.Dispatcher` A `undici.Dispatcher` that allows to automatically retry a request. Wraps a `undici.RetryHandler`. ## `new RetryAgent(dispatcher, [options])` Arguments: * **dispatcher** `undici.Dispatcher` (required) - the dispatcher to wrap * **options** `RetryHandlerOptions` (optional) - the options Returns: `ProxyAgent` ### Parameter: `RetryHandlerOptions` - **retry** `(err: Error, context: RetryContext, callback: (err?: Error | null) => void) => void` (optional) - Function to be called after every retry. It should pass error if no more retries should be performed. - **maxRetries** `number` (optional) - Maximum number of retries. Default: `5` - **maxTimeout** `number` (optional) - Maximum number of milliseconds to wait before retrying. Default: `30000` (30 seconds) - **minTimeout** `number` (optional) - Minimum number of milliseconds to wait before retrying. Default: `500` (half a second) - **timeoutFactor** `number` (optional) - Factor to multiply the timeout by for each retry attempt. Default: `2` - **retryAfter** `boolean` (optional) - It enables automatic retry after the `Retry-After` header is received. Default: `true` - - **methods** `string[]` (optional) - Array of HTTP methods to retry. Default: `['GET', 'PUT', 'HEAD', 'OPTIONS', 'DELETE']` - **statusCodes** `number[]` (optional) - Array of HTTP status codes to retry. Default: `[429, 500, 502, 503, 504]` - **errorCodes** `string[]` (optional) - Array of Error codes to retry. Default: `['ECONNRESET', 'ECONNREFUSED', 'ENOTFOUND', 'ENETDOWN','ENETUNREACH', 'EHOSTDOWN', 'UND_ERR_SOCKET']` **`RetryContext`** - `state`: `RetryState` - Current retry state. It can be mutated. - `opts`: `Dispatch.DispatchOptions & RetryOptions` - Options passed to the retry handler. Example: ```js import { Agent, RetryAgent } from 'undici' const agent = new RetryAgent(new Agent()) const res = await agent.request('http://example.com') console.log(res.statuCode) console.log(await res.body.text()) ``` node_modules/undici/docs/docs/api/RedirectHandler.md 0000664 00000006206 15114741631 0016517 0 ustar 00 # Class: RedirectHandler A class that handles redirection logic for HTTP requests. ## `new RedirectHandler(dispatch, maxRedirections, opts, handler, redirectionLimitReached)` Arguments: - **dispatch** `function` - The dispatch function to be called after every retry. - **maxRedirections** `number` - Maximum number of redirections allowed. - **opts** `object` - Options for handling redirection. - **handler** `object` - An object containing handlers for different stages of the request lifecycle. - **redirectionLimitReached** `boolean` (default: `false`) - A flag that the implementer can provide to enable or disable the feature. If set to `false`, it indicates that the caller doesn't want to use the feature and prefers the old behavior. Returns: `RedirectHandler` ### Parameters - **dispatch** `(options: Dispatch.DispatchOptions, handlers: Dispatch.DispatchHandlers) => Promise<Dispatch.DispatchResponse>` (required) - Dispatch function to be called after every redirection. - **maxRedirections** `number` (required) - Maximum number of redirections allowed. - **opts** `object` (required) - Options for handling redirection. - **handler** `object` (required) - Handlers for different stages of the request lifecycle. - **redirectionLimitReached** `boolean` (default: `false`) - A flag that the implementer can provide to enable or disable the feature. If set to `false`, it indicates that the caller doesn't want to use the feature and prefers the old behavior. ### Properties - **location** `string` - The current redirection location. - **abort** `function` - The abort function. - **opts** `object` - The options for handling redirection. - **maxRedirections** `number` - Maximum number of redirections allowed. - **handler** `object` - Handlers for different stages of the request lifecycle. - **history** `Array` - An array representing the history of URLs during redirection. - **redirectionLimitReached** `boolean` - Indicates whether the redirection limit has been reached. ### Methods #### `onConnect(abort)` Called when the connection is established. Parameters: - **abort** `function` - The abort function. #### `onUpgrade(statusCode, headers, socket)` Called when an upgrade is requested. Parameters: - **statusCode** `number` - The HTTP status code. - **headers** `object` - The headers received in the response. - **socket** `object` - The socket object. #### `onError(error)` Called when an error occurs. Parameters: - **error** `Error` - The error that occurred. #### `onHeaders(statusCode, headers, resume, statusText)` Called when headers are received. Parameters: - **statusCode** `number` - The HTTP status code. - **headers** `object` - The headers received in the response. - **resume** `function` - The resume function. - **statusText** `string` - The status text. #### `onData(chunk)` Called when data is received. Parameters: - **chunk** `Buffer` - The data chunk received. #### `onComplete(trailers)` Called when the request is complete. Parameters: - **trailers** `object` - The trailers received. #### `onBodySent(chunk)` Called when the request body is sent. Parameters: - **chunk** `Buffer` - The chunk of the request body sent. node_modules/undici/docs/docs/api/ProxyAgent.md 0000664 00000010413 15114741631 0015553 0 ustar 00 # Class: ProxyAgent Extends: `undici.Dispatcher` A Proxy Agent class that implements the Agent API. It allows the connection through proxy in a simple way. ## `new ProxyAgent([options])` Arguments: * **options** `ProxyAgentOptions` (required) - It extends the `Agent` options. Returns: `ProxyAgent` ### Parameter: `ProxyAgentOptions` Extends: [`AgentOptions`](Agent.md#parameter-agentoptions) * **uri** `string | URL` (required) - The URI of the proxy server. This can be provided as a string, as an instance of the URL class, or as an object with a `uri` property of type string. If the `uri` is provided as a string or `uri` is an object with an `uri` property of type string, then it will be parsed into a `URL` object according to the [WHATWG URL Specification](https://url.spec.whatwg.org). For detailed information on the parsing process and potential validation errors, please refer to the ["Writing" section](https://url.spec.whatwg.org/#writing) of the WHATWG URL Specification. * **token** `string` (optional) - It can be passed by a string of token for authentication. * **auth** `string` (**deprecated**) - Use token. * **clientFactory** `(origin: URL, opts: Object) => Dispatcher` (optional) - Default: `(origin, opts) => new Pool(origin, opts)` * **requestTls** `BuildOptions` (optional) - Options object passed when creating the underlying socket via the connector builder for the request. See [TLS](https://nodejs.org/api/tls.html#tlsconnectoptions-callback). * **proxyTls** `BuildOptions` (optional) - Options object passed when creating the underlying socket via the connector builder for the proxy server. See [TLS](https://nodejs.org/api/tls.html#tlsconnectoptions-callback). Examples: ```js import { ProxyAgent } from 'undici' const proxyAgent = new ProxyAgent('my.proxy.server') // or const proxyAgent = new ProxyAgent(new URL('my.proxy.server')) // or const proxyAgent = new ProxyAgent({ uri: 'my.proxy.server' }) ``` #### Example - Basic ProxyAgent instantiation This will instantiate the ProxyAgent. It will not do anything until registered as the agent to use with requests. ```js import { ProxyAgent } from 'undici' const proxyAgent = new ProxyAgent('my.proxy.server') ``` #### Example - Basic Proxy Request with global agent dispatcher ```js import { setGlobalDispatcher, request, ProxyAgent } from 'undici' const proxyAgent = new ProxyAgent('my.proxy.server') setGlobalDispatcher(proxyAgent) const { statusCode, body } = await request('http://localhost:3000/foo') console.log('response received', statusCode) // response received 200 for await (const data of body) { console.log('data', data.toString('utf8')) // data foo } ``` #### Example - Basic Proxy Request with local agent dispatcher ```js import { ProxyAgent, request } from 'undici' const proxyAgent = new ProxyAgent('my.proxy.server') const { statusCode, body } = await request('http://localhost:3000/foo', { dispatcher: proxyAgent }) console.log('response received', statusCode) // response received 200 for await (const data of body) { console.log('data', data.toString('utf8')) // data foo } ``` #### Example - Basic Proxy Request with authentication ```js import { setGlobalDispatcher, request, ProxyAgent } from 'undici'; const proxyAgent = new ProxyAgent({ uri: 'my.proxy.server', // token: 'Bearer xxxx' token: `Basic ${Buffer.from('username:password').toString('base64')}` }); setGlobalDispatcher(proxyAgent); const { statusCode, body } = await request('http://localhost:3000/foo'); console.log('response received', statusCode); // response received 200 for await (const data of body) { console.log('data', data.toString('utf8')); // data foo } ``` ### `ProxyAgent.close()` Closes the proxy agent and waits for registered pools and clients to also close before resolving. Returns: `Promise<void>` #### Example - clean up after tests are complete ```js import { ProxyAgent, setGlobalDispatcher } from 'undici' const proxyAgent = new ProxyAgent('my.proxy.server') setGlobalDispatcher(proxyAgent) await proxyAgent.close() ``` ### `ProxyAgent.dispatch(options, handlers)` Implements [`Agent.dispatch(options, handlers)`](Agent.md#parameter-agentdispatchoptions). ### `ProxyAgent.request(options[, callback])` See [`Dispatcher.request(options [, callback])`](Dispatcher.md#dispatcherrequestoptions-callback). node_modules/undici/docs/docs/api/Fetch.md 0000664 00000004114 15114741631 0014505 0 ustar 00 # Fetch Undici exposes a fetch() method starts the process of fetching a resource from the network. Documentation and examples can be found on [MDN](https://developer.mozilla.org/en-US/docs/Web/API/fetch). ## FormData This API is implemented as per the standard, you can find documentation on [MDN](https://developer.mozilla.org/en-US/docs/Web/API/FormData). If any parameters are passed to the FormData constructor other than `undefined`, an error will be thrown. Other parameters are ignored. ## Response This API is implemented as per the standard, you can find documentation on [MDN](https://developer.mozilla.org/en-US/docs/Web/API/Response) ## Request This API is implemented as per the standard, you can find documentation on [MDN](https://developer.mozilla.org/en-US/docs/Web/API/Request) ## Header This API is implemented as per the standard, you can find documentation on [MDN](https://developer.mozilla.org/en-US/docs/Web/API/Headers) # Body Mixins `Response` and `Request` body inherit body mixin methods. These methods include: - [`.arrayBuffer()`](https://fetch.spec.whatwg.org/#dom-body-arraybuffer) - [`.blob()`](https://fetch.spec.whatwg.org/#dom-body-blob) - [`.bytes()`](https://fetch.spec.whatwg.org/#dom-body-bytes) - [`.formData()`](https://fetch.spec.whatwg.org/#dom-body-formdata) - [`.json()`](https://fetch.spec.whatwg.org/#dom-body-json) - [`.text()`](https://fetch.spec.whatwg.org/#dom-body-text) There is an ongoing discussion regarding `.formData()` and its usefulness and performance in server environments. It is recommended to use a dedicated library for parsing `multipart/form-data` bodies, such as [Busboy](https://www.npmjs.com/package/busboy) or [@fastify/busboy](https://www.npmjs.com/package/@fastify/busboy). These libraries can be interfaced with fetch with the following example code: ```mjs import { Busboy } from '@fastify/busboy' import { Readable } from 'node:stream' const response = await fetch('...') const busboy = new Busboy({ headers: { 'content-type': response.headers.get('content-type') } }) Readable.fromWeb(response.body).pipe(busboy) ``` node_modules/undici/docs/docs/api/Connector.md 0000664 00000006610 15114741631 0015411 0 ustar 00 # Connector Undici creates the underlying socket via the connector builder. Normally, this happens automatically and you don't need to care about this, but if you need to perform some additional check over the currently used socket, this is the right place. If you want to create a custom connector, you must import the `buildConnector` utility. #### Parameter: `buildConnector.BuildOptions` Every Tls option, see [here](https://nodejs.org/api/tls.html#tls_tls_connect_options_callback). Furthermore, the following options can be passed: * **socketPath** `string | null` (optional) - Default: `null` - An IPC endpoint, either Unix domain socket or Windows named pipe. * **maxCachedSessions** `number | null` (optional) - Default: `100` - Maximum number of TLS cached sessions. Use 0 to disable TLS session caching. Default: `100`. * **timeout** `number | null` (optional) - In milliseconds. Default `10e3`. * **servername** `string | null` (optional) Once you call `buildConnector`, it will return a connector function, which takes the following parameters. #### Parameter: `connector.Options` * **hostname** `string` (required) * **host** `string` (optional) * **protocol** `string` (required) * **port** `string` (required) * **servername** `string` (optional) * **localAddress** `string | null` (optional) Local address the socket should connect from. * **httpSocket** `Socket` (optional) Establish secure connection on a given socket rather than creating a new socket. It can only be sent on TLS update. ### Basic example ```js 'use strict' import { Client, buildConnector } from 'undici' const connector = buildConnector({ rejectUnauthorized: false }) const client = new Client('https://localhost:3000', { connect (opts, cb) { connector(opts, (err, socket) => { if (err) { cb(err) } else if (/* assertion */) { socket.destroy() cb(new Error('kaboom')) } else { cb(null, socket) } }) } }) ``` ### Example: validate the CA fingerprint ```js 'use strict' import { Client, buildConnector } from 'undici' const caFingerprint = 'FO:OB:AR' const connector = buildConnector({ rejectUnauthorized: false }) const client = new Client('https://localhost:3000', { connect (opts, cb) { connector(opts, (err, socket) => { if (err) { cb(err) } else if (getIssuerCertificate(socket).fingerprint256 !== caFingerprint) { socket.destroy() cb(new Error('Fingerprint does not match or malformed certificate')) } else { cb(null, socket) } }) } }) client.request({ path: '/', method: 'GET' }, (err, data) => { if (err) throw err const bufs = [] data.body.on('data', (buf) => { bufs.push(buf) }) data.body.on('end', () => { console.log(Buffer.concat(bufs).toString('utf8')) client.close() }) }) function getIssuerCertificate (socket) { let certificate = socket.getPeerCertificate(true) while (certificate && Object.keys(certificate).length > 0) { // invalid certificate if (certificate.issuerCertificate == null) { return null } // We have reached the root certificate. // In case of self-signed certificates, `issuerCertificate` may be a circular reference. if (certificate.fingerprint256 === certificate.issuerCertificate.fingerprint256) { break } // continue the loop certificate = certificate.issuerCertificate } return certificate } ``` node_modules/undici/docs/docs/api/Agent.md 0000664 00000005355 15114741631 0014522 0 ustar 00 # Agent Extends: `undici.Dispatcher` Agent allow dispatching requests against multiple different origins. Requests are not guaranteed to be dispatched in order of invocation. ## `new undici.Agent([options])` Arguments: * **options** `AgentOptions` (optional) Returns: `Agent` ### Parameter: `AgentOptions` Extends: [`PoolOptions`](Pool.md#parameter-pooloptions) * **factory** `(origin: URL, opts: Object) => Dispatcher` - Default: `(origin, opts) => new Pool(origin, opts)` * **maxRedirections** `Integer` - Default: `0`. The number of HTTP redirection to follow unless otherwise specified in `DispatchOptions`. * **interceptors** `{ Agent: DispatchInterceptor[] }` - Default: `[RedirectInterceptor]` - A list of interceptors that are applied to the dispatch method. Additional logic can be applied (such as, but not limited to: 302 status code handling, authentication, cookies, compression and caching). Note that the behavior of interceptors is Experimental and might change at any given time. ## Instance Properties ### `Agent.closed` Implements [Client.closed](Client.md#clientclosed) ### `Agent.destroyed` Implements [Client.destroyed](Client.md#clientdestroyed) ## Instance Methods ### `Agent.close([callback])` Implements [`Dispatcher.close([callback])`](Dispatcher.md#dispatcherclosecallback-promise). ### `Agent.destroy([error, callback])` Implements [`Dispatcher.destroy([error, callback])`](Dispatcher.md#dispatcherdestroyerror-callback-promise). ### `Agent.dispatch(options, handler: AgentDispatchOptions)` Implements [`Dispatcher.dispatch(options, handler)`](Dispatcher.md#dispatcherdispatchoptions-handler). #### Parameter: `AgentDispatchOptions` Extends: [`DispatchOptions`](Dispatcher.md#parameter-dispatchoptions) * **origin** `string | URL` * **maxRedirections** `Integer`. Implements [`Dispatcher.destroy([error, callback])`](Dispatcher.md#dispatcherdestroyerror-callback-promise). ### `Agent.connect(options[, callback])` See [`Dispatcher.connect(options[, callback])`](Dispatcher.md#dispatcherconnectoptions-callback). ### `Agent.dispatch(options, handler)` Implements [`Dispatcher.dispatch(options, handler)`](Dispatcher.md#dispatcherdispatchoptions-handler). ### `Agent.pipeline(options, handler)` See [`Dispatcher.pipeline(options, handler)`](Dispatcher.md#dispatcherpipelineoptions-handler). ### `Agent.request(options[, callback])` See [`Dispatcher.request(options [, callback])`](Dispatcher.md#dispatcherrequestoptions-callback). ### `Agent.stream(options, factory[, callback])` See [`Dispatcher.stream(options, factory[, callback])`](Dispatcher.md#dispatcherstreamoptions-factory-callback). ### `Agent.upgrade(options[, callback])` See [`Dispatcher.upgrade(options[, callback])`](Dispatcher.md#dispatcherupgradeoptions-callback). node_modules/undici/docs/docs/api/Client.md 0000664 00000025523 15114741631 0014701 0 ustar 00 # Class: Client Extends: `undici.Dispatcher` A basic HTTP/1.1 client, mapped on top a single TCP/TLS connection. Pipelining is disabled by default. Requests are not guaranteed to be dispatched in order of invocation. ## `new Client(url[, options])` Arguments: * **url** `URL | string` - Should only include the **protocol, hostname, and port**. * **options** `ClientOptions` (optional) Returns: `Client` ### Parameter: `ClientOptions` > ⚠️ Warning: The `H2` support is experimental. * **bodyTimeout** `number | null` (optional) - Default: `300e3` - The timeout after which a request will time out, in milliseconds. Monitors time between receiving body data. Use `0` to disable it entirely. Defaults to 300 seconds. Please note the `timeout` will be reset if you keep writing data to the scoket everytime. * **headersTimeout** `number | null` (optional) - Default: `300e3` - The amount of time, in milliseconds, the parser will wait to receive the complete HTTP headers while not sending the request. Defaults to 300 seconds. * **keepAliveMaxTimeout** `number | null` (optional) - Default: `600e3` - The maximum allowed `keepAliveTimeout`, in milliseconds, when overridden by *keep-alive* hints from the server. Defaults to 10 minutes. * **keepAliveTimeout** `number | null` (optional) - Default: `4e3` - The timeout, in milliseconds, after which a socket without active requests will time out. Monitors time between activity on a connected socket. This value may be overridden by *keep-alive* hints from the server. See [MDN: HTTP - Headers - Keep-Alive directives](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Keep-Alive#directives) for more details. Defaults to 4 seconds. * **keepAliveTimeoutThreshold** `number | null` (optional) - Default: `2e3` - A number of milliseconds subtracted from server *keep-alive* hints when overriding `keepAliveTimeout` to account for timing inaccuracies caused by e.g. transport latency. Defaults to 2 seconds. * **maxHeaderSize** `number | null` (optional) - Default: `--max-http-header-size` or `16384` - The maximum length of request headers in bytes. Defaults to Node.js' --max-http-header-size or 16KiB. * **maxResponseSize** `number | null` (optional) - Default: `-1` - The maximum length of response body in bytes. Set to `-1` to disable. * **pipelining** `number | null` (optional) - Default: `1` - The amount of concurrent requests to be sent over the single TCP/TLS connection according to [RFC7230](https://tools.ietf.org/html/rfc7230#section-6.3.2). Carefully consider your workload and environment before enabling concurrent requests as pipelining may reduce performance if used incorrectly. Pipelining is sensitive to network stack settings as well as head of line blocking caused by e.g. long running requests. Set to `0` to disable keep-alive connections. * **connect** `ConnectOptions | Function | null` (optional) - Default: `null`. * **strictContentLength** `Boolean` (optional) - Default: `true` - Whether to treat request content length mismatches as errors. If true, an error is thrown when the request content-length header doesn't match the length of the request body. <!-- TODO: Remove once we drop its support --> * **interceptors** `{ Client: DispatchInterceptor[] }` - Default: `[RedirectInterceptor]` - A list of interceptors that are applied to the dispatch method. Additional logic can be applied (such as, but not limited to: 302 status code handling, authentication, cookies, compression and caching). Note that the behavior of interceptors is Experimental and might change at any given time. **Note: this is deprecated in favor of [Dispatcher#compose](./Dispatcher.md#dispatcher). Support will be droped in next major.** * **autoSelectFamily**: `boolean` (optional) - Default: depends on local Node version, on Node 18.13.0 and above is `false`. Enables a family autodetection algorithm that loosely implements section 5 of [RFC 8305](https://tools.ietf.org/html/rfc8305#section-5). See [here](https://nodejs.org/api/net.html#socketconnectoptions-connectlistener) for more details. This option is ignored if not supported by the current Node version. * **autoSelectFamilyAttemptTimeout**: `number` - Default: depends on local Node version, on Node 18.13.0 and above is `250`. The amount of time in milliseconds to wait for a connection attempt to finish before trying the next address when using the `autoSelectFamily` option. See [here](https://nodejs.org/api/net.html#socketconnectoptions-connectlistener) for more details. * **allowH2**: `boolean` - Default: `false`. Enables support for H2 if the server has assigned bigger priority to it through ALPN negotiation. * **maxConcurrentStreams**: `number` - Default: `100`. Dictates the maximum number of concurrent streams for a single H2 session. It can be overridden by a SETTINGS remote frame. #### Parameter: `ConnectOptions` Every Tls option, see [here](https://nodejs.org/api/tls.html#tls_tls_connect_options_callback). Furthermore, the following options can be passed: * **socketPath** `string | null` (optional) - Default: `null` - An IPC endpoint, either Unix domain socket or Windows named pipe. * **maxCachedSessions** `number | null` (optional) - Default: `100` - Maximum number of TLS cached sessions. Use 0 to disable TLS session caching. Default: 100. * **timeout** `number | null` (optional) - In milliseconds, Default `10e3`. * **servername** `string | null` (optional) * **keepAlive** `boolean | null` (optional) - Default: `true` - TCP keep-alive enabled * **keepAliveInitialDelay** `number | null` (optional) - Default: `60000` - TCP keep-alive interval for the socket in milliseconds ### Example - Basic Client instantiation This will instantiate the undici Client, but it will not connect to the origin until something is queued. Consider using `client.connect` to prematurely connect to the origin, or just call `client.request`. ```js 'use strict' import { Client } from 'undici' const client = new Client('http://localhost:3000') ``` ### Example - Custom connector This will allow you to perform some additional check on the socket that will be used for the next request. ```js 'use strict' import { Client, buildConnector } from 'undici' const connector = buildConnector({ rejectUnauthorized: false }) const client = new Client('https://localhost:3000', { connect (opts, cb) { connector(opts, (err, socket) => { if (err) { cb(err) } else if (/* assertion */) { socket.destroy() cb(new Error('kaboom')) } else { cb(null, socket) } }) } }) ``` ## Instance Methods ### `Client.close([callback])` Implements [`Dispatcher.close([callback])`](Dispatcher.md#dispatcherclosecallback-promise). ### `Client.destroy([error, callback])` Implements [`Dispatcher.destroy([error, callback])`](Dispatcher.md#dispatcherdestroyerror-callback-promise). Waits until socket is closed before invoking the callback (or returning a promise if no callback is provided). ### `Client.connect(options[, callback])` See [`Dispatcher.connect(options[, callback])`](Dispatcher.md#dispatcherconnectoptions-callback). ### `Client.dispatch(options, handlers)` Implements [`Dispatcher.dispatch(options, handlers)`](Dispatcher.md#dispatcherdispatchoptions-handler). ### `Client.pipeline(options, handler)` See [`Dispatcher.pipeline(options, handler)`](Dispatcher.md#dispatcherpipelineoptions-handler). ### `Client.request(options[, callback])` See [`Dispatcher.request(options [, callback])`](Dispatcher.md#dispatcherrequestoptions-callback). ### `Client.stream(options, factory[, callback])` See [`Dispatcher.stream(options, factory[, callback])`](Dispatcher.md#dispatcherstreamoptions-factory-callback). ### `Client.upgrade(options[, callback])` See [`Dispatcher.upgrade(options[, callback])`](Dispatcher.md#dispatcherupgradeoptions-callback). ## Instance Properties ### `Client.closed` * `boolean` `true` after `client.close()` has been called. ### `Client.destroyed` * `boolean` `true` after `client.destroyed()` has been called or `client.close()` has been called and the client shutdown has completed. ### `Client.pipelining` * `number` Property to get and set the pipelining factor. ## Instance Events ### Event: `'connect'` See [Dispatcher Event: `'connect'`](Dispatcher.md#event-connect). Parameters: * **origin** `URL` * **targets** `Array<Dispatcher>` Emitted when a socket has been created and connected. The client will connect once `client.size > 0`. #### Example - Client connect event ```js import { createServer } from 'http' import { Client } from 'undici' import { once } from 'events' const server = createServer((request, response) => { response.end('Hello, World!') }).listen() await once(server, 'listening') const client = new Client(`http://localhost:${server.address().port}`) client.on('connect', (origin) => { console.log(`Connected to ${origin}`) // should print before the request body statement }) try { const { body } = await client.request({ path: '/', method: 'GET' }) body.setEncoding('utf-8') body.on('data', console.log) client.close() server.close() } catch (error) { console.error(error) client.close() server.close() } ``` ### Event: `'disconnect'` See [Dispatcher Event: `'disconnect'`](Dispatcher.md#event-disconnect). Parameters: * **origin** `URL` * **targets** `Array<Dispatcher>` * **error** `Error` Emitted when socket has disconnected. The error argument of the event is the error which caused the socket to disconnect. The client will reconnect if or once `client.size > 0`. #### Example - Client disconnect event ```js import { createServer } from 'http' import { Client } from 'undici' import { once } from 'events' const server = createServer((request, response) => { response.destroy() }).listen() await once(server, 'listening') const client = new Client(`http://localhost:${server.address().port}`) client.on('disconnect', (origin) => { console.log(`Disconnected from ${origin}`) }) try { await client.request({ path: '/', method: 'GET' }) } catch (error) { console.error(error.message) client.close() server.close() } ``` ### Event: `'drain'` Emitted when pipeline is no longer busy. See [Dispatcher Event: `'drain'`](Dispatcher.md#event-drain). #### Example - Client drain event ```js import { createServer } from 'http' import { Client } from 'undici' import { once } from 'events' const server = createServer((request, response) => { response.end('Hello, World!') }).listen() await once(server, 'listening') const client = new Client(`http://localhost:${server.address().port}`) client.on('drain', () => { console.log('drain event') client.close() server.close() }) const requests = [ client.request({ path: '/', method: 'GET' }), client.request({ path: '/', method: 'GET' }), client.request({ path: '/', method: 'GET' }) ] await Promise.all(requests) console.log('requests completed') ``` ### Event: `'error'` Invoked for users errors such as throwing in the `onError` handler. node_modules/undici/docs/docs/api/ContentType.md 0000664 00000002152 15114741631 0015730 0 ustar 00 # MIME Type Parsing ## `MIMEType` interface * **type** `string` * **subtype** `string` * **parameters** `Map<string, string>` * **essence** `string` ## `parseMIMEType(input)` Implements [parse a MIME type](https://mimesniff.spec.whatwg.org/#parse-a-mime-type). Parses a MIME type, returning its type, subtype, and any associated parameters. If the parser can't parse an input it returns the string literal `'failure'`. ```js import { parseMIMEType } from 'undici' parseMIMEType('text/html; charset=gbk') // { // type: 'text', // subtype: 'html', // parameters: Map(1) { 'charset' => 'gbk' }, // essence: 'text/html' // } ``` Arguments: * **input** `string` Returns: `MIMEType|'failure'` ## `serializeAMimeType(input)` Implements [serialize a MIME type](https://mimesniff.spec.whatwg.org/#serialize-a-mime-type). Serializes a MIMEType object. ```js import { serializeAMimeType } from 'undici' serializeAMimeType({ type: 'text', subtype: 'html', parameters: new Map([['charset', 'gbk']]), essence: 'text/html' }) // text/html;charset=gbk ``` Arguments: * **mimeType** `MIMEType` Returns: `string` node_modules/undici/docs/docs/api/MockErrors.md 0000664 00000001123 15114741631 0015537 0 ustar 00 # MockErrors Undici exposes a variety of mock error objects that you can use to enhance your mock error handling. You can find all the mock error objects inside the `mockErrors` key. ```js import { mockErrors } from 'undici' ``` | Mock Error | Mock Error Codes | Description | | --------------------- | ------------------------------- | ---------------------------------------------------------- | | `MockNotMatchedError` | `UND_MOCK_ERR_MOCK_NOT_MATCHED` | The request does not match any registered mock dispatches. | node_modules/undici/docs/docs/api/EnvHttpProxyAgent.md 0000664 00000013110 15114741631 0017061 0 ustar 00 # Class: EnvHttpProxyAgent Stability: Experimental. Extends: `undici.Dispatcher` EnvHttpProxyAgent automatically reads the proxy configuration from the environment variables `http_proxy`, `https_proxy`, and `no_proxy` and sets up the proxy agents accordingly. When `http_proxy` and `https_proxy` are set, `http_proxy` is used for HTTP requests and `https_proxy` is used for HTTPS requests. If only `http_proxy` is set, `http_proxy` is used for both HTTP and HTTPS requests. If only `https_proxy` is set, it is only used for HTTPS requests. `no_proxy` is a comma or space-separated list of hostnames that should not be proxied. The list may contain leading wildcard characters (`*`). If `no_proxy` is set, the EnvHttpProxyAgent will bypass the proxy for requests to hosts that match the list. If `no_proxy` is set to `"*"`, the EnvHttpProxyAgent will bypass the proxy for all requests. Uppercase environment variables are also supported: `HTTP_PROXY`, `HTTPS_PROXY`, and `NO_PROXY`. However, if both the lowercase and uppercase environment variables are set, the uppercase environment variables will be ignored. ## `new EnvHttpProxyAgent([options])` Arguments: * **options** `EnvHttpProxyAgentOptions` (optional) - extends the `Agent` options. Returns: `EnvHttpProxyAgent` ### Parameter: `EnvHttpProxyAgentOptions` Extends: [`AgentOptions`](Agent.md#parameter-agentoptions) * **httpProxy** `string` (optional) - When set, it will override the `HTTP_PROXY` environment variable. * **httpsProxy** `string` (optional) - When set, it will override the `HTTPS_PROXY` environment variable. * **noProxy** `string` (optional) - When set, it will override the `NO_PROXY` environment variable. Examples: ```js import { EnvHttpProxyAgent } from 'undici' const envHttpProxyAgent = new EnvHttpProxyAgent() // or const envHttpProxyAgent = new EnvHttpProxyAgent({ httpProxy: 'my.proxy.server:8080', httpsProxy: 'my.proxy.server:8443', noProxy: 'localhost' }) ``` #### Example - EnvHttpProxyAgent instantiation This will instantiate the EnvHttpProxyAgent. It will not do anything until registered as the agent to use with requests. ```js import { EnvHttpProxyAgent } from 'undici' const envHttpProxyAgent = new EnvHttpProxyAgent() ``` #### Example - Basic Proxy Fetch with global agent dispatcher ```js import { setGlobalDispatcher, fetch, EnvHttpProxyAgent } from 'undici' const envHttpProxyAgent = new EnvHttpProxyAgent() setGlobalDispatcher(envHttpProxyAgent) const { status, json } = await fetch('http://localhost:3000/foo') console.log('response received', status) // response received 200 const data = await json() // data { foo: "bar" } ``` #### Example - Basic Proxy Request with global agent dispatcher ```js import { setGlobalDispatcher, request, EnvHttpProxyAgent } from 'undici' const envHttpProxyAgent = new EnvHttpProxyAgent() setGlobalDispatcher(envHttpProxyAgent) const { statusCode, body } = await request('http://localhost:3000/foo') console.log('response received', statusCode) // response received 200 for await (const data of body) { console.log('data', data.toString('utf8')) // data foo } ``` #### Example - Basic Proxy Request with local agent dispatcher ```js import { EnvHttpProxyAgent, request } from 'undici' const envHttpProxyAgent = new EnvHttpProxyAgent() const { statusCode, body } = await request('http://localhost:3000/foo', { dispatcher: envHttpProxyAgent }) console.log('response received', statusCode) // response received 200 for await (const data of body) { console.log('data', data.toString('utf8')) // data foo } ``` #### Example - Basic Proxy Fetch with local agent dispatcher ```js import { EnvHttpProxyAgent, fetch } from 'undici' const envHttpProxyAgent = new EnvHttpProxyAgent() const { status, json } = await fetch('http://localhost:3000/foo', { dispatcher: envHttpProxyAgent }) console.log('response received', status) // response received 200 const data = await json() // data { foo: "bar" } ``` ## Instance Methods ### `EnvHttpProxyAgent.close([callback])` Implements [`Dispatcher.close([callback])`](Dispatcher.md#dispatcherclosecallback-promise). ### `EnvHttpProxyAgent.destroy([error, callback])` Implements [`Dispatcher.destroy([error, callback])`](Dispatcher.md#dispatcherdestroyerror-callback-promise). ### `EnvHttpProxyAgent.dispatch(options, handler: AgentDispatchOptions)` Implements [`Dispatcher.dispatch(options, handler)`](Dispatcher.md#dispatcherdispatchoptions-handler). #### Parameter: `AgentDispatchOptions` Extends: [`DispatchOptions`](Dispatcher.md#parameter-dispatchoptions) * **origin** `string | URL` * **maxRedirections** `Integer`. Implements [`Dispatcher.destroy([error, callback])`](Dispatcher.md#dispatcherdestroyerror-callback-promise). ### `EnvHttpProxyAgent.connect(options[, callback])` See [`Dispatcher.connect(options[, callback])`](Dispatcher.md#dispatcherconnectoptions-callback). ### `EnvHttpProxyAgent.dispatch(options, handler)` Implements [`Dispatcher.dispatch(options, handler)`](Dispatcher.md#dispatcherdispatchoptions-handler). ### `EnvHttpProxyAgent.pipeline(options, handler)` See [`Dispatcher.pipeline(options, handler)`](Dispatcher.md#dispatcherpipelineoptions-handler). ### `EnvHttpProxyAgent.request(options[, callback])` See [`Dispatcher.request(options [, callback])`](Dispatcher.md#dispatcherrequestoptions-callback). ### `EnvHttpProxyAgent.stream(options, factory[, callback])` See [`Dispatcher.stream(options, factory[, callback])`](Dispatcher.md#dispatcherstreamoptions-factory-callback). ### `EnvHttpProxyAgent.upgrade(options[, callback])` See [`Dispatcher.upgrade(options[, callback])`](Dispatcher.md#dispatcherupgradeoptions-callback). node_modules/undici/docs/docs/api/EventSource.md 0000664 00000002324 15114741631 0015717 0 ustar 00 # EventSource > ⚠️ Warning: the EventSource API is experimental. Undici exposes a WHATWG spec-compliant implementation of [EventSource](https://developer.mozilla.org/en-US/docs/Web/API/EventSource) for [Server-Sent Events](https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events/Using_server-sent_events). ## Instantiating EventSource Undici exports a EventSource class. You can instantiate the EventSource as follows: ```mjs import { EventSource } from 'undici' const eventSource = new EventSource('http://localhost:3000') eventSource.onmessage = (event) => { console.log(event.data) } ``` ## Using a custom Dispatcher undici allows you to set your own Dispatcher in the EventSource constructor. An example which allows you to modify the request headers is: ```mjs import { EventSource, Agent } from 'undici' class CustomHeaderAgent extends Agent { dispatch (opts) { opts.headers['x-custom-header'] = 'hello world' return super.dispatch(...arguments) } } const eventSource = new EventSource('http://localhost:3000', { dispatcher: new CustomHeaderAgent() }) ``` More information about the EventSource API can be found on [MDN](https://developer.mozilla.org/en-US/docs/Web/API/EventSource). node_modules/undici/docs/docs/api/PoolStats.md 0000664 00000001407 15114741631 0015406 0 ustar 00 # Class: PoolStats Aggregate stats for a [Pool](Pool.md) or [BalancedPool](BalancedPool.md). ## `new PoolStats(pool)` Arguments: * **pool** `Pool` - Pool or BalancedPool from which to return stats. ## Instance Properties ### `PoolStats.connected` Number of open socket connections in this pool. ### `PoolStats.free` Number of open socket connections in this pool that do not have an active request. ### `PoolStats.pending` Number of pending requests across all clients in this pool. ### `PoolStats.queued` Number of queued requests across all clients in this pool. ### `PoolStats.running` Number of currently active requests across all clients in this pool. ### `PoolStats.size` Number of active, pending, or queued requests across all clients in this pool. node_modules/undici/docs/docs/api/RetryHandler.md 0000664 00000010427 15114741631 0016063 0 ustar 00 # Class: RetryHandler Extends: `undici.DispatcherHandlers` A handler class that implements the retry logic for a request. ## `new RetryHandler(dispatchOptions, retryHandlers, [retryOptions])` Arguments: - **options** `Dispatch.DispatchOptions & RetryOptions` (required) - It is an intersection of `Dispatcher.DispatchOptions` and `RetryOptions`. - **retryHandlers** `RetryHandlers` (required) - Object containing the `dispatch` to be used on every retry, and `handler` for handling the `dispatch` lifecycle. Returns: `retryHandler` ### Parameter: `Dispatch.DispatchOptions & RetryOptions` Extends: [`Dispatch.DispatchOptions`](Dispatcher.md#parameter-dispatchoptions). #### `RetryOptions` - **retry** `(err: Error, context: RetryContext, callback: (err?: Error | null) => void) => number | null` (optional) - Function to be called after every retry. It should pass error if no more retries should be performed. - **maxRetries** `number` (optional) - Maximum number of retries. Default: `5` - **maxTimeout** `number` (optional) - Maximum number of milliseconds to wait before retrying. Default: `30000` (30 seconds) - **minTimeout** `number` (optional) - Minimum number of milliseconds to wait before retrying. Default: `500` (half a second) - **timeoutFactor** `number` (optional) - Factor to multiply the timeout by for each retry attempt. Default: `2` - **retryAfter** `boolean` (optional) - It enables automatic retry after the `Retry-After` header is received. Default: `true` - - **methods** `string[]` (optional) - Array of HTTP methods to retry. Default: `['GET', 'PUT', 'HEAD', 'OPTIONS', 'DELETE']` - **statusCodes** `number[]` (optional) - Array of HTTP status codes to retry. Default: `[429, 500, 502, 503, 504]` - **errorCodes** `string[]` (optional) - Array of Error codes to retry. Default: `['ECONNRESET', 'ECONNREFUSED', 'ENOTFOUND', 'ENETDOWN','ENETUNREACH', 'EHOSTDOWN', 'UND_ERR_SOCKET']` **`RetryContext`** - `state`: `RetryState` - Current retry state. It can be mutated. - `opts`: `Dispatch.DispatchOptions & RetryOptions` - Options passed to the retry handler. **`RetryState`** It represents the retry state for a given request. - `counter`: `number` - Current retry attempt. ### Parameter `RetryHandlers` - **dispatch** `(options: Dispatch.DispatchOptions, handlers: Dispatch.DispatchHandlers) => Promise<Dispatch.DispatchResponse>` (required) - Dispatch function to be called after every retry. - **handler** Extends [`Dispatch.DispatchHandlers`](Dispatcher.md#dispatcherdispatchoptions-handler) (required) - Handler function to be called after the request is successful or the retries are exhausted. >__Note__: The `RetryHandler` does not retry over stateful bodies (e.g. streams, AsyncIterable) as those, once consumed, are left in an state that cannot be reutilized. For these situations the `RetryHandler` will identify >the body as stateful and will not retry the request rejecting with the error `UND_ERR_REQ_RETRY`. Examples: ```js const client = new Client(`http://localhost:${server.address().port}`); const chunks = []; const handler = new RetryHandler( { ...dispatchOptions, retryOptions: { // custom retry function retry: function (err, state, callback) { counter++; if (err.code && err.code === "UND_ERR_DESTROYED") { callback(err); return; } if (err.statusCode === 206) { callback(err); return; } setTimeout(() => callback(null), 1000); }, }, }, { dispatch: (...args) => { return client.dispatch(...args); }, handler: { onConnect() {}, onBodySent() {}, onHeaders(status, _rawHeaders, resume, _statusMessage) { // do something with headers }, onData(chunk) { chunks.push(chunk); return true; }, onComplete() {}, onError() { // handle error properly }, }, } ); ``` #### Example - Basic RetryHandler with defaults ```js const client = new Client(`http://localhost:${server.address().port}`); const handler = new RetryHandler(dispatchOptions, { dispatch: client.dispatch.bind(client), handler: { onConnect() {}, onBodySent() {}, onHeaders(status, _rawHeaders, resume, _statusMessage) {}, onData(chunk) {}, onComplete() {}, onError(err) {}, }, }); ``` node_modules/undici/docs/docs/best-practices/mocking-request.md 0000664 00000006415 15114741631 0020736 0 ustar 00 # Mocking Request Undici has its own mocking [utility](../api/MockAgent.md). It allow us to intercept undici HTTP requests and return mocked values instead. It can be useful for testing purposes. Example: ```js // bank.mjs import { request } from 'undici' export async function bankTransfer(recipient, amount) { const { body } = await request('http://localhost:3000/bank-transfer', { method: 'POST', headers: { 'X-TOKEN-SECRET': 'SuperSecretToken', }, body: JSON.stringify({ recipient, amount }) } ) return await body.json() } ``` And this is what the test file looks like: ```js // index.test.mjs import { strict as assert } from 'assert' import { MockAgent, setGlobalDispatcher, } from 'undici' import { bankTransfer } from './bank.mjs' const mockAgent = new MockAgent(); setGlobalDispatcher(mockAgent); // Provide the base url to the request const mockPool = mockAgent.get('http://localhost:3000'); // intercept the request mockPool.intercept({ path: '/bank-transfer', method: 'POST', headers: { 'X-TOKEN-SECRET': 'SuperSecretToken', }, body: JSON.stringify({ recipient: '1234567890', amount: '100' }) }).reply(200, { message: 'transaction processed' }) const success = await bankTransfer('1234567890', '100') assert.deepEqual(success, { message: 'transaction processed' }) // if you dont want to check whether the body or the headers contain the same value // just remove it from interceptor mockPool.intercept({ path: '/bank-transfer', method: 'POST', }).reply(400, { message: 'bank account not found' }) const badRequest = await bankTransfer('1234567890', '100') assert.deepEqual(badRequest, { message: 'bank account not found' }) ``` Explore other MockAgent functionality [here](../api/MockAgent.md) ## Debug Mock Value When the interceptor and the request options are not the same, undici will automatically make a real HTTP request. To prevent real requests from being made, use `mockAgent.disableNetConnect()`: ```js const mockAgent = new MockAgent(); setGlobalDispatcher(mockAgent); mockAgent.disableNetConnect() // Provide the base url to the request const mockPool = mockAgent.get('http://localhost:3000'); mockPool.intercept({ path: '/bank-transfer', method: 'POST', }).reply(200, { message: 'transaction processed' }) const badRequest = await bankTransfer('1234567890', '100') // Will throw an error // MockNotMatchedError: Mock dispatch not matched for path '/bank-transfer': // subsequent request to origin http://localhost:3000 was not allowed (net.connect disabled) ``` ## Reply with data based on request If the mocked response needs to be dynamically derived from the request parameters, you can provide a function instead of an object to `reply`: ```js mockPool.intercept({ path: '/bank-transfer', method: 'POST', headers: { 'X-TOKEN-SECRET': 'SuperSecretToken', }, body: JSON.stringify({ recipient: '1234567890', amount: '100' }) }).reply(200, (opts) => { // do something with opts return { message: 'transaction processed' } }) ``` in this case opts will be ``` { method: 'POST', headers: { 'X-TOKEN-SECRET': 'SuperSecretToken' }, body: '{"recipient":"1234567890","amount":"100"}', origin: 'http://localhost:3000', path: '/bank-transfer' } ``` node_modules/undici/docs/docs/best-practices/proxy.md 0000664 00000006400 15114741631 0016774 0 ustar 00 # Connecting through a proxy Connecting through a proxy is possible by: - Using [ProxyAgent](../api/ProxyAgent.md). - Configuring `Client` or `Pool` constructor. The proxy url should be passed to the `Client` or `Pool` constructor, while the upstream server url should be added to every request call in the `path`. For instance, if you need to send a request to the `/hello` route of your upstream server, the `path` should be `path: 'http://upstream.server:port/hello?foo=bar'`. If you proxy requires basic authentication, you can send it via the `proxy-authorization` header. ### Connect without authentication ```js import { Client } from 'undici' import { createServer } from 'http' import { createProxy } from 'proxy' const server = await buildServer() const proxyServer = await buildProxy() const serverUrl = `http://localhost:${server.address().port}` const proxyUrl = `http://localhost:${proxyServer.address().port}` server.on('request', (req, res) => { console.log(req.url) // '/hello?foo=bar' res.setHeader('content-type', 'application/json') res.end(JSON.stringify({ hello: 'world' })) }) const client = new Client(proxyUrl) const response = await client.request({ method: 'GET', path: serverUrl + '/hello?foo=bar' }) response.body.setEncoding('utf8') let data = '' for await (const chunk of response.body) { data += chunk } console.log(response.statusCode) // 200 console.log(JSON.parse(data)) // { hello: 'world' } server.close() proxyServer.close() client.close() function buildServer () { return new Promise((resolve, reject) => { const server = createServer() server.listen(0, () => resolve(server)) }) } function buildProxy () { return new Promise((resolve, reject) => { const server = createProxy(createServer()) server.listen(0, () => resolve(server)) }) } ``` ### Connect with authentication ```js import { Client } from 'undici' import { createServer } from 'http' import { createProxy } from 'proxy' const server = await buildServer() const proxyServer = await buildProxy() const serverUrl = `http://localhost:${server.address().port}` const proxyUrl = `http://localhost:${proxyServer.address().port}` proxyServer.authenticate = function (req) { return req.headers['proxy-authorization'] === `Basic ${Buffer.from('user:pass').toString('base64')}` } server.on('request', (req, res) => { console.log(req.url) // '/hello?foo=bar' res.setHeader('content-type', 'application/json') res.end(JSON.stringify({ hello: 'world' })) }) const client = new Client(proxyUrl) const response = await client.request({ method: 'GET', path: serverUrl + '/hello?foo=bar', headers: { 'proxy-authorization': `Basic ${Buffer.from('user:pass').toString('base64')}` } }) response.body.setEncoding('utf8') let data = '' for await (const chunk of response.body) { data += chunk } console.log(response.statusCode) // 200 console.log(JSON.parse(data)) // { hello: 'world' } server.close() proxyServer.close() client.close() function buildServer () { return new Promise((resolve, reject) => { const server = createServer() server.listen(0, () => resolve(server)) }) } function buildProxy () { return new Promise((resolve, reject) => { const server = createProxy(createServer()) server.listen(0, () => resolve(server)) }) } ``` node_modules/undici/docs/docs/best-practices/client-certificate.md 0000664 00000004005 15114741631 0021350 0 ustar 00 # Client certificate Client certificate authentication can be configured with the `Client`, the required options are passed along through the `connect` option. The client certificates must be signed by a trusted CA. The Node.js default is to trust the well-known CAs curated by Mozilla. Setting the server option `requestCert: true` tells the server to request the client certificate. The server option `rejectUnauthorized: false` allows us to handle any invalid certificate errors in client code. The `authorized` property on the socket of the incoming request will show if the client certificate was valid. The `authorizationError` property will give the reason if the certificate was not valid. ### Client Certificate Authentication ```js const { readFileSync } = require('node:fs') const { join } = require('node:path') const { createServer } = require('node:https') const { Client } = require('undici') const serverOptions = { ca: [ readFileSync(join(__dirname, 'client-ca-crt.pem'), 'utf8') ], key: readFileSync(join(__dirname, 'server-key.pem'), 'utf8'), cert: readFileSync(join(__dirname, 'server-crt.pem'), 'utf8'), requestCert: true, rejectUnauthorized: false } const server = createServer(serverOptions, (req, res) => { // true if client cert is valid if(req.client.authorized === true) { console.log('valid') } else { console.error(req.client.authorizationError) } res.end() }) server.listen(0, function () { const tls = { ca: [ readFileSync(join(__dirname, 'server-ca-crt.pem'), 'utf8') ], key: readFileSync(join(__dirname, 'client-key.pem'), 'utf8'), cert: readFileSync(join(__dirname, 'client-crt.pem'), 'utf8'), rejectUnauthorized: false, servername: 'agent1' } const client = new Client(`https://localhost:${server.address().port}`, { connect: tls }) client.request({ path: '/', method: 'GET' }, (err, { body }) => { body.on('data', (buf) => {}) body.on('end', () => { client.close() server.close() }) }) }) ``` node_modules/undici/docs/docs/best-practices/writing-tests.md 0000664 00000001210 15114741631 0020430 0 ustar 00 # Writing tests Undici is tuned for a production use case and its default will keep a socket open for a few seconds after an HTTP request is completed to remove the overhead of opening up a new socket. These settings that makes Undici shine in production are not a good fit for using Undici in automated tests, as it will result in longer execution times. The following are good defaults that will keep the socket open for only 10ms: ```js import { request, setGlobalDispatcher, Agent } from 'undici' const agent = new Agent({ keepAliveTimeout: 10, // milliseconds keepAliveMaxTimeout: 10 // milliseconds }) setGlobalDispatcher(agent) ``` node_modules/undici/index-fetch.js 0000664 00000002622 15114741631 0013237 0 ustar 00 'use strict' const { getGlobalDispatcher, setGlobalDispatcher } = require('./lib/global') const EnvHttpProxyAgent = require('./lib/dispatcher/env-http-proxy-agent') const fetchImpl = require('./lib/web/fetch').fetch module.exports.fetch = function fetch (resource, init = undefined) { return fetchImpl(resource, init).catch((err) => { if (err && typeof err === 'object') { Error.captureStackTrace(err) } throw err }) } module.exports.FormData = require('./lib/web/fetch/formdata').FormData module.exports.Headers = require('./lib/web/fetch/headers').Headers module.exports.Response = require('./lib/web/fetch/response').Response module.exports.Request = require('./lib/web/fetch/request').Request const { CloseEvent, ErrorEvent, MessageEvent, createFastMessageEvent } = require('./lib/web/websocket/events') module.exports.WebSocket = require('./lib/web/websocket/websocket').WebSocket module.exports.CloseEvent = CloseEvent module.exports.ErrorEvent = ErrorEvent module.exports.MessageEvent = MessageEvent module.exports.createFastMessageEvent = createFastMessageEvent module.exports.EventSource = require('./lib/web/eventsource/eventsource').EventSource // Expose the fetch implementation to be enabled in Node.js core via a flag module.exports.EnvHttpProxyAgent = EnvHttpProxyAgent module.exports.getGlobalDispatcher = getGlobalDispatcher module.exports.setGlobalDispatcher = setGlobalDispatcher node_modules/undici/package.json 0000664 00000014206 15114741631 0012772 0 ustar 00 { "name": "undici", "version": "6.21.3", "description": "An HTTP/1.1 client, written from scratch for Node.js", "homepage": "https://undici.nodejs.org", "bugs": { "url": "https://github.com/nodejs/undici/issues" }, "repository": { "type": "git", "url": "git+https://github.com/nodejs/undici.git" }, "license": "MIT", "contributors": [ { "name": "Daniele Belardi", "url": "https://github.com/dnlup", "author": true }, { "name": "Ethan Arrowood", "url": "https://github.com/ethan-arrowood", "author": true }, { "name": "Matteo Collina", "url": "https://github.com/mcollina", "author": true }, { "name": "Matthew Aitken", "url": "https://github.com/KhafraDev", "author": true }, { "name": "Robert Nagy", "url": "https://github.com/ronag", "author": true }, { "name": "Szymon Marczak", "url": "https://github.com/szmarczak", "author": true }, { "name": "Tomas Della Vedova", "url": "https://github.com/delvedor", "author": true } ], "keywords": [ "fetch", "http", "https", "promise", "request", "curl", "wget", "xhr", "whatwg" ], "main": "index.js", "types": "index.d.ts", "scripts": { "build:node": "npx esbuild@0.19.10 index-fetch.js --bundle --platform=node --outfile=undici-fetch.js --define:esbuildDetection=1 --keep-names && node scripts/strip-comments.js", "prebuild:wasm": "node build/wasm.js --prebuild", "build:wasm": "node build/wasm.js --docker", "lint": "standard | snazzy", "lint:fix": "standard --fix | snazzy", "test": "npm run test:javascript && cross-env NODE_V8_COVERAGE= npm run test:typescript", "test:javascript": "node scripts/generate-pem && npm run test:unit && npm run test:node-fetch && npm run test:cache && npm run test:interceptors && npm run test:fetch && npm run test:cookies && npm run test:eventsource && npm run test:wpt && npm run test:websocket && npm run test:node-test && npm run test:jest", "test:javascript:withoutintl": "node scripts/generate-pem && npm run test:unit && npm run test:node-fetch && npm run test:fetch:nobuild && npm run test:cache && npm run test:interceptors && npm run test:cookies && npm run test:eventsource:nobuild && npm run test:wpt:withoutintl && npm run test:node-test", "test:busboy": "borp -p \"test/busboy/*.js\"", "test:cache": "borp -p \"test/cache/*.js\"", "test:cookies": "borp -p \"test/cookie/*.js\"", "test:eventsource": "npm run build:node && npm run test:eventsource:nobuild", "test:eventsource:nobuild": "borp --expose-gc -p \"test/eventsource/*.js\"", "test:fuzzing": "node test/fuzzing/fuzzing.test.js", "test:fetch": "npm run build:node && npm run test:fetch:nobuild", "test:fetch:nobuild": "borp --timeout 180000 --expose-gc --concurrency 1 -p \"test/fetch/*.js\" && npm run test:webidl && npm run test:busboy", "test:h2": "npm run test:h2:core && npm run test:h2:fetch", "test:h2:core": "borp -p \"test/http2*.js\"", "test:h2:fetch": "npm run build:node && borp -p \"test/fetch/http2*.js\"", "test:interceptors": "borp -p \"test/interceptors/*.js\"", "test:jest": "cross-env NODE_V8_COVERAGE= jest", "test:unit": "borp --expose-gc -p \"test/*.js\"", "test:node-fetch": "borp -p \"test/node-fetch/**/*.js\"", "test:node-test": "borp -p \"test/node-test/**/*.js\"", "test:tdd": "borp --expose-gc -p \"test/*.js\"", "test:tdd:node-test": "borp -p \"test/node-test/**/*.js\" -w", "test:typescript": "tsd && tsc test/imports/undici-import.ts --typeRoots ./types && tsc ./types/*.d.ts --noEmit --typeRoots ./types", "test:webidl": "borp -p \"test/webidl/*.js\"", "test:websocket": "borp -p \"test/websocket/*.js\"", "test:websocket:autobahn": "node test/autobahn/client.js", "test:websocket:autobahn:report": "node test/autobahn/report.js", "test:wpt": "node test/wpt/start-fetch.mjs && node test/wpt/start-FileAPI.mjs && node test/wpt/start-mimesniff.mjs && node test/wpt/start-xhr.mjs && node test/wpt/start-websockets.mjs && node test/wpt/start-cacheStorage.mjs && node test/wpt/start-eventsource.mjs", "test:wpt:withoutintl": "node test/wpt/start-fetch.mjs && node test/wpt/start-mimesniff.mjs && node test/wpt/start-xhr.mjs && node test/wpt/start-cacheStorage.mjs && node test/wpt/start-eventsource.mjs", "coverage": "npm run coverage:clean && cross-env NODE_V8_COVERAGE=./coverage/tmp npm run test:javascript && npm run coverage:report", "coverage:ci": "npm run coverage:clean && cross-env NODE_V8_COVERAGE=./coverage/tmp npm run test:javascript && npm run coverage:report:ci", "coverage:clean": "node ./scripts/clean-coverage.js", "coverage:report": "cross-env NODE_V8_COVERAGE= c8 report", "coverage:report:ci": "c8 report", "bench": "echo \"Error: Benchmarks have been moved to '/benchmarks'\" && exit 1", "serve:website": "echo \"Error: Documentation has been moved to '/docs'\" && exit 1", "prepare": "husky && node ./scripts/platform-shell.js" }, "devDependencies": { "@fastify/busboy": "2.1.1", "@matteo.collina/tspl": "^0.1.1", "@sinonjs/fake-timers": "^11.1.0", "@types/node": "~18.19.50", "abort-controller": "^3.0.0", "borp": "^0.15.0", "c8": "^10.0.0", "cross-env": "^7.0.3", "dns-packet": "^5.4.0", "fast-check": "^3.17.1", "form-data": "^4.0.0", "formdata-node": "^6.0.3", "https-pem": "^3.0.0", "husky": "^9.0.7", "jest": "^29.0.2", "jsdom": "^24.0.0", "node-forge": "^1.3.1", "pre-commit": "^1.2.2", "proxy": "^2.1.1", "snazzy": "^9.0.0", "standard": "^17.0.0", "tsd": "^0.31.0", "typescript": "^5.0.2", "ws": "^8.11.0" }, "engines": { "node": ">=18.17" }, "standard": { "env": [ "jest" ], "ignore": [ "lib/llhttp/constants.js", "lib/llhttp/utils.js", "test/fixtures/wpt" ] }, "tsd": { "directory": "test/types", "compilerOptions": { "esModuleInterop": true, "lib": [ "esnext" ] } }, "jest": { "testMatch": [ "<rootDir>/test/jest/**" ] } } node_modules/undici/LICENSE 0000664 00000002102 15114741631 0011501 0 ustar 00 MIT License Copyright (c) Matteo Collina and Undici contributors Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. node_modules/undici/index.d.ts 0000664 00000000127 15114741631 0012402 0 ustar 00 export * from './types/index' import Undici from './types/index' export default Undici node_modules/undici/lib/handler/retry-handler.js 0000664 00000023116 15114741631 0016005 0 ustar 00 'use strict' const assert = require('node:assert') const { kRetryHandlerDefaultRetry } = require('../core/symbols') const { RequestRetryError } = require('../core/errors') const { isDisturbed, parseHeaders, parseRangeHeader, wrapRequestBody } = require('../core/util') function calculateRetryAfterHeader (retryAfter) { const current = Date.now() return new Date(retryAfter).getTime() - current } class RetryHandler { constructor (opts, handlers) { const { retryOptions, ...dispatchOpts } = opts const { // Retry scoped retry: retryFn, maxRetries, maxTimeout, minTimeout, timeoutFactor, // Response scoped methods, errorCodes, retryAfter, statusCodes } = retryOptions ?? {} this.dispatch = handlers.dispatch this.handler = handlers.handler this.opts = { ...dispatchOpts, body: wrapRequestBody(opts.body) } this.abort = null this.aborted = false this.retryOpts = { retry: retryFn ?? RetryHandler[kRetryHandlerDefaultRetry], retryAfter: retryAfter ?? true, maxTimeout: maxTimeout ?? 30 * 1000, // 30s, minTimeout: minTimeout ?? 500, // .5s timeoutFactor: timeoutFactor ?? 2, maxRetries: maxRetries ?? 5, // What errors we should retry methods: methods ?? ['GET', 'HEAD', 'OPTIONS', 'PUT', 'DELETE', 'TRACE'], // Indicates which errors to retry statusCodes: statusCodes ?? [500, 502, 503, 504, 429], // List of errors to retry errorCodes: errorCodes ?? [ 'ECONNRESET', 'ECONNREFUSED', 'ENOTFOUND', 'ENETDOWN', 'ENETUNREACH', 'EHOSTDOWN', 'EHOSTUNREACH', 'EPIPE', 'UND_ERR_SOCKET' ] } this.retryCount = 0 this.retryCountCheckpoint = 0 this.start = 0 this.end = null this.etag = null this.resume = null // Handle possible onConnect duplication this.handler.onConnect(reason => { this.aborted = true if (this.abort) { this.abort(reason) } else { this.reason = reason } }) } onRequestSent () { if (this.handler.onRequestSent) { this.handler.onRequestSent() } } onUpgrade (statusCode, headers, socket) { if (this.handler.onUpgrade) { this.handler.onUpgrade(statusCode, headers, socket) } } onConnect (abort) { if (this.aborted) { abort(this.reason) } else { this.abort = abort } } onBodySent (chunk) { if (this.handler.onBodySent) return this.handler.onBodySent(chunk) } static [kRetryHandlerDefaultRetry] (err, { state, opts }, cb) { const { statusCode, code, headers } = err const { method, retryOptions } = opts const { maxRetries, minTimeout, maxTimeout, timeoutFactor, statusCodes, errorCodes, methods } = retryOptions const { counter } = state // Any code that is not a Undici's originated and allowed to retry if (code && code !== 'UND_ERR_REQ_RETRY' && !errorCodes.includes(code)) { cb(err) return } // If a set of method are provided and the current method is not in the list if (Array.isArray(methods) && !methods.includes(method)) { cb(err) return } // If a set of status code are provided and the current status code is not in the list if ( statusCode != null && Array.isArray(statusCodes) && !statusCodes.includes(statusCode) ) { cb(err) return } // If we reached the max number of retries if (counter > maxRetries) { cb(err) return } let retryAfterHeader = headers?.['retry-after'] if (retryAfterHeader) { retryAfterHeader = Number(retryAfterHeader) retryAfterHeader = Number.isNaN(retryAfterHeader) ? calculateRetryAfterHeader(retryAfterHeader) : retryAfterHeader * 1e3 // Retry-After is in seconds } const retryTimeout = retryAfterHeader > 0 ? Math.min(retryAfterHeader, maxTimeout) : Math.min(minTimeout * timeoutFactor ** (counter - 1), maxTimeout) setTimeout(() => cb(null), retryTimeout) } onHeaders (statusCode, rawHeaders, resume, statusMessage) { const headers = parseHeaders(rawHeaders) this.retryCount += 1 if (statusCode >= 300) { if (this.retryOpts.statusCodes.includes(statusCode) === false) { return this.handler.onHeaders( statusCode, rawHeaders, resume, statusMessage ) } else { this.abort( new RequestRetryError('Request failed', statusCode, { headers, data: { count: this.retryCount } }) ) return false } } // Checkpoint for resume from where we left it if (this.resume != null) { this.resume = null // Only Partial Content 206 supposed to provide Content-Range, // any other status code that partially consumed the payload // should not be retry because it would result in downstream // wrongly concatanete multiple responses. if (statusCode !== 206 && (this.start > 0 || statusCode !== 200)) { this.abort( new RequestRetryError('server does not support the range header and the payload was partially consumed', statusCode, { headers, data: { count: this.retryCount } }) ) return false } const contentRange = parseRangeHeader(headers['content-range']) // If no content range if (!contentRange) { this.abort( new RequestRetryError('Content-Range mismatch', statusCode, { headers, data: { count: this.retryCount } }) ) return false } // Let's start with a weak etag check if (this.etag != null && this.etag !== headers.etag) { this.abort( new RequestRetryError('ETag mismatch', statusCode, { headers, data: { count: this.retryCount } }) ) return false } const { start, size, end = size - 1 } = contentRange assert(this.start === start, 'content-range mismatch') assert(this.end == null || this.end === end, 'content-range mismatch') this.resume = resume return true } if (this.end == null) { if (statusCode === 206) { // First time we receive 206 const range = parseRangeHeader(headers['content-range']) if (range == null) { return this.handler.onHeaders( statusCode, rawHeaders, resume, statusMessage ) } const { start, size, end = size - 1 } = range assert( start != null && Number.isFinite(start), 'content-range mismatch' ) assert(end != null && Number.isFinite(end), 'invalid content-length') this.start = start this.end = end } // We make our best to checkpoint the body for further range headers if (this.end == null) { const contentLength = headers['content-length'] this.end = contentLength != null ? Number(contentLength) - 1 : null } assert(Number.isFinite(this.start)) assert( this.end == null || Number.isFinite(this.end), 'invalid content-length' ) this.resume = resume this.etag = headers.etag != null ? headers.etag : null // Weak etags are not useful for comparison nor cache // for instance not safe to assume if the response is byte-per-byte // equal if (this.etag != null && this.etag.startsWith('W/')) { this.etag = null } return this.handler.onHeaders( statusCode, rawHeaders, resume, statusMessage ) } const err = new RequestRetryError('Request failed', statusCode, { headers, data: { count: this.retryCount } }) this.abort(err) return false } onData (chunk) { this.start += chunk.length return this.handler.onData(chunk) } onComplete (rawTrailers) { this.retryCount = 0 return this.handler.onComplete(rawTrailers) } onError (err) { if (this.aborted || isDisturbed(this.opts.body)) { return this.handler.onError(err) } // We reconcile in case of a mix between network errors // and server error response if (this.retryCount - this.retryCountCheckpoint > 0) { // We count the difference between the last checkpoint and the current retry count this.retryCount = this.retryCountCheckpoint + (this.retryCount - this.retryCountCheckpoint) } else { this.retryCount += 1 } this.retryOpts.retry( err, { state: { counter: this.retryCount }, opts: { retryOptions: this.retryOpts, ...this.opts } }, onRetry.bind(this) ) function onRetry (err) { if (err != null || this.aborted || isDisturbed(this.opts.body)) { return this.handler.onError(err) } if (this.start !== 0) { const headers = { range: `bytes=${this.start}-${this.end ?? ''}` } // Weak etag check - weak etags will make comparison algorithms never match if (this.etag != null) { headers['if-match'] = this.etag } this.opts = { ...this.opts, headers: { ...this.opts.headers, ...headers } } } try { this.retryCountCheckpoint = this.retryCount this.dispatch(this.opts, this) } catch (err) { this.handler.onError(err) } } } } module.exports = RetryHandler node_modules/undici/lib/handler/decorator-handler.js 0000664 00000001532 15114741631 0016620 0 ustar 00 'use strict' module.exports = class DecoratorHandler { #handler constructor (handler) { if (typeof handler !== 'object' || handler === null) { throw new TypeError('handler must be an object') } this.#handler = handler } onConnect (...args) { return this.#handler.onConnect?.(...args) } onError (...args) { return this.#handler.onError?.(...args) } onUpgrade (...args) { return this.#handler.onUpgrade?.(...args) } onResponseStarted (...args) { return this.#handler.onResponseStarted?.(...args) } onHeaders (...args) { return this.#handler.onHeaders?.(...args) } onData (...args) { return this.#handler.onData?.(...args) } onComplete (...args) { return this.#handler.onComplete?.(...args) } onBodySent (...args) { return this.#handler.onBodySent?.(...args) } } node_modules/undici/lib/handler/redirect-handler.js 0000664 00000017024 15114741631 0016442 0 ustar 00 'use strict' const util = require('../core/util') const { kBodyUsed } = require('../core/symbols') const assert = require('node:assert') const { InvalidArgumentError } = require('../core/errors') const EE = require('node:events') const redirectableStatusCodes = [300, 301, 302, 303, 307, 308] const kBody = Symbol('body') class BodyAsyncIterable { constructor (body) { this[kBody] = body this[kBodyUsed] = false } async * [Symbol.asyncIterator] () { assert(!this[kBodyUsed], 'disturbed') this[kBodyUsed] = true yield * this[kBody] } } class RedirectHandler { constructor (dispatch, maxRedirections, opts, handler) { if (maxRedirections != null && (!Number.isInteger(maxRedirections) || maxRedirections < 0)) { throw new InvalidArgumentError('maxRedirections must be a positive number') } util.validateHandler(handler, opts.method, opts.upgrade) this.dispatch = dispatch this.location = null this.abort = null this.opts = { ...opts, maxRedirections: 0 } // opts must be a copy this.maxRedirections = maxRedirections this.handler = handler this.history = [] this.redirectionLimitReached = false if (util.isStream(this.opts.body)) { // TODO (fix): Provide some way for the user to cache the file to e.g. /tmp // so that it can be dispatched again? // TODO (fix): Do we need 100-expect support to provide a way to do this properly? if (util.bodyLength(this.opts.body) === 0) { this.opts.body .on('data', function () { assert(false) }) } if (typeof this.opts.body.readableDidRead !== 'boolean') { this.opts.body[kBodyUsed] = false EE.prototype.on.call(this.opts.body, 'data', function () { this[kBodyUsed] = true }) } } else if (this.opts.body && typeof this.opts.body.pipeTo === 'function') { // TODO (fix): We can't access ReadableStream internal state // to determine whether or not it has been disturbed. This is just // a workaround. this.opts.body = new BodyAsyncIterable(this.opts.body) } else if ( this.opts.body && typeof this.opts.body !== 'string' && !ArrayBuffer.isView(this.opts.body) && util.isIterable(this.opts.body) ) { // TODO: Should we allow re-using iterable if !this.opts.idempotent // or through some other flag? this.opts.body = new BodyAsyncIterable(this.opts.body) } } onConnect (abort) { this.abort = abort this.handler.onConnect(abort, { history: this.history }) } onUpgrade (statusCode, headers, socket) { this.handler.onUpgrade(statusCode, headers, socket) } onError (error) { this.handler.onError(error) } onHeaders (statusCode, headers, resume, statusText) { this.location = this.history.length >= this.maxRedirections || util.isDisturbed(this.opts.body) ? null : parseLocation(statusCode, headers) if (this.opts.throwOnMaxRedirect && this.history.length >= this.maxRedirections) { if (this.request) { this.request.abort(new Error('max redirects')) } this.redirectionLimitReached = true this.abort(new Error('max redirects')) return } if (this.opts.origin) { this.history.push(new URL(this.opts.path, this.opts.origin)) } if (!this.location) { return this.handler.onHeaders(statusCode, headers, resume, statusText) } const { origin, pathname, search } = util.parseURL(new URL(this.location, this.opts.origin && new URL(this.opts.path, this.opts.origin))) const path = search ? `${pathname}${search}` : pathname // Remove headers referring to the original URL. // By default it is Host only, unless it's a 303 (see below), which removes also all Content-* headers. // https://tools.ietf.org/html/rfc7231#section-6.4 this.opts.headers = cleanRequestHeaders(this.opts.headers, statusCode === 303, this.opts.origin !== origin) this.opts.path = path this.opts.origin = origin this.opts.maxRedirections = 0 this.opts.query = null // https://tools.ietf.org/html/rfc7231#section-6.4.4 // In case of HTTP 303, always replace method to be either HEAD or GET if (statusCode === 303 && this.opts.method !== 'HEAD') { this.opts.method = 'GET' this.opts.body = null } } onData (chunk) { if (this.location) { /* https://tools.ietf.org/html/rfc7231#section-6.4 TLDR: undici always ignores 3xx response bodies. Redirection is used to serve the requested resource from another URL, so it is assumes that no body is generated (and thus can be ignored). Even though generating a body is not prohibited. For status 301, 302, 303, 307 and 308 (the latter from RFC 7238), the specs mention that the body usually (which means it's optional and not mandated) contain just an hyperlink to the value of the Location response header, so the body can be ignored safely. For status 300, which is "Multiple Choices", the spec mentions both generating a Location response header AND a response body with the other possible location to follow. Since the spec explicitly chooses not to specify a format for such body and leave it to servers and browsers implementors, we ignore the body as there is no specified way to eventually parse it. */ } else { return this.handler.onData(chunk) } } onComplete (trailers) { if (this.location) { /* https://tools.ietf.org/html/rfc7231#section-6.4 TLDR: undici always ignores 3xx response trailers as they are not expected in case of redirections and neither are useful if present. See comment on onData method above for more detailed information. */ this.location = null this.abort = null this.dispatch(this.opts, this) } else { this.handler.onComplete(trailers) } } onBodySent (chunk) { if (this.handler.onBodySent) { this.handler.onBodySent(chunk) } } } function parseLocation (statusCode, headers) { if (redirectableStatusCodes.indexOf(statusCode) === -1) { return null } for (let i = 0; i < headers.length; i += 2) { if (headers[i].length === 8 && util.headerNameToString(headers[i]) === 'location') { return headers[i + 1] } } } // https://tools.ietf.org/html/rfc7231#section-6.4.4 function shouldRemoveHeader (header, removeContent, unknownOrigin) { if (header.length === 4) { return util.headerNameToString(header) === 'host' } if (removeContent && util.headerNameToString(header).startsWith('content-')) { return true } if (unknownOrigin && (header.length === 13 || header.length === 6 || header.length === 19)) { const name = util.headerNameToString(header) return name === 'authorization' || name === 'cookie' || name === 'proxy-authorization' } return false } // https://tools.ietf.org/html/rfc7231#section-6.4 function cleanRequestHeaders (headers, removeContent, unknownOrigin) { const ret = [] if (Array.isArray(headers)) { for (let i = 0; i < headers.length; i += 2) { if (!shouldRemoveHeader(headers[i], removeContent, unknownOrigin)) { ret.push(headers[i], headers[i + 1]) } } } else if (headers && typeof headers === 'object') { for (const key of Object.keys(headers)) { if (!shouldRemoveHeader(key, removeContent, unknownOrigin)) { ret.push(key, headers[key]) } } } else { assert(headers == null, 'headers must be an object or an array') } return ret } module.exports = RedirectHandler node_modules/undici/lib/dispatcher/pool.js 0000664 00000005676 15114741631 0014722 0 ustar 00 'use strict' const { PoolBase, kClients, kNeedDrain, kAddClient, kGetDispatcher } = require('./pool-base') const Client = require('./client') const { InvalidArgumentError } = require('../core/errors') const util = require('../core/util') const { kUrl, kInterceptors } = require('../core/symbols') const buildConnector = require('../core/connect') const kOptions = Symbol('options') const kConnections = Symbol('connections') const kFactory = Symbol('factory') function defaultFactory (origin, opts) { return new Client(origin, opts) } class Pool extends PoolBase { constructor (origin, { connections, factory = defaultFactory, connect, connectTimeout, tls, maxCachedSessions, socketPath, autoSelectFamily, autoSelectFamilyAttemptTimeout, allowH2, ...options } = {}) { super() if (connections != null && (!Number.isFinite(connections) || connections < 0)) { throw new InvalidArgumentError('invalid connections') } if (typeof factory !== 'function') { throw new InvalidArgumentError('factory must be a function.') } if (connect != null && typeof connect !== 'function' && typeof connect !== 'object') { throw new InvalidArgumentError('connect must be a function or an object') } if (typeof connect !== 'function') { connect = buildConnector({ ...tls, maxCachedSessions, allowH2, socketPath, timeout: connectTimeout, ...(autoSelectFamily ? { autoSelectFamily, autoSelectFamilyAttemptTimeout } : undefined), ...connect }) } this[kInterceptors] = options.interceptors?.Pool && Array.isArray(options.interceptors.Pool) ? options.interceptors.Pool : [] this[kConnections] = connections || null this[kUrl] = util.parseOrigin(origin) this[kOptions] = { ...util.deepClone(options), connect, allowH2 } this[kOptions].interceptors = options.interceptors ? { ...options.interceptors } : undefined this[kFactory] = factory this.on('connectionError', (origin, targets, error) => { // If a connection error occurs, we remove the client from the pool, // and emit a connectionError event. They will not be re-used. // Fixes https://github.com/nodejs/undici/issues/3895 for (const target of targets) { // Do not use kRemoveClient here, as it will close the client, // but the client cannot be closed in this state. const idx = this[kClients].indexOf(target) if (idx !== -1) { this[kClients].splice(idx, 1) } } }) } [kGetDispatcher] () { for (const client of this[kClients]) { if (!client[kNeedDrain]) { return client } } if (!this[kConnections] || this[kClients].length < this[kConnections]) { const dispatcher = this[kFactory](this[kUrl], this[kOptions]) this[kAddClient](dispatcher) return dispatcher } } } module.exports = Pool node_modules/undici/lib/dispatcher/agent.js 0000664 00000007637 15114741631 0015046 0 ustar 00 'use strict' const { InvalidArgumentError } = require('../core/errors') const { kClients, kRunning, kClose, kDestroy, kDispatch, kInterceptors } = require('../core/symbols') const DispatcherBase = require('./dispatcher-base') const Pool = require('./pool') const Client = require('./client') const util = require('../core/util') const createRedirectInterceptor = require('../interceptor/redirect-interceptor') const kOnConnect = Symbol('onConnect') const kOnDisconnect = Symbol('onDisconnect') const kOnConnectionError = Symbol('onConnectionError') const kMaxRedirections = Symbol('maxRedirections') const kOnDrain = Symbol('onDrain') const kFactory = Symbol('factory') const kOptions = Symbol('options') function defaultFactory (origin, opts) { return opts && opts.connections === 1 ? new Client(origin, opts) : new Pool(origin, opts) } class Agent extends DispatcherBase { constructor ({ factory = defaultFactory, maxRedirections = 0, connect, ...options } = {}) { super() if (typeof factory !== 'function') { throw new InvalidArgumentError('factory must be a function.') } if (connect != null && typeof connect !== 'function' && typeof connect !== 'object') { throw new InvalidArgumentError('connect must be a function or an object') } if (!Number.isInteger(maxRedirections) || maxRedirections < 0) { throw new InvalidArgumentError('maxRedirections must be a positive number') } if (connect && typeof connect !== 'function') { connect = { ...connect } } this[kInterceptors] = options.interceptors?.Agent && Array.isArray(options.interceptors.Agent) ? options.interceptors.Agent : [createRedirectInterceptor({ maxRedirections })] this[kOptions] = { ...util.deepClone(options), connect } this[kOptions].interceptors = options.interceptors ? { ...options.interceptors } : undefined this[kMaxRedirections] = maxRedirections this[kFactory] = factory this[kClients] = new Map() this[kOnDrain] = (origin, targets) => { this.emit('drain', origin, [this, ...targets]) } this[kOnConnect] = (origin, targets) => { this.emit('connect', origin, [this, ...targets]) } this[kOnDisconnect] = (origin, targets, err) => { this.emit('disconnect', origin, [this, ...targets], err) } this[kOnConnectionError] = (origin, targets, err) => { this.emit('connectionError', origin, [this, ...targets], err) } } get [kRunning] () { let ret = 0 for (const client of this[kClients].values()) { ret += client[kRunning] } return ret } [kDispatch] (opts, handler) { let key if (opts.origin && (typeof opts.origin === 'string' || opts.origin instanceof URL)) { key = String(opts.origin) } else { throw new InvalidArgumentError('opts.origin must be a non-empty string or URL.') } let dispatcher = this[kClients].get(key) if (!dispatcher) { dispatcher = this[kFactory](opts.origin, this[kOptions]) .on('drain', this[kOnDrain]) .on('connect', this[kOnConnect]) .on('disconnect', this[kOnDisconnect]) .on('connectionError', this[kOnConnectionError]) // This introduces a tiny memory leak, as dispatchers are never removed from the map. // TODO(mcollina): remove te timer when the client/pool do not have any more // active connections. this[kClients].set(key, dispatcher) } return dispatcher.dispatch(opts, handler) } async [kClose] () { const closePromises = [] for (const client of this[kClients].values()) { closePromises.push(client.close()) } this[kClients].clear() await Promise.all(closePromises) } async [kDestroy] (err) { const destroyPromises = [] for (const client of this[kClients].values()) { destroyPromises.push(client.destroy(err)) } this[kClients].clear() await Promise.all(destroyPromises) } } module.exports = Agent node_modules/undici/lib/dispatcher/client-h2.js 0000664 00000044277 15114741631 0015536 0 ustar 00 'use strict' const assert = require('node:assert') const { pipeline } = require('node:stream') const util = require('../core/util.js') const { RequestContentLengthMismatchError, RequestAbortedError, SocketError, InformationalError } = require('../core/errors.js') const { kUrl, kReset, kClient, kRunning, kPending, kQueue, kPendingIdx, kRunningIdx, kError, kSocket, kStrictContentLength, kOnError, kMaxConcurrentStreams, kHTTP2Session, kResume, kSize, kHTTPContext } = require('../core/symbols.js') const kOpenStreams = Symbol('open streams') let extractBody // Experimental let h2ExperimentalWarned = false /** @type {import('http2')} */ let http2 try { http2 = require('node:http2') } catch { // @ts-ignore http2 = { constants: {} } } const { constants: { HTTP2_HEADER_AUTHORITY, HTTP2_HEADER_METHOD, HTTP2_HEADER_PATH, HTTP2_HEADER_SCHEME, HTTP2_HEADER_CONTENT_LENGTH, HTTP2_HEADER_EXPECT, HTTP2_HEADER_STATUS } } = http2 function parseH2Headers (headers) { const result = [] for (const [name, value] of Object.entries(headers)) { // h2 may concat the header value by array // e.g. Set-Cookie if (Array.isArray(value)) { for (const subvalue of value) { // we need to provide each header value of header name // because the headers handler expect name-value pair result.push(Buffer.from(name), Buffer.from(subvalue)) } } else { result.push(Buffer.from(name), Buffer.from(value)) } } return result } async function connectH2 (client, socket) { client[kSocket] = socket if (!h2ExperimentalWarned) { h2ExperimentalWarned = true process.emitWarning('H2 support is experimental, expect them to change at any time.', { code: 'UNDICI-H2' }) } const session = http2.connect(client[kUrl], { createConnection: () => socket, peerMaxConcurrentStreams: client[kMaxConcurrentStreams] }) session[kOpenStreams] = 0 session[kClient] = client session[kSocket] = socket util.addListener(session, 'error', onHttp2SessionError) util.addListener(session, 'frameError', onHttp2FrameError) util.addListener(session, 'end', onHttp2SessionEnd) util.addListener(session, 'goaway', onHTTP2GoAway) util.addListener(session, 'close', function () { const { [kClient]: client } = this const { [kSocket]: socket } = client const err = this[kSocket][kError] || this[kError] || new SocketError('closed', util.getSocketInfo(socket)) client[kHTTP2Session] = null if (client.destroyed) { assert(client[kPending] === 0) // Fail entire queue. const requests = client[kQueue].splice(client[kRunningIdx]) for (let i = 0; i < requests.length; i++) { const request = requests[i] util.errorRequest(client, request, err) } } }) session.unref() client[kHTTP2Session] = session socket[kHTTP2Session] = session util.addListener(socket, 'error', function (err) { assert(err.code !== 'ERR_TLS_CERT_ALTNAME_INVALID') this[kError] = err this[kClient][kOnError](err) }) util.addListener(socket, 'end', function () { util.destroy(this, new SocketError('other side closed', util.getSocketInfo(this))) }) util.addListener(socket, 'close', function () { const err = this[kError] || new SocketError('closed', util.getSocketInfo(this)) client[kSocket] = null if (this[kHTTP2Session] != null) { this[kHTTP2Session].destroy(err) } client[kPendingIdx] = client[kRunningIdx] assert(client[kRunning] === 0) client.emit('disconnect', client[kUrl], [client], err) client[kResume]() }) let closed = false socket.on('close', () => { closed = true }) return { version: 'h2', defaultPipelining: Infinity, write (...args) { return writeH2(client, ...args) }, resume () { resumeH2(client) }, destroy (err, callback) { if (closed) { queueMicrotask(callback) } else { // Destroying the socket will trigger the session close socket.destroy(err).on('close', callback) } }, get destroyed () { return socket.destroyed }, busy () { return false } } } function resumeH2 (client) { const socket = client[kSocket] if (socket?.destroyed === false) { if (client[kSize] === 0 && client[kMaxConcurrentStreams] === 0) { socket.unref() client[kHTTP2Session].unref() } else { socket.ref() client[kHTTP2Session].ref() } } } function onHttp2SessionError (err) { assert(err.code !== 'ERR_TLS_CERT_ALTNAME_INVALID') this[kSocket][kError] = err this[kClient][kOnError](err) } function onHttp2FrameError (type, code, id) { if (id === 0) { const err = new InformationalError(`HTTP/2: "frameError" received - type ${type}, code ${code}`) this[kSocket][kError] = err this[kClient][kOnError](err) } } function onHttp2SessionEnd () { const err = new SocketError('other side closed', util.getSocketInfo(this[kSocket])) this.destroy(err) util.destroy(this[kSocket], err) } /** * This is the root cause of #3011 * We need to handle GOAWAY frames properly, and trigger the session close * along with the socket right away */ function onHTTP2GoAway (code) { // We cannot recover, so best to close the session and the socket const err = this[kError] || new SocketError(`HTTP/2: "GOAWAY" frame received with code ${code}`, util.getSocketInfo(this)) const client = this[kClient] client[kSocket] = null client[kHTTPContext] = null if (this[kHTTP2Session] != null) { this[kHTTP2Session].destroy(err) this[kHTTP2Session] = null } util.destroy(this[kSocket], err) // Fail head of pipeline. if (client[kRunningIdx] < client[kQueue].length) { const request = client[kQueue][client[kRunningIdx]] client[kQueue][client[kRunningIdx]++] = null util.errorRequest(client, request, err) client[kPendingIdx] = client[kRunningIdx] } assert(client[kRunning] === 0) client.emit('disconnect', client[kUrl], [client], err) client[kResume]() } // https://www.rfc-editor.org/rfc/rfc7230#section-3.3.2 function shouldSendContentLength (method) { return method !== 'GET' && method !== 'HEAD' && method !== 'OPTIONS' && method !== 'TRACE' && method !== 'CONNECT' } function writeH2 (client, request) { const session = client[kHTTP2Session] const { method, path, host, upgrade, expectContinue, signal, headers: reqHeaders } = request let { body } = request if (upgrade) { util.errorRequest(client, request, new Error('Upgrade not supported for H2')) return false } const headers = {} for (let n = 0; n < reqHeaders.length; n += 2) { const key = reqHeaders[n + 0] const val = reqHeaders[n + 1] if (Array.isArray(val)) { for (let i = 0; i < val.length; i++) { if (headers[key]) { headers[key] += `,${val[i]}` } else { headers[key] = val[i] } } } else { headers[key] = val } } /** @type {import('node:http2').ClientHttp2Stream} */ let stream const { hostname, port } = client[kUrl] headers[HTTP2_HEADER_AUTHORITY] = host || `${hostname}${port ? `:${port}` : ''}` headers[HTTP2_HEADER_METHOD] = method const abort = (err) => { if (request.aborted || request.completed) { return } err = err || new RequestAbortedError() util.errorRequest(client, request, err) if (stream != null) { util.destroy(stream, err) } // We do not destroy the socket as we can continue using the session // the stream get's destroyed and the session remains to create new streams util.destroy(body, err) client[kQueue][client[kRunningIdx]++] = null client[kResume]() } try { // We are already connected, streams are pending. // We can call on connect, and wait for abort request.onConnect(abort) } catch (err) { util.errorRequest(client, request, err) } if (request.aborted) { return false } if (method === 'CONNECT') { session.ref() // We are already connected, streams are pending, first request // will create a new stream. We trigger a request to create the stream and wait until // `ready` event is triggered // We disabled endStream to allow the user to write to the stream stream = session.request(headers, { endStream: false, signal }) if (stream.id && !stream.pending) { request.onUpgrade(null, null, stream) ++session[kOpenStreams] client[kQueue][client[kRunningIdx]++] = null } else { stream.once('ready', () => { request.onUpgrade(null, null, stream) ++session[kOpenStreams] client[kQueue][client[kRunningIdx]++] = null }) } stream.once('close', () => { session[kOpenStreams] -= 1 if (session[kOpenStreams] === 0) session.unref() }) return true } // https://tools.ietf.org/html/rfc7540#section-8.3 // :path and :scheme headers must be omitted when sending CONNECT headers[HTTP2_HEADER_PATH] = path headers[HTTP2_HEADER_SCHEME] = 'https' // https://tools.ietf.org/html/rfc7231#section-4.3.1 // https://tools.ietf.org/html/rfc7231#section-4.3.2 // https://tools.ietf.org/html/rfc7231#section-4.3.5 // Sending a payload body on a request that does not // expect it can cause undefined behavior on some // servers and corrupt connection state. Do not // re-use the connection for further requests. const expectsPayload = ( method === 'PUT' || method === 'POST' || method === 'PATCH' ) if (body && typeof body.read === 'function') { // Try to read EOF in order to get length. body.read(0) } let contentLength = util.bodyLength(body) if (util.isFormDataLike(body)) { extractBody ??= require('../web/fetch/body.js').extractBody const [bodyStream, contentType] = extractBody(body) headers['content-type'] = contentType body = bodyStream.stream contentLength = bodyStream.length } if (contentLength == null) { contentLength = request.contentLength } if (contentLength === 0 || !expectsPayload) { // https://tools.ietf.org/html/rfc7230#section-3.3.2 // A user agent SHOULD NOT send a Content-Length header field when // the request message does not contain a payload body and the method // semantics do not anticipate such a body. contentLength = null } // https://github.com/nodejs/undici/issues/2046 // A user agent may send a Content-Length header with 0 value, this should be allowed. if (shouldSendContentLength(method) && contentLength > 0 && request.contentLength != null && request.contentLength !== contentLength) { if (client[kStrictContentLength]) { util.errorRequest(client, request, new RequestContentLengthMismatchError()) return false } process.emitWarning(new RequestContentLengthMismatchError()) } if (contentLength != null) { assert(body, 'no body must not have content length') headers[HTTP2_HEADER_CONTENT_LENGTH] = `${contentLength}` } session.ref() const shouldEndStream = method === 'GET' || method === 'HEAD' || body === null if (expectContinue) { headers[HTTP2_HEADER_EXPECT] = '100-continue' stream = session.request(headers, { endStream: shouldEndStream, signal }) stream.once('continue', writeBodyH2) } else { stream = session.request(headers, { endStream: shouldEndStream, signal }) writeBodyH2() } // Increment counter as we have new streams open ++session[kOpenStreams] stream.once('response', headers => { const { [HTTP2_HEADER_STATUS]: statusCode, ...realHeaders } = headers request.onResponseStarted() // Due to the stream nature, it is possible we face a race condition // where the stream has been assigned, but the request has been aborted // the request remains in-flight and headers hasn't been received yet // for those scenarios, best effort is to destroy the stream immediately // as there's no value to keep it open. if (request.aborted) { const err = new RequestAbortedError() util.errorRequest(client, request, err) util.destroy(stream, err) return } if (request.onHeaders(Number(statusCode), parseH2Headers(realHeaders), stream.resume.bind(stream), '') === false) { stream.pause() } stream.on('data', (chunk) => { if (request.onData(chunk) === false) { stream.pause() } }) }) stream.once('end', () => { // When state is null, it means we haven't consumed body and the stream still do not have // a state. // Present specially when using pipeline or stream if (stream.state?.state == null || stream.state.state < 6) { request.onComplete([]) } if (session[kOpenStreams] === 0) { // Stream is closed or half-closed-remote (6), decrement counter and cleanup // It does not have sense to continue working with the stream as we do not // have yet RST_STREAM support on client-side session.unref() } abort(new InformationalError('HTTP/2: stream half-closed (remote)')) client[kQueue][client[kRunningIdx]++] = null client[kPendingIdx] = client[kRunningIdx] client[kResume]() }) stream.once('close', () => { session[kOpenStreams] -= 1 if (session[kOpenStreams] === 0) { session.unref() } }) stream.once('error', function (err) { abort(err) }) stream.once('frameError', (type, code) => { abort(new InformationalError(`HTTP/2: "frameError" received - type ${type}, code ${code}`)) }) // stream.on('aborted', () => { // // TODO(HTTP/2): Support aborted // }) // stream.on('timeout', () => { // // TODO(HTTP/2): Support timeout // }) // stream.on('push', headers => { // // TODO(HTTP/2): Support push // }) // stream.on('trailers', headers => { // // TODO(HTTP/2): Support trailers // }) return true function writeBodyH2 () { /* istanbul ignore else: assertion */ if (!body || contentLength === 0) { writeBuffer( abort, stream, null, client, request, client[kSocket], contentLength, expectsPayload ) } else if (util.isBuffer(body)) { writeBuffer( abort, stream, body, client, request, client[kSocket], contentLength, expectsPayload ) } else if (util.isBlobLike(body)) { if (typeof body.stream === 'function') { writeIterable( abort, stream, body.stream(), client, request, client[kSocket], contentLength, expectsPayload ) } else { writeBlob( abort, stream, body, client, request, client[kSocket], contentLength, expectsPayload ) } } else if (util.isStream(body)) { writeStream( abort, client[kSocket], expectsPayload, stream, body, client, request, contentLength ) } else if (util.isIterable(body)) { writeIterable( abort, stream, body, client, request, client[kSocket], contentLength, expectsPayload ) } else { assert(false) } } } function writeBuffer (abort, h2stream, body, client, request, socket, contentLength, expectsPayload) { try { if (body != null && util.isBuffer(body)) { assert(contentLength === body.byteLength, 'buffer body must have content length') h2stream.cork() h2stream.write(body) h2stream.uncork() h2stream.end() request.onBodySent(body) } if (!expectsPayload) { socket[kReset] = true } request.onRequestSent() client[kResume]() } catch (error) { abort(error) } } function writeStream (abort, socket, expectsPayload, h2stream, body, client, request, contentLength) { assert(contentLength !== 0 || client[kRunning] === 0, 'stream body cannot be pipelined') // For HTTP/2, is enough to pipe the stream const pipe = pipeline( body, h2stream, (err) => { if (err) { util.destroy(pipe, err) abort(err) } else { util.removeAllListeners(pipe) request.onRequestSent() if (!expectsPayload) { socket[kReset] = true } client[kResume]() } } ) util.addListener(pipe, 'data', onPipeData) function onPipeData (chunk) { request.onBodySent(chunk) } } async function writeBlob (abort, h2stream, body, client, request, socket, contentLength, expectsPayload) { assert(contentLength === body.size, 'blob body must have content length') try { if (contentLength != null && contentLength !== body.size) { throw new RequestContentLengthMismatchError() } const buffer = Buffer.from(await body.arrayBuffer()) h2stream.cork() h2stream.write(buffer) h2stream.uncork() h2stream.end() request.onBodySent(buffer) request.onRequestSent() if (!expectsPayload) { socket[kReset] = true } client[kResume]() } catch (err) { abort(err) } } async function writeIterable (abort, h2stream, body, client, request, socket, contentLength, expectsPayload) { assert(contentLength !== 0 || client[kRunning] === 0, 'iterator body cannot be pipelined') let callback = null function onDrain () { if (callback) { const cb = callback callback = null cb() } } const waitForDrain = () => new Promise((resolve, reject) => { assert(callback === null) if (socket[kError]) { reject(socket[kError]) } else { callback = resolve } }) h2stream .on('close', onDrain) .on('drain', onDrain) try { // It's up to the user to somehow abort the async iterable. for await (const chunk of body) { if (socket[kError]) { throw socket[kError] } const res = h2stream.write(chunk) request.onBodySent(chunk) if (!res) { await waitForDrain() } } h2stream.end() request.onRequestSent() if (!expectsPayload) { socket[kReset] = true } client[kResume]() } catch (err) { abort(err) } finally { h2stream .off('close', onDrain) .off('drain', onDrain) } } module.exports = connectH2 node_modules/undici/lib/dispatcher/client-h1.js 0000664 00000110765 15114741631 0015531 0 ustar 00 'use strict' /* global WebAssembly */ const assert = require('node:assert') const util = require('../core/util.js') const { channels } = require('../core/diagnostics.js') const timers = require('../util/timers.js') const { RequestContentLengthMismatchError, ResponseContentLengthMismatchError, RequestAbortedError, HeadersTimeoutError, HeadersOverflowError, SocketError, InformationalError, BodyTimeoutError, HTTPParserError, ResponseExceededMaxSizeError } = require('../core/errors.js') const { kUrl, kReset, kClient, kParser, kBlocking, kRunning, kPending, kSize, kWriting, kQueue, kNoRef, kKeepAliveDefaultTimeout, kHostHeader, kPendingIdx, kRunningIdx, kError, kPipelining, kSocket, kKeepAliveTimeoutValue, kMaxHeadersSize, kKeepAliveMaxTimeout, kKeepAliveTimeoutThreshold, kHeadersTimeout, kBodyTimeout, kStrictContentLength, kMaxRequests, kCounter, kMaxResponseSize, kOnError, kResume, kHTTPContext } = require('../core/symbols.js') const constants = require('../llhttp/constants.js') const EMPTY_BUF = Buffer.alloc(0) const FastBuffer = Buffer[Symbol.species] const addListener = util.addListener const removeAllListeners = util.removeAllListeners let extractBody async function lazyllhttp () { const llhttpWasmData = process.env.JEST_WORKER_ID ? require('../llhttp/llhttp-wasm.js') : undefined let mod try { mod = await WebAssembly.compile(require('../llhttp/llhttp_simd-wasm.js')) } catch (e) { /* istanbul ignore next */ // We could check if the error was caused by the simd option not // being enabled, but the occurring of this other error // * https://github.com/emscripten-core/emscripten/issues/11495 // got me to remove that check to avoid breaking Node 12. mod = await WebAssembly.compile(llhttpWasmData || require('../llhttp/llhttp-wasm.js')) } return await WebAssembly.instantiate(mod, { env: { /* eslint-disable camelcase */ wasm_on_url: (p, at, len) => { /* istanbul ignore next */ return 0 }, wasm_on_status: (p, at, len) => { assert(currentParser.ptr === p) const start = at - currentBufferPtr + currentBufferRef.byteOffset return currentParser.onStatus(new FastBuffer(currentBufferRef.buffer, start, len)) || 0 }, wasm_on_message_begin: (p) => { assert(currentParser.ptr === p) return currentParser.onMessageBegin() || 0 }, wasm_on_header_field: (p, at, len) => { assert(currentParser.ptr === p) const start = at - currentBufferPtr + currentBufferRef.byteOffset return currentParser.onHeaderField(new FastBuffer(currentBufferRef.buffer, start, len)) || 0 }, wasm_on_header_value: (p, at, len) => { assert(currentParser.ptr === p) const start = at - currentBufferPtr + currentBufferRef.byteOffset return currentParser.onHeaderValue(new FastBuffer(currentBufferRef.buffer, start, len)) || 0 }, wasm_on_headers_complete: (p, statusCode, upgrade, shouldKeepAlive) => { assert(currentParser.ptr === p) return currentParser.onHeadersComplete(statusCode, Boolean(upgrade), Boolean(shouldKeepAlive)) || 0 }, wasm_on_body: (p, at, len) => { assert(currentParser.ptr === p) const start = at - currentBufferPtr + currentBufferRef.byteOffset return currentParser.onBody(new FastBuffer(currentBufferRef.buffer, start, len)) || 0 }, wasm_on_message_complete: (p) => { assert(currentParser.ptr === p) return currentParser.onMessageComplete() || 0 } /* eslint-enable camelcase */ } }) } let llhttpInstance = null let llhttpPromise = lazyllhttp() llhttpPromise.catch() let currentParser = null let currentBufferRef = null let currentBufferSize = 0 let currentBufferPtr = null const USE_NATIVE_TIMER = 0 const USE_FAST_TIMER = 1 // Use fast timers for headers and body to take eventual event loop // latency into account. const TIMEOUT_HEADERS = 2 | USE_FAST_TIMER const TIMEOUT_BODY = 4 | USE_FAST_TIMER // Use native timers to ignore event loop latency for keep-alive // handling. const TIMEOUT_KEEP_ALIVE = 8 | USE_NATIVE_TIMER class Parser { constructor (client, socket, { exports }) { assert(Number.isFinite(client[kMaxHeadersSize]) && client[kMaxHeadersSize] > 0) this.llhttp = exports this.ptr = this.llhttp.llhttp_alloc(constants.TYPE.RESPONSE) this.client = client this.socket = socket this.timeout = null this.timeoutValue = null this.timeoutType = null this.statusCode = null this.statusText = '' this.upgrade = false this.headers = [] this.headersSize = 0 this.headersMaxSize = client[kMaxHeadersSize] this.shouldKeepAlive = false this.paused = false this.resume = this.resume.bind(this) this.bytesRead = 0 this.keepAlive = '' this.contentLength = '' this.connection = '' this.maxResponseSize = client[kMaxResponseSize] } setTimeout (delay, type) { // If the existing timer and the new timer are of different timer type // (fast or native) or have different delay, we need to clear the existing // timer and set a new one. if ( delay !== this.timeoutValue || (type & USE_FAST_TIMER) ^ (this.timeoutType & USE_FAST_TIMER) ) { // If a timeout is already set, clear it with clearTimeout of the fast // timer implementation, as it can clear fast and native timers. if (this.timeout) { timers.clearTimeout(this.timeout) this.timeout = null } if (delay) { if (type & USE_FAST_TIMER) { this.timeout = timers.setFastTimeout(onParserTimeout, delay, new WeakRef(this)) } else { this.timeout = setTimeout(onParserTimeout, delay, new WeakRef(this)) this.timeout.unref() } } this.timeoutValue = delay } else if (this.timeout) { // istanbul ignore else: only for jest if (this.timeout.refresh) { this.timeout.refresh() } } this.timeoutType = type } resume () { if (this.socket.destroyed || !this.paused) { return } assert(this.ptr != null) assert(currentParser == null) this.llhttp.llhttp_resume(this.ptr) assert(this.timeoutType === TIMEOUT_BODY) if (this.timeout) { // istanbul ignore else: only for jest if (this.timeout.refresh) { this.timeout.refresh() } } this.paused = false this.execute(this.socket.read() || EMPTY_BUF) // Flush parser. this.readMore() } readMore () { while (!this.paused && this.ptr) { const chunk = this.socket.read() if (chunk === null) { break } this.execute(chunk) } } execute (data) { assert(this.ptr != null) assert(currentParser == null) assert(!this.paused) const { socket, llhttp } = this if (data.length > currentBufferSize) { if (currentBufferPtr) { llhttp.free(currentBufferPtr) } currentBufferSize = Math.ceil(data.length / 4096) * 4096 currentBufferPtr = llhttp.malloc(currentBufferSize) } new Uint8Array(llhttp.memory.buffer, currentBufferPtr, currentBufferSize).set(data) // Call `execute` on the wasm parser. // We pass the `llhttp_parser` pointer address, the pointer address of buffer view data, // and finally the length of bytes to parse. // The return value is an error code or `constants.ERROR.OK`. try { let ret try { currentBufferRef = data currentParser = this ret = llhttp.llhttp_execute(this.ptr, currentBufferPtr, data.length) /* eslint-disable-next-line no-useless-catch */ } catch (err) { /* istanbul ignore next: difficult to make a test case for */ throw err } finally { currentParser = null currentBufferRef = null } const offset = llhttp.llhttp_get_error_pos(this.ptr) - currentBufferPtr if (ret === constants.ERROR.PAUSED_UPGRADE) { this.onUpgrade(data.slice(offset)) } else if (ret === constants.ERROR.PAUSED) { this.paused = true socket.unshift(data.slice(offset)) } else if (ret !== constants.ERROR.OK) { const ptr = llhttp.llhttp_get_error_reason(this.ptr) let message = '' /* istanbul ignore else: difficult to make a test case for */ if (ptr) { const len = new Uint8Array(llhttp.memory.buffer, ptr).indexOf(0) message = 'Response does not match the HTTP/1.1 protocol (' + Buffer.from(llhttp.memory.buffer, ptr, len).toString() + ')' } throw new HTTPParserError(message, constants.ERROR[ret], data.slice(offset)) } } catch (err) { util.destroy(socket, err) } } destroy () { assert(this.ptr != null) assert(currentParser == null) this.llhttp.llhttp_free(this.ptr) this.ptr = null this.timeout && timers.clearTimeout(this.timeout) this.timeout = null this.timeoutValue = null this.timeoutType = null this.paused = false } onStatus (buf) { this.statusText = buf.toString() } onMessageBegin () { const { socket, client } = this /* istanbul ignore next: difficult to make a test case for */ if (socket.destroyed) { return -1 } const request = client[kQueue][client[kRunningIdx]] if (!request) { return -1 } request.onResponseStarted() } onHeaderField (buf) { const len = this.headers.length if ((len & 1) === 0) { this.headers.push(buf) } else { this.headers[len - 1] = Buffer.concat([this.headers[len - 1], buf]) } this.trackHeader(buf.length) } onHeaderValue (buf) { let len = this.headers.length if ((len & 1) === 1) { this.headers.push(buf) len += 1 } else { this.headers[len - 1] = Buffer.concat([this.headers[len - 1], buf]) } const key = this.headers[len - 2] if (key.length === 10) { const headerName = util.bufferToLowerCasedHeaderName(key) if (headerName === 'keep-alive') { this.keepAlive += buf.toString() } else if (headerName === 'connection') { this.connection += buf.toString() } } else if (key.length === 14 && util.bufferToLowerCasedHeaderName(key) === 'content-length') { this.contentLength += buf.toString() } this.trackHeader(buf.length) } trackHeader (len) { this.headersSize += len if (this.headersSize >= this.headersMaxSize) { util.destroy(this.socket, new HeadersOverflowError()) } } onUpgrade (head) { const { upgrade, client, socket, headers, statusCode } = this assert(upgrade) assert(client[kSocket] === socket) assert(!socket.destroyed) assert(!this.paused) assert((headers.length & 1) === 0) const request = client[kQueue][client[kRunningIdx]] assert(request) assert(request.upgrade || request.method === 'CONNECT') this.statusCode = null this.statusText = '' this.shouldKeepAlive = null this.headers = [] this.headersSize = 0 socket.unshift(head) socket[kParser].destroy() socket[kParser] = null socket[kClient] = null socket[kError] = null removeAllListeners(socket) client[kSocket] = null client[kHTTPContext] = null // TODO (fix): This is hacky... client[kQueue][client[kRunningIdx]++] = null client.emit('disconnect', client[kUrl], [client], new InformationalError('upgrade')) try { request.onUpgrade(statusCode, headers, socket) } catch (err) { util.destroy(socket, err) } client[kResume]() } onHeadersComplete (statusCode, upgrade, shouldKeepAlive) { const { client, socket, headers, statusText } = this /* istanbul ignore next: difficult to make a test case for */ if (socket.destroyed) { return -1 } const request = client[kQueue][client[kRunningIdx]] /* istanbul ignore next: difficult to make a test case for */ if (!request) { return -1 } assert(!this.upgrade) assert(this.statusCode < 200) if (statusCode === 100) { util.destroy(socket, new SocketError('bad response', util.getSocketInfo(socket))) return -1 } /* this can only happen if server is misbehaving */ if (upgrade && !request.upgrade) { util.destroy(socket, new SocketError('bad upgrade', util.getSocketInfo(socket))) return -1 } assert(this.timeoutType === TIMEOUT_HEADERS) this.statusCode = statusCode this.shouldKeepAlive = ( shouldKeepAlive || // Override llhttp value which does not allow keepAlive for HEAD. (request.method === 'HEAD' && !socket[kReset] && this.connection.toLowerCase() === 'keep-alive') ) if (this.statusCode >= 200) { const bodyTimeout = request.bodyTimeout != null ? request.bodyTimeout : client[kBodyTimeout] this.setTimeout(bodyTimeout, TIMEOUT_BODY) } else if (this.timeout) { // istanbul ignore else: only for jest if (this.timeout.refresh) { this.timeout.refresh() } } if (request.method === 'CONNECT') { assert(client[kRunning] === 1) this.upgrade = true return 2 } if (upgrade) { assert(client[kRunning] === 1) this.upgrade = true return 2 } assert((this.headers.length & 1) === 0) this.headers = [] this.headersSize = 0 if (this.shouldKeepAlive && client[kPipelining]) { const keepAliveTimeout = this.keepAlive ? util.parseKeepAliveTimeout(this.keepAlive) : null if (keepAliveTimeout != null) { const timeout = Math.min( keepAliveTimeout - client[kKeepAliveTimeoutThreshold], client[kKeepAliveMaxTimeout] ) if (timeout <= 0) { socket[kReset] = true } else { client[kKeepAliveTimeoutValue] = timeout } } else { client[kKeepAliveTimeoutValue] = client[kKeepAliveDefaultTimeout] } } else { // Stop more requests from being dispatched. socket[kReset] = true } const pause = request.onHeaders(statusCode, headers, this.resume, statusText) === false if (request.aborted) { return -1 } if (request.method === 'HEAD') { return 1 } if (statusCode < 200) { return 1 } if (socket[kBlocking]) { socket[kBlocking] = false client[kResume]() } return pause ? constants.ERROR.PAUSED : 0 } onBody (buf) { const { client, socket, statusCode, maxResponseSize } = this if (socket.destroyed) { return -1 } const request = client[kQueue][client[kRunningIdx]] assert(request) assert(this.timeoutType === TIMEOUT_BODY) if (this.timeout) { // istanbul ignore else: only for jest if (this.timeout.refresh) { this.timeout.refresh() } } assert(statusCode >= 200) if (maxResponseSize > -1 && this.bytesRead + buf.length > maxResponseSize) { util.destroy(socket, new ResponseExceededMaxSizeError()) return -1 } this.bytesRead += buf.length if (request.onData(buf) === false) { return constants.ERROR.PAUSED } } onMessageComplete () { const { client, socket, statusCode, upgrade, headers, contentLength, bytesRead, shouldKeepAlive } = this if (socket.destroyed && (!statusCode || shouldKeepAlive)) { return -1 } if (upgrade) { return } assert(statusCode >= 100) assert((this.headers.length & 1) === 0) const request = client[kQueue][client[kRunningIdx]] assert(request) this.statusCode = null this.statusText = '' this.bytesRead = 0 this.contentLength = '' this.keepAlive = '' this.connection = '' this.headers = [] this.headersSize = 0 if (statusCode < 200) { return } /* istanbul ignore next: should be handled by llhttp? */ if (request.method !== 'HEAD' && contentLength && bytesRead !== parseInt(contentLength, 10)) { util.destroy(socket, new ResponseContentLengthMismatchError()) return -1 } request.onComplete(headers) client[kQueue][client[kRunningIdx]++] = null if (socket[kWriting]) { assert(client[kRunning] === 0) // Response completed before request. util.destroy(socket, new InformationalError('reset')) return constants.ERROR.PAUSED } else if (!shouldKeepAlive) { util.destroy(socket, new InformationalError('reset')) return constants.ERROR.PAUSED } else if (socket[kReset] && client[kRunning] === 0) { // Destroy socket once all requests have completed. // The request at the tail of the pipeline is the one // that requested reset and no further requests should // have been queued since then. util.destroy(socket, new InformationalError('reset')) return constants.ERROR.PAUSED } else if (client[kPipelining] == null || client[kPipelining] === 1) { // We must wait a full event loop cycle to reuse this socket to make sure // that non-spec compliant servers are not closing the connection even if they // said they won't. setImmediate(() => client[kResume]()) } else { client[kResume]() } } } function onParserTimeout (parser) { const { socket, timeoutType, client, paused } = parser.deref() /* istanbul ignore else */ if (timeoutType === TIMEOUT_HEADERS) { if (!socket[kWriting] || socket.writableNeedDrain || client[kRunning] > 1) { assert(!paused, 'cannot be paused while waiting for headers') util.destroy(socket, new HeadersTimeoutError()) } } else if (timeoutType === TIMEOUT_BODY) { if (!paused) { util.destroy(socket, new BodyTimeoutError()) } } else if (timeoutType === TIMEOUT_KEEP_ALIVE) { assert(client[kRunning] === 0 && client[kKeepAliveTimeoutValue]) util.destroy(socket, new InformationalError('socket idle timeout')) } } async function connectH1 (client, socket) { client[kSocket] = socket if (!llhttpInstance) { llhttpInstance = await llhttpPromise llhttpPromise = null } socket[kNoRef] = false socket[kWriting] = false socket[kReset] = false socket[kBlocking] = false socket[kParser] = new Parser(client, socket, llhttpInstance) addListener(socket, 'error', function (err) { assert(err.code !== 'ERR_TLS_CERT_ALTNAME_INVALID') const parser = this[kParser] // On Mac OS, we get an ECONNRESET even if there is a full body to be forwarded // to the user. if (err.code === 'ECONNRESET' && parser.statusCode && !parser.shouldKeepAlive) { // We treat all incoming data so for as a valid response. parser.onMessageComplete() return } this[kError] = err this[kClient][kOnError](err) }) addListener(socket, 'readable', function () { const parser = this[kParser] if (parser) { parser.readMore() } }) addListener(socket, 'end', function () { const parser = this[kParser] if (parser.statusCode && !parser.shouldKeepAlive) { // We treat all incoming data so far as a valid response. parser.onMessageComplete() return } util.destroy(this, new SocketError('other side closed', util.getSocketInfo(this))) }) addListener(socket, 'close', function () { const client = this[kClient] const parser = this[kParser] if (parser) { if (!this[kError] && parser.statusCode && !parser.shouldKeepAlive) { // We treat all incoming data so far as a valid response. parser.onMessageComplete() } this[kParser].destroy() this[kParser] = null } const err = this[kError] || new SocketError('closed', util.getSocketInfo(this)) client[kSocket] = null client[kHTTPContext] = null // TODO (fix): This is hacky... if (client.destroyed) { assert(client[kPending] === 0) // Fail entire queue. const requests = client[kQueue].splice(client[kRunningIdx]) for (let i = 0; i < requests.length; i++) { const request = requests[i] util.errorRequest(client, request, err) } } else if (client[kRunning] > 0 && err.code !== 'UND_ERR_INFO') { // Fail head of pipeline. const request = client[kQueue][client[kRunningIdx]] client[kQueue][client[kRunningIdx]++] = null util.errorRequest(client, request, err) } client[kPendingIdx] = client[kRunningIdx] assert(client[kRunning] === 0) client.emit('disconnect', client[kUrl], [client], err) client[kResume]() }) let closed = false socket.on('close', () => { closed = true }) return { version: 'h1', defaultPipelining: 1, write (...args) { return writeH1(client, ...args) }, resume () { resumeH1(client) }, destroy (err, callback) { if (closed) { queueMicrotask(callback) } else { socket.destroy(err).on('close', callback) } }, get destroyed () { return socket.destroyed }, busy (request) { if (socket[kWriting] || socket[kReset] || socket[kBlocking]) { return true } if (request) { if (client[kRunning] > 0 && !request.idempotent) { // Non-idempotent request cannot be retried. // Ensure that no other requests are inflight and // could cause failure. return true } if (client[kRunning] > 0 && (request.upgrade || request.method === 'CONNECT')) { // Don't dispatch an upgrade until all preceding requests have completed. // A misbehaving server might upgrade the connection before all pipelined // request has completed. return true } if (client[kRunning] > 0 && util.bodyLength(request.body) !== 0 && (util.isStream(request.body) || util.isAsyncIterable(request.body) || util.isFormDataLike(request.body))) { // Request with stream or iterator body can error while other requests // are inflight and indirectly error those as well. // Ensure this doesn't happen by waiting for inflight // to complete before dispatching. // Request with stream or iterator body cannot be retried. // Ensure that no other requests are inflight and // could cause failure. return true } } return false } } } function resumeH1 (client) { const socket = client[kSocket] if (socket && !socket.destroyed) { if (client[kSize] === 0) { if (!socket[kNoRef] && socket.unref) { socket.unref() socket[kNoRef] = true } } else if (socket[kNoRef] && socket.ref) { socket.ref() socket[kNoRef] = false } if (client[kSize] === 0) { if (socket[kParser].timeoutType !== TIMEOUT_KEEP_ALIVE) { socket[kParser].setTimeout(client[kKeepAliveTimeoutValue], TIMEOUT_KEEP_ALIVE) } } else if (client[kRunning] > 0 && socket[kParser].statusCode < 200) { if (socket[kParser].timeoutType !== TIMEOUT_HEADERS) { const request = client[kQueue][client[kRunningIdx]] const headersTimeout = request.headersTimeout != null ? request.headersTimeout : client[kHeadersTimeout] socket[kParser].setTimeout(headersTimeout, TIMEOUT_HEADERS) } } } } // https://www.rfc-editor.org/rfc/rfc7230#section-3.3.2 function shouldSendContentLength (method) { return method !== 'GET' && method !== 'HEAD' && method !== 'OPTIONS' && method !== 'TRACE' && method !== 'CONNECT' } function writeH1 (client, request) { const { method, path, host, upgrade, blocking, reset } = request let { body, headers, contentLength } = request // https://tools.ietf.org/html/rfc7231#section-4.3.1 // https://tools.ietf.org/html/rfc7231#section-4.3.2 // https://tools.ietf.org/html/rfc7231#section-4.3.5 // Sending a payload body on a request that does not // expect it can cause undefined behavior on some // servers and corrupt connection state. Do not // re-use the connection for further requests. const expectsPayload = ( method === 'PUT' || method === 'POST' || method === 'PATCH' || method === 'QUERY' || method === 'PROPFIND' || method === 'PROPPATCH' ) if (util.isFormDataLike(body)) { if (!extractBody) { extractBody = require('../web/fetch/body.js').extractBody } const [bodyStream, contentType] = extractBody(body) if (request.contentType == null) { headers.push('content-type', contentType) } body = bodyStream.stream contentLength = bodyStream.length } else if (util.isBlobLike(body) && request.contentType == null && body.type) { headers.push('content-type', body.type) } if (body && typeof body.read === 'function') { // Try to read EOF in order to get length. body.read(0) } const bodyLength = util.bodyLength(body) contentLength = bodyLength ?? contentLength if (contentLength === null) { contentLength = request.contentLength } if (contentLength === 0 && !expectsPayload) { // https://tools.ietf.org/html/rfc7230#section-3.3.2 // A user agent SHOULD NOT send a Content-Length header field when // the request message does not contain a payload body and the method // semantics do not anticipate such a body. contentLength = null } // https://github.com/nodejs/undici/issues/2046 // A user agent may send a Content-Length header with 0 value, this should be allowed. if (shouldSendContentLength(method) && contentLength > 0 && request.contentLength !== null && request.contentLength !== contentLength) { if (client[kStrictContentLength]) { util.errorRequest(client, request, new RequestContentLengthMismatchError()) return false } process.emitWarning(new RequestContentLengthMismatchError()) } const socket = client[kSocket] const abort = (err) => { if (request.aborted || request.completed) { return } util.errorRequest(client, request, err || new RequestAbortedError()) util.destroy(body) util.destroy(socket, new InformationalError('aborted')) } try { request.onConnect(abort) } catch (err) { util.errorRequest(client, request, err) } if (request.aborted) { return false } if (method === 'HEAD') { // https://github.com/mcollina/undici/issues/258 // Close after a HEAD request to interop with misbehaving servers // that may send a body in the response. socket[kReset] = true } if (upgrade || method === 'CONNECT') { // On CONNECT or upgrade, block pipeline from dispatching further // requests on this connection. socket[kReset] = true } if (reset != null) { socket[kReset] = reset } if (client[kMaxRequests] && socket[kCounter]++ >= client[kMaxRequests]) { socket[kReset] = true } if (blocking) { socket[kBlocking] = true } let header = `${method} ${path} HTTP/1.1\r\n` if (typeof host === 'string') { header += `host: ${host}\r\n` } else { header += client[kHostHeader] } if (upgrade) { header += `connection: upgrade\r\nupgrade: ${upgrade}\r\n` } else if (client[kPipelining] && !socket[kReset]) { header += 'connection: keep-alive\r\n' } else { header += 'connection: close\r\n' } if (Array.isArray(headers)) { for (let n = 0; n < headers.length; n += 2) { const key = headers[n + 0] const val = headers[n + 1] if (Array.isArray(val)) { for (let i = 0; i < val.length; i++) { header += `${key}: ${val[i]}\r\n` } } else { header += `${key}: ${val}\r\n` } } } if (channels.sendHeaders.hasSubscribers) { channels.sendHeaders.publish({ request, headers: header, socket }) } /* istanbul ignore else: assertion */ if (!body || bodyLength === 0) { writeBuffer(abort, null, client, request, socket, contentLength, header, expectsPayload) } else if (util.isBuffer(body)) { writeBuffer(abort, body, client, request, socket, contentLength, header, expectsPayload) } else if (util.isBlobLike(body)) { if (typeof body.stream === 'function') { writeIterable(abort, body.stream(), client, request, socket, contentLength, header, expectsPayload) } else { writeBlob(abort, body, client, request, socket, contentLength, header, expectsPayload) } } else if (util.isStream(body)) { writeStream(abort, body, client, request, socket, contentLength, header, expectsPayload) } else if (util.isIterable(body)) { writeIterable(abort, body, client, request, socket, contentLength, header, expectsPayload) } else { assert(false) } return true } function writeStream (abort, body, client, request, socket, contentLength, header, expectsPayload) { assert(contentLength !== 0 || client[kRunning] === 0, 'stream body cannot be pipelined') let finished = false const writer = new AsyncWriter({ abort, socket, request, contentLength, client, expectsPayload, header }) const onData = function (chunk) { if (finished) { return } try { if (!writer.write(chunk) && this.pause) { this.pause() } } catch (err) { util.destroy(this, err) } } const onDrain = function () { if (finished) { return } if (body.resume) { body.resume() } } const onClose = function () { // 'close' might be emitted *before* 'error' for // broken streams. Wait a tick to avoid this case. queueMicrotask(() => { // It's only safe to remove 'error' listener after // 'close'. body.removeListener('error', onFinished) }) if (!finished) { const err = new RequestAbortedError() queueMicrotask(() => onFinished(err)) } } const onFinished = function (err) { if (finished) { return } finished = true assert(socket.destroyed || (socket[kWriting] && client[kRunning] <= 1)) socket .off('drain', onDrain) .off('error', onFinished) body .removeListener('data', onData) .removeListener('end', onFinished) .removeListener('close', onClose) if (!err) { try { writer.end() } catch (er) { err = er } } writer.destroy(err) if (err && (err.code !== 'UND_ERR_INFO' || err.message !== 'reset')) { util.destroy(body, err) } else { util.destroy(body) } } body .on('data', onData) .on('end', onFinished) .on('error', onFinished) .on('close', onClose) if (body.resume) { body.resume() } socket .on('drain', onDrain) .on('error', onFinished) if (body.errorEmitted ?? body.errored) { setImmediate(() => onFinished(body.errored)) } else if (body.endEmitted ?? body.readableEnded) { setImmediate(() => onFinished(null)) } if (body.closeEmitted ?? body.closed) { setImmediate(onClose) } } function writeBuffer (abort, body, client, request, socket, contentLength, header, expectsPayload) { try { if (!body) { if (contentLength === 0) { socket.write(`${header}content-length: 0\r\n\r\n`, 'latin1') } else { assert(contentLength === null, 'no body must not have content length') socket.write(`${header}\r\n`, 'latin1') } } else if (util.isBuffer(body)) { assert(contentLength === body.byteLength, 'buffer body must have content length') socket.cork() socket.write(`${header}content-length: ${contentLength}\r\n\r\n`, 'latin1') socket.write(body) socket.uncork() request.onBodySent(body) if (!expectsPayload && request.reset !== false) { socket[kReset] = true } } request.onRequestSent() client[kResume]() } catch (err) { abort(err) } } async function writeBlob (abort, body, client, request, socket, contentLength, header, expectsPayload) { assert(contentLength === body.size, 'blob body must have content length') try { if (contentLength != null && contentLength !== body.size) { throw new RequestContentLengthMismatchError() } const buffer = Buffer.from(await body.arrayBuffer()) socket.cork() socket.write(`${header}content-length: ${contentLength}\r\n\r\n`, 'latin1') socket.write(buffer) socket.uncork() request.onBodySent(buffer) request.onRequestSent() if (!expectsPayload && request.reset !== false) { socket[kReset] = true } client[kResume]() } catch (err) { abort(err) } } async function writeIterable (abort, body, client, request, socket, contentLength, header, expectsPayload) { assert(contentLength !== 0 || client[kRunning] === 0, 'iterator body cannot be pipelined') let callback = null function onDrain () { if (callback) { const cb = callback callback = null cb() } } const waitForDrain = () => new Promise((resolve, reject) => { assert(callback === null) if (socket[kError]) { reject(socket[kError]) } else { callback = resolve } }) socket .on('close', onDrain) .on('drain', onDrain) const writer = new AsyncWriter({ abort, socket, request, contentLength, client, expectsPayload, header }) try { // It's up to the user to somehow abort the async iterable. for await (const chunk of body) { if (socket[kError]) { throw socket[kError] } if (!writer.write(chunk)) { await waitForDrain() } } writer.end() } catch (err) { writer.destroy(err) } finally { socket .off('close', onDrain) .off('drain', onDrain) } } class AsyncWriter { constructor ({ abort, socket, request, contentLength, client, expectsPayload, header }) { this.socket = socket this.request = request this.contentLength = contentLength this.client = client this.bytesWritten = 0 this.expectsPayload = expectsPayload this.header = header this.abort = abort socket[kWriting] = true } write (chunk) { const { socket, request, contentLength, client, bytesWritten, expectsPayload, header } = this if (socket[kError]) { throw socket[kError] } if (socket.destroyed) { return false } const len = Buffer.byteLength(chunk) if (!len) { return true } // We should defer writing chunks. if (contentLength !== null && bytesWritten + len > contentLength) { if (client[kStrictContentLength]) { throw new RequestContentLengthMismatchError() } process.emitWarning(new RequestContentLengthMismatchError()) } socket.cork() if (bytesWritten === 0) { if (!expectsPayload && request.reset !== false) { socket[kReset] = true } if (contentLength === null) { socket.write(`${header}transfer-encoding: chunked\r\n`, 'latin1') } else { socket.write(`${header}content-length: ${contentLength}\r\n\r\n`, 'latin1') } } if (contentLength === null) { socket.write(`\r\n${len.toString(16)}\r\n`, 'latin1') } this.bytesWritten += len const ret = socket.write(chunk) socket.uncork() request.onBodySent(chunk) if (!ret) { if (socket[kParser].timeout && socket[kParser].timeoutType === TIMEOUT_HEADERS) { // istanbul ignore else: only for jest if (socket[kParser].timeout.refresh) { socket[kParser].timeout.refresh() } } } return ret } end () { const { socket, contentLength, client, bytesWritten, expectsPayload, header, request } = this request.onRequestSent() socket[kWriting] = false if (socket[kError]) { throw socket[kError] } if (socket.destroyed) { return } if (bytesWritten === 0) { if (expectsPayload) { // https://tools.ietf.org/html/rfc7230#section-3.3.2 // A user agent SHOULD send a Content-Length in a request message when // no Transfer-Encoding is sent and the request method defines a meaning // for an enclosed payload body. socket.write(`${header}content-length: 0\r\n\r\n`, 'latin1') } else { socket.write(`${header}\r\n`, 'latin1') } } else if (contentLength === null) { socket.write('\r\n0\r\n\r\n', 'latin1') } if (contentLength !== null && bytesWritten !== contentLength) { if (client[kStrictContentLength]) { throw new RequestContentLengthMismatchError() } else { process.emitWarning(new RequestContentLengthMismatchError()) } } if (socket[kParser].timeout && socket[kParser].timeoutType === TIMEOUT_HEADERS) { // istanbul ignore else: only for jest if (socket[kParser].timeout.refresh) { socket[kParser].timeout.refresh() } } client[kResume]() } destroy (err) { const { socket, client, abort } = this socket[kWriting] = false if (err) { assert(client[kRunning] <= 1, 'pipeline should only contain this request') abort(err) } } } module.exports = connectH1 node_modules/undici/lib/dispatcher/dispatcher-base.js 0000664 00000010670 15114741631 0016775 0 ustar 00 'use strict' const Dispatcher = require('./dispatcher') const { ClientDestroyedError, ClientClosedError, InvalidArgumentError } = require('../core/errors') const { kDestroy, kClose, kClosed, kDestroyed, kDispatch, kInterceptors } = require('../core/symbols') const kOnDestroyed = Symbol('onDestroyed') const kOnClosed = Symbol('onClosed') const kInterceptedDispatch = Symbol('Intercepted Dispatch') class DispatcherBase extends Dispatcher { constructor () { super() this[kDestroyed] = false this[kOnDestroyed] = null this[kClosed] = false this[kOnClosed] = [] } get destroyed () { return this[kDestroyed] } get closed () { return this[kClosed] } get interceptors () { return this[kInterceptors] } set interceptors (newInterceptors) { if (newInterceptors) { for (let i = newInterceptors.length - 1; i >= 0; i--) { const interceptor = this[kInterceptors][i] if (typeof interceptor !== 'function') { throw new InvalidArgumentError('interceptor must be an function') } } } this[kInterceptors] = newInterceptors } close (callback) { if (callback === undefined) { return new Promise((resolve, reject) => { this.close((err, data) => { return err ? reject(err) : resolve(data) }) }) } if (typeof callback !== 'function') { throw new InvalidArgumentError('invalid callback') } if (this[kDestroyed]) { queueMicrotask(() => callback(new ClientDestroyedError(), null)) return } if (this[kClosed]) { if (this[kOnClosed]) { this[kOnClosed].push(callback) } else { queueMicrotask(() => callback(null, null)) } return } this[kClosed] = true this[kOnClosed].push(callback) const onClosed = () => { const callbacks = this[kOnClosed] this[kOnClosed] = null for (let i = 0; i < callbacks.length; i++) { callbacks[i](null, null) } } // Should not error. this[kClose]() .then(() => this.destroy()) .then(() => { queueMicrotask(onClosed) }) } destroy (err, callback) { if (typeof err === 'function') { callback = err err = null } if (callback === undefined) { return new Promise((resolve, reject) => { this.destroy(err, (err, data) => { return err ? /* istanbul ignore next: should never error */ reject(err) : resolve(data) }) }) } if (typeof callback !== 'function') { throw new InvalidArgumentError('invalid callback') } if (this[kDestroyed]) { if (this[kOnDestroyed]) { this[kOnDestroyed].push(callback) } else { queueMicrotask(() => callback(null, null)) } return } if (!err) { err = new ClientDestroyedError() } this[kDestroyed] = true this[kOnDestroyed] = this[kOnDestroyed] || [] this[kOnDestroyed].push(callback) const onDestroyed = () => { const callbacks = this[kOnDestroyed] this[kOnDestroyed] = null for (let i = 0; i < callbacks.length; i++) { callbacks[i](null, null) } } // Should not error. this[kDestroy](err).then(() => { queueMicrotask(onDestroyed) }) } [kInterceptedDispatch] (opts, handler) { if (!this[kInterceptors] || this[kInterceptors].length === 0) { this[kInterceptedDispatch] = this[kDispatch] return this[kDispatch](opts, handler) } let dispatch = this[kDispatch].bind(this) for (let i = this[kInterceptors].length - 1; i >= 0; i--) { dispatch = this[kInterceptors][i](dispatch) } this[kInterceptedDispatch] = dispatch return dispatch(opts, handler) } dispatch (opts, handler) { if (!handler || typeof handler !== 'object') { throw new InvalidArgumentError('handler must be an object') } try { if (!opts || typeof opts !== 'object') { throw new InvalidArgumentError('opts must be an object.') } if (this[kDestroyed] || this[kOnDestroyed]) { throw new ClientDestroyedError() } if (this[kClosed]) { throw new ClientClosedError() } return this[kInterceptedDispatch](opts, handler) } catch (err) { if (typeof handler.onError !== 'function') { throw new InvalidArgumentError('invalid onError method') } handler.onError(err) return false } } } module.exports = DispatcherBase node_modules/undici/lib/dispatcher/pool-stats.js 0000664 00000001051 15114741631 0016035 0 ustar 00 const { kFree, kConnected, kPending, kQueued, kRunning, kSize } = require('../core/symbols') const kPool = Symbol('pool') class PoolStats { constructor (pool) { this[kPool] = pool } get connected () { return this[kPool][kConnected] } get free () { return this[kPool][kFree] } get pending () { return this[kPool][kPending] } get queued () { return this[kPool][kQueued] } get running () { return this[kPool][kRunning] } get size () { return this[kPool][kSize] } } module.exports = PoolStats node_modules/undici/lib/dispatcher/pool-base.js 0000664 00000010706 15114741631 0015620 0 ustar 00 'use strict' const DispatcherBase = require('./dispatcher-base') const FixedQueue = require('./fixed-queue') const { kConnected, kSize, kRunning, kPending, kQueued, kBusy, kFree, kUrl, kClose, kDestroy, kDispatch } = require('../core/symbols') const PoolStats = require('./pool-stats') const kClients = Symbol('clients') const kNeedDrain = Symbol('needDrain') const kQueue = Symbol('queue') const kClosedResolve = Symbol('closed resolve') const kOnDrain = Symbol('onDrain') const kOnConnect = Symbol('onConnect') const kOnDisconnect = Symbol('onDisconnect') const kOnConnectionError = Symbol('onConnectionError') const kGetDispatcher = Symbol('get dispatcher') const kAddClient = Symbol('add client') const kRemoveClient = Symbol('remove client') const kStats = Symbol('stats') class PoolBase extends DispatcherBase { constructor () { super() this[kQueue] = new FixedQueue() this[kClients] = [] this[kQueued] = 0 const pool = this this[kOnDrain] = function onDrain (origin, targets) { const queue = pool[kQueue] let needDrain = false while (!needDrain) { const item = queue.shift() if (!item) { break } pool[kQueued]-- needDrain = !this.dispatch(item.opts, item.handler) } this[kNeedDrain] = needDrain if (!this[kNeedDrain] && pool[kNeedDrain]) { pool[kNeedDrain] = false pool.emit('drain', origin, [pool, ...targets]) } if (pool[kClosedResolve] && queue.isEmpty()) { Promise .all(pool[kClients].map(c => c.close())) .then(pool[kClosedResolve]) } } this[kOnConnect] = (origin, targets) => { pool.emit('connect', origin, [pool, ...targets]) } this[kOnDisconnect] = (origin, targets, err) => { pool.emit('disconnect', origin, [pool, ...targets], err) } this[kOnConnectionError] = (origin, targets, err) => { pool.emit('connectionError', origin, [pool, ...targets], err) } this[kStats] = new PoolStats(this) } get [kBusy] () { return this[kNeedDrain] } get [kConnected] () { return this[kClients].filter(client => client[kConnected]).length } get [kFree] () { return this[kClients].filter(client => client[kConnected] && !client[kNeedDrain]).length } get [kPending] () { let ret = this[kQueued] for (const { [kPending]: pending } of this[kClients]) { ret += pending } return ret } get [kRunning] () { let ret = 0 for (const { [kRunning]: running } of this[kClients]) { ret += running } return ret } get [kSize] () { let ret = this[kQueued] for (const { [kSize]: size } of this[kClients]) { ret += size } return ret } get stats () { return this[kStats] } async [kClose] () { if (this[kQueue].isEmpty()) { await Promise.all(this[kClients].map(c => c.close())) } else { await new Promise((resolve) => { this[kClosedResolve] = resolve }) } } async [kDestroy] (err) { while (true) { const item = this[kQueue].shift() if (!item) { break } item.handler.onError(err) } await Promise.all(this[kClients].map(c => c.destroy(err))) } [kDispatch] (opts, handler) { const dispatcher = this[kGetDispatcher]() if (!dispatcher) { this[kNeedDrain] = true this[kQueue].push({ opts, handler }) this[kQueued]++ } else if (!dispatcher.dispatch(opts, handler)) { dispatcher[kNeedDrain] = true this[kNeedDrain] = !this[kGetDispatcher]() } return !this[kNeedDrain] } [kAddClient] (client) { client .on('drain', this[kOnDrain]) .on('connect', this[kOnConnect]) .on('disconnect', this[kOnDisconnect]) .on('connectionError', this[kOnConnectionError]) this[kClients].push(client) if (this[kNeedDrain]) { queueMicrotask(() => { if (this[kNeedDrain]) { this[kOnDrain](client[kUrl], [this, client]) } }) } return this } [kRemoveClient] (client) { client.close(() => { const idx = this[kClients].indexOf(client) if (idx !== -1) { this[kClients].splice(idx, 1) } }) this[kNeedDrain] = this[kClients].some(dispatcher => ( !dispatcher[kNeedDrain] && dispatcher.closed !== true && dispatcher.destroyed !== true )) } } module.exports = { PoolBase, kClients, kNeedDrain, kAddClient, kRemoveClient, kGetDispatcher } node_modules/undici/lib/dispatcher/fixed-queue.js 0000664 00000010176 15114741631 0016161 0 ustar 00 /* eslint-disable */ 'use strict' // Extracted from node/lib/internal/fixed_queue.js // Currently optimal queue size, tested on V8 6.0 - 6.6. Must be power of two. const kSize = 2048; const kMask = kSize - 1; // The FixedQueue is implemented as a singly-linked list of fixed-size // circular buffers. It looks something like this: // // head tail // | | // v v // +-----------+ <-----\ +-----------+ <------\ +-----------+ // | [null] | \----- | next | \------- | next | // +-----------+ +-----------+ +-----------+ // | item | <-- bottom | item | <-- bottom | [empty] | // | item | | item | | [empty] | // | item | | item | | [empty] | // | item | | item | | [empty] | // | item | | item | bottom --> | item | // | item | | item | | item | // | ... | | ... | | ... | // | item | | item | | item | // | item | | item | | item | // | [empty] | <-- top | item | | item | // | [empty] | | item | | item | // | [empty] | | [empty] | <-- top top --> | [empty] | // +-----------+ +-----------+ +-----------+ // // Or, if there is only one circular buffer, it looks something // like either of these: // // head tail head tail // | | | | // v v v v // +-----------+ +-----------+ // | [null] | | [null] | // +-----------+ +-----------+ // | [empty] | | item | // | [empty] | | item | // | item | <-- bottom top --> | [empty] | // | item | | [empty] | // | [empty] | <-- top bottom --> | item | // | [empty] | | item | // +-----------+ +-----------+ // // Adding a value means moving `top` forward by one, removing means // moving `bottom` forward by one. After reaching the end, the queue // wraps around. // // When `top === bottom` the current queue is empty and when // `top + 1 === bottom` it's full. This wastes a single space of storage // but allows much quicker checks. class FixedCircularBuffer { constructor() { this.bottom = 0; this.top = 0; this.list = new Array(kSize); this.next = null; } isEmpty() { return this.top === this.bottom; } isFull() { return ((this.top + 1) & kMask) === this.bottom; } push(data) { this.list[this.top] = data; this.top = (this.top + 1) & kMask; } shift() { const nextItem = this.list[this.bottom]; if (nextItem === undefined) return null; this.list[this.bottom] = undefined; this.bottom = (this.bottom + 1) & kMask; return nextItem; } } module.exports = class FixedQueue { constructor() { this.head = this.tail = new FixedCircularBuffer(); } isEmpty() { return this.head.isEmpty(); } push(data) { if (this.head.isFull()) { // Head is full: Creates a new queue, sets the old queue's `.next` to it, // and sets it as the new main queue. this.head = this.head.next = new FixedCircularBuffer(); } this.head.push(data); } shift() { const tail = this.tail; const next = tail.shift(); if (tail.isEmpty() && tail.next !== null) { // If there is another queue, it forms the new tail. this.tail = tail.next; } return next; } }; node_modules/undici/lib/dispatcher/client.js 0000664 00000041205 15114741631 0015213 0 ustar 00 // @ts-check 'use strict' const assert = require('node:assert') const net = require('node:net') const http = require('node:http') const util = require('../core/util.js') const { channels } = require('../core/diagnostics.js') const Request = require('../core/request.js') const DispatcherBase = require('./dispatcher-base') const { InvalidArgumentError, InformationalError, ClientDestroyedError } = require('../core/errors.js') const buildConnector = require('../core/connect.js') const { kUrl, kServerName, kClient, kBusy, kConnect, kResuming, kRunning, kPending, kSize, kQueue, kConnected, kConnecting, kNeedDrain, kKeepAliveDefaultTimeout, kHostHeader, kPendingIdx, kRunningIdx, kError, kPipelining, kKeepAliveTimeoutValue, kMaxHeadersSize, kKeepAliveMaxTimeout, kKeepAliveTimeoutThreshold, kHeadersTimeout, kBodyTimeout, kStrictContentLength, kConnector, kMaxRedirections, kMaxRequests, kCounter, kClose, kDestroy, kDispatch, kInterceptors, kLocalAddress, kMaxResponseSize, kOnError, kHTTPContext, kMaxConcurrentStreams, kResume } = require('../core/symbols.js') const connectH1 = require('./client-h1.js') const connectH2 = require('./client-h2.js') let deprecatedInterceptorWarned = false const kClosedResolve = Symbol('kClosedResolve') const noop = () => {} function getPipelining (client) { return client[kPipelining] ?? client[kHTTPContext]?.defaultPipelining ?? 1 } /** * @type {import('../../types/client.js').default} */ class Client extends DispatcherBase { /** * * @param {string|URL} url * @param {import('../../types/client.js').Client.Options} options */ constructor (url, { interceptors, maxHeaderSize, headersTimeout, socketTimeout, requestTimeout, connectTimeout, bodyTimeout, idleTimeout, keepAlive, keepAliveTimeout, maxKeepAliveTimeout, keepAliveMaxTimeout, keepAliveTimeoutThreshold, socketPath, pipelining, tls, strictContentLength, maxCachedSessions, maxRedirections, connect, maxRequestsPerClient, localAddress, maxResponseSize, autoSelectFamily, autoSelectFamilyAttemptTimeout, // h2 maxConcurrentStreams, allowH2 } = {}) { super() if (keepAlive !== undefined) { throw new InvalidArgumentError('unsupported keepAlive, use pipelining=0 instead') } if (socketTimeout !== undefined) { throw new InvalidArgumentError('unsupported socketTimeout, use headersTimeout & bodyTimeout instead') } if (requestTimeout !== undefined) { throw new InvalidArgumentError('unsupported requestTimeout, use headersTimeout & bodyTimeout instead') } if (idleTimeout !== undefined) { throw new InvalidArgumentError('unsupported idleTimeout, use keepAliveTimeout instead') } if (maxKeepAliveTimeout !== undefined) { throw new InvalidArgumentError('unsupported maxKeepAliveTimeout, use keepAliveMaxTimeout instead') } if (maxHeaderSize != null && !Number.isFinite(maxHeaderSize)) { throw new InvalidArgumentError('invalid maxHeaderSize') } if (socketPath != null && typeof socketPath !== 'string') { throw new InvalidArgumentError('invalid socketPath') } if (connectTimeout != null && (!Number.isFinite(connectTimeout) || connectTimeout < 0)) { throw new InvalidArgumentError('invalid connectTimeout') } if (keepAliveTimeout != null && (!Number.isFinite(keepAliveTimeout) || keepAliveTimeout <= 0)) { throw new InvalidArgumentError('invalid keepAliveTimeout') } if (keepAliveMaxTimeout != null && (!Number.isFinite(keepAliveMaxTimeout) || keepAliveMaxTimeout <= 0)) { throw new InvalidArgumentError('invalid keepAliveMaxTimeout') } if (keepAliveTimeoutThreshold != null && !Number.isFinite(keepAliveTimeoutThreshold)) { throw new InvalidArgumentError('invalid keepAliveTimeoutThreshold') } if (headersTimeout != null && (!Number.isInteger(headersTimeout) || headersTimeout < 0)) { throw new InvalidArgumentError('headersTimeout must be a positive integer or zero') } if (bodyTimeout != null && (!Number.isInteger(bodyTimeout) || bodyTimeout < 0)) { throw new InvalidArgumentError('bodyTimeout must be a positive integer or zero') } if (connect != null && typeof connect !== 'function' && typeof connect !== 'object') { throw new InvalidArgumentError('connect must be a function or an object') } if (maxRedirections != null && (!Number.isInteger(maxRedirections) || maxRedirections < 0)) { throw new InvalidArgumentError('maxRedirections must be a positive number') } if (maxRequestsPerClient != null && (!Number.isInteger(maxRequestsPerClient) || maxRequestsPerClient < 0)) { throw new InvalidArgumentError('maxRequestsPerClient must be a positive number') } if (localAddress != null && (typeof localAddress !== 'string' || net.isIP(localAddress) === 0)) { throw new InvalidArgumentError('localAddress must be valid string IP address') } if (maxResponseSize != null && (!Number.isInteger(maxResponseSize) || maxResponseSize < -1)) { throw new InvalidArgumentError('maxResponseSize must be a positive number') } if ( autoSelectFamilyAttemptTimeout != null && (!Number.isInteger(autoSelectFamilyAttemptTimeout) || autoSelectFamilyAttemptTimeout < -1) ) { throw new InvalidArgumentError('autoSelectFamilyAttemptTimeout must be a positive number') } // h2 if (allowH2 != null && typeof allowH2 !== 'boolean') { throw new InvalidArgumentError('allowH2 must be a valid boolean value') } if (maxConcurrentStreams != null && (typeof maxConcurrentStreams !== 'number' || maxConcurrentStreams < 1)) { throw new InvalidArgumentError('maxConcurrentStreams must be a positive integer, greater than 0') } if (typeof connect !== 'function') { connect = buildConnector({ ...tls, maxCachedSessions, allowH2, socketPath, timeout: connectTimeout, ...(autoSelectFamily ? { autoSelectFamily, autoSelectFamilyAttemptTimeout } : undefined), ...connect }) } if (interceptors?.Client && Array.isArray(interceptors.Client)) { this[kInterceptors] = interceptors.Client if (!deprecatedInterceptorWarned) { deprecatedInterceptorWarned = true process.emitWarning('Client.Options#interceptor is deprecated. Use Dispatcher#compose instead.', { code: 'UNDICI-CLIENT-INTERCEPTOR-DEPRECATED' }) } } else { this[kInterceptors] = [createRedirectInterceptor({ maxRedirections })] } this[kUrl] = util.parseOrigin(url) this[kConnector] = connect this[kPipelining] = pipelining != null ? pipelining : 1 this[kMaxHeadersSize] = maxHeaderSize || http.maxHeaderSize this[kKeepAliveDefaultTimeout] = keepAliveTimeout == null ? 4e3 : keepAliveTimeout this[kKeepAliveMaxTimeout] = keepAliveMaxTimeout == null ? 600e3 : keepAliveMaxTimeout this[kKeepAliveTimeoutThreshold] = keepAliveTimeoutThreshold == null ? 2e3 : keepAliveTimeoutThreshold this[kKeepAliveTimeoutValue] = this[kKeepAliveDefaultTimeout] this[kServerName] = null this[kLocalAddress] = localAddress != null ? localAddress : null this[kResuming] = 0 // 0, idle, 1, scheduled, 2 resuming this[kNeedDrain] = 0 // 0, idle, 1, scheduled, 2 resuming this[kHostHeader] = `host: ${this[kUrl].hostname}${this[kUrl].port ? `:${this[kUrl].port}` : ''}\r\n` this[kBodyTimeout] = bodyTimeout != null ? bodyTimeout : 300e3 this[kHeadersTimeout] = headersTimeout != null ? headersTimeout : 300e3 this[kStrictContentLength] = strictContentLength == null ? true : strictContentLength this[kMaxRedirections] = maxRedirections this[kMaxRequests] = maxRequestsPerClient this[kClosedResolve] = null this[kMaxResponseSize] = maxResponseSize > -1 ? maxResponseSize : -1 this[kMaxConcurrentStreams] = maxConcurrentStreams != null ? maxConcurrentStreams : 100 // Max peerConcurrentStreams for a Node h2 server this[kHTTPContext] = null // kQueue is built up of 3 sections separated by // the kRunningIdx and kPendingIdx indices. // | complete | running | pending | // ^ kRunningIdx ^ kPendingIdx ^ kQueue.length // kRunningIdx points to the first running element. // kPendingIdx points to the first pending element. // This implements a fast queue with an amortized // time of O(1). this[kQueue] = [] this[kRunningIdx] = 0 this[kPendingIdx] = 0 this[kResume] = (sync) => resume(this, sync) this[kOnError] = (err) => onError(this, err) } get pipelining () { return this[kPipelining] } set pipelining (value) { this[kPipelining] = value this[kResume](true) } get [kPending] () { return this[kQueue].length - this[kPendingIdx] } get [kRunning] () { return this[kPendingIdx] - this[kRunningIdx] } get [kSize] () { return this[kQueue].length - this[kRunningIdx] } get [kConnected] () { return !!this[kHTTPContext] && !this[kConnecting] && !this[kHTTPContext].destroyed } get [kBusy] () { return Boolean( this[kHTTPContext]?.busy(null) || (this[kSize] >= (getPipelining(this) || 1)) || this[kPending] > 0 ) } /* istanbul ignore: only used for test */ [kConnect] (cb) { connect(this) this.once('connect', cb) } [kDispatch] (opts, handler) { const origin = opts.origin || this[kUrl].origin const request = new Request(origin, opts, handler) this[kQueue].push(request) if (this[kResuming]) { // Do nothing. } else if (util.bodyLength(request.body) == null && util.isIterable(request.body)) { // Wait a tick in case stream/iterator is ended in the same tick. this[kResuming] = 1 queueMicrotask(() => resume(this)) } else { this[kResume](true) } if (this[kResuming] && this[kNeedDrain] !== 2 && this[kBusy]) { this[kNeedDrain] = 2 } return this[kNeedDrain] < 2 } async [kClose] () { // TODO: for H2 we need to gracefully flush the remaining enqueued // request and close each stream. return new Promise((resolve) => { if (this[kSize]) { this[kClosedResolve] = resolve } else { resolve(null) } }) } async [kDestroy] (err) { return new Promise((resolve) => { const requests = this[kQueue].splice(this[kPendingIdx]) for (let i = 0; i < requests.length; i++) { const request = requests[i] util.errorRequest(this, request, err) } const callback = () => { if (this[kClosedResolve]) { // TODO (fix): Should we error here with ClientDestroyedError? this[kClosedResolve]() this[kClosedResolve] = null } resolve(null) } if (this[kHTTPContext]) { this[kHTTPContext].destroy(err, callback) this[kHTTPContext] = null } else { queueMicrotask(callback) } this[kResume]() }) } } const createRedirectInterceptor = require('../interceptor/redirect-interceptor.js') function onError (client, err) { if ( client[kRunning] === 0 && err.code !== 'UND_ERR_INFO' && err.code !== 'UND_ERR_SOCKET' ) { // Error is not caused by running request and not a recoverable // socket error. assert(client[kPendingIdx] === client[kRunningIdx]) const requests = client[kQueue].splice(client[kRunningIdx]) for (let i = 0; i < requests.length; i++) { const request = requests[i] util.errorRequest(client, request, err) } assert(client[kSize] === 0) } } /** * @param {Client} client * @returns */ async function connect (client) { assert(!client[kConnecting]) assert(!client[kHTTPContext]) let { host, hostname, protocol, port } = client[kUrl] // Resolve ipv6 if (hostname[0] === '[') { const idx = hostname.indexOf(']') assert(idx !== -1) const ip = hostname.substring(1, idx) assert(net.isIP(ip)) hostname = ip } client[kConnecting] = true if (channels.beforeConnect.hasSubscribers) { channels.beforeConnect.publish({ connectParams: { host, hostname, protocol, port, version: client[kHTTPContext]?.version, servername: client[kServerName], localAddress: client[kLocalAddress] }, connector: client[kConnector] }) } try { const socket = await new Promise((resolve, reject) => { client[kConnector]({ host, hostname, protocol, port, servername: client[kServerName], localAddress: client[kLocalAddress] }, (err, socket) => { if (err) { reject(err) } else { resolve(socket) } }) }) if (client.destroyed) { util.destroy(socket.on('error', noop), new ClientDestroyedError()) return } assert(socket) try { client[kHTTPContext] = socket.alpnProtocol === 'h2' ? await connectH2(client, socket) : await connectH1(client, socket) } catch (err) { socket.destroy().on('error', noop) throw err } client[kConnecting] = false socket[kCounter] = 0 socket[kMaxRequests] = client[kMaxRequests] socket[kClient] = client socket[kError] = null if (channels.connected.hasSubscribers) { channels.connected.publish({ connectParams: { host, hostname, protocol, port, version: client[kHTTPContext]?.version, servername: client[kServerName], localAddress: client[kLocalAddress] }, connector: client[kConnector], socket }) } client.emit('connect', client[kUrl], [client]) } catch (err) { if (client.destroyed) { return } client[kConnecting] = false if (channels.connectError.hasSubscribers) { channels.connectError.publish({ connectParams: { host, hostname, protocol, port, version: client[kHTTPContext]?.version, servername: client[kServerName], localAddress: client[kLocalAddress] }, connector: client[kConnector], error: err }) } if (err.code === 'ERR_TLS_CERT_ALTNAME_INVALID') { assert(client[kRunning] === 0) while (client[kPending] > 0 && client[kQueue][client[kPendingIdx]].servername === client[kServerName]) { const request = client[kQueue][client[kPendingIdx]++] util.errorRequest(client, request, err) } } else { onError(client, err) } client.emit('connectionError', client[kUrl], [client], err) } client[kResume]() } function emitDrain (client) { client[kNeedDrain] = 0 client.emit('drain', client[kUrl], [client]) } function resume (client, sync) { if (client[kResuming] === 2) { return } client[kResuming] = 2 _resume(client, sync) client[kResuming] = 0 if (client[kRunningIdx] > 256) { client[kQueue].splice(0, client[kRunningIdx]) client[kPendingIdx] -= client[kRunningIdx] client[kRunningIdx] = 0 } } function _resume (client, sync) { while (true) { if (client.destroyed) { assert(client[kPending] === 0) return } if (client[kClosedResolve] && !client[kSize]) { client[kClosedResolve]() client[kClosedResolve] = null return } if (client[kHTTPContext]) { client[kHTTPContext].resume() } if (client[kBusy]) { client[kNeedDrain] = 2 } else if (client[kNeedDrain] === 2) { if (sync) { client[kNeedDrain] = 1 queueMicrotask(() => emitDrain(client)) } else { emitDrain(client) } continue } if (client[kPending] === 0) { return } if (client[kRunning] >= (getPipelining(client) || 1)) { return } const request = client[kQueue][client[kPendingIdx]] if (client[kUrl].protocol === 'https:' && client[kServerName] !== request.servername) { if (client[kRunning] > 0) { return } client[kServerName] = request.servername client[kHTTPContext]?.destroy(new InformationalError('servername changed'), () => { client[kHTTPContext] = null resume(client) }) } if (client[kConnecting]) { return } if (!client[kHTTPContext]) { connect(client) return } if (client[kHTTPContext].destroyed) { return } if (client[kHTTPContext].busy(request)) { return } if (!request.aborted && client[kHTTPContext].write(request)) { client[kPendingIdx]++ } else { client[kQueue].splice(client[kPendingIdx], 1) } } } module.exports = Client node_modules/undici/lib/dispatcher/proxy-agent.js 0000664 00000013515 15114741631 0016215 0 ustar 00 'use strict' const { kProxy, kClose, kDestroy, kInterceptors } = require('../core/symbols') const { URL } = require('node:url') const Agent = require('./agent') const Pool = require('./pool') const DispatcherBase = require('./dispatcher-base') const { InvalidArgumentError, RequestAbortedError, SecureProxyConnectionError } = require('../core/errors') const buildConnector = require('../core/connect') const kAgent = Symbol('proxy agent') const kClient = Symbol('proxy client') const kProxyHeaders = Symbol('proxy headers') const kRequestTls = Symbol('request tls settings') const kProxyTls = Symbol('proxy tls settings') const kConnectEndpoint = Symbol('connect endpoint function') function defaultProtocolPort (protocol) { return protocol === 'https:' ? 443 : 80 } function defaultFactory (origin, opts) { return new Pool(origin, opts) } const noop = () => {} class ProxyAgent extends DispatcherBase { constructor (opts) { super() if (!opts || (typeof opts === 'object' && !(opts instanceof URL) && !opts.uri)) { throw new InvalidArgumentError('Proxy uri is mandatory') } const { clientFactory = defaultFactory } = opts if (typeof clientFactory !== 'function') { throw new InvalidArgumentError('Proxy opts.clientFactory must be a function.') } const url = this.#getUrl(opts) const { href, origin, port, protocol, username, password, hostname: proxyHostname } = url this[kProxy] = { uri: href, protocol } this[kInterceptors] = opts.interceptors?.ProxyAgent && Array.isArray(opts.interceptors.ProxyAgent) ? opts.interceptors.ProxyAgent : [] this[kRequestTls] = opts.requestTls this[kProxyTls] = opts.proxyTls this[kProxyHeaders] = opts.headers || {} if (opts.auth && opts.token) { throw new InvalidArgumentError('opts.auth cannot be used in combination with opts.token') } else if (opts.auth) { /* @deprecated in favour of opts.token */ this[kProxyHeaders]['proxy-authorization'] = `Basic ${opts.auth}` } else if (opts.token) { this[kProxyHeaders]['proxy-authorization'] = opts.token } else if (username && password) { this[kProxyHeaders]['proxy-authorization'] = `Basic ${Buffer.from(`${decodeURIComponent(username)}:${decodeURIComponent(password)}`).toString('base64')}` } const connect = buildConnector({ ...opts.proxyTls }) this[kConnectEndpoint] = buildConnector({ ...opts.requestTls }) this[kClient] = clientFactory(url, { connect }) this[kAgent] = new Agent({ ...opts, connect: async (opts, callback) => { let requestedPath = opts.host if (!opts.port) { requestedPath += `:${defaultProtocolPort(opts.protocol)}` } try { const { socket, statusCode } = await this[kClient].connect({ origin, port, path: requestedPath, signal: opts.signal, headers: { ...this[kProxyHeaders], host: opts.host }, servername: this[kProxyTls]?.servername || proxyHostname }) if (statusCode !== 200) { socket.on('error', noop).destroy() callback(new RequestAbortedError(`Proxy response (${statusCode}) !== 200 when HTTP Tunneling`)) } if (opts.protocol !== 'https:') { callback(null, socket) return } let servername if (this[kRequestTls]) { servername = this[kRequestTls].servername } else { servername = opts.servername } this[kConnectEndpoint]({ ...opts, servername, httpSocket: socket }, callback) } catch (err) { if (err.code === 'ERR_TLS_CERT_ALTNAME_INVALID') { // Throw a custom error to avoid loop in client.js#connect callback(new SecureProxyConnectionError(err)) } else { callback(err) } } } }) } dispatch (opts, handler) { const headers = buildHeaders(opts.headers) throwIfProxyAuthIsSent(headers) if (headers && !('host' in headers) && !('Host' in headers)) { const { host } = new URL(opts.origin) headers.host = host } return this[kAgent].dispatch( { ...opts, headers }, handler ) } /** * @param {import('../types/proxy-agent').ProxyAgent.Options | string | URL} opts * @returns {URL} */ #getUrl (opts) { if (typeof opts === 'string') { return new URL(opts) } else if (opts instanceof URL) { return opts } else { return new URL(opts.uri) } } async [kClose] () { await this[kAgent].close() await this[kClient].close() } async [kDestroy] () { await this[kAgent].destroy() await this[kClient].destroy() } } /** * @param {string[] | Record<string, string>} headers * @returns {Record<string, string>} */ function buildHeaders (headers) { // When using undici.fetch, the headers list is stored // as an array. if (Array.isArray(headers)) { /** @type {Record<string, string>} */ const headersPair = {} for (let i = 0; i < headers.length; i += 2) { headersPair[headers[i]] = headers[i + 1] } return headersPair } return headers } /** * @param {Record<string, string>} headers * * Previous versions of ProxyAgent suggests the Proxy-Authorization in request headers * Nevertheless, it was changed and to avoid a security vulnerability by end users * this check was created. * It should be removed in the next major version for performance reasons */ function throwIfProxyAuthIsSent (headers) { const existProxyAuth = headers && Object.keys(headers) .find((key) => key.toLowerCase() === 'proxy-authorization') if (existProxyAuth) { throw new InvalidArgumentError('Proxy-Authorization should be sent in ProxyAgent constructor') } } module.exports = ProxyAgent node_modules/undici/lib/dispatcher/balanced-pool.js 0000664 00000012633 15114741631 0016440 0 ustar 00 'use strict' const { BalancedPoolMissingUpstreamError, InvalidArgumentError } = require('../core/errors') const { PoolBase, kClients, kNeedDrain, kAddClient, kRemoveClient, kGetDispatcher } = require('./pool-base') const Pool = require('./pool') const { kUrl, kInterceptors } = require('../core/symbols') const { parseOrigin } = require('../core/util') const kFactory = Symbol('factory') const kOptions = Symbol('options') const kGreatestCommonDivisor = Symbol('kGreatestCommonDivisor') const kCurrentWeight = Symbol('kCurrentWeight') const kIndex = Symbol('kIndex') const kWeight = Symbol('kWeight') const kMaxWeightPerServer = Symbol('kMaxWeightPerServer') const kErrorPenalty = Symbol('kErrorPenalty') /** * Calculate the greatest common divisor of two numbers by * using the Euclidean algorithm. * * @param {number} a * @param {number} b * @returns {number} */ function getGreatestCommonDivisor (a, b) { if (a === 0) return b while (b !== 0) { const t = b b = a % b a = t } return a } function defaultFactory (origin, opts) { return new Pool(origin, opts) } class BalancedPool extends PoolBase { constructor (upstreams = [], { factory = defaultFactory, ...opts } = {}) { super() this[kOptions] = opts this[kIndex] = -1 this[kCurrentWeight] = 0 this[kMaxWeightPerServer] = this[kOptions].maxWeightPerServer || 100 this[kErrorPenalty] = this[kOptions].errorPenalty || 15 if (!Array.isArray(upstreams)) { upstreams = [upstreams] } if (typeof factory !== 'function') { throw new InvalidArgumentError('factory must be a function.') } this[kInterceptors] = opts.interceptors?.BalancedPool && Array.isArray(opts.interceptors.BalancedPool) ? opts.interceptors.BalancedPool : [] this[kFactory] = factory for (const upstream of upstreams) { this.addUpstream(upstream) } this._updateBalancedPoolStats() } addUpstream (upstream) { const upstreamOrigin = parseOrigin(upstream).origin if (this[kClients].find((pool) => ( pool[kUrl].origin === upstreamOrigin && pool.closed !== true && pool.destroyed !== true ))) { return this } const pool = this[kFactory](upstreamOrigin, Object.assign({}, this[kOptions])) this[kAddClient](pool) pool.on('connect', () => { pool[kWeight] = Math.min(this[kMaxWeightPerServer], pool[kWeight] + this[kErrorPenalty]) }) pool.on('connectionError', () => { pool[kWeight] = Math.max(1, pool[kWeight] - this[kErrorPenalty]) this._updateBalancedPoolStats() }) pool.on('disconnect', (...args) => { const err = args[2] if (err && err.code === 'UND_ERR_SOCKET') { // decrease the weight of the pool. pool[kWeight] = Math.max(1, pool[kWeight] - this[kErrorPenalty]) this._updateBalancedPoolStats() } }) for (const client of this[kClients]) { client[kWeight] = this[kMaxWeightPerServer] } this._updateBalancedPoolStats() return this } _updateBalancedPoolStats () { let result = 0 for (let i = 0; i < this[kClients].length; i++) { result = getGreatestCommonDivisor(this[kClients][i][kWeight], result) } this[kGreatestCommonDivisor] = result } removeUpstream (upstream) { const upstreamOrigin = parseOrigin(upstream).origin const pool = this[kClients].find((pool) => ( pool[kUrl].origin === upstreamOrigin && pool.closed !== true && pool.destroyed !== true )) if (pool) { this[kRemoveClient](pool) } return this } get upstreams () { return this[kClients] .filter(dispatcher => dispatcher.closed !== true && dispatcher.destroyed !== true) .map((p) => p[kUrl].origin) } [kGetDispatcher] () { // We validate that pools is greater than 0, // otherwise we would have to wait until an upstream // is added, which might never happen. if (this[kClients].length === 0) { throw new BalancedPoolMissingUpstreamError() } const dispatcher = this[kClients].find(dispatcher => ( !dispatcher[kNeedDrain] && dispatcher.closed !== true && dispatcher.destroyed !== true )) if (!dispatcher) { return } const allClientsBusy = this[kClients].map(pool => pool[kNeedDrain]).reduce((a, b) => a && b, true) if (allClientsBusy) { return } let counter = 0 let maxWeightIndex = this[kClients].findIndex(pool => !pool[kNeedDrain]) while (counter++ < this[kClients].length) { this[kIndex] = (this[kIndex] + 1) % this[kClients].length const pool = this[kClients][this[kIndex]] // find pool index with the largest weight if (pool[kWeight] > this[kClients][maxWeightIndex][kWeight] && !pool[kNeedDrain]) { maxWeightIndex = this[kIndex] } // decrease the current weight every `this[kClients].length`. if (this[kIndex] === 0) { // Set the current weight to the next lower weight. this[kCurrentWeight] = this[kCurrentWeight] - this[kGreatestCommonDivisor] if (this[kCurrentWeight] <= 0) { this[kCurrentWeight] = this[kMaxWeightPerServer] } } if (pool[kWeight] >= this[kCurrentWeight] && (!pool[kNeedDrain])) { return pool } } this[kCurrentWeight] = this[kClients][maxWeightIndex][kWeight] this[kIndex] = maxWeightIndex return this[kClients][maxWeightIndex] } } module.exports = BalancedPool node_modules/undici/lib/dispatcher/retry-agent.js 0000664 00000001254 15114741631 0016176 0 ustar 00 'use strict' const Dispatcher = require('./dispatcher') const RetryHandler = require('../handler/retry-handler') class RetryAgent extends Dispatcher { #agent = null #options = null constructor (agent, options = {}) { super(options) this.#agent = agent this.#options = options } dispatch (opts, handler) { const retry = new RetryHandler({ ...opts, retryOptions: this.#options }, { dispatch: this.#agent.dispatch.bind(this.#agent), handler }) return this.#agent.dispatch(opts, retry) } close () { return this.#agent.close() } destroy () { return this.#agent.destroy() } } module.exports = RetryAgent node_modules/undici/lib/dispatcher/dispatcher.js 0000664 00000002635 15114741631 0016067 0 ustar 00 'use strict' const EventEmitter = require('node:events') class Dispatcher extends EventEmitter { dispatch () { throw new Error('not implemented') } close () { throw new Error('not implemented') } destroy () { throw new Error('not implemented') } compose (...args) { // So we handle [interceptor1, interceptor2] or interceptor1, interceptor2, ... const interceptors = Array.isArray(args[0]) ? args[0] : args let dispatch = this.dispatch.bind(this) for (const interceptor of interceptors) { if (interceptor == null) { continue } if (typeof interceptor !== 'function') { throw new TypeError(`invalid interceptor, expected function received ${typeof interceptor}`) } dispatch = interceptor(dispatch) if (dispatch == null || typeof dispatch !== 'function' || dispatch.length !== 2) { throw new TypeError('invalid interceptor') } } return new ComposedDispatcher(this, dispatch) } } class ComposedDispatcher extends Dispatcher { #dispatcher = null #dispatch = null constructor (dispatcher, dispatch) { super() this.#dispatcher = dispatcher this.#dispatch = dispatch } dispatch (...args) { this.#dispatch(...args) } close (...args) { return this.#dispatcher.close(...args) } destroy (...args) { return this.#dispatcher.destroy(...args) } } module.exports = Dispatcher node_modules/undici/lib/dispatcher/env-http-proxy-agent.js 0000664 00000010577 15114741631 0017765 0 ustar 00 'use strict' const DispatcherBase = require('./dispatcher-base') const { kClose, kDestroy, kClosed, kDestroyed, kDispatch, kNoProxyAgent, kHttpProxyAgent, kHttpsProxyAgent } = require('../core/symbols') const ProxyAgent = require('./proxy-agent') const Agent = require('./agent') const DEFAULT_PORTS = { 'http:': 80, 'https:': 443 } let experimentalWarned = false class EnvHttpProxyAgent extends DispatcherBase { #noProxyValue = null #noProxyEntries = null #opts = null constructor (opts = {}) { super() this.#opts = opts if (!experimentalWarned) { experimentalWarned = true process.emitWarning('EnvHttpProxyAgent is experimental, expect them to change at any time.', { code: 'UNDICI-EHPA' }) } const { httpProxy, httpsProxy, noProxy, ...agentOpts } = opts this[kNoProxyAgent] = new Agent(agentOpts) const HTTP_PROXY = httpProxy ?? process.env.http_proxy ?? process.env.HTTP_PROXY if (HTTP_PROXY) { this[kHttpProxyAgent] = new ProxyAgent({ ...agentOpts, uri: HTTP_PROXY }) } else { this[kHttpProxyAgent] = this[kNoProxyAgent] } const HTTPS_PROXY = httpsProxy ?? process.env.https_proxy ?? process.env.HTTPS_PROXY if (HTTPS_PROXY) { this[kHttpsProxyAgent] = new ProxyAgent({ ...agentOpts, uri: HTTPS_PROXY }) } else { this[kHttpsProxyAgent] = this[kHttpProxyAgent] } this.#parseNoProxy() } [kDispatch] (opts, handler) { const url = new URL(opts.origin) const agent = this.#getProxyAgentForUrl(url) return agent.dispatch(opts, handler) } async [kClose] () { await this[kNoProxyAgent].close() if (!this[kHttpProxyAgent][kClosed]) { await this[kHttpProxyAgent].close() } if (!this[kHttpsProxyAgent][kClosed]) { await this[kHttpsProxyAgent].close() } } async [kDestroy] (err) { await this[kNoProxyAgent].destroy(err) if (!this[kHttpProxyAgent][kDestroyed]) { await this[kHttpProxyAgent].destroy(err) } if (!this[kHttpsProxyAgent][kDestroyed]) { await this[kHttpsProxyAgent].destroy(err) } } #getProxyAgentForUrl (url) { let { protocol, host: hostname, port } = url // Stripping ports in this way instead of using parsedUrl.hostname to make // sure that the brackets around IPv6 addresses are kept. hostname = hostname.replace(/:\d*$/, '').toLowerCase() port = Number.parseInt(port, 10) || DEFAULT_PORTS[protocol] || 0 if (!this.#shouldProxy(hostname, port)) { return this[kNoProxyAgent] } if (protocol === 'https:') { return this[kHttpsProxyAgent] } return this[kHttpProxyAgent] } #shouldProxy (hostname, port) { if (this.#noProxyChanged) { this.#parseNoProxy() } if (this.#noProxyEntries.length === 0) { return true // Always proxy if NO_PROXY is not set or empty. } if (this.#noProxyValue === '*') { return false // Never proxy if wildcard is set. } for (let i = 0; i < this.#noProxyEntries.length; i++) { const entry = this.#noProxyEntries[i] if (entry.port && entry.port !== port) { continue // Skip if ports don't match. } if (!/^[.*]/.test(entry.hostname)) { // No wildcards, so don't proxy only if there is not an exact match. if (hostname === entry.hostname) { return false } } else { // Don't proxy if the hostname ends with the no_proxy host. if (hostname.endsWith(entry.hostname.replace(/^\*/, ''))) { return false } } } return true } #parseNoProxy () { const noProxyValue = this.#opts.noProxy ?? this.#noProxyEnv const noProxySplit = noProxyValue.split(/[,\s]/) const noProxyEntries = [] for (let i = 0; i < noProxySplit.length; i++) { const entry = noProxySplit[i] if (!entry) { continue } const parsed = entry.match(/^(.+):(\d+)$/) noProxyEntries.push({ hostname: (parsed ? parsed[1] : entry).toLowerCase(), port: parsed ? Number.parseInt(parsed[2], 10) : 0 }) } this.#noProxyValue = noProxyValue this.#noProxyEntries = noProxyEntries } get #noProxyChanged () { if (this.#opts.noProxy !== undefined) { return false } return this.#noProxyValue !== this.#noProxyEnv } get #noProxyEnv () { return process.env.no_proxy ?? process.env.NO_PROXY ?? '' } } module.exports = EnvHttpProxyAgent node_modules/undici/lib/api/api-stream.js 0000664 00000012310 15114741631 0014415 0 ustar 00 'use strict' const assert = require('node:assert') const { finished, PassThrough } = require('node:stream') const { InvalidArgumentError, InvalidReturnValueError } = require('../core/errors') const util = require('../core/util') const { getResolveErrorBodyCallback } = require('./util') const { AsyncResource } = require('node:async_hooks') const { addSignal, removeSignal } = require('./abort-signal') class StreamHandler extends AsyncResource { constructor (opts, factory, callback) { if (!opts || typeof opts !== 'object') { throw new InvalidArgumentError('invalid opts') } const { signal, method, opaque, body, onInfo, responseHeaders, throwOnError } = opts try { if (typeof callback !== 'function') { throw new InvalidArgumentError('invalid callback') } if (typeof factory !== 'function') { throw new InvalidArgumentError('invalid factory') } if (signal && typeof signal.on !== 'function' && typeof signal.addEventListener !== 'function') { throw new InvalidArgumentError('signal must be an EventEmitter or EventTarget') } if (method === 'CONNECT') { throw new InvalidArgumentError('invalid method') } if (onInfo && typeof onInfo !== 'function') { throw new InvalidArgumentError('invalid onInfo callback') } super('UNDICI_STREAM') } catch (err) { if (util.isStream(body)) { util.destroy(body.on('error', util.nop), err) } throw err } this.responseHeaders = responseHeaders || null this.opaque = opaque || null this.factory = factory this.callback = callback this.res = null this.abort = null this.context = null this.trailers = null this.body = body this.onInfo = onInfo || null this.throwOnError = throwOnError || false if (util.isStream(body)) { body.on('error', (err) => { this.onError(err) }) } addSignal(this, signal) } onConnect (abort, context) { if (this.reason) { abort(this.reason) return } assert(this.callback) this.abort = abort this.context = context } onHeaders (statusCode, rawHeaders, resume, statusMessage) { const { factory, opaque, context, callback, responseHeaders } = this const headers = responseHeaders === 'raw' ? util.parseRawHeaders(rawHeaders) : util.parseHeaders(rawHeaders) if (statusCode < 200) { if (this.onInfo) { this.onInfo({ statusCode, headers }) } return } this.factory = null let res if (this.throwOnError && statusCode >= 400) { const parsedHeaders = responseHeaders === 'raw' ? util.parseHeaders(rawHeaders) : headers const contentType = parsedHeaders['content-type'] res = new PassThrough() this.callback = null this.runInAsyncScope(getResolveErrorBodyCallback, null, { callback, body: res, contentType, statusCode, statusMessage, headers } ) } else { if (factory === null) { return } res = this.runInAsyncScope(factory, null, { statusCode, headers, opaque, context }) if ( !res || typeof res.write !== 'function' || typeof res.end !== 'function' || typeof res.on !== 'function' ) { throw new InvalidReturnValueError('expected Writable') } // TODO: Avoid finished. It registers an unnecessary amount of listeners. finished(res, { readable: false }, (err) => { const { callback, res, opaque, trailers, abort } = this this.res = null if (err || !res.readable) { util.destroy(res, err) } this.callback = null this.runInAsyncScope(callback, null, err || null, { opaque, trailers }) if (err) { abort() } }) } res.on('drain', resume) this.res = res const needDrain = res.writableNeedDrain !== undefined ? res.writableNeedDrain : res._writableState?.needDrain return needDrain !== true } onData (chunk) { const { res } = this return res ? res.write(chunk) : true } onComplete (trailers) { const { res } = this removeSignal(this) if (!res) { return } this.trailers = util.parseHeaders(trailers) res.end() } onError (err) { const { res, callback, opaque, body } = this removeSignal(this) this.factory = null if (res) { this.res = null util.destroy(res, err) } else if (callback) { this.callback = null queueMicrotask(() => { this.runInAsyncScope(callback, null, err, { opaque }) }) } if (body) { this.body = null util.destroy(body, err) } } } function stream (opts, factory, callback) { if (callback === undefined) { return new Promise((resolve, reject) => { stream.call(this, opts, factory, (err, data) => { return err ? reject(err) : resolve(data) }) }) } try { this.dispatch(opts, new StreamHandler(opts, factory, callback)) } catch (err) { if (typeof callback !== 'function') { throw err } const opaque = opts?.opaque queueMicrotask(() => callback(err, { opaque })) } } module.exports = stream node_modules/undici/lib/api/api-pipeline.js 0000664 00000012505 15114741631 0014735 0 ustar 00 'use strict' const { Readable, Duplex, PassThrough } = require('node:stream') const { InvalidArgumentError, InvalidReturnValueError, RequestAbortedError } = require('../core/errors') const util = require('../core/util') const { AsyncResource } = require('node:async_hooks') const { addSignal, removeSignal } = require('./abort-signal') const assert = require('node:assert') const kResume = Symbol('resume') class PipelineRequest extends Readable { constructor () { super({ autoDestroy: true }) this[kResume] = null } _read () { const { [kResume]: resume } = this if (resume) { this[kResume] = null resume() } } _destroy (err, callback) { this._read() callback(err) } } class PipelineResponse extends Readable { constructor (resume) { super({ autoDestroy: true }) this[kResume] = resume } _read () { this[kResume]() } _destroy (err, callback) { if (!err && !this._readableState.endEmitted) { err = new RequestAbortedError() } callback(err) } } class PipelineHandler extends AsyncResource { constructor (opts, handler) { if (!opts || typeof opts !== 'object') { throw new InvalidArgumentError('invalid opts') } if (typeof handler !== 'function') { throw new InvalidArgumentError('invalid handler') } const { signal, method, opaque, onInfo, responseHeaders } = opts if (signal && typeof signal.on !== 'function' && typeof signal.addEventListener !== 'function') { throw new InvalidArgumentError('signal must be an EventEmitter or EventTarget') } if (method === 'CONNECT') { throw new InvalidArgumentError('invalid method') } if (onInfo && typeof onInfo !== 'function') { throw new InvalidArgumentError('invalid onInfo callback') } super('UNDICI_PIPELINE') this.opaque = opaque || null this.responseHeaders = responseHeaders || null this.handler = handler this.abort = null this.context = null this.onInfo = onInfo || null this.req = new PipelineRequest().on('error', util.nop) this.ret = new Duplex({ readableObjectMode: opts.objectMode, autoDestroy: true, read: () => { const { body } = this if (body?.resume) { body.resume() } }, write: (chunk, encoding, callback) => { const { req } = this if (req.push(chunk, encoding) || req._readableState.destroyed) { callback() } else { req[kResume] = callback } }, destroy: (err, callback) => { const { body, req, res, ret, abort } = this if (!err && !ret._readableState.endEmitted) { err = new RequestAbortedError() } if (abort && err) { abort() } util.destroy(body, err) util.destroy(req, err) util.destroy(res, err) removeSignal(this) callback(err) } }).on('prefinish', () => { const { req } = this // Node < 15 does not call _final in same tick. req.push(null) }) this.res = null addSignal(this, signal) } onConnect (abort, context) { const { ret, res } = this if (this.reason) { abort(this.reason) return } assert(!res, 'pipeline cannot be retried') assert(!ret.destroyed) this.abort = abort this.context = context } onHeaders (statusCode, rawHeaders, resume) { const { opaque, handler, context } = this if (statusCode < 200) { if (this.onInfo) { const headers = this.responseHeaders === 'raw' ? util.parseRawHeaders(rawHeaders) : util.parseHeaders(rawHeaders) this.onInfo({ statusCode, headers }) } return } this.res = new PipelineResponse(resume) let body try { this.handler = null const headers = this.responseHeaders === 'raw' ? util.parseRawHeaders(rawHeaders) : util.parseHeaders(rawHeaders) body = this.runInAsyncScope(handler, null, { statusCode, headers, opaque, body: this.res, context }) } catch (err) { this.res.on('error', util.nop) throw err } if (!body || typeof body.on !== 'function') { throw new InvalidReturnValueError('expected Readable') } body .on('data', (chunk) => { const { ret, body } = this if (!ret.push(chunk) && body.pause) { body.pause() } }) .on('error', (err) => { const { ret } = this util.destroy(ret, err) }) .on('end', () => { const { ret } = this ret.push(null) }) .on('close', () => { const { ret } = this if (!ret._readableState.ended) { util.destroy(ret, new RequestAbortedError()) } }) this.body = body } onData (chunk) { const { res } = this return res.push(chunk) } onComplete (trailers) { const { res } = this res.push(null) } onError (err) { const { ret } = this this.handler = null util.destroy(ret, err) } } function pipeline (opts, handler) { try { const pipelineHandler = new PipelineHandler(opts, handler) this.dispatch({ ...opts, body: pipelineHandler.req }, pipelineHandler) return pipelineHandler.ret } catch (err) { return new PassThrough().destroy(err) } } module.exports = pipeline node_modules/undici/lib/api/api-request.js 0000664 00000013146 15114741631 0014622 0 ustar 00 'use strict' const assert = require('node:assert') const { Readable } = require('./readable') const { InvalidArgumentError, RequestAbortedError } = require('../core/errors') const util = require('../core/util') const { getResolveErrorBodyCallback } = require('./util') const { AsyncResource } = require('node:async_hooks') class RequestHandler extends AsyncResource { constructor (opts, callback) { if (!opts || typeof opts !== 'object') { throw new InvalidArgumentError('invalid opts') } const { signal, method, opaque, body, onInfo, responseHeaders, throwOnError, highWaterMark } = opts try { if (typeof callback !== 'function') { throw new InvalidArgumentError('invalid callback') } if (highWaterMark && (typeof highWaterMark !== 'number' || highWaterMark < 0)) { throw new InvalidArgumentError('invalid highWaterMark') } if (signal && typeof signal.on !== 'function' && typeof signal.addEventListener !== 'function') { throw new InvalidArgumentError('signal must be an EventEmitter or EventTarget') } if (method === 'CONNECT') { throw new InvalidArgumentError('invalid method') } if (onInfo && typeof onInfo !== 'function') { throw new InvalidArgumentError('invalid onInfo callback') } super('UNDICI_REQUEST') } catch (err) { if (util.isStream(body)) { util.destroy(body.on('error', util.nop), err) } throw err } this.method = method this.responseHeaders = responseHeaders || null this.opaque = opaque || null this.callback = callback this.res = null this.abort = null this.body = body this.trailers = {} this.context = null this.onInfo = onInfo || null this.throwOnError = throwOnError this.highWaterMark = highWaterMark this.signal = signal this.reason = null this.removeAbortListener = null if (util.isStream(body)) { body.on('error', (err) => { this.onError(err) }) } if (this.signal) { if (this.signal.aborted) { this.reason = this.signal.reason ?? new RequestAbortedError() } else { this.removeAbortListener = util.addAbortListener(this.signal, () => { this.reason = this.signal.reason ?? new RequestAbortedError() if (this.res) { util.destroy(this.res.on('error', util.nop), this.reason) } else if (this.abort) { this.abort(this.reason) } if (this.removeAbortListener) { this.res?.off('close', this.removeAbortListener) this.removeAbortListener() this.removeAbortListener = null } }) } } } onConnect (abort, context) { if (this.reason) { abort(this.reason) return } assert(this.callback) this.abort = abort this.context = context } onHeaders (statusCode, rawHeaders, resume, statusMessage) { const { callback, opaque, abort, context, responseHeaders, highWaterMark } = this const headers = responseHeaders === 'raw' ? util.parseRawHeaders(rawHeaders) : util.parseHeaders(rawHeaders) if (statusCode < 200) { if (this.onInfo) { this.onInfo({ statusCode, headers }) } return } const parsedHeaders = responseHeaders === 'raw' ? util.parseHeaders(rawHeaders) : headers const contentType = parsedHeaders['content-type'] const contentLength = parsedHeaders['content-length'] const res = new Readable({ resume, abort, contentType, contentLength: this.method !== 'HEAD' && contentLength ? Number(contentLength) : null, highWaterMark }) if (this.removeAbortListener) { res.on('close', this.removeAbortListener) } this.callback = null this.res = res if (callback !== null) { if (this.throwOnError && statusCode >= 400) { this.runInAsyncScope(getResolveErrorBodyCallback, null, { callback, body: res, contentType, statusCode, statusMessage, headers } ) } else { this.runInAsyncScope(callback, null, null, { statusCode, headers, trailers: this.trailers, opaque, body: res, context }) } } } onData (chunk) { return this.res.push(chunk) } onComplete (trailers) { util.parseHeaders(trailers, this.trailers) this.res.push(null) } onError (err) { const { res, callback, body, opaque } = this if (callback) { // TODO: Does this need queueMicrotask? this.callback = null queueMicrotask(() => { this.runInAsyncScope(callback, null, err, { opaque }) }) } if (res) { this.res = null // Ensure all queued handlers are invoked before destroying res. queueMicrotask(() => { util.destroy(res, err) }) } if (body) { this.body = null util.destroy(body, err) } if (this.removeAbortListener) { res?.off('close', this.removeAbortListener) this.removeAbortListener() this.removeAbortListener = null } } } function request (opts, callback) { if (callback === undefined) { return new Promise((resolve, reject) => { request.call(this, opts, (err, data) => { return err ? reject(err) : resolve(data) }) }) } try { this.dispatch(opts, new RequestHandler(opts, callback)) } catch (err) { if (typeof callback !== 'function') { throw err } const opaque = opts?.opaque queueMicrotask(() => callback(err, { opaque })) } } module.exports = request module.exports.RequestHandler = RequestHandler node_modules/undici/lib/api/api-upgrade.js 0000664 00000005020 15114741631 0014551 0 ustar 00 'use strict' const { InvalidArgumentError, SocketError } = require('../core/errors') const { AsyncResource } = require('node:async_hooks') const util = require('../core/util') const { addSignal, removeSignal } = require('./abort-signal') const assert = require('node:assert') class UpgradeHandler extends AsyncResource { constructor (opts, callback) { if (!opts || typeof opts !== 'object') { throw new InvalidArgumentError('invalid opts') } if (typeof callback !== 'function') { throw new InvalidArgumentError('invalid callback') } const { signal, opaque, responseHeaders } = opts if (signal && typeof signal.on !== 'function' && typeof signal.addEventListener !== 'function') { throw new InvalidArgumentError('signal must be an EventEmitter or EventTarget') } super('UNDICI_UPGRADE') this.responseHeaders = responseHeaders || null this.opaque = opaque || null this.callback = callback this.abort = null this.context = null addSignal(this, signal) } onConnect (abort, context) { if (this.reason) { abort(this.reason) return } assert(this.callback) this.abort = abort this.context = null } onHeaders () { throw new SocketError('bad upgrade', null) } onUpgrade (statusCode, rawHeaders, socket) { assert(statusCode === 101) const { callback, opaque, context } = this removeSignal(this) this.callback = null const headers = this.responseHeaders === 'raw' ? util.parseRawHeaders(rawHeaders) : util.parseHeaders(rawHeaders) this.runInAsyncScope(callback, null, null, { headers, socket, opaque, context }) } onError (err) { const { callback, opaque } = this removeSignal(this) if (callback) { this.callback = null queueMicrotask(() => { this.runInAsyncScope(callback, null, err, { opaque }) }) } } } function upgrade (opts, callback) { if (callback === undefined) { return new Promise((resolve, reject) => { upgrade.call(this, opts, (err, data) => { return err ? reject(err) : resolve(data) }) }) } try { const upgradeHandler = new UpgradeHandler(opts, callback) this.dispatch({ ...opts, method: opts.method || 'GET', upgrade: opts.protocol || 'Websocket' }, upgradeHandler) } catch (err) { if (typeof callback !== 'function') { throw err } const opaque = opts?.opaque queueMicrotask(() => callback(err, { opaque })) } } module.exports = upgrade node_modules/undici/lib/api/api-connect.js 0000664 00000005005 15114741631 0014556 0 ustar 00 'use strict' const assert = require('node:assert') const { AsyncResource } = require('node:async_hooks') const { InvalidArgumentError, SocketError } = require('../core/errors') const util = require('../core/util') const { addSignal, removeSignal } = require('./abort-signal') class ConnectHandler extends AsyncResource { constructor (opts, callback) { if (!opts || typeof opts !== 'object') { throw new InvalidArgumentError('invalid opts') } if (typeof callback !== 'function') { throw new InvalidArgumentError('invalid callback') } const { signal, opaque, responseHeaders } = opts if (signal && typeof signal.on !== 'function' && typeof signal.addEventListener !== 'function') { throw new InvalidArgumentError('signal must be an EventEmitter or EventTarget') } super('UNDICI_CONNECT') this.opaque = opaque || null this.responseHeaders = responseHeaders || null this.callback = callback this.abort = null addSignal(this, signal) } onConnect (abort, context) { if (this.reason) { abort(this.reason) return } assert(this.callback) this.abort = abort this.context = context } onHeaders () { throw new SocketError('bad connect', null) } onUpgrade (statusCode, rawHeaders, socket) { const { callback, opaque, context } = this removeSignal(this) this.callback = null let headers = rawHeaders // Indicates is an HTTP2Session if (headers != null) { headers = this.responseHeaders === 'raw' ? util.parseRawHeaders(rawHeaders) : util.parseHeaders(rawHeaders) } this.runInAsyncScope(callback, null, null, { statusCode, headers, socket, opaque, context }) } onError (err) { const { callback, opaque } = this removeSignal(this) if (callback) { this.callback = null queueMicrotask(() => { this.runInAsyncScope(callback, null, err, { opaque }) }) } } } function connect (opts, callback) { if (callback === undefined) { return new Promise((resolve, reject) => { connect.call(this, opts, (err, data) => { return err ? reject(err) : resolve(data) }) }) } try { const connectHandler = new ConnectHandler(opts, callback) this.dispatch({ ...opts, method: 'CONNECT' }, connectHandler) } catch (err) { if (typeof callback !== 'function') { throw err } const opaque = opts?.opaque queueMicrotask(() => callback(err, { opaque })) } } module.exports = connect node_modules/undici/lib/api/abort-signal.js 0000664 00000002041 15114741631 0014735 0 ustar 00 const { addAbortListener } = require('../core/util') const { RequestAbortedError } = require('../core/errors') const kListener = Symbol('kListener') const kSignal = Symbol('kSignal') function abort (self) { if (self.abort) { self.abort(self[kSignal]?.reason) } else { self.reason = self[kSignal]?.reason ?? new RequestAbortedError() } removeSignal(self) } function addSignal (self, signal) { self.reason = null self[kSignal] = null self[kListener] = null if (!signal) { return } if (signal.aborted) { abort(self) return } self[kSignal] = signal self[kListener] = () => { abort(self) } addAbortListener(self[kSignal], self[kListener]) } function removeSignal (self) { if (!self[kSignal]) { return } if ('removeEventListener' in self[kSignal]) { self[kSignal].removeEventListener('abort', self[kListener]) } else { self[kSignal].removeListener('abort', self[kListener]) } self[kSignal] = null self[kListener] = null } module.exports = { addSignal, removeSignal } node_modules/undici/lib/api/util.js 0000664 00000004506 15114741631 0013340 0 ustar 00 const assert = require('node:assert') const { ResponseStatusCodeError } = require('../core/errors') const { chunksDecode } = require('./readable') const CHUNK_LIMIT = 128 * 1024 async function getResolveErrorBodyCallback ({ callback, body, contentType, statusCode, statusMessage, headers }) { assert(body) let chunks = [] let length = 0 try { for await (const chunk of body) { chunks.push(chunk) length += chunk.length if (length > CHUNK_LIMIT) { chunks = [] length = 0 break } } } catch { chunks = [] length = 0 // Do nothing.... } const message = `Response status code ${statusCode}${statusMessage ? `: ${statusMessage}` : ''}` if (statusCode === 204 || !contentType || !length) { queueMicrotask(() => callback(new ResponseStatusCodeError(message, statusCode, headers))) return } const stackTraceLimit = Error.stackTraceLimit Error.stackTraceLimit = 0 let payload try { if (isContentTypeApplicationJson(contentType)) { payload = JSON.parse(chunksDecode(chunks, length)) } else if (isContentTypeText(contentType)) { payload = chunksDecode(chunks, length) } } catch { // process in a callback to avoid throwing in the microtask queue } finally { Error.stackTraceLimit = stackTraceLimit } queueMicrotask(() => callback(new ResponseStatusCodeError(message, statusCode, headers, payload))) } const isContentTypeApplicationJson = (contentType) => { return ( contentType.length > 15 && contentType[11] === '/' && contentType[0] === 'a' && contentType[1] === 'p' && contentType[2] === 'p' && contentType[3] === 'l' && contentType[4] === 'i' && contentType[5] === 'c' && contentType[6] === 'a' && contentType[7] === 't' && contentType[8] === 'i' && contentType[9] === 'o' && contentType[10] === 'n' && contentType[12] === 'j' && contentType[13] === 's' && contentType[14] === 'o' && contentType[15] === 'n' ) } const isContentTypeText = (contentType) => { return ( contentType.length > 4 && contentType[4] === '/' && contentType[0] === 't' && contentType[1] === 'e' && contentType[2] === 'x' && contentType[3] === 't' ) } module.exports = { getResolveErrorBodyCallback, isContentTypeApplicationJson, isContentTypeText } node_modules/undici/lib/api/index.js 0000664 00000000410 15114741631 0013460 0 ustar 00 'use strict' module.exports.request = require('./api-request') module.exports.stream = require('./api-stream') module.exports.pipeline = require('./api-pipeline') module.exports.upgrade = require('./api-upgrade') module.exports.connect = require('./api-connect') node_modules/undici/lib/api/readable.js 0000664 00000021575 15114741631 0014127 0 ustar 00 // Ported from https://github.com/nodejs/undici/pull/907 'use strict' const assert = require('node:assert') const { Readable } = require('node:stream') const { RequestAbortedError, NotSupportedError, InvalidArgumentError, AbortError } = require('../core/errors') const util = require('../core/util') const { ReadableStreamFrom } = require('../core/util') const kConsume = Symbol('kConsume') const kReading = Symbol('kReading') const kBody = Symbol('kBody') const kAbort = Symbol('kAbort') const kContentType = Symbol('kContentType') const kContentLength = Symbol('kContentLength') const noop = () => {} class BodyReadable extends Readable { constructor ({ resume, abort, contentType = '', contentLength, highWaterMark = 64 * 1024 // Same as nodejs fs streams. }) { super({ autoDestroy: true, read: resume, highWaterMark }) this._readableState.dataEmitted = false this[kAbort] = abort this[kConsume] = null this[kBody] = null this[kContentType] = contentType this[kContentLength] = contentLength // Is stream being consumed through Readable API? // This is an optimization so that we avoid checking // for 'data' and 'readable' listeners in the hot path // inside push(). this[kReading] = false } destroy (err) { if (!err && !this._readableState.endEmitted) { err = new RequestAbortedError() } if (err) { this[kAbort]() } return super.destroy(err) } _destroy (err, callback) { // Workaround for Node "bug". If the stream is destroyed in same // tick as it is created, then a user who is waiting for a // promise (i.e micro tick) for installing a 'error' listener will // never get a chance and will always encounter an unhandled exception. if (!this[kReading]) { setImmediate(() => { callback(err) }) } else { callback(err) } } on (ev, ...args) { if (ev === 'data' || ev === 'readable') { this[kReading] = true } return super.on(ev, ...args) } addListener (ev, ...args) { return this.on(ev, ...args) } off (ev, ...args) { const ret = super.off(ev, ...args) if (ev === 'data' || ev === 'readable') { this[kReading] = ( this.listenerCount('data') > 0 || this.listenerCount('readable') > 0 ) } return ret } removeListener (ev, ...args) { return this.off(ev, ...args) } push (chunk) { if (this[kConsume] && chunk !== null) { consumePush(this[kConsume], chunk) return this[kReading] ? super.push(chunk) : true } return super.push(chunk) } // https://fetch.spec.whatwg.org/#dom-body-text async text () { return consume(this, 'text') } // https://fetch.spec.whatwg.org/#dom-body-json async json () { return consume(this, 'json') } // https://fetch.spec.whatwg.org/#dom-body-blob async blob () { return consume(this, 'blob') } // https://fetch.spec.whatwg.org/#dom-body-bytes async bytes () { return consume(this, 'bytes') } // https://fetch.spec.whatwg.org/#dom-body-arraybuffer async arrayBuffer () { return consume(this, 'arrayBuffer') } // https://fetch.spec.whatwg.org/#dom-body-formdata async formData () { // TODO: Implement. throw new NotSupportedError() } // https://fetch.spec.whatwg.org/#dom-body-bodyused get bodyUsed () { return util.isDisturbed(this) } // https://fetch.spec.whatwg.org/#dom-body-body get body () { if (!this[kBody]) { this[kBody] = ReadableStreamFrom(this) if (this[kConsume]) { // TODO: Is this the best way to force a lock? this[kBody].getReader() // Ensure stream is locked. assert(this[kBody].locked) } } return this[kBody] } async dump (opts) { let limit = Number.isFinite(opts?.limit) ? opts.limit : 128 * 1024 const signal = opts?.signal if (signal != null && (typeof signal !== 'object' || !('aborted' in signal))) { throw new InvalidArgumentError('signal must be an AbortSignal') } signal?.throwIfAborted() if (this._readableState.closeEmitted) { return null } return await new Promise((resolve, reject) => { if (this[kContentLength] > limit) { this.destroy(new AbortError()) } const onAbort = () => { this.destroy(signal.reason ?? new AbortError()) } signal?.addEventListener('abort', onAbort) this .on('close', function () { signal?.removeEventListener('abort', onAbort) if (signal?.aborted) { reject(signal.reason ?? new AbortError()) } else { resolve(null) } }) .on('error', noop) .on('data', function (chunk) { limit -= chunk.length if (limit <= 0) { this.destroy() } }) .resume() }) } } // https://streams.spec.whatwg.org/#readablestream-locked function isLocked (self) { // Consume is an implicit lock. return (self[kBody] && self[kBody].locked === true) || self[kConsume] } // https://fetch.spec.whatwg.org/#body-unusable function isUnusable (self) { return util.isDisturbed(self) || isLocked(self) } async function consume (stream, type) { assert(!stream[kConsume]) return new Promise((resolve, reject) => { if (isUnusable(stream)) { const rState = stream._readableState if (rState.destroyed && rState.closeEmitted === false) { stream .on('error', err => { reject(err) }) .on('close', () => { reject(new TypeError('unusable')) }) } else { reject(rState.errored ?? new TypeError('unusable')) } } else { queueMicrotask(() => { stream[kConsume] = { type, stream, resolve, reject, length: 0, body: [] } stream .on('error', function (err) { consumeFinish(this[kConsume], err) }) .on('close', function () { if (this[kConsume].body !== null) { consumeFinish(this[kConsume], new RequestAbortedError()) } }) consumeStart(stream[kConsume]) }) } }) } function consumeStart (consume) { if (consume.body === null) { return } const { _readableState: state } = consume.stream if (state.bufferIndex) { const start = state.bufferIndex const end = state.buffer.length for (let n = start; n < end; n++) { consumePush(consume, state.buffer[n]) } } else { for (const chunk of state.buffer) { consumePush(consume, chunk) } } if (state.endEmitted) { consumeEnd(this[kConsume]) } else { consume.stream.on('end', function () { consumeEnd(this[kConsume]) }) } consume.stream.resume() while (consume.stream.read() != null) { // Loop } } /** * @param {Buffer[]} chunks * @param {number} length */ function chunksDecode (chunks, length) { if (chunks.length === 0 || length === 0) { return '' } const buffer = chunks.length === 1 ? chunks[0] : Buffer.concat(chunks, length) const bufferLength = buffer.length // Skip BOM. const start = bufferLength > 2 && buffer[0] === 0xef && buffer[1] === 0xbb && buffer[2] === 0xbf ? 3 : 0 return buffer.utf8Slice(start, bufferLength) } /** * @param {Buffer[]} chunks * @param {number} length * @returns {Uint8Array} */ function chunksConcat (chunks, length) { if (chunks.length === 0 || length === 0) { return new Uint8Array(0) } if (chunks.length === 1) { // fast-path return new Uint8Array(chunks[0]) } const buffer = new Uint8Array(Buffer.allocUnsafeSlow(length).buffer) let offset = 0 for (let i = 0; i < chunks.length; ++i) { const chunk = chunks[i] buffer.set(chunk, offset) offset += chunk.length } return buffer } function consumeEnd (consume) { const { type, body, resolve, stream, length } = consume try { if (type === 'text') { resolve(chunksDecode(body, length)) } else if (type === 'json') { resolve(JSON.parse(chunksDecode(body, length))) } else if (type === 'arrayBuffer') { resolve(chunksConcat(body, length).buffer) } else if (type === 'blob') { resolve(new Blob(body, { type: stream[kContentType] })) } else if (type === 'bytes') { resolve(chunksConcat(body, length)) } consumeFinish(consume) } catch (err) { stream.destroy(err) } } function consumePush (consume, chunk) { consume.length += chunk.length consume.body.push(chunk) } function consumeFinish (consume, err) { if (consume.body === null) { return } if (err) { consume.reject(err) } else { consume.resolve() } consume.type = null consume.stream = null consume.resolve = null consume.reject = null consume.length = 0 consume.body = null } module.exports = { Readable: BodyReadable, chunksDecode } node_modules/undici/lib/mock/mock-client.js 0000664 00000002751 15114741631 0014750 0 ustar 00 'use strict' const { promisify } = require('node:util') const Client = require('../dispatcher/client') const { buildMockDispatch } = require('./mock-utils') const { kDispatches, kMockAgent, kClose, kOriginalClose, kOrigin, kOriginalDispatch, kConnected } = require('./mock-symbols') const { MockInterceptor } = require('./mock-interceptor') const Symbols = require('../core/symbols') const { InvalidArgumentError } = require('../core/errors') /** * MockClient provides an API that extends the Client to influence the mockDispatches. */ class MockClient extends Client { constructor (origin, opts) { super(origin, opts) if (!opts || !opts.agent || typeof opts.agent.dispatch !== 'function') { throw new InvalidArgumentError('Argument opts.agent must implement Agent') } this[kMockAgent] = opts.agent this[kOrigin] = origin this[kDispatches] = [] this[kConnected] = 1 this[kOriginalDispatch] = this.dispatch this[kOriginalClose] = this.close.bind(this) this.dispatch = buildMockDispatch.call(this) this.close = this[kClose] } get [Symbols.kConnected] () { return this[kConnected] } /** * Sets up the base interceptor for mocking replies from undici. */ intercept (opts) { return new MockInterceptor(opts, this[kDispatches]) } async [kClose] () { await promisify(this[kOriginalClose])() this[kConnected] = 0 this[kMockAgent][Symbols.kClients].delete(this[kOrigin]) } } module.exports = MockClient node_modules/undici/lib/mock/pending-interceptors-formatter.js 0000664 00000002242 15114741631 0020702 0 ustar 00 'use strict' const { Transform } = require('node:stream') const { Console } = require('node:console') const PERSISTENT = process.versions.icu ? '✅' : 'Y ' const NOT_PERSISTENT = process.versions.icu ? '❌' : 'N ' /** * Gets the output of `console.table(…)` as a string. */ module.exports = class PendingInterceptorsFormatter { constructor ({ disableColors } = {}) { this.transform = new Transform({ transform (chunk, _enc, cb) { cb(null, chunk) } }) this.logger = new Console({ stdout: this.transform, inspectOptions: { colors: !disableColors && !process.env.CI } }) } format (pendingInterceptors) { const withPrettyHeaders = pendingInterceptors.map( ({ method, path, data: { statusCode }, persist, times, timesInvoked, origin }) => ({ Method: method, Origin: origin, Path: path, 'Status code': statusCode, Persistent: persist ? PERSISTENT : NOT_PERSISTENT, Invocations: timesInvoked, Remaining: persist ? Infinity : times - timesInvoked })) this.logger.table(withPrettyHeaders) return this.transform.read().toString() } } node_modules/undici/lib/mock/mock-agent.js 0000664 00000010714 15114741631 0014566 0 ustar 00 'use strict' const { kClients } = require('../core/symbols') const Agent = require('../dispatcher/agent') const { kAgent, kMockAgentSet, kMockAgentGet, kDispatches, kIsMockActive, kNetConnect, kGetNetConnect, kOptions, kFactory } = require('./mock-symbols') const MockClient = require('./mock-client') const MockPool = require('./mock-pool') const { matchValue, buildMockOptions } = require('./mock-utils') const { InvalidArgumentError, UndiciError } = require('../core/errors') const Dispatcher = require('../dispatcher/dispatcher') const Pluralizer = require('./pluralizer') const PendingInterceptorsFormatter = require('./pending-interceptors-formatter') class MockAgent extends Dispatcher { constructor (opts) { super(opts) this[kNetConnect] = true this[kIsMockActive] = true // Instantiate Agent and encapsulate if ((opts?.agent && typeof opts.agent.dispatch !== 'function')) { throw new InvalidArgumentError('Argument opts.agent must implement Agent') } const agent = opts?.agent ? opts.agent : new Agent(opts) this[kAgent] = agent this[kClients] = agent[kClients] this[kOptions] = buildMockOptions(opts) } get (origin) { let dispatcher = this[kMockAgentGet](origin) if (!dispatcher) { dispatcher = this[kFactory](origin) this[kMockAgentSet](origin, dispatcher) } return dispatcher } dispatch (opts, handler) { // Call MockAgent.get to perform additional setup before dispatching as normal this.get(opts.origin) return this[kAgent].dispatch(opts, handler) } async close () { await this[kAgent].close() this[kClients].clear() } deactivate () { this[kIsMockActive] = false } activate () { this[kIsMockActive] = true } enableNetConnect (matcher) { if (typeof matcher === 'string' || typeof matcher === 'function' || matcher instanceof RegExp) { if (Array.isArray(this[kNetConnect])) { this[kNetConnect].push(matcher) } else { this[kNetConnect] = [matcher] } } else if (typeof matcher === 'undefined') { this[kNetConnect] = true } else { throw new InvalidArgumentError('Unsupported matcher. Must be one of String|Function|RegExp.') } } disableNetConnect () { this[kNetConnect] = false } // This is required to bypass issues caused by using global symbols - see: // https://github.com/nodejs/undici/issues/1447 get isMockActive () { return this[kIsMockActive] } [kMockAgentSet] (origin, dispatcher) { this[kClients].set(origin, dispatcher) } [kFactory] (origin) { const mockOptions = Object.assign({ agent: this }, this[kOptions]) return this[kOptions] && this[kOptions].connections === 1 ? new MockClient(origin, mockOptions) : new MockPool(origin, mockOptions) } [kMockAgentGet] (origin) { // First check if we can immediately find it const client = this[kClients].get(origin) if (client) { return client } // If the origin is not a string create a dummy parent pool and return to user if (typeof origin !== 'string') { const dispatcher = this[kFactory]('http://localhost:9999') this[kMockAgentSet](origin, dispatcher) return dispatcher } // If we match, create a pool and assign the same dispatches for (const [keyMatcher, nonExplicitDispatcher] of Array.from(this[kClients])) { if (nonExplicitDispatcher && typeof keyMatcher !== 'string' && matchValue(keyMatcher, origin)) { const dispatcher = this[kFactory](origin) this[kMockAgentSet](origin, dispatcher) dispatcher[kDispatches] = nonExplicitDispatcher[kDispatches] return dispatcher } } } [kGetNetConnect] () { return this[kNetConnect] } pendingInterceptors () { const mockAgentClients = this[kClients] return Array.from(mockAgentClients.entries()) .flatMap(([origin, scope]) => scope[kDispatches].map(dispatch => ({ ...dispatch, origin }))) .filter(({ pending }) => pending) } assertNoPendingInterceptors ({ pendingInterceptorsFormatter = new PendingInterceptorsFormatter() } = {}) { const pending = this.pendingInterceptors() if (pending.length === 0) { return } const pluralizer = new Pluralizer('interceptor', 'interceptors').pluralize(pending.length) throw new UndiciError(` ${pluralizer.count} ${pluralizer.noun} ${pluralizer.is} pending: ${pendingInterceptorsFormatter.format(pending)} `.trim()) } } module.exports = MockAgent node_modules/undici/lib/mock/pluralizer.js 0000664 00000000757 15114741631 0014740 0 ustar 00 'use strict' const singulars = { pronoun: 'it', is: 'is', was: 'was', this: 'this' } const plurals = { pronoun: 'they', is: 'are', was: 'were', this: 'these' } module.exports = class Pluralizer { constructor (singular, plural) { this.singular = singular this.plural = plural } pluralize (count) { const one = count === 1 const keys = one ? singulars : plurals const noun = one ? this.singular : this.plural return { ...keys, count, noun } } } node_modules/undici/lib/mock/mock-utils.js 0000664 00000025037 15114741631 0014634 0 ustar 00 'use strict' const { MockNotMatchedError } = require('./mock-errors') const { kDispatches, kMockAgent, kOriginalDispatch, kOrigin, kGetNetConnect } = require('./mock-symbols') const { buildURL } = require('../core/util') const { STATUS_CODES } = require('node:http') const { types: { isPromise } } = require('node:util') function matchValue (match, value) { if (typeof match === 'string') { return match === value } if (match instanceof RegExp) { return match.test(value) } if (typeof match === 'function') { return match(value) === true } return false } function lowerCaseEntries (headers) { return Object.fromEntries( Object.entries(headers).map(([headerName, headerValue]) => { return [headerName.toLocaleLowerCase(), headerValue] }) ) } /** * @param {import('../../index').Headers|string[]|Record<string, string>} headers * @param {string} key */ function getHeaderByName (headers, key) { if (Array.isArray(headers)) { for (let i = 0; i < headers.length; i += 2) { if (headers[i].toLocaleLowerCase() === key.toLocaleLowerCase()) { return headers[i + 1] } } return undefined } else if (typeof headers.get === 'function') { return headers.get(key) } else { return lowerCaseEntries(headers)[key.toLocaleLowerCase()] } } /** @param {string[]} headers */ function buildHeadersFromArray (headers) { // fetch HeadersList const clone = headers.slice() const entries = [] for (let index = 0; index < clone.length; index += 2) { entries.push([clone[index], clone[index + 1]]) } return Object.fromEntries(entries) } function matchHeaders (mockDispatch, headers) { if (typeof mockDispatch.headers === 'function') { if (Array.isArray(headers)) { // fetch HeadersList headers = buildHeadersFromArray(headers) } return mockDispatch.headers(headers ? lowerCaseEntries(headers) : {}) } if (typeof mockDispatch.headers === 'undefined') { return true } if (typeof headers !== 'object' || typeof mockDispatch.headers !== 'object') { return false } for (const [matchHeaderName, matchHeaderValue] of Object.entries(mockDispatch.headers)) { const headerValue = getHeaderByName(headers, matchHeaderName) if (!matchValue(matchHeaderValue, headerValue)) { return false } } return true } function safeUrl (path) { if (typeof path !== 'string') { return path } const pathSegments = path.split('?') if (pathSegments.length !== 2) { return path } const qp = new URLSearchParams(pathSegments.pop()) qp.sort() return [...pathSegments, qp.toString()].join('?') } function matchKey (mockDispatch, { path, method, body, headers }) { const pathMatch = matchValue(mockDispatch.path, path) const methodMatch = matchValue(mockDispatch.method, method) const bodyMatch = typeof mockDispatch.body !== 'undefined' ? matchValue(mockDispatch.body, body) : true const headersMatch = matchHeaders(mockDispatch, headers) return pathMatch && methodMatch && bodyMatch && headersMatch } function getResponseData (data) { if (Buffer.isBuffer(data)) { return data } else if (data instanceof Uint8Array) { return data } else if (data instanceof ArrayBuffer) { return data } else if (typeof data === 'object') { return JSON.stringify(data) } else { return data.toString() } } function getMockDispatch (mockDispatches, key) { const basePath = key.query ? buildURL(key.path, key.query) : key.path const resolvedPath = typeof basePath === 'string' ? safeUrl(basePath) : basePath // Match path let matchedMockDispatches = mockDispatches.filter(({ consumed }) => !consumed).filter(({ path }) => matchValue(safeUrl(path), resolvedPath)) if (matchedMockDispatches.length === 0) { throw new MockNotMatchedError(`Mock dispatch not matched for path '${resolvedPath}'`) } // Match method matchedMockDispatches = matchedMockDispatches.filter(({ method }) => matchValue(method, key.method)) if (matchedMockDispatches.length === 0) { throw new MockNotMatchedError(`Mock dispatch not matched for method '${key.method}' on path '${resolvedPath}'`) } // Match body matchedMockDispatches = matchedMockDispatches.filter(({ body }) => typeof body !== 'undefined' ? matchValue(body, key.body) : true) if (matchedMockDispatches.length === 0) { throw new MockNotMatchedError(`Mock dispatch not matched for body '${key.body}' on path '${resolvedPath}'`) } // Match headers matchedMockDispatches = matchedMockDispatches.filter((mockDispatch) => matchHeaders(mockDispatch, key.headers)) if (matchedMockDispatches.length === 0) { const headers = typeof key.headers === 'object' ? JSON.stringify(key.headers) : key.headers throw new MockNotMatchedError(`Mock dispatch not matched for headers '${headers}' on path '${resolvedPath}'`) } return matchedMockDispatches[0] } function addMockDispatch (mockDispatches, key, data) { const baseData = { timesInvoked: 0, times: 1, persist: false, consumed: false } const replyData = typeof data === 'function' ? { callback: data } : { ...data } const newMockDispatch = { ...baseData, ...key, pending: true, data: { error: null, ...replyData } } mockDispatches.push(newMockDispatch) return newMockDispatch } function deleteMockDispatch (mockDispatches, key) { const index = mockDispatches.findIndex(dispatch => { if (!dispatch.consumed) { return false } return matchKey(dispatch, key) }) if (index !== -1) { mockDispatches.splice(index, 1) } } function buildKey (opts) { const { path, method, body, headers, query } = opts return { path, method, body, headers, query } } function generateKeyValues (data) { const keys = Object.keys(data) const result = [] for (let i = 0; i < keys.length; ++i) { const key = keys[i] const value = data[key] const name = Buffer.from(`${key}`) if (Array.isArray(value)) { for (let j = 0; j < value.length; ++j) { result.push(name, Buffer.from(`${value[j]}`)) } } else { result.push(name, Buffer.from(`${value}`)) } } return result } /** * @see https://developer.mozilla.org/en-US/docs/Web/HTTP/Status * @param {number} statusCode */ function getStatusText (statusCode) { return STATUS_CODES[statusCode] || 'unknown' } async function getResponse (body) { const buffers = [] for await (const data of body) { buffers.push(data) } return Buffer.concat(buffers).toString('utf8') } /** * Mock dispatch function used to simulate undici dispatches */ function mockDispatch (opts, handler) { // Get mock dispatch from built key const key = buildKey(opts) const mockDispatch = getMockDispatch(this[kDispatches], key) mockDispatch.timesInvoked++ // Here's where we resolve a callback if a callback is present for the dispatch data. if (mockDispatch.data.callback) { mockDispatch.data = { ...mockDispatch.data, ...mockDispatch.data.callback(opts) } } // Parse mockDispatch data const { data: { statusCode, data, headers, trailers, error }, delay, persist } = mockDispatch const { timesInvoked, times } = mockDispatch // If it's used up and not persistent, mark as consumed mockDispatch.consumed = !persist && timesInvoked >= times mockDispatch.pending = timesInvoked < times // If specified, trigger dispatch error if (error !== null) { deleteMockDispatch(this[kDispatches], key) handler.onError(error) return true } // Handle the request with a delay if necessary if (typeof delay === 'number' && delay > 0) { setTimeout(() => { handleReply(this[kDispatches]) }, delay) } else { handleReply(this[kDispatches]) } function handleReply (mockDispatches, _data = data) { // fetch's HeadersList is a 1D string array const optsHeaders = Array.isArray(opts.headers) ? buildHeadersFromArray(opts.headers) : opts.headers const body = typeof _data === 'function' ? _data({ ...opts, headers: optsHeaders }) : _data // util.types.isPromise is likely needed for jest. if (isPromise(body)) { // If handleReply is asynchronous, throwing an error // in the callback will reject the promise, rather than // synchronously throw the error, which breaks some tests. // Rather, we wait for the callback to resolve if it is a // promise, and then re-run handleReply with the new body. body.then((newData) => handleReply(mockDispatches, newData)) return } const responseData = getResponseData(body) const responseHeaders = generateKeyValues(headers) const responseTrailers = generateKeyValues(trailers) handler.onConnect?.(err => handler.onError(err), null) handler.onHeaders?.(statusCode, responseHeaders, resume, getStatusText(statusCode)) handler.onData?.(Buffer.from(responseData)) handler.onComplete?.(responseTrailers) deleteMockDispatch(mockDispatches, key) } function resume () {} return true } function buildMockDispatch () { const agent = this[kMockAgent] const origin = this[kOrigin] const originalDispatch = this[kOriginalDispatch] return function dispatch (opts, handler) { if (agent.isMockActive) { try { mockDispatch.call(this, opts, handler) } catch (error) { if (error instanceof MockNotMatchedError) { const netConnect = agent[kGetNetConnect]() if (netConnect === false) { throw new MockNotMatchedError(`${error.message}: subsequent request to origin ${origin} was not allowed (net.connect disabled)`) } if (checkNetConnect(netConnect, origin)) { originalDispatch.call(this, opts, handler) } else { throw new MockNotMatchedError(`${error.message}: subsequent request to origin ${origin} was not allowed (net.connect is not enabled for this origin)`) } } else { throw error } } } else { originalDispatch.call(this, opts, handler) } } } function checkNetConnect (netConnect, origin) { const url = new URL(origin) if (netConnect === true) { return true } else if (Array.isArray(netConnect) && netConnect.some((matcher) => matchValue(matcher, url.host))) { return true } return false } function buildMockOptions (opts) { if (opts) { const { agent, ...mockOptions } = opts return mockOptions } } module.exports = { getResponseData, getMockDispatch, addMockDispatch, deleteMockDispatch, buildKey, generateKeyValues, matchValue, getResponse, getStatusText, mockDispatch, buildMockDispatch, checkNetConnect, buildMockOptions, getHeaderByName, buildHeadersFromArray } node_modules/undici/lib/mock/mock-interceptor.js 0000664 00000015250 15114741631 0016026 0 ustar 00 'use strict' const { getResponseData, buildKey, addMockDispatch } = require('./mock-utils') const { kDispatches, kDispatchKey, kDefaultHeaders, kDefaultTrailers, kContentLength, kMockDispatch } = require('./mock-symbols') const { InvalidArgumentError } = require('../core/errors') const { buildURL } = require('../core/util') /** * Defines the scope API for an interceptor reply */ class MockScope { constructor (mockDispatch) { this[kMockDispatch] = mockDispatch } /** * Delay a reply by a set amount in ms. */ delay (waitInMs) { if (typeof waitInMs !== 'number' || !Number.isInteger(waitInMs) || waitInMs <= 0) { throw new InvalidArgumentError('waitInMs must be a valid integer > 0') } this[kMockDispatch].delay = waitInMs return this } /** * For a defined reply, never mark as consumed. */ persist () { this[kMockDispatch].persist = true return this } /** * Allow one to define a reply for a set amount of matching requests. */ times (repeatTimes) { if (typeof repeatTimes !== 'number' || !Number.isInteger(repeatTimes) || repeatTimes <= 0) { throw new InvalidArgumentError('repeatTimes must be a valid integer > 0') } this[kMockDispatch].times = repeatTimes return this } } /** * Defines an interceptor for a Mock */ class MockInterceptor { constructor (opts, mockDispatches) { if (typeof opts !== 'object') { throw new InvalidArgumentError('opts must be an object') } if (typeof opts.path === 'undefined') { throw new InvalidArgumentError('opts.path must be defined') } if (typeof opts.method === 'undefined') { opts.method = 'GET' } // See https://github.com/nodejs/undici/issues/1245 // As per RFC 3986, clients are not supposed to send URI // fragments to servers when they retrieve a document, if (typeof opts.path === 'string') { if (opts.query) { opts.path = buildURL(opts.path, opts.query) } else { // Matches https://github.com/nodejs/undici/blob/main/lib/web/fetch/index.js#L1811 const parsedURL = new URL(opts.path, 'data://') opts.path = parsedURL.pathname + parsedURL.search } } if (typeof opts.method === 'string') { opts.method = opts.method.toUpperCase() } this[kDispatchKey] = buildKey(opts) this[kDispatches] = mockDispatches this[kDefaultHeaders] = {} this[kDefaultTrailers] = {} this[kContentLength] = false } createMockScopeDispatchData ({ statusCode, data, responseOptions }) { const responseData = getResponseData(data) const contentLength = this[kContentLength] ? { 'content-length': responseData.length } : {} const headers = { ...this[kDefaultHeaders], ...contentLength, ...responseOptions.headers } const trailers = { ...this[kDefaultTrailers], ...responseOptions.trailers } return { statusCode, data, headers, trailers } } validateReplyParameters (replyParameters) { if (typeof replyParameters.statusCode === 'undefined') { throw new InvalidArgumentError('statusCode must be defined') } if (typeof replyParameters.responseOptions !== 'object' || replyParameters.responseOptions === null) { throw new InvalidArgumentError('responseOptions must be an object') } } /** * Mock an undici request with a defined reply. */ reply (replyOptionsCallbackOrStatusCode) { // Values of reply aren't available right now as they // can only be available when the reply callback is invoked. if (typeof replyOptionsCallbackOrStatusCode === 'function') { // We'll first wrap the provided callback in another function, // this function will properly resolve the data from the callback // when invoked. const wrappedDefaultsCallback = (opts) => { // Our reply options callback contains the parameter for statusCode, data and options. const resolvedData = replyOptionsCallbackOrStatusCode(opts) // Check if it is in the right format if (typeof resolvedData !== 'object' || resolvedData === null) { throw new InvalidArgumentError('reply options callback must return an object') } const replyParameters = { data: '', responseOptions: {}, ...resolvedData } this.validateReplyParameters(replyParameters) // Since the values can be obtained immediately we return them // from this higher order function that will be resolved later. return { ...this.createMockScopeDispatchData(replyParameters) } } // Add usual dispatch data, but this time set the data parameter to function that will eventually provide data. const newMockDispatch = addMockDispatch(this[kDispatches], this[kDispatchKey], wrappedDefaultsCallback) return new MockScope(newMockDispatch) } // We can have either one or three parameters, if we get here, // we should have 1-3 parameters. So we spread the arguments of // this function to obtain the parameters, since replyData will always // just be the statusCode. const replyParameters = { statusCode: replyOptionsCallbackOrStatusCode, data: arguments[1] === undefined ? '' : arguments[1], responseOptions: arguments[2] === undefined ? {} : arguments[2] } this.validateReplyParameters(replyParameters) // Send in-already provided data like usual const dispatchData = this.createMockScopeDispatchData(replyParameters) const newMockDispatch = addMockDispatch(this[kDispatches], this[kDispatchKey], dispatchData) return new MockScope(newMockDispatch) } /** * Mock an undici request with a defined error. */ replyWithError (error) { if (typeof error === 'undefined') { throw new InvalidArgumentError('error must be defined') } const newMockDispatch = addMockDispatch(this[kDispatches], this[kDispatchKey], { error }) return new MockScope(newMockDispatch) } /** * Set default reply headers on the interceptor for subsequent replies */ defaultReplyHeaders (headers) { if (typeof headers === 'undefined') { throw new InvalidArgumentError('headers must be defined') } this[kDefaultHeaders] = headers return this } /** * Set default reply trailers on the interceptor for subsequent replies */ defaultReplyTrailers (trailers) { if (typeof trailers === 'undefined') { throw new InvalidArgumentError('trailers must be defined') } this[kDefaultTrailers] = trailers return this } /** * Set reply content length header for replies on the interceptor */ replyContentLength () { this[kContentLength] = true return this } } module.exports.MockInterceptor = MockInterceptor module.exports.MockScope = MockScope node_modules/undici/lib/mock/mock-errors.js 0000664 00000000667 15114741631 0015012 0 ustar 00 'use strict' const { UndiciError } = require('../core/errors') class MockNotMatchedError extends UndiciError { constructor (message) { super(message) Error.captureStackTrace(this, MockNotMatchedError) this.name = 'MockNotMatchedError' this.message = message || 'The request does not match any registered mock dispatches' this.code = 'UND_MOCK_ERR_MOCK_NOT_MATCHED' } } module.exports = { MockNotMatchedError } node_modules/undici/lib/mock/mock-pool.js 0000664 00000002733 15114741631 0014443 0 ustar 00 'use strict' const { promisify } = require('node:util') const Pool = require('../dispatcher/pool') const { buildMockDispatch } = require('./mock-utils') const { kDispatches, kMockAgent, kClose, kOriginalClose, kOrigin, kOriginalDispatch, kConnected } = require('./mock-symbols') const { MockInterceptor } = require('./mock-interceptor') const Symbols = require('../core/symbols') const { InvalidArgumentError } = require('../core/errors') /** * MockPool provides an API that extends the Pool to influence the mockDispatches. */ class MockPool extends Pool { constructor (origin, opts) { super(origin, opts) if (!opts || !opts.agent || typeof opts.agent.dispatch !== 'function') { throw new InvalidArgumentError('Argument opts.agent must implement Agent') } this[kMockAgent] = opts.agent this[kOrigin] = origin this[kDispatches] = [] this[kConnected] = 1 this[kOriginalDispatch] = this.dispatch this[kOriginalClose] = this.close.bind(this) this.dispatch = buildMockDispatch.call(this) this.close = this[kClose] } get [Symbols.kConnected] () { return this[kConnected] } /** * Sets up the base interceptor for mocking replies from undici. */ intercept (opts) { return new MockInterceptor(opts, this[kDispatches]) } async [kClose] () { await promisify(this[kOriginalClose])() this[kConnected] = 0 this[kMockAgent][Symbols.kClients].delete(this[kOrigin]) } } module.exports = MockPool node_modules/undici/lib/mock/mock-symbols.js 0000664 00000001401 15114741631 0015151 0 ustar 00 'use strict' module.exports = { kAgent: Symbol('agent'), kOptions: Symbol('options'), kFactory: Symbol('factory'), kDispatches: Symbol('dispatches'), kDispatchKey: Symbol('dispatch key'), kDefaultHeaders: Symbol('default headers'), kDefaultTrailers: Symbol('default trailers'), kContentLength: Symbol('content length'), kMockAgent: Symbol('mock agent'), kMockAgentSet: Symbol('mock agent set'), kMockAgentGet: Symbol('mock agent get'), kMockDispatch: Symbol('mock dispatch'), kClose: Symbol('close'), kOriginalClose: Symbol('original agent close'), kOrigin: Symbol('origin'), kIsMockActive: Symbol('is mock active'), kNetConnect: Symbol('net connect'), kGetNetConnect: Symbol('get net connect'), kConnected: Symbol('connected') } node_modules/undici/lib/core/diagnostics.js 0000664 00000013067 15114741631 0015053 0 ustar 00 'use strict' const diagnosticsChannel = require('node:diagnostics_channel') const util = require('node:util') const undiciDebugLog = util.debuglog('undici') const fetchDebuglog = util.debuglog('fetch') const websocketDebuglog = util.debuglog('websocket') let isClientSet = false const channels = { // Client beforeConnect: diagnosticsChannel.channel('undici:client:beforeConnect'), connected: diagnosticsChannel.channel('undici:client:connected'), connectError: diagnosticsChannel.channel('undici:client:connectError'), sendHeaders: diagnosticsChannel.channel('undici:client:sendHeaders'), // Request create: diagnosticsChannel.channel('undici:request:create'), bodySent: diagnosticsChannel.channel('undici:request:bodySent'), headers: diagnosticsChannel.channel('undici:request:headers'), trailers: diagnosticsChannel.channel('undici:request:trailers'), error: diagnosticsChannel.channel('undici:request:error'), // WebSocket open: diagnosticsChannel.channel('undici:websocket:open'), close: diagnosticsChannel.channel('undici:websocket:close'), socketError: diagnosticsChannel.channel('undici:websocket:socket_error'), ping: diagnosticsChannel.channel('undici:websocket:ping'), pong: diagnosticsChannel.channel('undici:websocket:pong') } if (undiciDebugLog.enabled || fetchDebuglog.enabled) { const debuglog = fetchDebuglog.enabled ? fetchDebuglog : undiciDebugLog // Track all Client events diagnosticsChannel.channel('undici:client:beforeConnect').subscribe(evt => { const { connectParams: { version, protocol, port, host } } = evt debuglog( 'connecting to %s using %s%s', `${host}${port ? `:${port}` : ''}`, protocol, version ) }) diagnosticsChannel.channel('undici:client:connected').subscribe(evt => { const { connectParams: { version, protocol, port, host } } = evt debuglog( 'connected to %s using %s%s', `${host}${port ? `:${port}` : ''}`, protocol, version ) }) diagnosticsChannel.channel('undici:client:connectError').subscribe(evt => { const { connectParams: { version, protocol, port, host }, error } = evt debuglog( 'connection to %s using %s%s errored - %s', `${host}${port ? `:${port}` : ''}`, protocol, version, error.message ) }) diagnosticsChannel.channel('undici:client:sendHeaders').subscribe(evt => { const { request: { method, path, origin } } = evt debuglog('sending request to %s %s/%s', method, origin, path) }) // Track Request events diagnosticsChannel.channel('undici:request:headers').subscribe(evt => { const { request: { method, path, origin }, response: { statusCode } } = evt debuglog( 'received response to %s %s/%s - HTTP %d', method, origin, path, statusCode ) }) diagnosticsChannel.channel('undici:request:trailers').subscribe(evt => { const { request: { method, path, origin } } = evt debuglog('trailers received from %s %s/%s', method, origin, path) }) diagnosticsChannel.channel('undici:request:error').subscribe(evt => { const { request: { method, path, origin }, error } = evt debuglog( 'request to %s %s/%s errored - %s', method, origin, path, error.message ) }) isClientSet = true } if (websocketDebuglog.enabled) { if (!isClientSet) { const debuglog = undiciDebugLog.enabled ? undiciDebugLog : websocketDebuglog diagnosticsChannel.channel('undici:client:beforeConnect').subscribe(evt => { const { connectParams: { version, protocol, port, host } } = evt debuglog( 'connecting to %s%s using %s%s', host, port ? `:${port}` : '', protocol, version ) }) diagnosticsChannel.channel('undici:client:connected').subscribe(evt => { const { connectParams: { version, protocol, port, host } } = evt debuglog( 'connected to %s%s using %s%s', host, port ? `:${port}` : '', protocol, version ) }) diagnosticsChannel.channel('undici:client:connectError').subscribe(evt => { const { connectParams: { version, protocol, port, host }, error } = evt debuglog( 'connection to %s%s using %s%s errored - %s', host, port ? `:${port}` : '', protocol, version, error.message ) }) diagnosticsChannel.channel('undici:client:sendHeaders').subscribe(evt => { const { request: { method, path, origin } } = evt debuglog('sending request to %s %s/%s', method, origin, path) }) } // Track all WebSocket events diagnosticsChannel.channel('undici:websocket:open').subscribe(evt => { const { address: { address, port } } = evt websocketDebuglog('connection opened %s%s', address, port ? `:${port}` : '') }) diagnosticsChannel.channel('undici:websocket:close').subscribe(evt => { const { websocket, code, reason } = evt websocketDebuglog( 'closed connection to %s - %s %s', websocket.url, code, reason ) }) diagnosticsChannel.channel('undici:websocket:socket_error').subscribe(err => { websocketDebuglog('connection errored - %s', err.message) }) diagnosticsChannel.channel('undici:websocket:ping').subscribe(evt => { websocketDebuglog('ping received') }) diagnosticsChannel.channel('undici:websocket:pong').subscribe(evt => { websocketDebuglog('pong received') }) } module.exports = { channels } node_modules/undici/lib/core/constants.js 0000664 00000005062 15114741631 0014554 0 ustar 00 'use strict' /** @type {Record<string, string | undefined>} */ const headerNameLowerCasedRecord = {} // https://developer.mozilla.org/docs/Web/HTTP/Headers const wellknownHeaderNames = [ 'Accept', 'Accept-Encoding', 'Accept-Language', 'Accept-Ranges', 'Access-Control-Allow-Credentials', 'Access-Control-Allow-Headers', 'Access-Control-Allow-Methods', 'Access-Control-Allow-Origin', 'Access-Control-Expose-Headers', 'Access-Control-Max-Age', 'Access-Control-Request-Headers', 'Access-Control-Request-Method', 'Age', 'Allow', 'Alt-Svc', 'Alt-Used', 'Authorization', 'Cache-Control', 'Clear-Site-Data', 'Connection', 'Content-Disposition', 'Content-Encoding', 'Content-Language', 'Content-Length', 'Content-Location', 'Content-Range', 'Content-Security-Policy', 'Content-Security-Policy-Report-Only', 'Content-Type', 'Cookie', 'Cross-Origin-Embedder-Policy', 'Cross-Origin-Opener-Policy', 'Cross-Origin-Resource-Policy', 'Date', 'Device-Memory', 'Downlink', 'ECT', 'ETag', 'Expect', 'Expect-CT', 'Expires', 'Forwarded', 'From', 'Host', 'If-Match', 'If-Modified-Since', 'If-None-Match', 'If-Range', 'If-Unmodified-Since', 'Keep-Alive', 'Last-Modified', 'Link', 'Location', 'Max-Forwards', 'Origin', 'Permissions-Policy', 'Pragma', 'Proxy-Authenticate', 'Proxy-Authorization', 'RTT', 'Range', 'Referer', 'Referrer-Policy', 'Refresh', 'Retry-After', 'Sec-WebSocket-Accept', 'Sec-WebSocket-Extensions', 'Sec-WebSocket-Key', 'Sec-WebSocket-Protocol', 'Sec-WebSocket-Version', 'Server', 'Server-Timing', 'Service-Worker-Allowed', 'Service-Worker-Navigation-Preload', 'Set-Cookie', 'SourceMap', 'Strict-Transport-Security', 'Supports-Loading-Mode', 'TE', 'Timing-Allow-Origin', 'Trailer', 'Transfer-Encoding', 'Upgrade', 'Upgrade-Insecure-Requests', 'User-Agent', 'Vary', 'Via', 'WWW-Authenticate', 'X-Content-Type-Options', 'X-DNS-Prefetch-Control', 'X-Frame-Options', 'X-Permitted-Cross-Domain-Policies', 'X-Powered-By', 'X-Requested-With', 'X-XSS-Protection' ] for (let i = 0; i < wellknownHeaderNames.length; ++i) { const key = wellknownHeaderNames[i] const lowerCasedKey = key.toLowerCase() headerNameLowerCasedRecord[key] = headerNameLowerCasedRecord[lowerCasedKey] = lowerCasedKey } // Note: object prototypes should not be able to be referenced. e.g. `Object#hasOwnProperty`. Object.setPrototypeOf(headerNameLowerCasedRecord, null) module.exports = { wellknownHeaderNames, headerNameLowerCasedRecord } node_modules/undici/lib/core/symbols.js 0000664 00000004763 15114741631 0014237 0 ustar 00 module.exports = { kClose: Symbol('close'), kDestroy: Symbol('destroy'), kDispatch: Symbol('dispatch'), kUrl: Symbol('url'), kWriting: Symbol('writing'), kResuming: Symbol('resuming'), kQueue: Symbol('queue'), kConnect: Symbol('connect'), kConnecting: Symbol('connecting'), kKeepAliveDefaultTimeout: Symbol('default keep alive timeout'), kKeepAliveMaxTimeout: Symbol('max keep alive timeout'), kKeepAliveTimeoutThreshold: Symbol('keep alive timeout threshold'), kKeepAliveTimeoutValue: Symbol('keep alive timeout'), kKeepAlive: Symbol('keep alive'), kHeadersTimeout: Symbol('headers timeout'), kBodyTimeout: Symbol('body timeout'), kServerName: Symbol('server name'), kLocalAddress: Symbol('local address'), kHost: Symbol('host'), kNoRef: Symbol('no ref'), kBodyUsed: Symbol('used'), kBody: Symbol('abstracted request body'), kRunning: Symbol('running'), kBlocking: Symbol('blocking'), kPending: Symbol('pending'), kSize: Symbol('size'), kBusy: Symbol('busy'), kQueued: Symbol('queued'), kFree: Symbol('free'), kConnected: Symbol('connected'), kClosed: Symbol('closed'), kNeedDrain: Symbol('need drain'), kReset: Symbol('reset'), kDestroyed: Symbol.for('nodejs.stream.destroyed'), kResume: Symbol('resume'), kOnError: Symbol('on error'), kMaxHeadersSize: Symbol('max headers size'), kRunningIdx: Symbol('running index'), kPendingIdx: Symbol('pending index'), kError: Symbol('error'), kClients: Symbol('clients'), kClient: Symbol('client'), kParser: Symbol('parser'), kOnDestroyed: Symbol('destroy callbacks'), kPipelining: Symbol('pipelining'), kSocket: Symbol('socket'), kHostHeader: Symbol('host header'), kConnector: Symbol('connector'), kStrictContentLength: Symbol('strict content length'), kMaxRedirections: Symbol('maxRedirections'), kMaxRequests: Symbol('maxRequestsPerClient'), kProxy: Symbol('proxy agent options'), kCounter: Symbol('socket request counter'), kInterceptors: Symbol('dispatch interceptors'), kMaxResponseSize: Symbol('max response size'), kHTTP2Session: Symbol('http2Session'), kHTTP2SessionState: Symbol('http2Session state'), kRetryHandlerDefaultRetry: Symbol('retry agent default retry'), kConstruct: Symbol('constructable'), kListeners: Symbol('listeners'), kHTTPContext: Symbol('http context'), kMaxConcurrentStreams: Symbol('max concurrent streams'), kNoProxyAgent: Symbol('no proxy agent'), kHttpProxyAgent: Symbol('http proxy agent'), kHttpsProxyAgent: Symbol('https proxy agent') } node_modules/undici/lib/core/request.js 0000664 00000024307 15114741631 0014233 0 ustar 00 'use strict' const { InvalidArgumentError, NotSupportedError } = require('./errors') const assert = require('node:assert') const { isValidHTTPToken, isValidHeaderValue, isStream, destroy, isBuffer, isFormDataLike, isIterable, isBlobLike, buildURL, validateHandler, getServerName, normalizedMethodRecords } = require('./util') const { channels } = require('./diagnostics.js') const { headerNameLowerCasedRecord } = require('./constants') // Verifies that a given path is valid does not contain control chars \x00 to \x20 const invalidPathRegex = /[^\u0021-\u00ff]/ const kHandler = Symbol('handler') class Request { constructor (origin, { path, method, body, headers, query, idempotent, blocking, upgrade, headersTimeout, bodyTimeout, reset, throwOnError, expectContinue, servername }, handler) { if (typeof path !== 'string') { throw new InvalidArgumentError('path must be a string') } else if ( path[0] !== '/' && !(path.startsWith('http://') || path.startsWith('https://')) && method !== 'CONNECT' ) { throw new InvalidArgumentError('path must be an absolute URL or start with a slash') } else if (invalidPathRegex.test(path)) { throw new InvalidArgumentError('invalid request path') } if (typeof method !== 'string') { throw new InvalidArgumentError('method must be a string') } else if (normalizedMethodRecords[method] === undefined && !isValidHTTPToken(method)) { throw new InvalidArgumentError('invalid request method') } if (upgrade && typeof upgrade !== 'string') { throw new InvalidArgumentError('upgrade must be a string') } if (headersTimeout != null && (!Number.isFinite(headersTimeout) || headersTimeout < 0)) { throw new InvalidArgumentError('invalid headersTimeout') } if (bodyTimeout != null && (!Number.isFinite(bodyTimeout) || bodyTimeout < 0)) { throw new InvalidArgumentError('invalid bodyTimeout') } if (reset != null && typeof reset !== 'boolean') { throw new InvalidArgumentError('invalid reset') } if (expectContinue != null && typeof expectContinue !== 'boolean') { throw new InvalidArgumentError('invalid expectContinue') } this.headersTimeout = headersTimeout this.bodyTimeout = bodyTimeout this.throwOnError = throwOnError === true this.method = method this.abort = null if (body == null) { this.body = null } else if (isStream(body)) { this.body = body const rState = this.body._readableState if (!rState || !rState.autoDestroy) { this.endHandler = function autoDestroy () { destroy(this) } this.body.on('end', this.endHandler) } this.errorHandler = err => { if (this.abort) { this.abort(err) } else { this.error = err } } this.body.on('error', this.errorHandler) } else if (isBuffer(body)) { this.body = body.byteLength ? body : null } else if (ArrayBuffer.isView(body)) { this.body = body.buffer.byteLength ? Buffer.from(body.buffer, body.byteOffset, body.byteLength) : null } else if (body instanceof ArrayBuffer) { this.body = body.byteLength ? Buffer.from(body) : null } else if (typeof body === 'string') { this.body = body.length ? Buffer.from(body) : null } else if (isFormDataLike(body) || isIterable(body) || isBlobLike(body)) { this.body = body } else { throw new InvalidArgumentError('body must be a string, a Buffer, a Readable stream, an iterable, or an async iterable') } this.completed = false this.aborted = false this.upgrade = upgrade || null this.path = query ? buildURL(path, query) : path this.origin = origin this.idempotent = idempotent == null ? method === 'HEAD' || method === 'GET' : idempotent this.blocking = blocking == null ? false : blocking this.reset = reset == null ? null : reset this.host = null this.contentLength = null this.contentType = null this.headers = [] // Only for H2 this.expectContinue = expectContinue != null ? expectContinue : false if (Array.isArray(headers)) { if (headers.length % 2 !== 0) { throw new InvalidArgumentError('headers array must be even') } for (let i = 0; i < headers.length; i += 2) { processHeader(this, headers[i], headers[i + 1]) } } else if (headers && typeof headers === 'object') { if (headers[Symbol.iterator]) { for (const header of headers) { if (!Array.isArray(header) || header.length !== 2) { throw new InvalidArgumentError('headers must be in key-value pair format') } processHeader(this, header[0], header[1]) } } else { const keys = Object.keys(headers) for (let i = 0; i < keys.length; ++i) { processHeader(this, keys[i], headers[keys[i]]) } } } else if (headers != null) { throw new InvalidArgumentError('headers must be an object or an array') } validateHandler(handler, method, upgrade) this.servername = servername || getServerName(this.host) this[kHandler] = handler if (channels.create.hasSubscribers) { channels.create.publish({ request: this }) } } onBodySent (chunk) { if (this[kHandler].onBodySent) { try { return this[kHandler].onBodySent(chunk) } catch (err) { this.abort(err) } } } onRequestSent () { if (channels.bodySent.hasSubscribers) { channels.bodySent.publish({ request: this }) } if (this[kHandler].onRequestSent) { try { return this[kHandler].onRequestSent() } catch (err) { this.abort(err) } } } onConnect (abort) { assert(!this.aborted) assert(!this.completed) if (this.error) { abort(this.error) } else { this.abort = abort return this[kHandler].onConnect(abort) } } onResponseStarted () { return this[kHandler].onResponseStarted?.() } onHeaders (statusCode, headers, resume, statusText) { assert(!this.aborted) assert(!this.completed) if (channels.headers.hasSubscribers) { channels.headers.publish({ request: this, response: { statusCode, headers, statusText } }) } try { return this[kHandler].onHeaders(statusCode, headers, resume, statusText) } catch (err) { this.abort(err) } } onData (chunk) { assert(!this.aborted) assert(!this.completed) try { return this[kHandler].onData(chunk) } catch (err) { this.abort(err) return false } } onUpgrade (statusCode, headers, socket) { assert(!this.aborted) assert(!this.completed) return this[kHandler].onUpgrade(statusCode, headers, socket) } onComplete (trailers) { this.onFinally() assert(!this.aborted) this.completed = true if (channels.trailers.hasSubscribers) { channels.trailers.publish({ request: this, trailers }) } try { return this[kHandler].onComplete(trailers) } catch (err) { // TODO (fix): This might be a bad idea? this.onError(err) } } onError (error) { this.onFinally() if (channels.error.hasSubscribers) { channels.error.publish({ request: this, error }) } if (this.aborted) { return } this.aborted = true return this[kHandler].onError(error) } onFinally () { if (this.errorHandler) { this.body.off('error', this.errorHandler) this.errorHandler = null } if (this.endHandler) { this.body.off('end', this.endHandler) this.endHandler = null } } addHeader (key, value) { processHeader(this, key, value) return this } } function processHeader (request, key, val) { if (val && (typeof val === 'object' && !Array.isArray(val))) { throw new InvalidArgumentError(`invalid ${key} header`) } else if (val === undefined) { return } let headerName = headerNameLowerCasedRecord[key] if (headerName === undefined) { headerName = key.toLowerCase() if (headerNameLowerCasedRecord[headerName] === undefined && !isValidHTTPToken(headerName)) { throw new InvalidArgumentError('invalid header key') } } if (Array.isArray(val)) { const arr = [] for (let i = 0; i < val.length; i++) { if (typeof val[i] === 'string') { if (!isValidHeaderValue(val[i])) { throw new InvalidArgumentError(`invalid ${key} header`) } arr.push(val[i]) } else if (val[i] === null) { arr.push('') } else if (typeof val[i] === 'object') { throw new InvalidArgumentError(`invalid ${key} header`) } else { arr.push(`${val[i]}`) } } val = arr } else if (typeof val === 'string') { if (!isValidHeaderValue(val)) { throw new InvalidArgumentError(`invalid ${key} header`) } } else if (val === null) { val = '' } else { val = `${val}` } if (request.host === null && headerName === 'host') { if (typeof val !== 'string') { throw new InvalidArgumentError('invalid host header') } // Consumed by Client request.host = val } else if (request.contentLength === null && headerName === 'content-length') { request.contentLength = parseInt(val, 10) if (!Number.isFinite(request.contentLength)) { throw new InvalidArgumentError('invalid content-length header') } } else if (request.contentType === null && headerName === 'content-type') { request.contentType = val request.headers.push(key, val) } else if (headerName === 'transfer-encoding' || headerName === 'keep-alive' || headerName === 'upgrade') { throw new InvalidArgumentError(`invalid ${headerName} header`) } else if (headerName === 'connection') { const value = typeof val === 'string' ? val.toLowerCase() : null if (value !== 'close' && value !== 'keep-alive') { throw new InvalidArgumentError('invalid connection header') } if (value === 'close') { request.reset = true } } else if (headerName === 'expect') { throw new NotSupportedError('expect header not supported') } else { request.headers.push(key, val) } } module.exports = Request node_modules/undici/lib/core/errors.js 0000664 00000014404 15114741631 0014054 0 ustar 00 'use strict' class UndiciError extends Error { constructor (message) { super(message) this.name = 'UndiciError' this.code = 'UND_ERR' } } class ConnectTimeoutError extends UndiciError { constructor (message) { super(message) this.name = 'ConnectTimeoutError' this.message = message || 'Connect Timeout Error' this.code = 'UND_ERR_CONNECT_TIMEOUT' } } class HeadersTimeoutError extends UndiciError { constructor (message) { super(message) this.name = 'HeadersTimeoutError' this.message = message || 'Headers Timeout Error' this.code = 'UND_ERR_HEADERS_TIMEOUT' } } class HeadersOverflowError extends UndiciError { constructor (message) { super(message) this.name = 'HeadersOverflowError' this.message = message || 'Headers Overflow Error' this.code = 'UND_ERR_HEADERS_OVERFLOW' } } class BodyTimeoutError extends UndiciError { constructor (message) { super(message) this.name = 'BodyTimeoutError' this.message = message || 'Body Timeout Error' this.code = 'UND_ERR_BODY_TIMEOUT' } } class ResponseStatusCodeError extends UndiciError { constructor (message, statusCode, headers, body) { super(message) this.name = 'ResponseStatusCodeError' this.message = message || 'Response Status Code Error' this.code = 'UND_ERR_RESPONSE_STATUS_CODE' this.body = body this.status = statusCode this.statusCode = statusCode this.headers = headers } } class InvalidArgumentError extends UndiciError { constructor (message) { super(message) this.name = 'InvalidArgumentError' this.message = message || 'Invalid Argument Error' this.code = 'UND_ERR_INVALID_ARG' } } class InvalidReturnValueError extends UndiciError { constructor (message) { super(message) this.name = 'InvalidReturnValueError' this.message = message || 'Invalid Return Value Error' this.code = 'UND_ERR_INVALID_RETURN_VALUE' } } class AbortError extends UndiciError { constructor (message) { super(message) this.name = 'AbortError' this.message = message || 'The operation was aborted' } } class RequestAbortedError extends AbortError { constructor (message) { super(message) this.name = 'AbortError' this.message = message || 'Request aborted' this.code = 'UND_ERR_ABORTED' } } class InformationalError extends UndiciError { constructor (message) { super(message) this.name = 'InformationalError' this.message = message || 'Request information' this.code = 'UND_ERR_INFO' } } class RequestContentLengthMismatchError extends UndiciError { constructor (message) { super(message) this.name = 'RequestContentLengthMismatchError' this.message = message || 'Request body length does not match content-length header' this.code = 'UND_ERR_REQ_CONTENT_LENGTH_MISMATCH' } } class ResponseContentLengthMismatchError extends UndiciError { constructor (message) { super(message) this.name = 'ResponseContentLengthMismatchError' this.message = message || 'Response body length does not match content-length header' this.code = 'UND_ERR_RES_CONTENT_LENGTH_MISMATCH' } } class ClientDestroyedError extends UndiciError { constructor (message) { super(message) this.name = 'ClientDestroyedError' this.message = message || 'The client is destroyed' this.code = 'UND_ERR_DESTROYED' } } class ClientClosedError extends UndiciError { constructor (message) { super(message) this.name = 'ClientClosedError' this.message = message || 'The client is closed' this.code = 'UND_ERR_CLOSED' } } class SocketError extends UndiciError { constructor (message, socket) { super(message) this.name = 'SocketError' this.message = message || 'Socket error' this.code = 'UND_ERR_SOCKET' this.socket = socket } } class NotSupportedError extends UndiciError { constructor (message) { super(message) this.name = 'NotSupportedError' this.message = message || 'Not supported error' this.code = 'UND_ERR_NOT_SUPPORTED' } } class BalancedPoolMissingUpstreamError extends UndiciError { constructor (message) { super(message) this.name = 'MissingUpstreamError' this.message = message || 'No upstream has been added to the BalancedPool' this.code = 'UND_ERR_BPL_MISSING_UPSTREAM' } } class HTTPParserError extends Error { constructor (message, code, data) { super(message) this.name = 'HTTPParserError' this.code = code ? `HPE_${code}` : undefined this.data = data ? data.toString() : undefined } } class ResponseExceededMaxSizeError extends UndiciError { constructor (message) { super(message) this.name = 'ResponseExceededMaxSizeError' this.message = message || 'Response content exceeded max size' this.code = 'UND_ERR_RES_EXCEEDED_MAX_SIZE' } } class RequestRetryError extends UndiciError { constructor (message, code, { headers, data }) { super(message) this.name = 'RequestRetryError' this.message = message || 'Request retry error' this.code = 'UND_ERR_REQ_RETRY' this.statusCode = code this.data = data this.headers = headers } } class ResponseError extends UndiciError { constructor (message, code, { headers, data }) { super(message) this.name = 'ResponseError' this.message = message || 'Response error' this.code = 'UND_ERR_RESPONSE' this.statusCode = code this.data = data this.headers = headers } } class SecureProxyConnectionError extends UndiciError { constructor (cause, message, options) { super(message, { cause, ...(options ?? {}) }) this.name = 'SecureProxyConnectionError' this.message = message || 'Secure Proxy Connection failed' this.code = 'UND_ERR_PRX_TLS' this.cause = cause } } module.exports = { AbortError, HTTPParserError, UndiciError, HeadersTimeoutError, HeadersOverflowError, BodyTimeoutError, RequestContentLengthMismatchError, ConnectTimeoutError, ResponseStatusCodeError, InvalidArgumentError, InvalidReturnValueError, RequestAbortedError, ClientDestroyedError, ClientClosedError, InformationalError, SocketError, NotSupportedError, ResponseContentLengthMismatchError, BalancedPoolMissingUpstreamError, ResponseExceededMaxSizeError, RequestRetryError, ResponseError, SecureProxyConnectionError } node_modules/undici/lib/core/util.js 0000664 00000045142 15114741631 0013520 0 ustar 00 'use strict' const assert = require('node:assert') const { kDestroyed, kBodyUsed, kListeners, kBody } = require('./symbols') const { IncomingMessage } = require('node:http') const stream = require('node:stream') const net = require('node:net') const { Blob } = require('node:buffer') const nodeUtil = require('node:util') const { stringify } = require('node:querystring') const { EventEmitter: EE } = require('node:events') const { InvalidArgumentError } = require('./errors') const { headerNameLowerCasedRecord } = require('./constants') const { tree } = require('./tree') const [nodeMajor, nodeMinor] = process.versions.node.split('.').map(v => Number(v)) class BodyAsyncIterable { constructor (body) { this[kBody] = body this[kBodyUsed] = false } async * [Symbol.asyncIterator] () { assert(!this[kBodyUsed], 'disturbed') this[kBodyUsed] = true yield * this[kBody] } } function wrapRequestBody (body) { if (isStream(body)) { // TODO (fix): Provide some way for the user to cache the file to e.g. /tmp // so that it can be dispatched again? // TODO (fix): Do we need 100-expect support to provide a way to do this properly? if (bodyLength(body) === 0) { body .on('data', function () { assert(false) }) } if (typeof body.readableDidRead !== 'boolean') { body[kBodyUsed] = false EE.prototype.on.call(body, 'data', function () { this[kBodyUsed] = true }) } return body } else if (body && typeof body.pipeTo === 'function') { // TODO (fix): We can't access ReadableStream internal state // to determine whether or not it has been disturbed. This is just // a workaround. return new BodyAsyncIterable(body) } else if ( body && typeof body !== 'string' && !ArrayBuffer.isView(body) && isIterable(body) ) { // TODO: Should we allow re-using iterable if !this.opts.idempotent // or through some other flag? return new BodyAsyncIterable(body) } else { return body } } function nop () {} function isStream (obj) { return obj && typeof obj === 'object' && typeof obj.pipe === 'function' && typeof obj.on === 'function' } // based on https://github.com/node-fetch/fetch-blob/blob/8ab587d34080de94140b54f07168451e7d0b655e/index.js#L229-L241 (MIT License) function isBlobLike (object) { if (object === null) { return false } else if (object instanceof Blob) { return true } else if (typeof object !== 'object') { return false } else { const sTag = object[Symbol.toStringTag] return (sTag === 'Blob' || sTag === 'File') && ( ('stream' in object && typeof object.stream === 'function') || ('arrayBuffer' in object && typeof object.arrayBuffer === 'function') ) } } function buildURL (url, queryParams) { if (url.includes('?') || url.includes('#')) { throw new Error('Query params cannot be passed when url already contains "?" or "#".') } const stringified = stringify(queryParams) if (stringified) { url += '?' + stringified } return url } function isValidPort (port) { const value = parseInt(port, 10) return ( value === Number(port) && value >= 0 && value <= 65535 ) } function isHttpOrHttpsPrefixed (value) { return ( value != null && value[0] === 'h' && value[1] === 't' && value[2] === 't' && value[3] === 'p' && ( value[4] === ':' || ( value[4] === 's' && value[5] === ':' ) ) ) } function parseURL (url) { if (typeof url === 'string') { url = new URL(url) if (!isHttpOrHttpsPrefixed(url.origin || url.protocol)) { throw new InvalidArgumentError('Invalid URL protocol: the URL must start with `http:` or `https:`.') } return url } if (!url || typeof url !== 'object') { throw new InvalidArgumentError('Invalid URL: The URL argument must be a non-null object.') } if (!(url instanceof URL)) { if (url.port != null && url.port !== '' && isValidPort(url.port) === false) { throw new InvalidArgumentError('Invalid URL: port must be a valid integer or a string representation of an integer.') } if (url.path != null && typeof url.path !== 'string') { throw new InvalidArgumentError('Invalid URL path: the path must be a string or null/undefined.') } if (url.pathname != null && typeof url.pathname !== 'string') { throw new InvalidArgumentError('Invalid URL pathname: the pathname must be a string or null/undefined.') } if (url.hostname != null && typeof url.hostname !== 'string') { throw new InvalidArgumentError('Invalid URL hostname: the hostname must be a string or null/undefined.') } if (url.origin != null && typeof url.origin !== 'string') { throw new InvalidArgumentError('Invalid URL origin: the origin must be a string or null/undefined.') } if (!isHttpOrHttpsPrefixed(url.origin || url.protocol)) { throw new InvalidArgumentError('Invalid URL protocol: the URL must start with `http:` or `https:`.') } const port = url.port != null ? url.port : (url.protocol === 'https:' ? 443 : 80) let origin = url.origin != null ? url.origin : `${url.protocol || ''}//${url.hostname || ''}:${port}` let path = url.path != null ? url.path : `${url.pathname || ''}${url.search || ''}` if (origin[origin.length - 1] === '/') { origin = origin.slice(0, origin.length - 1) } if (path && path[0] !== '/') { path = `/${path}` } // new URL(path, origin) is unsafe when `path` contains an absolute URL // From https://developer.mozilla.org/en-US/docs/Web/API/URL/URL: // If first parameter is a relative URL, second param is required, and will be used as the base URL. // If first parameter is an absolute URL, a given second param will be ignored. return new URL(`${origin}${path}`) } if (!isHttpOrHttpsPrefixed(url.origin || url.protocol)) { throw new InvalidArgumentError('Invalid URL protocol: the URL must start with `http:` or `https:`.') } return url } function parseOrigin (url) { url = parseURL(url) if (url.pathname !== '/' || url.search || url.hash) { throw new InvalidArgumentError('invalid url') } return url } function getHostname (host) { if (host[0] === '[') { const idx = host.indexOf(']') assert(idx !== -1) return host.substring(1, idx) } const idx = host.indexOf(':') if (idx === -1) return host return host.substring(0, idx) } // IP addresses are not valid server names per RFC6066 // > Currently, the only server names supported are DNS hostnames function getServerName (host) { if (!host) { return null } assert(typeof host === 'string') const servername = getHostname(host) if (net.isIP(servername)) { return '' } return servername } function deepClone (obj) { return JSON.parse(JSON.stringify(obj)) } function isAsyncIterable (obj) { return !!(obj != null && typeof obj[Symbol.asyncIterator] === 'function') } function isIterable (obj) { return !!(obj != null && (typeof obj[Symbol.iterator] === 'function' || typeof obj[Symbol.asyncIterator] === 'function')) } function bodyLength (body) { if (body == null) { return 0 } else if (isStream(body)) { const state = body._readableState return state && state.objectMode === false && state.ended === true && Number.isFinite(state.length) ? state.length : null } else if (isBlobLike(body)) { return body.size != null ? body.size : null } else if (isBuffer(body)) { return body.byteLength } return null } function isDestroyed (body) { return body && !!(body.destroyed || body[kDestroyed] || (stream.isDestroyed?.(body))) } function destroy (stream, err) { if (stream == null || !isStream(stream) || isDestroyed(stream)) { return } if (typeof stream.destroy === 'function') { if (Object.getPrototypeOf(stream).constructor === IncomingMessage) { // See: https://github.com/nodejs/node/pull/38505/files stream.socket = null } stream.destroy(err) } else if (err) { queueMicrotask(() => { stream.emit('error', err) }) } if (stream.destroyed !== true) { stream[kDestroyed] = true } } const KEEPALIVE_TIMEOUT_EXPR = /timeout=(\d+)/ function parseKeepAliveTimeout (val) { const m = val.toString().match(KEEPALIVE_TIMEOUT_EXPR) return m ? parseInt(m[1], 10) * 1000 : null } /** * Retrieves a header name and returns its lowercase value. * @param {string | Buffer} value Header name * @returns {string} */ function headerNameToString (value) { return typeof value === 'string' ? headerNameLowerCasedRecord[value] ?? value.toLowerCase() : tree.lookup(value) ?? value.toString('latin1').toLowerCase() } /** * Receive the buffer as a string and return its lowercase value. * @param {Buffer} value Header name * @returns {string} */ function bufferToLowerCasedHeaderName (value) { return tree.lookup(value) ?? value.toString('latin1').toLowerCase() } /** * @param {Record<string, string | string[]> | (Buffer | string | (Buffer | string)[])[]} headers * @param {Record<string, string | string[]>} [obj] * @returns {Record<string, string | string[]>} */ function parseHeaders (headers, obj) { if (obj === undefined) obj = {} for (let i = 0; i < headers.length; i += 2) { const key = headerNameToString(headers[i]) let val = obj[key] if (val) { if (typeof val === 'string') { val = [val] obj[key] = val } val.push(headers[i + 1].toString('utf8')) } else { const headersValue = headers[i + 1] if (typeof headersValue === 'string') { obj[key] = headersValue } else { obj[key] = Array.isArray(headersValue) ? headersValue.map(x => x.toString('utf8')) : headersValue.toString('utf8') } } } // See https://github.com/nodejs/node/pull/46528 if ('content-length' in obj && 'content-disposition' in obj) { obj['content-disposition'] = Buffer.from(obj['content-disposition']).toString('latin1') } return obj } function parseRawHeaders (headers) { const len = headers.length const ret = new Array(len) let hasContentLength = false let contentDispositionIdx = -1 let key let val let kLen = 0 for (let n = 0; n < headers.length; n += 2) { key = headers[n] val = headers[n + 1] typeof key !== 'string' && (key = key.toString()) typeof val !== 'string' && (val = val.toString('utf8')) kLen = key.length if (kLen === 14 && key[7] === '-' && (key === 'content-length' || key.toLowerCase() === 'content-length')) { hasContentLength = true } else if (kLen === 19 && key[7] === '-' && (key === 'content-disposition' || key.toLowerCase() === 'content-disposition')) { contentDispositionIdx = n + 1 } ret[n] = key ret[n + 1] = val } // See https://github.com/nodejs/node/pull/46528 if (hasContentLength && contentDispositionIdx !== -1) { ret[contentDispositionIdx] = Buffer.from(ret[contentDispositionIdx]).toString('latin1') } return ret } function isBuffer (buffer) { // See, https://github.com/mcollina/undici/pull/319 return buffer instanceof Uint8Array || Buffer.isBuffer(buffer) } function validateHandler (handler, method, upgrade) { if (!handler || typeof handler !== 'object') { throw new InvalidArgumentError('handler must be an object') } if (typeof handler.onConnect !== 'function') { throw new InvalidArgumentError('invalid onConnect method') } if (typeof handler.onError !== 'function') { throw new InvalidArgumentError('invalid onError method') } if (typeof handler.onBodySent !== 'function' && handler.onBodySent !== undefined) { throw new InvalidArgumentError('invalid onBodySent method') } if (upgrade || method === 'CONNECT') { if (typeof handler.onUpgrade !== 'function') { throw new InvalidArgumentError('invalid onUpgrade method') } } else { if (typeof handler.onHeaders !== 'function') { throw new InvalidArgumentError('invalid onHeaders method') } if (typeof handler.onData !== 'function') { throw new InvalidArgumentError('invalid onData method') } if (typeof handler.onComplete !== 'function') { throw new InvalidArgumentError('invalid onComplete method') } } } // A body is disturbed if it has been read from and it cannot // be re-used without losing state or data. function isDisturbed (body) { // TODO (fix): Why is body[kBodyUsed] needed? return !!(body && (stream.isDisturbed(body) || body[kBodyUsed])) } function isErrored (body) { return !!(body && stream.isErrored(body)) } function isReadable (body) { return !!(body && stream.isReadable(body)) } function getSocketInfo (socket) { return { localAddress: socket.localAddress, localPort: socket.localPort, remoteAddress: socket.remoteAddress, remotePort: socket.remotePort, remoteFamily: socket.remoteFamily, timeout: socket.timeout, bytesWritten: socket.bytesWritten, bytesRead: socket.bytesRead } } /** @type {globalThis['ReadableStream']} */ function ReadableStreamFrom (iterable) { // We cannot use ReadableStream.from here because it does not return a byte stream. let iterator return new ReadableStream( { async start () { iterator = iterable[Symbol.asyncIterator]() }, async pull (controller) { const { done, value } = await iterator.next() if (done) { queueMicrotask(() => { controller.close() controller.byobRequest?.respond(0) }) } else { const buf = Buffer.isBuffer(value) ? value : Buffer.from(value) if (buf.byteLength) { controller.enqueue(new Uint8Array(buf)) } } return controller.desiredSize > 0 }, async cancel (reason) { await iterator.return() }, type: 'bytes' } ) } // The chunk should be a FormData instance and contains // all the required methods. function isFormDataLike (object) { return ( object && typeof object === 'object' && typeof object.append === 'function' && typeof object.delete === 'function' && typeof object.get === 'function' && typeof object.getAll === 'function' && typeof object.has === 'function' && typeof object.set === 'function' && object[Symbol.toStringTag] === 'FormData' ) } function addAbortListener (signal, listener) { if ('addEventListener' in signal) { signal.addEventListener('abort', listener, { once: true }) return () => signal.removeEventListener('abort', listener) } signal.addListener('abort', listener) return () => signal.removeListener('abort', listener) } const hasToWellFormed = typeof String.prototype.toWellFormed === 'function' const hasIsWellFormed = typeof String.prototype.isWellFormed === 'function' /** * @param {string} val */ function toUSVString (val) { return hasToWellFormed ? `${val}`.toWellFormed() : nodeUtil.toUSVString(val) } /** * @param {string} val */ // TODO: move this to webidl function isUSVString (val) { return hasIsWellFormed ? `${val}`.isWellFormed() : toUSVString(val) === `${val}` } /** * @see https://tools.ietf.org/html/rfc7230#section-3.2.6 * @param {number} c */ function isTokenCharCode (c) { switch (c) { case 0x22: case 0x28: case 0x29: case 0x2c: case 0x2f: case 0x3a: case 0x3b: case 0x3c: case 0x3d: case 0x3e: case 0x3f: case 0x40: case 0x5b: case 0x5c: case 0x5d: case 0x7b: case 0x7d: // DQUOTE and "(),/:;<=>?@[\]{}" return false default: // VCHAR %x21-7E return c >= 0x21 && c <= 0x7e } } /** * @param {string} characters */ function isValidHTTPToken (characters) { if (characters.length === 0) { return false } for (let i = 0; i < characters.length; ++i) { if (!isTokenCharCode(characters.charCodeAt(i))) { return false } } return true } // headerCharRegex have been lifted from // https://github.com/nodejs/node/blob/main/lib/_http_common.js /** * Matches if val contains an invalid field-vchar * field-value = *( field-content / obs-fold ) * field-content = field-vchar [ 1*( SP / HTAB ) field-vchar ] * field-vchar = VCHAR / obs-text */ const headerCharRegex = /[^\t\x20-\x7e\x80-\xff]/ /** * @param {string} characters */ function isValidHeaderValue (characters) { return !headerCharRegex.test(characters) } // Parsed accordingly to RFC 9110 // https://www.rfc-editor.org/rfc/rfc9110#field.content-range function parseRangeHeader (range) { if (range == null || range === '') return { start: 0, end: null, size: null } const m = range ? range.match(/^bytes (\d+)-(\d+)\/(\d+)?$/) : null return m ? { start: parseInt(m[1]), end: m[2] ? parseInt(m[2]) : null, size: m[3] ? parseInt(m[3]) : null } : null } function addListener (obj, name, listener) { const listeners = (obj[kListeners] ??= []) listeners.push([name, listener]) obj.on(name, listener) return obj } function removeAllListeners (obj) { for (const [name, listener] of obj[kListeners] ?? []) { obj.removeListener(name, listener) } obj[kListeners] = null } function errorRequest (client, request, err) { try { request.onError(err) assert(request.aborted) } catch (err) { client.emit('error', err) } } const kEnumerableProperty = Object.create(null) kEnumerableProperty.enumerable = true const normalizedMethodRecordsBase = { delete: 'DELETE', DELETE: 'DELETE', get: 'GET', GET: 'GET', head: 'HEAD', HEAD: 'HEAD', options: 'OPTIONS', OPTIONS: 'OPTIONS', post: 'POST', POST: 'POST', put: 'PUT', PUT: 'PUT' } const normalizedMethodRecords = { ...normalizedMethodRecordsBase, patch: 'patch', PATCH: 'PATCH' } // Note: object prototypes should not be able to be referenced. e.g. `Object#hasOwnProperty`. Object.setPrototypeOf(normalizedMethodRecordsBase, null) Object.setPrototypeOf(normalizedMethodRecords, null) module.exports = { kEnumerableProperty, nop, isDisturbed, isErrored, isReadable, toUSVString, isUSVString, isBlobLike, parseOrigin, parseURL, getServerName, isStream, isIterable, isAsyncIterable, isDestroyed, headerNameToString, bufferToLowerCasedHeaderName, addListener, removeAllListeners, errorRequest, parseRawHeaders, parseHeaders, parseKeepAliveTimeout, destroy, bodyLength, deepClone, ReadableStreamFrom, isBuffer, validateHandler, getSocketInfo, isFormDataLike, buildURL, addAbortListener, isValidHTTPToken, isValidHeaderValue, isTokenCharCode, parseRangeHeader, normalizedMethodRecordsBase, normalizedMethodRecords, isValidPort, isHttpOrHttpsPrefixed, nodeMajor, nodeMinor, safeHTTPMethods: ['GET', 'HEAD', 'OPTIONS', 'TRACE'], wrapRequestBody } node_modules/undici/lib/core/tree.js 0000664 00000006577 15114741631 0013513 0 ustar 00 'use strict' const { wellknownHeaderNames, headerNameLowerCasedRecord } = require('./constants') class TstNode { /** @type {any} */ value = null /** @type {null | TstNode} */ left = null /** @type {null | TstNode} */ middle = null /** @type {null | TstNode} */ right = null /** @type {number} */ code /** * @param {string} key * @param {any} value * @param {number} index */ constructor (key, value, index) { if (index === undefined || index >= key.length) { throw new TypeError('Unreachable') } const code = this.code = key.charCodeAt(index) // check code is ascii string if (code > 0x7F) { throw new TypeError('key must be ascii string') } if (key.length !== ++index) { this.middle = new TstNode(key, value, index) } else { this.value = value } } /** * @param {string} key * @param {any} value */ add (key, value) { const length = key.length if (length === 0) { throw new TypeError('Unreachable') } let index = 0 let node = this while (true) { const code = key.charCodeAt(index) // check code is ascii string if (code > 0x7F) { throw new TypeError('key must be ascii string') } if (node.code === code) { if (length === ++index) { node.value = value break } else if (node.middle !== null) { node = node.middle } else { node.middle = new TstNode(key, value, index) break } } else if (node.code < code) { if (node.left !== null) { node = node.left } else { node.left = new TstNode(key, value, index) break } } else if (node.right !== null) { node = node.right } else { node.right = new TstNode(key, value, index) break } } } /** * @param {Uint8Array} key * @return {TstNode | null} */ search (key) { const keylength = key.length let index = 0 let node = this while (node !== null && index < keylength) { let code = key[index] // A-Z // First check if it is bigger than 0x5a. // Lowercase letters have higher char codes than uppercase ones. // Also we assume that headers will mostly contain lowercase characters. if (code <= 0x5a && code >= 0x41) { // Lowercase for uppercase. code |= 32 } while (node !== null) { if (code === node.code) { if (keylength === ++index) { // Returns Node since it is the last key. return node } node = node.middle break } node = node.code < code ? node.left : node.right } } return null } } class TernarySearchTree { /** @type {TstNode | null} */ node = null /** * @param {string} key * @param {any} value * */ insert (key, value) { if (this.node === null) { this.node = new TstNode(key, value, 0) } else { this.node.add(key, value) } } /** * @param {Uint8Array} key * @return {any} */ lookup (key) { return this.node?.search(key)?.value ?? null } } const tree = new TernarySearchTree() for (let i = 0; i < wellknownHeaderNames.length; ++i) { const key = headerNameLowerCasedRecord[wellknownHeaderNames[i]] tree.insert(key, key) } module.exports = { TernarySearchTree, tree } node_modules/undici/lib/core/connect.js 0000664 00000016166 15114741631 0014200 0 ustar 00 'use strict' const net = require('node:net') const assert = require('node:assert') const util = require('./util') const { InvalidArgumentError, ConnectTimeoutError } = require('./errors') const timers = require('../util/timers') function noop () {} let tls // include tls conditionally since it is not always available // TODO: session re-use does not wait for the first // connection to resolve the session and might therefore // resolve the same servername multiple times even when // re-use is enabled. let SessionCache // FIXME: remove workaround when the Node bug is fixed // https://github.com/nodejs/node/issues/49344#issuecomment-1741776308 if (global.FinalizationRegistry && !(process.env.NODE_V8_COVERAGE || process.env.UNDICI_NO_FG)) { SessionCache = class WeakSessionCache { constructor (maxCachedSessions) { this._maxCachedSessions = maxCachedSessions this._sessionCache = new Map() this._sessionRegistry = new global.FinalizationRegistry((key) => { if (this._sessionCache.size < this._maxCachedSessions) { return } const ref = this._sessionCache.get(key) if (ref !== undefined && ref.deref() === undefined) { this._sessionCache.delete(key) } }) } get (sessionKey) { const ref = this._sessionCache.get(sessionKey) return ref ? ref.deref() : null } set (sessionKey, session) { if (this._maxCachedSessions === 0) { return } this._sessionCache.set(sessionKey, new WeakRef(session)) this._sessionRegistry.register(session, sessionKey) } } } else { SessionCache = class SimpleSessionCache { constructor (maxCachedSessions) { this._maxCachedSessions = maxCachedSessions this._sessionCache = new Map() } get (sessionKey) { return this._sessionCache.get(sessionKey) } set (sessionKey, session) { if (this._maxCachedSessions === 0) { return } if (this._sessionCache.size >= this._maxCachedSessions) { // remove the oldest session const { value: oldestKey } = this._sessionCache.keys().next() this._sessionCache.delete(oldestKey) } this._sessionCache.set(sessionKey, session) } } } function buildConnector ({ allowH2, maxCachedSessions, socketPath, timeout, session: customSession, ...opts }) { if (maxCachedSessions != null && (!Number.isInteger(maxCachedSessions) || maxCachedSessions < 0)) { throw new InvalidArgumentError('maxCachedSessions must be a positive integer or zero') } const options = { path: socketPath, ...opts } const sessionCache = new SessionCache(maxCachedSessions == null ? 100 : maxCachedSessions) timeout = timeout == null ? 10e3 : timeout allowH2 = allowH2 != null ? allowH2 : false return function connect ({ hostname, host, protocol, port, servername, localAddress, httpSocket }, callback) { let socket if (protocol === 'https:') { if (!tls) { tls = require('node:tls') } servername = servername || options.servername || util.getServerName(host) || null const sessionKey = servername || hostname assert(sessionKey) const session = customSession || sessionCache.get(sessionKey) || null port = port || 443 socket = tls.connect({ highWaterMark: 16384, // TLS in node can't have bigger HWM anyway... ...options, servername, session, localAddress, // TODO(HTTP/2): Add support for h2c ALPNProtocols: allowH2 ? ['http/1.1', 'h2'] : ['http/1.1'], socket: httpSocket, // upgrade socket connection port, host: hostname }) socket .on('session', function (session) { // TODO (fix): Can a session become invalid once established? Don't think so? sessionCache.set(sessionKey, session) }) } else { assert(!httpSocket, 'httpSocket can only be sent on TLS update') port = port || 80 socket = net.connect({ highWaterMark: 64 * 1024, // Same as nodejs fs streams. ...options, localAddress, port, host: hostname }) } // Set TCP keep alive options on the socket here instead of in connect() for the case of assigning the socket if (options.keepAlive == null || options.keepAlive) { const keepAliveInitialDelay = options.keepAliveInitialDelay === undefined ? 60e3 : options.keepAliveInitialDelay socket.setKeepAlive(true, keepAliveInitialDelay) } const clearConnectTimeout = setupConnectTimeout(new WeakRef(socket), { timeout, hostname, port }) socket .setNoDelay(true) .once(protocol === 'https:' ? 'secureConnect' : 'connect', function () { queueMicrotask(clearConnectTimeout) if (callback) { const cb = callback callback = null cb(null, this) } }) .on('error', function (err) { queueMicrotask(clearConnectTimeout) if (callback) { const cb = callback callback = null cb(err) } }) return socket } } /** * @param {WeakRef<net.Socket>} socketWeakRef * @param {object} opts * @param {number} opts.timeout * @param {string} opts.hostname * @param {number} opts.port * @returns {() => void} */ const setupConnectTimeout = process.platform === 'win32' ? (socketWeakRef, opts) => { if (!opts.timeout) { return noop } let s1 = null let s2 = null const fastTimer = timers.setFastTimeout(() => { // setImmediate is added to make sure that we prioritize socket error events over timeouts s1 = setImmediate(() => { // Windows needs an extra setImmediate probably due to implementation differences in the socket logic s2 = setImmediate(() => onConnectTimeout(socketWeakRef.deref(), opts)) }) }, opts.timeout) return () => { timers.clearFastTimeout(fastTimer) clearImmediate(s1) clearImmediate(s2) } } : (socketWeakRef, opts) => { if (!opts.timeout) { return noop } let s1 = null const fastTimer = timers.setFastTimeout(() => { // setImmediate is added to make sure that we prioritize socket error events over timeouts s1 = setImmediate(() => { onConnectTimeout(socketWeakRef.deref(), opts) }) }, opts.timeout) return () => { timers.clearFastTimeout(fastTimer) clearImmediate(s1) } } /** * @param {net.Socket} socket * @param {object} opts * @param {number} opts.timeout * @param {string} opts.hostname * @param {number} opts.port */ function onConnectTimeout (socket, opts) { // The socket could be already garbage collected if (socket == null) { return } let message = 'Connect Timeout Error' if (Array.isArray(socket.autoSelectFamilyAttemptedAddresses)) { message += ` (attempted addresses: ${socket.autoSelectFamilyAttemptedAddresses.join(', ')},` } else { message += ` (attempted address: ${opts.hostname}:${opts.port},` } message += ` timeout: ${opts.timeout}ms)` util.destroy(socket, new ConnectTimeoutError(message)) } module.exports = buildConnector node_modules/undici/lib/interceptor/retry.js 0000664 00000000643 15114741631 0015313 0 ustar 00 'use strict' const RetryHandler = require('../handler/retry-handler') module.exports = globalOpts => { return dispatch => { return function retryInterceptor (opts, handler) { return dispatch( opts, new RetryHandler( { ...opts, retryOptions: { ...globalOpts, ...opts.retryOptions } }, { handler, dispatch } ) ) } } } node_modules/undici/lib/interceptor/redirect.js 0000664 00000001114 15114741631 0015741 0 ustar 00 'use strict' const RedirectHandler = require('../handler/redirect-handler') module.exports = opts => { const globalMaxRedirections = opts?.maxRedirections return dispatch => { return function redirectInterceptor (opts, handler) { const { maxRedirections = globalMaxRedirections, ...baseOpts } = opts if (!maxRedirections) { return dispatch(opts, handler) } const redirectHandler = new RedirectHandler( dispatch, maxRedirections, opts, handler ) return dispatch(baseOpts, redirectHandler) } } } node_modules/undici/lib/interceptor/redirect-interceptor.js 0000664 00000001225 15114741631 0020300 0 ustar 00 'use strict' const RedirectHandler = require('../handler/redirect-handler') function createRedirectInterceptor ({ maxRedirections: defaultMaxRedirections }) { return (dispatch) => { return function Intercept (opts, handler) { const { maxRedirections = defaultMaxRedirections } = opts if (!maxRedirections) { return dispatch(opts, handler) } const redirectHandler = new RedirectHandler(dispatch, maxRedirections, opts, handler) opts = { ...opts, maxRedirections: 0 } // Stop sub dispatcher from also redirecting. return dispatch(opts, redirectHandler) } } } module.exports = createRedirectInterceptor node_modules/undici/lib/interceptor/response-error.js 0000664 00000004144 15114741631 0017133 0 ustar 00 'use strict' const { parseHeaders } = require('../core/util') const DecoratorHandler = require('../handler/decorator-handler') const { ResponseError } = require('../core/errors') class Handler extends DecoratorHandler { #handler #statusCode #contentType #decoder #headers #body constructor (opts, { handler }) { super(handler) this.#handler = handler } onConnect (abort) { this.#statusCode = 0 this.#contentType = null this.#decoder = null this.#headers = null this.#body = '' return this.#handler.onConnect(abort) } onHeaders (statusCode, rawHeaders, resume, statusMessage, headers = parseHeaders(rawHeaders)) { this.#statusCode = statusCode this.#headers = headers this.#contentType = headers['content-type'] if (this.#statusCode < 400) { return this.#handler.onHeaders(statusCode, rawHeaders, resume, statusMessage, headers) } if (this.#contentType === 'application/json' || this.#contentType === 'text/plain') { this.#decoder = new TextDecoder('utf-8') } } onData (chunk) { if (this.#statusCode < 400) { return this.#handler.onData(chunk) } this.#body += this.#decoder?.decode(chunk, { stream: true }) ?? '' } onComplete (rawTrailers) { if (this.#statusCode >= 400) { this.#body += this.#decoder?.decode(undefined, { stream: false }) ?? '' if (this.#contentType === 'application/json') { try { this.#body = JSON.parse(this.#body) } catch { // Do nothing... } } let err const stackTraceLimit = Error.stackTraceLimit Error.stackTraceLimit = 0 try { err = new ResponseError('Response Error', this.#statusCode, this.#headers, this.#body) } finally { Error.stackTraceLimit = stackTraceLimit } this.#handler.onError(err) } else { this.#handler.onComplete(rawTrailers) } } onError (err) { this.#handler.onError(err) } } module.exports = (dispatch) => (opts, handler) => opts.throwOnError ? dispatch(opts, new Handler(opts, { handler })) : dispatch(opts, handler) node_modules/undici/lib/interceptor/dns.js 0000664 00000022172 15114741631 0014733 0 ustar 00 'use strict' const { isIP } = require('node:net') const { lookup } = require('node:dns') const DecoratorHandler = require('../handler/decorator-handler') const { InvalidArgumentError, InformationalError } = require('../core/errors') const maxInt = Math.pow(2, 31) - 1 class DNSInstance { #maxTTL = 0 #maxItems = 0 #records = new Map() dualStack = true affinity = null lookup = null pick = null constructor (opts) { this.#maxTTL = opts.maxTTL this.#maxItems = opts.maxItems this.dualStack = opts.dualStack this.affinity = opts.affinity this.lookup = opts.lookup ?? this.#defaultLookup this.pick = opts.pick ?? this.#defaultPick } get full () { return this.#records.size === this.#maxItems } runLookup (origin, opts, cb) { const ips = this.#records.get(origin.hostname) // If full, we just return the origin if (ips == null && this.full) { cb(null, origin.origin) return } const newOpts = { affinity: this.affinity, dualStack: this.dualStack, lookup: this.lookup, pick: this.pick, ...opts.dns, maxTTL: this.#maxTTL, maxItems: this.#maxItems } // If no IPs we lookup if (ips == null) { this.lookup(origin, newOpts, (err, addresses) => { if (err || addresses == null || addresses.length === 0) { cb(err ?? new InformationalError('No DNS entries found')) return } this.setRecords(origin, addresses) const records = this.#records.get(origin.hostname) const ip = this.pick( origin, records, newOpts.affinity ) let port if (typeof ip.port === 'number') { port = `:${ip.port}` } else if (origin.port !== '') { port = `:${origin.port}` } else { port = '' } cb( null, `${origin.protocol}//${ ip.family === 6 ? `[${ip.address}]` : ip.address }${port}` ) }) } else { // If there's IPs we pick const ip = this.pick( origin, ips, newOpts.affinity ) // If no IPs we lookup - deleting old records if (ip == null) { this.#records.delete(origin.hostname) this.runLookup(origin, opts, cb) return } let port if (typeof ip.port === 'number') { port = `:${ip.port}` } else if (origin.port !== '') { port = `:${origin.port}` } else { port = '' } cb( null, `${origin.protocol}//${ ip.family === 6 ? `[${ip.address}]` : ip.address }${port}` ) } } #defaultLookup (origin, opts, cb) { lookup( origin.hostname, { all: true, family: this.dualStack === false ? this.affinity : 0, order: 'ipv4first' }, (err, addresses) => { if (err) { return cb(err) } const results = new Map() for (const addr of addresses) { // On linux we found duplicates, we attempt to remove them with // the latest record results.set(`${addr.address}:${addr.family}`, addr) } cb(null, results.values()) } ) } #defaultPick (origin, hostnameRecords, affinity) { let ip = null const { records, offset } = hostnameRecords let family if (this.dualStack) { if (affinity == null) { // Balance between ip families if (offset == null || offset === maxInt) { hostnameRecords.offset = 0 affinity = 4 } else { hostnameRecords.offset++ affinity = (hostnameRecords.offset & 1) === 1 ? 6 : 4 } } if (records[affinity] != null && records[affinity].ips.length > 0) { family = records[affinity] } else { family = records[affinity === 4 ? 6 : 4] } } else { family = records[affinity] } // If no IPs we return null if (family == null || family.ips.length === 0) { return ip } if (family.offset == null || family.offset === maxInt) { family.offset = 0 } else { family.offset++ } const position = family.offset % family.ips.length ip = family.ips[position] ?? null if (ip == null) { return ip } if (Date.now() - ip.timestamp > ip.ttl) { // record TTL is already in ms // We delete expired records // It is possible that they have different TTL, so we manage them individually family.ips.splice(position, 1) return this.pick(origin, hostnameRecords, affinity) } return ip } setRecords (origin, addresses) { const timestamp = Date.now() const records = { records: { 4: null, 6: null } } for (const record of addresses) { record.timestamp = timestamp if (typeof record.ttl === 'number') { // The record TTL is expected to be in ms record.ttl = Math.min(record.ttl, this.#maxTTL) } else { record.ttl = this.#maxTTL } const familyRecords = records.records[record.family] ?? { ips: [] } familyRecords.ips.push(record) records.records[record.family] = familyRecords } this.#records.set(origin.hostname, records) } getHandler (meta, opts) { return new DNSDispatchHandler(this, meta, opts) } } class DNSDispatchHandler extends DecoratorHandler { #state = null #opts = null #dispatch = null #handler = null #origin = null constructor (state, { origin, handler, dispatch }, opts) { super(handler) this.#origin = origin this.#handler = handler this.#opts = { ...opts } this.#state = state this.#dispatch = dispatch } onError (err) { switch (err.code) { case 'ETIMEDOUT': case 'ECONNREFUSED': { if (this.#state.dualStack) { // We delete the record and retry this.#state.runLookup(this.#origin, this.#opts, (err, newOrigin) => { if (err) { return this.#handler.onError(err) } const dispatchOpts = { ...this.#opts, origin: newOrigin } this.#dispatch(dispatchOpts, this) }) // if dual-stack disabled, we error out return } this.#handler.onError(err) return } case 'ENOTFOUND': this.#state.deleteRecord(this.#origin) // eslint-disable-next-line no-fallthrough default: this.#handler.onError(err) break } } } module.exports = interceptorOpts => { if ( interceptorOpts?.maxTTL != null && (typeof interceptorOpts?.maxTTL !== 'number' || interceptorOpts?.maxTTL < 0) ) { throw new InvalidArgumentError('Invalid maxTTL. Must be a positive number') } if ( interceptorOpts?.maxItems != null && (typeof interceptorOpts?.maxItems !== 'number' || interceptorOpts?.maxItems < 1) ) { throw new InvalidArgumentError( 'Invalid maxItems. Must be a positive number and greater than zero' ) } if ( interceptorOpts?.affinity != null && interceptorOpts?.affinity !== 4 && interceptorOpts?.affinity !== 6 ) { throw new InvalidArgumentError('Invalid affinity. Must be either 4 or 6') } if ( interceptorOpts?.dualStack != null && typeof interceptorOpts?.dualStack !== 'boolean' ) { throw new InvalidArgumentError('Invalid dualStack. Must be a boolean') } if ( interceptorOpts?.lookup != null && typeof interceptorOpts?.lookup !== 'function' ) { throw new InvalidArgumentError('Invalid lookup. Must be a function') } if ( interceptorOpts?.pick != null && typeof interceptorOpts?.pick !== 'function' ) { throw new InvalidArgumentError('Invalid pick. Must be a function') } const dualStack = interceptorOpts?.dualStack ?? true let affinity if (dualStack) { affinity = interceptorOpts?.affinity ?? null } else { affinity = interceptorOpts?.affinity ?? 4 } const opts = { maxTTL: interceptorOpts?.maxTTL ?? 10e3, // Expressed in ms lookup: interceptorOpts?.lookup ?? null, pick: interceptorOpts?.pick ?? null, dualStack, affinity, maxItems: interceptorOpts?.maxItems ?? Infinity } const instance = new DNSInstance(opts) return dispatch => { return function dnsInterceptor (origDispatchOpts, handler) { const origin = origDispatchOpts.origin.constructor === URL ? origDispatchOpts.origin : new URL(origDispatchOpts.origin) if (isIP(origin.hostname) !== 0) { return dispatch(origDispatchOpts, handler) } instance.runLookup(origin, origDispatchOpts, (err, newOrigin) => { if (err) { return handler.onError(err) } let dispatchOpts = null dispatchOpts = { ...origDispatchOpts, servername: origin.hostname, // For SNI on TLS origin: newOrigin, headers: { host: origin.hostname, ...origDispatchOpts.headers } } dispatch( dispatchOpts, instance.getHandler({ origin, dispatch, handler }, origDispatchOpts) ) }) return true } } } node_modules/undici/lib/interceptor/dump.js 0000664 00000004722 15114741631 0015115 0 ustar 00 'use strict' const util = require('../core/util') const { InvalidArgumentError, RequestAbortedError } = require('../core/errors') const DecoratorHandler = require('../handler/decorator-handler') class DumpHandler extends DecoratorHandler { #maxSize = 1024 * 1024 #abort = null #dumped = false #aborted = false #size = 0 #reason = null #handler = null constructor ({ maxSize }, handler) { super(handler) if (maxSize != null && (!Number.isFinite(maxSize) || maxSize < 1)) { throw new InvalidArgumentError('maxSize must be a number greater than 0') } this.#maxSize = maxSize ?? this.#maxSize this.#handler = handler } onConnect (abort) { this.#abort = abort this.#handler.onConnect(this.#customAbort.bind(this)) } #customAbort (reason) { this.#aborted = true this.#reason = reason } // TODO: will require adjustment after new hooks are out onHeaders (statusCode, rawHeaders, resume, statusMessage) { const headers = util.parseHeaders(rawHeaders) const contentLength = headers['content-length'] if (contentLength != null && contentLength > this.#maxSize) { throw new RequestAbortedError( `Response size (${contentLength}) larger than maxSize (${ this.#maxSize })` ) } if (this.#aborted) { return true } return this.#handler.onHeaders( statusCode, rawHeaders, resume, statusMessage ) } onError (err) { if (this.#dumped) { return } err = this.#reason ?? err this.#handler.onError(err) } onData (chunk) { this.#size = this.#size + chunk.length if (this.#size >= this.#maxSize) { this.#dumped = true if (this.#aborted) { this.#handler.onError(this.#reason) } else { this.#handler.onComplete([]) } } return true } onComplete (trailers) { if (this.#dumped) { return } if (this.#aborted) { this.#handler.onError(this.reason) return } this.#handler.onComplete(trailers) } } function createDumpInterceptor ( { maxSize: defaultMaxSize } = { maxSize: 1024 * 1024 } ) { return dispatch => { return function Intercept (opts, handler) { const { dumpMaxSize = defaultMaxSize } = opts const dumpHandler = new DumpHandler( { maxSize: dumpMaxSize }, handler ) return dispatch(opts, dumpHandler) } } } module.exports = createDumpInterceptor node_modules/undici/lib/web/fileapi/progressevent.js 0000664 00000003163 15114741631 0016704 0 ustar 00 'use strict' const { webidl } = require('../fetch/webidl') const kState = Symbol('ProgressEvent state') /** * @see https://xhr.spec.whatwg.org/#progressevent */ class ProgressEvent extends Event { constructor (type, eventInitDict = {}) { type = webidl.converters.DOMString(type, 'ProgressEvent constructor', 'type') eventInitDict = webidl.converters.ProgressEventInit(eventInitDict ?? {}) super(type, eventInitDict) this[kState] = { lengthComputable: eventInitDict.lengthComputable, loaded: eventInitDict.loaded, total: eventInitDict.total } } get lengthComputable () { webidl.brandCheck(this, ProgressEvent) return this[kState].lengthComputable } get loaded () { webidl.brandCheck(this, ProgressEvent) return this[kState].loaded } get total () { webidl.brandCheck(this, ProgressEvent) return this[kState].total } } webidl.converters.ProgressEventInit = webidl.dictionaryConverter([ { key: 'lengthComputable', converter: webidl.converters.boolean, defaultValue: () => false }, { key: 'loaded', converter: webidl.converters['unsigned long long'], defaultValue: () => 0 }, { key: 'total', converter: webidl.converters['unsigned long long'], defaultValue: () => 0 }, { key: 'bubbles', converter: webidl.converters.boolean, defaultValue: () => false }, { key: 'cancelable', converter: webidl.converters.boolean, defaultValue: () => false }, { key: 'composed', converter: webidl.converters.boolean, defaultValue: () => false } ]) module.exports = { ProgressEvent } node_modules/undici/lib/web/fileapi/symbols.js 0000664 00000000475 15114741631 0015471 0 ustar 00 'use strict' module.exports = { kState: Symbol('FileReader state'), kResult: Symbol('FileReader result'), kError: Symbol('FileReader error'), kLastProgressEventFired: Symbol('FileReader last progress event fired timestamp'), kEvents: Symbol('FileReader events'), kAborted: Symbol('FileReader aborted') } node_modules/undici/lib/web/fileapi/filereader.js 0000664 00000020503 15114741631 0016075 0 ustar 00 'use strict' const { staticPropertyDescriptors, readOperation, fireAProgressEvent } = require('./util') const { kState, kError, kResult, kEvents, kAborted } = require('./symbols') const { webidl } = require('../fetch/webidl') const { kEnumerableProperty } = require('../../core/util') class FileReader extends EventTarget { constructor () { super() this[kState] = 'empty' this[kResult] = null this[kError] = null this[kEvents] = { loadend: null, error: null, abort: null, load: null, progress: null, loadstart: null } } /** * @see https://w3c.github.io/FileAPI/#dfn-readAsArrayBuffer * @param {import('buffer').Blob} blob */ readAsArrayBuffer (blob) { webidl.brandCheck(this, FileReader) webidl.argumentLengthCheck(arguments, 1, 'FileReader.readAsArrayBuffer') blob = webidl.converters.Blob(blob, { strict: false }) // The readAsArrayBuffer(blob) method, when invoked, // must initiate a read operation for blob with ArrayBuffer. readOperation(this, blob, 'ArrayBuffer') } /** * @see https://w3c.github.io/FileAPI/#readAsBinaryString * @param {import('buffer').Blob} blob */ readAsBinaryString (blob) { webidl.brandCheck(this, FileReader) webidl.argumentLengthCheck(arguments, 1, 'FileReader.readAsBinaryString') blob = webidl.converters.Blob(blob, { strict: false }) // The readAsBinaryString(blob) method, when invoked, // must initiate a read operation for blob with BinaryString. readOperation(this, blob, 'BinaryString') } /** * @see https://w3c.github.io/FileAPI/#readAsDataText * @param {import('buffer').Blob} blob * @param {string?} encoding */ readAsText (blob, encoding = undefined) { webidl.brandCheck(this, FileReader) webidl.argumentLengthCheck(arguments, 1, 'FileReader.readAsText') blob = webidl.converters.Blob(blob, { strict: false }) if (encoding !== undefined) { encoding = webidl.converters.DOMString(encoding, 'FileReader.readAsText', 'encoding') } // The readAsText(blob, encoding) method, when invoked, // must initiate a read operation for blob with Text and encoding. readOperation(this, blob, 'Text', encoding) } /** * @see https://w3c.github.io/FileAPI/#dfn-readAsDataURL * @param {import('buffer').Blob} blob */ readAsDataURL (blob) { webidl.brandCheck(this, FileReader) webidl.argumentLengthCheck(arguments, 1, 'FileReader.readAsDataURL') blob = webidl.converters.Blob(blob, { strict: false }) // The readAsDataURL(blob) method, when invoked, must // initiate a read operation for blob with DataURL. readOperation(this, blob, 'DataURL') } /** * @see https://w3c.github.io/FileAPI/#dfn-abort */ abort () { // 1. If this's state is "empty" or if this's state is // "done" set this's result to null and terminate // this algorithm. if (this[kState] === 'empty' || this[kState] === 'done') { this[kResult] = null return } // 2. If this's state is "loading" set this's state to // "done" and set this's result to null. if (this[kState] === 'loading') { this[kState] = 'done' this[kResult] = null } // 3. If there are any tasks from this on the file reading // task source in an affiliated task queue, then remove // those tasks from that task queue. this[kAborted] = true // 4. Terminate the algorithm for the read method being processed. // TODO // 5. Fire a progress event called abort at this. fireAProgressEvent('abort', this) // 6. If this's state is not "loading", fire a progress // event called loadend at this. if (this[kState] !== 'loading') { fireAProgressEvent('loadend', this) } } /** * @see https://w3c.github.io/FileAPI/#dom-filereader-readystate */ get readyState () { webidl.brandCheck(this, FileReader) switch (this[kState]) { case 'empty': return this.EMPTY case 'loading': return this.LOADING case 'done': return this.DONE } } /** * @see https://w3c.github.io/FileAPI/#dom-filereader-result */ get result () { webidl.brandCheck(this, FileReader) // The result attribute’s getter, when invoked, must return // this's result. return this[kResult] } /** * @see https://w3c.github.io/FileAPI/#dom-filereader-error */ get error () { webidl.brandCheck(this, FileReader) // The error attribute’s getter, when invoked, must return // this's error. return this[kError] } get onloadend () { webidl.brandCheck(this, FileReader) return this[kEvents].loadend } set onloadend (fn) { webidl.brandCheck(this, FileReader) if (this[kEvents].loadend) { this.removeEventListener('loadend', this[kEvents].loadend) } if (typeof fn === 'function') { this[kEvents].loadend = fn this.addEventListener('loadend', fn) } else { this[kEvents].loadend = null } } get onerror () { webidl.brandCheck(this, FileReader) return this[kEvents].error } set onerror (fn) { webidl.brandCheck(this, FileReader) if (this[kEvents].error) { this.removeEventListener('error', this[kEvents].error) } if (typeof fn === 'function') { this[kEvents].error = fn this.addEventListener('error', fn) } else { this[kEvents].error = null } } get onloadstart () { webidl.brandCheck(this, FileReader) return this[kEvents].loadstart } set onloadstart (fn) { webidl.brandCheck(this, FileReader) if (this[kEvents].loadstart) { this.removeEventListener('loadstart', this[kEvents].loadstart) } if (typeof fn === 'function') { this[kEvents].loadstart = fn this.addEventListener('loadstart', fn) } else { this[kEvents].loadstart = null } } get onprogress () { webidl.brandCheck(this, FileReader) return this[kEvents].progress } set onprogress (fn) { webidl.brandCheck(this, FileReader) if (this[kEvents].progress) { this.removeEventListener('progress', this[kEvents].progress) } if (typeof fn === 'function') { this[kEvents].progress = fn this.addEventListener('progress', fn) } else { this[kEvents].progress = null } } get onload () { webidl.brandCheck(this, FileReader) return this[kEvents].load } set onload (fn) { webidl.brandCheck(this, FileReader) if (this[kEvents].load) { this.removeEventListener('load', this[kEvents].load) } if (typeof fn === 'function') { this[kEvents].load = fn this.addEventListener('load', fn) } else { this[kEvents].load = null } } get onabort () { webidl.brandCheck(this, FileReader) return this[kEvents].abort } set onabort (fn) { webidl.brandCheck(this, FileReader) if (this[kEvents].abort) { this.removeEventListener('abort', this[kEvents].abort) } if (typeof fn === 'function') { this[kEvents].abort = fn this.addEventListener('abort', fn) } else { this[kEvents].abort = null } } } // https://w3c.github.io/FileAPI/#dom-filereader-empty FileReader.EMPTY = FileReader.prototype.EMPTY = 0 // https://w3c.github.io/FileAPI/#dom-filereader-loading FileReader.LOADING = FileReader.prototype.LOADING = 1 // https://w3c.github.io/FileAPI/#dom-filereader-done FileReader.DONE = FileReader.prototype.DONE = 2 Object.defineProperties(FileReader.prototype, { EMPTY: staticPropertyDescriptors, LOADING: staticPropertyDescriptors, DONE: staticPropertyDescriptors, readAsArrayBuffer: kEnumerableProperty, readAsBinaryString: kEnumerableProperty, readAsText: kEnumerableProperty, readAsDataURL: kEnumerableProperty, abort: kEnumerableProperty, readyState: kEnumerableProperty, result: kEnumerableProperty, error: kEnumerableProperty, onloadstart: kEnumerableProperty, onprogress: kEnumerableProperty, onload: kEnumerableProperty, onabort: kEnumerableProperty, onerror: kEnumerableProperty, onloadend: kEnumerableProperty, [Symbol.toStringTag]: { value: 'FileReader', writable: false, enumerable: false, configurable: true } }) Object.defineProperties(FileReader, { EMPTY: staticPropertyDescriptors, LOADING: staticPropertyDescriptors, DONE: staticPropertyDescriptors }) module.exports = { FileReader } node_modules/undici/lib/web/fileapi/util.js 0000664 00000026406 15114741631 0014760 0 ustar 00 'use strict' const { kState, kError, kResult, kAborted, kLastProgressEventFired } = require('./symbols') const { ProgressEvent } = require('./progressevent') const { getEncoding } = require('./encoding') const { serializeAMimeType, parseMIMEType } = require('../fetch/data-url') const { types } = require('node:util') const { StringDecoder } = require('string_decoder') const { btoa } = require('node:buffer') /** @type {PropertyDescriptor} */ const staticPropertyDescriptors = { enumerable: true, writable: false, configurable: false } /** * @see https://w3c.github.io/FileAPI/#readOperation * @param {import('./filereader').FileReader} fr * @param {import('buffer').Blob} blob * @param {string} type * @param {string?} encodingName */ function readOperation (fr, blob, type, encodingName) { // 1. If fr’s state is "loading", throw an InvalidStateError // DOMException. if (fr[kState] === 'loading') { throw new DOMException('Invalid state', 'InvalidStateError') } // 2. Set fr’s state to "loading". fr[kState] = 'loading' // 3. Set fr’s result to null. fr[kResult] = null // 4. Set fr’s error to null. fr[kError] = null // 5. Let stream be the result of calling get stream on blob. /** @type {import('stream/web').ReadableStream} */ const stream = blob.stream() // 6. Let reader be the result of getting a reader from stream. const reader = stream.getReader() // 7. Let bytes be an empty byte sequence. /** @type {Uint8Array[]} */ const bytes = [] // 8. Let chunkPromise be the result of reading a chunk from // stream with reader. let chunkPromise = reader.read() // 9. Let isFirstChunk be true. let isFirstChunk = true // 10. In parallel, while true: // Note: "In parallel" just means non-blocking // Note 2: readOperation itself cannot be async as double // reading the body would then reject the promise, instead // of throwing an error. ;(async () => { while (!fr[kAborted]) { // 1. Wait for chunkPromise to be fulfilled or rejected. try { const { done, value } = await chunkPromise // 2. If chunkPromise is fulfilled, and isFirstChunk is // true, queue a task to fire a progress event called // loadstart at fr. if (isFirstChunk && !fr[kAborted]) { queueMicrotask(() => { fireAProgressEvent('loadstart', fr) }) } // 3. Set isFirstChunk to false. isFirstChunk = false // 4. If chunkPromise is fulfilled with an object whose // done property is false and whose value property is // a Uint8Array object, run these steps: if (!done && types.isUint8Array(value)) { // 1. Let bs be the byte sequence represented by the // Uint8Array object. // 2. Append bs to bytes. bytes.push(value) // 3. If roughly 50ms have passed since these steps // were last invoked, queue a task to fire a // progress event called progress at fr. if ( ( fr[kLastProgressEventFired] === undefined || Date.now() - fr[kLastProgressEventFired] >= 50 ) && !fr[kAborted] ) { fr[kLastProgressEventFired] = Date.now() queueMicrotask(() => { fireAProgressEvent('progress', fr) }) } // 4. Set chunkPromise to the result of reading a // chunk from stream with reader. chunkPromise = reader.read() } else if (done) { // 5. Otherwise, if chunkPromise is fulfilled with an // object whose done property is true, queue a task // to run the following steps and abort this algorithm: queueMicrotask(() => { // 1. Set fr’s state to "done". fr[kState] = 'done' // 2. Let result be the result of package data given // bytes, type, blob’s type, and encodingName. try { const result = packageData(bytes, type, blob.type, encodingName) // 4. Else: if (fr[kAborted]) { return } // 1. Set fr’s result to result. fr[kResult] = result // 2. Fire a progress event called load at the fr. fireAProgressEvent('load', fr) } catch (error) { // 3. If package data threw an exception error: // 1. Set fr’s error to error. fr[kError] = error // 2. Fire a progress event called error at fr. fireAProgressEvent('error', fr) } // 5. If fr’s state is not "loading", fire a progress // event called loadend at the fr. if (fr[kState] !== 'loading') { fireAProgressEvent('loadend', fr) } }) break } } catch (error) { if (fr[kAborted]) { return } // 6. Otherwise, if chunkPromise is rejected with an // error error, queue a task to run the following // steps and abort this algorithm: queueMicrotask(() => { // 1. Set fr’s state to "done". fr[kState] = 'done' // 2. Set fr’s error to error. fr[kError] = error // 3. Fire a progress event called error at fr. fireAProgressEvent('error', fr) // 4. If fr’s state is not "loading", fire a progress // event called loadend at fr. if (fr[kState] !== 'loading') { fireAProgressEvent('loadend', fr) } }) break } } })() } /** * @see https://w3c.github.io/FileAPI/#fire-a-progress-event * @see https://dom.spec.whatwg.org/#concept-event-fire * @param {string} e The name of the event * @param {import('./filereader').FileReader} reader */ function fireAProgressEvent (e, reader) { // The progress event e does not bubble. e.bubbles must be false // The progress event e is NOT cancelable. e.cancelable must be false const event = new ProgressEvent(e, { bubbles: false, cancelable: false }) reader.dispatchEvent(event) } /** * @see https://w3c.github.io/FileAPI/#blob-package-data * @param {Uint8Array[]} bytes * @param {string} type * @param {string?} mimeType * @param {string?} encodingName */ function packageData (bytes, type, mimeType, encodingName) { // 1. A Blob has an associated package data algorithm, given // bytes, a type, a optional mimeType, and a optional // encodingName, which switches on type and runs the // associated steps: switch (type) { case 'DataURL': { // 1. Return bytes as a DataURL [RFC2397] subject to // the considerations below: // * Use mimeType as part of the Data URL if it is // available in keeping with the Data URL // specification [RFC2397]. // * If mimeType is not available return a Data URL // without a media-type. [RFC2397]. // https://datatracker.ietf.org/doc/html/rfc2397#section-3 // dataurl := "data:" [ mediatype ] [ ";base64" ] "," data // mediatype := [ type "/" subtype ] *( ";" parameter ) // data := *urlchar // parameter := attribute "=" value let dataURL = 'data:' const parsed = parseMIMEType(mimeType || 'application/octet-stream') if (parsed !== 'failure') { dataURL += serializeAMimeType(parsed) } dataURL += ';base64,' const decoder = new StringDecoder('latin1') for (const chunk of bytes) { dataURL += btoa(decoder.write(chunk)) } dataURL += btoa(decoder.end()) return dataURL } case 'Text': { // 1. Let encoding be failure let encoding = 'failure' // 2. If the encodingName is present, set encoding to the // result of getting an encoding from encodingName. if (encodingName) { encoding = getEncoding(encodingName) } // 3. If encoding is failure, and mimeType is present: if (encoding === 'failure' && mimeType) { // 1. Let type be the result of parse a MIME type // given mimeType. const type = parseMIMEType(mimeType) // 2. If type is not failure, set encoding to the result // of getting an encoding from type’s parameters["charset"]. if (type !== 'failure') { encoding = getEncoding(type.parameters.get('charset')) } } // 4. If encoding is failure, then set encoding to UTF-8. if (encoding === 'failure') { encoding = 'UTF-8' } // 5. Decode bytes using fallback encoding encoding, and // return the result. return decode(bytes, encoding) } case 'ArrayBuffer': { // Return a new ArrayBuffer whose contents are bytes. const sequence = combineByteSequences(bytes) return sequence.buffer } case 'BinaryString': { // Return bytes as a binary string, in which every byte // is represented by a code unit of equal value [0..255]. let binaryString = '' const decoder = new StringDecoder('latin1') for (const chunk of bytes) { binaryString += decoder.write(chunk) } binaryString += decoder.end() return binaryString } } } /** * @see https://encoding.spec.whatwg.org/#decode * @param {Uint8Array[]} ioQueue * @param {string} encoding */ function decode (ioQueue, encoding) { const bytes = combineByteSequences(ioQueue) // 1. Let BOMEncoding be the result of BOM sniffing ioQueue. const BOMEncoding = BOMSniffing(bytes) let slice = 0 // 2. If BOMEncoding is non-null: if (BOMEncoding !== null) { // 1. Set encoding to BOMEncoding. encoding = BOMEncoding // 2. Read three bytes from ioQueue, if BOMEncoding is // UTF-8; otherwise read two bytes. // (Do nothing with those bytes.) slice = BOMEncoding === 'UTF-8' ? 3 : 2 } // 3. Process a queue with an instance of encoding’s // decoder, ioQueue, output, and "replacement". // 4. Return output. const sliced = bytes.slice(slice) return new TextDecoder(encoding).decode(sliced) } /** * @see https://encoding.spec.whatwg.org/#bom-sniff * @param {Uint8Array} ioQueue */ function BOMSniffing (ioQueue) { // 1. Let BOM be the result of peeking 3 bytes from ioQueue, // converted to a byte sequence. const [a, b, c] = ioQueue // 2. For each of the rows in the table below, starting with // the first one and going down, if BOM starts with the // bytes given in the first column, then return the // encoding given in the cell in the second column of that // row. Otherwise, return null. if (a === 0xEF && b === 0xBB && c === 0xBF) { return 'UTF-8' } else if (a === 0xFE && b === 0xFF) { return 'UTF-16BE' } else if (a === 0xFF && b === 0xFE) { return 'UTF-16LE' } return null } /** * @param {Uint8Array[]} sequences */ function combineByteSequences (sequences) { const size = sequences.reduce((a, b) => { return a + b.byteLength }, 0) let offset = 0 return sequences.reduce((a, b) => { a.set(b, offset) offset += b.byteLength return a }, new Uint8Array(size)) } module.exports = { staticPropertyDescriptors, readOperation, fireAProgressEvent } node_modules/undici/lib/web/fileapi/encoding.js 0000664 00000014732 15114741631 0015570 0 ustar 00 'use strict' /** * @see https://encoding.spec.whatwg.org/#concept-encoding-get * @param {string|undefined} label */ function getEncoding (label) { if (!label) { return 'failure' } // 1. Remove any leading and trailing ASCII whitespace from label. // 2. If label is an ASCII case-insensitive match for any of the // labels listed in the table below, then return the // corresponding encoding; otherwise return failure. switch (label.trim().toLowerCase()) { case 'unicode-1-1-utf-8': case 'unicode11utf8': case 'unicode20utf8': case 'utf-8': case 'utf8': case 'x-unicode20utf8': return 'UTF-8' case '866': case 'cp866': case 'csibm866': case 'ibm866': return 'IBM866' case 'csisolatin2': case 'iso-8859-2': case 'iso-ir-101': case 'iso8859-2': case 'iso88592': case 'iso_8859-2': case 'iso_8859-2:1987': case 'l2': case 'latin2': return 'ISO-8859-2' case 'csisolatin3': case 'iso-8859-3': case 'iso-ir-109': case 'iso8859-3': case 'iso88593': case 'iso_8859-3': case 'iso_8859-3:1988': case 'l3': case 'latin3': return 'ISO-8859-3' case 'csisolatin4': case 'iso-8859-4': case 'iso-ir-110': case 'iso8859-4': case 'iso88594': case 'iso_8859-4': case 'iso_8859-4:1988': case 'l4': case 'latin4': return 'ISO-8859-4' case 'csisolatincyrillic': case 'cyrillic': case 'iso-8859-5': case 'iso-ir-144': case 'iso8859-5': case 'iso88595': case 'iso_8859-5': case 'iso_8859-5:1988': return 'ISO-8859-5' case 'arabic': case 'asmo-708': case 'csiso88596e': case 'csiso88596i': case 'csisolatinarabic': case 'ecma-114': case 'iso-8859-6': case 'iso-8859-6-e': case 'iso-8859-6-i': case 'iso-ir-127': case 'iso8859-6': case 'iso88596': case 'iso_8859-6': case 'iso_8859-6:1987': return 'ISO-8859-6' case 'csisolatingreek': case 'ecma-118': case 'elot_928': case 'greek': case 'greek8': case 'iso-8859-7': case 'iso-ir-126': case 'iso8859-7': case 'iso88597': case 'iso_8859-7': case 'iso_8859-7:1987': case 'sun_eu_greek': return 'ISO-8859-7' case 'csiso88598e': case 'csisolatinhebrew': case 'hebrew': case 'iso-8859-8': case 'iso-8859-8-e': case 'iso-ir-138': case 'iso8859-8': case 'iso88598': case 'iso_8859-8': case 'iso_8859-8:1988': case 'visual': return 'ISO-8859-8' case 'csiso88598i': case 'iso-8859-8-i': case 'logical': return 'ISO-8859-8-I' case 'csisolatin6': case 'iso-8859-10': case 'iso-ir-157': case 'iso8859-10': case 'iso885910': case 'l6': case 'latin6': return 'ISO-8859-10' case 'iso-8859-13': case 'iso8859-13': case 'iso885913': return 'ISO-8859-13' case 'iso-8859-14': case 'iso8859-14': case 'iso885914': return 'ISO-8859-14' case 'csisolatin9': case 'iso-8859-15': case 'iso8859-15': case 'iso885915': case 'iso_8859-15': case 'l9': return 'ISO-8859-15' case 'iso-8859-16': return 'ISO-8859-16' case 'cskoi8r': case 'koi': case 'koi8': case 'koi8-r': case 'koi8_r': return 'KOI8-R' case 'koi8-ru': case 'koi8-u': return 'KOI8-U' case 'csmacintosh': case 'mac': case 'macintosh': case 'x-mac-roman': return 'macintosh' case 'iso-8859-11': case 'iso8859-11': case 'iso885911': case 'tis-620': case 'windows-874': return 'windows-874' case 'cp1250': case 'windows-1250': case 'x-cp1250': return 'windows-1250' case 'cp1251': case 'windows-1251': case 'x-cp1251': return 'windows-1251' case 'ansi_x3.4-1968': case 'ascii': case 'cp1252': case 'cp819': case 'csisolatin1': case 'ibm819': case 'iso-8859-1': case 'iso-ir-100': case 'iso8859-1': case 'iso88591': case 'iso_8859-1': case 'iso_8859-1:1987': case 'l1': case 'latin1': case 'us-ascii': case 'windows-1252': case 'x-cp1252': return 'windows-1252' case 'cp1253': case 'windows-1253': case 'x-cp1253': return 'windows-1253' case 'cp1254': case 'csisolatin5': case 'iso-8859-9': case 'iso-ir-148': case 'iso8859-9': case 'iso88599': case 'iso_8859-9': case 'iso_8859-9:1989': case 'l5': case 'latin5': case 'windows-1254': case 'x-cp1254': return 'windows-1254' case 'cp1255': case 'windows-1255': case 'x-cp1255': return 'windows-1255' case 'cp1256': case 'windows-1256': case 'x-cp1256': return 'windows-1256' case 'cp1257': case 'windows-1257': case 'x-cp1257': return 'windows-1257' case 'cp1258': case 'windows-1258': case 'x-cp1258': return 'windows-1258' case 'x-mac-cyrillic': case 'x-mac-ukrainian': return 'x-mac-cyrillic' case 'chinese': case 'csgb2312': case 'csiso58gb231280': case 'gb2312': case 'gb_2312': case 'gb_2312-80': case 'gbk': case 'iso-ir-58': case 'x-gbk': return 'GBK' case 'gb18030': return 'gb18030' case 'big5': case 'big5-hkscs': case 'cn-big5': case 'csbig5': case 'x-x-big5': return 'Big5' case 'cseucpkdfmtjapanese': case 'euc-jp': case 'x-euc-jp': return 'EUC-JP' case 'csiso2022jp': case 'iso-2022-jp': return 'ISO-2022-JP' case 'csshiftjis': case 'ms932': case 'ms_kanji': case 'shift-jis': case 'shift_jis': case 'sjis': case 'windows-31j': case 'x-sjis': return 'Shift_JIS' case 'cseuckr': case 'csksc56011987': case 'euc-kr': case 'iso-ir-149': case 'korean': case 'ks_c_5601-1987': case 'ks_c_5601-1989': case 'ksc5601': case 'ksc_5601': case 'windows-949': return 'EUC-KR' case 'csiso2022kr': case 'hz-gb-2312': case 'iso-2022-cn': case 'iso-2022-cn-ext': case 'iso-2022-kr': case 'replacement': return 'replacement' case 'unicodefffe': case 'utf-16be': return 'UTF-16BE' case 'csunicode': case 'iso-10646-ucs-2': case 'ucs-2': case 'unicode': case 'unicodefeff': case 'utf-16': case 'utf-16le': return 'UTF-16LE' case 'x-user-defined': return 'x-user-defined' default: return 'failure' } } module.exports = { getEncoding } node_modules/undici/lib/web/cookies/parse.js 0000664 00000030146 15114741631 0015134 0 ustar 00 'use strict' const { maxNameValuePairSize, maxAttributeValueSize } = require('./constants') const { isCTLExcludingHtab } = require('./util') const { collectASequenceOfCodePointsFast } = require('../fetch/data-url') const assert = require('node:assert') /** * @description Parses the field-value attributes of a set-cookie header string. * @see https://datatracker.ietf.org/doc/html/draft-ietf-httpbis-rfc6265bis#section-5.4 * @param {string} header * @returns if the header is invalid, null will be returned */ function parseSetCookie (header) { // 1. If the set-cookie-string contains a %x00-08 / %x0A-1F / %x7F // character (CTL characters excluding HTAB): Abort these steps and // ignore the set-cookie-string entirely. if (isCTLExcludingHtab(header)) { return null } let nameValuePair = '' let unparsedAttributes = '' let name = '' let value = '' // 2. If the set-cookie-string contains a %x3B (";") character: if (header.includes(';')) { // 1. The name-value-pair string consists of the characters up to, // but not including, the first %x3B (";"), and the unparsed- // attributes consist of the remainder of the set-cookie-string // (including the %x3B (";") in question). const position = { position: 0 } nameValuePair = collectASequenceOfCodePointsFast(';', header, position) unparsedAttributes = header.slice(position.position) } else { // Otherwise: // 1. The name-value-pair string consists of all the characters // contained in the set-cookie-string, and the unparsed- // attributes is the empty string. nameValuePair = header } // 3. If the name-value-pair string lacks a %x3D ("=") character, then // the name string is empty, and the value string is the value of // name-value-pair. if (!nameValuePair.includes('=')) { value = nameValuePair } else { // Otherwise, the name string consists of the characters up to, but // not including, the first %x3D ("=") character, and the (possibly // empty) value string consists of the characters after the first // %x3D ("=") character. const position = { position: 0 } name = collectASequenceOfCodePointsFast( '=', nameValuePair, position ) value = nameValuePair.slice(position.position + 1) } // 4. Remove any leading or trailing WSP characters from the name // string and the value string. name = name.trim() value = value.trim() // 5. If the sum of the lengths of the name string and the value string // is more than 4096 octets, abort these steps and ignore the set- // cookie-string entirely. if (name.length + value.length > maxNameValuePairSize) { return null } // 6. The cookie-name is the name string, and the cookie-value is the // value string. return { name, value, ...parseUnparsedAttributes(unparsedAttributes) } } /** * Parses the remaining attributes of a set-cookie header * @see https://datatracker.ietf.org/doc/html/draft-ietf-httpbis-rfc6265bis#section-5.4 * @param {string} unparsedAttributes * @param {[Object.<string, unknown>]={}} cookieAttributeList */ function parseUnparsedAttributes (unparsedAttributes, cookieAttributeList = {}) { // 1. If the unparsed-attributes string is empty, skip the rest of // these steps. if (unparsedAttributes.length === 0) { return cookieAttributeList } // 2. Discard the first character of the unparsed-attributes (which // will be a %x3B (";") character). assert(unparsedAttributes[0] === ';') unparsedAttributes = unparsedAttributes.slice(1) let cookieAv = '' // 3. If the remaining unparsed-attributes contains a %x3B (";") // character: if (unparsedAttributes.includes(';')) { // 1. Consume the characters of the unparsed-attributes up to, but // not including, the first %x3B (";") character. cookieAv = collectASequenceOfCodePointsFast( ';', unparsedAttributes, { position: 0 } ) unparsedAttributes = unparsedAttributes.slice(cookieAv.length) } else { // Otherwise: // 1. Consume the remainder of the unparsed-attributes. cookieAv = unparsedAttributes unparsedAttributes = '' } // Let the cookie-av string be the characters consumed in this step. let attributeName = '' let attributeValue = '' // 4. If the cookie-av string contains a %x3D ("=") character: if (cookieAv.includes('=')) { // 1. The (possibly empty) attribute-name string consists of the // characters up to, but not including, the first %x3D ("=") // character, and the (possibly empty) attribute-value string // consists of the characters after the first %x3D ("=") // character. const position = { position: 0 } attributeName = collectASequenceOfCodePointsFast( '=', cookieAv, position ) attributeValue = cookieAv.slice(position.position + 1) } else { // Otherwise: // 1. The attribute-name string consists of the entire cookie-av // string, and the attribute-value string is empty. attributeName = cookieAv } // 5. Remove any leading or trailing WSP characters from the attribute- // name string and the attribute-value string. attributeName = attributeName.trim() attributeValue = attributeValue.trim() // 6. If the attribute-value is longer than 1024 octets, ignore the // cookie-av string and return to Step 1 of this algorithm. if (attributeValue.length > maxAttributeValueSize) { return parseUnparsedAttributes(unparsedAttributes, cookieAttributeList) } // 7. Process the attribute-name and attribute-value according to the // requirements in the following subsections. (Notice that // attributes with unrecognized attribute-names are ignored.) const attributeNameLowercase = attributeName.toLowerCase() // https://datatracker.ietf.org/doc/html/draft-ietf-httpbis-rfc6265bis#section-5.4.1 // If the attribute-name case-insensitively matches the string // "Expires", the user agent MUST process the cookie-av as follows. if (attributeNameLowercase === 'expires') { // 1. Let the expiry-time be the result of parsing the attribute-value // as cookie-date (see Section 5.1.1). const expiryTime = new Date(attributeValue) // 2. If the attribute-value failed to parse as a cookie date, ignore // the cookie-av. cookieAttributeList.expires = expiryTime } else if (attributeNameLowercase === 'max-age') { // https://datatracker.ietf.org/doc/html/draft-ietf-httpbis-rfc6265bis#section-5.4.2 // If the attribute-name case-insensitively matches the string "Max- // Age", the user agent MUST process the cookie-av as follows. // 1. If the first character of the attribute-value is not a DIGIT or a // "-" character, ignore the cookie-av. const charCode = attributeValue.charCodeAt(0) if ((charCode < 48 || charCode > 57) && attributeValue[0] !== '-') { return parseUnparsedAttributes(unparsedAttributes, cookieAttributeList) } // 2. If the remainder of attribute-value contains a non-DIGIT // character, ignore the cookie-av. if (!/^\d+$/.test(attributeValue)) { return parseUnparsedAttributes(unparsedAttributes, cookieAttributeList) } // 3. Let delta-seconds be the attribute-value converted to an integer. const deltaSeconds = Number(attributeValue) // 4. Let cookie-age-limit be the maximum age of the cookie (which // SHOULD be 400 days or less, see Section 4.1.2.2). // 5. Set delta-seconds to the smaller of its present value and cookie- // age-limit. // deltaSeconds = Math.min(deltaSeconds * 1000, maxExpiresMs) // 6. If delta-seconds is less than or equal to zero (0), let expiry- // time be the earliest representable date and time. Otherwise, let // the expiry-time be the current date and time plus delta-seconds // seconds. // const expiryTime = deltaSeconds <= 0 ? Date.now() : Date.now() + deltaSeconds // 7. Append an attribute to the cookie-attribute-list with an // attribute-name of Max-Age and an attribute-value of expiry-time. cookieAttributeList.maxAge = deltaSeconds } else if (attributeNameLowercase === 'domain') { // https://datatracker.ietf.org/doc/html/draft-ietf-httpbis-rfc6265bis#section-5.4.3 // If the attribute-name case-insensitively matches the string "Domain", // the user agent MUST process the cookie-av as follows. // 1. Let cookie-domain be the attribute-value. let cookieDomain = attributeValue // 2. If cookie-domain starts with %x2E ("."), let cookie-domain be // cookie-domain without its leading %x2E ("."). if (cookieDomain[0] === '.') { cookieDomain = cookieDomain.slice(1) } // 3. Convert the cookie-domain to lower case. cookieDomain = cookieDomain.toLowerCase() // 4. Append an attribute to the cookie-attribute-list with an // attribute-name of Domain and an attribute-value of cookie-domain. cookieAttributeList.domain = cookieDomain } else if (attributeNameLowercase === 'path') { // https://datatracker.ietf.org/doc/html/draft-ietf-httpbis-rfc6265bis#section-5.4.4 // If the attribute-name case-insensitively matches the string "Path", // the user agent MUST process the cookie-av as follows. // 1. If the attribute-value is empty or if the first character of the // attribute-value is not %x2F ("/"): let cookiePath = '' if (attributeValue.length === 0 || attributeValue[0] !== '/') { // 1. Let cookie-path be the default-path. cookiePath = '/' } else { // Otherwise: // 1. Let cookie-path be the attribute-value. cookiePath = attributeValue } // 2. Append an attribute to the cookie-attribute-list with an // attribute-name of Path and an attribute-value of cookie-path. cookieAttributeList.path = cookiePath } else if (attributeNameLowercase === 'secure') { // https://datatracker.ietf.org/doc/html/draft-ietf-httpbis-rfc6265bis#section-5.4.5 // If the attribute-name case-insensitively matches the string "Secure", // the user agent MUST append an attribute to the cookie-attribute-list // with an attribute-name of Secure and an empty attribute-value. cookieAttributeList.secure = true } else if (attributeNameLowercase === 'httponly') { // https://datatracker.ietf.org/doc/html/draft-ietf-httpbis-rfc6265bis#section-5.4.6 // If the attribute-name case-insensitively matches the string // "HttpOnly", the user agent MUST append an attribute to the cookie- // attribute-list with an attribute-name of HttpOnly and an empty // attribute-value. cookieAttributeList.httpOnly = true } else if (attributeNameLowercase === 'samesite') { // https://datatracker.ietf.org/doc/html/draft-ietf-httpbis-rfc6265bis#section-5.4.7 // If the attribute-name case-insensitively matches the string // "SameSite", the user agent MUST process the cookie-av as follows: // 1. Let enforcement be "Default". let enforcement = 'Default' const attributeValueLowercase = attributeValue.toLowerCase() // 2. If cookie-av's attribute-value is a case-insensitive match for // "None", set enforcement to "None". if (attributeValueLowercase.includes('none')) { enforcement = 'None' } // 3. If cookie-av's attribute-value is a case-insensitive match for // "Strict", set enforcement to "Strict". if (attributeValueLowercase.includes('strict')) { enforcement = 'Strict' } // 4. If cookie-av's attribute-value is a case-insensitive match for // "Lax", set enforcement to "Lax". if (attributeValueLowercase.includes('lax')) { enforcement = 'Lax' } // 5. Append an attribute to the cookie-attribute-list with an // attribute-name of "SameSite" and an attribute-value of // enforcement. cookieAttributeList.sameSite = enforcement } else { cookieAttributeList.unparsed ??= [] cookieAttributeList.unparsed.push(`${attributeName}=${attributeValue}`) } // 8. Return to Step 1 of this algorithm. return parseUnparsedAttributes(unparsedAttributes, cookieAttributeList) } module.exports = { parseSetCookie, parseUnparsedAttributes } node_modules/undici/lib/web/cookies/constants.js 0000664 00000000462 15114741631 0016034 0 ustar 00 'use strict' // https://wicg.github.io/cookie-store/#cookie-maximum-attribute-value-size const maxAttributeValueSize = 1024 // https://wicg.github.io/cookie-store/#cookie-maximum-name-value-pair-size const maxNameValuePairSize = 4096 module.exports = { maxAttributeValueSize, maxNameValuePairSize } node_modules/undici/lib/web/cookies/util.js 0000664 00000016321 15114741631 0014776 0 ustar 00 'use strict' /** * @param {string} value * @returns {boolean} */ function isCTLExcludingHtab (value) { for (let i = 0; i < value.length; ++i) { const code = value.charCodeAt(i) if ( (code >= 0x00 && code <= 0x08) || (code >= 0x0A && code <= 0x1F) || code === 0x7F ) { return true } } return false } /** CHAR = <any US-ASCII character (octets 0 - 127)> token = 1*<any CHAR except CTLs or separators> separators = "(" | ")" | "<" | ">" | "@" | "," | ";" | ":" | "\" | <"> | "/" | "[" | "]" | "?" | "=" | "{" | "}" | SP | HT * @param {string} name */ function validateCookieName (name) { for (let i = 0; i < name.length; ++i) { const code = name.charCodeAt(i) if ( code < 0x21 || // exclude CTLs (0-31), SP and HT code > 0x7E || // exclude non-ascii and DEL code === 0x22 || // " code === 0x28 || // ( code === 0x29 || // ) code === 0x3C || // < code === 0x3E || // > code === 0x40 || // @ code === 0x2C || // , code === 0x3B || // ; code === 0x3A || // : code === 0x5C || // \ code === 0x2F || // / code === 0x5B || // [ code === 0x5D || // ] code === 0x3F || // ? code === 0x3D || // = code === 0x7B || // { code === 0x7D // } ) { throw new Error('Invalid cookie name') } } } /** cookie-value = *cookie-octet / ( DQUOTE *cookie-octet DQUOTE ) cookie-octet = %x21 / %x23-2B / %x2D-3A / %x3C-5B / %x5D-7E ; US-ASCII characters excluding CTLs, ; whitespace DQUOTE, comma, semicolon, ; and backslash * @param {string} value */ function validateCookieValue (value) { let len = value.length let i = 0 // if the value is wrapped in DQUOTE if (value[0] === '"') { if (len === 1 || value[len - 1] !== '"') { throw new Error('Invalid cookie value') } --len ++i } while (i < len) { const code = value.charCodeAt(i++) if ( code < 0x21 || // exclude CTLs (0-31) code > 0x7E || // non-ascii and DEL (127) code === 0x22 || // " code === 0x2C || // , code === 0x3B || // ; code === 0x5C // \ ) { throw new Error('Invalid cookie value') } } } /** * path-value = <any CHAR except CTLs or ";"> * @param {string} path */ function validateCookiePath (path) { for (let i = 0; i < path.length; ++i) { const code = path.charCodeAt(i) if ( code < 0x20 || // exclude CTLs (0-31) code === 0x7F || // DEL code === 0x3B // ; ) { throw new Error('Invalid cookie path') } } } /** * I have no idea why these values aren't allowed to be honest, * but Deno tests these. - Khafra * @param {string} domain */ function validateCookieDomain (domain) { if ( domain.startsWith('-') || domain.endsWith('.') || domain.endsWith('-') ) { throw new Error('Invalid cookie domain') } } const IMFDays = [ 'Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat' ] const IMFMonths = [ 'Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec' ] const IMFPaddedNumbers = Array(61).fill(0).map((_, i) => i.toString().padStart(2, '0')) /** * @see https://www.rfc-editor.org/rfc/rfc7231#section-7.1.1.1 * @param {number|Date} date IMF-fixdate = day-name "," SP date1 SP time-of-day SP GMT ; fixed length/zone/capitalization subset of the format ; see Section 3.3 of [RFC5322] day-name = %x4D.6F.6E ; "Mon", case-sensitive / %x54.75.65 ; "Tue", case-sensitive / %x57.65.64 ; "Wed", case-sensitive / %x54.68.75 ; "Thu", case-sensitive / %x46.72.69 ; "Fri", case-sensitive / %x53.61.74 ; "Sat", case-sensitive / %x53.75.6E ; "Sun", case-sensitive date1 = day SP month SP year ; e.g., 02 Jun 1982 day = 2DIGIT month = %x4A.61.6E ; "Jan", case-sensitive / %x46.65.62 ; "Feb", case-sensitive / %x4D.61.72 ; "Mar", case-sensitive / %x41.70.72 ; "Apr", case-sensitive / %x4D.61.79 ; "May", case-sensitive / %x4A.75.6E ; "Jun", case-sensitive / %x4A.75.6C ; "Jul", case-sensitive / %x41.75.67 ; "Aug", case-sensitive / %x53.65.70 ; "Sep", case-sensitive / %x4F.63.74 ; "Oct", case-sensitive / %x4E.6F.76 ; "Nov", case-sensitive / %x44.65.63 ; "Dec", case-sensitive year = 4DIGIT GMT = %x47.4D.54 ; "GMT", case-sensitive time-of-day = hour ":" minute ":" second ; 00:00:00 - 23:59:60 (leap second) hour = 2DIGIT minute = 2DIGIT second = 2DIGIT */ function toIMFDate (date) { if (typeof date === 'number') { date = new Date(date) } return `${IMFDays[date.getUTCDay()]}, ${IMFPaddedNumbers[date.getUTCDate()]} ${IMFMonths[date.getUTCMonth()]} ${date.getUTCFullYear()} ${IMFPaddedNumbers[date.getUTCHours()]}:${IMFPaddedNumbers[date.getUTCMinutes()]}:${IMFPaddedNumbers[date.getUTCSeconds()]} GMT` } /** max-age-av = "Max-Age=" non-zero-digit *DIGIT ; In practice, both expires-av and max-age-av ; are limited to dates representable by the ; user agent. * @param {number} maxAge */ function validateCookieMaxAge (maxAge) { if (maxAge < 0) { throw new Error('Invalid cookie max-age') } } /** * @see https://www.rfc-editor.org/rfc/rfc6265#section-4.1.1 * @param {import('./index').Cookie} cookie */ function stringify (cookie) { if (cookie.name.length === 0) { return null } validateCookieName(cookie.name) validateCookieValue(cookie.value) const out = [`${cookie.name}=${cookie.value}`] // https://datatracker.ietf.org/doc/html/draft-ietf-httpbis-cookie-prefixes-00#section-3.1 // https://datatracker.ietf.org/doc/html/draft-ietf-httpbis-cookie-prefixes-00#section-3.2 if (cookie.name.startsWith('__Secure-')) { cookie.secure = true } if (cookie.name.startsWith('__Host-')) { cookie.secure = true cookie.domain = null cookie.path = '/' } if (cookie.secure) { out.push('Secure') } if (cookie.httpOnly) { out.push('HttpOnly') } if (typeof cookie.maxAge === 'number') { validateCookieMaxAge(cookie.maxAge) out.push(`Max-Age=${cookie.maxAge}`) } if (cookie.domain) { validateCookieDomain(cookie.domain) out.push(`Domain=${cookie.domain}`) } if (cookie.path) { validateCookiePath(cookie.path) out.push(`Path=${cookie.path}`) } if (cookie.expires && cookie.expires.toString() !== 'Invalid Date') { out.push(`Expires=${toIMFDate(cookie.expires)}`) } if (cookie.sameSite) { out.push(`SameSite=${cookie.sameSite}`) } for (const part of cookie.unparsed) { if (!part.includes('=')) { throw new Error('Invalid unparsed') } const [key, ...value] = part.split('=') out.push(`${key.trim()}=${value.join('=')}`) } return out.join('; ') } module.exports = { isCTLExcludingHtab, validateCookieName, validateCookiePath, validateCookieValue, toIMFDate, stringify } node_modules/undici/lib/web/cookies/index.js 0000664 00000010227 15114741631 0015127 0 ustar 00 'use strict' const { parseSetCookie } = require('./parse') const { stringify } = require('./util') const { webidl } = require('../fetch/webidl') const { Headers } = require('../fetch/headers') /** * @typedef {Object} Cookie * @property {string} name * @property {string} value * @property {Date|number|undefined} expires * @property {number|undefined} maxAge * @property {string|undefined} domain * @property {string|undefined} path * @property {boolean|undefined} secure * @property {boolean|undefined} httpOnly * @property {'Strict'|'Lax'|'None'} sameSite * @property {string[]} unparsed */ /** * @param {Headers} headers * @returns {Record<string, string>} */ function getCookies (headers) { webidl.argumentLengthCheck(arguments, 1, 'getCookies') webidl.brandCheck(headers, Headers, { strict: false }) const cookie = headers.get('cookie') const out = {} if (!cookie) { return out } for (const piece of cookie.split(';')) { const [name, ...value] = piece.split('=') out[name.trim()] = value.join('=') } return out } /** * @param {Headers} headers * @param {string} name * @param {{ path?: string, domain?: string }|undefined} attributes * @returns {void} */ function deleteCookie (headers, name, attributes) { webidl.brandCheck(headers, Headers, { strict: false }) const prefix = 'deleteCookie' webidl.argumentLengthCheck(arguments, 2, prefix) name = webidl.converters.DOMString(name, prefix, 'name') attributes = webidl.converters.DeleteCookieAttributes(attributes) // Matches behavior of // https://github.com/denoland/deno_std/blob/63827b16330b82489a04614027c33b7904e08be5/http/cookie.ts#L278 setCookie(headers, { name, value: '', expires: new Date(0), ...attributes }) } /** * @param {Headers} headers * @returns {Cookie[]} */ function getSetCookies (headers) { webidl.argumentLengthCheck(arguments, 1, 'getSetCookies') webidl.brandCheck(headers, Headers, { strict: false }) const cookies = headers.getSetCookie() if (!cookies) { return [] } return cookies.map((pair) => parseSetCookie(pair)) } /** * @param {Headers} headers * @param {Cookie} cookie * @returns {void} */ function setCookie (headers, cookie) { webidl.argumentLengthCheck(arguments, 2, 'setCookie') webidl.brandCheck(headers, Headers, { strict: false }) cookie = webidl.converters.Cookie(cookie) const str = stringify(cookie) if (str) { headers.append('Set-Cookie', str) } } webidl.converters.DeleteCookieAttributes = webidl.dictionaryConverter([ { converter: webidl.nullableConverter(webidl.converters.DOMString), key: 'path', defaultValue: () => null }, { converter: webidl.nullableConverter(webidl.converters.DOMString), key: 'domain', defaultValue: () => null } ]) webidl.converters.Cookie = webidl.dictionaryConverter([ { converter: webidl.converters.DOMString, key: 'name' }, { converter: webidl.converters.DOMString, key: 'value' }, { converter: webidl.nullableConverter((value) => { if (typeof value === 'number') { return webidl.converters['unsigned long long'](value) } return new Date(value) }), key: 'expires', defaultValue: () => null }, { converter: webidl.nullableConverter(webidl.converters['long long']), key: 'maxAge', defaultValue: () => null }, { converter: webidl.nullableConverter(webidl.converters.DOMString), key: 'domain', defaultValue: () => null }, { converter: webidl.nullableConverter(webidl.converters.DOMString), key: 'path', defaultValue: () => null }, { converter: webidl.nullableConverter(webidl.converters.boolean), key: 'secure', defaultValue: () => null }, { converter: webidl.nullableConverter(webidl.converters.boolean), key: 'httpOnly', defaultValue: () => null }, { converter: webidl.converters.USVString, key: 'sameSite', allowedValues: ['Strict', 'Lax', 'None'] }, { converter: webidl.sequenceConverter(webidl.converters.DOMString), key: 'unparsed', defaultValue: () => new Array(0) } ]) module.exports = { getCookies, deleteCookie, getSetCookies, setCookie } node_modules/undici/lib/web/cache/cache.js 0000664 00000051130 15114741631 0014470 0 ustar 00 'use strict' const { kConstruct } = require('./symbols') const { urlEquals, getFieldValues } = require('./util') const { kEnumerableProperty, isDisturbed } = require('../../core/util') const { webidl } = require('../fetch/webidl') const { Response, cloneResponse, fromInnerResponse } = require('../fetch/response') const { Request, fromInnerRequest } = require('../fetch/request') const { kState } = require('../fetch/symbols') const { fetching } = require('../fetch/index') const { urlIsHttpHttpsScheme, createDeferredPromise, readAllBytes } = require('../fetch/util') const assert = require('node:assert') /** * @see https://w3c.github.io/ServiceWorker/#dfn-cache-batch-operation * @typedef {Object} CacheBatchOperation * @property {'delete' | 'put'} type * @property {any} request * @property {any} response * @property {import('../../types/cache').CacheQueryOptions} options */ /** * @see https://w3c.github.io/ServiceWorker/#dfn-request-response-list * @typedef {[any, any][]} requestResponseList */ class Cache { /** * @see https://w3c.github.io/ServiceWorker/#dfn-relevant-request-response-list * @type {requestResponseList} */ #relevantRequestResponseList constructor () { if (arguments[0] !== kConstruct) { webidl.illegalConstructor() } webidl.util.markAsUncloneable(this) this.#relevantRequestResponseList = arguments[1] } async match (request, options = {}) { webidl.brandCheck(this, Cache) const prefix = 'Cache.match' webidl.argumentLengthCheck(arguments, 1, prefix) request = webidl.converters.RequestInfo(request, prefix, 'request') options = webidl.converters.CacheQueryOptions(options, prefix, 'options') const p = this.#internalMatchAll(request, options, 1) if (p.length === 0) { return } return p[0] } async matchAll (request = undefined, options = {}) { webidl.brandCheck(this, Cache) const prefix = 'Cache.matchAll' if (request !== undefined) request = webidl.converters.RequestInfo(request, prefix, 'request') options = webidl.converters.CacheQueryOptions(options, prefix, 'options') return this.#internalMatchAll(request, options) } async add (request) { webidl.brandCheck(this, Cache) const prefix = 'Cache.add' webidl.argumentLengthCheck(arguments, 1, prefix) request = webidl.converters.RequestInfo(request, prefix, 'request') // 1. const requests = [request] // 2. const responseArrayPromise = this.addAll(requests) // 3. return await responseArrayPromise } async addAll (requests) { webidl.brandCheck(this, Cache) const prefix = 'Cache.addAll' webidl.argumentLengthCheck(arguments, 1, prefix) // 1. const responsePromises = [] // 2. const requestList = [] // 3. for (let request of requests) { if (request === undefined) { throw webidl.errors.conversionFailed({ prefix, argument: 'Argument 1', types: ['undefined is not allowed'] }) } request = webidl.converters.RequestInfo(request) if (typeof request === 'string') { continue } // 3.1 const r = request[kState] // 3.2 if (!urlIsHttpHttpsScheme(r.url) || r.method !== 'GET') { throw webidl.errors.exception({ header: prefix, message: 'Expected http/s scheme when method is not GET.' }) } } // 4. /** @type {ReturnType<typeof fetching>[]} */ const fetchControllers = [] // 5. for (const request of requests) { // 5.1 const r = new Request(request)[kState] // 5.2 if (!urlIsHttpHttpsScheme(r.url)) { throw webidl.errors.exception({ header: prefix, message: 'Expected http/s scheme.' }) } // 5.4 r.initiator = 'fetch' r.destination = 'subresource' // 5.5 requestList.push(r) // 5.6 const responsePromise = createDeferredPromise() // 5.7 fetchControllers.push(fetching({ request: r, processResponse (response) { // 1. if (response.type === 'error' || response.status === 206 || response.status < 200 || response.status > 299) { responsePromise.reject(webidl.errors.exception({ header: 'Cache.addAll', message: 'Received an invalid status code or the request failed.' })) } else if (response.headersList.contains('vary')) { // 2. // 2.1 const fieldValues = getFieldValues(response.headersList.get('vary')) // 2.2 for (const fieldValue of fieldValues) { // 2.2.1 if (fieldValue === '*') { responsePromise.reject(webidl.errors.exception({ header: 'Cache.addAll', message: 'invalid vary field value' })) for (const controller of fetchControllers) { controller.abort() } return } } } }, processResponseEndOfBody (response) { // 1. if (response.aborted) { responsePromise.reject(new DOMException('aborted', 'AbortError')) return } // 2. responsePromise.resolve(response) } })) // 5.8 responsePromises.push(responsePromise.promise) } // 6. const p = Promise.all(responsePromises) // 7. const responses = await p // 7.1 const operations = [] // 7.2 let index = 0 // 7.3 for (const response of responses) { // 7.3.1 /** @type {CacheBatchOperation} */ const operation = { type: 'put', // 7.3.2 request: requestList[index], // 7.3.3 response // 7.3.4 } operations.push(operation) // 7.3.5 index++ // 7.3.6 } // 7.5 const cacheJobPromise = createDeferredPromise() // 7.6.1 let errorData = null // 7.6.2 try { this.#batchCacheOperations(operations) } catch (e) { errorData = e } // 7.6.3 queueMicrotask(() => { // 7.6.3.1 if (errorData === null) { cacheJobPromise.resolve(undefined) } else { // 7.6.3.2 cacheJobPromise.reject(errorData) } }) // 7.7 return cacheJobPromise.promise } async put (request, response) { webidl.brandCheck(this, Cache) const prefix = 'Cache.put' webidl.argumentLengthCheck(arguments, 2, prefix) request = webidl.converters.RequestInfo(request, prefix, 'request') response = webidl.converters.Response(response, prefix, 'response') // 1. let innerRequest = null // 2. if (request instanceof Request) { innerRequest = request[kState] } else { // 3. innerRequest = new Request(request)[kState] } // 4. if (!urlIsHttpHttpsScheme(innerRequest.url) || innerRequest.method !== 'GET') { throw webidl.errors.exception({ header: prefix, message: 'Expected an http/s scheme when method is not GET' }) } // 5. const innerResponse = response[kState] // 6. if (innerResponse.status === 206) { throw webidl.errors.exception({ header: prefix, message: 'Got 206 status' }) } // 7. if (innerResponse.headersList.contains('vary')) { // 7.1. const fieldValues = getFieldValues(innerResponse.headersList.get('vary')) // 7.2. for (const fieldValue of fieldValues) { // 7.2.1 if (fieldValue === '*') { throw webidl.errors.exception({ header: prefix, message: 'Got * vary field value' }) } } } // 8. if (innerResponse.body && (isDisturbed(innerResponse.body.stream) || innerResponse.body.stream.locked)) { throw webidl.errors.exception({ header: prefix, message: 'Response body is locked or disturbed' }) } // 9. const clonedResponse = cloneResponse(innerResponse) // 10. const bodyReadPromise = createDeferredPromise() // 11. if (innerResponse.body != null) { // 11.1 const stream = innerResponse.body.stream // 11.2 const reader = stream.getReader() // 11.3 readAllBytes(reader).then(bodyReadPromise.resolve, bodyReadPromise.reject) } else { bodyReadPromise.resolve(undefined) } // 12. /** @type {CacheBatchOperation[]} */ const operations = [] // 13. /** @type {CacheBatchOperation} */ const operation = { type: 'put', // 14. request: innerRequest, // 15. response: clonedResponse // 16. } // 17. operations.push(operation) // 19. const bytes = await bodyReadPromise.promise if (clonedResponse.body != null) { clonedResponse.body.source = bytes } // 19.1 const cacheJobPromise = createDeferredPromise() // 19.2.1 let errorData = null // 19.2.2 try { this.#batchCacheOperations(operations) } catch (e) { errorData = e } // 19.2.3 queueMicrotask(() => { // 19.2.3.1 if (errorData === null) { cacheJobPromise.resolve() } else { // 19.2.3.2 cacheJobPromise.reject(errorData) } }) return cacheJobPromise.promise } async delete (request, options = {}) { webidl.brandCheck(this, Cache) const prefix = 'Cache.delete' webidl.argumentLengthCheck(arguments, 1, prefix) request = webidl.converters.RequestInfo(request, prefix, 'request') options = webidl.converters.CacheQueryOptions(options, prefix, 'options') /** * @type {Request} */ let r = null if (request instanceof Request) { r = request[kState] if (r.method !== 'GET' && !options.ignoreMethod) { return false } } else { assert(typeof request === 'string') r = new Request(request)[kState] } /** @type {CacheBatchOperation[]} */ const operations = [] /** @type {CacheBatchOperation} */ const operation = { type: 'delete', request: r, options } operations.push(operation) const cacheJobPromise = createDeferredPromise() let errorData = null let requestResponses try { requestResponses = this.#batchCacheOperations(operations) } catch (e) { errorData = e } queueMicrotask(() => { if (errorData === null) { cacheJobPromise.resolve(!!requestResponses?.length) } else { cacheJobPromise.reject(errorData) } }) return cacheJobPromise.promise } /** * @see https://w3c.github.io/ServiceWorker/#dom-cache-keys * @param {any} request * @param {import('../../types/cache').CacheQueryOptions} options * @returns {Promise<readonly Request[]>} */ async keys (request = undefined, options = {}) { webidl.brandCheck(this, Cache) const prefix = 'Cache.keys' if (request !== undefined) request = webidl.converters.RequestInfo(request, prefix, 'request') options = webidl.converters.CacheQueryOptions(options, prefix, 'options') // 1. let r = null // 2. if (request !== undefined) { // 2.1 if (request instanceof Request) { // 2.1.1 r = request[kState] // 2.1.2 if (r.method !== 'GET' && !options.ignoreMethod) { return [] } } else if (typeof request === 'string') { // 2.2 r = new Request(request)[kState] } } // 4. const promise = createDeferredPromise() // 5. // 5.1 const requests = [] // 5.2 if (request === undefined) { // 5.2.1 for (const requestResponse of this.#relevantRequestResponseList) { // 5.2.1.1 requests.push(requestResponse[0]) } } else { // 5.3 // 5.3.1 const requestResponses = this.#queryCache(r, options) // 5.3.2 for (const requestResponse of requestResponses) { // 5.3.2.1 requests.push(requestResponse[0]) } } // 5.4 queueMicrotask(() => { // 5.4.1 const requestList = [] // 5.4.2 for (const request of requests) { const requestObject = fromInnerRequest( request, new AbortController().signal, 'immutable' ) // 5.4.2.1 requestList.push(requestObject) } // 5.4.3 promise.resolve(Object.freeze(requestList)) }) return promise.promise } /** * @see https://w3c.github.io/ServiceWorker/#batch-cache-operations-algorithm * @param {CacheBatchOperation[]} operations * @returns {requestResponseList} */ #batchCacheOperations (operations) { // 1. const cache = this.#relevantRequestResponseList // 2. const backupCache = [...cache] // 3. const addedItems = [] // 4.1 const resultList = [] try { // 4.2 for (const operation of operations) { // 4.2.1 if (operation.type !== 'delete' && operation.type !== 'put') { throw webidl.errors.exception({ header: 'Cache.#batchCacheOperations', message: 'operation type does not match "delete" or "put"' }) } // 4.2.2 if (operation.type === 'delete' && operation.response != null) { throw webidl.errors.exception({ header: 'Cache.#batchCacheOperations', message: 'delete operation should not have an associated response' }) } // 4.2.3 if (this.#queryCache(operation.request, operation.options, addedItems).length) { throw new DOMException('???', 'InvalidStateError') } // 4.2.4 let requestResponses // 4.2.5 if (operation.type === 'delete') { // 4.2.5.1 requestResponses = this.#queryCache(operation.request, operation.options) // TODO: the spec is wrong, this is needed to pass WPTs if (requestResponses.length === 0) { return [] } // 4.2.5.2 for (const requestResponse of requestResponses) { const idx = cache.indexOf(requestResponse) assert(idx !== -1) // 4.2.5.2.1 cache.splice(idx, 1) } } else if (operation.type === 'put') { // 4.2.6 // 4.2.6.1 if (operation.response == null) { throw webidl.errors.exception({ header: 'Cache.#batchCacheOperations', message: 'put operation should have an associated response' }) } // 4.2.6.2 const r = operation.request // 4.2.6.3 if (!urlIsHttpHttpsScheme(r.url)) { throw webidl.errors.exception({ header: 'Cache.#batchCacheOperations', message: 'expected http or https scheme' }) } // 4.2.6.4 if (r.method !== 'GET') { throw webidl.errors.exception({ header: 'Cache.#batchCacheOperations', message: 'not get method' }) } // 4.2.6.5 if (operation.options != null) { throw webidl.errors.exception({ header: 'Cache.#batchCacheOperations', message: 'options must not be defined' }) } // 4.2.6.6 requestResponses = this.#queryCache(operation.request) // 4.2.6.7 for (const requestResponse of requestResponses) { const idx = cache.indexOf(requestResponse) assert(idx !== -1) // 4.2.6.7.1 cache.splice(idx, 1) } // 4.2.6.8 cache.push([operation.request, operation.response]) // 4.2.6.10 addedItems.push([operation.request, operation.response]) } // 4.2.7 resultList.push([operation.request, operation.response]) } // 4.3 return resultList } catch (e) { // 5. // 5.1 this.#relevantRequestResponseList.length = 0 // 5.2 this.#relevantRequestResponseList = backupCache // 5.3 throw e } } /** * @see https://w3c.github.io/ServiceWorker/#query-cache * @param {any} requestQuery * @param {import('../../types/cache').CacheQueryOptions} options * @param {requestResponseList} targetStorage * @returns {requestResponseList} */ #queryCache (requestQuery, options, targetStorage) { /** @type {requestResponseList} */ const resultList = [] const storage = targetStorage ?? this.#relevantRequestResponseList for (const requestResponse of storage) { const [cachedRequest, cachedResponse] = requestResponse if (this.#requestMatchesCachedItem(requestQuery, cachedRequest, cachedResponse, options)) { resultList.push(requestResponse) } } return resultList } /** * @see https://w3c.github.io/ServiceWorker/#request-matches-cached-item-algorithm * @param {any} requestQuery * @param {any} request * @param {any | null} response * @param {import('../../types/cache').CacheQueryOptions | undefined} options * @returns {boolean} */ #requestMatchesCachedItem (requestQuery, request, response = null, options) { // if (options?.ignoreMethod === false && request.method === 'GET') { // return false // } const queryURL = new URL(requestQuery.url) const cachedURL = new URL(request.url) if (options?.ignoreSearch) { cachedURL.search = '' queryURL.search = '' } if (!urlEquals(queryURL, cachedURL, true)) { return false } if ( response == null || options?.ignoreVary || !response.headersList.contains('vary') ) { return true } const fieldValues = getFieldValues(response.headersList.get('vary')) for (const fieldValue of fieldValues) { if (fieldValue === '*') { return false } const requestValue = request.headersList.get(fieldValue) const queryValue = requestQuery.headersList.get(fieldValue) // If one has the header and the other doesn't, or one has // a different value than the other, return false if (requestValue !== queryValue) { return false } } return true } #internalMatchAll (request, options, maxResponses = Infinity) { // 1. let r = null // 2. if (request !== undefined) { if (request instanceof Request) { // 2.1.1 r = request[kState] // 2.1.2 if (r.method !== 'GET' && !options.ignoreMethod) { return [] } } else if (typeof request === 'string') { // 2.2.1 r = new Request(request)[kState] } } // 5. // 5.1 const responses = [] // 5.2 if (request === undefined) { // 5.2.1 for (const requestResponse of this.#relevantRequestResponseList) { responses.push(requestResponse[1]) } } else { // 5.3 // 5.3.1 const requestResponses = this.#queryCache(r, options) // 5.3.2 for (const requestResponse of requestResponses) { responses.push(requestResponse[1]) } } // 5.4 // We don't implement CORs so we don't need to loop over the responses, yay! // 5.5.1 const responseList = [] // 5.5.2 for (const response of responses) { // 5.5.2.1 const responseObject = fromInnerResponse(response, 'immutable') responseList.push(responseObject.clone()) if (responseList.length >= maxResponses) { break } } // 6. return Object.freeze(responseList) } } Object.defineProperties(Cache.prototype, { [Symbol.toStringTag]: { value: 'Cache', configurable: true }, match: kEnumerableProperty, matchAll: kEnumerableProperty, add: kEnumerableProperty, addAll: kEnumerableProperty, put: kEnumerableProperty, delete: kEnumerableProperty, keys: kEnumerableProperty }) const cacheQueryOptionConverters = [ { key: 'ignoreSearch', converter: webidl.converters.boolean, defaultValue: () => false }, { key: 'ignoreMethod', converter: webidl.converters.boolean, defaultValue: () => false }, { key: 'ignoreVary', converter: webidl.converters.boolean, defaultValue: () => false } ] webidl.converters.CacheQueryOptions = webidl.dictionaryConverter(cacheQueryOptionConverters) webidl.converters.MultiCacheQueryOptions = webidl.dictionaryConverter([ ...cacheQueryOptionConverters, { key: 'cacheName', converter: webidl.converters.DOMString } ]) webidl.converters.Response = webidl.interfaceConverter(Response) webidl.converters['sequence<RequestInfo>'] = webidl.sequenceConverter( webidl.converters.RequestInfo ) module.exports = { Cache } node_modules/undici/lib/web/cache/symbols.js 0000664 00000000132 15114741631 0015111 0 ustar 00 'use strict' module.exports = { kConstruct: require('../../core/symbols').kConstruct } node_modules/undici/lib/web/cache/cachestorage.js 0000664 00000007117 15114741631 0016063 0 ustar 00 'use strict' const { kConstruct } = require('./symbols') const { Cache } = require('./cache') const { webidl } = require('../fetch/webidl') const { kEnumerableProperty } = require('../../core/util') class CacheStorage { /** * @see https://w3c.github.io/ServiceWorker/#dfn-relevant-name-to-cache-map * @type {Map<string, import('./cache').requestResponseList} */ #caches = new Map() constructor () { if (arguments[0] !== kConstruct) { webidl.illegalConstructor() } webidl.util.markAsUncloneable(this) } async match (request, options = {}) { webidl.brandCheck(this, CacheStorage) webidl.argumentLengthCheck(arguments, 1, 'CacheStorage.match') request = webidl.converters.RequestInfo(request) options = webidl.converters.MultiCacheQueryOptions(options) // 1. if (options.cacheName != null) { // 1.1.1.1 if (this.#caches.has(options.cacheName)) { // 1.1.1.1.1 const cacheList = this.#caches.get(options.cacheName) const cache = new Cache(kConstruct, cacheList) return await cache.match(request, options) } } else { // 2. // 2.2 for (const cacheList of this.#caches.values()) { const cache = new Cache(kConstruct, cacheList) // 2.2.1.2 const response = await cache.match(request, options) if (response !== undefined) { return response } } } } /** * @see https://w3c.github.io/ServiceWorker/#cache-storage-has * @param {string} cacheName * @returns {Promise<boolean>} */ async has (cacheName) { webidl.brandCheck(this, CacheStorage) const prefix = 'CacheStorage.has' webidl.argumentLengthCheck(arguments, 1, prefix) cacheName = webidl.converters.DOMString(cacheName, prefix, 'cacheName') // 2.1.1 // 2.2 return this.#caches.has(cacheName) } /** * @see https://w3c.github.io/ServiceWorker/#dom-cachestorage-open * @param {string} cacheName * @returns {Promise<Cache>} */ async open (cacheName) { webidl.brandCheck(this, CacheStorage) const prefix = 'CacheStorage.open' webidl.argumentLengthCheck(arguments, 1, prefix) cacheName = webidl.converters.DOMString(cacheName, prefix, 'cacheName') // 2.1 if (this.#caches.has(cacheName)) { // await caches.open('v1') !== await caches.open('v1') // 2.1.1 const cache = this.#caches.get(cacheName) // 2.1.1.1 return new Cache(kConstruct, cache) } // 2.2 const cache = [] // 2.3 this.#caches.set(cacheName, cache) // 2.4 return new Cache(kConstruct, cache) } /** * @see https://w3c.github.io/ServiceWorker/#cache-storage-delete * @param {string} cacheName * @returns {Promise<boolean>} */ async delete (cacheName) { webidl.brandCheck(this, CacheStorage) const prefix = 'CacheStorage.delete' webidl.argumentLengthCheck(arguments, 1, prefix) cacheName = webidl.converters.DOMString(cacheName, prefix, 'cacheName') return this.#caches.delete(cacheName) } /** * @see https://w3c.github.io/ServiceWorker/#cache-storage-keys * @returns {Promise<string[]>} */ async keys () { webidl.brandCheck(this, CacheStorage) // 2.1 const keys = this.#caches.keys() // 2.2 return [...keys] } } Object.defineProperties(CacheStorage.prototype, { [Symbol.toStringTag]: { value: 'CacheStorage', configurable: true }, match: kEnumerableProperty, has: kEnumerableProperty, open: kEnumerableProperty, delete: kEnumerableProperty, keys: kEnumerableProperty }) module.exports = { CacheStorage } node_modules/undici/lib/web/cache/util.js 0000664 00000001774 15114741631 0014413 0 ustar 00 'use strict' const assert = require('node:assert') const { URLSerializer } = require('../fetch/data-url') const { isValidHeaderName } = require('../fetch/util') /** * @see https://url.spec.whatwg.org/#concept-url-equals * @param {URL} A * @param {URL} B * @param {boolean | undefined} excludeFragment * @returns {boolean} */ function urlEquals (A, B, excludeFragment = false) { const serializedA = URLSerializer(A, excludeFragment) const serializedB = URLSerializer(B, excludeFragment) return serializedA === serializedB } /** * @see https://github.com/chromium/chromium/blob/694d20d134cb553d8d89e5500b9148012b1ba299/content/browser/cache_storage/cache_storage_cache.cc#L260-L262 * @param {string} header */ function getFieldValues (header) { assert(header !== null) const values = [] for (let value of header.split(',')) { value = value.trim() if (isValidHeaderName(value)) { values.push(value) } } return values } module.exports = { urlEquals, getFieldValues } node_modules/undici/lib/web/fetch/webidl.js 0000664 00000050133 15114741631 0014723 0 ustar 00 'use strict' const { types, inspect } = require('node:util') const { markAsUncloneable } = require('node:worker_threads') const { toUSVString } = require('../../core/util') /** @type {import('../../../types/webidl').Webidl} */ const webidl = {} webidl.converters = {} webidl.util = {} webidl.errors = {} webidl.errors.exception = function (message) { return new TypeError(`${message.header}: ${message.message}`) } webidl.errors.conversionFailed = function (context) { const plural = context.types.length === 1 ? '' : ' one of' const message = `${context.argument} could not be converted to` + `${plural}: ${context.types.join(', ')}.` return webidl.errors.exception({ header: context.prefix, message }) } webidl.errors.invalidArgument = function (context) { return webidl.errors.exception({ header: context.prefix, message: `"${context.value}" is an invalid ${context.type}.` }) } // https://webidl.spec.whatwg.org/#implements webidl.brandCheck = function (V, I, opts) { if (opts?.strict !== false) { if (!(V instanceof I)) { const err = new TypeError('Illegal invocation') err.code = 'ERR_INVALID_THIS' // node compat. throw err } } else { if (V?.[Symbol.toStringTag] !== I.prototype[Symbol.toStringTag]) { const err = new TypeError('Illegal invocation') err.code = 'ERR_INVALID_THIS' // node compat. throw err } } } webidl.argumentLengthCheck = function ({ length }, min, ctx) { if (length < min) { throw webidl.errors.exception({ message: `${min} argument${min !== 1 ? 's' : ''} required, ` + `but${length ? ' only' : ''} ${length} found.`, header: ctx }) } } webidl.illegalConstructor = function () { throw webidl.errors.exception({ header: 'TypeError', message: 'Illegal constructor' }) } // https://tc39.es/ecma262/#sec-ecmascript-data-types-and-values webidl.util.Type = function (V) { switch (typeof V) { case 'undefined': return 'Undefined' case 'boolean': return 'Boolean' case 'string': return 'String' case 'symbol': return 'Symbol' case 'number': return 'Number' case 'bigint': return 'BigInt' case 'function': case 'object': { if (V === null) { return 'Null' } return 'Object' } } } webidl.util.markAsUncloneable = markAsUncloneable || (() => {}) // https://webidl.spec.whatwg.org/#abstract-opdef-converttoint webidl.util.ConvertToInt = function (V, bitLength, signedness, opts) { let upperBound let lowerBound // 1. If bitLength is 64, then: if (bitLength === 64) { // 1. Let upperBound be 2^53 − 1. upperBound = Math.pow(2, 53) - 1 // 2. If signedness is "unsigned", then let lowerBound be 0. if (signedness === 'unsigned') { lowerBound = 0 } else { // 3. Otherwise let lowerBound be −2^53 + 1. lowerBound = Math.pow(-2, 53) + 1 } } else if (signedness === 'unsigned') { // 2. Otherwise, if signedness is "unsigned", then: // 1. Let lowerBound be 0. lowerBound = 0 // 2. Let upperBound be 2^bitLength − 1. upperBound = Math.pow(2, bitLength) - 1 } else { // 3. Otherwise: // 1. Let lowerBound be -2^bitLength − 1. lowerBound = Math.pow(-2, bitLength) - 1 // 2. Let upperBound be 2^bitLength − 1 − 1. upperBound = Math.pow(2, bitLength - 1) - 1 } // 4. Let x be ? ToNumber(V). let x = Number(V) // 5. If x is −0, then set x to +0. if (x === 0) { x = 0 } // 6. If the conversion is to an IDL type associated // with the [EnforceRange] extended attribute, then: if (opts?.enforceRange === true) { // 1. If x is NaN, +∞, or −∞, then throw a TypeError. if ( Number.isNaN(x) || x === Number.POSITIVE_INFINITY || x === Number.NEGATIVE_INFINITY ) { throw webidl.errors.exception({ header: 'Integer conversion', message: `Could not convert ${webidl.util.Stringify(V)} to an integer.` }) } // 2. Set x to IntegerPart(x). x = webidl.util.IntegerPart(x) // 3. If x < lowerBound or x > upperBound, then // throw a TypeError. if (x < lowerBound || x > upperBound) { throw webidl.errors.exception({ header: 'Integer conversion', message: `Value must be between ${lowerBound}-${upperBound}, got ${x}.` }) } // 4. Return x. return x } // 7. If x is not NaN and the conversion is to an IDL // type associated with the [Clamp] extended // attribute, then: if (!Number.isNaN(x) && opts?.clamp === true) { // 1. Set x to min(max(x, lowerBound), upperBound). x = Math.min(Math.max(x, lowerBound), upperBound) // 2. Round x to the nearest integer, choosing the // even integer if it lies halfway between two, // and choosing +0 rather than −0. if (Math.floor(x) % 2 === 0) { x = Math.floor(x) } else { x = Math.ceil(x) } // 3. Return x. return x } // 8. If x is NaN, +0, +∞, or −∞, then return +0. if ( Number.isNaN(x) || (x === 0 && Object.is(0, x)) || x === Number.POSITIVE_INFINITY || x === Number.NEGATIVE_INFINITY ) { return 0 } // 9. Set x to IntegerPart(x). x = webidl.util.IntegerPart(x) // 10. Set x to x modulo 2^bitLength. x = x % Math.pow(2, bitLength) // 11. If signedness is "signed" and x ≥ 2^bitLength − 1, // then return x − 2^bitLength. if (signedness === 'signed' && x >= Math.pow(2, bitLength) - 1) { return x - Math.pow(2, bitLength) } // 12. Otherwise, return x. return x } // https://webidl.spec.whatwg.org/#abstract-opdef-integerpart webidl.util.IntegerPart = function (n) { // 1. Let r be floor(abs(n)). const r = Math.floor(Math.abs(n)) // 2. If n < 0, then return -1 × r. if (n < 0) { return -1 * r } // 3. Otherwise, return r. return r } webidl.util.Stringify = function (V) { const type = webidl.util.Type(V) switch (type) { case 'Symbol': return `Symbol(${V.description})` case 'Object': return inspect(V) case 'String': return `"${V}"` default: return `${V}` } } // https://webidl.spec.whatwg.org/#es-sequence webidl.sequenceConverter = function (converter) { return (V, prefix, argument, Iterable) => { // 1. If Type(V) is not Object, throw a TypeError. if (webidl.util.Type(V) !== 'Object') { throw webidl.errors.exception({ header: prefix, message: `${argument} (${webidl.util.Stringify(V)}) is not iterable.` }) } // 2. Let method be ? GetMethod(V, @@iterator). /** @type {Generator} */ const method = typeof Iterable === 'function' ? Iterable() : V?.[Symbol.iterator]?.() const seq = [] let index = 0 // 3. If method is undefined, throw a TypeError. if ( method === undefined || typeof method.next !== 'function' ) { throw webidl.errors.exception({ header: prefix, message: `${argument} is not iterable.` }) } // https://webidl.spec.whatwg.org/#create-sequence-from-iterable while (true) { const { done, value } = method.next() if (done) { break } seq.push(converter(value, prefix, `${argument}[${index++}]`)) } return seq } } // https://webidl.spec.whatwg.org/#es-to-record webidl.recordConverter = function (keyConverter, valueConverter) { return (O, prefix, argument) => { // 1. If Type(O) is not Object, throw a TypeError. if (webidl.util.Type(O) !== 'Object') { throw webidl.errors.exception({ header: prefix, message: `${argument} ("${webidl.util.Type(O)}") is not an Object.` }) } // 2. Let result be a new empty instance of record<K, V>. const result = {} if (!types.isProxy(O)) { // 1. Let desc be ? O.[[GetOwnProperty]](key). const keys = [...Object.getOwnPropertyNames(O), ...Object.getOwnPropertySymbols(O)] for (const key of keys) { // 1. Let typedKey be key converted to an IDL value of type K. const typedKey = keyConverter(key, prefix, argument) // 2. Let value be ? Get(O, key). // 3. Let typedValue be value converted to an IDL value of type V. const typedValue = valueConverter(O[key], prefix, argument) // 4. Set result[typedKey] to typedValue. result[typedKey] = typedValue } // 5. Return result. return result } // 3. Let keys be ? O.[[OwnPropertyKeys]](). const keys = Reflect.ownKeys(O) // 4. For each key of keys. for (const key of keys) { // 1. Let desc be ? O.[[GetOwnProperty]](key). const desc = Reflect.getOwnPropertyDescriptor(O, key) // 2. If desc is not undefined and desc.[[Enumerable]] is true: if (desc?.enumerable) { // 1. Let typedKey be key converted to an IDL value of type K. const typedKey = keyConverter(key, prefix, argument) // 2. Let value be ? Get(O, key). // 3. Let typedValue be value converted to an IDL value of type V. const typedValue = valueConverter(O[key], prefix, argument) // 4. Set result[typedKey] to typedValue. result[typedKey] = typedValue } } // 5. Return result. return result } } webidl.interfaceConverter = function (i) { return (V, prefix, argument, opts) => { if (opts?.strict !== false && !(V instanceof i)) { throw webidl.errors.exception({ header: prefix, message: `Expected ${argument} ("${webidl.util.Stringify(V)}") to be an instance of ${i.name}.` }) } return V } } webidl.dictionaryConverter = function (converters) { return (dictionary, prefix, argument) => { const type = webidl.util.Type(dictionary) const dict = {} if (type === 'Null' || type === 'Undefined') { return dict } else if (type !== 'Object') { throw webidl.errors.exception({ header: prefix, message: `Expected ${dictionary} to be one of: Null, Undefined, Object.` }) } for (const options of converters) { const { key, defaultValue, required, converter } = options if (required === true) { if (!Object.hasOwn(dictionary, key)) { throw webidl.errors.exception({ header: prefix, message: `Missing required key "${key}".` }) } } let value = dictionary[key] const hasDefault = Object.hasOwn(options, 'defaultValue') // Only use defaultValue if value is undefined and // a defaultValue options was provided. if (hasDefault && value !== null) { value ??= defaultValue() } // A key can be optional and have no default value. // When this happens, do not perform a conversion, // and do not assign the key a value. if (required || hasDefault || value !== undefined) { value = converter(value, prefix, `${argument}.${key}`) if ( options.allowedValues && !options.allowedValues.includes(value) ) { throw webidl.errors.exception({ header: prefix, message: `${value} is not an accepted type. Expected one of ${options.allowedValues.join(', ')}.` }) } dict[key] = value } } return dict } } webidl.nullableConverter = function (converter) { return (V, prefix, argument) => { if (V === null) { return V } return converter(V, prefix, argument) } } // https://webidl.spec.whatwg.org/#es-DOMString webidl.converters.DOMString = function (V, prefix, argument, opts) { // 1. If V is null and the conversion is to an IDL type // associated with the [LegacyNullToEmptyString] // extended attribute, then return the DOMString value // that represents the empty string. if (V === null && opts?.legacyNullToEmptyString) { return '' } // 2. Let x be ? ToString(V). if (typeof V === 'symbol') { throw webidl.errors.exception({ header: prefix, message: `${argument} is a symbol, which cannot be converted to a DOMString.` }) } // 3. Return the IDL DOMString value that represents the // same sequence of code units as the one the // ECMAScript String value x represents. return String(V) } // https://webidl.spec.whatwg.org/#es-ByteString webidl.converters.ByteString = function (V, prefix, argument) { // 1. Let x be ? ToString(V). // Note: DOMString converter perform ? ToString(V) const x = webidl.converters.DOMString(V, prefix, argument) // 2. If the value of any element of x is greater than // 255, then throw a TypeError. for (let index = 0; index < x.length; index++) { if (x.charCodeAt(index) > 255) { throw new TypeError( 'Cannot convert argument to a ByteString because the character at ' + `index ${index} has a value of ${x.charCodeAt(index)} which is greater than 255.` ) } } // 3. Return an IDL ByteString value whose length is the // length of x, and where the value of each element is // the value of the corresponding element of x. return x } // https://webidl.spec.whatwg.org/#es-USVString // TODO: rewrite this so we can control the errors thrown webidl.converters.USVString = toUSVString // https://webidl.spec.whatwg.org/#es-boolean webidl.converters.boolean = function (V) { // 1. Let x be the result of computing ToBoolean(V). const x = Boolean(V) // 2. Return the IDL boolean value that is the one that represents // the same truth value as the ECMAScript Boolean value x. return x } // https://webidl.spec.whatwg.org/#es-any webidl.converters.any = function (V) { return V } // https://webidl.spec.whatwg.org/#es-long-long webidl.converters['long long'] = function (V, prefix, argument) { // 1. Let x be ? ConvertToInt(V, 64, "signed"). const x = webidl.util.ConvertToInt(V, 64, 'signed', undefined, prefix, argument) // 2. Return the IDL long long value that represents // the same numeric value as x. return x } // https://webidl.spec.whatwg.org/#es-unsigned-long-long webidl.converters['unsigned long long'] = function (V, prefix, argument) { // 1. Let x be ? ConvertToInt(V, 64, "unsigned"). const x = webidl.util.ConvertToInt(V, 64, 'unsigned', undefined, prefix, argument) // 2. Return the IDL unsigned long long value that // represents the same numeric value as x. return x } // https://webidl.spec.whatwg.org/#es-unsigned-long webidl.converters['unsigned long'] = function (V, prefix, argument) { // 1. Let x be ? ConvertToInt(V, 32, "unsigned"). const x = webidl.util.ConvertToInt(V, 32, 'unsigned', undefined, prefix, argument) // 2. Return the IDL unsigned long value that // represents the same numeric value as x. return x } // https://webidl.spec.whatwg.org/#es-unsigned-short webidl.converters['unsigned short'] = function (V, prefix, argument, opts) { // 1. Let x be ? ConvertToInt(V, 16, "unsigned"). const x = webidl.util.ConvertToInt(V, 16, 'unsigned', opts, prefix, argument) // 2. Return the IDL unsigned short value that represents // the same numeric value as x. return x } // https://webidl.spec.whatwg.org/#idl-ArrayBuffer webidl.converters.ArrayBuffer = function (V, prefix, argument, opts) { // 1. If Type(V) is not Object, or V does not have an // [[ArrayBufferData]] internal slot, then throw a // TypeError. // see: https://tc39.es/ecma262/#sec-properties-of-the-arraybuffer-instances // see: https://tc39.es/ecma262/#sec-properties-of-the-sharedarraybuffer-instances if ( webidl.util.Type(V) !== 'Object' || !types.isAnyArrayBuffer(V) ) { throw webidl.errors.conversionFailed({ prefix, argument: `${argument} ("${webidl.util.Stringify(V)}")`, types: ['ArrayBuffer'] }) } // 2. If the conversion is not to an IDL type associated // with the [AllowShared] extended attribute, and // IsSharedArrayBuffer(V) is true, then throw a // TypeError. if (opts?.allowShared === false && types.isSharedArrayBuffer(V)) { throw webidl.errors.exception({ header: 'ArrayBuffer', message: 'SharedArrayBuffer is not allowed.' }) } // 3. If the conversion is not to an IDL type associated // with the [AllowResizable] extended attribute, and // IsResizableArrayBuffer(V) is true, then throw a // TypeError. if (V.resizable || V.growable) { throw webidl.errors.exception({ header: 'ArrayBuffer', message: 'Received a resizable ArrayBuffer.' }) } // 4. Return the IDL ArrayBuffer value that is a // reference to the same object as V. return V } webidl.converters.TypedArray = function (V, T, prefix, name, opts) { // 1. Let T be the IDL type V is being converted to. // 2. If Type(V) is not Object, or V does not have a // [[TypedArrayName]] internal slot with a value // equal to T’s name, then throw a TypeError. if ( webidl.util.Type(V) !== 'Object' || !types.isTypedArray(V) || V.constructor.name !== T.name ) { throw webidl.errors.conversionFailed({ prefix, argument: `${name} ("${webidl.util.Stringify(V)}")`, types: [T.name] }) } // 3. If the conversion is not to an IDL type associated // with the [AllowShared] extended attribute, and // IsSharedArrayBuffer(V.[[ViewedArrayBuffer]]) is // true, then throw a TypeError. if (opts?.allowShared === false && types.isSharedArrayBuffer(V.buffer)) { throw webidl.errors.exception({ header: 'ArrayBuffer', message: 'SharedArrayBuffer is not allowed.' }) } // 4. If the conversion is not to an IDL type associated // with the [AllowResizable] extended attribute, and // IsResizableArrayBuffer(V.[[ViewedArrayBuffer]]) is // true, then throw a TypeError. if (V.buffer.resizable || V.buffer.growable) { throw webidl.errors.exception({ header: 'ArrayBuffer', message: 'Received a resizable ArrayBuffer.' }) } // 5. Return the IDL value of type T that is a reference // to the same object as V. return V } webidl.converters.DataView = function (V, prefix, name, opts) { // 1. If Type(V) is not Object, or V does not have a // [[DataView]] internal slot, then throw a TypeError. if (webidl.util.Type(V) !== 'Object' || !types.isDataView(V)) { throw webidl.errors.exception({ header: prefix, message: `${name} is not a DataView.` }) } // 2. If the conversion is not to an IDL type associated // with the [AllowShared] extended attribute, and // IsSharedArrayBuffer(V.[[ViewedArrayBuffer]]) is true, // then throw a TypeError. if (opts?.allowShared === false && types.isSharedArrayBuffer(V.buffer)) { throw webidl.errors.exception({ header: 'ArrayBuffer', message: 'SharedArrayBuffer is not allowed.' }) } // 3. If the conversion is not to an IDL type associated // with the [AllowResizable] extended attribute, and // IsResizableArrayBuffer(V.[[ViewedArrayBuffer]]) is // true, then throw a TypeError. if (V.buffer.resizable || V.buffer.growable) { throw webidl.errors.exception({ header: 'ArrayBuffer', message: 'Received a resizable ArrayBuffer.' }) } // 4. Return the IDL DataView value that is a reference // to the same object as V. return V } // https://webidl.spec.whatwg.org/#BufferSource webidl.converters.BufferSource = function (V, prefix, name, opts) { if (types.isAnyArrayBuffer(V)) { return webidl.converters.ArrayBuffer(V, prefix, name, { ...opts, allowShared: false }) } if (types.isTypedArray(V)) { return webidl.converters.TypedArray(V, V.constructor, prefix, name, { ...opts, allowShared: false }) } if (types.isDataView(V)) { return webidl.converters.DataView(V, prefix, name, { ...opts, allowShared: false }) } throw webidl.errors.conversionFailed({ prefix, argument: `${name} ("${webidl.util.Stringify(V)}")`, types: ['BufferSource'] }) } webidl.converters['sequence<ByteString>'] = webidl.sequenceConverter( webidl.converters.ByteString ) webidl.converters['sequence<sequence<ByteString>>'] = webidl.sequenceConverter( webidl.converters['sequence<ByteString>'] ) webidl.converters['record<ByteString, ByteString>'] = webidl.recordConverter( webidl.converters.ByteString, webidl.converters.ByteString ) module.exports = { webidl } node_modules/undici/lib/web/fetch/headers.js 0000664 00000050173 15114741631 0015074 0 ustar 00 // https://github.com/Ethan-Arrowood/undici-fetch 'use strict' const { kConstruct } = require('../../core/symbols') const { kEnumerableProperty } = require('../../core/util') const { iteratorMixin, isValidHeaderName, isValidHeaderValue } = require('./util') const { webidl } = require('./webidl') const assert = require('node:assert') const util = require('node:util') const kHeadersMap = Symbol('headers map') const kHeadersSortedMap = Symbol('headers map sorted') /** * @param {number} code */ function isHTTPWhiteSpaceCharCode (code) { return code === 0x00a || code === 0x00d || code === 0x009 || code === 0x020 } /** * @see https://fetch.spec.whatwg.org/#concept-header-value-normalize * @param {string} potentialValue */ function headerValueNormalize (potentialValue) { // To normalize a byte sequence potentialValue, remove // any leading and trailing HTTP whitespace bytes from // potentialValue. let i = 0; let j = potentialValue.length while (j > i && isHTTPWhiteSpaceCharCode(potentialValue.charCodeAt(j - 1))) --j while (j > i && isHTTPWhiteSpaceCharCode(potentialValue.charCodeAt(i))) ++i return i === 0 && j === potentialValue.length ? potentialValue : potentialValue.substring(i, j) } function fill (headers, object) { // To fill a Headers object headers with a given object object, run these steps: // 1. If object is a sequence, then for each header in object: // Note: webidl conversion to array has already been done. if (Array.isArray(object)) { for (let i = 0; i < object.length; ++i) { const header = object[i] // 1. If header does not contain exactly two items, then throw a TypeError. if (header.length !== 2) { throw webidl.errors.exception({ header: 'Headers constructor', message: `expected name/value pair to be length 2, found ${header.length}.` }) } // 2. Append (header’s first item, header’s second item) to headers. appendHeader(headers, header[0], header[1]) } } else if (typeof object === 'object' && object !== null) { // Note: null should throw // 2. Otherwise, object is a record, then for each key → value in object, // append (key, value) to headers const keys = Object.keys(object) for (let i = 0; i < keys.length; ++i) { appendHeader(headers, keys[i], object[keys[i]]) } } else { throw webidl.errors.conversionFailed({ prefix: 'Headers constructor', argument: 'Argument 1', types: ['sequence<sequence<ByteString>>', 'record<ByteString, ByteString>'] }) } } /** * @see https://fetch.spec.whatwg.org/#concept-headers-append */ function appendHeader (headers, name, value) { // 1. Normalize value. value = headerValueNormalize(value) // 2. If name is not a header name or value is not a // header value, then throw a TypeError. if (!isValidHeaderName(name)) { throw webidl.errors.invalidArgument({ prefix: 'Headers.append', value: name, type: 'header name' }) } else if (!isValidHeaderValue(value)) { throw webidl.errors.invalidArgument({ prefix: 'Headers.append', value, type: 'header value' }) } // 3. If headers’s guard is "immutable", then throw a TypeError. // 4. Otherwise, if headers’s guard is "request" and name is a // forbidden header name, return. // 5. Otherwise, if headers’s guard is "request-no-cors": // TODO // Note: undici does not implement forbidden header names if (getHeadersGuard(headers) === 'immutable') { throw new TypeError('immutable') } // 6. Otherwise, if headers’s guard is "response" and name is a // forbidden response-header name, return. // 7. Append (name, value) to headers’s header list. return getHeadersList(headers).append(name, value, false) // 8. If headers’s guard is "request-no-cors", then remove // privileged no-CORS request headers from headers } function compareHeaderName (a, b) { return a[0] < b[0] ? -1 : 1 } class HeadersList { /** @type {[string, string][]|null} */ cookies = null constructor (init) { if (init instanceof HeadersList) { this[kHeadersMap] = new Map(init[kHeadersMap]) this[kHeadersSortedMap] = init[kHeadersSortedMap] this.cookies = init.cookies === null ? null : [...init.cookies] } else { this[kHeadersMap] = new Map(init) this[kHeadersSortedMap] = null } } /** * @see https://fetch.spec.whatwg.org/#header-list-contains * @param {string} name * @param {boolean} isLowerCase */ contains (name, isLowerCase) { // A header list list contains a header name name if list // contains a header whose name is a byte-case-insensitive // match for name. return this[kHeadersMap].has(isLowerCase ? name : name.toLowerCase()) } clear () { this[kHeadersMap].clear() this[kHeadersSortedMap] = null this.cookies = null } /** * @see https://fetch.spec.whatwg.org/#concept-header-list-append * @param {string} name * @param {string} value * @param {boolean} isLowerCase */ append (name, value, isLowerCase) { this[kHeadersSortedMap] = null // 1. If list contains name, then set name to the first such // header’s name. const lowercaseName = isLowerCase ? name : name.toLowerCase() const exists = this[kHeadersMap].get(lowercaseName) // 2. Append (name, value) to list. if (exists) { const delimiter = lowercaseName === 'cookie' ? '; ' : ', ' this[kHeadersMap].set(lowercaseName, { name: exists.name, value: `${exists.value}${delimiter}${value}` }) } else { this[kHeadersMap].set(lowercaseName, { name, value }) } if (lowercaseName === 'set-cookie') { (this.cookies ??= []).push(value) } } /** * @see https://fetch.spec.whatwg.org/#concept-header-list-set * @param {string} name * @param {string} value * @param {boolean} isLowerCase */ set (name, value, isLowerCase) { this[kHeadersSortedMap] = null const lowercaseName = isLowerCase ? name : name.toLowerCase() if (lowercaseName === 'set-cookie') { this.cookies = [value] } // 1. If list contains name, then set the value of // the first such header to value and remove the // others. // 2. Otherwise, append header (name, value) to list. this[kHeadersMap].set(lowercaseName, { name, value }) } /** * @see https://fetch.spec.whatwg.org/#concept-header-list-delete * @param {string} name * @param {boolean} isLowerCase */ delete (name, isLowerCase) { this[kHeadersSortedMap] = null if (!isLowerCase) name = name.toLowerCase() if (name === 'set-cookie') { this.cookies = null } this[kHeadersMap].delete(name) } /** * @see https://fetch.spec.whatwg.org/#concept-header-list-get * @param {string} name * @param {boolean} isLowerCase * @returns {string | null} */ get (name, isLowerCase) { // 1. If list does not contain name, then return null. // 2. Return the values of all headers in list whose name // is a byte-case-insensitive match for name, // separated from each other by 0x2C 0x20, in order. return this[kHeadersMap].get(isLowerCase ? name : name.toLowerCase())?.value ?? null } * [Symbol.iterator] () { // use the lowercased name for (const { 0: name, 1: { value } } of this[kHeadersMap]) { yield [name, value] } } get entries () { const headers = {} if (this[kHeadersMap].size !== 0) { for (const { name, value } of this[kHeadersMap].values()) { headers[name] = value } } return headers } rawValues () { return this[kHeadersMap].values() } get entriesList () { const headers = [] if (this[kHeadersMap].size !== 0) { for (const { 0: lowerName, 1: { name, value } } of this[kHeadersMap]) { if (lowerName === 'set-cookie') { for (const cookie of this.cookies) { headers.push([name, cookie]) } } else { headers.push([name, value]) } } } return headers } // https://fetch.spec.whatwg.org/#convert-header-names-to-a-sorted-lowercase-set toSortedArray () { const size = this[kHeadersMap].size const array = new Array(size) // In most cases, you will use the fast-path. // fast-path: Use binary insertion sort for small arrays. if (size <= 32) { if (size === 0) { // If empty, it is an empty array. To avoid the first index assignment. return array } // Improve performance by unrolling loop and avoiding double-loop. // Double-loop-less version of the binary insertion sort. const iterator = this[kHeadersMap][Symbol.iterator]() const firstValue = iterator.next().value // set [name, value] to first index. array[0] = [firstValue[0], firstValue[1].value] // https://fetch.spec.whatwg.org/#concept-header-list-sort-and-combine // 3.2.2. Assert: value is non-null. assert(firstValue[1].value !== null) for ( let i = 1, j = 0, right = 0, left = 0, pivot = 0, x, value; i < size; ++i ) { // get next value value = iterator.next().value // set [name, value] to current index. x = array[i] = [value[0], value[1].value] // https://fetch.spec.whatwg.org/#concept-header-list-sort-and-combine // 3.2.2. Assert: value is non-null. assert(x[1] !== null) left = 0 right = i // binary search while (left < right) { // middle index pivot = left + ((right - left) >> 1) // compare header name if (array[pivot][0] <= x[0]) { left = pivot + 1 } else { right = pivot } } if (i !== pivot) { j = i while (j > left) { array[j] = array[--j] } array[left] = x } } /* c8 ignore next 4 */ if (!iterator.next().done) { // This is for debugging and will never be called. throw new TypeError('Unreachable') } return array } else { // This case would be a rare occurrence. // slow-path: fallback let i = 0 for (const { 0: name, 1: { value } } of this[kHeadersMap]) { array[i++] = [name, value] // https://fetch.spec.whatwg.org/#concept-header-list-sort-and-combine // 3.2.2. Assert: value is non-null. assert(value !== null) } return array.sort(compareHeaderName) } } } // https://fetch.spec.whatwg.org/#headers-class class Headers { #guard #headersList constructor (init = undefined) { webidl.util.markAsUncloneable(this) if (init === kConstruct) { return } this.#headersList = new HeadersList() // The new Headers(init) constructor steps are: // 1. Set this’s guard to "none". this.#guard = 'none' // 2. If init is given, then fill this with init. if (init !== undefined) { init = webidl.converters.HeadersInit(init, 'Headers contructor', 'init') fill(this, init) } } // https://fetch.spec.whatwg.org/#dom-headers-append append (name, value) { webidl.brandCheck(this, Headers) webidl.argumentLengthCheck(arguments, 2, 'Headers.append') const prefix = 'Headers.append' name = webidl.converters.ByteString(name, prefix, 'name') value = webidl.converters.ByteString(value, prefix, 'value') return appendHeader(this, name, value) } // https://fetch.spec.whatwg.org/#dom-headers-delete delete (name) { webidl.brandCheck(this, Headers) webidl.argumentLengthCheck(arguments, 1, 'Headers.delete') const prefix = 'Headers.delete' name = webidl.converters.ByteString(name, prefix, 'name') // 1. If name is not a header name, then throw a TypeError. if (!isValidHeaderName(name)) { throw webidl.errors.invalidArgument({ prefix: 'Headers.delete', value: name, type: 'header name' }) } // 2. If this’s guard is "immutable", then throw a TypeError. // 3. Otherwise, if this’s guard is "request" and name is a // forbidden header name, return. // 4. Otherwise, if this’s guard is "request-no-cors", name // is not a no-CORS-safelisted request-header name, and // name is not a privileged no-CORS request-header name, // return. // 5. Otherwise, if this’s guard is "response" and name is // a forbidden response-header name, return. // Note: undici does not implement forbidden header names if (this.#guard === 'immutable') { throw new TypeError('immutable') } // 6. If this’s header list does not contain name, then // return. if (!this.#headersList.contains(name, false)) { return } // 7. Delete name from this’s header list. // 8. If this’s guard is "request-no-cors", then remove // privileged no-CORS request headers from this. this.#headersList.delete(name, false) } // https://fetch.spec.whatwg.org/#dom-headers-get get (name) { webidl.brandCheck(this, Headers) webidl.argumentLengthCheck(arguments, 1, 'Headers.get') const prefix = 'Headers.get' name = webidl.converters.ByteString(name, prefix, 'name') // 1. If name is not a header name, then throw a TypeError. if (!isValidHeaderName(name)) { throw webidl.errors.invalidArgument({ prefix, value: name, type: 'header name' }) } // 2. Return the result of getting name from this’s header // list. return this.#headersList.get(name, false) } // https://fetch.spec.whatwg.org/#dom-headers-has has (name) { webidl.brandCheck(this, Headers) webidl.argumentLengthCheck(arguments, 1, 'Headers.has') const prefix = 'Headers.has' name = webidl.converters.ByteString(name, prefix, 'name') // 1. If name is not a header name, then throw a TypeError. if (!isValidHeaderName(name)) { throw webidl.errors.invalidArgument({ prefix, value: name, type: 'header name' }) } // 2. Return true if this’s header list contains name; // otherwise false. return this.#headersList.contains(name, false) } // https://fetch.spec.whatwg.org/#dom-headers-set set (name, value) { webidl.brandCheck(this, Headers) webidl.argumentLengthCheck(arguments, 2, 'Headers.set') const prefix = 'Headers.set' name = webidl.converters.ByteString(name, prefix, 'name') value = webidl.converters.ByteString(value, prefix, 'value') // 1. Normalize value. value = headerValueNormalize(value) // 2. If name is not a header name or value is not a // header value, then throw a TypeError. if (!isValidHeaderName(name)) { throw webidl.errors.invalidArgument({ prefix, value: name, type: 'header name' }) } else if (!isValidHeaderValue(value)) { throw webidl.errors.invalidArgument({ prefix, value, type: 'header value' }) } // 3. If this’s guard is "immutable", then throw a TypeError. // 4. Otherwise, if this’s guard is "request" and name is a // forbidden header name, return. // 5. Otherwise, if this’s guard is "request-no-cors" and // name/value is not a no-CORS-safelisted request-header, // return. // 6. Otherwise, if this’s guard is "response" and name is a // forbidden response-header name, return. // Note: undici does not implement forbidden header names if (this.#guard === 'immutable') { throw new TypeError('immutable') } // 7. Set (name, value) in this’s header list. // 8. If this’s guard is "request-no-cors", then remove // privileged no-CORS request headers from this this.#headersList.set(name, value, false) } // https://fetch.spec.whatwg.org/#dom-headers-getsetcookie getSetCookie () { webidl.brandCheck(this, Headers) // 1. If this’s header list does not contain `Set-Cookie`, then return « ». // 2. Return the values of all headers in this’s header list whose name is // a byte-case-insensitive match for `Set-Cookie`, in order. const list = this.#headersList.cookies if (list) { return [...list] } return [] } // https://fetch.spec.whatwg.org/#concept-header-list-sort-and-combine get [kHeadersSortedMap] () { if (this.#headersList[kHeadersSortedMap]) { return this.#headersList[kHeadersSortedMap] } // 1. Let headers be an empty list of headers with the key being the name // and value the value. const headers = [] // 2. Let names be the result of convert header names to a sorted-lowercase // set with all the names of the headers in list. const names = this.#headersList.toSortedArray() const cookies = this.#headersList.cookies // fast-path if (cookies === null || cookies.length === 1) { // Note: The non-null assertion of value has already been done by `HeadersList#toSortedArray` return (this.#headersList[kHeadersSortedMap] = names) } // 3. For each name of names: for (let i = 0; i < names.length; ++i) { const { 0: name, 1: value } = names[i] // 1. If name is `set-cookie`, then: if (name === 'set-cookie') { // 1. Let values be a list of all values of headers in list whose name // is a byte-case-insensitive match for name, in order. // 2. For each value of values: // 1. Append (name, value) to headers. for (let j = 0; j < cookies.length; ++j) { headers.push([name, cookies[j]]) } } else { // 2. Otherwise: // 1. Let value be the result of getting name from list. // 2. Assert: value is non-null. // Note: This operation was done by `HeadersList#toSortedArray`. // 3. Append (name, value) to headers. headers.push([name, value]) } } // 4. Return headers. return (this.#headersList[kHeadersSortedMap] = headers) } [util.inspect.custom] (depth, options) { options.depth ??= depth return `Headers ${util.formatWithOptions(options, this.#headersList.entries)}` } static getHeadersGuard (o) { return o.#guard } static setHeadersGuard (o, guard) { o.#guard = guard } static getHeadersList (o) { return o.#headersList } static setHeadersList (o, list) { o.#headersList = list } } const { getHeadersGuard, setHeadersGuard, getHeadersList, setHeadersList } = Headers Reflect.deleteProperty(Headers, 'getHeadersGuard') Reflect.deleteProperty(Headers, 'setHeadersGuard') Reflect.deleteProperty(Headers, 'getHeadersList') Reflect.deleteProperty(Headers, 'setHeadersList') iteratorMixin('Headers', Headers, kHeadersSortedMap, 0, 1) Object.defineProperties(Headers.prototype, { append: kEnumerableProperty, delete: kEnumerableProperty, get: kEnumerableProperty, has: kEnumerableProperty, set: kEnumerableProperty, getSetCookie: kEnumerableProperty, [Symbol.toStringTag]: { value: 'Headers', configurable: true }, [util.inspect.custom]: { enumerable: false } }) webidl.converters.HeadersInit = function (V, prefix, argument) { if (webidl.util.Type(V) === 'Object') { const iterator = Reflect.get(V, Symbol.iterator) // A work-around to ensure we send the properly-cased Headers when V is a Headers object. // Read https://github.com/nodejs/undici/pull/3159#issuecomment-2075537226 before touching, please. if (!util.types.isProxy(V) && iterator === Headers.prototype.entries) { // Headers object try { return getHeadersList(V).entriesList } catch { // fall-through } } if (typeof iterator === 'function') { return webidl.converters['sequence<sequence<ByteString>>'](V, prefix, argument, iterator.bind(V)) } return webidl.converters['record<ByteString, ByteString>'](V, prefix, argument) } throw webidl.errors.conversionFailed({ prefix: 'Headers constructor', argument: 'Argument 1', types: ['sequence<sequence<ByteString>>', 'record<ByteString, ByteString>'] }) } module.exports = { fill, // for test. compareHeaderName, Headers, HeadersList, getHeadersGuard, setHeadersGuard, setHeadersList, getHeadersList } node_modules/undici/lib/web/fetch/formdata.js 0000664 00000017114 15114741631 0015254 0 ustar 00 'use strict' const { isBlobLike, iteratorMixin } = require('./util') const { kState } = require('./symbols') const { kEnumerableProperty } = require('../../core/util') const { FileLike, isFileLike } = require('./file') const { webidl } = require('./webidl') const { File: NativeFile } = require('node:buffer') const nodeUtil = require('node:util') /** @type {globalThis['File']} */ const File = globalThis.File ?? NativeFile // https://xhr.spec.whatwg.org/#formdata class FormData { constructor (form) { webidl.util.markAsUncloneable(this) if (form !== undefined) { throw webidl.errors.conversionFailed({ prefix: 'FormData constructor', argument: 'Argument 1', types: ['undefined'] }) } this[kState] = [] } append (name, value, filename = undefined) { webidl.brandCheck(this, FormData) const prefix = 'FormData.append' webidl.argumentLengthCheck(arguments, 2, prefix) if (arguments.length === 3 && !isBlobLike(value)) { throw new TypeError( "Failed to execute 'append' on 'FormData': parameter 2 is not of type 'Blob'" ) } // 1. Let value be value if given; otherwise blobValue. name = webidl.converters.USVString(name, prefix, 'name') value = isBlobLike(value) ? webidl.converters.Blob(value, prefix, 'value', { strict: false }) : webidl.converters.USVString(value, prefix, 'value') filename = arguments.length === 3 ? webidl.converters.USVString(filename, prefix, 'filename') : undefined // 2. Let entry be the result of creating an entry with // name, value, and filename if given. const entry = makeEntry(name, value, filename) // 3. Append entry to this’s entry list. this[kState].push(entry) } delete (name) { webidl.brandCheck(this, FormData) const prefix = 'FormData.delete' webidl.argumentLengthCheck(arguments, 1, prefix) name = webidl.converters.USVString(name, prefix, 'name') // The delete(name) method steps are to remove all entries whose name // is name from this’s entry list. this[kState] = this[kState].filter(entry => entry.name !== name) } get (name) { webidl.brandCheck(this, FormData) const prefix = 'FormData.get' webidl.argumentLengthCheck(arguments, 1, prefix) name = webidl.converters.USVString(name, prefix, 'name') // 1. If there is no entry whose name is name in this’s entry list, // then return null. const idx = this[kState].findIndex((entry) => entry.name === name) if (idx === -1) { return null } // 2. Return the value of the first entry whose name is name from // this’s entry list. return this[kState][idx].value } getAll (name) { webidl.brandCheck(this, FormData) const prefix = 'FormData.getAll' webidl.argumentLengthCheck(arguments, 1, prefix) name = webidl.converters.USVString(name, prefix, 'name') // 1. If there is no entry whose name is name in this’s entry list, // then return the empty list. // 2. Return the values of all entries whose name is name, in order, // from this’s entry list. return this[kState] .filter((entry) => entry.name === name) .map((entry) => entry.value) } has (name) { webidl.brandCheck(this, FormData) const prefix = 'FormData.has' webidl.argumentLengthCheck(arguments, 1, prefix) name = webidl.converters.USVString(name, prefix, 'name') // The has(name) method steps are to return true if there is an entry // whose name is name in this’s entry list; otherwise false. return this[kState].findIndex((entry) => entry.name === name) !== -1 } set (name, value, filename = undefined) { webidl.brandCheck(this, FormData) const prefix = 'FormData.set' webidl.argumentLengthCheck(arguments, 2, prefix) if (arguments.length === 3 && !isBlobLike(value)) { throw new TypeError( "Failed to execute 'set' on 'FormData': parameter 2 is not of type 'Blob'" ) } // The set(name, value) and set(name, blobValue, filename) method steps // are: // 1. Let value be value if given; otherwise blobValue. name = webidl.converters.USVString(name, prefix, 'name') value = isBlobLike(value) ? webidl.converters.Blob(value, prefix, 'name', { strict: false }) : webidl.converters.USVString(value, prefix, 'name') filename = arguments.length === 3 ? webidl.converters.USVString(filename, prefix, 'name') : undefined // 2. Let entry be the result of creating an entry with name, value, and // filename if given. const entry = makeEntry(name, value, filename) // 3. If there are entries in this’s entry list whose name is name, then // replace the first such entry with entry and remove the others. const idx = this[kState].findIndex((entry) => entry.name === name) if (idx !== -1) { this[kState] = [ ...this[kState].slice(0, idx), entry, ...this[kState].slice(idx + 1).filter((entry) => entry.name !== name) ] } else { // 4. Otherwise, append entry to this’s entry list. this[kState].push(entry) } } [nodeUtil.inspect.custom] (depth, options) { const state = this[kState].reduce((a, b) => { if (a[b.name]) { if (Array.isArray(a[b.name])) { a[b.name].push(b.value) } else { a[b.name] = [a[b.name], b.value] } } else { a[b.name] = b.value } return a }, { __proto__: null }) options.depth ??= depth options.colors ??= true const output = nodeUtil.formatWithOptions(options, state) // remove [Object null prototype] return `FormData ${output.slice(output.indexOf(']') + 2)}` } } iteratorMixin('FormData', FormData, kState, 'name', 'value') Object.defineProperties(FormData.prototype, { append: kEnumerableProperty, delete: kEnumerableProperty, get: kEnumerableProperty, getAll: kEnumerableProperty, has: kEnumerableProperty, set: kEnumerableProperty, [Symbol.toStringTag]: { value: 'FormData', configurable: true } }) /** * @see https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#create-an-entry * @param {string} name * @param {string|Blob} value * @param {?string} filename * @returns */ function makeEntry (name, value, filename) { // 1. Set name to the result of converting name into a scalar value string. // Note: This operation was done by the webidl converter USVString. // 2. If value is a string, then set value to the result of converting // value into a scalar value string. if (typeof value === 'string') { // Note: This operation was done by the webidl converter USVString. } else { // 3. Otherwise: // 1. If value is not a File object, then set value to a new File object, // representing the same bytes, whose name attribute value is "blob" if (!isFileLike(value)) { value = value instanceof Blob ? new File([value], 'blob', { type: value.type }) : new FileLike(value, 'blob', { type: value.type }) } // 2. If filename is given, then set value to a new File object, // representing the same bytes, whose name attribute is filename. if (filename !== undefined) { /** @type {FilePropertyBag} */ const options = { type: value.type, lastModified: value.lastModified } value = value instanceof NativeFile ? new File([value], filename, options) : new FileLike(value, filename, options) } } // 4. Return an entry whose name is name and whose value is value. return { name, value } } module.exports = { FormData, makeEntry } node_modules/undici/lib/web/fetch/LICENSE 0000664 00000002057 15114741631 0014126 0 ustar 00 MIT License Copyright (c) 2020 Ethan Arrowood Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. node_modules/undici/lib/web/fetch/data-url.js 0000664 00000052745 15114741631 0015201 0 ustar 00 'use strict' const assert = require('node:assert') const encoder = new TextEncoder() /** * @see https://mimesniff.spec.whatwg.org/#http-token-code-point */ const HTTP_TOKEN_CODEPOINTS = /^[!#$%&'*+\-.^_|~A-Za-z0-9]+$/ const HTTP_WHITESPACE_REGEX = /[\u000A\u000D\u0009\u0020]/ // eslint-disable-line const ASCII_WHITESPACE_REPLACE_REGEX = /[\u0009\u000A\u000C\u000D\u0020]/g // eslint-disable-line /** * @see https://mimesniff.spec.whatwg.org/#http-quoted-string-token-code-point */ const HTTP_QUOTED_STRING_TOKENS = /^[\u0009\u0020-\u007E\u0080-\u00FF]+$/ // eslint-disable-line // https://fetch.spec.whatwg.org/#data-url-processor /** @param {URL} dataURL */ function dataURLProcessor (dataURL) { // 1. Assert: dataURL’s scheme is "data". assert(dataURL.protocol === 'data:') // 2. Let input be the result of running the URL // serializer on dataURL with exclude fragment // set to true. let input = URLSerializer(dataURL, true) // 3. Remove the leading "data:" string from input. input = input.slice(5) // 4. Let position point at the start of input. const position = { position: 0 } // 5. Let mimeType be the result of collecting a // sequence of code points that are not equal // to U+002C (,), given position. let mimeType = collectASequenceOfCodePointsFast( ',', input, position ) // 6. Strip leading and trailing ASCII whitespace // from mimeType. // Undici implementation note: we need to store the // length because if the mimetype has spaces removed, // the wrong amount will be sliced from the input in // step #9 const mimeTypeLength = mimeType.length mimeType = removeASCIIWhitespace(mimeType, true, true) // 7. If position is past the end of input, then // return failure if (position.position >= input.length) { return 'failure' } // 8. Advance position by 1. position.position++ // 9. Let encodedBody be the remainder of input. const encodedBody = input.slice(mimeTypeLength + 1) // 10. Let body be the percent-decoding of encodedBody. let body = stringPercentDecode(encodedBody) // 11. If mimeType ends with U+003B (;), followed by // zero or more U+0020 SPACE, followed by an ASCII // case-insensitive match for "base64", then: if (/;(\u0020){0,}base64$/i.test(mimeType)) { // 1. Let stringBody be the isomorphic decode of body. const stringBody = isomorphicDecode(body) // 2. Set body to the forgiving-base64 decode of // stringBody. body = forgivingBase64(stringBody) // 3. If body is failure, then return failure. if (body === 'failure') { return 'failure' } // 4. Remove the last 6 code points from mimeType. mimeType = mimeType.slice(0, -6) // 5. Remove trailing U+0020 SPACE code points from mimeType, // if any. mimeType = mimeType.replace(/(\u0020)+$/, '') // 6. Remove the last U+003B (;) code point from mimeType. mimeType = mimeType.slice(0, -1) } // 12. If mimeType starts with U+003B (;), then prepend // "text/plain" to mimeType. if (mimeType.startsWith(';')) { mimeType = 'text/plain' + mimeType } // 13. Let mimeTypeRecord be the result of parsing // mimeType. let mimeTypeRecord = parseMIMEType(mimeType) // 14. If mimeTypeRecord is failure, then set // mimeTypeRecord to text/plain;charset=US-ASCII. if (mimeTypeRecord === 'failure') { mimeTypeRecord = parseMIMEType('text/plain;charset=US-ASCII') } // 15. Return a new data: URL struct whose MIME // type is mimeTypeRecord and body is body. // https://fetch.spec.whatwg.org/#data-url-struct return { mimeType: mimeTypeRecord, body } } // https://url.spec.whatwg.org/#concept-url-serializer /** * @param {URL} url * @param {boolean} excludeFragment */ function URLSerializer (url, excludeFragment = false) { if (!excludeFragment) { return url.href } const href = url.href const hashLength = url.hash.length const serialized = hashLength === 0 ? href : href.substring(0, href.length - hashLength) if (!hashLength && href.endsWith('#')) { return serialized.slice(0, -1) } return serialized } // https://infra.spec.whatwg.org/#collect-a-sequence-of-code-points /** * @param {(char: string) => boolean} condition * @param {string} input * @param {{ position: number }} position */ function collectASequenceOfCodePoints (condition, input, position) { // 1. Let result be the empty string. let result = '' // 2. While position doesn’t point past the end of input and the // code point at position within input meets the condition condition: while (position.position < input.length && condition(input[position.position])) { // 1. Append that code point to the end of result. result += input[position.position] // 2. Advance position by 1. position.position++ } // 3. Return result. return result } /** * A faster collectASequenceOfCodePoints that only works when comparing a single character. * @param {string} char * @param {string} input * @param {{ position: number }} position */ function collectASequenceOfCodePointsFast (char, input, position) { const idx = input.indexOf(char, position.position) const start = position.position if (idx === -1) { position.position = input.length return input.slice(start) } position.position = idx return input.slice(start, position.position) } // https://url.spec.whatwg.org/#string-percent-decode /** @param {string} input */ function stringPercentDecode (input) { // 1. Let bytes be the UTF-8 encoding of input. const bytes = encoder.encode(input) // 2. Return the percent-decoding of bytes. return percentDecode(bytes) } /** * @param {number} byte */ function isHexCharByte (byte) { // 0-9 A-F a-f return (byte >= 0x30 && byte <= 0x39) || (byte >= 0x41 && byte <= 0x46) || (byte >= 0x61 && byte <= 0x66) } /** * @param {number} byte */ function hexByteToNumber (byte) { return ( // 0-9 byte >= 0x30 && byte <= 0x39 ? (byte - 48) // Convert to uppercase // ((byte & 0xDF) - 65) + 10 : ((byte & 0xDF) - 55) ) } // https://url.spec.whatwg.org/#percent-decode /** @param {Uint8Array} input */ function percentDecode (input) { const length = input.length // 1. Let output be an empty byte sequence. /** @type {Uint8Array} */ const output = new Uint8Array(length) let j = 0 // 2. For each byte byte in input: for (let i = 0; i < length; ++i) { const byte = input[i] // 1. If byte is not 0x25 (%), then append byte to output. if (byte !== 0x25) { output[j++] = byte // 2. Otherwise, if byte is 0x25 (%) and the next two bytes // after byte in input are not in the ranges // 0x30 (0) to 0x39 (9), 0x41 (A) to 0x46 (F), // and 0x61 (a) to 0x66 (f), all inclusive, append byte // to output. } else if ( byte === 0x25 && !(isHexCharByte(input[i + 1]) && isHexCharByte(input[i + 2])) ) { output[j++] = 0x25 // 3. Otherwise: } else { // 1. Let bytePoint be the two bytes after byte in input, // decoded, and then interpreted as hexadecimal number. // 2. Append a byte whose value is bytePoint to output. output[j++] = (hexByteToNumber(input[i + 1]) << 4) | hexByteToNumber(input[i + 2]) // 3. Skip the next two bytes in input. i += 2 } } // 3. Return output. return length === j ? output : output.subarray(0, j) } // https://mimesniff.spec.whatwg.org/#parse-a-mime-type /** @param {string} input */ function parseMIMEType (input) { // 1. Remove any leading and trailing HTTP whitespace // from input. input = removeHTTPWhitespace(input, true, true) // 2. Let position be a position variable for input, // initially pointing at the start of input. const position = { position: 0 } // 3. Let type be the result of collecting a sequence // of code points that are not U+002F (/) from // input, given position. const type = collectASequenceOfCodePointsFast( '/', input, position ) // 4. If type is the empty string or does not solely // contain HTTP token code points, then return failure. // https://mimesniff.spec.whatwg.org/#http-token-code-point if (type.length === 0 || !HTTP_TOKEN_CODEPOINTS.test(type)) { return 'failure' } // 5. If position is past the end of input, then return // failure if (position.position > input.length) { return 'failure' } // 6. Advance position by 1. (This skips past U+002F (/).) position.position++ // 7. Let subtype be the result of collecting a sequence of // code points that are not U+003B (;) from input, given // position. let subtype = collectASequenceOfCodePointsFast( ';', input, position ) // 8. Remove any trailing HTTP whitespace from subtype. subtype = removeHTTPWhitespace(subtype, false, true) // 9. If subtype is the empty string or does not solely // contain HTTP token code points, then return failure. if (subtype.length === 0 || !HTTP_TOKEN_CODEPOINTS.test(subtype)) { return 'failure' } const typeLowercase = type.toLowerCase() const subtypeLowercase = subtype.toLowerCase() // 10. Let mimeType be a new MIME type record whose type // is type, in ASCII lowercase, and subtype is subtype, // in ASCII lowercase. // https://mimesniff.spec.whatwg.org/#mime-type const mimeType = { type: typeLowercase, subtype: subtypeLowercase, /** @type {Map<string, string>} */ parameters: new Map(), // https://mimesniff.spec.whatwg.org/#mime-type-essence essence: `${typeLowercase}/${subtypeLowercase}` } // 11. While position is not past the end of input: while (position.position < input.length) { // 1. Advance position by 1. (This skips past U+003B (;).) position.position++ // 2. Collect a sequence of code points that are HTTP // whitespace from input given position. collectASequenceOfCodePoints( // https://fetch.spec.whatwg.org/#http-whitespace char => HTTP_WHITESPACE_REGEX.test(char), input, position ) // 3. Let parameterName be the result of collecting a // sequence of code points that are not U+003B (;) // or U+003D (=) from input, given position. let parameterName = collectASequenceOfCodePoints( (char) => char !== ';' && char !== '=', input, position ) // 4. Set parameterName to parameterName, in ASCII // lowercase. parameterName = parameterName.toLowerCase() // 5. If position is not past the end of input, then: if (position.position < input.length) { // 1. If the code point at position within input is // U+003B (;), then continue. if (input[position.position] === ';') { continue } // 2. Advance position by 1. (This skips past U+003D (=).) position.position++ } // 6. If position is past the end of input, then break. if (position.position > input.length) { break } // 7. Let parameterValue be null. let parameterValue = null // 8. If the code point at position within input is // U+0022 ("), then: if (input[position.position] === '"') { // 1. Set parameterValue to the result of collecting // an HTTP quoted string from input, given position // and the extract-value flag. parameterValue = collectAnHTTPQuotedString(input, position, true) // 2. Collect a sequence of code points that are not // U+003B (;) from input, given position. collectASequenceOfCodePointsFast( ';', input, position ) // 9. Otherwise: } else { // 1. Set parameterValue to the result of collecting // a sequence of code points that are not U+003B (;) // from input, given position. parameterValue = collectASequenceOfCodePointsFast( ';', input, position ) // 2. Remove any trailing HTTP whitespace from parameterValue. parameterValue = removeHTTPWhitespace(parameterValue, false, true) // 3. If parameterValue is the empty string, then continue. if (parameterValue.length === 0) { continue } } // 10. If all of the following are true // - parameterName is not the empty string // - parameterName solely contains HTTP token code points // - parameterValue solely contains HTTP quoted-string token code points // - mimeType’s parameters[parameterName] does not exist // then set mimeType’s parameters[parameterName] to parameterValue. if ( parameterName.length !== 0 && HTTP_TOKEN_CODEPOINTS.test(parameterName) && (parameterValue.length === 0 || HTTP_QUOTED_STRING_TOKENS.test(parameterValue)) && !mimeType.parameters.has(parameterName) ) { mimeType.parameters.set(parameterName, parameterValue) } } // 12. Return mimeType. return mimeType } // https://infra.spec.whatwg.org/#forgiving-base64-decode /** @param {string} data */ function forgivingBase64 (data) { // 1. Remove all ASCII whitespace from data. data = data.replace(ASCII_WHITESPACE_REPLACE_REGEX, '') // eslint-disable-line let dataLength = data.length // 2. If data’s code point length divides by 4 leaving // no remainder, then: if (dataLength % 4 === 0) { // 1. If data ends with one or two U+003D (=) code points, // then remove them from data. if (data.charCodeAt(dataLength - 1) === 0x003D) { --dataLength if (data.charCodeAt(dataLength - 1) === 0x003D) { --dataLength } } } // 3. If data’s code point length divides by 4 leaving // a remainder of 1, then return failure. if (dataLength % 4 === 1) { return 'failure' } // 4. If data contains a code point that is not one of // U+002B (+) // U+002F (/) // ASCII alphanumeric // then return failure. if (/[^+/0-9A-Za-z]/.test(data.length === dataLength ? data : data.substring(0, dataLength))) { return 'failure' } const buffer = Buffer.from(data, 'base64') return new Uint8Array(buffer.buffer, buffer.byteOffset, buffer.byteLength) } // https://fetch.spec.whatwg.org/#collect-an-http-quoted-string // tests: https://fetch.spec.whatwg.org/#example-http-quoted-string /** * @param {string} input * @param {{ position: number }} position * @param {boolean?} extractValue */ function collectAnHTTPQuotedString (input, position, extractValue) { // 1. Let positionStart be position. const positionStart = position.position // 2. Let value be the empty string. let value = '' // 3. Assert: the code point at position within input // is U+0022 ("). assert(input[position.position] === '"') // 4. Advance position by 1. position.position++ // 5. While true: while (true) { // 1. Append the result of collecting a sequence of code points // that are not U+0022 (") or U+005C (\) from input, given // position, to value. value += collectASequenceOfCodePoints( (char) => char !== '"' && char !== '\\', input, position ) // 2. If position is past the end of input, then break. if (position.position >= input.length) { break } // 3. Let quoteOrBackslash be the code point at position within // input. const quoteOrBackslash = input[position.position] // 4. Advance position by 1. position.position++ // 5. If quoteOrBackslash is U+005C (\), then: if (quoteOrBackslash === '\\') { // 1. If position is past the end of input, then append // U+005C (\) to value and break. if (position.position >= input.length) { value += '\\' break } // 2. Append the code point at position within input to value. value += input[position.position] // 3. Advance position by 1. position.position++ // 6. Otherwise: } else { // 1. Assert: quoteOrBackslash is U+0022 ("). assert(quoteOrBackslash === '"') // 2. Break. break } } // 6. If the extract-value flag is set, then return value. if (extractValue) { return value } // 7. Return the code points from positionStart to position, // inclusive, within input. return input.slice(positionStart, position.position) } /** * @see https://mimesniff.spec.whatwg.org/#serialize-a-mime-type */ function serializeAMimeType (mimeType) { assert(mimeType !== 'failure') const { parameters, essence } = mimeType // 1. Let serialization be the concatenation of mimeType’s // type, U+002F (/), and mimeType’s subtype. let serialization = essence // 2. For each name → value of mimeType’s parameters: for (let [name, value] of parameters.entries()) { // 1. Append U+003B (;) to serialization. serialization += ';' // 2. Append name to serialization. serialization += name // 3. Append U+003D (=) to serialization. serialization += '=' // 4. If value does not solely contain HTTP token code // points or value is the empty string, then: if (!HTTP_TOKEN_CODEPOINTS.test(value)) { // 1. Precede each occurrence of U+0022 (") or // U+005C (\) in value with U+005C (\). value = value.replace(/(\\|")/g, '\\$1') // 2. Prepend U+0022 (") to value. value = '"' + value // 3. Append U+0022 (") to value. value += '"' } // 5. Append value to serialization. serialization += value } // 3. Return serialization. return serialization } /** * @see https://fetch.spec.whatwg.org/#http-whitespace * @param {number} char */ function isHTTPWhiteSpace (char) { // "\r\n\t " return char === 0x00d || char === 0x00a || char === 0x009 || char === 0x020 } /** * @see https://fetch.spec.whatwg.org/#http-whitespace * @param {string} str * @param {boolean} [leading=true] * @param {boolean} [trailing=true] */ function removeHTTPWhitespace (str, leading = true, trailing = true) { return removeChars(str, leading, trailing, isHTTPWhiteSpace) } /** * @see https://infra.spec.whatwg.org/#ascii-whitespace * @param {number} char */ function isASCIIWhitespace (char) { // "\r\n\t\f " return char === 0x00d || char === 0x00a || char === 0x009 || char === 0x00c || char === 0x020 } /** * @see https://infra.spec.whatwg.org/#strip-leading-and-trailing-ascii-whitespace * @param {string} str * @param {boolean} [leading=true] * @param {boolean} [trailing=true] */ function removeASCIIWhitespace (str, leading = true, trailing = true) { return removeChars(str, leading, trailing, isASCIIWhitespace) } /** * @param {string} str * @param {boolean} leading * @param {boolean} trailing * @param {(charCode: number) => boolean} predicate * @returns */ function removeChars (str, leading, trailing, predicate) { let lead = 0 let trail = str.length - 1 if (leading) { while (lead < str.length && predicate(str.charCodeAt(lead))) lead++ } if (trailing) { while (trail > 0 && predicate(str.charCodeAt(trail))) trail-- } return lead === 0 && trail === str.length - 1 ? str : str.slice(lead, trail + 1) } /** * @see https://infra.spec.whatwg.org/#isomorphic-decode * @param {Uint8Array} input * @returns {string} */ function isomorphicDecode (input) { // 1. To isomorphic decode a byte sequence input, return a string whose code point // length is equal to input’s length and whose code points have the same values // as the values of input’s bytes, in the same order. const length = input.length if ((2 << 15) - 1 > length) { return String.fromCharCode.apply(null, input) } let result = ''; let i = 0 let addition = (2 << 15) - 1 while (i < length) { if (i + addition > length) { addition = length - i } result += String.fromCharCode.apply(null, input.subarray(i, i += addition)) } return result } /** * @see https://mimesniff.spec.whatwg.org/#minimize-a-supported-mime-type * @param {Exclude<ReturnType<typeof parseMIMEType>, 'failure'>} mimeType */ function minimizeSupportedMimeType (mimeType) { switch (mimeType.essence) { case 'application/ecmascript': case 'application/javascript': case 'application/x-ecmascript': case 'application/x-javascript': case 'text/ecmascript': case 'text/javascript': case 'text/javascript1.0': case 'text/javascript1.1': case 'text/javascript1.2': case 'text/javascript1.3': case 'text/javascript1.4': case 'text/javascript1.5': case 'text/jscript': case 'text/livescript': case 'text/x-ecmascript': case 'text/x-javascript': // 1. If mimeType is a JavaScript MIME type, then return "text/javascript". return 'text/javascript' case 'application/json': case 'text/json': // 2. If mimeType is a JSON MIME type, then return "application/json". return 'application/json' case 'image/svg+xml': // 3. If mimeType’s essence is "image/svg+xml", then return "image/svg+xml". return 'image/svg+xml' case 'text/xml': case 'application/xml': // 4. If mimeType is an XML MIME type, then return "application/xml". return 'application/xml' } // 2. If mimeType is a JSON MIME type, then return "application/json". if (mimeType.subtype.endsWith('+json')) { return 'application/json' } // 4. If mimeType is an XML MIME type, then return "application/xml". if (mimeType.subtype.endsWith('+xml')) { return 'application/xml' } // 5. If mimeType is supported by the user agent, then return mimeType’s essence. // Technically, node doesn't support any mimetypes. // 6. Return the empty string. return '' } module.exports = { dataURLProcessor, URLSerializer, collectASequenceOfCodePoints, collectASequenceOfCodePointsFast, stringPercentDecode, parseMIMEType, collectAnHTTPQuotedString, serializeAMimeType, removeChars, removeHTTPWhitespace, minimizeSupportedMimeType, HTTP_TOKEN_CODEPOINTS, isomorphicDecode } node_modules/undici/lib/web/fetch/file.js 0000664 00000006344 15114741631 0014401 0 ustar 00 'use strict' const { Blob, File } = require('node:buffer') const { kState } = require('./symbols') const { webidl } = require('./webidl') // TODO(@KhafraDev): remove class FileLike { constructor (blobLike, fileName, options = {}) { // TODO: argument idl type check // The File constructor is invoked with two or three parameters, depending // on whether the optional dictionary parameter is used. When the File() // constructor is invoked, user agents must run the following steps: // 1. Let bytes be the result of processing blob parts given fileBits and // options. // 2. Let n be the fileName argument to the constructor. const n = fileName // 3. Process FilePropertyBag dictionary argument by running the following // substeps: // 1. If the type member is provided and is not the empty string, let t // be set to the type dictionary member. If t contains any characters // outside the range U+0020 to U+007E, then set t to the empty string // and return from these substeps. // TODO const t = options.type // 2. Convert every character in t to ASCII lowercase. // TODO // 3. If the lastModified member is provided, let d be set to the // lastModified dictionary member. If it is not provided, set d to the // current date and time represented as the number of milliseconds since // the Unix Epoch (which is the equivalent of Date.now() [ECMA-262]). const d = options.lastModified ?? Date.now() // 4. Return a new File object F such that: // F refers to the bytes byte sequence. // F.size is set to the number of total bytes in bytes. // F.name is set to n. // F.type is set to t. // F.lastModified is set to d. this[kState] = { blobLike, name: n, type: t, lastModified: d } } stream (...args) { webidl.brandCheck(this, FileLike) return this[kState].blobLike.stream(...args) } arrayBuffer (...args) { webidl.brandCheck(this, FileLike) return this[kState].blobLike.arrayBuffer(...args) } slice (...args) { webidl.brandCheck(this, FileLike) return this[kState].blobLike.slice(...args) } text (...args) { webidl.brandCheck(this, FileLike) return this[kState].blobLike.text(...args) } get size () { webidl.brandCheck(this, FileLike) return this[kState].blobLike.size } get type () { webidl.brandCheck(this, FileLike) return this[kState].blobLike.type } get name () { webidl.brandCheck(this, FileLike) return this[kState].name } get lastModified () { webidl.brandCheck(this, FileLike) return this[kState].lastModified } get [Symbol.toStringTag] () { return 'File' } } webidl.converters.Blob = webidl.interfaceConverter(Blob) // If this function is moved to ./util.js, some tools (such as // rollup) will warn about circular dependencies. See: // https://github.com/nodejs/undici/issues/1629 function isFileLike (object) { return ( (object instanceof File) || ( object && (typeof object.stream === 'function' || typeof object.arrayBuffer === 'function') && object[Symbol.toStringTag] === 'File' ) ) } module.exports = { FileLike, isFileLike } node_modules/undici/lib/web/fetch/constants.js 0000664 00000006503 15114741631 0015473 0 ustar 00 'use strict' const corsSafeListedMethods = /** @type {const} */ (['GET', 'HEAD', 'POST']) const corsSafeListedMethodsSet = new Set(corsSafeListedMethods) const nullBodyStatus = /** @type {const} */ ([101, 204, 205, 304]) const redirectStatus = /** @type {const} */ ([301, 302, 303, 307, 308]) const redirectStatusSet = new Set(redirectStatus) /** * @see https://fetch.spec.whatwg.org/#block-bad-port */ const badPorts = /** @type {const} */ ([ '1', '7', '9', '11', '13', '15', '17', '19', '20', '21', '22', '23', '25', '37', '42', '43', '53', '69', '77', '79', '87', '95', '101', '102', '103', '104', '109', '110', '111', '113', '115', '117', '119', '123', '135', '137', '139', '143', '161', '179', '389', '427', '465', '512', '513', '514', '515', '526', '530', '531', '532', '540', '548', '554', '556', '563', '587', '601', '636', '989', '990', '993', '995', '1719', '1720', '1723', '2049', '3659', '4045', '4190', '5060', '5061', '6000', '6566', '6665', '6666', '6667', '6668', '6669', '6679', '6697', '10080' ]) const badPortsSet = new Set(badPorts) /** * @see https://w3c.github.io/webappsec-referrer-policy/#referrer-policies */ const referrerPolicy = /** @type {const} */ ([ '', 'no-referrer', 'no-referrer-when-downgrade', 'same-origin', 'origin', 'strict-origin', 'origin-when-cross-origin', 'strict-origin-when-cross-origin', 'unsafe-url' ]) const referrerPolicySet = new Set(referrerPolicy) const requestRedirect = /** @type {const} */ (['follow', 'manual', 'error']) const safeMethods = /** @type {const} */ (['GET', 'HEAD', 'OPTIONS', 'TRACE']) const safeMethodsSet = new Set(safeMethods) const requestMode = /** @type {const} */ (['navigate', 'same-origin', 'no-cors', 'cors']) const requestCredentials = /** @type {const} */ (['omit', 'same-origin', 'include']) const requestCache = /** @type {const} */ ([ 'default', 'no-store', 'reload', 'no-cache', 'force-cache', 'only-if-cached' ]) /** * @see https://fetch.spec.whatwg.org/#request-body-header-name */ const requestBodyHeader = /** @type {const} */ ([ 'content-encoding', 'content-language', 'content-location', 'content-type', // See https://github.com/nodejs/undici/issues/2021 // 'Content-Length' is a forbidden header name, which is typically // removed in the Headers implementation. However, undici doesn't // filter out headers, so we add it here. 'content-length' ]) /** * @see https://fetch.spec.whatwg.org/#enumdef-requestduplex */ const requestDuplex = /** @type {const} */ ([ 'half' ]) /** * @see http://fetch.spec.whatwg.org/#forbidden-method */ const forbiddenMethods = /** @type {const} */ (['CONNECT', 'TRACE', 'TRACK']) const forbiddenMethodsSet = new Set(forbiddenMethods) const subresource = /** @type {const} */ ([ 'audio', 'audioworklet', 'font', 'image', 'manifest', 'paintworklet', 'script', 'style', 'track', 'video', 'xslt', '' ]) const subresourceSet = new Set(subresource) module.exports = { subresource, forbiddenMethods, requestBodyHeader, referrerPolicy, requestRedirect, requestMode, requestCredentials, requestCache, redirectStatus, corsSafeListedMethods, nullBodyStatus, safeMethods, badPorts, requestDuplex, subresourceSet, badPortsSet, redirectStatusSet, corsSafeListedMethodsSet, safeMethodsSet, forbiddenMethodsSet, referrerPolicySet } node_modules/undici/lib/web/fetch/formdata-parser.js 0000664 00000035573 15114741631 0016557 0 ustar 00 'use strict' const { isUSVString, bufferToLowerCasedHeaderName } = require('../../core/util') const { utf8DecodeBytes } = require('./util') const { HTTP_TOKEN_CODEPOINTS, isomorphicDecode } = require('./data-url') const { isFileLike } = require('./file') const { makeEntry } = require('./formdata') const assert = require('node:assert') const { File: NodeFile } = require('node:buffer') const File = globalThis.File ?? NodeFile const formDataNameBuffer = Buffer.from('form-data; name="') const filenameBuffer = Buffer.from('; filename') const dd = Buffer.from('--') const ddcrlf = Buffer.from('--\r\n') /** * @param {string} chars */ function isAsciiString (chars) { for (let i = 0; i < chars.length; ++i) { if ((chars.charCodeAt(i) & ~0x7F) !== 0) { return false } } return true } /** * @see https://andreubotella.github.io/multipart-form-data/#multipart-form-data-boundary * @param {string} boundary */ function validateBoundary (boundary) { const length = boundary.length // - its length is greater or equal to 27 and lesser or equal to 70, and if (length < 27 || length > 70) { return false } // - it is composed by bytes in the ranges 0x30 to 0x39, 0x41 to 0x5A, or // 0x61 to 0x7A, inclusive (ASCII alphanumeric), or which are 0x27 ('), // 0x2D (-) or 0x5F (_). for (let i = 0; i < length; ++i) { const cp = boundary.charCodeAt(i) if (!( (cp >= 0x30 && cp <= 0x39) || (cp >= 0x41 && cp <= 0x5a) || (cp >= 0x61 && cp <= 0x7a) || cp === 0x27 || cp === 0x2d || cp === 0x5f )) { return false } } return true } /** * @see https://andreubotella.github.io/multipart-form-data/#multipart-form-data-parser * @param {Buffer} input * @param {ReturnType<import('./data-url')['parseMIMEType']>} mimeType */ function multipartFormDataParser (input, mimeType) { // 1. Assert: mimeType’s essence is "multipart/form-data". assert(mimeType !== 'failure' && mimeType.essence === 'multipart/form-data') const boundaryString = mimeType.parameters.get('boundary') // 2. If mimeType’s parameters["boundary"] does not exist, return failure. // Otherwise, let boundary be the result of UTF-8 decoding mimeType’s // parameters["boundary"]. if (boundaryString === undefined) { return 'failure' } const boundary = Buffer.from(`--${boundaryString}`, 'utf8') // 3. Let entry list be an empty entry list. const entryList = [] // 4. Let position be a pointer to a byte in input, initially pointing at // the first byte. const position = { position: 0 } // Note: undici addition, allows leading and trailing CRLFs. while (input[position.position] === 0x0d && input[position.position + 1] === 0x0a) { position.position += 2 } let trailing = input.length while (input[trailing - 1] === 0x0a && input[trailing - 2] === 0x0d) { trailing -= 2 } if (trailing !== input.length) { input = input.subarray(0, trailing) } // 5. While true: while (true) { // 5.1. If position points to a sequence of bytes starting with 0x2D 0x2D // (`--`) followed by boundary, advance position by 2 + the length of // boundary. Otherwise, return failure. // Note: boundary is padded with 2 dashes already, no need to add 2. if (input.subarray(position.position, position.position + boundary.length).equals(boundary)) { position.position += boundary.length } else { return 'failure' } // 5.2. If position points to the sequence of bytes 0x2D 0x2D 0x0D 0x0A // (`--` followed by CR LF) followed by the end of input, return entry list. // Note: a body does NOT need to end with CRLF. It can end with --. if ( (position.position === input.length - 2 && bufferStartsWith(input, dd, position)) || (position.position === input.length - 4 && bufferStartsWith(input, ddcrlf, position)) ) { return entryList } // 5.3. If position does not point to a sequence of bytes starting with 0x0D // 0x0A (CR LF), return failure. if (input[position.position] !== 0x0d || input[position.position + 1] !== 0x0a) { return 'failure' } // 5.4. Advance position by 2. (This skips past the newline.) position.position += 2 // 5.5. Let name, filename and contentType be the result of parsing // multipart/form-data headers on input and position, if the result // is not failure. Otherwise, return failure. const result = parseMultipartFormDataHeaders(input, position) if (result === 'failure') { return 'failure' } let { name, filename, contentType, encoding } = result // 5.6. Advance position by 2. (This skips past the empty line that marks // the end of the headers.) position.position += 2 // 5.7. Let body be the empty byte sequence. let body // 5.8. Body loop: While position is not past the end of input: // TODO: the steps here are completely wrong { const boundaryIndex = input.indexOf(boundary.subarray(2), position.position) if (boundaryIndex === -1) { return 'failure' } body = input.subarray(position.position, boundaryIndex - 4) position.position += body.length // Note: position must be advanced by the body's length before being // decoded, otherwise the parsing will fail. if (encoding === 'base64') { body = Buffer.from(body.toString(), 'base64') } } // 5.9. If position does not point to a sequence of bytes starting with // 0x0D 0x0A (CR LF), return failure. Otherwise, advance position by 2. if (input[position.position] !== 0x0d || input[position.position + 1] !== 0x0a) { return 'failure' } else { position.position += 2 } // 5.10. If filename is not null: let value if (filename !== null) { // 5.10.1. If contentType is null, set contentType to "text/plain". contentType ??= 'text/plain' // 5.10.2. If contentType is not an ASCII string, set contentType to the empty string. // Note: `buffer.isAscii` can be used at zero-cost, but converting a string to a buffer is a high overhead. // Content-Type is a relatively small string, so it is faster to use `String#charCodeAt`. if (!isAsciiString(contentType)) { contentType = '' } // 5.10.3. Let value be a new File object with name filename, type contentType, and body body. value = new File([body], filename, { type: contentType }) } else { // 5.11. Otherwise: // 5.11.1. Let value be the UTF-8 decoding without BOM of body. value = utf8DecodeBytes(Buffer.from(body)) } // 5.12. Assert: name is a scalar value string and value is either a scalar value string or a File object. assert(isUSVString(name)) assert((typeof value === 'string' && isUSVString(value)) || isFileLike(value)) // 5.13. Create an entry with name and value, and append it to entry list. entryList.push(makeEntry(name, value, filename)) } } /** * @see https://andreubotella.github.io/multipart-form-data/#parse-multipart-form-data-headers * @param {Buffer} input * @param {{ position: number }} position */ function parseMultipartFormDataHeaders (input, position) { // 1. Let name, filename and contentType be null. let name = null let filename = null let contentType = null let encoding = null // 2. While true: while (true) { // 2.1. If position points to a sequence of bytes starting with 0x0D 0x0A (CR LF): if (input[position.position] === 0x0d && input[position.position + 1] === 0x0a) { // 2.1.1. If name is null, return failure. if (name === null) { return 'failure' } // 2.1.2. Return name, filename and contentType. return { name, filename, contentType, encoding } } // 2.2. Let header name be the result of collecting a sequence of bytes that are // not 0x0A (LF), 0x0D (CR) or 0x3A (:), given position. let headerName = collectASequenceOfBytes( (char) => char !== 0x0a && char !== 0x0d && char !== 0x3a, input, position ) // 2.3. Remove any HTTP tab or space bytes from the start or end of header name. headerName = removeChars(headerName, true, true, (char) => char === 0x9 || char === 0x20) // 2.4. If header name does not match the field-name token production, return failure. if (!HTTP_TOKEN_CODEPOINTS.test(headerName.toString())) { return 'failure' } // 2.5. If the byte at position is not 0x3A (:), return failure. if (input[position.position] !== 0x3a) { return 'failure' } // 2.6. Advance position by 1. position.position++ // 2.7. Collect a sequence of bytes that are HTTP tab or space bytes given position. // (Do nothing with those bytes.) collectASequenceOfBytes( (char) => char === 0x20 || char === 0x09, input, position ) // 2.8. Byte-lowercase header name and switch on the result: switch (bufferToLowerCasedHeaderName(headerName)) { case 'content-disposition': { // 1. Set name and filename to null. name = filename = null // 2. If position does not point to a sequence of bytes starting with // `form-data; name="`, return failure. if (!bufferStartsWith(input, formDataNameBuffer, position)) { return 'failure' } // 3. Advance position so it points at the byte after the next 0x22 (") // byte (the one in the sequence of bytes matched above). position.position += 17 // 4. Set name to the result of parsing a multipart/form-data name given // input and position, if the result is not failure. Otherwise, return // failure. name = parseMultipartFormDataName(input, position) if (name === null) { return 'failure' } // 5. If position points to a sequence of bytes starting with `; filename="`: if (bufferStartsWith(input, filenameBuffer, position)) { // Note: undici also handles filename* let check = position.position + filenameBuffer.length if (input[check] === 0x2a) { position.position += 1 check += 1 } if (input[check] !== 0x3d || input[check + 1] !== 0x22) { // =" return 'failure' } // 1. Advance position so it points at the byte after the next 0x22 (") byte // (the one in the sequence of bytes matched above). position.position += 12 // 2. Set filename to the result of parsing a multipart/form-data name given // input and position, if the result is not failure. Otherwise, return failure. filename = parseMultipartFormDataName(input, position) if (filename === null) { return 'failure' } } break } case 'content-type': { // 1. Let header value be the result of collecting a sequence of bytes that are // not 0x0A (LF) or 0x0D (CR), given position. let headerValue = collectASequenceOfBytes( (char) => char !== 0x0a && char !== 0x0d, input, position ) // 2. Remove any HTTP tab or space bytes from the end of header value. headerValue = removeChars(headerValue, false, true, (char) => char === 0x9 || char === 0x20) // 3. Set contentType to the isomorphic decoding of header value. contentType = isomorphicDecode(headerValue) break } case 'content-transfer-encoding': { let headerValue = collectASequenceOfBytes( (char) => char !== 0x0a && char !== 0x0d, input, position ) headerValue = removeChars(headerValue, false, true, (char) => char === 0x9 || char === 0x20) encoding = isomorphicDecode(headerValue) break } default: { // Collect a sequence of bytes that are not 0x0A (LF) or 0x0D (CR), given position. // (Do nothing with those bytes.) collectASequenceOfBytes( (char) => char !== 0x0a && char !== 0x0d, input, position ) } } // 2.9. If position does not point to a sequence of bytes starting with 0x0D 0x0A // (CR LF), return failure. Otherwise, advance position by 2 (past the newline). if (input[position.position] !== 0x0d && input[position.position + 1] !== 0x0a) { return 'failure' } else { position.position += 2 } } } /** * @see https://andreubotella.github.io/multipart-form-data/#parse-a-multipart-form-data-name * @param {Buffer} input * @param {{ position: number }} position */ function parseMultipartFormDataName (input, position) { // 1. Assert: The byte at (position - 1) is 0x22 ("). assert(input[position.position - 1] === 0x22) // 2. Let name be the result of collecting a sequence of bytes that are not 0x0A (LF), 0x0D (CR) or 0x22 ("), given position. /** @type {string | Buffer} */ let name = collectASequenceOfBytes( (char) => char !== 0x0a && char !== 0x0d && char !== 0x22, input, position ) // 3. If the byte at position is not 0x22 ("), return failure. Otherwise, advance position by 1. if (input[position.position] !== 0x22) { return null // name could be 'failure' } else { position.position++ } // 4. Replace any occurrence of the following subsequences in name with the given byte: // - `%0A`: 0x0A (LF) // - `%0D`: 0x0D (CR) // - `%22`: 0x22 (") name = new TextDecoder().decode(name) .replace(/%0A/ig, '\n') .replace(/%0D/ig, '\r') .replace(/%22/g, '"') // 5. Return the UTF-8 decoding without BOM of name. return name } /** * @param {(char: number) => boolean} condition * @param {Buffer} input * @param {{ position: number }} position */ function collectASequenceOfBytes (condition, input, position) { let start = position.position while (start < input.length && condition(input[start])) { ++start } return input.subarray(position.position, (position.position = start)) } /** * @param {Buffer} buf * @param {boolean} leading * @param {boolean} trailing * @param {(charCode: number) => boolean} predicate * @returns {Buffer} */ function removeChars (buf, leading, trailing, predicate) { let lead = 0 let trail = buf.length - 1 if (leading) { while (lead < buf.length && predicate(buf[lead])) lead++ } if (trailing) { while (trail > 0 && predicate(buf[trail])) trail-- } return lead === 0 && trail === buf.length - 1 ? buf : buf.subarray(lead, trail + 1) } /** * Checks if {@param buffer} starts with {@param start} * @param {Buffer} buffer * @param {Buffer} start * @param {{ position: number }} position */ function bufferStartsWith (buffer, start, position) { if (buffer.length < start.length) { return false } for (let i = 0; i < start.length; i++) { if (start[i] !== buffer[position.position + i]) { return false } } return true } module.exports = { multipartFormDataParser, validateBoundary } node_modules/undici/lib/web/fetch/symbols.js 0000664 00000000265 15114741631 0015146 0 ustar 00 'use strict' module.exports = { kUrl: Symbol('url'), kHeaders: Symbol('headers'), kSignal: Symbol('signal'), kState: Symbol('state'), kDispatcher: Symbol('dispatcher') } node_modules/undici/lib/web/fetch/request.js 0000664 00000103405 15114741631 0015146 0 ustar 00 /* globals AbortController */ 'use strict' const { extractBody, mixinBody, cloneBody, bodyUnusable } = require('./body') const { Headers, fill: fillHeaders, HeadersList, setHeadersGuard, getHeadersGuard, setHeadersList, getHeadersList } = require('./headers') const { FinalizationRegistry } = require('./dispatcher-weakref')() const util = require('../../core/util') const nodeUtil = require('node:util') const { isValidHTTPToken, sameOrigin, environmentSettingsObject } = require('./util') const { forbiddenMethodsSet, corsSafeListedMethodsSet, referrerPolicy, requestRedirect, requestMode, requestCredentials, requestCache, requestDuplex } = require('./constants') const { kEnumerableProperty, normalizedMethodRecordsBase, normalizedMethodRecords } = util const { kHeaders, kSignal, kState, kDispatcher } = require('./symbols') const { webidl } = require('./webidl') const { URLSerializer } = require('./data-url') const { kConstruct } = require('../../core/symbols') const assert = require('node:assert') const { getMaxListeners, setMaxListeners, getEventListeners, defaultMaxListeners } = require('node:events') const kAbortController = Symbol('abortController') const requestFinalizer = new FinalizationRegistry(({ signal, abort }) => { signal.removeEventListener('abort', abort) }) const dependentControllerMap = new WeakMap() function buildAbort (acRef) { return abort function abort () { const ac = acRef.deref() if (ac !== undefined) { // Currently, there is a problem with FinalizationRegistry. // https://github.com/nodejs/node/issues/49344 // https://github.com/nodejs/node/issues/47748 // In the case of abort, the first step is to unregister from it. // If the controller can refer to it, it is still registered. // It will be removed in the future. requestFinalizer.unregister(abort) // Unsubscribe a listener. // FinalizationRegistry will no longer be called, so this must be done. this.removeEventListener('abort', abort) ac.abort(this.reason) const controllerList = dependentControllerMap.get(ac.signal) if (controllerList !== undefined) { if (controllerList.size !== 0) { for (const ref of controllerList) { const ctrl = ref.deref() if (ctrl !== undefined) { ctrl.abort(this.reason) } } controllerList.clear() } dependentControllerMap.delete(ac.signal) } } } } let patchMethodWarning = false // https://fetch.spec.whatwg.org/#request-class class Request { // https://fetch.spec.whatwg.org/#dom-request constructor (input, init = {}) { webidl.util.markAsUncloneable(this) if (input === kConstruct) { return } const prefix = 'Request constructor' webidl.argumentLengthCheck(arguments, 1, prefix) input = webidl.converters.RequestInfo(input, prefix, 'input') init = webidl.converters.RequestInit(init, prefix, 'init') // 1. Let request be null. let request = null // 2. Let fallbackMode be null. let fallbackMode = null // 3. Let baseURL be this’s relevant settings object’s API base URL. const baseUrl = environmentSettingsObject.settingsObject.baseUrl // 4. Let signal be null. let signal = null // 5. If input is a string, then: if (typeof input === 'string') { this[kDispatcher] = init.dispatcher // 1. Let parsedURL be the result of parsing input with baseURL. // 2. If parsedURL is failure, then throw a TypeError. let parsedURL try { parsedURL = new URL(input, baseUrl) } catch (err) { throw new TypeError('Failed to parse URL from ' + input, { cause: err }) } // 3. If parsedURL includes credentials, then throw a TypeError. if (parsedURL.username || parsedURL.password) { throw new TypeError( 'Request cannot be constructed from a URL that includes credentials: ' + input ) } // 4. Set request to a new request whose URL is parsedURL. request = makeRequest({ urlList: [parsedURL] }) // 5. Set fallbackMode to "cors". fallbackMode = 'cors' } else { this[kDispatcher] = init.dispatcher || input[kDispatcher] // 6. Otherwise: // 7. Assert: input is a Request object. assert(input instanceof Request) // 8. Set request to input’s request. request = input[kState] // 9. Set signal to input’s signal. signal = input[kSignal] } // 7. Let origin be this’s relevant settings object’s origin. const origin = environmentSettingsObject.settingsObject.origin // 8. Let window be "client". let window = 'client' // 9. If request’s window is an environment settings object and its origin // is same origin with origin, then set window to request’s window. if ( request.window?.constructor?.name === 'EnvironmentSettingsObject' && sameOrigin(request.window, origin) ) { window = request.window } // 10. If init["window"] exists and is non-null, then throw a TypeError. if (init.window != null) { throw new TypeError(`'window' option '${window}' must be null`) } // 11. If init["window"] exists, then set window to "no-window". if ('window' in init) { window = 'no-window' } // 12. Set request to a new request with the following properties: request = makeRequest({ // URL request’s URL. // undici implementation note: this is set as the first item in request's urlList in makeRequest // method request’s method. method: request.method, // header list A copy of request’s header list. // undici implementation note: headersList is cloned in makeRequest headersList: request.headersList, // unsafe-request flag Set. unsafeRequest: request.unsafeRequest, // client This’s relevant settings object. client: environmentSettingsObject.settingsObject, // window window. window, // priority request’s priority. priority: request.priority, // origin request’s origin. The propagation of the origin is only significant for navigation requests // being handled by a service worker. In this scenario a request can have an origin that is different // from the current client. origin: request.origin, // referrer request’s referrer. referrer: request.referrer, // referrer policy request’s referrer policy. referrerPolicy: request.referrerPolicy, // mode request’s mode. mode: request.mode, // credentials mode request’s credentials mode. credentials: request.credentials, // cache mode request’s cache mode. cache: request.cache, // redirect mode request’s redirect mode. redirect: request.redirect, // integrity metadata request’s integrity metadata. integrity: request.integrity, // keepalive request’s keepalive. keepalive: request.keepalive, // reload-navigation flag request’s reload-navigation flag. reloadNavigation: request.reloadNavigation, // history-navigation flag request’s history-navigation flag. historyNavigation: request.historyNavigation, // URL list A clone of request’s URL list. urlList: [...request.urlList] }) const initHasKey = Object.keys(init).length !== 0 // 13. If init is not empty, then: if (initHasKey) { // 1. If request’s mode is "navigate", then set it to "same-origin". if (request.mode === 'navigate') { request.mode = 'same-origin' } // 2. Unset request’s reload-navigation flag. request.reloadNavigation = false // 3. Unset request’s history-navigation flag. request.historyNavigation = false // 4. Set request’s origin to "client". request.origin = 'client' // 5. Set request’s referrer to "client" request.referrer = 'client' // 6. Set request’s referrer policy to the empty string. request.referrerPolicy = '' // 7. Set request’s URL to request’s current URL. request.url = request.urlList[request.urlList.length - 1] // 8. Set request’s URL list to « request’s URL ». request.urlList = [request.url] } // 14. If init["referrer"] exists, then: if (init.referrer !== undefined) { // 1. Let referrer be init["referrer"]. const referrer = init.referrer // 2. If referrer is the empty string, then set request’s referrer to "no-referrer". if (referrer === '') { request.referrer = 'no-referrer' } else { // 1. Let parsedReferrer be the result of parsing referrer with // baseURL. // 2. If parsedReferrer is failure, then throw a TypeError. let parsedReferrer try { parsedReferrer = new URL(referrer, baseUrl) } catch (err) { throw new TypeError(`Referrer "${referrer}" is not a valid URL.`, { cause: err }) } // 3. If one of the following is true // - parsedReferrer’s scheme is "about" and path is the string "client" // - parsedReferrer’s origin is not same origin with origin // then set request’s referrer to "client". if ( (parsedReferrer.protocol === 'about:' && parsedReferrer.hostname === 'client') || (origin && !sameOrigin(parsedReferrer, environmentSettingsObject.settingsObject.baseUrl)) ) { request.referrer = 'client' } else { // 4. Otherwise, set request’s referrer to parsedReferrer. request.referrer = parsedReferrer } } } // 15. If init["referrerPolicy"] exists, then set request’s referrer policy // to it. if (init.referrerPolicy !== undefined) { request.referrerPolicy = init.referrerPolicy } // 16. Let mode be init["mode"] if it exists, and fallbackMode otherwise. let mode if (init.mode !== undefined) { mode = init.mode } else { mode = fallbackMode } // 17. If mode is "navigate", then throw a TypeError. if (mode === 'navigate') { throw webidl.errors.exception({ header: 'Request constructor', message: 'invalid request mode navigate.' }) } // 18. If mode is non-null, set request’s mode to mode. if (mode != null) { request.mode = mode } // 19. If init["credentials"] exists, then set request’s credentials mode // to it. if (init.credentials !== undefined) { request.credentials = init.credentials } // 18. If init["cache"] exists, then set request’s cache mode to it. if (init.cache !== undefined) { request.cache = init.cache } // 21. If request’s cache mode is "only-if-cached" and request’s mode is // not "same-origin", then throw a TypeError. if (request.cache === 'only-if-cached' && request.mode !== 'same-origin') { throw new TypeError( "'only-if-cached' can be set only with 'same-origin' mode" ) } // 22. If init["redirect"] exists, then set request’s redirect mode to it. if (init.redirect !== undefined) { request.redirect = init.redirect } // 23. If init["integrity"] exists, then set request’s integrity metadata to it. if (init.integrity != null) { request.integrity = String(init.integrity) } // 24. If init["keepalive"] exists, then set request’s keepalive to it. if (init.keepalive !== undefined) { request.keepalive = Boolean(init.keepalive) } // 25. If init["method"] exists, then: if (init.method !== undefined) { // 1. Let method be init["method"]. let method = init.method const mayBeNormalized = normalizedMethodRecords[method] if (mayBeNormalized !== undefined) { // Note: Bypass validation DELETE, GET, HEAD, OPTIONS, POST, PUT, PATCH and these lowercase ones request.method = mayBeNormalized } else { // 2. If method is not a method or method is a forbidden method, then // throw a TypeError. if (!isValidHTTPToken(method)) { throw new TypeError(`'${method}' is not a valid HTTP method.`) } const upperCase = method.toUpperCase() if (forbiddenMethodsSet.has(upperCase)) { throw new TypeError(`'${method}' HTTP method is unsupported.`) } // 3. Normalize method. // https://fetch.spec.whatwg.org/#concept-method-normalize // Note: must be in uppercase method = normalizedMethodRecordsBase[upperCase] ?? method // 4. Set request’s method to method. request.method = method } if (!patchMethodWarning && request.method === 'patch') { process.emitWarning('Using `patch` is highly likely to result in a `405 Method Not Allowed`. `PATCH` is much more likely to succeed.', { code: 'UNDICI-FETCH-patch' }) patchMethodWarning = true } } // 26. If init["signal"] exists, then set signal to it. if (init.signal !== undefined) { signal = init.signal } // 27. Set this’s request to request. this[kState] = request // 28. Set this’s signal to a new AbortSignal object with this’s relevant // Realm. // TODO: could this be simplified with AbortSignal.any // (https://dom.spec.whatwg.org/#dom-abortsignal-any) const ac = new AbortController() this[kSignal] = ac.signal // 29. If signal is not null, then make this’s signal follow signal. if (signal != null) { if ( !signal || typeof signal.aborted !== 'boolean' || typeof signal.addEventListener !== 'function' ) { throw new TypeError( "Failed to construct 'Request': member signal is not of type AbortSignal." ) } if (signal.aborted) { ac.abort(signal.reason) } else { // Keep a strong ref to ac while request object // is alive. This is needed to prevent AbortController // from being prematurely garbage collected. // See, https://github.com/nodejs/undici/issues/1926. this[kAbortController] = ac const acRef = new WeakRef(ac) const abort = buildAbort(acRef) // Third-party AbortControllers may not work with these. // See, https://github.com/nodejs/undici/pull/1910#issuecomment-1464495619. try { // If the max amount of listeners is equal to the default, increase it // This is only available in node >= v19.9.0 if (typeof getMaxListeners === 'function' && getMaxListeners(signal) === defaultMaxListeners) { setMaxListeners(1500, signal) } else if (getEventListeners(signal, 'abort').length >= defaultMaxListeners) { setMaxListeners(1500, signal) } } catch {} util.addAbortListener(signal, abort) // The third argument must be a registry key to be unregistered. // Without it, you cannot unregister. // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/FinalizationRegistry // abort is used as the unregister key. (because it is unique) requestFinalizer.register(ac, { signal, abort }, abort) } } // 30. Set this’s headers to a new Headers object with this’s relevant // Realm, whose header list is request’s header list and guard is // "request". this[kHeaders] = new Headers(kConstruct) setHeadersList(this[kHeaders], request.headersList) setHeadersGuard(this[kHeaders], 'request') // 31. If this’s request’s mode is "no-cors", then: if (mode === 'no-cors') { // 1. If this’s request’s method is not a CORS-safelisted method, // then throw a TypeError. if (!corsSafeListedMethodsSet.has(request.method)) { throw new TypeError( `'${request.method} is unsupported in no-cors mode.` ) } // 2. Set this’s headers’s guard to "request-no-cors". setHeadersGuard(this[kHeaders], 'request-no-cors') } // 32. If init is not empty, then: if (initHasKey) { /** @type {HeadersList} */ const headersList = getHeadersList(this[kHeaders]) // 1. Let headers be a copy of this’s headers and its associated header // list. // 2. If init["headers"] exists, then set headers to init["headers"]. const headers = init.headers !== undefined ? init.headers : new HeadersList(headersList) // 3. Empty this’s headers’s header list. headersList.clear() // 4. If headers is a Headers object, then for each header in its header // list, append header’s name/header’s value to this’s headers. if (headers instanceof HeadersList) { for (const { name, value } of headers.rawValues()) { headersList.append(name, value, false) } // Note: Copy the `set-cookie` meta-data. headersList.cookies = headers.cookies } else { // 5. Otherwise, fill this’s headers with headers. fillHeaders(this[kHeaders], headers) } } // 33. Let inputBody be input’s request’s body if input is a Request // object; otherwise null. const inputBody = input instanceof Request ? input[kState].body : null // 34. If either init["body"] exists and is non-null or inputBody is // non-null, and request’s method is `GET` or `HEAD`, then throw a // TypeError. if ( (init.body != null || inputBody != null) && (request.method === 'GET' || request.method === 'HEAD') ) { throw new TypeError('Request with GET/HEAD method cannot have body.') } // 35. Let initBody be null. let initBody = null // 36. If init["body"] exists and is non-null, then: if (init.body != null) { // 1. Let Content-Type be null. // 2. Set initBody and Content-Type to the result of extracting // init["body"], with keepalive set to request’s keepalive. const [extractedBody, contentType] = extractBody( init.body, request.keepalive ) initBody = extractedBody // 3, If Content-Type is non-null and this’s headers’s header list does // not contain `Content-Type`, then append `Content-Type`/Content-Type to // this’s headers. if (contentType && !getHeadersList(this[kHeaders]).contains('content-type', true)) { this[kHeaders].append('content-type', contentType) } } // 37. Let inputOrInitBody be initBody if it is non-null; otherwise // inputBody. const inputOrInitBody = initBody ?? inputBody // 38. If inputOrInitBody is non-null and inputOrInitBody’s source is // null, then: if (inputOrInitBody != null && inputOrInitBody.source == null) { // 1. If initBody is non-null and init["duplex"] does not exist, // then throw a TypeError. if (initBody != null && init.duplex == null) { throw new TypeError('RequestInit: duplex option is required when sending a body.') } // 2. If this’s request’s mode is neither "same-origin" nor "cors", // then throw a TypeError. if (request.mode !== 'same-origin' && request.mode !== 'cors') { throw new TypeError( 'If request is made from ReadableStream, mode should be "same-origin" or "cors"' ) } // 3. Set this’s request’s use-CORS-preflight flag. request.useCORSPreflightFlag = true } // 39. Let finalBody be inputOrInitBody. let finalBody = inputOrInitBody // 40. If initBody is null and inputBody is non-null, then: if (initBody == null && inputBody != null) { // 1. If input is unusable, then throw a TypeError. if (bodyUnusable(input)) { throw new TypeError( 'Cannot construct a Request with a Request object that has already been used.' ) } // 2. Set finalBody to the result of creating a proxy for inputBody. // https://streams.spec.whatwg.org/#readablestream-create-a-proxy const identityTransform = new TransformStream() inputBody.stream.pipeThrough(identityTransform) finalBody = { source: inputBody.source, length: inputBody.length, stream: identityTransform.readable } } // 41. Set this’s request’s body to finalBody. this[kState].body = finalBody } // Returns request’s HTTP method, which is "GET" by default. get method () { webidl.brandCheck(this, Request) // The method getter steps are to return this’s request’s method. return this[kState].method } // Returns the URL of request as a string. get url () { webidl.brandCheck(this, Request) // The url getter steps are to return this’s request’s URL, serialized. return URLSerializer(this[kState].url) } // Returns a Headers object consisting of the headers associated with request. // Note that headers added in the network layer by the user agent will not // be accounted for in this object, e.g., the "Host" header. get headers () { webidl.brandCheck(this, Request) // The headers getter steps are to return this’s headers. return this[kHeaders] } // Returns the kind of resource requested by request, e.g., "document" // or "script". get destination () { webidl.brandCheck(this, Request) // The destination getter are to return this’s request’s destination. return this[kState].destination } // Returns the referrer of request. Its value can be a same-origin URL if // explicitly set in init, the empty string to indicate no referrer, and // "about:client" when defaulting to the global’s default. This is used // during fetching to determine the value of the `Referer` header of the // request being made. get referrer () { webidl.brandCheck(this, Request) // 1. If this’s request’s referrer is "no-referrer", then return the // empty string. if (this[kState].referrer === 'no-referrer') { return '' } // 2. If this’s request’s referrer is "client", then return // "about:client". if (this[kState].referrer === 'client') { return 'about:client' } // Return this’s request’s referrer, serialized. return this[kState].referrer.toString() } // Returns the referrer policy associated with request. // This is used during fetching to compute the value of the request’s // referrer. get referrerPolicy () { webidl.brandCheck(this, Request) // The referrerPolicy getter steps are to return this’s request’s referrer policy. return this[kState].referrerPolicy } // Returns the mode associated with request, which is a string indicating // whether the request will use CORS, or will be restricted to same-origin // URLs. get mode () { webidl.brandCheck(this, Request) // The mode getter steps are to return this’s request’s mode. return this[kState].mode } // Returns the credentials mode associated with request, // which is a string indicating whether credentials will be sent with the // request always, never, or only when sent to a same-origin URL. get credentials () { // The credentials getter steps are to return this’s request’s credentials mode. return this[kState].credentials } // Returns the cache mode associated with request, // which is a string indicating how the request will // interact with the browser’s cache when fetching. get cache () { webidl.brandCheck(this, Request) // The cache getter steps are to return this’s request’s cache mode. return this[kState].cache } // Returns the redirect mode associated with request, // which is a string indicating how redirects for the // request will be handled during fetching. A request // will follow redirects by default. get redirect () { webidl.brandCheck(this, Request) // The redirect getter steps are to return this’s request’s redirect mode. return this[kState].redirect } // Returns request’s subresource integrity metadata, which is a // cryptographic hash of the resource being fetched. Its value // consists of multiple hashes separated by whitespace. [SRI] get integrity () { webidl.brandCheck(this, Request) // The integrity getter steps are to return this’s request’s integrity // metadata. return this[kState].integrity } // Returns a boolean indicating whether or not request can outlive the // global in which it was created. get keepalive () { webidl.brandCheck(this, Request) // The keepalive getter steps are to return this’s request’s keepalive. return this[kState].keepalive } // Returns a boolean indicating whether or not request is for a reload // navigation. get isReloadNavigation () { webidl.brandCheck(this, Request) // The isReloadNavigation getter steps are to return true if this’s // request’s reload-navigation flag is set; otherwise false. return this[kState].reloadNavigation } // Returns a boolean indicating whether or not request is for a history // navigation (a.k.a. back-forward navigation). get isHistoryNavigation () { webidl.brandCheck(this, Request) // The isHistoryNavigation getter steps are to return true if this’s request’s // history-navigation flag is set; otherwise false. return this[kState].historyNavigation } // Returns the signal associated with request, which is an AbortSignal // object indicating whether or not request has been aborted, and its // abort event handler. get signal () { webidl.brandCheck(this, Request) // The signal getter steps are to return this’s signal. return this[kSignal] } get body () { webidl.brandCheck(this, Request) return this[kState].body ? this[kState].body.stream : null } get bodyUsed () { webidl.brandCheck(this, Request) return !!this[kState].body && util.isDisturbed(this[kState].body.stream) } get duplex () { webidl.brandCheck(this, Request) return 'half' } // Returns a clone of request. clone () { webidl.brandCheck(this, Request) // 1. If this is unusable, then throw a TypeError. if (bodyUnusable(this)) { throw new TypeError('unusable') } // 2. Let clonedRequest be the result of cloning this’s request. const clonedRequest = cloneRequest(this[kState]) // 3. Let clonedRequestObject be the result of creating a Request object, // given clonedRequest, this’s headers’s guard, and this’s relevant Realm. // 4. Make clonedRequestObject’s signal follow this’s signal. const ac = new AbortController() if (this.signal.aborted) { ac.abort(this.signal.reason) } else { let list = dependentControllerMap.get(this.signal) if (list === undefined) { list = new Set() dependentControllerMap.set(this.signal, list) } const acRef = new WeakRef(ac) list.add(acRef) util.addAbortListener( ac.signal, buildAbort(acRef) ) } // 4. Return clonedRequestObject. return fromInnerRequest(clonedRequest, ac.signal, getHeadersGuard(this[kHeaders])) } [nodeUtil.inspect.custom] (depth, options) { if (options.depth === null) { options.depth = 2 } options.colors ??= true const properties = { method: this.method, url: this.url, headers: this.headers, destination: this.destination, referrer: this.referrer, referrerPolicy: this.referrerPolicy, mode: this.mode, credentials: this.credentials, cache: this.cache, redirect: this.redirect, integrity: this.integrity, keepalive: this.keepalive, isReloadNavigation: this.isReloadNavigation, isHistoryNavigation: this.isHistoryNavigation, signal: this.signal } return `Request ${nodeUtil.formatWithOptions(options, properties)}` } } mixinBody(Request) // https://fetch.spec.whatwg.org/#requests function makeRequest (init) { return { method: init.method ?? 'GET', localURLsOnly: init.localURLsOnly ?? false, unsafeRequest: init.unsafeRequest ?? false, body: init.body ?? null, client: init.client ?? null, reservedClient: init.reservedClient ?? null, replacesClientId: init.replacesClientId ?? '', window: init.window ?? 'client', keepalive: init.keepalive ?? false, serviceWorkers: init.serviceWorkers ?? 'all', initiator: init.initiator ?? '', destination: init.destination ?? '', priority: init.priority ?? null, origin: init.origin ?? 'client', policyContainer: init.policyContainer ?? 'client', referrer: init.referrer ?? 'client', referrerPolicy: init.referrerPolicy ?? '', mode: init.mode ?? 'no-cors', useCORSPreflightFlag: init.useCORSPreflightFlag ?? false, credentials: init.credentials ?? 'same-origin', useCredentials: init.useCredentials ?? false, cache: init.cache ?? 'default', redirect: init.redirect ?? 'follow', integrity: init.integrity ?? '', cryptoGraphicsNonceMetadata: init.cryptoGraphicsNonceMetadata ?? '', parserMetadata: init.parserMetadata ?? '', reloadNavigation: init.reloadNavigation ?? false, historyNavigation: init.historyNavigation ?? false, userActivation: init.userActivation ?? false, taintedOrigin: init.taintedOrigin ?? false, redirectCount: init.redirectCount ?? 0, responseTainting: init.responseTainting ?? 'basic', preventNoCacheCacheControlHeaderModification: init.preventNoCacheCacheControlHeaderModification ?? false, done: init.done ?? false, timingAllowFailed: init.timingAllowFailed ?? false, urlList: init.urlList, url: init.urlList[0], headersList: init.headersList ? new HeadersList(init.headersList) : new HeadersList() } } // https://fetch.spec.whatwg.org/#concept-request-clone function cloneRequest (request) { // To clone a request request, run these steps: // 1. Let newRequest be a copy of request, except for its body. const newRequest = makeRequest({ ...request, body: null }) // 2. If request’s body is non-null, set newRequest’s body to the // result of cloning request’s body. if (request.body != null) { newRequest.body = cloneBody(newRequest, request.body) } // 3. Return newRequest. return newRequest } /** * @see https://fetch.spec.whatwg.org/#request-create * @param {any} innerRequest * @param {AbortSignal} signal * @param {'request' | 'immutable' | 'request-no-cors' | 'response' | 'none'} guard * @returns {Request} */ function fromInnerRequest (innerRequest, signal, guard) { const request = new Request(kConstruct) request[kState] = innerRequest request[kSignal] = signal request[kHeaders] = new Headers(kConstruct) setHeadersList(request[kHeaders], innerRequest.headersList) setHeadersGuard(request[kHeaders], guard) return request } Object.defineProperties(Request.prototype, { method: kEnumerableProperty, url: kEnumerableProperty, headers: kEnumerableProperty, redirect: kEnumerableProperty, clone: kEnumerableProperty, signal: kEnumerableProperty, duplex: kEnumerableProperty, destination: kEnumerableProperty, body: kEnumerableProperty, bodyUsed: kEnumerableProperty, isHistoryNavigation: kEnumerableProperty, isReloadNavigation: kEnumerableProperty, keepalive: kEnumerableProperty, integrity: kEnumerableProperty, cache: kEnumerableProperty, credentials: kEnumerableProperty, attribute: kEnumerableProperty, referrerPolicy: kEnumerableProperty, referrer: kEnumerableProperty, mode: kEnumerableProperty, [Symbol.toStringTag]: { value: 'Request', configurable: true } }) webidl.converters.Request = webidl.interfaceConverter( Request ) // https://fetch.spec.whatwg.org/#requestinfo webidl.converters.RequestInfo = function (V, prefix, argument) { if (typeof V === 'string') { return webidl.converters.USVString(V, prefix, argument) } if (V instanceof Request) { return webidl.converters.Request(V, prefix, argument) } return webidl.converters.USVString(V, prefix, argument) } webidl.converters.AbortSignal = webidl.interfaceConverter( AbortSignal ) // https://fetch.spec.whatwg.org/#requestinit webidl.converters.RequestInit = webidl.dictionaryConverter([ { key: 'method', converter: webidl.converters.ByteString }, { key: 'headers', converter: webidl.converters.HeadersInit }, { key: 'body', converter: webidl.nullableConverter( webidl.converters.BodyInit ) }, { key: 'referrer', converter: webidl.converters.USVString }, { key: 'referrerPolicy', converter: webidl.converters.DOMString, // https://w3c.github.io/webappsec-referrer-policy/#referrer-policy allowedValues: referrerPolicy }, { key: 'mode', converter: webidl.converters.DOMString, // https://fetch.spec.whatwg.org/#concept-request-mode allowedValues: requestMode }, { key: 'credentials', converter: webidl.converters.DOMString, // https://fetch.spec.whatwg.org/#requestcredentials allowedValues: requestCredentials }, { key: 'cache', converter: webidl.converters.DOMString, // https://fetch.spec.whatwg.org/#requestcache allowedValues: requestCache }, { key: 'redirect', converter: webidl.converters.DOMString, // https://fetch.spec.whatwg.org/#requestredirect allowedValues: requestRedirect }, { key: 'integrity', converter: webidl.converters.DOMString }, { key: 'keepalive', converter: webidl.converters.boolean }, { key: 'signal', converter: webidl.nullableConverter( (signal) => webidl.converters.AbortSignal( signal, 'RequestInit', 'signal', { strict: false } ) ) }, { key: 'window', converter: webidl.converters.any }, { key: 'duplex', converter: webidl.converters.DOMString, allowedValues: requestDuplex }, { key: 'dispatcher', // undici specific option converter: webidl.converters.any } ]) module.exports = { Request, makeRequest, fromInnerRequest, cloneRequest } node_modules/undici/lib/web/fetch/global.js 0000664 00000001572 15114741631 0014720 0 ustar 00 'use strict' // In case of breaking changes, increase the version // number to avoid conflicts. const globalOrigin = Symbol.for('undici.globalOrigin.1') function getGlobalOrigin () { return globalThis[globalOrigin] } function setGlobalOrigin (newOrigin) { if (newOrigin === undefined) { Object.defineProperty(globalThis, globalOrigin, { value: undefined, writable: true, enumerable: false, configurable: false }) return } const parsedURL = new URL(newOrigin) if (parsedURL.protocol !== 'http:' && parsedURL.protocol !== 'https:') { throw new TypeError(`Only http & https urls are allowed, received ${parsedURL.protocol}`) } Object.defineProperty(globalThis, globalOrigin, { value: parsedURL, writable: true, enumerable: false, configurable: false }) } module.exports = { getGlobalOrigin, setGlobalOrigin } node_modules/undici/lib/web/fetch/util.js 0000664 00000142474 15114741631 0014444 0 ustar 00 'use strict' const { Transform } = require('node:stream') const zlib = require('node:zlib') const { redirectStatusSet, referrerPolicySet: referrerPolicyTokens, badPortsSet } = require('./constants') const { getGlobalOrigin } = require('./global') const { collectASequenceOfCodePoints, collectAnHTTPQuotedString, removeChars, parseMIMEType } = require('./data-url') const { performance } = require('node:perf_hooks') const { isBlobLike, ReadableStreamFrom, isValidHTTPToken, normalizedMethodRecordsBase } = require('../../core/util') const assert = require('node:assert') const { isUint8Array } = require('node:util/types') const { webidl } = require('./webidl') let supportedHashes = [] // https://nodejs.org/api/crypto.html#determining-if-crypto-support-is-unavailable /** @type {import('crypto')} */ let crypto try { crypto = require('node:crypto') const possibleRelevantHashes = ['sha256', 'sha384', 'sha512'] supportedHashes = crypto.getHashes().filter((hash) => possibleRelevantHashes.includes(hash)) /* c8 ignore next 3 */ } catch { } function responseURL (response) { // https://fetch.spec.whatwg.org/#responses // A response has an associated URL. It is a pointer to the last URL // in response’s URL list and null if response’s URL list is empty. const urlList = response.urlList const length = urlList.length return length === 0 ? null : urlList[length - 1].toString() } // https://fetch.spec.whatwg.org/#concept-response-location-url function responseLocationURL (response, requestFragment) { // 1. If response’s status is not a redirect status, then return null. if (!redirectStatusSet.has(response.status)) { return null } // 2. Let location be the result of extracting header list values given // `Location` and response’s header list. let location = response.headersList.get('location', true) // 3. If location is a header value, then set location to the result of // parsing location with response’s URL. if (location !== null && isValidHeaderValue(location)) { if (!isValidEncodedURL(location)) { // Some websites respond location header in UTF-8 form without encoding them as ASCII // and major browsers redirect them to correctly UTF-8 encoded addresses. // Here, we handle that behavior in the same way. location = normalizeBinaryStringToUtf8(location) } location = new URL(location, responseURL(response)) } // 4. If location is a URL whose fragment is null, then set location’s // fragment to requestFragment. if (location && !location.hash) { location.hash = requestFragment } // 5. Return location. return location } /** * @see https://www.rfc-editor.org/rfc/rfc1738#section-2.2 * @param {string} url * @returns {boolean} */ function isValidEncodedURL (url) { for (let i = 0; i < url.length; ++i) { const code = url.charCodeAt(i) if ( code > 0x7E || // Non-US-ASCII + DEL code < 0x20 // Control characters NUL - US ) { return false } } return true } /** * If string contains non-ASCII characters, assumes it's UTF-8 encoded and decodes it. * Since UTF-8 is a superset of ASCII, this will work for ASCII strings as well. * @param {string} value * @returns {string} */ function normalizeBinaryStringToUtf8 (value) { return Buffer.from(value, 'binary').toString('utf8') } /** @returns {URL} */ function requestCurrentURL (request) { return request.urlList[request.urlList.length - 1] } function requestBadPort (request) { // 1. Let url be request’s current URL. const url = requestCurrentURL(request) // 2. If url’s scheme is an HTTP(S) scheme and url’s port is a bad port, // then return blocked. if (urlIsHttpHttpsScheme(url) && badPortsSet.has(url.port)) { return 'blocked' } // 3. Return allowed. return 'allowed' } function isErrorLike (object) { return object instanceof Error || ( object?.constructor?.name === 'Error' || object?.constructor?.name === 'DOMException' ) } // Check whether |statusText| is a ByteString and // matches the Reason-Phrase token production. // RFC 2616: https://tools.ietf.org/html/rfc2616 // RFC 7230: https://tools.ietf.org/html/rfc7230 // "reason-phrase = *( HTAB / SP / VCHAR / obs-text )" // https://github.com/chromium/chromium/blob/94.0.4604.1/third_party/blink/renderer/core/fetch/response.cc#L116 function isValidReasonPhrase (statusText) { for (let i = 0; i < statusText.length; ++i) { const c = statusText.charCodeAt(i) if ( !( ( c === 0x09 || // HTAB (c >= 0x20 && c <= 0x7e) || // SP / VCHAR (c >= 0x80 && c <= 0xff) ) // obs-text ) ) { return false } } return true } /** * @see https://fetch.spec.whatwg.org/#header-name * @param {string} potentialValue */ const isValidHeaderName = isValidHTTPToken /** * @see https://fetch.spec.whatwg.org/#header-value * @param {string} potentialValue */ function isValidHeaderValue (potentialValue) { // - Has no leading or trailing HTTP tab or space bytes. // - Contains no 0x00 (NUL) or HTTP newline bytes. return ( potentialValue[0] === '\t' || potentialValue[0] === ' ' || potentialValue[potentialValue.length - 1] === '\t' || potentialValue[potentialValue.length - 1] === ' ' || potentialValue.includes('\n') || potentialValue.includes('\r') || potentialValue.includes('\0') ) === false } // https://w3c.github.io/webappsec-referrer-policy/#set-requests-referrer-policy-on-redirect function setRequestReferrerPolicyOnRedirect (request, actualResponse) { // Given a request request and a response actualResponse, this algorithm // updates request’s referrer policy according to the Referrer-Policy // header (if any) in actualResponse. // 1. Let policy be the result of executing § 8.1 Parse a referrer policy // from a Referrer-Policy header on actualResponse. // 8.1 Parse a referrer policy from a Referrer-Policy header // 1. Let policy-tokens be the result of extracting header list values given `Referrer-Policy` and response’s header list. const { headersList } = actualResponse // 2. Let policy be the empty string. // 3. For each token in policy-tokens, if token is a referrer policy and token is not the empty string, then set policy to token. // 4. Return policy. const policyHeader = (headersList.get('referrer-policy', true) ?? '').split(',') // Note: As the referrer-policy can contain multiple policies // separated by comma, we need to loop through all of them // and pick the first valid one. // Ref: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Referrer-Policy#specify_a_fallback_policy let policy = '' if (policyHeader.length > 0) { // The right-most policy takes precedence. // The left-most policy is the fallback. for (let i = policyHeader.length; i !== 0; i--) { const token = policyHeader[i - 1].trim() if (referrerPolicyTokens.has(token)) { policy = token break } } } // 2. If policy is not the empty string, then set request’s referrer policy to policy. if (policy !== '') { request.referrerPolicy = policy } } // https://fetch.spec.whatwg.org/#cross-origin-resource-policy-check function crossOriginResourcePolicyCheck () { // TODO return 'allowed' } // https://fetch.spec.whatwg.org/#concept-cors-check function corsCheck () { // TODO return 'success' } // https://fetch.spec.whatwg.org/#concept-tao-check function TAOCheck () { // TODO return 'success' } function appendFetchMetadata (httpRequest) { // https://w3c.github.io/webappsec-fetch-metadata/#sec-fetch-dest-header // TODO // https://w3c.github.io/webappsec-fetch-metadata/#sec-fetch-mode-header // 1. Assert: r’s url is a potentially trustworthy URL. // TODO // 2. Let header be a Structured Header whose value is a token. let header = null // 3. Set header’s value to r’s mode. header = httpRequest.mode // 4. Set a structured field value `Sec-Fetch-Mode`/header in r’s header list. httpRequest.headersList.set('sec-fetch-mode', header, true) // https://w3c.github.io/webappsec-fetch-metadata/#sec-fetch-site-header // TODO // https://w3c.github.io/webappsec-fetch-metadata/#sec-fetch-user-header // TODO } // https://fetch.spec.whatwg.org/#append-a-request-origin-header function appendRequestOriginHeader (request) { // 1. Let serializedOrigin be the result of byte-serializing a request origin // with request. // TODO: implement "byte-serializing a request origin" let serializedOrigin = request.origin // - "'client' is changed to an origin during fetching." // This doesn't happen in undici (in most cases) because undici, by default, // has no concept of origin. // - request.origin can also be set to request.client.origin (client being // an environment settings object), which is undefined without using // setGlobalOrigin. if (serializedOrigin === 'client' || serializedOrigin === undefined) { return } // 2. If request’s response tainting is "cors" or request’s mode is "websocket", // then append (`Origin`, serializedOrigin) to request’s header list. // 3. Otherwise, if request’s method is neither `GET` nor `HEAD`, then: if (request.responseTainting === 'cors' || request.mode === 'websocket') { request.headersList.append('origin', serializedOrigin, true) } else if (request.method !== 'GET' && request.method !== 'HEAD') { // 1. Switch on request’s referrer policy: switch (request.referrerPolicy) { case 'no-referrer': // Set serializedOrigin to `null`. serializedOrigin = null break case 'no-referrer-when-downgrade': case 'strict-origin': case 'strict-origin-when-cross-origin': // If request’s origin is a tuple origin, its scheme is "https", and // request’s current URL’s scheme is not "https", then set // serializedOrigin to `null`. if (request.origin && urlHasHttpsScheme(request.origin) && !urlHasHttpsScheme(requestCurrentURL(request))) { serializedOrigin = null } break case 'same-origin': // If request’s origin is not same origin with request’s current URL’s // origin, then set serializedOrigin to `null`. if (!sameOrigin(request, requestCurrentURL(request))) { serializedOrigin = null } break default: // Do nothing. } // 2. Append (`Origin`, serializedOrigin) to request’s header list. request.headersList.append('origin', serializedOrigin, true) } } // https://w3c.github.io/hr-time/#dfn-coarsen-time function coarsenTime (timestamp, crossOriginIsolatedCapability) { // TODO return timestamp } // https://fetch.spec.whatwg.org/#clamp-and-coarsen-connection-timing-info function clampAndCoarsenConnectionTimingInfo (connectionTimingInfo, defaultStartTime, crossOriginIsolatedCapability) { if (!connectionTimingInfo?.startTime || connectionTimingInfo.startTime < defaultStartTime) { return { domainLookupStartTime: defaultStartTime, domainLookupEndTime: defaultStartTime, connectionStartTime: defaultStartTime, connectionEndTime: defaultStartTime, secureConnectionStartTime: defaultStartTime, ALPNNegotiatedProtocol: connectionTimingInfo?.ALPNNegotiatedProtocol } } return { domainLookupStartTime: coarsenTime(connectionTimingInfo.domainLookupStartTime, crossOriginIsolatedCapability), domainLookupEndTime: coarsenTime(connectionTimingInfo.domainLookupEndTime, crossOriginIsolatedCapability), connectionStartTime: coarsenTime(connectionTimingInfo.connectionStartTime, crossOriginIsolatedCapability), connectionEndTime: coarsenTime(connectionTimingInfo.connectionEndTime, crossOriginIsolatedCapability), secureConnectionStartTime: coarsenTime(connectionTimingInfo.secureConnectionStartTime, crossOriginIsolatedCapability), ALPNNegotiatedProtocol: connectionTimingInfo.ALPNNegotiatedProtocol } } // https://w3c.github.io/hr-time/#dfn-coarsened-shared-current-time function coarsenedSharedCurrentTime (crossOriginIsolatedCapability) { return coarsenTime(performance.now(), crossOriginIsolatedCapability) } // https://fetch.spec.whatwg.org/#create-an-opaque-timing-info function createOpaqueTimingInfo (timingInfo) { return { startTime: timingInfo.startTime ?? 0, redirectStartTime: 0, redirectEndTime: 0, postRedirectStartTime: timingInfo.startTime ?? 0, finalServiceWorkerStartTime: 0, finalNetworkResponseStartTime: 0, finalNetworkRequestStartTime: 0, endTime: 0, encodedBodySize: 0, decodedBodySize: 0, finalConnectionTimingInfo: null } } // https://html.spec.whatwg.org/multipage/origin.html#policy-container function makePolicyContainer () { // Note: the fetch spec doesn't make use of embedder policy or CSP list return { referrerPolicy: 'strict-origin-when-cross-origin' } } // https://html.spec.whatwg.org/multipage/origin.html#clone-a-policy-container function clonePolicyContainer (policyContainer) { return { referrerPolicy: policyContainer.referrerPolicy } } // https://w3c.github.io/webappsec-referrer-policy/#determine-requests-referrer function determineRequestsReferrer (request) { // 1. Let policy be request's referrer policy. const policy = request.referrerPolicy // Note: policy cannot (shouldn't) be null or an empty string. assert(policy) // 2. Let environment be request’s client. let referrerSource = null // 3. Switch on request’s referrer: if (request.referrer === 'client') { // Note: node isn't a browser and doesn't implement document/iframes, // so we bypass this step and replace it with our own. const globalOrigin = getGlobalOrigin() if (!globalOrigin || globalOrigin.origin === 'null') { return 'no-referrer' } // note: we need to clone it as it's mutated referrerSource = new URL(globalOrigin) } else if (request.referrer instanceof URL) { // Let referrerSource be request’s referrer. referrerSource = request.referrer } // 4. Let request’s referrerURL be the result of stripping referrerSource for // use as a referrer. let referrerURL = stripURLForReferrer(referrerSource) // 5. Let referrerOrigin be the result of stripping referrerSource for use as // a referrer, with the origin-only flag set to true. const referrerOrigin = stripURLForReferrer(referrerSource, true) // 6. If the result of serializing referrerURL is a string whose length is // greater than 4096, set referrerURL to referrerOrigin. if (referrerURL.toString().length > 4096) { referrerURL = referrerOrigin } const areSameOrigin = sameOrigin(request, referrerURL) const isNonPotentiallyTrustWorthy = isURLPotentiallyTrustworthy(referrerURL) && !isURLPotentiallyTrustworthy(request.url) // 8. Execute the switch statements corresponding to the value of policy: switch (policy) { case 'origin': return referrerOrigin != null ? referrerOrigin : stripURLForReferrer(referrerSource, true) case 'unsafe-url': return referrerURL case 'same-origin': return areSameOrigin ? referrerOrigin : 'no-referrer' case 'origin-when-cross-origin': return areSameOrigin ? referrerURL : referrerOrigin case 'strict-origin-when-cross-origin': { const currentURL = requestCurrentURL(request) // 1. If the origin of referrerURL and the origin of request’s current // URL are the same, then return referrerURL. if (sameOrigin(referrerURL, currentURL)) { return referrerURL } // 2. If referrerURL is a potentially trustworthy URL and request’s // current URL is not a potentially trustworthy URL, then return no // referrer. if (isURLPotentiallyTrustworthy(referrerURL) && !isURLPotentiallyTrustworthy(currentURL)) { return 'no-referrer' } // 3. Return referrerOrigin. return referrerOrigin } case 'strict-origin': // eslint-disable-line /** * 1. If referrerURL is a potentially trustworthy URL and * request’s current URL is not a potentially trustworthy URL, * then return no referrer. * 2. Return referrerOrigin */ case 'no-referrer-when-downgrade': // eslint-disable-line /** * 1. If referrerURL is a potentially trustworthy URL and * request’s current URL is not a potentially trustworthy URL, * then return no referrer. * 2. Return referrerOrigin */ default: // eslint-disable-line return isNonPotentiallyTrustWorthy ? 'no-referrer' : referrerOrigin } } /** * @see https://w3c.github.io/webappsec-referrer-policy/#strip-url * @param {URL} url * @param {boolean|undefined} originOnly */ function stripURLForReferrer (url, originOnly) { // 1. Assert: url is a URL. assert(url instanceof URL) url = new URL(url) // 2. If url’s scheme is a local scheme, then return no referrer. if (url.protocol === 'file:' || url.protocol === 'about:' || url.protocol === 'blank:') { return 'no-referrer' } // 3. Set url’s username to the empty string. url.username = '' // 4. Set url’s password to the empty string. url.password = '' // 5. Set url’s fragment to null. url.hash = '' // 6. If the origin-only flag is true, then: if (originOnly) { // 1. Set url’s path to « the empty string ». url.pathname = '' // 2. Set url’s query to null. url.search = '' } // 7. Return url. return url } function isURLPotentiallyTrustworthy (url) { if (!(url instanceof URL)) { return false } // If child of about, return true if (url.href === 'about:blank' || url.href === 'about:srcdoc') { return true } // If scheme is data, return true if (url.protocol === 'data:') return true // If file, return true if (url.protocol === 'file:') return true return isOriginPotentiallyTrustworthy(url.origin) function isOriginPotentiallyTrustworthy (origin) { // If origin is explicitly null, return false if (origin == null || origin === 'null') return false const originAsURL = new URL(origin) // If secure, return true if (originAsURL.protocol === 'https:' || originAsURL.protocol === 'wss:') { return true } // If localhost or variants, return true if (/^127(?:\.[0-9]+){0,2}\.[0-9]+$|^\[(?:0*:)*?:?0*1\]$/.test(originAsURL.hostname) || (originAsURL.hostname === 'localhost' || originAsURL.hostname.includes('localhost.')) || (originAsURL.hostname.endsWith('.localhost'))) { return true } // If any other, return false return false } } /** * @see https://w3c.github.io/webappsec-subresource-integrity/#does-response-match-metadatalist * @param {Uint8Array} bytes * @param {string} metadataList */ function bytesMatch (bytes, metadataList) { // If node is not built with OpenSSL support, we cannot check // a request's integrity, so allow it by default (the spec will // allow requests if an invalid hash is given, as precedence). /* istanbul ignore if: only if node is built with --without-ssl */ if (crypto === undefined) { return true } // 1. Let parsedMetadata be the result of parsing metadataList. const parsedMetadata = parseMetadata(metadataList) // 2. If parsedMetadata is no metadata, return true. if (parsedMetadata === 'no metadata') { return true } // 3. If response is not eligible for integrity validation, return false. // TODO // 4. If parsedMetadata is the empty set, return true. if (parsedMetadata.length === 0) { return true } // 5. Let metadata be the result of getting the strongest // metadata from parsedMetadata. const strongest = getStrongestMetadata(parsedMetadata) const metadata = filterMetadataListByAlgorithm(parsedMetadata, strongest) // 6. For each item in metadata: for (const item of metadata) { // 1. Let algorithm be the alg component of item. const algorithm = item.algo // 2. Let expectedValue be the val component of item. const expectedValue = item.hash // See https://github.com/web-platform-tests/wpt/commit/e4c5cc7a5e48093220528dfdd1c4012dc3837a0e // "be liberal with padding". This is annoying, and it's not even in the spec. // 3. Let actualValue be the result of applying algorithm to bytes. let actualValue = crypto.createHash(algorithm).update(bytes).digest('base64') if (actualValue[actualValue.length - 1] === '=') { if (actualValue[actualValue.length - 2] === '=') { actualValue = actualValue.slice(0, -2) } else { actualValue = actualValue.slice(0, -1) } } // 4. If actualValue is a case-sensitive match for expectedValue, // return true. if (compareBase64Mixed(actualValue, expectedValue)) { return true } } // 7. Return false. return false } // https://w3c.github.io/webappsec-subresource-integrity/#grammardef-hash-with-options // https://www.w3.org/TR/CSP2/#source-list-syntax // https://www.rfc-editor.org/rfc/rfc5234#appendix-B.1 const parseHashWithOptions = /(?<algo>sha256|sha384|sha512)-((?<hash>[A-Za-z0-9+/]+|[A-Za-z0-9_-]+)={0,2}(?:\s|$)( +[!-~]*)?)?/i /** * @see https://w3c.github.io/webappsec-subresource-integrity/#parse-metadata * @param {string} metadata */ function parseMetadata (metadata) { // 1. Let result be the empty set. /** @type {{ algo: string, hash: string }[]} */ const result = [] // 2. Let empty be equal to true. let empty = true // 3. For each token returned by splitting metadata on spaces: for (const token of metadata.split(' ')) { // 1. Set empty to false. empty = false // 2. Parse token as a hash-with-options. const parsedToken = parseHashWithOptions.exec(token) // 3. If token does not parse, continue to the next token. if ( parsedToken === null || parsedToken.groups === undefined || parsedToken.groups.algo === undefined ) { // Note: Chromium blocks the request at this point, but Firefox // gives a warning that an invalid integrity was given. The // correct behavior is to ignore these, and subsequently not // check the integrity of the resource. continue } // 4. Let algorithm be the hash-algo component of token. const algorithm = parsedToken.groups.algo.toLowerCase() // 5. If algorithm is a hash function recognized by the user // agent, add the parsed token to result. if (supportedHashes.includes(algorithm)) { result.push(parsedToken.groups) } } // 4. Return no metadata if empty is true, otherwise return result. if (empty === true) { return 'no metadata' } return result } /** * @param {{ algo: 'sha256' | 'sha384' | 'sha512' }[]} metadataList */ function getStrongestMetadata (metadataList) { // Let algorithm be the algo component of the first item in metadataList. // Can be sha256 let algorithm = metadataList[0].algo // If the algorithm is sha512, then it is the strongest // and we can return immediately if (algorithm[3] === '5') { return algorithm } for (let i = 1; i < metadataList.length; ++i) { const metadata = metadataList[i] // If the algorithm is sha512, then it is the strongest // and we can break the loop immediately if (metadata.algo[3] === '5') { algorithm = 'sha512' break // If the algorithm is sha384, then a potential sha256 or sha384 is ignored } else if (algorithm[3] === '3') { continue // algorithm is sha256, check if algorithm is sha384 and if so, set it as // the strongest } else if (metadata.algo[3] === '3') { algorithm = 'sha384' } } return algorithm } function filterMetadataListByAlgorithm (metadataList, algorithm) { if (metadataList.length === 1) { return metadataList } let pos = 0 for (let i = 0; i < metadataList.length; ++i) { if (metadataList[i].algo === algorithm) { metadataList[pos++] = metadataList[i] } } metadataList.length = pos return metadataList } /** * Compares two base64 strings, allowing for base64url * in the second string. * * @param {string} actualValue always base64 * @param {string} expectedValue base64 or base64url * @returns {boolean} */ function compareBase64Mixed (actualValue, expectedValue) { if (actualValue.length !== expectedValue.length) { return false } for (let i = 0; i < actualValue.length; ++i) { if (actualValue[i] !== expectedValue[i]) { if ( (actualValue[i] === '+' && expectedValue[i] === '-') || (actualValue[i] === '/' && expectedValue[i] === '_') ) { continue } return false } } return true } // https://w3c.github.io/webappsec-upgrade-insecure-requests/#upgrade-request function tryUpgradeRequestToAPotentiallyTrustworthyURL (request) { // TODO } /** * @link {https://html.spec.whatwg.org/multipage/origin.html#same-origin} * @param {URL} A * @param {URL} B */ function sameOrigin (A, B) { // 1. If A and B are the same opaque origin, then return true. if (A.origin === B.origin && A.origin === 'null') { return true } // 2. If A and B are both tuple origins and their schemes, // hosts, and port are identical, then return true. if (A.protocol === B.protocol && A.hostname === B.hostname && A.port === B.port) { return true } // 3. Return false. return false } function createDeferredPromise () { let res let rej const promise = new Promise((resolve, reject) => { res = resolve rej = reject }) return { promise, resolve: res, reject: rej } } function isAborted (fetchParams) { return fetchParams.controller.state === 'aborted' } function isCancelled (fetchParams) { return fetchParams.controller.state === 'aborted' || fetchParams.controller.state === 'terminated' } /** * @see https://fetch.spec.whatwg.org/#concept-method-normalize * @param {string} method */ function normalizeMethod (method) { return normalizedMethodRecordsBase[method.toLowerCase()] ?? method } // https://infra.spec.whatwg.org/#serialize-a-javascript-value-to-a-json-string function serializeJavascriptValueToJSONString (value) { // 1. Let result be ? Call(%JSON.stringify%, undefined, « value »). const result = JSON.stringify(value) // 2. If result is undefined, then throw a TypeError. if (result === undefined) { throw new TypeError('Value is not JSON serializable') } // 3. Assert: result is a string. assert(typeof result === 'string') // 4. Return result. return result } // https://tc39.es/ecma262/#sec-%25iteratorprototype%25-object const esIteratorPrototype = Object.getPrototypeOf(Object.getPrototypeOf([][Symbol.iterator]())) /** * @see https://webidl.spec.whatwg.org/#dfn-iterator-prototype-object * @param {string} name name of the instance * @param {symbol} kInternalIterator * @param {string | number} [keyIndex] * @param {string | number} [valueIndex] */ function createIterator (name, kInternalIterator, keyIndex = 0, valueIndex = 1) { class FastIterableIterator { /** @type {any} */ #target /** @type {'key' | 'value' | 'key+value'} */ #kind /** @type {number} */ #index /** * @see https://webidl.spec.whatwg.org/#dfn-default-iterator-object * @param {unknown} target * @param {'key' | 'value' | 'key+value'} kind */ constructor (target, kind) { this.#target = target this.#kind = kind this.#index = 0 } next () { // 1. Let interface be the interface for which the iterator prototype object exists. // 2. Let thisValue be the this value. // 3. Let object be ? ToObject(thisValue). // 4. If object is a platform object, then perform a security // check, passing: // 5. If object is not a default iterator object for interface, // then throw a TypeError. if (typeof this !== 'object' || this === null || !(#target in this)) { throw new TypeError( `'next' called on an object that does not implement interface ${name} Iterator.` ) } // 6. Let index be object’s index. // 7. Let kind be object’s kind. // 8. Let values be object’s target's value pairs to iterate over. const index = this.#index const values = this.#target[kInternalIterator] // 9. Let len be the length of values. const len = values.length // 10. If index is greater than or equal to len, then return // CreateIterResultObject(undefined, true). if (index >= len) { return { value: undefined, done: true } } // 11. Let pair be the entry in values at index index. const { [keyIndex]: key, [valueIndex]: value } = values[index] // 12. Set object’s index to index + 1. this.#index = index + 1 // 13. Return the iterator result for pair and kind. // https://webidl.spec.whatwg.org/#iterator-result // 1. Let result be a value determined by the value of kind: let result switch (this.#kind) { case 'key': // 1. Let idlKey be pair’s key. // 2. Let key be the result of converting idlKey to an // ECMAScript value. // 3. result is key. result = key break case 'value': // 1. Let idlValue be pair’s value. // 2. Let value be the result of converting idlValue to // an ECMAScript value. // 3. result is value. result = value break case 'key+value': // 1. Let idlKey be pair’s key. // 2. Let idlValue be pair’s value. // 3. Let key be the result of converting idlKey to an // ECMAScript value. // 4. Let value be the result of converting idlValue to // an ECMAScript value. // 5. Let array be ! ArrayCreate(2). // 6. Call ! CreateDataProperty(array, "0", key). // 7. Call ! CreateDataProperty(array, "1", value). // 8. result is array. result = [key, value] break } // 2. Return CreateIterResultObject(result, false). return { value: result, done: false } } } // https://webidl.spec.whatwg.org/#dfn-iterator-prototype-object // @ts-ignore delete FastIterableIterator.prototype.constructor Object.setPrototypeOf(FastIterableIterator.prototype, esIteratorPrototype) Object.defineProperties(FastIterableIterator.prototype, { [Symbol.toStringTag]: { writable: false, enumerable: false, configurable: true, value: `${name} Iterator` }, next: { writable: true, enumerable: true, configurable: true } }) /** * @param {unknown} target * @param {'key' | 'value' | 'key+value'} kind * @returns {IterableIterator<any>} */ return function (target, kind) { return new FastIterableIterator(target, kind) } } /** * @see https://webidl.spec.whatwg.org/#dfn-iterator-prototype-object * @param {string} name name of the instance * @param {any} object class * @param {symbol} kInternalIterator * @param {string | number} [keyIndex] * @param {string | number} [valueIndex] */ function iteratorMixin (name, object, kInternalIterator, keyIndex = 0, valueIndex = 1) { const makeIterator = createIterator(name, kInternalIterator, keyIndex, valueIndex) const properties = { keys: { writable: true, enumerable: true, configurable: true, value: function keys () { webidl.brandCheck(this, object) return makeIterator(this, 'key') } }, values: { writable: true, enumerable: true, configurable: true, value: function values () { webidl.brandCheck(this, object) return makeIterator(this, 'value') } }, entries: { writable: true, enumerable: true, configurable: true, value: function entries () { webidl.brandCheck(this, object) return makeIterator(this, 'key+value') } }, forEach: { writable: true, enumerable: true, configurable: true, value: function forEach (callbackfn, thisArg = globalThis) { webidl.brandCheck(this, object) webidl.argumentLengthCheck(arguments, 1, `${name}.forEach`) if (typeof callbackfn !== 'function') { throw new TypeError( `Failed to execute 'forEach' on '${name}': parameter 1 is not of type 'Function'.` ) } for (const { 0: key, 1: value } of makeIterator(this, 'key+value')) { callbackfn.call(thisArg, value, key, this) } } } } return Object.defineProperties(object.prototype, { ...properties, [Symbol.iterator]: { writable: true, enumerable: false, configurable: true, value: properties.entries.value } }) } /** * @see https://fetch.spec.whatwg.org/#body-fully-read */ async function fullyReadBody (body, processBody, processBodyError) { // 1. If taskDestination is null, then set taskDestination to // the result of starting a new parallel queue. // 2. Let successSteps given a byte sequence bytes be to queue a // fetch task to run processBody given bytes, with taskDestination. const successSteps = processBody // 3. Let errorSteps be to queue a fetch task to run processBodyError, // with taskDestination. const errorSteps = processBodyError // 4. Let reader be the result of getting a reader for body’s stream. // If that threw an exception, then run errorSteps with that // exception and return. let reader try { reader = body.stream.getReader() } catch (e) { errorSteps(e) return } // 5. Read all bytes from reader, given successSteps and errorSteps. try { successSteps(await readAllBytes(reader)) } catch (e) { errorSteps(e) } } function isReadableStreamLike (stream) { return stream instanceof ReadableStream || ( stream[Symbol.toStringTag] === 'ReadableStream' && typeof stream.tee === 'function' ) } /** * @param {ReadableStreamController<Uint8Array>} controller */ function readableStreamClose (controller) { try { controller.close() controller.byobRequest?.respond(0) } catch (err) { // TODO: add comment explaining why this error occurs. if (!err.message.includes('Controller is already closed') && !err.message.includes('ReadableStream is already closed')) { throw err } } } const invalidIsomorphicEncodeValueRegex = /[^\x00-\xFF]/ // eslint-disable-line /** * @see https://infra.spec.whatwg.org/#isomorphic-encode * @param {string} input */ function isomorphicEncode (input) { // 1. Assert: input contains no code points greater than U+00FF. assert(!invalidIsomorphicEncodeValueRegex.test(input)) // 2. Return a byte sequence whose length is equal to input’s code // point length and whose bytes have the same values as the // values of input’s code points, in the same order return input } /** * @see https://streams.spec.whatwg.org/#readablestreamdefaultreader-read-all-bytes * @see https://streams.spec.whatwg.org/#read-loop * @param {ReadableStreamDefaultReader} reader */ async function readAllBytes (reader) { const bytes = [] let byteLength = 0 while (true) { const { done, value: chunk } = await reader.read() if (done) { // 1. Call successSteps with bytes. return Buffer.concat(bytes, byteLength) } // 1. If chunk is not a Uint8Array object, call failureSteps // with a TypeError and abort these steps. if (!isUint8Array(chunk)) { throw new TypeError('Received non-Uint8Array chunk') } // 2. Append the bytes represented by chunk to bytes. bytes.push(chunk) byteLength += chunk.length // 3. Read-loop given reader, bytes, successSteps, and failureSteps. } } /** * @see https://fetch.spec.whatwg.org/#is-local * @param {URL} url */ function urlIsLocal (url) { assert('protocol' in url) // ensure it's a url object const protocol = url.protocol return protocol === 'about:' || protocol === 'blob:' || protocol === 'data:' } /** * @param {string|URL} url * @returns {boolean} */ function urlHasHttpsScheme (url) { return ( ( typeof url === 'string' && url[5] === ':' && url[0] === 'h' && url[1] === 't' && url[2] === 't' && url[3] === 'p' && url[4] === 's' ) || url.protocol === 'https:' ) } /** * @see https://fetch.spec.whatwg.org/#http-scheme * @param {URL} url */ function urlIsHttpHttpsScheme (url) { assert('protocol' in url) // ensure it's a url object const protocol = url.protocol return protocol === 'http:' || protocol === 'https:' } /** * @see https://fetch.spec.whatwg.org/#simple-range-header-value * @param {string} value * @param {boolean} allowWhitespace */ function simpleRangeHeaderValue (value, allowWhitespace) { // 1. Let data be the isomorphic decoding of value. // Note: isomorphic decoding takes a sequence of bytes (ie. a Uint8Array) and turns it into a string, // nothing more. We obviously don't need to do that if value is a string already. const data = value // 2. If data does not start with "bytes", then return failure. if (!data.startsWith('bytes')) { return 'failure' } // 3. Let position be a position variable for data, initially pointing at the 5th code point of data. const position = { position: 5 } // 4. If allowWhitespace is true, collect a sequence of code points that are HTTP tab or space, // from data given position. if (allowWhitespace) { collectASequenceOfCodePoints( (char) => char === '\t' || char === ' ', data, position ) } // 5. If the code point at position within data is not U+003D (=), then return failure. if (data.charCodeAt(position.position) !== 0x3D) { return 'failure' } // 6. Advance position by 1. position.position++ // 7. If allowWhitespace is true, collect a sequence of code points that are HTTP tab or space, from // data given position. if (allowWhitespace) { collectASequenceOfCodePoints( (char) => char === '\t' || char === ' ', data, position ) } // 8. Let rangeStart be the result of collecting a sequence of code points that are ASCII digits, // from data given position. const rangeStart = collectASequenceOfCodePoints( (char) => { const code = char.charCodeAt(0) return code >= 0x30 && code <= 0x39 }, data, position ) // 9. Let rangeStartValue be rangeStart, interpreted as decimal number, if rangeStart is not the // empty string; otherwise null. const rangeStartValue = rangeStart.length ? Number(rangeStart) : null // 10. If allowWhitespace is true, collect a sequence of code points that are HTTP tab or space, // from data given position. if (allowWhitespace) { collectASequenceOfCodePoints( (char) => char === '\t' || char === ' ', data, position ) } // 11. If the code point at position within data is not U+002D (-), then return failure. if (data.charCodeAt(position.position) !== 0x2D) { return 'failure' } // 12. Advance position by 1. position.position++ // 13. If allowWhitespace is true, collect a sequence of code points that are HTTP tab // or space, from data given position. // Note from Khafra: its the same step as in #8 again lol if (allowWhitespace) { collectASequenceOfCodePoints( (char) => char === '\t' || char === ' ', data, position ) } // 14. Let rangeEnd be the result of collecting a sequence of code points that are // ASCII digits, from data given position. // Note from Khafra: you wouldn't guess it, but this is also the same step as #8 const rangeEnd = collectASequenceOfCodePoints( (char) => { const code = char.charCodeAt(0) return code >= 0x30 && code <= 0x39 }, data, position ) // 15. Let rangeEndValue be rangeEnd, interpreted as decimal number, if rangeEnd // is not the empty string; otherwise null. // Note from Khafra: THE SAME STEP, AGAIN!!! // Note: why interpret as a decimal if we only collect ascii digits? const rangeEndValue = rangeEnd.length ? Number(rangeEnd) : null // 16. If position is not past the end of data, then return failure. if (position.position < data.length) { return 'failure' } // 17. If rangeEndValue and rangeStartValue are null, then return failure. if (rangeEndValue === null && rangeStartValue === null) { return 'failure' } // 18. If rangeStartValue and rangeEndValue are numbers, and rangeStartValue is // greater than rangeEndValue, then return failure. // Note: ... when can they not be numbers? if (rangeStartValue > rangeEndValue) { return 'failure' } // 19. Return (rangeStartValue, rangeEndValue). return { rangeStartValue, rangeEndValue } } /** * @see https://fetch.spec.whatwg.org/#build-a-content-range * @param {number} rangeStart * @param {number} rangeEnd * @param {number} fullLength */ function buildContentRange (rangeStart, rangeEnd, fullLength) { // 1. Let contentRange be `bytes `. let contentRange = 'bytes ' // 2. Append rangeStart, serialized and isomorphic encoded, to contentRange. contentRange += isomorphicEncode(`${rangeStart}`) // 3. Append 0x2D (-) to contentRange. contentRange += '-' // 4. Append rangeEnd, serialized and isomorphic encoded to contentRange. contentRange += isomorphicEncode(`${rangeEnd}`) // 5. Append 0x2F (/) to contentRange. contentRange += '/' // 6. Append fullLength, serialized and isomorphic encoded to contentRange. contentRange += isomorphicEncode(`${fullLength}`) // 7. Return contentRange. return contentRange } // A Stream, which pipes the response to zlib.createInflate() or // zlib.createInflateRaw() depending on the first byte of the Buffer. // If the lower byte of the first byte is 0x08, then the stream is // interpreted as a zlib stream, otherwise it's interpreted as a // raw deflate stream. class InflateStream extends Transform { #zlibOptions /** @param {zlib.ZlibOptions} [zlibOptions] */ constructor (zlibOptions) { super() this.#zlibOptions = zlibOptions } _transform (chunk, encoding, callback) { if (!this._inflateStream) { if (chunk.length === 0) { callback() return } this._inflateStream = (chunk[0] & 0x0F) === 0x08 ? zlib.createInflate(this.#zlibOptions) : zlib.createInflateRaw(this.#zlibOptions) this._inflateStream.on('data', this.push.bind(this)) this._inflateStream.on('end', () => this.push(null)) this._inflateStream.on('error', (err) => this.destroy(err)) } this._inflateStream.write(chunk, encoding, callback) } _final (callback) { if (this._inflateStream) { this._inflateStream.end() this._inflateStream = null } callback() } } /** * @param {zlib.ZlibOptions} [zlibOptions] * @returns {InflateStream} */ function createInflate (zlibOptions) { return new InflateStream(zlibOptions) } /** * @see https://fetch.spec.whatwg.org/#concept-header-extract-mime-type * @param {import('./headers').HeadersList} headers */ function extractMimeType (headers) { // 1. Let charset be null. let charset = null // 2. Let essence be null. let essence = null // 3. Let mimeType be null. let mimeType = null // 4. Let values be the result of getting, decoding, and splitting `Content-Type` from headers. const values = getDecodeSplit('content-type', headers) // 5. If values is null, then return failure. if (values === null) { return 'failure' } // 6. For each value of values: for (const value of values) { // 6.1. Let temporaryMimeType be the result of parsing value. const temporaryMimeType = parseMIMEType(value) // 6.2. If temporaryMimeType is failure or its essence is "*/*", then continue. if (temporaryMimeType === 'failure' || temporaryMimeType.essence === '*/*') { continue } // 6.3. Set mimeType to temporaryMimeType. mimeType = temporaryMimeType // 6.4. If mimeType’s essence is not essence, then: if (mimeType.essence !== essence) { // 6.4.1. Set charset to null. charset = null // 6.4.2. If mimeType’s parameters["charset"] exists, then set charset to // mimeType’s parameters["charset"]. if (mimeType.parameters.has('charset')) { charset = mimeType.parameters.get('charset') } // 6.4.3. Set essence to mimeType’s essence. essence = mimeType.essence } else if (!mimeType.parameters.has('charset') && charset !== null) { // 6.5. Otherwise, if mimeType’s parameters["charset"] does not exist, and // charset is non-null, set mimeType’s parameters["charset"] to charset. mimeType.parameters.set('charset', charset) } } // 7. If mimeType is null, then return failure. if (mimeType == null) { return 'failure' } // 8. Return mimeType. return mimeType } /** * @see https://fetch.spec.whatwg.org/#header-value-get-decode-and-split * @param {string|null} value */ function gettingDecodingSplitting (value) { // 1. Let input be the result of isomorphic decoding value. const input = value // 2. Let position be a position variable for input, initially pointing at the start of input. const position = { position: 0 } // 3. Let values be a list of strings, initially empty. const values = [] // 4. Let temporaryValue be the empty string. let temporaryValue = '' // 5. While position is not past the end of input: while (position.position < input.length) { // 5.1. Append the result of collecting a sequence of code points that are not U+0022 (") // or U+002C (,) from input, given position, to temporaryValue. temporaryValue += collectASequenceOfCodePoints( (char) => char !== '"' && char !== ',', input, position ) // 5.2. If position is not past the end of input, then: if (position.position < input.length) { // 5.2.1. If the code point at position within input is U+0022 ("), then: if (input.charCodeAt(position.position) === 0x22) { // 5.2.1.1. Append the result of collecting an HTTP quoted string from input, given position, to temporaryValue. temporaryValue += collectAnHTTPQuotedString( input, position ) // 5.2.1.2. If position is not past the end of input, then continue. if (position.position < input.length) { continue } } else { // 5.2.2. Otherwise: // 5.2.2.1. Assert: the code point at position within input is U+002C (,). assert(input.charCodeAt(position.position) === 0x2C) // 5.2.2.2. Advance position by 1. position.position++ } } // 5.3. Remove all HTTP tab or space from the start and end of temporaryValue. temporaryValue = removeChars(temporaryValue, true, true, (char) => char === 0x9 || char === 0x20) // 5.4. Append temporaryValue to values. values.push(temporaryValue) // 5.6. Set temporaryValue to the empty string. temporaryValue = '' } // 6. Return values. return values } /** * @see https://fetch.spec.whatwg.org/#concept-header-list-get-decode-split * @param {string} name lowercase header name * @param {import('./headers').HeadersList} list */ function getDecodeSplit (name, list) { // 1. Let value be the result of getting name from list. const value = list.get(name, true) // 2. If value is null, then return null. if (value === null) { return null } // 3. Return the result of getting, decoding, and splitting value. return gettingDecodingSplitting(value) } const textDecoder = new TextDecoder() /** * @see https://encoding.spec.whatwg.org/#utf-8-decode * @param {Buffer} buffer */ function utf8DecodeBytes (buffer) { if (buffer.length === 0) { return '' } // 1. Let buffer be the result of peeking three bytes from // ioQueue, converted to a byte sequence. // 2. If buffer is 0xEF 0xBB 0xBF, then read three // bytes from ioQueue. (Do nothing with those bytes.) if (buffer[0] === 0xEF && buffer[1] === 0xBB && buffer[2] === 0xBF) { buffer = buffer.subarray(3) } // 3. Process a queue with an instance of UTF-8’s // decoder, ioQueue, output, and "replacement". const output = textDecoder.decode(buffer) // 4. Return output. return output } class EnvironmentSettingsObjectBase { get baseUrl () { return getGlobalOrigin() } get origin () { return this.baseUrl?.origin } policyContainer = makePolicyContainer() } class EnvironmentSettingsObject { settingsObject = new EnvironmentSettingsObjectBase() } const environmentSettingsObject = new EnvironmentSettingsObject() module.exports = { isAborted, isCancelled, isValidEncodedURL, createDeferredPromise, ReadableStreamFrom, tryUpgradeRequestToAPotentiallyTrustworthyURL, clampAndCoarsenConnectionTimingInfo, coarsenedSharedCurrentTime, determineRequestsReferrer, makePolicyContainer, clonePolicyContainer, appendFetchMetadata, appendRequestOriginHeader, TAOCheck, corsCheck, crossOriginResourcePolicyCheck, createOpaqueTimingInfo, setRequestReferrerPolicyOnRedirect, isValidHTTPToken, requestBadPort, requestCurrentURL, responseURL, responseLocationURL, isBlobLike, isURLPotentiallyTrustworthy, isValidReasonPhrase, sameOrigin, normalizeMethod, serializeJavascriptValueToJSONString, iteratorMixin, createIterator, isValidHeaderName, isValidHeaderValue, isErrorLike, fullyReadBody, bytesMatch, isReadableStreamLike, readableStreamClose, isomorphicEncode, urlIsLocal, urlHasHttpsScheme, urlIsHttpHttpsScheme, readAllBytes, simpleRangeHeaderValue, buildContentRange, parseMetadata, createInflate, extractMimeType, getDecodeSplit, utf8DecodeBytes, environmentSettingsObject } node_modules/undici/lib/web/fetch/response.js 0000664 00000045076 15114741631 0015325 0 ustar 00 'use strict' const { Headers, HeadersList, fill, getHeadersGuard, setHeadersGuard, setHeadersList } = require('./headers') const { extractBody, cloneBody, mixinBody, hasFinalizationRegistry, streamRegistry, bodyUnusable } = require('./body') const util = require('../../core/util') const nodeUtil = require('node:util') const { kEnumerableProperty } = util const { isValidReasonPhrase, isCancelled, isAborted, isBlobLike, serializeJavascriptValueToJSONString, isErrorLike, isomorphicEncode, environmentSettingsObject: relevantRealm } = require('./util') const { redirectStatusSet, nullBodyStatus } = require('./constants') const { kState, kHeaders } = require('./symbols') const { webidl } = require('./webidl') const { FormData } = require('./formdata') const { URLSerializer } = require('./data-url') const { kConstruct } = require('../../core/symbols') const assert = require('node:assert') const { types } = require('node:util') const textEncoder = new TextEncoder('utf-8') // https://fetch.spec.whatwg.org/#response-class class Response { // Creates network error Response. static error () { // The static error() method steps are to return the result of creating a // Response object, given a new network error, "immutable", and this’s // relevant Realm. const responseObject = fromInnerResponse(makeNetworkError(), 'immutable') return responseObject } // https://fetch.spec.whatwg.org/#dom-response-json static json (data, init = {}) { webidl.argumentLengthCheck(arguments, 1, 'Response.json') if (init !== null) { init = webidl.converters.ResponseInit(init) } // 1. Let bytes the result of running serialize a JavaScript value to JSON bytes on data. const bytes = textEncoder.encode( serializeJavascriptValueToJSONString(data) ) // 2. Let body be the result of extracting bytes. const body = extractBody(bytes) // 3. Let responseObject be the result of creating a Response object, given a new response, // "response", and this’s relevant Realm. const responseObject = fromInnerResponse(makeResponse({}), 'response') // 4. Perform initialize a response given responseObject, init, and (body, "application/json"). initializeResponse(responseObject, init, { body: body[0], type: 'application/json' }) // 5. Return responseObject. return responseObject } // Creates a redirect Response that redirects to url with status status. static redirect (url, status = 302) { webidl.argumentLengthCheck(arguments, 1, 'Response.redirect') url = webidl.converters.USVString(url) status = webidl.converters['unsigned short'](status) // 1. Let parsedURL be the result of parsing url with current settings // object’s API base URL. // 2. If parsedURL is failure, then throw a TypeError. // TODO: base-URL? let parsedURL try { parsedURL = new URL(url, relevantRealm.settingsObject.baseUrl) } catch (err) { throw new TypeError(`Failed to parse URL from ${url}`, { cause: err }) } // 3. If status is not a redirect status, then throw a RangeError. if (!redirectStatusSet.has(status)) { throw new RangeError(`Invalid status code ${status}`) } // 4. Let responseObject be the result of creating a Response object, // given a new response, "immutable", and this’s relevant Realm. const responseObject = fromInnerResponse(makeResponse({}), 'immutable') // 5. Set responseObject’s response’s status to status. responseObject[kState].status = status // 6. Let value be parsedURL, serialized and isomorphic encoded. const value = isomorphicEncode(URLSerializer(parsedURL)) // 7. Append `Location`/value to responseObject’s response’s header list. responseObject[kState].headersList.append('location', value, true) // 8. Return responseObject. return responseObject } // https://fetch.spec.whatwg.org/#dom-response constructor (body = null, init = {}) { webidl.util.markAsUncloneable(this) if (body === kConstruct) { return } if (body !== null) { body = webidl.converters.BodyInit(body) } init = webidl.converters.ResponseInit(init) // 1. Set this’s response to a new response. this[kState] = makeResponse({}) // 2. Set this’s headers to a new Headers object with this’s relevant // Realm, whose header list is this’s response’s header list and guard // is "response". this[kHeaders] = new Headers(kConstruct) setHeadersGuard(this[kHeaders], 'response') setHeadersList(this[kHeaders], this[kState].headersList) // 3. Let bodyWithType be null. let bodyWithType = null // 4. If body is non-null, then set bodyWithType to the result of extracting body. if (body != null) { const [extractedBody, type] = extractBody(body) bodyWithType = { body: extractedBody, type } } // 5. Perform initialize a response given this, init, and bodyWithType. initializeResponse(this, init, bodyWithType) } // Returns response’s type, e.g., "cors". get type () { webidl.brandCheck(this, Response) // The type getter steps are to return this’s response’s type. return this[kState].type } // Returns response’s URL, if it has one; otherwise the empty string. get url () { webidl.brandCheck(this, Response) const urlList = this[kState].urlList // The url getter steps are to return the empty string if this’s // response’s URL is null; otherwise this’s response’s URL, // serialized with exclude fragment set to true. const url = urlList[urlList.length - 1] ?? null if (url === null) { return '' } return URLSerializer(url, true) } // Returns whether response was obtained through a redirect. get redirected () { webidl.brandCheck(this, Response) // The redirected getter steps are to return true if this’s response’s URL // list has more than one item; otherwise false. return this[kState].urlList.length > 1 } // Returns response’s status. get status () { webidl.brandCheck(this, Response) // The status getter steps are to return this’s response’s status. return this[kState].status } // Returns whether response’s status is an ok status. get ok () { webidl.brandCheck(this, Response) // The ok getter steps are to return true if this’s response’s status is an // ok status; otherwise false. return this[kState].status >= 200 && this[kState].status <= 299 } // Returns response’s status message. get statusText () { webidl.brandCheck(this, Response) // The statusText getter steps are to return this’s response’s status // message. return this[kState].statusText } // Returns response’s headers as Headers. get headers () { webidl.brandCheck(this, Response) // The headers getter steps are to return this’s headers. return this[kHeaders] } get body () { webidl.brandCheck(this, Response) return this[kState].body ? this[kState].body.stream : null } get bodyUsed () { webidl.brandCheck(this, Response) return !!this[kState].body && util.isDisturbed(this[kState].body.stream) } // Returns a clone of response. clone () { webidl.brandCheck(this, Response) // 1. If this is unusable, then throw a TypeError. if (bodyUnusable(this)) { throw webidl.errors.exception({ header: 'Response.clone', message: 'Body has already been consumed.' }) } // 2. Let clonedResponse be the result of cloning this’s response. const clonedResponse = cloneResponse(this[kState]) // 3. Return the result of creating a Response object, given // clonedResponse, this’s headers’s guard, and this’s relevant Realm. return fromInnerResponse(clonedResponse, getHeadersGuard(this[kHeaders])) } [nodeUtil.inspect.custom] (depth, options) { if (options.depth === null) { options.depth = 2 } options.colors ??= true const properties = { status: this.status, statusText: this.statusText, headers: this.headers, body: this.body, bodyUsed: this.bodyUsed, ok: this.ok, redirected: this.redirected, type: this.type, url: this.url } return `Response ${nodeUtil.formatWithOptions(options, properties)}` } } mixinBody(Response) Object.defineProperties(Response.prototype, { type: kEnumerableProperty, url: kEnumerableProperty, status: kEnumerableProperty, ok: kEnumerableProperty, redirected: kEnumerableProperty, statusText: kEnumerableProperty, headers: kEnumerableProperty, clone: kEnumerableProperty, body: kEnumerableProperty, bodyUsed: kEnumerableProperty, [Symbol.toStringTag]: { value: 'Response', configurable: true } }) Object.defineProperties(Response, { json: kEnumerableProperty, redirect: kEnumerableProperty, error: kEnumerableProperty }) // https://fetch.spec.whatwg.org/#concept-response-clone function cloneResponse (response) { // To clone a response response, run these steps: // 1. If response is a filtered response, then return a new identical // filtered response whose internal response is a clone of response’s // internal response. if (response.internalResponse) { return filterResponse( cloneResponse(response.internalResponse), response.type ) } // 2. Let newResponse be a copy of response, except for its body. const newResponse = makeResponse({ ...response, body: null }) // 3. If response’s body is non-null, then set newResponse’s body to the // result of cloning response’s body. if (response.body != null) { newResponse.body = cloneBody(newResponse, response.body) } // 4. Return newResponse. return newResponse } function makeResponse (init) { return { aborted: false, rangeRequested: false, timingAllowPassed: false, requestIncludesCredentials: false, type: 'default', status: 200, timingInfo: null, cacheState: '', statusText: '', ...init, headersList: init?.headersList ? new HeadersList(init?.headersList) : new HeadersList(), urlList: init?.urlList ? [...init.urlList] : [] } } function makeNetworkError (reason) { const isError = isErrorLike(reason) return makeResponse({ type: 'error', status: 0, error: isError ? reason : new Error(reason ? String(reason) : reason), aborted: reason && reason.name === 'AbortError' }) } // @see https://fetch.spec.whatwg.org/#concept-network-error function isNetworkError (response) { return ( // A network error is a response whose type is "error", response.type === 'error' && // status is 0 response.status === 0 ) } function makeFilteredResponse (response, state) { state = { internalResponse: response, ...state } return new Proxy(response, { get (target, p) { return p in state ? state[p] : target[p] }, set (target, p, value) { assert(!(p in state)) target[p] = value return true } }) } // https://fetch.spec.whatwg.org/#concept-filtered-response function filterResponse (response, type) { // Set response to the following filtered response with response as its // internal response, depending on request’s response tainting: if (type === 'basic') { // A basic filtered response is a filtered response whose type is "basic" // and header list excludes any headers in internal response’s header list // whose name is a forbidden response-header name. // Note: undici does not implement forbidden response-header names return makeFilteredResponse(response, { type: 'basic', headersList: response.headersList }) } else if (type === 'cors') { // A CORS filtered response is a filtered response whose type is "cors" // and header list excludes any headers in internal response’s header // list whose name is not a CORS-safelisted response-header name, given // internal response’s CORS-exposed header-name list. // Note: undici does not implement CORS-safelisted response-header names return makeFilteredResponse(response, { type: 'cors', headersList: response.headersList }) } else if (type === 'opaque') { // An opaque filtered response is a filtered response whose type is // "opaque", URL list is the empty list, status is 0, status message // is the empty byte sequence, header list is empty, and body is null. return makeFilteredResponse(response, { type: 'opaque', urlList: Object.freeze([]), status: 0, statusText: '', body: null }) } else if (type === 'opaqueredirect') { // An opaque-redirect filtered response is a filtered response whose type // is "opaqueredirect", status is 0, status message is the empty byte // sequence, header list is empty, and body is null. return makeFilteredResponse(response, { type: 'opaqueredirect', status: 0, statusText: '', headersList: [], body: null }) } else { assert(false) } } // https://fetch.spec.whatwg.org/#appropriate-network-error function makeAppropriateNetworkError (fetchParams, err = null) { // 1. Assert: fetchParams is canceled. assert(isCancelled(fetchParams)) // 2. Return an aborted network error if fetchParams is aborted; // otherwise return a network error. return isAborted(fetchParams) ? makeNetworkError(Object.assign(new DOMException('The operation was aborted.', 'AbortError'), { cause: err })) : makeNetworkError(Object.assign(new DOMException('Request was cancelled.'), { cause: err })) } // https://whatpr.org/fetch/1392.html#initialize-a-response function initializeResponse (response, init, body) { // 1. If init["status"] is not in the range 200 to 599, inclusive, then // throw a RangeError. if (init.status !== null && (init.status < 200 || init.status > 599)) { throw new RangeError('init["status"] must be in the range of 200 to 599, inclusive.') } // 2. If init["statusText"] does not match the reason-phrase token production, // then throw a TypeError. if ('statusText' in init && init.statusText != null) { // See, https://datatracker.ietf.org/doc/html/rfc7230#section-3.1.2: // reason-phrase = *( HTAB / SP / VCHAR / obs-text ) if (!isValidReasonPhrase(String(init.statusText))) { throw new TypeError('Invalid statusText') } } // 3. Set response’s response’s status to init["status"]. if ('status' in init && init.status != null) { response[kState].status = init.status } // 4. Set response’s response’s status message to init["statusText"]. if ('statusText' in init && init.statusText != null) { response[kState].statusText = init.statusText } // 5. If init["headers"] exists, then fill response’s headers with init["headers"]. if ('headers' in init && init.headers != null) { fill(response[kHeaders], init.headers) } // 6. If body was given, then: if (body) { // 1. If response's status is a null body status, then throw a TypeError. if (nullBodyStatus.includes(response.status)) { throw webidl.errors.exception({ header: 'Response constructor', message: `Invalid response status code ${response.status}` }) } // 2. Set response's body to body's body. response[kState].body = body.body // 3. If body's type is non-null and response's header list does not contain // `Content-Type`, then append (`Content-Type`, body's type) to response's header list. if (body.type != null && !response[kState].headersList.contains('content-type', true)) { response[kState].headersList.append('content-type', body.type, true) } } } /** * @see https://fetch.spec.whatwg.org/#response-create * @param {any} innerResponse * @param {'request' | 'immutable' | 'request-no-cors' | 'response' | 'none'} guard * @returns {Response} */ function fromInnerResponse (innerResponse, guard) { const response = new Response(kConstruct) response[kState] = innerResponse response[kHeaders] = new Headers(kConstruct) setHeadersList(response[kHeaders], innerResponse.headersList) setHeadersGuard(response[kHeaders], guard) if (hasFinalizationRegistry && innerResponse.body?.stream) { // If the target (response) is reclaimed, the cleanup callback may be called at some point with // the held value provided for it (innerResponse.body.stream). The held value can be any value: // a primitive or an object, even undefined. If the held value is an object, the registry keeps // a strong reference to it (so it can pass it to the cleanup callback later). Reworded from // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/FinalizationRegistry streamRegistry.register(response, new WeakRef(innerResponse.body.stream)) } return response } webidl.converters.ReadableStream = webidl.interfaceConverter( ReadableStream ) webidl.converters.FormData = webidl.interfaceConverter( FormData ) webidl.converters.URLSearchParams = webidl.interfaceConverter( URLSearchParams ) // https://fetch.spec.whatwg.org/#typedefdef-xmlhttprequestbodyinit webidl.converters.XMLHttpRequestBodyInit = function (V, prefix, name) { if (typeof V === 'string') { return webidl.converters.USVString(V, prefix, name) } if (isBlobLike(V)) { return webidl.converters.Blob(V, prefix, name, { strict: false }) } if (ArrayBuffer.isView(V) || types.isArrayBuffer(V)) { return webidl.converters.BufferSource(V, prefix, name) } if (util.isFormDataLike(V)) { return webidl.converters.FormData(V, prefix, name, { strict: false }) } if (V instanceof URLSearchParams) { return webidl.converters.URLSearchParams(V, prefix, name) } return webidl.converters.DOMString(V, prefix, name) } // https://fetch.spec.whatwg.org/#bodyinit webidl.converters.BodyInit = function (V, prefix, argument) { if (V instanceof ReadableStream) { return webidl.converters.ReadableStream(V, prefix, argument) } // Note: the spec doesn't include async iterables, // this is an undici extension. if (V?.[Symbol.asyncIterator]) { return V } return webidl.converters.XMLHttpRequestBodyInit(V, prefix, argument) } webidl.converters.ResponseInit = webidl.dictionaryConverter([ { key: 'status', converter: webidl.converters['unsigned short'], defaultValue: () => 200 }, { key: 'statusText', converter: webidl.converters.ByteString, defaultValue: () => '' }, { key: 'headers', converter: webidl.converters.HeadersInit } ]) module.exports = { isNetworkError, makeNetworkError, makeResponse, makeAppropriateNetworkError, filterResponse, Response, cloneResponse, fromInnerResponse } node_modules/undici/lib/web/fetch/index.js 0000664 00000240266 15114741631 0014574 0 ustar 00 // https://github.com/Ethan-Arrowood/undici-fetch 'use strict' const { makeNetworkError, makeAppropriateNetworkError, filterResponse, makeResponse, fromInnerResponse } = require('./response') const { HeadersList } = require('./headers') const { Request, cloneRequest } = require('./request') const zlib = require('node:zlib') const { bytesMatch, makePolicyContainer, clonePolicyContainer, requestBadPort, TAOCheck, appendRequestOriginHeader, responseLocationURL, requestCurrentURL, setRequestReferrerPolicyOnRedirect, tryUpgradeRequestToAPotentiallyTrustworthyURL, createOpaqueTimingInfo, appendFetchMetadata, corsCheck, crossOriginResourcePolicyCheck, determineRequestsReferrer, coarsenedSharedCurrentTime, createDeferredPromise, isBlobLike, sameOrigin, isCancelled, isAborted, isErrorLike, fullyReadBody, readableStreamClose, isomorphicEncode, urlIsLocal, urlIsHttpHttpsScheme, urlHasHttpsScheme, clampAndCoarsenConnectionTimingInfo, simpleRangeHeaderValue, buildContentRange, createInflate, extractMimeType } = require('./util') const { kState, kDispatcher } = require('./symbols') const assert = require('node:assert') const { safelyExtractBody, extractBody } = require('./body') const { redirectStatusSet, nullBodyStatus, safeMethodsSet, requestBodyHeader, subresourceSet } = require('./constants') const EE = require('node:events') const { Readable, pipeline, finished } = require('node:stream') const { addAbortListener, isErrored, isReadable, bufferToLowerCasedHeaderName } = require('../../core/util') const { dataURLProcessor, serializeAMimeType, minimizeSupportedMimeType } = require('./data-url') const { getGlobalDispatcher } = require('../../global') const { webidl } = require('./webidl') const { STATUS_CODES } = require('node:http') const GET_OR_HEAD = ['GET', 'HEAD'] const defaultUserAgent = typeof __UNDICI_IS_NODE__ !== 'undefined' || typeof esbuildDetection !== 'undefined' ? 'node' : 'undici' /** @type {import('buffer').resolveObjectURL} */ let resolveObjectURL class Fetch extends EE { constructor (dispatcher) { super() this.dispatcher = dispatcher this.connection = null this.dump = false this.state = 'ongoing' } terminate (reason) { if (this.state !== 'ongoing') { return } this.state = 'terminated' this.connection?.destroy(reason) this.emit('terminated', reason) } // https://fetch.spec.whatwg.org/#fetch-controller-abort abort (error) { if (this.state !== 'ongoing') { return } // 1. Set controller’s state to "aborted". this.state = 'aborted' // 2. Let fallbackError be an "AbortError" DOMException. // 3. Set error to fallbackError if it is not given. if (!error) { error = new DOMException('The operation was aborted.', 'AbortError') } // 4. Let serializedError be StructuredSerialize(error). // If that threw an exception, catch it, and let // serializedError be StructuredSerialize(fallbackError). // 5. Set controller’s serialized abort reason to serializedError. this.serializedAbortReason = error this.connection?.destroy(error) this.emit('terminated', error) } } function handleFetchDone (response) { finalizeAndReportTiming(response, 'fetch') } // https://fetch.spec.whatwg.org/#fetch-method function fetch (input, init = undefined) { webidl.argumentLengthCheck(arguments, 1, 'globalThis.fetch') // 1. Let p be a new promise. let p = createDeferredPromise() // 2. Let requestObject be the result of invoking the initial value of // Request as constructor with input and init as arguments. If this throws // an exception, reject p with it and return p. let requestObject try { requestObject = new Request(input, init) } catch (e) { p.reject(e) return p.promise } // 3. Let request be requestObject’s request. const request = requestObject[kState] // 4. If requestObject’s signal’s aborted flag is set, then: if (requestObject.signal.aborted) { // 1. Abort the fetch() call with p, request, null, and // requestObject’s signal’s abort reason. abortFetch(p, request, null, requestObject.signal.reason) // 2. Return p. return p.promise } // 5. Let globalObject be request’s client’s global object. const globalObject = request.client.globalObject // 6. If globalObject is a ServiceWorkerGlobalScope object, then set // request’s service-workers mode to "none". if (globalObject?.constructor?.name === 'ServiceWorkerGlobalScope') { request.serviceWorkers = 'none' } // 7. Let responseObject be null. let responseObject = null // 8. Let relevantRealm be this’s relevant Realm. // 9. Let locallyAborted be false. let locallyAborted = false // 10. Let controller be null. let controller = null // 11. Add the following abort steps to requestObject’s signal: addAbortListener( requestObject.signal, () => { // 1. Set locallyAborted to true. locallyAborted = true // 2. Assert: controller is non-null. assert(controller != null) // 3. Abort controller with requestObject’s signal’s abort reason. controller.abort(requestObject.signal.reason) const realResponse = responseObject?.deref() // 4. Abort the fetch() call with p, request, responseObject, // and requestObject’s signal’s abort reason. abortFetch(p, request, realResponse, requestObject.signal.reason) } ) // 12. Let handleFetchDone given response response be to finalize and // report timing with response, globalObject, and "fetch". // see function handleFetchDone // 13. Set controller to the result of calling fetch given request, // with processResponseEndOfBody set to handleFetchDone, and processResponse // given response being these substeps: const processResponse = (response) => { // 1. If locallyAborted is true, terminate these substeps. if (locallyAborted) { return } // 2. If response’s aborted flag is set, then: if (response.aborted) { // 1. Let deserializedError be the result of deserialize a serialized // abort reason given controller’s serialized abort reason and // relevantRealm. // 2. Abort the fetch() call with p, request, responseObject, and // deserializedError. abortFetch(p, request, responseObject, controller.serializedAbortReason) return } // 3. If response is a network error, then reject p with a TypeError // and terminate these substeps. if (response.type === 'error') { p.reject(new TypeError('fetch failed', { cause: response.error })) return } // 4. Set responseObject to the result of creating a Response object, // given response, "immutable", and relevantRealm. responseObject = new WeakRef(fromInnerResponse(response, 'immutable')) // 5. Resolve p with responseObject. p.resolve(responseObject.deref()) p = null } controller = fetching({ request, processResponseEndOfBody: handleFetchDone, processResponse, dispatcher: requestObject[kDispatcher] // undici }) // 14. Return p. return p.promise } // https://fetch.spec.whatwg.org/#finalize-and-report-timing function finalizeAndReportTiming (response, initiatorType = 'other') { // 1. If response is an aborted network error, then return. if (response.type === 'error' && response.aborted) { return } // 2. If response’s URL list is null or empty, then return. if (!response.urlList?.length) { return } // 3. Let originalURL be response’s URL list[0]. const originalURL = response.urlList[0] // 4. Let timingInfo be response’s timing info. let timingInfo = response.timingInfo // 5. Let cacheState be response’s cache state. let cacheState = response.cacheState // 6. If originalURL’s scheme is not an HTTP(S) scheme, then return. if (!urlIsHttpHttpsScheme(originalURL)) { return } // 7. If timingInfo is null, then return. if (timingInfo === null) { return } // 8. If response’s timing allow passed flag is not set, then: if (!response.timingAllowPassed) { // 1. Set timingInfo to a the result of creating an opaque timing info for timingInfo. timingInfo = createOpaqueTimingInfo({ startTime: timingInfo.startTime }) // 2. Set cacheState to the empty string. cacheState = '' } // 9. Set timingInfo’s end time to the coarsened shared current time // given global’s relevant settings object’s cross-origin isolated // capability. // TODO: given global’s relevant settings object’s cross-origin isolated // capability? timingInfo.endTime = coarsenedSharedCurrentTime() // 10. Set response’s timing info to timingInfo. response.timingInfo = timingInfo // 11. Mark resource timing for timingInfo, originalURL, initiatorType, // global, and cacheState. markResourceTiming( timingInfo, originalURL.href, initiatorType, globalThis, cacheState ) } // https://w3c.github.io/resource-timing/#dfn-mark-resource-timing const markResourceTiming = performance.markResourceTiming // https://fetch.spec.whatwg.org/#abort-fetch function abortFetch (p, request, responseObject, error) { // 1. Reject promise with error. if (p) { // We might have already resolved the promise at this stage p.reject(error) } // 2. If request’s body is not null and is readable, then cancel request’s // body with error. if (request.body != null && isReadable(request.body?.stream)) { request.body.stream.cancel(error).catch((err) => { if (err.code === 'ERR_INVALID_STATE') { // Node bug? return } throw err }) } // 3. If responseObject is null, then return. if (responseObject == null) { return } // 4. Let response be responseObject’s response. const response = responseObject[kState] // 5. If response’s body is not null and is readable, then error response’s // body with error. if (response.body != null && isReadable(response.body?.stream)) { response.body.stream.cancel(error).catch((err) => { if (err.code === 'ERR_INVALID_STATE') { // Node bug? return } throw err }) } } // https://fetch.spec.whatwg.org/#fetching function fetching ({ request, processRequestBodyChunkLength, processRequestEndOfBody, processResponse, processResponseEndOfBody, processResponseConsumeBody, useParallelQueue = false, dispatcher = getGlobalDispatcher() // undici }) { // Ensure that the dispatcher is set accordingly assert(dispatcher) // 1. Let taskDestination be null. let taskDestination = null // 2. Let crossOriginIsolatedCapability be false. let crossOriginIsolatedCapability = false // 3. If request’s client is non-null, then: if (request.client != null) { // 1. Set taskDestination to request’s client’s global object. taskDestination = request.client.globalObject // 2. Set crossOriginIsolatedCapability to request’s client’s cross-origin // isolated capability. crossOriginIsolatedCapability = request.client.crossOriginIsolatedCapability } // 4. If useParallelQueue is true, then set taskDestination to the result of // starting a new parallel queue. // TODO // 5. Let timingInfo be a new fetch timing info whose start time and // post-redirect start time are the coarsened shared current time given // crossOriginIsolatedCapability. const currentTime = coarsenedSharedCurrentTime(crossOriginIsolatedCapability) const timingInfo = createOpaqueTimingInfo({ startTime: currentTime }) // 6. Let fetchParams be a new fetch params whose // request is request, // timing info is timingInfo, // process request body chunk length is processRequestBodyChunkLength, // process request end-of-body is processRequestEndOfBody, // process response is processResponse, // process response consume body is processResponseConsumeBody, // process response end-of-body is processResponseEndOfBody, // task destination is taskDestination, // and cross-origin isolated capability is crossOriginIsolatedCapability. const fetchParams = { controller: new Fetch(dispatcher), request, timingInfo, processRequestBodyChunkLength, processRequestEndOfBody, processResponse, processResponseConsumeBody, processResponseEndOfBody, taskDestination, crossOriginIsolatedCapability } // 7. If request’s body is a byte sequence, then set request’s body to // request’s body as a body. // NOTE: Since fetching is only called from fetch, body should already be // extracted. assert(!request.body || request.body.stream) // 8. If request’s window is "client", then set request’s window to request’s // client, if request’s client’s global object is a Window object; otherwise // "no-window". if (request.window === 'client') { // TODO: What if request.client is null? request.window = request.client?.globalObject?.constructor?.name === 'Window' ? request.client : 'no-window' } // 9. If request’s origin is "client", then set request’s origin to request’s // client’s origin. if (request.origin === 'client') { request.origin = request.client.origin } // 10. If all of the following conditions are true: // TODO // 11. If request’s policy container is "client", then: if (request.policyContainer === 'client') { // 1. If request’s client is non-null, then set request’s policy // container to a clone of request’s client’s policy container. [HTML] if (request.client != null) { request.policyContainer = clonePolicyContainer( request.client.policyContainer ) } else { // 2. Otherwise, set request’s policy container to a new policy // container. request.policyContainer = makePolicyContainer() } } // 12. If request’s header list does not contain `Accept`, then: if (!request.headersList.contains('accept', true)) { // 1. Let value be `*/*`. const value = '*/*' // 2. A user agent should set value to the first matching statement, if // any, switching on request’s destination: // "document" // "frame" // "iframe" // `text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8` // "image" // `image/png,image/svg+xml,image/*;q=0.8,*/*;q=0.5` // "style" // `text/css,*/*;q=0.1` // TODO // 3. Append `Accept`/value to request’s header list. request.headersList.append('accept', value, true) } // 13. If request’s header list does not contain `Accept-Language`, then // user agents should append `Accept-Language`/an appropriate value to // request’s header list. if (!request.headersList.contains('accept-language', true)) { request.headersList.append('accept-language', '*', true) } // 14. If request’s priority is null, then use request’s initiator and // destination appropriately in setting request’s priority to a // user-agent-defined object. if (request.priority === null) { // TODO } // 15. If request is a subresource request, then: if (subresourceSet.has(request.destination)) { // TODO } // 16. Run main fetch given fetchParams. mainFetch(fetchParams) .catch(err => { fetchParams.controller.terminate(err) }) // 17. Return fetchParam's controller return fetchParams.controller } // https://fetch.spec.whatwg.org/#concept-main-fetch async function mainFetch (fetchParams, recursive = false) { // 1. Let request be fetchParams’s request. const request = fetchParams.request // 2. Let response be null. let response = null // 3. If request’s local-URLs-only flag is set and request’s current URL is // not local, then set response to a network error. if (request.localURLsOnly && !urlIsLocal(requestCurrentURL(request))) { response = makeNetworkError('local URLs only') } // 4. Run report Content Security Policy violations for request. // TODO // 5. Upgrade request to a potentially trustworthy URL, if appropriate. tryUpgradeRequestToAPotentiallyTrustworthyURL(request) // 6. If should request be blocked due to a bad port, should fetching request // be blocked as mixed content, or should request be blocked by Content // Security Policy returns blocked, then set response to a network error. if (requestBadPort(request) === 'blocked') { response = makeNetworkError('bad port') } // TODO: should fetching request be blocked as mixed content? // TODO: should request be blocked by Content Security Policy? // 7. If request’s referrer policy is the empty string, then set request’s // referrer policy to request’s policy container’s referrer policy. if (request.referrerPolicy === '') { request.referrerPolicy = request.policyContainer.referrerPolicy } // 8. If request’s referrer is not "no-referrer", then set request’s // referrer to the result of invoking determine request’s referrer. if (request.referrer !== 'no-referrer') { request.referrer = determineRequestsReferrer(request) } // 9. Set request’s current URL’s scheme to "https" if all of the following // conditions are true: // - request’s current URL’s scheme is "http" // - request’s current URL’s host is a domain // - Matching request’s current URL’s host per Known HSTS Host Domain Name // Matching results in either a superdomain match with an asserted // includeSubDomains directive or a congruent match (with or without an // asserted includeSubDomains directive). [HSTS] // TODO // 10. If recursive is false, then run the remaining steps in parallel. // TODO // 11. If response is null, then set response to the result of running // the steps corresponding to the first matching statement: if (response === null) { response = await (async () => { const currentURL = requestCurrentURL(request) if ( // - request’s current URL’s origin is same origin with request’s origin, // and request’s response tainting is "basic" (sameOrigin(currentURL, request.url) && request.responseTainting === 'basic') || // request’s current URL’s scheme is "data" (currentURL.protocol === 'data:') || // - request’s mode is "navigate" or "websocket" (request.mode === 'navigate' || request.mode === 'websocket') ) { // 1. Set request’s response tainting to "basic". request.responseTainting = 'basic' // 2. Return the result of running scheme fetch given fetchParams. return await schemeFetch(fetchParams) } // request’s mode is "same-origin" if (request.mode === 'same-origin') { // 1. Return a network error. return makeNetworkError('request mode cannot be "same-origin"') } // request’s mode is "no-cors" if (request.mode === 'no-cors') { // 1. If request’s redirect mode is not "follow", then return a network // error. if (request.redirect !== 'follow') { return makeNetworkError( 'redirect mode cannot be "follow" for "no-cors" request' ) } // 2. Set request’s response tainting to "opaque". request.responseTainting = 'opaque' // 3. Return the result of running scheme fetch given fetchParams. return await schemeFetch(fetchParams) } // request’s current URL’s scheme is not an HTTP(S) scheme if (!urlIsHttpHttpsScheme(requestCurrentURL(request))) { // Return a network error. return makeNetworkError('URL scheme must be a HTTP(S) scheme') } // - request’s use-CORS-preflight flag is set // - request’s unsafe-request flag is set and either request’s method is // not a CORS-safelisted method or CORS-unsafe request-header names with // request’s header list is not empty // 1. Set request’s response tainting to "cors". // 2. Let corsWithPreflightResponse be the result of running HTTP fetch // given fetchParams and true. // 3. If corsWithPreflightResponse is a network error, then clear cache // entries using request. // 4. Return corsWithPreflightResponse. // TODO // Otherwise // 1. Set request’s response tainting to "cors". request.responseTainting = 'cors' // 2. Return the result of running HTTP fetch given fetchParams. return await httpFetch(fetchParams) })() } // 12. If recursive is true, then return response. if (recursive) { return response } // 13. If response is not a network error and response is not a filtered // response, then: if (response.status !== 0 && !response.internalResponse) { // If request’s response tainting is "cors", then: if (request.responseTainting === 'cors') { // 1. Let headerNames be the result of extracting header list values // given `Access-Control-Expose-Headers` and response’s header list. // TODO // 2. If request’s credentials mode is not "include" and headerNames // contains `*`, then set response’s CORS-exposed header-name list to // all unique header names in response’s header list. // TODO // 3. Otherwise, if headerNames is not null or failure, then set // response’s CORS-exposed header-name list to headerNames. // TODO } // Set response to the following filtered response with response as its // internal response, depending on request’s response tainting: if (request.responseTainting === 'basic') { response = filterResponse(response, 'basic') } else if (request.responseTainting === 'cors') { response = filterResponse(response, 'cors') } else if (request.responseTainting === 'opaque') { response = filterResponse(response, 'opaque') } else { assert(false) } } // 14. Let internalResponse be response, if response is a network error, // and response’s internal response otherwise. let internalResponse = response.status === 0 ? response : response.internalResponse // 15. If internalResponse’s URL list is empty, then set it to a clone of // request’s URL list. if (internalResponse.urlList.length === 0) { internalResponse.urlList.push(...request.urlList) } // 16. If request’s timing allow failed flag is unset, then set // internalResponse’s timing allow passed flag. if (!request.timingAllowFailed) { response.timingAllowPassed = true } // 17. If response is not a network error and any of the following returns // blocked // - should internalResponse to request be blocked as mixed content // - should internalResponse to request be blocked by Content Security Policy // - should internalResponse to request be blocked due to its MIME type // - should internalResponse to request be blocked due to nosniff // TODO // 18. If response’s type is "opaque", internalResponse’s status is 206, // internalResponse’s range-requested flag is set, and request’s header // list does not contain `Range`, then set response and internalResponse // to a network error. if ( response.type === 'opaque' && internalResponse.status === 206 && internalResponse.rangeRequested && !request.headers.contains('range', true) ) { response = internalResponse = makeNetworkError() } // 19. If response is not a network error and either request’s method is // `HEAD` or `CONNECT`, or internalResponse’s status is a null body status, // set internalResponse’s body to null and disregard any enqueuing toward // it (if any). if ( response.status !== 0 && (request.method === 'HEAD' || request.method === 'CONNECT' || nullBodyStatus.includes(internalResponse.status)) ) { internalResponse.body = null fetchParams.controller.dump = true } // 20. If request’s integrity metadata is not the empty string, then: if (request.integrity) { // 1. Let processBodyError be this step: run fetch finale given fetchParams // and a network error. const processBodyError = (reason) => fetchFinale(fetchParams, makeNetworkError(reason)) // 2. If request’s response tainting is "opaque", or response’s body is null, // then run processBodyError and abort these steps. if (request.responseTainting === 'opaque' || response.body == null) { processBodyError(response.error) return } // 3. Let processBody given bytes be these steps: const processBody = (bytes) => { // 1. If bytes do not match request’s integrity metadata, // then run processBodyError and abort these steps. [SRI] if (!bytesMatch(bytes, request.integrity)) { processBodyError('integrity mismatch') return } // 2. Set response’s body to bytes as a body. response.body = safelyExtractBody(bytes)[0] // 3. Run fetch finale given fetchParams and response. fetchFinale(fetchParams, response) } // 4. Fully read response’s body given processBody and processBodyError. await fullyReadBody(response.body, processBody, processBodyError) } else { // 21. Otherwise, run fetch finale given fetchParams and response. fetchFinale(fetchParams, response) } } // https://fetch.spec.whatwg.org/#concept-scheme-fetch // given a fetch params fetchParams function schemeFetch (fetchParams) { // Note: since the connection is destroyed on redirect, which sets fetchParams to a // cancelled state, we do not want this condition to trigger *unless* there have been // no redirects. See https://github.com/nodejs/undici/issues/1776 // 1. If fetchParams is canceled, then return the appropriate network error for fetchParams. if (isCancelled(fetchParams) && fetchParams.request.redirectCount === 0) { return Promise.resolve(makeAppropriateNetworkError(fetchParams)) } // 2. Let request be fetchParams’s request. const { request } = fetchParams const { protocol: scheme } = requestCurrentURL(request) // 3. Switch on request’s current URL’s scheme and run the associated steps: switch (scheme) { case 'about:': { // If request’s current URL’s path is the string "blank", then return a new response // whose status message is `OK`, header list is « (`Content-Type`, `text/html;charset=utf-8`) », // and body is the empty byte sequence as a body. // Otherwise, return a network error. return Promise.resolve(makeNetworkError('about scheme is not supported')) } case 'blob:': { if (!resolveObjectURL) { resolveObjectURL = require('node:buffer').resolveObjectURL } // 1. Let blobURLEntry be request’s current URL’s blob URL entry. const blobURLEntry = requestCurrentURL(request) // https://github.com/web-platform-tests/wpt/blob/7b0ebaccc62b566a1965396e5be7bb2bc06f841f/FileAPI/url/resources/fetch-tests.js#L52-L56 // Buffer.resolveObjectURL does not ignore URL queries. if (blobURLEntry.search.length !== 0) { return Promise.resolve(makeNetworkError('NetworkError when attempting to fetch resource.')) } const blob = resolveObjectURL(blobURLEntry.toString()) // 2. If request’s method is not `GET`, blobURLEntry is null, or blobURLEntry’s // object is not a Blob object, then return a network error. if (request.method !== 'GET' || !isBlobLike(blob)) { return Promise.resolve(makeNetworkError('invalid method')) } // 3. Let blob be blobURLEntry’s object. // Note: done above // 4. Let response be a new response. const response = makeResponse() // 5. Let fullLength be blob’s size. const fullLength = blob.size // 6. Let serializedFullLength be fullLength, serialized and isomorphic encoded. const serializedFullLength = isomorphicEncode(`${fullLength}`) // 7. Let type be blob’s type. const type = blob.type // 8. If request’s header list does not contain `Range`: // 9. Otherwise: if (!request.headersList.contains('range', true)) { // 1. Let bodyWithType be the result of safely extracting blob. // Note: in the FileAPI a blob "object" is a Blob *or* a MediaSource. // In node, this can only ever be a Blob. Therefore we can safely // use extractBody directly. const bodyWithType = extractBody(blob) // 2. Set response’s status message to `OK`. response.statusText = 'OK' // 3. Set response’s body to bodyWithType’s body. response.body = bodyWithType[0] // 4. Set response’s header list to « (`Content-Length`, serializedFullLength), (`Content-Type`, type) ». response.headersList.set('content-length', serializedFullLength, true) response.headersList.set('content-type', type, true) } else { // 1. Set response’s range-requested flag. response.rangeRequested = true // 2. Let rangeHeader be the result of getting `Range` from request’s header list. const rangeHeader = request.headersList.get('range', true) // 3. Let rangeValue be the result of parsing a single range header value given rangeHeader and true. const rangeValue = simpleRangeHeaderValue(rangeHeader, true) // 4. If rangeValue is failure, then return a network error. if (rangeValue === 'failure') { return Promise.resolve(makeNetworkError('failed to fetch the data URL')) } // 5. Let (rangeStart, rangeEnd) be rangeValue. let { rangeStartValue: rangeStart, rangeEndValue: rangeEnd } = rangeValue // 6. If rangeStart is null: // 7. Otherwise: if (rangeStart === null) { // 1. Set rangeStart to fullLength − rangeEnd. rangeStart = fullLength - rangeEnd // 2. Set rangeEnd to rangeStart + rangeEnd − 1. rangeEnd = rangeStart + rangeEnd - 1 } else { // 1. If rangeStart is greater than or equal to fullLength, then return a network error. if (rangeStart >= fullLength) { return Promise.resolve(makeNetworkError('Range start is greater than the blob\'s size.')) } // 2. If rangeEnd is null or rangeEnd is greater than or equal to fullLength, then set // rangeEnd to fullLength − 1. if (rangeEnd === null || rangeEnd >= fullLength) { rangeEnd = fullLength - 1 } } // 8. Let slicedBlob be the result of invoking slice blob given blob, rangeStart, // rangeEnd + 1, and type. const slicedBlob = blob.slice(rangeStart, rangeEnd, type) // 9. Let slicedBodyWithType be the result of safely extracting slicedBlob. // Note: same reason as mentioned above as to why we use extractBody const slicedBodyWithType = extractBody(slicedBlob) // 10. Set response’s body to slicedBodyWithType’s body. response.body = slicedBodyWithType[0] // 11. Let serializedSlicedLength be slicedBlob’s size, serialized and isomorphic encoded. const serializedSlicedLength = isomorphicEncode(`${slicedBlob.size}`) // 12. Let contentRange be the result of invoking build a content range given rangeStart, // rangeEnd, and fullLength. const contentRange = buildContentRange(rangeStart, rangeEnd, fullLength) // 13. Set response’s status to 206. response.status = 206 // 14. Set response’s status message to `Partial Content`. response.statusText = 'Partial Content' // 15. Set response’s header list to « (`Content-Length`, serializedSlicedLength), // (`Content-Type`, type), (`Content-Range`, contentRange) ». response.headersList.set('content-length', serializedSlicedLength, true) response.headersList.set('content-type', type, true) response.headersList.set('content-range', contentRange, true) } // 10. Return response. return Promise.resolve(response) } case 'data:': { // 1. Let dataURLStruct be the result of running the // data: URL processor on request’s current URL. const currentURL = requestCurrentURL(request) const dataURLStruct = dataURLProcessor(currentURL) // 2. If dataURLStruct is failure, then return a // network error. if (dataURLStruct === 'failure') { return Promise.resolve(makeNetworkError('failed to fetch the data URL')) } // 3. Let mimeType be dataURLStruct’s MIME type, serialized. const mimeType = serializeAMimeType(dataURLStruct.mimeType) // 4. Return a response whose status message is `OK`, // header list is « (`Content-Type`, mimeType) », // and body is dataURLStruct’s body as a body. return Promise.resolve(makeResponse({ statusText: 'OK', headersList: [ ['content-type', { name: 'Content-Type', value: mimeType }] ], body: safelyExtractBody(dataURLStruct.body)[0] })) } case 'file:': { // For now, unfortunate as it is, file URLs are left as an exercise for the reader. // When in doubt, return a network error. return Promise.resolve(makeNetworkError('not implemented... yet...')) } case 'http:': case 'https:': { // Return the result of running HTTP fetch given fetchParams. return httpFetch(fetchParams) .catch((err) => makeNetworkError(err)) } default: { return Promise.resolve(makeNetworkError('unknown scheme')) } } } // https://fetch.spec.whatwg.org/#finalize-response function finalizeResponse (fetchParams, response) { // 1. Set fetchParams’s request’s done flag. fetchParams.request.done = true // 2, If fetchParams’s process response done is not null, then queue a fetch // task to run fetchParams’s process response done given response, with // fetchParams’s task destination. if (fetchParams.processResponseDone != null) { queueMicrotask(() => fetchParams.processResponseDone(response)) } } // https://fetch.spec.whatwg.org/#fetch-finale function fetchFinale (fetchParams, response) { // 1. Let timingInfo be fetchParams’s timing info. let timingInfo = fetchParams.timingInfo // 2. If response is not a network error and fetchParams’s request’s client is a secure context, // then set timingInfo’s server-timing headers to the result of getting, decoding, and splitting // `Server-Timing` from response’s internal response’s header list. // TODO // 3. Let processResponseEndOfBody be the following steps: const processResponseEndOfBody = () => { // 1. Let unsafeEndTime be the unsafe shared current time. const unsafeEndTime = Date.now() // ? // 2. If fetchParams’s request’s destination is "document", then set fetchParams’s controller’s // full timing info to fetchParams’s timing info. if (fetchParams.request.destination === 'document') { fetchParams.controller.fullTimingInfo = timingInfo } // 3. Set fetchParams’s controller’s report timing steps to the following steps given a global object global: fetchParams.controller.reportTimingSteps = () => { // 1. If fetchParams’s request’s URL’s scheme is not an HTTP(S) scheme, then return. if (fetchParams.request.url.protocol !== 'https:') { return } // 2. Set timingInfo’s end time to the relative high resolution time given unsafeEndTime and global. timingInfo.endTime = unsafeEndTime // 3. Let cacheState be response’s cache state. let cacheState = response.cacheState // 4. Let bodyInfo be response’s body info. const bodyInfo = response.bodyInfo // 5. If response’s timing allow passed flag is not set, then set timingInfo to the result of creating an // opaque timing info for timingInfo and set cacheState to the empty string. if (!response.timingAllowPassed) { timingInfo = createOpaqueTimingInfo(timingInfo) cacheState = '' } // 6. Let responseStatus be 0. let responseStatus = 0 // 7. If fetchParams’s request’s mode is not "navigate" or response’s has-cross-origin-redirects is false: if (fetchParams.request.mode !== 'navigator' || !response.hasCrossOriginRedirects) { // 1. Set responseStatus to response’s status. responseStatus = response.status // 2. Let mimeType be the result of extracting a MIME type from response’s header list. const mimeType = extractMimeType(response.headersList) // 3. If mimeType is not failure, then set bodyInfo’s content type to the result of minimizing a supported MIME type given mimeType. if (mimeType !== 'failure') { bodyInfo.contentType = minimizeSupportedMimeType(mimeType) } } // 8. If fetchParams’s request’s initiator type is non-null, then mark resource timing given timingInfo, // fetchParams’s request’s URL, fetchParams’s request’s initiator type, global, cacheState, bodyInfo, // and responseStatus. if (fetchParams.request.initiatorType != null) { // TODO: update markresourcetiming markResourceTiming(timingInfo, fetchParams.request.url.href, fetchParams.request.initiatorType, globalThis, cacheState, bodyInfo, responseStatus) } } // 4. Let processResponseEndOfBodyTask be the following steps: const processResponseEndOfBodyTask = () => { // 1. Set fetchParams’s request’s done flag. fetchParams.request.done = true // 2. If fetchParams’s process response end-of-body is non-null, then run fetchParams’s process // response end-of-body given response. if (fetchParams.processResponseEndOfBody != null) { queueMicrotask(() => fetchParams.processResponseEndOfBody(response)) } // 3. If fetchParams’s request’s initiator type is non-null and fetchParams’s request’s client’s // global object is fetchParams’s task destination, then run fetchParams’s controller’s report // timing steps given fetchParams’s request’s client’s global object. if (fetchParams.request.initiatorType != null) { fetchParams.controller.reportTimingSteps() } } // 5. Queue a fetch task to run processResponseEndOfBodyTask with fetchParams’s task destination queueMicrotask(() => processResponseEndOfBodyTask()) } // 4. If fetchParams’s process response is non-null, then queue a fetch task to run fetchParams’s // process response given response, with fetchParams’s task destination. if (fetchParams.processResponse != null) { queueMicrotask(() => { fetchParams.processResponse(response) fetchParams.processResponse = null }) } // 5. Let internalResponse be response, if response is a network error; otherwise response’s internal response. const internalResponse = response.type === 'error' ? response : (response.internalResponse ?? response) // 6. If internalResponse’s body is null, then run processResponseEndOfBody. // 7. Otherwise: if (internalResponse.body == null) { processResponseEndOfBody() } else { // mcollina: all the following steps of the specs are skipped. // The internal transform stream is not needed. // See https://github.com/nodejs/undici/pull/3093#issuecomment-2050198541 // 1. Let transformStream be a new TransformStream. // 2. Let identityTransformAlgorithm be an algorithm which, given chunk, enqueues chunk in transformStream. // 3. Set up transformStream with transformAlgorithm set to identityTransformAlgorithm and flushAlgorithm // set to processResponseEndOfBody. // 4. Set internalResponse’s body’s stream to the result of internalResponse’s body’s stream piped through transformStream. finished(internalResponse.body.stream, () => { processResponseEndOfBody() }) } } // https://fetch.spec.whatwg.org/#http-fetch async function httpFetch (fetchParams) { // 1. Let request be fetchParams’s request. const request = fetchParams.request // 2. Let response be null. let response = null // 3. Let actualResponse be null. let actualResponse = null // 4. Let timingInfo be fetchParams’s timing info. const timingInfo = fetchParams.timingInfo // 5. If request’s service-workers mode is "all", then: if (request.serviceWorkers === 'all') { // TODO } // 6. If response is null, then: if (response === null) { // 1. If makeCORSPreflight is true and one of these conditions is true: // TODO // 2. If request’s redirect mode is "follow", then set request’s // service-workers mode to "none". if (request.redirect === 'follow') { request.serviceWorkers = 'none' } // 3. Set response and actualResponse to the result of running // HTTP-network-or-cache fetch given fetchParams. actualResponse = response = await httpNetworkOrCacheFetch(fetchParams) // 4. If request’s response tainting is "cors" and a CORS check // for request and response returns failure, then return a network error. if ( request.responseTainting === 'cors' && corsCheck(request, response) === 'failure' ) { return makeNetworkError('cors failure') } // 5. If the TAO check for request and response returns failure, then set // request’s timing allow failed flag. if (TAOCheck(request, response) === 'failure') { request.timingAllowFailed = true } } // 7. If either request’s response tainting or response’s type // is "opaque", and the cross-origin resource policy check with // request’s origin, request’s client, request’s destination, // and actualResponse returns blocked, then return a network error. if ( (request.responseTainting === 'opaque' || response.type === 'opaque') && crossOriginResourcePolicyCheck( request.origin, request.client, request.destination, actualResponse ) === 'blocked' ) { return makeNetworkError('blocked') } // 8. If actualResponse’s status is a redirect status, then: if (redirectStatusSet.has(actualResponse.status)) { // 1. If actualResponse’s status is not 303, request’s body is not null, // and the connection uses HTTP/2, then user agents may, and are even // encouraged to, transmit an RST_STREAM frame. // See, https://github.com/whatwg/fetch/issues/1288 if (request.redirect !== 'manual') { fetchParams.controller.connection.destroy(undefined, false) } // 2. Switch on request’s redirect mode: if (request.redirect === 'error') { // Set response to a network error. response = makeNetworkError('unexpected redirect') } else if (request.redirect === 'manual') { // Set response to an opaque-redirect filtered response whose internal // response is actualResponse. // NOTE(spec): On the web this would return an `opaqueredirect` response, // but that doesn't make sense server side. // See https://github.com/nodejs/undici/issues/1193. response = actualResponse } else if (request.redirect === 'follow') { // Set response to the result of running HTTP-redirect fetch given // fetchParams and response. response = await httpRedirectFetch(fetchParams, response) } else { assert(false) } } // 9. Set response’s timing info to timingInfo. response.timingInfo = timingInfo // 10. Return response. return response } // https://fetch.spec.whatwg.org/#http-redirect-fetch function httpRedirectFetch (fetchParams, response) { // 1. Let request be fetchParams’s request. const request = fetchParams.request // 2. Let actualResponse be response, if response is not a filtered response, // and response’s internal response otherwise. const actualResponse = response.internalResponse ? response.internalResponse : response // 3. Let locationURL be actualResponse’s location URL given request’s current // URL’s fragment. let locationURL try { locationURL = responseLocationURL( actualResponse, requestCurrentURL(request).hash ) // 4. If locationURL is null, then return response. if (locationURL == null) { return response } } catch (err) { // 5. If locationURL is failure, then return a network error. return Promise.resolve(makeNetworkError(err)) } // 6. If locationURL’s scheme is not an HTTP(S) scheme, then return a network // error. if (!urlIsHttpHttpsScheme(locationURL)) { return Promise.resolve(makeNetworkError('URL scheme must be a HTTP(S) scheme')) } // 7. If request’s redirect count is 20, then return a network error. if (request.redirectCount === 20) { return Promise.resolve(makeNetworkError('redirect count exceeded')) } // 8. Increase request’s redirect count by 1. request.redirectCount += 1 // 9. If request’s mode is "cors", locationURL includes credentials, and // request’s origin is not same origin with locationURL’s origin, then return // a network error. if ( request.mode === 'cors' && (locationURL.username || locationURL.password) && !sameOrigin(request, locationURL) ) { return Promise.resolve(makeNetworkError('cross origin not allowed for request mode "cors"')) } // 10. If request’s response tainting is "cors" and locationURL includes // credentials, then return a network error. if ( request.responseTainting === 'cors' && (locationURL.username || locationURL.password) ) { return Promise.resolve(makeNetworkError( 'URL cannot contain credentials for request mode "cors"' )) } // 11. If actualResponse’s status is not 303, request’s body is non-null, // and request’s body’s source is null, then return a network error. if ( actualResponse.status !== 303 && request.body != null && request.body.source == null ) { return Promise.resolve(makeNetworkError()) } // 12. If one of the following is true // - actualResponse’s status is 301 or 302 and request’s method is `POST` // - actualResponse’s status is 303 and request’s method is not `GET` or `HEAD` if ( ([301, 302].includes(actualResponse.status) && request.method === 'POST') || (actualResponse.status === 303 && !GET_OR_HEAD.includes(request.method)) ) { // then: // 1. Set request’s method to `GET` and request’s body to null. request.method = 'GET' request.body = null // 2. For each headerName of request-body-header name, delete headerName from // request’s header list. for (const headerName of requestBodyHeader) { request.headersList.delete(headerName) } } // 13. If request’s current URL’s origin is not same origin with locationURL’s // origin, then for each headerName of CORS non-wildcard request-header name, // delete headerName from request’s header list. if (!sameOrigin(requestCurrentURL(request), locationURL)) { // https://fetch.spec.whatwg.org/#cors-non-wildcard-request-header-name request.headersList.delete('authorization', true) // https://fetch.spec.whatwg.org/#authentication-entries request.headersList.delete('proxy-authorization', true) // "Cookie" and "Host" are forbidden request-headers, which undici doesn't implement. request.headersList.delete('cookie', true) request.headersList.delete('host', true) } // 14. If request’s body is non-null, then set request’s body to the first return // value of safely extracting request’s body’s source. if (request.body != null) { assert(request.body.source != null) request.body = safelyExtractBody(request.body.source)[0] } // 15. Let timingInfo be fetchParams’s timing info. const timingInfo = fetchParams.timingInfo // 16. Set timingInfo’s redirect end time and post-redirect start time to the // coarsened shared current time given fetchParams’s cross-origin isolated // capability. timingInfo.redirectEndTime = timingInfo.postRedirectStartTime = coarsenedSharedCurrentTime(fetchParams.crossOriginIsolatedCapability) // 17. If timingInfo’s redirect start time is 0, then set timingInfo’s // redirect start time to timingInfo’s start time. if (timingInfo.redirectStartTime === 0) { timingInfo.redirectStartTime = timingInfo.startTime } // 18. Append locationURL to request’s URL list. request.urlList.push(locationURL) // 19. Invoke set request’s referrer policy on redirect on request and // actualResponse. setRequestReferrerPolicyOnRedirect(request, actualResponse) // 20. Return the result of running main fetch given fetchParams and true. return mainFetch(fetchParams, true) } // https://fetch.spec.whatwg.org/#http-network-or-cache-fetch async function httpNetworkOrCacheFetch ( fetchParams, isAuthenticationFetch = false, isNewConnectionFetch = false ) { // 1. Let request be fetchParams’s request. const request = fetchParams.request // 2. Let httpFetchParams be null. let httpFetchParams = null // 3. Let httpRequest be null. let httpRequest = null // 4. Let response be null. let response = null // 5. Let storedResponse be null. // TODO: cache // 6. Let httpCache be null. const httpCache = null // 7. Let the revalidatingFlag be unset. const revalidatingFlag = false // 8. Run these steps, but abort when the ongoing fetch is terminated: // 1. If request’s window is "no-window" and request’s redirect mode is // "error", then set httpFetchParams to fetchParams and httpRequest to // request. if (request.window === 'no-window' && request.redirect === 'error') { httpFetchParams = fetchParams httpRequest = request } else { // Otherwise: // 1. Set httpRequest to a clone of request. httpRequest = cloneRequest(request) // 2. Set httpFetchParams to a copy of fetchParams. httpFetchParams = { ...fetchParams } // 3. Set httpFetchParams’s request to httpRequest. httpFetchParams.request = httpRequest } // 3. Let includeCredentials be true if one of const includeCredentials = request.credentials === 'include' || (request.credentials === 'same-origin' && request.responseTainting === 'basic') // 4. Let contentLength be httpRequest’s body’s length, if httpRequest’s // body is non-null; otherwise null. const contentLength = httpRequest.body ? httpRequest.body.length : null // 5. Let contentLengthHeaderValue be null. let contentLengthHeaderValue = null // 6. If httpRequest’s body is null and httpRequest’s method is `POST` or // `PUT`, then set contentLengthHeaderValue to `0`. if ( httpRequest.body == null && ['POST', 'PUT'].includes(httpRequest.method) ) { contentLengthHeaderValue = '0' } // 7. If contentLength is non-null, then set contentLengthHeaderValue to // contentLength, serialized and isomorphic encoded. if (contentLength != null) { contentLengthHeaderValue = isomorphicEncode(`${contentLength}`) } // 8. If contentLengthHeaderValue is non-null, then append // `Content-Length`/contentLengthHeaderValue to httpRequest’s header // list. if (contentLengthHeaderValue != null) { httpRequest.headersList.append('content-length', contentLengthHeaderValue, true) } // 9. If contentLengthHeaderValue is non-null, then append (`Content-Length`, // contentLengthHeaderValue) to httpRequest’s header list. // 10. If contentLength is non-null and httpRequest’s keepalive is true, // then: if (contentLength != null && httpRequest.keepalive) { // NOTE: keepalive is a noop outside of browser context. } // 11. If httpRequest’s referrer is a URL, then append // `Referer`/httpRequest’s referrer, serialized and isomorphic encoded, // to httpRequest’s header list. if (httpRequest.referrer instanceof URL) { httpRequest.headersList.append('referer', isomorphicEncode(httpRequest.referrer.href), true) } // 12. Append a request `Origin` header for httpRequest. appendRequestOriginHeader(httpRequest) // 13. Append the Fetch metadata headers for httpRequest. [FETCH-METADATA] appendFetchMetadata(httpRequest) // 14. If httpRequest’s header list does not contain `User-Agent`, then // user agents should append `User-Agent`/default `User-Agent` value to // httpRequest’s header list. if (!httpRequest.headersList.contains('user-agent', true)) { httpRequest.headersList.append('user-agent', defaultUserAgent) } // 15. If httpRequest’s cache mode is "default" and httpRequest’s header // list contains `If-Modified-Since`, `If-None-Match`, // `If-Unmodified-Since`, `If-Match`, or `If-Range`, then set // httpRequest’s cache mode to "no-store". if ( httpRequest.cache === 'default' && (httpRequest.headersList.contains('if-modified-since', true) || httpRequest.headersList.contains('if-none-match', true) || httpRequest.headersList.contains('if-unmodified-since', true) || httpRequest.headersList.contains('if-match', true) || httpRequest.headersList.contains('if-range', true)) ) { httpRequest.cache = 'no-store' } // 16. If httpRequest’s cache mode is "no-cache", httpRequest’s prevent // no-cache cache-control header modification flag is unset, and // httpRequest’s header list does not contain `Cache-Control`, then append // `Cache-Control`/`max-age=0` to httpRequest’s header list. if ( httpRequest.cache === 'no-cache' && !httpRequest.preventNoCacheCacheControlHeaderModification && !httpRequest.headersList.contains('cache-control', true) ) { httpRequest.headersList.append('cache-control', 'max-age=0', true) } // 17. If httpRequest’s cache mode is "no-store" or "reload", then: if (httpRequest.cache === 'no-store' || httpRequest.cache === 'reload') { // 1. If httpRequest’s header list does not contain `Pragma`, then append // `Pragma`/`no-cache` to httpRequest’s header list. if (!httpRequest.headersList.contains('pragma', true)) { httpRequest.headersList.append('pragma', 'no-cache', true) } // 2. If httpRequest’s header list does not contain `Cache-Control`, // then append `Cache-Control`/`no-cache` to httpRequest’s header list. if (!httpRequest.headersList.contains('cache-control', true)) { httpRequest.headersList.append('cache-control', 'no-cache', true) } } // 18. If httpRequest’s header list contains `Range`, then append // `Accept-Encoding`/`identity` to httpRequest’s header list. if (httpRequest.headersList.contains('range', true)) { httpRequest.headersList.append('accept-encoding', 'identity', true) } // 19. Modify httpRequest’s header list per HTTP. Do not append a given // header if httpRequest’s header list contains that header’s name. // TODO: https://github.com/whatwg/fetch/issues/1285#issuecomment-896560129 if (!httpRequest.headersList.contains('accept-encoding', true)) { if (urlHasHttpsScheme(requestCurrentURL(httpRequest))) { httpRequest.headersList.append('accept-encoding', 'br, gzip, deflate', true) } else { httpRequest.headersList.append('accept-encoding', 'gzip, deflate', true) } } httpRequest.headersList.delete('host', true) // 20. If includeCredentials is true, then: if (includeCredentials) { // 1. If the user agent is not configured to block cookies for httpRequest // (see section 7 of [COOKIES]), then: // TODO: credentials // 2. If httpRequest’s header list does not contain `Authorization`, then: // TODO: credentials } // 21. If there’s a proxy-authentication entry, use it as appropriate. // TODO: proxy-authentication // 22. Set httpCache to the result of determining the HTTP cache // partition, given httpRequest. // TODO: cache // 23. If httpCache is null, then set httpRequest’s cache mode to // "no-store". if (httpCache == null) { httpRequest.cache = 'no-store' } // 24. If httpRequest’s cache mode is neither "no-store" nor "reload", // then: if (httpRequest.cache !== 'no-store' && httpRequest.cache !== 'reload') { // TODO: cache } // 9. If aborted, then return the appropriate network error for fetchParams. // TODO // 10. If response is null, then: if (response == null) { // 1. If httpRequest’s cache mode is "only-if-cached", then return a // network error. if (httpRequest.cache === 'only-if-cached') { return makeNetworkError('only if cached') } // 2. Let forwardResponse be the result of running HTTP-network fetch // given httpFetchParams, includeCredentials, and isNewConnectionFetch. const forwardResponse = await httpNetworkFetch( httpFetchParams, includeCredentials, isNewConnectionFetch ) // 3. If httpRequest’s method is unsafe and forwardResponse’s status is // in the range 200 to 399, inclusive, invalidate appropriate stored // responses in httpCache, as per the "Invalidation" chapter of HTTP // Caching, and set storedResponse to null. [HTTP-CACHING] if ( !safeMethodsSet.has(httpRequest.method) && forwardResponse.status >= 200 && forwardResponse.status <= 399 ) { // TODO: cache } // 4. If the revalidatingFlag is set and forwardResponse’s status is 304, // then: if (revalidatingFlag && forwardResponse.status === 304) { // TODO: cache } // 5. If response is null, then: if (response == null) { // 1. Set response to forwardResponse. response = forwardResponse // 2. Store httpRequest and forwardResponse in httpCache, as per the // "Storing Responses in Caches" chapter of HTTP Caching. [HTTP-CACHING] // TODO: cache } } // 11. Set response’s URL list to a clone of httpRequest’s URL list. response.urlList = [...httpRequest.urlList] // 12. If httpRequest’s header list contains `Range`, then set response’s // range-requested flag. if (httpRequest.headersList.contains('range', true)) { response.rangeRequested = true } // 13. Set response’s request-includes-credentials to includeCredentials. response.requestIncludesCredentials = includeCredentials // 14. If response’s status is 401, httpRequest’s response tainting is not // "cors", includeCredentials is true, and request’s window is an environment // settings object, then: // TODO // 15. If response’s status is 407, then: if (response.status === 407) { // 1. If request’s window is "no-window", then return a network error. if (request.window === 'no-window') { return makeNetworkError() } // 2. ??? // 3. If fetchParams is canceled, then return the appropriate network error for fetchParams. if (isCancelled(fetchParams)) { return makeAppropriateNetworkError(fetchParams) } // 4. Prompt the end user as appropriate in request’s window and store // the result as a proxy-authentication entry. [HTTP-AUTH] // TODO: Invoke some kind of callback? // 5. Set response to the result of running HTTP-network-or-cache fetch given // fetchParams. // TODO return makeNetworkError('proxy authentication required') } // 16. If all of the following are true if ( // response’s status is 421 response.status === 421 && // isNewConnectionFetch is false !isNewConnectionFetch && // request’s body is null, or request’s body is non-null and request’s body’s source is non-null (request.body == null || request.body.source != null) ) { // then: // 1. If fetchParams is canceled, then return the appropriate network error for fetchParams. if (isCancelled(fetchParams)) { return makeAppropriateNetworkError(fetchParams) } // 2. Set response to the result of running HTTP-network-or-cache // fetch given fetchParams, isAuthenticationFetch, and true. // TODO (spec): The spec doesn't specify this but we need to cancel // the active response before we can start a new one. // https://github.com/whatwg/fetch/issues/1293 fetchParams.controller.connection.destroy() response = await httpNetworkOrCacheFetch( fetchParams, isAuthenticationFetch, true ) } // 17. If isAuthenticationFetch is true, then create an authentication entry if (isAuthenticationFetch) { // TODO } // 18. Return response. return response } // https://fetch.spec.whatwg.org/#http-network-fetch async function httpNetworkFetch ( fetchParams, includeCredentials = false, forceNewConnection = false ) { assert(!fetchParams.controller.connection || fetchParams.controller.connection.destroyed) fetchParams.controller.connection = { abort: null, destroyed: false, destroy (err, abort = true) { if (!this.destroyed) { this.destroyed = true if (abort) { this.abort?.(err ?? new DOMException('The operation was aborted.', 'AbortError')) } } } } // 1. Let request be fetchParams’s request. const request = fetchParams.request // 2. Let response be null. let response = null // 3. Let timingInfo be fetchParams’s timing info. const timingInfo = fetchParams.timingInfo // 4. Let httpCache be the result of determining the HTTP cache partition, // given request. // TODO: cache const httpCache = null // 5. If httpCache is null, then set request’s cache mode to "no-store". if (httpCache == null) { request.cache = 'no-store' } // 6. Let networkPartitionKey be the result of determining the network // partition key given request. // TODO // 7. Let newConnection be "yes" if forceNewConnection is true; otherwise // "no". const newConnection = forceNewConnection ? 'yes' : 'no' // eslint-disable-line no-unused-vars // 8. Switch on request’s mode: if (request.mode === 'websocket') { // Let connection be the result of obtaining a WebSocket connection, // given request’s current URL. // TODO } else { // Let connection be the result of obtaining a connection, given // networkPartitionKey, request’s current URL’s origin, // includeCredentials, and forceNewConnection. // TODO } // 9. Run these steps, but abort when the ongoing fetch is terminated: // 1. If connection is failure, then return a network error. // 2. Set timingInfo’s final connection timing info to the result of // calling clamp and coarsen connection timing info with connection’s // timing info, timingInfo’s post-redirect start time, and fetchParams’s // cross-origin isolated capability. // 3. If connection is not an HTTP/2 connection, request’s body is non-null, // and request’s body’s source is null, then append (`Transfer-Encoding`, // `chunked`) to request’s header list. // 4. Set timingInfo’s final network-request start time to the coarsened // shared current time given fetchParams’s cross-origin isolated // capability. // 5. Set response to the result of making an HTTP request over connection // using request with the following caveats: // - Follow the relevant requirements from HTTP. [HTTP] [HTTP-SEMANTICS] // [HTTP-COND] [HTTP-CACHING] [HTTP-AUTH] // - If request’s body is non-null, and request’s body’s source is null, // then the user agent may have a buffer of up to 64 kibibytes and store // a part of request’s body in that buffer. If the user agent reads from // request’s body beyond that buffer’s size and the user agent needs to // resend request, then instead return a network error. // - Set timingInfo’s final network-response start time to the coarsened // shared current time given fetchParams’s cross-origin isolated capability, // immediately after the user agent’s HTTP parser receives the first byte // of the response (e.g., frame header bytes for HTTP/2 or response status // line for HTTP/1.x). // - Wait until all the headers are transmitted. // - Any responses whose status is in the range 100 to 199, inclusive, // and is not 101, are to be ignored, except for the purposes of setting // timingInfo’s final network-response start time above. // - If request’s header list contains `Transfer-Encoding`/`chunked` and // response is transferred via HTTP/1.0 or older, then return a network // error. // - If the HTTP request results in a TLS client certificate dialog, then: // 1. If request’s window is an environment settings object, make the // dialog available in request’s window. // 2. Otherwise, return a network error. // To transmit request’s body body, run these steps: let requestBody = null // 1. If body is null and fetchParams’s process request end-of-body is // non-null, then queue a fetch task given fetchParams’s process request // end-of-body and fetchParams’s task destination. if (request.body == null && fetchParams.processRequestEndOfBody) { queueMicrotask(() => fetchParams.processRequestEndOfBody()) } else if (request.body != null) { // 2. Otherwise, if body is non-null: // 1. Let processBodyChunk given bytes be these steps: const processBodyChunk = async function * (bytes) { // 1. If the ongoing fetch is terminated, then abort these steps. if (isCancelled(fetchParams)) { return } // 2. Run this step in parallel: transmit bytes. yield bytes // 3. If fetchParams’s process request body is non-null, then run // fetchParams’s process request body given bytes’s length. fetchParams.processRequestBodyChunkLength?.(bytes.byteLength) } // 2. Let processEndOfBody be these steps: const processEndOfBody = () => { // 1. If fetchParams is canceled, then abort these steps. if (isCancelled(fetchParams)) { return } // 2. If fetchParams’s process request end-of-body is non-null, // then run fetchParams’s process request end-of-body. if (fetchParams.processRequestEndOfBody) { fetchParams.processRequestEndOfBody() } } // 3. Let processBodyError given e be these steps: const processBodyError = (e) => { // 1. If fetchParams is canceled, then abort these steps. if (isCancelled(fetchParams)) { return } // 2. If e is an "AbortError" DOMException, then abort fetchParams’s controller. if (e.name === 'AbortError') { fetchParams.controller.abort() } else { fetchParams.controller.terminate(e) } } // 4. Incrementally read request’s body given processBodyChunk, processEndOfBody, // processBodyError, and fetchParams’s task destination. requestBody = (async function * () { try { for await (const bytes of request.body.stream) { yield * processBodyChunk(bytes) } processEndOfBody() } catch (err) { processBodyError(err) } })() } try { // socket is only provided for websockets const { body, status, statusText, headersList, socket } = await dispatch({ body: requestBody }) if (socket) { response = makeResponse({ status, statusText, headersList, socket }) } else { const iterator = body[Symbol.asyncIterator]() fetchParams.controller.next = () => iterator.next() response = makeResponse({ status, statusText, headersList }) } } catch (err) { // 10. If aborted, then: if (err.name === 'AbortError') { // 1. If connection uses HTTP/2, then transmit an RST_STREAM frame. fetchParams.controller.connection.destroy() // 2. Return the appropriate network error for fetchParams. return makeAppropriateNetworkError(fetchParams, err) } return makeNetworkError(err) } // 11. Let pullAlgorithm be an action that resumes the ongoing fetch // if it is suspended. const pullAlgorithm = async () => { await fetchParams.controller.resume() } // 12. Let cancelAlgorithm be an algorithm that aborts fetchParams’s // controller with reason, given reason. const cancelAlgorithm = (reason) => { // If the aborted fetch was already terminated, then we do not // need to do anything. if (!isCancelled(fetchParams)) { fetchParams.controller.abort(reason) } } // 13. Let highWaterMark be a non-negative, non-NaN number, chosen by // the user agent. // TODO // 14. Let sizeAlgorithm be an algorithm that accepts a chunk object // and returns a non-negative, non-NaN, non-infinite number, chosen by the user agent. // TODO // 15. Let stream be a new ReadableStream. // 16. Set up stream with byte reading support with pullAlgorithm set to pullAlgorithm, // cancelAlgorithm set to cancelAlgorithm. const stream = new ReadableStream( { async start (controller) { fetchParams.controller.controller = controller }, async pull (controller) { await pullAlgorithm(controller) }, async cancel (reason) { await cancelAlgorithm(reason) }, type: 'bytes' } ) // 17. Run these steps, but abort when the ongoing fetch is terminated: // 1. Set response’s body to a new body whose stream is stream. response.body = { stream, source: null, length: null } // 2. If response is not a network error and request’s cache mode is // not "no-store", then update response in httpCache for request. // TODO // 3. If includeCredentials is true and the user agent is not configured // to block cookies for request (see section 7 of [COOKIES]), then run the // "set-cookie-string" parsing algorithm (see section 5.2 of [COOKIES]) on // the value of each header whose name is a byte-case-insensitive match for // `Set-Cookie` in response’s header list, if any, and request’s current URL. // TODO // 18. If aborted, then: // TODO // 19. Run these steps in parallel: // 1. Run these steps, but abort when fetchParams is canceled: fetchParams.controller.onAborted = onAborted fetchParams.controller.on('terminated', onAborted) fetchParams.controller.resume = async () => { // 1. While true while (true) { // 1-3. See onData... // 4. Set bytes to the result of handling content codings given // codings and bytes. let bytes let isFailure try { const { done, value } = await fetchParams.controller.next() if (isAborted(fetchParams)) { break } bytes = done ? undefined : value } catch (err) { if (fetchParams.controller.ended && !timingInfo.encodedBodySize) { // zlib doesn't like empty streams. bytes = undefined } else { bytes = err // err may be propagated from the result of calling readablestream.cancel, // which might not be an error. https://github.com/nodejs/undici/issues/2009 isFailure = true } } if (bytes === undefined) { // 2. Otherwise, if the bytes transmission for response’s message // body is done normally and stream is readable, then close // stream, finalize response for fetchParams and response, and // abort these in-parallel steps. readableStreamClose(fetchParams.controller.controller) finalizeResponse(fetchParams, response) return } // 5. Increase timingInfo’s decoded body size by bytes’s length. timingInfo.decodedBodySize += bytes?.byteLength ?? 0 // 6. If bytes is failure, then terminate fetchParams’s controller. if (isFailure) { fetchParams.controller.terminate(bytes) return } // 7. Enqueue a Uint8Array wrapping an ArrayBuffer containing bytes // into stream. const buffer = new Uint8Array(bytes) if (buffer.byteLength) { fetchParams.controller.controller.enqueue(buffer) } // 8. If stream is errored, then terminate the ongoing fetch. if (isErrored(stream)) { fetchParams.controller.terminate() return } // 9. If stream doesn’t need more data ask the user agent to suspend // the ongoing fetch. if (fetchParams.controller.controller.desiredSize <= 0) { return } } } // 2. If aborted, then: function onAborted (reason) { // 2. If fetchParams is aborted, then: if (isAborted(fetchParams)) { // 1. Set response’s aborted flag. response.aborted = true // 2. If stream is readable, then error stream with the result of // deserialize a serialized abort reason given fetchParams’s // controller’s serialized abort reason and an // implementation-defined realm. if (isReadable(stream)) { fetchParams.controller.controller.error( fetchParams.controller.serializedAbortReason ) } } else { // 3. Otherwise, if stream is readable, error stream with a TypeError. if (isReadable(stream)) { fetchParams.controller.controller.error(new TypeError('terminated', { cause: isErrorLike(reason) ? reason : undefined })) } } // 4. If connection uses HTTP/2, then transmit an RST_STREAM frame. // 5. Otherwise, the user agent should close connection unless it would be bad for performance to do so. fetchParams.controller.connection.destroy() } // 20. Return response. return response function dispatch ({ body }) { const url = requestCurrentURL(request) /** @type {import('../..').Agent} */ const agent = fetchParams.controller.dispatcher return new Promise((resolve, reject) => agent.dispatch( { path: url.pathname + url.search, origin: url.origin, method: request.method, body: agent.isMockActive ? request.body && (request.body.source || request.body.stream) : body, headers: request.headersList.entries, maxRedirections: 0, upgrade: request.mode === 'websocket' ? 'websocket' : undefined }, { body: null, abort: null, onConnect (abort) { // TODO (fix): Do we need connection here? const { connection } = fetchParams.controller // Set timingInfo’s final connection timing info to the result of calling clamp and coarsen // connection timing info with connection’s timing info, timingInfo’s post-redirect start // time, and fetchParams’s cross-origin isolated capability. // TODO: implement connection timing timingInfo.finalConnectionTimingInfo = clampAndCoarsenConnectionTimingInfo(undefined, timingInfo.postRedirectStartTime, fetchParams.crossOriginIsolatedCapability) if (connection.destroyed) { abort(new DOMException('The operation was aborted.', 'AbortError')) } else { fetchParams.controller.on('terminated', abort) this.abort = connection.abort = abort } // Set timingInfo’s final network-request start time to the coarsened shared current time given // fetchParams’s cross-origin isolated capability. timingInfo.finalNetworkRequestStartTime = coarsenedSharedCurrentTime(fetchParams.crossOriginIsolatedCapability) }, onResponseStarted () { // Set timingInfo’s final network-response start time to the coarsened shared current // time given fetchParams’s cross-origin isolated capability, immediately after the // user agent’s HTTP parser receives the first byte of the response (e.g., frame header // bytes for HTTP/2 or response status line for HTTP/1.x). timingInfo.finalNetworkResponseStartTime = coarsenedSharedCurrentTime(fetchParams.crossOriginIsolatedCapability) }, onHeaders (status, rawHeaders, resume, statusText) { if (status < 200) { return } /** @type {string[]} */ let codings = [] let location = '' const headersList = new HeadersList() for (let i = 0; i < rawHeaders.length; i += 2) { headersList.append(bufferToLowerCasedHeaderName(rawHeaders[i]), rawHeaders[i + 1].toString('latin1'), true) } const contentEncoding = headersList.get('content-encoding', true) if (contentEncoding) { // https://www.rfc-editor.org/rfc/rfc7231#section-3.1.2.1 // "All content-coding values are case-insensitive..." codings = contentEncoding.toLowerCase().split(',').map((x) => x.trim()) } location = headersList.get('location', true) this.body = new Readable({ read: resume }) const decoders = [] const willFollow = location && request.redirect === 'follow' && redirectStatusSet.has(status) // https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Encoding if (codings.length !== 0 && request.method !== 'HEAD' && request.method !== 'CONNECT' && !nullBodyStatus.includes(status) && !willFollow) { for (let i = codings.length - 1; i >= 0; --i) { const coding = codings[i] // https://www.rfc-editor.org/rfc/rfc9112.html#section-7.2 if (coding === 'x-gzip' || coding === 'gzip') { decoders.push(zlib.createGunzip({ // Be less strict when decoding compressed responses, since sometimes // servers send slightly invalid responses that are still accepted // by common browsers. // Always using Z_SYNC_FLUSH is what cURL does. flush: zlib.constants.Z_SYNC_FLUSH, finishFlush: zlib.constants.Z_SYNC_FLUSH })) } else if (coding === 'deflate') { decoders.push(createInflate({ flush: zlib.constants.Z_SYNC_FLUSH, finishFlush: zlib.constants.Z_SYNC_FLUSH })) } else if (coding === 'br') { decoders.push(zlib.createBrotliDecompress({ flush: zlib.constants.BROTLI_OPERATION_FLUSH, finishFlush: zlib.constants.BROTLI_OPERATION_FLUSH })) } else { decoders.length = 0 break } } } const onError = this.onError.bind(this) resolve({ status, statusText, headersList, body: decoders.length ? pipeline(this.body, ...decoders, (err) => { if (err) { this.onError(err) } }).on('error', onError) : this.body.on('error', onError) }) return true }, onData (chunk) { if (fetchParams.controller.dump) { return } // 1. If one or more bytes have been transmitted from response’s // message body, then: // 1. Let bytes be the transmitted bytes. const bytes = chunk // 2. Let codings be the result of extracting header list values // given `Content-Encoding` and response’s header list. // See pullAlgorithm. // 3. Increase timingInfo’s encoded body size by bytes’s length. timingInfo.encodedBodySize += bytes.byteLength // 4. See pullAlgorithm... return this.body.push(bytes) }, onComplete () { if (this.abort) { fetchParams.controller.off('terminated', this.abort) } if (fetchParams.controller.onAborted) { fetchParams.controller.off('terminated', fetchParams.controller.onAborted) } fetchParams.controller.ended = true this.body.push(null) }, onError (error) { if (this.abort) { fetchParams.controller.off('terminated', this.abort) } this.body?.destroy(error) fetchParams.controller.terminate(error) reject(error) }, onUpgrade (status, rawHeaders, socket) { if (status !== 101) { return } const headersList = new HeadersList() for (let i = 0; i < rawHeaders.length; i += 2) { headersList.append(bufferToLowerCasedHeaderName(rawHeaders[i]), rawHeaders[i + 1].toString('latin1'), true) } resolve({ status, statusText: STATUS_CODES[status], headersList, socket }) return true } } )) } } module.exports = { fetch, Fetch, fetching, finalizeAndReportTiming } node_modules/undici/lib/web/fetch/body.js 0000664 00000042032 15114741631 0014411 0 ustar 00 'use strict' const util = require('../../core/util') const { ReadableStreamFrom, isBlobLike, isReadableStreamLike, readableStreamClose, createDeferredPromise, fullyReadBody, extractMimeType, utf8DecodeBytes } = require('./util') const { FormData } = require('./formdata') const { kState } = require('./symbols') const { webidl } = require('./webidl') const { Blob } = require('node:buffer') const assert = require('node:assert') const { isErrored, isDisturbed } = require('node:stream') const { isArrayBuffer } = require('node:util/types') const { serializeAMimeType } = require('./data-url') const { multipartFormDataParser } = require('./formdata-parser') let random try { const crypto = require('node:crypto') random = (max) => crypto.randomInt(0, max) } catch { random = (max) => Math.floor(Math.random(max)) } const textEncoder = new TextEncoder() function noop () {} const hasFinalizationRegistry = globalThis.FinalizationRegistry && process.version.indexOf('v18') !== 0 let streamRegistry if (hasFinalizationRegistry) { streamRegistry = new FinalizationRegistry((weakRef) => { const stream = weakRef.deref() if (stream && !stream.locked && !isDisturbed(stream) && !isErrored(stream)) { stream.cancel('Response object has been garbage collected').catch(noop) } }) } // https://fetch.spec.whatwg.org/#concept-bodyinit-extract function extractBody (object, keepalive = false) { // 1. Let stream be null. let stream = null // 2. If object is a ReadableStream object, then set stream to object. if (object instanceof ReadableStream) { stream = object } else if (isBlobLike(object)) { // 3. Otherwise, if object is a Blob object, set stream to the // result of running object’s get stream. stream = object.stream() } else { // 4. Otherwise, set stream to a new ReadableStream object, and set // up stream with byte reading support. stream = new ReadableStream({ async pull (controller) { const buffer = typeof source === 'string' ? textEncoder.encode(source) : source if (buffer.byteLength) { controller.enqueue(buffer) } queueMicrotask(() => readableStreamClose(controller)) }, start () {}, type: 'bytes' }) } // 5. Assert: stream is a ReadableStream object. assert(isReadableStreamLike(stream)) // 6. Let action be null. let action = null // 7. Let source be null. let source = null // 8. Let length be null. let length = null // 9. Let type be null. let type = null // 10. Switch on object: if (typeof object === 'string') { // Set source to the UTF-8 encoding of object. // Note: setting source to a Uint8Array here breaks some mocking assumptions. source = object // Set type to `text/plain;charset=UTF-8`. type = 'text/plain;charset=UTF-8' } else if (object instanceof URLSearchParams) { // URLSearchParams // spec says to run application/x-www-form-urlencoded on body.list // this is implemented in Node.js as apart of an URLSearchParams instance toString method // See: https://github.com/nodejs/node/blob/e46c680bf2b211bbd52cf959ca17ee98c7f657f5/lib/internal/url.js#L490 // and https://github.com/nodejs/node/blob/e46c680bf2b211bbd52cf959ca17ee98c7f657f5/lib/internal/url.js#L1100 // Set source to the result of running the application/x-www-form-urlencoded serializer with object’s list. source = object.toString() // Set type to `application/x-www-form-urlencoded;charset=UTF-8`. type = 'application/x-www-form-urlencoded;charset=UTF-8' } else if (isArrayBuffer(object)) { // BufferSource/ArrayBuffer // Set source to a copy of the bytes held by object. source = new Uint8Array(object.slice()) } else if (ArrayBuffer.isView(object)) { // BufferSource/ArrayBufferView // Set source to a copy of the bytes held by object. source = new Uint8Array(object.buffer.slice(object.byteOffset, object.byteOffset + object.byteLength)) } else if (util.isFormDataLike(object)) { const boundary = `----formdata-undici-0${`${random(1e11)}`.padStart(11, '0')}` const prefix = `--${boundary}\r\nContent-Disposition: form-data` /*! formdata-polyfill. MIT License. Jimmy Wärting <https://jimmy.warting.se/opensource> */ const escape = (str) => str.replace(/\n/g, '%0A').replace(/\r/g, '%0D').replace(/"/g, '%22') const normalizeLinefeeds = (value) => value.replace(/\r?\n|\r/g, '\r\n') // Set action to this step: run the multipart/form-data // encoding algorithm, with object’s entry list and UTF-8. // - This ensures that the body is immutable and can't be changed afterwords // - That the content-length is calculated in advance. // - And that all parts are pre-encoded and ready to be sent. const blobParts = [] const rn = new Uint8Array([13, 10]) // '\r\n' length = 0 let hasUnknownSizeValue = false for (const [name, value] of object) { if (typeof value === 'string') { const chunk = textEncoder.encode(prefix + `; name="${escape(normalizeLinefeeds(name))}"` + `\r\n\r\n${normalizeLinefeeds(value)}\r\n`) blobParts.push(chunk) length += chunk.byteLength } else { const chunk = textEncoder.encode(`${prefix}; name="${escape(normalizeLinefeeds(name))}"` + (value.name ? `; filename="${escape(value.name)}"` : '') + '\r\n' + `Content-Type: ${ value.type || 'application/octet-stream' }\r\n\r\n`) blobParts.push(chunk, value, rn) if (typeof value.size === 'number') { length += chunk.byteLength + value.size + rn.byteLength } else { hasUnknownSizeValue = true } } } // CRLF is appended to the body to function with legacy servers and match other implementations. // https://github.com/curl/curl/blob/3434c6b46e682452973972e8313613dfa58cd690/lib/mime.c#L1029-L1030 // https://github.com/form-data/form-data/issues/63 const chunk = textEncoder.encode(`--${boundary}--\r\n`) blobParts.push(chunk) length += chunk.byteLength if (hasUnknownSizeValue) { length = null } // Set source to object. source = object action = async function * () { for (const part of blobParts) { if (part.stream) { yield * part.stream() } else { yield part } } } // Set type to `multipart/form-data; boundary=`, // followed by the multipart/form-data boundary string generated // by the multipart/form-data encoding algorithm. type = `multipart/form-data; boundary=${boundary}` } else if (isBlobLike(object)) { // Blob // Set source to object. source = object // Set length to object’s size. length = object.size // If object’s type attribute is not the empty byte sequence, set // type to its value. if (object.type) { type = object.type } } else if (typeof object[Symbol.asyncIterator] === 'function') { // If keepalive is true, then throw a TypeError. if (keepalive) { throw new TypeError('keepalive') } // If object is disturbed or locked, then throw a TypeError. if (util.isDisturbed(object) || object.locked) { throw new TypeError( 'Response body object should not be disturbed or locked' ) } stream = object instanceof ReadableStream ? object : ReadableStreamFrom(object) } // 11. If source is a byte sequence, then set action to a // step that returns source and length to source’s length. if (typeof source === 'string' || util.isBuffer(source)) { length = Buffer.byteLength(source) } // 12. If action is non-null, then run these steps in in parallel: if (action != null) { // Run action. let iterator stream = new ReadableStream({ async start () { iterator = action(object)[Symbol.asyncIterator]() }, async pull (controller) { const { value, done } = await iterator.next() if (done) { // When running action is done, close stream. queueMicrotask(() => { controller.close() controller.byobRequest?.respond(0) }) } else { // Whenever one or more bytes are available and stream is not errored, // enqueue a Uint8Array wrapping an ArrayBuffer containing the available // bytes into stream. if (!isErrored(stream)) { const buffer = new Uint8Array(value) if (buffer.byteLength) { controller.enqueue(buffer) } } } return controller.desiredSize > 0 }, async cancel (reason) { await iterator.return() }, type: 'bytes' }) } // 13. Let body be a body whose stream is stream, source is source, // and length is length. const body = { stream, source, length } // 14. Return (body, type). return [body, type] } // https://fetch.spec.whatwg.org/#bodyinit-safely-extract function safelyExtractBody (object, keepalive = false) { // To safely extract a body and a `Content-Type` value from // a byte sequence or BodyInit object object, run these steps: // 1. If object is a ReadableStream object, then: if (object instanceof ReadableStream) { // Assert: object is neither disturbed nor locked. // istanbul ignore next assert(!util.isDisturbed(object), 'The body has already been consumed.') // istanbul ignore next assert(!object.locked, 'The stream is locked.') } // 2. Return the results of extracting object. return extractBody(object, keepalive) } function cloneBody (instance, body) { // To clone a body body, run these steps: // https://fetch.spec.whatwg.org/#concept-body-clone // 1. Let « out1, out2 » be the result of teeing body’s stream. const [out1, out2] = body.stream.tee() if (hasFinalizationRegistry) { streamRegistry.register(instance, new WeakRef(out1)) } // 2. Set body’s stream to out1. body.stream = out1 // 3. Return a body whose stream is out2 and other members are copied from body. return { stream: out2, length: body.length, source: body.source } } function throwIfAborted (state) { if (state.aborted) { throw new DOMException('The operation was aborted.', 'AbortError') } } function bodyMixinMethods (instance) { const methods = { blob () { // The blob() method steps are to return the result of // running consume body with this and the following step // given a byte sequence bytes: return a Blob whose // contents are bytes and whose type attribute is this’s // MIME type. return consumeBody(this, (bytes) => { let mimeType = bodyMimeType(this) if (mimeType === null) { mimeType = '' } else if (mimeType) { mimeType = serializeAMimeType(mimeType) } // Return a Blob whose contents are bytes and type attribute // is mimeType. return new Blob([bytes], { type: mimeType }) }, instance) }, arrayBuffer () { // The arrayBuffer() method steps are to return the result // of running consume body with this and the following step // given a byte sequence bytes: return a new ArrayBuffer // whose contents are bytes. return consumeBody(this, (bytes) => { return new Uint8Array(bytes).buffer }, instance) }, text () { // The text() method steps are to return the result of running // consume body with this and UTF-8 decode. return consumeBody(this, utf8DecodeBytes, instance) }, json () { // The json() method steps are to return the result of running // consume body with this and parse JSON from bytes. return consumeBody(this, parseJSONFromBytes, instance) }, formData () { // The formData() method steps are to return the result of running // consume body with this and the following step given a byte sequence bytes: return consumeBody(this, (value) => { // 1. Let mimeType be the result of get the MIME type with this. const mimeType = bodyMimeType(this) // 2. If mimeType is non-null, then switch on mimeType’s essence and run // the corresponding steps: if (mimeType !== null) { switch (mimeType.essence) { case 'multipart/form-data': { // 1. ... [long step] const parsed = multipartFormDataParser(value, mimeType) // 2. If that fails for some reason, then throw a TypeError. if (parsed === 'failure') { throw new TypeError('Failed to parse body as FormData.') } // 3. Return a new FormData object, appending each entry, // resulting from the parsing operation, to its entry list. const fd = new FormData() fd[kState] = parsed return fd } case 'application/x-www-form-urlencoded': { // 1. Let entries be the result of parsing bytes. const entries = new URLSearchParams(value.toString()) // 2. If entries is failure, then throw a TypeError. // 3. Return a new FormData object whose entry list is entries. const fd = new FormData() for (const [name, value] of entries) { fd.append(name, value) } return fd } } } // 3. Throw a TypeError. throw new TypeError( 'Content-Type was not one of "multipart/form-data" or "application/x-www-form-urlencoded".' ) }, instance) }, bytes () { // The bytes() method steps are to return the result of running consume body // with this and the following step given a byte sequence bytes: return the // result of creating a Uint8Array from bytes in this’s relevant realm. return consumeBody(this, (bytes) => { return new Uint8Array(bytes) }, instance) } } return methods } function mixinBody (prototype) { Object.assign(prototype.prototype, bodyMixinMethods(prototype)) } /** * @see https://fetch.spec.whatwg.org/#concept-body-consume-body * @param {Response|Request} object * @param {(value: unknown) => unknown} convertBytesToJSValue * @param {Response|Request} instance */ async function consumeBody (object, convertBytesToJSValue, instance) { webidl.brandCheck(object, instance) // 1. If object is unusable, then return a promise rejected // with a TypeError. if (bodyUnusable(object)) { throw new TypeError('Body is unusable: Body has already been read') } throwIfAborted(object[kState]) // 2. Let promise be a new promise. const promise = createDeferredPromise() // 3. Let errorSteps given error be to reject promise with error. const errorSteps = (error) => promise.reject(error) // 4. Let successSteps given a byte sequence data be to resolve // promise with the result of running convertBytesToJSValue // with data. If that threw an exception, then run errorSteps // with that exception. const successSteps = (data) => { try { promise.resolve(convertBytesToJSValue(data)) } catch (e) { errorSteps(e) } } // 5. If object’s body is null, then run successSteps with an // empty byte sequence. if (object[kState].body == null) { successSteps(Buffer.allocUnsafe(0)) return promise.promise } // 6. Otherwise, fully read object’s body given successSteps, // errorSteps, and object’s relevant global object. await fullyReadBody(object[kState].body, successSteps, errorSteps) // 7. Return promise. return promise.promise } // https://fetch.spec.whatwg.org/#body-unusable function bodyUnusable (object) { const body = object[kState].body // An object including the Body interface mixin is // said to be unusable if its body is non-null and // its body’s stream is disturbed or locked. return body != null && (body.stream.locked || util.isDisturbed(body.stream)) } /** * @see https://infra.spec.whatwg.org/#parse-json-bytes-to-a-javascript-value * @param {Uint8Array} bytes */ function parseJSONFromBytes (bytes) { return JSON.parse(utf8DecodeBytes(bytes)) } /** * @see https://fetch.spec.whatwg.org/#concept-body-mime-type * @param {import('./response').Response|import('./request').Request} requestOrResponse */ function bodyMimeType (requestOrResponse) { // 1. Let headers be null. // 2. If requestOrResponse is a Request object, then set headers to requestOrResponse’s request’s header list. // 3. Otherwise, set headers to requestOrResponse’s response’s header list. /** @type {import('./headers').HeadersList} */ const headers = requestOrResponse[kState].headersList // 4. Let mimeType be the result of extracting a MIME type from headers. const mimeType = extractMimeType(headers) // 5. If mimeType is failure, then return null. if (mimeType === 'failure') { return null } // 6. Return mimeType. return mimeType } module.exports = { extractBody, safelyExtractBody, cloneBody, mixinBody, streamRegistry, hasFinalizationRegistry, bodyUnusable } node_modules/undici/lib/web/fetch/dispatcher-weakref.js 0000664 00000002073 15114741631 0017225 0 ustar 00 'use strict' const { kConnected, kSize } = require('../../core/symbols') class CompatWeakRef { constructor (value) { this.value = value } deref () { return this.value[kConnected] === 0 && this.value[kSize] === 0 ? undefined : this.value } } class CompatFinalizer { constructor (finalizer) { this.finalizer = finalizer } register (dispatcher, key) { if (dispatcher.on) { dispatcher.on('disconnect', () => { if (dispatcher[kConnected] === 0 && dispatcher[kSize] === 0) { this.finalizer(key) } }) } } unregister (key) {} } module.exports = function () { // FIXME: remove workaround when the Node bug is backported to v18 // https://github.com/nodejs/node/issues/49344#issuecomment-1741776308 if (process.env.NODE_V8_COVERAGE && process.version.startsWith('v18')) { process._rawDebug('Using compatibility WeakRef and FinalizationRegistry') return { WeakRef: CompatWeakRef, FinalizationRegistry: CompatFinalizer } } return { WeakRef, FinalizationRegistry } } node_modules/undici/lib/web/websocket/events.js 0000664 00000016271 15114741631 0015663 0 ustar 00 'use strict' const { webidl } = require('../fetch/webidl') const { kEnumerableProperty } = require('../../core/util') const { kConstruct } = require('../../core/symbols') const { MessagePort } = require('node:worker_threads') /** * @see https://html.spec.whatwg.org/multipage/comms.html#messageevent */ class MessageEvent extends Event { #eventInit constructor (type, eventInitDict = {}) { if (type === kConstruct) { super(arguments[1], arguments[2]) webidl.util.markAsUncloneable(this) return } const prefix = 'MessageEvent constructor' webidl.argumentLengthCheck(arguments, 1, prefix) type = webidl.converters.DOMString(type, prefix, 'type') eventInitDict = webidl.converters.MessageEventInit(eventInitDict, prefix, 'eventInitDict') super(type, eventInitDict) this.#eventInit = eventInitDict webidl.util.markAsUncloneable(this) } get data () { webidl.brandCheck(this, MessageEvent) return this.#eventInit.data } get origin () { webidl.brandCheck(this, MessageEvent) return this.#eventInit.origin } get lastEventId () { webidl.brandCheck(this, MessageEvent) return this.#eventInit.lastEventId } get source () { webidl.brandCheck(this, MessageEvent) return this.#eventInit.source } get ports () { webidl.brandCheck(this, MessageEvent) if (!Object.isFrozen(this.#eventInit.ports)) { Object.freeze(this.#eventInit.ports) } return this.#eventInit.ports } initMessageEvent ( type, bubbles = false, cancelable = false, data = null, origin = '', lastEventId = '', source = null, ports = [] ) { webidl.brandCheck(this, MessageEvent) webidl.argumentLengthCheck(arguments, 1, 'MessageEvent.initMessageEvent') return new MessageEvent(type, { bubbles, cancelable, data, origin, lastEventId, source, ports }) } static createFastMessageEvent (type, init) { const messageEvent = new MessageEvent(kConstruct, type, init) messageEvent.#eventInit = init messageEvent.#eventInit.data ??= null messageEvent.#eventInit.origin ??= '' messageEvent.#eventInit.lastEventId ??= '' messageEvent.#eventInit.source ??= null messageEvent.#eventInit.ports ??= [] return messageEvent } } const { createFastMessageEvent } = MessageEvent delete MessageEvent.createFastMessageEvent /** * @see https://websockets.spec.whatwg.org/#the-closeevent-interface */ class CloseEvent extends Event { #eventInit constructor (type, eventInitDict = {}) { const prefix = 'CloseEvent constructor' webidl.argumentLengthCheck(arguments, 1, prefix) type = webidl.converters.DOMString(type, prefix, 'type') eventInitDict = webidl.converters.CloseEventInit(eventInitDict) super(type, eventInitDict) this.#eventInit = eventInitDict webidl.util.markAsUncloneable(this) } get wasClean () { webidl.brandCheck(this, CloseEvent) return this.#eventInit.wasClean } get code () { webidl.brandCheck(this, CloseEvent) return this.#eventInit.code } get reason () { webidl.brandCheck(this, CloseEvent) return this.#eventInit.reason } } // https://html.spec.whatwg.org/multipage/webappapis.html#the-errorevent-interface class ErrorEvent extends Event { #eventInit constructor (type, eventInitDict) { const prefix = 'ErrorEvent constructor' webidl.argumentLengthCheck(arguments, 1, prefix) super(type, eventInitDict) webidl.util.markAsUncloneable(this) type = webidl.converters.DOMString(type, prefix, 'type') eventInitDict = webidl.converters.ErrorEventInit(eventInitDict ?? {}) this.#eventInit = eventInitDict } get message () { webidl.brandCheck(this, ErrorEvent) return this.#eventInit.message } get filename () { webidl.brandCheck(this, ErrorEvent) return this.#eventInit.filename } get lineno () { webidl.brandCheck(this, ErrorEvent) return this.#eventInit.lineno } get colno () { webidl.brandCheck(this, ErrorEvent) return this.#eventInit.colno } get error () { webidl.brandCheck(this, ErrorEvent) return this.#eventInit.error } } Object.defineProperties(MessageEvent.prototype, { [Symbol.toStringTag]: { value: 'MessageEvent', configurable: true }, data: kEnumerableProperty, origin: kEnumerableProperty, lastEventId: kEnumerableProperty, source: kEnumerableProperty, ports: kEnumerableProperty, initMessageEvent: kEnumerableProperty }) Object.defineProperties(CloseEvent.prototype, { [Symbol.toStringTag]: { value: 'CloseEvent', configurable: true }, reason: kEnumerableProperty, code: kEnumerableProperty, wasClean: kEnumerableProperty }) Object.defineProperties(ErrorEvent.prototype, { [Symbol.toStringTag]: { value: 'ErrorEvent', configurable: true }, message: kEnumerableProperty, filename: kEnumerableProperty, lineno: kEnumerableProperty, colno: kEnumerableProperty, error: kEnumerableProperty }) webidl.converters.MessagePort = webidl.interfaceConverter(MessagePort) webidl.converters['sequence<MessagePort>'] = webidl.sequenceConverter( webidl.converters.MessagePort ) const eventInit = [ { key: 'bubbles', converter: webidl.converters.boolean, defaultValue: () => false }, { key: 'cancelable', converter: webidl.converters.boolean, defaultValue: () => false }, { key: 'composed', converter: webidl.converters.boolean, defaultValue: () => false } ] webidl.converters.MessageEventInit = webidl.dictionaryConverter([ ...eventInit, { key: 'data', converter: webidl.converters.any, defaultValue: () => null }, { key: 'origin', converter: webidl.converters.USVString, defaultValue: () => '' }, { key: 'lastEventId', converter: webidl.converters.DOMString, defaultValue: () => '' }, { key: 'source', // Node doesn't implement WindowProxy or ServiceWorker, so the only // valid value for source is a MessagePort. converter: webidl.nullableConverter(webidl.converters.MessagePort), defaultValue: () => null }, { key: 'ports', converter: webidl.converters['sequence<MessagePort>'], defaultValue: () => new Array(0) } ]) webidl.converters.CloseEventInit = webidl.dictionaryConverter([ ...eventInit, { key: 'wasClean', converter: webidl.converters.boolean, defaultValue: () => false }, { key: 'code', converter: webidl.converters['unsigned short'], defaultValue: () => 0 }, { key: 'reason', converter: webidl.converters.USVString, defaultValue: () => '' } ]) webidl.converters.ErrorEventInit = webidl.dictionaryConverter([ ...eventInit, { key: 'message', converter: webidl.converters.DOMString, defaultValue: () => '' }, { key: 'filename', converter: webidl.converters.USVString, defaultValue: () => '' }, { key: 'lineno', converter: webidl.converters['unsigned long'], defaultValue: () => 0 }, { key: 'colno', converter: webidl.converters['unsigned long'], defaultValue: () => 0 }, { key: 'error', converter: webidl.converters.any } ]) module.exports = { MessageEvent, CloseEvent, ErrorEvent, createFastMessageEvent } node_modules/undici/lib/web/websocket/frame.js 0000664 00000004403 15114741631 0015443 0 ustar 00 'use strict' const { maxUnsigned16Bit } = require('./constants') const BUFFER_SIZE = 16386 /** @type {import('crypto')} */ let crypto let buffer = null let bufIdx = BUFFER_SIZE try { crypto = require('node:crypto') /* c8 ignore next 3 */ } catch { crypto = { // not full compatibility, but minimum. randomFillSync: function randomFillSync (buffer, _offset, _size) { for (let i = 0; i < buffer.length; ++i) { buffer[i] = Math.random() * 255 | 0 } return buffer } } } function generateMask () { if (bufIdx === BUFFER_SIZE) { bufIdx = 0 crypto.randomFillSync((buffer ??= Buffer.allocUnsafe(BUFFER_SIZE)), 0, BUFFER_SIZE) } return [buffer[bufIdx++], buffer[bufIdx++], buffer[bufIdx++], buffer[bufIdx++]] } class WebsocketFrameSend { /** * @param {Buffer|undefined} data */ constructor (data) { this.frameData = data } createFrame (opcode) { const frameData = this.frameData const maskKey = generateMask() const bodyLength = frameData?.byteLength ?? 0 /** @type {number} */ let payloadLength = bodyLength // 0-125 let offset = 6 if (bodyLength > maxUnsigned16Bit) { offset += 8 // payload length is next 8 bytes payloadLength = 127 } else if (bodyLength > 125) { offset += 2 // payload length is next 2 bytes payloadLength = 126 } const buffer = Buffer.allocUnsafe(bodyLength + offset) // Clear first 2 bytes, everything else is overwritten buffer[0] = buffer[1] = 0 buffer[0] |= 0x80 // FIN buffer[0] = (buffer[0] & 0xF0) + opcode // opcode /*! ws. MIT License. Einar Otto Stangvik <einaros@gmail.com> */ buffer[offset - 4] = maskKey[0] buffer[offset - 3] = maskKey[1] buffer[offset - 2] = maskKey[2] buffer[offset - 1] = maskKey[3] buffer[1] = payloadLength if (payloadLength === 126) { buffer.writeUInt16BE(bodyLength, 2) } else if (payloadLength === 127) { // Clear extended payload length buffer[2] = buffer[3] = 0 buffer.writeUIntBE(bodyLength, 4, 6) } buffer[1] |= 0x80 // MASK // mask body for (let i = 0; i < bodyLength; ++i) { buffer[offset + i] = frameData[i] ^ maskKey[i & 3] } return buffer } } module.exports = { WebsocketFrameSend } node_modules/undici/lib/web/websocket/sender.js 0000664 00000004363 15114741631 0015636 0 ustar 00 'use strict' const { WebsocketFrameSend } = require('./frame') const { opcodes, sendHints } = require('./constants') const FixedQueue = require('../../dispatcher/fixed-queue') /** @type {typeof Uint8Array} */ const FastBuffer = Buffer[Symbol.species] /** * @typedef {object} SendQueueNode * @property {Promise<void> | null} promise * @property {((...args: any[]) => any)} callback * @property {Buffer | null} frame */ class SendQueue { /** * @type {FixedQueue} */ #queue = new FixedQueue() /** * @type {boolean} */ #running = false /** @type {import('node:net').Socket} */ #socket constructor (socket) { this.#socket = socket } add (item, cb, hint) { if (hint !== sendHints.blob) { const frame = createFrame(item, hint) if (!this.#running) { // fast-path this.#socket.write(frame, cb) } else { /** @type {SendQueueNode} */ const node = { promise: null, callback: cb, frame } this.#queue.push(node) } return } /** @type {SendQueueNode} */ const node = { promise: item.arrayBuffer().then((ab) => { node.promise = null node.frame = createFrame(ab, hint) }), callback: cb, frame: null } this.#queue.push(node) if (!this.#running) { this.#run() } } async #run () { this.#running = true const queue = this.#queue while (!queue.isEmpty()) { const node = queue.shift() // wait pending promise if (node.promise !== null) { await node.promise } // write this.#socket.write(node.frame, node.callback) // cleanup node.callback = node.frame = null } this.#running = false } } function createFrame (data, hint) { return new WebsocketFrameSend(toBuffer(data, hint)).createFrame(hint === sendHints.string ? opcodes.TEXT : opcodes.BINARY) } function toBuffer (data, hint) { switch (hint) { case sendHints.string: return Buffer.from(data) case sendHints.arrayBuffer: case sendHints.blob: return new FastBuffer(data) case sendHints.typedArray: return new FastBuffer(data.buffer, data.byteOffset, data.byteLength) } } module.exports = { SendQueue } node_modules/undici/lib/web/websocket/constants.js 0000664 00000002061 15114741631 0016363 0 ustar 00 'use strict' // This is a Globally Unique Identifier unique used // to validate that the endpoint accepts websocket // connections. // See https://www.rfc-editor.org/rfc/rfc6455.html#section-1.3 const uid = '258EAFA5-E914-47DA-95CA-C5AB0DC85B11' /** @type {PropertyDescriptor} */ const staticPropertyDescriptors = { enumerable: true, writable: false, configurable: false } const states = { CONNECTING: 0, OPEN: 1, CLOSING: 2, CLOSED: 3 } const sentCloseFrameState = { NOT_SENT: 0, PROCESSING: 1, SENT: 2 } const opcodes = { CONTINUATION: 0x0, TEXT: 0x1, BINARY: 0x2, CLOSE: 0x8, PING: 0x9, PONG: 0xA } const maxUnsigned16Bit = 2 ** 16 - 1 // 65535 const parserStates = { INFO: 0, PAYLOADLENGTH_16: 2, PAYLOADLENGTH_64: 3, READ_DATA: 4 } const emptyBuffer = Buffer.allocUnsafe(0) const sendHints = { string: 1, typedArray: 2, arrayBuffer: 3, blob: 4 } module.exports = { uid, sentCloseFrameState, staticPropertyDescriptors, states, opcodes, maxUnsigned16Bit, parserStates, emptyBuffer, sendHints } node_modules/undici/lib/web/websocket/symbols.js 0000664 00000000512 15114741631 0016036 0 ustar 00 'use strict' module.exports = { kWebSocketURL: Symbol('url'), kReadyState: Symbol('ready state'), kController: Symbol('controller'), kResponse: Symbol('response'), kBinaryType: Symbol('binary type'), kSentClose: Symbol('sent close'), kReceivedClose: Symbol('received close'), kByteParser: Symbol('byte parser') } node_modules/undici/lib/web/websocket/websocket.js 0000664 00000044103 15114741631 0016340 0 ustar 00 'use strict' const { webidl } = require('../fetch/webidl') const { URLSerializer } = require('../fetch/data-url') const { environmentSettingsObject } = require('../fetch/util') const { staticPropertyDescriptors, states, sentCloseFrameState, sendHints } = require('./constants') const { kWebSocketURL, kReadyState, kController, kBinaryType, kResponse, kSentClose, kByteParser } = require('./symbols') const { isConnecting, isEstablished, isClosing, isValidSubprotocol, fireEvent } = require('./util') const { establishWebSocketConnection, closeWebSocketConnection } = require('./connection') const { ByteParser } = require('./receiver') const { kEnumerableProperty, isBlobLike } = require('../../core/util') const { getGlobalDispatcher } = require('../../global') const { types } = require('node:util') const { ErrorEvent, CloseEvent } = require('./events') const { SendQueue } = require('./sender') // https://websockets.spec.whatwg.org/#interface-definition class WebSocket extends EventTarget { #events = { open: null, error: null, close: null, message: null } #bufferedAmount = 0 #protocol = '' #extensions = '' /** @type {SendQueue} */ #sendQueue /** * @param {string} url * @param {string|string[]} protocols */ constructor (url, protocols = []) { super() webidl.util.markAsUncloneable(this) const prefix = 'WebSocket constructor' webidl.argumentLengthCheck(arguments, 1, prefix) const options = webidl.converters['DOMString or sequence<DOMString> or WebSocketInit'](protocols, prefix, 'options') url = webidl.converters.USVString(url, prefix, 'url') protocols = options.protocols // 1. Let baseURL be this's relevant settings object's API base URL. const baseURL = environmentSettingsObject.settingsObject.baseUrl // 1. Let urlRecord be the result of applying the URL parser to url with baseURL. let urlRecord try { urlRecord = new URL(url, baseURL) } catch (e) { // 3. If urlRecord is failure, then throw a "SyntaxError" DOMException. throw new DOMException(e, 'SyntaxError') } // 4. If urlRecord’s scheme is "http", then set urlRecord’s scheme to "ws". if (urlRecord.protocol === 'http:') { urlRecord.protocol = 'ws:' } else if (urlRecord.protocol === 'https:') { // 5. Otherwise, if urlRecord’s scheme is "https", set urlRecord’s scheme to "wss". urlRecord.protocol = 'wss:' } // 6. If urlRecord’s scheme is not "ws" or "wss", then throw a "SyntaxError" DOMException. if (urlRecord.protocol !== 'ws:' && urlRecord.protocol !== 'wss:') { throw new DOMException( `Expected a ws: or wss: protocol, got ${urlRecord.protocol}`, 'SyntaxError' ) } // 7. If urlRecord’s fragment is non-null, then throw a "SyntaxError" // DOMException. if (urlRecord.hash || urlRecord.href.endsWith('#')) { throw new DOMException('Got fragment', 'SyntaxError') } // 8. If protocols is a string, set protocols to a sequence consisting // of just that string. if (typeof protocols === 'string') { protocols = [protocols] } // 9. If any of the values in protocols occur more than once or otherwise // fail to match the requirements for elements that comprise the value // of `Sec-WebSocket-Protocol` fields as defined by The WebSocket // protocol, then throw a "SyntaxError" DOMException. if (protocols.length !== new Set(protocols.map(p => p.toLowerCase())).size) { throw new DOMException('Invalid Sec-WebSocket-Protocol value', 'SyntaxError') } if (protocols.length > 0 && !protocols.every(p => isValidSubprotocol(p))) { throw new DOMException('Invalid Sec-WebSocket-Protocol value', 'SyntaxError') } // 10. Set this's url to urlRecord. this[kWebSocketURL] = new URL(urlRecord.href) // 11. Let client be this's relevant settings object. const client = environmentSettingsObject.settingsObject // 12. Run this step in parallel: // 1. Establish a WebSocket connection given urlRecord, protocols, // and client. this[kController] = establishWebSocketConnection( urlRecord, protocols, client, this, (response, extensions) => this.#onConnectionEstablished(response, extensions), options ) // Each WebSocket object has an associated ready state, which is a // number representing the state of the connection. Initially it must // be CONNECTING (0). this[kReadyState] = WebSocket.CONNECTING this[kSentClose] = sentCloseFrameState.NOT_SENT // The extensions attribute must initially return the empty string. // The protocol attribute must initially return the empty string. // Each WebSocket object has an associated binary type, which is a // BinaryType. Initially it must be "blob". this[kBinaryType] = 'blob' } /** * @see https://websockets.spec.whatwg.org/#dom-websocket-close * @param {number|undefined} code * @param {string|undefined} reason */ close (code = undefined, reason = undefined) { webidl.brandCheck(this, WebSocket) const prefix = 'WebSocket.close' if (code !== undefined) { code = webidl.converters['unsigned short'](code, prefix, 'code', { clamp: true }) } if (reason !== undefined) { reason = webidl.converters.USVString(reason, prefix, 'reason') } // 1. If code is present, but is neither an integer equal to 1000 nor an // integer in the range 3000 to 4999, inclusive, throw an // "InvalidAccessError" DOMException. if (code !== undefined) { if (code !== 1000 && (code < 3000 || code > 4999)) { throw new DOMException('invalid code', 'InvalidAccessError') } } let reasonByteLength = 0 // 2. If reason is present, then run these substeps: if (reason !== undefined) { // 1. Let reasonBytes be the result of encoding reason. // 2. If reasonBytes is longer than 123 bytes, then throw a // "SyntaxError" DOMException. reasonByteLength = Buffer.byteLength(reason) if (reasonByteLength > 123) { throw new DOMException( `Reason must be less than 123 bytes; received ${reasonByteLength}`, 'SyntaxError' ) } } // 3. Run the first matching steps from the following list: closeWebSocketConnection(this, code, reason, reasonByteLength) } /** * @see https://websockets.spec.whatwg.org/#dom-websocket-send * @param {NodeJS.TypedArray|ArrayBuffer|Blob|string} data */ send (data) { webidl.brandCheck(this, WebSocket) const prefix = 'WebSocket.send' webidl.argumentLengthCheck(arguments, 1, prefix) data = webidl.converters.WebSocketSendData(data, prefix, 'data') // 1. If this's ready state is CONNECTING, then throw an // "InvalidStateError" DOMException. if (isConnecting(this)) { throw new DOMException('Sent before connected.', 'InvalidStateError') } // 2. Run the appropriate set of steps from the following list: // https://datatracker.ietf.org/doc/html/rfc6455#section-6.1 // https://datatracker.ietf.org/doc/html/rfc6455#section-5.2 if (!isEstablished(this) || isClosing(this)) { return } // If data is a string if (typeof data === 'string') { // If the WebSocket connection is established and the WebSocket // closing handshake has not yet started, then the user agent // must send a WebSocket Message comprised of the data argument // using a text frame opcode; if the data cannot be sent, e.g. // because it would need to be buffered but the buffer is full, // the user agent must flag the WebSocket as full and then close // the WebSocket connection. Any invocation of this method with a // string argument that does not throw an exception must increase // the bufferedAmount attribute by the number of bytes needed to // express the argument as UTF-8. const length = Buffer.byteLength(data) this.#bufferedAmount += length this.#sendQueue.add(data, () => { this.#bufferedAmount -= length }, sendHints.string) } else if (types.isArrayBuffer(data)) { // If the WebSocket connection is established, and the WebSocket // closing handshake has not yet started, then the user agent must // send a WebSocket Message comprised of data using a binary frame // opcode; if the data cannot be sent, e.g. because it would need // to be buffered but the buffer is full, the user agent must flag // the WebSocket as full and then close the WebSocket connection. // The data to be sent is the data stored in the buffer described // by the ArrayBuffer object. Any invocation of this method with an // ArrayBuffer argument that does not throw an exception must // increase the bufferedAmount attribute by the length of the // ArrayBuffer in bytes. this.#bufferedAmount += data.byteLength this.#sendQueue.add(data, () => { this.#bufferedAmount -= data.byteLength }, sendHints.arrayBuffer) } else if (ArrayBuffer.isView(data)) { // If the WebSocket connection is established, and the WebSocket // closing handshake has not yet started, then the user agent must // send a WebSocket Message comprised of data using a binary frame // opcode; if the data cannot be sent, e.g. because it would need to // be buffered but the buffer is full, the user agent must flag the // WebSocket as full and then close the WebSocket connection. The // data to be sent is the data stored in the section of the buffer // described by the ArrayBuffer object that data references. Any // invocation of this method with this kind of argument that does // not throw an exception must increase the bufferedAmount attribute // by the length of data’s buffer in bytes. this.#bufferedAmount += data.byteLength this.#sendQueue.add(data, () => { this.#bufferedAmount -= data.byteLength }, sendHints.typedArray) } else if (isBlobLike(data)) { // If the WebSocket connection is established, and the WebSocket // closing handshake has not yet started, then the user agent must // send a WebSocket Message comprised of data using a binary frame // opcode; if the data cannot be sent, e.g. because it would need to // be buffered but the buffer is full, the user agent must flag the // WebSocket as full and then close the WebSocket connection. The data // to be sent is the raw data represented by the Blob object. Any // invocation of this method with a Blob argument that does not throw // an exception must increase the bufferedAmount attribute by the size // of the Blob object’s raw data, in bytes. this.#bufferedAmount += data.size this.#sendQueue.add(data, () => { this.#bufferedAmount -= data.size }, sendHints.blob) } } get readyState () { webidl.brandCheck(this, WebSocket) // The readyState getter steps are to return this's ready state. return this[kReadyState] } get bufferedAmount () { webidl.brandCheck(this, WebSocket) return this.#bufferedAmount } get url () { webidl.brandCheck(this, WebSocket) // The url getter steps are to return this's url, serialized. return URLSerializer(this[kWebSocketURL]) } get extensions () { webidl.brandCheck(this, WebSocket) return this.#extensions } get protocol () { webidl.brandCheck(this, WebSocket) return this.#protocol } get onopen () { webidl.brandCheck(this, WebSocket) return this.#events.open } set onopen (fn) { webidl.brandCheck(this, WebSocket) if (this.#events.open) { this.removeEventListener('open', this.#events.open) } if (typeof fn === 'function') { this.#events.open = fn this.addEventListener('open', fn) } else { this.#events.open = null } } get onerror () { webidl.brandCheck(this, WebSocket) return this.#events.error } set onerror (fn) { webidl.brandCheck(this, WebSocket) if (this.#events.error) { this.removeEventListener('error', this.#events.error) } if (typeof fn === 'function') { this.#events.error = fn this.addEventListener('error', fn) } else { this.#events.error = null } } get onclose () { webidl.brandCheck(this, WebSocket) return this.#events.close } set onclose (fn) { webidl.brandCheck(this, WebSocket) if (this.#events.close) { this.removeEventListener('close', this.#events.close) } if (typeof fn === 'function') { this.#events.close = fn this.addEventListener('close', fn) } else { this.#events.close = null } } get onmessage () { webidl.brandCheck(this, WebSocket) return this.#events.message } set onmessage (fn) { webidl.brandCheck(this, WebSocket) if (this.#events.message) { this.removeEventListener('message', this.#events.message) } if (typeof fn === 'function') { this.#events.message = fn this.addEventListener('message', fn) } else { this.#events.message = null } } get binaryType () { webidl.brandCheck(this, WebSocket) return this[kBinaryType] } set binaryType (type) { webidl.brandCheck(this, WebSocket) if (type !== 'blob' && type !== 'arraybuffer') { this[kBinaryType] = 'blob' } else { this[kBinaryType] = type } } /** * @see https://websockets.spec.whatwg.org/#feedback-from-the-protocol */ #onConnectionEstablished (response, parsedExtensions) { // processResponse is called when the "response’s header list has been received and initialized." // once this happens, the connection is open this[kResponse] = response const parser = new ByteParser(this, parsedExtensions) parser.on('drain', onParserDrain) parser.on('error', onParserError.bind(this)) response.socket.ws = this this[kByteParser] = parser this.#sendQueue = new SendQueue(response.socket) // 1. Change the ready state to OPEN (1). this[kReadyState] = states.OPEN // 2. Change the extensions attribute’s value to the extensions in use, if // it is not the null value. // https://datatracker.ietf.org/doc/html/rfc6455#section-9.1 const extensions = response.headersList.get('sec-websocket-extensions') if (extensions !== null) { this.#extensions = extensions } // 3. Change the protocol attribute’s value to the subprotocol in use, if // it is not the null value. // https://datatracker.ietf.org/doc/html/rfc6455#section-1.9 const protocol = response.headersList.get('sec-websocket-protocol') if (protocol !== null) { this.#protocol = protocol } // 4. Fire an event named open at the WebSocket object. fireEvent('open', this) } } // https://websockets.spec.whatwg.org/#dom-websocket-connecting WebSocket.CONNECTING = WebSocket.prototype.CONNECTING = states.CONNECTING // https://websockets.spec.whatwg.org/#dom-websocket-open WebSocket.OPEN = WebSocket.prototype.OPEN = states.OPEN // https://websockets.spec.whatwg.org/#dom-websocket-closing WebSocket.CLOSING = WebSocket.prototype.CLOSING = states.CLOSING // https://websockets.spec.whatwg.org/#dom-websocket-closed WebSocket.CLOSED = WebSocket.prototype.CLOSED = states.CLOSED Object.defineProperties(WebSocket.prototype, { CONNECTING: staticPropertyDescriptors, OPEN: staticPropertyDescriptors, CLOSING: staticPropertyDescriptors, CLOSED: staticPropertyDescriptors, url: kEnumerableProperty, readyState: kEnumerableProperty, bufferedAmount: kEnumerableProperty, onopen: kEnumerableProperty, onerror: kEnumerableProperty, onclose: kEnumerableProperty, close: kEnumerableProperty, onmessage: kEnumerableProperty, binaryType: kEnumerableProperty, send: kEnumerableProperty, extensions: kEnumerableProperty, protocol: kEnumerableProperty, [Symbol.toStringTag]: { value: 'WebSocket', writable: false, enumerable: false, configurable: true } }) Object.defineProperties(WebSocket, { CONNECTING: staticPropertyDescriptors, OPEN: staticPropertyDescriptors, CLOSING: staticPropertyDescriptors, CLOSED: staticPropertyDescriptors }) webidl.converters['sequence<DOMString>'] = webidl.sequenceConverter( webidl.converters.DOMString ) webidl.converters['DOMString or sequence<DOMString>'] = function (V, prefix, argument) { if (webidl.util.Type(V) === 'Object' && Symbol.iterator in V) { return webidl.converters['sequence<DOMString>'](V) } return webidl.converters.DOMString(V, prefix, argument) } // This implements the proposal made in https://github.com/whatwg/websockets/issues/42 webidl.converters.WebSocketInit = webidl.dictionaryConverter([ { key: 'protocols', converter: webidl.converters['DOMString or sequence<DOMString>'], defaultValue: () => new Array(0) }, { key: 'dispatcher', converter: webidl.converters.any, defaultValue: () => getGlobalDispatcher() }, { key: 'headers', converter: webidl.nullableConverter(webidl.converters.HeadersInit) } ]) webidl.converters['DOMString or sequence<DOMString> or WebSocketInit'] = function (V) { if (webidl.util.Type(V) === 'Object' && !(Symbol.iterator in V)) { return webidl.converters.WebSocketInit(V) } return { protocols: webidl.converters['DOMString or sequence<DOMString>'](V) } } webidl.converters.WebSocketSendData = function (V) { if (webidl.util.Type(V) === 'Object') { if (isBlobLike(V)) { return webidl.converters.Blob(V, { strict: false }) } if (ArrayBuffer.isView(V) || types.isArrayBuffer(V)) { return webidl.converters.BufferSource(V) } } return webidl.converters.USVString(V) } function onParserDrain () { this.ws[kResponse].socket.resume() } function onParserError (err) { let message let code if (err instanceof CloseEvent) { message = err.reason code = err.code } else { message = err.message } fireEvent('error', this, () => new ErrorEvent('error', { error: err, message })) closeWebSocketConnection(this, code) } module.exports = { WebSocket } node_modules/undici/lib/web/websocket/util.js 0000664 00000021615 15114741631 0015332 0 ustar 00 'use strict' const { kReadyState, kController, kResponse, kBinaryType, kWebSocketURL } = require('./symbols') const { states, opcodes } = require('./constants') const { ErrorEvent, createFastMessageEvent } = require('./events') const { isUtf8 } = require('node:buffer') const { collectASequenceOfCodePointsFast, removeHTTPWhitespace } = require('../fetch/data-url') /* globals Blob */ /** * @param {import('./websocket').WebSocket} ws * @returns {boolean} */ function isConnecting (ws) { // If the WebSocket connection is not yet established, and the connection // is not yet closed, then the WebSocket connection is in the CONNECTING state. return ws[kReadyState] === states.CONNECTING } /** * @param {import('./websocket').WebSocket} ws * @returns {boolean} */ function isEstablished (ws) { // If the server's response is validated as provided for above, it is // said that _The WebSocket Connection is Established_ and that the // WebSocket Connection is in the OPEN state. return ws[kReadyState] === states.OPEN } /** * @param {import('./websocket').WebSocket} ws * @returns {boolean} */ function isClosing (ws) { // Upon either sending or receiving a Close control frame, it is said // that _The WebSocket Closing Handshake is Started_ and that the // WebSocket connection is in the CLOSING state. return ws[kReadyState] === states.CLOSING } /** * @param {import('./websocket').WebSocket} ws * @returns {boolean} */ function isClosed (ws) { return ws[kReadyState] === states.CLOSED } /** * @see https://dom.spec.whatwg.org/#concept-event-fire * @param {string} e * @param {EventTarget} target * @param {(...args: ConstructorParameters<typeof Event>) => Event} eventFactory * @param {EventInit | undefined} eventInitDict */ function fireEvent (e, target, eventFactory = (type, init) => new Event(type, init), eventInitDict = {}) { // 1. If eventConstructor is not given, then let eventConstructor be Event. // 2. Let event be the result of creating an event given eventConstructor, // in the relevant realm of target. // 3. Initialize event’s type attribute to e. const event = eventFactory(e, eventInitDict) // 4. Initialize any other IDL attributes of event as described in the // invocation of this algorithm. // 5. Return the result of dispatching event at target, with legacy target // override flag set if set. target.dispatchEvent(event) } /** * @see https://websockets.spec.whatwg.org/#feedback-from-the-protocol * @param {import('./websocket').WebSocket} ws * @param {number} type Opcode * @param {Buffer} data application data */ function websocketMessageReceived (ws, type, data) { // 1. If ready state is not OPEN (1), then return. if (ws[kReadyState] !== states.OPEN) { return } // 2. Let dataForEvent be determined by switching on type and binary type: let dataForEvent if (type === opcodes.TEXT) { // -> type indicates that the data is Text // a new DOMString containing data try { dataForEvent = utf8Decode(data) } catch { failWebsocketConnection(ws, 'Received invalid UTF-8 in text frame.') return } } else if (type === opcodes.BINARY) { if (ws[kBinaryType] === 'blob') { // -> type indicates that the data is Binary and binary type is "blob" // a new Blob object, created in the relevant Realm of the WebSocket // object, that represents data as its raw data dataForEvent = new Blob([data]) } else { // -> type indicates that the data is Binary and binary type is "arraybuffer" // a new ArrayBuffer object, created in the relevant Realm of the // WebSocket object, whose contents are data dataForEvent = toArrayBuffer(data) } } // 3. Fire an event named message at the WebSocket object, using MessageEvent, // with the origin attribute initialized to the serialization of the WebSocket // object’s url's origin, and the data attribute initialized to dataForEvent. fireEvent('message', ws, createFastMessageEvent, { origin: ws[kWebSocketURL].origin, data: dataForEvent }) } function toArrayBuffer (buffer) { if (buffer.byteLength === buffer.buffer.byteLength) { return buffer.buffer } return buffer.buffer.slice(buffer.byteOffset, buffer.byteOffset + buffer.byteLength) } /** * @see https://datatracker.ietf.org/doc/html/rfc6455 * @see https://datatracker.ietf.org/doc/html/rfc2616 * @see https://bugs.chromium.org/p/chromium/issues/detail?id=398407 * @param {string} protocol */ function isValidSubprotocol (protocol) { // If present, this value indicates one // or more comma-separated subprotocol the client wishes to speak, // ordered by preference. The elements that comprise this value // MUST be non-empty strings with characters in the range U+0021 to // U+007E not including separator characters as defined in // [RFC2616] and MUST all be unique strings. if (protocol.length === 0) { return false } for (let i = 0; i < protocol.length; ++i) { const code = protocol.charCodeAt(i) if ( code < 0x21 || // CTL, contains SP (0x20) and HT (0x09) code > 0x7E || code === 0x22 || // " code === 0x28 || // ( code === 0x29 || // ) code === 0x2C || // , code === 0x2F || // / code === 0x3A || // : code === 0x3B || // ; code === 0x3C || // < code === 0x3D || // = code === 0x3E || // > code === 0x3F || // ? code === 0x40 || // @ code === 0x5B || // [ code === 0x5C || // \ code === 0x5D || // ] code === 0x7B || // { code === 0x7D // } ) { return false } } return true } /** * @see https://datatracker.ietf.org/doc/html/rfc6455#section-7-4 * @param {number} code */ function isValidStatusCode (code) { if (code >= 1000 && code < 1015) { return ( code !== 1004 && // reserved code !== 1005 && // "MUST NOT be set as a status code" code !== 1006 // "MUST NOT be set as a status code" ) } return code >= 3000 && code <= 4999 } /** * @param {import('./websocket').WebSocket} ws * @param {string|undefined} reason */ function failWebsocketConnection (ws, reason) { const { [kController]: controller, [kResponse]: response } = ws controller.abort() if (response?.socket && !response.socket.destroyed) { response.socket.destroy() } if (reason) { // TODO: process.nextTick fireEvent('error', ws, (type, init) => new ErrorEvent(type, init), { error: new Error(reason), message: reason }) } } /** * @see https://datatracker.ietf.org/doc/html/rfc6455#section-5.5 * @param {number} opcode */ function isControlFrame (opcode) { return ( opcode === opcodes.CLOSE || opcode === opcodes.PING || opcode === opcodes.PONG ) } function isContinuationFrame (opcode) { return opcode === opcodes.CONTINUATION } function isTextBinaryFrame (opcode) { return opcode === opcodes.TEXT || opcode === opcodes.BINARY } function isValidOpcode (opcode) { return isTextBinaryFrame(opcode) || isContinuationFrame(opcode) || isControlFrame(opcode) } /** * Parses a Sec-WebSocket-Extensions header value. * @param {string} extensions * @returns {Map<string, string>} */ // TODO(@Uzlopak, @KhafraDev): make compliant https://datatracker.ietf.org/doc/html/rfc6455#section-9.1 function parseExtensions (extensions) { const position = { position: 0 } const extensionList = new Map() while (position.position < extensions.length) { const pair = collectASequenceOfCodePointsFast(';', extensions, position) const [name, value = ''] = pair.split('=') extensionList.set( removeHTTPWhitespace(name, true, false), removeHTTPWhitespace(value, false, true) ) position.position++ } return extensionList } /** * @see https://www.rfc-editor.org/rfc/rfc7692#section-7.1.2.2 * @description "client-max-window-bits = 1*DIGIT" * @param {string} value */ function isValidClientWindowBits (value) { for (let i = 0; i < value.length; i++) { const byte = value.charCodeAt(i) if (byte < 0x30 || byte > 0x39) { return false } } return true } // https://nodejs.org/api/intl.html#detecting-internationalization-support const hasIntl = typeof process.versions.icu === 'string' const fatalDecoder = hasIntl ? new TextDecoder('utf-8', { fatal: true }) : undefined /** * Converts a Buffer to utf-8, even on platforms without icu. * @param {Buffer} buffer */ const utf8Decode = hasIntl ? fatalDecoder.decode.bind(fatalDecoder) : function (buffer) { if (isUtf8(buffer)) { return buffer.toString('utf-8') } throw new TypeError('Invalid utf-8 received.') } module.exports = { isConnecting, isEstablished, isClosing, isClosed, fireEvent, isValidSubprotocol, isValidStatusCode, failWebsocketConnection, websocketMessageReceived, utf8Decode, isControlFrame, isContinuationFrame, isTextBinaryFrame, isValidOpcode, parseExtensions, isValidClientWindowBits } node_modules/undici/lib/web/websocket/receiver.js 0000664 00000032533 15114741631 0016162 0 ustar 00 'use strict' const { Writable } = require('node:stream') const assert = require('node:assert') const { parserStates, opcodes, states, emptyBuffer, sentCloseFrameState } = require('./constants') const { kReadyState, kSentClose, kResponse, kReceivedClose } = require('./symbols') const { channels } = require('../../core/diagnostics') const { isValidStatusCode, isValidOpcode, failWebsocketConnection, websocketMessageReceived, utf8Decode, isControlFrame, isTextBinaryFrame, isContinuationFrame } = require('./util') const { WebsocketFrameSend } = require('./frame') const { closeWebSocketConnection } = require('./connection') const { PerMessageDeflate } = require('./permessage-deflate') // This code was influenced by ws released under the MIT license. // Copyright (c) 2011 Einar Otto Stangvik <einaros@gmail.com> // Copyright (c) 2013 Arnout Kazemier and contributors // Copyright (c) 2016 Luigi Pinca and contributors class ByteParser extends Writable { #buffers = [] #byteOffset = 0 #loop = false #state = parserStates.INFO #info = {} #fragments = [] /** @type {Map<string, PerMessageDeflate>} */ #extensions constructor (ws, extensions) { super() this.ws = ws this.#extensions = extensions == null ? new Map() : extensions if (this.#extensions.has('permessage-deflate')) { this.#extensions.set('permessage-deflate', new PerMessageDeflate(extensions)) } } /** * @param {Buffer} chunk * @param {() => void} callback */ _write (chunk, _, callback) { this.#buffers.push(chunk) this.#byteOffset += chunk.length this.#loop = true this.run(callback) } /** * Runs whenever a new chunk is received. * Callback is called whenever there are no more chunks buffering, * or not enough bytes are buffered to parse. */ run (callback) { while (this.#loop) { if (this.#state === parserStates.INFO) { // If there aren't enough bytes to parse the payload length, etc. if (this.#byteOffset < 2) { return callback() } const buffer = this.consume(2) const fin = (buffer[0] & 0x80) !== 0 const opcode = buffer[0] & 0x0F const masked = (buffer[1] & 0x80) === 0x80 const fragmented = !fin && opcode !== opcodes.CONTINUATION const payloadLength = buffer[1] & 0x7F const rsv1 = buffer[0] & 0x40 const rsv2 = buffer[0] & 0x20 const rsv3 = buffer[0] & 0x10 if (!isValidOpcode(opcode)) { failWebsocketConnection(this.ws, 'Invalid opcode received') return callback() } if (masked) { failWebsocketConnection(this.ws, 'Frame cannot be masked') return callback() } // MUST be 0 unless an extension is negotiated that defines meanings // for non-zero values. If a nonzero value is received and none of // the negotiated extensions defines the meaning of such a nonzero // value, the receiving endpoint MUST _Fail the WebSocket // Connection_. // This document allocates the RSV1 bit of the WebSocket header for // PMCEs and calls the bit the "Per-Message Compressed" bit. On a // WebSocket connection where a PMCE is in use, this bit indicates // whether a message is compressed or not. if (rsv1 !== 0 && !this.#extensions.has('permessage-deflate')) { failWebsocketConnection(this.ws, 'Expected RSV1 to be clear.') return } if (rsv2 !== 0 || rsv3 !== 0) { failWebsocketConnection(this.ws, 'RSV1, RSV2, RSV3 must be clear') return } if (fragmented && !isTextBinaryFrame(opcode)) { // Only text and binary frames can be fragmented failWebsocketConnection(this.ws, 'Invalid frame type was fragmented.') return } // If we are already parsing a text/binary frame and do not receive either // a continuation frame or close frame, fail the connection. if (isTextBinaryFrame(opcode) && this.#fragments.length > 0) { failWebsocketConnection(this.ws, 'Expected continuation frame') return } if (this.#info.fragmented && fragmented) { // A fragmented frame can't be fragmented itself failWebsocketConnection(this.ws, 'Fragmented frame exceeded 125 bytes.') return } // "All control frames MUST have a payload length of 125 bytes or less // and MUST NOT be fragmented." if ((payloadLength > 125 || fragmented) && isControlFrame(opcode)) { failWebsocketConnection(this.ws, 'Control frame either too large or fragmented') return } if (isContinuationFrame(opcode) && this.#fragments.length === 0 && !this.#info.compressed) { failWebsocketConnection(this.ws, 'Unexpected continuation frame') return } if (payloadLength <= 125) { this.#info.payloadLength = payloadLength this.#state = parserStates.READ_DATA } else if (payloadLength === 126) { this.#state = parserStates.PAYLOADLENGTH_16 } else if (payloadLength === 127) { this.#state = parserStates.PAYLOADLENGTH_64 } if (isTextBinaryFrame(opcode)) { this.#info.binaryType = opcode this.#info.compressed = rsv1 !== 0 } this.#info.opcode = opcode this.#info.masked = masked this.#info.fin = fin this.#info.fragmented = fragmented } else if (this.#state === parserStates.PAYLOADLENGTH_16) { if (this.#byteOffset < 2) { return callback() } const buffer = this.consume(2) this.#info.payloadLength = buffer.readUInt16BE(0) this.#state = parserStates.READ_DATA } else if (this.#state === parserStates.PAYLOADLENGTH_64) { if (this.#byteOffset < 8) { return callback() } const buffer = this.consume(8) const upper = buffer.readUInt32BE(0) // 2^31 is the maximum bytes an arraybuffer can contain // on 32-bit systems. Although, on 64-bit systems, this is // 2^53-1 bytes. // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Errors/Invalid_array_length // https://source.chromium.org/chromium/chromium/src/+/main:v8/src/common/globals.h;drc=1946212ac0100668f14eb9e2843bdd846e510a1e;bpv=1;bpt=1;l=1275 // https://source.chromium.org/chromium/chromium/src/+/main:v8/src/objects/js-array-buffer.h;l=34;drc=1946212ac0100668f14eb9e2843bdd846e510a1e if (upper > 2 ** 31 - 1) { failWebsocketConnection(this.ws, 'Received payload length > 2^31 bytes.') return } const lower = buffer.readUInt32BE(4) this.#info.payloadLength = (upper << 8) + lower this.#state = parserStates.READ_DATA } else if (this.#state === parserStates.READ_DATA) { if (this.#byteOffset < this.#info.payloadLength) { return callback() } const body = this.consume(this.#info.payloadLength) if (isControlFrame(this.#info.opcode)) { this.#loop = this.parseControlFrame(body) this.#state = parserStates.INFO } else { if (!this.#info.compressed) { this.#fragments.push(body) // If the frame is not fragmented, a message has been received. // If the frame is fragmented, it will terminate with a fin bit set // and an opcode of 0 (continuation), therefore we handle that when // parsing continuation frames, not here. if (!this.#info.fragmented && this.#info.fin) { const fullMessage = Buffer.concat(this.#fragments) websocketMessageReceived(this.ws, this.#info.binaryType, fullMessage) this.#fragments.length = 0 } this.#state = parserStates.INFO } else { this.#extensions.get('permessage-deflate').decompress(body, this.#info.fin, (error, data) => { if (error) { closeWebSocketConnection(this.ws, 1007, error.message, error.message.length) return } this.#fragments.push(data) if (!this.#info.fin) { this.#state = parserStates.INFO this.#loop = true this.run(callback) return } websocketMessageReceived(this.ws, this.#info.binaryType, Buffer.concat(this.#fragments)) this.#loop = true this.#state = parserStates.INFO this.#fragments.length = 0 this.run(callback) }) this.#loop = false break } } } } } /** * Take n bytes from the buffered Buffers * @param {number} n * @returns {Buffer} */ consume (n) { if (n > this.#byteOffset) { throw new Error('Called consume() before buffers satiated.') } else if (n === 0) { return emptyBuffer } if (this.#buffers[0].length === n) { this.#byteOffset -= this.#buffers[0].length return this.#buffers.shift() } const buffer = Buffer.allocUnsafe(n) let offset = 0 while (offset !== n) { const next = this.#buffers[0] const { length } = next if (length + offset === n) { buffer.set(this.#buffers.shift(), offset) break } else if (length + offset > n) { buffer.set(next.subarray(0, n - offset), offset) this.#buffers[0] = next.subarray(n - offset) break } else { buffer.set(this.#buffers.shift(), offset) offset += next.length } } this.#byteOffset -= n return buffer } parseCloseBody (data) { assert(data.length !== 1) // https://datatracker.ietf.org/doc/html/rfc6455#section-7.1.5 /** @type {number|undefined} */ let code if (data.length >= 2) { // _The WebSocket Connection Close Code_ is // defined as the status code (Section 7.4) contained in the first Close // control frame received by the application code = data.readUInt16BE(0) } if (code !== undefined && !isValidStatusCode(code)) { return { code: 1002, reason: 'Invalid status code', error: true } } // https://datatracker.ietf.org/doc/html/rfc6455#section-7.1.6 /** @type {Buffer} */ let reason = data.subarray(2) // Remove BOM if (reason[0] === 0xEF && reason[1] === 0xBB && reason[2] === 0xBF) { reason = reason.subarray(3) } try { reason = utf8Decode(reason) } catch { return { code: 1007, reason: 'Invalid UTF-8', error: true } } return { code, reason, error: false } } /** * Parses control frames. * @param {Buffer} body */ parseControlFrame (body) { const { opcode, payloadLength } = this.#info if (opcode === opcodes.CLOSE) { if (payloadLength === 1) { failWebsocketConnection(this.ws, 'Received close frame with a 1-byte body.') return false } this.#info.closeInfo = this.parseCloseBody(body) if (this.#info.closeInfo.error) { const { code, reason } = this.#info.closeInfo closeWebSocketConnection(this.ws, code, reason, reason.length) failWebsocketConnection(this.ws, reason) return false } if (this.ws[kSentClose] !== sentCloseFrameState.SENT) { // If an endpoint receives a Close frame and did not previously send a // Close frame, the endpoint MUST send a Close frame in response. (When // sending a Close frame in response, the endpoint typically echos the // status code it received.) let body = emptyBuffer if (this.#info.closeInfo.code) { body = Buffer.allocUnsafe(2) body.writeUInt16BE(this.#info.closeInfo.code, 0) } const closeFrame = new WebsocketFrameSend(body) this.ws[kResponse].socket.write( closeFrame.createFrame(opcodes.CLOSE), (err) => { if (!err) { this.ws[kSentClose] = sentCloseFrameState.SENT } } ) } // Upon either sending or receiving a Close control frame, it is said // that _The WebSocket Closing Handshake is Started_ and that the // WebSocket connection is in the CLOSING state. this.ws[kReadyState] = states.CLOSING this.ws[kReceivedClose] = true return false } else if (opcode === opcodes.PING) { // Upon receipt of a Ping frame, an endpoint MUST send a Pong frame in // response, unless it already received a Close frame. // A Pong frame sent in response to a Ping frame must have identical // "Application data" if (!this.ws[kReceivedClose]) { const frame = new WebsocketFrameSend(body) this.ws[kResponse].socket.write(frame.createFrame(opcodes.PONG)) if (channels.ping.hasSubscribers) { channels.ping.publish({ payload: body }) } } } else if (opcode === opcodes.PONG) { // A Pong frame MAY be sent unsolicited. This serves as a // unidirectional heartbeat. A response to an unsolicited Pong frame is // not expected. if (channels.pong.hasSubscribers) { channels.pong.publish({ payload: body }) } } return true } get closingInfo () { return this.#info.closeInfo } } module.exports = { ByteParser } node_modules/undici/lib/web/websocket/connection.js 0000664 00000033576 15114741631 0016525 0 ustar 00 'use strict' const { uid, states, sentCloseFrameState, emptyBuffer, opcodes } = require('./constants') const { kReadyState, kSentClose, kByteParser, kReceivedClose, kResponse } = require('./symbols') const { fireEvent, failWebsocketConnection, isClosing, isClosed, isEstablished, parseExtensions } = require('./util') const { channels } = require('../../core/diagnostics') const { CloseEvent } = require('./events') const { makeRequest } = require('../fetch/request') const { fetching } = require('../fetch/index') const { Headers, getHeadersList } = require('../fetch/headers') const { getDecodeSplit } = require('../fetch/util') const { WebsocketFrameSend } = require('./frame') /** @type {import('crypto')} */ let crypto try { crypto = require('node:crypto') /* c8 ignore next 3 */ } catch { } /** * @see https://websockets.spec.whatwg.org/#concept-websocket-establish * @param {URL} url * @param {string|string[]} protocols * @param {import('./websocket').WebSocket} ws * @param {(response: any, extensions: string[] | undefined) => void} onEstablish * @param {Partial<import('../../types/websocket').WebSocketInit>} options */ function establishWebSocketConnection (url, protocols, client, ws, onEstablish, options) { // 1. Let requestURL be a copy of url, with its scheme set to "http", if url’s // scheme is "ws", and to "https" otherwise. const requestURL = url requestURL.protocol = url.protocol === 'ws:' ? 'http:' : 'https:' // 2. Let request be a new request, whose URL is requestURL, client is client, // service-workers mode is "none", referrer is "no-referrer", mode is // "websocket", credentials mode is "include", cache mode is "no-store" , // and redirect mode is "error". const request = makeRequest({ urlList: [requestURL], client, serviceWorkers: 'none', referrer: 'no-referrer', mode: 'websocket', credentials: 'include', cache: 'no-store', redirect: 'error' }) // Note: undici extension, allow setting custom headers. if (options.headers) { const headersList = getHeadersList(new Headers(options.headers)) request.headersList = headersList } // 3. Append (`Upgrade`, `websocket`) to request’s header list. // 4. Append (`Connection`, `Upgrade`) to request’s header list. // Note: both of these are handled by undici currently. // https://github.com/nodejs/undici/blob/68c269c4144c446f3f1220951338daef4a6b5ec4/lib/client.js#L1397 // 5. Let keyValue be a nonce consisting of a randomly selected // 16-byte value that has been forgiving-base64-encoded and // isomorphic encoded. const keyValue = crypto.randomBytes(16).toString('base64') // 6. Append (`Sec-WebSocket-Key`, keyValue) to request’s // header list. request.headersList.append('sec-websocket-key', keyValue) // 7. Append (`Sec-WebSocket-Version`, `13`) to request’s // header list. request.headersList.append('sec-websocket-version', '13') // 8. For each protocol in protocols, combine // (`Sec-WebSocket-Protocol`, protocol) in request’s header // list. for (const protocol of protocols) { request.headersList.append('sec-websocket-protocol', protocol) } // 9. Let permessageDeflate be a user-agent defined // "permessage-deflate" extension header value. // https://github.com/mozilla/gecko-dev/blob/ce78234f5e653a5d3916813ff990f053510227bc/netwerk/protocol/websocket/WebSocketChannel.cpp#L2673 const permessageDeflate = 'permessage-deflate; client_max_window_bits' // 10. Append (`Sec-WebSocket-Extensions`, permessageDeflate) to // request’s header list. request.headersList.append('sec-websocket-extensions', permessageDeflate) // 11. Fetch request with useParallelQueue set to true, and // processResponse given response being these steps: const controller = fetching({ request, useParallelQueue: true, dispatcher: options.dispatcher, processResponse (response) { // 1. If response is a network error or its status is not 101, // fail the WebSocket connection. if (response.type === 'error' || response.status !== 101) { failWebsocketConnection(ws, 'Received network error or non-101 status code.') return } // 2. If protocols is not the empty list and extracting header // list values given `Sec-WebSocket-Protocol` and response’s // header list results in null, failure, or the empty byte // sequence, then fail the WebSocket connection. if (protocols.length !== 0 && !response.headersList.get('Sec-WebSocket-Protocol')) { failWebsocketConnection(ws, 'Server did not respond with sent protocols.') return } // 3. Follow the requirements stated step 2 to step 6, inclusive, // of the last set of steps in section 4.1 of The WebSocket // Protocol to validate response. This either results in fail // the WebSocket connection or the WebSocket connection is // established. // 2. If the response lacks an |Upgrade| header field or the |Upgrade| // header field contains a value that is not an ASCII case- // insensitive match for the value "websocket", the client MUST // _Fail the WebSocket Connection_. if (response.headersList.get('Upgrade')?.toLowerCase() !== 'websocket') { failWebsocketConnection(ws, 'Server did not set Upgrade header to "websocket".') return } // 3. If the response lacks a |Connection| header field or the // |Connection| header field doesn't contain a token that is an // ASCII case-insensitive match for the value "Upgrade", the client // MUST _Fail the WebSocket Connection_. if (response.headersList.get('Connection')?.toLowerCase() !== 'upgrade') { failWebsocketConnection(ws, 'Server did not set Connection header to "upgrade".') return } // 4. If the response lacks a |Sec-WebSocket-Accept| header field or // the |Sec-WebSocket-Accept| contains a value other than the // base64-encoded SHA-1 of the concatenation of the |Sec-WebSocket- // Key| (as a string, not base64-decoded) with the string "258EAFA5- // E914-47DA-95CA-C5AB0DC85B11" but ignoring any leading and // trailing whitespace, the client MUST _Fail the WebSocket // Connection_. const secWSAccept = response.headersList.get('Sec-WebSocket-Accept') const digest = crypto.createHash('sha1').update(keyValue + uid).digest('base64') if (secWSAccept !== digest) { failWebsocketConnection(ws, 'Incorrect hash received in Sec-WebSocket-Accept header.') return } // 5. If the response includes a |Sec-WebSocket-Extensions| header // field and this header field indicates the use of an extension // that was not present in the client's handshake (the server has // indicated an extension not requested by the client), the client // MUST _Fail the WebSocket Connection_. (The parsing of this // header field to determine which extensions are requested is // discussed in Section 9.1.) const secExtension = response.headersList.get('Sec-WebSocket-Extensions') let extensions if (secExtension !== null) { extensions = parseExtensions(secExtension) if (!extensions.has('permessage-deflate')) { failWebsocketConnection(ws, 'Sec-WebSocket-Extensions header does not match.') return } } // 6. If the response includes a |Sec-WebSocket-Protocol| header field // and this header field indicates the use of a subprotocol that was // not present in the client's handshake (the server has indicated a // subprotocol not requested by the client), the client MUST _Fail // the WebSocket Connection_. const secProtocol = response.headersList.get('Sec-WebSocket-Protocol') if (secProtocol !== null) { const requestProtocols = getDecodeSplit('sec-websocket-protocol', request.headersList) // The client can request that the server use a specific subprotocol by // including the |Sec-WebSocket-Protocol| field in its handshake. If it // is specified, the server needs to include the same field and one of // the selected subprotocol values in its response for the connection to // be established. if (!requestProtocols.includes(secProtocol)) { failWebsocketConnection(ws, 'Protocol was not set in the opening handshake.') return } } response.socket.on('data', onSocketData) response.socket.on('close', onSocketClose) response.socket.on('error', onSocketError) if (channels.open.hasSubscribers) { channels.open.publish({ address: response.socket.address(), protocol: secProtocol, extensions: secExtension }) } onEstablish(response, extensions) } }) return controller } function closeWebSocketConnection (ws, code, reason, reasonByteLength) { if (isClosing(ws) || isClosed(ws)) { // If this's ready state is CLOSING (2) or CLOSED (3) // Do nothing. } else if (!isEstablished(ws)) { // If the WebSocket connection is not yet established // Fail the WebSocket connection and set this's ready state // to CLOSING (2). failWebsocketConnection(ws, 'Connection was closed before it was established.') ws[kReadyState] = states.CLOSING } else if (ws[kSentClose] === sentCloseFrameState.NOT_SENT) { // If the WebSocket closing handshake has not yet been started // Start the WebSocket closing handshake and set this's ready // state to CLOSING (2). // - If neither code nor reason is present, the WebSocket Close // message must not have a body. // - If code is present, then the status code to use in the // WebSocket Close message must be the integer given by code. // - If reason is also present, then reasonBytes must be // provided in the Close message after the status code. ws[kSentClose] = sentCloseFrameState.PROCESSING const frame = new WebsocketFrameSend() // If neither code nor reason is present, the WebSocket Close // message must not have a body. // If code is present, then the status code to use in the // WebSocket Close message must be the integer given by code. if (code !== undefined && reason === undefined) { frame.frameData = Buffer.allocUnsafe(2) frame.frameData.writeUInt16BE(code, 0) } else if (code !== undefined && reason !== undefined) { // If reason is also present, then reasonBytes must be // provided in the Close message after the status code. frame.frameData = Buffer.allocUnsafe(2 + reasonByteLength) frame.frameData.writeUInt16BE(code, 0) // the body MAY contain UTF-8-encoded data with value /reason/ frame.frameData.write(reason, 2, 'utf-8') } else { frame.frameData = emptyBuffer } /** @type {import('stream').Duplex} */ const socket = ws[kResponse].socket socket.write(frame.createFrame(opcodes.CLOSE)) ws[kSentClose] = sentCloseFrameState.SENT // Upon either sending or receiving a Close control frame, it is said // that _The WebSocket Closing Handshake is Started_ and that the // WebSocket connection is in the CLOSING state. ws[kReadyState] = states.CLOSING } else { // Otherwise // Set this's ready state to CLOSING (2). ws[kReadyState] = states.CLOSING } } /** * @param {Buffer} chunk */ function onSocketData (chunk) { if (!this.ws[kByteParser].write(chunk)) { this.pause() } } /** * @see https://websockets.spec.whatwg.org/#feedback-from-the-protocol * @see https://datatracker.ietf.org/doc/html/rfc6455#section-7.1.4 */ function onSocketClose () { const { ws } = this const { [kResponse]: response } = ws response.socket.off('data', onSocketData) response.socket.off('close', onSocketClose) response.socket.off('error', onSocketError) // If the TCP connection was closed after the // WebSocket closing handshake was completed, the WebSocket connection // is said to have been closed _cleanly_. const wasClean = ws[kSentClose] === sentCloseFrameState.SENT && ws[kReceivedClose] let code = 1005 let reason = '' const result = ws[kByteParser].closingInfo if (result && !result.error) { code = result.code ?? 1005 reason = result.reason } else if (!ws[kReceivedClose]) { // If _The WebSocket // Connection is Closed_ and no Close control frame was received by the // endpoint (such as could occur if the underlying transport connection // is lost), _The WebSocket Connection Close Code_ is considered to be // 1006. code = 1006 } // 1. Change the ready state to CLOSED (3). ws[kReadyState] = states.CLOSED // 2. If the user agent was required to fail the WebSocket // connection, or if the WebSocket connection was closed // after being flagged as full, fire an event named error // at the WebSocket object. // TODO // 3. Fire an event named close at the WebSocket object, // using CloseEvent, with the wasClean attribute // initialized to true if the connection closed cleanly // and false otherwise, the code attribute initialized to // the WebSocket connection close code, and the reason // attribute initialized to the result of applying UTF-8 // decode without BOM to the WebSocket connection close // reason. // TODO: process.nextTick fireEvent('close', ws, (type, init) => new CloseEvent(type, init), { wasClean, code, reason }) if (channels.close.hasSubscribers) { channels.close.publish({ websocket: ws, code, reason }) } } function onSocketError (error) { const { ws } = this ws[kReadyState] = states.CLOSING if (channels.socketError.hasSubscribers) { channels.socketError.publish(error) } this.destroy() } module.exports = { establishWebSocketConnection, closeWebSocketConnection } node_modules/undici/lib/web/websocket/permessage-deflate.js 0000664 00000003701 15114741631 0020106 0 ustar 00 'use strict' const { createInflateRaw, Z_DEFAULT_WINDOWBITS } = require('node:zlib') const { isValidClientWindowBits } = require('./util') const tail = Buffer.from([0x00, 0x00, 0xff, 0xff]) const kBuffer = Symbol('kBuffer') const kLength = Symbol('kLength') class PerMessageDeflate { /** @type {import('node:zlib').InflateRaw} */ #inflate #options = {} constructor (extensions) { this.#options.serverNoContextTakeover = extensions.has('server_no_context_takeover') this.#options.serverMaxWindowBits = extensions.get('server_max_window_bits') } decompress (chunk, fin, callback) { // An endpoint uses the following algorithm to decompress a message. // 1. Append 4 octets of 0x00 0x00 0xff 0xff to the tail end of the // payload of the message. // 2. Decompress the resulting data using DEFLATE. if (!this.#inflate) { let windowBits = Z_DEFAULT_WINDOWBITS if (this.#options.serverMaxWindowBits) { // empty values default to Z_DEFAULT_WINDOWBITS if (!isValidClientWindowBits(this.#options.serverMaxWindowBits)) { callback(new Error('Invalid server_max_window_bits')) return } windowBits = Number.parseInt(this.#options.serverMaxWindowBits) } this.#inflate = createInflateRaw({ windowBits }) this.#inflate[kBuffer] = [] this.#inflate[kLength] = 0 this.#inflate.on('data', (data) => { this.#inflate[kBuffer].push(data) this.#inflate[kLength] += data.length }) this.#inflate.on('error', (err) => { this.#inflate = null callback(err) }) } this.#inflate.write(chunk) if (fin) { this.#inflate.write(tail) } this.#inflate.flush(() => { const full = Buffer.concat(this.#inflate[kBuffer], this.#inflate[kLength]) this.#inflate[kBuffer].length = 0 this.#inflate[kLength] = 0 callback(null, full) }) } } module.exports = { PerMessageDeflate } node_modules/undici/lib/web/eventsource/eventsource-stream.js 0000664 00000026502 15114741631 0020564 0 ustar 00 'use strict' const { Transform } = require('node:stream') const { isASCIINumber, isValidLastEventId } = require('./util') /** * @type {number[]} BOM */ const BOM = [0xEF, 0xBB, 0xBF] /** * @type {10} LF */ const LF = 0x0A /** * @type {13} CR */ const CR = 0x0D /** * @type {58} COLON */ const COLON = 0x3A /** * @type {32} SPACE */ const SPACE = 0x20 /** * @typedef {object} EventSourceStreamEvent * @type {object} * @property {string} [event] The event type. * @property {string} [data] The data of the message. * @property {string} [id] A unique ID for the event. * @property {string} [retry] The reconnection time, in milliseconds. */ /** * @typedef eventSourceSettings * @type {object} * @property {string} lastEventId The last event ID received from the server. * @property {string} origin The origin of the event source. * @property {number} reconnectionTime The reconnection time, in milliseconds. */ class EventSourceStream extends Transform { /** * @type {eventSourceSettings} */ state = null /** * Leading byte-order-mark check. * @type {boolean} */ checkBOM = true /** * @type {boolean} */ crlfCheck = false /** * @type {boolean} */ eventEndCheck = false /** * @type {Buffer} */ buffer = null pos = 0 event = { data: undefined, event: undefined, id: undefined, retry: undefined } /** * @param {object} options * @param {eventSourceSettings} options.eventSourceSettings * @param {Function} [options.push] */ constructor (options = {}) { // Enable object mode as EventSourceStream emits objects of shape // EventSourceStreamEvent options.readableObjectMode = true super(options) this.state = options.eventSourceSettings || {} if (options.push) { this.push = options.push } } /** * @param {Buffer} chunk * @param {string} _encoding * @param {Function} callback * @returns {void} */ _transform (chunk, _encoding, callback) { if (chunk.length === 0) { callback() return } // Cache the chunk in the buffer, as the data might not be complete while // processing it // TODO: Investigate if there is a more performant way to handle // incoming chunks // see: https://github.com/nodejs/undici/issues/2630 if (this.buffer) { this.buffer = Buffer.concat([this.buffer, chunk]) } else { this.buffer = chunk } // Strip leading byte-order-mark if we opened the stream and started // the processing of the incoming data if (this.checkBOM) { switch (this.buffer.length) { case 1: // Check if the first byte is the same as the first byte of the BOM if (this.buffer[0] === BOM[0]) { // If it is, we need to wait for more data callback() return } // Set the checkBOM flag to false as we don't need to check for the // BOM anymore this.checkBOM = false // The buffer only contains one byte so we need to wait for more data callback() return case 2: // Check if the first two bytes are the same as the first two bytes // of the BOM if ( this.buffer[0] === BOM[0] && this.buffer[1] === BOM[1] ) { // If it is, we need to wait for more data, because the third byte // is needed to determine if it is the BOM or not callback() return } // Set the checkBOM flag to false as we don't need to check for the // BOM anymore this.checkBOM = false break case 3: // Check if the first three bytes are the same as the first three // bytes of the BOM if ( this.buffer[0] === BOM[0] && this.buffer[1] === BOM[1] && this.buffer[2] === BOM[2] ) { // If it is, we can drop the buffered data, as it is only the BOM this.buffer = Buffer.alloc(0) // Set the checkBOM flag to false as we don't need to check for the // BOM anymore this.checkBOM = false // Await more data callback() return } // If it is not the BOM, we can start processing the data this.checkBOM = false break default: // The buffer is longer than 3 bytes, so we can drop the BOM if it is // present if ( this.buffer[0] === BOM[0] && this.buffer[1] === BOM[1] && this.buffer[2] === BOM[2] ) { // Remove the BOM from the buffer this.buffer = this.buffer.subarray(3) } // Set the checkBOM flag to false as we don't need to check for the this.checkBOM = false break } } while (this.pos < this.buffer.length) { // If the previous line ended with an end-of-line, we need to check // if the next character is also an end-of-line. if (this.eventEndCheck) { // If the the current character is an end-of-line, then the event // is finished and we can process it // If the previous line ended with a carriage return, we need to // check if the current character is a line feed and remove it // from the buffer. if (this.crlfCheck) { // If the current character is a line feed, we can remove it // from the buffer and reset the crlfCheck flag if (this.buffer[this.pos] === LF) { this.buffer = this.buffer.subarray(this.pos + 1) this.pos = 0 this.crlfCheck = false // It is possible that the line feed is not the end of the // event. We need to check if the next character is an // end-of-line character to determine if the event is // finished. We simply continue the loop to check the next // character. // As we removed the line feed from the buffer and set the // crlfCheck flag to false, we basically don't make any // distinction between a line feed and a carriage return. continue } this.crlfCheck = false } if (this.buffer[this.pos] === LF || this.buffer[this.pos] === CR) { // If the current character is a carriage return, we need to // set the crlfCheck flag to true, as we need to check if the // next character is a line feed so we can remove it from the // buffer if (this.buffer[this.pos] === CR) { this.crlfCheck = true } this.buffer = this.buffer.subarray(this.pos + 1) this.pos = 0 if ( this.event.data !== undefined || this.event.event || this.event.id || this.event.retry) { this.processEvent(this.event) } this.clearEvent() continue } // If the current character is not an end-of-line, then the event // is not finished and we have to reset the eventEndCheck flag this.eventEndCheck = false continue } // If the current character is an end-of-line, we can process the // line if (this.buffer[this.pos] === LF || this.buffer[this.pos] === CR) { // If the current character is a carriage return, we need to // set the crlfCheck flag to true, as we need to check if the // next character is a line feed if (this.buffer[this.pos] === CR) { this.crlfCheck = true } // In any case, we can process the line as we reached an // end-of-line character this.parseLine(this.buffer.subarray(0, this.pos), this.event) // Remove the processed line from the buffer this.buffer = this.buffer.subarray(this.pos + 1) // Reset the position as we removed the processed line from the buffer this.pos = 0 // A line was processed and this could be the end of the event. We need // to check if the next line is empty to determine if the event is // finished. this.eventEndCheck = true continue } this.pos++ } callback() } /** * @param {Buffer} line * @param {EventStreamEvent} event */ parseLine (line, event) { // If the line is empty (a blank line) // Dispatch the event, as defined below. // This will be handled in the _transform method if (line.length === 0) { return } // If the line starts with a U+003A COLON character (:) // Ignore the line. const colonPosition = line.indexOf(COLON) if (colonPosition === 0) { return } let field = '' let value = '' // If the line contains a U+003A COLON character (:) if (colonPosition !== -1) { // Collect the characters on the line before the first U+003A COLON // character (:), and let field be that string. // TODO: Investigate if there is a more performant way to extract the // field // see: https://github.com/nodejs/undici/issues/2630 field = line.subarray(0, colonPosition).toString('utf8') // Collect the characters on the line after the first U+003A COLON // character (:), and let value be that string. // If value starts with a U+0020 SPACE character, remove it from value. let valueStart = colonPosition + 1 if (line[valueStart] === SPACE) { ++valueStart } // TODO: Investigate if there is a more performant way to extract the // value // see: https://github.com/nodejs/undici/issues/2630 value = line.subarray(valueStart).toString('utf8') // Otherwise, the string is not empty but does not contain a U+003A COLON // character (:) } else { // Process the field using the steps described below, using the whole // line as the field name, and the empty string as the field value. field = line.toString('utf8') value = '' } // Modify the event with the field name and value. The value is also // decoded as UTF-8 switch (field) { case 'data': if (event[field] === undefined) { event[field] = value } else { event[field] += `\n${value}` } break case 'retry': if (isASCIINumber(value)) { event[field] = value } break case 'id': if (isValidLastEventId(value)) { event[field] = value } break case 'event': if (value.length > 0) { event[field] = value } break } } /** * @param {EventSourceStreamEvent} event */ processEvent (event) { if (event.retry && isASCIINumber(event.retry)) { this.state.reconnectionTime = parseInt(event.retry, 10) } if (event.id && isValidLastEventId(event.id)) { this.state.lastEventId = event.id } // only dispatch event, when data is provided if (event.data !== undefined) { this.push({ type: event.event || 'message', options: { data: event.data, lastEventId: this.state.lastEventId, origin: this.state.origin } }) } } clearEvent () { this.event = { data: undefined, event: undefined, id: undefined, retry: undefined } } } module.exports = { EventSourceStream } node_modules/undici/lib/web/eventsource/util.js 0000664 00000001424 15114741631 0015702 0 ustar 00 'use strict' /** * Checks if the given value is a valid LastEventId. * @param {string} value * @returns {boolean} */ function isValidLastEventId (value) { // LastEventId should not contain U+0000 NULL return value.indexOf('\u0000') === -1 } /** * Checks if the given value is a base 10 digit. * @param {string} value * @returns {boolean} */ function isASCIINumber (value) { if (value.length === 0) return false for (let i = 0; i < value.length; i++) { if (value.charCodeAt(i) < 0x30 || value.charCodeAt(i) > 0x39) return false } return true } // https://github.com/nodejs/undici/issues/2664 function delay (ms) { return new Promise((resolve) => { setTimeout(resolve, ms).unref() }) } module.exports = { isValidLastEventId, isASCIINumber, delay } node_modules/undici/lib/web/eventsource/eventsource.js 0000664 00000033477 15114741631 0017304 0 ustar 00 'use strict' const { pipeline } = require('node:stream') const { fetching } = require('../fetch') const { makeRequest } = require('../fetch/request') const { webidl } = require('../fetch/webidl') const { EventSourceStream } = require('./eventsource-stream') const { parseMIMEType } = require('../fetch/data-url') const { createFastMessageEvent } = require('../websocket/events') const { isNetworkError } = require('../fetch/response') const { delay } = require('./util') const { kEnumerableProperty } = require('../../core/util') const { environmentSettingsObject } = require('../fetch/util') let experimentalWarned = false /** * A reconnection time, in milliseconds. This must initially be an implementation-defined value, * probably in the region of a few seconds. * * In Comparison: * - Chrome uses 3000ms. * - Deno uses 5000ms. * * @type {3000} */ const defaultReconnectionTime = 3000 /** * The readyState attribute represents the state of the connection. * @enum * @readonly * @see https://html.spec.whatwg.org/multipage/server-sent-events.html#dom-eventsource-readystate-dev */ /** * The connection has not yet been established, or it was closed and the user * agent is reconnecting. * @type {0} */ const CONNECTING = 0 /** * The user agent has an open connection and is dispatching events as it * receives them. * @type {1} */ const OPEN = 1 /** * The connection is not open, and the user agent is not trying to reconnect. * @type {2} */ const CLOSED = 2 /** * Requests for the element will have their mode set to "cors" and their credentials mode set to "same-origin". * @type {'anonymous'} */ const ANONYMOUS = 'anonymous' /** * Requests for the element will have their mode set to "cors" and their credentials mode set to "include". * @type {'use-credentials'} */ const USE_CREDENTIALS = 'use-credentials' /** * The EventSource interface is used to receive server-sent events. It * connects to a server over HTTP and receives events in text/event-stream * format without closing the connection. * @extends {EventTarget} * @see https://html.spec.whatwg.org/multipage/server-sent-events.html#server-sent-events * @api public */ class EventSource extends EventTarget { #events = { open: null, error: null, message: null } #url = null #withCredentials = false #readyState = CONNECTING #request = null #controller = null #dispatcher /** * @type {import('./eventsource-stream').eventSourceSettings} */ #state /** * Creates a new EventSource object. * @param {string} url * @param {EventSourceInit} [eventSourceInitDict] * @see https://html.spec.whatwg.org/multipage/server-sent-events.html#the-eventsource-interface */ constructor (url, eventSourceInitDict = {}) { // 1. Let ev be a new EventSource object. super() webidl.util.markAsUncloneable(this) const prefix = 'EventSource constructor' webidl.argumentLengthCheck(arguments, 1, prefix) if (!experimentalWarned) { experimentalWarned = true process.emitWarning('EventSource is experimental, expect them to change at any time.', { code: 'UNDICI-ES' }) } url = webidl.converters.USVString(url, prefix, 'url') eventSourceInitDict = webidl.converters.EventSourceInitDict(eventSourceInitDict, prefix, 'eventSourceInitDict') this.#dispatcher = eventSourceInitDict.dispatcher this.#state = { lastEventId: '', reconnectionTime: defaultReconnectionTime } // 2. Let settings be ev's relevant settings object. // https://html.spec.whatwg.org/multipage/webappapis.html#environment-settings-object const settings = environmentSettingsObject let urlRecord try { // 3. Let urlRecord be the result of encoding-parsing a URL given url, relative to settings. urlRecord = new URL(url, settings.settingsObject.baseUrl) this.#state.origin = urlRecord.origin } catch (e) { // 4. If urlRecord is failure, then throw a "SyntaxError" DOMException. throw new DOMException(e, 'SyntaxError') } // 5. Set ev's url to urlRecord. this.#url = urlRecord.href // 6. Let corsAttributeState be Anonymous. let corsAttributeState = ANONYMOUS // 7. If the value of eventSourceInitDict's withCredentials member is true, // then set corsAttributeState to Use Credentials and set ev's // withCredentials attribute to true. if (eventSourceInitDict.withCredentials) { corsAttributeState = USE_CREDENTIALS this.#withCredentials = true } // 8. Let request be the result of creating a potential-CORS request given // urlRecord, the empty string, and corsAttributeState. const initRequest = { redirect: 'follow', keepalive: true, // @see https://html.spec.whatwg.org/multipage/urls-and-fetching.html#cors-settings-attributes mode: 'cors', credentials: corsAttributeState === 'anonymous' ? 'same-origin' : 'omit', referrer: 'no-referrer' } // 9. Set request's client to settings. initRequest.client = environmentSettingsObject.settingsObject // 10. User agents may set (`Accept`, `text/event-stream`) in request's header list. initRequest.headersList = [['accept', { name: 'accept', value: 'text/event-stream' }]] // 11. Set request's cache mode to "no-store". initRequest.cache = 'no-store' // 12. Set request's initiator type to "other". initRequest.initiator = 'other' initRequest.urlList = [new URL(this.#url)] // 13. Set ev's request to request. this.#request = makeRequest(initRequest) this.#connect() } /** * Returns the state of this EventSource object's connection. It can have the * values described below. * @returns {0|1|2} * @readonly */ get readyState () { return this.#readyState } /** * Returns the URL providing the event stream. * @readonly * @returns {string} */ get url () { return this.#url } /** * Returns a boolean indicating whether the EventSource object was * instantiated with CORS credentials set (true), or not (false, the default). */ get withCredentials () { return this.#withCredentials } #connect () { if (this.#readyState === CLOSED) return this.#readyState = CONNECTING const fetchParams = { request: this.#request, dispatcher: this.#dispatcher } // 14. Let processEventSourceEndOfBody given response res be the following step: if res is not a network error, then reestablish the connection. const processEventSourceEndOfBody = (response) => { if (isNetworkError(response)) { this.dispatchEvent(new Event('error')) this.close() } this.#reconnect() } // 15. Fetch request, with processResponseEndOfBody set to processEventSourceEndOfBody... fetchParams.processResponseEndOfBody = processEventSourceEndOfBody // and processResponse set to the following steps given response res: fetchParams.processResponse = (response) => { // 1. If res is an aborted network error, then fail the connection. if (isNetworkError(response)) { // 1. When a user agent is to fail the connection, the user agent // must queue a task which, if the readyState attribute is set to a // value other than CLOSED, sets the readyState attribute to CLOSED // and fires an event named error at the EventSource object. Once the // user agent has failed the connection, it does not attempt to // reconnect. if (response.aborted) { this.close() this.dispatchEvent(new Event('error')) return // 2. Otherwise, if res is a network error, then reestablish the // connection, unless the user agent knows that to be futile, in // which case the user agent may fail the connection. } else { this.#reconnect() return } } // 3. Otherwise, if res's status is not 200, or if res's `Content-Type` // is not `text/event-stream`, then fail the connection. const contentType = response.headersList.get('content-type', true) const mimeType = contentType !== null ? parseMIMEType(contentType) : 'failure' const contentTypeValid = mimeType !== 'failure' && mimeType.essence === 'text/event-stream' if ( response.status !== 200 || contentTypeValid === false ) { this.close() this.dispatchEvent(new Event('error')) return } // 4. Otherwise, announce the connection and interpret res's body // line by line. // When a user agent is to announce the connection, the user agent // must queue a task which, if the readyState attribute is set to a // value other than CLOSED, sets the readyState attribute to OPEN // and fires an event named open at the EventSource object. // @see https://html.spec.whatwg.org/multipage/server-sent-events.html#sse-processing-model this.#readyState = OPEN this.dispatchEvent(new Event('open')) // If redirected to a different origin, set the origin to the new origin. this.#state.origin = response.urlList[response.urlList.length - 1].origin const eventSourceStream = new EventSourceStream({ eventSourceSettings: this.#state, push: (event) => { this.dispatchEvent(createFastMessageEvent( event.type, event.options )) } }) pipeline(response.body.stream, eventSourceStream, (error) => { if ( error?.aborted === false ) { this.close() this.dispatchEvent(new Event('error')) } }) } this.#controller = fetching(fetchParams) } /** * @see https://html.spec.whatwg.org/multipage/server-sent-events.html#sse-processing-model * @returns {Promise<void>} */ async #reconnect () { // When a user agent is to reestablish the connection, the user agent must // run the following steps. These steps are run in parallel, not as part of // a task. (The tasks that it queues, of course, are run like normal tasks // and not themselves in parallel.) // 1. Queue a task to run the following steps: // 1. If the readyState attribute is set to CLOSED, abort the task. if (this.#readyState === CLOSED) return // 2. Set the readyState attribute to CONNECTING. this.#readyState = CONNECTING // 3. Fire an event named error at the EventSource object. this.dispatchEvent(new Event('error')) // 2. Wait a delay equal to the reconnection time of the event source. await delay(this.#state.reconnectionTime) // 5. Queue a task to run the following steps: // 1. If the EventSource object's readyState attribute is not set to // CONNECTING, then return. if (this.#readyState !== CONNECTING) return // 2. Let request be the EventSource object's request. // 3. If the EventSource object's last event ID string is not the empty // string, then: // 1. Let lastEventIDValue be the EventSource object's last event ID // string, encoded as UTF-8. // 2. Set (`Last-Event-ID`, lastEventIDValue) in request's header // list. if (this.#state.lastEventId.length) { this.#request.headersList.set('last-event-id', this.#state.lastEventId, true) } // 4. Fetch request and process the response obtained in this fashion, if any, as described earlier in this section. this.#connect() } /** * Closes the connection, if any, and sets the readyState attribute to * CLOSED. */ close () { webidl.brandCheck(this, EventSource) if (this.#readyState === CLOSED) return this.#readyState = CLOSED this.#controller.abort() this.#request = null } get onopen () { return this.#events.open } set onopen (fn) { if (this.#events.open) { this.removeEventListener('open', this.#events.open) } if (typeof fn === 'function') { this.#events.open = fn this.addEventListener('open', fn) } else { this.#events.open = null } } get onmessage () { return this.#events.message } set onmessage (fn) { if (this.#events.message) { this.removeEventListener('message', this.#events.message) } if (typeof fn === 'function') { this.#events.message = fn this.addEventListener('message', fn) } else { this.#events.message = null } } get onerror () { return this.#events.error } set onerror (fn) { if (this.#events.error) { this.removeEventListener('error', this.#events.error) } if (typeof fn === 'function') { this.#events.error = fn this.addEventListener('error', fn) } else { this.#events.error = null } } } const constantsPropertyDescriptors = { CONNECTING: { __proto__: null, configurable: false, enumerable: true, value: CONNECTING, writable: false }, OPEN: { __proto__: null, configurable: false, enumerable: true, value: OPEN, writable: false }, CLOSED: { __proto__: null, configurable: false, enumerable: true, value: CLOSED, writable: false } } Object.defineProperties(EventSource, constantsPropertyDescriptors) Object.defineProperties(EventSource.prototype, constantsPropertyDescriptors) Object.defineProperties(EventSource.prototype, { close: kEnumerableProperty, onerror: kEnumerableProperty, onmessage: kEnumerableProperty, onopen: kEnumerableProperty, readyState: kEnumerableProperty, url: kEnumerableProperty, withCredentials: kEnumerableProperty }) webidl.converters.EventSourceInitDict = webidl.dictionaryConverter([ { key: 'withCredentials', converter: webidl.converters.boolean, defaultValue: () => false }, { key: 'dispatcher', // undici only converter: webidl.converters.any } ]) module.exports = { EventSource, defaultReconnectionTime } node_modules/undici/lib/llhttp/utils.js 0000664 00000000612 15114741631 0014253 0 ustar 00 "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.enumToMap = void 0; function enumToMap(obj) { const res = {}; Object.keys(obj).forEach((key) => { const value = obj[key]; if (typeof value === 'number') { res[key] = value; } }); return res; } exports.enumToMap = enumToMap; //# sourceMappingURL=utils.js.map node_modules/undici/lib/llhttp/.gitkeep 0000664 00000000000 15114741631 0014175 0 ustar 00 node_modules/undici/lib/llhttp/constants.js 0000664 00000025372 15114741631 0015141 0 ustar 00 "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.SPECIAL_HEADERS = exports.HEADER_STATE = exports.MINOR = exports.MAJOR = exports.CONNECTION_TOKEN_CHARS = exports.HEADER_CHARS = exports.TOKEN = exports.STRICT_TOKEN = exports.HEX = exports.URL_CHAR = exports.STRICT_URL_CHAR = exports.USERINFO_CHARS = exports.MARK = exports.ALPHANUM = exports.NUM = exports.HEX_MAP = exports.NUM_MAP = exports.ALPHA = exports.FINISH = exports.H_METHOD_MAP = exports.METHOD_MAP = exports.METHODS_RTSP = exports.METHODS_ICE = exports.METHODS_HTTP = exports.METHODS = exports.LENIENT_FLAGS = exports.FLAGS = exports.TYPE = exports.ERROR = void 0; const utils_1 = require("./utils"); // C headers var ERROR; (function (ERROR) { ERROR[ERROR["OK"] = 0] = "OK"; ERROR[ERROR["INTERNAL"] = 1] = "INTERNAL"; ERROR[ERROR["STRICT"] = 2] = "STRICT"; ERROR[ERROR["LF_EXPECTED"] = 3] = "LF_EXPECTED"; ERROR[ERROR["UNEXPECTED_CONTENT_LENGTH"] = 4] = "UNEXPECTED_CONTENT_LENGTH"; ERROR[ERROR["CLOSED_CONNECTION"] = 5] = "CLOSED_CONNECTION"; ERROR[ERROR["INVALID_METHOD"] = 6] = "INVALID_METHOD"; ERROR[ERROR["INVALID_URL"] = 7] = "INVALID_URL"; ERROR[ERROR["INVALID_CONSTANT"] = 8] = "INVALID_CONSTANT"; ERROR[ERROR["INVALID_VERSION"] = 9] = "INVALID_VERSION"; ERROR[ERROR["INVALID_HEADER_TOKEN"] = 10] = "INVALID_HEADER_TOKEN"; ERROR[ERROR["INVALID_CONTENT_LENGTH"] = 11] = "INVALID_CONTENT_LENGTH"; ERROR[ERROR["INVALID_CHUNK_SIZE"] = 12] = "INVALID_CHUNK_SIZE"; ERROR[ERROR["INVALID_STATUS"] = 13] = "INVALID_STATUS"; ERROR[ERROR["INVALID_EOF_STATE"] = 14] = "INVALID_EOF_STATE"; ERROR[ERROR["INVALID_TRANSFER_ENCODING"] = 15] = "INVALID_TRANSFER_ENCODING"; ERROR[ERROR["CB_MESSAGE_BEGIN"] = 16] = "CB_MESSAGE_BEGIN"; ERROR[ERROR["CB_HEADERS_COMPLETE"] = 17] = "CB_HEADERS_COMPLETE"; ERROR[ERROR["CB_MESSAGE_COMPLETE"] = 18] = "CB_MESSAGE_COMPLETE"; ERROR[ERROR["CB_CHUNK_HEADER"] = 19] = "CB_CHUNK_HEADER"; ERROR[ERROR["CB_CHUNK_COMPLETE"] = 20] = "CB_CHUNK_COMPLETE"; ERROR[ERROR["PAUSED"] = 21] = "PAUSED"; ERROR[ERROR["PAUSED_UPGRADE"] = 22] = "PAUSED_UPGRADE"; ERROR[ERROR["PAUSED_H2_UPGRADE"] = 23] = "PAUSED_H2_UPGRADE"; ERROR[ERROR["USER"] = 24] = "USER"; })(ERROR = exports.ERROR || (exports.ERROR = {})); var TYPE; (function (TYPE) { TYPE[TYPE["BOTH"] = 0] = "BOTH"; TYPE[TYPE["REQUEST"] = 1] = "REQUEST"; TYPE[TYPE["RESPONSE"] = 2] = "RESPONSE"; })(TYPE = exports.TYPE || (exports.TYPE = {})); var FLAGS; (function (FLAGS) { FLAGS[FLAGS["CONNECTION_KEEP_ALIVE"] = 1] = "CONNECTION_KEEP_ALIVE"; FLAGS[FLAGS["CONNECTION_CLOSE"] = 2] = "CONNECTION_CLOSE"; FLAGS[FLAGS["CONNECTION_UPGRADE"] = 4] = "CONNECTION_UPGRADE"; FLAGS[FLAGS["CHUNKED"] = 8] = "CHUNKED"; FLAGS[FLAGS["UPGRADE"] = 16] = "UPGRADE"; FLAGS[FLAGS["CONTENT_LENGTH"] = 32] = "CONTENT_LENGTH"; FLAGS[FLAGS["SKIPBODY"] = 64] = "SKIPBODY"; FLAGS[FLAGS["TRAILING"] = 128] = "TRAILING"; // 1 << 8 is unused FLAGS[FLAGS["TRANSFER_ENCODING"] = 512] = "TRANSFER_ENCODING"; })(FLAGS = exports.FLAGS || (exports.FLAGS = {})); var LENIENT_FLAGS; (function (LENIENT_FLAGS) { LENIENT_FLAGS[LENIENT_FLAGS["HEADERS"] = 1] = "HEADERS"; LENIENT_FLAGS[LENIENT_FLAGS["CHUNKED_LENGTH"] = 2] = "CHUNKED_LENGTH"; LENIENT_FLAGS[LENIENT_FLAGS["KEEP_ALIVE"] = 4] = "KEEP_ALIVE"; })(LENIENT_FLAGS = exports.LENIENT_FLAGS || (exports.LENIENT_FLAGS = {})); var METHODS; (function (METHODS) { METHODS[METHODS["DELETE"] = 0] = "DELETE"; METHODS[METHODS["GET"] = 1] = "GET"; METHODS[METHODS["HEAD"] = 2] = "HEAD"; METHODS[METHODS["POST"] = 3] = "POST"; METHODS[METHODS["PUT"] = 4] = "PUT"; /* pathological */ METHODS[METHODS["CONNECT"] = 5] = "CONNECT"; METHODS[METHODS["OPTIONS"] = 6] = "OPTIONS"; METHODS[METHODS["TRACE"] = 7] = "TRACE"; /* WebDAV */ METHODS[METHODS["COPY"] = 8] = "COPY"; METHODS[METHODS["LOCK"] = 9] = "LOCK"; METHODS[METHODS["MKCOL"] = 10] = "MKCOL"; METHODS[METHODS["MOVE"] = 11] = "MOVE"; METHODS[METHODS["PROPFIND"] = 12] = "PROPFIND"; METHODS[METHODS["PROPPATCH"] = 13] = "PROPPATCH"; METHODS[METHODS["SEARCH"] = 14] = "SEARCH"; METHODS[METHODS["UNLOCK"] = 15] = "UNLOCK"; METHODS[METHODS["BIND"] = 16] = "BIND"; METHODS[METHODS["REBIND"] = 17] = "REBIND"; METHODS[METHODS["UNBIND"] = 18] = "UNBIND"; METHODS[METHODS["ACL"] = 19] = "ACL"; /* subversion */ METHODS[METHODS["REPORT"] = 20] = "REPORT"; METHODS[METHODS["MKACTIVITY"] = 21] = "MKACTIVITY"; METHODS[METHODS["CHECKOUT"] = 22] = "CHECKOUT"; METHODS[METHODS["MERGE"] = 23] = "MERGE"; /* upnp */ METHODS[METHODS["M-SEARCH"] = 24] = "M-SEARCH"; METHODS[METHODS["NOTIFY"] = 25] = "NOTIFY"; METHODS[METHODS["SUBSCRIBE"] = 26] = "SUBSCRIBE"; METHODS[METHODS["UNSUBSCRIBE"] = 27] = "UNSUBSCRIBE"; /* RFC-5789 */ METHODS[METHODS["PATCH"] = 28] = "PATCH"; METHODS[METHODS["PURGE"] = 29] = "PURGE"; /* CalDAV */ METHODS[METHODS["MKCALENDAR"] = 30] = "MKCALENDAR"; /* RFC-2068, section 19.6.1.2 */ METHODS[METHODS["LINK"] = 31] = "LINK"; METHODS[METHODS["UNLINK"] = 32] = "UNLINK"; /* icecast */ METHODS[METHODS["SOURCE"] = 33] = "SOURCE"; /* RFC-7540, section 11.6 */ METHODS[METHODS["PRI"] = 34] = "PRI"; /* RFC-2326 RTSP */ METHODS[METHODS["DESCRIBE"] = 35] = "DESCRIBE"; METHODS[METHODS["ANNOUNCE"] = 36] = "ANNOUNCE"; METHODS[METHODS["SETUP"] = 37] = "SETUP"; METHODS[METHODS["PLAY"] = 38] = "PLAY"; METHODS[METHODS["PAUSE"] = 39] = "PAUSE"; METHODS[METHODS["TEARDOWN"] = 40] = "TEARDOWN"; METHODS[METHODS["GET_PARAMETER"] = 41] = "GET_PARAMETER"; METHODS[METHODS["SET_PARAMETER"] = 42] = "SET_PARAMETER"; METHODS[METHODS["REDIRECT"] = 43] = "REDIRECT"; METHODS[METHODS["RECORD"] = 44] = "RECORD"; /* RAOP */ METHODS[METHODS["FLUSH"] = 45] = "FLUSH"; })(METHODS = exports.METHODS || (exports.METHODS = {})); exports.METHODS_HTTP = [ METHODS.DELETE, METHODS.GET, METHODS.HEAD, METHODS.POST, METHODS.PUT, METHODS.CONNECT, METHODS.OPTIONS, METHODS.TRACE, METHODS.COPY, METHODS.LOCK, METHODS.MKCOL, METHODS.MOVE, METHODS.PROPFIND, METHODS.PROPPATCH, METHODS.SEARCH, METHODS.UNLOCK, METHODS.BIND, METHODS.REBIND, METHODS.UNBIND, METHODS.ACL, METHODS.REPORT, METHODS.MKACTIVITY, METHODS.CHECKOUT, METHODS.MERGE, METHODS['M-SEARCH'], METHODS.NOTIFY, METHODS.SUBSCRIBE, METHODS.UNSUBSCRIBE, METHODS.PATCH, METHODS.PURGE, METHODS.MKCALENDAR, METHODS.LINK, METHODS.UNLINK, METHODS.PRI, // TODO(indutny): should we allow it with HTTP? METHODS.SOURCE, ]; exports.METHODS_ICE = [ METHODS.SOURCE, ]; exports.METHODS_RTSP = [ METHODS.OPTIONS, METHODS.DESCRIBE, METHODS.ANNOUNCE, METHODS.SETUP, METHODS.PLAY, METHODS.PAUSE, METHODS.TEARDOWN, METHODS.GET_PARAMETER, METHODS.SET_PARAMETER, METHODS.REDIRECT, METHODS.RECORD, METHODS.FLUSH, // For AirPlay METHODS.GET, METHODS.POST, ]; exports.METHOD_MAP = utils_1.enumToMap(METHODS); exports.H_METHOD_MAP = {}; Object.keys(exports.METHOD_MAP).forEach((key) => { if (/^H/.test(key)) { exports.H_METHOD_MAP[key] = exports.METHOD_MAP[key]; } }); var FINISH; (function (FINISH) { FINISH[FINISH["SAFE"] = 0] = "SAFE"; FINISH[FINISH["SAFE_WITH_CB"] = 1] = "SAFE_WITH_CB"; FINISH[FINISH["UNSAFE"] = 2] = "UNSAFE"; })(FINISH = exports.FINISH || (exports.FINISH = {})); exports.ALPHA = []; for (let i = 'A'.charCodeAt(0); i <= 'Z'.charCodeAt(0); i++) { // Upper case exports.ALPHA.push(String.fromCharCode(i)); // Lower case exports.ALPHA.push(String.fromCharCode(i + 0x20)); } exports.NUM_MAP = { 0: 0, 1: 1, 2: 2, 3: 3, 4: 4, 5: 5, 6: 6, 7: 7, 8: 8, 9: 9, }; exports.HEX_MAP = { 0: 0, 1: 1, 2: 2, 3: 3, 4: 4, 5: 5, 6: 6, 7: 7, 8: 8, 9: 9, A: 0XA, B: 0XB, C: 0XC, D: 0XD, E: 0XE, F: 0XF, a: 0xa, b: 0xb, c: 0xc, d: 0xd, e: 0xe, f: 0xf, }; exports.NUM = [ '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', ]; exports.ALPHANUM = exports.ALPHA.concat(exports.NUM); exports.MARK = ['-', '_', '.', '!', '~', '*', '\'', '(', ')']; exports.USERINFO_CHARS = exports.ALPHANUM .concat(exports.MARK) .concat(['%', ';', ':', '&', '=', '+', '$', ',']); // TODO(indutny): use RFC exports.STRICT_URL_CHAR = [ '!', '"', '$', '%', '&', '\'', '(', ')', '*', '+', ',', '-', '.', '/', ':', ';', '<', '=', '>', '@', '[', '\\', ']', '^', '_', '`', '{', '|', '}', '~', ].concat(exports.ALPHANUM); exports.URL_CHAR = exports.STRICT_URL_CHAR .concat(['\t', '\f']); // All characters with 0x80 bit set to 1 for (let i = 0x80; i <= 0xff; i++) { exports.URL_CHAR.push(i); } exports.HEX = exports.NUM.concat(['a', 'b', 'c', 'd', 'e', 'f', 'A', 'B', 'C', 'D', 'E', 'F']); /* Tokens as defined by rfc 2616. Also lowercases them. * token = 1*<any CHAR except CTLs or separators> * separators = "(" | ")" | "<" | ">" | "@" * | "," | ";" | ":" | "\" | <"> * | "/" | "[" | "]" | "?" | "=" * | "{" | "}" | SP | HT */ exports.STRICT_TOKEN = [ '!', '#', '$', '%', '&', '\'', '*', '+', '-', '.', '^', '_', '`', '|', '~', ].concat(exports.ALPHANUM); exports.TOKEN = exports.STRICT_TOKEN.concat([' ']); /* * Verify that a char is a valid visible (printable) US-ASCII * character or %x80-FF */ exports.HEADER_CHARS = ['\t']; for (let i = 32; i <= 255; i++) { if (i !== 127) { exports.HEADER_CHARS.push(i); } } // ',' = \x44 exports.CONNECTION_TOKEN_CHARS = exports.HEADER_CHARS.filter((c) => c !== 44); exports.MAJOR = exports.NUM_MAP; exports.MINOR = exports.MAJOR; var HEADER_STATE; (function (HEADER_STATE) { HEADER_STATE[HEADER_STATE["GENERAL"] = 0] = "GENERAL"; HEADER_STATE[HEADER_STATE["CONNECTION"] = 1] = "CONNECTION"; HEADER_STATE[HEADER_STATE["CONTENT_LENGTH"] = 2] = "CONTENT_LENGTH"; HEADER_STATE[HEADER_STATE["TRANSFER_ENCODING"] = 3] = "TRANSFER_ENCODING"; HEADER_STATE[HEADER_STATE["UPGRADE"] = 4] = "UPGRADE"; HEADER_STATE[HEADER_STATE["CONNECTION_KEEP_ALIVE"] = 5] = "CONNECTION_KEEP_ALIVE"; HEADER_STATE[HEADER_STATE["CONNECTION_CLOSE"] = 6] = "CONNECTION_CLOSE"; HEADER_STATE[HEADER_STATE["CONNECTION_UPGRADE"] = 7] = "CONNECTION_UPGRADE"; HEADER_STATE[HEADER_STATE["TRANSFER_ENCODING_CHUNKED"] = 8] = "TRANSFER_ENCODING_CHUNKED"; })(HEADER_STATE = exports.HEADER_STATE || (exports.HEADER_STATE = {})); exports.SPECIAL_HEADERS = { 'connection': HEADER_STATE.CONNECTION, 'content-length': HEADER_STATE.CONTENT_LENGTH, 'proxy-connection': HEADER_STATE.CONNECTION, 'transfer-encoding': HEADER_STATE.TRANSFER_ENCODING, 'upgrade': HEADER_STATE.UPGRADE, }; //# sourceMappingURL=constants.js.map node_modules/undici/lib/llhttp/llhttp-wasm.js 0000664 00000176630 15114741631 0015405 0 ustar 00 'use strict' const { Buffer } = require('node:buffer') module.exports = Buffer.from('AGFzbQEAAAABJwdgAX8Bf2ADf39/AX9gAX8AYAJ/fwBgBH9/f38Bf2AAAGADf39/AALLAQgDZW52GHdhc21fb25faGVhZGVyc19jb21wbGV0ZQAEA2VudhV3YXNtX29uX21lc3NhZ2VfYmVnaW4AAANlbnYLd2FzbV9vbl91cmwAAQNlbnYOd2FzbV9vbl9zdGF0dXMAAQNlbnYUd2FzbV9vbl9oZWFkZXJfZmllbGQAAQNlbnYUd2FzbV9vbl9oZWFkZXJfdmFsdWUAAQNlbnYMd2FzbV9vbl9ib2R5A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AUcNAAsgAiAFNgIADLACCyACQQA2AgAgBkEBaiEBQRAMcwtB/gAhAyABIARGDa4CIAIoAgAiACAEIAFraiEFIAEgAGtBBWohBgJAA0AgAS0AACAAQfbOAGotAABHDXEgAEEFRg0BIABBAWohACAEIAFBAWoiAUcNAAsgAiAFNgIADK8CCyACQQA2AgAgBkEBaiEBQRYMcgtB/wAhAyABIARGDa0CIAIoAgAiACAEIAFraiEFIAEgAGtBA2ohBgJAA0AgAS0AACAAQfzOAGotAABHDXAgAEEDRg0BIABBAWohACAEIAFBAWoiAUcNAAsgAiAFNgIADK4CCyACQQA2AgAgBkEBaiEBQQUMcQsgASAERgRAQYABIQMMrQILIAEtAABB2QBHDW4gAUEBaiEBQQgMcAsgASAERgRAQYEBIQMMrAILAkACQCABLQAAQc4Aaw4DAG8BbwsgAUEBaiEBQesAIQMMkwILIAFBAWohAUHsACEDDJICCyABIARGBEBBggEhAwyrAgsCQAJAIAEtAABByABrDggAbm5ubm5uAW4LIAFBAWohAUHqACEDDJICCyABQQFqIQFB7QAhAwyRAgtBgwEhAyABIARGDakCIAIoAgAiACAEIAFraiEFIAEgAGtBAmohBgJAA0AgAS0AACAAQYDPAGotAABHDWwgAEECRg0BIABBAWohACAEIAFBAWoiAUcNAAsgAiAFNgIADKoCCyACQQA2AgAgBkEBaiEBQQAMbQtBhAEhAyABIARGDagCIAIoAgAiACAEIAFraiEFIAEgAGtBBGohBgJAA0AgAS0AACAAQYPPAGotAABHDWsgAEEERg0BIABBAWohACAEIAFBAWoiAUcNAAsgAiAFNgIADKkCCyACQQA2AgAgBkEBaiEBQSMMbAsgASAERgRAQYUBIQMMqAILAkACQCABLQAAQcwAaw4IAGtra2trawFrCyABQQFqIQFB7wAhAwyPAgsgAUEBaiEBQfAAIQMMjgILIAEgBEYEQEGGASEDDKcCCyABLQAAQcUARw1oIAFBAWohAQxgC0GHASEDIAEgBEYNpQIgAigCACIAIAQgAWtqIQUgASAAa0EDaiEGAkADQCABLQAAIABBiM8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QgAiAAIAEQJSIARQ0iIAJB0gA2AhwgAiABNgIUIAIgADYCDEEAIQMMsgELIAIoAgQhACACQQA2AgQgAiAAIAEQJSIARQ0OIAJB5QA2AhwgAiABNgIUIAIgADYCDEEAIQMMsQELIAIoAgQhACACQQA2AgQgAiAAIAEQJSIARQ0dIAJB0wA2AhwgAiABNgIUIAIgADYCDEEAIQMMsAELIAIoAgQhACACQQA2AgQgAiAAIAEQJSIARQ0fIAJB0gA2AhwgAiABNgIUIAIgADYCDEEAIQMMrwELIABBP0cNASABQQFqCyEBQQUhAwyUAQtBACEDIAJBADYCHCACIAE2AhQgAkH9EjYCECACQQc2AgwMrAELIAJBADYCHCACIAE2AhQgAkHcCDYCECACQQc2AgxBACEDDKsBCyACKAIEIQAgAkEANgIEIAIgACABECUiAEUNByACQeUANgIcIAIgATYCFCACIAA2AgxBACEDDKoBCyACKAIEIQAgAkEANgIEIAIgACABECUiAEUNFiACQdMANgIcIAIgATYCFCACIAA2AgxBACEDDKkBCyACKAIEIQAgAkEANgIEIAIgACABECUiAEUNGCACQdIANgIcIAIgATYCFCACIAA2AgxBACEDDKgBCyACQQA2AhwgAiABNgIUIAJBxgo2AhAgAkEHNgIMQQAhAwynAQsgAigCBCEAIAJBADYCBCACIAAgARAlIgBFDQMgAkHlADYCHCACIAE2AhQgAiAANgIMQQAhAwymAQsgAigCBCEAIAJBADYCBCACIAAgARAlIgBFDRIgAkHTADYCHCACIAE2AhQgAiAANgIMQQAhAwylAQsgAigCBCEAIAJBADYCBCACIAAgARAlIgBFDRQgAkHSADYCHCACIAE2AhQgAiAANgIMQQAhAwykAQsgAigCBCEAIAJBADYCBCACIAAgARAlIgBFDQAgAkHlADYCHCACIAE2AhQgAiAANgIMQQAhAwyjAQtB1QAhAwyJAQsgAEEVRwRAIAJBADYCHCACIAE2AhQgAkG5DTYCECACQRo2AgxBACEDDKIBCyACQeQANgIcIAIgATYCFCACQeMXNgIQIAJBFTYCDEEAIQMMoQELIAJBADYCACAGQQF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QEBAAEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAEH6yAALBAEAAAIAQZDJAAtfAwQAAAQEBAQEBAQEBAQEBQQEBAQEBAQEBAQEBAAEAAYHBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEAAQABAAEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAAAAAQAQfrKAAsEAQAAAQBBkMsACwEBAEGqywALQQIAAAAAAAADAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwAAAAAAAAMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAEH6zAALBAEAAAEAQZDNAAsBAQBBms0ACwYCAAAAAAIAQbHNAAs6AwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMAAAAAAAADAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwBB8M4AC5YBTk9VTkNFRUNLT1VUTkVDVEVURUNSSUJFTFVTSEVURUFEU0VBUkNIUkdFQ1RJVklUWUxFTkRBUlZFT1RJRllQVElPTlNDSFNFQVlTVEFUQ0hHRU9SRElSRUNUT1JUUkNIUEFSQU1FVEVSVVJDRUJTQ1JJQkVBUkRPV05BQ0VJTkROS0NLVUJTQ1JJQkVIVFRQL0FEVFAv', 'base64') node_modules/undici/lib/llhttp/llhttp_simd-wasm.js 0000664 00000176700 15114741631 0016417 0 ustar 00 'use strict' const { Buffer } = require('node:buffer') module.exports = Buffer.from('AGFzbQEAAAABJwdgAX8Bf2ADf39/AX9gAX8AYAJ/fwBgBH9/f38Bf2AAAGADf39/AALLAQgDZW52GHdhc21fb25faGVhZGVyc19jb21wbGV0ZQAEA2VudhV3YXNtX29uX21lc3NhZ2VfYmVnaW4AAANlbnYLd2FzbV9vb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A0AgACIDKAIEQXhxIARGDQEgAkEddiEAIAJBAXQhAiADIABBBHFqQRBqIgcoAgAiAA0ACyAHIAE2AgAgASADNgIYIAEgATYCDCABIAE2AggMAQsgAygCCCIAIAE2AgwgAyABNgIIIAFBADYCGCABIAM2AgwgASAANgIIC0Gs0ABBrNAAKAIAQQFrIgBBfyAAGzYCAAsLBwAgAC0AKAsHACAALQAqCwcAIAAtACsLBwAgAC0AKQsHACAALwEyCwcAIAAtAC4LQAEEfyAAKAIYIQEgAC0ALSECIAAtACghAyAAKAI4IQQgABAwIAAgBDYCOCAAIAM6ACggACACOgAtIAAgATYCGAu74gECB38DfiABIAJqIQQCQCAAIgIoAgwiAA0AIAIoAgQEQCACIAE2AgQLIwBBEGsiCCQAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACfwJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAIAIoAhwiA0EBaw7dAdoBAdkBAgMEBQYHCAkKCwwNDtgBDxDXARES1gETFBUWFxgZGhvgAd8BHB0e1QEfICEiIyQl1AEmJygpKiss0wHSAS0u0QHQAS8wMT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AAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJ/AkACQAJAAkACQAJAAkACQAJAAkACQAJAAkAgAgJ/AkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACfwJAAkACfwJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACfwJAAkACQAJAAn8CQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQCADDsYBAAECAwQFBgcICQoLDA0ODxAREhMUFRYXGBkaGxwdHyAhIyUmKCorLC8wMTIzNDU2Nzk6Ozw9lANAQkRFRklLTk9QUVJTVFVWWFpbXF1eX2BhYmNkZWZnaGpsb3Bxc3V2eHl6e3x/gAGBAYIBgwGEAYUBhgGHAYgBiQGKAYsBjAGNAY4BjwGQAZEBkgGTAZQBlQGWAZcBmAGZAZoBmwGcAZ0BngGfAaABoQGiAaMBpAGlAaYBpwGoAakBqgGrAawBrQG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AUHmACEDDJgCCyABQQFqIQFB5wAhAwyXAgtB/QAhAyABIARGDa8CIAIoAgAiACAEIAFraiEFIAEgAGtBAmohBgJAA0AgAS0AACAAQe3PAGotAABHDXIgAEECRg0BIABBAWohACAEIAFBAWoiAUcNAAsgAiAFNgIADLACCyACQQA2AgAgBkEBaiEBQRAMcwtB/gAhAyABIARGDa4CIAIoAgAiACAEIAFraiEFIAEgAGtBBWohBgJAA0AgAS0AACAAQfbOAGotAABHDXEgAEEFRg0BIABBAWohACAEIAFBAWoiAUcNAAsgAiAFNgIADK8CCyACQQA2AgAgBkEBaiEBQRYMcgtB/wAhAyABIARGDa0CIAIoAgAiACAEIAFraiEFIAEgAGtBA2ohBgJAA0AgAS0AACAAQfzOAGotAABHDXAgAEEDRg0BIABBAWohACAEIAFBAWoiAUcNAAsgAiAFNgIADK4CCyACQQA2AgAgBkEBaiEBQQUMcQsgASAERgRAQYABIQMMrQILIAEtAABB2QBHDW4gAUEBaiEBQQgMcAsgASAERgRAQYEBIQMMrAILAkACQCABLQAAQc4Aaw4DAG8BbwsgAUEBaiEBQesAIQMMkwILIAFBAWohAUHsACEDDJICCyABIARGBEBBggEhAwyrAgsCQAJAIAEtAABByABrDggAbm5ubm5uAW4LIAFBAWohAUHqACEDDJICCyABQQFqIQFB7QAhAwyRAgtBgwEhAyABIARGDakCIAIoAgAiACAEIAFraiEFIAEgAGtBAmohBgJAA0AgAS0AACAAQYDPAGotAABHDWwgAEECRg0BIABBAWohACAEIAFBAWoiAUcNAAsgAiAFNgIADKoCCyACQQA2AgAgBkEBaiEBQQAMbQtBhAEhAyABIARGDagCIAIoAgAiACAEIAFraiEFIAEgAGtBBGohBgJAA0AgAS0AACAAQYPPAGotAABHDWsgAEEERg0BIABBAWohACAEIAFBAWoiAUcNAAsgAiAFNgIADKkCCyACQQA2AgAgBkEBaiEBQSMMbAsgASAERgRAQYUBIQMMqAILAkACQCABLQAAQcwAaw4IAGtra2trawFrCyABQQFqIQFB7wAhAwyPAg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SIARQ0RIAJB5QA2AhwgAiABNgIUIAIgADYCDEEAIQMMtAELIAIoAgQhACACQQA2AgQgAiAAIAEQJSIARQ0gIAJB0wA2AhwgAiABNgIUIAIgADYCDEEAIQMMswELIAIoAgQhACACQQA2AgQgAiAAIAEQJSIARQ0iIAJB0gA2AhwgAiABNgIUIAIgADYCDEEAIQMMsgELIAIoAgQhACACQQA2AgQgAiAAIAEQJSIARQ0OIAJB5QA2AhwgAiABNgIUIAIgADYCDEEAIQMMsQELIAIoAgQhACACQQA2AgQgAiAAIAEQJSIARQ0dIAJB0wA2AhwgAiABNgIUIAIgADYCDEEAIQMMsAELIAIoAgQhACACQQA2AgQgAiAAIAEQJSIARQ0fIAJB0gA2AhwgAiABNgIUIAIgADYCDEEAIQMMrwELIABBP0cNASABQQFqCyEBQQUhAwyUAQtBACEDIAJBADYCHCACIAE2AhQgAkH9EjYCECACQQc2AgwMrAELIAJBADYCHCACIAE2AhQgAkHcCDYCECACQQc2AgxBACEDDKsBCyACKAIEIQAgAkEANgIEIAIgACABECUiAEUNByACQeUANgIcIAIgATYCFCACIAA2AgxBACEDDKoBCyACKAIEIQAgAkEANgIEIAIgACABECUiAEUNFiACQdMANgIcIAIgATYCFCACIAA2AgxBACEDDKkBCyACKAIEIQAgAkEANgIEIAIgACABECUiAEUNGCACQdIANgIcIAIgATYCFCACIAA2AgxBACEDDKgBCyACQQA2AhwgAiABNgIUIAJBxgo2AhAgAkEHNgIMQQAhAwynAQsgAigCBCEAIAJBADYCBCACIAAgARAlIgBFDQMgAkHlADYCHCACIAE2AhQgAiAANgIMQQAhAwymAQsgAigCBCEAIAJBADYCBCACIAAgARAlIgBFDRIgAkHTADYCHCACIAE2AhQgAiAANgIMQQAhAwylAQsgAigCBCEAIAJBADYCBCACIAAgARAlIgBFDRQgAkHSADYCHCACIAE2AhQgAiAANgIMQQAhAwykAQsgAigCBCEAIAJBADYCBCACIAAgARAlIgBFDQAgAkHlADYCHCACIAE2AhQgAiAANgIMQQAhA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IQMMlgELIAJB1wA2AhwgAiABNgIUIAJByRc2AhAgAkEVNgIMQQAhAwyVAQtBACEDIAJBADYCHCACIAE2AhQgAkGAETYCECACQQk2AgwMlAELIAIoAgQhACACQQA2AgQgAiAAIAEQJSIARQ0AIAJB0wA2AhwgAiABNgIUIAIgADYCDEEAIQMMkwELQckAIQMMeQsgAkEANgIcIAIgATYCFCACQcEoNgIQIAJBBzYCDCACQQA2AgBBACEDDJEBCyACKAIEIQBBACEDIAJBADYCBCACIAAgARAlIgBFDQAgAkHSADYCHCACIAE2AhQgAiAANgIMDJABC0HIACEDDHYLIAJBADYCACAFIQELIAJBgBI7ASogAUEBaiEBQQAhAAJAIAIoAjgiA0UNACADKAIwIgNFDQAgAiADEQAAIQALIAANAQtBxwAhAwxzCyAAQRVGBEAgAkHRADYCHCACIAE2AhQgAkHjFzYCECACQRU2AgxBACEDDIwBC0EAIQMgAkEANgIcIAIgATYCFCACQbkNNgIQIAJBGjYCDAyLAQtBACEDIAJBADYCHCACIAE2AhQgAkGgGTYCECACQR42AgwMigELIAEtAABBOkYEQCACKAIEIQBBACEDIAJBADYCBCACIAAgARApIgBFDQEgAkHDADYCHCACIAA2AgwgAiABQQFqNgIUDIoBC0EAIQMgAkEANgIcIAIgATYCFCACQbERNgIQIAJBCjYCDAyJAQsgAUEBaiEBQTshAwxvCyACQcMANgIcIAIgADYCDCACIAFBAWo2AhQMhwELQQAhAyACQQA2AhwgAiABNgIUIAJB8A42AhAgAkEcNgIMDIYBCyACIAIvATBBEHI7ATAMZgsCQCACLwEwIgBBCHFFDQAgAi0AKEEBRw0AIAItAC1BCHFFDQMLIAIgAEH3+wNxQYAEcjsBMAwECyABIARHBEACQANAIAEtAABBMGsiAEH/AXFBCk8EQEE1IQMMbgsgAikDICIKQpmz5syZs+bMGVYNASACIApCCn4iCjcDICAKIACtQv8BgyILQn+FVg0BIAIgCiALfDcDICAEIAFBAWoiAUcNAAtBOSEDDIUBCyACKAIEIQBBACEDIAJBADYCBCAC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000001547 15114741631 0013054 0 ustar 00 'use strict' // We include a version number for the Dispatcher API. In case of breaking changes, // this version number must be increased to avoid conflicts. const globalDispatcher = Symbol.for('undici.globalDispatcher.1') const { InvalidArgumentError } = require('./core/errors') const Agent = require('./dispatcher/agent') if (getGlobalDispatcher() === undefined) { setGlobalDispatcher(new Agent()) } function setGlobalDispatcher (agent) { if (!agent || typeof agent.dispatch !== 'function') { throw new InvalidArgumentError('Argument agent must implement Agent') } Object.defineProperty(globalThis, globalDispatcher, { value: agent, writable: true, enumerable: false, configurable: false }) } function getGlobalDispatcher () { return globalThis[globalDispatcher] } module.exports = { setGlobalDispatcher, getGlobalDispatcher } node_modules/undici/lib/util/timers.js 0000664 00000026731 15114741631 0014076 0 ustar 00 'use strict' /** * This module offers an optimized timer implementation designed for scenarios * where high precision is not critical. * * The timer achieves faster performance by using a low-resolution approach, * with an accuracy target of within 500ms. This makes it particularly useful * for timers with delays of 1 second or more, where exact timing is less * crucial. * * It's important to note that Node.js timers are inherently imprecise, as * delays can occur due to the event loop being blocked by other operations. * Consequently, timers may trigger later than their scheduled time. */ /** * The fastNow variable contains the internal fast timer clock value. * * @type {number} */ let fastNow = 0 /** * RESOLUTION_MS represents the target resolution time in milliseconds. * * @type {number} * @default 1000 */ const RESOLUTION_MS = 1e3 /** * TICK_MS defines the desired interval in milliseconds between each tick. * The target value is set to half the resolution time, minus 1 ms, to account * for potential event loop overhead. * * @type {number} * @default 499 */ const TICK_MS = (RESOLUTION_MS >> 1) - 1 /** * fastNowTimeout is a Node.js timer used to manage and process * the FastTimers stored in the `fastTimers` array. * * @type {NodeJS.Timeout} */ let fastNowTimeout /** * The kFastTimer symbol is used to identify FastTimer instances. * * @type {Symbol} */ const kFastTimer = Symbol('kFastTimer') /** * The fastTimers array contains all active FastTimers. * * @type {FastTimer[]} */ const fastTimers = [] /** * These constants represent the various states of a FastTimer. */ /** * The `NOT_IN_LIST` constant indicates that the FastTimer is not included * in the `fastTimers` array. Timers with this status will not be processed * during the next tick by the `onTick` function. * * A FastTimer can be re-added to the `fastTimers` array by invoking the * `refresh` method on the FastTimer instance. * * @type {-2} */ const NOT_IN_LIST = -2 /** * The `TO_BE_CLEARED` constant indicates that the FastTimer is scheduled * for removal from the `fastTimers` array. A FastTimer in this state will * be removed in the next tick by the `onTick` function and will no longer * be processed. * * This status is also set when the `clear` method is called on the FastTimer instance. * * @type {-1} */ const TO_BE_CLEARED = -1 /** * The `PENDING` constant signifies that the FastTimer is awaiting processing * in the next tick by the `onTick` function. Timers with this status will have * their `_idleStart` value set and their status updated to `ACTIVE` in the next tick. * * @type {0} */ const PENDING = 0 /** * The `ACTIVE` constant indicates that the FastTimer is active and waiting * for its timer to expire. During the next tick, the `onTick` function will * check if the timer has expired, and if so, it will execute the associated callback. * * @type {1} */ const ACTIVE = 1 /** * The onTick function processes the fastTimers array. * * @returns {void} */ function onTick () { /** * Increment the fastNow value by the TICK_MS value, despite the actual time * that has passed since the last tick. This approach ensures independence * from the system clock and delays caused by a blocked event loop. * * @type {number} */ fastNow += TICK_MS /** * The `idx` variable is used to iterate over the `fastTimers` array. * Expired timers are removed by replacing them with the last element in the array. * Consequently, `idx` is only incremented when the current element is not removed. * * @type {number} */ let idx = 0 /** * The len variable will contain the length of the fastTimers array * and will be decremented when a FastTimer should be removed from the * fastTimers array. * * @type {number} */ let len = fastTimers.length while (idx < len) { /** * @type {FastTimer} */ const timer = fastTimers[idx] // If the timer is in the ACTIVE state and the timer has expired, it will // be processed in the next tick. if (timer._state === PENDING) { // Set the _idleStart value to the fastNow value minus the TICK_MS value // to account for the time the timer was in the PENDING state. timer._idleStart = fastNow - TICK_MS timer._state = ACTIVE } else if ( timer._state === ACTIVE && fastNow >= timer._idleStart + timer._idleTimeout ) { timer._state = TO_BE_CLEARED timer._idleStart = -1 timer._onTimeout(timer._timerArg) } if (timer._state === TO_BE_CLEARED) { timer._state = NOT_IN_LIST // Move the last element to the current index and decrement len if it is // not the only element in the array. if (--len !== 0) { fastTimers[idx] = fastTimers[len] } } else { ++idx } } // Set the length of the fastTimers array to the new length and thus // removing the excess FastTimers elements from the array. fastTimers.length = len // If there are still active FastTimers in the array, refresh the Timer. // If there are no active FastTimers, the timer will be refreshed again // when a new FastTimer is instantiated. if (fastTimers.length !== 0) { refreshTimeout() } } function refreshTimeout () { // If the fastNowTimeout is already set, refresh it. if (fastNowTimeout) { fastNowTimeout.refresh() // fastNowTimeout is not instantiated yet, create a new Timer. } else { clearTimeout(fastNowTimeout) fastNowTimeout = setTimeout(onTick, TICK_MS) // If the Timer has an unref method, call it to allow the process to exit if // there are no other active handles. if (fastNowTimeout.unref) { fastNowTimeout.unref() } } } /** * The `FastTimer` class is a data structure designed to store and manage * timer information. */ class FastTimer { [kFastTimer] = true /** * The state of the timer, which can be one of the following: * - NOT_IN_LIST (-2) * - TO_BE_CLEARED (-1) * - PENDING (0) * - ACTIVE (1) * * @type {-2|-1|0|1} * @private */ _state = NOT_IN_LIST /** * The number of milliseconds to wait before calling the callback. * * @type {number} * @private */ _idleTimeout = -1 /** * The time in milliseconds when the timer was started. This value is used to * calculate when the timer should expire. * * @type {number} * @default -1 * @private */ _idleStart = -1 /** * The function to be executed when the timer expires. * @type {Function} * @private */ _onTimeout /** * The argument to be passed to the callback when the timer expires. * * @type {*} * @private */ _timerArg /** * @constructor * @param {Function} callback A function to be executed after the timer * expires. * @param {number} delay The time, in milliseconds that the timer should wait * before the specified function or code is executed. * @param {*} arg */ constructor (callback, delay, arg) { this._onTimeout = callback this._idleTimeout = delay this._timerArg = arg this.refresh() } /** * Sets the timer's start time to the current time, and reschedules the timer * to call its callback at the previously specified duration adjusted to the * current time. * Using this on a timer that has already called its callback will reactivate * the timer. * * @returns {void} */ refresh () { // In the special case that the timer is not in the list of active timers, // add it back to the array to be processed in the next tick by the onTick // function. if (this._state === NOT_IN_LIST) { fastTimers.push(this) } // If the timer is the only active timer, refresh the fastNowTimeout for // better resolution. if (!fastNowTimeout || fastTimers.length === 1) { refreshTimeout() } // Setting the state to PENDING will cause the timer to be reset in the // next tick by the onTick function. this._state = PENDING } /** * The `clear` method cancels the timer, preventing it from executing. * * @returns {void} * @private */ clear () { // Set the state to TO_BE_CLEARED to mark the timer for removal in the next // tick by the onTick function. this._state = TO_BE_CLEARED // Reset the _idleStart value to -1 to indicate that the timer is no longer // active. this._idleStart = -1 } } /** * This module exports a setTimeout and clearTimeout function that can be * used as a drop-in replacement for the native functions. */ module.exports = { /** * The setTimeout() method sets a timer which executes a function once the * timer expires. * @param {Function} callback A function to be executed after the timer * expires. * @param {number} delay The time, in milliseconds that the timer should * wait before the specified function or code is executed. * @param {*} [arg] An optional argument to be passed to the callback function * when the timer expires. * @returns {NodeJS.Timeout|FastTimer} */ setTimeout (callback, delay, arg) { // If the delay is less than or equal to the RESOLUTION_MS value return a // native Node.js Timer instance. return delay <= RESOLUTION_MS ? setTimeout(callback, delay, arg) : new FastTimer(callback, delay, arg) }, /** * The clearTimeout method cancels an instantiated Timer previously created * by calling setTimeout. * * @param {NodeJS.Timeout|FastTimer} timeout */ clearTimeout (timeout) { // If the timeout is a FastTimer, call its own clear method. if (timeout[kFastTimer]) { /** * @type {FastTimer} */ timeout.clear() // Otherwise it is an instance of a native NodeJS.Timeout, so call the // Node.js native clearTimeout function. } else { clearTimeout(timeout) } }, /** * The setFastTimeout() method sets a fastTimer which executes a function once * the timer expires. * @param {Function} callback A function to be executed after the timer * expires. * @param {number} delay The time, in milliseconds that the timer should * wait before the specified function or code is executed. * @param {*} [arg] An optional argument to be passed to the callback function * when the timer expires. * @returns {FastTimer} */ setFastTimeout (callback, delay, arg) { return new FastTimer(callback, delay, arg) }, /** * The clearTimeout method cancels an instantiated FastTimer previously * created by calling setFastTimeout. * * @param {FastTimer} timeout */ clearFastTimeout (timeout) { timeout.clear() }, /** * The now method returns the value of the internal fast timer clock. * * @returns {number} */ now () { return fastNow }, /** * Trigger the onTick function to process the fastTimers array. * Exported for testing purposes only. * Marking as deprecated to discourage any use outside of testing. * @deprecated * @param {number} [delay=0] The delay in milliseconds to add to the now value. */ tick (delay = 0) { fastNow += delay - RESOLUTION_MS + 1 onTick() onTick() }, /** * Reset FastTimers. * Exported for testing purposes only. * Marking as deprecated to discourage any use outside of testing. * @deprecated */ reset () { fastNow = 0 fastTimers.length = 0 clearTimeout(fastNowTimeout) fastNowTimeout = null }, /** * Exporting for testing purposes only. * Marking as deprecated to discourage any use outside of testing. * @deprecated */ kFastTimer } node_modules/undici/types/content-type.d.ts 0000664 00000001061 15114741631 0015066 0 ustar 00 /// <reference types="node" /> interface MIMEType { type: string subtype: string parameters: Map<string, string> essence: string } /** * Parse a string to a {@link MIMEType} object. Returns `failure` if the string * couldn't be parsed. * @see https://mimesniff.spec.whatwg.org/#parse-a-mime-type */ export function parseMIMEType (input: string): 'failure' | MIMEType /** * Convert a MIMEType object to a string. * @see https://mimesniff.spec.whatwg.org/#serialize-a-mime-type */ export function serializeAMimeType (mimeType: MIMEType): string node_modules/undici/types/global-origin.d.ts 0000664 00000000257 15114741631 0015170 0 ustar 00 export { setGlobalOrigin, getGlobalOrigin } declare function setGlobalOrigin(origin: string | URL | undefined): void; declare function getGlobalOrigin(): URL | undefined; node_modules/undici/types/webidl.d.ts 0000664 00000013441 15114741631 0013710 0 ustar 00 // These types are not exported, and are only used internally /** * Take in an unknown value and return one that is of type T */ type Converter<T> = (object: unknown) => T type SequenceConverter<T> = (object: unknown, iterable?: IterableIterator<T>) => T[] type RecordConverter<K extends string, V> = (object: unknown) => Record<K, V> interface ConvertToIntOpts { clamp?: boolean enforceRange?: boolean } interface WebidlErrors { exception (opts: { header: string, message: string }): TypeError /** * @description Throw an error when conversion from one type to another has failed */ conversionFailed (opts: { prefix: string argument: string types: string[] }): TypeError /** * @description Throw an error when an invalid argument is provided */ invalidArgument (opts: { prefix: string value: string type: string }): TypeError } interface WebidlUtil { /** * @see https://tc39.es/ecma262/#sec-ecmascript-data-types-and-values */ Type (object: unknown): | 'Undefined' | 'Boolean' | 'String' | 'Symbol' | 'Number' | 'BigInt' | 'Null' | 'Object' /** * @see https://webidl.spec.whatwg.org/#abstract-opdef-converttoint */ ConvertToInt ( V: unknown, bitLength: number, signedness: 'signed' | 'unsigned', opts?: ConvertToIntOpts ): number /** * @see https://webidl.spec.whatwg.org/#abstract-opdef-converttoint */ IntegerPart (N: number): number /** * Stringifies {@param V} */ Stringify (V: any): string /** * Mark a value as uncloneable for Node.js. * This is only effective in some newer Node.js versions. */ markAsUncloneable (V: any): void } interface WebidlConverters { /** * @see https://webidl.spec.whatwg.org/#es-DOMString */ DOMString (V: unknown, prefix: string, argument: string, opts?: { legacyNullToEmptyString: boolean }): string /** * @see https://webidl.spec.whatwg.org/#es-ByteString */ ByteString (V: unknown, prefix: string, argument: string): string /** * @see https://webidl.spec.whatwg.org/#es-USVString */ USVString (V: unknown): string /** * @see https://webidl.spec.whatwg.org/#es-boolean */ boolean (V: unknown): boolean /** * @see https://webidl.spec.whatwg.org/#es-any */ any <Value>(V: Value): Value /** * @see https://webidl.spec.whatwg.org/#es-long-long */ ['long long'] (V: unknown): number /** * @see https://webidl.spec.whatwg.org/#es-unsigned-long-long */ ['unsigned long long'] (V: unknown): number /** * @see https://webidl.spec.whatwg.org/#es-unsigned-long */ ['unsigned long'] (V: unknown): number /** * @see https://webidl.spec.whatwg.org/#es-unsigned-short */ ['unsigned short'] (V: unknown, opts?: ConvertToIntOpts): number /** * @see https://webidl.spec.whatwg.org/#idl-ArrayBuffer */ ArrayBuffer (V: unknown): ArrayBufferLike ArrayBuffer (V: unknown, opts: { allowShared: false }): ArrayBuffer /** * @see https://webidl.spec.whatwg.org/#es-buffer-source-types */ TypedArray ( V: unknown, TypedArray: NodeJS.TypedArray | ArrayBufferLike ): NodeJS.TypedArray | ArrayBufferLike TypedArray ( V: unknown, TypedArray: NodeJS.TypedArray | ArrayBufferLike, opts?: { allowShared: false } ): NodeJS.TypedArray | ArrayBuffer /** * @see https://webidl.spec.whatwg.org/#es-buffer-source-types */ DataView (V: unknown, opts?: { allowShared: boolean }): DataView /** * @see https://webidl.spec.whatwg.org/#BufferSource */ BufferSource ( V: unknown, opts?: { allowShared: boolean } ): NodeJS.TypedArray | ArrayBufferLike | DataView ['sequence<ByteString>']: SequenceConverter<string> ['sequence<sequence<ByteString>>']: SequenceConverter<string[]> ['record<ByteString, ByteString>']: RecordConverter<string, string> [Key: string]: (...args: any[]) => unknown } export interface Webidl { errors: WebidlErrors util: WebidlUtil converters: WebidlConverters /** * @description Performs a brand-check on {@param V} to ensure it is a * {@param cls} object. */ brandCheck <Interface>(V: unknown, cls: Interface, opts?: { strict?: boolean }): asserts V is Interface /** * @see https://webidl.spec.whatwg.org/#es-sequence * @description Convert a value, V, to a WebIDL sequence type. */ sequenceConverter <Type>(C: Converter<Type>): SequenceConverter<Type> illegalConstructor (): never /** * @see https://webidl.spec.whatwg.org/#es-to-record * @description Convert a value, V, to a WebIDL record type. */ recordConverter <K extends string, V>( keyConverter: Converter<K>, valueConverter: Converter<V> ): RecordConverter<K, V> /** * Similar to {@link Webidl.brandCheck} but allows skipping the check if third party * interfaces are allowed. */ interfaceConverter <Interface>(cls: Interface): ( V: unknown, opts?: { strict: boolean } ) => asserts V is typeof cls // TODO(@KhafraDev): a type could likely be implemented that can infer the return type // from the converters given? /** * Converts a value, V, to a WebIDL dictionary types. Allows limiting which keys are * allowed, values allowed, optional and required keys. Auto converts the value to * a type given a converter. */ dictionaryConverter (converters: { key: string, defaultValue?: () => unknown, required?: boolean, converter: (...args: unknown[]) => unknown, allowedValues?: unknown[] }[]): (V: unknown) => Record<string, unknown> /** * @see https://webidl.spec.whatwg.org/#idl-nullable-type * @description allows a type, V, to be null */ nullableConverter <T>( converter: Converter<T> ): (V: unknown) => ReturnType<typeof converter> | null argumentLengthCheck (args: { length: number }, min: number, context: string): void } node_modules/undici/types/retry-agent.d.ts 0000664 00000000350 15114741631 0014676 0 ustar 00 import Dispatcher from './dispatcher' import RetryHandler from './retry-handler' export default RetryAgent declare class RetryAgent extends Dispatcher { constructor(dispatcher: Dispatcher, options?: RetryHandler.RetryOptions) } node_modules/undici/types/cookies.d.ts 0000664 00000001173 15114741631 0014075 0 ustar 00 /// <reference types="node" /> import type { Headers } from './fetch' export interface Cookie { name: string value: string expires?: Date | number maxAge?: number domain?: string path?: string secure?: boolean httpOnly?: boolean sameSite?: 'Strict' | 'Lax' | 'None' unparsed?: string[] } export function deleteCookie ( headers: Headers, name: string, attributes?: { name?: string, domain?: string } ): void export function getCookies (headers: Headers): Record<string, string> export function getSetCookies (headers: Headers): Cookie[] export function setCookie (headers: Headers, cookie: Cookie): void node_modules/undici/types/interceptors.d.ts 0000664 00000003221 15114741631 0015156 0 ustar 00 import { LookupOptions } from 'node:dns' import Dispatcher from "./dispatcher"; import RetryHandler from "./retry-handler"; export default Interceptors; declare namespace Interceptors { export type DumpInterceptorOpts = { maxSize?: number } export type RetryInterceptorOpts = RetryHandler.RetryOptions export type RedirectInterceptorOpts = { maxRedirections?: number } export type ResponseErrorInterceptorOpts = { throwOnError: boolean } // DNS interceptor export type DNSInterceptorRecord = { address: string, ttl: number, family: 4 | 6 } export type DNSInterceptorOriginRecords = { 4: { ips: DNSInterceptorRecord[] } | null, 6: { ips: DNSInterceptorRecord[] } | null } export type DNSInterceptorOpts = { maxTTL?: number maxItems?: number lookup?: (hostname: string, options: LookupOptions, callback: (err: NodeJS.ErrnoException | null, addresses: DNSInterceptorRecord[]) => void) => void pick?: (origin: URL, records: DNSInterceptorOriginRecords, affinity: 4 | 6) => DNSInterceptorRecord dualStack?: boolean affinity?: 4 | 6 } export function createRedirectInterceptor(opts: RedirectInterceptorOpts): Dispatcher.DispatcherComposeInterceptor export function dump(opts?: DumpInterceptorOpts): Dispatcher.DispatcherComposeInterceptor export function retry(opts?: RetryInterceptorOpts): Dispatcher.DispatcherComposeInterceptor export function redirect(opts?: RedirectInterceptorOpts): Dispatcher.DispatcherComposeInterceptor export function responseError(opts?: ResponseErrorInterceptorOpts): Dispatcher.DispatcherComposeInterceptor export function dns (opts?: DNSInterceptorOpts): Dispatcher.DispatcherComposeInterceptor } node_modules/undici/types/patch.d.ts 0000664 00000001263 15114741631 0013540 0 ustar 00 /// <reference types="node" /> // See https://github.com/nodejs/undici/issues/1740 export type DOMException = typeof globalThis extends { DOMException: infer T } ? T : any export interface EventInit { bubbles?: boolean cancelable?: boolean composed?: boolean } export interface EventListenerOptions { capture?: boolean } export interface AddEventListenerOptions extends EventListenerOptions { once?: boolean passive?: boolean signal?: AbortSignal } export type EventListenerOrEventListenerObject = EventListener | EventListenerObject export interface EventListenerObject { handleEvent (object: Event): void } export interface EventListener { (evt: Event): void } node_modules/undici/types/mock-pool.d.ts 0000664 00000001716 15114741631 0014344 0 ustar 00 import Pool from './pool' import MockAgent from './mock-agent' import { Interceptable, MockInterceptor } from './mock-interceptor' import Dispatcher from './dispatcher' export default MockPool /** MockPool extends the Pool API and allows one to mock requests. */ declare class MockPool extends Pool implements Interceptable { constructor(origin: string, options: MockPool.Options); /** Intercepts any matching requests that use the same origin as this mock pool. */ intercept(options: MockInterceptor.Options): MockInterceptor; /** Dispatches a mocked request. */ dispatch(options: Dispatcher.DispatchOptions, handlers: Dispatcher.DispatchHandlers): boolean; /** Closes the mock pool and gracefully waits for enqueued requests to complete. */ close(): Promise<void>; } declare namespace MockPool { /** MockPool options. */ export interface Options extends Pool.Options { /** The agent to associate this MockPool with. */ agent: MockAgent; } } node_modules/undici/types/connector.d.ts 0000664 00000002005 15114741631 0014426 0 ustar 00 import { TLSSocket, ConnectionOptions } from 'tls' import { IpcNetConnectOpts, Socket, TcpNetConnectOpts } from 'net' export default buildConnector declare function buildConnector (options?: buildConnector.BuildOptions): buildConnector.connector declare namespace buildConnector { export type BuildOptions = (ConnectionOptions | TcpNetConnectOpts | IpcNetConnectOpts) & { allowH2?: boolean; maxCachedSessions?: number | null; socketPath?: string | null; timeout?: number | null; port?: number; keepAlive?: boolean | null; keepAliveInitialDelay?: number | null; } export interface Options { hostname: string host?: string protocol: string port: string servername?: string localAddress?: string | null httpSocket?: Socket } export type Callback = (...args: CallbackArgs) => void type CallbackArgs = [null, Socket | TLSSocket] | [Error, null] export interface connector { (options: buildConnector.Options, callback: buildConnector.Callback): void } } node_modules/undici/types/agent.d.ts 0000664 00000002051 15114741631 0013533 0 ustar 00 import { URL } from 'url' import Pool from './pool' import Dispatcher from "./dispatcher"; export default Agent declare class Agent extends Dispatcher{ constructor(opts?: Agent.Options) /** `true` after `dispatcher.close()` has been called. */ closed: boolean; /** `true` after `dispatcher.destroyed()` has been called or `dispatcher.close()` has been called and the dispatcher shutdown has completed. */ destroyed: boolean; /** Dispatches a request. */ dispatch(options: Agent.DispatchOptions, handler: Dispatcher.DispatchHandlers): boolean; } declare namespace Agent { export interface Options extends Pool.Options { /** Default: `(origin, opts) => new Pool(origin, opts)`. */ factory?(origin: string | URL, opts: Object): Dispatcher; /** Integer. Default: `0` */ maxRedirections?: number; interceptors?: { Agent?: readonly Dispatcher.DispatchInterceptor[] } & Pool.Options["interceptors"] } export interface DispatchOptions extends Dispatcher.DispatchOptions { /** Integer. */ maxRedirections?: number; } } node_modules/undici/types/fetch.d.ts 0000664 00000012707 15114741631 0013537 0 ustar 00 // based on https://github.com/Ethan-Arrowood/undici-fetch/blob/249269714db874351589d2d364a0645d5160ae71/index.d.ts (MIT license) // and https://github.com/node-fetch/node-fetch/blob/914ce6be5ec67a8bab63d68510aabf07cb818b6d/index.d.ts (MIT license) /// <reference types="node" /> import { Blob } from 'buffer' import { URL, URLSearchParams } from 'url' import { ReadableStream } from 'stream/web' import { FormData } from './formdata' import Dispatcher from './dispatcher' export type RequestInfo = string | URL | Request export declare function fetch ( input: RequestInfo, init?: RequestInit ): Promise<Response> export type BodyInit = | ArrayBuffer | AsyncIterable<Uint8Array> | Blob | FormData | Iterable<Uint8Array> | NodeJS.ArrayBufferView | URLSearchParams | null | string export class BodyMixin { readonly body: ReadableStream | null readonly bodyUsed: boolean readonly arrayBuffer: () => Promise<ArrayBuffer> readonly blob: () => Promise<Blob> /** * @deprecated This method is not recommended for parsing multipart/form-data bodies in server environments. * It is recommended to use a library such as [@fastify/busboy](https://www.npmjs.com/package/@fastify/busboy) as follows: * * @example * ```js * import { Busboy } from '@fastify/busboy' * import { Readable } from 'node:stream' * * const response = await fetch('...') * const busboy = new Busboy({ headers: { 'content-type': response.headers.get('content-type') } }) * * // handle events emitted from `busboy` * * Readable.fromWeb(response.body).pipe(busboy) * ``` */ readonly formData: () => Promise<FormData> readonly json: () => Promise<unknown> readonly text: () => Promise<string> } export interface SpecIterator<T, TReturn = any, TNext = undefined> { next(...args: [] | [TNext]): IteratorResult<T, TReturn>; } export interface SpecIterableIterator<T> extends SpecIterator<T> { [Symbol.iterator](): SpecIterableIterator<T>; } export interface SpecIterable<T> { [Symbol.iterator](): SpecIterator<T>; } export type HeadersInit = string[][] | Record<string, string | ReadonlyArray<string>> | Headers export declare class Headers implements SpecIterable<[string, string]> { constructor (init?: HeadersInit) readonly append: (name: string, value: string) => void readonly delete: (name: string) => void readonly get: (name: string) => string | null readonly has: (name: string) => boolean readonly set: (name: string, value: string) => void readonly getSetCookie: () => string[] readonly forEach: ( callbackfn: (value: string, key: string, iterable: Headers) => void, thisArg?: unknown ) => void readonly keys: () => SpecIterableIterator<string> readonly values: () => SpecIterableIterator<string> readonly entries: () => SpecIterableIterator<[string, string]> readonly [Symbol.iterator]: () => SpecIterableIterator<[string, string]> } export type RequestCache = | 'default' | 'force-cache' | 'no-cache' | 'no-store' | 'only-if-cached' | 'reload' export type RequestCredentials = 'omit' | 'include' | 'same-origin' type RequestDestination = | '' | 'audio' | 'audioworklet' | 'document' | 'embed' | 'font' | 'image' | 'manifest' | 'object' | 'paintworklet' | 'report' | 'script' | 'sharedworker' | 'style' | 'track' | 'video' | 'worker' | 'xslt' export interface RequestInit { method?: string keepalive?: boolean headers?: HeadersInit body?: BodyInit | null redirect?: RequestRedirect integrity?: string signal?: AbortSignal | null credentials?: RequestCredentials mode?: RequestMode referrer?: string referrerPolicy?: ReferrerPolicy window?: null dispatcher?: Dispatcher duplex?: RequestDuplex } export type ReferrerPolicy = | '' | 'no-referrer' | 'no-referrer-when-downgrade' | 'origin' | 'origin-when-cross-origin' | 'same-origin' | 'strict-origin' | 'strict-origin-when-cross-origin' | 'unsafe-url'; export type RequestMode = 'cors' | 'navigate' | 'no-cors' | 'same-origin' export type RequestRedirect = 'error' | 'follow' | 'manual' export type RequestDuplex = 'half' export declare class Request extends BodyMixin { constructor (input: RequestInfo, init?: RequestInit) readonly cache: RequestCache readonly credentials: RequestCredentials readonly destination: RequestDestination readonly headers: Headers readonly integrity: string readonly method: string readonly mode: RequestMode readonly redirect: RequestRedirect readonly referrer: string readonly referrerPolicy: ReferrerPolicy readonly url: string readonly keepalive: boolean readonly signal: AbortSignal readonly duplex: RequestDuplex readonly clone: () => Request } export interface ResponseInit { readonly status?: number readonly statusText?: string readonly headers?: HeadersInit } export type ResponseType = | 'basic' | 'cors' | 'default' | 'error' | 'opaque' | 'opaqueredirect' export type ResponseRedirectStatus = 301 | 302 | 303 | 307 | 308 export declare class Response extends BodyMixin { constructor (body?: BodyInit, init?: ResponseInit) readonly headers: Headers readonly ok: boolean readonly status: number readonly statusText: string readonly type: ResponseType readonly url: string readonly redirected: boolean readonly clone: () => Response static error (): Response static json(data: any, init?: ResponseInit): Response static redirect (url: string | URL, status: ResponseRedirectStatus): Response } node_modules/undici/types/websocket.d.ts 0000664 00000007400 15114741631 0014426 0 ustar 00 /// <reference types="node" /> import type { Blob } from 'buffer' import type { MessagePort } from 'worker_threads' import { EventInit, EventListenerOptions, AddEventListenerOptions, EventListenerOrEventListenerObject } from './patch' import Dispatcher from './dispatcher' import { HeadersInit } from './fetch' export type BinaryType = 'blob' | 'arraybuffer' interface WebSocketEventMap { close: CloseEvent error: ErrorEvent message: MessageEvent open: Event } interface WebSocket extends EventTarget { binaryType: BinaryType readonly bufferedAmount: number readonly extensions: string onclose: ((this: WebSocket, ev: WebSocketEventMap['close']) => any) | null onerror: ((this: WebSocket, ev: WebSocketEventMap['error']) => any) | null onmessage: ((this: WebSocket, ev: WebSocketEventMap['message']) => any) | null onopen: ((this: WebSocket, ev: WebSocketEventMap['open']) => any) | null readonly protocol: string readonly readyState: number readonly url: string close(code?: number, reason?: string): void send(data: string | ArrayBufferLike | Blob | ArrayBufferView): void readonly CLOSED: number readonly CLOSING: number readonly CONNECTING: number readonly OPEN: number addEventListener<K extends keyof WebSocketEventMap>( type: K, listener: (this: WebSocket, ev: WebSocketEventMap[K]) => any, options?: boolean | AddEventListenerOptions ): void addEventListener( type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions ): void removeEventListener<K extends keyof WebSocketEventMap>( type: K, listener: (this: WebSocket, ev: WebSocketEventMap[K]) => any, options?: boolean | EventListenerOptions ): void removeEventListener( type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions ): void } export declare const WebSocket: { prototype: WebSocket new (url: string | URL, protocols?: string | string[] | WebSocketInit): WebSocket readonly CLOSED: number readonly CLOSING: number readonly CONNECTING: number readonly OPEN: number } interface CloseEventInit extends EventInit { code?: number reason?: string wasClean?: boolean } interface CloseEvent extends Event { readonly code: number readonly reason: string readonly wasClean: boolean } export declare const CloseEvent: { prototype: CloseEvent new (type: string, eventInitDict?: CloseEventInit): CloseEvent } interface MessageEventInit<T = any> extends EventInit { data?: T lastEventId?: string origin?: string ports?: (typeof MessagePort)[] source?: typeof MessagePort | null } interface MessageEvent<T = any> extends Event { readonly data: T readonly lastEventId: string readonly origin: string readonly ports: ReadonlyArray<typeof MessagePort> readonly source: typeof MessagePort | null initMessageEvent( type: string, bubbles?: boolean, cancelable?: boolean, data?: any, origin?: string, lastEventId?: string, source?: typeof MessagePort | null, ports?: (typeof MessagePort)[] ): void; } export declare const MessageEvent: { prototype: MessageEvent new<T>(type: string, eventInitDict?: MessageEventInit<T>): MessageEvent<T> } interface ErrorEventInit extends EventInit { message?: string filename?: string lineno?: number colno?: number error?: any } interface ErrorEvent extends Event { readonly message: string readonly filename: string readonly lineno: number readonly colno: number readonly error: any } export declare const ErrorEvent: { prototype: ErrorEvent new (type: string, eventInitDict?: ErrorEventInit): ErrorEvent } interface WebSocketInit { protocols?: string | string[], dispatcher?: Dispatcher, headers?: HeadersInit } node_modules/undici/types/mock-interceptor.d.ts 0000664 00000007476 15114741631 0015742 0 ustar 00 import { IncomingHttpHeaders } from './header' import Dispatcher from './dispatcher'; import { BodyInit, Headers } from './fetch' export { Interceptable, MockInterceptor, MockScope } /** The scope associated with a mock dispatch. */ declare class MockScope<TData extends object = object> { constructor(mockDispatch: MockInterceptor.MockDispatch<TData>); /** Delay a reply by a set amount of time in ms. */ delay(waitInMs: number): MockScope<TData>; /** Persist the defined mock data for the associated reply. It will return the defined mock data indefinitely. */ persist(): MockScope<TData>; /** Define a reply for a set amount of matching requests. */ times(repeatTimes: number): MockScope<TData>; } /** The interceptor for a Mock. */ declare class MockInterceptor { constructor(options: MockInterceptor.Options, mockDispatches: MockInterceptor.MockDispatch[]); /** Mock an undici request with the defined reply. */ reply<TData extends object = object>(replyOptionsCallback: MockInterceptor.MockReplyOptionsCallback<TData>): MockScope<TData>; reply<TData extends object = object>( statusCode: number, data?: TData | Buffer | string | MockInterceptor.MockResponseDataHandler<TData>, responseOptions?: MockInterceptor.MockResponseOptions ): MockScope<TData>; /** Mock an undici request by throwing the defined reply error. */ replyWithError<TError extends Error = Error>(error: TError): MockScope; /** Set default reply headers on the interceptor for subsequent mocked replies. */ defaultReplyHeaders(headers: IncomingHttpHeaders): MockInterceptor; /** Set default reply trailers on the interceptor for subsequent mocked replies. */ defaultReplyTrailers(trailers: Record<string, string>): MockInterceptor; /** Set automatically calculated content-length header on subsequent mocked replies. */ replyContentLength(): MockInterceptor; } declare namespace MockInterceptor { /** MockInterceptor options. */ export interface Options { /** Path to intercept on. */ path: string | RegExp | ((path: string) => boolean); /** Method to intercept on. Defaults to GET. */ method?: string | RegExp | ((method: string) => boolean); /** Body to intercept on. */ body?: string | RegExp | ((body: string) => boolean); /** Headers to intercept on. */ headers?: Record<string, string | RegExp | ((body: string) => boolean)> | ((headers: Record<string, string>) => boolean); /** Query params to intercept on */ query?: Record<string, any>; } export interface MockDispatch<TData extends object = object, TError extends Error = Error> extends Options { times: number | null; persist: boolean; consumed: boolean; data: MockDispatchData<TData, TError>; } export interface MockDispatchData<TData extends object = object, TError extends Error = Error> extends MockResponseOptions { error: TError | null; statusCode?: number; data?: TData | string; } export interface MockResponseOptions { headers?: IncomingHttpHeaders; trailers?: Record<string, string>; } export interface MockResponseCallbackOptions { path: string; method: string; headers?: Headers | Record<string, string>; origin?: string; body?: BodyInit | Dispatcher.DispatchOptions['body'] | null; maxRedirections?: number; } export type MockResponseDataHandler<TData extends object = object> = ( opts: MockResponseCallbackOptions ) => TData | Buffer | string; export type MockReplyOptionsCallback<TData extends object = object> = ( opts: MockResponseCallbackOptions ) => { statusCode: number, data?: TData | Buffer | string, responseOptions?: MockResponseOptions } } interface Interceptable extends Dispatcher { /** Intercepts any matching requests that use the same origin as this mock client. */ intercept(options: MockInterceptor.Options): MockInterceptor; } node_modules/undici/types/api.d.ts 0000664 00000002657 15114741631 0013222 0 ustar 00 import { URL, UrlObject } from 'url' import { Duplex } from 'stream' import Dispatcher from './dispatcher' export { request, stream, pipeline, connect, upgrade, } /** Performs an HTTP request. */ declare function request( url: string | URL | UrlObject, options?: { dispatcher?: Dispatcher } & Omit<Dispatcher.RequestOptions, 'origin' | 'path' | 'method'> & Partial<Pick<Dispatcher.RequestOptions, 'method'>>, ): Promise<Dispatcher.ResponseData>; /** A faster version of `request`. */ declare function stream( url: string | URL | UrlObject, options: { dispatcher?: Dispatcher } & Omit<Dispatcher.RequestOptions, 'origin' | 'path'>, factory: Dispatcher.StreamFactory ): Promise<Dispatcher.StreamData>; /** For easy use with `stream.pipeline`. */ declare function pipeline( url: string | URL | UrlObject, options: { dispatcher?: Dispatcher } & Omit<Dispatcher.PipelineOptions, 'origin' | 'path'>, handler: Dispatcher.PipelineHandler ): Duplex; /** Starts two-way communications with the requested resource. */ declare function connect( url: string | URL | UrlObject, options?: { dispatcher?: Dispatcher } & Omit<Dispatcher.ConnectOptions, 'origin' | 'path'> ): Promise<Dispatcher.ConnectData>; /** Upgrade to a different protocol. */ declare function upgrade( url: string | URL | UrlObject, options?: { dispatcher?: Dispatcher } & Omit<Dispatcher.UpgradeOptions, 'origin' | 'path'> ): Promise<Dispatcher.UpgradeData>; node_modules/undici/types/env-http-proxy-agent.d.ts 0000664 00000001243 15114741631 0016457 0 ustar 00 import Agent from './agent' import Dispatcher from './dispatcher' export default EnvHttpProxyAgent declare class EnvHttpProxyAgent extends Dispatcher { constructor(opts?: EnvHttpProxyAgent.Options) dispatch(options: Agent.DispatchOptions, handler: Dispatcher.DispatchHandlers): boolean; } declare namespace EnvHttpProxyAgent { export interface Options extends Agent.Options { /** Overrides the value of the HTTP_PROXY environment variable */ httpProxy?: string; /** Overrides the value of the HTTPS_PROXY environment variable */ httpsProxy?: string; /** Overrides the value of the NO_PROXY environment variable */ noProxy?: string; } } node_modules/undici/types/header.d.ts 0000664 00000000205 15114741631 0013664 0 ustar 00 /** * The header type declaration of `undici`. */ export type IncomingHttpHeaders = Record<string, string | string[] | undefined>; node_modules/undici/types/index.d.ts 0000664 00000006473 15114741631 0013560 0 ustar 00 import Dispatcher from'./dispatcher' import { setGlobalDispatcher, getGlobalDispatcher } from './global-dispatcher' import { setGlobalOrigin, getGlobalOrigin } from './global-origin' import Pool from'./pool' import { RedirectHandler, DecoratorHandler } from './handlers' import BalancedPool from './balanced-pool' import Client from'./client' import buildConnector from'./connector' import errors from'./errors' import Agent from'./agent' import MockClient from'./mock-client' import MockPool from'./mock-pool' import MockAgent from'./mock-agent' import mockErrors from'./mock-errors' import ProxyAgent from'./proxy-agent' import EnvHttpProxyAgent from './env-http-proxy-agent' import RetryHandler from'./retry-handler' import RetryAgent from'./retry-agent' import { request, pipeline, stream, connect, upgrade } from './api' import interceptors from './interceptors' export * from './util' export * from './cookies' export * from './eventsource' export * from './fetch' export * from './file' export * from './filereader' export * from './formdata' export * from './diagnostics-channel' export * from './websocket' export * from './content-type' export * from './cache' export { Interceptable } from './mock-interceptor' export { Dispatcher, BalancedPool, Pool, Client, buildConnector, errors, Agent, request, stream, pipeline, connect, upgrade, setGlobalDispatcher, getGlobalDispatcher, setGlobalOrigin, getGlobalOrigin, interceptors, MockClient, MockPool, MockAgent, mockErrors, ProxyAgent, EnvHttpProxyAgent, RedirectHandler, DecoratorHandler, RetryHandler, RetryAgent } export default Undici declare namespace Undici { var Dispatcher: typeof import('./dispatcher').default var Pool: typeof import('./pool').default; var RedirectHandler: typeof import ('./handlers').RedirectHandler var DecoratorHandler: typeof import ('./handlers').DecoratorHandler var RetryHandler: typeof import ('./retry-handler').default var createRedirectInterceptor: typeof import ('./interceptors').default.createRedirectInterceptor var BalancedPool: typeof import('./balanced-pool').default; var Client: typeof import('./client').default; var buildConnector: typeof import('./connector').default; var errors: typeof import('./errors').default; var Agent: typeof import('./agent').default; var setGlobalDispatcher: typeof import('./global-dispatcher').setGlobalDispatcher; var getGlobalDispatcher: typeof import('./global-dispatcher').getGlobalDispatcher; var request: typeof import('./api').request; var stream: typeof import('./api').stream; var pipeline: typeof import('./api').pipeline; var connect: typeof import('./api').connect; var upgrade: typeof import('./api').upgrade; var MockClient: typeof import('./mock-client').default; var MockPool: typeof import('./mock-pool').default; var MockAgent: typeof import('./mock-agent').default; var mockErrors: typeof import('./mock-errors').default; var fetch: typeof import('./fetch').fetch; var Headers: typeof import('./fetch').Headers; var Response: typeof import('./fetch').Response; var Request: typeof import('./fetch').Request; var FormData: typeof import('./formdata').FormData; var File: typeof import('./file').File; var FileReader: typeof import('./filereader').FileReader; var caches: typeof import('./cache').caches; var interceptors: typeof import('./interceptors').default; } node_modules/undici/types/retry-handler.d.ts 0000664 00000005635 15114741631 0015230 0 ustar 00 import Dispatcher from "./dispatcher"; export default RetryHandler; declare class RetryHandler implements Dispatcher.DispatchHandlers { constructor( options: Dispatcher.DispatchOptions & { retryOptions?: RetryHandler.RetryOptions; }, retryHandlers: RetryHandler.RetryHandlers ); } declare namespace RetryHandler { export type RetryState = { counter: number; }; export type RetryContext = { state: RetryState; opts: Dispatcher.DispatchOptions & { retryOptions?: RetryHandler.RetryOptions; }; } export type OnRetryCallback = (result?: Error | null) => void; export type RetryCallback = ( err: Error, context: { state: RetryState; opts: Dispatcher.DispatchOptions & { retryOptions?: RetryHandler.RetryOptions; }; }, callback: OnRetryCallback ) => void export interface RetryOptions { /** * Callback to be invoked on every retry iteration. * It receives the error, current state of the retry object and the options object * passed when instantiating the retry handler. * * @type {RetryCallback} * @memberof RetryOptions */ retry?: RetryCallback; /** * Maximum number of retries to allow. * * @type {number} * @memberof RetryOptions * @default 5 */ maxRetries?: number; /** * Max number of milliseconds allow between retries * * @type {number} * @memberof RetryOptions * @default 30000 */ maxTimeout?: number; /** * Initial number of milliseconds to wait before retrying for the first time. * * @type {number} * @memberof RetryOptions * @default 500 */ minTimeout?: number; /** * Factior to multiply the timeout factor between retries. * * @type {number} * @memberof RetryOptions * @default 2 */ timeoutFactor?: number; /** * It enables to automatically infer timeout between retries based on the `Retry-After` header. * * @type {boolean} * @memberof RetryOptions * @default true */ retryAfter?: boolean; /** * HTTP methods to retry. * * @type {Dispatcher.HttpMethod[]} * @memberof RetryOptions * @default ['GET', 'HEAD', 'OPTIONS', 'PUT', 'DELETE', 'TRACE'], */ methods?: Dispatcher.HttpMethod[]; /** * Error codes to be retried. e.g. `ECONNRESET`, `ENOTFOUND`, `ETIMEDOUT`, `ECONNREFUSED`, etc. * * @type {string[]} * @default ['ECONNRESET','ECONNREFUSED','ENOTFOUND','ENETDOWN','ENETUNREACH','EHOSTDOWN','EHOSTUNREACH','EPIPE'] */ errorCodes?: string[]; /** * HTTP status codes to be retried. * * @type {number[]} * @memberof RetryOptions * @default [500, 502, 503, 504, 429], */ statusCodes?: number[]; } export interface RetryHandlers { dispatch: Dispatcher["dispatch"]; handler: Dispatcher.DispatchHandlers; } } node_modules/undici/types/diagnostics-channel.d.ts 0000664 00000003053 15114741631 0016355 0 ustar 00 import { Socket } from "net"; import { URL } from "url"; import Connector from "./connector"; import Dispatcher from "./dispatcher"; declare namespace DiagnosticsChannel { interface Request { origin?: string | URL; completed: boolean; method?: Dispatcher.HttpMethod; path: string; headers: any; } interface Response { statusCode: number; statusText: string; headers: Array<Buffer>; } type Error = unknown; interface ConnectParams { host: URL["host"]; hostname: URL["hostname"]; protocol: URL["protocol"]; port: URL["port"]; servername: string | null; } type Connector = Connector.connector; export interface RequestCreateMessage { request: Request; } export interface RequestBodySentMessage { request: Request; } export interface RequestHeadersMessage { request: Request; response: Response; } export interface RequestTrailersMessage { request: Request; trailers: Array<Buffer>; } export interface RequestErrorMessage { request: Request; error: Error; } export interface ClientSendHeadersMessage { request: Request; headers: string; socket: Socket; } export interface ClientBeforeConnectMessage { connectParams: ConnectParams; connector: Connector; } export interface ClientConnectedMessage { socket: Socket; connectParams: ConnectParams; connector: Connector; } export interface ClientConnectErrorMessage { error: Error; socket: Socket; connectParams: ConnectParams; connector: Connector; } } node_modules/undici/types/pool.d.ts 0000664 00000002470 15114741631 0013413 0 ustar 00 import Client from './client' import TPoolStats from './pool-stats' import { URL } from 'url' import Dispatcher from "./dispatcher"; export default Pool type PoolConnectOptions = Omit<Dispatcher.ConnectOptions, "origin">; declare class Pool extends Dispatcher { constructor(url: string | URL, options?: Pool.Options) /** `true` after `pool.close()` has been called. */ closed: boolean; /** `true` after `pool.destroyed()` has been called or `pool.close()` has been called and the pool shutdown has completed. */ destroyed: boolean; /** Aggregate stats for a Pool. */ readonly stats: TPoolStats; // Override dispatcher APIs. override connect( options: PoolConnectOptions ): Promise<Dispatcher.ConnectData>; override connect( options: PoolConnectOptions, callback: (err: Error | null, data: Dispatcher.ConnectData) => void ): void; } declare namespace Pool { export type PoolStats = TPoolStats; export interface Options extends Client.Options { /** Default: `(origin, opts) => new Client(origin, opts)`. */ factory?(origin: URL, opts: object): Dispatcher; /** The max number of clients to create. `null` if no limit. Default `null`. */ connections?: number | null; interceptors?: { Pool?: readonly Dispatcher.DispatchInterceptor[] } & Client.Options["interceptors"] } } node_modules/undici/types/mock-client.d.ts 0000664 00000001752 15114741631 0014651 0 ustar 00 import Client from './client' import Dispatcher from './dispatcher' import MockAgent from './mock-agent' import { MockInterceptor, Interceptable } from './mock-interceptor' export default MockClient /** MockClient extends the Client API and allows one to mock requests. */ declare class MockClient extends Client implements Interceptable { constructor(origin: string, options: MockClient.Options); /** Intercepts any matching requests that use the same origin as this mock client. */ intercept(options: MockInterceptor.Options): MockInterceptor; /** Dispatches a mocked request. */ dispatch(options: Dispatcher.DispatchOptions, handlers: Dispatcher.DispatchHandlers): boolean; /** Closes the mock client and gracefully waits for enqueued requests to complete. */ close(): Promise<void>; } declare namespace MockClient { /** MockClient options. */ export interface Options extends Client.Options { /** The agent to associate this MockClient with. */ agent: MockAgent; } } node_modules/undici/types/dispatcher.d.ts 0000664 00000033616 15114741631 0014576 0 ustar 00 import { URL } from 'url' import { Duplex, Readable, Writable } from 'stream' import { EventEmitter } from 'events' import { Blob } from 'buffer' import { IncomingHttpHeaders } from './header' import BodyReadable from './readable' import { FormData } from './formdata' import Errors from './errors' type AbortSignal = unknown; export default Dispatcher /** Dispatcher is the core API used to dispatch requests. */ declare class Dispatcher extends EventEmitter { /** Dispatches a request. This API is expected to evolve through semver-major versions and is less stable than the preceding higher level APIs. It is primarily intended for library developers who implement higher level APIs on top of this. */ dispatch(options: Dispatcher.DispatchOptions, handler: Dispatcher.DispatchHandlers): boolean; /** Starts two-way communications with the requested resource. */ connect(options: Dispatcher.ConnectOptions): Promise<Dispatcher.ConnectData>; connect(options: Dispatcher.ConnectOptions, callback: (err: Error | null, data: Dispatcher.ConnectData) => void): void; /** Compose a chain of dispatchers */ compose(dispatchers: Dispatcher.DispatcherComposeInterceptor[]): Dispatcher.ComposedDispatcher; compose(...dispatchers: Dispatcher.DispatcherComposeInterceptor[]): Dispatcher.ComposedDispatcher; /** Performs an HTTP request. */ request(options: Dispatcher.RequestOptions): Promise<Dispatcher.ResponseData>; request(options: Dispatcher.RequestOptions, callback: (err: Error | null, data: Dispatcher.ResponseData) => void): void; /** For easy use with `stream.pipeline`. */ pipeline(options: Dispatcher.PipelineOptions, handler: Dispatcher.PipelineHandler): Duplex; /** A faster version of `Dispatcher.request`. */ stream(options: Dispatcher.RequestOptions, factory: Dispatcher.StreamFactory): Promise<Dispatcher.StreamData>; stream(options: Dispatcher.RequestOptions, factory: Dispatcher.StreamFactory, callback: (err: Error | null, data: Dispatcher.StreamData) => void): void; /** Upgrade to a different protocol. */ upgrade(options: Dispatcher.UpgradeOptions): Promise<Dispatcher.UpgradeData>; upgrade(options: Dispatcher.UpgradeOptions, callback: (err: Error | null, data: Dispatcher.UpgradeData) => void): void; /** Closes the client and gracefully waits for enqueued requests to complete before invoking the callback (or returning a promise if no callback is provided). */ close(): Promise<void>; close(callback: () => void): void; /** Destroy the client abruptly with the given err. All the pending and running requests will be asynchronously aborted and error. Waits until socket is closed before invoking the callback (or returning a promise if no callback is provided). Since this operation is asynchronously dispatched there might still be some progress on dispatched requests. */ destroy(): Promise<void>; destroy(err: Error | null): Promise<void>; destroy(callback: () => void): void; destroy(err: Error | null, callback: () => void): void; on(eventName: 'connect', callback: (origin: URL, targets: readonly Dispatcher[]) => void): this; on(eventName: 'disconnect', callback: (origin: URL, targets: readonly Dispatcher[], error: Errors.UndiciError) => void): this; on(eventName: 'connectionError', callback: (origin: URL, targets: readonly Dispatcher[], error: Errors.UndiciError) => void): this; on(eventName: 'drain', callback: (origin: URL) => void): this; once(eventName: 'connect', callback: (origin: URL, targets: readonly Dispatcher[]) => void): this; once(eventName: 'disconnect', callback: (origin: URL, targets: readonly Dispatcher[], error: Errors.UndiciError) => void): this; once(eventName: 'connectionError', callback: (origin: URL, targets: readonly Dispatcher[], error: Errors.UndiciError) => void): this; once(eventName: 'drain', callback: (origin: URL) => void): this; off(eventName: 'connect', callback: (origin: URL, targets: readonly Dispatcher[]) => void): this; off(eventName: 'disconnect', callback: (origin: URL, targets: readonly Dispatcher[], error: Errors.UndiciError) => void): this; off(eventName: 'connectionError', callback: (origin: URL, targets: readonly Dispatcher[], error: Errors.UndiciError) => void): this; off(eventName: 'drain', callback: (origin: URL) => void): this; addListener(eventName: 'connect', callback: (origin: URL, targets: readonly Dispatcher[]) => void): this; addListener(eventName: 'disconnect', callback: (origin: URL, targets: readonly Dispatcher[], error: Errors.UndiciError) => void): this; addListener(eventName: 'connectionError', callback: (origin: URL, targets: readonly Dispatcher[], error: Errors.UndiciError) => void): this; addListener(eventName: 'drain', callback: (origin: URL) => void): this; removeListener(eventName: 'connect', callback: (origin: URL, targets: readonly Dispatcher[]) => void): this; removeListener(eventName: 'disconnect', callback: (origin: URL, targets: readonly Dispatcher[], error: Errors.UndiciError) => void): this; removeListener(eventName: 'connectionError', callback: (origin: URL, targets: readonly Dispatcher[], error: Errors.UndiciError) => void): this; removeListener(eventName: 'drain', callback: (origin: URL) => void): this; prependListener(eventName: 'connect', callback: (origin: URL, targets: readonly Dispatcher[]) => void): this; prependListener(eventName: 'disconnect', callback: (origin: URL, targets: readonly Dispatcher[], error: Errors.UndiciError) => void): this; prependListener(eventName: 'connectionError', callback: (origin: URL, targets: readonly Dispatcher[], error: Errors.UndiciError) => void): this; prependListener(eventName: 'drain', callback: (origin: URL) => void): this; prependOnceListener(eventName: 'connect', callback: (origin: URL, targets: readonly Dispatcher[]) => void): this; prependOnceListener(eventName: 'disconnect', callback: (origin: URL, targets: readonly Dispatcher[], error: Errors.UndiciError) => void): this; prependOnceListener(eventName: 'connectionError', callback: (origin: URL, targets: readonly Dispatcher[], error: Errors.UndiciError) => void): this; prependOnceListener(eventName: 'drain', callback: (origin: URL) => void): this; listeners(eventName: 'connect'): ((origin: URL, targets: readonly Dispatcher[]) => void)[] listeners(eventName: 'disconnect'): ((origin: URL, targets: readonly Dispatcher[], error: Errors.UndiciError) => void)[]; listeners(eventName: 'connectionError'): ((origin: URL, targets: readonly Dispatcher[], error: Errors.UndiciError) => void)[]; listeners(eventName: 'drain'): ((origin: URL) => void)[]; rawListeners(eventName: 'connect'): ((origin: URL, targets: readonly Dispatcher[]) => void)[] rawListeners(eventName: 'disconnect'): ((origin: URL, targets: readonly Dispatcher[], error: Errors.UndiciError) => void)[]; rawListeners(eventName: 'connectionError'): ((origin: URL, targets: readonly Dispatcher[], error: Errors.UndiciError) => void)[]; rawListeners(eventName: 'drain'): ((origin: URL) => void)[]; emit(eventName: 'connect', origin: URL, targets: readonly Dispatcher[]): boolean; emit(eventName: 'disconnect', origin: URL, targets: readonly Dispatcher[], error: Errors.UndiciError): boolean; emit(eventName: 'connectionError', origin: URL, targets: readonly Dispatcher[], error: Errors.UndiciError): boolean; emit(eventName: 'drain', origin: URL): boolean; } declare namespace Dispatcher { export interface ComposedDispatcher extends Dispatcher {} export type DispatcherComposeInterceptor = (dispatch: Dispatcher['dispatch']) => Dispatcher['dispatch']; export interface DispatchOptions { origin?: string | URL; path: string; method: HttpMethod; /** Default: `null` */ body?: string | Buffer | Uint8Array | Readable | null | FormData; /** Default: `null` */ headers?: IncomingHttpHeaders | string[] | Iterable<[string, string | string[] | undefined]> | null; /** Query string params to be embedded in the request URL. Default: `null` */ query?: Record<string, any>; /** Whether the requests can be safely retried or not. If `false` the request won't be sent until all preceding requests in the pipeline have completed. Default: `true` if `method` is `HEAD` or `GET`. */ idempotent?: boolean; /** Whether the response is expected to take a long time and would end up blocking the pipeline. When this is set to `true` further pipelining will be avoided on the same connection until headers have been received. */ blocking?: boolean; /** Upgrade the request. Should be used to specify the kind of upgrade i.e. `'Websocket'`. Default: `method === 'CONNECT' || null`. */ upgrade?: boolean | string | null; /** The amount of time, in milliseconds, the parser will wait to receive the complete HTTP headers. Defaults to 300 seconds. */ headersTimeout?: number | null; /** The timeout after which a request will time out, in milliseconds. Monitors time between receiving body data. Use 0 to disable it entirely. Defaults to 300 seconds. */ bodyTimeout?: number | null; /** Whether the request should stablish a keep-alive or not. Default `false` */ reset?: boolean; /** Whether Undici should throw an error upon receiving a 4xx or 5xx response from the server. Defaults to false */ throwOnError?: boolean; /** For H2, it appends the expect: 100-continue header, and halts the request body until a 100-continue is received from the remote server*/ expectContinue?: boolean; } export interface ConnectOptions { origin: string | URL; path: string; /** Default: `null` */ headers?: IncomingHttpHeaders | string[] | null; /** Default: `null` */ signal?: AbortSignal | EventEmitter | null; /** This argument parameter is passed through to `ConnectData` */ opaque?: unknown; /** Default: 0 */ maxRedirections?: number; /** Default: false */ redirectionLimitReached?: boolean; /** Default: `null` */ responseHeader?: 'raw' | null; } export interface RequestOptions extends DispatchOptions { /** Default: `null` */ opaque?: unknown; /** Default: `null` */ signal?: AbortSignal | EventEmitter | null; /** Default: 0 */ maxRedirections?: number; /** Default: false */ redirectionLimitReached?: boolean; /** Default: `null` */ onInfo?: (info: { statusCode: number, headers: Record<string, string | string[]> }) => void; /** Default: `null` */ responseHeader?: 'raw' | null; /** Default: `64 KiB` */ highWaterMark?: number; } export interface PipelineOptions extends RequestOptions { /** `true` if the `handler` will return an object stream. Default: `false` */ objectMode?: boolean; } export interface UpgradeOptions { path: string; /** Default: `'GET'` */ method?: string; /** Default: `null` */ headers?: IncomingHttpHeaders | string[] | null; /** A string of comma separated protocols, in descending preference order. Default: `'Websocket'` */ protocol?: string; /** Default: `null` */ signal?: AbortSignal | EventEmitter | null; /** Default: 0 */ maxRedirections?: number; /** Default: false */ redirectionLimitReached?: boolean; /** Default: `null` */ responseHeader?: 'raw' | null; } export interface ConnectData { statusCode: number; headers: IncomingHttpHeaders; socket: Duplex; opaque: unknown; } export interface ResponseData { statusCode: number; headers: IncomingHttpHeaders; body: BodyReadable & BodyMixin; trailers: Record<string, string>; opaque: unknown; context: object; } export interface PipelineHandlerData { statusCode: number; headers: IncomingHttpHeaders; opaque: unknown; body: BodyReadable; context: object; } export interface StreamData { opaque: unknown; trailers: Record<string, string>; } export interface UpgradeData { headers: IncomingHttpHeaders; socket: Duplex; opaque: unknown; } export interface StreamFactoryData { statusCode: number; headers: IncomingHttpHeaders; opaque: unknown; context: object; } export type StreamFactory = (data: StreamFactoryData) => Writable; export interface DispatchHandlers { /** Invoked before request is dispatched on socket. May be invoked multiple times when a request is retried when the request at the head of the pipeline fails. */ onConnect?(abort: (err?: Error) => void): void; /** Invoked when an error has occurred. */ onError?(err: Error): void; /** Invoked when request is upgraded either due to a `Upgrade` header or `CONNECT` method. */ onUpgrade?(statusCode: number, headers: Buffer[] | string[] | null, socket: Duplex): void; /** Invoked when response is received, before headers have been read. **/ onResponseStarted?(): void; /** Invoked when statusCode and headers have been received. May be invoked multiple times due to 1xx informational headers. */ onHeaders?(statusCode: number, headers: Buffer[], resume: () => void, statusText: string): boolean; /** Invoked when response payload data is received. */ onData?(chunk: Buffer): boolean; /** Invoked when response payload and trailers have been received and the request has completed. */ onComplete?(trailers: string[] | null): void; /** Invoked when a body chunk is sent to the server. May be invoked multiple times for chunked requests */ onBodySent?(chunkSize: number, totalBytesSent: number): void; } export type PipelineHandler = (data: PipelineHandlerData) => Readable; export type HttpMethod = 'GET' | 'HEAD' | 'POST' | 'PUT' | 'DELETE' | 'CONNECT' | 'OPTIONS' | 'TRACE' | 'PATCH'; /** * @link https://fetch.spec.whatwg.org/#body-mixin */ interface BodyMixin { readonly body?: never; readonly bodyUsed: boolean; arrayBuffer(): Promise<ArrayBuffer>; blob(): Promise<Blob>; bytes(): Promise<Uint8Array>; formData(): Promise<never>; json(): Promise<unknown>; text(): Promise<string>; } export interface DispatchInterceptor { (dispatch: Dispatcher['dispatch']): Dispatcher['dispatch'] } } node_modules/undici/types/errors.d.ts 0000664 00000010270 15114741631 0013753 0 ustar 00 import { IncomingHttpHeaders } from "./header"; import Client from './client' export default Errors declare namespace Errors { export class UndiciError extends Error { name: string; code: string; } /** Connect timeout error. */ export class ConnectTimeoutError extends UndiciError { name: 'ConnectTimeoutError'; code: 'UND_ERR_CONNECT_TIMEOUT'; } /** A header exceeds the `headersTimeout` option. */ export class HeadersTimeoutError extends UndiciError { name: 'HeadersTimeoutError'; code: 'UND_ERR_HEADERS_TIMEOUT'; } /** Headers overflow error. */ export class HeadersOverflowError extends UndiciError { name: 'HeadersOverflowError' code: 'UND_ERR_HEADERS_OVERFLOW' } /** A body exceeds the `bodyTimeout` option. */ export class BodyTimeoutError extends UndiciError { name: 'BodyTimeoutError'; code: 'UND_ERR_BODY_TIMEOUT'; } export class ResponseStatusCodeError extends UndiciError { constructor ( message?: string, statusCode?: number, headers?: IncomingHttpHeaders | string[] | null, body?: null | Record<string, any> | string ); name: 'ResponseStatusCodeError'; code: 'UND_ERR_RESPONSE_STATUS_CODE'; body: null | Record<string, any> | string status: number statusCode: number headers: IncomingHttpHeaders | string[] | null; } /** Passed an invalid argument. */ export class InvalidArgumentError extends UndiciError { name: 'InvalidArgumentError'; code: 'UND_ERR_INVALID_ARG'; } /** Returned an invalid value. */ export class InvalidReturnValueError extends UndiciError { name: 'InvalidReturnValueError'; code: 'UND_ERR_INVALID_RETURN_VALUE'; } /** The request has been aborted by the user. */ export class RequestAbortedError extends UndiciError { name: 'AbortError'; code: 'UND_ERR_ABORTED'; } /** Expected error with reason. */ export class InformationalError extends UndiciError { name: 'InformationalError'; code: 'UND_ERR_INFO'; } /** Request body length does not match content-length header. */ export class RequestContentLengthMismatchError extends UndiciError { name: 'RequestContentLengthMismatchError'; code: 'UND_ERR_REQ_CONTENT_LENGTH_MISMATCH'; } /** Response body length does not match content-length header. */ export class ResponseContentLengthMismatchError extends UndiciError { name: 'ResponseContentLengthMismatchError'; code: 'UND_ERR_RES_CONTENT_LENGTH_MISMATCH'; } /** Trying to use a destroyed client. */ export class ClientDestroyedError extends UndiciError { name: 'ClientDestroyedError'; code: 'UND_ERR_DESTROYED'; } /** Trying to use a closed client. */ export class ClientClosedError extends UndiciError { name: 'ClientClosedError'; code: 'UND_ERR_CLOSED'; } /** There is an error with the socket. */ export class SocketError extends UndiciError { name: 'SocketError'; code: 'UND_ERR_SOCKET'; socket: Client.SocketInfo | null } /** Encountered unsupported functionality. */ export class NotSupportedError extends UndiciError { name: 'NotSupportedError'; code: 'UND_ERR_NOT_SUPPORTED'; } /** No upstream has been added to the BalancedPool. */ export class BalancedPoolMissingUpstreamError extends UndiciError { name: 'MissingUpstreamError'; code: 'UND_ERR_BPL_MISSING_UPSTREAM'; } export class HTTPParserError extends UndiciError { name: 'HTTPParserError'; code: string; } /** The response exceed the length allowed. */ export class ResponseExceededMaxSizeError extends UndiciError { name: 'ResponseExceededMaxSizeError'; code: 'UND_ERR_RES_EXCEEDED_MAX_SIZE'; } export class RequestRetryError extends UndiciError { constructor ( message: string, statusCode: number, headers?: IncomingHttpHeaders | string[] | null, body?: null | Record<string, any> | string ); name: 'RequestRetryError'; code: 'UND_ERR_REQ_RETRY'; statusCode: number; data: { count: number; }; headers: Record<string, string | string[]>; } export class SecureProxyConnectionError extends UndiciError { name: 'SecureProxyConnectionError'; code: 'UND_ERR_PRX_TLS'; } } node_modules/undici/types/file.d.ts 0000664 00000003253 15114741631 0013361 0 ustar 00 // Based on https://github.com/octet-stream/form-data/blob/2d0f0dc371517444ce1f22cdde13f51995d0953a/lib/File.ts (MIT) /// <reference types="node" /> import { Blob } from 'buffer' export interface BlobPropertyBag { type?: string endings?: 'native' | 'transparent' } export interface FilePropertyBag extends BlobPropertyBag { /** * The last modified date of the file as the number of milliseconds since the Unix epoch (January 1, 1970 at midnight). Files without a known last modified date return the current date. */ lastModified?: number } export declare class File extends Blob { /** * Creates a new File instance. * * @param fileBits An `Array` strings, or [`ArrayBuffer`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer), [`ArrayBufferView`](https://developer.mozilla.org/en-US/docs/Web/API/ArrayBufferView), [`Blob`](https://developer.mozilla.org/en-US/docs/Web/API/Blob) objects, or a mix of any of such objects, that will be put inside the [`File`](https://developer.mozilla.org/en-US/docs/Web/API/File). * @param fileName The name of the file. * @param options An options object containing optional attributes for the file. */ constructor(fileBits: ReadonlyArray<string | NodeJS.ArrayBufferView | Blob>, fileName: string, options?: FilePropertyBag) /** * Name of the file referenced by the File object. */ readonly name: string /** * The last modified date of the file as the number of milliseconds since the Unix epoch (January 1, 1970 at midnight). Files without a known last modified date return the current date. */ readonly lastModified: number readonly [Symbol.toStringTag]: string } node_modules/undici/types/filereader.d.ts 0000664 00000002631 15114741631 0014543 0 ustar 00 /// <reference types="node" /> import { Blob } from 'buffer' import { DOMException, EventInit } from './patch' export declare class FileReader { __proto__: EventTarget & FileReader constructor () readAsArrayBuffer (blob: Blob): void readAsBinaryString (blob: Blob): void readAsText (blob: Blob, encoding?: string): void readAsDataURL (blob: Blob): void abort (): void static readonly EMPTY = 0 static readonly LOADING = 1 static readonly DONE = 2 readonly EMPTY = 0 readonly LOADING = 1 readonly DONE = 2 readonly readyState: number readonly result: string | ArrayBuffer | null readonly error: DOMException | null onloadstart: null | ((this: FileReader, event: ProgressEvent) => void) onprogress: null | ((this: FileReader, event: ProgressEvent) => void) onload: null | ((this: FileReader, event: ProgressEvent) => void) onabort: null | ((this: FileReader, event: ProgressEvent) => void) onerror: null | ((this: FileReader, event: ProgressEvent) => void) onloadend: null | ((this: FileReader, event: ProgressEvent) => void) } export interface ProgressEventInit extends EventInit { lengthComputable?: boolean loaded?: number total?: number } export declare class ProgressEvent { __proto__: Event & ProgressEvent constructor (type: string, eventInitDict?: ProgressEventInit) readonly lengthComputable: boolean readonly loaded: number readonly total: number } node_modules/undici/types/readable.d.ts 0000664 00000003312 15114741631 0014175 0 ustar 00 import { Readable } from "stream"; import { Blob } from 'buffer' export default BodyReadable declare class BodyReadable extends Readable { constructor( resume?: (this: Readable, size: number) => void | null, abort?: () => void | null, contentType?: string ) /** Consumes and returns the body as a string * https://fetch.spec.whatwg.org/#dom-body-text */ text(): Promise<string> /** Consumes and returns the body as a JavaScript Object * https://fetch.spec.whatwg.org/#dom-body-json */ json(): Promise<unknown> /** Consumes and returns the body as a Blob * https://fetch.spec.whatwg.org/#dom-body-blob */ blob(): Promise<Blob> /** Consumes and returns the body as an Uint8Array * https://fetch.spec.whatwg.org/#dom-body-bytes */ bytes(): Promise<Uint8Array> /** Consumes and returns the body as an ArrayBuffer * https://fetch.spec.whatwg.org/#dom-body-arraybuffer */ arrayBuffer(): Promise<ArrayBuffer> /** Not implemented * * https://fetch.spec.whatwg.org/#dom-body-formdata */ formData(): Promise<never> /** Returns true if the body is not null and the body has been consumed * * Otherwise, returns false * * https://fetch.spec.whatwg.org/#dom-body-bodyused */ readonly bodyUsed: boolean /** * If body is null, it should return null as the body * * If body is not null, should return the body as a ReadableStream * * https://fetch.spec.whatwg.org/#dom-body-body */ readonly body: never | undefined /** Dumps the response body by reading `limit` number of bytes. * @param opts.limit Number of bytes to read (optional) - Default: 262144 */ dump(opts?: { limit: number }): Promise<void> } node_modules/undici/types/handlers.d.ts 0000664 00000000677 15114741631 0014251 0 ustar 00 import Dispatcher from "./dispatcher"; export declare class RedirectHandler implements Dispatcher.DispatchHandlers { constructor( dispatch: Dispatcher, maxRedirections: number, opts: Dispatcher.DispatchOptions, handler: Dispatcher.DispatchHandlers, redirectionLimitReached: boolean ); } export declare class DecoratorHandler implements Dispatcher.DispatchHandlers { constructor(handler: Dispatcher.DispatchHandlers); } node_modules/undici/types/mock-agent.d.ts 0000664 00000004747 15114741631 0014500 0 ustar 00 import Agent from './agent' import Dispatcher from './dispatcher' import { Interceptable, MockInterceptor } from './mock-interceptor' import MockDispatch = MockInterceptor.MockDispatch; export default MockAgent interface PendingInterceptor extends MockDispatch { origin: string; } /** A mocked Agent class that implements the Agent API. It allows one to intercept HTTP requests made through undici and return mocked responses instead. */ declare class MockAgent<TMockAgentOptions extends MockAgent.Options = MockAgent.Options> extends Dispatcher { constructor(options?: MockAgent.Options) /** Creates and retrieves mock Dispatcher instances which can then be used to intercept HTTP requests. If the number of connections on the mock agent is set to 1, a MockClient instance is returned. Otherwise a MockPool instance is returned. */ get<TInterceptable extends Interceptable>(origin: string): TInterceptable; get<TInterceptable extends Interceptable>(origin: RegExp): TInterceptable; get<TInterceptable extends Interceptable>(origin: ((origin: string) => boolean)): TInterceptable; /** Dispatches a mocked request. */ dispatch(options: Agent.DispatchOptions, handler: Dispatcher.DispatchHandlers): boolean; /** Closes the mock agent and waits for registered mock pools and clients to also close before resolving. */ close(): Promise<void>; /** Disables mocking in MockAgent. */ deactivate(): void; /** Enables mocking in a MockAgent instance. When instantiated, a MockAgent is automatically activated. Therefore, this method is only effective after `MockAgent.deactivate` has been called. */ activate(): void; /** Define host matchers so only matching requests that aren't intercepted by the mock dispatchers will be attempted. */ enableNetConnect(): void; enableNetConnect(host: string): void; enableNetConnect(host: RegExp): void; enableNetConnect(host: ((host: string) => boolean)): void; /** Causes all requests to throw when requests are not matched in a MockAgent intercept. */ disableNetConnect(): void; pendingInterceptors(): PendingInterceptor[]; assertNoPendingInterceptors(options?: { pendingInterceptorsFormatter?: PendingInterceptorsFormatter; }): void; } interface PendingInterceptorsFormatter { format(pendingInterceptors: readonly PendingInterceptor[]): string; } declare namespace MockAgent { /** MockAgent options. */ export interface Options extends Agent.Options { /** A custom agent to be encapsulated by the MockAgent. */ agent?: Agent; } } node_modules/undici/types/eventsource.d.ts 0000664 00000003160 15114741631 0015001 0 ustar 00 import { MessageEvent, ErrorEvent } from './websocket' import Dispatcher from './dispatcher' import { EventListenerOptions, AddEventListenerOptions, EventListenerOrEventListenerObject } from './patch' interface EventSourceEventMap { error: ErrorEvent message: MessageEvent open: Event } interface EventSource extends EventTarget { close(): void readonly CLOSED: 2 readonly CONNECTING: 0 readonly OPEN: 1 onerror: (this: EventSource, ev: ErrorEvent) => any onmessage: (this: EventSource, ev: MessageEvent) => any onopen: (this: EventSource, ev: Event) => any readonly readyState: 0 | 1 | 2 readonly url: string readonly withCredentials: boolean addEventListener<K extends keyof EventSourceEventMap>( type: K, listener: (this: EventSource, ev: EventSourceEventMap[K]) => any, options?: boolean | AddEventListenerOptions ): void addEventListener( type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions ): void removeEventListener<K extends keyof EventSourceEventMap>( type: K, listener: (this: EventSource, ev: EventSourceEventMap[K]) => any, options?: boolean | EventListenerOptions ): void removeEventListener( type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions ): void } export declare const EventSource: { prototype: EventSource new (url: string | URL, init?: EventSourceInit): EventSource readonly CLOSED: 2 readonly CONNECTING: 0 readonly OPEN: 1 } interface EventSourceInit { withCredentials?: boolean, dispatcher?: Dispatcher } node_modules/undici/types/formdata.d.ts 0000664 00000011606 15114741631 0014240 0 ustar 00 // Based on https://github.com/octet-stream/form-data/blob/2d0f0dc371517444ce1f22cdde13f51995d0953a/lib/FormData.ts (MIT) /// <reference types="node" /> import { File } from './file' import { SpecIterableIterator } from './fetch' /** * A `string` or `File` that represents a single value from a set of `FormData` key-value pairs. */ declare type FormDataEntryValue = string | File /** * Provides a way to easily construct a set of key/value pairs representing form fields and their values, which can then be easily sent using fetch(). */ export declare class FormData { /** * Appends a new value onto an existing key inside a FormData object, * or adds the key if it does not already exist. * * The difference between `set()` and `append()` is that if the specified key already exists, `set()` will overwrite all existing values with the new one, whereas `append()` will append the new value onto the end of the existing set of values. * * @param name The name of the field whose data is contained in `value`. * @param value The field's value. This can be [`Blob`](https://developer.mozilla.org/en-US/docs/Web/API/Blob) or [`File`](https://developer.mozilla.org/en-US/docs/Web/API/File). If none of these are specified the value is converted to a string. * @param fileName The filename reported to the server, when a Blob or File is passed as the second parameter. The default filename for Blob objects is "blob". The default filename for File objects is the file's filename. */ append(name: string, value: unknown, fileName?: string): void /** * Set a new value for an existing key inside FormData, * or add the new field if it does not already exist. * * @param name The name of the field whose data is contained in `value`. * @param value The field's value. This can be [`Blob`](https://developer.mozilla.org/en-US/docs/Web/API/Blob) or [`File`](https://developer.mozilla.org/en-US/docs/Web/API/File). If none of these are specified the value is converted to a string. * @param fileName The filename reported to the server, when a Blob or File is passed as the second parameter. The default filename for Blob objects is "blob". The default filename for File objects is the file's filename. * */ set(name: string, value: unknown, fileName?: string): void /** * Returns the first value associated with a given key from within a `FormData` object. * If you expect multiple values and want all of them, use the `getAll()` method instead. * * @param {string} name A name of the value you want to retrieve. * * @returns A `FormDataEntryValue` containing the value. If the key doesn't exist, the method returns null. */ get(name: string): FormDataEntryValue | null /** * Returns all the values associated with a given key from within a `FormData` object. * * @param {string} name A name of the value you want to retrieve. * * @returns An array of `FormDataEntryValue` whose key matches the value passed in the `name` parameter. If the key doesn't exist, the method returns an empty list. */ getAll(name: string): FormDataEntryValue[] /** * Returns a boolean stating whether a `FormData` object contains a certain key. * * @param name A string representing the name of the key you want to test for. * * @return A boolean value. */ has(name: string): boolean /** * Deletes a key and its value(s) from a `FormData` object. * * @param name The name of the key you want to delete. */ delete(name: string): void /** * Executes given callback function for each field of the FormData instance */ forEach: ( callbackfn: (value: FormDataEntryValue, key: string, iterable: FormData) => void, thisArg?: unknown ) => void /** * Returns an [`iterator`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols) allowing to go through all keys contained in this `FormData` object. * Each key is a `string`. */ keys: () => SpecIterableIterator<string> /** * Returns an [`iterator`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols) allowing to go through all values contained in this object `FormData` object. * Each value is a [`FormDataValue`](https://developer.mozilla.org/en-US/docs/Web/API/FormDataEntryValue). */ values: () => SpecIterableIterator<FormDataEntryValue> /** * Returns an [`iterator`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols) allowing to go through the `FormData` key/value pairs. * The key of each pair is a string; the value is a [`FormDataValue`](https://developer.mozilla.org/en-US/docs/Web/API/FormDataEntryValue). */ entries: () => SpecIterableIterator<[string, FormDataEntryValue]> /** * An alias for FormData#entries() */ [Symbol.iterator]: () => SpecIterableIterator<[string, FormDataEntryValue]> readonly [Symbol.toStringTag]: string } node_modules/undici/types/client.d.ts 0000664 00000011544 15114741631 0013722 0 ustar 00 import { URL } from 'url' import { TlsOptions } from 'tls' import Dispatcher from './dispatcher' import buildConnector from "./connector"; type ClientConnectOptions = Omit<Dispatcher.ConnectOptions, "origin">; /** * A basic HTTP/1.1 client, mapped on top a single TCP/TLS connection. Pipelining is disabled by default. */ export class Client extends Dispatcher { constructor(url: string | URL, options?: Client.Options); /** Property to get and set the pipelining factor. */ pipelining: number; /** `true` after `client.close()` has been called. */ closed: boolean; /** `true` after `client.destroyed()` has been called or `client.close()` has been called and the client shutdown has completed. */ destroyed: boolean; // Override dispatcher APIs. override connect( options: ClientConnectOptions ): Promise<Dispatcher.ConnectData>; override connect( options: ClientConnectOptions, callback: (err: Error | null, data: Dispatcher.ConnectData) => void ): void; } export declare namespace Client { export interface OptionsInterceptors { Client: readonly Dispatcher.DispatchInterceptor[]; } export interface Options { /** TODO */ interceptors?: OptionsInterceptors; /** The maximum length of request headers in bytes. Default: Node.js' `--max-http-header-size` or `16384` (16KiB). */ maxHeaderSize?: number; /** The amount of time, in milliseconds, the parser will wait to receive the complete HTTP headers (Node 14 and above only). Default: `300e3` milliseconds (300s). */ headersTimeout?: number; /** @deprecated unsupported socketTimeout, use headersTimeout & bodyTimeout instead */ socketTimeout?: never; /** @deprecated unsupported requestTimeout, use headersTimeout & bodyTimeout instead */ requestTimeout?: never; /** TODO */ connectTimeout?: number; /** The timeout after which a request will time out, in milliseconds. Monitors time between receiving body data. Use `0` to disable it entirely. Default: `300e3` milliseconds (300s). */ bodyTimeout?: number; /** @deprecated unsupported idleTimeout, use keepAliveTimeout instead */ idleTimeout?: never; /** @deprecated unsupported keepAlive, use pipelining=0 instead */ keepAlive?: never; /** the timeout, in milliseconds, after which a socket without active requests will time out. Monitors time between activity on a connected socket. This value may be overridden by *keep-alive* hints from the server. Default: `4e3` milliseconds (4s). */ keepAliveTimeout?: number; /** @deprecated unsupported maxKeepAliveTimeout, use keepAliveMaxTimeout instead */ maxKeepAliveTimeout?: never; /** the maximum allowed `idleTimeout`, in milliseconds, when overridden by *keep-alive* hints from the server. Default: `600e3` milliseconds (10min). */ keepAliveMaxTimeout?: number; /** A number of milliseconds subtracted from server *keep-alive* hints when overriding `idleTimeout` to account for timing inaccuracies caused by e.g. transport latency. Default: `1e3` milliseconds (1s). */ keepAliveTimeoutThreshold?: number; /** TODO */ socketPath?: string; /** The amount of concurrent requests to be sent over the single TCP/TLS connection according to [RFC7230](https://tools.ietf.org/html/rfc7230#section-6.3.2). Default: `1`. */ pipelining?: number; /** @deprecated use the connect option instead */ tls?: never; /** If `true`, an error is thrown when the request content-length header doesn't match the length of the request body. Default: `true`. */ strictContentLength?: boolean; /** TODO */ maxCachedSessions?: number; /** TODO */ maxRedirections?: number; /** TODO */ connect?: buildConnector.BuildOptions | buildConnector.connector; /** TODO */ maxRequestsPerClient?: number; /** TODO */ localAddress?: string; /** Max response body size in bytes, -1 is disabled */ maxResponseSize?: number; /** Enables a family autodetection algorithm that loosely implements section 5 of RFC 8305. */ autoSelectFamily?: boolean; /** The amount of time in milliseconds to wait for a connection attempt to finish before trying the next address when using the `autoSelectFamily` option. */ autoSelectFamilyAttemptTimeout?: number; /** * @description Enables support for H2 if the server has assigned bigger priority to it through ALPN negotiation. * @default false */ allowH2?: boolean; /** * @description Dictates the maximum number of concurrent streams for a single H2 session. It can be overridden by a SETTINGS remote frame. * @default 100 */ maxConcurrentStreams?: number } export interface SocketInfo { localAddress?: string localPort?: number remoteAddress?: string remotePort?: number remoteFamily?: string timeout?: number bytesWritten?: number bytesRead?: number } } export default Client; node_modules/undici/types/mock-errors.d.ts 0000664 00000000522 15114741631 0014701 0 ustar 00 import Errors from './errors' export default MockErrors declare namespace MockErrors { /** The request does not match any registered mock dispatches. */ export class MockNotMatchedError extends Errors.UndiciError { constructor(message?: string); name: 'MockNotMatchedError'; code: 'UND_MOCK_ERR_MOCK_NOT_MATCHED'; } } node_modules/undici/types/pool-stats.d.ts 0000664 00000001235 15114741631 0014545 0 ustar 00 import Pool from "./pool" export default PoolStats declare class PoolStats { constructor(pool: Pool); /** Number of open socket connections in this pool. */ connected: number; /** Number of open socket connections in this pool that do not have an active request. */ free: number; /** Number of pending requests across all clients in this pool. */ pending: number; /** Number of queued requests across all clients in this pool. */ queued: number; /** Number of currently active requests across all clients in this pool. */ running: number; /** Number of active, pending, or queued requests across all clients in this pool. */ size: number; } node_modules/undici/types/proxy-agent.d.ts 0000664 00000001414 15114741631 0014714 0 ustar 00 import Agent from './agent' import buildConnector from './connector'; import Dispatcher from './dispatcher' import { IncomingHttpHeaders } from './header' export default ProxyAgent declare class ProxyAgent extends Dispatcher { constructor(options: ProxyAgent.Options | string) dispatch(options: Agent.DispatchOptions, handler: Dispatcher.DispatchHandlers): boolean; close(): Promise<void>; } declare namespace ProxyAgent { export interface Options extends Agent.Options { uri: string; /** * @deprecated use opts.token */ auth?: string; token?: string; headers?: IncomingHttpHeaders; requestTls?: buildConnector.BuildOptions; proxyTls?: buildConnector.BuildOptions; clientFactory?(origin: URL, opts: object): Dispatcher; } } node_modules/undici/types/global-dispatcher.d.ts 0000664 00000000424 15114741631 0016023 0 ustar 00 import Dispatcher from "./dispatcher"; export { getGlobalDispatcher, setGlobalDispatcher } declare function setGlobalDispatcher<DispatcherImplementation extends Dispatcher>(dispatcher: DispatcherImplementation): void; declare function getGlobalDispatcher(): Dispatcher; node_modules/undici/types/cache.d.ts 0000664 00000002343 15114741631 0013504 0 ustar 00 import type { RequestInfo, Response, Request } from './fetch' export interface CacheStorage { match (request: RequestInfo, options?: MultiCacheQueryOptions): Promise<Response | undefined>, has (cacheName: string): Promise<boolean>, open (cacheName: string): Promise<Cache>, delete (cacheName: string): Promise<boolean>, keys (): Promise<string[]> } declare const CacheStorage: { prototype: CacheStorage new(): CacheStorage } export interface Cache { match (request: RequestInfo, options?: CacheQueryOptions): Promise<Response | undefined>, matchAll (request?: RequestInfo, options?: CacheQueryOptions): Promise<readonly Response[]>, add (request: RequestInfo): Promise<undefined>, addAll (requests: RequestInfo[]): Promise<undefined>, put (request: RequestInfo, response: Response): Promise<undefined>, delete (request: RequestInfo, options?: CacheQueryOptions): Promise<boolean>, keys (request?: RequestInfo, options?: CacheQueryOptions): Promise<readonly Request[]> } export interface CacheQueryOptions { ignoreSearch?: boolean, ignoreMethod?: boolean, ignoreVary?: boolean } export interface MultiCacheQueryOptions extends CacheQueryOptions { cacheName?: string } export declare const caches: CacheStorage node_modules/undici/types/util.d.ts 0000664 00000001157 15114741631 0013420 0 ustar 00 export namespace util { /** * Retrieves a header name and returns its lowercase value. * @param value Header name */ export function headerNameToString(value: string | Buffer): string; /** * Receives a header object and returns the parsed value. * @param headers Header object * @param obj Object to specify a proxy object. Used to assign parsed values. * @returns If `obj` is specified, it is equivalent to `obj`. */ export function parseHeaders( headers: (Buffer | string | (Buffer | string)[])[], obj?: Record<string, string | string[]> ): Record<string, string | string[]>; } node_modules/undici/types/balanced-pool.d.ts 0000664 00000001701 15114741631 0015136 0 ustar 00 import Pool from './pool' import Dispatcher from './dispatcher' import { URL } from 'url' export default BalancedPool type BalancedPoolConnectOptions = Omit<Dispatcher.ConnectOptions, "origin">; declare class BalancedPool extends Dispatcher { constructor(url: string | string[] | URL | URL[], options?: Pool.Options); addUpstream(upstream: string | URL): BalancedPool; removeUpstream(upstream: string | URL): BalancedPool; upstreams: Array<string>; /** `true` after `pool.close()` has been called. */ closed: boolean; /** `true` after `pool.destroyed()` has been called or `pool.close()` has been called and the pool shutdown has completed. */ destroyed: boolean; // Override dispatcher APIs. override connect( options: BalancedPoolConnectOptions ): Promise<Dispatcher.ConnectData>; override connect( options: BalancedPoolConnectOptions, callback: (err: Error | null, data: Dispatcher.ConnectData) => void ): void; } node_modules/undici/types/README.md 0000664 00000000707 15114741631 0013130 0 ustar 00 # undici-types This package is a dual-publish of the [undici](https://www.npmjs.com/package/undici) library types. The `undici` package **still contains types**. This package is for users who _only_ need undici types (such as for `@types/node`). It is published alongside every release of `undici`, so you can always use the same version. - [GitHub nodejs/undici](https://github.com/nodejs/undici) - [Undici Documentation](https://undici.nodejs.org/#/) node_modules/undici/index.js 0000664 00000013651 15114741631 0012154 0 ustar 00 'use strict' const Client = require('./lib/dispatcher/client') const Dispatcher = require('./lib/dispatcher/dispatcher') const Pool = require('./lib/dispatcher/pool') const BalancedPool = require('./lib/dispatcher/balanced-pool') const Agent = require('./lib/dispatcher/agent') const ProxyAgent = require('./lib/dispatcher/proxy-agent') const EnvHttpProxyAgent = require('./lib/dispatcher/env-http-proxy-agent') const RetryAgent = require('./lib/dispatcher/retry-agent') const errors = require('./lib/core/errors') const util = require('./lib/core/util') const { InvalidArgumentError } = errors const api = require('./lib/api') const buildConnector = require('./lib/core/connect') const MockClient = require('./lib/mock/mock-client') const MockAgent = require('./lib/mock/mock-agent') const MockPool = require('./lib/mock/mock-pool') const mockErrors = require('./lib/mock/mock-errors') const RetryHandler = require('./lib/handler/retry-handler') const { getGlobalDispatcher, setGlobalDispatcher } = require('./lib/global') const DecoratorHandler = require('./lib/handler/decorator-handler') const RedirectHandler = require('./lib/handler/redirect-handler') const createRedirectInterceptor = require('./lib/interceptor/redirect-interceptor') Object.assign(Dispatcher.prototype, api) module.exports.Dispatcher = Dispatcher module.exports.Client = Client module.exports.Pool = Pool module.exports.BalancedPool = BalancedPool module.exports.Agent = Agent module.exports.ProxyAgent = ProxyAgent module.exports.EnvHttpProxyAgent = EnvHttpProxyAgent module.exports.RetryAgent = RetryAgent module.exports.RetryHandler = RetryHandler module.exports.DecoratorHandler = DecoratorHandler module.exports.RedirectHandler = RedirectHandler module.exports.createRedirectInterceptor = createRedirectInterceptor module.exports.interceptors = { redirect: require('./lib/interceptor/redirect'), retry: require('./lib/interceptor/retry'), dump: require('./lib/interceptor/dump'), dns: require('./lib/interceptor/dns') } module.exports.buildConnector = buildConnector module.exports.errors = errors module.exports.util = { parseHeaders: util.parseHeaders, headerNameToString: util.headerNameToString } function makeDispatcher (fn) { return (url, opts, handler) => { if (typeof opts === 'function') { handler = opts opts = null } if (!url || (typeof url !== 'string' && typeof url !== 'object' && !(url instanceof URL))) { throw new InvalidArgumentError('invalid url') } if (opts != null && typeof opts !== 'object') { throw new InvalidArgumentError('invalid opts') } if (opts && opts.path != null) { if (typeof opts.path !== 'string') { throw new InvalidArgumentError('invalid opts.path') } let path = opts.path if (!opts.path.startsWith('/')) { path = `/${path}` } url = new URL(util.parseOrigin(url).origin + path) } else { if (!opts) { opts = typeof url === 'object' ? url : {} } url = util.parseURL(url) } const { agent, dispatcher = getGlobalDispatcher() } = opts if (agent) { throw new InvalidArgumentError('unsupported opts.agent. Did you mean opts.client?') } return fn.call(dispatcher, { ...opts, origin: url.origin, path: url.search ? `${url.pathname}${url.search}` : url.pathname, method: opts.method || (opts.body ? 'PUT' : 'GET') }, handler) } } module.exports.setGlobalDispatcher = setGlobalDispatcher module.exports.getGlobalDispatcher = getGlobalDispatcher const fetchImpl = require('./lib/web/fetch').fetch module.exports.fetch = async function fetch (init, options = undefined) { try { return await fetchImpl(init, options) } catch (err) { if (err && typeof err === 'object') { Error.captureStackTrace(err) } throw err } } module.exports.Headers = require('./lib/web/fetch/headers').Headers module.exports.Response = require('./lib/web/fetch/response').Response module.exports.Request = require('./lib/web/fetch/request').Request module.exports.FormData = require('./lib/web/fetch/formdata').FormData module.exports.File = globalThis.File ?? require('node:buffer').File module.exports.FileReader = require('./lib/web/fileapi/filereader').FileReader const { setGlobalOrigin, getGlobalOrigin } = require('./lib/web/fetch/global') module.exports.setGlobalOrigin = setGlobalOrigin module.exports.getGlobalOrigin = getGlobalOrigin const { CacheStorage } = require('./lib/web/cache/cachestorage') const { kConstruct } = require('./lib/web/cache/symbols') // Cache & CacheStorage are tightly coupled with fetch. Even if it may run // in an older version of Node, it doesn't have any use without fetch. module.exports.caches = new CacheStorage(kConstruct) const { deleteCookie, getCookies, getSetCookies, setCookie } = require('./lib/web/cookies') module.exports.deleteCookie = deleteCookie module.exports.getCookies = getCookies module.exports.getSetCookies = getSetCookies module.exports.setCookie = setCookie const { parseMIMEType, serializeAMimeType } = require('./lib/web/fetch/data-url') module.exports.parseMIMEType = parseMIMEType module.exports.serializeAMimeType = serializeAMimeType const { CloseEvent, ErrorEvent, MessageEvent } = require('./lib/web/websocket/events') module.exports.WebSocket = require('./lib/web/websocket/websocket').WebSocket module.exports.CloseEvent = CloseEvent module.exports.ErrorEvent = ErrorEvent module.exports.MessageEvent = MessageEvent module.exports.request = makeDispatcher(api.request) module.exports.stream = makeDispatcher(api.stream) module.exports.pipeline = makeDispatcher(api.pipeline) module.exports.connect = makeDispatcher(api.connect) module.exports.upgrade = makeDispatcher(api.upgrade) module.exports.MockClient = MockClient module.exports.MockPool = MockPool module.exports.MockAgent = MockAgent module.exports.mockErrors = mockErrors const { EventSource } = require('./lib/web/eventsource/eventsource') module.exports.EventSource = EventSource node_modules/undici/scripts/strip-comments.js 0000664 00000000404 15114741631 0015510 0 ustar 00 'use strict' const { readFileSync, writeFileSync } = require('node:fs') const { transcode } = require('node:buffer') const buffer = transcode(readFileSync('./undici-fetch.js'), 'utf8', 'latin1') writeFileSync('./undici-fetch.js', buffer.toString('latin1')) node_modules/undici/README.md 0000664 00000045105 15114741631 0011765 0 ustar 00 # undici [](https://github.com/nodejs/undici/actions/workflows/nodejs.yml) [](http://standardjs.com/) [](https://badge.fury.io/js/undici) [](https://codecov.io/gh/nodejs/undici) An HTTP/1.1 client, written from scratch for Node.js. > Undici means eleven in Italian. 1.1 -> 11 -> Eleven -> Undici. It is also a Stranger Things reference. ## How to get involved Have a question about using Undici? Open a [Q&A Discussion](https://github.com/nodejs/undici/discussions/new) or join our official OpenJS [Slack](https://openjs-foundation.slack.com/archives/C01QF9Q31QD) channel. Looking to contribute? Start by reading the [contributing guide](./CONTRIBUTING.md) ## Install ``` npm i undici ``` ## Benchmarks The benchmark is a simple getting data [example](https://github.com/nodejs/undici/blob/main/benchmarks/benchmark.js) using a 50 TCP connections with a pipelining depth of 10 running on Node 20.10.0. | _Tests_ | _Samples_ | _Result_ | _Tolerance_ | _Difference with slowest_ | | :-----------------: | :-------: | :--------------: | :---------: | :-----------------------: | | undici - fetch | 30 | 3704.43 req/sec | ± 2.95 % | - | | http - no keepalive | 20 | 4275.30 req/sec | ± 2.60 % | + 15.41 % | | node-fetch | 10 | 4759.42 req/sec | ± 0.87 % | + 28.48 % | | request | 40 | 4803.37 req/sec | ± 2.77 % | + 29.67 % | | axios | 45 | 4951.97 req/sec | ± 2.88 % | + 33.68 % | | got | 10 | 5969.67 req/sec | ± 2.64 % | + 61.15 % | | superagent | 10 | 9471.48 req/sec | ± 1.50 % | + 155.68 % | | http - keepalive | 25 | 10327.49 req/sec | ± 2.95 % | + 178.79 % | | undici - pipeline | 10 | 15053.41 req/sec | ± 1.63 % | + 306.36 % | | undici - request | 10 | 19264.24 req/sec | ± 1.74 % | + 420.03 % | | undici - stream | 15 | 20317.29 req/sec | ± 2.13 % | + 448.46 % | | undici - dispatch | 10 | 24883.28 req/sec | ± 1.54 % | + 571.72 % | The benchmark is a simple sending data [example](https://github.com/nodejs/undici/blob/main/benchmarks/post-benchmark.js) using a 50 TCP connections with a pipelining depth of 10 running on Node 20.10.0. | _Tests_ | _Samples_ | _Result_ | _Tolerance_ | _Difference with slowest_ | | :-----------------: | :-------: | :-------------: | :---------: | :-----------------------: | | undici - fetch | 20 | 1968.42 req/sec | ± 2.63 % | - | | http - no keepalive | 25 | 2330.30 req/sec | ± 2.99 % | + 18.38 % | | node-fetch | 20 | 2485.36 req/sec | ± 2.70 % | + 26.26 % | | got | 15 | 2787.68 req/sec | ± 2.56 % | + 41.62 % | | request | 30 | 2805.10 req/sec | ± 2.59 % | + 42.50 % | | axios | 10 | 3040.45 req/sec | ± 1.72 % | + 54.46 % | | superagent | 20 | 3358.29 req/sec | ± 2.51 % | + 70.61 % | | http - keepalive | 20 | 3477.94 req/sec | ± 2.51 % | + 76.69 % | | undici - pipeline | 25 | 3812.61 req/sec | ± 2.80 % | + 93.69 % | | undici - request | 10 | 6067.00 req/sec | ± 0.94 % | + 208.22 % | | undici - stream | 10 | 6391.61 req/sec | ± 1.98 % | + 224.71 % | | undici - dispatch | 10 | 6397.00 req/sec | ± 1.48 % | + 224.98 % | ## Quick Start ```js import { request } from 'undici' const { statusCode, headers, trailers, body } = await request('http://localhost:3000/foo') console.log('response received', statusCode) console.log('headers', headers) for await (const data of body) { console.log('data', data) } console.log('trailers', trailers) ``` ## Body Mixins The `body` mixins are the most common way to format the request/response body. Mixins include: - [`.arrayBuffer()`](https://fetch.spec.whatwg.org/#dom-body-arraybuffer) - [`.blob()`](https://fetch.spec.whatwg.org/#dom-body-blob) - [`.bytes()`](https://fetch.spec.whatwg.org/#dom-body-bytes) - [`.json()`](https://fetch.spec.whatwg.org/#dom-body-json) - [`.text()`](https://fetch.spec.whatwg.org/#dom-body-text) > [!NOTE] > The body returned from `undici.request` does not implement `.formData()`. Example usage: ```js import { request } from 'undici' const { statusCode, headers, trailers, body } = await request('http://localhost:3000/foo') console.log('response received', statusCode) console.log('headers', headers) console.log('data', await body.json()) console.log('trailers', trailers) ``` _Note: Once a mixin has been called then the body cannot be reused, thus calling additional mixins on `.body`, e.g. `.body.json(); .body.text()` will result in an error `TypeError: unusable` being thrown and returned through the `Promise` rejection._ Should you need to access the `body` in plain-text after using a mixin, the best practice is to use the `.text()` mixin first and then manually parse the text to the desired format. For more information about their behavior, please reference the body mixin from the [Fetch Standard](https://fetch.spec.whatwg.org/#body-mixin). ## Common API Methods This section documents our most commonly used API methods. Additional APIs are documented in their own files within the [docs](./docs/) folder and are accessible via the navigation list on the left side of the docs site. ### `undici.request([url, options]): Promise` Arguments: * **url** `string | URL | UrlObject` * **options** [`RequestOptions`](./docs/docs/api/Dispatcher.md#parameter-requestoptions) * **dispatcher** `Dispatcher` - Default: [getGlobalDispatcher](#undicigetglobaldispatcher) * **method** `String` - Default: `PUT` if `options.body`, otherwise `GET` * **maxRedirections** `Integer` - Default: `0` Returns a promise with the result of the `Dispatcher.request` method. Calls `options.dispatcher.request(options)`. See [Dispatcher.request](./docs/docs/api/Dispatcher.md#dispatcherrequestoptions-callback) for more details, and [request examples](./examples/README.md) for examples. ### `undici.stream([url, options, ]factory): Promise` Arguments: * **url** `string | URL | UrlObject` * **options** [`StreamOptions`](./docs/docs/api/Dispatcher.md#parameter-streamoptions) * **dispatcher** `Dispatcher` - Default: [getGlobalDispatcher](#undicigetglobaldispatcher) * **method** `String` - Default: `PUT` if `options.body`, otherwise `GET` * **maxRedirections** `Integer` - Default: `0` * **factory** `Dispatcher.stream.factory` Returns a promise with the result of the `Dispatcher.stream` method. Calls `options.dispatcher.stream(options, factory)`. See [Dispatcher.stream](./docs/docs/api/Dispatcher.md#dispatcherstreamoptions-factory-callback) for more details. ### `undici.pipeline([url, options, ]handler): Duplex` Arguments: * **url** `string | URL | UrlObject` * **options** [`PipelineOptions`](./docs/docs/api/Dispatcher.md#parameter-pipelineoptions) * **dispatcher** `Dispatcher` - Default: [getGlobalDispatcher](#undicigetglobaldispatcher) * **method** `String` - Default: `PUT` if `options.body`, otherwise `GET` * **maxRedirections** `Integer` - Default: `0` * **handler** `Dispatcher.pipeline.handler` Returns: `stream.Duplex` Calls `options.dispatch.pipeline(options, handler)`. See [Dispatcher.pipeline](./docs/docs/api/Dispatcher.md#dispatcherpipelineoptions-handler) for more details. ### `undici.connect([url, options]): Promise` Starts two-way communications with the requested resource using [HTTP CONNECT](https://developer.mozilla.org/en-US/docs/Web/HTTP/Methods/CONNECT). Arguments: * **url** `string | URL | UrlObject` * **options** [`ConnectOptions`](./docs/docs/api/Dispatcher.md#parameter-connectoptions) * **dispatcher** `Dispatcher` - Default: [getGlobalDispatcher](#undicigetglobaldispatcher) * **maxRedirections** `Integer` - Default: `0` * **callback** `(err: Error | null, data: ConnectData | null) => void` (optional) Returns a promise with the result of the `Dispatcher.connect` method. Calls `options.dispatch.connect(options)`. See [Dispatcher.connect](./docs/docs/api/Dispatcher.md#dispatcherconnectoptions-callback) for more details. ### `undici.fetch(input[, init]): Promise` Implements [fetch](https://fetch.spec.whatwg.org/#fetch-method). * https://developer.mozilla.org/en-US/docs/Web/API/WindowOrWorkerGlobalScope/fetch * https://fetch.spec.whatwg.org/#fetch-method Basic usage example: ```js import { fetch } from 'undici' const res = await fetch('https://example.com') const json = await res.json() console.log(json) ``` You can pass an optional dispatcher to `fetch` as: ```js import { fetch, Agent } from 'undici' const res = await fetch('https://example.com', { // Mocks are also supported dispatcher: new Agent({ keepAliveTimeout: 10, keepAliveMaxTimeout: 10 }) }) const json = await res.json() console.log(json) ``` #### `request.body` A body can be of the following types: - ArrayBuffer - ArrayBufferView - AsyncIterables - Blob - Iterables - String - URLSearchParams - FormData In this implementation of fetch, ```request.body``` now accepts ```Async Iterables```. It is not present in the [Fetch Standard.](https://fetch.spec.whatwg.org) ```js import { fetch } from 'undici' const data = { async *[Symbol.asyncIterator]() { yield 'hello' yield 'world' }, } await fetch('https://example.com', { body: data, method: 'POST', duplex: 'half' }) ``` [FormData](https://developer.mozilla.org/en-US/docs/Web/API/FormData) besides text data and buffers can also utilize streams via [Blob](https://developer.mozilla.org/en-US/docs/Web/API/Blob) objects: ```js import { openAsBlob } from 'node:fs' const file = await openAsBlob('./big.csv') const body = new FormData() body.set('file', file, 'big.csv') await fetch('http://example.com', { method: 'POST', body }) ``` #### `request.duplex` - half In this implementation of fetch, `request.duplex` must be set if `request.body` is `ReadableStream` or `Async Iterables`, however, fetch requests are currently always full duplex. For more detail refer to the [Fetch Standard.](https://fetch.spec.whatwg.org/#dom-requestinit-duplex). #### `response.body` Nodejs has two kinds of streams: [web streams](https://nodejs.org/dist/latest-v16.x/docs/api/webstreams.html), which follow the API of the WHATWG web standard found in browsers, and an older Node-specific [streams API](https://nodejs.org/api/stream.html). `response.body` returns a readable web stream. If you would prefer to work with a Node stream you can convert a web stream using `.fromWeb()`. ```js import { fetch } from 'undici' import { Readable } from 'node:stream' const response = await fetch('https://example.com') const readableWebStream = response.body const readableNodeStream = Readable.fromWeb(readableWebStream) ``` #### Specification Compliance This section documents parts of the [Fetch Standard](https://fetch.spec.whatwg.org) that Undici does not support or does not fully implement. ##### Garbage Collection * https://fetch.spec.whatwg.org/#garbage-collection The [Fetch Standard](https://fetch.spec.whatwg.org) allows users to skip consuming the response body by relying on [garbage collection](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Memory_Management#garbage_collection) to release connection resources. Undici does not do the same. Therefore, it is important to always either consume or cancel the response body. Garbage collection in Node is less aggressive and deterministic (due to the lack of clear idle periods that browsers have through the rendering refresh rate) which means that leaving the release of connection resources to the garbage collector can lead to excessive connection usage, reduced performance (due to less connection re-use), and even stalls or deadlocks when running out of connections. ```js // Do const headers = await fetch(url) .then(async res => { for await (const chunk of res.body) { // force consumption of body } return res.headers }) // Do not const headers = await fetch(url) .then(res => res.headers) ``` However, if you want to get only headers, it might be better to use `HEAD` request method. Usage of this method will obviate the need for consumption or cancelling of the response body. See [MDN - HTTP - HTTP request methods - HEAD](https://developer.mozilla.org/en-US/docs/Web/HTTP/Methods/HEAD) for more details. ```js const headers = await fetch(url, { method: 'HEAD' }) .then(res => res.headers) ``` ##### Forbidden and Safelisted Header Names * https://fetch.spec.whatwg.org/#cors-safelisted-response-header-name * https://fetch.spec.whatwg.org/#forbidden-header-name * https://fetch.spec.whatwg.org/#forbidden-response-header-name * https://github.com/wintercg/fetch/issues/6 The [Fetch Standard](https://fetch.spec.whatwg.org) requires implementations to exclude certain headers from requests and responses. In browser environments, some headers are forbidden so the user agent remains in full control over them. In Undici, these constraints are removed to give more control to the user. ### `undici.upgrade([url, options]): Promise` Upgrade to a different protocol. See [MDN - HTTP - Protocol upgrade mechanism](https://developer.mozilla.org/en-US/docs/Web/HTTP/Protocol_upgrade_mechanism) for more details. Arguments: * **url** `string | URL | UrlObject` * **options** [`UpgradeOptions`](./docs/docs/api/Dispatcher.md#parameter-upgradeoptions) * **dispatcher** `Dispatcher` - Default: [getGlobalDispatcher](#undicigetglobaldispatcher) * **maxRedirections** `Integer` - Default: `0` * **callback** `(error: Error | null, data: UpgradeData) => void` (optional) Returns a promise with the result of the `Dispatcher.upgrade` method. Calls `options.dispatcher.upgrade(options)`. See [Dispatcher.upgrade](./docs/docs/api/Dispatcher.md#dispatcherupgradeoptions-callback) for more details. ### `undici.setGlobalDispatcher(dispatcher)` * dispatcher `Dispatcher` Sets the global dispatcher used by Common API Methods. ### `undici.getGlobalDispatcher()` Gets the global dispatcher used by Common API Methods. Returns: `Dispatcher` ### `undici.setGlobalOrigin(origin)` * origin `string | URL | undefined` Sets the global origin used in `fetch`. If `undefined` is passed, the global origin will be reset. This will cause `Response.redirect`, `new Request()`, and `fetch` to throw an error when a relative path is passed. ```js setGlobalOrigin('http://localhost:3000') const response = await fetch('/api/ping') console.log(response.url) // http://localhost:3000/api/ping ``` ### `undici.getGlobalOrigin()` Gets the global origin used in `fetch`. Returns: `URL` ### `UrlObject` * **port** `string | number` (optional) * **path** `string` (optional) * **pathname** `string` (optional) * **hostname** `string` (optional) * **origin** `string` (optional) * **protocol** `string` (optional) * **search** `string` (optional) ## Specification Compliance This section documents parts of the HTTP/1.1 specification that Undici does not support or does not fully implement. ### Expect Undici does not support the `Expect` request header field. The request body is always immediately sent and the `100 Continue` response will be ignored. Refs: https://tools.ietf.org/html/rfc7231#section-5.1.1 ### Pipelining Undici will only use pipelining if configured with a `pipelining` factor greater than `1`. Undici always assumes that connections are persistent and will immediately pipeline requests, without checking whether the connection is persistent. Hence, automatic fallback to HTTP/1.0 or HTTP/1.1 without pipelining is not supported. Undici will immediately pipeline when retrying requests after a failed connection. However, Undici will not retry the first remaining requests in the prior pipeline and instead error the corresponding callback/promise/stream. Undici will abort all running requests in the pipeline when any of them are aborted. * Refs: https://tools.ietf.org/html/rfc2616#section-8.1.2.2 * Refs: https://tools.ietf.org/html/rfc7230#section-6.3.2 ### Manual Redirect Since it is not possible to manually follow an HTTP redirect on the server-side, Undici returns the actual response instead of an `opaqueredirect` filtered one when invoked with a `manual` redirect. This aligns `fetch()` with the other implementations in Deno and Cloudflare Workers. Refs: https://fetch.spec.whatwg.org/#atomic-http-redirect-handling ## Workarounds ### Network address family autoselection. If you experience problem when connecting to a remote server that is resolved by your DNS servers to a IPv6 (AAAA record) first, there are chances that your local router or ISP might have problem connecting to IPv6 networks. In that case undici will throw an error with code `UND_ERR_CONNECT_TIMEOUT`. If the target server resolves to both a IPv6 and IPv4 (A records) address and you are using a compatible Node version (18.3.0 and above), you can fix the problem by providing the `autoSelectFamily` option (support by both `undici.request` and `undici.Agent`) which will enable the family autoselection algorithm when establishing the connection. ## Collaborators * [__Daniele Belardi__](https://github.com/dnlup), <https://www.npmjs.com/~dnlup> * [__Ethan Arrowood__](https://github.com/ethan-arrowood), <https://www.npmjs.com/~ethan_arrowood> * [__Matteo Collina__](https://github.com/mcollina), <https://www.npmjs.com/~matteo.collina> * [__Matthew Aitken__](https://github.com/KhafraDev), <https://www.npmjs.com/~khaf> * [__Robert Nagy__](https://github.com/ronag), <https://www.npmjs.com/~ronag> * [__Szymon Marczak__](https://github.com/szmarczak), <https://www.npmjs.com/~szmarczak> * [__Tomas Della Vedova__](https://github.com/delvedor), <https://www.npmjs.com/~delvedor> ### Releasers * [__Ethan Arrowood__](https://github.com/ethan-arrowood), <https://www.npmjs.com/~ethan_arrowood> * [__Matteo Collina__](https://github.com/mcollina), <https://www.npmjs.com/~matteo.collina> * [__Robert Nagy__](https://github.com/ronag), <https://www.npmjs.com/~ronag> * [__Matthew Aitken__](https://github.com/KhafraDev), <https://www.npmjs.com/~khaf> ## License MIT node_modules/path/package.json 0000664 00000000756 15114741631 0012460 0 ustar 00 { "author": { "name": "Joyent", "url": "http://www.joyent.com" }, "name": "path", "description": "Node.JS path module", "keywords": [ "ender", "path" ], "license": "MIT", "version": "0.12.7", "homepage": "http://nodejs.org/docs/latest/api/path.html", "repository": { "type": "git", "url": "git://github.com/jinder/path.git" }, "main": "./path.js", "dependencies": { "process": "^0.11.1", "util": "^0.10.3" } } node_modules/path/path.js 0000664 00000041244 15114741631 0011461 0 ustar 00 // Copyright Joyent, Inc. and other Node contributors. // // Permission is hereby granted, free of charge, to any person obtaining a // copy of this software and associated documentation files (the // "Software"), to deal in the Software without restriction, including // without limitation the rights to use, copy, modify, merge, publish, // distribute, sublicense, and/or sell copies of the Software, and to permit // persons to whom the Software is furnished to do so, subject to the // following conditions: // // The above copyright notice and this permission notice shall be included // in all copies or substantial portions of the Software. // // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN // NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, // DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE // USE OR OTHER DEALINGS IN THE SOFTWARE. 'use strict'; var isWindows = process.platform === 'win32'; var util = require('util'); // resolves . and .. elements in a path array with directory names there // must be no slashes or device names (c:\) in the array // (so also no leading and trailing slashes - it does not distinguish // relative and absolute paths) function normalizeArray(parts, allowAboveRoot) { var res = []; for (var i = 0; i < parts.length; i++) { var p = parts[i]; // ignore empty parts if (!p || p === '.') continue; if (p === '..') { if (res.length && res[res.length - 1] !== '..') { res.pop(); } else if (allowAboveRoot) { res.push('..'); } } else { res.push(p); } } return res; } // returns an array with empty elements removed from either end of the input // array or the original array if no elements need to be removed function trimArray(arr) { var lastIndex = arr.length - 1; var start = 0; for (; start <= lastIndex; start++) { if (arr[start]) break; } var end = lastIndex; for (; end >= 0; end--) { if (arr[end]) break; } if (start === 0 && end === lastIndex) return arr; if (start > end) return []; return arr.slice(start, end + 1); } // Regex to split a windows path into three parts: [*, device, slash, // tail] windows-only var splitDeviceRe = /^([a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/]+[^\\\/]+)?([\\\/])?([\s\S]*?)$/; // Regex to split the tail part of the above into [*, dir, basename, ext] var splitTailRe = /^([\s\S]*?)((?:\.{1,2}|[^\\\/]+?|)(\.[^.\/\\]*|))(?:[\\\/]*)$/; var win32 = {}; // Function to split a filename into [root, dir, basename, ext] function win32SplitPath(filename) { // Separate device+slash from tail var result = splitDeviceRe.exec(filename), device = (result[1] || '') + (result[2] || ''), tail = result[3] || ''; // Split the tail into dir, basename and extension var result2 = splitTailRe.exec(tail), dir = result2[1], basename = result2[2], ext = result2[3]; return [device, dir, basename, ext]; } function win32StatPath(path) { var result = splitDeviceRe.exec(path), device = result[1] || '', isUnc = !!device && device[1] !== ':'; return { device: device, isUnc: isUnc, isAbsolute: isUnc || !!result[2], // UNC paths are always absolute tail: result[3] }; } function normalizeUNCRoot(device) { return '\\\\' + device.replace(/^[\\\/]+/, '').replace(/[\\\/]+/g, '\\'); } // path.resolve([from ...], to) win32.resolve = function() { var resolvedDevice = '', resolvedTail = '', resolvedAbsolute = false; for (var i = arguments.length - 1; i >= -1; i--) { var path; if (i >= 0) { path = arguments[i]; } else if (!resolvedDevice) { path = process.cwd(); } else { // Windows has the concept of drive-specific current working // directories. If we've resolved a drive letter but not yet an // absolute path, get cwd for that drive. We're sure the device is not // an unc path at this points, because unc paths are always absolute. path = process.env['=' + resolvedDevice]; // Verify that a drive-local cwd was found and that it actually points // to our drive. If not, default to the drive's root. if (!path || path.substr(0, 3).toLowerCase() !== resolvedDevice.toLowerCase() + '\\') { path = resolvedDevice + '\\'; } } // Skip empty and invalid entries if (!util.isString(path)) { throw new TypeError('Arguments to path.resolve must be strings'); } else if (!path) { continue; } var result = win32StatPath(path), device = result.device, isUnc = result.isUnc, isAbsolute = result.isAbsolute, tail = result.tail; if (device && resolvedDevice && device.toLowerCase() !== resolvedDevice.toLowerCase()) { // This path points to another device so it is not applicable continue; } if (!resolvedDevice) { resolvedDevice = device; } if (!resolvedAbsolute) { resolvedTail = tail + '\\' + resolvedTail; resolvedAbsolute = isAbsolute; } if (resolvedDevice && resolvedAbsolute) { break; } } // Convert slashes to backslashes when `resolvedDevice` points to an UNC // root. Also squash multiple slashes into a single one where appropriate. if (isUnc) { resolvedDevice = normalizeUNCRoot(resolvedDevice); } // At this point the path should be resolved to a full absolute path, // but handle relative paths to be safe (might happen when process.cwd() // fails) // Normalize the tail path resolvedTail = normalizeArray(resolvedTail.split(/[\\\/]+/), !resolvedAbsolute).join('\\'); return (resolvedDevice + (resolvedAbsolute ? '\\' : '') + resolvedTail) || '.'; }; win32.normalize = function(path) { var result = win32StatPath(path), device = result.device, isUnc = result.isUnc, isAbsolute = result.isAbsolute, tail = result.tail, trailingSlash = /[\\\/]$/.test(tail); // Normalize the tail path tail = normalizeArray(tail.split(/[\\\/]+/), !isAbsolute).join('\\'); if (!tail && !isAbsolute) { tail = '.'; } if (tail && trailingSlash) { tail += '\\'; } // Convert slashes to backslashes when `device` points to an UNC root. // Also squash multiple slashes into a single one where appropriate. if (isUnc) { device = normalizeUNCRoot(device); } return device + (isAbsolute ? '\\' : '') + tail; }; win32.isAbsolute = function(path) { return win32StatPath(path).isAbsolute; }; win32.join = function() { var paths = []; for (var i = 0; i < arguments.length; i++) { var arg = arguments[i]; if (!util.isString(arg)) { throw new TypeError('Arguments to path.join must be strings'); } if (arg) { paths.push(arg); } } var joined = paths.join('\\'); // Make sure that the joined path doesn't start with two slashes, because // normalize() will mistake it for an UNC path then. // // This step is skipped when it is very clear that the user actually // intended to point at an UNC path. This is assumed when the first // non-empty string arguments starts with exactly two slashes followed by // at least one more non-slash character. // // Note that for normalize() to treat a path as an UNC path it needs to // have at least 2 components, so we don't filter for that here. // This means that the user can use join to construct UNC paths from // a server name and a share name; for example: // path.join('//server', 'share') -> '\\\\server\\share\') if (!/^[\\\/]{2}[^\\\/]/.test(paths[0])) { joined = joined.replace(/^[\\\/]{2,}/, '\\'); } return win32.normalize(joined); }; // path.relative(from, to) // it will solve the relative path from 'from' to 'to', for instance: // from = 'C:\\orandea\\test\\aaa' // to = 'C:\\orandea\\impl\\bbb' // The output of the function should be: '..\\..\\impl\\bbb' win32.relative = function(from, to) { from = win32.resolve(from); to = win32.resolve(to); // windows is not case sensitive var lowerFrom = from.toLowerCase(); var lowerTo = to.toLowerCase(); var toParts = trimArray(to.split('\\')); var lowerFromParts = trimArray(lowerFrom.split('\\')); var lowerToParts = trimArray(lowerTo.split('\\')); var length = Math.min(lowerFromParts.length, lowerToParts.length); var samePartsLength = length; for (var i = 0; i < length; i++) { if (lowerFromParts[i] !== lowerToParts[i]) { samePartsLength = i; break; } } if (samePartsLength == 0) { return to; } var outputParts = []; for (var i = samePartsLength; i < lowerFromParts.length; i++) { outputParts.push('..'); } outputParts = outputParts.concat(toParts.slice(samePartsLength)); return outputParts.join('\\'); }; win32._makeLong = function(path) { // Note: this will *probably* throw somewhere. if (!util.isString(path)) return path; if (!path) { return ''; } var resolvedPath = win32.resolve(path); if (/^[a-zA-Z]\:\\/.test(resolvedPath)) { // path is local filesystem path, which needs to be converted // to long UNC path. return '\\\\?\\' + resolvedPath; } else if (/^\\\\[^?.]/.test(resolvedPath)) { // path is network UNC path, which needs to be converted // to long UNC path. return '\\\\?\\UNC\\' + resolvedPath.substring(2); } return path; }; win32.dirname = function(path) { var result = win32SplitPath(path), root = result[0], dir = result[1]; if (!root && !dir) { // No dirname whatsoever return '.'; } if (dir) { // It has a dirname, strip trailing slash dir = dir.substr(0, dir.length - 1); } return root + dir; }; win32.basename = function(path, ext) { var f = win32SplitPath(path)[2]; // TODO: make this comparison case-insensitive on windows? if (ext && f.substr(-1 * ext.length) === ext) { f = f.substr(0, f.length - ext.length); } return f; }; win32.extname = function(path) { return win32SplitPath(path)[3]; }; win32.format = function(pathObject) { if (!util.isObject(pathObject)) { throw new TypeError( "Parameter 'pathObject' must be an object, not " + typeof pathObject ); } var root = pathObject.root || ''; if (!util.isString(root)) { throw new TypeError( "'pathObject.root' must be a string or undefined, not " + typeof pathObject.root ); } var dir = pathObject.dir; var base = pathObject.base || ''; if (!dir) { return base; } if (dir[dir.length - 1] === win32.sep) { return dir + base; } return dir + win32.sep + base; }; win32.parse = function(pathString) { if (!util.isString(pathString)) { throw new TypeError( "Parameter 'pathString' must be a string, not " + typeof pathString ); } var allParts = win32SplitPath(pathString); if (!allParts || allParts.length !== 4) { throw new TypeError("Invalid path '" + pathString + "'"); } return { root: allParts[0], dir: allParts[0] + allParts[1].slice(0, -1), base: allParts[2], ext: allParts[3], name: allParts[2].slice(0, allParts[2].length - allParts[3].length) }; }; win32.sep = '\\'; win32.delimiter = ';'; // Split a filename into [root, dir, basename, ext], unix version // 'root' is just a slash, or nothing. var splitPathRe = /^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/; var posix = {}; function posixSplitPath(filename) { return splitPathRe.exec(filename).slice(1); } // path.resolve([from ...], to) // posix version posix.resolve = function() { var resolvedPath = '', resolvedAbsolute = false; for (var i = arguments.length - 1; i >= -1 && !resolvedAbsolute; i--) { var path = (i >= 0) ? arguments[i] : process.cwd(); // Skip empty and invalid entries if (!util.isString(path)) { throw new TypeError('Arguments to path.resolve must be strings'); } else if (!path) { continue; } resolvedPath = path + '/' + resolvedPath; resolvedAbsolute = path[0] === '/'; } // At this point the path should be resolved to a full absolute path, but // handle relative paths to be safe (might happen when process.cwd() fails) // Normalize the path resolvedPath = normalizeArray(resolvedPath.split('/'), !resolvedAbsolute).join('/'); return ((resolvedAbsolute ? '/' : '') + resolvedPath) || '.'; }; // path.normalize(path) // posix version posix.normalize = function(path) { var isAbsolute = posix.isAbsolute(path), trailingSlash = path && path[path.length - 1] === '/'; // Normalize the path path = normalizeArray(path.split('/'), !isAbsolute).join('/'); if (!path && !isAbsolute) { path = '.'; } if (path && trailingSlash) { path += '/'; } return (isAbsolute ? '/' : '') + path; }; // posix version posix.isAbsolute = function(path) { return path.charAt(0) === '/'; }; // posix version posix.join = function() { var path = ''; for (var i = 0; i < arguments.length; i++) { var segment = arguments[i]; if (!util.isString(segment)) { throw new TypeError('Arguments to path.join must be strings'); } if (segment) { if (!path) { path += segment; } else { path += '/' + segment; } } } return posix.normalize(path); }; // path.relative(from, to) // posix version posix.relative = function(from, to) { from = posix.resolve(from).substr(1); to = posix.resolve(to).substr(1); var fromParts = trimArray(from.split('/')); var toParts = trimArray(to.split('/')); var length = Math.min(fromParts.length, toParts.length); var samePartsLength = length; for (var i = 0; i < length; i++) { if (fromParts[i] !== toParts[i]) { samePartsLength = i; break; } } var outputParts = []; for (var i = samePartsLength; i < fromParts.length; i++) { outputParts.push('..'); } outputParts = outputParts.concat(toParts.slice(samePartsLength)); return outputParts.join('/'); }; posix._makeLong = function(path) { return path; }; posix.dirname = function(path) { var result = posixSplitPath(path), root = result[0], dir = result[1]; if (!root && !dir) { // No dirname whatsoever return '.'; } if (dir) { // It has a dirname, strip trailing slash dir = dir.substr(0, dir.length - 1); } return root + dir; }; posix.basename = function(path, ext) { var f = posixSplitPath(path)[2]; // TODO: make this comparison case-insensitive on windows? if (ext && f.substr(-1 * ext.length) === ext) { f = f.substr(0, f.length - ext.length); } return f; }; posix.extname = function(path) { return posixSplitPath(path)[3]; }; posix.format = function(pathObject) { if (!util.isObject(pathObject)) { throw new TypeError( "Parameter 'pathObject' must be an object, not " + typeof pathObject ); } var root = pathObject.root || ''; if (!util.isString(root)) { throw new TypeError( "'pathObject.root' must be a string or undefined, not " + typeof pathObject.root ); } var dir = pathObject.dir ? pathObject.dir + posix.sep : ''; var base = pathObject.base || ''; return dir + base; }; posix.parse = function(pathString) { if (!util.isString(pathString)) { throw new TypeError( "Parameter 'pathString' must be a string, not " + typeof pathString ); } var allParts = posixSplitPath(pathString); if (!allParts || allParts.length !== 4) { throw new TypeError("Invalid path '" + pathString + "'"); } allParts[1] = allParts[1] || ''; allParts[2] = allParts[2] || ''; allParts[3] = allParts[3] || ''; return { root: allParts[0], dir: allParts[0] + allParts[1].slice(0, -1), base: allParts[2], ext: allParts[3], name: allParts[2].slice(0, allParts[2].length - allParts[3].length) }; }; posix.sep = '/'; posix.delimiter = ':'; if (isWindows) module.exports = win32; else /* posix */ module.exports = posix; module.exports.posix = posix; module.exports.win32 = win32; node_modules/path/.npmignore 0000664 00000000014 15114741631 0012154 0 ustar 00 node_modules node_modules/path/LICENSE 0000664 00000002132 15114741631 0011165 0 ustar 00 Copyright Joyent, Inc. and other Node contributors. All rights reserved. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. node_modules/path/README.md 0000664 00000000355 15114741631 0011444 0 ustar 00 # path This is an exact copy of the NodeJS ’path’ module published to the NPM registry. [Documentation](http://nodejs.org/docs/latest/api/path.html) ## Install ```sh $ npm install --save path ``` ## License MIT node_modules/to-regex-range/package.json 0000664 00000003366 15114741631 0014350 0 ustar 00 { "name": "to-regex-range", "description": "Pass two numbers, get a regex-compatible source string for matching ranges. Validated against more than 2.78 million test assertions.", "version": "5.0.1", "homepage": "https://github.com/micromatch/to-regex-range", "author": "Jon Schlinkert (https://github.com/jonschlinkert)", "contributors": [ "Jon Schlinkert (http://twitter.com/jonschlinkert)", "Rouven Weßling (www.rouvenwessling.de)" ], "repository": "micromatch/to-regex-range", "bugs": { "url": "https://github.com/micromatch/to-regex-range/issues" }, "license": "MIT", "files": [ "index.js" ], "main": "index.js", "engines": { "node": ">=8.0" }, "scripts": { "test": "mocha" }, "dependencies": { "is-number": "^7.0.0" }, "devDependencies": { "fill-range": "^6.0.0", "gulp-format-md": "^2.0.0", "mocha": "^6.0.2", "text-table": "^0.2.0", "time-diff": "^0.3.1" }, "keywords": [ "bash", "date", "expand", "expansion", "expression", "glob", "match", "match date", "match number", "match numbers", "match year", "matches", "matching", "number", "numbers", "numerical", "range", "ranges", "regex", "regexp", "regular", "regular expression", "sequence" ], "verb": { "layout": "default", "toc": false, "tasks": [ "readme" ], "plugins": [ "gulp-format-md" ], "lint": { "reflinks": true }, "helpers": { "examples": { "displayName": "examples" } }, "related": { "list": [ "expand-range", "fill-range", "micromatch", "repeat-element", "repeat-string" ] } } } node_modules/to-regex-range/LICENSE 0000664 00000002103 15114741631 0013053 0 ustar 00 The MIT License (MIT) Copyright (c) 2015-present, Jon Schlinkert. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. node_modules/to-regex-range/index.js 0000664 00000014521 15114741631 0013522 0 ustar 00 /*! * to-regex-range <https://github.com/micromatch/to-regex-range> * * Copyright (c) 2015-present, Jon Schlinkert. * Released under the MIT License. */ 'use strict'; const isNumber = require('is-number'); const toRegexRange = (min, max, options) => { if (isNumber(min) === false) { throw new TypeError('toRegexRange: expected the first argument to be a number'); } if (max === void 0 || min === max) { return String(min); } if (isNumber(max) === false) { throw new TypeError('toRegexRange: expected the second argument to be a number.'); } let opts = { relaxZeros: true, ...options }; if (typeof opts.strictZeros === 'boolean') { opts.relaxZeros = opts.strictZeros === false; } let relax = String(opts.relaxZeros); let shorthand = String(opts.shorthand); let capture = String(opts.capture); let wrap = String(opts.wrap); let cacheKey = min + ':' + max + '=' + relax + shorthand + capture + wrap; if (toRegexRange.cache.hasOwnProperty(cacheKey)) { return toRegexRange.cache[cacheKey].result; } let a = Math.min(min, max); let b = Math.max(min, max); if (Math.abs(a - b) === 1) { let result = min + '|' + max; if (opts.capture) { return `(${result})`; } if (opts.wrap === false) { return result; } return `(?:${result})`; } let isPadded = hasPadding(min) || hasPadding(max); let state = { min, max, a, b }; let positives = []; let negatives = []; if (isPadded) { state.isPadded = isPadded; state.maxLen = String(state.max).length; } if (a < 0) { let newMin = b < 0 ? Math.abs(b) : 1; negatives = splitToPatterns(newMin, Math.abs(a), state, opts); a = state.a = 0; } if (b >= 0) { positives = splitToPatterns(a, b, state, opts); } state.negatives = negatives; state.positives = positives; state.result = collatePatterns(negatives, positives, opts); if (opts.capture === true) { state.result = `(${state.result})`; } else if (opts.wrap !== false && (positives.length + negatives.length) > 1) { state.result = `(?:${state.result})`; } toRegexRange.cache[cacheKey] = state; return state.result; }; function collatePatterns(neg, pos, options) { let onlyNegative = filterPatterns(neg, pos, '-', false, options) || []; let onlyPositive = filterPatterns(pos, neg, '', false, options) || []; let intersected = filterPatterns(neg, pos, '-?', true, options) || []; let subpatterns = onlyNegative.concat(intersected).concat(onlyPositive); return subpatterns.join('|'); } function splitToRanges(min, max) { let nines = 1; let zeros = 1; let stop = countNines(min, nines); let stops = new Set([max]); while (min <= stop && stop <= max) { stops.add(stop); nines += 1; stop = countNines(min, nines); } stop = countZeros(max + 1, zeros) - 1; while (min < stop && stop <= max) { stops.add(stop); zeros += 1; stop = countZeros(max + 1, zeros) - 1; } stops = [...stops]; stops.sort(compare); return stops; } /** * Convert a range to a regex pattern * @param {Number} `start` * @param {Number} `stop` * @return {String} */ function rangeToPattern(start, stop, options) { if (start === stop) { return { pattern: start, count: [], digits: 0 }; } let zipped = zip(start, stop); let digits = zipped.length; let pattern = ''; let count = 0; for (let i = 0; i < digits; i++) { let [startDigit, stopDigit] = zipped[i]; if (startDigit === stopDigit) { pattern += startDigit; } else if (startDigit !== '0' || stopDigit !== '9') { pattern += toCharacterClass(startDigit, stopDigit, options); } else { count++; } } if (count) { pattern += options.shorthand === true ? '\\d' : '[0-9]'; } return { pattern, count: [count], digits }; } function splitToPatterns(min, max, tok, options) { let ranges = splitToRanges(min, max); let tokens = []; let start = min; let prev; for (let i = 0; i < ranges.length; i++) { let max = ranges[i]; let obj = rangeToPattern(String(start), String(max), options); let zeros = ''; if (!tok.isPadded && prev && prev.pattern === obj.pattern) { if (prev.count.length > 1) { prev.count.pop(); } prev.count.push(obj.count[0]); prev.string = prev.pattern + toQuantifier(prev.count); start = max + 1; continue; } if (tok.isPadded) { zeros = padZeros(max, tok, options); } obj.string = zeros + obj.pattern + toQuantifier(obj.count); tokens.push(obj); start = max + 1; prev = obj; } return tokens; } function filterPatterns(arr, comparison, prefix, intersection, options) { let result = []; for (let ele of arr) { let { string } = ele; // only push if _both_ are negative... if (!intersection && !contains(comparison, 'string', string)) { result.push(prefix + string); } // or _both_ are positive if (intersection && contains(comparison, 'string', string)) { result.push(prefix + string); } } return result; } /** * Zip strings */ function zip(a, b) { let arr = []; for (let i = 0; i < a.length; i++) arr.push([a[i], b[i]]); return arr; } function compare(a, b) { return a > b ? 1 : b > a ? -1 : 0; } function contains(arr, key, val) { return arr.some(ele => ele[key] === val); } function countNines(min, len) { return Number(String(min).slice(0, -len) + '9'.repeat(len)); } function countZeros(integer, zeros) { return integer - (integer % Math.pow(10, zeros)); } function toQuantifier(digits) { let [start = 0, stop = ''] = digits; if (stop || start > 1) { return `{${start + (stop ? ',' + stop : '')}}`; } return ''; } function toCharacterClass(a, b, options) { return `[${a}${(b - a === 1) ? '' : '-'}${b}]`; } function hasPadding(str) { return /^-?(0+)\d/.test(str); } function padZeros(value, tok, options) { if (!tok.isPadded) { return value; } let diff = Math.abs(tok.maxLen - String(value).length); let relax = options.relaxZeros !== false; switch (diff) { case 0: return ''; case 1: return relax ? '0?' : '0'; case 2: return relax ? '0{0,2}' : '00'; default: { return relax ? `0{0,${diff}}` : `0{${diff}}`; } } } /** * Cache */ toRegexRange.cache = {}; toRegexRange.clearCache = () => (toRegexRange.cache = {}); /** * Expose `toRegexRange` */ module.exports = toRegexRange; node_modules/to-regex-range/README.md 0000664 00000032421 15114741631 0013333 0 ustar 00 # to-regex-range [](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=W8YFZ425KND68) [](https://www.npmjs.com/package/to-regex-range) [](https://npmjs.org/package/to-regex-range) [](https://npmjs.org/package/to-regex-range) [](https://travis-ci.org/micromatch/to-regex-range) > Pass two numbers, get a regex-compatible source string for matching ranges. Validated against more than 2.78 million test assertions. Please consider following this project's author, [Jon Schlinkert](https://github.com/jonschlinkert), and consider starring the project to show your :heart: and support. ## Install Install with [npm](https://www.npmjs.com/): ```sh $ npm install --save to-regex-range ``` <details> <summary><strong>What does this do?</strong></summary> <br> This libary generates the `source` string to be passed to `new RegExp()` for matching a range of numbers. **Example** ```js const toRegexRange = require('to-regex-range'); const regex = new RegExp(toRegexRange('15', '95')); ``` A string is returned so that you can do whatever you need with it before passing it to `new RegExp()` (like adding `^` or `$` boundaries, defining flags, or combining it another string). <br> </details> <details> <summary><strong>Why use this library?</strong></summary> <br> ### Convenience Creating regular expressions for matching numbers gets deceptively complicated pretty fast. For example, let's say you need a validation regex for matching part of a user-id, postal code, social security number, tax id, etc: * regex for matching `1` => `/1/` (easy enough) * regex for matching `1` through `5` => `/[1-5]/` (not bad...) * regex for matching `1` or `5` => `/(1|5)/` (still easy...) * regex for matching `1` through `50` => `/([1-9]|[1-4][0-9]|50)/` (uh-oh...) * regex for matching `1` through `55` => `/([1-9]|[1-4][0-9]|5[0-5])/` (no prob, I can do this...) * regex for matching `1` through `555` => `/([1-9]|[1-9][0-9]|[1-4][0-9]{2}|5[0-4][0-9]|55[0-5])/` (maybe not...) * regex for matching `0001` through `5555` => `/(0{3}[1-9]|0{2}[1-9][0-9]|0[1-9][0-9]{2}|[1-4][0-9]{3}|5[0-4][0-9]{2}|55[0-4][0-9]|555[0-5])/` (okay, I get the point!) The numbers are contrived, but they're also really basic. In the real world you might need to generate a regex on-the-fly for validation. **Learn more** If you're interested in learning more about [character classes](http://www.regular-expressions.info/charclass.html) and other regex features, I personally have always found [regular-expressions.info](http://www.regular-expressions.info/charclass.html) to be pretty useful. ### Heavily tested As of April 07, 2019, this library runs [>1m test assertions](./test/test.js) against generated regex-ranges to provide brute-force verification that results are correct. Tests run in ~280ms on my MacBook Pro, 2.5 GHz Intel Core i7. ### Optimized Generated regular expressions are optimized: * duplicate sequences and character classes are reduced using quantifiers * smart enough to use `?` conditionals when number(s) or range(s) can be positive or negative * uses fragment caching to avoid processing the same exact string more than once <br> </details> ## Usage Add this library to your javascript application with the following line of code ```js const toRegexRange = require('to-regex-range'); ``` The main export is a function that takes two integers: the `min` value and `max` value (formatted as strings or numbers). ```js const source = toRegexRange('15', '95'); //=> 1[5-9]|[2-8][0-9]|9[0-5] const regex = new RegExp(`^${source}$`); console.log(regex.test('14')); //=> false console.log(regex.test('50')); //=> true console.log(regex.test('94')); //=> true console.log(regex.test('96')); //=> false ``` ## Options ### options.capture **Type**: `boolean` **Deafault**: `undefined` Wrap the returned value in parentheses when there is more than one regex condition. Useful when you're dynamically generating ranges. ```js console.log(toRegexRange('-10', '10')); //=> -[1-9]|-?10|[0-9] console.log(toRegexRange('-10', '10', { capture: true })); //=> (-[1-9]|-?10|[0-9]) ``` ### options.shorthand **Type**: `boolean` **Deafault**: `undefined` Use the regex shorthand for `[0-9]`: ```js console.log(toRegexRange('0', '999999')); //=> [0-9]|[1-9][0-9]{1,5} console.log(toRegexRange('0', '999999', { shorthand: true })); //=> \d|[1-9]\d{1,5} ``` ### options.relaxZeros **Type**: `boolean` **Default**: `true` This option relaxes matching for leading zeros when when ranges are zero-padded. ```js const source = toRegexRange('-0010', '0010'); const regex = new RegExp(`^${source}$`); console.log(regex.test('-10')); //=> true console.log(regex.test('-010')); //=> true console.log(regex.test('-0010')); //=> true console.log(regex.test('10')); //=> true console.log(regex.test('010')); //=> true console.log(regex.test('0010')); //=> true ``` When `relaxZeros` is false, matching is strict: ```js const source = toRegexRange('-0010', '0010', { relaxZeros: false }); const regex = new RegExp(`^${source}$`); console.log(regex.test('-10')); //=> false console.log(regex.test('-010')); //=> false console.log(regex.test('-0010')); //=> true console.log(regex.test('10')); //=> false console.log(regex.test('010')); //=> false console.log(regex.test('0010')); //=> true ``` ## Examples | **Range** | **Result** | **Compile time** | | --- | --- | --- | | `toRegexRange(-10, 10)` | `-[1-9]\|-?10\|[0-9]` | _132μs_ | | `toRegexRange(-100, -10)` | `-1[0-9]\|-[2-9][0-9]\|-100` | _50μs_ | | `toRegexRange(-100, 100)` | `-[1-9]\|-?[1-9][0-9]\|-?100\|[0-9]` | _42μs_ | | `toRegexRange(001, 100)` | `0{0,2}[1-9]\|0?[1-9][0-9]\|100` | _109μs_ | | `toRegexRange(001, 555)` | `0{0,2}[1-9]\|0?[1-9][0-9]\|[1-4][0-9]{2}\|5[0-4][0-9]\|55[0-5]` | _51μs_ | | `toRegexRange(0010, 1000)` | `0{0,2}1[0-9]\|0{0,2}[2-9][0-9]\|0?[1-9][0-9]{2}\|1000` | _31μs_ | | `toRegexRange(1, 50)` | `[1-9]\|[1-4][0-9]\|50` | _24μs_ | | `toRegexRange(1, 55)` | `[1-9]\|[1-4][0-9]\|5[0-5]` | _23μs_ | | `toRegexRange(1, 555)` | `[1-9]\|[1-9][0-9]\|[1-4][0-9]{2}\|5[0-4][0-9]\|55[0-5]` | _30μs_ | | `toRegexRange(1, 5555)` | `[1-9]\|[1-9][0-9]{1,2}\|[1-4][0-9]{3}\|5[0-4][0-9]{2}\|55[0-4][0-9]\|555[0-5]` | _43μs_ | | `toRegexRange(111, 555)` | `11[1-9]\|1[2-9][0-9]\|[2-4][0-9]{2}\|5[0-4][0-9]\|55[0-5]` | _38μs_ | | `toRegexRange(29, 51)` | `29\|[34][0-9]\|5[01]` | _24μs_ | | `toRegexRange(31, 877)` | `3[1-9]\|[4-9][0-9]\|[1-7][0-9]{2}\|8[0-6][0-9]\|87[0-7]` | _32μs_ | | `toRegexRange(5, 5)` | `5` | _8μs_ | | `toRegexRange(5, 6)` | `5\|6` | _11μs_ | | `toRegexRange(1, 2)` | `1\|2` | _6μs_ | | `toRegexRange(1, 5)` | `[1-5]` | _15μs_ | | `toRegexRange(1, 10)` | `[1-9]\|10` | _22μs_ | | `toRegexRange(1, 100)` | `[1-9]\|[1-9][0-9]\|100` | _25μs_ | | `toRegexRange(1, 1000)` | `[1-9]\|[1-9][0-9]{1,2}\|1000` | _31μs_ | | `toRegexRange(1, 10000)` | `[1-9]\|[1-9][0-9]{1,3}\|10000` | _34μs_ | | `toRegexRange(1, 100000)` | `[1-9]\|[1-9][0-9]{1,4}\|100000` | _36μs_ | | `toRegexRange(1, 1000000)` | `[1-9]\|[1-9][0-9]{1,5}\|1000000` | _42μs_ | | `toRegexRange(1, 10000000)` | `[1-9]\|[1-9][0-9]{1,6}\|10000000` | _42μs_ | ## Heads up! **Order of arguments** When the `min` is larger than the `max`, values will be flipped to create a valid range: ```js toRegexRange('51', '29'); ``` Is effectively flipped to: ```js toRegexRange('29', '51'); //=> 29|[3-4][0-9]|5[0-1] ``` **Steps / increments** This library does not support steps (increments). A pr to add support would be welcome. ## History ### v2.0.0 - 2017-04-21 **New features** Adds support for zero-padding! ### v1.0.0 **Optimizations** Repeating ranges are now grouped using quantifiers. rocessing time is roughly the same, but the generated regex is much smaller, which should result in faster matching. ## Attribution Inspired by the python library [range-regex](https://github.com/dimka665/range-regex). ## About <details> <summary><strong>Contributing</strong></summary> Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new). </details> <details> <summary><strong>Running Tests</strong></summary> Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command: ```sh $ npm install && npm test ``` </details> <details> <summary><strong>Building docs</strong></summary> _(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_ To generate the readme, run the following command: ```sh $ npm install -g verbose/verb#dev verb-generate-readme && verb ``` </details> ### Related projects You might also be interested in these projects: * [expand-range](https://www.npmjs.com/package/expand-range): Fast, bash-like range expansion. Expand a range of numbers or letters, uppercase or lowercase. Used… [more](https://github.com/jonschlinkert/expand-range) | [homepage](https://github.com/jonschlinkert/expand-range "Fast, bash-like range expansion. Expand a range of numbers or letters, uppercase or lowercase. Used by micromatch.") * [fill-range](https://www.npmjs.com/package/fill-range): Fill in a range of numbers or letters, optionally passing an increment or `step` to… [more](https://github.com/jonschlinkert/fill-range) | [homepage](https://github.com/jonschlinkert/fill-range "Fill in a range of numbers or letters, optionally passing an increment or `step` to use, or create a regex-compatible range with `options.toRegex`") * [micromatch](https://www.npmjs.com/package/micromatch): Glob matching for javascript/node.js. A drop-in replacement and faster alternative to minimatch and multimatch. | [homepage](https://github.com/micromatch/micromatch "Glob matching for javascript/node.js. A drop-in replacement and faster alternative to minimatch and multimatch.") * [repeat-element](https://www.npmjs.com/package/repeat-element): Create an array by repeating the given value n times. | [homepage](https://github.com/jonschlinkert/repeat-element "Create an array by repeating the given value n times.") * [repeat-string](https://www.npmjs.com/package/repeat-string): Repeat the given string n times. Fastest implementation for repeating a string. | [homepage](https://github.com/jonschlinkert/repeat-string "Repeat the given string n times. Fastest implementation for repeating a string.") ### Contributors | **Commits** | **Contributor** | | --- | --- | | 63 | [jonschlinkert](https://github.com/jonschlinkert) | | 3 | [doowb](https://github.com/doowb) | | 2 | [realityking](https://github.com/realityking) | ### Author **Jon Schlinkert** * [GitHub Profile](https://github.com/jonschlinkert) * [Twitter Profile](https://twitter.com/jonschlinkert) * [LinkedIn Profile](https://linkedin.com/in/jonschlinkert) Please consider supporting me on Patreon, or [start your own Patreon page](https://patreon.com/invite/bxpbvm)! <a href="https://www.patreon.com/jonschlinkert"> <img src="https://c5.patreon.com/external/logo/become_a_patron_button@2x.png" height="50"> </a> ### License Copyright © 2019, [Jon Schlinkert](https://github.com/jonschlinkert). Released under the [MIT License](LICENSE). *** _This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.8.0, on April 07, 2019._ node_modules/magic-bytes.js/package.json 0000664 00000004023 15114741631 0014332 0 ustar 00 { "name": "magic-bytes.js", "version": "1.12.1", "main": "./dist/index.js", "module": "./dist/index.js", "types": "./dist/index.d.ts", "files": [ "dist/" ], "release": { "branches": [ "master" ], "plugins": [ "@semantic-release/commit-analyzer", "@semantic-release/release-notes-generator", "@semantic-release/npm", "@semantic-release/github", "@semantic-release/git" ] }, "scripts": { "prettier": "prettier --write \"{src,__{tests,mocks}__}/**/*.{tsx,ts}\"", "pre-test": "jest --clear-cache", "prebuild": "rimraf dist", "test": "jest", "build": "tsc", "example:html": "webpack --config example/html/webpack.config.js; open example/html/index.html", "example:webapp": "vite --config example/webapp/vite.config.js example/webapp", "build:example:webapp": "vite --config example/webapp/vite.config.js build example/webapp", "semantic-release": "semantic-release", "prepare": "npm run build" }, "repository": { "url": "https://github.com/LarsKoelpin/magic-bytes", "type": "git" }, "author": "Lars Kölpin", "license": "MIT", "description": "Detect Filetype by bytes", "keywords": [ "magic-bytes", "mime", "filetype", "file", "extension", "magic byte", "magic number", "mime", "mimetype", "validation", "javascript", "upload" ], "devDependencies": { "@babel/preset-typescript": "^7.15.0", "@commitlint/cli": "^17.7.1", "@commitlint/config-conventional": "^17.7.0", "@semantic-release/git": "^10.0.1", "@types/jest": "^27.5.2", "@types/node": "^16.6.2", "husky": "^8.0.3", "jest": "^27.0.6", "open": "^9.1.0", "prettier": "^2.6.1", "prettier-plugin-organize-imports": "^2.3.4", "regenerator-runtime": "^0.11.1", "semantic-release": "^22.0.5", "ts-jest": "^27.0.5", "ts-loader": "^9.4.4", "ts-node": "^10.2.1", "typescript": "^4.3.5", "vite": "^4.4.9", "webpack-cli": "^5.1.4", "rimraf": "^6.0.1" } } node_modules/magic-bytes.js/LICENSE 0000664 00000002055 15114741631 0013054 0 ustar 00 MIT License Copyright (c) 2022 Lars Kölpin Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. node_modules/magic-bytes.js/dist/index.d.ts.map 0000664 00000001103 15114741631 0015460 0 ustar 00 {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAc,IAAI,EAAE,MAAM,cAAc,CAAC;AAI7D,eAAO,MAAM,YAAY,UAChB,MAAM,EAAE,GAAG,UAAU,GAAG,iBAAiB,KAC/C,WAAW,EAkBb,CAAC;AA0BF,eAAe,YAAY,CAAC;AAE5B,eAAO,MAAM,YAAY,UAChB,MAAM,EAAE,GAAG,UAAU,GAAG,iBAAiB,KAC/C,MAAM,EAAgD,CAAC;AAE1D,eAAO,MAAM,YAAY,UAChB,MAAM,EAAE,GAAG,UAAU,GAAG,iBAAiB,KAC/C,MAAM,EAGiC,CAAC;AAE3C,eAAO,MAAM,iBAAiB,UACrB,MAAM,EAAE,GAAG,UAAU,GAAG,iBAAiB,KAC/C,MAAM,EAGiC,CAAC;AAE3C,eAAO,MAAM,QAAQ,aACT,MAAM,aACL,MAAM,EAAE,mBACF,IAAI,GAAG,SAAS,sCAIlC,CAAA"} node_modules/magic-bytes.js/dist/index.spec.d.ts 0000664 00000000063 15114741631 0015641 0 ustar 00 export {}; //# sourceMappingURL=index.spec.d.ts.map node_modules/magic-bytes.js/dist/index.spec.d.ts.map 0000664 00000000162 15114741631 0016415 0 ustar 00 {"version":3,"file":"index.spec.d.ts","sourceRoot":"","sources":["../src/index.spec.ts"],"names":[],"mappings":""} node_modules/magic-bytes.js/dist/index.d.ts 0000664 00000001230 15114741631 0014705 0 ustar 00 import { GuessedFile, Info } from "./model/tree"; export declare const filetypeinfo: (bytes: number[] | Uint8Array | Uint8ClampedArray) => GuessedFile[]; export default filetypeinfo; export declare const filetypename: (bytes: number[] | Uint8Array | Uint8ClampedArray) => string[]; export declare const filetypemime: (bytes: number[] | Uint8Array | Uint8ClampedArray) => string[]; export declare const filetypeextension: (bytes: number[] | Uint8Array | Uint8ClampedArray) => string[]; export declare const register: (typename: string, signature: string[], additionalInfo?: Info | undefined, offset?: number | undefined) => void; //# sourceMappingURL=index.d.ts.map node_modules/magic-bytes.js/dist/model/pattern-tree.d.ts 0000664 00000000612 15114741631 0017313 0 ustar 00 import { Info, Tree } from "./tree"; declare type TypeName = string; declare type Signature = string[]; export declare const add: (typename: TypeName, signature: Signature, additionalInfo?: Info | undefined, offset?: number | undefined) => void; export declare const createTree: () => Tree; declare const _default: () => Tree; export default _default; //# sourceMappingURL=pattern-tree.d.ts.map node_modules/magic-bytes.js/dist/model/toHex.js 0000664 00000000545 15114741631 0015541 0 ustar 00 "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.fromHex = exports.toHex = void 0; const hex = (num) => new Number(num).toString(16).toLowerCase(); const toHex = (num) => `0x${hex(num).length === 1 ? "0" + hex(num) : hex(num)}`; exports.toHex = toHex; const fromHex = (hex) => new Number(hex); exports.fromHex = fromHex; node_modules/magic-bytes.js/dist/model/tree.spec.d.ts.map 0000664 00000000171 15114741631 0017345 0 ustar 00 {"version":3,"file":"tree.spec.d.ts","sourceRoot":"","sources":["../../src/model/tree.spec.ts"],"names":[],"mappings":""} node_modules/magic-bytes.js/dist/model/pattern-tree.d.ts.map 0000664 00000000564 15114741631 0020075 0 ustar 00 {"version":3,"file":"pattern-tree.d.ts","sourceRoot":"","sources":["../../src/model/pattern-tree.ts"],"names":[],"mappings":"AACA,OAAO,EAAiC,IAAI,EAAS,IAAI,EAAE,MAAM,QAAQ,CAAC;AAQ1E,aAAK,QAAQ,GAAG,MAAM,CAAC;AACvB,aAAK,SAAS,GAAG,MAAM,EAAE,CAAC;AAE1B,eAAO,MAAM,GAAG,aACJ,QAAQ,yCAED,IAAI,GAAG,SAAS,sCAwClC,CAAC;AA2xCF,eAAO,MAAM,UAAU,QAAO,IAAoB,CAAC;8BAChC,IAAI;AAAvB,wBAAwC"} node_modules/magic-bytes.js/dist/model/tree.d.ts 0000664 00000001514 15114741631 0015642 0 ustar 00 export declare type PathlessNewNode = { info: Info; typename: string; }; export declare type NewNode = PathlessNewNode & { bytes: string[]; }; export declare type GuessedFile = Info & { typename: string; }; export declare type Info = { mime?: string; extension?: string; }; export declare type Node = { matches?: GuessedFile[]; bytes: { [nextbyte: string]: Node; }; }; export declare type Tree = { noOffset: Node | null; offset: { [offsetByte: string]: Node; }; }; export declare const merge: (node: NewNode, tree: Node) => Node; export declare const createNode: (typename: string, bytes: string[], info?: Info | undefined) => NewNode; export declare const createComplexNode: (typename: string, bytes: string[], info?: Info | undefined) => Node; //# sourceMappingURL=tree.d.ts.map node_modules/magic-bytes.js/dist/model/tree.spec.js 0000664 00000004307 15114741631 0016342 0 ustar 00 "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); const tree_1 = require("./tree"); describe("tree", () => { it("Creates complex node", () => { const tree = tree_1.createComplexNode("mpe", ["0x00", "0x01"]); expect(tree.bytes["0x00"].bytes["0x01"]).toHaveProperty("matches"); expect(tree.bytes["0x00"].bytes["0x01"]["matches"][0].typename).toBe("mpe"); }); it("Merges trees", () => { const tree = tree_1.createComplexNode("pic", ["0x00"]); const dba = tree_1.createNode("dba", ["0x00", "0x01", "0x02", "0x03"]); const merged = tree_1.merge(dba, tree); expect(merged.bytes["0x00"].matches[0].typename).toBe("pic"); expect(merged.bytes["0x00"].bytes["0x01"].bytes["0x02"].bytes["0x03"].matches[0] .typename).toBe("dba"); }); it("Merges overlapping", () => { const tree = tree_1.createComplexNode("pic", ["0x00"]); const dba = tree_1.createNode("pif", ["0x00"]); const merged = tree_1.merge(dba, tree); expect(merged.bytes["0x00"].matches).toHaveLength(2); }); it("Merges deep overlapping", () => { const gifA = tree_1.createComplexNode("gif", ["0x47", "0x49", "0x46", "0x38", "0x37", "0x61"], { mime: "image/gif", extension: "gif" }); const gifB = tree_1.createNode("gif", ["0x47", "0x49", "0x46", "0x38", "0x38", "0x61"], { mime: "image/gif", extension: "gif" }); const gifC = tree_1.createNode("gif", ["0x47", "0x49", "0x46", "0x38", "0x39", "0x61"], { mime: "image/gif", extension: "gif" }); const mergeA = tree_1.merge(gifB, gifA); const mergeB = tree_1.merge(gifC, mergeA); expect(mergeB.bytes["0x47"].bytes["0x49"].bytes["0x46"].bytes["0x38"].bytes["0x37"].bytes["0x61"].matches[0]).toEqual({ typename: "gif", extension: "gif", mime: "image/gif" }); expect(mergeB.bytes["0x47"].bytes["0x49"].bytes["0x46"].bytes["0x38"].bytes["0x39"].bytes["0x61"].matches[0]).toEqual({ typename: "gif", extension: "gif", mime: "image/gif" }); expect(mergeB.bytes["0x47"].bytes["0x49"].bytes["0x46"].bytes["0x38"].bytes["0x38"].bytes["0x61"].matches[0]).toEqual({ typename: "gif", extension: "gif", mime: "image/gif" }); }); }); node_modules/magic-bytes.js/dist/model/tree.d.ts.map 0000664 00000001556 15114741631 0016424 0 ustar 00 {"version":3,"file":"tree.d.ts","sourceRoot":"","sources":["../../src/model/tree.ts"],"names":[],"mappings":"AAAA,oBAAY,eAAe,GAAG;IAC5B,IAAI,EAAE,IAAI,CAAC;IACX,QAAQ,EAAE,MAAM,CAAC;CAClB,CAAC;AAEF,oBAAY,OAAO,GAAG,eAAe,GAAG;IACtC,KAAK,EAAE,MAAM,EAAE,CAAC;CACjB,CAAC;AAEF,oBAAY,WAAW,GAAG,IAAI,GAAG;IAC/B,QAAQ,EAAE,MAAM,CAAC;CAClB,CAAC;AAEF,oBAAY,IAAI,GAAG;IACjB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,CAAC;AAEF,oBAAY,IAAI,GAAG;IACjB,OAAO,CAAC,EAAE,WAAW,EAAE,CAAC;IACxB,KAAK,EAAE;QACL,CAAC,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;KAC1B,CAAC;CACH,CAAC;AAEF,oBAAY,IAAI,GAAG;IACjB,QAAQ,EAAE,IAAI,GAAG,IAAI,CAAC;IACtB,MAAM,EAAE;QAAE,CAAC,UAAU,EAAE,MAAM,GAAG,IAAI,CAAA;KAAE,CAAC;CACxC,CAAC;AAYF,eAAO,MAAM,KAAK,SAAU,OAAO,QAAQ,IAAI,KAAG,IA4BjD,CAAC;AAEF,eAAO,MAAM,UAAU,aACX,MAAM,SACT,MAAM,EAAE,8BAEd,OAEF,CAAC;AAEF,eAAO,MAAM,iBAAiB,aAClB,MAAM,SACT,MAAM,EAAE,8BAEd,IAmBF,CAAC"} node_modules/magic-bytes.js/dist/model/pattern-tree.js 0000664 00000063235 15114741631 0017071 0 ustar 00 "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.createTree = exports.add = void 0; const toHex_1 = require("./toHex"); const tree_1 = require("./tree"); // https://en.wikipedia.org/wiki/List_of_file_signatures let tree = { noOffset: null, offset: {}, }; const add = (typename, signature, additionalInfo, offset) => { if (offset) { const existing = tree.offset[toHex_1.toHex(offset)]; if (!existing) { tree.offset[toHex_1.toHex(offset)] = tree_1.createComplexNode(typename, signature.map((e) => e.toLowerCase()), additionalInfo); } else { const merged = tree_1.merge(tree_1.createNode(typename, signature.map((e) => e.toLowerCase()), additionalInfo), { ...existing }); tree.offset[toHex_1.toHex(offset)] = merged; } } else { if (tree.noOffset === null) { tree.noOffset = tree_1.createComplexNode(typename, signature.map((e) => e.toLowerCase()), additionalInfo); } else { tree.noOffset = tree_1.merge(tree_1.createNode(typename, signature.map((e) => e.toLowerCase()), additionalInfo), tree.noOffset); } } }; exports.add = add; exports.add("gif", ["0x47", "0x49", "0x46", "0x38", "0x37", "0x61"], { mime: "image/gif", extension: "gif", }); exports.add("gif", ["0x47", "0x49", "0x46", "0x38", "0x39", "0x61"], { mime: "image/gif", extension: "gif", }); exports.add("jpg", ["0xFF", "0xD8", "0xFF"], { mime: "image/jpeg", extension: "jpeg", }); exports.add("webp", [ "0x52", "0x49", "0x46", "0x46", "?", "?", "?", "?", "0x57", "0x45", "0x42", "0x50", ], { mime: "image/webp", extension: "webp" }); exports.add("heif", ["0x66", "0x74", "0x79", "0x70", "0x6D", "0x69", "0x66", "0x31"], { mime: "image/heif", extension: "heif" }, 4); exports.add("heif", ["0x66", "0x74", "0x79", "0x70", "0x68", "0x65", "0x69", "0x63"], { mime: "image/heif", extension: "heic" }, 4); exports.add("rpm", ["0xed", "0xab", "0xee", "0xdb"]); exports.add("bin", ["0x53", "0x50", "0x30", "0x31"], { mime: "application/octet-stream", extension: "bin", }); exports.add("pic", ["0x00"]); exports.add("pif", ["0x00"]); exports.add("sea", ["0x00"]); exports.add("ytr", ["0x00"]); // 66747970 // 6D703432 exports.add("mp4", ["0x66", "0x74", "0x79", "0x70"], { mime: "video/mp4", extension: "mp4" }, 0x4); exports.add("ttf", ["0x00", "0x01", "0x00", "0x00", "0x00"], { mime: "font/ttf", extension: "ttf", }); exports.add("otf", ["0x4F", "0x54", "0x54", "0x4F"], { mime: "font/otf", extension: "otf", }); exports.add("eot", ["0x50", "0x4C"], { mime: "application/vnd.ms-fontobject", extension: "eot", }); exports.add("woff", ["0x77", "0x4F", "0x46", "0x46"], { mime: "font/woff", extension: "woff", }); exports.add("woff2", ["0x77", "0x4F", "0x46", "0x32"], { mime: "font/woff2", extension: "woff2", }); exports.add("pdb", [ "0x00", "0x00", "0x00", "0x00", "0x00", "0x00", "0x00", "0x00", "0x00", "0x00", "0x00", "0x00", "0x00", "0x00", "0x00", "0x00", "0x00", "0x00", "0x00", "0x00", "0x00", "0x00", "0x00", "0x00", ]); exports.add("dba", ["0xBE", "0xBA", "0xFE", "0xCA"]); exports.add("dba2", ["0x00", "0x01", "0x42", "0x44"]); exports.add("tda", ["0x00", "0x01", "0x44", "0x54"]); exports.add("tda2", ["0x00", "0x01", "0x00", "0x00"]); exports.add("ico", ["0x00", "0x00", "0x01", "0x00"], { mime: "image/x-icon", extension: "ico", }); exports.add("3gp", ["0x66", "0x74", "0x79", "0x70", "0x33", "0x67"]); exports.add("z", ["0x1F", "0x9D"]); exports.add("tar.z", ["0x1F", "0xA0"]); exports.add("bac", [ "0x42", "0x41", "0x43", "0x4B", "0x4D", "0x49", "0x4B", "0x45", "0x44", "0x49", "0x53", "0x4B", ]); exports.add("bz2", ["0x42", "0x5A", "0x68"], { mime: "application/x-bzip2", extension: "bz2", }); exports.add("tif", ["0x49", "0x49", "0x2A", "0x00"], { mime: "image/tiff", extension: "tif", }); exports.add("tiff", ["0x4D", "0x4D", "0x00", "0x2A"], { mime: "image/tiff", extension: "tiff", }); exports.add("cr2", [ "0x49", "0x49", "0x2A", "0x00", "0x10", "0x00", "0x00", "0x00", "0x43", "0x52", ]); exports.add("cin", ["0x80", "0x2A", "0x5F", "0xD7"]); exports.add("cin1", ["0x52", "0x4E", "0x43", "0x01"]); exports.add("cin2", ["0x52", "0x4E", "0x43", "0x02"]); exports.add("dpx", ["0x53", "0x44", "0x50", "0x58"]); exports.add("dpx2", ["0x58", "0x50", "0x44", "0x53"]); exports.add("exr", ["0x76", "0x2F", "0x31", "0x01"]); exports.add("bpg", ["0x42", "0x50", "0x47", "0xFB"]); exports.add("ilbm", [ "0x46", "0x4F", "0x52", "0x4D", "?", "?", "?", "?", "0x49", "0x4C", "0x42", "0x4D", ]); exports.add("8svx", [ "0x46", "0x4F", "0x52", "0x4D", "?", "?", "?", "?", "0x38", "0x53", "0x56", "0x58", ]); exports.add("acbm", [ "0x46", "0x4F", "0x52", "0x4D", "?", "?", "?", "?", "0x41", "0x43", "0x42", "0x4D", ]); exports.add("anbm", [ "0x46", "0x4F", "0x52", "0x4D", "?", "?", "?", "?", "0x41", "0x4E", "0x42", "0x4D", ]); exports.add("anim", [ "0x46", "0x4F", "0x52", "0x4D", "?", "?", "?", "?", "0x41", "0x4E", "0x49", "0x4D", ]); exports.add("faxx", [ "0x46", "0x4F", "0x52", "0x4D", "?", "?", "?", "?", "0x46", "0x41", "0x58", "0x58", ]); exports.add("ftxt", [ "0x46", "0x4F", "0x52", "0x4D", "?", "?", "?", "?", "0x46", "0x54", "0x58", "0x54", ]); exports.add("smus", [ "0x46", "0x4F", "0x52", "0x4D", "?", "?", "?", "?", "0x53", "0x4D", "0x55", "0x53", ]); exports.add("cmus", [ "0x46", "0x4F", "0x52", "0x4D", "?", "?", "?", "?", "0x43", "0x4D", "0x55", "0x53", ]); exports.add("yuvn", [ "0x46", "0x4F", "0x52", "0x4D", "?", "?", "?", "?", "0x59", "0x55", "0x56", "0x4E", ]); exports.add("iff", [ "0x46", "0x4F", "0x52", "0x4D", "?", "?", "?", "?", "0x46", "0x41", "0x4E", "0x54", ]); exports.add("aiff", [ "0x46", "0x4F", "0x52", "0x4D", "?", "?", "?", "?", "0x41", "0x49", "0x46", "0x46", ], { mime: "audio/x-aiff", extension: "aiff" }); exports.add("idx", ["0x49", "0x4E", "0x44", "0x58"]); exports.add("lz", ["0x4C", "0x5A", "0x49", "0x50"]); exports.add("exe", ["0x4D", "0x5A"]); exports.add("zip", ["0x50", "0x4B", "0x03", "0x04"], { mime: "application/zip", extension: "zip", }); exports.add("zip", ["0x50", "0x4B", "0x05", "0x06"], { mime: "application/zip", extension: "zip", }); exports.add("zip", ["0x50", "0x4B", "0x07", "0x08"], { mime: "application/zip", extension: "zip", }); exports.add("jar", ["0x50", "0x4B", "0x03", "0x04"], { mime: "application/java-archive", extension: "jar", }); exports.add("jar", ["0x50", "0x4B", "0x05", "0x06"], { mime: "application/java-archive", extension: "jar", }); exports.add("jar", ["0x50", "0x4B", "0x07", "0x08"], { mime: "application/java-archive", extension: "jar", }); exports.add("odt", ["0x50", "0x4B", "0x03", "0x04"], { mime: "application/vnd.oasis.opendocument.text", extension: "odt", }); exports.add("odt", ["0x50", "0x4B", "0x05", "0x06"], { mime: "application/vnd.oasis.opendocument.text", extension: "odt", }); exports.add("odt", ["0x50", "0x4B", "0x07", "0x08"], { mime: "application/vnd.oasis.opendocument.text", extension: "odt", }); exports.add("ods", ["0x50", "0x4B", "0x03", "0x04"], { mime: "application/vnd.oasis.opendocument.spreadsheet", extension: "ods", }); exports.add("ods", ["0x50", "0x4B", "0x05", "0x06"], { mime: "application/vnd.oasis.opendocument.spreadsheet", extension: "ods", }); exports.add("ods", ["0x50", "0x4B", "0x07", "0x08"], { mime: "application/vnd.oasis.opendocument.spreadsheet", extension: "ods", }); exports.add("odp", ["0x50", "0x4B", "0x03", "0x04"], { mime: "application/vnd.oasis.opendocument.presentation", extension: "odp", }); exports.add("odp", ["0x50", "0x4B", "0x05", "0x06"], { mime: "application/vnd.oasis.opendocument.presentation", extension: "odp", }); exports.add("odp", ["0x50", "0x4B", "0x07", "0x08"], { mime: "application/vnd.oasis.opendocument.presentation", extension: "odp", }); exports.add("docx", ["0x50", "0x4B", "0x03", "0x04"], { mime: "application/vnd.openxmlformats-officedocument.wordprocessingml.document", extension: "docx", }); exports.add("docx", ["0x50", "0x4B", "0x05", "0x06"], { mime: "application/vnd.openxmlformats-officedocument.wordprocessingml.document", extension: "docx", }); exports.add("docx", ["0x50", "0x4B", "0x07", "0x08"], { mime: "application/vnd.openxmlformats-officedocument.wordprocessingml.document", extension: "docx", }); exports.add("xlsx", ["0x50", "0x4B", "0x03", "0x04"], { mime: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet", extension: "xlsx", }); exports.add("xlsx", ["0x50", "0x4B", "0x05", "0x06"], { mime: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet", extension: "xlsx", }); exports.add("xlsx", ["0x50", "0x4B", "0x07", "0x08"], { mime: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet", extension: "xlsx", }); exports.add("pptx", ["0x50", "0x4B", "0x03", "0x04"], { mime: "application/vnd.openxmlformats-officedocument.presentationml.presentation", extension: "pptx", }); exports.add("pptx", ["0x50", "0x4B", "0x05", "0x06"], { mime: "application/vnd.openxmlformats-officedocument.presentationml.presentation", extension: "pptx", }); exports.add("pptx", ["0x50", "0x4B", "0x07", "0x08"], { mime: "application/vnd.openxmlformats-officedocument.presentationml.presentation", extension: "pptx", }); exports.add("vsdx", ["0x50", "0x4B", "0x03", "0x04"], { mime: "application/vnd.ms-visio.drawing", extension: "vsdx", }); exports.add("vsdx", ["0x50", "0x4B", "0x05", "0x06"], { mime: "application/vnd.ms-visio.drawing", extension: "vsdx", }); exports.add("vsdx", ["0x50", "0x4B", "0x07", "0x08"], { mime: "application/vnd.ms-visio.drawing", extension: "vsdx", }); exports.add("apk", ["0x50", "0x4B", "0x03", "0x04"], { mime: "application/vnd.android.package-archive", extension: "apk", }); exports.add("apk", ["0x50", "0x4B", "0x05", "0x06"], { mime: "application/vnd.android.package-archive", extension: "apk", }); exports.add("apk", ["0x50", "0x4B", "0x07", "0x08"], { mime: "application/vnd.android.package-archive", extension: "apk", }); exports.add("aar", ["0x50", "0x4B", "0x03", "0x04"], { mime: "application/vnd.android.package-archive", extension: "aar", }); exports.add("aar", ["0x50", "0x4B", "0x05", "0x06"], { mime: "application/vnd.android.package-archive", extension: "aar", }); exports.add("aar", ["0x50", "0x4B", "0x07", "0x08"], { mime: "application/vnd.android.package-archive", extension: "aar", }); exports.add("rar", ["0x52", "0x61", "0x72", "0x21", "0x1A", "0x07", "0x00"], { mime: "application/vnd.rar", extension: "rar", }); exports.add("rar", ["0x52", "0x61", "0x72", "0x21", "0x1A", "0x07", "0x01", "0x00"], { mime: "application/vnd.rar", extension: "rar", }); exports.add("rar", ["0x7F", "0x45", "0x4C", "0x46"], { mime: "application/vnd.rar", extension: "rar", }); exports.add("png", ["0x89", "0x50", "0x4E", "0x47", "0x0D", "0x0A", "0x1A", "0x0A"], { mime: "image/png", extension: "png", }); exports.add("apng", ["0x89", "0x50", "0x4E", "0x47", "0x0D", "0x0A", "0x1A", "0x0A"], { mime: "image/apng", extension: "apng", }); exports.add("class", ["0xCA", "0xFE", "0xBA", "0xBE"]); exports.add("class", ["0xEF", "0xBB", "0xBF"]); exports.add("class", ["0xFE", "0xed", "0xFA", "0xCE"], undefined, 0x1000); exports.add("class", ["0xFE", "0xed", "0xFA", "0xCF"], undefined, 0x1000); exports.add("class", ["0xCE", "0xFA", "0xed", "0xFE"]); exports.add("class", ["0xCF", "0xFA", "0xed", "0xFE"]); exports.add("class", ["0xFF", "0xFE"]); exports.add("class", ["0xFF", "0xFE"]); exports.add("class", ["0xFF", "0xFE", "0x00", "0x00"]); exports.add("ps", ["0x25", "0x21", "0x50", "0x53"], { mime: "application/postscript", extension: ".ps", }); exports.add("pdf", ["0x25", "0x50", "0x44", "0x46"], { mime: "application/pdf", extension: "pdf", }); exports.add("asf", [ "0x30", "0x26", "0xB2", "0x75", "0x8E", "0x66", "0xCF", "0x11", "0xA6", "0xD9", "0x00", "0xAA", "0x00", "0x62", "0xCE", "0x6C", ]); exports.add("wma", [ "0x30", "0x26", "0xB2", "0x75", "0x8E", "0x66", "0xCF", "0x11", "0xA6", "0xD9", "0x00", "0xAA", "0x00", "0x62", "0xCE", "0x6C", ]); exports.add("wmv", [ "0x30", "0x26", "0xB2", "0x75", "0x8E", "0x66", "0xCF", "0x11", "0xA6", "0xD9", "0x00", "0xAA", "0x00", "0x62", "0xCE", "0x6C", ]); exports.add("deploymentimage", [ "0x24", "0x53", "0x44", "0x49", "0x30", "0x30", "0x30", "0x31", ]); // ogg video ' theora' exports.add("ogv", [ "0x4F", "0x67", "0x67", "0x53", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "0x80", "0x74", "0x68", "0x65", "0x6F", "0x72", "0x61", ], { mime: "video/ogg", extension: "ogv", }); // ogg video '\x01video' exports.add("ogm", [ "0x4F", "0x67", "0x67", "0x53", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "0x01", "0x76", "0x69", "0x64", "0x65", "0x6F", "0x00", ], { mime: "video/ogg", extension: "ogm", }); // ogg audio ' FLAC' exports.add("oga", [ "0x4F", "0x67", "0x67", "0x53", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "0x7F", "0x46", "0x4C", "0x41", "0x43", ], { mime: "audio/ogg", extension: "oga", }); // ogg audio 'Speex ' exports.add("spx", [ "0x4F", "0x67", "0x67", "0x53", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "0x53", "0x70", "0x65", "0x65", "0x78", "0x20", "0x20", ], { mime: "audio/ogg", extension: "spx", }); // ogg audio '\x01vorbis ' exports.add("ogg", [ "0x4F", "0x67", "0x67", "0x53", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "0x01", "0x76", "0x6F", "0x72", "0x62", "0x69", "0x73", ], { mime: "audio/ogg", extension: "ogg", }); // default OGG container exports.add("ogx", ["0x4F", "0x67", "0x67", "0x53"], { mime: "application/ogg", extension: "ogx", }); exports.add("psd", ["0x38", "0x42", "0x50", "0x53"], { mime: "application/x-photoshop", extension: "psd", }); exports.add("clip", ["0x43", "0x53", "0x46", "0x43", "0x48", "0x55", "0x4e", "0x4b"]); exports.add("wav", [ "0x52", "0x49", "0x46", "0x46", "?", "?", "?", "?", "0x57", "0x41", "0x56", "0x45", ], { mime: "audio/x-wav", extension: "wav" }); exports.add("avi", [ "0x52", "0x49", "0x46", "0x46", "?", "?", "?", "?", "0x41", "0x56", "0x49", "0x20", ], { mime: "video/x-msvideo", extension: "avi" }); exports.add("mp3", ["0xFF", "0xFB"], { mime: "audio/mpeg", extension: "mp3" }); exports.add("mp3", ["0xFF", "0xF3"], { mime: "audio/mpeg", extension: "mp3" }); exports.add("mp3", ["0xFF", "0xF2"], { mime: "audio/mpeg", extension: "mp3" }); exports.add("mp3", ["0x49", "0x44", "0x33"], { mime: "audio/mpeg", extension: "mp3" }); exports.add("bmp", ["0x42", "0x4D"], { mime: "image/bmp", extension: "bmp" }); exports.add("iso", ["0x43", "0x44", "0x30", "0x30", "0x31"]); exports.add("flac", ["0x66", "0x4C", "0x61", "0x43"]); exports.add("mid", ["0x4D", "0x54", "0x68", "0x64"], { mime: "audio/midi", extension: "mid", }); exports.add("midi", ["0x4D", "0x54", "0x68", "0x64"], { mime: "audio/midi", extension: "midi", }); exports.add("doc", ["0xD0", "0xCF", "0x11", "0xE0", "0xA1", "0xB1", "0x1A", "0xE1"], { mime: "application/msword", extension: "doc", }); exports.add("xls", ["0xD0", "0xCF", "0x11", "0xE0", "0xA1", "0xB1", "0x1A", "0xE1"], { mime: "application/vnd.ms-excel", extension: "xls", }); exports.add("ppt", ["0xD0", "0xCF", "0x11", "0xE0", "0xA1", "0xB1", "0x1A", "0xE1"], { mime: "application/vnd.ms-powerpoint", extension: "ppt", }); exports.add("msg", ["0xD0", "0xCF", "0x11", "0xE0", "0xA1", "0xB1", "0x1A", "0xE1"]); exports.add("dex", ["0x64", "0x65", "0x78", "0x0A", "0x30", "0x33", "0x35", "0x00"]); exports.add("vmdk", ["0x4B", "0x44", "0x4D"]); exports.add("crx", ["0x43", "0x72", "0x32", "0x34"]); exports.add("fh8", ["0x41", "0x47", "0x44", "0x33"]); exports.add("cwk", [ "0x05", "0x07", "0x00", "0x00", "0x42", "0x4F", "0x42", "0x4F", "0x05", "0x07", "0x00", "0x00", "0x00", "0x00", "0x00", "0x00", "0x00", "0x00", "0x00", "0x00", "0x00", "0x01", ]); exports.add("cwk", [ "0x06", "0x07", "0xE1", "0x00", "0x42", "0x4F", "0x42", "0x4F", "0x06", "0x07", "0xE1", "0x00", "0x00", "0x00", "0x00", "0x00", "0x00", "0x00", "0x00", "0x00", "0x00", "0x01", ]); exports.add("toast", ["0x45", "0x52", "0x02", "0x00", "0x00", "0x00"]); exports.add("toast", ["0x8B", "0x45", "0x52", "0x02", "0x00", "0x00", "0x00"]); exports.add("dmg", ["0x78", "0x01", "0x73", "0x0D", "0x62", "0x62", "0x60"]); exports.add("xar", ["0x78", "0x61", "0x72", "0x21"]); exports.add("dat", ["0x50", "0x4D", "0x4F", "0x43", "0x43", "0x4D", "0x4F", "0x43"]); exports.add("nes", ["0x4E", "0x45", "0x53", "0x1A"]); exports.add("tar", ["0x75", "0x73", "0x74", "0x61", "0x72", "0x00", "0x30", "0x30"], { // As per Mozilla documentation available at: // https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types/Common_types // or wikipedia page: // https://en.wikipedia.org/wiki/List_of_archive_formats mime: "application/x-tar", extension: "tar", }, 0x101); exports.add("tar", ["0x75", "0x73", "0x74", "0x61", "0x72", "0x20", "0x20", "0x00"], { mime: "application/x-tar", extension: "tar", }, 0x101); exports.add("tox", ["0x74", "0x6F", "0x78", "0x33"]); exports.add("mlv", ["0x4D", "0x4C", "0x56", "0x49"]); exports.add("windowsupdate", [ "0x44", "0x43", "0x4D", "0x01", "0x50", "0x41", "0x33", "0x30", ]); exports.add("7z", ["0x37", "0x7A", "0xBC", "0xAF", "0x27", "0x1C"], { mime: "application/x-7z-compressed", extension: "7z", }); exports.add("gz", ["0x1F", "0x8B"], { mime: "application/gzip", extension: "gz" }); exports.add("tar.gz", ["0x1F", "0x8B"], { mime: "application/gzip", extension: "tar.gz", }); exports.add("xz", ["0xFD", "0x37", "0x7A", "0x58", "0x5A", "0x00", "0x00"], { mime: "application/gzip", extension: "xz", }); exports.add("tar.xz", ["0xFD", "0x37", "0x7A", "0x58", "0x5A", "0x00", "0x00"], { mime: "application/gzip", extension: "tar.xz", }); exports.add("lz2", ["0x04", "0x22", "0x4D", "0x18"]); exports.add("cab", ["0x4D", "0x53", "0x43", "0x46"]); exports.add("mkv", ["0x1A", "0x45", "0xDF", "0xA3"], { mime: "video/x-matroska", extension: "mkv", }); exports.add("mka", ["0x1A", "0x45", "0xDF", "0xA3"], { mime: "audio/x-matroska", extension: "mka", }); exports.add("mks", ["0x1A", "0x45", "0xDF", "0xA3"], { mime: "video/x-matroska", extension: "mks", }); exports.add("mk3d", ["0x1A", "0x45", "0xDF", "0xA3"]); exports.add("webm", ["0x1A", "0x45", "0xDF", "0xA3"], { mime: "audio/webm", extension: "webm", }); exports.add("dcm", ["0x44", "0x49", "0x43", "0x4D"], undefined, 0x80); exports.add("xml", ["0x3C", "0x3f", "0x78", "0x6d", "0x6C", "0x20"], { mime: "application/xml", extension: "xml", }); exports.add("wasm", ["0x00", "0x61", "0x73", "0x6d"], { mime: "application/wasm", extension: "wasm", }); exports.add("lep", ["0xCF", "0x84", "0x01"]); exports.add("swf", ["0x43", "0x57", "0x53"], { mime: "application/x-shockwave-flash", extension: "swf", }); exports.add("swf", ["0x46", "0x57", "0x53"], { mime: "application/x-shockwave-flash", extension: "swf", }); exports.add("deb", ["0x21", "0x3C", "0x61", "0x72", "0x63", "0x68", "0x3E"]); exports.add("rtf", ["0x7B", "0x5C", "0x72", "0x74", "0x66", "0x31"], { mime: "application/rtf", extension: "rtf", }); exports.add("m2p", ["0x00", "0x00", "0x01", "0xBA"]); exports.add("vob", ["0x00", "0x00", "0x01", "0xBA"]); exports.add("mpg", ["0x00", "0x00", "0x01", "0xBA"], { mime: "video/mpeg", extension: "mpg", }); exports.add("mpeg", ["0x00", "0x00", "0x01", "0xBA"], { mime: "video/mpeg", extension: "mpeg", }); exports.add("mpeg", ["0x47"], { mime: "video/mpeg", extension: "mpeg" }); exports.add("mpeg", ["0x00", "0x00", "0x01", "0xB3"], { mime: "video/mpeg", extension: "mpeg", }); // mov 'free' TODO: find test file exports.add("mov", ["0x66", "0x72", "0x65", "0x65"], { mime: "video/quicktime", extension: "mov", }, 0x4); // mov 'mdat' exports.add("mov", ["0x6D", "0x64", "0x61", "0x74"], { mime: "video/quicktime", extension: "mov", }, 0x4); // mov 'moov' TODO: find test file exports.add("mov", ["0x6D", "0x6F", "0x6F", "0x76"], { mime: "video/quicktime", extension: "mov", }, 0x4); // move 'wide' TODO: find test file exports.add("mov", ["0x77", "0x69", "0x64", "0x65"], { mime: "video/quicktime", extension: "mov", }, 0x4); // mov 'ftypqt' exports.add("mov", ["0x66", "0x74", "0x79", "0x70", "0x71", "0x74"], { mime: "video/quicktime", extension: "mov", }, 0x4); exports.add("hl2demo", ["0x48", "0x4C", "0x32", "0x44", "0x45", "0x4D", "0x4F"]); exports.add("txt", ["0xEF", "0xBB", "0xBF"], { mime: "text/plain; charset=UTF-8", extension: "txt", }); exports.add("txt", ["0xFF", "0xFE"], { mime: "text/plain; charset=UTF-16LE", extension: "txt", }); exports.add("txt", ["0xFE", "0xFF"], { mime: "text/plain; charset=UTF-16BE", extension: "txt", }); exports.add("txt", ["0xFF", "0xFE", "0x00", "0x00"], { mime: "text/plain; charset=UTF-32LE", extension: "txt", }); exports.add("txt", ["0x00", "0x00", "0xFE", "0xFF"], { mime: "text/plain; charset=UTF-32BE", extension: "txt", }); exports.add("SubRip", ["0x31", "0x0D", "0x0A", "0x30", "0x30", "0x3A"], { mime: "application/x-subrip", extension: "srt", }); exports.add("WebVTT", [ "0xEF", "0xBB", "0xBF", "0x57", "0x45", "0x42", "0x56", "0x54", "0x54", "0x0A", ], { mime: "text/vtt", extension: "vtt", }); exports.add("WebVTT", [ "0xEF", "0xBB", "0xBF", "0x57", "0x45", "0x42", "0x56", "0x54", "0x54", "0x0D", ], { mime: "text/vtt", extension: "vtt", }); exports.add("WebVTT", [ "0xEF", "0xBB", "0xBF", "0x57", "0x45", "0x42", "0x56", "0x54", "0x54", "0x20", ], { mime: "text/vtt", extension: "vtt", }); exports.add("WebVTT", [ "0xEF", "0xBB", "0xBF", "0x57", "0x45", "0x42", "0x56", "0x54", "0x54", "0x09", ], { mime: "text/vtt", extension: "vtt", }); exports.add("WebVTT", ["0x57", "0x45", "0x42", "0x56", "0x54", "0x54", "0x0A"], { mime: "text/vtt", extension: "vtt", }); exports.add("WebVTT", ["0x57", "0x45", "0x42", "0x56", "0x54", "0x54", "0x0D"], { mime: "text/vtt", extension: "vtt", }); exports.add("WebVTT", ["0x57", "0x45", "0x42", "0x56", "0x54", "0x54", "0x20"], { mime: "text/vtt", extension: "vtt", }); exports.add("WebVTT", ["0x57", "0x45", "0x42", "0x56", "0x54", "0x54", "0x09"], { mime: "text/vtt", extension: "vtt", }); exports.add("Json", ["0x7B"], { mime: "application/json", extension: ".json", }); exports.add("Json", ["0x5B"], { mime: "application/json", extension: ".json", }); exports.add("ELF", ["0x7F", "0x45", "0x4C", "0x46"], { mime: "application/x-executable", extension: ".elf", }); exports.add("Mach-O", ["0xFE", "0xED", "0xFA", "0xC"], { mime: "application/x-mach-binary", extension: ".o", }); exports.add("Mach-O", ["0xFE", "0xED", "0xFA", "0xCF"], { mime: "application/x-executable", extension: "elf", }); exports.add("EML", ["0x52", "0x65", "0x63", "0x65", "0x69", "0x76", "0x65", "0x64", "0x3A"], { mime: "message/rfc822", extension: ".eml", }); exports.add("SVG", ["0x3c", "0x73", "0x76", "0x67"], { mime: "image/svg+xml", extension: "svg", }); exports.add("avif", ["0x66", "0x74", "0x79", "0x70", "0x61", "0x76", "0x69", "0x66"], { mime: "image/avif", extension: "avif", }, 4); const createTree = () => tree; exports.createTree = createTree; exports.default = () => tree; node_modules/magic-bytes.js/dist/model/tree.js 0000664 00000003756 15114741631 0015420 0 ustar 00 "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.createComplexNode = exports.createNode = exports.merge = void 0; const createMatch = (leaf) => ({ typename: leaf.typename, mime: leaf.info.mime, extension: leaf.info.extension, }); const isLeafNode = (tree, path) => tree && path.length === 0; const merge = (node, tree) => { if (node.bytes.length === 0) return tree; const [currentByte, ...path] = node.bytes; const currentTree = tree.bytes[currentByte]; // traversed to end. Just add key to leaf. if (isLeafNode(currentTree, path)) { const matchingNode = tree.bytes[currentByte]; tree.bytes[currentByte] = { ...matchingNode, matches: [ ...(matchingNode.matches ?? []), createMatch(node), ], }; return tree; } // Path exists already, Merge subtree if (tree.bytes[currentByte]) { tree.bytes[currentByte] = exports.merge(exports.createNode(node.typename, path, node.info), tree.bytes[currentByte]); } else { // Tree did not exist before tree.bytes[currentByte] = exports.createComplexNode(node.typename, path, node.info); } return tree; }; exports.merge = merge; const createNode = (typename, bytes, info) => { return { typename, bytes, info: info ? info : {} }; }; exports.createNode = createNode; const createComplexNode = (typename, bytes, info) => { let obj = { bytes: {}, matches: undefined, }; const [currentKey, ...path] = bytes; if (bytes.length === 0) { return { matches: [ createMatch({ typename: typename, info: info ? { extension: info.extension, mime: info.mime } : {}, }), ], bytes: {}, }; } obj.bytes[currentKey] = exports.createComplexNode(typename, path, info); return obj; }; exports.createComplexNode = createComplexNode; node_modules/magic-bytes.js/dist/model/toHex.d.ts.map 0000664 00000000310 15114741631 0016537 0 ustar 00 {"version":3,"file":"toHex.d.ts","sourceRoot":"","sources":["../../src/model/toHex.ts"],"names":[],"mappings":"AACA,eAAO,MAAM,KAAK,QAAS,MAAM,KAAG,MACsB,CAAC;AAC3D,eAAO,MAAM,OAAO,QAAS,MAAM,WAA8B,CAAC"} node_modules/magic-bytes.js/dist/model/tree.spec.d.ts 0000664 00000000062 15114741631 0016570 0 ustar 00 export {}; //# sourceMappingURL=tree.spec.d.ts.map node_modules/magic-bytes.js/dist/model/toHex.d.ts 0000664 00000000217 15114741631 0015771 0 ustar 00 export declare const toHex: (num: number) => string; export declare const fromHex: (hex: string) => number; //# sourceMappingURL=toHex.d.ts.map node_modules/magic-bytes.js/dist/index.spec.js 0000664 00000030150 15114741631 0015405 0 ustar 00 "use strict"; var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { if (k2 === undefined) k2 = k; Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); }) : (function(o, m, k, k2) { if (k2 === undefined) k2 = k; o[k2] = m[k]; })); var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); var __importStar = (this && this.__importStar) || function (mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); __setModuleDefault(result, mod); return result; }; Object.defineProperty(exports, "__esModule", { value: true }); const fs = __importStar(require("fs")); const index_1 = require("./index"); const getBytes = (filename) => { const file = require.resolve(`./testfiles/${filename}`); const buffer = fs.readFileSync(file); return Array.prototype.slice.call(buffer, 0); }; describe("Tests the public API", () => { it("detects woff", () => { const bytes = getBytes("font.woff"); const [result] = index_1.filetypeinfo(bytes); expect(result).toBeDefined(); expect(result).toStrictEqual({ typename: "woff", mime: "font/woff", extension: "woff", }); }); it("detects woff2", () => { const bytes = getBytes("inter.woff2"); const [result] = index_1.filetypeinfo(bytes); expect(result).toBeDefined(); expect(result).toStrictEqual({ typename: "woff2", mime: "font/woff2", extension: "woff2", }); }); it("detects tar with offset", () => { const bytes = getBytes("a.tar"); const [result] = index_1.filetypeinfo(bytes); expect(result).toBeDefined(); expect(result.typename).toBe("tar"); }); it("detects apng", () => { const bytes = getBytes("a.apng"); const result = index_1.filetypeinfo(bytes); expect(result).toHaveLength(2); const [png, apng] = result; expect(png.typename).toBe("png"); expect(png.mime).toBe("image/png"); expect(apng.typename).toBe("apng"); expect(apng.mime).toBe("image/apng"); }); it("detects mp4", () => { const bytes = getBytes("a.mp4"); const [result] = index_1.filetypeinfo(bytes); expect(result).toBeDefined(); expect(result.typename).toBe("mp4"); expect(result.mime).toBe("video/mp4"); }); describe("detects ogg containers", () => { it("detects ogv", () => { const bytes = getBytes("a.ogv"); const [result] = index_1.filetypeinfo(bytes); expect(result).toBeDefined(); expect(result.typename).toBe("ogv"); expect(result.mime).toBe("video/ogg"); }); it("detects ogm", () => { const bytes = getBytes("a.ogm"); const [result] = index_1.filetypeinfo(bytes); expect(result).toBeDefined(); expect(result.typename).toBe("ogm"); expect(result.mime).toBe("video/ogg"); }); it("detects oga", () => { const bytes = getBytes("a.oga"); const [result] = index_1.filetypeinfo(bytes); expect(result).toBeDefined(); expect(result.typename).toBe("oga"); expect(result.mime).toBe("audio/ogg"); }); it("detects spx", () => { const bytes = getBytes("a.spx"); const [result] = index_1.filetypeinfo(bytes); expect(result).toBeDefined(); expect(result.typename).toBe("spx"); expect(result.mime).toBe("audio/ogg"); }); it("detects ogg", () => { const bytes = getBytes("a.ogg"); const [result] = index_1.filetypeinfo(bytes); expect(result).toBeDefined(); expect(result.typename).toBe("ogg"); expect(result.mime).toBe("audio/ogg"); }); it("detects ogx", () => { const bytes = getBytes("a.ogx"); const [result] = index_1.filetypeinfo(bytes); expect(result).toBeDefined(); expect(result.typename).toBe("ogx"); expect(result.mime).toBe("application/ogg"); }); }); describe("detects mov", () => { it("detects mov (moov)", () => { const bytes = getBytes("a.moov.mov"); const [result] = index_1.filetypeinfo(bytes); expect(result).toBeDefined(); expect(result.typename).toBe("mov"); expect(result.extension).toBe("mov"); expect(result.mime).toBe("video/quicktime"); }); it("detects mov (mdat)", () => { const bytes = getBytes("a.mdat.mov"); const [result] = index_1.filetypeinfo(bytes); expect(result).toBeDefined(); expect(result.typename).toBe("mov"); expect(result.extension).toBe("mov"); expect(result.mime).toBe("video/quicktime"); }); it("detects mov (ftypqt)", () => { const bytes = getBytes("a.ftypqt.mov"); const [result] = index_1.filetypeinfo(bytes); expect(result).toBeDefined(); expect(result.typename).toBe("mov"); expect(result.extension).toBe("mov"); expect(result.mime).toBe("video/quicktime"); }); }); it("filetypeinfo", () => { const bytes = [0x89, 0x50, 0x4e, 0x47, 0x0d, 0x0a, 0x1a, 0x0a]; const result = index_1.filetypeinfo(bytes); expect(result).toHaveLength(2); expect(result[0]).toHaveProperty("typename"); }); it("filetypename", () => { const bytes = [0x89, 0x50, 0x4e, 0x47, 0x0d, 0x0a, 0x1a, 0x0a]; const result = index_1.filetypename(bytes); expect(result).toHaveLength(2); expect(result).toEqual(["png", "apng"]); }); it("filetypename failure", () => { const bytes = [0x89, 0x00, 0x4e, 0x47, 0x0d, 0x0a, 0x1a, 0x0a]; const result = index_1.filetypename(bytes); expect(result).toHaveLength(0); expect(result).toEqual([]); }); it("filetypemime", () => { const bytes = [0x89, 0x50, 0x4e, 0x47, 0x0d, 0x0a, 0x1a, 0x0a]; const result = index_1.filetypemime(bytes); expect(result).toHaveLength(2); expect(result).toEqual(["image/png", "image/apng"]); }); it("filetypemime not found", () => { const bytes = [0x89, 0x50, 0x00, 0x47, 0x00, 0x0a, 0x1a, 0x0a]; const result = index_1.filetypemime(bytes); expect(result).toHaveLength(0); expect(result).toEqual([]); }); it("filetypeextension", () => { const bytes = [0x89, 0x50, 0x4e, 0x47, 0x0d, 0x0a, 0x1a, 0x0a]; const result = index_1.filetypeextension(bytes); expect(result).toHaveLength(2); expect(result).toEqual(["png", "apng"]); }); it("filetypeextension not found", () => { const bytes = [0x89, 0x50, 0x4e, 0x47, 0x00, 0x0a, 0x1a, 0x0a]; const result = index_1.filetypeextension(bytes); expect(result).toHaveLength(0); expect(result).toEqual([]); }); it("detects utf8", () => { const file = getBytes("a.utf8"); const result = index_1.filetypemime(file); expect(result).toContain("text/plain; charset=UTF-8"); }); it("detects utf16le", () => { const file = getBytes("a.utf16le"); const result = index_1.filetypemime(file); expect(result).toContain("text/plain; charset=UTF-16LE"); }); it("detects utf16be", () => { const file = getBytes("a.utf16be"); const result = index_1.filetypemime(file); expect(result).toContain("text/plain; charset=UTF-16BE"); }); it("detects json object", () => { const fileObj = getBytes("a.json"); const fileArray = getBytes("a_array.json"); const result = index_1.filetypemime(fileObj); const result2 = index_1.filetypemime(fileArray); expect(result).toContain("application/json"); expect(result2).toContain("application/json"); }); it("detects srt", () => { const file = getBytes("a.srt"); const result = index_1.filetypemime(file); expect(result).toContain("application/x-subrip"); }); it("detects vtt", () => { const file = getBytes("a.vtt"); const result = index_1.filetypemime(file); expect(result).toContain("text/vtt"); }); it("detects jpeg (photoshop)", () => { // File created with Adobe Photoshop 2024 via "Save As" menu const file = getBytes("photoshop.jpg"); const result = index_1.filetypemime(file); expect(result).toContain("image/jpeg"); }); it("detects jpeg (photoshop export)", () => { // File created with Adobe Photoshop 2024 via "Export As" menu const file = getBytes("photoshop-export.jpg"); const result = index_1.filetypemime(file); expect(result).toContain("image/jpeg"); }); it("detects jpeg (png2jpg)", () => { // File created using https://png2jpg.com const file = getBytes("png2jpg.jpg"); const result = index_1.filetypemime(file); expect(result).toContain("image/jpeg"); }); describe("add new custom types", () => { beforeAll(() => { index_1.register('customNoInfo', ["0xde", "0xad", "0xbe", "0xef"]); index_1.register('customMime', ["0x12", "0x34", "0x56", "0x78"], { mime: 'application/vnd-custom', extension: '.cust' }); index_1.register('customOffset', ["0xab", "0xcb"], { mime: 'application/vnd-custom-offset', extension: '.custoff' }, 2); }); it("detects customNoInfo file", () => { const bytes = [0xde, 0xad, 0xbe, 0xef, 0x00]; const result = index_1.filetypeinfo(bytes); expect(result).toEqual(expect.arrayContaining([ expect.objectContaining({ "typename": "customNoInfo", }) ])); }); it("detects customMime file", () => { const bytes = [0x12, 0x34, 0x56, 0x78]; const result = index_1.filetypeinfo(bytes); expect(result).toEqual(expect.arrayContaining([ expect.objectContaining({ "typename": "customMime", "mime": "application/vnd-custom", "extension": ".cust" }) ])); }); it("detects customOffset file", () => { const bytes = [0x12, 0x34, 0xab, 0xcb]; const result = index_1.filetypeinfo(bytes); expect(result).toEqual(expect.arrayContaining([ expect.objectContaining({ "typename": "customOffset", "mime": "application/vnd-custom-offset", "extension": ".custoff" }) ])); }); }); it("detects pdf (Libreoffice export)", () => { // File created using libreoffice writter export to pdf const file = getBytes("a.pdf"); const result = index_1.filetypemime(file); expect(result).toContain("application/pdf"); }); it("detects poscript (pdf2ps)", () => { // File created using pdf2ps from https://www.ghostscript.com const file = getBytes("a.ps"); const result = index_1.filetypemime(file); expect(result).toContain("application/postscript"); }); it("detects svg", () => { // File created using https://png2jpg.com const file = getBytes("a.svg"); const result = index_1.filetypemime(file); expect(result).toContain("image/svg+xml"); }); it("detects avif", () => { // File created using avifenc on a.apng const file = getBytes("a.avif"); const result = index_1.filetypemime(file); expect(result).toContain("image/avif"); }); }); node_modules/magic-bytes.js/dist/index.js 0000664 00000004164 15114741631 0014462 0 ustar 00 "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.register = exports.filetypeextension = exports.filetypemime = exports.filetypename = exports.filetypeinfo = void 0; const pattern_tree_1 = require("./model/pattern-tree"); const toHex_1 = require("./model/toHex"); const patternTree = pattern_tree_1.createTree(); const filetypeinfo = (bytes) => { let tree = patternTree; for (const k of Object.keys(tree.offset)) { const offset = toHex_1.fromHex(k); const offsetExceedsFile = offset >= bytes.length; if (offsetExceedsFile) { continue; } const node = patternTree.offset[k]; const guessed = walkTree(offset, bytes, node); if (guessed.length > 0) { return guessed; } } if (tree.noOffset === null) { return []; } return walkTree(0, bytes, tree.noOffset); }; exports.filetypeinfo = filetypeinfo; const walkTree = (index, bytes, node) => { let step = node; let guessFile = []; while (true) { const currentByte = toHex_1.toHex(bytes[index]); if (step.bytes["?"] && !step.bytes[currentByte]) { step = step.bytes["?"]; } else { step = step.bytes[currentByte]; } if (!step) { return guessFile; } if (step && step.matches) { guessFile = step.matches.slice(0); } index += 1; } }; exports.default = exports.filetypeinfo; const filetypename = (bytes) => exports.filetypeinfo(bytes).map((e) => e.typename); exports.filetypename = filetypename; const filetypemime = (bytes) => exports.filetypeinfo(bytes) .map((e) => (e.mime ? e.mime : null)) .filter((x) => x !== null); exports.filetypemime = filetypemime; const filetypeextension = (bytes) => exports.filetypeinfo(bytes) .map((e) => (e.extension ? e.extension : null)) .filter((x) => x !== null); exports.filetypeextension = filetypeextension; const register = (typename, signature, additionalInfo, offset) => { pattern_tree_1.add(typename, signature, additionalInfo, offset); }; exports.register = register; node_modules/magic-bytes.js/README.md 0000664 00000006622 15114741631 0013332 0 ustar 00 # Magic bytes [](https://github.com/LarsKoelpin/magic-bytes/actions/workflows/build-and-test.yml) Magic Bytes is a javascript library analyzing the first bytes of a file to tell you its type. Use it inside your browser or serversided using nodejs. The procedure is based on https://en.wikipedia.org/wiki/List_of_file_signatures. > [!NOTE] > A small note on versioning. > Strictly speaking, each new filetype which is supported by this library can break someones' API. > Please note that this library adds new filetypes with minor release. > This means files, which validate to "null" in some versions, may find a result in a new version. > > Or in some cases the library will find more results, than before. So don't depend on the found-array size in > any shape or form. > Filetypes will not be removed though. # Installation Run `npm install magic-bytes.js` # Interactive example There is an interactive example present at https://larskoelpin.github.io/magic-bytes/. # Usage The following functions are available: * `filetypeinfo(bytes: number[])` Contains typeinformation like name, extension and mime type: `[{typename: "zip"}, {typename: "jar"}]` * `filetypename(bytes: number[])` : Contains type names only: `["zip", "jar"]` * `filetypemime(bytes: number[])` : Contains type mime types only: `["application/zip", "application/jar"]` * `filetypeextension(bytes: number[])` : Contains type extensions only: `["zip", "jar"]` * `register(fileType: string, string[])`: registers a custom signature Both function return an empty array `[]` otherwise, which means it could not detect the file signature. Keep in mind that txt files for example fall in this category. You don't have to load the whole file in memory. For validating a file uploaded to S3 using Lambda for example, it may be enough to load the files first 100 bytes and validate against them. This is especially useful for big files. see examples for practical usage. On server: ```javascript import filetype from 'magic-bytes.js' filetype(fs.readFileSync("myimage.png")) // ["png"] ``` To run an HTML-Example checkout the project and run ``` npm install; npm run example ``` This opens an HTML example using magic bytes as a window variable. It kinda looks like that. ```html <input type="file" id="file" /> <script src="node_modules/magic-bytes.js/dist/browser.js" type="application/javascript"></script> <script> document.getElementById("file").addEventListener('change', (event, x) => { const fileReader = new FileReader(); fileReader.onloadend = (f) => { const bytes = new Uint8Array(f.target.result); console.log("Possible filetypes: " + filetypeinfo(bytes)) } fileReader.readAsArrayBuffer(event.target.files[0]) }) </script> ``` # Tests Run `npm test` # Example See examples/ # How does it work The `create-snapshot.js` creates a new tree. The tree has a similar shape to the following ```json { "0x47": { "0x49": { "0x46": { "0x38": { "0x37": { "0x61": { "matches": [ { "typename": "gif", "mime": "image/gif", "extension": "gif" } ] } }, } } } } } ``` It acts as a giant lookup map for the given byte signatures. node_modules/touch/package.json 0000664 00000001137 15114741631 0012640 0 ustar 00 { "author": "Isaac Z. Schlueter <i@izs.me> (http://blog.izs.me/)", "name": "touch", "description": "like touch(1) in node", "version": "3.1.1", "repository": "git://github.com/isaacs/node-touch.git", "bin": { "nodetouch": "./bin/nodetouch.js" }, "license": "ISC", "scripts": { "test": "tap test/*.js --100 -J", "preversion": "npm test", "postversion": "npm publish", "postpublish": "git push origin --all; git push origin --tags" }, "devDependencies": { "mutate-fs": "^1.1.0", "tap": "^10.7.0" }, "files": [ "index.js", "bin/nodetouch.js" ] } node_modules/touch/LICENSE 0000664 00000001354 15114741631 0011360 0 ustar 00 The ISC License Copyright (c) Isaac Z. Schlueter Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies. THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. node_modules/touch/index.js 0000664 00000011554 15114741631 0012023 0 ustar 00 'use strict' const EE = require('events').EventEmitter const cons = require('constants') const fs = require('fs') module.exports = (f, options, cb) => { if (typeof options === 'function') cb = options, options = {} const p = new Promise((res, rej) => { new Touch(validOpts(options, f, null)) .on('done', res).on('error', rej) }) return cb ? p.then(res => cb(null, res), cb) : p } module.exports.sync = module.exports.touchSync = (f, options) => (new TouchSync(validOpts(options, f, null)), undefined) module.exports.ftouch = (fd, options, cb) => { if (typeof options === 'function') cb = options, options = {} const p = new Promise((res, rej) => { new Touch(validOpts(options, null, fd)) .on('done', res).on('error', rej) }) return cb ? p.then(res => cb(null, res), cb) : p } module.exports.ftouchSync = (fd, opt) => (new TouchSync(validOpts(opt, null, fd)), undefined) const validOpts = (options, path, fd) => { options = Object.create(options || {}) options.fd = fd options.path = path // {mtime: true}, {ctime: true} // If set to something else, then treat as epoch ms value const now = new Date(options.time || Date.now()).getTime() / 1000 if (!options.atime && !options.mtime) options.atime = options.mtime = now else { if (true === options.atime) options.atime = now if (true === options.mtime) options.mtime = now } let oflags = 0 if (!options.force) oflags = oflags | cons.O_RDWR if (!options.nocreate) oflags = oflags | cons.O_CREAT options.oflags = oflags return options } class Touch extends EE { constructor (options) { super(options) this.fd = options.fd this.path = options.path this.atime = options.atime this.mtime = options.mtime this.ref = options.ref this.nocreate = !!options.nocreate this.force = !!options.force this.closeAfter = options.closeAfter this.oflags = options.oflags this.options = options if (typeof this.fd !== 'number') { this.closeAfter = true this.open() } else this.onopen(null, this.fd) } emit (ev, data) { // we only emit when either done or erroring // in both cases, need to close this.close() return super.emit(ev, data) } close () { if (typeof this.fd === 'number' && this.closeAfter) fs.close(this.fd, () => {}) } open () { fs.open(this.path, this.oflags, (er, fd) => this.onopen(er, fd)) } onopen (er, fd) { if (er) { if (er.code === 'EISDIR') this.onopen(null, null) else if (er.code === 'ENOENT' && this.nocreate) this.emit('done') else this.emit('error', er) } else { this.fd = fd if (this.ref) this.statref() else if (!this.atime || !this.mtime) this.fstat() else this.futimes() } } statref () { fs.stat(this.ref, (er, st) => { if (er) this.emit('error', er) else this.onstatref(st) }) } onstatref (st) { this.atime = this.atime && st.atime.getTime()/1000 this.mtime = this.mtime && st.mtime.getTime()/1000 if (!this.atime || !this.mtime) this.fstat() else this.futimes() } fstat () { const stat = this.fd ? 'fstat' : 'stat' const target = this.fd || this.path fs[stat](target, (er, st) => { if (er) this.emit('error', er) else this.onfstat(st) }) } onfstat (st) { if (typeof this.atime !== 'number') this.atime = st.atime.getTime()/1000 if (typeof this.mtime !== 'number') this.mtime = st.mtime.getTime()/1000 this.futimes() } futimes () { const utimes = this.fd ? 'futimes' : 'utimes' const target = this.fd || this.path fs[utimes](target, ''+this.atime, ''+this.mtime, er => { if (er) this.emit('error', er) else this.emit('done') }) } } class TouchSync extends Touch { open () { try { this.onopen(null, fs.openSync(this.path, this.oflags)) } catch (er) { this.onopen(er) } } statref () { let threw = true try { this.onstatref(fs.statSync(this.ref)) threw = false } finally { if (threw) this.close() } } fstat () { let threw = true const stat = this.fd ? 'fstatSync' : 'statSync' const target = this.fd || this.path try { this.onfstat(fs[stat](target)) threw = false } finally { if (threw) this.close() } } futimes () { let threw = true const utimes = this.fd ? 'futimesSync' : 'utimesSync' const target = this.fd || this.path try { fs[utimes](target, this.atime, this.mtime) threw = false } finally { if (threw) this.close() } this.emit('done') } close () { if (typeof this.fd === 'number' && this.closeAfter) try { fs.closeSync(this.fd) } catch (er) {} } } node_modules/touch/README.md 0000664 00000002310 15114741631 0011623 0 ustar 00 # node-touch For all your node touching needs. ## Installing ```bash npm install touch ``` ## CLI Usage: See `man touch` This package exports a binary called `nodetouch` that works mostly like the unix builtin `touch(1)`. ## API Usage: ```javascript var touch = require("touch") ``` Gives you the following functions: * `touch(filename, options, cb)` * `touch.sync(filename, options)` * `touch.ftouch(fd, options, cb)` * `touch.ftouchSync(fd, options)` All the `options` objects are optional. All the async functions return a Promise. If a callback function is provided, then it's attached to the Promise. ## Options * `force` like `touch -f` Boolean * `time` like `touch -t <date>` Can be a Date object, or any parseable Date string, or epoch ms number. * `atime` like `touch -a` Can be either a Boolean, or a Date. * `mtime` like `touch -m` Can be either a Boolean, or a Date. * `ref` like `touch -r <file>` Must be path to a file. * `nocreate` like `touch -c` Boolean If neither `atime` nor `mtime` are set, then both values are set. If one of them is set, then the other is not. ## cli This package creates a `nodetouch` command line executable that works very much like the unix builtin `touch(1)` node_modules/ignore-by-default/package.json 0000664 00000001407 15114741631 0015033 0 ustar 00 { "name": "ignore-by-default", "version": "1.0.1", "description": "A list of directories you should ignore by default", "main": "index.js", "files": [ "index.js" ], "scripts": { "test": "standard && node test.js" }, "repository": { "type": "git", "url": "git+https://github.com/novemberborn/ignore-by-default.git" }, "keywords": [ "ignore", "chokidar", "watcher", "exclude", "glob", "pattern" ], "author": "Mark Wubben (https://novemberborn.net/)", "license": "ISC", "bugs": { "url": "https://github.com/novemberborn/ignore-by-default/issues" }, "homepage": "https://github.com/novemberborn/ignore-by-default#readme", "devDependencies": { "figures": "^1.4.0", "standard": "^6.0.4" } } node_modules/ignore-by-default/LICENSE 0000664 00000001354 15114741631 0013553 0 ustar 00 ISC License (ISC) Copyright (c) 2016, Mark Wubben Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies. THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. node_modules/ignore-by-default/index.js 0000664 00000001146 15114741631 0014212 0 ustar 00 'use strict' exports.directories = function () { return [ '.git', // Git repository files, see <https://git-scm.com/> '.nyc_output', // Temporary directory where nyc stores coverage data, see <https://github.com/bcoe/nyc> '.sass-cache', // Cache folder for node-sass, see <https://github.com/sass/node-sass> 'bower_components', // Where Bower packages are installed, see <http://bower.io/> 'coverage', // Standard output directory for code coverage reports, see <https://github.com/gotwarlost/istanbul> 'node_modules' // Where Node modules are installed, see <https://nodejs.org/> ] } node_modules/ignore-by-default/README.md 0000664 00000001250 15114741631 0014020 0 ustar 00 # ignore-by-default This is a package aimed at Node.js development tools. It provides a list of directories that should probably be ignored by such tools, e.g. when watching for file changes. It's used by [AVA](https://www.npmjs.com/package/ava) and [nodemon](https://www.npmjs.com/package/nodemon). [Please contribute!](./CONTRIBUTING.md) ## Installation ``` npm install --save ignore-by-default ``` ## Usage The `ignore-by-default` module exports a `directories()` function, which will return an array of directory names. These are the ones you should ignore. ```js // ['.git', '.sass_cache', …] var ignoredDirectories = require('ignore-by-default').directories() ``` node_modules/ms/package.json 0000664 00000001334 15114741631 0012134 0 ustar 00 { "name": "ms", "version": "2.1.3", "description": "Tiny millisecond conversion utility", "repository": "vercel/ms", "main": "./index", "files": [ "index.js" ], "scripts": { "precommit": "lint-staged", "lint": "eslint lib/* bin/*", "test": "mocha tests.js" }, "eslintConfig": { "extends": "eslint:recommended", "env": { "node": true, "es6": true } }, "lint-staged": { "*.js": [ "npm run lint", "prettier --single-quote --write", "git add" ] }, "license": "MIT", "devDependencies": { "eslint": "4.18.2", "expect.js": "0.3.1", "husky": "0.14.3", "lint-staged": "5.0.0", "mocha": "4.0.1", "prettier": "2.0.5" } } node_modules/ms/readme.md 0000664 00000003536 15114741631 0011433 0 ustar 00 # ms  Use this package to easily convert various time formats to milliseconds. ## Examples ```js ms('2 days') // 172800000 ms('1d') // 86400000 ms('10h') // 36000000 ms('2.5 hrs') // 9000000 ms('2h') // 7200000 ms('1m') // 60000 ms('5s') // 5000 ms('1y') // 31557600000 ms('100') // 100 ms('-3 days') // -259200000 ms('-1h') // -3600000 ms('-200') // -200 ``` ### Convert from Milliseconds ```js ms(60000) // "1m" ms(2 * 60000) // "2m" ms(-3 * 60000) // "-3m" ms(ms('10 hours')) // "10h" ``` ### Time Format Written-Out ```js ms(60000, { long: true }) // "1 minute" ms(2 * 60000, { long: true }) // "2 minutes" ms(-3 * 60000, { long: true }) // "-3 minutes" ms(ms('10 hours'), { long: true }) // "10 hours" ``` ## Features - Works both in [Node.js](https://nodejs.org) and in the browser - If a number is supplied to `ms`, a string with a unit is returned - If a string that contains the number is supplied, it returns it as a number (e.g.: it returns `100` for `'100'`) - If you pass a string with a number and a valid unit, the number of equivalent milliseconds is returned ## Related Packages - [ms.macro](https://github.com/knpwrs/ms.macro) - Run `ms` as a macro at build-time. ## Caught a Bug? 1. [Fork](https://help.github.com/articles/fork-a-repo/) this repository to your own GitHub account and then [clone](https://help.github.com/articles/cloning-a-repository/) it to your local device 2. Link the package to the global module directory: `npm link` 3. Within the module you want to test your local development instance of ms, just link it to the dependencies: `npm link ms`. Instead of the default one from npm, Node.js will now use your clone of ms! As always, you can run the tests using: `npm test` node_modules/ms/index.js 0000664 00000005720 15114741631 0011316 0 ustar 00 /** * Helpers. */ var s = 1000; var m = s * 60; var h = m * 60; var d = h * 24; var w = d * 7; var y = d * 365.25; /** * Parse or format the given `val`. * * Options: * * - `long` verbose formatting [false] * * @param {String|Number} val * @param {Object} [options] * @throws {Error} throw an error if val is not a non-empty string or a number * @return {String|Number} * @api public */ module.exports = function (val, options) { options = options || {}; var type = typeof val; if (type === 'string' && val.length > 0) { return parse(val); } else if (type === 'number' && isFinite(val)) { return options.long ? fmtLong(val) : fmtShort(val); } throw new Error( 'val is not a non-empty string or a valid number. val=' + JSON.stringify(val) ); }; /** * Parse the given `str` and return milliseconds. * * @param {String} str * @return {Number} * @api private */ function parse(str) { str = String(str); if (str.length > 100) { return; } var match = /^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec( str ); if (!match) { return; } var n = parseFloat(match[1]); var type = (match[2] || 'ms').toLowerCase(); switch (type) { case 'years': case 'year': case 'yrs': case 'yr': case 'y': return n * y; case 'weeks': case 'week': case 'w': return n * w; case 'days': case 'day': case 'd': return n * d; case 'hours': case 'hour': case 'hrs': case 'hr': case 'h': return n * h; case 'minutes': case 'minute': case 'mins': case 'min': case 'm': return n * m; case 'seconds': case 'second': case 'secs': case 'sec': case 's': return n * s; case 'milliseconds': case 'millisecond': case 'msecs': case 'msec': case 'ms': return n; default: return undefined; } } /** * Short format for `ms`. * * @param {Number} ms * @return {String} * @api private */ function fmtShort(ms) { var msAbs = Math.abs(ms); if (msAbs >= d) { return Math.round(ms / d) + 'd'; } if (msAbs >= h) { return Math.round(ms / h) + 'h'; } if (msAbs >= m) { return Math.round(ms / m) + 'm'; } if (msAbs >= s) { return Math.round(ms / s) + 's'; } return ms + 'ms'; } /** * Long format for `ms`. * * @param {Number} ms * @return {String} * @api private */ function fmtLong(ms) { var msAbs = Math.abs(ms); if (msAbs >= d) { return plural(ms, msAbs, d, 'day'); } if (msAbs >= h) { return plural(ms, msAbs, h, 'hour'); } if (msAbs >= m) { return plural(ms, msAbs, m, 'minute'); } if (msAbs >= s) { return plural(ms, msAbs, s, 'second'); } return ms + ' ms'; } /** * Pluralization helper. */ function plural(ms, msAbs, n, name) { var isPlural = msAbs >= n * 1.5; return Math.round(ms / n) + ' ' + name + (isPlural ? 's' : ''); } node_modules/ms/license.md 0000664 00000002067 15114741631 0011616 0 ustar 00 The MIT License (MIT) Copyright (c) 2020 Vercel, Inc. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. node_modules/has-symbols/.eslintrc 0000664 00000000244 15114741631 0013313 0 ustar 00 { "root": true, "extends": "@ljharb", "rules": { "max-statements-per-line": [2, { "max": 2 }], "no-magic-numbers": 0, "multiline-comment-style": 0, } } node_modules/has-symbols/package.json 0000664 00000005636 15114741631 0013767 0 ustar 00 { "name": "has-symbols", "version": "1.1.0", "description": "Determine if the JS environment has Symbol support. Supports spec, or shams.", "main": "index.js", "scripts": { "prepack": "npmignore --auto --commentLines=autogenerated", "prepublishOnly": "safe-publish-latest", "prepublish": "not-in-publish || npm run prepublishOnly", "pretest": "npm run --silent lint", "test": "npm run tests-only", "posttest": "npx npm@'>=10.2' audit --production", "tests-only": "npm run test:stock && npm run test:shams", "test:stock": "nyc node test", "test:staging": "nyc node --harmony --es-staging test", "test:shams": "npm run --silent test:shams:getownpropertysymbols && npm run --silent test:shams:corejs", "test:shams:corejs": "nyc node test/shams/core-js.js", "test:shams:getownpropertysymbols": "nyc node test/shams/get-own-property-symbols.js", "lint": "eslint --ext=js,mjs .", "postlint": "tsc -p . && attw -P", "version": "auto-changelog && git add CHANGELOG.md", "postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\"" }, "repository": { "type": "git", "url": "git://github.com/inspect-js/has-symbols.git" }, "keywords": [ "Symbol", "symbols", "typeof", "sham", "polyfill", "native", "core-js", "ES6" ], "author": { "name": "Jordan Harband", "email": "ljharb@gmail.com", "url": "http://ljharb.codes" }, "contributors": [ { "name": "Jordan Harband", "email": "ljharb@gmail.com", "url": "http://ljharb.codes" } ], "funding": { "url": "https://github.com/sponsors/ljharb" }, "license": "MIT", "bugs": { "url": "https://github.com/ljharb/has-symbols/issues" }, "homepage": "https://github.com/ljharb/has-symbols#readme", "devDependencies": { "@arethetypeswrong/cli": "^0.17.0", "@ljharb/eslint-config": "^21.1.1", "@ljharb/tsconfig": "^0.2.0", "@types/core-js": "^2.5.8", "@types/tape": "^5.6.5", "auto-changelog": "^2.5.0", "core-js": "^2.6.12", "encoding": "^0.1.13", "eslint": "=8.8.0", "get-own-property-symbols": "^0.9.5", "in-publish": "^2.0.1", "npmignore": "^0.3.1", "nyc": "^10.3.2", "safe-publish-latest": "^2.0.0", "tape": "^5.9.0", "typescript": "next" }, "testling": { "files": "test/index.js", "browsers": [ "iexplore/6.0..latest", "firefox/3.0..6.0", "firefox/15.0..latest", "firefox/nightly", "chrome/4.0..10.0", "chrome/20.0..latest", "chrome/canary", "opera/10.0..latest", "opera/next", "safari/4.0..latest", "ipad/6.0..latest", "iphone/6.0..latest", "android-browser/4.2" ] }, "engines": { "node": ">= 0.4" }, "auto-changelog": { "output": "CHANGELOG.md", "template": "keepachangelog", "unreleased": false, "commitLimit": false, "backfillLimit": false, "hideCredit": true }, "publishConfig": { "ignore": [ ".github/workflows", "types" ] } } node_modules/has-symbols/shams.js 0000664 00000003602 15114741631 0013141 0 ustar 00 'use strict'; /** @type {import('./shams')} */ /* eslint complexity: [2, 18], max-statements: [2, 33] */ module.exports = function hasSymbols() { if (typeof Symbol !== 'function' || typeof Object.getOwnPropertySymbols !== 'function') { return false; } if (typeof Symbol.iterator === 'symbol') { return true; } /** @type {{ [k in symbol]?: unknown }} */ var obj = {}; var sym = Symbol('test'); var symObj = Object(sym); if (typeof sym === 'string') { return false; } if (Object.prototype.toString.call(sym) !== '[object Symbol]') { return false; } if (Object.prototype.toString.call(symObj) !== '[object Symbol]') { return false; } // temp disabled per https://github.com/ljharb/object.assign/issues/17 // if (sym instanceof Symbol) { return false; } // temp disabled per https://github.com/WebReflection/get-own-property-symbols/issues/4 // if (!(symObj instanceof Symbol)) { return false; } // if (typeof Symbol.prototype.toString !== 'function') { return false; } // if (String(sym) !== Symbol.prototype.toString.call(sym)) { return false; } var symVal = 42; obj[sym] = symVal; for (var _ in obj) { return false; } // eslint-disable-line no-restricted-syntax, no-unreachable-loop if (typeof Object.keys === 'function' && Object.keys(obj).length !== 0) { return false; } if (typeof Object.getOwnPropertyNames === 'function' && Object.getOwnPropertyNames(obj).length !== 0) { return false; } var syms = Object.getOwnPropertySymbols(obj); if (syms.length !== 1 || syms[0] !== sym) { return false; } if (!Object.prototype.propertyIsEnumerable.call(obj, sym)) { return false; } if (typeof Object.getOwnPropertyDescriptor === 'function') { // eslint-disable-next-line no-extra-parens var descriptor = /** @type {PropertyDescriptor} */ (Object.getOwnPropertyDescriptor(obj, sym)); if (descriptor.value !== symVal || descriptor.enumerable !== true) { return false; } } return true; }; node_modules/has-symbols/LICENSE 0000664 00000002057 15114741631 0012500 0 ustar 00 MIT License Copyright (c) 2016 Jordan Harband Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. node_modules/has-symbols/index.d.ts 0000664 00000000111 15114741631 0013361 0 ustar 00 declare function hasNativeSymbols(): boolean; export = hasNativeSymbols; node_modules/has-symbols/.nycrc 0000664 00000000213 15114741631 0012602 0 ustar 00 { "all": true, "check-coverage": false, "reporter": ["text-summary", "text", "html", "json"], "exclude": [ "coverage", "test" ] } node_modules/has-symbols/test/shams/core-js.js 0000664 00000001435 15114741631 0015464 0 ustar 00 'use strict'; var test = require('tape'); if (typeof Symbol === 'function' && typeof Symbol() === 'symbol') { test('has native Symbol support', function (t) { t.equal(typeof Symbol, 'function'); t.equal(typeof Symbol(), 'symbol'); t.end(); }); // @ts-expect-error TS is stupid and doesn't know about top level return return; } var hasSymbols = require('../../shams'); test('polyfilled Symbols', function (t) { /* eslint-disable global-require */ t.equal(hasSymbols(), false, 'hasSymbols is false before polyfilling'); require('core-js/fn/symbol'); require('core-js/fn/symbol/to-string-tag'); require('../tests')(t); var hasSymbolsAfter = hasSymbols(); t.equal(hasSymbolsAfter, true, 'hasSymbols is true after polyfilling'); /* eslint-enable global-require */ t.end(); }); node_modules/has-symbols/test/shams/get-own-property-symbols.js 0000664 00000001370 15114741631 0021050 0 ustar 00 'use strict'; var test = require('tape'); if (typeof Symbol === 'function' && typeof Symbol() === 'symbol') { test('has native Symbol support', function (t) { t.equal(typeof Symbol, 'function'); t.equal(typeof Symbol(), 'symbol'); t.end(); }); // @ts-expect-error TS is stupid and doesn't know about top level return return; } var hasSymbols = require('../../shams'); test('polyfilled Symbols', function (t) { /* eslint-disable global-require */ t.equal(hasSymbols(), false, 'hasSymbols is false before polyfilling'); require('get-own-property-symbols'); require('../tests')(t); var hasSymbolsAfter = hasSymbols(); t.equal(hasSymbolsAfter, true, 'hasSymbols is true after polyfilling'); /* eslint-enable global-require */ t.end(); }); node_modules/has-symbols/test/tests.js 0000664 00000004133 15114741631 0014147 0 ustar 00 'use strict'; /** @type {(t: import('tape').Test) => false | void} */ // eslint-disable-next-line consistent-return module.exports = function runSymbolTests(t) { t.equal(typeof Symbol, 'function', 'global Symbol is a function'); if (typeof Symbol !== 'function') { return false; } t.notEqual(Symbol(), Symbol(), 'two symbols are not equal'); /* t.equal( Symbol.prototype.toString.call(Symbol('foo')), Symbol.prototype.toString.call(Symbol('foo')), 'two symbols with the same description stringify the same' ); */ /* var foo = Symbol('foo'); t.notEqual( String(foo), String(Symbol('bar')), 'two symbols with different descriptions do not stringify the same' ); */ t.equal(typeof Symbol.prototype.toString, 'function', 'Symbol#toString is a function'); // t.equal(String(foo), Symbol.prototype.toString.call(foo), 'Symbol#toString equals String of the same symbol'); t.equal(typeof Object.getOwnPropertySymbols, 'function', 'Object.getOwnPropertySymbols is a function'); /** @type {{ [k in symbol]?: unknown }} */ var obj = {}; var sym = Symbol('test'); var symObj = Object(sym); t.notEqual(typeof sym, 'string', 'Symbol is not a string'); t.equal(Object.prototype.toString.call(sym), '[object Symbol]', 'symbol primitive Object#toStrings properly'); t.equal(Object.prototype.toString.call(symObj), '[object Symbol]', 'symbol primitive Object#toStrings properly'); var symVal = 42; obj[sym] = symVal; // eslint-disable-next-line no-restricted-syntax, no-unused-vars for (var _ in obj) { t.fail('symbol property key was found in for..in of object'); } t.deepEqual(Object.keys(obj), [], 'no enumerable own keys on symbol-valued object'); t.deepEqual(Object.getOwnPropertyNames(obj), [], 'no own names on symbol-valued object'); t.deepEqual(Object.getOwnPropertySymbols(obj), [sym], 'one own symbol on symbol-valued object'); t.equal(Object.prototype.propertyIsEnumerable.call(obj, sym), true, 'symbol is enumerable'); t.deepEqual(Object.getOwnPropertyDescriptor(obj, sym), { configurable: true, enumerable: true, value: 42, writable: true }, 'property descriptor is correct'); }; node_modules/has-symbols/test/index.js 0000664 00000001216 15114741631 0014113 0 ustar 00 'use strict'; var test = require('tape'); var hasSymbols = require('../'); var runSymbolTests = require('./tests'); test('interface', function (t) { t.equal(typeof hasSymbols, 'function', 'is a function'); t.equal(typeof hasSymbols(), 'boolean', 'returns a boolean'); t.end(); }); test('Symbols are supported', { skip: !hasSymbols() }, function (t) { runSymbolTests(t); t.end(); }); test('Symbols are not supported', { skip: hasSymbols() }, function (t) { t.equal(typeof Symbol, 'undefined', 'global Symbol is undefined'); t.equal(typeof Object.getOwnPropertySymbols, 'undefined', 'Object.getOwnPropertySymbols does not exist'); t.end(); }); node_modules/has-symbols/index.js 0000664 00000000677 15114741631 0013146 0 ustar 00 'use strict'; var origSymbol = typeof Symbol !== 'undefined' && Symbol; var hasSymbolSham = require('./shams'); /** @type {import('.')} */ module.exports = function hasNativeSymbols() { if (typeof origSymbol !== 'function') { return false; } if (typeof Symbol !== 'function') { return false; } if (typeof origSymbol('foo') !== 'symbol') { return false; } if (typeof Symbol('bar') !== 'symbol') { return false; } return hasSymbolSham(); }; node_modules/has-symbols/shams.d.ts 0000664 00000000105 15114741631 0013370 0 ustar 00 declare function hasSymbolShams(): boolean; export = hasSymbolShams; node_modules/has-symbols/tsconfig.json 0000664 00000000217 15114741631 0014176 0 ustar 00 { "extends": "@ljharb/tsconfig", "compilerOptions": { "target": "ES2021", "maxNodeModuleJsDepth": 0, }, "exclude": [ "coverage" ] } node_modules/has-symbols/.github/FUNDING.yml 0000664 00000001106 15114741631 0014642 0 ustar 00 # These are supported funding model platforms github: [ljharb] patreon: # Replace with a single Patreon username open_collective: # Replace with a single Open Collective username ko_fi: # Replace with a single Ko-fi username tidelift: npm/has-symbols community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry liberapay: # Replace with a single Liberapay username issuehunt: # Replace with a single IssueHunt username otechie: # Replace with a single Otechie username custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2'] node_modules/has-symbols/CHANGELOG.md 0000664 00000022327 15114741631 0013306 0 ustar 00 # Changelog All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). ## [v1.1.0](https://github.com/inspect-js/has-symbols/compare/v1.0.3...v1.1.0) - 2024-12-02 ### Commits - [actions] update workflows [`548c0bf`](https://github.com/inspect-js/has-symbols/commit/548c0bf8c9b1235458df7a1c0490b0064647a282) - [actions] further shard; update action deps [`bec56bb`](https://github.com/inspect-js/has-symbols/commit/bec56bb0fb44b43a786686b944875a3175cf3ff3) - [meta] use `npmignore` to autogenerate an npmignore file [`ac81032`](https://github.com/inspect-js/has-symbols/commit/ac81032809157e0a079e5264e9ce9b6f1275777e) - [New] add types [`6469cbf`](https://github.com/inspect-js/has-symbols/commit/6469cbff1866cfe367b2b3d181d9296ec14b2a3d) - [actions] update rebase action to use reusable workflow [`9c9d4d0`](https://github.com/inspect-js/has-symbols/commit/9c9d4d0d8938e4b267acdf8e421f4e92d1716d72) - [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `tape` [`adb5887`](https://github.com/inspect-js/has-symbols/commit/adb5887ca9444849b08beb5caaa9e1d42320cdfb) - [Dev Deps] update `@ljharb/eslint-config`, `aud`, `tape` [`13ec198`](https://github.com/inspect-js/has-symbols/commit/13ec198ec80f1993a87710af1606a1970b22c7cb) - [Dev Deps] update `auto-changelog`, `core-js`, `tape` [`941be52`](https://github.com/inspect-js/has-symbols/commit/941be5248387cab1da72509b22acf3fdb223f057) - [Tests] replace `aud` with `npm audit` [`74f49e9`](https://github.com/inspect-js/has-symbols/commit/74f49e9a9d17a443020784234a1c53ce765b3559) - [Dev Deps] update `npmignore` [`9c0ac04`](https://github.com/inspect-js/has-symbols/commit/9c0ac0452a834f4c2a4b54044f2d6a89f17e9a70) - [Dev Deps] add missing peer dep [`52337a5`](https://github.com/inspect-js/has-symbols/commit/52337a5621cced61f846f2afdab7707a8132cc12) ## [v1.0.3](https://github.com/inspect-js/has-symbols/compare/v1.0.2...v1.0.3) - 2022-03-01 ### Commits - [actions] use `node/install` instead of `node/run`; use `codecov` action [`518b28f`](https://github.com/inspect-js/has-symbols/commit/518b28f6c5a516cbccae30794e40aa9f738b1693) - [meta] add `bugs` and `homepage` fields; reorder package.json [`c480b13`](https://github.com/inspect-js/has-symbols/commit/c480b13fd6802b557e1cef9749872cb5fdeef744) - [actions] reuse common workflows [`01d0ee0`](https://github.com/inspect-js/has-symbols/commit/01d0ee0a8d97c0947f5edb73eb722027a77b2b07) - [actions] update codecov uploader [`6424ebe`](https://github.com/inspect-js/has-symbols/commit/6424ebe86b2c9c7c3d2e9bd4413a4e4f168cb275) - [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `auto-changelog`, `tape` [`dfa7e7f`](https://github.com/inspect-js/has-symbols/commit/dfa7e7ff38b594645d8c8222aab895157fa7e282) - [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `safe-publish-latest`, `tape` [`0c8d436`](https://github.com/inspect-js/has-symbols/commit/0c8d43685c45189cea9018191d4fd7eca91c9d02) - [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `tape` [`9026554`](https://github.com/inspect-js/has-symbols/commit/902655442a1bf88e72b42345494ef0c60f5d36ab) - [readme] add actions and codecov badges [`eaa9682`](https://github.com/inspect-js/has-symbols/commit/eaa9682f990f481d3acf7a1c7600bec36f7b3adc) - [Dev Deps] update `eslint`, `tape` [`bc7a3ba`](https://github.com/inspect-js/has-symbols/commit/bc7a3ba46f27b7743f8a2579732d59d1b9ac791e) - [Dev Deps] update `eslint`, `auto-changelog` [`0ace00a`](https://github.com/inspect-js/has-symbols/commit/0ace00af08a88cdd1e6ce0d60357d941c60c2d9f) - [meta] use `prepublishOnly` script for npm 7+ [`093f72b`](https://github.com/inspect-js/has-symbols/commit/093f72bc2b0ed00c781f444922a5034257bf561d) - [Tests] test on all 16 minors [`9b80d3d`](https://github.com/inspect-js/has-symbols/commit/9b80d3d9102529f04c20ec5b1fcc6e38426c6b03) ## [v1.0.2](https://github.com/inspect-js/has-symbols/compare/v1.0.1...v1.0.2) - 2021-02-27 ### Fixed - [Fix] use a universal way to get the original Symbol [`#11`](https://github.com/inspect-js/has-symbols/issues/11) ### Commits - [Tests] migrate tests to Github Actions [`90ae798`](https://github.com/inspect-js/has-symbols/commit/90ae79820bdfe7bc703d67f5f3c5e205f98556d3) - [meta] do not publish github action workflow files [`29e60a1`](https://github.com/inspect-js/has-symbols/commit/29e60a1b7c25c7f1acf7acff4a9320d0d10c49b4) - [Tests] run `nyc` on all tests [`8476b91`](https://github.com/inspect-js/has-symbols/commit/8476b915650d360915abe2522505abf4b0e8f0ae) - [readme] fix repo URLs, remove defunct badges [`126288e`](https://github.com/inspect-js/has-symbols/commit/126288ecc1797c0a40247a6b78bcb2e0bc5d7036) - [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `auto-changelog`, `core-js`, `get-own-property-symbols` [`d84bdfa`](https://github.com/inspect-js/has-symbols/commit/d84bdfa48ac5188abbb4904b42614cd6c030940a) - [Tests] fix linting errors [`0df3070`](https://github.com/inspect-js/has-symbols/commit/0df3070b981b6c9f2ee530c09189a7f5c6def839) - [actions] add "Allow Edits" workflow [`1e6bc29`](https://github.com/inspect-js/has-symbols/commit/1e6bc29b188f32b9648657b07eda08504be5aa9c) - [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `tape` [`36cea2a`](https://github.com/inspect-js/has-symbols/commit/36cea2addd4e6ec435f35a2656b4e9ef82498e9b) - [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `tape` [`1278338`](https://github.com/inspect-js/has-symbols/commit/127833801865fbc2cc8979beb9ca869c7bfe8222) - [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `tape` [`1493254`](https://github.com/inspect-js/has-symbols/commit/1493254eda13db5fb8fc5e4a3e8324b3d196029d) - [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `core-js` [`b090bf2`](https://github.com/inspect-js/has-symbols/commit/b090bf214d3679a30edc1e2d729d466ab5183e1d) - [actions] switch Automatic Rebase workflow to `pull_request_target` event [`4addb7a`](https://github.com/inspect-js/has-symbols/commit/4addb7ab4dc73f927ae99928d68817554fc21dc0) - [Dev Deps] update `auto-changelog`, `tape` [`81d0baf`](https://github.com/inspect-js/has-symbols/commit/81d0baf3816096a89a8558e8043895f7a7d10d8b) - [Dev Deps] update `auto-changelog`; add `aud` [`1a4e561`](https://github.com/inspect-js/has-symbols/commit/1a4e5612c25d91c3a03d509721d02630bc4fe3da) - [readme] remove unused testling URLs [`3000941`](https://github.com/inspect-js/has-symbols/commit/3000941f958046e923ed8152edb1ef4a599e6fcc) - [Tests] only audit prod deps [`692e974`](https://github.com/inspect-js/has-symbols/commit/692e9743c912410e9440207631a643a34b4741a1) - [Dev Deps] update `@ljharb/eslint-config` [`51c946c`](https://github.com/inspect-js/has-symbols/commit/51c946c7f6baa793ec5390bb5a45cdce16b4ba76) ## [v1.0.1](https://github.com/inspect-js/has-symbols/compare/v1.0.0...v1.0.1) - 2019-11-16 ### Commits - [Tests] use shared travis-ci configs [`ce396c9`](https://github.com/inspect-js/has-symbols/commit/ce396c9419ff11c43d0da5d05cdbb79f7fb42229) - [Tests] up to `node` `v12.4`, `v11.15`, `v10.15`, `v9.11`, `v8.15`, `v7.10`, `v6.17`, `v4.9`; use `nvm install-latest-npm` [`0690732`](https://github.com/inspect-js/has-symbols/commit/0690732801f47ab429f39ba1962f522d5c462d6b) - [meta] add `auto-changelog` [`2163d0b`](https://github.com/inspect-js/has-symbols/commit/2163d0b7f36343076b8f947cd1667dd1750f26fc) - [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `core-js`, `safe-publish-latest`, `tape` [`8e0951f`](https://github.com/inspect-js/has-symbols/commit/8e0951f1a7a2e52068222b7bb73511761e6e4d9c) - [actions] add automatic rebasing / merge commit blocking [`b09cdb7`](https://github.com/inspect-js/has-symbols/commit/b09cdb7cd7ee39e7a769878f56e2d6066f5ccd1d) - [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `safe-publish-latest`, `core-js`, `get-own-property-symbols`, `tape` [`1dd42cd`](https://github.com/inspect-js/has-symbols/commit/1dd42cd86183ed0c50f99b1062345c458babca91) - [meta] create FUNDING.yml [`aa57a17`](https://github.com/inspect-js/has-symbols/commit/aa57a17b19708906d1927f821ea8e73394d84ca4) - Only apps should have lockfiles [`a2d8bea`](https://github.com/inspect-js/has-symbols/commit/a2d8bea23a97d15c09eaf60f5b107fcf9a4d57aa) - [Tests] use `npx aud` instead of `nsp` or `npm audit` with hoops [`9e96cb7`](https://github.com/inspect-js/has-symbols/commit/9e96cb783746cbed0c10ef78e599a8eaa7ebe193) - [meta] add `funding` field [`a0b32cf`](https://github.com/inspect-js/has-symbols/commit/a0b32cf68e803f963c1639b6d47b0a9d6440bab0) - [Dev Deps] update `safe-publish-latest` [`cb9f0a5`](https://github.com/inspect-js/has-symbols/commit/cb9f0a521a3a1790f1064d437edd33bb6c3d6af0) ## v1.0.0 - 2016-09-19 ### Commits - Tests. [`ecb6eb9`](https://github.com/inspect-js/has-symbols/commit/ecb6eb934e4883137f3f93b965ba5e0a98df430d) - package.json [`88a337c`](https://github.com/inspect-js/has-symbols/commit/88a337cee0864a0da35f5d19e69ff0ef0150e46a) - Initial commit [`42e1e55`](https://github.com/inspect-js/has-symbols/commit/42e1e5502536a2b8ac529c9443984acd14836b1c) - Initial implementation. [`33f5cc6`](https://github.com/inspect-js/has-symbols/commit/33f5cc6cdff86e2194b081ee842bfdc63caf43fb) - read me [`01f1170`](https://github.com/inspect-js/has-symbols/commit/01f1170188ff7cb1558aa297f6ba5b516c6d7b0c) node_modules/has-symbols/README.md 0000664 00000003774 15114741631 0012761 0 ustar 00 # has-symbols <sup>[![Version Badge][2]][1]</sup> [![github actions][actions-image]][actions-url] [![coverage][codecov-image]][codecov-url] [![dependency status][5]][6] [![dev dependency status][7]][8] [![License][license-image]][license-url] [![Downloads][downloads-image]][downloads-url] [![npm badge][11]][1] Determine if the JS environment has Symbol support. Supports spec, or shams. ## Example ```js var hasSymbols = require('has-symbols'); hasSymbols() === true; // if the environment has native Symbol support. Not polyfillable, not forgeable. var hasSymbolsKinda = require('has-symbols/shams'); hasSymbolsKinda() === true; // if the environment has a Symbol sham that mostly follows the spec. ``` ## Supported Symbol shams - get-own-property-symbols [npm](https://www.npmjs.com/package/get-own-property-symbols) | [github](https://github.com/WebReflection/get-own-property-symbols) - core-js [npm](https://www.npmjs.com/package/core-js) | [github](https://github.com/zloirock/core-js) ## Tests Simply clone the repo, `npm install`, and run `npm test` [1]: https://npmjs.org/package/has-symbols [2]: https://versionbadg.es/inspect-js/has-symbols.svg [5]: https://david-dm.org/inspect-js/has-symbols.svg [6]: https://david-dm.org/inspect-js/has-symbols [7]: https://david-dm.org/inspect-js/has-symbols/dev-status.svg [8]: https://david-dm.org/inspect-js/has-symbols#info=devDependencies [11]: https://nodei.co/npm/has-symbols.png?downloads=true&stars=true [license-image]: https://img.shields.io/npm/l/has-symbols.svg [license-url]: LICENSE [downloads-image]: https://img.shields.io/npm/dm/has-symbols.svg [downloads-url]: https://npm-stat.com/charts.html?package=has-symbols [codecov-image]: https://codecov.io/gh/inspect-js/has-symbols/branch/main/graphs/badge.svg [codecov-url]: https://app.codecov.io/gh/inspect-js/has-symbols/ [actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/inspect-js/has-symbols [actions-url]: https://github.com/inspect-js/has-symbols/actions node_modules/lodash.snakecase/package.json 0000664 00000001360 15114741631 0014722 0 ustar 00 { "name": "lodash.snakecase", "version": "4.1.1", "description": "The lodash method `_.snakeCase` exported as a module.", "homepage": "https://lodash.com/", "icon": "https://lodash.com/icon.svg", "license": "MIT", "keywords": "lodash-modularized, snakecase", "author": "John-David Dalton <john.david.dalton@gmail.com> (http://allyoucanleet.com/)", "contributors": [ "John-David Dalton <john.david.dalton@gmail.com> (http://allyoucanleet.com/)", "Blaine Bublitz <blaine.bublitz@gmail.com> (https://github.com/phated)", "Mathias Bynens <mathias@qiwi.be> (https://mathiasbynens.be/)" ], "repository": "lodash/lodash", "scripts": { "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" } } node_modules/lodash.snakecase/LICENSE 0000664 00000003637 15114741631 0013452 0 ustar 00 Copyright jQuery Foundation and other contributors <https://jquery.org/> Based on Underscore.js, copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors <http://underscorejs.org/> This software consists of voluntary contributions made by many individuals. For exact contribution history, see the revision history available at https://github.com/lodash/lodash The following license applies to all parts of this software except as documented below: ==== Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ==== Copyright and related rights for sample code are waived via CC0. Sample code is defined as all source code displayed within the prose of the documentation. CC0: http://creativecommons.org/publicdomain/zero/1.0/ ==== Files located in the node_modules and vendor directories are externally maintained libraries used by this software which have their own licenses; we recommend you read them, as their terms may differ from the terms above. node_modules/lodash.snakecase/index.js 0000664 00000034324 15114741631 0014107 0 ustar 00 /** * lodash (Custom Build) <https://lodash.com/> * Build: `lodash modularize exports="npm" -o ./` * Copyright jQuery Foundation and other contributors <https://jquery.org/> * Released under MIT license <https://lodash.com/license> * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE> * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors */ /** Used as references for various `Number` constants. */ var INFINITY = 1 / 0; /** `Object#toString` result references. */ var symbolTag = '[object Symbol]'; /** Used to match words composed of alphanumeric characters. */ var reAsciiWord = /[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g; /** Used to match Latin Unicode letters (excluding mathematical operators). */ var reLatin = /[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g; /** Used to compose unicode character classes. */ var rsAstralRange = '\\ud800-\\udfff', rsComboMarksRange = '\\u0300-\\u036f\\ufe20-\\ufe23', rsComboSymbolsRange = '\\u20d0-\\u20f0', rsDingbatRange = '\\u2700-\\u27bf', rsLowerRange = 'a-z\\xdf-\\xf6\\xf8-\\xff', rsMathOpRange = '\\xac\\xb1\\xd7\\xf7', rsNonCharRange = '\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf', rsPunctuationRange = '\\u2000-\\u206f', rsSpaceRange = ' \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000', rsUpperRange = 'A-Z\\xc0-\\xd6\\xd8-\\xde', rsVarRange = '\\ufe0e\\ufe0f', rsBreakRange = rsMathOpRange + rsNonCharRange + rsPunctuationRange + rsSpaceRange; /** Used to compose unicode capture groups. */ var rsApos = "['\u2019]", rsBreak = '[' + rsBreakRange + ']', rsCombo = '[' + rsComboMarksRange + rsComboSymbolsRange + ']', rsDigits = '\\d+', rsDingbat = '[' + rsDingbatRange + ']', rsLower = '[' + rsLowerRange + ']', rsMisc = '[^' + rsAstralRange + rsBreakRange + rsDigits + rsDingbatRange + rsLowerRange + rsUpperRange + ']', rsFitz = '\\ud83c[\\udffb-\\udfff]', rsModifier = '(?:' + rsCombo + '|' + rsFitz + ')', rsNonAstral = '[^' + rsAstralRange + ']', rsRegional = '(?:\\ud83c[\\udde6-\\uddff]){2}', rsSurrPair = '[\\ud800-\\udbff][\\udc00-\\udfff]', rsUpper = '[' + rsUpperRange + ']', rsZWJ = '\\u200d'; /** Used to compose unicode regexes. */ var rsLowerMisc = '(?:' + rsLower + '|' + rsMisc + ')', rsUpperMisc = '(?:' + rsUpper + '|' + rsMisc + ')', rsOptLowerContr = '(?:' + rsApos + '(?:d|ll|m|re|s|t|ve))?', rsOptUpperContr = '(?:' + rsApos + '(?:D|LL|M|RE|S|T|VE))?', reOptMod = rsModifier + '?', rsOptVar = '[' + rsVarRange + ']?', rsOptJoin = '(?:' + rsZWJ + '(?:' + [rsNonAstral, rsRegional, rsSurrPair].join('|') + ')' + rsOptVar + reOptMod + ')*', rsSeq = rsOptVar + reOptMod + rsOptJoin, rsEmoji = '(?:' + [rsDingbat, rsRegional, rsSurrPair].join('|') + ')' + rsSeq; /** Used to match apostrophes. */ var reApos = RegExp(rsApos, 'g'); /** * Used to match [combining diacritical marks](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks) and * [combining diacritical marks for symbols](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks_for_Symbols). */ var reComboMark = RegExp(rsCombo, 'g'); /** Used to match complex or compound words. */ var reUnicodeWord = RegExp([ rsUpper + '?' + rsLower + '+' + rsOptLowerContr + '(?=' + [rsBreak, rsUpper, '$'].join('|') + ')', rsUpperMisc + '+' + rsOptUpperContr + '(?=' + [rsBreak, rsUpper + rsLowerMisc, '$'].join('|') + ')', rsUpper + '?' + rsLowerMisc + '+' + rsOptLowerContr, rsUpper + '+' + rsOptUpperContr, rsDigits, rsEmoji ].join('|'), 'g'); /** Used to detect strings that need a more robust regexp to match words. */ var reHasUnicodeWord = /[a-z][A-Z]|[A-Z]{2,}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/; /** Used to map Latin Unicode letters to basic Latin letters. */ var deburredLetters = { // Latin-1 Supplement block. '\xc0': 'A', '\xc1': 'A', '\xc2': 'A', '\xc3': 'A', '\xc4': 'A', '\xc5': 'A', '\xe0': 'a', '\xe1': 'a', '\xe2': 'a', '\xe3': 'a', '\xe4': 'a', '\xe5': 'a', '\xc7': 'C', '\xe7': 'c', '\xd0': 'D', '\xf0': 'd', '\xc8': 'E', '\xc9': 'E', '\xca': 'E', '\xcb': 'E', '\xe8': 'e', '\xe9': 'e', '\xea': 'e', '\xeb': 'e', '\xcc': 'I', '\xcd': 'I', '\xce': 'I', '\xcf': 'I', '\xec': 'i', '\xed': 'i', '\xee': 'i', '\xef': 'i', '\xd1': 'N', '\xf1': 'n', '\xd2': 'O', '\xd3': 'O', '\xd4': 'O', '\xd5': 'O', '\xd6': 'O', '\xd8': 'O', '\xf2': 'o', '\xf3': 'o', '\xf4': 'o', '\xf5': 'o', '\xf6': 'o', '\xf8': 'o', '\xd9': 'U', '\xda': 'U', '\xdb': 'U', '\xdc': 'U', '\xf9': 'u', '\xfa': 'u', '\xfb': 'u', '\xfc': 'u', '\xdd': 'Y', '\xfd': 'y', '\xff': 'y', '\xc6': 'Ae', '\xe6': 'ae', '\xde': 'Th', '\xfe': 'th', '\xdf': 'ss', // Latin Extended-A block. '\u0100': 'A', '\u0102': 'A', '\u0104': 'A', '\u0101': 'a', '\u0103': 'a', '\u0105': 'a', '\u0106': 'C', '\u0108': 'C', '\u010a': 'C', '\u010c': 'C', '\u0107': 'c', '\u0109': 'c', '\u010b': 'c', '\u010d': 'c', '\u010e': 'D', '\u0110': 'D', '\u010f': 'd', '\u0111': 'd', '\u0112': 'E', '\u0114': 'E', '\u0116': 'E', '\u0118': 'E', '\u011a': 'E', '\u0113': 'e', '\u0115': 'e', '\u0117': 'e', '\u0119': 'e', '\u011b': 'e', '\u011c': 'G', '\u011e': 'G', '\u0120': 'G', '\u0122': 'G', '\u011d': 'g', '\u011f': 'g', '\u0121': 'g', '\u0123': 'g', '\u0124': 'H', '\u0126': 'H', '\u0125': 'h', '\u0127': 'h', '\u0128': 'I', '\u012a': 'I', '\u012c': 'I', '\u012e': 'I', '\u0130': 'I', '\u0129': 'i', '\u012b': 'i', '\u012d': 'i', '\u012f': 'i', '\u0131': 'i', '\u0134': 'J', '\u0135': 'j', '\u0136': 'K', '\u0137': 'k', '\u0138': 'k', '\u0139': 'L', '\u013b': 'L', '\u013d': 'L', '\u013f': 'L', '\u0141': 'L', '\u013a': 'l', '\u013c': 'l', '\u013e': 'l', '\u0140': 'l', '\u0142': 'l', '\u0143': 'N', '\u0145': 'N', '\u0147': 'N', '\u014a': 'N', '\u0144': 'n', '\u0146': 'n', '\u0148': 'n', '\u014b': 'n', '\u014c': 'O', '\u014e': 'O', '\u0150': 'O', '\u014d': 'o', '\u014f': 'o', '\u0151': 'o', '\u0154': 'R', '\u0156': 'R', '\u0158': 'R', '\u0155': 'r', '\u0157': 'r', '\u0159': 'r', '\u015a': 'S', '\u015c': 'S', '\u015e': 'S', '\u0160': 'S', '\u015b': 's', '\u015d': 's', '\u015f': 's', '\u0161': 's', '\u0162': 'T', '\u0164': 'T', '\u0166': 'T', '\u0163': 't', '\u0165': 't', '\u0167': 't', '\u0168': 'U', '\u016a': 'U', '\u016c': 'U', '\u016e': 'U', '\u0170': 'U', '\u0172': 'U', '\u0169': 'u', '\u016b': 'u', '\u016d': 'u', '\u016f': 'u', '\u0171': 'u', '\u0173': 'u', '\u0174': 'W', '\u0175': 'w', '\u0176': 'Y', '\u0177': 'y', '\u0178': 'Y', '\u0179': 'Z', '\u017b': 'Z', '\u017d': 'Z', '\u017a': 'z', '\u017c': 'z', '\u017e': 'z', '\u0132': 'IJ', '\u0133': 'ij', '\u0152': 'Oe', '\u0153': 'oe', '\u0149': "'n", '\u017f': 'ss' }; /** Detect free variable `global` from Node.js. */ var freeGlobal = typeof global == 'object' && global && global.Object === Object && global; /** Detect free variable `self`. */ var freeSelf = typeof self == 'object' && self && self.Object === Object && self; /** Used as a reference to the global object. */ var root = freeGlobal || freeSelf || Function('return this')(); /** * A specialized version of `_.reduce` for arrays without support for * iteratee shorthands. * * @private * @param {Array} [array] The array to iterate over. * @param {Function} iteratee The function invoked per iteration. * @param {*} [accumulator] The initial value. * @param {boolean} [initAccum] Specify using the first element of `array` as * the initial value. * @returns {*} Returns the accumulated value. */ function arrayReduce(array, iteratee, accumulator, initAccum) { var index = -1, length = array ? array.length : 0; if (initAccum && length) { accumulator = array[++index]; } while (++index < length) { accumulator = iteratee(accumulator, array[index], index, array); } return accumulator; } /** * Splits an ASCII `string` into an array of its words. * * @private * @param {string} The string to inspect. * @returns {Array} Returns the words of `string`. */ function asciiWords(string) { return string.match(reAsciiWord) || []; } /** * The base implementation of `_.propertyOf` without support for deep paths. * * @private * @param {Object} object The object to query. * @returns {Function} Returns the new accessor function. */ function basePropertyOf(object) { return function(key) { return object == null ? undefined : object[key]; }; } /** * Used by `_.deburr` to convert Latin-1 Supplement and Latin Extended-A * letters to basic Latin letters. * * @private * @param {string} letter The matched letter to deburr. * @returns {string} Returns the deburred letter. */ var deburrLetter = basePropertyOf(deburredLetters); /** * Checks if `string` contains a word composed of Unicode symbols. * * @private * @param {string} string The string to inspect. * @returns {boolean} Returns `true` if a word is found, else `false`. */ function hasUnicodeWord(string) { return reHasUnicodeWord.test(string); } /** * Splits a Unicode `string` into an array of its words. * * @private * @param {string} The string to inspect. * @returns {Array} Returns the words of `string`. */ function unicodeWords(string) { return string.match(reUnicodeWord) || []; } /** Used for built-in method references. */ var objectProto = Object.prototype; /** * Used to resolve the * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring) * of values. */ var objectToString = objectProto.toString; /** Built-in value references. */ var Symbol = root.Symbol; /** Used to convert symbols to primitives and strings. */ var symbolProto = Symbol ? Symbol.prototype : undefined, symbolToString = symbolProto ? symbolProto.toString : undefined; /** * The base implementation of `_.toString` which doesn't convert nullish * values to empty strings. * * @private * @param {*} value The value to process. * @returns {string} Returns the string. */ function baseToString(value) { // Exit early for strings to avoid a performance hit in some environments. if (typeof value == 'string') { return value; } if (isSymbol(value)) { return symbolToString ? symbolToString.call(value) : ''; } var result = (value + ''); return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result; } /** * Creates a function like `_.camelCase`. * * @private * @param {Function} callback The function to combine each word. * @returns {Function} Returns the new compounder function. */ function createCompounder(callback) { return function(string) { return arrayReduce(words(deburr(string).replace(reApos, '')), callback, ''); }; } /** * Checks if `value` is object-like. A value is object-like if it's not `null` * and has a `typeof` result of "object". * * @static * @memberOf _ * @since 4.0.0 * @category Lang * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is object-like, else `false`. * @example * * _.isObjectLike({}); * // => true * * _.isObjectLike([1, 2, 3]); * // => true * * _.isObjectLike(_.noop); * // => false * * _.isObjectLike(null); * // => false */ function isObjectLike(value) { return !!value && typeof value == 'object'; } /** * Checks if `value` is classified as a `Symbol` primitive or object. * * @static * @memberOf _ * @since 4.0.0 * @category Lang * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is a symbol, else `false`. * @example * * _.isSymbol(Symbol.iterator); * // => true * * _.isSymbol('abc'); * // => false */ function isSymbol(value) { return typeof value == 'symbol' || (isObjectLike(value) && objectToString.call(value) == symbolTag); } /** * Converts `value` to a string. An empty string is returned for `null` * and `undefined` values. The sign of `-0` is preserved. * * @static * @memberOf _ * @since 4.0.0 * @category Lang * @param {*} value The value to process. * @returns {string} Returns the string. * @example * * _.toString(null); * // => '' * * _.toString(-0); * // => '-0' * * _.toString([1, 2, 3]); * // => '1,2,3' */ function toString(value) { return value == null ? '' : baseToString(value); } /** * Deburrs `string` by converting * [Latin-1 Supplement](https://en.wikipedia.org/wiki/Latin-1_Supplement_(Unicode_block)#Character_table) * and [Latin Extended-A](https://en.wikipedia.org/wiki/Latin_Extended-A) * letters to basic Latin letters and removing * [combining diacritical marks](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks). * * @static * @memberOf _ * @since 3.0.0 * @category String * @param {string} [string=''] The string to deburr. * @returns {string} Returns the deburred string. * @example * * _.deburr('déjà vu'); * // => 'deja vu' */ function deburr(string) { string = toString(string); return string && string.replace(reLatin, deburrLetter).replace(reComboMark, ''); } /** * Converts `string` to * [snake case](https://en.wikipedia.org/wiki/Snake_case). * * @static * @memberOf _ * @since 3.0.0 * @category String * @param {string} [string=''] The string to convert. * @returns {string} Returns the snake cased string. * @example * * _.snakeCase('Foo Bar'); * // => 'foo_bar' * * _.snakeCase('fooBar'); * // => 'foo_bar' * * _.snakeCase('--FOO-BAR--'); * // => 'foo_bar' */ var snakeCase = createCompounder(function(result, word, index) { return result + (index ? '_' : '') + word.toLowerCase(); }); /** * Splits `string` into an array of its words. * * @static * @memberOf _ * @since 3.0.0 * @category String * @param {string} [string=''] The string to inspect. * @param {RegExp|string} [pattern] The pattern to match words. * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. * @returns {Array} Returns the words of `string`. * @example * * _.words('fred, barney, & pebbles'); * // => ['fred', 'barney', 'pebbles'] * * _.words('fred, barney, & pebbles', /[^, ]+/g); * // => ['fred', 'barney', '&', 'pebbles'] */ function words(string, pattern, guard) { string = toString(string); pattern = guard ? undefined : pattern; if (pattern === undefined) { return hasUnicodeWord(string) ? unicodeWords(string) : asciiWords(string); } return string.match(pattern) || []; } module.exports = snakeCase; node_modules/lodash.snakecase/README.md 0000664 00000000732 15114741631 0013715 0 ustar 00 # lodash.snakecase v4.1.1 The [lodash](https://lodash.com/) method `_.snakeCase` exported as a [Node.js](https://nodejs.org/) module. ## Installation Using npm: ```bash $ {sudo -H} npm i -g npm $ npm i --save lodash.snakecase ``` In Node.js: ```js var snakeCase = require('lodash.snakecase'); ``` See the [documentation](https://lodash.com/docs#snakeCase) or [package source](https://github.com/lodash/lodash/blob/4.1.1-npm-packages/lodash.snakecase) for more details. node_modules/fast-deep-equal/package.json 0000664 00000002730 15114741631 0014473 0 ustar 00 { "name": "fast-deep-equal", "version": "3.1.3", "description": "Fast deep equal", "main": "index.js", "scripts": { "eslint": "eslint *.js benchmark/*.js spec/*.js", "build": "node build", "benchmark": "npm i && npm run build && cd ./benchmark && npm i && node ./", "test-spec": "mocha spec/*.spec.js -R spec", "test-cov": "nyc npm run test-spec", "test-ts": "tsc --target ES5 --noImplicitAny index.d.ts", "test": "npm run build && npm run eslint && npm run test-ts && npm run test-cov", "prepublish": "npm run build" }, "repository": { "type": "git", "url": "git+https://github.com/epoberezkin/fast-deep-equal.git" }, "keywords": [ "fast", "equal", "deep-equal" ], "author": "Evgeny Poberezkin", "license": "MIT", "bugs": { "url": "https://github.com/epoberezkin/fast-deep-equal/issues" }, "homepage": "https://github.com/epoberezkin/fast-deep-equal#readme", "devDependencies": { "coveralls": "^3.1.0", "dot": "^1.1.2", "eslint": "^7.2.0", "mocha": "^7.2.0", "nyc": "^15.1.0", "pre-commit": "^1.2.2", "react": "^16.12.0", "react-test-renderer": "^16.12.0", "sinon": "^9.0.2", "typescript": "^3.9.5" }, "nyc": { "exclude": [ "**/spec/**", "node_modules" ], "reporter": [ "lcov", "text-summary" ] }, "files": [ "index.js", "index.d.ts", "react.js", "react.d.ts", "es6/" ], "types": "index.d.ts" } node_modules/fast-deep-equal/es6/index.d.ts 0000664 00000000102 15114741631 0014572 0 ustar 00 declare const equal: (a: any, b: any) => boolean; export = equal; node_modules/fast-deep-equal/es6/index.js 0000664 00000003617 15114741631 0014354 0 ustar 00 'use strict'; // do not edit .js files directly - edit src/index.jst var envHasBigInt64Array = typeof BigInt64Array !== 'undefined'; module.exports = function equal(a, b) { if (a === b) return true; if (a && b && typeof a == 'object' && typeof b == 'object') { if (a.constructor !== b.constructor) return false; var length, i, keys; if (Array.isArray(a)) { length = a.length; if (length != b.length) return false; for (i = length; i-- !== 0;) if (!equal(a[i], b[i])) return false; return true; } if ((a instanceof Map) && (b instanceof Map)) { if (a.size !== b.size) return false; for (i of a.entries()) if (!b.has(i[0])) return false; for (i of a.entries()) if (!equal(i[1], b.get(i[0]))) return false; return true; } if ((a instanceof Set) && (b instanceof Set)) { if (a.size !== b.size) return false; for (i of a.entries()) if (!b.has(i[0])) return false; return true; } if (ArrayBuffer.isView(a) && ArrayBuffer.isView(b)) { length = a.length; if (length != b.length) return false; for (i = length; i-- !== 0;) if (a[i] !== b[i]) return false; return true; } if (a.constructor === RegExp) return a.source === b.source && a.flags === b.flags; if (a.valueOf !== Object.prototype.valueOf) return a.valueOf() === b.valueOf(); if (a.toString !== Object.prototype.toString) return a.toString() === b.toString(); keys = Object.keys(a); length = keys.length; if (length !== Object.keys(b).length) return false; for (i = length; i-- !== 0;) if (!Object.prototype.hasOwnProperty.call(b, keys[i])) return false; for (i = length; i-- !== 0;) { var key = keys[i]; if (!equal(a[key], b[key])) return false; } return true; } // true if both NaN, false otherwise return a!==a && b!==b; }; node_modules/fast-deep-equal/es6/react.d.ts 0000664 00000000102 15114741631 0014561 0 ustar 00 declare const equal: (a: any, b: any) => boolean; export = equal; node_modules/fast-deep-equal/es6/react.js 0000664 00000004241 15114741631 0014335 0 ustar 00 'use strict'; // do not edit .js files directly - edit src/index.jst var envHasBigInt64Array = typeof BigInt64Array !== 'undefined'; module.exports = function equal(a, b) { if (a === b) return true; if (a && b && typeof a == 'object' && typeof b == 'object') { if (a.constructor !== b.constructor) return false; var length, i, keys; if (Array.isArray(a)) { length = a.length; if (length != b.length) return false; for (i = length; i-- !== 0;) if (!equal(a[i], b[i])) return false; return true; } if ((a instanceof Map) && (b instanceof Map)) { if (a.size !== b.size) return false; for (i of a.entries()) if (!b.has(i[0])) return false; for (i of a.entries()) if (!equal(i[1], b.get(i[0]))) return false; return true; } if ((a instanceof Set) && (b instanceof Set)) { if (a.size !== b.size) return false; for (i of a.entries()) if (!b.has(i[0])) return false; return true; } if (ArrayBuffer.isView(a) && ArrayBuffer.isView(b)) { length = a.length; if (length != b.length) return false; for (i = length; i-- !== 0;) if (a[i] !== b[i]) return false; return true; } if (a.constructor === RegExp) return a.source === b.source && a.flags === b.flags; if (a.valueOf !== Object.prototype.valueOf) return a.valueOf() === b.valueOf(); if (a.toString !== Object.prototype.toString) return a.toString() === b.toString(); keys = Object.keys(a); length = keys.length; if (length !== Object.keys(b).length) return false; for (i = length; i-- !== 0;) if (!Object.prototype.hasOwnProperty.call(b, keys[i])) return false; for (i = length; i-- !== 0;) { var key = keys[i]; if (key === '_owner' && a.$$typeof) { // React-specific: avoid traversing React elements' _owner. // _owner contains circular references // and is not needed when comparing the actual elements (and not their owners) continue; } if (!equal(a[key], b[key])) return false; } return true; } // true if both NaN, false otherwise return a!==a && b!==b; }; node_modules/fast-deep-equal/LICENSE 0000664 00000002062 15114741631 0013210 0 ustar 00 MIT License Copyright (c) 2017 Evgeny Poberezkin Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. node_modules/fast-deep-equal/index.d.ts 0000664 00000000147 15114741631 0014106 0 ustar 00 declare module 'fast-deep-equal' { const equal: (a: any, b: any) => boolean; export = equal; } node_modules/fast-deep-equal/index.js 0000664 00000002231 15114741631 0013646 0 ustar 00 'use strict'; // do not edit .js files directly - edit src/index.jst module.exports = function equal(a, b) { if (a === b) return true; if (a && b && typeof a == 'object' && typeof b == 'object') { if (a.constructor !== b.constructor) return false; var length, i, keys; if (Array.isArray(a)) { length = a.length; if (length != b.length) return false; for (i = length; i-- !== 0;) if (!equal(a[i], b[i])) return false; return true; } if (a.constructor === RegExp) return a.source === b.source && a.flags === b.flags; if (a.valueOf !== Object.prototype.valueOf) return a.valueOf() === b.valueOf(); if (a.toString !== Object.prototype.toString) return a.toString() === b.toString(); keys = Object.keys(a); length = keys.length; if (length !== Object.keys(b).length) return false; for (i = length; i-- !== 0;) if (!Object.prototype.hasOwnProperty.call(b, keys[i])) return false; for (i = length; i-- !== 0;) { var key = keys[i]; if (!equal(a[key], b[key])) return false; } return true; } // true if both NaN, false otherwise return a!==a && b!==b; }; node_modules/fast-deep-equal/react.d.ts 0000664 00000000102 15114741631 0014064 0 ustar 00 declare const equal: (a: any, b: any) => boolean; export = equal; node_modules/fast-deep-equal/react.js 0000664 00000002653 15114741631 0013645 0 ustar 00 'use strict'; // do not edit .js files directly - edit src/index.jst module.exports = function equal(a, b) { if (a === b) return true; if (a && b && typeof a == 'object' && typeof b == 'object') { if (a.constructor !== b.constructor) return false; var length, i, keys; if (Array.isArray(a)) { length = a.length; if (length != b.length) return false; for (i = length; i-- !== 0;) if (!equal(a[i], b[i])) return false; return true; } if (a.constructor === RegExp) return a.source === b.source && a.flags === b.flags; if (a.valueOf !== Object.prototype.valueOf) return a.valueOf() === b.valueOf(); if (a.toString !== Object.prototype.toString) return a.toString() === b.toString(); keys = Object.keys(a); length = keys.length; if (length !== Object.keys(b).length) return false; for (i = length; i-- !== 0;) if (!Object.prototype.hasOwnProperty.call(b, keys[i])) return false; for (i = length; i-- !== 0;) { var key = keys[i]; if (key === '_owner' && a.$$typeof) { // React-specific: avoid traversing React elements' _owner. // _owner contains circular references // and is not needed when comparing the actual elements (and not their owners) continue; } if (!equal(a[key], b[key])) return false; } return true; } // true if both NaN, false otherwise return a!==a && b!==b; }; node_modules/fast-deep-equal/README.md 0000664 00000006373 15114741631 0013473 0 ustar 00 # fast-deep-equal The fastest deep equal with ES6 Map, Set and Typed arrays support. [](https://travis-ci.org/epoberezkin/fast-deep-equal) [](https://www.npmjs.com/package/fast-deep-equal) [](https://coveralls.io/github/epoberezkin/fast-deep-equal?branch=master) ## Install ```bash npm install fast-deep-equal ``` ## Features - ES5 compatible - works in node.js (8+) and browsers (IE9+) - checks equality of Date and RegExp objects by value. ES6 equal (`require('fast-deep-equal/es6')`) also supports: - Maps - Sets - Typed arrays ## Usage ```javascript var equal = require('fast-deep-equal'); console.log(equal({foo: 'bar'}, {foo: 'bar'})); // true ``` To support ES6 Maps, Sets and Typed arrays equality use: ```javascript var equal = require('fast-deep-equal/es6'); console.log(equal(Int16Array([1, 2]), Int16Array([1, 2]))); // true ``` To use with React (avoiding the traversal of React elements' _owner property that contains circular references and is not needed when comparing the elements - borrowed from [react-fast-compare](https://github.com/FormidableLabs/react-fast-compare)): ```javascript var equal = require('fast-deep-equal/react'); var equal = require('fast-deep-equal/es6/react'); ``` ## Performance benchmark Node.js v12.6.0: ``` fast-deep-equal x 261,950 ops/sec ±0.52% (89 runs sampled) fast-deep-equal/es6 x 212,991 ops/sec ±0.34% (92 runs sampled) fast-equals x 230,957 ops/sec ±0.83% (85 runs sampled) nano-equal x 187,995 ops/sec ±0.53% (88 runs sampled) shallow-equal-fuzzy x 138,302 ops/sec ±0.49% (90 runs sampled) underscore.isEqual x 74,423 ops/sec ±0.38% (89 runs sampled) lodash.isEqual x 36,637 ops/sec ±0.72% (90 runs sampled) deep-equal x 2,310 ops/sec ±0.37% (90 runs sampled) deep-eql x 35,312 ops/sec ±0.67% (91 runs sampled) ramda.equals x 12,054 ops/sec ±0.40% (91 runs sampled) util.isDeepStrictEqual x 46,440 ops/sec ±0.43% (90 runs sampled) assert.deepStrictEqual x 456 ops/sec ±0.71% (88 runs sampled) The fastest is fast-deep-equal ``` To run benchmark (requires node.js 6+): ```bash npm run benchmark ``` __Please note__: this benchmark runs against the available test cases. To choose the most performant library for your application, it is recommended to benchmark against your data and to NOT expect this benchmark to reflect the performance difference in your application. ## Enterprise support fast-deep-equal package is a part of [Tidelift enterprise subscription](https://tidelift.com/subscription/pkg/npm-fast-deep-equal?utm_source=npm-fast-deep-equal&utm_medium=referral&utm_campaign=enterprise&utm_term=repo) - it provides a centralised commercial support to open-source software users, in addition to the support provided by software maintainers. ## Security contact To report a security vulnerability, please use the [Tidelift security contact](https://tidelift.com/security). Tidelift will coordinate the fix and disclosure. Please do NOT report security vulnerability via GitHub issues. ## License [MIT](https://github.com/epoberezkin/fast-deep-equal/blob/master/LICENSE) node_modules/proxy-from-env/.travis.yml 0000664 00000000510 15114741631 0014243 0 ustar 00 language: node_js node_js: - node - lts/* script: - npm run lint # test-coverage will also run the tests, but does not print helpful output upon test failure. # So we also run the tests separately. - npm run test - npm run test-coverage && cat coverage/lcov.info | ./node_modules/.bin/coveralls && rm -rf coverage node_modules/proxy-from-env/.eslintrc 0000664 00000001347 15114741631 0013767 0 ustar 00 { "env": { "node": true }, "rules": { "array-bracket-spacing": [2, "never"], "block-scoped-var": 2, "brace-style": [2, "1tbs"], "camelcase": 1, "computed-property-spacing": [2, "never"], "curly": 2, "eol-last": 2, "eqeqeq": [2, "smart"], "max-depth": [1, 3], "max-len": [1, 80], "max-statements": [1, 15], "new-cap": 1, "no-extend-native": 2, "no-mixed-spaces-and-tabs": 2, "no-trailing-spaces": 2, "no-unused-vars": 1, "no-use-before-define": [2, "nofunc"], "object-curly-spacing": [2, "never"], "quotes": [2, "single", "avoid-escape"], "semi": [2, "always"], "keyword-spacing": [2, {"before": true, "after": true}], "space-unary-ops": 2 } } node_modules/proxy-from-env/package.json 0000664 00000001674 15114741631 0014434 0 ustar 00 { "name": "proxy-from-env", "version": "1.1.0", "description": "Offers getProxyForUrl to get the proxy URL for a URL, respecting the *_PROXY (e.g. HTTP_PROXY) and NO_PROXY environment variables.", "main": "index.js", "scripts": { "lint": "eslint *.js", "test": "mocha ./test.js --reporter spec", "test-coverage": "istanbul cover ./node_modules/.bin/_mocha -- --reporter spec" }, "repository": { "type": "git", "url": "https://github.com/Rob--W/proxy-from-env.git" }, "keywords": [ "proxy", "http_proxy", "https_proxy", "no_proxy", "environment" ], "author": "Rob Wu <rob@robwu.nl> (https://robwu.nl/)", "license": "MIT", "bugs": { "url": "https://github.com/Rob--W/proxy-from-env/issues" }, "homepage": "https://github.com/Rob--W/proxy-from-env#readme", "devDependencies": { "coveralls": "^3.0.9", "eslint": "^6.8.0", "istanbul": "^0.4.5", "mocha": "^7.1.0" } } node_modules/proxy-from-env/LICENSE 0000664 00000002077 15114741631 0013151 0 ustar 00 The MIT License Copyright (C) 2016-2018 Rob Wu <rob@robwu.nl> Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. node_modules/proxy-from-env/test.js 0000664 00000042470 15114741631 0013462 0 ustar 00 /* eslint max-statements:0 */ 'use strict'; var assert = require('assert'); var parseUrl = require('url').parse; var getProxyForUrl = require('./').getProxyForUrl; // Runs the callback with process.env temporarily set to env. function runWithEnv(env, callback) { var originalEnv = process.env; process.env = env; try { callback(); } finally { process.env = originalEnv; } } // Defines a test case that checks whether getProxyForUrl(input) === expected. function testProxyUrl(env, expected, input) { assert(typeof env === 'object' && env !== null); // Copy object to make sure that the in param does not get modified between // the call of this function and the use of it below. env = JSON.parse(JSON.stringify(env)); var title = 'getProxyForUrl(' + JSON.stringify(input) + ')' + ' === ' + JSON.stringify(expected); // Save call stack for later use. var stack = {}; Error.captureStackTrace(stack, testProxyUrl); // Only use the last stack frame because that shows where this function is // called, and that is sufficient for our purpose. No need to flood the logs // with an uninteresting stack trace. stack = stack.stack.split('\n', 2)[1]; it(title, function() { var actual; runWithEnv(env, function() { actual = getProxyForUrl(input); }); if (expected === actual) { return; // Good! } try { assert.strictEqual(expected, actual); // Create a formatted error message. // Should not happen because previously we determined expected !== actual. throw new Error('assert.strictEqual passed. This is impossible!'); } catch (e) { // Use the original stack trace, so we can see a helpful line number. e.stack = e.message + stack; throw e; } }); } describe('getProxyForUrl', function() { describe('No proxy variables', function() { var env = {}; testProxyUrl(env, '', 'http://example.com'); testProxyUrl(env, '', 'https://example.com'); testProxyUrl(env, '', 'ftp://example.com'); }); describe('Invalid URLs', function() { var env = {}; env.ALL_PROXY = 'http://unexpected.proxy'; testProxyUrl(env, '', 'bogus'); testProxyUrl(env, '', '//example.com'); testProxyUrl(env, '', '://example.com'); testProxyUrl(env, '', '://'); testProxyUrl(env, '', '/path'); testProxyUrl(env, '', ''); testProxyUrl(env, '', 'http:'); testProxyUrl(env, '', 'http:/'); testProxyUrl(env, '', 'http://'); testProxyUrl(env, '', 'prototype://'); testProxyUrl(env, '', 'hasOwnProperty://'); testProxyUrl(env, '', '__proto__://'); testProxyUrl(env, '', undefined); testProxyUrl(env, '', null); testProxyUrl(env, '', {}); testProxyUrl(env, '', {host: 'x', protocol: 1}); testProxyUrl(env, '', {host: 1, protocol: 'x'}); }); describe('http_proxy and HTTP_PROXY', function() { var env = {}; env.HTTP_PROXY = 'http://http-proxy'; testProxyUrl(env, '', 'https://example'); testProxyUrl(env, 'http://http-proxy', 'http://example'); testProxyUrl(env, 'http://http-proxy', parseUrl('http://example')); // eslint-disable-next-line camelcase env.http_proxy = 'http://priority'; testProxyUrl(env, 'http://priority', 'http://example'); }); describe('http_proxy with non-sensical value', function() { var env = {}; // Crazy values should be passed as-is. It is the responsibility of the // one who launches the application that the value makes sense. // TODO: Should we be stricter and perform validation? env.HTTP_PROXY = 'Crazy \n!() { ::// }'; testProxyUrl(env, 'Crazy \n!() { ::// }', 'http://wow'); // The implementation assumes that the HTTP_PROXY environment variable is // somewhat reasonable, and if the scheme is missing, it is added. // Garbage in, garbage out some would say... env.HTTP_PROXY = 'crazy without colon slash slash'; testProxyUrl(env, 'http://crazy without colon slash slash', 'http://wow'); }); describe('https_proxy and HTTPS_PROXY', function() { var env = {}; // Assert that there is no fall back to http_proxy env.HTTP_PROXY = 'http://unexpected.proxy'; testProxyUrl(env, '', 'https://example'); env.HTTPS_PROXY = 'http://https-proxy'; testProxyUrl(env, 'http://https-proxy', 'https://example'); // eslint-disable-next-line camelcase env.https_proxy = 'http://priority'; testProxyUrl(env, 'http://priority', 'https://example'); }); describe('ftp_proxy', function() { var env = {}; // Something else than http_proxy / https, as a sanity check. env.FTP_PROXY = 'http://ftp-proxy'; testProxyUrl(env, 'http://ftp-proxy', 'ftp://example'); testProxyUrl(env, '', 'ftps://example'); }); describe('all_proxy', function() { var env = {}; env.ALL_PROXY = 'http://catch-all'; testProxyUrl(env, 'http://catch-all', 'https://example'); // eslint-disable-next-line camelcase env.all_proxy = 'http://priority'; testProxyUrl(env, 'http://priority', 'https://example'); }); describe('all_proxy without scheme', function() { var env = {}; env.ALL_PROXY = 'noscheme'; testProxyUrl(env, 'http://noscheme', 'http://example'); testProxyUrl(env, 'https://noscheme', 'https://example'); // The module does not impose restrictions on the scheme. testProxyUrl(env, 'bogus-scheme://noscheme', 'bogus-scheme://example'); // But the URL should still be valid. testProxyUrl(env, '', 'bogus'); }); describe('no_proxy empty', function() { var env = {}; env.HTTPS_PROXY = 'http://proxy'; // NO_PROXY set but empty. env.NO_PROXY = ''; testProxyUrl(env, 'http://proxy', 'https://example'); // No entries in NO_PROXY (comma). env.NO_PROXY = ','; testProxyUrl(env, 'http://proxy', 'https://example'); // No entries in NO_PROXY (whitespace). env.NO_PROXY = ' '; testProxyUrl(env, 'http://proxy', 'https://example'); // No entries in NO_PROXY (multiple whitespace / commas). env.NO_PROXY = ',\t,,,\n, ,\r'; testProxyUrl(env, 'http://proxy', 'https://example'); }); describe('no_proxy=example (single host)', function() { var env = {}; env.HTTP_PROXY = 'http://proxy'; env.NO_PROXY = 'example'; testProxyUrl(env, '', 'http://example'); testProxyUrl(env, '', 'http://example:80'); testProxyUrl(env, '', 'http://example:0'); testProxyUrl(env, '', 'http://example:1337'); testProxyUrl(env, 'http://proxy', 'http://sub.example'); testProxyUrl(env, 'http://proxy', 'http://prefexample'); testProxyUrl(env, 'http://proxy', 'http://example.no'); testProxyUrl(env, 'http://proxy', 'http://a.b.example'); testProxyUrl(env, 'http://proxy', 'http://host/example'); }); describe('no_proxy=sub.example (subdomain)', function() { var env = {}; env.HTTP_PROXY = 'http://proxy'; env.NO_PROXY = 'sub.example'; testProxyUrl(env, 'http://proxy', 'http://example'); testProxyUrl(env, 'http://proxy', 'http://example:80'); testProxyUrl(env, 'http://proxy', 'http://example:0'); testProxyUrl(env, 'http://proxy', 'http://example:1337'); testProxyUrl(env, '', 'http://sub.example'); testProxyUrl(env, 'http://proxy', 'http://no.sub.example'); testProxyUrl(env, 'http://proxy', 'http://sub-example'); testProxyUrl(env, 'http://proxy', 'http://example.sub'); }); describe('no_proxy=example:80 (host + port)', function() { var env = {}; env.HTTP_PROXY = 'http://proxy'; env.NO_PROXY = 'example:80'; testProxyUrl(env, '', 'http://example'); testProxyUrl(env, '', 'http://example:80'); testProxyUrl(env, '', 'http://example:0'); testProxyUrl(env, 'http://proxy', 'http://example:1337'); testProxyUrl(env, 'http://proxy', 'http://sub.example'); testProxyUrl(env, 'http://proxy', 'http://prefexample'); testProxyUrl(env, 'http://proxy', 'http://example.no'); testProxyUrl(env, 'http://proxy', 'http://a.b.example'); }); describe('no_proxy=.example (host suffix)', function() { var env = {}; env.HTTP_PROXY = 'http://proxy'; env.NO_PROXY = '.example'; testProxyUrl(env, 'http://proxy', 'http://example'); testProxyUrl(env, 'http://proxy', 'http://example:80'); testProxyUrl(env, 'http://proxy', 'http://example:1337'); testProxyUrl(env, '', 'http://sub.example'); testProxyUrl(env, '', 'http://sub.example:80'); testProxyUrl(env, '', 'http://sub.example:1337'); testProxyUrl(env, 'http://proxy', 'http://prefexample'); testProxyUrl(env, 'http://proxy', 'http://example.no'); testProxyUrl(env, '', 'http://a.b.example'); }); describe('no_proxy=*', function() { var env = {}; env.HTTP_PROXY = 'http://proxy'; env.NO_PROXY = '*'; testProxyUrl(env, '', 'http://example.com'); }); describe('no_proxy=*.example (host suffix with *.)', function() { var env = {}; env.HTTP_PROXY = 'http://proxy'; env.NO_PROXY = '*.example'; testProxyUrl(env, 'http://proxy', 'http://example'); testProxyUrl(env, 'http://proxy', 'http://example:80'); testProxyUrl(env, 'http://proxy', 'http://example:1337'); testProxyUrl(env, '', 'http://sub.example'); testProxyUrl(env, '', 'http://sub.example:80'); testProxyUrl(env, '', 'http://sub.example:1337'); testProxyUrl(env, 'http://proxy', 'http://prefexample'); testProxyUrl(env, 'http://proxy', 'http://example.no'); testProxyUrl(env, '', 'http://a.b.example'); }); describe('no_proxy=*example (substring suffix)', function() { var env = {}; env.HTTP_PROXY = 'http://proxy'; env.NO_PROXY = '*example'; testProxyUrl(env, '', 'http://example'); testProxyUrl(env, '', 'http://example:80'); testProxyUrl(env, '', 'http://example:1337'); testProxyUrl(env, '', 'http://sub.example'); testProxyUrl(env, '', 'http://sub.example:80'); testProxyUrl(env, '', 'http://sub.example:1337'); testProxyUrl(env, '', 'http://prefexample'); testProxyUrl(env, '', 'http://a.b.example'); testProxyUrl(env, 'http://proxy', 'http://example.no'); testProxyUrl(env, 'http://proxy', 'http://host/example'); }); describe('no_proxy=.*example (arbitrary wildcards are NOT supported)', function() { var env = {}; env.HTTP_PROXY = 'http://proxy'; env.NO_PROXY = '.*example'; testProxyUrl(env, 'http://proxy', 'http://example'); testProxyUrl(env, 'http://proxy', 'http://sub.example'); testProxyUrl(env, 'http://proxy', 'http://sub.example'); testProxyUrl(env, 'http://proxy', 'http://prefexample'); testProxyUrl(env, 'http://proxy', 'http://x.prefexample'); testProxyUrl(env, 'http://proxy', 'http://a.b.example'); }); describe('no_proxy=[::1],[::2]:80,10.0.0.1,10.0.0.2:80 (IP addresses)', function() { var env = {}; env.HTTP_PROXY = 'http://proxy'; env.NO_PROXY = '[::1],[::2]:80,10.0.0.1,10.0.0.2:80'; testProxyUrl(env, '', 'http://[::1]/'); testProxyUrl(env, '', 'http://[::1]:80/'); testProxyUrl(env, '', 'http://[::1]:1337/'); testProxyUrl(env, '', 'http://[::2]/'); testProxyUrl(env, '', 'http://[::2]:80/'); testProxyUrl(env, 'http://proxy', 'http://[::2]:1337/'); testProxyUrl(env, '', 'http://10.0.0.1/'); testProxyUrl(env, '', 'http://10.0.0.1:80/'); testProxyUrl(env, '', 'http://10.0.0.1:1337/'); testProxyUrl(env, '', 'http://10.0.0.2/'); testProxyUrl(env, '', 'http://10.0.0.2:80/'); testProxyUrl(env, 'http://proxy', 'http://10.0.0.2:1337/'); }); describe('no_proxy=127.0.0.1/32 (CIDR is NOT supported)', function() { var env = {}; env.HTTP_PROXY = 'http://proxy'; env.NO_PROXY = '127.0.0.1/32'; testProxyUrl(env, 'http://proxy', 'http://127.0.0.1'); testProxyUrl(env, 'http://proxy', 'http://127.0.0.1/32'); }); describe('no_proxy=127.0.0.1 does NOT match localhost', function() { var env = {}; env.HTTP_PROXY = 'http://proxy'; env.NO_PROXY = '127.0.0.1'; testProxyUrl(env, '', 'http://127.0.0.1'); // We're not performing DNS queries, so this shouldn't match. testProxyUrl(env, 'http://proxy', 'http://localhost'); }); describe('no_proxy with protocols that have a default port', function() { var env = {}; env.WS_PROXY = 'http://ws'; env.WSS_PROXY = 'http://wss'; env.HTTP_PROXY = 'http://http'; env.HTTPS_PROXY = 'http://https'; env.GOPHER_PROXY = 'http://gopher'; env.FTP_PROXY = 'http://ftp'; env.ALL_PROXY = 'http://all'; env.NO_PROXY = 'xxx:21,xxx:70,xxx:80,xxx:443'; testProxyUrl(env, '', 'http://xxx'); testProxyUrl(env, '', 'http://xxx:80'); testProxyUrl(env, 'http://http', 'http://xxx:1337'); testProxyUrl(env, '', 'ws://xxx'); testProxyUrl(env, '', 'ws://xxx:80'); testProxyUrl(env, 'http://ws', 'ws://xxx:1337'); testProxyUrl(env, '', 'https://xxx'); testProxyUrl(env, '', 'https://xxx:443'); testProxyUrl(env, 'http://https', 'https://xxx:1337'); testProxyUrl(env, '', 'wss://xxx'); testProxyUrl(env, '', 'wss://xxx:443'); testProxyUrl(env, 'http://wss', 'wss://xxx:1337'); testProxyUrl(env, '', 'gopher://xxx'); testProxyUrl(env, '', 'gopher://xxx:70'); testProxyUrl(env, 'http://gopher', 'gopher://xxx:1337'); testProxyUrl(env, '', 'ftp://xxx'); testProxyUrl(env, '', 'ftp://xxx:21'); testProxyUrl(env, 'http://ftp', 'ftp://xxx:1337'); }); describe('no_proxy should not be case-sensitive', function() { var env = {}; env.HTTP_PROXY = 'http://proxy'; env.NO_PROXY = 'XXX,YYY,ZzZ'; testProxyUrl(env, '', 'http://xxx'); testProxyUrl(env, '', 'http://XXX'); testProxyUrl(env, '', 'http://yyy'); testProxyUrl(env, '', 'http://YYY'); testProxyUrl(env, '', 'http://ZzZ'); testProxyUrl(env, '', 'http://zZz'); }); describe('NPM proxy configuration', function() { describe('npm_config_http_proxy should work', function() { var env = {}; // eslint-disable-next-line camelcase env.npm_config_http_proxy = 'http://http-proxy'; testProxyUrl(env, '', 'https://example'); testProxyUrl(env, 'http://http-proxy', 'http://example'); // eslint-disable-next-line camelcase env.npm_config_http_proxy = 'http://priority'; testProxyUrl(env, 'http://priority', 'http://example'); }); // eslint-disable-next-line max-len describe('npm_config_http_proxy should take precedence over HTTP_PROXY and npm_config_proxy', function() { var env = {}; // eslint-disable-next-line camelcase env.npm_config_http_proxy = 'http://http-proxy'; // eslint-disable-next-line camelcase env.npm_config_proxy = 'http://unexpected-proxy'; env.HTTP_PROXY = 'http://unexpected-proxy'; testProxyUrl(env, 'http://http-proxy', 'http://example'); }); describe('npm_config_https_proxy should work', function() { var env = {}; // eslint-disable-next-line camelcase env.npm_config_http_proxy = 'http://unexpected.proxy'; testProxyUrl(env, '', 'https://example'); // eslint-disable-next-line camelcase env.npm_config_https_proxy = 'http://https-proxy'; testProxyUrl(env, 'http://https-proxy', 'https://example'); // eslint-disable-next-line camelcase env.npm_config_https_proxy = 'http://priority'; testProxyUrl(env, 'http://priority', 'https://example'); }); // eslint-disable-next-line max-len describe('npm_config_https_proxy should take precedence over HTTPS_PROXY and npm_config_proxy', function() { var env = {}; // eslint-disable-next-line camelcase env.npm_config_https_proxy = 'http://https-proxy'; // eslint-disable-next-line camelcase env.npm_config_proxy = 'http://unexpected-proxy'; env.HTTPS_PROXY = 'http://unexpected-proxy'; testProxyUrl(env, 'http://https-proxy', 'https://example'); }); describe('npm_config_proxy should work', function() { var env = {}; // eslint-disable-next-line camelcase env.npm_config_proxy = 'http://http-proxy'; testProxyUrl(env, 'http://http-proxy', 'http://example'); testProxyUrl(env, 'http://http-proxy', 'https://example'); // eslint-disable-next-line camelcase env.npm_config_proxy = 'http://priority'; testProxyUrl(env, 'http://priority', 'http://example'); testProxyUrl(env, 'http://priority', 'https://example'); }); // eslint-disable-next-line max-len describe('HTTP_PROXY and HTTPS_PROXY should take precedence over npm_config_proxy', function() { var env = {}; env.HTTP_PROXY = 'http://http-proxy'; env.HTTPS_PROXY = 'http://https-proxy'; // eslint-disable-next-line camelcase env.npm_config_proxy = 'http://unexpected-proxy'; testProxyUrl(env, 'http://http-proxy', 'http://example'); testProxyUrl(env, 'http://https-proxy', 'https://example'); }); describe('npm_config_no_proxy should work', function() { var env = {}; env.HTTP_PROXY = 'http://proxy'; // eslint-disable-next-line camelcase env.npm_config_no_proxy = 'example'; testProxyUrl(env, '', 'http://example'); testProxyUrl(env, 'http://proxy', 'http://otherwebsite'); }); // eslint-disable-next-line max-len describe('npm_config_no_proxy should take precedence over NO_PROXY', function() { var env = {}; env.HTTP_PROXY = 'http://proxy'; env.NO_PROXY = 'otherwebsite'; // eslint-disable-next-line camelcase env.npm_config_no_proxy = 'example'; testProxyUrl(env, '', 'http://example'); testProxyUrl(env, 'http://proxy', 'http://otherwebsite'); }); }); }); node_modules/proxy-from-env/index.js 0000664 00000006424 15114741631 0013611 0 ustar 00 'use strict'; var parseUrl = require('url').parse; var DEFAULT_PORTS = { ftp: 21, gopher: 70, http: 80, https: 443, ws: 80, wss: 443, }; var stringEndsWith = String.prototype.endsWith || function(s) { return s.length <= this.length && this.indexOf(s, this.length - s.length) !== -1; }; /** * @param {string|object} url - The URL, or the result from url.parse. * @return {string} The URL of the proxy that should handle the request to the * given URL. If no proxy is set, this will be an empty string. */ function getProxyForUrl(url) { var parsedUrl = typeof url === 'string' ? parseUrl(url) : url || {}; var proto = parsedUrl.protocol; var hostname = parsedUrl.host; var port = parsedUrl.port; if (typeof hostname !== 'string' || !hostname || typeof proto !== 'string') { return ''; // Don't proxy URLs without a valid scheme or host. } proto = proto.split(':', 1)[0]; // Stripping ports in this way instead of using parsedUrl.hostname to make // sure that the brackets around IPv6 addresses are kept. hostname = hostname.replace(/:\d*$/, ''); port = parseInt(port) || DEFAULT_PORTS[proto] || 0; if (!shouldProxy(hostname, port)) { return ''; // Don't proxy URLs that match NO_PROXY. } var proxy = getEnv('npm_config_' + proto + '_proxy') || getEnv(proto + '_proxy') || getEnv('npm_config_proxy') || getEnv('all_proxy'); if (proxy && proxy.indexOf('://') === -1) { // Missing scheme in proxy, default to the requested URL's scheme. proxy = proto + '://' + proxy; } return proxy; } /** * Determines whether a given URL should be proxied. * * @param {string} hostname - The host name of the URL. * @param {number} port - The effective port of the URL. * @returns {boolean} Whether the given URL should be proxied. * @private */ function shouldProxy(hostname, port) { var NO_PROXY = (getEnv('npm_config_no_proxy') || getEnv('no_proxy')).toLowerCase(); if (!NO_PROXY) { return true; // Always proxy if NO_PROXY is not set. } if (NO_PROXY === '*') { return false; // Never proxy if wildcard is set. } return NO_PROXY.split(/[,\s]/).every(function(proxy) { if (!proxy) { return true; // Skip zero-length hosts. } var parsedProxy = proxy.match(/^(.+):(\d+)$/); var parsedProxyHostname = parsedProxy ? parsedProxy[1] : proxy; var parsedProxyPort = parsedProxy ? parseInt(parsedProxy[2]) : 0; if (parsedProxyPort && parsedProxyPort !== port) { return true; // Skip if ports don't match. } if (!/^[.*]/.test(parsedProxyHostname)) { // No wildcards, so stop proxying if there is an exact match. return hostname !== parsedProxyHostname; } if (parsedProxyHostname.charAt(0) === '*') { // Remove leading wildcard. parsedProxyHostname = parsedProxyHostname.slice(1); } // Stop proxying if the hostname ends with the no_proxy host. return !stringEndsWith.call(hostname, parsedProxyHostname); }); } /** * Get the value for an environment variable. * * @param {string} key - The name of the environment variable. * @return {string} The value of the environment variable. * @private */ function getEnv(key) { return process.env[key.toLowerCase()] || process.env[key.toUpperCase()] || ''; } exports.getProxyForUrl = getProxyForUrl; node_modules/proxy-from-env/README.md 0000664 00000012226 15114741631 0013420 0 ustar 00 # proxy-from-env [](https://travis-ci.org/Rob--W/proxy-from-env) [](https://coveralls.io/github/Rob--W/proxy-from-env?branch=master) `proxy-from-env` is a Node.js package that exports a function (`getProxyForUrl`) that takes an input URL (a string or [`url.parse`](https://nodejs.org/docs/latest/api/url.html#url_url_parsing)'s return value) and returns the desired proxy URL (also a string) based on standard proxy environment variables. If no proxy is set, an empty string is returned. It is your responsibility to actually proxy the request using the given URL. Installation: ```sh npm install proxy-from-env ``` ## Example This example shows how the data for a URL can be fetched via the [`http` module](https://nodejs.org/api/http.html), in a proxy-aware way. ```javascript var http = require('http'); var parseUrl = require('url').parse; var getProxyForUrl = require('proxy-from-env').getProxyForUrl; var some_url = 'http://example.com/something'; // // Example, if there is a proxy server at 10.0.0.1:1234, then setting the // // http_proxy environment variable causes the request to go through a proxy. // process.env.http_proxy = 'http://10.0.0.1:1234'; // // // But if the host to be proxied is listed in NO_PROXY, then the request is // // not proxied (but a direct request is made). // process.env.no_proxy = 'example.com'; var proxy_url = getProxyForUrl(some_url); // <-- Our magic. if (proxy_url) { // Should be proxied through proxy_url. var parsed_some_url = parseUrl(some_url); var parsed_proxy_url = parseUrl(proxy_url); // A HTTP proxy is quite simple. It is similar to a normal request, except the // path is an absolute URL, and the proxied URL's host is put in the header // instead of the server's actual host. httpOptions = { protocol: parsed_proxy_url.protocol, hostname: parsed_proxy_url.hostname, port: parsed_proxy_url.port, path: parsed_some_url.href, headers: { Host: parsed_some_url.host, // = host name + optional port. }, }; } else { // Direct request. httpOptions = some_url; } http.get(httpOptions, function(res) { var responses = []; res.on('data', function(chunk) { responses.push(chunk); }); res.on('end', function() { console.log(responses.join('')); }); }); ``` ## Environment variables The environment variables can be specified in lowercase or uppercase, with the lowercase name having precedence over the uppercase variant. A variable that is not set has the same meaning as a variable that is set but has no value. ### NO\_PROXY `NO_PROXY` is a list of host names (optionally with a port). If the input URL matches any of the entries in `NO_PROXY`, then the input URL should be fetched by a direct request (i.e. without a proxy). Matching follows the following rules: - `NO_PROXY=*` disables all proxies. - Space and commas may be used to separate the entries in the `NO_PROXY` list. - If `NO_PROXY` does not contain any entries, then proxies are never disabled. - If a port is added after the host name, then the ports must match. If the URL does not have an explicit port name, the protocol's default port is used. - Generally, the proxy is only disabled if the host name is an exact match for an entry in the `NO_PROXY` list. The only exceptions are entries that start with a dot or with a wildcard; then the proxy is disabled if the host name ends with the entry. See `test.js` for examples of what should match and what does not. ### \*\_PROXY The environment variable used for the proxy depends on the protocol of the URL. For example, `https://example.com` uses the "https" protocol, and therefore the proxy to be used is `HTTPS_PROXY` (_NOT_ `HTTP_PROXY`, which is _only_ used for http:-URLs). The library is not limited to http(s), other schemes such as `FTP_PROXY` (ftp:), `WSS_PROXY` (wss:), `WS_PROXY` (ws:) are also supported. If present, `ALL_PROXY` is used as fallback if there is no other match. ## External resources The exact way of parsing the environment variables is not codified in any standard. This library is designed to be compatible with formats as expected by existing software. The following resources were used to determine the desired behavior: - cURL: https://curl.haxx.se/docs/manpage.html#ENVIRONMENT https://github.com/curl/curl/blob/4af40b3646d3b09f68e419f7ca866ff395d1f897/lib/url.c#L4446-L4514 https://github.com/curl/curl/blob/4af40b3646d3b09f68e419f7ca866ff395d1f897/lib/url.c#L4608-L4638 - wget: https://www.gnu.org/software/wget/manual/wget.html#Proxies http://git.savannah.gnu.org/cgit/wget.git/tree/src/init.c?id=636a5f9a1c508aa39e35a3a8e9e54520a284d93d#n383 http://git.savannah.gnu.org/cgit/wget.git/tree/src/retr.c?id=93c1517c4071c4288ba5a4b038e7634e4c6b5482#n1278 - W3: https://www.w3.org/Daemon/User/Proxies/ProxyClients.html - Python's urllib: https://github.com/python/cpython/blob/936135bb97fe04223aa30ca6e98eac8f3ed6b349/Lib/urllib/request.py#L755-L782 https://github.com/python/cpython/blob/936135bb97fe04223aa30ca6e98eac8f3ed6b349/Lib/urllib/request.py#L2444-L2479 node_modules/mime-types/package.json 0000664 00000002175 15114741631 0013612 0 ustar 00 { "name": "mime-types", "description": "The ultimate javascript content-type utility.", "version": "2.1.35", "contributors": [ "Douglas Christopher Wilson <doug@somethingdoug.com>", "Jeremiah Senkpiel <fishrock123@rocketmail.com> (https://searchbeam.jit.su)", "Jonathan Ong <me@jongleberry.com> (http://jongleberry.com)" ], "license": "MIT", "keywords": [ "mime", "types" ], "repository": "jshttp/mime-types", "dependencies": { "mime-db": "1.52.0" }, "devDependencies": { "eslint": "7.32.0", "eslint-config-standard": "14.1.1", "eslint-plugin-import": "2.25.4", "eslint-plugin-markdown": "2.2.1", "eslint-plugin-node": "11.1.0", "eslint-plugin-promise": "5.2.0", "eslint-plugin-standard": "4.1.0", "mocha": "9.2.2", "nyc": "15.1.0" }, "files": [ "HISTORY.md", "LICENSE", "index.js" ], "engines": { "node": ">= 0.6" }, "scripts": { "lint": "eslint .", "test": "mocha --reporter spec test/test.js", "test-ci": "nyc --reporter=lcov --reporter=text npm test", "test-cov": "nyc --reporter=html --reporter=text npm test" } } node_modules/mime-types/HISTORY.md 0000664 00000021154 15114741631 0013005 0 ustar 00 2.1.35 / 2022-03-12 =================== * deps: mime-db@1.52.0 - Add extensions from IANA for more `image/*` types - Add extension `.asc` to `application/pgp-keys` - Add extensions to various XML types - Add new upstream MIME types 2.1.34 / 2021-11-08 =================== * deps: mime-db@1.51.0 - Add new upstream MIME types 2.1.33 / 2021-10-01 =================== * deps: mime-db@1.50.0 - Add deprecated iWorks mime types and extensions - Add new upstream MIME types 2.1.32 / 2021-07-27 =================== * deps: mime-db@1.49.0 - Add extension `.trig` to `application/trig` - Add new upstream MIME types 2.1.31 / 2021-06-01 =================== * deps: mime-db@1.48.0 - Add extension `.mvt` to `application/vnd.mapbox-vector-tile` - Add new upstream MIME types 2.1.30 / 2021-04-02 =================== * deps: mime-db@1.47.0 - Add extension `.amr` to `audio/amr` - Remove ambigious extensions from IANA for `application/*+xml` types - Update primary extension to `.es` for `application/ecmascript` 2.1.29 / 2021-02-17 =================== * deps: mime-db@1.46.0 - Add extension `.amr` to `audio/amr` - Add extension `.m4s` to `video/iso.segment` - Add extension `.opus` to `audio/ogg` - Add new upstream MIME types 2.1.28 / 2021-01-01 =================== * deps: mime-db@1.45.0 - Add `application/ubjson` with extension `.ubj` - Add `image/avif` with extension `.avif` - Add `image/ktx2` with extension `.ktx2` - Add extension `.dbf` to `application/vnd.dbf` - Add extension `.rar` to `application/vnd.rar` - Add extension `.td` to `application/urc-targetdesc+xml` - Add new upstream MIME types - Fix extension of `application/vnd.apple.keynote` to be `.key` 2.1.27 / 2020-04-23 =================== * deps: mime-db@1.44.0 - Add charsets from IANA - Add extension `.cjs` to `application/node` - Add new upstream MIME types 2.1.26 / 2020-01-05 =================== * deps: mime-db@1.43.0 - Add `application/x-keepass2` with extension `.kdbx` - Add extension `.mxmf` to `audio/mobile-xmf` - Add extensions from IANA for `application/*+xml` types - Add new upstream MIME types 2.1.25 / 2019-11-12 =================== * deps: mime-db@1.42.0 - Add new upstream MIME types - Add `application/toml` with extension `.toml` - Add `image/vnd.ms-dds` with extension `.dds` 2.1.24 / 2019-04-20 =================== * deps: mime-db@1.40.0 - Add extensions from IANA for `model/*` types - Add `text/mdx` with extension `.mdx` 2.1.23 / 2019-04-17 =================== * deps: mime-db@~1.39.0 - Add extensions `.siv` and `.sieve` to `application/sieve` - Add new upstream MIME types 2.1.22 / 2019-02-14 =================== * deps: mime-db@~1.38.0 - Add extension `.nq` to `application/n-quads` - Add extension `.nt` to `application/n-triples` - Add new upstream MIME types 2.1.21 / 2018-10-19 =================== * deps: mime-db@~1.37.0 - Add extensions to HEIC image types - Add new upstream MIME types 2.1.20 / 2018-08-26 =================== * deps: mime-db@~1.36.0 - Add Apple file extensions from IANA - Add extensions from IANA for `image/*` types - Add new upstream MIME types 2.1.19 / 2018-07-17 =================== * deps: mime-db@~1.35.0 - Add extension `.csl` to `application/vnd.citationstyles.style+xml` - Add extension `.es` to `application/ecmascript` - Add extension `.owl` to `application/rdf+xml` - Add new upstream MIME types - Add UTF-8 as default charset for `text/turtle` 2.1.18 / 2018-02-16 =================== * deps: mime-db@~1.33.0 - Add `application/raml+yaml` with extension `.raml` - Add `application/wasm` with extension `.wasm` - Add `text/shex` with extension `.shex` - Add extensions for JPEG-2000 images - Add extensions from IANA for `message/*` types - Add new upstream MIME types - Update font MIME types - Update `text/hjson` to registered `application/hjson` 2.1.17 / 2017-09-01 =================== * deps: mime-db@~1.30.0 - Add `application/vnd.ms-outlook` - Add `application/x-arj` - Add extension `.mjs` to `application/javascript` - Add glTF types and extensions - Add new upstream MIME types - Add `text/x-org` - Add VirtualBox MIME types - Fix `source` records for `video/*` types that are IANA - Update `font/opentype` to registered `font/otf` 2.1.16 / 2017-07-24 =================== * deps: mime-db@~1.29.0 - Add `application/fido.trusted-apps+json` - Add extension `.wadl` to `application/vnd.sun.wadl+xml` - Add extension `.gz` to `application/gzip` - Add new upstream MIME types - Update extensions `.md` and `.markdown` to be `text/markdown` 2.1.15 / 2017-03-23 =================== * deps: mime-db@~1.27.0 - Add new mime types - Add `image/apng` 2.1.14 / 2017-01-14 =================== * deps: mime-db@~1.26.0 - Add new mime types 2.1.13 / 2016-11-18 =================== * deps: mime-db@~1.25.0 - Add new mime types 2.1.12 / 2016-09-18 =================== * deps: mime-db@~1.24.0 - Add new mime types - Add `audio/mp3` 2.1.11 / 2016-05-01 =================== * deps: mime-db@~1.23.0 - Add new mime types 2.1.10 / 2016-02-15 =================== * deps: mime-db@~1.22.0 - Add new mime types - Fix extension of `application/dash+xml` - Update primary extension for `audio/mp4` 2.1.9 / 2016-01-06 ================== * deps: mime-db@~1.21.0 - Add new mime types 2.1.8 / 2015-11-30 ================== * deps: mime-db@~1.20.0 - Add new mime types 2.1.7 / 2015-09-20 ================== * deps: mime-db@~1.19.0 - Add new mime types 2.1.6 / 2015-09-03 ================== * deps: mime-db@~1.18.0 - Add new mime types 2.1.5 / 2015-08-20 ================== * deps: mime-db@~1.17.0 - Add new mime types 2.1.4 / 2015-07-30 ================== * deps: mime-db@~1.16.0 - Add new mime types 2.1.3 / 2015-07-13 ================== * deps: mime-db@~1.15.0 - Add new mime types 2.1.2 / 2015-06-25 ================== * deps: mime-db@~1.14.0 - Add new mime types 2.1.1 / 2015-06-08 ================== * perf: fix deopt during mapping 2.1.0 / 2015-06-07 ================== * Fix incorrectly treating extension-less file name as extension - i.e. `'path/to/json'` will no longer return `application/json` * Fix `.charset(type)` to accept parameters * Fix `.charset(type)` to match case-insensitive * Improve generation of extension to MIME mapping * Refactor internals for readability and no argument reassignment * Prefer `application/*` MIME types from the same source * Prefer any type over `application/octet-stream` * deps: mime-db@~1.13.0 - Add nginx as a source - Add new mime types 2.0.14 / 2015-06-06 =================== * deps: mime-db@~1.12.0 - Add new mime types 2.0.13 / 2015-05-31 =================== * deps: mime-db@~1.11.0 - Add new mime types 2.0.12 / 2015-05-19 =================== * deps: mime-db@~1.10.0 - Add new mime types 2.0.11 / 2015-05-05 =================== * deps: mime-db@~1.9.1 - Add new mime types 2.0.10 / 2015-03-13 =================== * deps: mime-db@~1.8.0 - Add new mime types 2.0.9 / 2015-02-09 ================== * deps: mime-db@~1.7.0 - Add new mime types - Community extensions ownership transferred from `node-mime` 2.0.8 / 2015-01-29 ================== * deps: mime-db@~1.6.0 - Add new mime types 2.0.7 / 2014-12-30 ================== * deps: mime-db@~1.5.0 - Add new mime types - Fix various invalid MIME type entries 2.0.6 / 2014-12-30 ================== * deps: mime-db@~1.4.0 - Add new mime types - Fix various invalid MIME type entries - Remove example template MIME types 2.0.5 / 2014-12-29 ================== * deps: mime-db@~1.3.1 - Fix missing extensions 2.0.4 / 2014-12-10 ================== * deps: mime-db@~1.3.0 - Add new mime types 2.0.3 / 2014-11-09 ================== * deps: mime-db@~1.2.0 - Add new mime types 2.0.2 / 2014-09-28 ================== * deps: mime-db@~1.1.0 - Add new mime types - Update charsets 2.0.1 / 2014-09-07 ================== * Support Node.js 0.6 2.0.0 / 2014-09-02 ================== * Use `mime-db` * Remove `.define()` 1.0.2 / 2014-08-04 ================== * Set charset=utf-8 for `text/javascript` 1.0.1 / 2014-06-24 ================== * Add `text/jsx` type 1.0.0 / 2014-05-12 ================== * Return `false` for unknown types * Set charset=utf-8 for `application/json` 0.1.0 / 2014-05-02 ================== * Initial release node_modules/mime-types/LICENSE 0000664 00000002217 15114741631 0012326 0 ustar 00 (The MIT License) Copyright (c) 2014 Jonathan Ong <me@jongleberry.com> Copyright (c) 2015 Douglas Christopher Wilson <doug@somethingdoug.com> Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the 'Software'), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. node_modules/mime-types/index.js 0000664 00000007117 15114741631 0012772 0 ustar 00 /*! * mime-types * Copyright(c) 2014 Jonathan Ong * Copyright(c) 2015 Douglas Christopher Wilson * MIT Licensed */ 'use strict' /** * Module dependencies. * @private */ var db = require('mime-db') var extname = require('path').extname /** * Module variables. * @private */ var EXTRACT_TYPE_REGEXP = /^\s*([^;\s]*)(?:;|\s|$)/ var TEXT_TYPE_REGEXP = /^text\//i /** * Module exports. * @public */ exports.charset = charset exports.charsets = { lookup: charset } exports.contentType = contentType exports.extension = extension exports.extensions = Object.create(null) exports.lookup = lookup exports.types = Object.create(null) // Populate the extensions/types maps populateMaps(exports.extensions, exports.types) /** * Get the default charset for a MIME type. * * @param {string} type * @return {boolean|string} */ function charset (type) { if (!type || typeof type !== 'string') { return false } // TODO: use media-typer var match = EXTRACT_TYPE_REGEXP.exec(type) var mime = match && db[match[1].toLowerCase()] if (mime && mime.charset) { return mime.charset } // default text/* to utf-8 if (match && TEXT_TYPE_REGEXP.test(match[1])) { return 'UTF-8' } return false } /** * Create a full Content-Type header given a MIME type or extension. * * @param {string} str * @return {boolean|string} */ function contentType (str) { // TODO: should this even be in this module? if (!str || typeof str !== 'string') { return false } var mime = str.indexOf('/') === -1 ? exports.lookup(str) : str if (!mime) { return false } // TODO: use content-type or other module if (mime.indexOf('charset') === -1) { var charset = exports.charset(mime) if (charset) mime += '; charset=' + charset.toLowerCase() } return mime } /** * Get the default extension for a MIME type. * * @param {string} type * @return {boolean|string} */ function extension (type) { if (!type || typeof type !== 'string') { return false } // TODO: use media-typer var match = EXTRACT_TYPE_REGEXP.exec(type) // get extensions var exts = match && exports.extensions[match[1].toLowerCase()] if (!exts || !exts.length) { return false } return exts[0] } /** * Lookup the MIME type for a file path/extension. * * @param {string} path * @return {boolean|string} */ function lookup (path) { if (!path || typeof path !== 'string') { return false } // get the extension ("ext" or ".ext" or full path) var extension = extname('x.' + path) .toLowerCase() .substr(1) if (!extension) { return false } return exports.types[extension] || false } /** * Populate the extensions and types maps. * @private */ function populateMaps (extensions, types) { // source preference (least -> most) var preference = ['nginx', 'apache', undefined, 'iana'] Object.keys(db).forEach(function forEachMimeType (type) { var mime = db[type] var exts = mime.extensions if (!exts || !exts.length) { return } // mime -> extensions extensions[type] = exts // extension -> mime for (var i = 0; i < exts.length; i++) { var extension = exts[i] if (types[extension]) { var from = preference.indexOf(db[types[extension]].source) var to = preference.indexOf(mime.source) if (types[extension] !== 'application/octet-stream' && (from > to || (from === to && types[extension].substr(0, 12) === 'application/'))) { // skip the remapping continue } } // set the extension -> mime types[extension] = type } }) } node_modules/mime-types/README.md 0000664 00000006631 15114741631 0012604 0 ustar 00 # mime-types [![NPM Version][npm-version-image]][npm-url] [![NPM Downloads][npm-downloads-image]][npm-url] [![Node.js Version][node-version-image]][node-version-url] [![Build Status][ci-image]][ci-url] [![Test Coverage][coveralls-image]][coveralls-url] The ultimate javascript content-type utility. Similar to [the `mime@1.x` module](https://www.npmjs.com/package/mime), except: - __No fallbacks.__ Instead of naively returning the first available type, `mime-types` simply returns `false`, so do `var type = mime.lookup('unrecognized') || 'application/octet-stream'`. - No `new Mime()` business, so you could do `var lookup = require('mime-types').lookup`. - No `.define()` functionality - Bug fixes for `.lookup(path)` Otherwise, the API is compatible with `mime` 1.x. ## Install This is a [Node.js](https://nodejs.org/en/) module available through the [npm registry](https://www.npmjs.com/). Installation is done using the [`npm install` command](https://docs.npmjs.com/getting-started/installing-npm-packages-locally): ```sh $ npm install mime-types ``` ## Adding Types All mime types are based on [mime-db](https://www.npmjs.com/package/mime-db), so open a PR there if you'd like to add mime types. ## API ```js var mime = require('mime-types') ``` All functions return `false` if input is invalid or not found. ### mime.lookup(path) Lookup the content-type associated with a file. ```js mime.lookup('json') // 'application/json' mime.lookup('.md') // 'text/markdown' mime.lookup('file.html') // 'text/html' mime.lookup('folder/file.js') // 'application/javascript' mime.lookup('folder/.htaccess') // false mime.lookup('cats') // false ``` ### mime.contentType(type) Create a full content-type header given a content-type or extension. When given an extension, `mime.lookup` is used to get the matching content-type, otherwise the given content-type is used. Then if the content-type does not already have a `charset` parameter, `mime.charset` is used to get the default charset and add to the returned content-type. ```js mime.contentType('markdown') // 'text/x-markdown; charset=utf-8' mime.contentType('file.json') // 'application/json; charset=utf-8' mime.contentType('text/html') // 'text/html; charset=utf-8' mime.contentType('text/html; charset=iso-8859-1') // 'text/html; charset=iso-8859-1' // from a full path mime.contentType(path.extname('/path/to/file.json')) // 'application/json; charset=utf-8' ``` ### mime.extension(type) Get the default extension for a content-type. ```js mime.extension('application/octet-stream') // 'bin' ``` ### mime.charset(type) Lookup the implied default charset of a content-type. ```js mime.charset('text/markdown') // 'UTF-8' ``` ### var type = mime.types[extension] A map of content-types by extension. ### [extensions...] = mime.extensions[type] A map of extensions by content-type. ## License [MIT](LICENSE) [ci-image]: https://badgen.net/github/checks/jshttp/mime-types/master?label=ci [ci-url]: https://github.com/jshttp/mime-types/actions/workflows/ci.yml [coveralls-image]: https://badgen.net/coveralls/c/github/jshttp/mime-types/master [coveralls-url]: https://coveralls.io/r/jshttp/mime-types?branch=master [node-version-image]: https://badgen.net/npm/node/mime-types [node-version-url]: https://nodejs.org/en/download [npm-downloads-image]: https://badgen.net/npm/dm/mime-types [npm-url]: https://npmjs.org/package/mime-types [npm-version-image]: https://badgen.net/npm/v/mime-types node_modules/balanced-match/package.json 0000664 00000002055 15114741631 0014341 0 ustar 00 { "name": "balanced-match", "description": "Match balanced character pairs, like \"{\" and \"}\"", "version": "1.0.2", "repository": { "type": "git", "url": "git://github.com/juliangruber/balanced-match.git" }, "homepage": "https://github.com/juliangruber/balanced-match", "main": "index.js", "scripts": { "test": "tape test/test.js", "bench": "matcha test/bench.js" }, "devDependencies": { "matcha": "^0.7.0", "tape": "^4.6.0" }, "keywords": [ "match", "regexp", "test", "balanced", "parse" ], "author": { "name": "Julian Gruber", "email": "mail@juliangruber.com", "url": "http://juliangruber.com" }, "license": "MIT", "testling": { "files": "test/*.js", "browsers": [ "ie/8..latest", "firefox/20..latest", "firefox/nightly", "chrome/25..latest", "chrome/canary", "opera/12..latest", "opera/next", "safari/5.1..latest", "ipad/6.0..latest", "iphone/6.0..latest", "android-browser/4.2..latest" ] } } node_modules/balanced-match/index.js 0000664 00000002303 15114741631 0013514 0 ustar 00 'use strict'; module.exports = balanced; function balanced(a, b, str) { if (a instanceof RegExp) a = maybeMatch(a, str); if (b instanceof RegExp) b = maybeMatch(b, str); var r = range(a, b, str); return r && { start: r[0], end: r[1], pre: str.slice(0, r[0]), body: str.slice(r[0] + a.length, r[1]), post: str.slice(r[1] + b.length) }; } function maybeMatch(reg, str) { var m = str.match(reg); return m ? m[0] : null; } balanced.range = range; function range(a, b, str) { var begs, beg, left, right, result; var ai = str.indexOf(a); var bi = str.indexOf(b, ai + 1); var i = ai; if (ai >= 0 && bi > 0) { if(a===b) { return [ai, bi]; } begs = []; left = str.length; while (i >= 0 && !result) { if (i == ai) { begs.push(i); ai = str.indexOf(a, i + 1); } else if (begs.length == 1) { result = [ begs.pop(), bi ]; } else { beg = begs.pop(); if (beg < left) { left = beg; right = bi; } bi = str.indexOf(b, i + 1); } i = ai < bi && ai >= 0 ? ai : bi; } if (begs.length) { result = [ left, right ]; } } return result; } node_modules/balanced-match/LICENSE.md 0000664 00000002110 15114741631 0013447 0 ustar 00 (MIT) Copyright (c) 2013 Julian Gruber <julian@juliangruber.com> Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. node_modules/balanced-match/.github/FUNDING.yml 0000664 00000000065 15114741631 0015227 0 ustar 00 tidelift: "npm/balanced-match" patreon: juliangruber node_modules/balanced-match/README.md 0000664 00000006656 15114741631 0013345 0 ustar 00 # balanced-match Match balanced string pairs, like `{` and `}` or `<b>` and `</b>`. Supports regular expressions as well! [](http://travis-ci.org/juliangruber/balanced-match) [](https://www.npmjs.org/package/balanced-match) [](https://ci.testling.com/juliangruber/balanced-match) ## Example Get the first matching pair of braces: ```js var balanced = require('balanced-match'); console.log(balanced('{', '}', 'pre{in{nested}}post')); console.log(balanced('{', '}', 'pre{first}between{second}post')); console.log(balanced(/\s+\{\s+/, /\s+\}\s+/, 'pre { in{nest} } post')); ``` The matches are: ```bash $ node example.js { start: 3, end: 14, pre: 'pre', body: 'in{nested}', post: 'post' } { start: 3, end: 9, pre: 'pre', body: 'first', post: 'between{second}post' } { start: 3, end: 17, pre: 'pre', body: 'in{nest}', post: 'post' } ``` ## API ### var m = balanced(a, b, str) For the first non-nested matching pair of `a` and `b` in `str`, return an object with those keys: * **start** the index of the first match of `a` * **end** the index of the matching `b` * **pre** the preamble, `a` and `b` not included * **body** the match, `a` and `b` not included * **post** the postscript, `a` and `b` not included If there's no match, `undefined` will be returned. If the `str` contains more `a` than `b` / there are unmatched pairs, the first match that was closed will be used. For example, `{{a}` will match `['{', 'a', '']` and `{a}}` will match `['', 'a', '}']`. ### var r = balanced.range(a, b, str) For the first non-nested matching pair of `a` and `b` in `str`, return an array with indexes: `[ <a index>, <b index> ]`. If there's no match, `undefined` will be returned. If the `str` contains more `a` than `b` / there are unmatched pairs, the first match that was closed will be used. For example, `{{a}` will match `[ 1, 3 ]` and `{a}}` will match `[0, 2]`. ## Installation With [npm](https://npmjs.org) do: ```bash npm install balanced-match ``` ## Security contact information To report a security vulnerability, please use the [Tidelift security contact](https://tidelift.com/security). Tidelift will coordinate the fix and disclosure. ## License (MIT) Copyright (c) 2013 Julian Gruber <julian@juliangruber.com> Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. node_modules/axios/package.json 0000664 00000017517 15114741631 0012652 0 ustar 00 { "name": "axios", "version": "1.10.0", "description": "Promise based HTTP client for the browser and node.js", "main": "index.js", "exports": { ".": { "types": { "require": "./index.d.cts", "default": "./index.d.ts" }, "react-native": { "require": "./dist/browser/axios.cjs", "default": "./dist/esm/axios.js" }, "browser": { "require": "./dist/browser/axios.cjs", "default": "./index.js" }, "default": { "require": "./dist/node/axios.cjs", "default": "./index.js" } }, "./lib/adapters/http.js": "./lib/adapters/http.js", "./lib/adapters/xhr.js": "./lib/adapters/xhr.js", "./unsafe/*": "./lib/*", "./unsafe/core/settle.js": "./lib/core/settle.js", "./unsafe/core/buildFullPath.js": "./lib/core/buildFullPath.js", "./unsafe/helpers/isAbsoluteURL.js": "./lib/helpers/isAbsoluteURL.js", "./unsafe/helpers/buildURL.js": "./lib/helpers/buildURL.js", "./unsafe/helpers/combineURLs.js": "./lib/helpers/combineURLs.js", "./unsafe/adapters/http.js": "./lib/adapters/http.js", "./unsafe/adapters/xhr.js": "./lib/adapters/xhr.js", "./unsafe/utils.js": "./lib/utils.js", "./package.json": "./package.json" }, "type": "module", "types": "index.d.ts", "scripts": { "test": "npm run test:eslint && npm run test:mocha && npm run test:karma && npm run test:dtslint && npm run test:exports", "test:eslint": "node bin/ssl_hotfix.js eslint lib/**/*.js", "test:dtslint": "dtslint --localTs node_modules/typescript/lib", "test:mocha": "node bin/ssl_hotfix.js mocha test/unit/**/*.js --timeout 30000 --exit", "test:exports": "node bin/ssl_hotfix.js mocha test/module/test.js --timeout 30000 --exit", "test:karma": "node bin/ssl_hotfix.js cross-env LISTEN_ADDR=:: karma start karma.conf.cjs --single-run", "test:karma:firefox": "node bin/ssl_hotfix.js cross-env LISTEN_ADDR=:: Browsers=Firefox karma start karma.conf.cjs --single-run", "test:karma:server": "node bin/ssl_hotfix.js cross-env karma start karma.conf.cjs", "test:build:version": "node ./bin/check-build-version.js", "start": "node ./sandbox/server.js", "preversion": "gulp version", "version": "npm run build && git add dist && git add package.json", "prepublishOnly": "npm run test:build:version", "postpublish": "git push && git push --tags", "build": "gulp clear && cross-env NODE_ENV=production rollup -c -m", "examples": "node ./examples/server.js", "coveralls": "cat coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js", "fix": "eslint --fix lib/**/*.js", "prepare": "husky install && npm run prepare:hooks", "prepare:hooks": "npx husky set .husky/commit-msg \"npx commitlint --edit $1\"", "release:dry": "release-it --dry-run --no-npm", "release:info": "release-it --release-version", "release:beta:no-npm": "release-it --preRelease=beta --no-npm", "release:beta": "release-it --preRelease=beta", "release:no-npm": "release-it --no-npm", "release:changelog:fix": "node ./bin/injectContributorsList.js && git add CHANGELOG.md", "release": "release-it" }, "repository": { "type": "git", "url": "https://github.com/axios/axios.git" }, "keywords": [ "xhr", "http", "ajax", "promise", "node" ], "author": "Matt Zabriskie", "license": "MIT", "bugs": { "url": "https://github.com/axios/axios/issues" }, "homepage": "https://axios-http.com", "devDependencies": { "@babel/core": "^7.23.9", "@babel/preset-env": "^7.23.9", "@commitlint/cli": "^17.8.1", "@commitlint/config-conventional": "^17.8.1", "@release-it/conventional-changelog": "^5.1.1", "@rollup/plugin-babel": "^5.3.1", "@rollup/plugin-commonjs": "^15.1.0", "@rollup/plugin-json": "^4.1.0", "@rollup/plugin-multi-entry": "^4.1.0", "@rollup/plugin-node-resolve": "^9.0.0", "abortcontroller-polyfill": "^1.7.5", "auto-changelog": "^2.4.0", "body-parser": "^1.20.2", "chalk": "^5.3.0", "coveralls": "^3.1.1", "cross-env": "^7.0.3", "dev-null": "^0.1.1", "dtslint": "^4.2.1", "es6-promise": "^4.2.8", "eslint": "^8.56.0", "express": "^4.18.2", "formdata-node": "^5.0.1", "formidable": "^2.1.2", "fs-extra": "^10.1.0", "get-stream": "^3.0.0", "gulp": "^4.0.2", "gzip-size": "^7.0.0", "handlebars": "^4.7.8", "husky": "^8.0.3", "istanbul-instrumenter-loader": "^3.0.1", "jasmine-core": "^2.99.1", "karma": "^6.3.17", "karma-chrome-launcher": "^3.2.0", "karma-firefox-launcher": "^2.1.2", "karma-jasmine": "^1.1.2", "karma-jasmine-ajax": "^0.1.13", "karma-rollup-preprocessor": "^7.0.8", "karma-safari-launcher": "^1.0.0", "karma-sauce-launcher": "^4.3.6", "karma-sinon": "^1.0.5", "karma-sourcemap-loader": "^0.3.8", "memoizee": "^0.4.15", "minimist": "^1.2.8", "mocha": "^10.3.0", "multer": "^1.4.4", "pretty-bytes": "^6.1.1", "release-it": "^15.11.0", "rollup": "^2.79.1", "rollup-plugin-auto-external": "^2.0.0", "rollup-plugin-bundle-size": "^1.0.3", "rollup-plugin-terser": "^7.0.2", "sinon": "^4.5.0", "stream-throttle": "^0.1.3", "string-replace-async": "^3.0.2", "terser-webpack-plugin": "^4.2.3", "typescript": "^4.9.5", "@rollup/plugin-alias": "^5.1.0" }, "browser": { "./lib/adapters/http.js": "./lib/helpers/null.js", "./lib/platform/node/index.js": "./lib/platform/browser/index.js", "./lib/platform/node/classes/FormData.js": "./lib/helpers/null.js" }, "react-native": { "./lib/adapters/http.js": "./lib/helpers/null.js", "./lib/platform/node/index.js": "./lib/platform/browser/index.js", "./lib/platform/node/classes/FormData.js": "./lib/helpers/null.js" }, "jsdelivr": "dist/axios.min.js", "unpkg": "dist/axios.min.js", "typings": "./index.d.ts", "dependencies": { "follow-redirects": "^1.15.6", "form-data": "^4.0.0", "proxy-from-env": "^1.1.0" }, "bundlesize": [ { "path": "./dist/axios.min.js", "threshold": "5kB" } ], "contributors": [ "Matt Zabriskie (https://github.com/mzabriskie)", "Nick Uraltsev (https://github.com/nickuraltsev)", "Dmitriy Mozgovoy (https://github.com/DigitalBrainJS)", "Jay (https://github.com/jasonsaayman)", "Emily Morehouse (https://github.com/emilyemorehouse)", "Rubén Norte (https://github.com/rubennorte)", "Justin Beckwith (https://github.com/JustinBeckwith)", "Martti Laine (https://github.com/codeclown)", "Xianming Zhong (https://github.com/chinesedfan)", "Rikki Gibson (https://github.com/RikkiGibson)", "Remco Haszing (https://github.com/remcohaszing)", "Yasu Flores (https://github.com/yasuf)", "Ben Carp (https://github.com/carpben)" ], "sideEffects": false, "release-it": { "git": { "commitMessage": "chore(release): v${version}", "push": true, "commit": true, "tag": true, "requireCommits": false, "requireCleanWorkingDir": false }, "github": { "release": true, "draft": true }, "npm": { "publish": false, "ignoreVersion": false }, "plugins": { "@release-it/conventional-changelog": { "preset": "angular", "infile": "CHANGELOG.md", "header": "# Changelog" } }, "hooks": { "before:init": "npm test", "after:bump": "gulp version --bump ${version} && npm run build && npm run test:build:version && git add ./dist && git add ./package-lock.json", "before:release": "npm run release:changelog:fix", "after:release": "echo Successfully released ${name} v${version} to ${repo.repository}." } }, "commitlint": { "rules": { "header-max-length": [ 2, "always", 130 ] }, "extends": [ "@commitlint/config-conventional" ] } } node_modules/axios/LICENSE 0000664 00000002074 15114741631 0011361 0 ustar 00 # Copyright (c) 2014-present Matt Zabriskie & Collaborators Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. node_modules/axios/MIGRATION_GUIDE.md 0000664 00000000045 15114741631 0013140 0 ustar 00 # Migration Guide ## 0.x.x -> 1.1.0 node_modules/axios/index.d.ts 0000664 00000044211 15114741631 0012254 0 ustar 00 // TypeScript Version: 4.7 export type AxiosHeaderValue = AxiosHeaders | string | string[] | number | boolean | null; interface RawAxiosHeaders { [key: string]: AxiosHeaderValue; } type MethodsHeaders = Partial<{ [Key in Method as Lowercase<Key>]: AxiosHeaders; } & {common: AxiosHeaders}>; type AxiosHeaderMatcher = string | RegExp | ((this: AxiosHeaders, value: string, name: string) => boolean); type AxiosHeaderParser = (this: AxiosHeaders, value: AxiosHeaderValue, header: string) => any; export class AxiosHeaders { constructor( headers?: RawAxiosHeaders | AxiosHeaders | string ); [key: string]: any; set(headerName?: string, value?: AxiosHeaderValue, rewrite?: boolean | AxiosHeaderMatcher): AxiosHeaders; set(headers?: RawAxiosHeaders | AxiosHeaders | string, rewrite?: boolean): AxiosHeaders; get(headerName: string, parser: RegExp): RegExpExecArray | null; get(headerName: string, matcher?: true | AxiosHeaderParser): AxiosHeaderValue; has(header: string, matcher?: AxiosHeaderMatcher): boolean; delete(header: string | string[], matcher?: AxiosHeaderMatcher): boolean; clear(matcher?: AxiosHeaderMatcher): boolean; normalize(format: boolean): AxiosHeaders; concat(...targets: Array<AxiosHeaders | RawAxiosHeaders | string | undefined | null>): AxiosHeaders; toJSON(asStrings?: boolean): RawAxiosHeaders; static from(thing?: AxiosHeaders | RawAxiosHeaders | string): AxiosHeaders; static accessor(header: string | string[]): AxiosHeaders; static concat(...targets: Array<AxiosHeaders | RawAxiosHeaders | string | undefined | null>): AxiosHeaders; setContentType(value: ContentType, rewrite?: boolean | AxiosHeaderMatcher): AxiosHeaders; getContentType(parser?: RegExp): RegExpExecArray | null; getContentType(matcher?: AxiosHeaderMatcher): AxiosHeaderValue; hasContentType(matcher?: AxiosHeaderMatcher): boolean; setContentLength(value: AxiosHeaderValue, rewrite?: boolean | AxiosHeaderMatcher): AxiosHeaders; getContentLength(parser?: RegExp): RegExpExecArray | null; getContentLength(matcher?: AxiosHeaderMatcher): AxiosHeaderValue; hasContentLength(matcher?: AxiosHeaderMatcher): boolean; setAccept(value: AxiosHeaderValue, rewrite?: boolean | AxiosHeaderMatcher): AxiosHeaders; getAccept(parser?: RegExp): RegExpExecArray | null; getAccept(matcher?: AxiosHeaderMatcher): AxiosHeaderValue; hasAccept(matcher?: AxiosHeaderMatcher): boolean; setUserAgent(value: AxiosHeaderValue, rewrite?: boolean | AxiosHeaderMatcher): AxiosHeaders; getUserAgent(parser?: RegExp): RegExpExecArray | null; getUserAgent(matcher?: AxiosHeaderMatcher): AxiosHeaderValue; hasUserAgent(matcher?: AxiosHeaderMatcher): boolean; setContentEncoding(value: AxiosHeaderValue, rewrite?: boolean | AxiosHeaderMatcher): AxiosHeaders; getContentEncoding(parser?: RegExp): RegExpExecArray | null; getContentEncoding(matcher?: AxiosHeaderMatcher): AxiosHeaderValue; hasContentEncoding(matcher?: AxiosHeaderMatcher): boolean; setAuthorization(value: AxiosHeaderValue, rewrite?: boolean | AxiosHeaderMatcher): AxiosHeaders; getAuthorization(parser?: RegExp): RegExpExecArray | null; getAuthorization(matcher?: AxiosHeaderMatcher): AxiosHeaderValue; hasAuthorization(matcher?: AxiosHeaderMatcher): boolean; getSetCookie(): string[]; [Symbol.iterator](): IterableIterator<[string, AxiosHeaderValue]>; } type CommonRequestHeadersList = 'Accept' | 'Content-Length' | 'User-Agent' | 'Content-Encoding' | 'Authorization'; type ContentType = AxiosHeaderValue | 'text/html' | 'text/plain' | 'multipart/form-data' | 'application/json' | 'application/x-www-form-urlencoded' | 'application/octet-stream'; export type RawAxiosRequestHeaders = Partial<RawAxiosHeaders & { [Key in CommonRequestHeadersList]: AxiosHeaderValue; } & { 'Content-Type': ContentType }>; export type AxiosRequestHeaders = RawAxiosRequestHeaders & AxiosHeaders; type CommonResponseHeadersList = 'Server' | 'Content-Type' | 'Content-Length' | 'Cache-Control'| 'Content-Encoding'; type RawCommonResponseHeaders = { [Key in CommonResponseHeadersList]: AxiosHeaderValue; } & { "set-cookie": string[]; }; export type RawAxiosResponseHeaders = Partial<RawAxiosHeaders & RawCommonResponseHeaders>; export type AxiosResponseHeaders = RawAxiosResponseHeaders & AxiosHeaders; export interface AxiosRequestTransformer { (this: InternalAxiosRequestConfig, data: any, headers: AxiosRequestHeaders): any; } export interface AxiosResponseTransformer { (this: InternalAxiosRequestConfig, data: any, headers: AxiosResponseHeaders, status?: number): any; } export interface AxiosAdapter { (config: InternalAxiosRequestConfig): AxiosPromise; } export interface AxiosBasicCredentials { username: string; password: string; } export interface AxiosProxyConfig { host: string; port: number; auth?: AxiosBasicCredentials; protocol?: string; } export enum HttpStatusCode { Continue = 100, SwitchingProtocols = 101, Processing = 102, EarlyHints = 103, Ok = 200, Created = 201, Accepted = 202, NonAuthoritativeInformation = 203, NoContent = 204, ResetContent = 205, PartialContent = 206, MultiStatus = 207, AlreadyReported = 208, ImUsed = 226, MultipleChoices = 300, MovedPermanently = 301, Found = 302, SeeOther = 303, NotModified = 304, UseProxy = 305, Unused = 306, TemporaryRedirect = 307, PermanentRedirect = 308, BadRequest = 400, Unauthorized = 401, PaymentRequired = 402, Forbidden = 403, NotFound = 404, MethodNotAllowed = 405, NotAcceptable = 406, ProxyAuthenticationRequired = 407, RequestTimeout = 408, Conflict = 409, Gone = 410, LengthRequired = 411, PreconditionFailed = 412, PayloadTooLarge = 413, UriTooLong = 414, UnsupportedMediaType = 415, RangeNotSatisfiable = 416, ExpectationFailed = 417, ImATeapot = 418, MisdirectedRequest = 421, UnprocessableEntity = 422, Locked = 423, FailedDependency = 424, TooEarly = 425, UpgradeRequired = 426, PreconditionRequired = 428, TooManyRequests = 429, RequestHeaderFieldsTooLarge = 431, UnavailableForLegalReasons = 451, InternalServerError = 500, NotImplemented = 501, BadGateway = 502, ServiceUnavailable = 503, GatewayTimeout = 504, HttpVersionNotSupported = 505, VariantAlsoNegotiates = 506, InsufficientStorage = 507, LoopDetected = 508, NotExtended = 510, NetworkAuthenticationRequired = 511, } export type Method = | 'get' | 'GET' | 'delete' | 'DELETE' | 'head' | 'HEAD' | 'options' | 'OPTIONS' | 'post' | 'POST' | 'put' | 'PUT' | 'patch' | 'PATCH' | 'purge' | 'PURGE' | 'link' | 'LINK' | 'unlink' | 'UNLINK'; export type ResponseType = | 'arraybuffer' | 'blob' | 'document' | 'json' | 'text' | 'stream' | 'formdata'; export type responseEncoding = | 'ascii' | 'ASCII' | 'ansi' | 'ANSI' | 'binary' | 'BINARY' | 'base64' | 'BASE64' | 'base64url' | 'BASE64URL' | 'hex' | 'HEX' | 'latin1' | 'LATIN1' | 'ucs-2' | 'UCS-2' | 'ucs2' | 'UCS2' | 'utf-8' | 'UTF-8' | 'utf8' | 'UTF8' | 'utf16le' | 'UTF16LE'; export interface TransitionalOptions { silentJSONParsing?: boolean; forcedJSONParsing?: boolean; clarifyTimeoutError?: boolean; } export interface GenericAbortSignal { readonly aborted: boolean; onabort?: ((...args: any) => any) | null; addEventListener?: (...args: any) => any; removeEventListener?: (...args: any) => any; } export interface FormDataVisitorHelpers { defaultVisitor: SerializerVisitor; convertValue: (value: any) => any; isVisitable: (value: any) => boolean; } export interface SerializerVisitor { ( this: GenericFormData, value: any, key: string | number, path: null | Array<string | number>, helpers: FormDataVisitorHelpers ): boolean; } export interface SerializerOptions { visitor?: SerializerVisitor; dots?: boolean; metaTokens?: boolean; indexes?: boolean | null; } // tslint:disable-next-line export interface FormSerializerOptions extends SerializerOptions { } export interface ParamEncoder { (value: any, defaultEncoder: (value: any) => any): any; } export interface CustomParamsSerializer { (params: Record<string, any>, options?: ParamsSerializerOptions): string; } export interface ParamsSerializerOptions extends SerializerOptions { encode?: ParamEncoder; serialize?: CustomParamsSerializer; } type MaxUploadRate = number; type MaxDownloadRate = number; type BrowserProgressEvent = any; export interface AxiosProgressEvent { loaded: number; total?: number; progress?: number; bytes: number; rate?: number; estimated?: number; upload?: boolean; download?: boolean; event?: BrowserProgressEvent; lengthComputable: boolean; } type Milliseconds = number; type AxiosAdapterName = 'fetch' | 'xhr' | 'http' | (string & {}); type AxiosAdapterConfig = AxiosAdapter | AxiosAdapterName; export type AddressFamily = 4 | 6 | undefined; export interface LookupAddressEntry { address: string; family?: AddressFamily; } export type LookupAddress = string | LookupAddressEntry; export interface AxiosRequestConfig<D = any> { url?: string; method?: Method | string; baseURL?: string; allowAbsoluteUrls?: boolean; transformRequest?: AxiosRequestTransformer | AxiosRequestTransformer[]; transformResponse?: AxiosResponseTransformer | AxiosResponseTransformer[]; headers?: (RawAxiosRequestHeaders & MethodsHeaders) | AxiosHeaders; params?: any; paramsSerializer?: ParamsSerializerOptions | CustomParamsSerializer; data?: D; timeout?: Milliseconds; timeoutErrorMessage?: string; withCredentials?: boolean; adapter?: AxiosAdapterConfig | AxiosAdapterConfig[]; auth?: AxiosBasicCredentials; responseType?: ResponseType; responseEncoding?: responseEncoding | string; xsrfCookieName?: string; xsrfHeaderName?: string; onUploadProgress?: (progressEvent: AxiosProgressEvent) => void; onDownloadProgress?: (progressEvent: AxiosProgressEvent) => void; maxContentLength?: number; validateStatus?: ((status: number) => boolean) | null; maxBodyLength?: number; maxRedirects?: number; maxRate?: number | [MaxUploadRate, MaxDownloadRate]; beforeRedirect?: (options: Record<string, any>, responseDetails: {headers: Record<string, string>, statusCode: HttpStatusCode}) => void; socketPath?: string | null; transport?: any; httpAgent?: any; httpsAgent?: any; proxy?: AxiosProxyConfig | false; cancelToken?: CancelToken; decompress?: boolean; transitional?: TransitionalOptions; signal?: GenericAbortSignal; insecureHTTPParser?: boolean; env?: { FormData?: new (...args: any[]) => object; }; formSerializer?: FormSerializerOptions; family?: AddressFamily; lookup?: ((hostname: string, options: object, cb: (err: Error | null, address: LookupAddress | LookupAddress[], family?: AddressFamily) => void) => void) | ((hostname: string, options: object) => Promise<[address: LookupAddressEntry | LookupAddressEntry[], family?: AddressFamily] | LookupAddress>); withXSRFToken?: boolean | ((config: InternalAxiosRequestConfig) => boolean | undefined); fetchOptions?: Omit<RequestInit, 'body' | 'headers' | 'method' | 'signal'> | Record<string, any>; } // Alias export type RawAxiosRequestConfig<D = any> = AxiosRequestConfig<D>; export interface InternalAxiosRequestConfig<D = any> extends AxiosRequestConfig<D> { headers: AxiosRequestHeaders; } export interface HeadersDefaults { common: RawAxiosRequestHeaders; delete: RawAxiosRequestHeaders; get: RawAxiosRequestHeaders; head: RawAxiosRequestHeaders; post: RawAxiosRequestHeaders; put: RawAxiosRequestHeaders; patch: RawAxiosRequestHeaders; options?: RawAxiosRequestHeaders; purge?: RawAxiosRequestHeaders; link?: RawAxiosRequestHeaders; unlink?: RawAxiosRequestHeaders; } export interface AxiosDefaults<D = any> extends Omit<AxiosRequestConfig<D>, 'headers'> { headers: HeadersDefaults; } export interface CreateAxiosDefaults<D = any> extends Omit<AxiosRequestConfig<D>, 'headers'> { headers?: RawAxiosRequestHeaders | AxiosHeaders | Partial<HeadersDefaults>; } export interface AxiosResponse<T = any, D = any> { data: T; status: number; statusText: string; headers: RawAxiosResponseHeaders | AxiosResponseHeaders; config: InternalAxiosRequestConfig<D>; request?: any; } export class AxiosError<T = unknown, D = any> extends Error { constructor( message?: string, code?: string, config?: InternalAxiosRequestConfig<D>, request?: any, response?: AxiosResponse<T, D> ); config?: InternalAxiosRequestConfig<D>; code?: string; request?: any; response?: AxiosResponse<T, D>; isAxiosError: boolean; status?: number; toJSON: () => object; cause?: Error; static from<T = unknown, D = any>( error: Error | unknown, code?: string, config?: InternalAxiosRequestConfig<D>, request?: any, response?: AxiosResponse<T, D>, customProps?: object, ): AxiosError<T, D>; static readonly ERR_FR_TOO_MANY_REDIRECTS = "ERR_FR_TOO_MANY_REDIRECTS"; static readonly ERR_BAD_OPTION_VALUE = "ERR_BAD_OPTION_VALUE"; static readonly ERR_BAD_OPTION = "ERR_BAD_OPTION"; static readonly ERR_NETWORK = "ERR_NETWORK"; static readonly ERR_DEPRECATED = "ERR_DEPRECATED"; static readonly ERR_BAD_RESPONSE = "ERR_BAD_RESPONSE"; static readonly ERR_BAD_REQUEST = "ERR_BAD_REQUEST"; static readonly ERR_NOT_SUPPORT = "ERR_NOT_SUPPORT"; static readonly ERR_INVALID_URL = "ERR_INVALID_URL"; static readonly ERR_CANCELED = "ERR_CANCELED"; static readonly ECONNABORTED = "ECONNABORTED"; static readonly ETIMEDOUT = "ETIMEDOUT"; } export class CanceledError<T> extends AxiosError<T> { } export type AxiosPromise<T = any> = Promise<AxiosResponse<T>>; export interface CancelStatic { new (message?: string): Cancel; } export interface Cancel { message: string | undefined; } export interface Canceler { (message?: string, config?: AxiosRequestConfig, request?: any): void; } export interface CancelTokenStatic { new (executor: (cancel: Canceler) => void): CancelToken; source(): CancelTokenSource; } export interface CancelToken { promise: Promise<Cancel>; reason?: Cancel; throwIfRequested(): void; } export interface CancelTokenSource { token: CancelToken; cancel: Canceler; } export interface AxiosInterceptorOptions { synchronous?: boolean; runWhen?: (config: InternalAxiosRequestConfig) => boolean; } type AxiosRequestInterceptorUse<T> = (onFulfilled?: ((value: T) => T | Promise<T>) | null, onRejected?: ((error: any) => any) | null, options?: AxiosInterceptorOptions) => number; type AxiosResponseInterceptorUse<T> = (onFulfilled?: ((value: T) => T | Promise<T>) | null, onRejected?: ((error: any) => any) | null) => number; export interface AxiosInterceptorManager<V> { use: V extends AxiosResponse ? AxiosResponseInterceptorUse<V> : AxiosRequestInterceptorUse<V>; eject(id: number): void; clear(): void; } export class Axios { constructor(config?: AxiosRequestConfig); defaults: AxiosDefaults; interceptors: { request: AxiosInterceptorManager<InternalAxiosRequestConfig>; response: AxiosInterceptorManager<AxiosResponse>; }; getUri(config?: AxiosRequestConfig): string; request<T = any, R = AxiosResponse<T>, D = any>(config: AxiosRequestConfig<D>): Promise<R>; get<T = any, R = AxiosResponse<T>, D = any>(url: string, config?: AxiosRequestConfig<D>): Promise<R>; delete<T = any, R = AxiosResponse<T>, D = any>(url: string, config?: AxiosRequestConfig<D>): Promise<R>; head<T = any, R = AxiosResponse<T>, D = any>(url: string, config?: AxiosRequestConfig<D>): Promise<R>; options<T = any, R = AxiosResponse<T>, D = any>(url: string, config?: AxiosRequestConfig<D>): Promise<R>; post<T = any, R = AxiosResponse<T>, D = any>(url: string, data?: D, config?: AxiosRequestConfig<D>): Promise<R>; put<T = any, R = AxiosResponse<T>, D = any>(url: string, data?: D, config?: AxiosRequestConfig<D>): Promise<R>; patch<T = any, R = AxiosResponse<T>, D = any>(url: string, data?: D, config?: AxiosRequestConfig<D>): Promise<R>; postForm<T = any, R = AxiosResponse<T>, D = any>(url: string, data?: D, config?: AxiosRequestConfig<D>): Promise<R>; putForm<T = any, R = AxiosResponse<T>, D = any>(url: string, data?: D, config?: AxiosRequestConfig<D>): Promise<R>; patchForm<T = any, R = AxiosResponse<T>, D = any>(url: string, data?: D, config?: AxiosRequestConfig<D>): Promise<R>; } export interface AxiosInstance extends Axios { <T = any, R = AxiosResponse<T>, D = any>(config: AxiosRequestConfig<D>): Promise<R>; <T = any, R = AxiosResponse<T>, D = any>(url: string, config?: AxiosRequestConfig<D>): Promise<R>; create(config?: CreateAxiosDefaults): AxiosInstance; defaults: Omit<AxiosDefaults, 'headers'> & { headers: HeadersDefaults & { [key: string]: AxiosHeaderValue } }; } export interface GenericFormData { append(name: string, value: any, options?: any): any; } export interface GenericHTMLFormElement { name: string; method: string; submit(): void; } export function getAdapter(adapters: AxiosAdapterConfig | AxiosAdapterConfig[] | undefined): AxiosAdapter; export function toFormData(sourceObj: object, targetFormData?: GenericFormData, options?: FormSerializerOptions): GenericFormData; export function formToJSON(form: GenericFormData|GenericHTMLFormElement): object; export function isAxiosError<T = any, D = any>(payload: any): payload is AxiosError<T, D>; export function spread<T, R>(callback: (...args: T[]) => R): (array: T[]) => R; export function isCancel(value: any): value is Cancel; export function all<T>(values: Array<T | Promise<T>>): Promise<T[]>; export function mergeConfig<D = any>(config1: AxiosRequestConfig<D>, config2: AxiosRequestConfig<D>): AxiosRequestConfig<D>; export interface AxiosStatic extends AxiosInstance { Cancel: CancelStatic; CancelToken: CancelTokenStatic; Axios: typeof Axios; AxiosError: typeof AxiosError; HttpStatusCode: typeof HttpStatusCode; readonly VERSION: string; isCancel: typeof isCancel; all: typeof all; spread: typeof spread; isAxiosError: typeof isAxiosError; toFormData: typeof toFormData; formToJSON: typeof formToJSON; getAdapter: typeof getAdapter; CanceledError: typeof CanceledError; AxiosHeaders: typeof AxiosHeaders; mergeConfig: typeof mergeConfig; } declare const axios: AxiosStatic; export default axios; node_modules/axios/lib/utils.js 0000664 00000043675 15114741631 0012634 0 ustar 00 'use strict'; import bind from './helpers/bind.js'; // utils is a library of generic helper functions non-specific to axios const {toString} = Object.prototype; const {getPrototypeOf} = Object; const {iterator, toStringTag} = Symbol; const kindOf = (cache => thing => { const str = toString.call(thing); return cache[str] || (cache[str] = str.slice(8, -1).toLowerCase()); })(Object.create(null)); const kindOfTest = (type) => { type = type.toLowerCase(); return (thing) => kindOf(thing) === type } const typeOfTest = type => thing => typeof thing === type; /** * Determine if a value is an Array * * @param {Object} val The value to test * * @returns {boolean} True if value is an Array, otherwise false */ const {isArray} = Array; /** * Determine if a value is undefined * * @param {*} val The value to test * * @returns {boolean} True if the value is undefined, otherwise false */ const isUndefined = typeOfTest('undefined'); /** * Determine if a value is a Buffer * * @param {*} val The value to test * * @returns {boolean} True if value is a Buffer, otherwise false */ function isBuffer(val) { return val !== null && !isUndefined(val) && val.constructor !== null && !isUndefined(val.constructor) && isFunction(val.constructor.isBuffer) && val.constructor.isBuffer(val); } /** * Determine if a value is an ArrayBuffer * * @param {*} val The value to test * * @returns {boolean} True if value is an ArrayBuffer, otherwise false */ const isArrayBuffer = kindOfTest('ArrayBuffer'); /** * Determine if a value is a view on an ArrayBuffer * * @param {*} val The value to test * * @returns {boolean} True if value is a view on an ArrayBuffer, otherwise false */ function isArrayBufferView(val) { let result; if ((typeof ArrayBuffer !== 'undefined') && (ArrayBuffer.isView)) { result = ArrayBuffer.isView(val); } else { result = (val) && (val.buffer) && (isArrayBuffer(val.buffer)); } return result; } /** * Determine if a value is a String * * @param {*} val The value to test * * @returns {boolean} True if value is a String, otherwise false */ const isString = typeOfTest('string'); /** * Determine if a value is a Function * * @param {*} val The value to test * @returns {boolean} True if value is a Function, otherwise false */ const isFunction = typeOfTest('function'); /** * Determine if a value is a Number * * @param {*} val The value to test * * @returns {boolean} True if value is a Number, otherwise false */ const isNumber = typeOfTest('number'); /** * Determine if a value is an Object * * @param {*} thing The value to test * * @returns {boolean} True if value is an Object, otherwise false */ const isObject = (thing) => thing !== null && typeof thing === 'object'; /** * Determine if a value is a Boolean * * @param {*} thing The value to test * @returns {boolean} True if value is a Boolean, otherwise false */ const isBoolean = thing => thing === true || thing === false; /** * Determine if a value is a plain Object * * @param {*} val The value to test * * @returns {boolean} True if value is a plain Object, otherwise false */ const isPlainObject = (val) => { if (kindOf(val) !== 'object') { return false; } const prototype = getPrototypeOf(val); return (prototype === null || prototype === Object.prototype || Object.getPrototypeOf(prototype) === null) && !(toStringTag in val) && !(iterator in val); } /** * Determine if a value is a Date * * @param {*} val The value to test * * @returns {boolean} True if value is a Date, otherwise false */ const isDate = kindOfTest('Date'); /** * Determine if a value is a File * * @param {*} val The value to test * * @returns {boolean} True if value is a File, otherwise false */ const isFile = kindOfTest('File'); /** * Determine if a value is a Blob * * @param {*} val The value to test * * @returns {boolean} True if value is a Blob, otherwise false */ const isBlob = kindOfTest('Blob'); /** * Determine if a value is a FileList * * @param {*} val The value to test * * @returns {boolean} True if value is a File, otherwise false */ const isFileList = kindOfTest('FileList'); /** * Determine if a value is a Stream * * @param {*} val The value to test * * @returns {boolean} True if value is a Stream, otherwise false */ const isStream = (val) => isObject(val) && isFunction(val.pipe); /** * Determine if a value is a FormData * * @param {*} thing The value to test * * @returns {boolean} True if value is an FormData, otherwise false */ const isFormData = (thing) => { let kind; return thing && ( (typeof FormData === 'function' && thing instanceof FormData) || ( isFunction(thing.append) && ( (kind = kindOf(thing)) === 'formdata' || // detect form-data instance (kind === 'object' && isFunction(thing.toString) && thing.toString() === '[object FormData]') ) ) ) } /** * Determine if a value is a URLSearchParams object * * @param {*} val The value to test * * @returns {boolean} True if value is a URLSearchParams object, otherwise false */ const isURLSearchParams = kindOfTest('URLSearchParams'); const [isReadableStream, isRequest, isResponse, isHeaders] = ['ReadableStream', 'Request', 'Response', 'Headers'].map(kindOfTest); /** * Trim excess whitespace off the beginning and end of a string * * @param {String} str The String to trim * * @returns {String} The String freed of excess whitespace */ const trim = (str) => str.trim ? str.trim() : str.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, ''); /** * Iterate over an Array or an Object invoking a function for each item. * * If `obj` is an Array callback will be called passing * the value, index, and complete array for each item. * * If 'obj' is an Object callback will be called passing * the value, key, and complete object for each property. * * @param {Object|Array} obj The object to iterate * @param {Function} fn The callback to invoke for each item * * @param {Boolean} [allOwnKeys = false] * @returns {any} */ function forEach(obj, fn, {allOwnKeys = false} = {}) { // Don't bother if no value provided if (obj === null || typeof obj === 'undefined') { return; } let i; let l; // Force an array if not already something iterable if (typeof obj !== 'object') { /*eslint no-param-reassign:0*/ obj = [obj]; } if (isArray(obj)) { // Iterate over array values for (i = 0, l = obj.length; i < l; i++) { fn.call(null, obj[i], i, obj); } } else { // Iterate over object keys const keys = allOwnKeys ? Object.getOwnPropertyNames(obj) : Object.keys(obj); const len = keys.length; let key; for (i = 0; i < len; i++) { key = keys[i]; fn.call(null, obj[key], key, obj); } } } function findKey(obj, key) { key = key.toLowerCase(); const keys = Object.keys(obj); let i = keys.length; let _key; while (i-- > 0) { _key = keys[i]; if (key === _key.toLowerCase()) { return _key; } } return null; } const _global = (() => { /*eslint no-undef:0*/ if (typeof globalThis !== "undefined") return globalThis; return typeof self !== "undefined" ? self : (typeof window !== 'undefined' ? window : global) })(); const isContextDefined = (context) => !isUndefined(context) && context !== _global; /** * Accepts varargs expecting each argument to be an object, then * immutably merges the properties of each object and returns result. * * When multiple objects contain the same key the later object in * the arguments list will take precedence. * * Example: * * ```js * var result = merge({foo: 123}, {foo: 456}); * console.log(result.foo); // outputs 456 * ``` * * @param {Object} obj1 Object to merge * * @returns {Object} Result of all merge properties */ function merge(/* obj1, obj2, obj3, ... */) { const {caseless} = isContextDefined(this) && this || {}; const result = {}; const assignValue = (val, key) => { const targetKey = caseless && findKey(result, key) || key; if (isPlainObject(result[targetKey]) && isPlainObject(val)) { result[targetKey] = merge(result[targetKey], val); } else if (isPlainObject(val)) { result[targetKey] = merge({}, val); } else if (isArray(val)) { result[targetKey] = val.slice(); } else { result[targetKey] = val; } } for (let i = 0, l = arguments.length; i < l; i++) { arguments[i] && forEach(arguments[i], assignValue); } return result; } /** * Extends object a by mutably adding to it the properties of object b. * * @param {Object} a The object to be extended * @param {Object} b The object to copy properties from * @param {Object} thisArg The object to bind function to * * @param {Boolean} [allOwnKeys] * @returns {Object} The resulting value of object a */ const extend = (a, b, thisArg, {allOwnKeys}= {}) => { forEach(b, (val, key) => { if (thisArg && isFunction(val)) { a[key] = bind(val, thisArg); } else { a[key] = val; } }, {allOwnKeys}); return a; } /** * Remove byte order marker. This catches EF BB BF (the UTF-8 BOM) * * @param {string} content with BOM * * @returns {string} content value without BOM */ const stripBOM = (content) => { if (content.charCodeAt(0) === 0xFEFF) { content = content.slice(1); } return content; } /** * Inherit the prototype methods from one constructor into another * @param {function} constructor * @param {function} superConstructor * @param {object} [props] * @param {object} [descriptors] * * @returns {void} */ const inherits = (constructor, superConstructor, props, descriptors) => { constructor.prototype = Object.create(superConstructor.prototype, descriptors); constructor.prototype.constructor = constructor; Object.defineProperty(constructor, 'super', { value: superConstructor.prototype }); props && Object.assign(constructor.prototype, props); } /** * Resolve object with deep prototype chain to a flat object * @param {Object} sourceObj source object * @param {Object} [destObj] * @param {Function|Boolean} [filter] * @param {Function} [propFilter] * * @returns {Object} */ const toFlatObject = (sourceObj, destObj, filter, propFilter) => { let props; let i; let prop; const merged = {}; destObj = destObj || {}; // eslint-disable-next-line no-eq-null,eqeqeq if (sourceObj == null) return destObj; do { props = Object.getOwnPropertyNames(sourceObj); i = props.length; while (i-- > 0) { prop = props[i]; if ((!propFilter || propFilter(prop, sourceObj, destObj)) && !merged[prop]) { destObj[prop] = sourceObj[prop]; merged[prop] = true; } } sourceObj = filter !== false && getPrototypeOf(sourceObj); } while (sourceObj && (!filter || filter(sourceObj, destObj)) && sourceObj !== Object.prototype); return destObj; } /** * Determines whether a string ends with the characters of a specified string * * @param {String} str * @param {String} searchString * @param {Number} [position= 0] * * @returns {boolean} */ const endsWith = (str, searchString, position) => { str = String(str); if (position === undefined || position > str.length) { position = str.length; } position -= searchString.length; const lastIndex = str.indexOf(searchString, position); return lastIndex !== -1 && lastIndex === position; } /** * Returns new array from array like object or null if failed * * @param {*} [thing] * * @returns {?Array} */ const toArray = (thing) => { if (!thing) return null; if (isArray(thing)) return thing; let i = thing.length; if (!isNumber(i)) return null; const arr = new Array(i); while (i-- > 0) { arr[i] = thing[i]; } return arr; } /** * Checking if the Uint8Array exists and if it does, it returns a function that checks if the * thing passed in is an instance of Uint8Array * * @param {TypedArray} * * @returns {Array} */ // eslint-disable-next-line func-names const isTypedArray = (TypedArray => { // eslint-disable-next-line func-names return thing => { return TypedArray && thing instanceof TypedArray; }; })(typeof Uint8Array !== 'undefined' && getPrototypeOf(Uint8Array)); /** * For each entry in the object, call the function with the key and value. * * @param {Object<any, any>} obj - The object to iterate over. * @param {Function} fn - The function to call for each entry. * * @returns {void} */ const forEachEntry = (obj, fn) => { const generator = obj && obj[iterator]; const _iterator = generator.call(obj); let result; while ((result = _iterator.next()) && !result.done) { const pair = result.value; fn.call(obj, pair[0], pair[1]); } } /** * It takes a regular expression and a string, and returns an array of all the matches * * @param {string} regExp - The regular expression to match against. * @param {string} str - The string to search. * * @returns {Array<boolean>} */ const matchAll = (regExp, str) => { let matches; const arr = []; while ((matches = regExp.exec(str)) !== null) { arr.push(matches); } return arr; } /* Checking if the kindOfTest function returns true when passed an HTMLFormElement. */ const isHTMLForm = kindOfTest('HTMLFormElement'); const toCamelCase = str => { return str.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g, function replacer(m, p1, p2) { return p1.toUpperCase() + p2; } ); }; /* Creating a function that will check if an object has a property. */ const hasOwnProperty = (({hasOwnProperty}) => (obj, prop) => hasOwnProperty.call(obj, prop))(Object.prototype); /** * Determine if a value is a RegExp object * * @param {*} val The value to test * * @returns {boolean} True if value is a RegExp object, otherwise false */ const isRegExp = kindOfTest('RegExp'); const reduceDescriptors = (obj, reducer) => { const descriptors = Object.getOwnPropertyDescriptors(obj); const reducedDescriptors = {}; forEach(descriptors, (descriptor, name) => { let ret; if ((ret = reducer(descriptor, name, obj)) !== false) { reducedDescriptors[name] = ret || descriptor; } }); Object.defineProperties(obj, reducedDescriptors); } /** * Makes all methods read-only * @param {Object} obj */ const freezeMethods = (obj) => { reduceDescriptors(obj, (descriptor, name) => { // skip restricted props in strict mode if (isFunction(obj) && ['arguments', 'caller', 'callee'].indexOf(name) !== -1) { return false; } const value = obj[name]; if (!isFunction(value)) return; descriptor.enumerable = false; if ('writable' in descriptor) { descriptor.writable = false; return; } if (!descriptor.set) { descriptor.set = () => { throw Error('Can not rewrite read-only method \'' + name + '\''); }; } }); } const toObjectSet = (arrayOrString, delimiter) => { const obj = {}; const define = (arr) => { arr.forEach(value => { obj[value] = true; }); } isArray(arrayOrString) ? define(arrayOrString) : define(String(arrayOrString).split(delimiter)); return obj; } const noop = () => {} const toFiniteNumber = (value, defaultValue) => { return value != null && Number.isFinite(value = +value) ? value : defaultValue; } /** * If the thing is a FormData object, return true, otherwise return false. * * @param {unknown} thing - The thing to check. * * @returns {boolean} */ function isSpecCompliantForm(thing) { return !!(thing && isFunction(thing.append) && thing[toStringTag] === 'FormData' && thing[iterator]); } const toJSONObject = (obj) => { const stack = new Array(10); const visit = (source, i) => { if (isObject(source)) { if (stack.indexOf(source) >= 0) { return; } if(!('toJSON' in source)) { stack[i] = source; const target = isArray(source) ? [] : {}; forEach(source, (value, key) => { const reducedValue = visit(value, i + 1); !isUndefined(reducedValue) && (target[key] = reducedValue); }); stack[i] = undefined; return target; } } return source; } return visit(obj, 0); } const isAsyncFn = kindOfTest('AsyncFunction'); const isThenable = (thing) => thing && (isObject(thing) || isFunction(thing)) && isFunction(thing.then) && isFunction(thing.catch); // original code // https://github.com/DigitalBrainJS/AxiosPromise/blob/16deab13710ec09779922131f3fa5954320f83ab/lib/utils.js#L11-L34 const _setImmediate = ((setImmediateSupported, postMessageSupported) => { if (setImmediateSupported) { return setImmediate; } return postMessageSupported ? ((token, callbacks) => { _global.addEventListener("message", ({source, data}) => { if (source === _global && data === token) { callbacks.length && callbacks.shift()(); } }, false); return (cb) => { callbacks.push(cb); _global.postMessage(token, "*"); } })(`axios@${Math.random()}`, []) : (cb) => setTimeout(cb); })( typeof setImmediate === 'function', isFunction(_global.postMessage) ); const asap = typeof queueMicrotask !== 'undefined' ? queueMicrotask.bind(_global) : ( typeof process !== 'undefined' && process.nextTick || _setImmediate); // ********************* const isIterable = (thing) => thing != null && isFunction(thing[iterator]); export default { isArray, isArrayBuffer, isBuffer, isFormData, isArrayBufferView, isString, isNumber, isBoolean, isObject, isPlainObject, isReadableStream, isRequest, isResponse, isHeaders, isUndefined, isDate, isFile, isBlob, isRegExp, isFunction, isStream, isURLSearchParams, isTypedArray, isFileList, forEach, merge, extend, trim, stripBOM, inherits, toFlatObject, kindOf, kindOfTest, endsWith, toArray, forEachEntry, matchAll, isHTMLForm, hasOwnProperty, hasOwnProp: hasOwnProperty, // an alias to avoid ESLint no-prototype-builtins detection reduceDescriptors, freezeMethods, toObjectSet, toCamelCase, noop, toFiniteNumber, findKey, global: _global, isContextDefined, isSpecCompliantForm, toJSONObject, isAsyncFn, isThenable, setImmediate: _setImmediate, asap, isIterable }; node_modules/axios/lib/cancel/isCancel.js 0000664 00000000143 15114741631 0014421 0 ustar 00 'use strict'; export default function isCancel(value) { return !!(value && value.__CANCEL__); } node_modules/axios/lib/cancel/CancelToken.js 0000664 00000005345 15114741631 0015077 0 ustar 00 'use strict'; import CanceledError from './CanceledError.js'; /** * A `CancelToken` is an object that can be used to request cancellation of an operation. * * @param {Function} executor The executor function. * * @returns {CancelToken} */ class CancelToken { constructor(executor) { if (typeof executor !== 'function') { throw new TypeError('executor must be a function.'); } let resolvePromise; this.promise = new Promise(function promiseExecutor(resolve) { resolvePromise = resolve; }); const token = this; // eslint-disable-next-line func-names this.promise.then(cancel => { if (!token._listeners) return; let i = token._listeners.length; while (i-- > 0) { token._listeners[i](cancel); } token._listeners = null; }); // eslint-disable-next-line func-names this.promise.then = onfulfilled => { let _resolve; // eslint-disable-next-line func-names const promise = new Promise(resolve => { token.subscribe(resolve); _resolve = resolve; }).then(onfulfilled); promise.cancel = function reject() { token.unsubscribe(_resolve); }; return promise; }; executor(function cancel(message, config, request) { if (token.reason) { // Cancellation has already been requested return; } token.reason = new CanceledError(message, config, request); resolvePromise(token.reason); }); } /** * Throws a `CanceledError` if cancellation has been requested. */ throwIfRequested() { if (this.reason) { throw this.reason; } } /** * Subscribe to the cancel signal */ subscribe(listener) { if (this.reason) { listener(this.reason); return; } if (this._listeners) { this._listeners.push(listener); } else { this._listeners = [listener]; } } /** * Unsubscribe from the cancel signal */ unsubscribe(listener) { if (!this._listeners) { return; } const index = this._listeners.indexOf(listener); if (index !== -1) { this._listeners.splice(index, 1); } } toAbortSignal() { const controller = new AbortController(); const abort = (err) => { controller.abort(err); }; this.subscribe(abort); controller.signal.unsubscribe = () => this.unsubscribe(abort); return controller.signal; } /** * Returns an object that contains a new `CancelToken` and a function that, when called, * cancels the `CancelToken`. */ static source() { let cancel; const token = new CancelToken(function executor(c) { cancel = c; }); return { token, cancel }; } } export default CancelToken; node_modules/axios/lib/cancel/CanceledError.js 0000664 00000001271 15114741631 0015413 0 ustar 00 'use strict'; import AxiosError from '../core/AxiosError.js'; import utils from '../utils.js'; /** * A `CanceledError` is an object that is thrown when an operation is canceled. * * @param {string=} message The message. * @param {Object=} config The config. * @param {Object=} request The request. * * @returns {CanceledError} The created error. */ function CanceledError(message, config, request) { // eslint-disable-next-line no-eq-null,eqeqeq AxiosError.call(this, message == null ? 'canceled' : message, AxiosError.ERR_CANCELED, config, request); this.name = 'CanceledError'; } utils.inherits(CanceledError, AxiosError, { __CANCEL__: true }); export default CanceledError; node_modules/axios/lib/defaults/index.js 0000664 00000010577 15114741631 0014405 0 ustar 00 'use strict'; import utils from '../utils.js'; import AxiosError from '../core/AxiosError.js'; import transitionalDefaults from './transitional.js'; import toFormData from '../helpers/toFormData.js'; import toURLEncodedForm from '../helpers/toURLEncodedForm.js'; import platform from '../platform/index.js'; import formDataToJSON from '../helpers/formDataToJSON.js'; /** * It takes a string, tries to parse it, and if it fails, it returns the stringified version * of the input * * @param {any} rawValue - The value to be stringified. * @param {Function} parser - A function that parses a string into a JavaScript object. * @param {Function} encoder - A function that takes a value and returns a string. * * @returns {string} A stringified version of the rawValue. */ function stringifySafely(rawValue, parser, encoder) { if (utils.isString(rawValue)) { try { (parser || JSON.parse)(rawValue); return utils.trim(rawValue); } catch (e) { if (e.name !== 'SyntaxError') { throw e; } } } return (encoder || JSON.stringify)(rawValue); } const defaults = { transitional: transitionalDefaults, adapter: ['xhr', 'http', 'fetch'], transformRequest: [function transformRequest(data, headers) { const contentType = headers.getContentType() || ''; const hasJSONContentType = contentType.indexOf('application/json') > -1; const isObjectPayload = utils.isObject(data); if (isObjectPayload && utils.isHTMLForm(data)) { data = new FormData(data); } const isFormData = utils.isFormData(data); if (isFormData) { return hasJSONContentType ? JSON.stringify(formDataToJSON(data)) : data; } if (utils.isArrayBuffer(data) || utils.isBuffer(data) || utils.isStream(data) || utils.isFile(data) || utils.isBlob(data) || utils.isReadableStream(data) ) { return data; } if (utils.isArrayBufferView(data)) { return data.buffer; } if (utils.isURLSearchParams(data)) { headers.setContentType('application/x-www-form-urlencoded;charset=utf-8', false); return data.toString(); } let isFileList; if (isObjectPayload) { if (contentType.indexOf('application/x-www-form-urlencoded') > -1) { return toURLEncodedForm(data, this.formSerializer).toString(); } if ((isFileList = utils.isFileList(data)) || contentType.indexOf('multipart/form-data') > -1) { const _FormData = this.env && this.env.FormData; return toFormData( isFileList ? {'files[]': data} : data, _FormData && new _FormData(), this.formSerializer ); } } if (isObjectPayload || hasJSONContentType ) { headers.setContentType('application/json', false); return stringifySafely(data); } return data; }], transformResponse: [function transformResponse(data) { const transitional = this.transitional || defaults.transitional; const forcedJSONParsing = transitional && transitional.forcedJSONParsing; const JSONRequested = this.responseType === 'json'; if (utils.isResponse(data) || utils.isReadableStream(data)) { return data; } if (data && utils.isString(data) && ((forcedJSONParsing && !this.responseType) || JSONRequested)) { const silentJSONParsing = transitional && transitional.silentJSONParsing; const strictJSONParsing = !silentJSONParsing && JSONRequested; try { return JSON.parse(data); } catch (e) { if (strictJSONParsing) { if (e.name === 'SyntaxError') { throw AxiosError.from(e, AxiosError.ERR_BAD_RESPONSE, this, null, this.response); } throw e; } } } return data; }], /** * A timeout in milliseconds to abort a request. If set to 0 (default) a * timeout is not created. */ timeout: 0, xsrfCookieName: 'XSRF-TOKEN', xsrfHeaderName: 'X-XSRF-TOKEN', maxContentLength: -1, maxBodyLength: -1, env: { FormData: platform.classes.FormData, Blob: platform.classes.Blob }, validateStatus: function validateStatus(status) { return status >= 200 && status < 300; }, headers: { common: { 'Accept': 'application/json, text/plain, */*', 'Content-Type': undefined } } }; utils.forEach(['delete', 'get', 'head', 'post', 'put', 'patch'], (method) => { defaults.headers[method] = {}; }); export default defaults; node_modules/axios/lib/defaults/transitional.js 0000664 00000000166 15114741631 0015776 0 ustar 00 'use strict'; export default { silentJSONParsing: true, forcedJSONParsing: true, clarifyTimeoutError: false }; node_modules/axios/lib/axios.js 0000664 00000004765 15114741631 0012614 0 ustar 00 'use strict'; import utils from './utils.js'; import bind from './helpers/bind.js'; import Axios from './core/Axios.js'; import mergeConfig from './core/mergeConfig.js'; import defaults from './defaults/index.js'; import formDataToJSON from './helpers/formDataToJSON.js'; import CanceledError from './cancel/CanceledError.js'; import CancelToken from './cancel/CancelToken.js'; import isCancel from './cancel/isCancel.js'; import {VERSION} from './env/data.js'; import toFormData from './helpers/toFormData.js'; import AxiosError from './core/AxiosError.js'; import spread from './helpers/spread.js'; import isAxiosError from './helpers/isAxiosError.js'; import AxiosHeaders from "./core/AxiosHeaders.js"; import adapters from './adapters/adapters.js'; import HttpStatusCode from './helpers/HttpStatusCode.js'; /** * Create an instance of Axios * * @param {Object} defaultConfig The default config for the instance * * @returns {Axios} A new instance of Axios */ function createInstance(defaultConfig) { const context = new Axios(defaultConfig); const instance = bind(Axios.prototype.request, context); // Copy axios.prototype to instance utils.extend(instance, Axios.prototype, context, {allOwnKeys: true}); // Copy context to instance utils.extend(instance, context, null, {allOwnKeys: true}); // Factory for creating new instances instance.create = function create(instanceConfig) { return createInstance(mergeConfig(defaultConfig, instanceConfig)); }; return instance; } // Create the default instance to be exported const axios = createInstance(defaults); // Expose Axios class to allow class inheritance axios.Axios = Axios; // Expose Cancel & CancelToken axios.CanceledError = CanceledError; axios.CancelToken = CancelToken; axios.isCancel = isCancel; axios.VERSION = VERSION; axios.toFormData = toFormData; // Expose AxiosError class axios.AxiosError = AxiosError; // alias for CanceledError for backward compatibility axios.Cancel = axios.CanceledError; // Expose all/spread axios.all = function all(promises) { return Promise.all(promises); }; axios.spread = spread; // Expose isAxiosError axios.isAxiosError = isAxiosError; // Expose mergeConfig axios.mergeConfig = mergeConfig; axios.AxiosHeaders = AxiosHeaders; axios.formToJSON = thing => formDataToJSON(utils.isHTMLForm(thing) ? new FormData(thing) : thing); axios.getAdapter = adapters.getAdapter; axios.HttpStatusCode = HttpStatusCode; axios.default = axios; // this module should only have a default export export default axios node_modules/axios/lib/core/transformData.js 0000664 00000001412 15114741631 0015210 0 ustar 00 'use strict'; import utils from './../utils.js'; import defaults from '../defaults/index.js'; import AxiosHeaders from '../core/AxiosHeaders.js'; /** * Transform the data for a request or a response * * @param {Array|Function} fns A single function or Array of functions * @param {?Object} response The response object * * @returns {*} The resulting transformed data */ export default function transformData(fns, response) { const config = this || defaults; const context = response || config; const headers = AxiosHeaders.from(context.headers); let data = context.data; utils.forEach(fns, function transform(fn) { data = fn.call(config, data, headers.normalize(), response ? response.status : undefined); }); headers.normalize(); return data; } node_modules/axios/lib/core/InterceptorManager.js 0000664 00000003041 15114741631 0016174 0 ustar 00 'use strict'; import utils from './../utils.js'; class InterceptorManager { constructor() { this.handlers = []; } /** * Add a new interceptor to the stack * * @param {Function} fulfilled The function to handle `then` for a `Promise` * @param {Function} rejected The function to handle `reject` for a `Promise` * * @return {Number} An ID used to remove interceptor later */ use(fulfilled, rejected, options) { this.handlers.push({ fulfilled, rejected, synchronous: options ? options.synchronous : false, runWhen: options ? options.runWhen : null }); return this.handlers.length - 1; } /** * Remove an interceptor from the stack * * @param {Number} id The ID that was returned by `use` * * @returns {Boolean} `true` if the interceptor was removed, `false` otherwise */ eject(id) { if (this.handlers[id]) { this.handlers[id] = null; } } /** * Clear all interceptors from the stack * * @returns {void} */ clear() { if (this.handlers) { this.handlers = []; } } /** * Iterate over all the registered interceptors * * This method is particularly useful for skipping over any * interceptors that may have become `null` calling `eject`. * * @param {Function} fn The function to call for each interceptor * * @returns {void} */ forEach(fn) { utils.forEach(this.handlers, function forEachHandler(h) { if (h !== null) { fn(h); } }); } } export default InterceptorManager; node_modules/axios/lib/core/AxiosError.js 0000664 00000004762 15114741631 0014513 0 ustar 00 'use strict'; import utils from '../utils.js'; /** * Create an Error with the specified message, config, error code, request and response. * * @param {string} message The error message. * @param {string} [code] The error code (for example, 'ECONNABORTED'). * @param {Object} [config] The config. * @param {Object} [request] The request. * @param {Object} [response] The response. * * @returns {Error} The created error. */ function AxiosError(message, code, config, request, response) { Error.call(this); if (Error.captureStackTrace) { Error.captureStackTrace(this, this.constructor); } else { this.stack = (new Error()).stack; } this.message = message; this.name = 'AxiosError'; code && (this.code = code); config && (this.config = config); request && (this.request = request); if (response) { this.response = response; this.status = response.status ? response.status : null; } } utils.inherits(AxiosError, Error, { toJSON: function toJSON() { return { // Standard message: this.message, name: this.name, // Microsoft description: this.description, number: this.number, // Mozilla fileName: this.fileName, lineNumber: this.lineNumber, columnNumber: this.columnNumber, stack: this.stack, // Axios config: utils.toJSONObject(this.config), code: this.code, status: this.status }; } }); const prototype = AxiosError.prototype; const descriptors = {}; [ 'ERR_BAD_OPTION_VALUE', 'ERR_BAD_OPTION', 'ECONNABORTED', 'ETIMEDOUT', 'ERR_NETWORK', 'ERR_FR_TOO_MANY_REDIRECTS', 'ERR_DEPRECATED', 'ERR_BAD_RESPONSE', 'ERR_BAD_REQUEST', 'ERR_CANCELED', 'ERR_NOT_SUPPORT', 'ERR_INVALID_URL' // eslint-disable-next-line func-names ].forEach(code => { descriptors[code] = {value: code}; }); Object.defineProperties(AxiosError, descriptors); Object.defineProperty(prototype, 'isAxiosError', {value: true}); // eslint-disable-next-line func-names AxiosError.from = (error, code, config, request, response, customProps) => { const axiosError = Object.create(prototype); utils.toFlatObject(error, axiosError, function filter(obj) { return obj !== Error.prototype; }, prop => { return prop !== 'isAxiosError'; }); AxiosError.call(axiosError, error.message, code, config, request, response); axiosError.cause = error; axiosError.name = error.name; customProps && Object.assign(axiosError, customProps); return axiosError; }; export default AxiosError; node_modules/axios/lib/core/settle.js 0000664 00000001504 15114741631 0013705 0 ustar 00 'use strict'; import AxiosError from './AxiosError.js'; /** * Resolve or reject a Promise based on response status. * * @param {Function} resolve A function that resolves the promise. * @param {Function} reject A function that rejects the promise. * @param {object} response The response. * * @returns {object} The response. */ export default function settle(resolve, reject, response) { const validateStatus = response.config.validateStatus; if (!response.status || !validateStatus || validateStatus(response.status)) { resolve(response); } else { reject(new AxiosError( 'Request failed with status code ' + response.status, [AxiosError.ERR_BAD_REQUEST, AxiosError.ERR_BAD_RESPONSE][Math.floor(response.status / 100) - 4], response.config, response.request, response )); } } node_modules/axios/lib/core/dispatchRequest.js 0000664 00000004213 15114741631 0015555 0 ustar 00 'use strict'; import transformData from './transformData.js'; import isCancel from '../cancel/isCancel.js'; import defaults from '../defaults/index.js'; import CanceledError from '../cancel/CanceledError.js'; import AxiosHeaders from '../core/AxiosHeaders.js'; import adapters from "../adapters/adapters.js"; /** * Throws a `CanceledError` if cancellation has been requested. * * @param {Object} config The config that is to be used for the request * * @returns {void} */ function throwIfCancellationRequested(config) { if (config.cancelToken) { config.cancelToken.throwIfRequested(); } if (config.signal && config.signal.aborted) { throw new CanceledError(null, config); } } /** * Dispatch a request to the server using the configured adapter. * * @param {object} config The config that is to be used for the request * * @returns {Promise} The Promise to be fulfilled */ export default function dispatchRequest(config) { throwIfCancellationRequested(config); config.headers = AxiosHeaders.from(config.headers); // Transform request data config.data = transformData.call( config, config.transformRequest ); if (['post', 'put', 'patch'].indexOf(config.method) !== -1) { config.headers.setContentType('application/x-www-form-urlencoded', false); } const adapter = adapters.getAdapter(config.adapter || defaults.adapter); return adapter(config).then(function onAdapterResolution(response) { throwIfCancellationRequested(config); // Transform response data response.data = transformData.call( config, config.transformResponse, response ); response.headers = AxiosHeaders.from(response.headers); return response; }, function onAdapterRejection(reason) { if (!isCancel(reason)) { throwIfCancellationRequested(config); // Transform response data if (reason && reason.response) { reason.response.data = transformData.call( config, config.transformResponse, reason.response ); reason.response.headers = AxiosHeaders.from(reason.response.headers); } } return Promise.reject(reason); }); } node_modules/axios/lib/core/buildFullPath.js 0000664 00000001417 15114741631 0015147 0 ustar 00 'use strict'; import isAbsoluteURL from '../helpers/isAbsoluteURL.js'; import combineURLs from '../helpers/combineURLs.js'; /** * Creates a new URL by combining the baseURL with the requestedURL, * only when the requestedURL is not already an absolute URL. * If the requestURL is absolute, this function returns the requestedURL untouched. * * @param {string} baseURL The base URL * @param {string} requestedURL Absolute or relative URL to combine * * @returns {string} The combined full path */ export default function buildFullPath(baseURL, requestedURL, allowAbsoluteUrls) { let isRelativeUrl = !isAbsoluteURL(requestedURL); if (baseURL && (isRelativeUrl || allowAbsoluteUrls == false)) { return combineURLs(baseURL, requestedURL); } return requestedURL; } node_modules/axios/lib/core/mergeConfig.js 0000664 00000006527 15114741631 0014644 0 ustar 00 'use strict'; import utils from '../utils.js'; import AxiosHeaders from "./AxiosHeaders.js"; const headersToObject = (thing) => thing instanceof AxiosHeaders ? { ...thing } : thing; /** * Config-specific merge-function which creates a new config-object * by merging two configuration objects together. * * @param {Object} config1 * @param {Object} config2 * * @returns {Object} New object resulting from merging config2 to config1 */ export default function mergeConfig(config1, config2) { // eslint-disable-next-line no-param-reassign config2 = config2 || {}; const config = {}; function getMergedValue(target, source, prop, caseless) { if (utils.isPlainObject(target) && utils.isPlainObject(source)) { return utils.merge.call({caseless}, target, source); } else if (utils.isPlainObject(source)) { return utils.merge({}, source); } else if (utils.isArray(source)) { return source.slice(); } return source; } // eslint-disable-next-line consistent-return function mergeDeepProperties(a, b, prop , caseless) { if (!utils.isUndefined(b)) { return getMergedValue(a, b, prop , caseless); } else if (!utils.isUndefined(a)) { return getMergedValue(undefined, a, prop , caseless); } } // eslint-disable-next-line consistent-return function valueFromConfig2(a, b) { if (!utils.isUndefined(b)) { return getMergedValue(undefined, b); } } // eslint-disable-next-line consistent-return function defaultToConfig2(a, b) { if (!utils.isUndefined(b)) { return getMergedValue(undefined, b); } else if (!utils.isUndefined(a)) { return getMergedValue(undefined, a); } } // eslint-disable-next-line consistent-return function mergeDirectKeys(a, b, prop) { if (prop in config2) { return getMergedValue(a, b); } else if (prop in config1) { return getMergedValue(undefined, a); } } const mergeMap = { url: valueFromConfig2, method: valueFromConfig2, data: valueFromConfig2, baseURL: defaultToConfig2, transformRequest: defaultToConfig2, transformResponse: defaultToConfig2, paramsSerializer: defaultToConfig2, timeout: defaultToConfig2, timeoutMessage: defaultToConfig2, withCredentials: defaultToConfig2, withXSRFToken: defaultToConfig2, adapter: defaultToConfig2, responseType: defaultToConfig2, xsrfCookieName: defaultToConfig2, xsrfHeaderName: defaultToConfig2, onUploadProgress: defaultToConfig2, onDownloadProgress: defaultToConfig2, decompress: defaultToConfig2, maxContentLength: defaultToConfig2, maxBodyLength: defaultToConfig2, beforeRedirect: defaultToConfig2, transport: defaultToConfig2, httpAgent: defaultToConfig2, httpsAgent: defaultToConfig2, cancelToken: defaultToConfig2, socketPath: defaultToConfig2, responseEncoding: defaultToConfig2, validateStatus: mergeDirectKeys, headers: (a, b , prop) => mergeDeepProperties(headersToObject(a), headersToObject(b),prop, true) }; utils.forEach(Object.keys(Object.assign({}, config1, config2)), function computeConfigValue(prop) { const merge = mergeMap[prop] || mergeDeepProperties; const configValue = merge(config1[prop], config2[prop], prop); (utils.isUndefined(configValue) && merge !== mergeDirectKeys) || (config[prop] = configValue); }); return config; } node_modules/axios/lib/core/AxiosHeaders.js 0000664 00000016343 15114741631 0014773 0 ustar 00 'use strict'; import utils from '../utils.js'; import parseHeaders from '../helpers/parseHeaders.js'; const $internals = Symbol('internals'); function normalizeHeader(header) { return header && String(header).trim().toLowerCase(); } function normalizeValue(value) { if (value === false || value == null) { return value; } return utils.isArray(value) ? value.map(normalizeValue) : String(value); } function parseTokens(str) { const tokens = Object.create(null); const tokensRE = /([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g; let match; while ((match = tokensRE.exec(str))) { tokens[match[1]] = match[2]; } return tokens; } const isValidHeaderName = (str) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(str.trim()); function matchHeaderValue(context, value, header, filter, isHeaderNameFilter) { if (utils.isFunction(filter)) { return filter.call(this, value, header); } if (isHeaderNameFilter) { value = header; } if (!utils.isString(value)) return; if (utils.isString(filter)) { return value.indexOf(filter) !== -1; } if (utils.isRegExp(filter)) { return filter.test(value); } } function formatHeader(header) { return header.trim() .toLowerCase().replace(/([a-z\d])(\w*)/g, (w, char, str) => { return char.toUpperCase() + str; }); } function buildAccessors(obj, header) { const accessorName = utils.toCamelCase(' ' + header); ['get', 'set', 'has'].forEach(methodName => { Object.defineProperty(obj, methodName + accessorName, { value: function(arg1, arg2, arg3) { return this[methodName].call(this, header, arg1, arg2, arg3); }, configurable: true }); }); } class AxiosHeaders { constructor(headers) { headers && this.set(headers); } set(header, valueOrRewrite, rewrite) { const self = this; function setHeader(_value, _header, _rewrite) { const lHeader = normalizeHeader(_header); if (!lHeader) { throw new Error('header name must be a non-empty string'); } const key = utils.findKey(self, lHeader); if(!key || self[key] === undefined || _rewrite === true || (_rewrite === undefined && self[key] !== false)) { self[key || _header] = normalizeValue(_value); } } const setHeaders = (headers, _rewrite) => utils.forEach(headers, (_value, _header) => setHeader(_value, _header, _rewrite)); if (utils.isPlainObject(header) || header instanceof this.constructor) { setHeaders(header, valueOrRewrite) } else if(utils.isString(header) && (header = header.trim()) && !isValidHeaderName(header)) { setHeaders(parseHeaders(header), valueOrRewrite); } else if (utils.isObject(header) && utils.isIterable(header)) { let obj = {}, dest, key; for (const entry of header) { if (!utils.isArray(entry)) { throw TypeError('Object iterator must return a key-value pair'); } obj[key = entry[0]] = (dest = obj[key]) ? (utils.isArray(dest) ? [...dest, entry[1]] : [dest, entry[1]]) : entry[1]; } setHeaders(obj, valueOrRewrite) } else { header != null && setHeader(valueOrRewrite, header, rewrite); } return this; } get(header, parser) { header = normalizeHeader(header); if (header) { const key = utils.findKey(this, header); if (key) { const value = this[key]; if (!parser) { return value; } if (parser === true) { return parseTokens(value); } if (utils.isFunction(parser)) { return parser.call(this, value, key); } if (utils.isRegExp(parser)) { return parser.exec(value); } throw new TypeError('parser must be boolean|regexp|function'); } } } has(header, matcher) { header = normalizeHeader(header); if (header) { const key = utils.findKey(this, header); return !!(key && this[key] !== undefined && (!matcher || matchHeaderValue(this, this[key], key, matcher))); } return false; } delete(header, matcher) { const self = this; let deleted = false; function deleteHeader(_header) { _header = normalizeHeader(_header); if (_header) { const key = utils.findKey(self, _header); if (key && (!matcher || matchHeaderValue(self, self[key], key, matcher))) { delete self[key]; deleted = true; } } } if (utils.isArray(header)) { header.forEach(deleteHeader); } else { deleteHeader(header); } return deleted; } clear(matcher) { const keys = Object.keys(this); let i = keys.length; let deleted = false; while (i--) { const key = keys[i]; if(!matcher || matchHeaderValue(this, this[key], key, matcher, true)) { delete this[key]; deleted = true; } } return deleted; } normalize(format) { const self = this; const headers = {}; utils.forEach(this, (value, header) => { const key = utils.findKey(headers, header); if (key) { self[key] = normalizeValue(value); delete self[header]; return; } const normalized = format ? formatHeader(header) : String(header).trim(); if (normalized !== header) { delete self[header]; } self[normalized] = normalizeValue(value); headers[normalized] = true; }); return this; } concat(...targets) { return this.constructor.concat(this, ...targets); } toJSON(asStrings) { const obj = Object.create(null); utils.forEach(this, (value, header) => { value != null && value !== false && (obj[header] = asStrings && utils.isArray(value) ? value.join(', ') : value); }); return obj; } [Symbol.iterator]() { return Object.entries(this.toJSON())[Symbol.iterator](); } toString() { return Object.entries(this.toJSON()).map(([header, value]) => header + ': ' + value).join('\n'); } getSetCookie() { return this.get("set-cookie") || []; } get [Symbol.toStringTag]() { return 'AxiosHeaders'; } static from(thing) { return thing instanceof this ? thing : new this(thing); } static concat(first, ...targets) { const computed = new this(first); targets.forEach((target) => computed.set(target)); return computed; } static accessor(header) { const internals = this[$internals] = (this[$internals] = { accessors: {} }); const accessors = internals.accessors; const prototype = this.prototype; function defineAccessor(_header) { const lHeader = normalizeHeader(_header); if (!accessors[lHeader]) { buildAccessors(prototype, _header); accessors[lHeader] = true; } } utils.isArray(header) ? header.forEach(defineAccessor) : defineAccessor(header); return this; } } AxiosHeaders.accessor(['Content-Type', 'Content-Length', 'Accept', 'Accept-Encoding', 'User-Agent', 'Authorization']); // reserved names hotfix utils.reduceDescriptors(AxiosHeaders.prototype, ({value}, key) => { let mapped = key[0].toUpperCase() + key.slice(1); // map `set` => `Set` return { get: () => value, set(headerValue) { this[mapped] = headerValue; } } }); utils.freezeMethods(AxiosHeaders); export default AxiosHeaders; node_modules/axios/lib/core/Axios.js 0000664 00000015324 15114741631 0013475 0 ustar 00 'use strict'; import utils from './../utils.js'; import buildURL from '../helpers/buildURL.js'; import InterceptorManager from './InterceptorManager.js'; import dispatchRequest from './dispatchRequest.js'; import mergeConfig from './mergeConfig.js'; import buildFullPath from './buildFullPath.js'; import validator from '../helpers/validator.js'; import AxiosHeaders from './AxiosHeaders.js'; const validators = validator.validators; /** * Create a new instance of Axios * * @param {Object} instanceConfig The default config for the instance * * @return {Axios} A new instance of Axios */ class Axios { constructor(instanceConfig) { this.defaults = instanceConfig || {}; this.interceptors = { request: new InterceptorManager(), response: new InterceptorManager() }; } /** * Dispatch a request * * @param {String|Object} configOrUrl The config specific for this request (merged with this.defaults) * @param {?Object} config * * @returns {Promise} The Promise to be fulfilled */ async request(configOrUrl, config) { try { return await this._request(configOrUrl, config); } catch (err) { if (err instanceof Error) { let dummy = {}; Error.captureStackTrace ? Error.captureStackTrace(dummy) : (dummy = new Error()); // slice off the Error: ... line const stack = dummy.stack ? dummy.stack.replace(/^.+\n/, '') : ''; try { if (!err.stack) { err.stack = stack; // match without the 2 top stack lines } else if (stack && !String(err.stack).endsWith(stack.replace(/^.+\n.+\n/, ''))) { err.stack += '\n' + stack } } catch (e) { // ignore the case where "stack" is an un-writable property } } throw err; } } _request(configOrUrl, config) { /*eslint no-param-reassign:0*/ // Allow for axios('example/url'[, config]) a la fetch API if (typeof configOrUrl === 'string') { config = config || {}; config.url = configOrUrl; } else { config = configOrUrl || {}; } config = mergeConfig(this.defaults, config); const {transitional, paramsSerializer, headers} = config; if (transitional !== undefined) { validator.assertOptions(transitional, { silentJSONParsing: validators.transitional(validators.boolean), forcedJSONParsing: validators.transitional(validators.boolean), clarifyTimeoutError: validators.transitional(validators.boolean) }, false); } if (paramsSerializer != null) { if (utils.isFunction(paramsSerializer)) { config.paramsSerializer = { serialize: paramsSerializer } } else { validator.assertOptions(paramsSerializer, { encode: validators.function, serialize: validators.function }, true); } } // Set config.allowAbsoluteUrls if (config.allowAbsoluteUrls !== undefined) { // do nothing } else if (this.defaults.allowAbsoluteUrls !== undefined) { config.allowAbsoluteUrls = this.defaults.allowAbsoluteUrls; } else { config.allowAbsoluteUrls = true; } validator.assertOptions(config, { baseUrl: validators.spelling('baseURL'), withXsrfToken: validators.spelling('withXSRFToken') }, true); // Set config.method config.method = (config.method || this.defaults.method || 'get').toLowerCase(); // Flatten headers let contextHeaders = headers && utils.merge( headers.common, headers[config.method] ); headers && utils.forEach( ['delete', 'get', 'head', 'post', 'put', 'patch', 'common'], (method) => { delete headers[method]; } ); config.headers = AxiosHeaders.concat(contextHeaders, headers); // filter out skipped interceptors const requestInterceptorChain = []; let synchronousRequestInterceptors = true; this.interceptors.request.forEach(function unshiftRequestInterceptors(interceptor) { if (typeof interceptor.runWhen === 'function' && interceptor.runWhen(config) === false) { return; } synchronousRequestInterceptors = synchronousRequestInterceptors && interceptor.synchronous; requestInterceptorChain.unshift(interceptor.fulfilled, interceptor.rejected); }); const responseInterceptorChain = []; this.interceptors.response.forEach(function pushResponseInterceptors(interceptor) { responseInterceptorChain.push(interceptor.fulfilled, interceptor.rejected); }); let promise; let i = 0; let len; if (!synchronousRequestInterceptors) { const chain = [dispatchRequest.bind(this), undefined]; chain.unshift.apply(chain, requestInterceptorChain); chain.push.apply(chain, responseInterceptorChain); len = chain.length; promise = Promise.resolve(config); while (i < len) { promise = promise.then(chain[i++], chain[i++]); } return promise; } len = requestInterceptorChain.length; let newConfig = config; i = 0; while (i < len) { const onFulfilled = requestInterceptorChain[i++]; const onRejected = requestInterceptorChain[i++]; try { newConfig = onFulfilled(newConfig); } catch (error) { onRejected.call(this, error); break; } } try { promise = dispatchRequest.call(this, newConfig); } catch (error) { return Promise.reject(error); } i = 0; len = responseInterceptorChain.length; while (i < len) { promise = promise.then(responseInterceptorChain[i++], responseInterceptorChain[i++]); } return promise; } getUri(config) { config = mergeConfig(this.defaults, config); const fullPath = buildFullPath(config.baseURL, config.url, config.allowAbsoluteUrls); return buildURL(fullPath, config.params, config.paramsSerializer); } } // Provide aliases for supported request methods utils.forEach(['delete', 'get', 'head', 'options'], function forEachMethodNoData(method) { /*eslint func-names:0*/ Axios.prototype[method] = function(url, config) { return this.request(mergeConfig(config || {}, { method, url, data: (config || {}).data })); }; }); utils.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) { /*eslint func-names:0*/ function generateHTTPMethod(isForm) { return function httpMethod(url, data, config) { return this.request(mergeConfig(config || {}, { method, headers: isForm ? { 'Content-Type': 'multipart/form-data' } : {}, url, data })); }; } Axios.prototype[method] = generateHTTPMethod(); Axios.prototype[method + 'Form'] = generateHTTPMethod(true); }); export default Axios; node_modules/axios/lib/core/README.md 0000664 00000000617 15114741631 0013332 0 ustar 00 # axios // core The modules found in `core/` should be modules that are specific to the domain logic of axios. These modules would most likely not make sense to be consumed outside of the axios module, as their logic is too specific. Some examples of core modules are: - Dispatching requests - Requests sent via `adapters/` (see lib/adapters/README.md) - Managing interceptors - Handling config node_modules/axios/lib/platform/common/utils.js 0000664 00000003073 15114741631 0015734 0 ustar 00 const hasBrowserEnv = typeof window !== 'undefined' && typeof document !== 'undefined'; const _navigator = typeof navigator === 'object' && navigator || undefined; /** * Determine if we're running in a standard browser environment * * This allows axios to run in a web worker, and react-native. * Both environments support XMLHttpRequest, but not fully standard globals. * * web workers: * typeof window -> undefined * typeof document -> undefined * * react-native: * navigator.product -> 'ReactNative' * nativescript * navigator.product -> 'NativeScript' or 'NS' * * @returns {boolean} */ const hasStandardBrowserEnv = hasBrowserEnv && (!_navigator || ['ReactNative', 'NativeScript', 'NS'].indexOf(_navigator.product) < 0); /** * Determine if we're running in a standard browser webWorker environment * * Although the `isStandardBrowserEnv` method indicates that * `allows axios to run in a web worker`, the WebWorker will still be * filtered out due to its judgment standard * `typeof window !== 'undefined' && typeof document !== 'undefined'`. * This leads to a problem when axios post `FormData` in webWorker */ const hasStandardBrowserWebWorkerEnv = (() => { return ( typeof WorkerGlobalScope !== 'undefined' && // eslint-disable-next-line no-undef self instanceof WorkerGlobalScope && typeof self.importScripts === 'function' ); })(); const origin = hasBrowserEnv && window.location.href || 'http://localhost'; export { hasBrowserEnv, hasStandardBrowserWebWorkerEnv, hasStandardBrowserEnv, _navigator as navigator, origin } node_modules/axios/lib/platform/node/classes/FormData.js 0000664 00000000074 15114741631 0017361 0 ustar 00 import FormData from 'form-data'; export default FormData; node_modules/axios/lib/platform/node/classes/URLSearchParams.js 0000664 00000000112 15114741631 0020611 0 ustar 00 'use strict'; import url from 'url'; export default url.URLSearchParams; node_modules/axios/lib/platform/node/index.js 0000664 00000001474 15114741631 0015343 0 ustar 00 import crypto from 'crypto'; import URLSearchParams from './classes/URLSearchParams.js' import FormData from './classes/FormData.js' const ALPHA = 'abcdefghijklmnopqrstuvwxyz' const DIGIT = '0123456789'; const ALPHABET = { DIGIT, ALPHA, ALPHA_DIGIT: ALPHA + ALPHA.toUpperCase() + DIGIT } const generateString = (size = 16, alphabet = ALPHABET.ALPHA_DIGIT) => { let str = ''; const {length} = alphabet; const randomValues = new Uint32Array(size); crypto.randomFillSync(randomValues); for (let i = 0; i < size; i++) { str += alphabet[randomValues[i] % length]; } return str; } export default { isNode: true, classes: { URLSearchParams, FormData, Blob: typeof Blob !== 'undefined' && Blob || null }, ALPHABET, generateString, protocols: [ 'http', 'https', 'file', 'data' ] }; node_modules/axios/lib/platform/browser/classes/Blob.js 0000664 00000000107 15114741631 0017275 0 ustar 00 'use strict' export default typeof Blob !== 'undefined' ? Blob : null node_modules/axios/lib/platform/browser/classes/FormData.js 0000664 00000000121 15114741631 0020110 0 ustar 00 'use strict'; export default typeof FormData !== 'undefined' ? FormData : null; node_modules/axios/lib/platform/browser/classes/URLSearchParams.js 0000664 00000000274 15114741631 0021360 0 ustar 00 'use strict'; import AxiosURLSearchParams from '../../../helpers/AxiosURLSearchParams.js'; export default typeof URLSearchParams !== 'undefined' ? URLSearchParams : AxiosURLSearchParams; node_modules/axios/lib/platform/browser/index.js 0000664 00000000461 15114741631 0016074 0 ustar 00 import URLSearchParams from './classes/URLSearchParams.js' import FormData from './classes/FormData.js' import Blob from './classes/Blob.js' export default { isBrowser: true, classes: { URLSearchParams, FormData, Blob }, protocols: ['http', 'https', 'file', 'blob', 'url', 'data'] }; node_modules/axios/lib/platform/index.js 0000664 00000000202 15114741631 0014402 0 ustar 00 import platform from './node/index.js'; import * as utils from './common/utils.js'; export default { ...utils, ...platform } node_modules/axios/lib/adapters/adapters.js 0000664 00000003662 15114741631 0015072 0 ustar 00 import utils from '../utils.js'; import httpAdapter from './http.js'; import xhrAdapter from './xhr.js'; import fetchAdapter from './fetch.js'; import AxiosError from "../core/AxiosError.js"; const knownAdapters = { http: httpAdapter, xhr: xhrAdapter, fetch: fetchAdapter } utils.forEach(knownAdapters, (fn, value) => { if (fn) { try { Object.defineProperty(fn, 'name', {value}); } catch (e) { // eslint-disable-next-line no-empty } Object.defineProperty(fn, 'adapterName', {value}); } }); const renderReason = (reason) => `- ${reason}`; const isResolvedHandle = (adapter) => utils.isFunction(adapter) || adapter === null || adapter === false; export default { getAdapter: (adapters) => { adapters = utils.isArray(adapters) ? adapters : [adapters]; const {length} = adapters; let nameOrAdapter; let adapter; const rejectedReasons = {}; for (let i = 0; i < length; i++) { nameOrAdapter = adapters[i]; let id; adapter = nameOrAdapter; if (!isResolvedHandle(nameOrAdapter)) { adapter = knownAdapters[(id = String(nameOrAdapter)).toLowerCase()]; if (adapter === undefined) { throw new AxiosError(`Unknown adapter '${id}'`); } } if (adapter) { break; } rejectedReasons[id || '#' + i] = adapter; } if (!adapter) { const reasons = Object.entries(rejectedReasons) .map(([id, state]) => `adapter ${id} ` + (state === false ? 'is not supported by the environment' : 'is not available in the build') ); let s = length ? (reasons.length > 1 ? 'since :\n' + reasons.map(renderReason).join('\n') : ' ' + renderReason(reasons[0])) : 'as no adapter specified'; throw new AxiosError( `There is no suitable adapter to dispatch the request ` + s, 'ERR_NOT_SUPPORT' ); } return adapter; }, adapters: knownAdapters } node_modules/axios/lib/adapters/fetch.js 0000664 00000015007 15114741631 0014354 0 ustar 00 import platform from "../platform/index.js"; import utils from "../utils.js"; import AxiosError from "../core/AxiosError.js"; import composeSignals from "../helpers/composeSignals.js"; import {trackStream} from "../helpers/trackStream.js"; import AxiosHeaders from "../core/AxiosHeaders.js"; import {progressEventReducer, progressEventDecorator, asyncDecorator} from "../helpers/progressEventReducer.js"; import resolveConfig from "../helpers/resolveConfig.js"; import settle from "../core/settle.js"; const isFetchSupported = typeof fetch === 'function' && typeof Request === 'function' && typeof Response === 'function'; const isReadableStreamSupported = isFetchSupported && typeof ReadableStream === 'function'; // used only inside the fetch adapter const encodeText = isFetchSupported && (typeof TextEncoder === 'function' ? ((encoder) => (str) => encoder.encode(str))(new TextEncoder()) : async (str) => new Uint8Array(await new Response(str).arrayBuffer()) ); const test = (fn, ...args) => { try { return !!fn(...args); } catch (e) { return false } } const supportsRequestStream = isReadableStreamSupported && test(() => { let duplexAccessed = false; const hasContentType = new Request(platform.origin, { body: new ReadableStream(), method: 'POST', get duplex() { duplexAccessed = true; return 'half'; }, }).headers.has('Content-Type'); return duplexAccessed && !hasContentType; }); const DEFAULT_CHUNK_SIZE = 64 * 1024; const supportsResponseStream = isReadableStreamSupported && test(() => utils.isReadableStream(new Response('').body)); const resolvers = { stream: supportsResponseStream && ((res) => res.body) }; isFetchSupported && (((res) => { ['text', 'arrayBuffer', 'blob', 'formData', 'stream'].forEach(type => { !resolvers[type] && (resolvers[type] = utils.isFunction(res[type]) ? (res) => res[type]() : (_, config) => { throw new AxiosError(`Response type '${type}' is not supported`, AxiosError.ERR_NOT_SUPPORT, config); }) }); })(new Response)); const getBodyLength = async (body) => { if (body == null) { return 0; } if(utils.isBlob(body)) { return body.size; } if(utils.isSpecCompliantForm(body)) { const _request = new Request(platform.origin, { method: 'POST', body, }); return (await _request.arrayBuffer()).byteLength; } if(utils.isArrayBufferView(body) || utils.isArrayBuffer(body)) { return body.byteLength; } if(utils.isURLSearchParams(body)) { body = body + ''; } if(utils.isString(body)) { return (await encodeText(body)).byteLength; } } const resolveBodyLength = async (headers, body) => { const length = utils.toFiniteNumber(headers.getContentLength()); return length == null ? getBodyLength(body) : length; } export default isFetchSupported && (async (config) => { let { url, method, data, signal, cancelToken, timeout, onDownloadProgress, onUploadProgress, responseType, headers, withCredentials = 'same-origin', fetchOptions } = resolveConfig(config); responseType = responseType ? (responseType + '').toLowerCase() : 'text'; let composedSignal = composeSignals([signal, cancelToken && cancelToken.toAbortSignal()], timeout); let request; const unsubscribe = composedSignal && composedSignal.unsubscribe && (() => { composedSignal.unsubscribe(); }); let requestContentLength; try { if ( onUploadProgress && supportsRequestStream && method !== 'get' && method !== 'head' && (requestContentLength = await resolveBodyLength(headers, data)) !== 0 ) { let _request = new Request(url, { method: 'POST', body: data, duplex: "half" }); let contentTypeHeader; if (utils.isFormData(data) && (contentTypeHeader = _request.headers.get('content-type'))) { headers.setContentType(contentTypeHeader) } if (_request.body) { const [onProgress, flush] = progressEventDecorator( requestContentLength, progressEventReducer(asyncDecorator(onUploadProgress)) ); data = trackStream(_request.body, DEFAULT_CHUNK_SIZE, onProgress, flush); } } if (!utils.isString(withCredentials)) { withCredentials = withCredentials ? 'include' : 'omit'; } // Cloudflare Workers throws when credentials are defined // see https://github.com/cloudflare/workerd/issues/902 const isCredentialsSupported = "credentials" in Request.prototype; request = new Request(url, { ...fetchOptions, signal: composedSignal, method: method.toUpperCase(), headers: headers.normalize().toJSON(), body: data, duplex: "half", credentials: isCredentialsSupported ? withCredentials : undefined }); let response = await fetch(request, fetchOptions); const isStreamResponse = supportsResponseStream && (responseType === 'stream' || responseType === 'response'); if (supportsResponseStream && (onDownloadProgress || (isStreamResponse && unsubscribe))) { const options = {}; ['status', 'statusText', 'headers'].forEach(prop => { options[prop] = response[prop]; }); const responseContentLength = utils.toFiniteNumber(response.headers.get('content-length')); const [onProgress, flush] = onDownloadProgress && progressEventDecorator( responseContentLength, progressEventReducer(asyncDecorator(onDownloadProgress), true) ) || []; response = new Response( trackStream(response.body, DEFAULT_CHUNK_SIZE, onProgress, () => { flush && flush(); unsubscribe && unsubscribe(); }), options ); } responseType = responseType || 'text'; let responseData = await resolvers[utils.findKey(resolvers, responseType) || 'text'](response, config); !isStreamResponse && unsubscribe && unsubscribe(); return await new Promise((resolve, reject) => { settle(resolve, reject, { data: responseData, headers: AxiosHeaders.from(response.headers), status: response.status, statusText: response.statusText, config, request }) }) } catch (err) { unsubscribe && unsubscribe(); if (err && err.name === 'TypeError' && /Load failed|fetch/i.test(err.message)) { throw Object.assign( new AxiosError('Network Error', AxiosError.ERR_NETWORK, config, request), { cause: err.cause || err } ) } throw AxiosError.from(err, err && err.code, config, request); } }); node_modules/axios/lib/adapters/http.js 0000775 00000054026 15114741631 0014251 0 ustar 00 'use strict'; import utils from './../utils.js'; import settle from './../core/settle.js'; import buildFullPath from '../core/buildFullPath.js'; import buildURL from './../helpers/buildURL.js'; import proxyFromEnv from 'proxy-from-env'; import http from 'http'; import https from 'https'; import util from 'util'; import followRedirects from 'follow-redirects'; import zlib from 'zlib'; import {VERSION} from '../env/data.js'; import transitionalDefaults from '../defaults/transitional.js'; import AxiosError from '../core/AxiosError.js'; import CanceledError from '../cancel/CanceledError.js'; import platform from '../platform/index.js'; import fromDataURI from '../helpers/fromDataURI.js'; import stream from 'stream'; import AxiosHeaders from '../core/AxiosHeaders.js'; import AxiosTransformStream from '../helpers/AxiosTransformStream.js'; import {EventEmitter} from 'events'; import formDataToStream from "../helpers/formDataToStream.js"; import readBlob from "../helpers/readBlob.js"; import ZlibHeaderTransformStream from '../helpers/ZlibHeaderTransformStream.js'; import callbackify from "../helpers/callbackify.js"; import {progressEventReducer, progressEventDecorator, asyncDecorator} from "../helpers/progressEventReducer.js"; const zlibOptions = { flush: zlib.constants.Z_SYNC_FLUSH, finishFlush: zlib.constants.Z_SYNC_FLUSH }; const brotliOptions = { flush: zlib.constants.BROTLI_OPERATION_FLUSH, finishFlush: zlib.constants.BROTLI_OPERATION_FLUSH } const isBrotliSupported = utils.isFunction(zlib.createBrotliDecompress); const {http: httpFollow, https: httpsFollow} = followRedirects; const isHttps = /https:?/; const supportedProtocols = platform.protocols.map(protocol => { return protocol + ':'; }); const flushOnFinish = (stream, [throttled, flush]) => { stream .on('end', flush) .on('error', flush); return throttled; } /** * If the proxy or config beforeRedirects functions are defined, call them with the options * object. * * @param {Object<string, any>} options - The options object that was passed to the request. * * @returns {Object<string, any>} */ function dispatchBeforeRedirect(options, responseDetails) { if (options.beforeRedirects.proxy) { options.beforeRedirects.proxy(options); } if (options.beforeRedirects.config) { options.beforeRedirects.config(options, responseDetails); } } /** * If the proxy or config afterRedirects functions are defined, call them with the options * * @param {http.ClientRequestArgs} options * @param {AxiosProxyConfig} configProxy configuration from Axios options object * @param {string} location * * @returns {http.ClientRequestArgs} */ function setProxy(options, configProxy, location) { let proxy = configProxy; if (!proxy && proxy !== false) { const proxyUrl = proxyFromEnv.getProxyForUrl(location); if (proxyUrl) { proxy = new URL(proxyUrl); } } if (proxy) { // Basic proxy authorization if (proxy.username) { proxy.auth = (proxy.username || '') + ':' + (proxy.password || ''); } if (proxy.auth) { // Support proxy auth object form if (proxy.auth.username || proxy.auth.password) { proxy.auth = (proxy.auth.username || '') + ':' + (proxy.auth.password || ''); } const base64 = Buffer .from(proxy.auth, 'utf8') .toString('base64'); options.headers['Proxy-Authorization'] = 'Basic ' + base64; } options.headers.host = options.hostname + (options.port ? ':' + options.port : ''); const proxyHost = proxy.hostname || proxy.host; options.hostname = proxyHost; // Replace 'host' since options is not a URL object options.host = proxyHost; options.port = proxy.port; options.path = location; if (proxy.protocol) { options.protocol = proxy.protocol.includes(':') ? proxy.protocol : `${proxy.protocol}:`; } } options.beforeRedirects.proxy = function beforeRedirect(redirectOptions) { // Configure proxy for redirected request, passing the original config proxy to apply // the exact same logic as if the redirected request was performed by axios directly. setProxy(redirectOptions, configProxy, redirectOptions.href); }; } const isHttpAdapterSupported = typeof process !== 'undefined' && utils.kindOf(process) === 'process'; // temporary hotfix const wrapAsync = (asyncExecutor) => { return new Promise((resolve, reject) => { let onDone; let isDone; const done = (value, isRejected) => { if (isDone) return; isDone = true; onDone && onDone(value, isRejected); } const _resolve = (value) => { done(value); resolve(value); }; const _reject = (reason) => { done(reason, true); reject(reason); } asyncExecutor(_resolve, _reject, (onDoneHandler) => (onDone = onDoneHandler)).catch(_reject); }) }; const resolveFamily = ({address, family}) => { if (!utils.isString(address)) { throw TypeError('address must be a string'); } return ({ address, family: family || (address.indexOf('.') < 0 ? 6 : 4) }); } const buildAddressEntry = (address, family) => resolveFamily(utils.isObject(address) ? address : {address, family}); /*eslint consistent-return:0*/ export default isHttpAdapterSupported && function httpAdapter(config) { return wrapAsync(async function dispatchHttpRequest(resolve, reject, onDone) { let {data, lookup, family} = config; const {responseType, responseEncoding} = config; const method = config.method.toUpperCase(); let isDone; let rejected = false; let req; if (lookup) { const _lookup = callbackify(lookup, (value) => utils.isArray(value) ? value : [value]); // hotfix to support opt.all option which is required for node 20.x lookup = (hostname, opt, cb) => { _lookup(hostname, opt, (err, arg0, arg1) => { if (err) { return cb(err); } const addresses = utils.isArray(arg0) ? arg0.map(addr => buildAddressEntry(addr)) : [buildAddressEntry(arg0, arg1)]; opt.all ? cb(err, addresses) : cb(err, addresses[0].address, addresses[0].family); }); } } // temporary internal emitter until the AxiosRequest class will be implemented const emitter = new EventEmitter(); const onFinished = () => { if (config.cancelToken) { config.cancelToken.unsubscribe(abort); } if (config.signal) { config.signal.removeEventListener('abort', abort); } emitter.removeAllListeners(); } onDone((value, isRejected) => { isDone = true; if (isRejected) { rejected = true; onFinished(); } }); function abort(reason) { emitter.emit('abort', !reason || reason.type ? new CanceledError(null, config, req) : reason); } emitter.once('abort', reject); if (config.cancelToken || config.signal) { config.cancelToken && config.cancelToken.subscribe(abort); if (config.signal) { config.signal.aborted ? abort() : config.signal.addEventListener('abort', abort); } } // Parse url const fullPath = buildFullPath(config.baseURL, config.url, config.allowAbsoluteUrls); const parsed = new URL(fullPath, platform.hasBrowserEnv ? platform.origin : undefined); const protocol = parsed.protocol || supportedProtocols[0]; if (protocol === 'data:') { let convertedData; if (method !== 'GET') { return settle(resolve, reject, { status: 405, statusText: 'method not allowed', headers: {}, config }); } try { convertedData = fromDataURI(config.url, responseType === 'blob', { Blob: config.env && config.env.Blob }); } catch (err) { throw AxiosError.from(err, AxiosError.ERR_BAD_REQUEST, config); } if (responseType === 'text') { convertedData = convertedData.toString(responseEncoding); if (!responseEncoding || responseEncoding === 'utf8') { convertedData = utils.stripBOM(convertedData); } } else if (responseType === 'stream') { convertedData = stream.Readable.from(convertedData); } return settle(resolve, reject, { data: convertedData, status: 200, statusText: 'OK', headers: new AxiosHeaders(), config }); } if (supportedProtocols.indexOf(protocol) === -1) { return reject(new AxiosError( 'Unsupported protocol ' + protocol, AxiosError.ERR_BAD_REQUEST, config )); } const headers = AxiosHeaders.from(config.headers).normalize(); // Set User-Agent (required by some servers) // See https://github.com/axios/axios/issues/69 // User-Agent is specified; handle case where no UA header is desired // Only set header if it hasn't been set in config headers.set('User-Agent', 'axios/' + VERSION, false); const {onUploadProgress, onDownloadProgress} = config; const maxRate = config.maxRate; let maxUploadRate = undefined; let maxDownloadRate = undefined; // support for spec compliant FormData objects if (utils.isSpecCompliantForm(data)) { const userBoundary = headers.getContentType(/boundary=([-_\w\d]{10,70})/i); data = formDataToStream(data, (formHeaders) => { headers.set(formHeaders); }, { tag: `axios-${VERSION}-boundary`, boundary: userBoundary && userBoundary[1] || undefined }); // support for https://www.npmjs.com/package/form-data api } else if (utils.isFormData(data) && utils.isFunction(data.getHeaders)) { headers.set(data.getHeaders()); if (!headers.hasContentLength()) { try { const knownLength = await util.promisify(data.getLength).call(data); Number.isFinite(knownLength) && knownLength >= 0 && headers.setContentLength(knownLength); /*eslint no-empty:0*/ } catch (e) { } } } else if (utils.isBlob(data) || utils.isFile(data)) { data.size && headers.setContentType(data.type || 'application/octet-stream'); headers.setContentLength(data.size || 0); data = stream.Readable.from(readBlob(data)); } else if (data && !utils.isStream(data)) { if (Buffer.isBuffer(data)) { // Nothing to do... } else if (utils.isArrayBuffer(data)) { data = Buffer.from(new Uint8Array(data)); } else if (utils.isString(data)) { data = Buffer.from(data, 'utf-8'); } else { return reject(new AxiosError( 'Data after transformation must be a string, an ArrayBuffer, a Buffer, or a Stream', AxiosError.ERR_BAD_REQUEST, config )); } // Add Content-Length header if data exists headers.setContentLength(data.length, false); if (config.maxBodyLength > -1 && data.length > config.maxBodyLength) { return reject(new AxiosError( 'Request body larger than maxBodyLength limit', AxiosError.ERR_BAD_REQUEST, config )); } } const contentLength = utils.toFiniteNumber(headers.getContentLength()); if (utils.isArray(maxRate)) { maxUploadRate = maxRate[0]; maxDownloadRate = maxRate[1]; } else { maxUploadRate = maxDownloadRate = maxRate; } if (data && (onUploadProgress || maxUploadRate)) { if (!utils.isStream(data)) { data = stream.Readable.from(data, {objectMode: false}); } data = stream.pipeline([data, new AxiosTransformStream({ maxRate: utils.toFiniteNumber(maxUploadRate) })], utils.noop); onUploadProgress && data.on('progress', flushOnFinish( data, progressEventDecorator( contentLength, progressEventReducer(asyncDecorator(onUploadProgress), false, 3) ) )); } // HTTP basic authentication let auth = undefined; if (config.auth) { const username = config.auth.username || ''; const password = config.auth.password || ''; auth = username + ':' + password; } if (!auth && parsed.username) { const urlUsername = parsed.username; const urlPassword = parsed.password; auth = urlUsername + ':' + urlPassword; } auth && headers.delete('authorization'); let path; try { path = buildURL( parsed.pathname + parsed.search, config.params, config.paramsSerializer ).replace(/^\?/, ''); } catch (err) { const customErr = new Error(err.message); customErr.config = config; customErr.url = config.url; customErr.exists = true; return reject(customErr); } headers.set( 'Accept-Encoding', 'gzip, compress, deflate' + (isBrotliSupported ? ', br' : ''), false ); const options = { path, method: method, headers: headers.toJSON(), agents: { http: config.httpAgent, https: config.httpsAgent }, auth, protocol, family, beforeRedirect: dispatchBeforeRedirect, beforeRedirects: {} }; // cacheable-lookup integration hotfix !utils.isUndefined(lookup) && (options.lookup = lookup); if (config.socketPath) { options.socketPath = config.socketPath; } else { options.hostname = parsed.hostname.startsWith("[") ? parsed.hostname.slice(1, -1) : parsed.hostname; options.port = parsed.port; setProxy(options, config.proxy, protocol + '//' + parsed.hostname + (parsed.port ? ':' + parsed.port : '') + options.path); } let transport; const isHttpsRequest = isHttps.test(options.protocol); options.agent = isHttpsRequest ? config.httpsAgent : config.httpAgent; if (config.transport) { transport = config.transport; } else if (config.maxRedirects === 0) { transport = isHttpsRequest ? https : http; } else { if (config.maxRedirects) { options.maxRedirects = config.maxRedirects; } if (config.beforeRedirect) { options.beforeRedirects.config = config.beforeRedirect; } transport = isHttpsRequest ? httpsFollow : httpFollow; } if (config.maxBodyLength > -1) { options.maxBodyLength = config.maxBodyLength; } else { // follow-redirects does not skip comparison, so it should always succeed for axios -1 unlimited options.maxBodyLength = Infinity; } if (config.insecureHTTPParser) { options.insecureHTTPParser = config.insecureHTTPParser; } // Create the request req = transport.request(options, function handleResponse(res) { if (req.destroyed) return; const streams = [res]; const responseLength = +res.headers['content-length']; if (onDownloadProgress || maxDownloadRate) { const transformStream = new AxiosTransformStream({ maxRate: utils.toFiniteNumber(maxDownloadRate) }); onDownloadProgress && transformStream.on('progress', flushOnFinish( transformStream, progressEventDecorator( responseLength, progressEventReducer(asyncDecorator(onDownloadProgress), true, 3) ) )); streams.push(transformStream); } // decompress the response body transparently if required let responseStream = res; // return the last request in case of redirects const lastRequest = res.req || req; // if decompress disabled we should not decompress if (config.decompress !== false && res.headers['content-encoding']) { // if no content, but headers still say that it is encoded, // remove the header not confuse downstream operations if (method === 'HEAD' || res.statusCode === 204) { delete res.headers['content-encoding']; } switch ((res.headers['content-encoding'] || '').toLowerCase()) { /*eslint default-case:0*/ case 'gzip': case 'x-gzip': case 'compress': case 'x-compress': // add the unzipper to the body stream processing pipeline streams.push(zlib.createUnzip(zlibOptions)); // remove the content-encoding in order to not confuse downstream operations delete res.headers['content-encoding']; break; case 'deflate': streams.push(new ZlibHeaderTransformStream()); // add the unzipper to the body stream processing pipeline streams.push(zlib.createUnzip(zlibOptions)); // remove the content-encoding in order to not confuse downstream operations delete res.headers['content-encoding']; break; case 'br': if (isBrotliSupported) { streams.push(zlib.createBrotliDecompress(brotliOptions)); delete res.headers['content-encoding']; } } } responseStream = streams.length > 1 ? stream.pipeline(streams, utils.noop) : streams[0]; const offListeners = stream.finished(responseStream, () => { offListeners(); onFinished(); }); const response = { status: res.statusCode, statusText: res.statusMessage, headers: new AxiosHeaders(res.headers), config, request: lastRequest }; if (responseType === 'stream') { response.data = responseStream; settle(resolve, reject, response); } else { const responseBuffer = []; let totalResponseBytes = 0; responseStream.on('data', function handleStreamData(chunk) { responseBuffer.push(chunk); totalResponseBytes += chunk.length; // make sure the content length is not over the maxContentLength if specified if (config.maxContentLength > -1 && totalResponseBytes > config.maxContentLength) { // stream.destroy() emit aborted event before calling reject() on Node.js v16 rejected = true; responseStream.destroy(); reject(new AxiosError('maxContentLength size of ' + config.maxContentLength + ' exceeded', AxiosError.ERR_BAD_RESPONSE, config, lastRequest)); } }); responseStream.on('aborted', function handlerStreamAborted() { if (rejected) { return; } const err = new AxiosError( 'stream has been aborted', AxiosError.ERR_BAD_RESPONSE, config, lastRequest ); responseStream.destroy(err); reject(err); }); responseStream.on('error', function handleStreamError(err) { if (req.destroyed) return; reject(AxiosError.from(err, null, config, lastRequest)); }); responseStream.on('end', function handleStreamEnd() { try { let responseData = responseBuffer.length === 1 ? responseBuffer[0] : Buffer.concat(responseBuffer); if (responseType !== 'arraybuffer') { responseData = responseData.toString(responseEncoding); if (!responseEncoding || responseEncoding === 'utf8') { responseData = utils.stripBOM(responseData); } } response.data = responseData; } catch (err) { return reject(AxiosError.from(err, null, config, response.request, response)); } settle(resolve, reject, response); }); } emitter.once('abort', err => { if (!responseStream.destroyed) { responseStream.emit('error', err); responseStream.destroy(); } }); }); emitter.once('abort', err => { reject(err); req.destroy(err); }); // Handle errors req.on('error', function handleRequestError(err) { // @todo remove // if (req.aborted && err.code !== AxiosError.ERR_FR_TOO_MANY_REDIRECTS) return; reject(AxiosError.from(err, null, config, req)); }); // set tcp keep alive to prevent drop connection by peer req.on('socket', function handleRequestSocket(socket) { // default interval of sending ack packet is 1 minute socket.setKeepAlive(true, 1000 * 60); }); // Handle request timeout if (config.timeout) { // This is forcing a int timeout to avoid problems if the `req` interface doesn't handle other types. const timeout = parseInt(config.timeout, 10); if (Number.isNaN(timeout)) { reject(new AxiosError( 'error trying to parse `config.timeout` to int', AxiosError.ERR_BAD_OPTION_VALUE, config, req )); return; } // Sometime, the response will be very slow, and does not respond, the connect event will be block by event loop system. // And timer callback will be fired, and abort() will be invoked before connection, then get "socket hang up" and code ECONNRESET. // At this time, if we have a large number of request, nodejs will hang up some socket on background. and the number will up and up. // And then these socket which be hang up will devouring CPU little by little. // ClientRequest.setTimeout will be fired on the specify milliseconds, and can make sure that abort() will be fired after connect. req.setTimeout(timeout, function handleRequestTimeout() { if (isDone) return; let timeoutErrorMessage = config.timeout ? 'timeout of ' + config.timeout + 'ms exceeded' : 'timeout exceeded'; const transitional = config.transitional || transitionalDefaults; if (config.timeoutErrorMessage) { timeoutErrorMessage = config.timeoutErrorMessage; } reject(new AxiosError( timeoutErrorMessage, transitional.clarifyTimeoutError ? AxiosError.ETIMEDOUT : AxiosError.ECONNABORTED, config, req )); abort(); }); } // Send the request if (utils.isStream(data)) { let ended = false; let errored = false; data.on('end', () => { ended = true; }); data.once('error', err => { errored = true; req.destroy(err); }); data.on('close', () => { if (!ended && !errored) { abort(new CanceledError('Request stream has been aborted', config, req)); } }); data.pipe(req); } else { req.end(data); } }); } export const __setProxy = setProxy; node_modules/axios/lib/adapters/xhr.js 0000664 00000014737 15114741631 0014075 0 ustar 00 import utils from './../utils.js'; import settle from './../core/settle.js'; import transitionalDefaults from '../defaults/transitional.js'; import AxiosError from '../core/AxiosError.js'; import CanceledError from '../cancel/CanceledError.js'; import parseProtocol from '../helpers/parseProtocol.js'; import platform from '../platform/index.js'; import AxiosHeaders from '../core/AxiosHeaders.js'; import {progressEventReducer} from '../helpers/progressEventReducer.js'; import resolveConfig from "../helpers/resolveConfig.js"; const isXHRAdapterSupported = typeof XMLHttpRequest !== 'undefined'; export default isXHRAdapterSupported && function (config) { return new Promise(function dispatchXhrRequest(resolve, reject) { const _config = resolveConfig(config); let requestData = _config.data; const requestHeaders = AxiosHeaders.from(_config.headers).normalize(); let {responseType, onUploadProgress, onDownloadProgress} = _config; let onCanceled; let uploadThrottled, downloadThrottled; let flushUpload, flushDownload; function done() { flushUpload && flushUpload(); // flush events flushDownload && flushDownload(); // flush events _config.cancelToken && _config.cancelToken.unsubscribe(onCanceled); _config.signal && _config.signal.removeEventListener('abort', onCanceled); } let request = new XMLHttpRequest(); request.open(_config.method.toUpperCase(), _config.url, true); // Set the request timeout in MS request.timeout = _config.timeout; function onloadend() { if (!request) { return; } // Prepare the response const responseHeaders = AxiosHeaders.from( 'getAllResponseHeaders' in request && request.getAllResponseHeaders() ); const responseData = !responseType || responseType === 'text' || responseType === 'json' ? request.responseText : request.response; const response = { data: responseData, status: request.status, statusText: request.statusText, headers: responseHeaders, config, request }; settle(function _resolve(value) { resolve(value); done(); }, function _reject(err) { reject(err); done(); }, response); // Clean up request request = null; } if ('onloadend' in request) { // Use onloadend if available request.onloadend = onloadend; } else { // Listen for ready state to emulate onloadend request.onreadystatechange = function handleLoad() { if (!request || request.readyState !== 4) { return; } // The request errored out and we didn't get a response, this will be // handled by onerror instead // With one exception: request that using file: protocol, most browsers // will return status as 0 even though it's a successful request if (request.status === 0 && !(request.responseURL && request.responseURL.indexOf('file:') === 0)) { return; } // readystate handler is calling before onerror or ontimeout handlers, // so we should call onloadend on the next 'tick' setTimeout(onloadend); }; } // Handle browser request cancellation (as opposed to a manual cancellation) request.onabort = function handleAbort() { if (!request) { return; } reject(new AxiosError('Request aborted', AxiosError.ECONNABORTED, config, request)); // Clean up request request = null; }; // Handle low level network errors request.onerror = function handleError() { // Real errors are hidden from us by the browser // onerror should only fire if it's a network error reject(new AxiosError('Network Error', AxiosError.ERR_NETWORK, config, request)); // Clean up request request = null; }; // Handle timeout request.ontimeout = function handleTimeout() { let timeoutErrorMessage = _config.timeout ? 'timeout of ' + _config.timeout + 'ms exceeded' : 'timeout exceeded'; const transitional = _config.transitional || transitionalDefaults; if (_config.timeoutErrorMessage) { timeoutErrorMessage = _config.timeoutErrorMessage; } reject(new AxiosError( timeoutErrorMessage, transitional.clarifyTimeoutError ? AxiosError.ETIMEDOUT : AxiosError.ECONNABORTED, config, request)); // Clean up request request = null; }; // Remove Content-Type if data is undefined requestData === undefined && requestHeaders.setContentType(null); // Add headers to the request if ('setRequestHeader' in request) { utils.forEach(requestHeaders.toJSON(), function setRequestHeader(val, key) { request.setRequestHeader(key, val); }); } // Add withCredentials to request if needed if (!utils.isUndefined(_config.withCredentials)) { request.withCredentials = !!_config.withCredentials; } // Add responseType to request if needed if (responseType && responseType !== 'json') { request.responseType = _config.responseType; } // Handle progress if needed if (onDownloadProgress) { ([downloadThrottled, flushDownload] = progressEventReducer(onDownloadProgress, true)); request.addEventListener('progress', downloadThrottled); } // Not all browsers support upload events if (onUploadProgress && request.upload) { ([uploadThrottled, flushUpload] = progressEventReducer(onUploadProgress)); request.upload.addEventListener('progress', uploadThrottled); request.upload.addEventListener('loadend', flushUpload); } if (_config.cancelToken || _config.signal) { // Handle cancellation // eslint-disable-next-line func-names onCanceled = cancel => { if (!request) { return; } reject(!cancel || cancel.type ? new CanceledError(null, config, request) : cancel); request.abort(); request = null; }; _config.cancelToken && _config.cancelToken.subscribe(onCanceled); if (_config.signal) { _config.signal.aborted ? onCanceled() : _config.signal.addEventListener('abort', onCanceled); } } const protocol = parseProtocol(_config.url); if (protocol && platform.protocols.indexOf(protocol) === -1) { reject(new AxiosError('Unsupported protocol ' + protocol + ':', AxiosError.ERR_BAD_REQUEST, config)); return; } // Send the request request.send(requestData || null); }); } node_modules/axios/lib/adapters/README.md 0000664 00000001623 15114741631 0014203 0 ustar 00 # axios // adapters The modules under `adapters/` are modules that handle dispatching a request and settling a returned `Promise` once a response is received. ## Example ```js var settle = require('./../core/settle'); module.exports = function myAdapter(config) { // At this point: // - config has been merged with defaults // - request transformers have already run // - request interceptors have already run // Make the request using config provided // Upon response settle the Promise return new Promise(function(resolve, reject) { var response = { data: responseData, status: request.status, statusText: request.statusText, headers: responseHeaders, config: config, request: request }; settle(resolve, reject, response); // From here: // - response transformers will run // - response interceptors will run }); } ``` node_modules/axios/lib/helpers/spread.js 0000664 00000001064 15114741631 0014376 0 ustar 00 'use strict'; /** * Syntactic sugar for invoking a function and expanding an array for arguments. * * Common use case would be to use `Function.prototype.apply`. * * ```js * function f(x, y, z) {} * var args = [1, 2, 3]; * f.apply(null, args); * ``` * * With `spread` this example can be re-written. * * ```js * spread(function(x, y, z) {})([1, 2, 3]); * ``` * * @param {Function} callback * * @returns {Function} */ export default function spread(callback) { return function wrap(arr) { return callback.apply(null, arr); }; } node_modules/axios/lib/helpers/parseProtocol.js 0000664 00000000227 15114741631 0015754 0 ustar 00 'use strict'; export default function parseProtocol(url) { const match = /^([-+\w]{1,25})(:?\/\/|:)/.exec(url); return match && match[1] || ''; } node_modules/axios/lib/helpers/progressEventReducer.js 0000664 00000002323 15114741631 0017277 0 ustar 00 import speedometer from "./speedometer.js"; import throttle from "./throttle.js"; import utils from "../utils.js"; export const progressEventReducer = (listener, isDownloadStream, freq = 3) => { let bytesNotified = 0; const _speedometer = speedometer(50, 250); return throttle(e => { const loaded = e.loaded; const total = e.lengthComputable ? e.total : undefined; const progressBytes = loaded - bytesNotified; const rate = _speedometer(progressBytes); const inRange = loaded <= total; bytesNotified = loaded; const data = { loaded, total, progress: total ? (loaded / total) : undefined, bytes: progressBytes, rate: rate ? rate : undefined, estimated: rate && total && inRange ? (total - loaded) / rate : undefined, event: e, lengthComputable: total != null, [isDownloadStream ? 'download' : 'upload']: true }; listener(data); }, freq); } export const progressEventDecorator = (total, throttled) => { const lengthComputable = total != null; return [(loaded) => throttled[0]({ lengthComputable, total, loaded }), throttled[1]]; } export const asyncDecorator = (fn) => (...args) => utils.asap(() => fn(...args)); node_modules/axios/lib/helpers/parseHeaders.js 0000664 00000002546 15114741631 0015534 0 ustar 00 'use strict'; import utils from './../utils.js'; // RawAxiosHeaders whose duplicates are ignored by node // c.f. https://nodejs.org/api/http.html#http_message_headers const ignoreDuplicateOf = utils.toObjectSet([ 'age', 'authorization', 'content-length', 'content-type', 'etag', 'expires', 'from', 'host', 'if-modified-since', 'if-unmodified-since', 'last-modified', 'location', 'max-forwards', 'proxy-authorization', 'referer', 'retry-after', 'user-agent' ]); /** * Parse headers into an object * * ``` * Date: Wed, 27 Aug 2014 08:58:49 GMT * Content-Type: application/json * Connection: keep-alive * Transfer-Encoding: chunked * ``` * * @param {String} rawHeaders Headers needing to be parsed * * @returns {Object} Headers parsed into an object */ export default rawHeaders => { const parsed = {}; let key; let val; let i; rawHeaders && rawHeaders.split('\n').forEach(function parser(line) { i = line.indexOf(':'); key = line.substring(0, i).trim().toLowerCase(); val = line.substring(i + 1).trim(); if (!key || (parsed[key] && ignoreDuplicateOf[key])) { return; } if (key === 'set-cookie') { if (parsed[key]) { parsed[key].push(val); } else { parsed[key] = [val]; } } else { parsed[key] = parsed[key] ? parsed[key] + ', ' + val : val; } }); return parsed; }; node_modules/axios/lib/helpers/toFormData.js 0000664 00000013744 15114741631 0015170 0 ustar 00 'use strict'; import utils from '../utils.js'; import AxiosError from '../core/AxiosError.js'; // temporary hotfix to avoid circular references until AxiosURLSearchParams is refactored import PlatformFormData from '../platform/node/classes/FormData.js'; /** * Determines if the given thing is a array or js object. * * @param {string} thing - The object or array to be visited. * * @returns {boolean} */ function isVisitable(thing) { return utils.isPlainObject(thing) || utils.isArray(thing); } /** * It removes the brackets from the end of a string * * @param {string} key - The key of the parameter. * * @returns {string} the key without the brackets. */ function removeBrackets(key) { return utils.endsWith(key, '[]') ? key.slice(0, -2) : key; } /** * It takes a path, a key, and a boolean, and returns a string * * @param {string} path - The path to the current key. * @param {string} key - The key of the current object being iterated over. * @param {string} dots - If true, the key will be rendered with dots instead of brackets. * * @returns {string} The path to the current key. */ function renderKey(path, key, dots) { if (!path) return key; return path.concat(key).map(function each(token, i) { // eslint-disable-next-line no-param-reassign token = removeBrackets(token); return !dots && i ? '[' + token + ']' : token; }).join(dots ? '.' : ''); } /** * If the array is an array and none of its elements are visitable, then it's a flat array. * * @param {Array<any>} arr - The array to check * * @returns {boolean} */ function isFlatArray(arr) { return utils.isArray(arr) && !arr.some(isVisitable); } const predicates = utils.toFlatObject(utils, {}, null, function filter(prop) { return /^is[A-Z]/.test(prop); }); /** * Convert a data object to FormData * * @param {Object} obj * @param {?Object} [formData] * @param {?Object} [options] * @param {Function} [options.visitor] * @param {Boolean} [options.metaTokens = true] * @param {Boolean} [options.dots = false] * @param {?Boolean} [options.indexes = false] * * @returns {Object} **/ /** * It converts an object into a FormData object * * @param {Object<any, any>} obj - The object to convert to form data. * @param {string} formData - The FormData object to append to. * @param {Object<string, any>} options * * @returns */ function toFormData(obj, formData, options) { if (!utils.isObject(obj)) { throw new TypeError('target must be an object'); } // eslint-disable-next-line no-param-reassign formData = formData || new (PlatformFormData || FormData)(); // eslint-disable-next-line no-param-reassign options = utils.toFlatObject(options, { metaTokens: true, dots: false, indexes: false }, false, function defined(option, source) { // eslint-disable-next-line no-eq-null,eqeqeq return !utils.isUndefined(source[option]); }); const metaTokens = options.metaTokens; // eslint-disable-next-line no-use-before-define const visitor = options.visitor || defaultVisitor; const dots = options.dots; const indexes = options.indexes; const _Blob = options.Blob || typeof Blob !== 'undefined' && Blob; const useBlob = _Blob && utils.isSpecCompliantForm(formData); if (!utils.isFunction(visitor)) { throw new TypeError('visitor must be a function'); } function convertValue(value) { if (value === null) return ''; if (utils.isDate(value)) { return value.toISOString(); } if (utils.isBoolean(value)) { return value.toString(); } if (!useBlob && utils.isBlob(value)) { throw new AxiosError('Blob is not supported. Use a Buffer instead.'); } if (utils.isArrayBuffer(value) || utils.isTypedArray(value)) { return useBlob && typeof Blob === 'function' ? new Blob([value]) : Buffer.from(value); } return value; } /** * Default visitor. * * @param {*} value * @param {String|Number} key * @param {Array<String|Number>} path * @this {FormData} * * @returns {boolean} return true to visit the each prop of the value recursively */ function defaultVisitor(value, key, path) { let arr = value; if (value && !path && typeof value === 'object') { if (utils.endsWith(key, '{}')) { // eslint-disable-next-line no-param-reassign key = metaTokens ? key : key.slice(0, -2); // eslint-disable-next-line no-param-reassign value = JSON.stringify(value); } else if ( (utils.isArray(value) && isFlatArray(value)) || ((utils.isFileList(value) || utils.endsWith(key, '[]')) && (arr = utils.toArray(value)) )) { // eslint-disable-next-line no-param-reassign key = removeBrackets(key); arr.forEach(function each(el, index) { !(utils.isUndefined(el) || el === null) && formData.append( // eslint-disable-next-line no-nested-ternary indexes === true ? renderKey([key], index, dots) : (indexes === null ? key : key + '[]'), convertValue(el) ); }); return false; } } if (isVisitable(value)) { return true; } formData.append(renderKey(path, key, dots), convertValue(value)); return false; } const stack = []; const exposedHelpers = Object.assign(predicates, { defaultVisitor, convertValue, isVisitable }); function build(value, path) { if (utils.isUndefined(value)) return; if (stack.indexOf(value) !== -1) { throw Error('Circular reference detected in ' + path.join('.')); } stack.push(value); utils.forEach(value, function each(el, key) { const result = !(utils.isUndefined(el) || el === null) && visitor.call( formData, el, utils.isString(key) ? key.trim() : key, path, exposedHelpers ); if (result === true) { build(el, path ? path.concat(key) : [key]); } }); stack.pop(); } if (!utils.isObject(obj)) { throw new TypeError('data must be an object'); } build(obj); return formData; } export default toFormData; node_modules/axios/lib/helpers/AxiosURLSearchParams.js 0000664 00000002637 15114741631 0017067 0 ustar 00 'use strict'; import toFormData from './toFormData.js'; /** * It encodes a string by replacing all characters that are not in the unreserved set with * their percent-encoded equivalents * * @param {string} str - The string to encode. * * @returns {string} The encoded string. */ function encode(str) { const charMap = { '!': '%21', "'": '%27', '(': '%28', ')': '%29', '~': '%7E', '%20': '+', '%00': '\x00' }; return encodeURIComponent(str).replace(/[!'()~]|%20|%00/g, function replacer(match) { return charMap[match]; }); } /** * It takes a params object and converts it to a FormData object * * @param {Object<string, any>} params - The parameters to be converted to a FormData object. * @param {Object<string, any>} options - The options object passed to the Axios constructor. * * @returns {void} */ function AxiosURLSearchParams(params, options) { this._pairs = []; params && toFormData(params, this, options); } const prototype = AxiosURLSearchParams.prototype; prototype.append = function append(name, value) { this._pairs.push([name, value]); }; prototype.toString = function toString(encoder) { const _encode = encoder ? function(value) { return encoder.call(this, value, encode); } : encode; return this._pairs.map(function each(pair) { return _encode(pair[0]) + '=' + _encode(pair[1]); }, '').join('&'); }; export default AxiosURLSearchParams; node_modules/axios/lib/helpers/formDataToJSON.js 0000664 00000004164 15114741631 0015656 0 ustar 00 'use strict'; import utils from '../utils.js'; /** * It takes a string like `foo[x][y][z]` and returns an array like `['foo', 'x', 'y', 'z'] * * @param {string} name - The name of the property to get. * * @returns An array of strings. */ function parsePropPath(name) { // foo[x][y][z] // foo.x.y.z // foo-x-y-z // foo x y z return utils.matchAll(/\w+|\[(\w*)]/g, name).map(match => { return match[0] === '[]' ? '' : match[1] || match[0]; }); } /** * Convert an array to an object. * * @param {Array<any>} arr - The array to convert to an object. * * @returns An object with the same keys and values as the array. */ function arrayToObject(arr) { const obj = {}; const keys = Object.keys(arr); let i; const len = keys.length; let key; for (i = 0; i < len; i++) { key = keys[i]; obj[key] = arr[key]; } return obj; } /** * It takes a FormData object and returns a JavaScript object * * @param {string} formData The FormData object to convert to JSON. * * @returns {Object<string, any> | null} The converted object. */ function formDataToJSON(formData) { function buildPath(path, value, target, index) { let name = path[index++]; if (name === '__proto__') return true; const isNumericKey = Number.isFinite(+name); const isLast = index >= path.length; name = !name && utils.isArray(target) ? target.length : name; if (isLast) { if (utils.hasOwnProp(target, name)) { target[name] = [target[name], value]; } else { target[name] = value; } return !isNumericKey; } if (!target[name] || !utils.isObject(target[name])) { target[name] = []; } const result = buildPath(path, value, target[name], index); if (result && utils.isArray(target[name])) { target[name] = arrayToObject(target[name]); } return !isNumericKey; } if (utils.isFormData(formData) && utils.isFunction(formData.entries)) { const obj = {}; utils.forEachEntry(formData, (name, value) => { buildPath(parsePropPath(name), value, obj, 0); }); return obj; } return null; } export default formDataToJSON; node_modules/axios/lib/helpers/isAxiosError.js 0000664 00000000565 15114741631 0015556 0 ustar 00 'use strict'; import utils from './../utils.js'; /** * Determines whether the payload is an error thrown by Axios * * @param {*} payload The value to test * * @returns {boolean} True if the payload is an error thrown by Axios, otherwise false */ export default function isAxiosError(payload) { return utils.isObject(payload) && (payload.isAxiosError === true); } node_modules/axios/lib/helpers/fromDataURI.js 0000664 00000002525 15114741631 0015240 0 ustar 00 'use strict'; import AxiosError from '../core/AxiosError.js'; import parseProtocol from './parseProtocol.js'; import platform from '../platform/index.js'; const DATA_URL_PATTERN = /^(?:([^;]+);)?(?:[^;]+;)?(base64|),([\s\S]*)$/; /** * Parse data uri to a Buffer or Blob * * @param {String} uri * @param {?Boolean} asBlob * @param {?Object} options * @param {?Function} options.Blob * * @returns {Buffer|Blob} */ export default function fromDataURI(uri, asBlob, options) { const _Blob = options && options.Blob || platform.classes.Blob; const protocol = parseProtocol(uri); if (asBlob === undefined && _Blob) { asBlob = true; } if (protocol === 'data') { uri = protocol.length ? uri.slice(protocol.length + 1) : uri; const match = DATA_URL_PATTERN.exec(uri); if (!match) { throw new AxiosError('Invalid URL', AxiosError.ERR_INVALID_URL); } const mime = match[1]; const isBase64 = match[2]; const body = match[3]; const buffer = Buffer.from(decodeURIComponent(body), isBase64 ? 'base64' : 'utf8'); if (asBlob) { if (!_Blob) { throw new AxiosError('Blob is not supported', AxiosError.ERR_NOT_SUPPORT); } return new _Blob([buffer], {type: mime}); } return buffer; } throw new AxiosError('Unsupported protocol ' + protocol, AxiosError.ERR_NOT_SUPPORT); } node_modules/axios/lib/helpers/readBlob.js 0000664 00000000476 15114741631 0014640 0 ustar 00 const {asyncIterator} = Symbol; const readBlob = async function* (blob) { if (blob.stream) { yield* blob.stream() } else if (blob.arrayBuffer) { yield await blob.arrayBuffer() } else if (blob[asyncIterator]) { yield* blob[asyncIterator](); } else { yield blob; } } export default readBlob; node_modules/axios/lib/helpers/deprecatedMethod.js 0000664 00000001352 15114741631 0016361 0 ustar 00 'use strict'; /*eslint no-console:0*/ /** * Supply a warning to the developer that a method they are using * has been deprecated. * * @param {string} method The name of the deprecated method * @param {string} [instead] The alternate method to use if applicable * @param {string} [docs] The documentation URL to get further details * * @returns {void} */ export default function deprecatedMethod(method, instead, docs) { try { console.warn( 'DEPRECATED method `' + method + '`.' + (instead ? ' Use `' + instead + '` instead.' : '') + ' This method will be removed in a future release.'); if (docs) { console.warn('For more information about usage see ' + docs); } } catch (e) { /* Ignore */ } } node_modules/axios/lib/helpers/speedometer.js 0000664 00000002104 15114741631 0015430 0 ustar 00 'use strict'; /** * Calculate data maxRate * @param {Number} [samplesCount= 10] * @param {Number} [min= 1000] * @returns {Function} */ function speedometer(samplesCount, min) { samplesCount = samplesCount || 10; const bytes = new Array(samplesCount); const timestamps = new Array(samplesCount); let head = 0; let tail = 0; let firstSampleTS; min = min !== undefined ? min : 1000; return function push(chunkLength) { const now = Date.now(); const startedAt = timestamps[tail]; if (!firstSampleTS) { firstSampleTS = now; } bytes[head] = chunkLength; timestamps[head] = now; let i = tail; let bytesCount = 0; while (i !== head) { bytesCount += bytes[i++]; i = i % samplesCount; } head = (head + 1) % samplesCount; if (head === tail) { tail = (tail + 1) % samplesCount; } if (now - firstSampleTS < min) { return; } const passed = startedAt && now - startedAt; return passed ? Math.round(bytesCount * 1000 / passed) : undefined; }; } export default speedometer; node_modules/axios/lib/helpers/isAbsoluteURL.js 0000664 00000001061 15114741631 0015612 0 ustar 00 'use strict'; /** * Determines whether the specified URL is absolute * * @param {string} url The URL to test * * @returns {boolean} True if the specified URL is absolute, otherwise false */ export default function isAbsoluteURL(url) { // A URL is considered absolute if it begins with "<scheme>://" or "//" (protocol-relative URL). // RFC 3986 defines scheme name as a sequence of characters beginning with a letter and followed // by any combination of letters, digits, plus, period, or hyphen. return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(url); } node_modules/axios/lib/helpers/toURLEncodedForm.js 0000664 00000001044 15114741631 0016231 0 ustar 00 'use strict'; import utils from '../utils.js'; import toFormData from './toFormData.js'; import platform from '../platform/index.js'; export default function toURLEncodedForm(data, options) { return toFormData(data, new platform.classes.URLSearchParams(), Object.assign({ visitor: function(value, key, path, helpers) { if (platform.isNode && utils.isBuffer(value)) { this.append(key, value.toString('base64')); return false; } return helpers.defaultVisitor.apply(this, arguments); } }, options)); } node_modules/axios/lib/helpers/cookies.js 0000664 00000002025 15114741631 0014552 0 ustar 00 import utils from './../utils.js'; import platform from '../platform/index.js'; export default platform.hasStandardBrowserEnv ? // Standard browser envs support document.cookie { write(name, value, expires, path, domain, secure) { const cookie = [name + '=' + encodeURIComponent(value)]; utils.isNumber(expires) && cookie.push('expires=' + new Date(expires).toGMTString()); utils.isString(path) && cookie.push('path=' + path); utils.isString(domain) && cookie.push('domain=' + domain); secure === true && cookie.push('secure'); document.cookie = cookie.join('; '); }, read(name) { const match = document.cookie.match(new RegExp('(^|;\\s*)(' + name + ')=([^;]*)')); return (match ? decodeURIComponent(match[3]) : null); }, remove(name) { this.write(name, '', Date.now() - 86400000); } } : // Non-standard browser env (web workers, react-native) lack needed support. { write() {}, read() { return null; }, remove() {} }; node_modules/axios/lib/helpers/buildURL.js 0000664 00000003173 15114741631 0014605 0 ustar 00 'use strict'; import utils from '../utils.js'; import AxiosURLSearchParams from '../helpers/AxiosURLSearchParams.js'; /** * It replaces all instances of the characters `:`, `$`, `,`, `+`, `[`, and `]` with their * URI encoded counterparts * * @param {string} val The value to be encoded. * * @returns {string} The encoded value. */ function encode(val) { return encodeURIComponent(val). replace(/%3A/gi, ':'). replace(/%24/g, '$'). replace(/%2C/gi, ','). replace(/%20/g, '+'). replace(/%5B/gi, '['). replace(/%5D/gi, ']'); } /** * Build a URL by appending params to the end * * @param {string} url The base of the url (e.g., http://www.google.com) * @param {object} [params] The params to be appended * @param {?(object|Function)} options * * @returns {string} The formatted url */ export default function buildURL(url, params, options) { /*eslint no-param-reassign:0*/ if (!params) { return url; } const _encode = options && options.encode || encode; if (utils.isFunction(options)) { options = { serialize: options }; } const serializeFn = options && options.serialize; let serializedParams; if (serializeFn) { serializedParams = serializeFn(params, options); } else { serializedParams = utils.isURLSearchParams(params) ? params.toString() : new AxiosURLSearchParams(params, options).toString(_encode); } if (serializedParams) { const hashmarkIndex = url.indexOf("#"); if (hashmarkIndex !== -1) { url = url.slice(0, hashmarkIndex); } url += (url.indexOf('?') === -1 ? '?' : '&') + serializedParams; } return url; } node_modules/axios/lib/helpers/resolveConfig.js 0000664 00000004115 15114741631 0015725 0 ustar 00 import platform from "../platform/index.js"; import utils from "../utils.js"; import isURLSameOrigin from "./isURLSameOrigin.js"; import cookies from "./cookies.js"; import buildFullPath from "../core/buildFullPath.js"; import mergeConfig from "../core/mergeConfig.js"; import AxiosHeaders from "../core/AxiosHeaders.js"; import buildURL from "./buildURL.js"; export default (config) => { const newConfig = mergeConfig({}, config); let {data, withXSRFToken, xsrfHeaderName, xsrfCookieName, headers, auth} = newConfig; newConfig.headers = headers = AxiosHeaders.from(headers); newConfig.url = buildURL(buildFullPath(newConfig.baseURL, newConfig.url, newConfig.allowAbsoluteUrls), config.params, config.paramsSerializer); // HTTP basic authentication if (auth) { headers.set('Authorization', 'Basic ' + btoa((auth.username || '') + ':' + (auth.password ? unescape(encodeURIComponent(auth.password)) : '')) ); } let contentType; if (utils.isFormData(data)) { if (platform.hasStandardBrowserEnv || platform.hasStandardBrowserWebWorkerEnv) { headers.setContentType(undefined); // Let the browser set it } else if ((contentType = headers.getContentType()) !== false) { // fix semicolon duplication issue for ReactNative FormData implementation const [type, ...tokens] = contentType ? contentType.split(';').map(token => token.trim()).filter(Boolean) : []; headers.setContentType([type || 'multipart/form-data', ...tokens].join('; ')); } } // Add xsrf header // This is only done if running in a standard browser environment. // Specifically not if we're in a web worker, or react-native. if (platform.hasStandardBrowserEnv) { withXSRFToken && utils.isFunction(withXSRFToken) && (withXSRFToken = withXSRFToken(newConfig)); if (withXSRFToken || (withXSRFToken !== false && isURLSameOrigin(newConfig.url))) { // Add xsrf header const xsrfValue = xsrfHeaderName && xsrfCookieName && cookies.read(xsrfCookieName); if (xsrfValue) { headers.set(xsrfHeaderName, xsrfValue); } } } return newConfig; } node_modules/axios/lib/helpers/trackStream.js 0000664 00000003226 15114741631 0015402 0 ustar 00 export const streamChunk = function* (chunk, chunkSize) { let len = chunk.byteLength; if (!chunkSize || len < chunkSize) { yield chunk; return; } let pos = 0; let end; while (pos < len) { end = pos + chunkSize; yield chunk.slice(pos, end); pos = end; } } export const readBytes = async function* (iterable, chunkSize) { for await (const chunk of readStream(iterable)) { yield* streamChunk(chunk, chunkSize); } } const readStream = async function* (stream) { if (stream[Symbol.asyncIterator]) { yield* stream; return; } const reader = stream.getReader(); try { for (;;) { const {done, value} = await reader.read(); if (done) { break; } yield value; } } finally { await reader.cancel(); } } export const trackStream = (stream, chunkSize, onProgress, onFinish) => { const iterator = readBytes(stream, chunkSize); let bytes = 0; let done; let _onFinish = (e) => { if (!done) { done = true; onFinish && onFinish(e); } } return new ReadableStream({ async pull(controller) { try { const {done, value} = await iterator.next(); if (done) { _onFinish(); controller.close(); return; } let len = value.byteLength; if (onProgress) { let loadedBytes = bytes += len; onProgress(loadedBytes); } controller.enqueue(new Uint8Array(value)); } catch (err) { _onFinish(err); throw err; } }, cancel(reason) { _onFinish(reason); return iterator.return(); } }, { highWaterMark: 2 }) } node_modules/axios/lib/helpers/callbackify.js 0000664 00000000564 15114741631 0015370 0 ustar 00 import utils from "../utils.js"; const callbackify = (fn, reducer) => { return utils.isAsyncFn(fn) ? function (...args) { const cb = args.pop(); fn.apply(this, args).then((value) => { try { reducer ? cb(null, ...reducer(value)) : cb(null, value); } catch (err) { cb(err); } }, cb); } : fn; } export default callbackify; node_modules/axios/lib/helpers/ZlibHeaderTransformStream.js 0000664 00000001251 15114741631 0020177 0 ustar 00 "use strict"; import stream from "stream"; class ZlibHeaderTransformStream extends stream.Transform { __transform(chunk, encoding, callback) { this.push(chunk); callback(); } _transform(chunk, encoding, callback) { if (chunk.length !== 0) { this._transform = this.__transform; // Add Default Compression headers if no zlib headers are present if (chunk[0] !== 120) { // Hex: 78 const header = Buffer.alloc(2); header[0] = 120; // Hex: 78 header[1] = 156; // Hex: 9C this.push(header, encoding); } } this.__transform(chunk, encoding, callback); } } export default ZlibHeaderTransformStream; node_modules/axios/lib/helpers/isURLSameOrigin.js 0000664 00000000644 15114741631 0016077 0 ustar 00 import platform from '../platform/index.js'; export default platform.hasStandardBrowserEnv ? ((origin, isMSIE) => (url) => { url = new URL(url, platform.origin); return ( origin.protocol === url.protocol && origin.host === url.host && (isMSIE || origin.port === url.port) ); })( new URL(platform.origin), platform.navigator && /(msie|trident)/i.test(platform.navigator.userAgent) ) : () => true; node_modules/axios/lib/helpers/composeSignals.js 0000664 00000002524 15114741631 0016110 0 ustar 00 import CanceledError from "../cancel/CanceledError.js"; import AxiosError from "../core/AxiosError.js"; import utils from '../utils.js'; const composeSignals = (signals, timeout) => { const {length} = (signals = signals ? signals.filter(Boolean) : []); if (timeout || length) { let controller = new AbortController(); let aborted; const onabort = function (reason) { if (!aborted) { aborted = true; unsubscribe(); const err = reason instanceof Error ? reason : this.reason; controller.abort(err instanceof AxiosError ? err : new CanceledError(err instanceof Error ? err.message : err)); } } let timer = timeout && setTimeout(() => { timer = null; onabort(new AxiosError(`timeout ${timeout} of ms exceeded`, AxiosError.ETIMEDOUT)) }, timeout) const unsubscribe = () => { if (signals) { timer && clearTimeout(timer); timer = null; signals.forEach(signal => { signal.unsubscribe ? signal.unsubscribe(onabort) : signal.removeEventListener('abort', onabort); }); signals = null; } } signals.forEach((signal) => signal.addEventListener('abort', onabort)); const {signal} = controller; signal.unsubscribe = () => utils.asap(unsubscribe); return signal; } } export default composeSignals; node_modules/axios/lib/helpers/combineURLs.js 0000664 00000000576 15114741631 0015311 0 ustar 00 'use strict'; /** * Creates a new URL by combining the specified URLs * * @param {string} baseURL The base URL * @param {string} relativeURL The relative URL * * @returns {string} The combined URL */ export default function combineURLs(baseURL, relativeURL) { return relativeURL ? baseURL.replace(/\/?\/$/, '') + '/' + relativeURL.replace(/^\/+/, '') : baseURL; } node_modules/axios/lib/helpers/validator.js 0000664 00000005341 15114741631 0015107 0 ustar 00 'use strict'; import {VERSION} from '../env/data.js'; import AxiosError from '../core/AxiosError.js'; const validators = {}; // eslint-disable-next-line func-names ['object', 'boolean', 'number', 'function', 'string', 'symbol'].forEach((type, i) => { validators[type] = function validator(thing) { return typeof thing === type || 'a' + (i < 1 ? 'n ' : ' ') + type; }; }); const deprecatedWarnings = {}; /** * Transitional option validator * * @param {function|boolean?} validator - set to false if the transitional option has been removed * @param {string?} version - deprecated version / removed since version * @param {string?} message - some message with additional info * * @returns {function} */ validators.transitional = function transitional(validator, version, message) { function formatMessage(opt, desc) { return '[Axios v' + VERSION + '] Transitional option \'' + opt + '\'' + desc + (message ? '. ' + message : ''); } // eslint-disable-next-line func-names return (value, opt, opts) => { if (validator === false) { throw new AxiosError( formatMessage(opt, ' has been removed' + (version ? ' in ' + version : '')), AxiosError.ERR_DEPRECATED ); } if (version && !deprecatedWarnings[opt]) { deprecatedWarnings[opt] = true; // eslint-disable-next-line no-console console.warn( formatMessage( opt, ' has been deprecated since v' + version + ' and will be removed in the near future' ) ); } return validator ? validator(value, opt, opts) : true; }; }; validators.spelling = function spelling(correctSpelling) { return (value, opt) => { // eslint-disable-next-line no-console console.warn(`${opt} is likely a misspelling of ${correctSpelling}`); return true; } }; /** * Assert object's properties type * * @param {object} options * @param {object} schema * @param {boolean?} allowUnknown * * @returns {object} */ function assertOptions(options, schema, allowUnknown) { if (typeof options !== 'object') { throw new AxiosError('options must be an object', AxiosError.ERR_BAD_OPTION_VALUE); } const keys = Object.keys(options); let i = keys.length; while (i-- > 0) { const opt = keys[i]; const validator = schema[opt]; if (validator) { const value = options[opt]; const result = value === undefined || validator(value, opt, options); if (result !== true) { throw new AxiosError('option ' + opt + ' must be ' + result, AxiosError.ERR_BAD_OPTION_VALUE); } continue; } if (allowUnknown !== true) { throw new AxiosError('Unknown option ' + opt, AxiosError.ERR_BAD_OPTION); } } } export default { assertOptions, validators }; node_modules/axios/lib/helpers/HttpStatusCode.js 0000664 00000003100 15114741631 0016027 0 ustar 00 const HttpStatusCode = { Continue: 100, SwitchingProtocols: 101, Processing: 102, EarlyHints: 103, Ok: 200, Created: 201, Accepted: 202, NonAuthoritativeInformation: 203, NoContent: 204, ResetContent: 205, PartialContent: 206, MultiStatus: 207, AlreadyReported: 208, ImUsed: 226, MultipleChoices: 300, MovedPermanently: 301, Found: 302, SeeOther: 303, NotModified: 304, UseProxy: 305, Unused: 306, TemporaryRedirect: 307, PermanentRedirect: 308, BadRequest: 400, Unauthorized: 401, PaymentRequired: 402, Forbidden: 403, NotFound: 404, MethodNotAllowed: 405, NotAcceptable: 406, ProxyAuthenticationRequired: 407, RequestTimeout: 408, Conflict: 409, Gone: 410, LengthRequired: 411, PreconditionFailed: 412, PayloadTooLarge: 413, UriTooLong: 414, UnsupportedMediaType: 415, RangeNotSatisfiable: 416, ExpectationFailed: 417, ImATeapot: 418, MisdirectedRequest: 421, UnprocessableEntity: 422, Locked: 423, FailedDependency: 424, TooEarly: 425, UpgradeRequired: 426, PreconditionRequired: 428, TooManyRequests: 429, RequestHeaderFieldsTooLarge: 431, UnavailableForLegalReasons: 451, InternalServerError: 500, NotImplemented: 501, BadGateway: 502, ServiceUnavailable: 503, GatewayTimeout: 504, HttpVersionNotSupported: 505, VariantAlsoNegotiates: 506, InsufficientStorage: 507, LoopDetected: 508, NotExtended: 510, NetworkAuthenticationRequired: 511, }; Object.entries(HttpStatusCode).forEach(([key, value]) => { HttpStatusCode[value] = key; }); export default HttpStatusCode; node_modules/axios/lib/helpers/null.js 0000664 00000000070 15114741631 0014066 0 ustar 00 // eslint-disable-next-line strict export default null; node_modules/axios/lib/helpers/bind.js 0000664 00000000206 15114741631 0014031 0 ustar 00 'use strict'; export default function bind(fn, thisArg) { return function wrap() { return fn.apply(thisArg, arguments); }; } node_modules/axios/lib/helpers/throttle.js 0000664 00000001535 15114741631 0014770 0 ustar 00 /** * Throttle decorator * @param {Function} fn * @param {Number} freq * @return {Function} */ function throttle(fn, freq) { let timestamp = 0; let threshold = 1000 / freq; let lastArgs; let timer; const invoke = (args, now = Date.now()) => { timestamp = now; lastArgs = null; if (timer) { clearTimeout(timer); timer = null; } fn.apply(null, args); } const throttled = (...args) => { const now = Date.now(); const passed = now - timestamp; if ( passed >= threshold) { invoke(args, now); } else { lastArgs = args; if (!timer) { timer = setTimeout(() => { timer = null; invoke(lastArgs) }, threshold - passed); } } } const flush = () => lastArgs && invoke(lastArgs); return [throttled, flush]; } export default throttle; node_modules/axios/lib/helpers/formDataToStream.js 0000664 00000005625 15114741631 0016343 0 ustar 00 import util from 'util'; import {Readable} from 'stream'; import utils from "../utils.js"; import readBlob from "./readBlob.js"; import platform from "../platform/index.js"; const BOUNDARY_ALPHABET = platform.ALPHABET.ALPHA_DIGIT + '-_'; const textEncoder = typeof TextEncoder === 'function' ? new TextEncoder() : new util.TextEncoder(); const CRLF = '\r\n'; const CRLF_BYTES = textEncoder.encode(CRLF); const CRLF_BYTES_COUNT = 2; class FormDataPart { constructor(name, value) { const {escapeName} = this.constructor; const isStringValue = utils.isString(value); let headers = `Content-Disposition: form-data; name="${escapeName(name)}"${ !isStringValue && value.name ? `; filename="${escapeName(value.name)}"` : '' }${CRLF}`; if (isStringValue) { value = textEncoder.encode(String(value).replace(/\r?\n|\r\n?/g, CRLF)); } else { headers += `Content-Type: ${value.type || "application/octet-stream"}${CRLF}` } this.headers = textEncoder.encode(headers + CRLF); this.contentLength = isStringValue ? value.byteLength : value.size; this.size = this.headers.byteLength + this.contentLength + CRLF_BYTES_COUNT; this.name = name; this.value = value; } async *encode(){ yield this.headers; const {value} = this; if(utils.isTypedArray(value)) { yield value; } else { yield* readBlob(value); } yield CRLF_BYTES; } static escapeName(name) { return String(name).replace(/[\r\n"]/g, (match) => ({ '\r' : '%0D', '\n' : '%0A', '"' : '%22', }[match])); } } const formDataToStream = (form, headersHandler, options) => { const { tag = 'form-data-boundary', size = 25, boundary = tag + '-' + platform.generateString(size, BOUNDARY_ALPHABET) } = options || {}; if(!utils.isFormData(form)) { throw TypeError('FormData instance required'); } if (boundary.length < 1 || boundary.length > 70) { throw Error('boundary must be 10-70 characters long') } const boundaryBytes = textEncoder.encode('--' + boundary + CRLF); const footerBytes = textEncoder.encode('--' + boundary + '--' + CRLF); let contentLength = footerBytes.byteLength; const parts = Array.from(form.entries()).map(([name, value]) => { const part = new FormDataPart(name, value); contentLength += part.size; return part; }); contentLength += boundaryBytes.byteLength * parts.length; contentLength = utils.toFiniteNumber(contentLength); const computedHeaders = { 'Content-Type': `multipart/form-data; boundary=${boundary}` } if (Number.isFinite(contentLength)) { computedHeaders['Content-Length'] = contentLength; } headersHandler && headersHandler(computedHeaders); return Readable.from((async function *() { for(const part of parts) { yield boundaryBytes; yield* part.encode(); } yield footerBytes; })()); }; export default formDataToStream; node_modules/axios/lib/helpers/README.md 0000664 00000000537 15114741631 0014045 0 ustar 00 # axios // helpers The modules found in `helpers/` should be generic modules that are _not_ specific to the domain logic of axios. These modules could theoretically be published to npm on their own and consumed by other modules or apps. Some examples of generic modules are things like: - Browser polyfills - Managing cookies - Parsing HTTP headers node_modules/axios/lib/helpers/AxiosTransformStream.js 0000664 00000007140 15114741631 0017254 0 ustar 00 'use strict'; import stream from 'stream'; import utils from '../utils.js'; const kInternals = Symbol('internals'); class AxiosTransformStream extends stream.Transform{ constructor(options) { options = utils.toFlatObject(options, { maxRate: 0, chunkSize: 64 * 1024, minChunkSize: 100, timeWindow: 500, ticksRate: 2, samplesCount: 15 }, null, (prop, source) => { return !utils.isUndefined(source[prop]); }); super({ readableHighWaterMark: options.chunkSize }); const internals = this[kInternals] = { timeWindow: options.timeWindow, chunkSize: options.chunkSize, maxRate: options.maxRate, minChunkSize: options.minChunkSize, bytesSeen: 0, isCaptured: false, notifiedBytesLoaded: 0, ts: Date.now(), bytes: 0, onReadCallback: null }; this.on('newListener', event => { if (event === 'progress') { if (!internals.isCaptured) { internals.isCaptured = true; } } }); } _read(size) { const internals = this[kInternals]; if (internals.onReadCallback) { internals.onReadCallback(); } return super._read(size); } _transform(chunk, encoding, callback) { const internals = this[kInternals]; const maxRate = internals.maxRate; const readableHighWaterMark = this.readableHighWaterMark; const timeWindow = internals.timeWindow; const divider = 1000 / timeWindow; const bytesThreshold = (maxRate / divider); const minChunkSize = internals.minChunkSize !== false ? Math.max(internals.minChunkSize, bytesThreshold * 0.01) : 0; const pushChunk = (_chunk, _callback) => { const bytes = Buffer.byteLength(_chunk); internals.bytesSeen += bytes; internals.bytes += bytes; internals.isCaptured && this.emit('progress', internals.bytesSeen); if (this.push(_chunk)) { process.nextTick(_callback); } else { internals.onReadCallback = () => { internals.onReadCallback = null; process.nextTick(_callback); }; } } const transformChunk = (_chunk, _callback) => { const chunkSize = Buffer.byteLength(_chunk); let chunkRemainder = null; let maxChunkSize = readableHighWaterMark; let bytesLeft; let passed = 0; if (maxRate) { const now = Date.now(); if (!internals.ts || (passed = (now - internals.ts)) >= timeWindow) { internals.ts = now; bytesLeft = bytesThreshold - internals.bytes; internals.bytes = bytesLeft < 0 ? -bytesLeft : 0; passed = 0; } bytesLeft = bytesThreshold - internals.bytes; } if (maxRate) { if (bytesLeft <= 0) { // next time window return setTimeout(() => { _callback(null, _chunk); }, timeWindow - passed); } if (bytesLeft < maxChunkSize) { maxChunkSize = bytesLeft; } } if (maxChunkSize && chunkSize > maxChunkSize && (chunkSize - maxChunkSize) > minChunkSize) { chunkRemainder = _chunk.subarray(maxChunkSize); _chunk = _chunk.subarray(0, maxChunkSize); } pushChunk(_chunk, chunkRemainder ? () => { process.nextTick(_callback, null, chunkRemainder); } : _callback); }; transformChunk(chunk, function transformNextChunk(err, _chunk) { if (err) { return callback(err); } if (_chunk) { transformChunk(_chunk, transformNextChunk); } else { callback(null); } }); } } export default AxiosTransformStream; node_modules/axios/lib/env/data.js 0000664 00000000040 15114741631 0013150 0 ustar 00 export const VERSION = "1.10.0"; node_modules/axios/lib/env/classes/FormData.js 0000664 00000000152 15114741631 0015375 0 ustar 00 import _FormData from 'form-data'; export default typeof FormData !== 'undefined' ? FormData : _FormData; node_modules/axios/lib/env/README.md 0000664 00000000203 15114741631 0013161 0 ustar 00 # axios // env The `data.js` file is updated automatically when the package version is upgrading. Please do not edit it manually. node_modules/axios/dist/esm/axios.min.js 0000664 00000105204 15114741631 0014345 0 ustar 00 /*! Axios v1.10.0 Copyright (c) 2025 Matt Zabriskie and contributors */ function e(e,t){return function(){return e.apply(t,arguments)}}const{toString:t}=Object.prototype,{getPrototypeOf:n}=Object,{iterator:r,toStringTag:o}=Symbol,s=(i=Object.create(null),e=>{const n=t.call(e);return i[n]||(i[n]=n.slice(8,-1).toLowerCase())});var i;const a=e=>(e=e.toLowerCase(),t=>s(t)===e),c=e=>t=>typeof t===e,{isArray:l}=Array,u=c("undefined");const f=a("ArrayBuffer");const d=c("string"),p=c("function"),h=c("number"),m=e=>null!==e&&"object"==typeof e,y=e=>{if("object"!==s(e))return!1;const t=n(e);return!(null!==t&&t!==Object.prototype&&null!==Object.getPrototypeOf(t)||o in e||r in e)},b=a("Date"),g=a("File"),w=a("Blob"),E=a("FileList"),O=a("URLSearchParams"),[R,S,T,A]=["ReadableStream","Request","Response","Headers"].map(a);function v(e,t,{allOwnKeys:n=!1}={}){if(null==e)return;let r,o;if("object"!=typeof e&&(e=[e]),l(e))for(r=0,o=e.length;r<o;r++)t.call(null,e[r],r,e);else{const o=n?Object.getOwnPropertyNames(e):Object.keys(e),s=o.length;let i;for(r=0;r<s;r++)i=o[r],t.call(null,e[i],i,e)}}function x(e,t){t=t.toLowerCase();const n=Object.keys(e);let r,o=n.length;for(;o-- >0;)if(r=n[o],t===r.toLowerCase())return r;return null}const C="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:global,j=e=>!u(e)&&e!==C;const N=(U="undefined"!=typeof Uint8Array&&n(Uint8Array),e=>U&&e instanceof U);var U;const P=a("HTMLFormElement"),_=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),F=a("RegExp"),L=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};v(n,((n,o)=>{let s;!1!==(s=t(n,o,e))&&(r[o]=s||n)})),Object.defineProperties(e,r)};const B=a("AsyncFunction"),k=(D="function"==typeof setImmediate,q=p(C.postMessage),D?setImmediate:q?(I=`axios@${Math.random()}`,M=[],C.addEventListener("message",(({source:e,data:t})=>{e===C&&t===I&&M.length&&M.shift()()}),!1),e=>{M.push(e),C.postMessage(I,"*")}):e=>setTimeout(e));var D,q,I,M;const z="undefined"!=typeof queueMicrotask?queueMicrotask.bind(C):"undefined"!=typeof process&&process.nextTick||k,H={isArray:l,isArrayBuffer:f,isBuffer:function(e){return null!==e&&!u(e)&&null!==e.constructor&&!u(e.constructor)&&p(e.constructor.isBuffer)&&e.constructor.isBuffer(e)},isFormData:e=>{let t;return e&&("function"==typeof FormData&&e instanceof FormData||p(e.append)&&("formdata"===(t=s(e))||"object"===t&&p(e.toString)&&"[object FormData]"===e.toString()))},isArrayBufferView:function(e){let t;return t="undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&f(e.buffer),t},isString:d,isNumber:h,isBoolean:e=>!0===e||!1===e,isObject:m,isPlainObject:y,isReadableStream:R,isRequest:S,isResponse:T,isHeaders:A,isUndefined:u,isDate:b,isFile:g,isBlob:w,isRegExp:F,isFunction:p,isStream:e=>m(e)&&p(e.pipe),isURLSearchParams:O,isTypedArray:N,isFileList:E,forEach:v,merge:function e(){const{caseless:t}=j(this)&&this||{},n={},r=(r,o)=>{const s=t&&x(n,o)||o;y(n[s])&&y(r)?n[s]=e(n[s],r):y(r)?n[s]=e({},r):l(r)?n[s]=r.slice():n[s]=r};for(let e=0,t=arguments.length;e<t;e++)arguments[e]&&v(arguments[e],r);return n},extend:(t,n,r,{allOwnKeys:o}={})=>(v(n,((n,o)=>{r&&p(n)?t[o]=e(n,r):t[o]=n}),{allOwnKeys:o}),t),trim:e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""),stripBOM:e=>(65279===e.charCodeAt(0)&&(e=e.slice(1)),e),inherits:(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},toFlatObject:(e,t,r,o)=>{let s,i,a;const c={};if(t=t||{},null==e)return t;do{for(s=Object.getOwnPropertyNames(e),i=s.length;i-- >0;)a=s[i],o&&!o(a,e,t)||c[a]||(t[a]=e[a],c[a]=!0);e=!1!==r&&n(e)}while(e&&(!r||r(e,t))&&e!==Object.prototype);return t},kindOf:s,kindOfTest:a,endsWith:(e,t,n)=>{e=String(e),(void 0===n||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return-1!==r&&r===n},toArray:e=>{if(!e)return null;if(l(e))return e;let t=e.length;if(!h(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},forEachEntry:(e,t)=>{const n=(e&&e[r]).call(e);let o;for(;(o=n.next())&&!o.done;){const n=o.value;t.call(e,n[0],n[1])}},matchAll:(e,t)=>{let n;const r=[];for(;null!==(n=e.exec(t));)r.push(n);return r},isHTMLForm:P,hasOwnProperty:_,hasOwnProp:_,reduceDescriptors:L,freezeMethods:e=>{L(e,((t,n)=>{if(p(e)&&-1!==["arguments","caller","callee"].indexOf(n))return!1;const r=e[n];p(r)&&(t.enumerable=!1,"writable"in t?t.writable=!1:t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")}))}))},toObjectSet:(e,t)=>{const n={},r=e=>{e.forEach((e=>{n[e]=!0}))};return l(e)?r(e):r(String(e).split(t)),n},toCamelCase:e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,(function(e,t,n){return t.toUpperCase()+n})),noop:()=>{},toFiniteNumber:(e,t)=>null!=e&&Number.isFinite(e=+e)?e:t,findKey:x,global:C,isContextDefined:j,isSpecCompliantForm:function(e){return!!(e&&p(e.append)&&"FormData"===e[o]&&e[r])},toJSONObject:e=>{const t=new Array(10),n=(e,r)=>{if(m(e)){if(t.indexOf(e)>=0)return;if(!("toJSON"in e)){t[r]=e;const o=l(e)?[]:{};return v(e,((e,t)=>{const s=n(e,r+1);!u(s)&&(o[t]=s)})),t[r]=void 0,o}}return e};return n(e,0)},isAsyncFn:B,isThenable:e=>e&&(m(e)||p(e))&&p(e.then)&&p(e.catch),setImmediate:k,asap:z,isIterable:e=>null!=e&&p(e[r])};function J(e,t,n,r,o){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),o&&(this.response=o,this.status=o.status?o.status:null)}H.inherits(J,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:H.toJSONObject(this.config),code:this.code,status:this.status}}});const W=J.prototype,K={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach((e=>{K[e]={value:e}})),Object.defineProperties(J,K),Object.defineProperty(W,"isAxiosError",{value:!0}),J.from=(e,t,n,r,o,s)=>{const i=Object.create(W);return H.toFlatObject(e,i,(function(e){return e!==Error.prototype}),(e=>"isAxiosError"!==e)),J.call(i,e.message,t,n,r,o),i.cause=e,i.name=e.name,s&&Object.assign(i,s),i};function V(e){return H.isPlainObject(e)||H.isArray(e)}function $(e){return H.endsWith(e,"[]")?e.slice(0,-2):e}function X(e,t,n){return e?e.concat(t).map((function(e,t){return e=$(e),!n&&t?"["+e+"]":e})).join(n?".":""):t}const G=H.toFlatObject(H,{},null,(function(e){return/^is[A-Z]/.test(e)}));function Q(e,t,n){if(!H.isObject(e))throw new TypeError("target must be an object");t=t||new FormData;const r=(n=H.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,(function(e,t){return!H.isUndefined(t[e])}))).metaTokens,o=n.visitor||l,s=n.dots,i=n.indexes,a=(n.Blob||"undefined"!=typeof Blob&&Blob)&&H.isSpecCompliantForm(t);if(!H.isFunction(o))throw new TypeError("visitor must be a function");function c(e){if(null===e)return"";if(H.isDate(e))return e.toISOString();if(H.isBoolean(e))return e.toString();if(!a&&H.isBlob(e))throw new J("Blob is not supported. Use a Buffer instead.");return H.isArrayBuffer(e)||H.isTypedArray(e)?a&&"function"==typeof Blob?new Blob([e]):Buffer.from(e):e}function l(e,n,o){let a=e;if(e&&!o&&"object"==typeof e)if(H.endsWith(n,"{}"))n=r?n:n.slice(0,-2),e=JSON.stringify(e);else if(H.isArray(e)&&function(e){return H.isArray(e)&&!e.some(V)}(e)||(H.isFileList(e)||H.endsWith(n,"[]"))&&(a=H.toArray(e)))return n=$(n),a.forEach((function(e,r){!H.isUndefined(e)&&null!==e&&t.append(!0===i?X([n],r,s):null===i?n:n+"[]",c(e))})),!1;return!!V(e)||(t.append(X(o,n,s),c(e)),!1)}const u=[],f=Object.assign(G,{defaultVisitor:l,convertValue:c,isVisitable:V});if(!H.isObject(e))throw new TypeError("data must be an object");return function e(n,r){if(!H.isUndefined(n)){if(-1!==u.indexOf(n))throw Error("Circular reference detected in "+r.join("."));u.push(n),H.forEach(n,(function(n,s){!0===(!(H.isUndefined(n)||null===n)&&o.call(t,n,H.isString(s)?s.trim():s,r,f))&&e(n,r?r.concat(s):[s])})),u.pop()}}(e),t}function Z(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,(function(e){return t[e]}))}function Y(e,t){this._pairs=[],e&&Q(e,this,t)}const ee=Y.prototype;function te(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function ne(e,t,n){if(!t)return e;const r=n&&n.encode||te;H.isFunction(n)&&(n={serialize:n});const o=n&&n.serialize;let s;if(s=o?o(t,n):H.isURLSearchParams(t)?t.toString():new Y(t,n).toString(r),s){const t=e.indexOf("#");-1!==t&&(e=e.slice(0,t)),e+=(-1===e.indexOf("?")?"?":"&")+s}return e}ee.append=function(e,t){this._pairs.push([e,t])},ee.toString=function(e){const t=e?function(t){return e.call(this,t,Z)}:Z;return this._pairs.map((function(e){return t(e[0])+"="+t(e[1])}),"").join("&")};const re=class{constructor(){this.handlers=[]}use(e,t,n){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!n&&n.synchronous,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){H.forEach(this.handlers,(function(t){null!==t&&e(t)}))}},oe={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},se={isBrowser:!0,classes:{URLSearchParams:"undefined"!=typeof URLSearchParams?URLSearchParams:Y,FormData:"undefined"!=typeof FormData?FormData:null,Blob:"undefined"!=typeof Blob?Blob:null},protocols:["http","https","file","blob","url","data"]},ie="undefined"!=typeof window&&"undefined"!=typeof document,ae="object"==typeof navigator&&navigator||void 0,ce=ie&&(!ae||["ReactNative","NativeScript","NS"].indexOf(ae.product)<0),le="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"==typeof self.importScripts,ue=ie&&window.location.href||"http://localhost",fe={...Object.freeze({__proto__:null,hasBrowserEnv:ie,hasStandardBrowserWebWorkerEnv:le,hasStandardBrowserEnv:ce,navigator:ae,origin:ue}),...se};function de(e){function t(e,n,r,o){let s=e[o++];if("__proto__"===s)return!0;const i=Number.isFinite(+s),a=o>=e.length;if(s=!s&&H.isArray(r)?r.length:s,a)return H.hasOwnProp(r,s)?r[s]=[r[s],n]:r[s]=n,!i;r[s]&&H.isObject(r[s])||(r[s]=[]);return t(e,n,r[s],o)&&H.isArray(r[s])&&(r[s]=function(e){const t={},n=Object.keys(e);let r;const o=n.length;let s;for(r=0;r<o;r++)s=n[r],t[s]=e[s];return t}(r[s])),!i}if(H.isFormData(e)&&H.isFunction(e.entries)){const n={};return H.forEachEntry(e,((e,r)=>{t(function(e){return H.matchAll(/\w+|\[(\w*)]/g,e).map((e=>"[]"===e[0]?"":e[1]||e[0]))}(e),r,n,0)})),n}return null}const pe={transitional:oe,adapter:["xhr","http","fetch"],transformRequest:[function(e,t){const n=t.getContentType()||"",r=n.indexOf("application/json")>-1,o=H.isObject(e);o&&H.isHTMLForm(e)&&(e=new FormData(e));if(H.isFormData(e))return r?JSON.stringify(de(e)):e;if(H.isArrayBuffer(e)||H.isBuffer(e)||H.isStream(e)||H.isFile(e)||H.isBlob(e)||H.isReadableStream(e))return e;if(H.isArrayBufferView(e))return e.buffer;if(H.isURLSearchParams(e))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let s;if(o){if(n.indexOf("application/x-www-form-urlencoded")>-1)return function(e,t){return Q(e,new fe.classes.URLSearchParams,Object.assign({visitor:function(e,t,n,r){return fe.isNode&&H.isBuffer(e)?(this.append(t,e.toString("base64")),!1):r.defaultVisitor.apply(this,arguments)}},t))}(e,this.formSerializer).toString();if((s=H.isFileList(e))||n.indexOf("multipart/form-data")>-1){const t=this.env&&this.env.FormData;return Q(s?{"files[]":e}:e,t&&new t,this.formSerializer)}}return o||r?(t.setContentType("application/json",!1),function(e,t,n){if(H.isString(e))try{return(t||JSON.parse)(e),H.trim(e)}catch(e){if("SyntaxError"!==e.name)throw e}return(n||JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){const t=this.transitional||pe.transitional,n=t&&t.forcedJSONParsing,r="json"===this.responseType;if(H.isResponse(e)||H.isReadableStream(e))return e;if(e&&H.isString(e)&&(n&&!this.responseType||r)){const n=!(t&&t.silentJSONParsing)&&r;try{return JSON.parse(e)}catch(e){if(n){if("SyntaxError"===e.name)throw J.from(e,J.ERR_BAD_RESPONSE,this,null,this.response);throw e}}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:fe.classes.FormData,Blob:fe.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};H.forEach(["delete","get","head","post","put","patch"],(e=>{pe.headers[e]={}}));const he=pe,me=H.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),ye=Symbol("internals");function be(e){return e&&String(e).trim().toLowerCase()}function ge(e){return!1===e||null==e?e:H.isArray(e)?e.map(ge):String(e)}function we(e,t,n,r,o){return H.isFunction(r)?r.call(this,t,n):(o&&(t=n),H.isString(t)?H.isString(r)?-1!==t.indexOf(r):H.isRegExp(r)?r.test(t):void 0:void 0)}class Ee{constructor(e){e&&this.set(e)}set(e,t,n){const r=this;function o(e,t,n){const o=be(t);if(!o)throw new Error("header name must be a non-empty string");const s=H.findKey(r,o);(!s||void 0===r[s]||!0===n||void 0===n&&!1!==r[s])&&(r[s||t]=ge(e))}const s=(e,t)=>H.forEach(e,((e,n)=>o(e,n,t)));if(H.isPlainObject(e)||e instanceof this.constructor)s(e,t);else if(H.isString(e)&&(e=e.trim())&&!/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim()))s((e=>{const t={};let n,r,o;return e&&e.split("\n").forEach((function(e){o=e.indexOf(":"),n=e.substring(0,o).trim().toLowerCase(),r=e.substring(o+1).trim(),!n||t[n]&&me[n]||("set-cookie"===n?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)})),t})(e),t);else if(H.isObject(e)&&H.isIterable(e)){let n,r,o={};for(const t of e){if(!H.isArray(t))throw TypeError("Object iterator must return a key-value pair");o[r=t[0]]=(n=o[r])?H.isArray(n)?[...n,t[1]]:[n,t[1]]:t[1]}s(o,t)}else null!=e&&o(t,e,n);return this}get(e,t){if(e=be(e)){const n=H.findKey(this,e);if(n){const e=this[n];if(!t)return e;if(!0===t)return function(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}(e);if(H.isFunction(t))return t.call(this,e,n);if(H.isRegExp(t))return t.exec(e);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,t){if(e=be(e)){const n=H.findKey(this,e);return!(!n||void 0===this[n]||t&&!we(0,this[n],n,t))}return!1}delete(e,t){const n=this;let r=!1;function o(e){if(e=be(e)){const o=H.findKey(n,e);!o||t&&!we(0,n[o],o,t)||(delete n[o],r=!0)}}return H.isArray(e)?e.forEach(o):o(e),r}clear(e){const t=Object.keys(this);let n=t.length,r=!1;for(;n--;){const o=t[n];e&&!we(0,this[o],o,e,!0)||(delete this[o],r=!0)}return r}normalize(e){const t=this,n={};return H.forEach(this,((r,o)=>{const s=H.findKey(n,o);if(s)return t[s]=ge(r),void delete t[o];const i=e?function(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,((e,t,n)=>t.toUpperCase()+n))}(o):String(o).trim();i!==o&&delete t[o],t[i]=ge(r),n[i]=!0})),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const t=Object.create(null);return H.forEach(this,((n,r)=>{null!=n&&!1!==n&&(t[r]=e&&H.isArray(n)?n.join(", "):n)})),t}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map((([e,t])=>e+": "+t)).join("\n")}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...t){const n=new this(e);return t.forEach((e=>n.set(e))),n}static accessor(e){const t=(this[ye]=this[ye]={accessors:{}}).accessors,n=this.prototype;function r(e){const r=be(e);t[r]||(!function(e,t){const n=H.toCamelCase(" "+t);["get","set","has"].forEach((r=>{Object.defineProperty(e,r+n,{value:function(e,n,o){return this[r].call(this,t,e,n,o)},configurable:!0})}))}(n,e),t[r]=!0)}return H.isArray(e)?e.forEach(r):r(e),this}}Ee.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),H.reduceDescriptors(Ee.prototype,(({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(e){this[n]=e}}})),H.freezeMethods(Ee);const Oe=Ee;function Re(e,t){const n=this||he,r=t||n,o=Oe.from(r.headers);let s=r.data;return H.forEach(e,(function(e){s=e.call(n,s,o.normalize(),t?t.status:void 0)})),o.normalize(),s}function Se(e){return!(!e||!e.__CANCEL__)}function Te(e,t,n){J.call(this,null==e?"canceled":e,J.ERR_CANCELED,t,n),this.name="CanceledError"}function Ae(e,t,n){const r=n.config.validateStatus;n.status&&r&&!r(n.status)?t(new J("Request failed with status code "+n.status,[J.ERR_BAD_REQUEST,J.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n)):e(n)}H.inherits(Te,J,{__CANCEL__:!0});const ve=(e,t,n=3)=>{let r=0;const o=function(e,t){e=e||10;const n=new Array(e),r=new Array(e);let o,s=0,i=0;return t=void 0!==t?t:1e3,function(a){const c=Date.now(),l=r[i];o||(o=c),n[s]=a,r[s]=c;let u=i,f=0;for(;u!==s;)f+=n[u++],u%=e;if(s=(s+1)%e,s===i&&(i=(i+1)%e),c-o<t)return;const d=l&&c-l;return d?Math.round(1e3*f/d):void 0}}(50,250);return function(e,t){let n,r,o=0,s=1e3/t;const i=(t,s=Date.now())=>{o=s,n=null,r&&(clearTimeout(r),r=null),e.apply(null,t)};return[(...e)=>{const t=Date.now(),a=t-o;a>=s?i(e,t):(n=e,r||(r=setTimeout((()=>{r=null,i(n)}),s-a)))},()=>n&&i(n)]}((n=>{const s=n.loaded,i=n.lengthComputable?n.total:void 0,a=s-r,c=o(a);r=s;e({loaded:s,total:i,progress:i?s/i:void 0,bytes:a,rate:c||void 0,estimated:c&&i&&s<=i?(i-s)/c:void 0,event:n,lengthComputable:null!=i,[t?"download":"upload"]:!0})}),n)},xe=(e,t)=>{const n=null!=e;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},Ce=e=>(...t)=>H.asap((()=>e(...t))),je=fe.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,fe.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(fe.origin),fe.navigator&&/(msie|trident)/i.test(fe.navigator.userAgent)):()=>!0,Ne=fe.hasStandardBrowserEnv?{write(e,t,n,r,o,s){const i=[e+"="+encodeURIComponent(t)];H.isNumber(n)&&i.push("expires="+new Date(n).toGMTString()),H.isString(r)&&i.push("path="+r),H.isString(o)&&i.push("domain="+o),!0===s&&i.push("secure"),document.cookie=i.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read:()=>null,remove(){}};function Ue(e,t,n){let r=!/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t);return e&&(r||0==n)?function(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}(e,t):t}const Pe=e=>e instanceof Oe?{...e}:e;function _e(e,t){t=t||{};const n={};function r(e,t,n,r){return H.isPlainObject(e)&&H.isPlainObject(t)?H.merge.call({caseless:r},e,t):H.isPlainObject(t)?H.merge({},t):H.isArray(t)?t.slice():t}function o(e,t,n,o){return H.isUndefined(t)?H.isUndefined(e)?void 0:r(void 0,e,0,o):r(e,t,0,o)}function s(e,t){if(!H.isUndefined(t))return r(void 0,t)}function i(e,t){return H.isUndefined(t)?H.isUndefined(e)?void 0:r(void 0,e):r(void 0,t)}function a(n,o,s){return s in t?r(n,o):s in e?r(void 0,n):void 0}const c={url:s,method:s,data:s,baseURL:i,transformRequest:i,transformResponse:i,paramsSerializer:i,timeout:i,timeoutMessage:i,withCredentials:i,withXSRFToken:i,adapter:i,responseType:i,xsrfCookieName:i,xsrfHeaderName:i,onUploadProgress:i,onDownloadProgress:i,decompress:i,maxContentLength:i,maxBodyLength:i,beforeRedirect:i,transport:i,httpAgent:i,httpsAgent:i,cancelToken:i,socketPath:i,responseEncoding:i,validateStatus:a,headers:(e,t,n)=>o(Pe(e),Pe(t),0,!0)};return H.forEach(Object.keys(Object.assign({},e,t)),(function(r){const s=c[r]||o,i=s(e[r],t[r],r);H.isUndefined(i)&&s!==a||(n[r]=i)})),n}const Fe=e=>{const t=_e({},e);let n,{data:r,withXSRFToken:o,xsrfHeaderName:s,xsrfCookieName:i,headers:a,auth:c}=t;if(t.headers=a=Oe.from(a),t.url=ne(Ue(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),c&&a.set("Authorization","Basic "+btoa((c.username||"")+":"+(c.password?unescape(encodeURIComponent(c.password)):""))),H.isFormData(r))if(fe.hasStandardBrowserEnv||fe.hasStandardBrowserWebWorkerEnv)a.setContentType(void 0);else if(!1!==(n=a.getContentType())){const[e,...t]=n?n.split(";").map((e=>e.trim())).filter(Boolean):[];a.setContentType([e||"multipart/form-data",...t].join("; "))}if(fe.hasStandardBrowserEnv&&(o&&H.isFunction(o)&&(o=o(t)),o||!1!==o&&je(t.url))){const e=s&&i&&Ne.read(i);e&&a.set(s,e)}return t},Le="undefined"!=typeof XMLHttpRequest&&function(e){return new Promise((function(t,n){const r=Fe(e);let o=r.data;const s=Oe.from(r.headers).normalize();let i,a,c,l,u,{responseType:f,onUploadProgress:d,onDownloadProgress:p}=r;function h(){l&&l(),u&&u(),r.cancelToken&&r.cancelToken.unsubscribe(i),r.signal&&r.signal.removeEventListener("abort",i)}let m=new XMLHttpRequest;function y(){if(!m)return;const r=Oe.from("getAllResponseHeaders"in m&&m.getAllResponseHeaders());Ae((function(e){t(e),h()}),(function(e){n(e),h()}),{data:f&&"text"!==f&&"json"!==f?m.response:m.responseText,status:m.status,statusText:m.statusText,headers:r,config:e,request:m}),m=null}m.open(r.method.toUpperCase(),r.url,!0),m.timeout=r.timeout,"onloadend"in m?m.onloadend=y:m.onreadystatechange=function(){m&&4===m.readyState&&(0!==m.status||m.responseURL&&0===m.responseURL.indexOf("file:"))&&setTimeout(y)},m.onabort=function(){m&&(n(new J("Request aborted",J.ECONNABORTED,e,m)),m=null)},m.onerror=function(){n(new J("Network Error",J.ERR_NETWORK,e,m)),m=null},m.ontimeout=function(){let t=r.timeout?"timeout of "+r.timeout+"ms exceeded":"timeout exceeded";const o=r.transitional||oe;r.timeoutErrorMessage&&(t=r.timeoutErrorMessage),n(new J(t,o.clarifyTimeoutError?J.ETIMEDOUT:J.ECONNABORTED,e,m)),m=null},void 0===o&&s.setContentType(null),"setRequestHeader"in m&&H.forEach(s.toJSON(),(function(e,t){m.setRequestHeader(t,e)})),H.isUndefined(r.withCredentials)||(m.withCredentials=!!r.withCredentials),f&&"json"!==f&&(m.responseType=r.responseType),p&&([c,u]=ve(p,!0),m.addEventListener("progress",c)),d&&m.upload&&([a,l]=ve(d),m.upload.addEventListener("progress",a),m.upload.addEventListener("loadend",l)),(r.cancelToken||r.signal)&&(i=t=>{m&&(n(!t||t.type?new Te(null,e,m):t),m.abort(),m=null)},r.cancelToken&&r.cancelToken.subscribe(i),r.signal&&(r.signal.aborted?i():r.signal.addEventListener("abort",i)));const b=function(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}(r.url);b&&-1===fe.protocols.indexOf(b)?n(new J("Unsupported protocol "+b+":",J.ERR_BAD_REQUEST,e)):m.send(o||null)}))},Be=(e,t)=>{const{length:n}=e=e?e.filter(Boolean):[];if(t||n){let n,r=new AbortController;const o=function(e){if(!n){n=!0,i();const t=e instanceof Error?e:this.reason;r.abort(t instanceof J?t:new Te(t instanceof Error?t.message:t))}};let s=t&&setTimeout((()=>{s=null,o(new J(`timeout ${t} of ms exceeded`,J.ETIMEDOUT))}),t);const i=()=>{e&&(s&&clearTimeout(s),s=null,e.forEach((e=>{e.unsubscribe?e.unsubscribe(o):e.removeEventListener("abort",o)})),e=null)};e.forEach((e=>e.addEventListener("abort",o)));const{signal:a}=r;return a.unsubscribe=()=>H.asap(i),a}},ke=function*(e,t){let n=e.byteLength;if(!t||n<t)return void(yield e);let r,o=0;for(;o<n;)r=o+t,yield e.slice(o,r),o=r},De=async function*(e){if(e[Symbol.asyncIterator])return void(yield*e);const t=e.getReader();try{for(;;){const{done:e,value:n}=await t.read();if(e)break;yield n}}finally{await t.cancel()}},qe=(e,t,n,r)=>{const o=async function*(e,t){for await(const n of De(e))yield*ke(n,t)}(e,t);let s,i=0,a=e=>{s||(s=!0,r&&r(e))};return new ReadableStream({async pull(e){try{const{done:t,value:r}=await o.next();if(t)return a(),void e.close();let s=r.byteLength;if(n){let e=i+=s;n(e)}e.enqueue(new Uint8Array(r))}catch(e){throw a(e),e}},cancel:e=>(a(e),o.return())},{highWaterMark:2})},Ie="function"==typeof fetch&&"function"==typeof Request&&"function"==typeof Response,Me=Ie&&"function"==typeof ReadableStream,ze=Ie&&("function"==typeof TextEncoder?(He=new TextEncoder,e=>He.encode(e)):async e=>new Uint8Array(await new Response(e).arrayBuffer()));var He;const Je=(e,...t)=>{try{return!!e(...t)}catch(e){return!1}},We=Me&&Je((()=>{let e=!1;const t=new Request(fe.origin,{body:new ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t})),Ke=Me&&Je((()=>H.isReadableStream(new Response("").body))),Ve={stream:Ke&&(e=>e.body)};var $e;Ie&&($e=new Response,["text","arrayBuffer","blob","formData","stream"].forEach((e=>{!Ve[e]&&(Ve[e]=H.isFunction($e[e])?t=>t[e]():(t,n)=>{throw new J(`Response type '${e}' is not supported`,J.ERR_NOT_SUPPORT,n)})})));const Xe=async(e,t)=>{const n=H.toFiniteNumber(e.getContentLength());return null==n?(async e=>{if(null==e)return 0;if(H.isBlob(e))return e.size;if(H.isSpecCompliantForm(e)){const t=new Request(fe.origin,{method:"POST",body:e});return(await t.arrayBuffer()).byteLength}return H.isArrayBufferView(e)||H.isArrayBuffer(e)?e.byteLength:(H.isURLSearchParams(e)&&(e+=""),H.isString(e)?(await ze(e)).byteLength:void 0)})(t):n},Ge={http:null,xhr:Le,fetch:Ie&&(async e=>{let{url:t,method:n,data:r,signal:o,cancelToken:s,timeout:i,onDownloadProgress:a,onUploadProgress:c,responseType:l,headers:u,withCredentials:f="same-origin",fetchOptions:d}=Fe(e);l=l?(l+"").toLowerCase():"text";let p,h=Be([o,s&&s.toAbortSignal()],i);const m=h&&h.unsubscribe&&(()=>{h.unsubscribe()});let y;try{if(c&&We&&"get"!==n&&"head"!==n&&0!==(y=await Xe(u,r))){let e,n=new Request(t,{method:"POST",body:r,duplex:"half"});if(H.isFormData(r)&&(e=n.headers.get("content-type"))&&u.setContentType(e),n.body){const[e,t]=xe(y,ve(Ce(c)));r=qe(n.body,65536,e,t)}}H.isString(f)||(f=f?"include":"omit");const o="credentials"in Request.prototype;p=new Request(t,{...d,signal:h,method:n.toUpperCase(),headers:u.normalize().toJSON(),body:r,duplex:"half",credentials:o?f:void 0});let s=await fetch(p,d);const i=Ke&&("stream"===l||"response"===l);if(Ke&&(a||i&&m)){const e={};["status","statusText","headers"].forEach((t=>{e[t]=s[t]}));const t=H.toFiniteNumber(s.headers.get("content-length")),[n,r]=a&&xe(t,ve(Ce(a),!0))||[];s=new Response(qe(s.body,65536,n,(()=>{r&&r(),m&&m()})),e)}l=l||"text";let b=await Ve[H.findKey(Ve,l)||"text"](s,e);return!i&&m&&m(),await new Promise(((t,n)=>{Ae(t,n,{data:b,headers:Oe.from(s.headers),status:s.status,statusText:s.statusText,config:e,request:p})}))}catch(t){if(m&&m(),t&&"TypeError"===t.name&&/Load failed|fetch/i.test(t.message))throw Object.assign(new J("Network Error",J.ERR_NETWORK,e,p),{cause:t.cause||t});throw J.from(t,t&&t.code,e,p)}})};H.forEach(Ge,((e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch(e){}Object.defineProperty(e,"adapterName",{value:t})}}));const Qe=e=>`- ${e}`,Ze=e=>H.isFunction(e)||null===e||!1===e,Ye=e=>{e=H.isArray(e)?e:[e];const{length:t}=e;let n,r;const o={};for(let s=0;s<t;s++){let t;if(n=e[s],r=n,!Ze(n)&&(r=Ge[(t=String(n)).toLowerCase()],void 0===r))throw new J(`Unknown adapter '${t}'`);if(r)break;o[t||"#"+s]=r}if(!r){const e=Object.entries(o).map((([e,t])=>`adapter ${e} `+(!1===t?"is not supported by the environment":"is not available in the build")));throw new J("There is no suitable adapter to dispatch the request "+(t?e.length>1?"since :\n"+e.map(Qe).join("\n"):" "+Qe(e[0]):"as no adapter specified"),"ERR_NOT_SUPPORT")}return r};function et(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Te(null,e)}function tt(e){et(e),e.headers=Oe.from(e.headers),e.data=Re.call(e,e.transformRequest),-1!==["post","put","patch"].indexOf(e.method)&&e.headers.setContentType("application/x-www-form-urlencoded",!1);return Ye(e.adapter||he.adapter)(e).then((function(t){return et(e),t.data=Re.call(e,e.transformResponse,t),t.headers=Oe.from(t.headers),t}),(function(t){return Se(t)||(et(e),t&&t.response&&(t.response.data=Re.call(e,e.transformResponse,t.response),t.response.headers=Oe.from(t.response.headers))),Promise.reject(t)}))}const nt={};["object","boolean","number","function","string","symbol"].forEach(((e,t)=>{nt[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}}));const rt={};nt.transitional=function(e,t,n){function r(e,t){return"[Axios v1.10.0] Transitional option '"+e+"'"+t+(n?". "+n:"")}return(n,o,s)=>{if(!1===e)throw new J(r(o," has been removed"+(t?" in "+t:"")),J.ERR_DEPRECATED);return t&&!rt[o]&&(rt[o]=!0,console.warn(r(o," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(n,o,s)}},nt.spelling=function(e){return(t,n)=>(console.warn(`${n} is likely a misspelling of ${e}`),!0)};const ot={assertOptions:function(e,t,n){if("object"!=typeof e)throw new J("options must be an object",J.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let o=r.length;for(;o-- >0;){const s=r[o],i=t[s];if(i){const t=e[s],n=void 0===t||i(t,s,e);if(!0!==n)throw new J("option "+s+" must be "+n,J.ERR_BAD_OPTION_VALUE)}else if(!0!==n)throw new J("Unknown option "+s,J.ERR_BAD_OPTION)}},validators:nt},st=ot.validators;class it{constructor(e){this.defaults=e||{},this.interceptors={request:new re,response:new re}}async request(e,t){try{return await this._request(e,t)}catch(e){if(e instanceof Error){let t={};Error.captureStackTrace?Error.captureStackTrace(t):t=new Error;const n=t.stack?t.stack.replace(/^.+\n/,""):"";try{e.stack?n&&!String(e.stack).endsWith(n.replace(/^.+\n.+\n/,""))&&(e.stack+="\n"+n):e.stack=n}catch(e){}}throw e}}_request(e,t){"string"==typeof e?(t=t||{}).url=e:t=e||{},t=_e(this.defaults,t);const{transitional:n,paramsSerializer:r,headers:o}=t;void 0!==n&&ot.assertOptions(n,{silentJSONParsing:st.transitional(st.boolean),forcedJSONParsing:st.transitional(st.boolean),clarifyTimeoutError:st.transitional(st.boolean)},!1),null!=r&&(H.isFunction(r)?t.paramsSerializer={serialize:r}:ot.assertOptions(r,{encode:st.function,serialize:st.function},!0)),void 0!==t.allowAbsoluteUrls||(void 0!==this.defaults.allowAbsoluteUrls?t.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:t.allowAbsoluteUrls=!0),ot.assertOptions(t,{baseUrl:st.spelling("baseURL"),withXsrfToken:st.spelling("withXSRFToken")},!0),t.method=(t.method||this.defaults.method||"get").toLowerCase();let s=o&&H.merge(o.common,o[t.method]);o&&H.forEach(["delete","get","head","post","put","patch","common"],(e=>{delete o[e]})),t.headers=Oe.concat(s,o);const i=[];let a=!0;this.interceptors.request.forEach((function(e){"function"==typeof e.runWhen&&!1===e.runWhen(t)||(a=a&&e.synchronous,i.unshift(e.fulfilled,e.rejected))}));const c=[];let l;this.interceptors.response.forEach((function(e){c.push(e.fulfilled,e.rejected)}));let u,f=0;if(!a){const e=[tt.bind(this),void 0];for(e.unshift.apply(e,i),e.push.apply(e,c),u=e.length,l=Promise.resolve(t);f<u;)l=l.then(e[f++],e[f++]);return l}u=i.length;let d=t;for(f=0;f<u;){const e=i[f++],t=i[f++];try{d=e(d)}catch(e){t.call(this,e);break}}try{l=tt.call(this,d)}catch(e){return Promise.reject(e)}for(f=0,u=c.length;f<u;)l=l.then(c[f++],c[f++]);return l}getUri(e){return ne(Ue((e=_e(this.defaults,e)).baseURL,e.url,e.allowAbsoluteUrls),e.params,e.paramsSerializer)}}H.forEach(["delete","get","head","options"],(function(e){it.prototype[e]=function(t,n){return this.request(_e(n||{},{method:e,url:t,data:(n||{}).data}))}})),H.forEach(["post","put","patch"],(function(e){function t(t){return function(n,r,o){return this.request(_e(o||{},{method:e,headers:t?{"Content-Type":"multipart/form-data"}:{},url:n,data:r}))}}it.prototype[e]=t(),it.prototype[e+"Form"]=t(!0)}));const at=it;class ct{constructor(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");let t;this.promise=new Promise((function(e){t=e}));const n=this;this.promise.then((e=>{if(!n._listeners)return;let t=n._listeners.length;for(;t-- >0;)n._listeners[t](e);n._listeners=null})),this.promise.then=e=>{let t;const r=new Promise((e=>{n.subscribe(e),t=e})).then(e);return r.cancel=function(){n.unsubscribe(t)},r},e((function(e,r,o){n.reason||(n.reason=new Te(e,r,o),t(n.reason))}))}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){this.reason?e(this.reason):this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const t=this._listeners.indexOf(e);-1!==t&&this._listeners.splice(t,1)}toAbortSignal(){const e=new AbortController,t=t=>{e.abort(t)};return this.subscribe(t),e.signal.unsubscribe=()=>this.unsubscribe(t),e.signal}static source(){let e;return{token:new ct((function(t){e=t})),cancel:e}}}const lt=ct;const ut={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(ut).forEach((([e,t])=>{ut[t]=e}));const ft=ut;const dt=function t(n){const r=new at(n),o=e(at.prototype.request,r);return H.extend(o,at.prototype,r,{allOwnKeys:!0}),H.extend(o,r,null,{allOwnKeys:!0}),o.create=function(e){return t(_e(n,e))},o}(he);dt.Axios=at,dt.CanceledError=Te,dt.CancelToken=lt,dt.isCancel=Se,dt.VERSION="1.10.0",dt.toFormData=Q,dt.AxiosError=J,dt.Cancel=dt.CanceledError,dt.all=function(e){return Promise.all(e)},dt.spread=function(e){return function(t){return e.apply(null,t)}},dt.isAxiosError=function(e){return H.isObject(e)&&!0===e.isAxiosError},dt.mergeConfig=_e,dt.AxiosHeaders=Oe,dt.formToJSON=e=>de(H.isHTMLForm(e)?new FormData(e):e),dt.getAdapter=Ye,dt.HttpStatusCode=ft,dt.default=dt;const pt=dt,{Axios:ht,AxiosError:mt,CanceledError:yt,isCancel:bt,CancelToken:gt,VERSION:wt,all:Et,Cancel:Ot,isAxiosError:Rt,spread:St,toFormData:Tt,AxiosHeaders:At,HttpStatusCode:vt,formToJSON:xt,getAdapter:Ct,mergeConfig:jt}=pt;export{ht as Axios,mt as AxiosError,At as AxiosHeaders,Ot as Cancel,gt as CancelToken,yt as CanceledError,vt as HttpStatusCode,wt as VERSION,Et as all,pt as default,xt as formToJSON,Ct as getAdapter,Rt as isAxiosError,bt as isCancel,jt as mergeConfig,St as spread,Tt as toFormData}; //# sourceMappingURL=axios.min.js.map node_modules/axios/dist/esm/axios.min.js.map 0000664 00000476430 15114741631 0015135 0 ustar 00 {"version":3,"file":"axios.min.js","sources":["../../lib/helpers/bind.js","../../lib/utils.js","../../lib/core/AxiosError.js","../../lib/helpers/toFormData.js","../../lib/helpers/AxiosURLSearchParams.js","../../lib/helpers/buildURL.js","../../lib/core/InterceptorManager.js","../../lib/defaults/transitional.js","../../lib/platform/browser/index.js","../../lib/platform/browser/classes/URLSearchParams.js","../../lib/platform/browser/classes/FormData.js","../../lib/platform/browser/classes/Blob.js","../../lib/platform/common/utils.js","../../lib/platform/index.js","../../lib/helpers/formDataToJSON.js","../../lib/defaults/index.js","../../lib/helpers/toURLEncodedForm.js","../../lib/helpers/parseHeaders.js","../../lib/core/AxiosHeaders.js","../../lib/core/transformData.js","../../lib/cancel/isCancel.js","../../lib/cancel/CanceledError.js","../../lib/core/settle.js","../../lib/helpers/progressEventReducer.js","../../lib/helpers/speedometer.js","../../lib/helpers/throttle.js","../../lib/helpers/isURLSameOrigin.js","../../lib/helpers/cookies.js","../../lib/core/buildFullPath.js","../../lib/helpers/isAbsoluteURL.js","../../lib/helpers/combineURLs.js","../../lib/core/mergeConfig.js","../../lib/helpers/resolveConfig.js","../../lib/adapters/xhr.js","../../lib/helpers/parseProtocol.js","../../lib/helpers/composeSignals.js","../../lib/helpers/trackStream.js","../../lib/adapters/fetch.js","../../lib/adapters/adapters.js","../../lib/helpers/null.js","../../lib/core/dispatchRequest.js","../../lib/env/data.js","../../lib/helpers/validator.js","../../lib/core/Axios.js","../../lib/cancel/CancelToken.js","../../lib/helpers/HttpStatusCode.js","../../lib/axios.js","../../lib/helpers/spread.js","../../lib/helpers/isAxiosError.js","../../index.js"],"sourcesContent":["'use strict';\n\nexport default function bind(fn, thisArg) {\n return function wrap() {\n return fn.apply(thisArg, arguments);\n };\n}\n","'use strict';\n\nimport bind from './helpers/bind.js';\n\n// utils is a library of generic helper functions non-specific to axios\n\nconst {toString} = Object.prototype;\nconst {getPrototypeOf} = Object;\nconst {iterator, toStringTag} = Symbol;\n\nconst kindOf = (cache => thing => {\n const str = toString.call(thing);\n return cache[str] || (cache[str] = str.slice(8, -1).toLowerCase());\n})(Object.create(null));\n\nconst kindOfTest = (type) => {\n type = type.toLowerCase();\n return (thing) => kindOf(thing) === type\n}\n\nconst typeOfTest = type => thing => typeof thing === type;\n\n/**\n * Determine if a value is an Array\n *\n * @param {Object} val The value to test\n *\n * @returns {boolean} True if value is an Array, otherwise false\n */\nconst {isArray} = Array;\n\n/**\n * Determine if a value is undefined\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if the value is undefined, otherwise false\n */\nconst isUndefined = typeOfTest('undefined');\n\n/**\n * Determine if a value is a Buffer\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a Buffer, otherwise false\n */\nfunction isBuffer(val) {\n return val !== null && !isUndefined(val) && val.constructor !== null && !isUndefined(val.constructor)\n && isFunction(val.constructor.isBuffer) && val.constructor.isBuffer(val);\n}\n\n/**\n * Determine if a value is an ArrayBuffer\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is an ArrayBuffer, otherwise false\n */\nconst isArrayBuffer = kindOfTest('ArrayBuffer');\n\n\n/**\n * Determine if a value is a view on an ArrayBuffer\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a view on an ArrayBuffer, otherwise false\n */\nfunction isArrayBufferView(val) {\n let result;\n if ((typeof ArrayBuffer !== 'undefined') && (ArrayBuffer.isView)) {\n result = ArrayBuffer.isView(val);\n } else {\n result = (val) && (val.buffer) && (isArrayBuffer(val.buffer));\n }\n return result;\n}\n\n/**\n * Determine if a value is a String\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a String, otherwise false\n */\nconst isString = typeOfTest('string');\n\n/**\n * Determine if a value is a Function\n *\n * @param {*} val The value to test\n * @returns {boolean} True if value is a Function, otherwise false\n */\nconst isFunction = typeOfTest('function');\n\n/**\n * Determine if a value is a Number\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a Number, otherwise false\n */\nconst isNumber = typeOfTest('number');\n\n/**\n * Determine if a value is an Object\n *\n * @param {*} thing The value to test\n *\n * @returns {boolean} True if value is an Object, otherwise false\n */\nconst isObject = (thing) => thing !== null && typeof thing === 'object';\n\n/**\n * Determine if a value is a Boolean\n *\n * @param {*} thing The value to test\n * @returns {boolean} True if value is a Boolean, otherwise false\n */\nconst isBoolean = thing => thing === true || thing === false;\n\n/**\n * Determine if a value is a plain Object\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a plain Object, otherwise false\n */\nconst isPlainObject = (val) => {\n if (kindOf(val) !== 'object') {\n return false;\n }\n\n const prototype = getPrototypeOf(val);\n return (prototype === null || prototype === Object.prototype || Object.getPrototypeOf(prototype) === null) && !(toStringTag in val) && !(iterator in val);\n}\n\n/**\n * Determine if a value is a Date\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a Date, otherwise false\n */\nconst isDate = kindOfTest('Date');\n\n/**\n * Determine if a value is a File\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a File, otherwise false\n */\nconst isFile = kindOfTest('File');\n\n/**\n * Determine if a value is a Blob\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a Blob, otherwise false\n */\nconst isBlob = kindOfTest('Blob');\n\n/**\n * Determine if a value is a FileList\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a File, otherwise false\n */\nconst isFileList = kindOfTest('FileList');\n\n/**\n * Determine if a value is a Stream\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a Stream, otherwise false\n */\nconst isStream = (val) => isObject(val) && isFunction(val.pipe);\n\n/**\n * Determine if a value is a FormData\n *\n * @param {*} thing The value to test\n *\n * @returns {boolean} True if value is an FormData, otherwise false\n */\nconst isFormData = (thing) => {\n let kind;\n return thing && (\n (typeof FormData === 'function' && thing instanceof FormData) || (\n isFunction(thing.append) && (\n (kind = kindOf(thing)) === 'formdata' ||\n // detect form-data instance\n (kind === 'object' && isFunction(thing.toString) && thing.toString() === '[object FormData]')\n )\n )\n )\n}\n\n/**\n * Determine if a value is a URLSearchParams object\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a URLSearchParams object, otherwise false\n */\nconst isURLSearchParams = kindOfTest('URLSearchParams');\n\nconst [isReadableStream, isRequest, isResponse, isHeaders] = ['ReadableStream', 'Request', 'Response', 'Headers'].map(kindOfTest);\n\n/**\n * Trim excess whitespace off the beginning and end of a string\n *\n * @param {String} str The String to trim\n *\n * @returns {String} The String freed of excess whitespace\n */\nconst trim = (str) => str.trim ?\n str.trim() : str.replace(/^[\\s\\uFEFF\\xA0]+|[\\s\\uFEFF\\xA0]+$/g, '');\n\n/**\n * Iterate over an Array or an Object invoking a function for each item.\n *\n * If `obj` is an Array callback will be called passing\n * the value, index, and complete array for each item.\n *\n * If 'obj' is an Object callback will be called passing\n * the value, key, and complete object for each property.\n *\n * @param {Object|Array} obj The object to iterate\n * @param {Function} fn The callback to invoke for each item\n *\n * @param {Boolean} [allOwnKeys = false]\n * @returns {any}\n */\nfunction forEach(obj, fn, {allOwnKeys = false} = {}) {\n // Don't bother if no value provided\n if (obj === null || typeof obj === 'undefined') {\n return;\n }\n\n let i;\n let l;\n\n // Force an array if not already something iterable\n if (typeof obj !== 'object') {\n /*eslint no-param-reassign:0*/\n obj = [obj];\n }\n\n if (isArray(obj)) {\n // Iterate over array values\n for (i = 0, l = obj.length; i < l; i++) {\n fn.call(null, obj[i], i, obj);\n }\n } else {\n // Iterate over object keys\n const keys = allOwnKeys ? Object.getOwnPropertyNames(obj) : Object.keys(obj);\n const len = keys.length;\n let key;\n\n for (i = 0; i < len; i++) {\n key = keys[i];\n fn.call(null, obj[key], key, obj);\n }\n }\n}\n\nfunction findKey(obj, key) {\n key = key.toLowerCase();\n const keys = Object.keys(obj);\n let i = keys.length;\n let _key;\n while (i-- > 0) {\n _key = keys[i];\n if (key === _key.toLowerCase()) {\n return _key;\n }\n }\n return null;\n}\n\nconst _global = (() => {\n /*eslint no-undef:0*/\n if (typeof globalThis !== \"undefined\") return globalThis;\n return typeof self !== \"undefined\" ? self : (typeof window !== 'undefined' ? window : global)\n})();\n\nconst isContextDefined = (context) => !isUndefined(context) && context !== _global;\n\n/**\n * Accepts varargs expecting each argument to be an object, then\n * immutably merges the properties of each object and returns result.\n *\n * When multiple objects contain the same key the later object in\n * the arguments list will take precedence.\n *\n * Example:\n *\n * ```js\n * var result = merge({foo: 123}, {foo: 456});\n * console.log(result.foo); // outputs 456\n * ```\n *\n * @param {Object} obj1 Object to merge\n *\n * @returns {Object} Result of all merge properties\n */\nfunction merge(/* obj1, obj2, obj3, ... */) {\n const {caseless} = isContextDefined(this) && this || {};\n const result = {};\n const assignValue = (val, key) => {\n const targetKey = caseless && findKey(result, key) || key;\n if (isPlainObject(result[targetKey]) && isPlainObject(val)) {\n result[targetKey] = merge(result[targetKey], val);\n } else if (isPlainObject(val)) {\n result[targetKey] = merge({}, val);\n } else if (isArray(val)) {\n result[targetKey] = val.slice();\n } else {\n result[targetKey] = val;\n }\n }\n\n for (let i = 0, l = arguments.length; i < l; i++) {\n arguments[i] && forEach(arguments[i], assignValue);\n }\n return result;\n}\n\n/**\n * Extends object a by mutably adding to it the properties of object b.\n *\n * @param {Object} a The object to be extended\n * @param {Object} b The object to copy properties from\n * @param {Object} thisArg The object to bind function to\n *\n * @param {Boolean} [allOwnKeys]\n * @returns {Object} The resulting value of object a\n */\nconst extend = (a, b, thisArg, {allOwnKeys}= {}) => {\n forEach(b, (val, key) => {\n if (thisArg && isFunction(val)) {\n a[key] = bind(val, thisArg);\n } else {\n a[key] = val;\n }\n }, {allOwnKeys});\n return a;\n}\n\n/**\n * Remove byte order marker. This catches EF BB BF (the UTF-8 BOM)\n *\n * @param {string} content with BOM\n *\n * @returns {string} content value without BOM\n */\nconst stripBOM = (content) => {\n if (content.charCodeAt(0) === 0xFEFF) {\n content = content.slice(1);\n }\n return content;\n}\n\n/**\n * Inherit the prototype methods from one constructor into another\n * @param {function} constructor\n * @param {function} superConstructor\n * @param {object} [props]\n * @param {object} [descriptors]\n *\n * @returns {void}\n */\nconst inherits = (constructor, superConstructor, props, descriptors) => {\n constructor.prototype = Object.create(superConstructor.prototype, descriptors);\n constructor.prototype.constructor = constructor;\n Object.defineProperty(constructor, 'super', {\n value: superConstructor.prototype\n });\n props && Object.assign(constructor.prototype, props);\n}\n\n/**\n * Resolve object with deep prototype chain to a flat object\n * @param {Object} sourceObj source object\n * @param {Object} [destObj]\n * @param {Function|Boolean} [filter]\n * @param {Function} [propFilter]\n *\n * @returns {Object}\n */\nconst toFlatObject = (sourceObj, destObj, filter, propFilter) => {\n let props;\n let i;\n let prop;\n const merged = {};\n\n destObj = destObj || {};\n // eslint-disable-next-line no-eq-null,eqeqeq\n if (sourceObj == null) return destObj;\n\n do {\n props = Object.getOwnPropertyNames(sourceObj);\n i = props.length;\n while (i-- > 0) {\n prop = props[i];\n if ((!propFilter || propFilter(prop, sourceObj, destObj)) && !merged[prop]) {\n destObj[prop] = sourceObj[prop];\n merged[prop] = true;\n }\n }\n sourceObj = filter !== false && getPrototypeOf(sourceObj);\n } while (sourceObj && (!filter || filter(sourceObj, destObj)) && sourceObj !== Object.prototype);\n\n return destObj;\n}\n\n/**\n * Determines whether a string ends with the characters of a specified string\n *\n * @param {String} str\n * @param {String} searchString\n * @param {Number} [position= 0]\n *\n * @returns {boolean}\n */\nconst endsWith = (str, searchString, position) => {\n str = String(str);\n if (position === undefined || position > str.length) {\n position = str.length;\n }\n position -= searchString.length;\n const lastIndex = str.indexOf(searchString, position);\n return lastIndex !== -1 && lastIndex === position;\n}\n\n\n/**\n * Returns new array from array like object or null if failed\n *\n * @param {*} [thing]\n *\n * @returns {?Array}\n */\nconst toArray = (thing) => {\n if (!thing) return null;\n if (isArray(thing)) return thing;\n let i = thing.length;\n if (!isNumber(i)) return null;\n const arr = new Array(i);\n while (i-- > 0) {\n arr[i] = thing[i];\n }\n return arr;\n}\n\n/**\n * Checking if the Uint8Array exists and if it does, it returns a function that checks if the\n * thing passed in is an instance of Uint8Array\n *\n * @param {TypedArray}\n *\n * @returns {Array}\n */\n// eslint-disable-next-line func-names\nconst isTypedArray = (TypedArray => {\n // eslint-disable-next-line func-names\n return thing => {\n return TypedArray && thing instanceof TypedArray;\n };\n})(typeof Uint8Array !== 'undefined' && getPrototypeOf(Uint8Array));\n\n/**\n * For each entry in the object, call the function with the key and value.\n *\n * @param {Object<any, any>} obj - The object to iterate over.\n * @param {Function} fn - The function to call for each entry.\n *\n * @returns {void}\n */\nconst forEachEntry = (obj, fn) => {\n const generator = obj && obj[iterator];\n\n const _iterator = generator.call(obj);\n\n let result;\n\n while ((result = _iterator.next()) && !result.done) {\n const pair = result.value;\n fn.call(obj, pair[0], pair[1]);\n }\n}\n\n/**\n * It takes a regular expression and a string, and returns an array of all the matches\n *\n * @param {string} regExp - The regular expression to match against.\n * @param {string} str - The string to search.\n *\n * @returns {Array<boolean>}\n */\nconst matchAll = (regExp, str) => {\n let matches;\n const arr = [];\n\n while ((matches = regExp.exec(str)) !== null) {\n arr.push(matches);\n }\n\n return arr;\n}\n\n/* Checking if the kindOfTest function returns true when passed an HTMLFormElement. */\nconst isHTMLForm = kindOfTest('HTMLFormElement');\n\nconst toCamelCase = str => {\n return str.toLowerCase().replace(/[-_\\s]([a-z\\d])(\\w*)/g,\n function replacer(m, p1, p2) {\n return p1.toUpperCase() + p2;\n }\n );\n};\n\n/* Creating a function that will check if an object has a property. */\nconst hasOwnProperty = (({hasOwnProperty}) => (obj, prop) => hasOwnProperty.call(obj, prop))(Object.prototype);\n\n/**\n * Determine if a value is a RegExp object\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a RegExp object, otherwise false\n */\nconst isRegExp = kindOfTest('RegExp');\n\nconst reduceDescriptors = (obj, reducer) => {\n const descriptors = Object.getOwnPropertyDescriptors(obj);\n const reducedDescriptors = {};\n\n forEach(descriptors, (descriptor, name) => {\n let ret;\n if ((ret = reducer(descriptor, name, obj)) !== false) {\n reducedDescriptors[name] = ret || descriptor;\n }\n });\n\n Object.defineProperties(obj, reducedDescriptors);\n}\n\n/**\n * Makes all methods read-only\n * @param {Object} obj\n */\n\nconst freezeMethods = (obj) => {\n reduceDescriptors(obj, (descriptor, name) => {\n // skip restricted props in strict mode\n if (isFunction(obj) && ['arguments', 'caller', 'callee'].indexOf(name) !== -1) {\n return false;\n }\n\n const value = obj[name];\n\n if (!isFunction(value)) return;\n\n descriptor.enumerable = false;\n\n if ('writable' in descriptor) {\n descriptor.writable = false;\n return;\n }\n\n if (!descriptor.set) {\n descriptor.set = () => {\n throw Error('Can not rewrite read-only method \\'' + name + '\\'');\n };\n }\n });\n}\n\nconst toObjectSet = (arrayOrString, delimiter) => {\n const obj = {};\n\n const define = (arr) => {\n arr.forEach(value => {\n obj[value] = true;\n });\n }\n\n isArray(arrayOrString) ? define(arrayOrString) : define(String(arrayOrString).split(delimiter));\n\n return obj;\n}\n\nconst noop = () => {}\n\nconst toFiniteNumber = (value, defaultValue) => {\n return value != null && Number.isFinite(value = +value) ? value : defaultValue;\n}\n\n/**\n * If the thing is a FormData object, return true, otherwise return false.\n *\n * @param {unknown} thing - The thing to check.\n *\n * @returns {boolean}\n */\nfunction isSpecCompliantForm(thing) {\n return !!(thing && isFunction(thing.append) && thing[toStringTag] === 'FormData' && thing[iterator]);\n}\n\nconst toJSONObject = (obj) => {\n const stack = new Array(10);\n\n const visit = (source, i) => {\n\n if (isObject(source)) {\n if (stack.indexOf(source) >= 0) {\n return;\n }\n\n if(!('toJSON' in source)) {\n stack[i] = source;\n const target = isArray(source) ? [] : {};\n\n forEach(source, (value, key) => {\n const reducedValue = visit(value, i + 1);\n !isUndefined(reducedValue) && (target[key] = reducedValue);\n });\n\n stack[i] = undefined;\n\n return target;\n }\n }\n\n return source;\n }\n\n return visit(obj, 0);\n}\n\nconst isAsyncFn = kindOfTest('AsyncFunction');\n\nconst isThenable = (thing) =>\n thing && (isObject(thing) || isFunction(thing)) && isFunction(thing.then) && isFunction(thing.catch);\n\n// original code\n// https://github.com/DigitalBrainJS/AxiosPromise/blob/16deab13710ec09779922131f3fa5954320f83ab/lib/utils.js#L11-L34\n\nconst _setImmediate = ((setImmediateSupported, postMessageSupported) => {\n if (setImmediateSupported) {\n return setImmediate;\n }\n\n return postMessageSupported ? ((token, callbacks) => {\n _global.addEventListener(\"message\", ({source, data}) => {\n if (source === _global && data === token) {\n callbacks.length && callbacks.shift()();\n }\n }, false);\n\n return (cb) => {\n callbacks.push(cb);\n _global.postMessage(token, \"*\");\n }\n })(`axios@${Math.random()}`, []) : (cb) => setTimeout(cb);\n})(\n typeof setImmediate === 'function',\n isFunction(_global.postMessage)\n);\n\nconst asap = typeof queueMicrotask !== 'undefined' ?\n queueMicrotask.bind(_global) : ( typeof process !== 'undefined' && process.nextTick || _setImmediate);\n\n// *********************\n\n\nconst isIterable = (thing) => thing != null && isFunction(thing[iterator]);\n\n\nexport default {\n isArray,\n isArrayBuffer,\n isBuffer,\n isFormData,\n isArrayBufferView,\n isString,\n isNumber,\n isBoolean,\n isObject,\n isPlainObject,\n isReadableStream,\n isRequest,\n isResponse,\n isHeaders,\n isUndefined,\n isDate,\n isFile,\n isBlob,\n isRegExp,\n isFunction,\n isStream,\n isURLSearchParams,\n isTypedArray,\n isFileList,\n forEach,\n merge,\n extend,\n trim,\n stripBOM,\n inherits,\n toFlatObject,\n kindOf,\n kindOfTest,\n endsWith,\n toArray,\n forEachEntry,\n matchAll,\n isHTMLForm,\n hasOwnProperty,\n hasOwnProp: hasOwnProperty, // an alias to avoid ESLint no-prototype-builtins detection\n reduceDescriptors,\n freezeMethods,\n toObjectSet,\n toCamelCase,\n noop,\n toFiniteNumber,\n findKey,\n global: _global,\n isContextDefined,\n isSpecCompliantForm,\n toJSONObject,\n isAsyncFn,\n isThenable,\n setImmediate: _setImmediate,\n asap,\n isIterable\n};\n","'use strict';\n\nimport utils from '../utils.js';\n\n/**\n * Create an Error with the specified message, config, error code, request and response.\n *\n * @param {string} message The error message.\n * @param {string} [code] The error code (for example, 'ECONNABORTED').\n * @param {Object} [config] The config.\n * @param {Object} [request] The request.\n * @param {Object} [response] The response.\n *\n * @returns {Error} The created error.\n */\nfunction AxiosError(message, code, config, request, response) {\n Error.call(this);\n\n if (Error.captureStackTrace) {\n Error.captureStackTrace(this, this.constructor);\n } else {\n this.stack = (new Error()).stack;\n }\n\n this.message = message;\n this.name = 'AxiosError';\n code && (this.code = code);\n config && (this.config = config);\n request && (this.request = request);\n if (response) {\n this.response = response;\n this.status = response.status ? response.status : null;\n }\n}\n\nutils.inherits(AxiosError, Error, {\n toJSON: function toJSON() {\n return {\n // Standard\n message: this.message,\n name: this.name,\n // Microsoft\n description: this.description,\n number: this.number,\n // Mozilla\n fileName: this.fileName,\n lineNumber: this.lineNumber,\n columnNumber: this.columnNumber,\n stack: this.stack,\n // Axios\n config: utils.toJSONObject(this.config),\n code: this.code,\n status: this.status\n };\n }\n});\n\nconst prototype = AxiosError.prototype;\nconst descriptors = {};\n\n[\n 'ERR_BAD_OPTION_VALUE',\n 'ERR_BAD_OPTION',\n 'ECONNABORTED',\n 'ETIMEDOUT',\n 'ERR_NETWORK',\n 'ERR_FR_TOO_MANY_REDIRECTS',\n 'ERR_DEPRECATED',\n 'ERR_BAD_RESPONSE',\n 'ERR_BAD_REQUEST',\n 'ERR_CANCELED',\n 'ERR_NOT_SUPPORT',\n 'ERR_INVALID_URL'\n// eslint-disable-next-line func-names\n].forEach(code => {\n descriptors[code] = {value: code};\n});\n\nObject.defineProperties(AxiosError, descriptors);\nObject.defineProperty(prototype, 'isAxiosError', {value: true});\n\n// eslint-disable-next-line func-names\nAxiosError.from = (error, code, config, request, response, customProps) => {\n const axiosError = Object.create(prototype);\n\n utils.toFlatObject(error, axiosError, function filter(obj) {\n return obj !== Error.prototype;\n }, prop => {\n return prop !== 'isAxiosError';\n });\n\n AxiosError.call(axiosError, error.message, code, config, request, response);\n\n axiosError.cause = error;\n\n axiosError.name = error.name;\n\n customProps && Object.assign(axiosError, customProps);\n\n return axiosError;\n};\n\nexport default AxiosError;\n","'use strict';\n\nimport utils from '../utils.js';\nimport AxiosError from '../core/AxiosError.js';\n// temporary hotfix to avoid circular references until AxiosURLSearchParams is refactored\nimport PlatformFormData from '../platform/node/classes/FormData.js';\n\n/**\n * Determines if the given thing is a array or js object.\n *\n * @param {string} thing - The object or array to be visited.\n *\n * @returns {boolean}\n */\nfunction isVisitable(thing) {\n return utils.isPlainObject(thing) || utils.isArray(thing);\n}\n\n/**\n * It removes the brackets from the end of a string\n *\n * @param {string} key - The key of the parameter.\n *\n * @returns {string} the key without the brackets.\n */\nfunction removeBrackets(key) {\n return utils.endsWith(key, '[]') ? key.slice(0, -2) : key;\n}\n\n/**\n * It takes a path, a key, and a boolean, and returns a string\n *\n * @param {string} path - The path to the current key.\n * @param {string} key - The key of the current object being iterated over.\n * @param {string} dots - If true, the key will be rendered with dots instead of brackets.\n *\n * @returns {string} The path to the current key.\n */\nfunction renderKey(path, key, dots) {\n if (!path) return key;\n return path.concat(key).map(function each(token, i) {\n // eslint-disable-next-line no-param-reassign\n token = removeBrackets(token);\n return !dots && i ? '[' + token + ']' : token;\n }).join(dots ? '.' : '');\n}\n\n/**\n * If the array is an array and none of its elements are visitable, then it's a flat array.\n *\n * @param {Array<any>} arr - The array to check\n *\n * @returns {boolean}\n */\nfunction isFlatArray(arr) {\n return utils.isArray(arr) && !arr.some(isVisitable);\n}\n\nconst predicates = utils.toFlatObject(utils, {}, null, function filter(prop) {\n return /^is[A-Z]/.test(prop);\n});\n\n/**\n * Convert a data object to FormData\n *\n * @param {Object} obj\n * @param {?Object} [formData]\n * @param {?Object} [options]\n * @param {Function} [options.visitor]\n * @param {Boolean} [options.metaTokens = true]\n * @param {Boolean} [options.dots = false]\n * @param {?Boolean} [options.indexes = false]\n *\n * @returns {Object}\n **/\n\n/**\n * It converts an object into a FormData object\n *\n * @param {Object<any, any>} obj - The object to convert to form data.\n * @param {string} formData - The FormData object to append to.\n * @param {Object<string, any>} options\n *\n * @returns\n */\nfunction toFormData(obj, formData, options) {\n if (!utils.isObject(obj)) {\n throw new TypeError('target must be an object');\n }\n\n // eslint-disable-next-line no-param-reassign\n formData = formData || new (PlatformFormData || FormData)();\n\n // eslint-disable-next-line no-param-reassign\n options = utils.toFlatObject(options, {\n metaTokens: true,\n dots: false,\n indexes: false\n }, false, function defined(option, source) {\n // eslint-disable-next-line no-eq-null,eqeqeq\n return !utils.isUndefined(source[option]);\n });\n\n const metaTokens = options.metaTokens;\n // eslint-disable-next-line no-use-before-define\n const visitor = options.visitor || defaultVisitor;\n const dots = options.dots;\n const indexes = options.indexes;\n const _Blob = options.Blob || typeof Blob !== 'undefined' && Blob;\n const useBlob = _Blob && utils.isSpecCompliantForm(formData);\n\n if (!utils.isFunction(visitor)) {\n throw new TypeError('visitor must be a function');\n }\n\n function convertValue(value) {\n if (value === null) return '';\n\n if (utils.isDate(value)) {\n return value.toISOString();\n }\n\n if (utils.isBoolean(value)) {\n return value.toString();\n }\n\n if (!useBlob && utils.isBlob(value)) {\n throw new AxiosError('Blob is not supported. Use a Buffer instead.');\n }\n\n if (utils.isArrayBuffer(value) || utils.isTypedArray(value)) {\n return useBlob && typeof Blob === 'function' ? new Blob([value]) : Buffer.from(value);\n }\n\n return value;\n }\n\n /**\n * Default visitor.\n *\n * @param {*} value\n * @param {String|Number} key\n * @param {Array<String|Number>} path\n * @this {FormData}\n *\n * @returns {boolean} return true to visit the each prop of the value recursively\n */\n function defaultVisitor(value, key, path) {\n let arr = value;\n\n if (value && !path && typeof value === 'object') {\n if (utils.endsWith(key, '{}')) {\n // eslint-disable-next-line no-param-reassign\n key = metaTokens ? key : key.slice(0, -2);\n // eslint-disable-next-line no-param-reassign\n value = JSON.stringify(value);\n } else if (\n (utils.isArray(value) && isFlatArray(value)) ||\n ((utils.isFileList(value) || utils.endsWith(key, '[]')) && (arr = utils.toArray(value))\n )) {\n // eslint-disable-next-line no-param-reassign\n key = removeBrackets(key);\n\n arr.forEach(function each(el, index) {\n !(utils.isUndefined(el) || el === null) && formData.append(\n // eslint-disable-next-line no-nested-ternary\n indexes === true ? renderKey([key], index, dots) : (indexes === null ? key : key + '[]'),\n convertValue(el)\n );\n });\n return false;\n }\n }\n\n if (isVisitable(value)) {\n return true;\n }\n\n formData.append(renderKey(path, key, dots), convertValue(value));\n\n return false;\n }\n\n const stack = [];\n\n const exposedHelpers = Object.assign(predicates, {\n defaultVisitor,\n convertValue,\n isVisitable\n });\n\n function build(value, path) {\n if (utils.isUndefined(value)) return;\n\n if (stack.indexOf(value) !== -1) {\n throw Error('Circular reference detected in ' + path.join('.'));\n }\n\n stack.push(value);\n\n utils.forEach(value, function each(el, key) {\n const result = !(utils.isUndefined(el) || el === null) && visitor.call(\n formData, el, utils.isString(key) ? key.trim() : key, path, exposedHelpers\n );\n\n if (result === true) {\n build(el, path ? path.concat(key) : [key]);\n }\n });\n\n stack.pop();\n }\n\n if (!utils.isObject(obj)) {\n throw new TypeError('data must be an object');\n }\n\n build(obj);\n\n return formData;\n}\n\nexport default toFormData;\n","'use strict';\n\nimport toFormData from './toFormData.js';\n\n/**\n * It encodes a string by replacing all characters that are not in the unreserved set with\n * their percent-encoded equivalents\n *\n * @param {string} str - The string to encode.\n *\n * @returns {string} The encoded string.\n */\nfunction encode(str) {\n const charMap = {\n '!': '%21',\n \"'\": '%27',\n '(': '%28',\n ')': '%29',\n '~': '%7E',\n '%20': '+',\n '%00': '\\x00'\n };\n return encodeURIComponent(str).replace(/[!'()~]|%20|%00/g, function replacer(match) {\n return charMap[match];\n });\n}\n\n/**\n * It takes a params object and converts it to a FormData object\n *\n * @param {Object<string, any>} params - The parameters to be converted to a FormData object.\n * @param {Object<string, any>} options - The options object passed to the Axios constructor.\n *\n * @returns {void}\n */\nfunction AxiosURLSearchParams(params, options) {\n this._pairs = [];\n\n params && toFormData(params, this, options);\n}\n\nconst prototype = AxiosURLSearchParams.prototype;\n\nprototype.append = function append(name, value) {\n this._pairs.push([name, value]);\n};\n\nprototype.toString = function toString(encoder) {\n const _encode = encoder ? function(value) {\n return encoder.call(this, value, encode);\n } : encode;\n\n return this._pairs.map(function each(pair) {\n return _encode(pair[0]) + '=' + _encode(pair[1]);\n }, '').join('&');\n};\n\nexport default AxiosURLSearchParams;\n","'use strict';\n\nimport utils from '../utils.js';\nimport AxiosURLSearchParams from '../helpers/AxiosURLSearchParams.js';\n\n/**\n * It replaces all instances of the characters `:`, `$`, `,`, `+`, `[`, and `]` with their\n * URI encoded counterparts\n *\n * @param {string} val The value to be encoded.\n *\n * @returns {string} The encoded value.\n */\nfunction encode(val) {\n return encodeURIComponent(val).\n replace(/%3A/gi, ':').\n replace(/%24/g, '$').\n replace(/%2C/gi, ',').\n replace(/%20/g, '+').\n replace(/%5B/gi, '[').\n replace(/%5D/gi, ']');\n}\n\n/**\n * Build a URL by appending params to the end\n *\n * @param {string} url The base of the url (e.g., http://www.google.com)\n * @param {object} [params] The params to be appended\n * @param {?(object|Function)} options\n *\n * @returns {string} The formatted url\n */\nexport default function buildURL(url, params, options) {\n /*eslint no-param-reassign:0*/\n if (!params) {\n return url;\n }\n \n const _encode = options && options.encode || encode;\n\n if (utils.isFunction(options)) {\n options = {\n serialize: options\n };\n } \n\n const serializeFn = options && options.serialize;\n\n let serializedParams;\n\n if (serializeFn) {\n serializedParams = serializeFn(params, options);\n } else {\n serializedParams = utils.isURLSearchParams(params) ?\n params.toString() :\n new AxiosURLSearchParams(params, options).toString(_encode);\n }\n\n if (serializedParams) {\n const hashmarkIndex = url.indexOf(\"#\");\n\n if (hashmarkIndex !== -1) {\n url = url.slice(0, hashmarkIndex);\n }\n url += (url.indexOf('?') === -1 ? '?' : '&') + serializedParams;\n }\n\n return url;\n}\n","'use strict';\n\nimport utils from './../utils.js';\n\nclass InterceptorManager {\n constructor() {\n this.handlers = [];\n }\n\n /**\n * Add a new interceptor to the stack\n *\n * @param {Function} fulfilled The function to handle `then` for a `Promise`\n * @param {Function} rejected The function to handle `reject` for a `Promise`\n *\n * @return {Number} An ID used to remove interceptor later\n */\n use(fulfilled, rejected, options) {\n this.handlers.push({\n fulfilled,\n rejected,\n synchronous: options ? options.synchronous : false,\n runWhen: options ? options.runWhen : null\n });\n return this.handlers.length - 1;\n }\n\n /**\n * Remove an interceptor from the stack\n *\n * @param {Number} id The ID that was returned by `use`\n *\n * @returns {Boolean} `true` if the interceptor was removed, `false` otherwise\n */\n eject(id) {\n if (this.handlers[id]) {\n this.handlers[id] = null;\n }\n }\n\n /**\n * Clear all interceptors from the stack\n *\n * @returns {void}\n */\n clear() {\n if (this.handlers) {\n this.handlers = [];\n }\n }\n\n /**\n * Iterate over all the registered interceptors\n *\n * This method is particularly useful for skipping over any\n * interceptors that may have become `null` calling `eject`.\n *\n * @param {Function} fn The function to call for each interceptor\n *\n * @returns {void}\n */\n forEach(fn) {\n utils.forEach(this.handlers, function forEachHandler(h) {\n if (h !== null) {\n fn(h);\n }\n });\n }\n}\n\nexport default InterceptorManager;\n","'use strict';\n\nexport default {\n silentJSONParsing: true,\n forcedJSONParsing: true,\n clarifyTimeoutError: false\n};\n","import URLSearchParams from './classes/URLSearchParams.js'\nimport FormData from './classes/FormData.js'\nimport Blob from './classes/Blob.js'\n\nexport default {\n isBrowser: true,\n classes: {\n URLSearchParams,\n FormData,\n Blob\n },\n protocols: ['http', 'https', 'file', 'blob', 'url', 'data']\n};\n","'use strict';\n\nimport AxiosURLSearchParams from '../../../helpers/AxiosURLSearchParams.js';\nexport default typeof URLSearchParams !== 'undefined' ? URLSearchParams : AxiosURLSearchParams;\n","'use strict';\n\nexport default typeof FormData !== 'undefined' ? FormData : null;\n","'use strict'\n\nexport default typeof Blob !== 'undefined' ? Blob : null\n","const hasBrowserEnv = typeof window !== 'undefined' && typeof document !== 'undefined';\n\nconst _navigator = typeof navigator === 'object' && navigator || undefined;\n\n/**\n * Determine if we're running in a standard browser environment\n *\n * This allows axios to run in a web worker, and react-native.\n * Both environments support XMLHttpRequest, but not fully standard globals.\n *\n * web workers:\n * typeof window -> undefined\n * typeof document -> undefined\n *\n * react-native:\n * navigator.product -> 'ReactNative'\n * nativescript\n * navigator.product -> 'NativeScript' or 'NS'\n *\n * @returns {boolean}\n */\nconst hasStandardBrowserEnv = hasBrowserEnv &&\n (!_navigator || ['ReactNative', 'NativeScript', 'NS'].indexOf(_navigator.product) < 0);\n\n/**\n * Determine if we're running in a standard browser webWorker environment\n *\n * Although the `isStandardBrowserEnv` method indicates that\n * `allows axios to run in a web worker`, the WebWorker will still be\n * filtered out due to its judgment standard\n * `typeof window !== 'undefined' && typeof document !== 'undefined'`.\n * This leads to a problem when axios post `FormData` in webWorker\n */\nconst hasStandardBrowserWebWorkerEnv = (() => {\n return (\n typeof WorkerGlobalScope !== 'undefined' &&\n // eslint-disable-next-line no-undef\n self instanceof WorkerGlobalScope &&\n typeof self.importScripts === 'function'\n );\n})();\n\nconst origin = hasBrowserEnv && window.location.href || 'http://localhost';\n\nexport {\n hasBrowserEnv,\n hasStandardBrowserWebWorkerEnv,\n hasStandardBrowserEnv,\n _navigator as navigator,\n origin\n}\n","import platform from './node/index.js';\nimport * as utils from './common/utils.js';\n\nexport default {\n ...utils,\n ...platform\n}\n","'use strict';\n\nimport utils from '../utils.js';\n\n/**\n * It takes a string like `foo[x][y][z]` and returns an array like `['foo', 'x', 'y', 'z']\n *\n * @param {string} name - The name of the property to get.\n *\n * @returns An array of strings.\n */\nfunction parsePropPath(name) {\n // foo[x][y][z]\n // foo.x.y.z\n // foo-x-y-z\n // foo x y z\n return utils.matchAll(/\\w+|\\[(\\w*)]/g, name).map(match => {\n return match[0] === '[]' ? '' : match[1] || match[0];\n });\n}\n\n/**\n * Convert an array to an object.\n *\n * @param {Array<any>} arr - The array to convert to an object.\n *\n * @returns An object with the same keys and values as the array.\n */\nfunction arrayToObject(arr) {\n const obj = {};\n const keys = Object.keys(arr);\n let i;\n const len = keys.length;\n let key;\n for (i = 0; i < len; i++) {\n key = keys[i];\n obj[key] = arr[key];\n }\n return obj;\n}\n\n/**\n * It takes a FormData object and returns a JavaScript object\n *\n * @param {string} formData The FormData object to convert to JSON.\n *\n * @returns {Object<string, any> | null} The converted object.\n */\nfunction formDataToJSON(formData) {\n function buildPath(path, value, target, index) {\n let name = path[index++];\n\n if (name === '__proto__') return true;\n\n const isNumericKey = Number.isFinite(+name);\n const isLast = index >= path.length;\n name = !name && utils.isArray(target) ? target.length : name;\n\n if (isLast) {\n if (utils.hasOwnProp(target, name)) {\n target[name] = [target[name], value];\n } else {\n target[name] = value;\n }\n\n return !isNumericKey;\n }\n\n if (!target[name] || !utils.isObject(target[name])) {\n target[name] = [];\n }\n\n const result = buildPath(path, value, target[name], index);\n\n if (result && utils.isArray(target[name])) {\n target[name] = arrayToObject(target[name]);\n }\n\n return !isNumericKey;\n }\n\n if (utils.isFormData(formData) && utils.isFunction(formData.entries)) {\n const obj = {};\n\n utils.forEachEntry(formData, (name, value) => {\n buildPath(parsePropPath(name), value, obj, 0);\n });\n\n return obj;\n }\n\n return null;\n}\n\nexport default formDataToJSON;\n","'use strict';\n\nimport utils from '../utils.js';\nimport AxiosError from '../core/AxiosError.js';\nimport transitionalDefaults from './transitional.js';\nimport toFormData from '../helpers/toFormData.js';\nimport toURLEncodedForm from '../helpers/toURLEncodedForm.js';\nimport platform from '../platform/index.js';\nimport formDataToJSON from '../helpers/formDataToJSON.js';\n\n/**\n * It takes a string, tries to parse it, and if it fails, it returns the stringified version\n * of the input\n *\n * @param {any} rawValue - The value to be stringified.\n * @param {Function} parser - A function that parses a string into a JavaScript object.\n * @param {Function} encoder - A function that takes a value and returns a string.\n *\n * @returns {string} A stringified version of the rawValue.\n */\nfunction stringifySafely(rawValue, parser, encoder) {\n if (utils.isString(rawValue)) {\n try {\n (parser || JSON.parse)(rawValue);\n return utils.trim(rawValue);\n } catch (e) {\n if (e.name !== 'SyntaxError') {\n throw e;\n }\n }\n }\n\n return (encoder || JSON.stringify)(rawValue);\n}\n\nconst defaults = {\n\n transitional: transitionalDefaults,\n\n adapter: ['xhr', 'http', 'fetch'],\n\n transformRequest: [function transformRequest(data, headers) {\n const contentType = headers.getContentType() || '';\n const hasJSONContentType = contentType.indexOf('application/json') > -1;\n const isObjectPayload = utils.isObject(data);\n\n if (isObjectPayload && utils.isHTMLForm(data)) {\n data = new FormData(data);\n }\n\n const isFormData = utils.isFormData(data);\n\n if (isFormData) {\n return hasJSONContentType ? JSON.stringify(formDataToJSON(data)) : data;\n }\n\n if (utils.isArrayBuffer(data) ||\n utils.isBuffer(data) ||\n utils.isStream(data) ||\n utils.isFile(data) ||\n utils.isBlob(data) ||\n utils.isReadableStream(data)\n ) {\n return data;\n }\n if (utils.isArrayBufferView(data)) {\n return data.buffer;\n }\n if (utils.isURLSearchParams(data)) {\n headers.setContentType('application/x-www-form-urlencoded;charset=utf-8', false);\n return data.toString();\n }\n\n let isFileList;\n\n if (isObjectPayload) {\n if (contentType.indexOf('application/x-www-form-urlencoded') > -1) {\n return toURLEncodedForm(data, this.formSerializer).toString();\n }\n\n if ((isFileList = utils.isFileList(data)) || contentType.indexOf('multipart/form-data') > -1) {\n const _FormData = this.env && this.env.FormData;\n\n return toFormData(\n isFileList ? {'files[]': data} : data,\n _FormData && new _FormData(),\n this.formSerializer\n );\n }\n }\n\n if (isObjectPayload || hasJSONContentType ) {\n headers.setContentType('application/json', false);\n return stringifySafely(data);\n }\n\n return data;\n }],\n\n transformResponse: [function transformResponse(data) {\n const transitional = this.transitional || defaults.transitional;\n const forcedJSONParsing = transitional && transitional.forcedJSONParsing;\n const JSONRequested = this.responseType === 'json';\n\n if (utils.isResponse(data) || utils.isReadableStream(data)) {\n return data;\n }\n\n if (data && utils.isString(data) && ((forcedJSONParsing && !this.responseType) || JSONRequested)) {\n const silentJSONParsing = transitional && transitional.silentJSONParsing;\n const strictJSONParsing = !silentJSONParsing && JSONRequested;\n\n try {\n return JSON.parse(data);\n } catch (e) {\n if (strictJSONParsing) {\n if (e.name === 'SyntaxError') {\n throw AxiosError.from(e, AxiosError.ERR_BAD_RESPONSE, this, null, this.response);\n }\n throw e;\n }\n }\n }\n\n return data;\n }],\n\n /**\n * A timeout in milliseconds to abort a request. If set to 0 (default) a\n * timeout is not created.\n */\n timeout: 0,\n\n xsrfCookieName: 'XSRF-TOKEN',\n xsrfHeaderName: 'X-XSRF-TOKEN',\n\n maxContentLength: -1,\n maxBodyLength: -1,\n\n env: {\n FormData: platform.classes.FormData,\n Blob: platform.classes.Blob\n },\n\n validateStatus: function validateStatus(status) {\n return status >= 200 && status < 300;\n },\n\n headers: {\n common: {\n 'Accept': 'application/json, text/plain, */*',\n 'Content-Type': undefined\n }\n }\n};\n\nutils.forEach(['delete', 'get', 'head', 'post', 'put', 'patch'], (method) => {\n defaults.headers[method] = {};\n});\n\nexport default defaults;\n","'use strict';\n\nimport utils from '../utils.js';\nimport toFormData from './toFormData.js';\nimport platform from '../platform/index.js';\n\nexport default function toURLEncodedForm(data, options) {\n return toFormData(data, new platform.classes.URLSearchParams(), Object.assign({\n visitor: function(value, key, path, helpers) {\n if (platform.isNode && utils.isBuffer(value)) {\n this.append(key, value.toString('base64'));\n return false;\n }\n\n return helpers.defaultVisitor.apply(this, arguments);\n }\n }, options));\n}\n","'use strict';\n\nimport utils from './../utils.js';\n\n// RawAxiosHeaders whose duplicates are ignored by node\n// c.f. https://nodejs.org/api/http.html#http_message_headers\nconst ignoreDuplicateOf = utils.toObjectSet([\n 'age', 'authorization', 'content-length', 'content-type', 'etag',\n 'expires', 'from', 'host', 'if-modified-since', 'if-unmodified-since',\n 'last-modified', 'location', 'max-forwards', 'proxy-authorization',\n 'referer', 'retry-after', 'user-agent'\n]);\n\n/**\n * Parse headers into an object\n *\n * ```\n * Date: Wed, 27 Aug 2014 08:58:49 GMT\n * Content-Type: application/json\n * Connection: keep-alive\n * Transfer-Encoding: chunked\n * ```\n *\n * @param {String} rawHeaders Headers needing to be parsed\n *\n * @returns {Object} Headers parsed into an object\n */\nexport default rawHeaders => {\n const parsed = {};\n let key;\n let val;\n let i;\n\n rawHeaders && rawHeaders.split('\\n').forEach(function parser(line) {\n i = line.indexOf(':');\n key = line.substring(0, i).trim().toLowerCase();\n val = line.substring(i + 1).trim();\n\n if (!key || (parsed[key] && ignoreDuplicateOf[key])) {\n return;\n }\n\n if (key === 'set-cookie') {\n if (parsed[key]) {\n parsed[key].push(val);\n } else {\n parsed[key] = [val];\n }\n } else {\n parsed[key] = parsed[key] ? parsed[key] + ', ' + val : val;\n }\n });\n\n return parsed;\n};\n","'use strict';\n\nimport utils from '../utils.js';\nimport parseHeaders from '../helpers/parseHeaders.js';\n\nconst $internals = Symbol('internals');\n\nfunction normalizeHeader(header) {\n return header && String(header).trim().toLowerCase();\n}\n\nfunction normalizeValue(value) {\n if (value === false || value == null) {\n return value;\n }\n\n return utils.isArray(value) ? value.map(normalizeValue) : String(value);\n}\n\nfunction parseTokens(str) {\n const tokens = Object.create(null);\n const tokensRE = /([^\\s,;=]+)\\s*(?:=\\s*([^,;]+))?/g;\n let match;\n\n while ((match = tokensRE.exec(str))) {\n tokens[match[1]] = match[2];\n }\n\n return tokens;\n}\n\nconst isValidHeaderName = (str) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(str.trim());\n\nfunction matchHeaderValue(context, value, header, filter, isHeaderNameFilter) {\n if (utils.isFunction(filter)) {\n return filter.call(this, value, header);\n }\n\n if (isHeaderNameFilter) {\n value = header;\n }\n\n if (!utils.isString(value)) return;\n\n if (utils.isString(filter)) {\n return value.indexOf(filter) !== -1;\n }\n\n if (utils.isRegExp(filter)) {\n return filter.test(value);\n }\n}\n\nfunction formatHeader(header) {\n return header.trim()\n .toLowerCase().replace(/([a-z\\d])(\\w*)/g, (w, char, str) => {\n return char.toUpperCase() + str;\n });\n}\n\nfunction buildAccessors(obj, header) {\n const accessorName = utils.toCamelCase(' ' + header);\n\n ['get', 'set', 'has'].forEach(methodName => {\n Object.defineProperty(obj, methodName + accessorName, {\n value: function(arg1, arg2, arg3) {\n return this[methodName].call(this, header, arg1, arg2, arg3);\n },\n configurable: true\n });\n });\n}\n\nclass AxiosHeaders {\n constructor(headers) {\n headers && this.set(headers);\n }\n\n set(header, valueOrRewrite, rewrite) {\n const self = this;\n\n function setHeader(_value, _header, _rewrite) {\n const lHeader = normalizeHeader(_header);\n\n if (!lHeader) {\n throw new Error('header name must be a non-empty string');\n }\n\n const key = utils.findKey(self, lHeader);\n\n if(!key || self[key] === undefined || _rewrite === true || (_rewrite === undefined && self[key] !== false)) {\n self[key || _header] = normalizeValue(_value);\n }\n }\n\n const setHeaders = (headers, _rewrite) =>\n utils.forEach(headers, (_value, _header) => setHeader(_value, _header, _rewrite));\n\n if (utils.isPlainObject(header) || header instanceof this.constructor) {\n setHeaders(header, valueOrRewrite)\n } else if(utils.isString(header) && (header = header.trim()) && !isValidHeaderName(header)) {\n setHeaders(parseHeaders(header), valueOrRewrite);\n } else if (utils.isObject(header) && utils.isIterable(header)) {\n let obj = {}, dest, key;\n for (const entry of header) {\n if (!utils.isArray(entry)) {\n throw TypeError('Object iterator must return a key-value pair');\n }\n\n obj[key = entry[0]] = (dest = obj[key]) ?\n (utils.isArray(dest) ? [...dest, entry[1]] : [dest, entry[1]]) : entry[1];\n }\n\n setHeaders(obj, valueOrRewrite)\n } else {\n header != null && setHeader(valueOrRewrite, header, rewrite);\n }\n\n return this;\n }\n\n get(header, parser) {\n header = normalizeHeader(header);\n\n if (header) {\n const key = utils.findKey(this, header);\n\n if (key) {\n const value = this[key];\n\n if (!parser) {\n return value;\n }\n\n if (parser === true) {\n return parseTokens(value);\n }\n\n if (utils.isFunction(parser)) {\n return parser.call(this, value, key);\n }\n\n if (utils.isRegExp(parser)) {\n return parser.exec(value);\n }\n\n throw new TypeError('parser must be boolean|regexp|function');\n }\n }\n }\n\n has(header, matcher) {\n header = normalizeHeader(header);\n\n if (header) {\n const key = utils.findKey(this, header);\n\n return !!(key && this[key] !== undefined && (!matcher || matchHeaderValue(this, this[key], key, matcher)));\n }\n\n return false;\n }\n\n delete(header, matcher) {\n const self = this;\n let deleted = false;\n\n function deleteHeader(_header) {\n _header = normalizeHeader(_header);\n\n if (_header) {\n const key = utils.findKey(self, _header);\n\n if (key && (!matcher || matchHeaderValue(self, self[key], key, matcher))) {\n delete self[key];\n\n deleted = true;\n }\n }\n }\n\n if (utils.isArray(header)) {\n header.forEach(deleteHeader);\n } else {\n deleteHeader(header);\n }\n\n return deleted;\n }\n\n clear(matcher) {\n const keys = Object.keys(this);\n let i = keys.length;\n let deleted = false;\n\n while (i--) {\n const key = keys[i];\n if(!matcher || matchHeaderValue(this, this[key], key, matcher, true)) {\n delete this[key];\n deleted = true;\n }\n }\n\n return deleted;\n }\n\n normalize(format) {\n const self = this;\n const headers = {};\n\n utils.forEach(this, (value, header) => {\n const key = utils.findKey(headers, header);\n\n if (key) {\n self[key] = normalizeValue(value);\n delete self[header];\n return;\n }\n\n const normalized = format ? formatHeader(header) : String(header).trim();\n\n if (normalized !== header) {\n delete self[header];\n }\n\n self[normalized] = normalizeValue(value);\n\n headers[normalized] = true;\n });\n\n return this;\n }\n\n concat(...targets) {\n return this.constructor.concat(this, ...targets);\n }\n\n toJSON(asStrings) {\n const obj = Object.create(null);\n\n utils.forEach(this, (value, header) => {\n value != null && value !== false && (obj[header] = asStrings && utils.isArray(value) ? value.join(', ') : value);\n });\n\n return obj;\n }\n\n [Symbol.iterator]() {\n return Object.entries(this.toJSON())[Symbol.iterator]();\n }\n\n toString() {\n return Object.entries(this.toJSON()).map(([header, value]) => header + ': ' + value).join('\\n');\n }\n\n getSetCookie() {\n return this.get(\"set-cookie\") || [];\n }\n\n get [Symbol.toStringTag]() {\n return 'AxiosHeaders';\n }\n\n static from(thing) {\n return thing instanceof this ? thing : new this(thing);\n }\n\n static concat(first, ...targets) {\n const computed = new this(first);\n\n targets.forEach((target) => computed.set(target));\n\n return computed;\n }\n\n static accessor(header) {\n const internals = this[$internals] = (this[$internals] = {\n accessors: {}\n });\n\n const accessors = internals.accessors;\n const prototype = this.prototype;\n\n function defineAccessor(_header) {\n const lHeader = normalizeHeader(_header);\n\n if (!accessors[lHeader]) {\n buildAccessors(prototype, _header);\n accessors[lHeader] = true;\n }\n }\n\n utils.isArray(header) ? header.forEach(defineAccessor) : defineAccessor(header);\n\n return this;\n }\n}\n\nAxiosHeaders.accessor(['Content-Type', 'Content-Length', 'Accept', 'Accept-Encoding', 'User-Agent', 'Authorization']);\n\n// reserved names hotfix\nutils.reduceDescriptors(AxiosHeaders.prototype, ({value}, key) => {\n let mapped = key[0].toUpperCase() + key.slice(1); // map `set` => `Set`\n return {\n get: () => value,\n set(headerValue) {\n this[mapped] = headerValue;\n }\n }\n});\n\nutils.freezeMethods(AxiosHeaders);\n\nexport default AxiosHeaders;\n","'use strict';\n\nimport utils from './../utils.js';\nimport defaults from '../defaults/index.js';\nimport AxiosHeaders from '../core/AxiosHeaders.js';\n\n/**\n * Transform the data for a request or a response\n *\n * @param {Array|Function} fns A single function or Array of functions\n * @param {?Object} response The response object\n *\n * @returns {*} The resulting transformed data\n */\nexport default function transformData(fns, response) {\n const config = this || defaults;\n const context = response || config;\n const headers = AxiosHeaders.from(context.headers);\n let data = context.data;\n\n utils.forEach(fns, function transform(fn) {\n data = fn.call(config, data, headers.normalize(), response ? response.status : undefined);\n });\n\n headers.normalize();\n\n return data;\n}\n","'use strict';\n\nexport default function isCancel(value) {\n return !!(value && value.__CANCEL__);\n}\n","'use strict';\n\nimport AxiosError from '../core/AxiosError.js';\nimport utils from '../utils.js';\n\n/**\n * A `CanceledError` is an object that is thrown when an operation is canceled.\n *\n * @param {string=} message The message.\n * @param {Object=} config The config.\n * @param {Object=} request The request.\n *\n * @returns {CanceledError} The created error.\n */\nfunction CanceledError(message, config, request) {\n // eslint-disable-next-line no-eq-null,eqeqeq\n AxiosError.call(this, message == null ? 'canceled' : message, AxiosError.ERR_CANCELED, config, request);\n this.name = 'CanceledError';\n}\n\nutils.inherits(CanceledError, AxiosError, {\n __CANCEL__: true\n});\n\nexport default CanceledError;\n","'use strict';\n\nimport AxiosError from './AxiosError.js';\n\n/**\n * Resolve or reject a Promise based on response status.\n *\n * @param {Function} resolve A function that resolves the promise.\n * @param {Function} reject A function that rejects the promise.\n * @param {object} response The response.\n *\n * @returns {object} The response.\n */\nexport default function settle(resolve, reject, response) {\n const validateStatus = response.config.validateStatus;\n if (!response.status || !validateStatus || validateStatus(response.status)) {\n resolve(response);\n } else {\n reject(new AxiosError(\n 'Request failed with status code ' + response.status,\n [AxiosError.ERR_BAD_REQUEST, AxiosError.ERR_BAD_RESPONSE][Math.floor(response.status / 100) - 4],\n response.config,\n response.request,\n response\n ));\n }\n}\n","import speedometer from \"./speedometer.js\";\nimport throttle from \"./throttle.js\";\nimport utils from \"../utils.js\";\n\nexport const progressEventReducer = (listener, isDownloadStream, freq = 3) => {\n let bytesNotified = 0;\n const _speedometer = speedometer(50, 250);\n\n return throttle(e => {\n const loaded = e.loaded;\n const total = e.lengthComputable ? e.total : undefined;\n const progressBytes = loaded - bytesNotified;\n const rate = _speedometer(progressBytes);\n const inRange = loaded <= total;\n\n bytesNotified = loaded;\n\n const data = {\n loaded,\n total,\n progress: total ? (loaded / total) : undefined,\n bytes: progressBytes,\n rate: rate ? rate : undefined,\n estimated: rate && total && inRange ? (total - loaded) / rate : undefined,\n event: e,\n lengthComputable: total != null,\n [isDownloadStream ? 'download' : 'upload']: true\n };\n\n listener(data);\n }, freq);\n}\n\nexport const progressEventDecorator = (total, throttled) => {\n const lengthComputable = total != null;\n\n return [(loaded) => throttled[0]({\n lengthComputable,\n total,\n loaded\n }), throttled[1]];\n}\n\nexport const asyncDecorator = (fn) => (...args) => utils.asap(() => fn(...args));\n","'use strict';\n\n/**\n * Calculate data maxRate\n * @param {Number} [samplesCount= 10]\n * @param {Number} [min= 1000]\n * @returns {Function}\n */\nfunction speedometer(samplesCount, min) {\n samplesCount = samplesCount || 10;\n const bytes = new Array(samplesCount);\n const timestamps = new Array(samplesCount);\n let head = 0;\n let tail = 0;\n let firstSampleTS;\n\n min = min !== undefined ? min : 1000;\n\n return function push(chunkLength) {\n const now = Date.now();\n\n const startedAt = timestamps[tail];\n\n if (!firstSampleTS) {\n firstSampleTS = now;\n }\n\n bytes[head] = chunkLength;\n timestamps[head] = now;\n\n let i = tail;\n let bytesCount = 0;\n\n while (i !== head) {\n bytesCount += bytes[i++];\n i = i % samplesCount;\n }\n\n head = (head + 1) % samplesCount;\n\n if (head === tail) {\n tail = (tail + 1) % samplesCount;\n }\n\n if (now - firstSampleTS < min) {\n return;\n }\n\n const passed = startedAt && now - startedAt;\n\n return passed ? Math.round(bytesCount * 1000 / passed) : undefined;\n };\n}\n\nexport default speedometer;\n","/**\n * Throttle decorator\n * @param {Function} fn\n * @param {Number} freq\n * @return {Function}\n */\nfunction throttle(fn, freq) {\n let timestamp = 0;\n let threshold = 1000 / freq;\n let lastArgs;\n let timer;\n\n const invoke = (args, now = Date.now()) => {\n timestamp = now;\n lastArgs = null;\n if (timer) {\n clearTimeout(timer);\n timer = null;\n }\n fn.apply(null, args);\n }\n\n const throttled = (...args) => {\n const now = Date.now();\n const passed = now - timestamp;\n if ( passed >= threshold) {\n invoke(args, now);\n } else {\n lastArgs = args;\n if (!timer) {\n timer = setTimeout(() => {\n timer = null;\n invoke(lastArgs)\n }, threshold - passed);\n }\n }\n }\n\n const flush = () => lastArgs && invoke(lastArgs);\n\n return [throttled, flush];\n}\n\nexport default throttle;\n","import platform from '../platform/index.js';\n\nexport default platform.hasStandardBrowserEnv ? ((origin, isMSIE) => (url) => {\n url = new URL(url, platform.origin);\n\n return (\n origin.protocol === url.protocol &&\n origin.host === url.host &&\n (isMSIE || origin.port === url.port)\n );\n})(\n new URL(platform.origin),\n platform.navigator && /(msie|trident)/i.test(platform.navigator.userAgent)\n) : () => true;\n","import utils from './../utils.js';\nimport platform from '../platform/index.js';\n\nexport default platform.hasStandardBrowserEnv ?\n\n // Standard browser envs support document.cookie\n {\n write(name, value, expires, path, domain, secure) {\n const cookie = [name + '=' + encodeURIComponent(value)];\n\n utils.isNumber(expires) && cookie.push('expires=' + new Date(expires).toGMTString());\n\n utils.isString(path) && cookie.push('path=' + path);\n\n utils.isString(domain) && cookie.push('domain=' + domain);\n\n secure === true && cookie.push('secure');\n\n document.cookie = cookie.join('; ');\n },\n\n read(name) {\n const match = document.cookie.match(new RegExp('(^|;\\\\s*)(' + name + ')=([^;]*)'));\n return (match ? decodeURIComponent(match[3]) : null);\n },\n\n remove(name) {\n this.write(name, '', Date.now() - 86400000);\n }\n }\n\n :\n\n // Non-standard browser env (web workers, react-native) lack needed support.\n {\n write() {},\n read() {\n return null;\n },\n remove() {}\n };\n\n","'use strict';\n\nimport isAbsoluteURL from '../helpers/isAbsoluteURL.js';\nimport combineURLs from '../helpers/combineURLs.js';\n\n/**\n * Creates a new URL by combining the baseURL with the requestedURL,\n * only when the requestedURL is not already an absolute URL.\n * If the requestURL is absolute, this function returns the requestedURL untouched.\n *\n * @param {string} baseURL The base URL\n * @param {string} requestedURL Absolute or relative URL to combine\n *\n * @returns {string} The combined full path\n */\nexport default function buildFullPath(baseURL, requestedURL, allowAbsoluteUrls) {\n let isRelativeUrl = !isAbsoluteURL(requestedURL);\n if (baseURL && (isRelativeUrl || allowAbsoluteUrls == false)) {\n return combineURLs(baseURL, requestedURL);\n }\n return requestedURL;\n}\n","'use strict';\n\n/**\n * Determines whether the specified URL is absolute\n *\n * @param {string} url The URL to test\n *\n * @returns {boolean} True if the specified URL is absolute, otherwise false\n */\nexport default function isAbsoluteURL(url) {\n // A URL is considered absolute if it begins with \"<scheme>://\" or \"//\" (protocol-relative URL).\n // RFC 3986 defines scheme name as a sequence of characters beginning with a letter and followed\n // by any combination of letters, digits, plus, period, or hyphen.\n return /^([a-z][a-z\\d+\\-.]*:)?\\/\\//i.test(url);\n}\n","'use strict';\n\n/**\n * Creates a new URL by combining the specified URLs\n *\n * @param {string} baseURL The base URL\n * @param {string} relativeURL The relative URL\n *\n * @returns {string} The combined URL\n */\nexport default function combineURLs(baseURL, relativeURL) {\n return relativeURL\n ? baseURL.replace(/\\/?\\/$/, '') + '/' + relativeURL.replace(/^\\/+/, '')\n : baseURL;\n}\n","'use strict';\n\nimport utils from '../utils.js';\nimport AxiosHeaders from \"./AxiosHeaders.js\";\n\nconst headersToObject = (thing) => thing instanceof AxiosHeaders ? { ...thing } : thing;\n\n/**\n * Config-specific merge-function which creates a new config-object\n * by merging two configuration objects together.\n *\n * @param {Object} config1\n * @param {Object} config2\n *\n * @returns {Object} New object resulting from merging config2 to config1\n */\nexport default function mergeConfig(config1, config2) {\n // eslint-disable-next-line no-param-reassign\n config2 = config2 || {};\n const config = {};\n\n function getMergedValue(target, source, prop, caseless) {\n if (utils.isPlainObject(target) && utils.isPlainObject(source)) {\n return utils.merge.call({caseless}, target, source);\n } else if (utils.isPlainObject(source)) {\n return utils.merge({}, source);\n } else if (utils.isArray(source)) {\n return source.slice();\n }\n return source;\n }\n\n // eslint-disable-next-line consistent-return\n function mergeDeepProperties(a, b, prop , caseless) {\n if (!utils.isUndefined(b)) {\n return getMergedValue(a, b, prop , caseless);\n } else if (!utils.isUndefined(a)) {\n return getMergedValue(undefined, a, prop , caseless);\n }\n }\n\n // eslint-disable-next-line consistent-return\n function valueFromConfig2(a, b) {\n if (!utils.isUndefined(b)) {\n return getMergedValue(undefined, b);\n }\n }\n\n // eslint-disable-next-line consistent-return\n function defaultToConfig2(a, b) {\n if (!utils.isUndefined(b)) {\n return getMergedValue(undefined, b);\n } else if (!utils.isUndefined(a)) {\n return getMergedValue(undefined, a);\n }\n }\n\n // eslint-disable-next-line consistent-return\n function mergeDirectKeys(a, b, prop) {\n if (prop in config2) {\n return getMergedValue(a, b);\n } else if (prop in config1) {\n return getMergedValue(undefined, a);\n }\n }\n\n const mergeMap = {\n url: valueFromConfig2,\n method: valueFromConfig2,\n data: valueFromConfig2,\n baseURL: defaultToConfig2,\n transformRequest: defaultToConfig2,\n transformResponse: defaultToConfig2,\n paramsSerializer: defaultToConfig2,\n timeout: defaultToConfig2,\n timeoutMessage: defaultToConfig2,\n withCredentials: defaultToConfig2,\n withXSRFToken: defaultToConfig2,\n adapter: defaultToConfig2,\n responseType: defaultToConfig2,\n xsrfCookieName: defaultToConfig2,\n xsrfHeaderName: defaultToConfig2,\n onUploadProgress: defaultToConfig2,\n onDownloadProgress: defaultToConfig2,\n decompress: defaultToConfig2,\n maxContentLength: defaultToConfig2,\n maxBodyLength: defaultToConfig2,\n beforeRedirect: defaultToConfig2,\n transport: defaultToConfig2,\n httpAgent: defaultToConfig2,\n httpsAgent: defaultToConfig2,\n cancelToken: defaultToConfig2,\n socketPath: defaultToConfig2,\n responseEncoding: defaultToConfig2,\n validateStatus: mergeDirectKeys,\n headers: (a, b , prop) => mergeDeepProperties(headersToObject(a), headersToObject(b),prop, true)\n };\n\n utils.forEach(Object.keys(Object.assign({}, config1, config2)), function computeConfigValue(prop) {\n const merge = mergeMap[prop] || mergeDeepProperties;\n const configValue = merge(config1[prop], config2[prop], prop);\n (utils.isUndefined(configValue) && merge !== mergeDirectKeys) || (config[prop] = configValue);\n });\n\n return config;\n}\n","import platform from \"../platform/index.js\";\nimport utils from \"../utils.js\";\nimport isURLSameOrigin from \"./isURLSameOrigin.js\";\nimport cookies from \"./cookies.js\";\nimport buildFullPath from \"../core/buildFullPath.js\";\nimport mergeConfig from \"../core/mergeConfig.js\";\nimport AxiosHeaders from \"../core/AxiosHeaders.js\";\nimport buildURL from \"./buildURL.js\";\n\nexport default (config) => {\n const newConfig = mergeConfig({}, config);\n\n let {data, withXSRFToken, xsrfHeaderName, xsrfCookieName, headers, auth} = newConfig;\n\n newConfig.headers = headers = AxiosHeaders.from(headers);\n\n newConfig.url = buildURL(buildFullPath(newConfig.baseURL, newConfig.url, newConfig.allowAbsoluteUrls), config.params, config.paramsSerializer);\n\n // HTTP basic authentication\n if (auth) {\n headers.set('Authorization', 'Basic ' +\n btoa((auth.username || '') + ':' + (auth.password ? unescape(encodeURIComponent(auth.password)) : ''))\n );\n }\n\n let contentType;\n\n if (utils.isFormData(data)) {\n if (platform.hasStandardBrowserEnv || platform.hasStandardBrowserWebWorkerEnv) {\n headers.setContentType(undefined); // Let the browser set it\n } else if ((contentType = headers.getContentType()) !== false) {\n // fix semicolon duplication issue for ReactNative FormData implementation\n const [type, ...tokens] = contentType ? contentType.split(';').map(token => token.trim()).filter(Boolean) : [];\n headers.setContentType([type || 'multipart/form-data', ...tokens].join('; '));\n }\n }\n\n // Add xsrf header\n // This is only done if running in a standard browser environment.\n // Specifically not if we're in a web worker, or react-native.\n\n if (platform.hasStandardBrowserEnv) {\n withXSRFToken && utils.isFunction(withXSRFToken) && (withXSRFToken = withXSRFToken(newConfig));\n\n if (withXSRFToken || (withXSRFToken !== false && isURLSameOrigin(newConfig.url))) {\n // Add xsrf header\n const xsrfValue = xsrfHeaderName && xsrfCookieName && cookies.read(xsrfCookieName);\n\n if (xsrfValue) {\n headers.set(xsrfHeaderName, xsrfValue);\n }\n }\n }\n\n return newConfig;\n}\n\n","import utils from './../utils.js';\nimport settle from './../core/settle.js';\nimport transitionalDefaults from '../defaults/transitional.js';\nimport AxiosError from '../core/AxiosError.js';\nimport CanceledError from '../cancel/CanceledError.js';\nimport parseProtocol from '../helpers/parseProtocol.js';\nimport platform from '../platform/index.js';\nimport AxiosHeaders from '../core/AxiosHeaders.js';\nimport {progressEventReducer} from '../helpers/progressEventReducer.js';\nimport resolveConfig from \"../helpers/resolveConfig.js\";\n\nconst isXHRAdapterSupported = typeof XMLHttpRequest !== 'undefined';\n\nexport default isXHRAdapterSupported && function (config) {\n return new Promise(function dispatchXhrRequest(resolve, reject) {\n const _config = resolveConfig(config);\n let requestData = _config.data;\n const requestHeaders = AxiosHeaders.from(_config.headers).normalize();\n let {responseType, onUploadProgress, onDownloadProgress} = _config;\n let onCanceled;\n let uploadThrottled, downloadThrottled;\n let flushUpload, flushDownload;\n\n function done() {\n flushUpload && flushUpload(); // flush events\n flushDownload && flushDownload(); // flush events\n\n _config.cancelToken && _config.cancelToken.unsubscribe(onCanceled);\n\n _config.signal && _config.signal.removeEventListener('abort', onCanceled);\n }\n\n let request = new XMLHttpRequest();\n\n request.open(_config.method.toUpperCase(), _config.url, true);\n\n // Set the request timeout in MS\n request.timeout = _config.timeout;\n\n function onloadend() {\n if (!request) {\n return;\n }\n // Prepare the response\n const responseHeaders = AxiosHeaders.from(\n 'getAllResponseHeaders' in request && request.getAllResponseHeaders()\n );\n const responseData = !responseType || responseType === 'text' || responseType === 'json' ?\n request.responseText : request.response;\n const response = {\n data: responseData,\n status: request.status,\n statusText: request.statusText,\n headers: responseHeaders,\n config,\n request\n };\n\n settle(function _resolve(value) {\n resolve(value);\n done();\n }, function _reject(err) {\n reject(err);\n done();\n }, response);\n\n // Clean up request\n request = null;\n }\n\n if ('onloadend' in request) {\n // Use onloadend if available\n request.onloadend = onloadend;\n } else {\n // Listen for ready state to emulate onloadend\n request.onreadystatechange = function handleLoad() {\n if (!request || request.readyState !== 4) {\n return;\n }\n\n // The request errored out and we didn't get a response, this will be\n // handled by onerror instead\n // With one exception: request that using file: protocol, most browsers\n // will return status as 0 even though it's a successful request\n if (request.status === 0 && !(request.responseURL && request.responseURL.indexOf('file:') === 0)) {\n return;\n }\n // readystate handler is calling before onerror or ontimeout handlers,\n // so we should call onloadend on the next 'tick'\n setTimeout(onloadend);\n };\n }\n\n // Handle browser request cancellation (as opposed to a manual cancellation)\n request.onabort = function handleAbort() {\n if (!request) {\n return;\n }\n\n reject(new AxiosError('Request aborted', AxiosError.ECONNABORTED, config, request));\n\n // Clean up request\n request = null;\n };\n\n // Handle low level network errors\n request.onerror = function handleError() {\n // Real errors are hidden from us by the browser\n // onerror should only fire if it's a network error\n reject(new AxiosError('Network Error', AxiosError.ERR_NETWORK, config, request));\n\n // Clean up request\n request = null;\n };\n\n // Handle timeout\n request.ontimeout = function handleTimeout() {\n let timeoutErrorMessage = _config.timeout ? 'timeout of ' + _config.timeout + 'ms exceeded' : 'timeout exceeded';\n const transitional = _config.transitional || transitionalDefaults;\n if (_config.timeoutErrorMessage) {\n timeoutErrorMessage = _config.timeoutErrorMessage;\n }\n reject(new AxiosError(\n timeoutErrorMessage,\n transitional.clarifyTimeoutError ? AxiosError.ETIMEDOUT : AxiosError.ECONNABORTED,\n config,\n request));\n\n // Clean up request\n request = null;\n };\n\n // Remove Content-Type if data is undefined\n requestData === undefined && requestHeaders.setContentType(null);\n\n // Add headers to the request\n if ('setRequestHeader' in request) {\n utils.forEach(requestHeaders.toJSON(), function setRequestHeader(val, key) {\n request.setRequestHeader(key, val);\n });\n }\n\n // Add withCredentials to request if needed\n if (!utils.isUndefined(_config.withCredentials)) {\n request.withCredentials = !!_config.withCredentials;\n }\n\n // Add responseType to request if needed\n if (responseType && responseType !== 'json') {\n request.responseType = _config.responseType;\n }\n\n // Handle progress if needed\n if (onDownloadProgress) {\n ([downloadThrottled, flushDownload] = progressEventReducer(onDownloadProgress, true));\n request.addEventListener('progress', downloadThrottled);\n }\n\n // Not all browsers support upload events\n if (onUploadProgress && request.upload) {\n ([uploadThrottled, flushUpload] = progressEventReducer(onUploadProgress));\n\n request.upload.addEventListener('progress', uploadThrottled);\n\n request.upload.addEventListener('loadend', flushUpload);\n }\n\n if (_config.cancelToken || _config.signal) {\n // Handle cancellation\n // eslint-disable-next-line func-names\n onCanceled = cancel => {\n if (!request) {\n return;\n }\n reject(!cancel || cancel.type ? new CanceledError(null, config, request) : cancel);\n request.abort();\n request = null;\n };\n\n _config.cancelToken && _config.cancelToken.subscribe(onCanceled);\n if (_config.signal) {\n _config.signal.aborted ? onCanceled() : _config.signal.addEventListener('abort', onCanceled);\n }\n }\n\n const protocol = parseProtocol(_config.url);\n\n if (protocol && platform.protocols.indexOf(protocol) === -1) {\n reject(new AxiosError('Unsupported protocol ' + protocol + ':', AxiosError.ERR_BAD_REQUEST, config));\n return;\n }\n\n\n // Send the request\n request.send(requestData || null);\n });\n}\n","'use strict';\n\nexport default function parseProtocol(url) {\n const match = /^([-+\\w]{1,25})(:?\\/\\/|:)/.exec(url);\n return match && match[1] || '';\n}\n","import CanceledError from \"../cancel/CanceledError.js\";\nimport AxiosError from \"../core/AxiosError.js\";\nimport utils from '../utils.js';\n\nconst composeSignals = (signals, timeout) => {\n const {length} = (signals = signals ? signals.filter(Boolean) : []);\n\n if (timeout || length) {\n let controller = new AbortController();\n\n let aborted;\n\n const onabort = function (reason) {\n if (!aborted) {\n aborted = true;\n unsubscribe();\n const err = reason instanceof Error ? reason : this.reason;\n controller.abort(err instanceof AxiosError ? err : new CanceledError(err instanceof Error ? err.message : err));\n }\n }\n\n let timer = timeout && setTimeout(() => {\n timer = null;\n onabort(new AxiosError(`timeout ${timeout} of ms exceeded`, AxiosError.ETIMEDOUT))\n }, timeout)\n\n const unsubscribe = () => {\n if (signals) {\n timer && clearTimeout(timer);\n timer = null;\n signals.forEach(signal => {\n signal.unsubscribe ? signal.unsubscribe(onabort) : signal.removeEventListener('abort', onabort);\n });\n signals = null;\n }\n }\n\n signals.forEach((signal) => signal.addEventListener('abort', onabort));\n\n const {signal} = controller;\n\n signal.unsubscribe = () => utils.asap(unsubscribe);\n\n return signal;\n }\n}\n\nexport default composeSignals;\n","\nexport const streamChunk = function* (chunk, chunkSize) {\n let len = chunk.byteLength;\n\n if (!chunkSize || len < chunkSize) {\n yield chunk;\n return;\n }\n\n let pos = 0;\n let end;\n\n while (pos < len) {\n end = pos + chunkSize;\n yield chunk.slice(pos, end);\n pos = end;\n }\n}\n\nexport const readBytes = async function* (iterable, chunkSize) {\n for await (const chunk of readStream(iterable)) {\n yield* streamChunk(chunk, chunkSize);\n }\n}\n\nconst readStream = async function* (stream) {\n if (stream[Symbol.asyncIterator]) {\n yield* stream;\n return;\n }\n\n const reader = stream.getReader();\n try {\n for (;;) {\n const {done, value} = await reader.read();\n if (done) {\n break;\n }\n yield value;\n }\n } finally {\n await reader.cancel();\n }\n}\n\nexport const trackStream = (stream, chunkSize, onProgress, onFinish) => {\n const iterator = readBytes(stream, chunkSize);\n\n let bytes = 0;\n let done;\n let _onFinish = (e) => {\n if (!done) {\n done = true;\n onFinish && onFinish(e);\n }\n }\n\n return new ReadableStream({\n async pull(controller) {\n try {\n const {done, value} = await iterator.next();\n\n if (done) {\n _onFinish();\n controller.close();\n return;\n }\n\n let len = value.byteLength;\n if (onProgress) {\n let loadedBytes = bytes += len;\n onProgress(loadedBytes);\n }\n controller.enqueue(new Uint8Array(value));\n } catch (err) {\n _onFinish(err);\n throw err;\n }\n },\n cancel(reason) {\n _onFinish(reason);\n return iterator.return();\n }\n }, {\n highWaterMark: 2\n })\n}\n","import platform from \"../platform/index.js\";\nimport utils from \"../utils.js\";\nimport AxiosError from \"../core/AxiosError.js\";\nimport composeSignals from \"../helpers/composeSignals.js\";\nimport {trackStream} from \"../helpers/trackStream.js\";\nimport AxiosHeaders from \"../core/AxiosHeaders.js\";\nimport {progressEventReducer, progressEventDecorator, asyncDecorator} from \"../helpers/progressEventReducer.js\";\nimport resolveConfig from \"../helpers/resolveConfig.js\";\nimport settle from \"../core/settle.js\";\n\nconst isFetchSupported = typeof fetch === 'function' && typeof Request === 'function' && typeof Response === 'function';\nconst isReadableStreamSupported = isFetchSupported && typeof ReadableStream === 'function';\n\n// used only inside the fetch adapter\nconst encodeText = isFetchSupported && (typeof TextEncoder === 'function' ?\n ((encoder) => (str) => encoder.encode(str))(new TextEncoder()) :\n async (str) => new Uint8Array(await new Response(str).arrayBuffer())\n);\n\nconst test = (fn, ...args) => {\n try {\n return !!fn(...args);\n } catch (e) {\n return false\n }\n}\n\nconst supportsRequestStream = isReadableStreamSupported && test(() => {\n let duplexAccessed = false;\n\n const hasContentType = new Request(platform.origin, {\n body: new ReadableStream(),\n method: 'POST',\n get duplex() {\n duplexAccessed = true;\n return 'half';\n },\n }).headers.has('Content-Type');\n\n return duplexAccessed && !hasContentType;\n});\n\nconst DEFAULT_CHUNK_SIZE = 64 * 1024;\n\nconst supportsResponseStream = isReadableStreamSupported &&\n test(() => utils.isReadableStream(new Response('').body));\n\n\nconst resolvers = {\n stream: supportsResponseStream && ((res) => res.body)\n};\n\nisFetchSupported && (((res) => {\n ['text', 'arrayBuffer', 'blob', 'formData', 'stream'].forEach(type => {\n !resolvers[type] && (resolvers[type] = utils.isFunction(res[type]) ? (res) => res[type]() :\n (_, config) => {\n throw new AxiosError(`Response type '${type}' is not supported`, AxiosError.ERR_NOT_SUPPORT, config);\n })\n });\n})(new Response));\n\nconst getBodyLength = async (body) => {\n if (body == null) {\n return 0;\n }\n\n if(utils.isBlob(body)) {\n return body.size;\n }\n\n if(utils.isSpecCompliantForm(body)) {\n const _request = new Request(platform.origin, {\n method: 'POST',\n body,\n });\n return (await _request.arrayBuffer()).byteLength;\n }\n\n if(utils.isArrayBufferView(body) || utils.isArrayBuffer(body)) {\n return body.byteLength;\n }\n\n if(utils.isURLSearchParams(body)) {\n body = body + '';\n }\n\n if(utils.isString(body)) {\n return (await encodeText(body)).byteLength;\n }\n}\n\nconst resolveBodyLength = async (headers, body) => {\n const length = utils.toFiniteNumber(headers.getContentLength());\n\n return length == null ? getBodyLength(body) : length;\n}\n\nexport default isFetchSupported && (async (config) => {\n let {\n url,\n method,\n data,\n signal,\n cancelToken,\n timeout,\n onDownloadProgress,\n onUploadProgress,\n responseType,\n headers,\n withCredentials = 'same-origin',\n fetchOptions\n } = resolveConfig(config);\n\n responseType = responseType ? (responseType + '').toLowerCase() : 'text';\n\n let composedSignal = composeSignals([signal, cancelToken && cancelToken.toAbortSignal()], timeout);\n\n let request;\n\n const unsubscribe = composedSignal && composedSignal.unsubscribe && (() => {\n composedSignal.unsubscribe();\n });\n\n let requestContentLength;\n\n try {\n if (\n onUploadProgress && supportsRequestStream && method !== 'get' && method !== 'head' &&\n (requestContentLength = await resolveBodyLength(headers, data)) !== 0\n ) {\n let _request = new Request(url, {\n method: 'POST',\n body: data,\n duplex: \"half\"\n });\n\n let contentTypeHeader;\n\n if (utils.isFormData(data) && (contentTypeHeader = _request.headers.get('content-type'))) {\n headers.setContentType(contentTypeHeader)\n }\n\n if (_request.body) {\n const [onProgress, flush] = progressEventDecorator(\n requestContentLength,\n progressEventReducer(asyncDecorator(onUploadProgress))\n );\n\n data = trackStream(_request.body, DEFAULT_CHUNK_SIZE, onProgress, flush);\n }\n }\n\n if (!utils.isString(withCredentials)) {\n withCredentials = withCredentials ? 'include' : 'omit';\n }\n\n // Cloudflare Workers throws when credentials are defined\n // see https://github.com/cloudflare/workerd/issues/902\n const isCredentialsSupported = \"credentials\" in Request.prototype;\n request = new Request(url, {\n ...fetchOptions,\n signal: composedSignal,\n method: method.toUpperCase(),\n headers: headers.normalize().toJSON(),\n body: data,\n duplex: \"half\",\n credentials: isCredentialsSupported ? withCredentials : undefined\n });\n\n let response = await fetch(request, fetchOptions);\n\n const isStreamResponse = supportsResponseStream && (responseType === 'stream' || responseType === 'response');\n\n if (supportsResponseStream && (onDownloadProgress || (isStreamResponse && unsubscribe))) {\n const options = {};\n\n ['status', 'statusText', 'headers'].forEach(prop => {\n options[prop] = response[prop];\n });\n\n const responseContentLength = utils.toFiniteNumber(response.headers.get('content-length'));\n\n const [onProgress, flush] = onDownloadProgress && progressEventDecorator(\n responseContentLength,\n progressEventReducer(asyncDecorator(onDownloadProgress), true)\n ) || [];\n\n response = new Response(\n trackStream(response.body, DEFAULT_CHUNK_SIZE, onProgress, () => {\n flush && flush();\n unsubscribe && unsubscribe();\n }),\n options\n );\n }\n\n responseType = responseType || 'text';\n\n let responseData = await resolvers[utils.findKey(resolvers, responseType) || 'text'](response, config);\n\n !isStreamResponse && unsubscribe && unsubscribe();\n\n return await new Promise((resolve, reject) => {\n settle(resolve, reject, {\n data: responseData,\n headers: AxiosHeaders.from(response.headers),\n status: response.status,\n statusText: response.statusText,\n config,\n request\n })\n })\n } catch (err) {\n unsubscribe && unsubscribe();\n\n if (err && err.name === 'TypeError' && /Load failed|fetch/i.test(err.message)) {\n throw Object.assign(\n new AxiosError('Network Error', AxiosError.ERR_NETWORK, config, request),\n {\n cause: err.cause || err\n }\n )\n }\n\n throw AxiosError.from(err, err && err.code, config, request);\n }\n});\n\n\n","import utils from '../utils.js';\nimport httpAdapter from './http.js';\nimport xhrAdapter from './xhr.js';\nimport fetchAdapter from './fetch.js';\nimport AxiosError from \"../core/AxiosError.js\";\n\nconst knownAdapters = {\n http: httpAdapter,\n xhr: xhrAdapter,\n fetch: fetchAdapter\n}\n\nutils.forEach(knownAdapters, (fn, value) => {\n if (fn) {\n try {\n Object.defineProperty(fn, 'name', {value});\n } catch (e) {\n // eslint-disable-next-line no-empty\n }\n Object.defineProperty(fn, 'adapterName', {value});\n }\n});\n\nconst renderReason = (reason) => `- ${reason}`;\n\nconst isResolvedHandle = (adapter) => utils.isFunction(adapter) || adapter === null || adapter === false;\n\nexport default {\n getAdapter: (adapters) => {\n adapters = utils.isArray(adapters) ? adapters : [adapters];\n\n const {length} = adapters;\n let nameOrAdapter;\n let adapter;\n\n const rejectedReasons = {};\n\n for (let i = 0; i < length; i++) {\n nameOrAdapter = adapters[i];\n let id;\n\n adapter = nameOrAdapter;\n\n if (!isResolvedHandle(nameOrAdapter)) {\n adapter = knownAdapters[(id = String(nameOrAdapter)).toLowerCase()];\n\n if (adapter === undefined) {\n throw new AxiosError(`Unknown adapter '${id}'`);\n }\n }\n\n if (adapter) {\n break;\n }\n\n rejectedReasons[id || '#' + i] = adapter;\n }\n\n if (!adapter) {\n\n const reasons = Object.entries(rejectedReasons)\n .map(([id, state]) => `adapter ${id} ` +\n (state === false ? 'is not supported by the environment' : 'is not available in the build')\n );\n\n let s = length ?\n (reasons.length > 1 ? 'since :\\n' + reasons.map(renderReason).join('\\n') : ' ' + renderReason(reasons[0])) :\n 'as no adapter specified';\n\n throw new AxiosError(\n `There is no suitable adapter to dispatch the request ` + s,\n 'ERR_NOT_SUPPORT'\n );\n }\n\n return adapter;\n },\n adapters: knownAdapters\n}\n","// eslint-disable-next-line strict\nexport default null;\n","'use strict';\n\nimport transformData from './transformData.js';\nimport isCancel from '../cancel/isCancel.js';\nimport defaults from '../defaults/index.js';\nimport CanceledError from '../cancel/CanceledError.js';\nimport AxiosHeaders from '../core/AxiosHeaders.js';\nimport adapters from \"../adapters/adapters.js\";\n\n/**\n * Throws a `CanceledError` if cancellation has been requested.\n *\n * @param {Object} config The config that is to be used for the request\n *\n * @returns {void}\n */\nfunction throwIfCancellationRequested(config) {\n if (config.cancelToken) {\n config.cancelToken.throwIfRequested();\n }\n\n if (config.signal && config.signal.aborted) {\n throw new CanceledError(null, config);\n }\n}\n\n/**\n * Dispatch a request to the server using the configured adapter.\n *\n * @param {object} config The config that is to be used for the request\n *\n * @returns {Promise} The Promise to be fulfilled\n */\nexport default function dispatchRequest(config) {\n throwIfCancellationRequested(config);\n\n config.headers = AxiosHeaders.from(config.headers);\n\n // Transform request data\n config.data = transformData.call(\n config,\n config.transformRequest\n );\n\n if (['post', 'put', 'patch'].indexOf(config.method) !== -1) {\n config.headers.setContentType('application/x-www-form-urlencoded', false);\n }\n\n const adapter = adapters.getAdapter(config.adapter || defaults.adapter);\n\n return adapter(config).then(function onAdapterResolution(response) {\n throwIfCancellationRequested(config);\n\n // Transform response data\n response.data = transformData.call(\n config,\n config.transformResponse,\n response\n );\n\n response.headers = AxiosHeaders.from(response.headers);\n\n return response;\n }, function onAdapterRejection(reason) {\n if (!isCancel(reason)) {\n throwIfCancellationRequested(config);\n\n // Transform response data\n if (reason && reason.response) {\n reason.response.data = transformData.call(\n config,\n config.transformResponse,\n reason.response\n );\n reason.response.headers = AxiosHeaders.from(reason.response.headers);\n }\n }\n\n return Promise.reject(reason);\n });\n}\n","export const VERSION = \"1.10.0\";","'use strict';\n\nimport {VERSION} from '../env/data.js';\nimport AxiosError from '../core/AxiosError.js';\n\nconst validators = {};\n\n// eslint-disable-next-line func-names\n['object', 'boolean', 'number', 'function', 'string', 'symbol'].forEach((type, i) => {\n validators[type] = function validator(thing) {\n return typeof thing === type || 'a' + (i < 1 ? 'n ' : ' ') + type;\n };\n});\n\nconst deprecatedWarnings = {};\n\n/**\n * Transitional option validator\n *\n * @param {function|boolean?} validator - set to false if the transitional option has been removed\n * @param {string?} version - deprecated version / removed since version\n * @param {string?} message - some message with additional info\n *\n * @returns {function}\n */\nvalidators.transitional = function transitional(validator, version, message) {\n function formatMessage(opt, desc) {\n return '[Axios v' + VERSION + '] Transitional option \\'' + opt + '\\'' + desc + (message ? '. ' + message : '');\n }\n\n // eslint-disable-next-line func-names\n return (value, opt, opts) => {\n if (validator === false) {\n throw new AxiosError(\n formatMessage(opt, ' has been removed' + (version ? ' in ' + version : '')),\n AxiosError.ERR_DEPRECATED\n );\n }\n\n if (version && !deprecatedWarnings[opt]) {\n deprecatedWarnings[opt] = true;\n // eslint-disable-next-line no-console\n console.warn(\n formatMessage(\n opt,\n ' has been deprecated since v' + version + ' and will be removed in the near future'\n )\n );\n }\n\n return validator ? validator(value, opt, opts) : true;\n };\n};\n\nvalidators.spelling = function spelling(correctSpelling) {\n return (value, opt) => {\n // eslint-disable-next-line no-console\n console.warn(`${opt} is likely a misspelling of ${correctSpelling}`);\n return true;\n }\n};\n\n/**\n * Assert object's properties type\n *\n * @param {object} options\n * @param {object} schema\n * @param {boolean?} allowUnknown\n *\n * @returns {object}\n */\n\nfunction assertOptions(options, schema, allowUnknown) {\n if (typeof options !== 'object') {\n throw new AxiosError('options must be an object', AxiosError.ERR_BAD_OPTION_VALUE);\n }\n const keys = Object.keys(options);\n let i = keys.length;\n while (i-- > 0) {\n const opt = keys[i];\n const validator = schema[opt];\n if (validator) {\n const value = options[opt];\n const result = value === undefined || validator(value, opt, options);\n if (result !== true) {\n throw new AxiosError('option ' + opt + ' must be ' + result, AxiosError.ERR_BAD_OPTION_VALUE);\n }\n continue;\n }\n if (allowUnknown !== true) {\n throw new AxiosError('Unknown option ' + opt, AxiosError.ERR_BAD_OPTION);\n }\n }\n}\n\nexport default {\n assertOptions,\n validators\n};\n","'use strict';\n\nimport utils from './../utils.js';\nimport buildURL from '../helpers/buildURL.js';\nimport InterceptorManager from './InterceptorManager.js';\nimport dispatchRequest from './dispatchRequest.js';\nimport mergeConfig from './mergeConfig.js';\nimport buildFullPath from './buildFullPath.js';\nimport validator from '../helpers/validator.js';\nimport AxiosHeaders from './AxiosHeaders.js';\n\nconst validators = validator.validators;\n\n/**\n * Create a new instance of Axios\n *\n * @param {Object} instanceConfig The default config for the instance\n *\n * @return {Axios} A new instance of Axios\n */\nclass Axios {\n constructor(instanceConfig) {\n this.defaults = instanceConfig || {};\n this.interceptors = {\n request: new InterceptorManager(),\n response: new InterceptorManager()\n };\n }\n\n /**\n * Dispatch a request\n *\n * @param {String|Object} configOrUrl The config specific for this request (merged with this.defaults)\n * @param {?Object} config\n *\n * @returns {Promise} The Promise to be fulfilled\n */\n async request(configOrUrl, config) {\n try {\n return await this._request(configOrUrl, config);\n } catch (err) {\n if (err instanceof Error) {\n let dummy = {};\n\n Error.captureStackTrace ? Error.captureStackTrace(dummy) : (dummy = new Error());\n\n // slice off the Error: ... line\n const stack = dummy.stack ? dummy.stack.replace(/^.+\\n/, '') : '';\n try {\n if (!err.stack) {\n err.stack = stack;\n // match without the 2 top stack lines\n } else if (stack && !String(err.stack).endsWith(stack.replace(/^.+\\n.+\\n/, ''))) {\n err.stack += '\\n' + stack\n }\n } catch (e) {\n // ignore the case where \"stack\" is an un-writable property\n }\n }\n\n throw err;\n }\n }\n\n _request(configOrUrl, config) {\n /*eslint no-param-reassign:0*/\n // Allow for axios('example/url'[, config]) a la fetch API\n if (typeof configOrUrl === 'string') {\n config = config || {};\n config.url = configOrUrl;\n } else {\n config = configOrUrl || {};\n }\n\n config = mergeConfig(this.defaults, config);\n\n const {transitional, paramsSerializer, headers} = config;\n\n if (transitional !== undefined) {\n validator.assertOptions(transitional, {\n silentJSONParsing: validators.transitional(validators.boolean),\n forcedJSONParsing: validators.transitional(validators.boolean),\n clarifyTimeoutError: validators.transitional(validators.boolean)\n }, false);\n }\n\n if (paramsSerializer != null) {\n if (utils.isFunction(paramsSerializer)) {\n config.paramsSerializer = {\n serialize: paramsSerializer\n }\n } else {\n validator.assertOptions(paramsSerializer, {\n encode: validators.function,\n serialize: validators.function\n }, true);\n }\n }\n\n // Set config.allowAbsoluteUrls\n if (config.allowAbsoluteUrls !== undefined) {\n // do nothing\n } else if (this.defaults.allowAbsoluteUrls !== undefined) {\n config.allowAbsoluteUrls = this.defaults.allowAbsoluteUrls;\n } else {\n config.allowAbsoluteUrls = true;\n }\n\n validator.assertOptions(config, {\n baseUrl: validators.spelling('baseURL'),\n withXsrfToken: validators.spelling('withXSRFToken')\n }, true);\n\n // Set config.method\n config.method = (config.method || this.defaults.method || 'get').toLowerCase();\n\n // Flatten headers\n let contextHeaders = headers && utils.merge(\n headers.common,\n headers[config.method]\n );\n\n headers && utils.forEach(\n ['delete', 'get', 'head', 'post', 'put', 'patch', 'common'],\n (method) => {\n delete headers[method];\n }\n );\n\n config.headers = AxiosHeaders.concat(contextHeaders, headers);\n\n // filter out skipped interceptors\n const requestInterceptorChain = [];\n let synchronousRequestInterceptors = true;\n this.interceptors.request.forEach(function unshiftRequestInterceptors(interceptor) {\n if (typeof interceptor.runWhen === 'function' && interceptor.runWhen(config) === false) {\n return;\n }\n\n synchronousRequestInterceptors = synchronousRequestInterceptors && interceptor.synchronous;\n\n requestInterceptorChain.unshift(interceptor.fulfilled, interceptor.rejected);\n });\n\n const responseInterceptorChain = [];\n this.interceptors.response.forEach(function pushResponseInterceptors(interceptor) {\n responseInterceptorChain.push(interceptor.fulfilled, interceptor.rejected);\n });\n\n let promise;\n let i = 0;\n let len;\n\n if (!synchronousRequestInterceptors) {\n const chain = [dispatchRequest.bind(this), undefined];\n chain.unshift.apply(chain, requestInterceptorChain);\n chain.push.apply(chain, responseInterceptorChain);\n len = chain.length;\n\n promise = Promise.resolve(config);\n\n while (i < len) {\n promise = promise.then(chain[i++], chain[i++]);\n }\n\n return promise;\n }\n\n len = requestInterceptorChain.length;\n\n let newConfig = config;\n\n i = 0;\n\n while (i < len) {\n const onFulfilled = requestInterceptorChain[i++];\n const onRejected = requestInterceptorChain[i++];\n try {\n newConfig = onFulfilled(newConfig);\n } catch (error) {\n onRejected.call(this, error);\n break;\n }\n }\n\n try {\n promise = dispatchRequest.call(this, newConfig);\n } catch (error) {\n return Promise.reject(error);\n }\n\n i = 0;\n len = responseInterceptorChain.length;\n\n while (i < len) {\n promise = promise.then(responseInterceptorChain[i++], responseInterceptorChain[i++]);\n }\n\n return promise;\n }\n\n getUri(config) {\n config = mergeConfig(this.defaults, config);\n const fullPath = buildFullPath(config.baseURL, config.url, config.allowAbsoluteUrls);\n return buildURL(fullPath, config.params, config.paramsSerializer);\n }\n}\n\n// Provide aliases for supported request methods\nutils.forEach(['delete', 'get', 'head', 'options'], function forEachMethodNoData(method) {\n /*eslint func-names:0*/\n Axios.prototype[method] = function(url, config) {\n return this.request(mergeConfig(config || {}, {\n method,\n url,\n data: (config || {}).data\n }));\n };\n});\n\nutils.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) {\n /*eslint func-names:0*/\n\n function generateHTTPMethod(isForm) {\n return function httpMethod(url, data, config) {\n return this.request(mergeConfig(config || {}, {\n method,\n headers: isForm ? {\n 'Content-Type': 'multipart/form-data'\n } : {},\n url,\n data\n }));\n };\n }\n\n Axios.prototype[method] = generateHTTPMethod();\n\n Axios.prototype[method + 'Form'] = generateHTTPMethod(true);\n});\n\nexport default Axios;\n","'use strict';\n\nimport CanceledError from './CanceledError.js';\n\n/**\n * A `CancelToken` is an object that can be used to request cancellation of an operation.\n *\n * @param {Function} executor The executor function.\n *\n * @returns {CancelToken}\n */\nclass CancelToken {\n constructor(executor) {\n if (typeof executor !== 'function') {\n throw new TypeError('executor must be a function.');\n }\n\n let resolvePromise;\n\n this.promise = new Promise(function promiseExecutor(resolve) {\n resolvePromise = resolve;\n });\n\n const token = this;\n\n // eslint-disable-next-line func-names\n this.promise.then(cancel => {\n if (!token._listeners) return;\n\n let i = token._listeners.length;\n\n while (i-- > 0) {\n token._listeners[i](cancel);\n }\n token._listeners = null;\n });\n\n // eslint-disable-next-line func-names\n this.promise.then = onfulfilled => {\n let _resolve;\n // eslint-disable-next-line func-names\n const promise = new Promise(resolve => {\n token.subscribe(resolve);\n _resolve = resolve;\n }).then(onfulfilled);\n\n promise.cancel = function reject() {\n token.unsubscribe(_resolve);\n };\n\n return promise;\n };\n\n executor(function cancel(message, config, request) {\n if (token.reason) {\n // Cancellation has already been requested\n return;\n }\n\n token.reason = new CanceledError(message, config, request);\n resolvePromise(token.reason);\n });\n }\n\n /**\n * Throws a `CanceledError` if cancellation has been requested.\n */\n throwIfRequested() {\n if (this.reason) {\n throw this.reason;\n }\n }\n\n /**\n * Subscribe to the cancel signal\n */\n\n subscribe(listener) {\n if (this.reason) {\n listener(this.reason);\n return;\n }\n\n if (this._listeners) {\n this._listeners.push(listener);\n } else {\n this._listeners = [listener];\n }\n }\n\n /**\n * Unsubscribe from the cancel signal\n */\n\n unsubscribe(listener) {\n if (!this._listeners) {\n return;\n }\n const index = this._listeners.indexOf(listener);\n if (index !== -1) {\n this._listeners.splice(index, 1);\n }\n }\n\n toAbortSignal() {\n const controller = new AbortController();\n\n const abort = (err) => {\n controller.abort(err);\n };\n\n this.subscribe(abort);\n\n controller.signal.unsubscribe = () => this.unsubscribe(abort);\n\n return controller.signal;\n }\n\n /**\n * Returns an object that contains a new `CancelToken` and a function that, when called,\n * cancels the `CancelToken`.\n */\n static source() {\n let cancel;\n const token = new CancelToken(function executor(c) {\n cancel = c;\n });\n return {\n token,\n cancel\n };\n }\n}\n\nexport default CancelToken;\n","const HttpStatusCode = {\n Continue: 100,\n SwitchingProtocols: 101,\n Processing: 102,\n EarlyHints: 103,\n Ok: 200,\n Created: 201,\n Accepted: 202,\n NonAuthoritativeInformation: 203,\n NoContent: 204,\n ResetContent: 205,\n PartialContent: 206,\n MultiStatus: 207,\n AlreadyReported: 208,\n ImUsed: 226,\n MultipleChoices: 300,\n MovedPermanently: 301,\n Found: 302,\n SeeOther: 303,\n NotModified: 304,\n UseProxy: 305,\n Unused: 306,\n TemporaryRedirect: 307,\n PermanentRedirect: 308,\n BadRequest: 400,\n Unauthorized: 401,\n PaymentRequired: 402,\n Forbidden: 403,\n NotFound: 404,\n MethodNotAllowed: 405,\n NotAcceptable: 406,\n ProxyAuthenticationRequired: 407,\n RequestTimeout: 408,\n Conflict: 409,\n Gone: 410,\n LengthRequired: 411,\n PreconditionFailed: 412,\n PayloadTooLarge: 413,\n UriTooLong: 414,\n UnsupportedMediaType: 415,\n RangeNotSatisfiable: 416,\n ExpectationFailed: 417,\n ImATeapot: 418,\n MisdirectedRequest: 421,\n UnprocessableEntity: 422,\n Locked: 423,\n FailedDependency: 424,\n TooEarly: 425,\n UpgradeRequired: 426,\n PreconditionRequired: 428,\n TooManyRequests: 429,\n RequestHeaderFieldsTooLarge: 431,\n UnavailableForLegalReasons: 451,\n InternalServerError: 500,\n NotImplemented: 501,\n BadGateway: 502,\n ServiceUnavailable: 503,\n GatewayTimeout: 504,\n HttpVersionNotSupported: 505,\n VariantAlsoNegotiates: 506,\n InsufficientStorage: 507,\n LoopDetected: 508,\n NotExtended: 510,\n NetworkAuthenticationRequired: 511,\n};\n\nObject.entries(HttpStatusCode).forEach(([key, value]) => {\n HttpStatusCode[value] = key;\n});\n\nexport default HttpStatusCode;\n","'use strict';\n\nimport utils from './utils.js';\nimport bind from './helpers/bind.js';\nimport Axios from './core/Axios.js';\nimport mergeConfig from './core/mergeConfig.js';\nimport defaults from './defaults/index.js';\nimport formDataToJSON from './helpers/formDataToJSON.js';\nimport CanceledError from './cancel/CanceledError.js';\nimport CancelToken from './cancel/CancelToken.js';\nimport isCancel from './cancel/isCancel.js';\nimport {VERSION} from './env/data.js';\nimport toFormData from './helpers/toFormData.js';\nimport AxiosError from './core/AxiosError.js';\nimport spread from './helpers/spread.js';\nimport isAxiosError from './helpers/isAxiosError.js';\nimport AxiosHeaders from \"./core/AxiosHeaders.js\";\nimport adapters from './adapters/adapters.js';\nimport HttpStatusCode from './helpers/HttpStatusCode.js';\n\n/**\n * Create an instance of Axios\n *\n * @param {Object} defaultConfig The default config for the instance\n *\n * @returns {Axios} A new instance of Axios\n */\nfunction createInstance(defaultConfig) {\n const context = new Axios(defaultConfig);\n const instance = bind(Axios.prototype.request, context);\n\n // Copy axios.prototype to instance\n utils.extend(instance, Axios.prototype, context, {allOwnKeys: true});\n\n // Copy context to instance\n utils.extend(instance, context, null, {allOwnKeys: true});\n\n // Factory for creating new instances\n instance.create = function create(instanceConfig) {\n return createInstance(mergeConfig(defaultConfig, instanceConfig));\n };\n\n return instance;\n}\n\n// Create the default instance to be exported\nconst axios = createInstance(defaults);\n\n// Expose Axios class to allow class inheritance\naxios.Axios = Axios;\n\n// Expose Cancel & CancelToken\naxios.CanceledError = CanceledError;\naxios.CancelToken = CancelToken;\naxios.isCancel = isCancel;\naxios.VERSION = VERSION;\naxios.toFormData = toFormData;\n\n// Expose AxiosError class\naxios.AxiosError = AxiosError;\n\n// alias for CanceledError for backward compatibility\naxios.Cancel = axios.CanceledError;\n\n// Expose all/spread\naxios.all = function all(promises) {\n return Promise.all(promises);\n};\n\naxios.spread = spread;\n\n// Expose isAxiosError\naxios.isAxiosError = isAxiosError;\n\n// Expose mergeConfig\naxios.mergeConfig = mergeConfig;\n\naxios.AxiosHeaders = AxiosHeaders;\n\naxios.formToJSON = thing => formDataToJSON(utils.isHTMLForm(thing) ? new FormData(thing) : thing);\n\naxios.getAdapter = adapters.getAdapter;\n\naxios.HttpStatusCode = HttpStatusCode;\n\naxios.default = axios;\n\n// this module should only have a default export\nexport default axios\n","'use strict';\n\n/**\n * Syntactic sugar for invoking a function and expanding an array for arguments.\n *\n * Common use case would be to use `Function.prototype.apply`.\n *\n * ```js\n * function f(x, y, z) {}\n * var args = [1, 2, 3];\n * f.apply(null, args);\n * ```\n *\n * With `spread` this example can be re-written.\n *\n * ```js\n * spread(function(x, y, z) {})([1, 2, 3]);\n * ```\n *\n * @param {Function} callback\n *\n * @returns {Function}\n */\nexport default function spread(callback) {\n return function wrap(arr) {\n return callback.apply(null, arr);\n };\n}\n","'use strict';\n\nimport utils from './../utils.js';\n\n/**\n * Determines whether the payload is an error thrown by Axios\n *\n * @param {*} payload The value to test\n *\n * @returns {boolean} True if the payload is an error thrown by Axios, otherwise false\n */\nexport default function isAxiosError(payload) {\n return utils.isObject(payload) && (payload.isAxiosError === true);\n}\n","import axios from './lib/axios.js';\n\n// This module is intended to unwrap Axios default export as named.\n// Keep top-level export same with static properties\n// so that it can keep same with es module or cjs\nconst {\n Axios,\n AxiosError,\n CanceledError,\n isCancel,\n CancelToken,\n VERSION,\n all,\n Cancel,\n isAxiosError,\n spread,\n toFormData,\n AxiosHeaders,\n HttpStatusCode,\n formToJSON,\n getAdapter,\n mergeConfig\n} = axios;\n\nexport {\n axios as default,\n Axios,\n AxiosError,\n CanceledError,\n isCancel,\n CancelToken,\n VERSION,\n all,\n Cancel,\n isAxiosError,\n spread,\n toFormData,\n AxiosHeaders,\n HttpStatusCode,\n formToJSON,\n getAdapter,\n mergeConfig\n}\n"],"names":["bind","fn","thisArg","apply","arguments","toString","Object","prototype","getPrototypeOf","iterator","toStringTag","Symbol","kindOf","cache","create","thing","str","call","slice","toLowerCase","kindOfTest","type","typeOfTest","isArray","Array","isUndefined","isArrayBuffer","isString","isFunction","isNumber","isObject","isPlainObject","val","isDate","isFile","isBlob","isFileList","isURLSearchParams","isReadableStream","isRequest","isResponse","isHeaders","map","forEach","obj","allOwnKeys","i","l","length","keys","getOwnPropertyNames","len","key","findKey","_key","_global","globalThis","self","window","global","isContextDefined","context","isTypedArray","TypedArray","Uint8Array","isHTMLForm","hasOwnProperty","prop","isRegExp","reduceDescriptors","reducer","descriptors","getOwnPropertyDescriptors","reducedDescriptors","descriptor","name","ret","defineProperties","isAsyncFn","_setImmediate","setImmediateSupported","setImmediate","postMessageSupported","postMessage","token","Math","random","callbacks","addEventListener","source","data","shift","cb","push","setTimeout","asap","queueMicrotask","process","nextTick","utils$1","isBuffer","constructor","isFormData","kind","FormData","append","isArrayBufferView","result","ArrayBuffer","isView","buffer","isBoolean","isStream","pipe","merge","caseless","this","assignValue","targetKey","extend","a","b","trim","replace","stripBOM","content","charCodeAt","inherits","superConstructor","props","defineProperty","value","assign","toFlatObject","sourceObj","destObj","filter","propFilter","merged","endsWith","searchString","position","String","undefined","lastIndex","indexOf","toArray","arr","forEachEntry","_iterator","next","done","pair","matchAll","regExp","matches","exec","hasOwnProp","freezeMethods","enumerable","writable","set","Error","toObjectSet","arrayOrString","delimiter","define","split","toCamelCase","m","p1","p2","toUpperCase","noop","toFiniteNumber","defaultValue","Number","isFinite","isSpecCompliantForm","toJSONObject","stack","visit","target","reducedValue","isThenable","then","catch","isIterable","AxiosError","message","code","config","request","response","captureStackTrace","status","utils","toJSON","description","number","fileName","lineNumber","columnNumber","from","error","customProps","axiosError","cause","isVisitable","removeBrackets","renderKey","path","dots","concat","join","predicates","test","toFormData","formData","options","TypeError","metaTokens","indexes","option","visitor","defaultVisitor","useBlob","Blob","convertValue","toISOString","Buffer","JSON","stringify","some","isFlatArray","el","index","exposedHelpers","build","pop","encode","charMap","encodeURIComponent","match","AxiosURLSearchParams","params","_pairs","buildURL","url","_encode","serialize","serializeFn","serializedParams","hashmarkIndex","encoder","InterceptorManager$1","handlers","use","fulfilled","rejected","synchronous","runWhen","eject","id","clear","h","transitionalDefaults","silentJSONParsing","forcedJSONParsing","clarifyTimeoutError","platform$1","isBrowser","classes","URLSearchParams","protocols","hasBrowserEnv","document","_navigator","navigator","hasStandardBrowserEnv","product","hasStandardBrowserWebWorkerEnv","WorkerGlobalScope","importScripts","origin","location","href","platform","formDataToJSON","buildPath","isNumericKey","isLast","arrayToObject","entries","parsePropPath","defaults","transitional","adapter","transformRequest","headers","contentType","getContentType","hasJSONContentType","isObjectPayload","setContentType","helpers","isNode","toURLEncodedForm","formSerializer","_FormData","env","rawValue","parser","parse","e","stringifySafely","transformResponse","JSONRequested","responseType","strictJSONParsing","ERR_BAD_RESPONSE","timeout","xsrfCookieName","xsrfHeaderName","maxContentLength","maxBodyLength","validateStatus","common","Accept","method","defaults$1","ignoreDuplicateOf","$internals","normalizeHeader","header","normalizeValue","matchHeaderValue","isHeaderNameFilter","AxiosHeaders","valueOrRewrite","rewrite","setHeader","_value","_header","_rewrite","lHeader","setHeaders","rawHeaders","parsed","line","substring","parseHeaders","dest","entry","get","tokens","tokensRE","parseTokens","has","matcher","delete","deleted","deleteHeader","normalize","format","normalized","w","char","formatHeader","targets","asStrings","getSetCookie","static","first","computed","accessors","defineAccessor","accessorName","methodName","arg1","arg2","arg3","configurable","buildAccessors","accessor","mapped","headerValue","AxiosHeaders$2","transformData","fns","isCancel","__CANCEL__","CanceledError","ERR_CANCELED","settle","resolve","reject","ERR_BAD_REQUEST","floor","progressEventReducer","listener","isDownloadStream","freq","bytesNotified","_speedometer","samplesCount","min","bytes","timestamps","firstSampleTS","head","tail","chunkLength","now","Date","startedAt","bytesCount","passed","round","speedometer","lastArgs","timer","timestamp","threshold","invoke","args","clearTimeout","throttle","loaded","total","lengthComputable","progressBytes","rate","progress","estimated","event","progressEventDecorator","throttled","asyncDecorator","isURLSameOrigin","isMSIE","URL","protocol","host","port","userAgent","cookies","write","expires","domain","secure","cookie","toGMTString","read","RegExp","decodeURIComponent","remove","buildFullPath","baseURL","requestedURL","allowAbsoluteUrls","isRelativeUrl","relativeURL","combineURLs","headersToObject","mergeConfig","config1","config2","getMergedValue","mergeDeepProperties","valueFromConfig2","defaultToConfig2","mergeDirectKeys","mergeMap","paramsSerializer","timeoutMessage","withCredentials","withXSRFToken","onUploadProgress","onDownloadProgress","decompress","beforeRedirect","transport","httpAgent","httpsAgent","cancelToken","socketPath","responseEncoding","configValue","resolveConfig","newConfig","auth","btoa","username","password","unescape","Boolean","xsrfValue","xhrAdapter","XMLHttpRequest","Promise","_config","requestData","requestHeaders","onCanceled","uploadThrottled","downloadThrottled","flushUpload","flushDownload","unsubscribe","signal","removeEventListener","onloadend","responseHeaders","getAllResponseHeaders","err","responseText","statusText","open","onreadystatechange","readyState","responseURL","onabort","ECONNABORTED","onerror","ERR_NETWORK","ontimeout","timeoutErrorMessage","ETIMEDOUT","setRequestHeader","upload","cancel","abort","subscribe","aborted","parseProtocol","send","composeSignals$1","signals","controller","AbortController","reason","streamChunk","chunk","chunkSize","byteLength","end","pos","readStream","async","stream","asyncIterator","reader","getReader","trackStream","onProgress","onFinish","iterable","readBytes","_onFinish","ReadableStream","close","loadedBytes","enqueue","return","highWaterMark","isFetchSupported","fetch","Request","Response","isReadableStreamSupported","encodeText","TextEncoder","arrayBuffer","supportsRequestStream","duplexAccessed","hasContentType","body","duplex","supportsResponseStream","resolvers","res","_","ERR_NOT_SUPPORT","resolveBodyLength","getContentLength","size","_request","getBodyLength","knownAdapters","http","xhr","fetchOptions","composedSignal","composeSignals","toAbortSignal","requestContentLength","contentTypeHeader","flush","isCredentialsSupported","credentials","isStreamResponse","responseContentLength","responseData","renderReason","isResolvedHandle","adapters","nameOrAdapter","rejectedReasons","reasons","state","throwIfCancellationRequested","throwIfRequested","dispatchRequest","validators","deprecatedWarnings","validator","version","formatMessage","opt","desc","opts","ERR_DEPRECATED","console","warn","spelling","correctSpelling","assertOptions","schema","allowUnknown","ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","Axios","instanceConfig","interceptors","InterceptorManager","configOrUrl","dummy","boolean","function","baseUrl","withXsrfToken","contextHeaders","requestInterceptorChain","synchronousRequestInterceptors","interceptor","unshift","responseInterceptorChain","promise","chain","onFulfilled","onRejected","getUri","generateHTTPMethod","isForm","Axios$2","CancelToken","executor","resolvePromise","_listeners","onfulfilled","_resolve","splice","c","CancelToken$2","HttpStatusCode","Continue","SwitchingProtocols","Processing","EarlyHints","Ok","Created","Accepted","NonAuthoritativeInformation","NoContent","ResetContent","PartialContent","MultiStatus","AlreadyReported","ImUsed","MultipleChoices","MovedPermanently","Found","SeeOther","NotModified","UseProxy","Unused","TemporaryRedirect","PermanentRedirect","BadRequest","Unauthorized","PaymentRequired","Forbidden","NotFound","MethodNotAllowed","NotAcceptable","ProxyAuthenticationRequired","RequestTimeout","Conflict","Gone","LengthRequired","PreconditionFailed","PayloadTooLarge","UriTooLong","UnsupportedMediaType","RangeNotSatisfiable","ExpectationFailed","ImATeapot","MisdirectedRequest","UnprocessableEntity","Locked","FailedDependency","TooEarly","UpgradeRequired","PreconditionRequired","TooManyRequests","RequestHeaderFieldsTooLarge","UnavailableForLegalReasons","InternalServerError","NotImplemented","BadGateway","ServiceUnavailable","GatewayTimeout","HttpVersionNotSupported","VariantAlsoNegotiates","InsufficientStorage","LoopDetected","NotExtended","NetworkAuthenticationRequired","HttpStatusCode$2","axios","createInstance","defaultConfig","instance","VERSION","Cancel","all","promises","spread","callback","isAxiosError","payload","formToJSON","getAdapter","default","axios$1"],"mappings":";AAEe,SAASA,EAAKC,EAAIC,GAC/B,OAAO,WACL,OAAOD,EAAGE,MAAMD,EAASE,UAC7B,CACA,CCAA,MAAMC,SAACA,GAAYC,OAAOC,WACpBC,eAACA,GAAkBF,QACnBG,SAACA,EAAQC,YAAEA,GA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WAAaA,EAGnB8hB,GAAMK,OAASL,GAAMlV,cAGrBkV,GAAMM,IAAM,SAAaC,GACvB,OAAO7O,QAAQ4O,IAAIC,EACrB,EAEAP,GAAMQ,OC9CS,SAAgBC,GAC7B,OAAO,SAAchlB,GACnB,OAAOglB,EAAShuB,MAAM,KAAMgJ,EAChC,CACA,ED6CAukB,GAAMU,aE7DS,SAAsBC,GACnC,OAAOjiB,EAAMtK,SAASusB,KAAsC,IAAzBA,EAAQD,YAC7C,EF8DAV,GAAMzQ,YAAcA,GAEpByQ,GAAMxY,aAAeA,GAErBwY,GAAMY,WAAavtB,GAASiR,GAAe5F,EAAMnI,WAAWlD,GAAS,IAAIyF,SAASzF,GAASA,GAE3F2sB,GAAMa,WAAazI,GAEnB4H,GAAMjE,eAAiBA,GAEvBiE,GAAMc,QAAUd,GAGhB,MAAee,GAAAf,IGnFTlG,MACJA,GAAK5b,WACLA,GAAU4M,cACVA,GAAaF,SACbA,GAAQ0Q,YACRA,GAAW8E,QACXA,GAAOE,IACPA,GAAGD,OACHA,GAAMK,aACNA,GAAYF,OACZA,GAAMzgB,WACNA,GAAUyH,aACVA,GAAYuU,eACZA,GAAc6E,WACdA,GAAUC,WACVA,GAAUtR,YACVA,IACEyQ"} node_modules/axios/dist/esm/axios.js 0000664 00000277343 15114741631 0013601 0 ustar 00 /*! Axios v1.10.0 Copyright (c) 2025 Matt Zabriskie and contributors */ function bind(fn, thisArg) { return function wrap() { return fn.apply(thisArg, arguments); }; } // utils is a library of generic helper functions non-specific to axios const {toString} = Object.prototype; const {getPrototypeOf} = Object; const {iterator, toStringTag} = Symbol; const kindOf = (cache => thing => { const str = toString.call(thing); return cache[str] || (cache[str] = str.slice(8, -1).toLowerCase()); })(Object.create(null)); const kindOfTest = (type) => { type = type.toLowerCase(); return (thing) => kindOf(thing) === type }; const typeOfTest = type => thing => typeof thing === type; /** * Determine if a value is an Array * * @param {Object} val The value to test * * @returns {boolean} True if value is an Array, otherwise false */ const {isArray} = Array; /** * Determine if a value is undefined * * @param {*} val The value to test * * @returns {boolean} True if the value is undefined, otherwise false */ const isUndefined = typeOfTest('undefined'); /** * Determine if a value is a Buffer * * @param {*} val The value to test * * @returns {boolean} True if value is a Buffer, otherwise false */ function isBuffer(val) { return val !== null && !isUndefined(val) && val.constructor !== null && !isUndefined(val.constructor) && isFunction(val.constructor.isBuffer) && val.constructor.isBuffer(val); } /** * Determine if a value is an ArrayBuffer * * @param {*} val The value to test * * @returns {boolean} True if value is an ArrayBuffer, otherwise false */ const isArrayBuffer = kindOfTest('ArrayBuffer'); /** * Determine if a value is a view on an ArrayBuffer * * @param {*} val The value to test * * @returns {boolean} True if value is a view on an ArrayBuffer, otherwise false */ function isArrayBufferView(val) { let result; if ((typeof ArrayBuffer !== 'undefined') && (ArrayBuffer.isView)) { result = ArrayBuffer.isView(val); } else { result = (val) && (val.buffer) && (isArrayBuffer(val.buffer)); } return result; } /** * Determine if a value is a String * * @param {*} val The value to test * * @returns {boolean} True if value is a String, otherwise false */ const isString = typeOfTest('string'); /** * Determine if a value is a Function * * @param {*} val The value to test * @returns {boolean} True if value is a Function, otherwise false */ const isFunction = typeOfTest('function'); /** * Determine if a value is a Number * * @param {*} val The value to test * * @returns {boolean} True if value is a Number, otherwise false */ const isNumber = typeOfTest('number'); /** * Determine if a value is an Object * * @param {*} thing The value to test * * @returns {boolean} True if value is an Object, otherwise false */ const isObject = (thing) => thing !== null && typeof thing === 'object'; /** * Determine if a value is a Boolean * * @param {*} thing The value to test * @returns {boolean} True if value is a Boolean, otherwise false */ const isBoolean = thing => thing === true || thing === false; /** * Determine if a value is a plain Object * * @param {*} val The value to test * * @returns {boolean} True if value is a plain Object, otherwise false */ const isPlainObject = (val) => { if (kindOf(val) !== 'object') { return false; } const prototype = getPrototypeOf(val); return (prototype === null || prototype === Object.prototype || Object.getPrototypeOf(prototype) === null) && !(toStringTag in val) && !(iterator in val); }; /** * Determine if a value is a Date * * @param {*} val The value to test * * @returns {boolean} True if value is a Date, otherwise false */ const isDate = kindOfTest('Date'); /** * Determine if a value is a File * * @param {*} val The value to test * * @returns {boolean} True if value is a File, otherwise false */ const isFile = kindOfTest('File'); /** * Determine if a value is a Blob * * @param {*} val The value to test * * @returns {boolean} True if value is a Blob, otherwise false */ const isBlob = kindOfTest('Blob'); /** * Determine if a value is a FileList * * @param {*} val The value to test * * @returns {boolean} True if value is a File, otherwise false */ const isFileList = kindOfTest('FileList'); /** * Determine if a value is a Stream * * @param {*} val The value to test * * @returns {boolean} True if value is a Stream, otherwise false */ const isStream = (val) => isObject(val) && isFunction(val.pipe); /** * Determine if a value is a FormData * * @param {*} thing The value to test * * @returns {boolean} True if value is an FormData, otherwise false */ const isFormData = (thing) => { let kind; return thing && ( (typeof FormData === 'function' && thing instanceof FormData) || ( isFunction(thing.append) && ( (kind = kindOf(thing)) === 'formdata' || // detect form-data instance (kind === 'object' && isFunction(thing.toString) && thing.toString() === '[object FormData]') ) ) ) }; /** * Determine if a value is a URLSearchParams object * * @param {*} val The value to test * * @returns {boolean} True if value is a URLSearchParams object, otherwise false */ const isURLSearchParams = kindOfTest('URLSearchParams'); const [isReadableStream, isRequest, isResponse, isHeaders] = ['ReadableStream', 'Request', 'Response', 'Headers'].map(kindOfTest); /** * Trim excess whitespace off the beginning and end of a string * * @param {String} str The String to trim * * @returns {String} The String freed of excess whitespace */ const trim = (str) => str.trim ? str.trim() : str.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, ''); /** * Iterate over an Array or an Object invoking a function for each item. * * If `obj` is an Array callback will be called passing * the value, index, and complete array for each item. * * If 'obj' is an Object callback will be called passing * the value, key, and complete object for each property. * * @param {Object|Array} obj The object to iterate * @param {Function} fn The callback to invoke for each item * * @param {Boolean} [allOwnKeys = false] * @returns {any} */ function forEach(obj, fn, {allOwnKeys = false} = {}) { // Don't bother if no value provided if (obj === null || typeof obj === 'undefined') { return; } let i; let l; // Force an array if not already something iterable if (typeof obj !== 'object') { /*eslint no-param-reassign:0*/ obj = [obj]; } if (isArray(obj)) { // Iterate over array values for (i = 0, l = obj.length; i < l; i++) { fn.call(null, obj[i], i, obj); } } else { // Iterate over object keys const keys = allOwnKeys ? Object.getOwnPropertyNames(obj) : Object.keys(obj); const len = keys.length; let key; for (i = 0; i < len; i++) { key = keys[i]; fn.call(null, obj[key], key, obj); } } } function findKey(obj, key) { key = key.toLowerCase(); const keys = Object.keys(obj); let i = keys.length; let _key; while (i-- > 0) { _key = keys[i]; if (key === _key.toLowerCase()) { return _key; } } return null; } const _global = (() => { /*eslint no-undef:0*/ if (typeof globalThis !== "undefined") return globalThis; return typeof self !== "undefined" ? self : (typeof window !== 'undefined' ? window : global) })(); const isContextDefined = (context) => !isUndefined(context) && context !== _global; /** * Accepts varargs expecting each argument to be an object, then * immutably merges the properties of each object and returns result. * * When multiple objects contain the same key the later object in * the arguments list will take precedence. * * Example: * * ```js * var result = merge({foo: 123}, {foo: 456}); * console.log(result.foo); // outputs 456 * ``` * * @param {Object} obj1 Object to merge * * @returns {Object} Result of all merge properties */ function merge(/* obj1, obj2, obj3, ... */) { const {caseless} = isContextDefined(this) && this || {}; const result = {}; const assignValue = (val, key) => { const targetKey = caseless && findKey(result, key) || key; if (isPlainObject(result[targetKey]) && isPlainObject(val)) { result[targetKey] = merge(result[targetKey], val); } else if (isPlainObject(val)) { result[targetKey] = merge({}, val); } else if (isArray(val)) { result[targetKey] = val.slice(); } else { result[targetKey] = val; } }; for (let i = 0, l = arguments.length; i < l; i++) { arguments[i] && forEach(arguments[i], assignValue); } return result; } /** * Extends object a by mutably adding to it the properties of object b. * * @param {Object} a The object to be extended * @param {Object} b The object to copy properties from * @param {Object} thisArg The object to bind function to * * @param {Boolean} [allOwnKeys] * @returns {Object} The resulting value of object a */ const extend = (a, b, thisArg, {allOwnKeys}= {}) => { forEach(b, (val, key) => { if (thisArg && isFunction(val)) { a[key] = bind(val, thisArg); } else { a[key] = val; } }, {allOwnKeys}); return a; }; /** * Remove byte order marker. This catches EF BB BF (the UTF-8 BOM) * * @param {string} content with BOM * * @returns {string} content value without BOM */ const stripBOM = (content) => { if (content.charCodeAt(0) === 0xFEFF) { content = content.slice(1); } return content; }; /** * Inherit the prototype methods from one constructor into another * @param {function} constructor * @param {function} superConstructor * @param {object} [props] * @param {object} [descriptors] * * @returns {void} */ const inherits = (constructor, superConstructor, props, descriptors) => { constructor.prototype = Object.create(superConstructor.prototype, descriptors); constructor.prototype.constructor = constructor; Object.defineProperty(constructor, 'super', { value: superConstructor.prototype }); props && Object.assign(constructor.prototype, props); }; /** * Resolve object with deep prototype chain to a flat object * @param {Object} sourceObj source object * @param {Object} [destObj] * @param {Function|Boolean} [filter] * @param {Function} [propFilter] * * @returns {Object} */ const toFlatObject = (sourceObj, destObj, filter, propFilter) => { let props; let i; let prop; const merged = {}; destObj = destObj || {}; // eslint-disable-next-line no-eq-null,eqeqeq if (sourceObj == null) return destObj; do { props = Object.getOwnPropertyNames(sourceObj); i = props.length; while (i-- > 0) { prop = props[i]; if ((!propFilter || propFilter(prop, sourceObj, destObj)) && !merged[prop]) { destObj[prop] = sourceObj[prop]; merged[prop] = true; } } sourceObj = filter !== false && getPrototypeOf(sourceObj); } while (sourceObj && (!filter || filter(sourceObj, destObj)) && sourceObj !== Object.prototype); return destObj; }; /** * Determines whether a string ends with the characters of a specified string * * @param {String} str * @param {String} searchString * @param {Number} [position= 0] * * @returns {boolean} */ const endsWith = (str, searchString, position) => { str = String(str); if (position === undefined || position > str.length) { position = str.length; } position -= searchString.length; const lastIndex = str.indexOf(searchString, position); return lastIndex !== -1 && lastIndex === position; }; /** * Returns new array from array like object or null if failed * * @param {*} [thing] * * @returns {?Array} */ const toArray = (thing) => { if (!thing) return null; if (isArray(thing)) return thing; let i = thing.length; if (!isNumber(i)) return null; const arr = new Array(i); while (i-- > 0) { arr[i] = thing[i]; } return arr; }; /** * Checking if the Uint8Array exists and if it does, it returns a function that checks if the * thing passed in is an instance of Uint8Array * * @param {TypedArray} * * @returns {Array} */ // eslint-disable-next-line func-names const isTypedArray = (TypedArray => { // eslint-disable-next-line func-names return thing => { return TypedArray && thing instanceof TypedArray; }; })(typeof Uint8Array !== 'undefined' && getPrototypeOf(Uint8Array)); /** * For each entry in the object, call the function with the key and value. * * @param {Object<any, any>} obj - The object to iterate over. * @param {Function} fn - The function to call for each entry. * * @returns {void} */ const forEachEntry = (obj, fn) => { const generator = obj && obj[iterator]; const _iterator = generator.call(obj); let result; while ((result = _iterator.next()) && !result.done) { const pair = result.value; fn.call(obj, pair[0], pair[1]); } }; /** * It takes a regular expression and a string, and returns an array of all the matches * * @param {string} regExp - The regular expression to match against. * @param {string} str - The string to search. * * @returns {Array<boolean>} */ const matchAll = (regExp, str) => { let matches; const arr = []; while ((matches = regExp.exec(str)) !== null) { arr.push(matches); } return arr; }; /* Checking if the kindOfTest function returns true when passed an HTMLFormElement. */ const isHTMLForm = kindOfTest('HTMLFormElement'); const toCamelCase = str => { return str.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g, function replacer(m, p1, p2) { return p1.toUpperCase() + p2; } ); }; /* Creating a function that will check if an object has a property. */ const hasOwnProperty = (({hasOwnProperty}) => (obj, prop) => hasOwnProperty.call(obj, prop))(Object.prototype); /** * Determine if a value is a RegExp object * * @param {*} val The value to test * * @returns {boolean} True if value is a RegExp object, otherwise false */ const isRegExp = kindOfTest('RegExp'); const reduceDescriptors = (obj, reducer) => { const descriptors = Object.getOwnPropertyDescriptors(obj); const reducedDescriptors = {}; forEach(descriptors, (descriptor, name) => { let ret; if ((ret = reducer(descriptor, name, obj)) !== false) { reducedDescriptors[name] = ret || descriptor; } }); Object.defineProperties(obj, reducedDescriptors); }; /** * Makes all methods read-only * @param {Object} obj */ const freezeMethods = (obj) => { reduceDescriptors(obj, (descriptor, name) => { // skip restricted props in strict mode if (isFunction(obj) && ['arguments', 'caller', 'callee'].indexOf(name) !== -1) { return false; } const value = obj[name]; if (!isFunction(value)) return; descriptor.enumerable = false; if ('writable' in descriptor) { descriptor.writable = false; return; } if (!descriptor.set) { descriptor.set = () => { throw Error('Can not rewrite read-only method \'' + name + '\''); }; } }); }; const toObjectSet = (arrayOrString, delimiter) => { const obj = {}; const define = (arr) => { arr.forEach(value => { obj[value] = true; }); }; isArray(arrayOrString) ? define(arrayOrString) : define(String(arrayOrString).split(delimiter)); return obj; }; const noop = () => {}; const toFiniteNumber = (value, defaultValue) => { return value != null && Number.isFinite(value = +value) ? value : defaultValue; }; /** * If the thing is a FormData object, return true, otherwise return false. * * @param {unknown} thing - The thing to check. * * @returns {boolean} */ function isSpecCompliantForm(thing) { return !!(thing && isFunction(thing.append) && thing[toStringTag] === 'FormData' && thing[iterator]); } const toJSONObject = (obj) => { const stack = new Array(10); const visit = (source, i) => { if (isObject(source)) { if (stack.indexOf(source) >= 0) { return; } if(!('toJSON' in source)) { stack[i] = source; const target = isArray(source) ? [] : {}; forEach(source, (value, key) => { const reducedValue = visit(value, i + 1); !isUndefined(reducedValue) && (target[key] = reducedValue); }); stack[i] = undefined; return target; } } return source; }; return visit(obj, 0); }; const isAsyncFn = kindOfTest('AsyncFunction'); const isThenable = (thing) => thing && (isObject(thing) || isFunction(thing)) && isFunction(thing.then) && isFunction(thing.catch); // original code // https://github.com/DigitalBrainJS/AxiosPromise/blob/16deab13710ec09779922131f3fa5954320f83ab/lib/utils.js#L11-L34 const _setImmediate = ((setImmediateSupported, postMessageSupported) => { if (setImmediateSupported) { return setImmediate; } return postMessageSupported ? ((token, callbacks) => { _global.addEventListener("message", ({source, data}) => { if (source === _global && data === token) { callbacks.length && callbacks.shift()(); } }, false); return (cb) => { callbacks.push(cb); _global.postMessage(token, "*"); } })(`axios@${Math.random()}`, []) : (cb) => setTimeout(cb); })( typeof setImmediate === 'function', isFunction(_global.postMessage) ); const asap = typeof queueMicrotask !== 'undefined' ? queueMicrotask.bind(_global) : ( typeof process !== 'undefined' && process.nextTick || _setImmediate); // ********************* const isIterable = (thing) => thing != null && isFunction(thing[iterator]); const utils$1 = { isArray, isArrayBuffer, isBuffer, isFormData, isArrayBufferView, isString, isNumber, isBoolean, isObject, isPlainObject, isReadableStream, isRequest, isResponse, isHeaders, isUndefined, isDate, isFile, isBlob, isRegExp, isFunction, isStream, isURLSearchParams, isTypedArray, isFileList, forEach, merge, extend, trim, stripBOM, inherits, toFlatObject, kindOf, kindOfTest, endsWith, toArray, forEachEntry, matchAll, isHTMLForm, hasOwnProperty, hasOwnProp: hasOwnProperty, // an alias to avoid ESLint no-prototype-builtins detection reduceDescriptors, freezeMethods, toObjectSet, toCamelCase, noop, toFiniteNumber, findKey, global: _global, isContextDefined, isSpecCompliantForm, toJSONObject, isAsyncFn, isThenable, setImmediate: _setImmediate, asap, isIterable }; /** * Create an Error with the specified message, config, error code, request and response. * * @param {string} message The error message. * @param {string} [code] The error code (for example, 'ECONNABORTED'). * @param {Object} [config] The config. * @param {Object} [request] The request. * @param {Object} [response] The response. * * @returns {Error} The created error. */ function AxiosError$1(message, code, config, request, response) { Error.call(this); if (Error.captureStackTrace) { Error.captureStackTrace(this, this.constructor); } else { this.stack = (new Error()).stack; } this.message = message; this.name = 'AxiosError'; code && (this.code = code); config && (this.config = config); request && (this.request = request); if (response) { this.response = response; this.status = response.status ? response.status : null; } } utils$1.inherits(AxiosError$1, Error, { toJSON: function toJSON() { return { // Standard message: this.message, name: this.name, // Microsoft description: this.description, number: this.number, // Mozilla fileName: this.fileName, lineNumber: this.lineNumber, columnNumber: this.columnNumber, stack: this.stack, // Axios config: utils$1.toJSONObject(this.config), code: this.code, status: this.status }; } }); const prototype$1 = AxiosError$1.prototype; const descriptors = {}; [ 'ERR_BAD_OPTION_VALUE', 'ERR_BAD_OPTION', 'ECONNABORTED', 'ETIMEDOUT', 'ERR_NETWORK', 'ERR_FR_TOO_MANY_REDIRECTS', 'ERR_DEPRECATED', 'ERR_BAD_RESPONSE', 'ERR_BAD_REQUEST', 'ERR_CANCELED', 'ERR_NOT_SUPPORT', 'ERR_INVALID_URL' // eslint-disable-next-line func-names ].forEach(code => { descriptors[code] = {value: code}; }); Object.defineProperties(AxiosError$1, descriptors); Object.defineProperty(prototype$1, 'isAxiosError', {value: true}); // eslint-disable-next-line func-names AxiosError$1.from = (error, code, config, request, response, customProps) => { const axiosError = Object.create(prototype$1); utils$1.toFlatObject(error, axiosError, function filter(obj) { return obj !== Error.prototype; }, prop => { return prop !== 'isAxiosError'; }); AxiosError$1.call(axiosError, error.message, code, config, request, response); axiosError.cause = error; axiosError.name = error.name; customProps && Object.assign(axiosError, customProps); return axiosError; }; // eslint-disable-next-line strict const httpAdapter = null; /** * Determines if the given thing is a array or js object. * * @param {string} thing - The object or array to be visited. * * @returns {boolean} */ function isVisitable(thing) { return utils$1.isPlainObject(thing) || utils$1.isArray(thing); } /** * It removes the brackets from the end of a string * * @param {string} key - The key of the parameter. * * @returns {string} the key without the brackets. */ function removeBrackets(key) { return utils$1.endsWith(key, '[]') ? key.slice(0, -2) : key; } /** * It takes a path, a key, and a boolean, and returns a string * * @param {string} path - The path to the current key. * @param {string} key - The key of the current object being iterated over. * @param {string} dots - If true, the key will be rendered with dots instead of brackets. * * @returns {string} The path to the current key. */ function renderKey(path, key, dots) { if (!path) return key; return path.concat(key).map(function each(token, i) { // eslint-disable-next-line no-param-reassign token = removeBrackets(token); return !dots && i ? '[' + token + ']' : token; }).join(dots ? '.' : ''); } /** * If the array is an array and none of its elements are visitable, then it's a flat array. * * @param {Array<any>} arr - The array to check * * @returns {boolean} */ function isFlatArray(arr) { return utils$1.isArray(arr) && !arr.some(isVisitable); } const predicates = utils$1.toFlatObject(utils$1, {}, null, function filter(prop) { return /^is[A-Z]/.test(prop); }); /** * Convert a data object to FormData * * @param {Object} obj * @param {?Object} [formData] * @param {?Object} [options] * @param {Function} [options.visitor] * @param {Boolean} [options.metaTokens = true] * @param {Boolean} [options.dots = false] * @param {?Boolean} [options.indexes = false] * * @returns {Object} **/ /** * It converts an object into a FormData object * * @param {Object<any, any>} obj - The object to convert to form data. * @param {string} formData - The FormData object to append to. * @param {Object<string, any>} options * * @returns */ function toFormData$1(obj, formData, options) { if (!utils$1.isObject(obj)) { throw new TypeError('target must be an object'); } // eslint-disable-next-line no-param-reassign formData = formData || new (FormData)(); // eslint-disable-next-line no-param-reassign options = utils$1.toFlatObject(options, { metaTokens: true, dots: false, indexes: false }, false, function defined(option, source) { // eslint-disable-next-line no-eq-null,eqeqeq return !utils$1.isUndefined(source[option]); }); const metaTokens = options.metaTokens; // eslint-disable-next-line no-use-before-define const visitor = options.visitor || defaultVisitor; const dots = options.dots; const indexes = options.indexes; const _Blob = options.Blob || typeof Blob !== 'undefined' && Blob; const useBlob = _Blob && utils$1.isSpecCompliantForm(formData); if (!utils$1.isFunction(visitor)) { throw new TypeError('visitor must be a function'); } function convertValue(value) { if (value === null) return ''; if (utils$1.isDate(value)) { return value.toISOString(); } if (utils$1.isBoolean(value)) { return value.toString(); } if (!useBlob && utils$1.isBlob(value)) { throw new AxiosError$1('Blob is not supported. Use a Buffer instead.'); } if (utils$1.isArrayBuffer(value) || utils$1.isTypedArray(value)) { return useBlob && typeof Blob === 'function' ? new Blob([value]) : Buffer.from(value); } return value; } /** * Default visitor. * * @param {*} value * @param {String|Number} key * @param {Array<String|Number>} path * @this {FormData} * * @returns {boolean} return true to visit the each prop of the value recursively */ function defaultVisitor(value, key, path) { let arr = value; if (value && !path && typeof value === 'object') { if (utils$1.endsWith(key, '{}')) { // eslint-disable-next-line no-param-reassign key = metaTokens ? key : key.slice(0, -2); // eslint-disable-next-line no-param-reassign value = JSON.stringify(value); } else if ( (utils$1.isArray(value) && isFlatArray(value)) || ((utils$1.isFileList(value) || utils$1.endsWith(key, '[]')) && (arr = utils$1.toArray(value)) )) { // eslint-disable-next-line no-param-reassign key = removeBrackets(key); arr.forEach(function each(el, index) { !(utils$1.isUndefined(el) || el === null) && formData.append( // eslint-disable-next-line no-nested-ternary indexes === true ? renderKey([key], index, dots) : (indexes === null ? key : key + '[]'), convertValue(el) ); }); return false; } } if (isVisitable(value)) { return true; } formData.append(renderKey(path, key, dots), convertValue(value)); return false; } const stack = []; const exposedHelpers = Object.assign(predicates, { defaultVisitor, convertValue, isVisitable }); function build(value, path) { if (utils$1.isUndefined(value)) return; if (stack.indexOf(value) !== -1) { throw Error('Circular reference detected in ' + path.join('.')); } stack.push(value); utils$1.forEach(value, function each(el, key) { const result = !(utils$1.isUndefined(el) || el === null) && visitor.call( formData, el, utils$1.isString(key) ? key.trim() : key, path, exposedHelpers ); if (result === true) { build(el, path ? path.concat(key) : [key]); } }); stack.pop(); } if (!utils$1.isObject(obj)) { throw new TypeError('data must be an object'); } build(obj); return formData; } /** * It encodes a string by replacing all characters that are not in the unreserved set with * their percent-encoded equivalents * * @param {string} str - The string to encode. * * @returns {string} The encoded string. */ function encode$1(str) { const charMap = { '!': '%21', "'": '%27', '(': '%28', ')': '%29', '~': '%7E', '%20': '+', '%00': '\x00' }; return encodeURIComponent(str).replace(/[!'()~]|%20|%00/g, function replacer(match) { return charMap[match]; }); } /** * It takes a params object and converts it to a FormData object * * @param {Object<string, any>} params - The parameters to be converted to a FormData object. * @param {Object<string, any>} options - The options object passed to the Axios constructor. * * @returns {void} */ function AxiosURLSearchParams(params, options) { this._pairs = []; params && toFormData$1(params, this, options); } const prototype = AxiosURLSearchParams.prototype; prototype.append = function append(name, value) { this._pairs.push([name, value]); }; prototype.toString = function toString(encoder) { const _encode = encoder ? function(value) { return encoder.call(this, value, encode$1); } : encode$1; return this._pairs.map(function each(pair) { return _encode(pair[0]) + '=' + _encode(pair[1]); }, '').join('&'); }; /** * It replaces all instances of the characters `:`, `$`, `,`, `+`, `[`, and `]` with their * URI encoded counterparts * * @param {string} val The value to be encoded. * * @returns {string} The encoded value. */ function encode(val) { return encodeURIComponent(val). replace(/%3A/gi, ':'). replace(/%24/g, '$'). replace(/%2C/gi, ','). replace(/%20/g, '+'). replace(/%5B/gi, '['). replace(/%5D/gi, ']'); } /** * Build a URL by appending params to the end * * @param {string} url The base of the url (e.g., http://www.google.com) * @param {object} [params] The params to be appended * @param {?(object|Function)} options * * @returns {string} The formatted url */ function buildURL(url, params, options) { /*eslint no-param-reassign:0*/ if (!params) { return url; } const _encode = options && options.encode || encode; if (utils$1.isFunction(options)) { options = { serialize: options }; } const serializeFn = options && options.serialize; let serializedParams; if (serializeFn) { serializedParams = serializeFn(params, options); } else { serializedParams = utils$1.isURLSearchParams(params) ? params.toString() : new AxiosURLSearchParams(params, options).toString(_encode); } if (serializedParams) { const hashmarkIndex = url.indexOf("#"); if (hashmarkIndex !== -1) { url = url.slice(0, hashmarkIndex); } url += (url.indexOf('?') === -1 ? '?' : '&') + serializedParams; } return url; } class InterceptorManager { constructor() { this.handlers = []; } /** * Add a new interceptor to the stack * * @param {Function} fulfilled The function to handle `then` for a `Promise` * @param {Function} rejected The function to handle `reject` for a `Promise` * * @return {Number} An ID used to remove interceptor later */ use(fulfilled, rejected, options) { this.handlers.push({ fulfilled, rejected, synchronous: options ? options.synchronous : false, runWhen: options ? options.runWhen : null }); return this.handlers.length - 1; } /** * Remove an interceptor from the stack * * @param {Number} id The ID that was returned by `use` * * @returns {Boolean} `true` if the interceptor was removed, `false` otherwise */ eject(id) { if (this.handlers[id]) { this.handlers[id] = null; } } /** * Clear all interceptors from the stack * * @returns {void} */ clear() { if (this.handlers) { this.handlers = []; } } /** * Iterate over all the registered interceptors * * This method is particularly useful for skipping over any * interceptors that may have become `null` calling `eject`. * * @param {Function} fn The function to call for each interceptor * * @returns {void} */ forEach(fn) { utils$1.forEach(this.handlers, function forEachHandler(h) { if (h !== null) { fn(h); } }); } } const InterceptorManager$1 = InterceptorManager; const transitionalDefaults = { silentJSONParsing: true, forcedJSONParsing: true, clarifyTimeoutError: false }; const URLSearchParams$1 = typeof URLSearchParams !== 'undefined' ? URLSearchParams : AxiosURLSearchParams; const FormData$1 = typeof FormData !== 'undefined' ? FormData : null; const Blob$1 = typeof Blob !== 'undefined' ? Blob : null; const platform$1 = { isBrowser: true, classes: { URLSearchParams: URLSearchParams$1, FormData: FormData$1, Blob: Blob$1 }, protocols: ['http', 'https', 'file', 'blob', 'url', 'data'] }; const hasBrowserEnv = typeof window !== 'undefined' && typeof document !== 'undefined'; const _navigator = typeof navigator === 'object' && navigator || undefined; /** * Determine if we're running in a standard browser environment * * This allows axios to run in a web worker, and react-native. * Both environments support XMLHttpRequest, but not fully standard globals. * * web workers: * typeof window -> undefined * typeof document -> undefined * * react-native: * navigator.product -> 'ReactNative' * nativescript * navigator.product -> 'NativeScript' or 'NS' * * @returns {boolean} */ const hasStandardBrowserEnv = hasBrowserEnv && (!_navigator || ['ReactNative', 'NativeScript', 'NS'].indexOf(_navigator.product) < 0); /** * Determine if we're running in a standard browser webWorker environment * * Although the `isStandardBrowserEnv` method indicates that * `allows axios to run in a web worker`, the WebWorker will still be * filtered out due to its judgment standard * `typeof window !== 'undefined' && typeof document !== 'undefined'`. * This leads to a problem when axios post `FormData` in webWorker */ const hasStandardBrowserWebWorkerEnv = (() => { return ( typeof WorkerGlobalScope !== 'undefined' && // eslint-disable-next-line no-undef self instanceof WorkerGlobalScope && typeof self.importScripts === 'function' ); })(); const origin = hasBrowserEnv && window.location.href || 'http://localhost'; const utils = /*#__PURE__*/Object.freeze({ __proto__: null, hasBrowserEnv: hasBrowserEnv, hasStandardBrowserWebWorkerEnv: hasStandardBrowserWebWorkerEnv, hasStandardBrowserEnv: hasStandardBrowserEnv, navigator: _navigator, origin: origin }); const platform = { ...utils, ...platform$1 }; function toURLEncodedForm(data, options) { return toFormData$1(data, new platform.classes.URLSearchParams(), Object.assign({ visitor: function(value, key, path, helpers) { if (platform.isNode && utils$1.isBuffer(value)) { this.append(key, value.toString('base64')); return false; } return helpers.defaultVisitor.apply(this, arguments); } }, options)); } /** * It takes a string like `foo[x][y][z]` and returns an array like `['foo', 'x', 'y', 'z'] * * @param {string} name - The name of the property to get. * * @returns An array of strings. */ function parsePropPath(name) { // foo[x][y][z] // foo.x.y.z // foo-x-y-z // foo x y z return utils$1.matchAll(/\w+|\[(\w*)]/g, name).map(match => { return match[0] === '[]' ? '' : match[1] || match[0]; }); } /** * Convert an array to an object. * * @param {Array<any>} arr - The array to convert to an object. * * @returns An object with the same keys and values as the array. */ function arrayToObject(arr) { const obj = {}; const keys = Object.keys(arr); let i; const len = keys.length; let key; for (i = 0; i < len; i++) { key = keys[i]; obj[key] = arr[key]; } return obj; } /** * It takes a FormData object and returns a JavaScript object * * @param {string} formData The FormData object to convert to JSON. * * @returns {Object<string, any> | null} The converted object. */ function formDataToJSON(formData) { function buildPath(path, value, target, index) { let name = path[index++]; if (name === '__proto__') return true; const isNumericKey = Number.isFinite(+name); const isLast = index >= path.length; name = !name && utils$1.isArray(target) ? target.length : name; if (isLast) { if (utils$1.hasOwnProp(target, name)) { target[name] = [target[name], value]; } else { target[name] = value; } return !isNumericKey; } if (!target[name] || !utils$1.isObject(target[name])) { target[name] = []; } const result = buildPath(path, value, target[name], index); if (result && utils$1.isArray(target[name])) { target[name] = arrayToObject(target[name]); } return !isNumericKey; } if (utils$1.isFormData(formData) && utils$1.isFunction(formData.entries)) { const obj = {}; utils$1.forEachEntry(formData, (name, value) => { buildPath(parsePropPath(name), value, obj, 0); }); return obj; } return null; } /** * It takes a string, tries to parse it, and if it fails, it returns the stringified version * of the input * * @param {any} rawValue - The value to be stringified. * @param {Function} parser - A function that parses a string into a JavaScript object. * @param {Function} encoder - A function that takes a value and returns a string. * * @returns {string} A stringified version of the rawValue. */ function stringifySafely(rawValue, parser, encoder) { if (utils$1.isString(rawValue)) { try { (parser || JSON.parse)(rawValue); return utils$1.trim(rawValue); } catch (e) { if (e.name !== 'SyntaxError') { throw e; } } } return (encoder || JSON.stringify)(rawValue); } const defaults = { transitional: transitionalDefaults, adapter: ['xhr', 'http', 'fetch'], transformRequest: [function transformRequest(data, headers) { const contentType = headers.getContentType() || ''; const hasJSONContentType = contentType.indexOf('application/json') > -1; const isObjectPayload = utils$1.isObject(data); if (isObjectPayload && utils$1.isHTMLForm(data)) { data = new FormData(data); } const isFormData = utils$1.isFormData(data); if (isFormData) { return hasJSONContentType ? JSON.stringify(formDataToJSON(data)) : data; } if (utils$1.isArrayBuffer(data) || utils$1.isBuffer(data) || utils$1.isStream(data) || utils$1.isFile(data) || utils$1.isBlob(data) || utils$1.isReadableStream(data) ) { return data; } if (utils$1.isArrayBufferView(data)) { return data.buffer; } if (utils$1.isURLSearchParams(data)) { headers.setContentType('application/x-www-form-urlencoded;charset=utf-8', false); return data.toString(); } let isFileList; if (isObjectPayload) { if (contentType.indexOf('application/x-www-form-urlencoded') > -1) { return toURLEncodedForm(data, this.formSerializer).toString(); } if ((isFileList = utils$1.isFileList(data)) || contentType.indexOf('multipart/form-data') > -1) { const _FormData = this.env && this.env.FormData; return toFormData$1( isFileList ? {'files[]': data} : data, _FormData && new _FormData(), this.formSerializer ); } } if (isObjectPayload || hasJSONContentType ) { headers.setContentType('application/json', false); return stringifySafely(data); } return data; }], transformResponse: [function transformResponse(data) { const transitional = this.transitional || defaults.transitional; const forcedJSONParsing = transitional && transitional.forcedJSONParsing; const JSONRequested = this.responseType === 'json'; if (utils$1.isResponse(data) || utils$1.isReadableStream(data)) { return data; } if (data && utils$1.isString(data) && ((forcedJSONParsing && !this.responseType) || JSONRequested)) { const silentJSONParsing = transitional && transitional.silentJSONParsing; const strictJSONParsing = !silentJSONParsing && JSONRequested; try { return JSON.parse(data); } catch (e) { if (strictJSONParsing) { if (e.name === 'SyntaxError') { throw AxiosError$1.from(e, AxiosError$1.ERR_BAD_RESPONSE, this, null, this.response); } throw e; } } } return data; }], /** * A timeout in milliseconds to abort a request. If set to 0 (default) a * timeout is not created. */ timeout: 0, xsrfCookieName: 'XSRF-TOKEN', xsrfHeaderName: 'X-XSRF-TOKEN', maxContentLength: -1, maxBodyLength: -1, env: { FormData: platform.classes.FormData, Blob: platform.classes.Blob }, validateStatus: function validateStatus(status) { return status >= 200 && status < 300; }, headers: { common: { 'Accept': 'application/json, text/plain, */*', 'Content-Type': undefined } } }; utils$1.forEach(['delete', 'get', 'head', 'post', 'put', 'patch'], (method) => { defaults.headers[method] = {}; }); const defaults$1 = defaults; // RawAxiosHeaders whose duplicates are ignored by node // c.f. https://nodejs.org/api/http.html#http_message_headers const ignoreDuplicateOf = utils$1.toObjectSet([ 'age', 'authorization', 'content-length', 'content-type', 'etag', 'expires', 'from', 'host', 'if-modified-since', 'if-unmodified-since', 'last-modified', 'location', 'max-forwards', 'proxy-authorization', 'referer', 'retry-after', 'user-agent' ]); /** * Parse headers into an object * * ``` * Date: Wed, 27 Aug 2014 08:58:49 GMT * Content-Type: application/json * Connection: keep-alive * Transfer-Encoding: chunked * ``` * * @param {String} rawHeaders Headers needing to be parsed * * @returns {Object} Headers parsed into an object */ const parseHeaders = rawHeaders => { const parsed = {}; let key; let val; let i; rawHeaders && rawHeaders.split('\n').forEach(function parser(line) { i = line.indexOf(':'); key = line.substring(0, i).trim().toLowerCase(); val = line.substring(i + 1).trim(); if (!key || (parsed[key] && ignoreDuplicateOf[key])) { return; } if (key === 'set-cookie') { if (parsed[key]) { parsed[key].push(val); } else { parsed[key] = [val]; } } else { parsed[key] = parsed[key] ? parsed[key] + ', ' + val : val; } }); return parsed; }; const $internals = Symbol('internals'); function normalizeHeader(header) { return header && String(header).trim().toLowerCase(); } function normalizeValue(value) { if (value === false || value == null) { return value; } return utils$1.isArray(value) ? value.map(normalizeValue) : String(value); } function parseTokens(str) { const tokens = Object.create(null); const tokensRE = /([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g; let match; while ((match = tokensRE.exec(str))) { tokens[match[1]] = match[2]; } return tokens; } const isValidHeaderName = (str) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(str.trim()); function matchHeaderValue(context, value, header, filter, isHeaderNameFilter) { if (utils$1.isFunction(filter)) { return filter.call(this, value, header); } if (isHeaderNameFilter) { value = header; } if (!utils$1.isString(value)) return; if (utils$1.isString(filter)) { return value.indexOf(filter) !== -1; } if (utils$1.isRegExp(filter)) { return filter.test(value); } } function formatHeader(header) { return header.trim() .toLowerCase().replace(/([a-z\d])(\w*)/g, (w, char, str) => { return char.toUpperCase() + str; }); } function buildAccessors(obj, header) { const accessorName = utils$1.toCamelCase(' ' + header); ['get', 'set', 'has'].forEach(methodName => { Object.defineProperty(obj, methodName + accessorName, { value: function(arg1, arg2, arg3) { return this[methodName].call(this, header, arg1, arg2, arg3); }, configurable: true }); }); } class AxiosHeaders$1 { constructor(headers) { headers && this.set(headers); } set(header, valueOrRewrite, rewrite) { const self = this; function setHeader(_value, _header, _rewrite) { const lHeader = normalizeHeader(_header); if (!lHeader) { throw new Error('header name must be a non-empty string'); } const key = utils$1.findKey(self, lHeader); if(!key || self[key] === undefined || _rewrite === true || (_rewrite === undefined && self[key] !== false)) { self[key || _header] = normalizeValue(_value); } } const setHeaders = (headers, _rewrite) => utils$1.forEach(headers, (_value, _header) => setHeader(_value, _header, _rewrite)); if (utils$1.isPlainObject(header) || header instanceof this.constructor) { setHeaders(header, valueOrRewrite); } else if(utils$1.isString(header) && (header = header.trim()) && !isValidHeaderName(header)) { setHeaders(parseHeaders(header), valueOrRewrite); } else if (utils$1.isObject(header) && utils$1.isIterable(header)) { let obj = {}, dest, key; for (const entry of header) { if (!utils$1.isArray(entry)) { throw TypeError('Object iterator must return a key-value pair'); } obj[key = entry[0]] = (dest = obj[key]) ? (utils$1.isArray(dest) ? [...dest, entry[1]] : [dest, entry[1]]) : entry[1]; } setHeaders(obj, valueOrRewrite); } else { header != null && setHeader(valueOrRewrite, header, rewrite); } return this; } get(header, parser) { header = normalizeHeader(header); if (header) { const key = utils$1.findKey(this, header); if (key) { const value = this[key]; if (!parser) { return value; } if (parser === true) { return parseTokens(value); } if (utils$1.isFunction(parser)) { return parser.call(this, value, key); } if (utils$1.isRegExp(parser)) { return parser.exec(value); } throw new TypeError('parser must be boolean|regexp|function'); } } } has(header, matcher) { header = normalizeHeader(header); if (header) { const key = utils$1.findKey(this, header); return !!(key && this[key] !== undefined && (!matcher || matchHeaderValue(this, this[key], key, matcher))); } return false; } delete(header, matcher) { const self = this; let deleted = false; function deleteHeader(_header) { _header = normalizeHeader(_header); if (_header) { const key = utils$1.findKey(self, _header); if (key && (!matcher || matchHeaderValue(self, self[key], key, matcher))) { delete self[key]; deleted = true; } } } if (utils$1.isArray(header)) { header.forEach(deleteHeader); } else { deleteHeader(header); } return deleted; } clear(matcher) { const keys = Object.keys(this); let i = keys.length; let deleted = false; while (i--) { const key = keys[i]; if(!matcher || matchHeaderValue(this, this[key], key, matcher, true)) { delete this[key]; deleted = true; } } return deleted; } normalize(format) { const self = this; const headers = {}; utils$1.forEach(this, (value, header) => { const key = utils$1.findKey(headers, header); if (key) { self[key] = normalizeValue(value); delete self[header]; return; } const normalized = format ? formatHeader(header) : String(header).trim(); if (normalized !== header) { delete self[header]; } self[normalized] = normalizeValue(value); headers[normalized] = true; }); return this; } concat(...targets) { return this.constructor.concat(this, ...targets); } toJSON(asStrings) { const obj = Object.create(null); utils$1.forEach(this, (value, header) => { value != null && value !== false && (obj[header] = asStrings && utils$1.isArray(value) ? value.join(', ') : value); }); return obj; } [Symbol.iterator]() { return Object.entries(this.toJSON())[Symbol.iterator](); } toString() { return Object.entries(this.toJSON()).map(([header, value]) => header + ': ' + value).join('\n'); } getSetCookie() { return this.get("set-cookie") || []; } get [Symbol.toStringTag]() { return 'AxiosHeaders'; } static from(thing) { return thing instanceof this ? thing : new this(thing); } static concat(first, ...targets) { const computed = new this(first); targets.forEach((target) => computed.set(target)); return computed; } static accessor(header) { const internals = this[$internals] = (this[$internals] = { accessors: {} }); const accessors = internals.accessors; const prototype = this.prototype; function defineAccessor(_header) { const lHeader = normalizeHeader(_header); if (!accessors[lHeader]) { buildAccessors(prototype, _header); accessors[lHeader] = true; } } utils$1.isArray(header) ? header.forEach(defineAccessor) : defineAccessor(header); return this; } } AxiosHeaders$1.accessor(['Content-Type', 'Content-Length', 'Accept', 'Accept-Encoding', 'User-Agent', 'Authorization']); // reserved names hotfix utils$1.reduceDescriptors(AxiosHeaders$1.prototype, ({value}, key) => { let mapped = key[0].toUpperCase() + key.slice(1); // map `set` => `Set` return { get: () => value, set(headerValue) { this[mapped] = headerValue; } } }); utils$1.freezeMethods(AxiosHeaders$1); const AxiosHeaders$2 = AxiosHeaders$1; /** * Transform the data for a request or a response * * @param {Array|Function} fns A single function or Array of functions * @param {?Object} response The response object * * @returns {*} The resulting transformed data */ function transformData(fns, response) { const config = this || defaults$1; const context = response || config; const headers = AxiosHeaders$2.from(context.headers); let data = context.data; utils$1.forEach(fns, function transform(fn) { data = fn.call(config, data, headers.normalize(), response ? response.status : undefined); }); headers.normalize(); return data; } function isCancel$1(value) { return !!(value && value.__CANCEL__); } /** * A `CanceledError` is an object that is thrown when an operation is canceled. * * @param {string=} message The message. * @param {Object=} config The config. * @param {Object=} request The request. * * @returns {CanceledError} The created error. */ function CanceledError$1(message, config, request) { // eslint-disable-next-line no-eq-null,eqeqeq AxiosError$1.call(this, message == null ? 'canceled' : message, AxiosError$1.ERR_CANCELED, config, request); this.name = 'CanceledError'; } utils$1.inherits(CanceledError$1, AxiosError$1, { __CANCEL__: true }); /** * Resolve or reject a Promise based on response status. * * @param {Function} resolve A function that resolves the promise. * @param {Function} reject A function that rejects the promise. * @param {object} response The response. * * @returns {object} The response. */ function settle(resolve, reject, response) { const validateStatus = response.config.validateStatus; if (!response.status || !validateStatus || validateStatus(response.status)) { resolve(response); } else { reject(new AxiosError$1( 'Request failed with status code ' + response.status, [AxiosError$1.ERR_BAD_REQUEST, AxiosError$1.ERR_BAD_RESPONSE][Math.floor(response.status / 100) - 4], response.config, response.request, response )); } } function parseProtocol(url) { const match = /^([-+\w]{1,25})(:?\/\/|:)/.exec(url); return match && match[1] || ''; } /** * Calculate data maxRate * @param {Number} [samplesCount= 10] * @param {Number} [min= 1000] * @returns {Function} */ function speedometer(samplesCount, min) { samplesCount = samplesCount || 10; const bytes = new Array(samplesCount); const timestamps = new Array(samplesCount); let head = 0; let tail = 0; let firstSampleTS; min = min !== undefined ? min : 1000; return function push(chunkLength) { const now = Date.now(); const startedAt = timestamps[tail]; if (!firstSampleTS) { firstSampleTS = now; } bytes[head] = chunkLength; timestamps[head] = now; let i = tail; let bytesCount = 0; while (i !== head) { bytesCount += bytes[i++]; i = i % samplesCount; } head = (head + 1) % samplesCount; if (head === tail) { tail = (tail + 1) % samplesCount; } if (now - firstSampleTS < min) { return; } const passed = startedAt && now - startedAt; return passed ? Math.round(bytesCount * 1000 / passed) : undefined; }; } /** * Throttle decorator * @param {Function} fn * @param {Number} freq * @return {Function} */ function throttle(fn, freq) { let timestamp = 0; let threshold = 1000 / freq; let lastArgs; let timer; const invoke = (args, now = Date.now()) => { timestamp = now; lastArgs = null; if (timer) { clearTimeout(timer); timer = null; } fn.apply(null, args); }; const throttled = (...args) => { const now = Date.now(); const passed = now - timestamp; if ( passed >= threshold) { invoke(args, now); } else { lastArgs = args; if (!timer) { timer = setTimeout(() => { timer = null; invoke(lastArgs); }, threshold - passed); } } }; const flush = () => lastArgs && invoke(lastArgs); return [throttled, flush]; } const progressEventReducer = (listener, isDownloadStream, freq = 3) => { let bytesNotified = 0; const _speedometer = speedometer(50, 250); return throttle(e => { const loaded = e.loaded; const total = e.lengthComputable ? e.total : undefined; const progressBytes = loaded - bytesNotified; const rate = _speedometer(progressBytes); const inRange = loaded <= total; bytesNotified = loaded; const data = { loaded, total, progress: total ? (loaded / total) : undefined, bytes: progressBytes, rate: rate ? rate : undefined, estimated: rate && total && inRange ? (total - loaded) / rate : undefined, event: e, lengthComputable: total != null, [isDownloadStream ? 'download' : 'upload']: true }; listener(data); }, freq); }; const progressEventDecorator = (total, throttled) => { const lengthComputable = total != null; return [(loaded) => throttled[0]({ lengthComputable, total, loaded }), throttled[1]]; }; const asyncDecorator = (fn) => (...args) => utils$1.asap(() => fn(...args)); const isURLSameOrigin = platform.hasStandardBrowserEnv ? ((origin, isMSIE) => (url) => { url = new URL(url, platform.origin); return ( origin.protocol === url.protocol && origin.host === url.host && (isMSIE || origin.port === url.port) ); })( new URL(platform.origin), platform.navigator && /(msie|trident)/i.test(platform.navigator.userAgent) ) : () => true; const cookies = platform.hasStandardBrowserEnv ? // Standard browser envs support document.cookie { write(name, value, expires, path, domain, secure) { const cookie = [name + '=' + encodeURIComponent(value)]; utils$1.isNumber(expires) && cookie.push('expires=' + new Date(expires).toGMTString()); utils$1.isString(path) && cookie.push('path=' + path); utils$1.isString(domain) && cookie.push('domain=' + domain); secure === true && cookie.push('secure'); document.cookie = cookie.join('; '); }, read(name) { const match = document.cookie.match(new RegExp('(^|;\\s*)(' + name + ')=([^;]*)')); return (match ? decodeURIComponent(match[3]) : null); }, remove(name) { this.write(name, '', Date.now() - 86400000); } } : // Non-standard browser env (web workers, react-native) lack needed support. { write() {}, read() { return null; }, remove() {} }; /** * Determines whether the specified URL is absolute * * @param {string} url The URL to test * * @returns {boolean} True if the specified URL is absolute, otherwise false */ function isAbsoluteURL(url) { // A URL is considered absolute if it begins with "<scheme>://" or "//" (protocol-relative URL). // RFC 3986 defines scheme name as a sequence of characters beginning with a letter and followed // by any combination of letters, digits, plus, period, or hyphen. return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(url); } /** * Creates a new URL by combining the specified URLs * * @param {string} baseURL The base URL * @param {string} relativeURL The relative URL * * @returns {string} The combined URL */ function combineURLs(baseURL, relativeURL) { return relativeURL ? baseURL.replace(/\/?\/$/, '') + '/' + relativeURL.replace(/^\/+/, '') : baseURL; } /** * Creates a new URL by combining the baseURL with the requestedURL, * only when the requestedURL is not already an absolute URL. * If the requestURL is absolute, this function returns the requestedURL untouched. * * @param {string} baseURL The base URL * @param {string} requestedURL Absolute or relative URL to combine * * @returns {string} The combined full path */ function buildFullPath(baseURL, requestedURL, allowAbsoluteUrls) { let isRelativeUrl = !isAbsoluteURL(requestedURL); if (baseURL && (isRelativeUrl || allowAbsoluteUrls == false)) { return combineURLs(baseURL, requestedURL); } return requestedURL; } const headersToObject = (thing) => thing instanceof AxiosHeaders$2 ? { ...thing } : thing; /** * Config-specific merge-function which creates a new config-object * by merging two configuration objects together. * * @param {Object} config1 * @param {Object} config2 * * @returns {Object} New object resulting from merging config2 to config1 */ function mergeConfig$1(config1, config2) { // eslint-disable-next-line no-param-reassign config2 = config2 || {}; const config = {}; function getMergedValue(target, source, prop, caseless) { if (utils$1.isPlainObject(target) && utils$1.isPlainObject(source)) { return utils$1.merge.call({caseless}, target, source); } else if (utils$1.isPlainObject(source)) { return utils$1.merge({}, source); } else if (utils$1.isArray(source)) { return source.slice(); } return source; } // eslint-disable-next-line consistent-return function mergeDeepProperties(a, b, prop , caseless) { if (!utils$1.isUndefined(b)) { return getMergedValue(a, b, prop , caseless); } else if (!utils$1.isUndefined(a)) { return getMergedValue(undefined, a, prop , caseless); } } // eslint-disable-next-line consistent-return function valueFromConfig2(a, b) { if (!utils$1.isUndefined(b)) { return getMergedValue(undefined, b); } } // eslint-disable-next-line consistent-return function defaultToConfig2(a, b) { if (!utils$1.isUndefined(b)) { return getMergedValue(undefined, b); } else if (!utils$1.isUndefined(a)) { return getMergedValue(undefined, a); } } // eslint-disable-next-line consistent-return function mergeDirectKeys(a, b, prop) { if (prop in config2) { return getMergedValue(a, b); } else if (prop in config1) { return getMergedValue(undefined, a); } } const mergeMap = { url: valueFromConfig2, method: valueFromConfig2, data: valueFromConfig2, baseURL: defaultToConfig2, transformRequest: defaultToConfig2, transformResponse: defaultToConfig2, paramsSerializer: defaultToConfig2, timeout: defaultToConfig2, timeoutMessage: defaultToConfig2, withCredentials: defaultToConfig2, withXSRFToken: defaultToConfig2, adapter: defaultToConfig2, responseType: defaultToConfig2, xsrfCookieName: defaultToConfig2, xsrfHeaderName: defaultToConfig2, onUploadProgress: defaultToConfig2, onDownloadProgress: defaultToConfig2, decompress: defaultToConfig2, maxContentLength: defaultToConfig2, maxBodyLength: defaultToConfig2, beforeRedirect: defaultToConfig2, transport: defaultToConfig2, httpAgent: defaultToConfig2, httpsAgent: defaultToConfig2, cancelToken: defaultToConfig2, socketPath: defaultToConfig2, responseEncoding: defaultToConfig2, validateStatus: mergeDirectKeys, headers: (a, b , prop) => mergeDeepProperties(headersToObject(a), headersToObject(b),prop, true) }; utils$1.forEach(Object.keys(Object.assign({}, config1, config2)), function computeConfigValue(prop) { const merge = mergeMap[prop] || mergeDeepProperties; const configValue = merge(config1[prop], config2[prop], prop); (utils$1.isUndefined(configValue) && merge !== mergeDirectKeys) || (config[prop] = configValue); }); return config; } const resolveConfig = (config) => { const newConfig = mergeConfig$1({}, config); let {data, withXSRFToken, xsrfHeaderName, xsrfCookieName, headers, auth} = newConfig; newConfig.headers = headers = AxiosHeaders$2.from(headers); newConfig.url = buildURL(buildFullPath(newConfig.baseURL, newConfig.url, newConfig.allowAbsoluteUrls), config.params, config.paramsSerializer); // HTTP basic authentication if (auth) { headers.set('Authorization', 'Basic ' + btoa((auth.username || '') + ':' + (auth.password ? unescape(encodeURIComponent(auth.password)) : '')) ); } let contentType; if (utils$1.isFormData(data)) { if (platform.hasStandardBrowserEnv || platform.hasStandardBrowserWebWorkerEnv) { headers.setContentType(undefined); // Let the browser set it } else if ((contentType = headers.getContentType()) !== false) { // fix semicolon duplication issue for ReactNative FormData implementation const [type, ...tokens] = contentType ? contentType.split(';').map(token => token.trim()).filter(Boolean) : []; headers.setContentType([type || 'multipart/form-data', ...tokens].join('; ')); } } // Add xsrf header // This is only done if running in a standard browser environment. // Specifically not if we're in a web worker, or react-native. if (platform.hasStandardBrowserEnv) { withXSRFToken && utils$1.isFunction(withXSRFToken) && (withXSRFToken = withXSRFToken(newConfig)); if (withXSRFToken || (withXSRFToken !== false && isURLSameOrigin(newConfig.url))) { // Add xsrf header const xsrfValue = xsrfHeaderName && xsrfCookieName && cookies.read(xsrfCookieName); if (xsrfValue) { headers.set(xsrfHeaderName, xsrfValue); } } } return newConfig; }; const isXHRAdapterSupported = typeof XMLHttpRequest !== 'undefined'; const xhrAdapter = isXHRAdapterSupported && function (config) { return new Promise(function dispatchXhrRequest(resolve, reject) { const _config = resolveConfig(config); let requestData = _config.data; const requestHeaders = AxiosHeaders$2.from(_config.headers).normalize(); let {responseType, onUploadProgress, onDownloadProgress} = _config; let onCanceled; let uploadThrottled, downloadThrottled; let flushUpload, flushDownload; function done() { flushUpload && flushUpload(); // flush events flushDownload && flushDownload(); // flush events _config.cancelToken && _config.cancelToken.unsubscribe(onCanceled); _config.signal && _config.signal.removeEventListener('abort', onCanceled); } let request = new XMLHttpRequest(); request.open(_config.method.toUpperCase(), _config.url, true); // Set the request timeout in MS request.timeout = _config.timeout; function onloadend() { if (!request) { return; } // Prepare the response const responseHeaders = AxiosHeaders$2.from( 'getAllResponseHeaders' in request && request.getAllResponseHeaders() ); const responseData = !responseType || responseType === 'text' || responseType === 'json' ? request.responseText : request.response; const response = { data: responseData, status: request.status, statusText: request.statusText, headers: responseHeaders, config, request }; settle(function _resolve(value) { resolve(value); done(); }, function _reject(err) { reject(err); done(); }, response); // Clean up request request = null; } if ('onloadend' in request) { // Use onloadend if available request.onloadend = onloadend; } else { // Listen for ready state to emulate onloadend request.onreadystatechange = function handleLoad() { if (!request || request.readyState !== 4) { return; } // The request errored out and we didn't get a response, this will be // handled by onerror instead // With one exception: request that using file: protocol, most browsers // will return status as 0 even though it's a successful request if (request.status === 0 && !(request.responseURL && request.responseURL.indexOf('file:') === 0)) { return; } // readystate handler is calling before onerror or ontimeout handlers, // so we should call onloadend on the next 'tick' setTimeout(onloadend); }; } // Handle browser request cancellation (as opposed to a manual cancellation) request.onabort = function handleAbort() { if (!request) { return; } reject(new AxiosError$1('Request aborted', AxiosError$1.ECONNABORTED, config, request)); // Clean up request request = null; }; // Handle low level network errors request.onerror = function handleError() { // Real errors are hidden from us by the browser // onerror should only fire if it's a network error reject(new AxiosError$1('Network Error', AxiosError$1.ERR_NETWORK, config, request)); // Clean up request request = null; }; // Handle timeout request.ontimeout = function handleTimeout() { let timeoutErrorMessage = _config.timeout ? 'timeout of ' + _config.timeout + 'ms exceeded' : 'timeout exceeded'; const transitional = _config.transitional || transitionalDefaults; if (_config.timeoutErrorMessage) { timeoutErrorMessage = _config.timeoutErrorMessage; } reject(new AxiosError$1( timeoutErrorMessage, transitional.clarifyTimeoutError ? AxiosError$1.ETIMEDOUT : AxiosError$1.ECONNABORTED, config, request)); // Clean up request request = null; }; // Remove Content-Type if data is undefined requestData === undefined && requestHeaders.setContentType(null); // Add headers to the request if ('setRequestHeader' in request) { utils$1.forEach(requestHeaders.toJSON(), function setRequestHeader(val, key) { request.setRequestHeader(key, val); }); } // Add withCredentials to request if needed if (!utils$1.isUndefined(_config.withCredentials)) { request.withCredentials = !!_config.withCredentials; } // Add responseType to request if needed if (responseType && responseType !== 'json') { request.responseType = _config.responseType; } // Handle progress if needed if (onDownloadProgress) { ([downloadThrottled, flushDownload] = progressEventReducer(onDownloadProgress, true)); request.addEventListener('progress', downloadThrottled); } // Not all browsers support upload events if (onUploadProgress && request.upload) { ([uploadThrottled, flushUpload] = progressEventReducer(onUploadProgress)); request.upload.addEventListener('progress', uploadThrottled); request.upload.addEventListener('loadend', flushUpload); } if (_config.cancelToken || _config.signal) { // Handle cancellation // eslint-disable-next-line func-names onCanceled = cancel => { if (!request) { return; } reject(!cancel || cancel.type ? new CanceledError$1(null, config, request) : cancel); request.abort(); request = null; }; _config.cancelToken && _config.cancelToken.subscribe(onCanceled); if (_config.signal) { _config.signal.aborted ? onCanceled() : _config.signal.addEventListener('abort', onCanceled); } } const protocol = parseProtocol(_config.url); if (protocol && platform.protocols.indexOf(protocol) === -1) { reject(new AxiosError$1('Unsupported protocol ' + protocol + ':', AxiosError$1.ERR_BAD_REQUEST, config)); return; } // Send the request request.send(requestData || null); }); }; const composeSignals = (signals, timeout) => { const {length} = (signals = signals ? signals.filter(Boolean) : []); if (timeout || length) { let controller = new AbortController(); let aborted; const onabort = function (reason) { if (!aborted) { aborted = true; unsubscribe(); const err = reason instanceof Error ? reason : this.reason; controller.abort(err instanceof AxiosError$1 ? err : new CanceledError$1(err instanceof Error ? err.message : err)); } }; let timer = timeout && setTimeout(() => { timer = null; onabort(new AxiosError$1(`timeout ${timeout} of ms exceeded`, AxiosError$1.ETIMEDOUT)); }, timeout); const unsubscribe = () => { if (signals) { timer && clearTimeout(timer); timer = null; signals.forEach(signal => { signal.unsubscribe ? signal.unsubscribe(onabort) : signal.removeEventListener('abort', onabort); }); signals = null; } }; signals.forEach((signal) => signal.addEventListener('abort', onabort)); const {signal} = controller; signal.unsubscribe = () => utils$1.asap(unsubscribe); return signal; } }; const composeSignals$1 = composeSignals; const streamChunk = function* (chunk, chunkSize) { let len = chunk.byteLength; if (!chunkSize || len < chunkSize) { yield chunk; return; } let pos = 0; let end; while (pos < len) { end = pos + chunkSize; yield chunk.slice(pos, end); pos = end; } }; const readBytes = async function* (iterable, chunkSize) { for await (const chunk of readStream(iterable)) { yield* streamChunk(chunk, chunkSize); } }; const readStream = async function* (stream) { if (stream[Symbol.asyncIterator]) { yield* stream; return; } const reader = stream.getReader(); try { for (;;) { const {done, value} = await reader.read(); if (done) { break; } yield value; } } finally { await reader.cancel(); } }; const trackStream = (stream, chunkSize, onProgress, onFinish) => { const iterator = readBytes(stream, chunkSize); let bytes = 0; let done; let _onFinish = (e) => { if (!done) { done = true; onFinish && onFinish(e); } }; return new ReadableStream({ async pull(controller) { try { const {done, value} = await iterator.next(); if (done) { _onFinish(); controller.close(); return; } let len = value.byteLength; if (onProgress) { let loadedBytes = bytes += len; onProgress(loadedBytes); } controller.enqueue(new Uint8Array(value)); } catch (err) { _onFinish(err); throw err; } }, cancel(reason) { _onFinish(reason); return iterator.return(); } }, { highWaterMark: 2 }) }; const isFetchSupported = typeof fetch === 'function' && typeof Request === 'function' && typeof Response === 'function'; const isReadableStreamSupported = isFetchSupported && typeof ReadableStream === 'function'; // used only inside the fetch adapter const encodeText = isFetchSupported && (typeof TextEncoder === 'function' ? ((encoder) => (str) => encoder.encode(str))(new TextEncoder()) : async (str) => new Uint8Array(await new Response(str).arrayBuffer()) ); const test = (fn, ...args) => { try { return !!fn(...args); } catch (e) { return false } }; const supportsRequestStream = isReadableStreamSupported && test(() => { let duplexAccessed = false; const hasContentType = new Request(platform.origin, { body: new ReadableStream(), method: 'POST', get duplex() { duplexAccessed = true; return 'half'; }, }).headers.has('Content-Type'); return duplexAccessed && !hasContentType; }); const DEFAULT_CHUNK_SIZE = 64 * 1024; const supportsResponseStream = isReadableStreamSupported && test(() => utils$1.isReadableStream(new Response('').body)); const resolvers = { stream: supportsResponseStream && ((res) => res.body) }; isFetchSupported && (((res) => { ['text', 'arrayBuffer', 'blob', 'formData', 'stream'].forEach(type => { !resolvers[type] && (resolvers[type] = utils$1.isFunction(res[type]) ? (res) => res[type]() : (_, config) => { throw new AxiosError$1(`Response type '${type}' is not supported`, AxiosError$1.ERR_NOT_SUPPORT, config); }); }); })(new Response)); const getBodyLength = async (body) => { if (body == null) { return 0; } if(utils$1.isBlob(body)) { return body.size; } if(utils$1.isSpecCompliantForm(body)) { const _request = new Request(platform.origin, { method: 'POST', body, }); return (await _request.arrayBuffer()).byteLength; } if(utils$1.isArrayBufferView(body) || utils$1.isArrayBuffer(body)) { return body.byteLength; } if(utils$1.isURLSearchParams(body)) { body = body + ''; } if(utils$1.isString(body)) { return (await encodeText(body)).byteLength; } }; const resolveBodyLength = async (headers, body) => { const length = utils$1.toFiniteNumber(headers.getContentLength()); return length == null ? getBodyLength(body) : length; }; const fetchAdapter = isFetchSupported && (async (config) => { let { url, method, data, signal, cancelToken, timeout, onDownloadProgress, onUploadProgress, responseType, headers, withCredentials = 'same-origin', fetchOptions } = resolveConfig(config); responseType = responseType ? (responseType + '').toLowerCase() : 'text'; let composedSignal = composeSignals$1([signal, cancelToken && cancelToken.toAbortSignal()], timeout); let request; const unsubscribe = composedSignal && composedSignal.unsubscribe && (() => { composedSignal.unsubscribe(); }); let requestContentLength; try { if ( onUploadProgress && supportsRequestStream && method !== 'get' && method !== 'head' && (requestContentLength = await resolveBodyLength(headers, data)) !== 0 ) { let _request = new Request(url, { method: 'POST', body: data, duplex: "half" }); let contentTypeHeader; if (utils$1.isFormData(data) && (contentTypeHeader = _request.headers.get('content-type'))) { headers.setContentType(contentTypeHeader); } if (_request.body) { const [onProgress, flush] = progressEventDecorator( requestContentLength, progressEventReducer(asyncDecorator(onUploadProgress)) ); data = trackStream(_request.body, DEFAULT_CHUNK_SIZE, onProgress, flush); } } if (!utils$1.isString(withCredentials)) { withCredentials = withCredentials ? 'include' : 'omit'; } // Cloudflare Workers throws when credentials are defined // see https://github.com/cloudflare/workerd/issues/902 const isCredentialsSupported = "credentials" in Request.prototype; request = new Request(url, { ...fetchOptions, signal: composedSignal, method: method.toUpperCase(), headers: headers.normalize().toJSON(), body: data, duplex: "half", credentials: isCredentialsSupported ? withCredentials : undefined }); let response = await fetch(request, fetchOptions); const isStreamResponse = supportsResponseStream && (responseType === 'stream' || responseType === 'response'); if (supportsResponseStream && (onDownloadProgress || (isStreamResponse && unsubscribe))) { const options = {}; ['status', 'statusText', 'headers'].forEach(prop => { options[prop] = response[prop]; }); const responseContentLength = utils$1.toFiniteNumber(response.headers.get('content-length')); const [onProgress, flush] = onDownloadProgress && progressEventDecorator( responseContentLength, progressEventReducer(asyncDecorator(onDownloadProgress), true) ) || []; response = new Response( trackStream(response.body, DEFAULT_CHUNK_SIZE, onProgress, () => { flush && flush(); unsubscribe && unsubscribe(); }), options ); } responseType = responseType || 'text'; let responseData = await resolvers[utils$1.findKey(resolvers, responseType) || 'text'](response, config); !isStreamResponse && unsubscribe && unsubscribe(); return await new Promise((resolve, reject) => { settle(resolve, reject, { data: responseData, headers: AxiosHeaders$2.from(response.headers), status: response.status, statusText: response.statusText, config, request }); }) } catch (err) { unsubscribe && unsubscribe(); if (err && err.name === 'TypeError' && /Load failed|fetch/i.test(err.message)) { throw Object.assign( new AxiosError$1('Network Error', AxiosError$1.ERR_NETWORK, config, request), { cause: err.cause || err } ) } throw AxiosError$1.from(err, err && err.code, config, request); } }); const knownAdapters = { http: httpAdapter, xhr: xhrAdapter, fetch: fetchAdapter }; utils$1.forEach(knownAdapters, (fn, value) => { if (fn) { try { Object.defineProperty(fn, 'name', {value}); } catch (e) { // eslint-disable-next-line no-empty } Object.defineProperty(fn, 'adapterName', {value}); } }); const renderReason = (reason) => `- ${reason}`; const isResolvedHandle = (adapter) => utils$1.isFunction(adapter) || adapter === null || adapter === false; const adapters = { getAdapter: (adapters) => { adapters = utils$1.isArray(adapters) ? adapters : [adapters]; const {length} = adapters; let nameOrAdapter; let adapter; const rejectedReasons = {}; for (let i = 0; i < length; i++) { nameOrAdapter = adapters[i]; let id; adapter = nameOrAdapter; if (!isResolvedHandle(nameOrAdapter)) { adapter = knownAdapters[(id = String(nameOrAdapter)).toLowerCase()]; if (adapter === undefined) { throw new AxiosError$1(`Unknown adapter '${id}'`); } } if (adapter) { break; } rejectedReasons[id || '#' + i] = adapter; } if (!adapter) { const reasons = Object.entries(rejectedReasons) .map(([id, state]) => `adapter ${id} ` + (state === false ? 'is not supported by the environment' : 'is not available in the build') ); let s = length ? (reasons.length > 1 ? 'since :\n' + reasons.map(renderReason).join('\n') : ' ' + renderReason(reasons[0])) : 'as no adapter specified'; throw new AxiosError$1( `There is no suitable adapter to dispatch the request ` + s, 'ERR_NOT_SUPPORT' ); } return adapter; }, adapters: knownAdapters }; /** * Throws a `CanceledError` if cancellation has been requested. * * @param {Object} config The config that is to be used for the request * * @returns {void} */ function throwIfCancellationRequested(config) { if (config.cancelToken) { config.cancelToken.throwIfRequested(); } if (config.signal && config.signal.aborted) { throw new CanceledError$1(null, config); } } /** * Dispatch a request to the server using the configured adapter. * * @param {object} config The config that is to be used for the request * * @returns {Promise} The Promise to be fulfilled */ function dispatchRequest(config) { throwIfCancellationRequested(config); config.headers = AxiosHeaders$2.from(config.headers); // Transform request data config.data = transformData.call( config, config.transformRequest ); if (['post', 'put', 'patch'].indexOf(config.method) !== -1) { config.headers.setContentType('application/x-www-form-urlencoded', false); } const adapter = adapters.getAdapter(config.adapter || defaults$1.adapter); return adapter(config).then(function onAdapterResolution(response) { throwIfCancellationRequested(config); // Transform response data response.data = transformData.call( config, config.transformResponse, response ); response.headers = AxiosHeaders$2.from(response.headers); return response; }, function onAdapterRejection(reason) { if (!isCancel$1(reason)) { throwIfCancellationRequested(config); // Transform response data if (reason && reason.response) { reason.response.data = transformData.call( config, config.transformResponse, reason.response ); reason.response.headers = AxiosHeaders$2.from(reason.response.headers); } } return Promise.reject(reason); }); } const VERSION$1 = "1.10.0"; const validators$1 = {}; // eslint-disable-next-line func-names ['object', 'boolean', 'number', 'function', 'string', 'symbol'].forEach((type, i) => { validators$1[type] = function validator(thing) { return typeof thing === type || 'a' + (i < 1 ? 'n ' : ' ') + type; }; }); const deprecatedWarnings = {}; /** * Transitional option validator * * @param {function|boolean?} validator - set to false if the transitional option has been removed * @param {string?} version - deprecated version / removed since version * @param {string?} message - some message with additional info * * @returns {function} */ validators$1.transitional = function transitional(validator, version, message) { function formatMessage(opt, desc) { return '[Axios v' + VERSION$1 + '] Transitional option \'' + opt + '\'' + desc + (message ? '. ' + message : ''); } // eslint-disable-next-line func-names return (value, opt, opts) => { if (validator === false) { throw new AxiosError$1( formatMessage(opt, ' has been removed' + (version ? ' in ' + version : '')), AxiosError$1.ERR_DEPRECATED ); } if (version && !deprecatedWarnings[opt]) { deprecatedWarnings[opt] = true; // eslint-disable-next-line no-console console.warn( formatMessage( opt, ' has been deprecated since v' + version + ' and will be removed in the near future' ) ); } return validator ? validator(value, opt, opts) : true; }; }; validators$1.spelling = function spelling(correctSpelling) { return (value, opt) => { // eslint-disable-next-line no-console console.warn(`${opt} is likely a misspelling of ${correctSpelling}`); return true; } }; /** * Assert object's properties type * * @param {object} options * @param {object} schema * @param {boolean?} allowUnknown * * @returns {object} */ function assertOptions(options, schema, allowUnknown) { if (typeof options !== 'object') { throw new AxiosError$1('options must be an object', AxiosError$1.ERR_BAD_OPTION_VALUE); } const keys = Object.keys(options); let i = keys.length; while (i-- > 0) { const opt = keys[i]; const validator = schema[opt]; if (validator) { const value = options[opt]; const result = value === undefined || validator(value, opt, options); if (result !== true) { throw new AxiosError$1('option ' + opt + ' must be ' + result, AxiosError$1.ERR_BAD_OPTION_VALUE); } continue; } if (allowUnknown !== true) { throw new AxiosError$1('Unknown option ' + opt, AxiosError$1.ERR_BAD_OPTION); } } } const validator = { assertOptions, validators: validators$1 }; const validators = validator.validators; /** * Create a new instance of Axios * * @param {Object} instanceConfig The default config for the instance * * @return {Axios} A new instance of Axios */ class Axios$1 { constructor(instanceConfig) { this.defaults = instanceConfig || {}; this.interceptors = { request: new InterceptorManager$1(), response: new InterceptorManager$1() }; } /** * Dispatch a request * * @param {String|Object} configOrUrl The config specific for this request (merged with this.defaults) * @param {?Object} config * * @returns {Promise} The Promise to be fulfilled */ async request(configOrUrl, config) { try { return await this._request(configOrUrl, config); } catch (err) { if (err instanceof Error) { let dummy = {}; Error.captureStackTrace ? Error.captureStackTrace(dummy) : (dummy = new Error()); // slice off the Error: ... line const stack = dummy.stack ? dummy.stack.replace(/^.+\n/, '') : ''; try { if (!err.stack) { err.stack = stack; // match without the 2 top stack lines } else if (stack && !String(err.stack).endsWith(stack.replace(/^.+\n.+\n/, ''))) { err.stack += '\n' + stack; } } catch (e) { // ignore the case where "stack" is an un-writable property } } throw err; } } _request(configOrUrl, config) { /*eslint no-param-reassign:0*/ // Allow for axios('example/url'[, config]) a la fetch API if (typeof configOrUrl === 'string') { config = config || {}; config.url = configOrUrl; } else { config = configOrUrl || {}; } config = mergeConfig$1(this.defaults, config); const {transitional, paramsSerializer, headers} = config; if (transitional !== undefined) { validator.assertOptions(transitional, { silentJSONParsing: validators.transitional(validators.boolean), forcedJSONParsing: validators.transitional(validators.boolean), clarifyTimeoutError: validators.transitional(validators.boolean) }, false); } if (paramsSerializer != null) { if (utils$1.isFunction(paramsSerializer)) { config.paramsSerializer = { serialize: paramsSerializer }; } else { validator.assertOptions(paramsSerializer, { encode: validators.function, serialize: validators.function }, true); } } // Set config.allowAbsoluteUrls if (config.allowAbsoluteUrls !== undefined) ; else if (this.defaults.allowAbsoluteUrls !== undefined) { config.allowAbsoluteUrls = this.defaults.allowAbsoluteUrls; } else { config.allowAbsoluteUrls = true; } validator.assertOptions(config, { baseUrl: validators.spelling('baseURL'), withXsrfToken: validators.spelling('withXSRFToken') }, true); // Set config.method config.method = (config.method || this.defaults.method || 'get').toLowerCase(); // Flatten headers let contextHeaders = headers && utils$1.merge( headers.common, headers[config.method] ); headers && utils$1.forEach( ['delete', 'get', 'head', 'post', 'put', 'patch', 'common'], (method) => { delete headers[method]; } ); config.headers = AxiosHeaders$2.concat(contextHeaders, headers); // filter out skipped interceptors const requestInterceptorChain = []; let synchronousRequestInterceptors = true; this.interceptors.request.forEach(function unshiftRequestInterceptors(interceptor) { if (typeof interceptor.runWhen === 'function' && interceptor.runWhen(config) === false) { return; } synchronousRequestInterceptors = synchronousRequestInterceptors && interceptor.synchronous; requestInterceptorChain.unshift(interceptor.fulfilled, interceptor.rejected); }); const responseInterceptorChain = []; this.interceptors.response.forEach(function pushResponseInterceptors(interceptor) { responseInterceptorChain.push(interceptor.fulfilled, interceptor.rejected); }); let promise; let i = 0; let len; if (!synchronousRequestInterceptors) { const chain = [dispatchRequest.bind(this), undefined]; chain.unshift.apply(chain, requestInterceptorChain); chain.push.apply(chain, responseInterceptorChain); len = chain.length; promise = Promise.resolve(config); while (i < len) { promise = promise.then(chain[i++], chain[i++]); } return promise; } len = requestInterceptorChain.length; let newConfig = config; i = 0; while (i < len) { const onFulfilled = requestInterceptorChain[i++]; const onRejected = requestInterceptorChain[i++]; try { newConfig = onFulfilled(newConfig); } catch (error) { onRejected.call(this, error); break; } } try { promise = dispatchRequest.call(this, newConfig); } catch (error) { return Promise.reject(error); } i = 0; len = responseInterceptorChain.length; while (i < len) { promise = promise.then(responseInterceptorChain[i++], responseInterceptorChain[i++]); } return promise; } getUri(config) { config = mergeConfig$1(this.defaults, config); const fullPath = buildFullPath(config.baseURL, config.url, config.allowAbsoluteUrls); return buildURL(fullPath, config.params, config.paramsSerializer); } } // Provide aliases for supported request methods utils$1.forEach(['delete', 'get', 'head', 'options'], function forEachMethodNoData(method) { /*eslint func-names:0*/ Axios$1.prototype[method] = function(url, config) { return this.request(mergeConfig$1(config || {}, { method, url, data: (config || {}).data })); }; }); utils$1.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) { /*eslint func-names:0*/ function generateHTTPMethod(isForm) { return function httpMethod(url, data, config) { return this.request(mergeConfig$1(config || {}, { method, headers: isForm ? { 'Content-Type': 'multipart/form-data' } : {}, url, data })); }; } Axios$1.prototype[method] = generateHTTPMethod(); Axios$1.prototype[method + 'Form'] = generateHTTPMethod(true); }); const Axios$2 = Axios$1; /** * A `CancelToken` is an object that can be used to request cancellation of an operation. * * @param {Function} executor The executor function. * * @returns {CancelToken} */ class CancelToken$1 { constructor(executor) { if (typeof executor !== 'function') { throw new TypeError('executor must be a function.'); } let resolvePromise; this.promise = new Promise(function promiseExecutor(resolve) { resolvePromise = resolve; }); const token = this; // eslint-disable-next-line func-names this.promise.then(cancel => { if (!token._listeners) return; let i = token._listeners.length; while (i-- > 0) { token._listeners[i](cancel); } token._listeners = null; }); // eslint-disable-next-line func-names this.promise.then = onfulfilled => { let _resolve; // eslint-disable-next-line func-names const promise = new Promise(resolve => { token.subscribe(resolve); _resolve = resolve; }).then(onfulfilled); promise.cancel = function reject() { token.unsubscribe(_resolve); }; return promise; }; executor(function cancel(message, config, request) { if (token.reason) { // Cancellation has already been requested return; } token.reason = new CanceledError$1(message, config, request); resolvePromise(token.reason); }); } /** * Throws a `CanceledError` if cancellation has been requested. */ throwIfRequested() { if (this.reason) { throw this.reason; } } /** * Subscribe to the cancel signal */ subscribe(listener) { if (this.reason) { listener(this.reason); return; } if (this._listeners) { this._listeners.push(listener); } else { this._listeners = [listener]; } } /** * Unsubscribe from the cancel signal */ unsubscribe(listener) { if (!this._listeners) { return; } const index = this._listeners.indexOf(listener); if (index !== -1) { this._listeners.splice(index, 1); } } toAbortSignal() { const controller = new AbortController(); const abort = (err) => { controller.abort(err); }; this.subscribe(abort); controller.signal.unsubscribe = () => this.unsubscribe(abort); return controller.signal; } /** * Returns an object that contains a new `CancelToken` and a function that, when called, * cancels the `CancelToken`. */ static source() { let cancel; const token = new CancelToken$1(function executor(c) { cancel = c; }); return { token, cancel }; } } const CancelToken$2 = CancelToken$1; /** * Syntactic sugar for invoking a function and expanding an array for arguments. * * Common use case would be to use `Function.prototype.apply`. * * ```js * function f(x, y, z) {} * var args = [1, 2, 3]; * f.apply(null, args); * ``` * * With `spread` this example can be re-written. * * ```js * spread(function(x, y, z) {})([1, 2, 3]); * ``` * * @param {Function} callback * * @returns {Function} */ function spread$1(callback) { return function wrap(arr) { return callback.apply(null, arr); }; } /** * Determines whether the payload is an error thrown by Axios * * @param {*} payload The value to test * * @returns {boolean} True if the payload is an error thrown by Axios, otherwise false */ function isAxiosError$1(payload) { return utils$1.isObject(payload) && (payload.isAxiosError === true); } const HttpStatusCode$1 = { Continue: 100, SwitchingProtocols: 101, Processing: 102, EarlyHints: 103, Ok: 200, Created: 201, Accepted: 202, NonAuthoritativeInformation: 203, NoContent: 204, ResetContent: 205, PartialContent: 206, MultiStatus: 207, AlreadyReported: 208, ImUsed: 226, MultipleChoices: 300, MovedPermanently: 301, Found: 302, SeeOther: 303, NotModified: 304, UseProxy: 305, Unused: 306, TemporaryRedirect: 307, PermanentRedirect: 308, BadRequest: 400, Unauthorized: 401, PaymentRequired: 402, Forbidden: 403, NotFound: 404, MethodNotAllowed: 405, NotAcceptable: 406, ProxyAuthenticationRequired: 407, RequestTimeout: 408, Conflict: 409, Gone: 410, LengthRequired: 411, PreconditionFailed: 412, PayloadTooLarge: 413, UriTooLong: 414, UnsupportedMediaType: 415, RangeNotSatisfiable: 416, ExpectationFailed: 417, ImATeapot: 418, MisdirectedRequest: 421, UnprocessableEntity: 422, Locked: 423, FailedDependency: 424, TooEarly: 425, UpgradeRequired: 426, PreconditionRequired: 428, TooManyRequests: 429, RequestHeaderFieldsTooLarge: 431, UnavailableForLegalReasons: 451, InternalServerError: 500, NotImplemented: 501, BadGateway: 502, ServiceUnavailable: 503, GatewayTimeout: 504, HttpVersionNotSupported: 505, VariantAlsoNegotiates: 506, InsufficientStorage: 507, LoopDetected: 508, NotExtended: 510, NetworkAuthenticationRequired: 511, }; Object.entries(HttpStatusCode$1).forEach(([key, value]) => { HttpStatusCode$1[value] = key; }); const HttpStatusCode$2 = HttpStatusCode$1; /** * Create an instance of Axios * * @param {Object} defaultConfig The default config for the instance * * @returns {Axios} A new instance of Axios */ function createInstance(defaultConfig) { const context = new Axios$2(defaultConfig); const instance = bind(Axios$2.prototype.request, context); // Copy axios.prototype to instance utils$1.extend(instance, Axios$2.prototype, context, {allOwnKeys: true}); // Copy context to instance utils$1.extend(instance, context, null, {allOwnKeys: true}); // Factory for creating new instances instance.create = function create(instanceConfig) { return createInstance(mergeConfig$1(defaultConfig, instanceConfig)); }; return instance; } // Create the default instance to be exported const axios = createInstance(defaults$1); // Expose Axios class to allow class inheritance axios.Axios = Axios$2; // Expose Cancel & CancelToken axios.CanceledError = CanceledError$1; axios.CancelToken = CancelToken$2; axios.isCancel = isCancel$1; axios.VERSION = VERSION$1; axios.toFormData = toFormData$1; // Expose AxiosError class axios.AxiosError = AxiosError$1; // alias for CanceledError for backward compatibility axios.Cancel = axios.CanceledError; // Expose all/spread axios.all = function all(promises) { return Promise.all(promises); }; axios.spread = spread$1; // Expose isAxiosError axios.isAxiosError = isAxiosError$1; // Expose mergeConfig axios.mergeConfig = mergeConfig$1; axios.AxiosHeaders = AxiosHeaders$2; axios.formToJSON = thing => formDataToJSON(utils$1.isHTMLForm(thing) ? new FormData(thing) : thing); axios.getAdapter = adapters.getAdapter; axios.HttpStatusCode = HttpStatusCode$2; axios.default = axios; // this module should only have a default export const axios$1 = axios; // This module is intended to unwrap Axios default export as named. // Keep top-level export same with static properties // so that it can keep same with es module or cjs const { Axios, AxiosError, CanceledError, isCancel, CancelToken, VERSION, all, Cancel, isAxiosError, spread, toFormData, AxiosHeaders, HttpStatusCode, formToJSON, getAdapter, mergeConfig } = axios$1; export { Axios, AxiosError, AxiosHeaders, Cancel, CancelToken, CanceledError, HttpStatusCode, VERSION, all, axios$1 as default, formToJSON, getAdapter, isAxiosError, isCancel, mergeConfig, spread, toFormData }; //# sourceMappingURL=axios.js.map node_modules/axios/dist/esm/axios.js.map 0000664 00000630126 15114741631 0014345 0 ustar 00 {"version":3,"file":"axios.js","sources":["../../lib/helpers/bind.js","../../lib/utils.js","../../lib/core/AxiosError.js","../../lib/helpers/null.js","../../lib/helpers/toFormData.js","../../lib/helpers/AxiosURLSearchParams.js","../../lib/helpers/buildURL.js","../../lib/core/InterceptorManager.js","../../lib/defaults/transitional.js","../../lib/platform/browser/classes/URLSearchParams.js","../../lib/platform/browser/classes/FormData.js","../../lib/platform/browser/classes/Blob.js","../../lib/platform/browser/index.js","../../lib/platform/common/utils.js","../../lib/platform/index.js","../../lib/helpers/toURLEncodedForm.js","../../lib/helpers/formDataToJSON.js","../../lib/defaults/index.js","../../lib/helpers/parseHeaders.js","../../lib/core/AxiosHeaders.js","../../lib/core/transformData.js","../../lib/cancel/isCancel.js","../../lib/cancel/CanceledError.js","../../lib/core/settle.js","../../lib/helpers/parseProtocol.js","../../lib/helpers/speedometer.js","../../lib/helpers/throttle.js","../../lib/helpers/progressEventReducer.js","../../lib/helpers/isURLSameOrigin.js","../../lib/helpers/cookies.js","../../lib/helpers/isAbsoluteURL.js","../../lib/helpers/combineURLs.js","../../lib/core/buildFullPath.js","../../lib/core/mergeConfig.js","../../lib/helpers/resolveConfig.js","../../lib/adapters/xhr.js","../../lib/helpers/composeSignals.js","../../lib/helpers/trackStream.js","../../lib/adapters/fetch.js","../../lib/adapters/adapters.js","../../lib/core/dispatchRequest.js","../../lib/env/data.js","../../lib/helpers/validator.js","../../lib/core/Axios.js","../../lib/cancel/CancelToken.js","../../lib/helpers/spread.js","../../lib/helpers/isAxiosError.js","../../lib/helpers/HttpStatusCode.js","../../lib/axios.js","../../index.js"],"sourcesContent":["'use strict';\n\nexport default function bind(fn, thisArg) {\n return function wrap() {\n return fn.apply(thisArg, arguments);\n };\n}\n","'use strict';\n\nimport bind from './helpers/bind.js';\n\n// utils is a library of generic helper functions non-specific to axios\n\nconst {toString} = Object.prototype;\nconst {getPrototypeOf} = Object;\nconst {iterator, toStringTag} = Symbol;\n\nconst kindOf = (cache => thing => {\n const str = toString.call(thing);\n return cache[str] || (cache[str] = str.slice(8, -1).toLowerCase());\n})(Object.create(null));\n\nconst kindOfTest = (type) => {\n type = type.toLowerCase();\n return (thing) => kindOf(thing) === type\n}\n\nconst typeOfTest = type => thing => typeof thing === type;\n\n/**\n * Determine if a value is an Array\n *\n * @param {Object} val The value to test\n *\n * @returns {boolean} True if value is an Array, otherwise false\n */\nconst {isArray} = Array;\n\n/**\n * Determine if a value is undefined\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if the value is undefined, otherwise false\n */\nconst isUndefined = typeOfTest('undefined');\n\n/**\n * Determine if a value is a Buffer\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a Buffer, otherwise false\n */\nfunction isBuffer(val) {\n return val !== null && !isUndefined(val) && val.constructor !== null && !isUndefined(val.constructor)\n && isFunction(val.constructor.isBuffer) && val.constructor.isBuffer(val);\n}\n\n/**\n * Determine if a value is an ArrayBuffer\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is an ArrayBuffer, otherwise false\n */\nconst isArrayBuffer = kindOfTest('ArrayBuffer');\n\n\n/**\n * Determine if a value is a view on an ArrayBuffer\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a view on an ArrayBuffer, otherwise false\n */\nfunction isArrayBufferView(val) {\n let result;\n if ((typeof ArrayBuffer !== 'undefined') && (ArrayBuffer.isView)) {\n result = ArrayBuffer.isView(val);\n } else {\n result = (val) && (val.buffer) && (isArrayBuffer(val.buffer));\n }\n return result;\n}\n\n/**\n * Determine if a value is a String\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a String, otherwise false\n */\nconst isString = typeOfTest('string');\n\n/**\n * Determine if a value is a Function\n *\n * @param {*} val The value to test\n * @returns {boolean} True if value is a Function, otherwise false\n */\nconst isFunction = typeOfTest('function');\n\n/**\n * Determine if a value is a Number\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a Number, otherwise false\n */\nconst isNumber = typeOfTest('number');\n\n/**\n * Determine if a value is an Object\n *\n * @param {*} thing The value to test\n *\n * @returns {boolean} True if value is an Object, otherwise false\n */\nconst isObject = (thing) => thing !== null && typeof thing === 'object';\n\n/**\n * Determine if a value is a Boolean\n *\n * @param {*} thing The value to test\n * @returns {boolean} True if value is a Boolean, otherwise false\n */\nconst isBoolean = thing => thing === true || thing === false;\n\n/**\n * Determine if a value is a plain Object\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a plain Object, otherwise false\n */\nconst isPlainObject = (val) => {\n if (kindOf(val) !== 'object') {\n return false;\n }\n\n const prototype = getPrototypeOf(val);\n return (prototype === null || prototype === Object.prototype || Object.getPrototypeOf(prototype) === null) && !(toStringTag in val) && !(iterator in val);\n}\n\n/**\n * Determine if a value is a Date\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a Date, otherwise false\n */\nconst isDate = kindOfTest('Date');\n\n/**\n * Determine if a value is a File\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a File, otherwise false\n */\nconst isFile = kindOfTest('File');\n\n/**\n * Determine if a value is a Blob\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a Blob, otherwise false\n */\nconst isBlob = kindOfTest('Blob');\n\n/**\n * Determine if a value is a FileList\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a File, otherwise false\n */\nconst isFileList = kindOfTest('FileList');\n\n/**\n * Determine if a value is a Stream\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a Stream, otherwise false\n */\nconst isStream = (val) => isObject(val) && isFunction(val.pipe);\n\n/**\n * Determine if a value is a FormData\n *\n * @param {*} thing The value to test\n *\n * @returns {boolean} True if value is an FormData, otherwise false\n */\nconst isFormData = (thing) => {\n let kind;\n return thing && (\n (typeof FormData === 'function' && thing instanceof FormData) || (\n isFunction(thing.append) && (\n (kind = kindOf(thing)) === 'formdata' ||\n // detect form-data instance\n (kind === 'object' && isFunction(thing.toString) && thing.toString() === '[object FormData]')\n )\n )\n )\n}\n\n/**\n * Determine if a value is a URLSearchParams object\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a URLSearchParams object, otherwise false\n */\nconst isURLSearchParams = kindOfTest('URLSearchParams');\n\nconst [isReadableStream, isRequest, isResponse, isHeaders] = ['ReadableStream', 'Request', 'Response', 'Headers'].map(kindOfTest);\n\n/**\n * Trim excess whitespace off the beginning and end of a string\n *\n * @param {String} str The String to trim\n *\n * @returns {String} The String freed of excess whitespace\n */\nconst trim = (str) => str.trim ?\n str.trim() : str.replace(/^[\\s\\uFEFF\\xA0]+|[\\s\\uFEFF\\xA0]+$/g, '');\n\n/**\n * Iterate over an Array or an Object invoking a function for each item.\n *\n * If `obj` is an Array callback will be called passing\n * the value, index, and complete array for each item.\n *\n * If 'obj' is an Object callback will be called passing\n * the value, key, and complete object for each property.\n *\n * @param {Object|Array} obj The object to iterate\n * @param {Function} fn The callback to invoke for each item\n *\n * @param {Boolean} [allOwnKeys = false]\n * @returns {any}\n */\nfunction forEach(obj, fn, {allOwnKeys = false} = {}) {\n // Don't bother if no value provided\n if (obj === null || typeof obj === 'undefined') {\n return;\n }\n\n let i;\n let l;\n\n // Force an array if not already something iterable\n if (typeof obj !== 'object') {\n /*eslint no-param-reassign:0*/\n obj = [obj];\n }\n\n if (isArray(obj)) {\n // Iterate over array values\n for (i = 0, l = obj.length; i < l; i++) {\n fn.call(null, obj[i], i, obj);\n }\n } else {\n // Iterate over object keys\n const keys = allOwnKeys ? Object.getOwnPropertyNames(obj) : Object.keys(obj);\n const len = keys.length;\n let key;\n\n for (i = 0; i < len; i++) {\n key = keys[i];\n fn.call(null, obj[key], key, obj);\n }\n }\n}\n\nfunction findKey(obj, key) {\n key = key.toLowerCase();\n const keys = Object.keys(obj);\n let i = keys.length;\n let _key;\n while (i-- > 0) {\n _key = keys[i];\n if (key === _key.toLowerCase()) {\n return _key;\n }\n }\n return null;\n}\n\nconst _global = (() => {\n /*eslint no-undef:0*/\n if (typeof globalThis !== \"undefined\") return globalThis;\n return typeof self !== \"undefined\" ? self : (typeof window !== 'undefined' ? window : global)\n})();\n\nconst isContextDefined = (context) => !isUndefined(context) && context !== _global;\n\n/**\n * Accepts varargs expecting each argument to be an object, then\n * immutably merges the properties of each object and returns result.\n *\n * When multiple objects contain the same key the later object in\n * the arguments list will take precedence.\n *\n * Example:\n *\n * ```js\n * var result = merge({foo: 123}, {foo: 456});\n * console.log(result.foo); // outputs 456\n * ```\n *\n * @param {Object} obj1 Object to merge\n *\n * @returns {Object} Result of all merge properties\n */\nfunction merge(/* obj1, obj2, obj3, ... */) {\n const {caseless} = isContextDefined(this) && this || {};\n const result = {};\n const assignValue = (val, key) => {\n const targetKey = caseless && findKey(result, key) || key;\n if (isPlainObject(result[targetKey]) && isPlainObject(val)) {\n result[targetKey] = merge(result[targetKey], val);\n } else if (isPlainObject(val)) {\n result[targetKey] = merge({}, val);\n } else if (isArray(val)) {\n result[targetKey] = val.slice();\n } else {\n result[targetKey] = val;\n }\n }\n\n for (let i = 0, l = arguments.length; i < l; i++) {\n arguments[i] && forEach(arguments[i], assignValue);\n }\n return result;\n}\n\n/**\n * Extends object a by mutably adding to it the properties of object b.\n *\n * @param {Object} a The object to be extended\n * @param {Object} b The object to copy properties from\n * @param {Object} thisArg The object to bind function to\n *\n * @param {Boolean} [allOwnKeys]\n * @returns {Object} The resulting value of object a\n */\nconst extend = (a, b, thisArg, {allOwnKeys}= {}) => {\n forEach(b, (val, key) => {\n if (thisArg && isFunction(val)) {\n a[key] = bind(val, thisArg);\n } else {\n a[key] = val;\n }\n }, {allOwnKeys});\n return a;\n}\n\n/**\n * Remove byte order marker. This catches EF BB BF (the UTF-8 BOM)\n *\n * @param {string} content with BOM\n *\n * @returns {string} content value without BOM\n */\nconst stripBOM = (content) => {\n if (content.charCodeAt(0) === 0xFEFF) {\n content = content.slice(1);\n }\n return content;\n}\n\n/**\n * Inherit the prototype methods from one constructor into another\n * @param {function} constructor\n * @param {function} superConstructor\n * @param {object} [props]\n * @param {object} [descriptors]\n *\n * @returns {void}\n */\nconst inherits = (constructor, superConstructor, props, descriptors) => {\n constructor.prototype = Object.create(superConstructor.prototype, descriptors);\n constructor.prototype.constructor = constructor;\n Object.defineProperty(constructor, 'super', {\n value: superConstructor.prototype\n });\n props && Object.assign(constructor.prototype, props);\n}\n\n/**\n * Resolve object with deep prototype chain to a flat object\n * @param {Object} sourceObj source object\n * @param {Object} [destObj]\n * @param {Function|Boolean} [filter]\n * @param {Function} [propFilter]\n *\n * @returns {Object}\n */\nconst toFlatObject = (sourceObj, destObj, filter, propFilter) => {\n let props;\n let i;\n let prop;\n const merged = {};\n\n destObj = destObj || {};\n // eslint-disable-next-line no-eq-null,eqeqeq\n if (sourceObj == null) return destObj;\n\n do {\n props = Object.getOwnPropertyNames(sourceObj);\n i = props.length;\n while (i-- > 0) {\n prop = props[i];\n if ((!propFilter || propFilter(prop, sourceObj, destObj)) && !merged[prop]) {\n destObj[prop] = sourceObj[prop];\n merged[prop] = true;\n }\n }\n sourceObj = filter !== false && getPrototypeOf(sourceObj);\n } while (sourceObj && (!filter || filter(sourceObj, destObj)) && sourceObj !== Object.prototype);\n\n return destObj;\n}\n\n/**\n * Determines whether a string ends with the characters of a specified string\n *\n * @param {String} str\n * @param {String} searchString\n * @param {Number} [position= 0]\n *\n * @returns {boolean}\n */\nconst endsWith = (str, searchString, position) => {\n str = String(str);\n if (position === undefined || position > str.length) {\n position = str.length;\n }\n position -= searchString.length;\n const lastIndex = str.indexOf(searchString, position);\n return lastIndex !== -1 && lastIndex === position;\n}\n\n\n/**\n * Returns new array from array like object or null if failed\n *\n * @param {*} [thing]\n *\n * @returns {?Array}\n */\nconst toArray = (thing) => {\n if (!thing) return null;\n if (isArray(thing)) return thing;\n let i = thing.length;\n if (!isNumber(i)) return null;\n const arr = new Array(i);\n while (i-- > 0) {\n arr[i] = thing[i];\n }\n return arr;\n}\n\n/**\n * Checking if the Uint8Array exists and if it does, it returns a function that checks if the\n * thing passed in is an instance of Uint8Array\n *\n * @param {TypedArray}\n *\n * @returns {Array}\n */\n// eslint-disable-next-line func-names\nconst isTypedArray = (TypedArray => {\n // eslint-disable-next-line func-names\n return thing => {\n return TypedArray && thing instanceof TypedArray;\n };\n})(typeof Uint8Array !== 'undefined' && getPrototypeOf(Uint8Array));\n\n/**\n * For each entry in the object, call the function with the key and value.\n *\n * @param {Object<any, any>} obj - The object to iterate over.\n * @param {Function} fn - The function to call for each entry.\n *\n * @returns {void}\n */\nconst forEachEntry = (obj, fn) => {\n const generator = obj && obj[iterator];\n\n const _iterator = generator.call(obj);\n\n let result;\n\n while ((result = _iterator.next()) && !result.done) {\n const pair = result.value;\n fn.call(obj, pair[0], pair[1]);\n }\n}\n\n/**\n * It takes a regular expression and a string, and returns an array of all the matches\n *\n * @param {string} regExp - The regular expression to match against.\n * @param {string} str - The string to search.\n *\n * @returns {Array<boolean>}\n */\nconst matchAll = (regExp, str) => {\n let matches;\n const arr = [];\n\n while ((matches = regExp.exec(str)) !== null) {\n arr.push(matches);\n }\n\n return arr;\n}\n\n/* Checking if the kindOfTest function returns true when passed an HTMLFormElement. */\nconst isHTMLForm = kindOfTest('HTMLFormElement');\n\nconst toCamelCase = str => {\n return str.toLowerCase().replace(/[-_\\s]([a-z\\d])(\\w*)/g,\n function replacer(m, p1, p2) {\n return p1.toUpperCase() + p2;\n }\n );\n};\n\n/* Creating a function that will check if an object has a property. */\nconst hasOwnProperty = (({hasOwnProperty}) => (obj, prop) => hasOwnProperty.call(obj, prop))(Object.prototype);\n\n/**\n * Determine if a value is a RegExp object\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a RegExp object, otherwise false\n */\nconst isRegExp = kindOfTest('RegExp');\n\nconst reduceDescriptors = (obj, reducer) => {\n const descriptors = Object.getOwnPropertyDescriptors(obj);\n const reducedDescriptors = {};\n\n forEach(descriptors, (descriptor, name) => {\n let ret;\n if ((ret = reducer(descriptor, name, obj)) !== false) {\n reducedDescriptors[name] = ret || descriptor;\n }\n });\n\n Object.defineProperties(obj, reducedDescriptors);\n}\n\n/**\n * Makes all methods read-only\n * @param {Object} obj\n */\n\nconst freezeMethods = (obj) => {\n reduceDescriptors(obj, (descriptor, name) => {\n // skip restricted props in strict mode\n if (isFunction(obj) && ['arguments', 'caller', 'callee'].indexOf(name) !== -1) {\n return false;\n }\n\n const value = obj[name];\n\n if (!isFunction(value)) return;\n\n descriptor.enumerable = false;\n\n if ('writable' in descriptor) {\n descriptor.writable = false;\n return;\n }\n\n if (!descriptor.set) {\n descriptor.set = () => {\n throw Error('Can not rewrite read-only method \\'' + name + '\\'');\n };\n }\n });\n}\n\nconst toObjectSet = (arrayOrString, delimiter) => {\n const obj = {};\n\n const define = (arr) => {\n arr.forEach(value => {\n obj[value] = true;\n });\n }\n\n isArray(arrayOrString) ? define(arrayOrString) : define(String(arrayOrString).split(delimiter));\n\n return obj;\n}\n\nconst noop = () => {}\n\nconst toFiniteNumber = (value, defaultValue) => {\n return value != null && Number.isFinite(value = +value) ? value : defaultValue;\n}\n\n/**\n * If the thing is a FormData object, return true, otherwise return false.\n *\n * @param {unknown} thing - The thing to check.\n *\n * @returns {boolean}\n */\nfunction isSpecCompliantForm(thing) {\n return !!(thing && isFunction(thing.append) && thing[toStringTag] === 'FormData' && thing[iterator]);\n}\n\nconst toJSONObject = (obj) => {\n const stack = new Array(10);\n\n const visit = (source, i) => {\n\n if (isObject(source)) {\n if (stack.indexOf(source) >= 0) {\n return;\n }\n\n if(!('toJSON' in source)) {\n stack[i] = source;\n const target = isArray(source) ? [] : {};\n\n forEach(source, (value, key) => {\n const reducedValue = visit(value, i + 1);\n !isUndefined(reducedValue) && (target[key] = reducedValue);\n });\n\n stack[i] = undefined;\n\n return target;\n }\n }\n\n return source;\n }\n\n return visit(obj, 0);\n}\n\nconst isAsyncFn = kindOfTest('AsyncFunction');\n\nconst isThenable = (thing) =>\n thing && (isObject(thing) || isFunction(thing)) && isFunction(thing.then) && isFunction(thing.catch);\n\n// original code\n// https://github.com/DigitalBrainJS/AxiosPromise/blob/16deab13710ec09779922131f3fa5954320f83ab/lib/utils.js#L11-L34\n\nconst _setImmediate = ((setImmediateSupported, postMessageSupported) => {\n if (setImmediateSupported) {\n return setImmediate;\n }\n\n return postMessageSupported ? ((token, callbacks) => {\n _global.addEventListener(\"message\", ({source, data}) => {\n if (source === _global && data === token) {\n callbacks.length && callbacks.shift()();\n }\n }, false);\n\n return (cb) => {\n callbacks.push(cb);\n _global.postMessage(token, \"*\");\n }\n })(`axios@${Math.random()}`, []) : (cb) => setTimeout(cb);\n})(\n typeof setImmediate === 'function',\n isFunction(_global.postMessage)\n);\n\nconst asap = typeof queueMicrotask !== 'undefined' ?\n queueMicrotask.bind(_global) : ( typeof process !== 'undefined' && process.nextTick || _setImmediate);\n\n// *********************\n\n\nconst isIterable = (thing) => thing != null && isFunction(thing[iterator]);\n\n\nexport default {\n isArray,\n isArrayBuffer,\n isBuffer,\n isFormData,\n isArrayBufferView,\n isString,\n isNumber,\n isBoolean,\n isObject,\n isPlainObject,\n isReadableStream,\n isRequest,\n isResponse,\n isHeaders,\n isUndefined,\n isDate,\n isFile,\n isBlob,\n isRegExp,\n isFunction,\n isStream,\n isURLSearchParams,\n isTypedArray,\n isFileList,\n forEach,\n merge,\n extend,\n trim,\n stripBOM,\n inherits,\n toFlatObject,\n kindOf,\n kindOfTest,\n endsWith,\n toArray,\n forEachEntry,\n matchAll,\n isHTMLForm,\n hasOwnProperty,\n hasOwnProp: hasOwnProperty, // an alias to avoid ESLint no-prototype-builtins detection\n reduceDescriptors,\n freezeMethods,\n toObjectSet,\n toCamelCase,\n noop,\n toFiniteNumber,\n findKey,\n global: _global,\n isContextDefined,\n isSpecCompliantForm,\n toJSONObject,\n isAsyncFn,\n isThenable,\n setImmediate: _setImmediate,\n asap,\n isIterable\n};\n","'use strict';\n\nimport utils from '../utils.js';\n\n/**\n * Create an Error with the specified message, config, error code, request and response.\n *\n * @param {string} message The error message.\n * @param {string} [code] The error code (for example, 'ECONNABORTED').\n * @param {Object} [config] The config.\n * @param {Object} [request] The request.\n * @param {Object} [response] The response.\n *\n * @returns {Error} The created error.\n */\nfunction AxiosError(message, code, config, request, response) {\n Error.call(this);\n\n if (Error.captureStackTrace) {\n Error.captureStackTrace(this, this.constructor);\n } else {\n this.stack = (new Error()).stack;\n }\n\n this.message = message;\n this.name = 'AxiosError';\n code && (this.code = code);\n config && (this.config = config);\n request && (this.request = request);\n if (response) {\n this.response = response;\n this.status = response.status ? response.status : null;\n }\n}\n\nutils.inherits(AxiosError, Error, {\n toJSON: function toJSON() {\n return {\n // Standard\n message: this.message,\n name: this.name,\n // Microsoft\n description: this.description,\n number: this.number,\n // Mozilla\n fileName: this.fileName,\n lineNumber: this.lineNumber,\n columnNumber: this.columnNumber,\n stack: this.stack,\n // Axios\n config: utils.toJSONObject(this.config),\n code: this.code,\n status: this.status\n };\n }\n});\n\nconst prototype = AxiosError.prototype;\nconst descriptors = {};\n\n[\n 'ERR_BAD_OPTION_VALUE',\n 'ERR_BAD_OPTION',\n 'ECONNABORTED',\n 'ETIMEDOUT',\n 'ERR_NETWORK',\n 'ERR_FR_TOO_MANY_REDIRECTS',\n 'ERR_DEPRECATED',\n 'ERR_BAD_RESPONSE',\n 'ERR_BAD_REQUEST',\n 'ERR_CANCELED',\n 'ERR_NOT_SUPPORT',\n 'ERR_INVALID_URL'\n// eslint-disable-next-line func-names\n].forEach(code => {\n descriptors[code] = {value: code};\n});\n\nObject.defineProperties(AxiosError, descriptors);\nObject.defineProperty(prototype, 'isAxiosError', {value: true});\n\n// eslint-disable-next-line func-names\nAxiosError.from = (error, code, config, request, response, customProps) => {\n const axiosError = Object.create(prototype);\n\n utils.toFlatObject(error, axiosError, function filter(obj) {\n return obj !== Error.prototype;\n }, prop => {\n return prop !== 'isAxiosError';\n });\n\n AxiosError.call(axiosError, error.message, code, config, request, response);\n\n axiosError.cause = error;\n\n axiosError.name = error.name;\n\n customProps && Object.assign(axiosError, customProps);\n\n return axiosError;\n};\n\nexport default AxiosError;\n","// eslint-disable-next-line strict\nexport default null;\n","'use strict';\n\nimport utils from '../utils.js';\nimport AxiosError from '../core/AxiosError.js';\n// temporary hotfix to avoid circular references until AxiosURLSearchParams is refactored\nimport PlatformFormData from '../platform/node/classes/FormData.js';\n\n/**\n * Determines if the given thing is a array or js object.\n *\n * @param {string} thing - The object or array to be visited.\n *\n * @returns {boolean}\n */\nfunction isVisitable(thing) {\n return utils.isPlainObject(thing) || utils.isArray(thing);\n}\n\n/**\n * It removes the brackets from the end of a string\n *\n * @param {string} key - The key of the parameter.\n *\n * @returns {string} the key without the brackets.\n */\nfunction removeBrackets(key) {\n return utils.endsWith(key, '[]') ? key.slice(0, -2) : key;\n}\n\n/**\n * It takes a path, a key, and a boolean, and returns a string\n *\n * @param {string} path - The path to the current key.\n * @param {string} key - The key of the current object being iterated over.\n * @param {string} dots - If true, the key will be rendered with dots instead of brackets.\n *\n * @returns {string} The path to the current key.\n */\nfunction renderKey(path, key, dots) {\n if (!path) return key;\n return path.concat(key).map(function each(token, i) {\n // eslint-disable-next-line no-param-reassign\n token = removeBrackets(token);\n return !dots && i ? '[' + token + ']' : token;\n }).join(dots ? '.' : '');\n}\n\n/**\n * If the array is an array and none of its elements are visitable, then it's a flat array.\n *\n * @param {Array<any>} arr - The array to check\n *\n * @returns {boolean}\n */\nfunction isFlatArray(arr) {\n return utils.isArray(arr) && !arr.some(isVisitable);\n}\n\nconst predicates = utils.toFlatObject(utils, {}, null, function filter(prop) {\n return /^is[A-Z]/.test(prop);\n});\n\n/**\n * Convert a data object to FormData\n *\n * @param {Object} obj\n * @param {?Object} [formData]\n * @param {?Object} [options]\n * @param {Function} [options.visitor]\n * @param {Boolean} [options.metaTokens = true]\n * @param {Boolean} [options.dots = false]\n * @param {?Boolean} [options.indexes = false]\n *\n * @returns {Object}\n **/\n\n/**\n * It converts an object into a FormData object\n *\n * @param {Object<any, any>} obj - The object to convert to form data.\n * @param {string} formData - The FormData object to append to.\n * @param {Object<string, any>} options\n *\n * @returns\n */\nfunction toFormData(obj, formData, options) {\n if (!utils.isObject(obj)) {\n throw new TypeError('target must be an object');\n }\n\n // eslint-disable-next-line no-param-reassign\n formData = formData || new (PlatformFormData || FormData)();\n\n // eslint-disable-next-line no-param-reassign\n options = utils.toFlatObject(options, {\n metaTokens: true,\n dots: false,\n indexes: false\n }, false, function defined(option, source) {\n // eslint-disable-next-line no-eq-null,eqeqeq\n return !utils.isUndefined(source[option]);\n });\n\n const metaTokens = options.metaTokens;\n // eslint-disable-next-line no-use-before-define\n const visitor = options.visitor || defaultVisitor;\n const dots = options.dots;\n const indexes = options.indexes;\n const _Blob = options.Blob || typeof Blob !== 'undefined' && Blob;\n const useBlob = _Blob && utils.isSpecCompliantForm(formData);\n\n if (!utils.isFunction(visitor)) {\n throw new TypeError('visitor must be a function');\n }\n\n function convertValue(value) {\n if (value === null) return '';\n\n if (utils.isDate(value)) {\n return value.toISOString();\n }\n\n if (utils.isBoolean(value)) {\n return value.toString();\n }\n\n if (!useBlob && utils.isBlob(value)) {\n throw new AxiosError('Blob is not supported. Use a Buffer instead.');\n }\n\n if (utils.isArrayBuffer(value) || utils.isTypedArray(value)) {\n return useBlob && typeof Blob === 'function' ? new Blob([value]) : Buffer.from(value);\n }\n\n return value;\n }\n\n /**\n * Default visitor.\n *\n * @param {*} value\n * @param {String|Number} key\n * @param {Array<String|Number>} path\n * @this {FormData}\n *\n * @returns {boolean} return true to visit the each prop of the value recursively\n */\n function defaultVisitor(value, key, path) {\n let arr = value;\n\n if (value && !path && typeof value === 'object') {\n if (utils.endsWith(key, '{}')) {\n // eslint-disable-next-line no-param-reassign\n key = metaTokens ? key : key.slice(0, -2);\n // eslint-disable-next-line no-param-reassign\n value = JSON.stringify(value);\n } else if (\n (utils.isArray(value) && isFlatArray(value)) ||\n ((utils.isFileList(value) || utils.endsWith(key, '[]')) && (arr = utils.toArray(value))\n )) {\n // eslint-disable-next-line no-param-reassign\n key = removeBrackets(key);\n\n arr.forEach(function each(el, index) {\n !(utils.isUndefined(el) || el === null) && formData.append(\n // eslint-disable-next-line no-nested-ternary\n indexes === true ? renderKey([key], index, dots) : (indexes === null ? key : key + '[]'),\n convertValue(el)\n );\n });\n return false;\n }\n }\n\n if (isVisitable(value)) {\n return true;\n }\n\n formData.append(renderKey(path, key, dots), convertValue(value));\n\n return false;\n }\n\n const stack = [];\n\n const exposedHelpers = Object.assign(predicates, {\n defaultVisitor,\n convertValue,\n isVisitable\n });\n\n function build(value, path) {\n if (utils.isUndefined(value)) return;\n\n if (stack.indexOf(value) !== -1) {\n throw Error('Circular reference detected in ' + path.join('.'));\n }\n\n stack.push(value);\n\n utils.forEach(value, function each(el, key) {\n const result = !(utils.isUndefined(el) || el === null) && visitor.call(\n formData, el, utils.isString(key) ? key.trim() : key, path, exposedHelpers\n );\n\n if (result === true) {\n build(el, path ? path.concat(key) : [key]);\n }\n });\n\n stack.pop();\n }\n\n if (!utils.isObject(obj)) {\n throw new TypeError('data must be an object');\n }\n\n build(obj);\n\n return formData;\n}\n\nexport default toFormData;\n","'use strict';\n\nimport toFormData from './toFormData.js';\n\n/**\n * It encodes a string by replacing all characters that are not in the unreserved set with\n * their percent-encoded equivalents\n *\n * @param {string} str - The string to encode.\n *\n * @returns {string} The encoded string.\n */\nfunction encode(str) {\n const charMap = {\n '!': '%21',\n \"'\": '%27',\n '(': '%28',\n ')': '%29',\n '~': '%7E',\n '%20': '+',\n '%00': '\\x00'\n };\n return encodeURIComponent(str).replace(/[!'()~]|%20|%00/g, function replacer(match) {\n return charMap[match];\n });\n}\n\n/**\n * It takes a params object and converts it to a FormData object\n *\n * @param {Object<string, any>} params - The parameters to be converted to a FormData object.\n * @param {Object<string, any>} options - The options object passed to the Axios constructor.\n *\n * @returns {void}\n */\nfunction AxiosURLSearchParams(params, options) {\n this._pairs = [];\n\n params && toFormData(params, this, options);\n}\n\nconst prototype = AxiosURLSearchParams.prototype;\n\nprototype.append = function append(name, value) {\n this._pairs.push([name, value]);\n};\n\nprototype.toString = function toString(encoder) {\n const _encode = encoder ? function(value) {\n return encoder.call(this, value, encode);\n } : encode;\n\n return this._pairs.map(function each(pair) {\n return _encode(pair[0]) + '=' + _encode(pair[1]);\n }, '').join('&');\n};\n\nexport default AxiosURLSearchParams;\n","'use strict';\n\nimport utils from '../utils.js';\nimport AxiosURLSearchParams from '../helpers/AxiosURLSearchParams.js';\n\n/**\n * It replaces all instances of the characters `:`, `$`, `,`, `+`, `[`, and `]` with their\n * URI encoded counterparts\n *\n * @param {string} val The value to be encoded.\n *\n * @returns {string} The encoded value.\n */\nfunction encode(val) {\n return encodeURIComponent(val).\n replace(/%3A/gi, ':').\n replace(/%24/g, '$').\n replace(/%2C/gi, ',').\n replace(/%20/g, '+').\n replace(/%5B/gi, '[').\n replace(/%5D/gi, ']');\n}\n\n/**\n * Build a URL by appending params to the end\n *\n * @param {string} url The base of the url (e.g., http://www.google.com)\n * @param {object} [params] The params to be appended\n * @param {?(object|Function)} options\n *\n * @returns {string} The formatted url\n */\nexport default function buildURL(url, params, options) {\n /*eslint no-param-reassign:0*/\n if (!params) {\n return url;\n }\n \n const _encode = options && options.encode || encode;\n\n if (utils.isFunction(options)) {\n options = {\n serialize: options\n };\n } \n\n const serializeFn = options && options.serialize;\n\n let serializedParams;\n\n if (serializeFn) {\n serializedParams = serializeFn(params, options);\n } else {\n serializedParams = utils.isURLSearchParams(params) ?\n params.toString() :\n new AxiosURLSearchParams(params, options).toString(_encode);\n }\n\n if (serializedParams) {\n const hashmarkIndex = url.indexOf(\"#\");\n\n if (hashmarkIndex !== -1) {\n url = url.slice(0, hashmarkIndex);\n }\n url += (url.indexOf('?') === -1 ? '?' : '&') + serializedParams;\n }\n\n return url;\n}\n","'use strict';\n\nimport utils from './../utils.js';\n\nclass InterceptorManager {\n constructor() {\n this.handlers = [];\n }\n\n /**\n * Add a new interceptor to the stack\n *\n * @param {Function} fulfilled The function to handle `then` for a `Promise`\n * @param {Function} rejected The function to handle `reject` for a `Promise`\n *\n * @return {Number} An ID used to remove interceptor later\n */\n use(fulfilled, rejected, options) {\n this.handlers.push({\n fulfilled,\n rejected,\n synchronous: options ? options.synchronous : false,\n runWhen: options ? options.runWhen : null\n });\n return this.handlers.length - 1;\n }\n\n /**\n * Remove an interceptor from the stack\n *\n * @param {Number} id The ID that was returned by `use`\n *\n * @returns {Boolean} `true` if the interceptor was removed, `false` otherwise\n */\n eject(id) {\n if (this.handlers[id]) {\n this.handlers[id] = null;\n }\n }\n\n /**\n * Clear all interceptors from the stack\n *\n * @returns {void}\n */\n clear() {\n if (this.handlers) {\n this.handlers = [];\n }\n }\n\n /**\n * Iterate over all the registered interceptors\n *\n * This method is particularly useful for skipping over any\n * interceptors that may have become `null` calling `eject`.\n *\n * @param {Function} fn The function to call for each interceptor\n *\n * @returns {void}\n */\n forEach(fn) {\n utils.forEach(this.handlers, function forEachHandler(h) {\n if (h !== null) {\n fn(h);\n }\n });\n }\n}\n\nexport default InterceptorManager;\n","'use strict';\n\nexport default {\n silentJSONParsing: true,\n forcedJSONParsing: true,\n clarifyTimeoutError: false\n};\n","'use strict';\n\nimport AxiosURLSearchParams from '../../../helpers/AxiosURLSearchParams.js';\nexport default typeof URLSearchParams !== 'undefined' ? URLSearchParams : AxiosURLSearchParams;\n","'use strict';\n\nexport default typeof FormData !== 'undefined' ? FormData : null;\n","'use strict'\n\nexport default typeof Blob !== 'undefined' ? Blob : null\n","import URLSearchParams from './classes/URLSearchParams.js'\nimport FormData from './classes/FormData.js'\nimport Blob from './classes/Blob.js'\n\nexport default {\n isBrowser: true,\n classes: {\n URLSearchParams,\n FormData,\n Blob\n },\n protocols: ['http', 'https', 'file', 'blob', 'url', 'data']\n};\n","const hasBrowserEnv = typeof window !== 'undefined' && typeof document !== 'undefined';\n\nconst _navigator = typeof navigator === 'object' && navigator || undefined;\n\n/**\n * Determine if we're running in a standard browser environment\n *\n * This allows axios to run in a web worker, and react-native.\n * Both environments support XMLHttpRequest, but not fully standard globals.\n *\n * web workers:\n * typeof window -> undefined\n * typeof document -> undefined\n *\n * react-native:\n * navigator.product -> 'ReactNative'\n * nativescript\n * navigator.product -> 'NativeScript' or 'NS'\n *\n * @returns {boolean}\n */\nconst hasStandardBrowserEnv = hasBrowserEnv &&\n (!_navigator || ['ReactNative', 'NativeScript', 'NS'].indexOf(_navigator.product) < 0);\n\n/**\n * Determine if we're running in a standard browser webWorker environment\n *\n * Although the `isStandardBrowserEnv` method indicates that\n * `allows axios to run in a web worker`, the WebWorker will still be\n * filtered out due to its judgment standard\n * `typeof window !== 'undefined' && typeof document !== 'undefined'`.\n * This leads to a problem when axios post `FormData` in webWorker\n */\nconst hasStandardBrowserWebWorkerEnv = (() => {\n return (\n typeof WorkerGlobalScope !== 'undefined' &&\n // eslint-disable-next-line no-undef\n self instanceof WorkerGlobalScope &&\n typeof self.importScripts === 'function'\n );\n})();\n\nconst origin = hasBrowserEnv && window.location.href || 'http://localhost';\n\nexport {\n hasBrowserEnv,\n hasStandardBrowserWebWorkerEnv,\n hasStandardBrowserEnv,\n _navigator as navigator,\n origin\n}\n","import platform from './node/index.js';\nimport * as utils from './common/utils.js';\n\nexport default {\n ...utils,\n ...platform\n}\n","'use strict';\n\nimport utils from '../utils.js';\nimport toFormData from './toFormData.js';\nimport platform from '../platform/index.js';\n\nexport default function toURLEncodedForm(data, options) {\n return toFormData(data, new platform.classes.URLSearchParams(), Object.assign({\n visitor: function(value, key, path, helpers) {\n if (platform.isNode && utils.isBuffer(value)) {\n this.append(key, value.toString('base64'));\n return false;\n }\n\n return helpers.defaultVisitor.apply(this, arguments);\n }\n }, options));\n}\n","'use strict';\n\nimport utils from '../utils.js';\n\n/**\n * It takes a string like `foo[x][y][z]` and returns an array like `['foo', 'x', 'y', 'z']\n *\n * @param {string} name - The name of the property to get.\n *\n * @returns An array of strings.\n */\nfunction parsePropPath(name) {\n // foo[x][y][z]\n // foo.x.y.z\n // foo-x-y-z\n // foo x y z\n return utils.matchAll(/\\w+|\\[(\\w*)]/g, name).map(match => {\n return match[0] === '[]' ? '' : match[1] || match[0];\n });\n}\n\n/**\n * Convert an array to an object.\n *\n * @param {Array<any>} arr - The array to convert to an object.\n *\n * @returns An object with the same keys and values as the array.\n */\nfunction arrayToObject(arr) {\n const obj = {};\n const keys = Object.keys(arr);\n let i;\n const len = keys.length;\n let key;\n for (i = 0; i < len; i++) {\n key = keys[i];\n obj[key] = arr[key];\n }\n return obj;\n}\n\n/**\n * It takes a FormData object and returns a JavaScript object\n *\n * @param {string} formData The FormData object to convert to JSON.\n *\n * @returns {Object<string, any> | null} The converted object.\n */\nfunction formDataToJSON(formData) {\n function buildPath(path, value, target, index) {\n let name = path[index++];\n\n if (name === '__proto__') return true;\n\n const isNumericKey = Number.isFinite(+name);\n const isLast = index >= path.length;\n name = !name && utils.isArray(target) ? target.length : name;\n\n if (isLast) {\n if (utils.hasOwnProp(target, name)) {\n target[name] = [target[name], value];\n } else {\n target[name] = value;\n }\n\n return !isNumericKey;\n }\n\n if (!target[name] || !utils.isObject(target[name])) {\n target[name] = [];\n }\n\n const result = buildPath(path, value, target[name], index);\n\n if (result && utils.isArray(target[name])) {\n target[name] = arrayToObject(target[name]);\n }\n\n return !isNumericKey;\n }\n\n if (utils.isFormData(formData) && utils.isFunction(formData.entries)) {\n const obj = {};\n\n utils.forEachEntry(formData, (name, value) => {\n buildPath(parsePropPath(name), value, obj, 0);\n });\n\n return obj;\n }\n\n return null;\n}\n\nexport default formDataToJSON;\n","'use strict';\n\nimport utils from '../utils.js';\nimport AxiosError from '../core/AxiosError.js';\nimport transitionalDefaults from './transitional.js';\nimport toFormData from '../helpers/toFormData.js';\nimport toURLEncodedForm from '../helpers/toURLEncodedForm.js';\nimport platform from '../platform/index.js';\nimport formDataToJSON from '../helpers/formDataToJSON.js';\n\n/**\n * It takes a string, tries to parse it, and if it fails, it returns the stringified version\n * of the input\n *\n * @param {any} rawValue - The value to be stringified.\n * @param {Function} parser - A function that parses a string into a JavaScript object.\n * @param {Function} encoder - A function that takes a value and returns a string.\n *\n * @returns {string} A stringified version of the rawValue.\n */\nfunction stringifySafely(rawValue, parser, encoder) {\n if (utils.isString(rawValue)) {\n try {\n (parser || JSON.parse)(rawValue);\n return utils.trim(rawValue);\n } catch (e) {\n if (e.name !== 'SyntaxError') {\n throw e;\n }\n }\n }\n\n return (encoder || JSON.stringify)(rawValue);\n}\n\nconst defaults = {\n\n transitional: transitionalDefaults,\n\n adapter: ['xhr', 'http', 'fetch'],\n\n transformRequest: [function transformRequest(data, headers) {\n const contentType = headers.getContentType() || '';\n const hasJSONContentType = contentType.indexOf('application/json') > -1;\n const isObjectPayload = utils.isObject(data);\n\n if (isObjectPayload && utils.isHTMLForm(data)) {\n data = new FormData(data);\n }\n\n const isFormData = utils.isFormData(data);\n\n if (isFormData) {\n return hasJSONContentType ? JSON.stringify(formDataToJSON(data)) : data;\n }\n\n if (utils.isArrayBuffer(data) ||\n utils.isBuffer(data) ||\n utils.isStream(data) ||\n utils.isFile(data) ||\n utils.isBlob(data) ||\n utils.isReadableStream(data)\n ) {\n return data;\n }\n if (utils.isArrayBufferView(data)) {\n return data.buffer;\n }\n if (utils.isURLSearchParams(data)) {\n headers.setContentType('application/x-www-form-urlencoded;charset=utf-8', false);\n return data.toString();\n }\n\n let isFileList;\n\n if (isObjectPayload) {\n if (contentType.indexOf('application/x-www-form-urlencoded') > -1) {\n return toURLEncodedForm(data, this.formSerializer).toString();\n }\n\n if ((isFileList = utils.isFileList(data)) || contentType.indexOf('multipart/form-data') > -1) {\n const _FormData = this.env && this.env.FormData;\n\n return toFormData(\n isFileList ? {'files[]': data} : data,\n _FormData && new _FormData(),\n this.formSerializer\n );\n }\n }\n\n if (isObjectPayload || hasJSONContentType ) {\n headers.setContentType('application/json', false);\n return stringifySafely(data);\n }\n\n return data;\n }],\n\n transformResponse: [function transformResponse(data) {\n const transitional = this.transitional || defaults.transitional;\n const forcedJSONParsing = transitional && transitional.forcedJSONParsing;\n const JSONRequested = this.responseType === 'json';\n\n if (utils.isResponse(data) || utils.isReadableStream(data)) {\n return data;\n }\n\n if (data && utils.isString(data) && ((forcedJSONParsing && !this.responseType) || JSONRequested)) {\n const silentJSONParsing = transitional && transitional.silentJSONParsing;\n const strictJSONParsing = !silentJSONParsing && JSONRequested;\n\n try {\n return JSON.parse(data);\n } catch (e) {\n if (strictJSONParsing) {\n if (e.name === 'SyntaxError') {\n throw AxiosError.from(e, AxiosError.ERR_BAD_RESPONSE, this, null, this.response);\n }\n throw e;\n }\n }\n }\n\n return data;\n }],\n\n /**\n * A timeout in milliseconds to abort a request. If set to 0 (default) a\n * timeout is not created.\n */\n timeout: 0,\n\n xsrfCookieName: 'XSRF-TOKEN',\n xsrfHeaderName: 'X-XSRF-TOKEN',\n\n maxContentLength: -1,\n maxBodyLength: -1,\n\n env: {\n FormData: platform.classes.FormData,\n Blob: platform.classes.Blob\n },\n\n validateStatus: function validateStatus(status) {\n return status >= 200 && status < 300;\n },\n\n headers: {\n common: {\n 'Accept': 'application/json, text/plain, */*',\n 'Content-Type': undefined\n }\n }\n};\n\nutils.forEach(['delete', 'get', 'head', 'post', 'put', 'patch'], (method) => {\n defaults.headers[method] = {};\n});\n\nexport default defaults;\n","'use strict';\n\nimport utils from './../utils.js';\n\n// RawAxiosHeaders whose duplicates are ignored by node\n// c.f. https://nodejs.org/api/http.html#http_message_headers\nconst ignoreDuplicateOf = utils.toObjectSet([\n 'age', 'authorization', 'content-length', 'content-type', 'etag',\n 'expires', 'from', 'host', 'if-modified-since', 'if-unmodified-since',\n 'last-modified', 'location', 'max-forwards', 'proxy-authorization',\n 'referer', 'retry-after', 'user-agent'\n]);\n\n/**\n * Parse headers into an object\n *\n * ```\n * Date: Wed, 27 Aug 2014 08:58:49 GMT\n * Content-Type: application/json\n * Connection: keep-alive\n * Transfer-Encoding: chunked\n * ```\n *\n * @param {String} rawHeaders Headers needing to be parsed\n *\n * @returns {Object} Headers parsed into an object\n */\nexport default rawHeaders => {\n const parsed = {};\n let key;\n let val;\n let i;\n\n rawHeaders && rawHeaders.split('\\n').forEach(function parser(line) {\n i = line.indexOf(':');\n key = line.substring(0, i).trim().toLowerCase();\n val = line.substring(i + 1).trim();\n\n if (!key || (parsed[key] && ignoreDuplicateOf[key])) {\n return;\n }\n\n if (key === 'set-cookie') {\n if (parsed[key]) {\n parsed[key].push(val);\n } else {\n parsed[key] = [val];\n }\n } else {\n parsed[key] = parsed[key] ? parsed[key] + ', ' + val : val;\n }\n });\n\n return parsed;\n};\n","'use strict';\n\nimport utils from '../utils.js';\nimport parseHeaders from '../helpers/parseHeaders.js';\n\nconst $internals = Symbol('internals');\n\nfunction normalizeHeader(header) {\n return header && String(header).trim().toLowerCase();\n}\n\nfunction normalizeValue(value) {\n if (value === false || value == null) {\n return value;\n }\n\n return utils.isArray(value) ? value.map(normalizeValue) : String(value);\n}\n\nfunction parseTokens(str) {\n const tokens = Object.create(null);\n const tokensRE = /([^\\s,;=]+)\\s*(?:=\\s*([^,;]+))?/g;\n let match;\n\n while ((match = tokensRE.exec(str))) {\n tokens[match[1]] = match[2];\n }\n\n return tokens;\n}\n\nconst isValidHeaderName = (str) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(str.trim());\n\nfunction matchHeaderValue(context, value, header, filter, isHeaderNameFilter) {\n if (utils.isFunction(filter)) {\n return filter.call(this, value, header);\n }\n\n if (isHeaderNameFilter) {\n value = header;\n }\n\n if (!utils.isString(value)) return;\n\n if (utils.isString(filter)) {\n return value.indexOf(filter) !== -1;\n }\n\n if (utils.isRegExp(filter)) {\n return filter.test(value);\n }\n}\n\nfunction formatHeader(header) {\n return header.trim()\n .toLowerCase().replace(/([a-z\\d])(\\w*)/g, (w, char, str) => {\n return char.toUpperCase() + str;\n });\n}\n\nfunction buildAccessors(obj, header) {\n const accessorName = utils.toCamelCase(' ' + header);\n\n ['get', 'set', 'has'].forEach(methodName => {\n Object.defineProperty(obj, methodName + accessorName, {\n value: function(arg1, arg2, arg3) {\n return this[methodName].call(this, header, arg1, arg2, arg3);\n },\n configurable: true\n });\n });\n}\n\nclass AxiosHeaders {\n constructor(headers) {\n headers && this.set(headers);\n }\n\n set(header, valueOrRewrite, rewrite) {\n const self = this;\n\n function setHeader(_value, _header, _rewrite) {\n const lHeader = normalizeHeader(_header);\n\n if (!lHeader) {\n throw new Error('header name must be a non-empty string');\n }\n\n const key = utils.findKey(self, lHeader);\n\n if(!key || self[key] === undefined || _rewrite === true || (_rewrite === undefined && self[key] !== false)) {\n self[key || _header] = normalizeValue(_value);\n }\n }\n\n const setHeaders = (headers, _rewrite) =>\n utils.forEach(headers, (_value, _header) => setHeader(_value, _header, _rewrite));\n\n if (utils.isPlainObject(header) || header instanceof this.constructor) {\n setHeaders(header, valueOrRewrite)\n } else if(utils.isString(header) && (header = header.trim()) && !isValidHeaderName(header)) {\n setHeaders(parseHeaders(header), valueOrRewrite);\n } else if (utils.isObject(header) && utils.isIterable(header)) {\n let obj = {}, dest, key;\n for (const entry of header) {\n if (!utils.isArray(entry)) {\n throw TypeError('Object iterator must return a key-value pair');\n }\n\n obj[key = entry[0]] = (dest = obj[key]) ?\n (utils.isArray(dest) ? [...dest, entry[1]] : [dest, entry[1]]) : entry[1];\n }\n\n setHeaders(obj, valueOrRewrite)\n } else {\n header != null && setHeader(valueOrRewrite, header, rewrite);\n }\n\n return this;\n }\n\n get(header, parser) {\n header = normalizeHeader(header);\n\n if (header) {\n const key = utils.findKey(this, header);\n\n if (key) {\n const value = this[key];\n\n if (!parser) {\n return value;\n }\n\n if (parser === true) {\n return parseTokens(value);\n }\n\n if (utils.isFunction(parser)) {\n return parser.call(this, value, key);\n }\n\n if (utils.isRegExp(parser)) {\n return parser.exec(value);\n }\n\n throw new TypeError('parser must be boolean|regexp|function');\n }\n }\n }\n\n has(header, matcher) {\n header = normalizeHeader(header);\n\n if (header) {\n const key = utils.findKey(this, header);\n\n return !!(key && this[key] !== undefined && (!matcher || matchHeaderValue(this, this[key], key, matcher)));\n }\n\n return false;\n }\n\n delete(header, matcher) {\n const self = this;\n let deleted = false;\n\n function deleteHeader(_header) {\n _header = normalizeHeader(_header);\n\n if (_header) {\n const key = utils.findKey(self, _header);\n\n if (key && (!matcher || matchHeaderValue(self, self[key], key, matcher))) {\n delete self[key];\n\n deleted = true;\n }\n }\n }\n\n if (utils.isArray(header)) {\n header.forEach(deleteHeader);\n } else {\n deleteHeader(header);\n }\n\n return deleted;\n }\n\n clear(matcher) {\n const keys = Object.keys(this);\n let i = keys.length;\n let deleted = false;\n\n while (i--) {\n const key = keys[i];\n if(!matcher || matchHeaderValue(this, this[key], key, matcher, true)) {\n delete this[key];\n deleted = true;\n }\n }\n\n return deleted;\n }\n\n normalize(format) {\n const self = this;\n const headers = {};\n\n utils.forEach(this, (value, header) => {\n const key = utils.findKey(headers, header);\n\n if (key) {\n self[key] = normalizeValue(value);\n delete self[header];\n return;\n }\n\n const normalized = format ? formatHeader(header) : String(header).trim();\n\n if (normalized !== header) {\n delete self[header];\n }\n\n self[normalized] = normalizeValue(value);\n\n headers[normalized] = true;\n });\n\n return this;\n }\n\n concat(...targets) {\n return this.constructor.concat(this, ...targets);\n }\n\n toJSON(asStrings) {\n const obj = Object.create(null);\n\n utils.forEach(this, (value, header) => {\n value != null && value !== false && (obj[header] = asStrings && utils.isArray(value) ? value.join(', ') : value);\n });\n\n return obj;\n }\n\n [Symbol.iterator]() {\n return Object.entries(this.toJSON())[Symbol.iterator]();\n }\n\n toString() {\n return Object.entries(this.toJSON()).map(([header, value]) => header + ': ' + value).join('\\n');\n }\n\n getSetCookie() {\n return this.get(\"set-cookie\") || [];\n }\n\n get [Symbol.toStringTag]() {\n return 'AxiosHeaders';\n }\n\n static from(thing) {\n return thing instanceof this ? thing : new this(thing);\n }\n\n static concat(first, ...targets) {\n const computed = new this(first);\n\n targets.forEach((target) => computed.set(target));\n\n return computed;\n }\n\n static accessor(header) {\n const internals = this[$internals] = (this[$internals] = {\n accessors: {}\n });\n\n const accessors = internals.accessors;\n const prototype = this.prototype;\n\n function defineAccessor(_header) {\n const lHeader = normalizeHeader(_header);\n\n if (!accessors[lHeader]) {\n buildAccessors(prototype, _header);\n accessors[lHeader] = true;\n }\n }\n\n utils.isArray(header) ? header.forEach(defineAccessor) : defineAccessor(header);\n\n return this;\n }\n}\n\nAxiosHeaders.accessor(['Content-Type', 'Content-Length', 'Accept', 'Accept-Encoding', 'User-Agent', 'Authorization']);\n\n// reserved names hotfix\nutils.reduceDescriptors(AxiosHeaders.prototype, ({value}, key) => {\n let mapped = key[0].toUpperCase() + key.slice(1); // map `set` => `Set`\n return {\n get: () => value,\n set(headerValue) {\n this[mapped] = headerValue;\n }\n }\n});\n\nutils.freezeMethods(AxiosHeaders);\n\nexport default AxiosHeaders;\n","'use strict';\n\nimport utils from './../utils.js';\nimport defaults from '../defaults/index.js';\nimport AxiosHeaders from '../core/AxiosHeaders.js';\n\n/**\n * Transform the data for a request or a response\n *\n * @param {Array|Function} fns A single function or Array of functions\n * @param {?Object} response The response object\n *\n * @returns {*} The resulting transformed data\n */\nexport default function transformData(fns, response) {\n const config = this || defaults;\n const context = response || config;\n const headers = AxiosHeaders.from(context.headers);\n let data = context.data;\n\n utils.forEach(fns, function transform(fn) {\n data = fn.call(config, data, headers.normalize(), response ? response.status : undefined);\n });\n\n headers.normalize();\n\n return data;\n}\n","'use strict';\n\nexport default function isCancel(value) {\n return !!(value && value.__CANCEL__);\n}\n","'use strict';\n\nimport AxiosError from '../core/AxiosError.js';\nimport utils from '../utils.js';\n\n/**\n * A `CanceledError` is an object that is thrown when an operation is canceled.\n *\n * @param {string=} message The message.\n * @param {Object=} config The config.\n * @param {Object=} request The request.\n *\n * @returns {CanceledError} The created error.\n */\nfunction CanceledError(message, config, request) {\n // eslint-disable-next-line no-eq-null,eqeqeq\n AxiosError.call(this, message == null ? 'canceled' : message, AxiosError.ERR_CANCELED, config, request);\n this.name = 'CanceledError';\n}\n\nutils.inherits(CanceledError, AxiosError, {\n __CANCEL__: true\n});\n\nexport default CanceledError;\n","'use strict';\n\nimport AxiosError from './AxiosError.js';\n\n/**\n * Resolve or reject a Promise based on response status.\n *\n * @param {Function} resolve A function that resolves the promise.\n * @param {Function} reject A function that rejects the promise.\n * @param {object} response The response.\n *\n * @returns {object} The response.\n */\nexport default function settle(resolve, reject, response) {\n const validateStatus = response.config.validateStatus;\n if (!response.status || !validateStatus || validateStatus(response.status)) {\n resolve(response);\n } else {\n reject(new AxiosError(\n 'Request failed with status code ' + response.status,\n [AxiosError.ERR_BAD_REQUEST, AxiosError.ERR_BAD_RESPONSE][Math.floor(response.status / 100) - 4],\n response.config,\n response.request,\n response\n ));\n }\n}\n","'use strict';\n\nexport default function parseProtocol(url) {\n const match = /^([-+\\w]{1,25})(:?\\/\\/|:)/.exec(url);\n return match && match[1] || '';\n}\n","'use strict';\n\n/**\n * Calculate data maxRate\n * @param {Number} [samplesCount= 10]\n * @param {Number} [min= 1000]\n * @returns {Function}\n */\nfunction speedometer(samplesCount, min) {\n samplesCount = samplesCount || 10;\n const bytes = new Array(samplesCount);\n const timestamps = new Array(samplesCount);\n let head = 0;\n let tail = 0;\n let firstSampleTS;\n\n min = min !== undefined ? min : 1000;\n\n return function push(chunkLength) {\n const now = Date.now();\n\n const startedAt = timestamps[tail];\n\n if (!firstSampleTS) {\n firstSampleTS = now;\n }\n\n bytes[head] = chunkLength;\n timestamps[head] = now;\n\n let i = tail;\n let bytesCount = 0;\n\n while (i !== head) {\n bytesCount += bytes[i++];\n i = i % samplesCount;\n }\n\n head = (head + 1) % samplesCount;\n\n if (head === tail) {\n tail = (tail + 1) % samplesCount;\n }\n\n if (now - firstSampleTS < min) {\n return;\n }\n\n const passed = startedAt && now - startedAt;\n\n return passed ? Math.round(bytesCount * 1000 / passed) : undefined;\n };\n}\n\nexport default speedometer;\n","/**\n * Throttle decorator\n * @param {Function} fn\n * @param {Number} freq\n * @return {Function}\n */\nfunction throttle(fn, freq) {\n let timestamp = 0;\n let threshold = 1000 / freq;\n let lastArgs;\n let timer;\n\n const invoke = (args, now = Date.now()) => {\n timestamp = now;\n lastArgs = null;\n if (timer) {\n clearTimeout(timer);\n timer = null;\n }\n fn.apply(null, args);\n }\n\n const throttled = (...args) => {\n const now = Date.now();\n const passed = now - timestamp;\n if ( passed >= threshold) {\n invoke(args, now);\n } else {\n lastArgs = args;\n if (!timer) {\n timer = setTimeout(() => {\n timer = null;\n invoke(lastArgs)\n }, threshold - passed);\n }\n }\n }\n\n const flush = () => lastArgs && invoke(lastArgs);\n\n return [throttled, flush];\n}\n\nexport default throttle;\n","import speedometer from \"./speedometer.js\";\nimport throttle from \"./throttle.js\";\nimport utils from \"../utils.js\";\n\nexport const progressEventReducer = (listener, isDownloadStream, freq = 3) => {\n let bytesNotified = 0;\n const _speedometer = speedometer(50, 250);\n\n return throttle(e => {\n const loaded = e.loaded;\n const total = e.lengthComputable ? e.total : undefined;\n const progressBytes = loaded - bytesNotified;\n const rate = _speedometer(progressBytes);\n const inRange = loaded <= total;\n\n bytesNotified = loaded;\n\n const data = {\n loaded,\n total,\n progress: total ? (loaded / total) : undefined,\n bytes: progressBytes,\n rate: rate ? rate : undefined,\n estimated: rate && total && inRange ? (total - loaded) / rate : undefined,\n event: e,\n lengthComputable: total != null,\n [isDownloadStream ? 'download' : 'upload']: true\n };\n\n listener(data);\n }, freq);\n}\n\nexport const progressEventDecorator = (total, throttled) => {\n const lengthComputable = total != null;\n\n return [(loaded) => throttled[0]({\n lengthComputable,\n total,\n loaded\n }), throttled[1]];\n}\n\nexport const asyncDecorator = (fn) => (...args) => utils.asap(() => fn(...args));\n","import platform from '../platform/index.js';\n\nexport default platform.hasStandardBrowserEnv ? ((origin, isMSIE) => (url) => {\n url = new URL(url, platform.origin);\n\n return (\n origin.protocol === url.protocol &&\n origin.host === url.host &&\n (isMSIE || origin.port === url.port)\n );\n})(\n new URL(platform.origin),\n platform.navigator && /(msie|trident)/i.test(platform.navigator.userAgent)\n) : () => true;\n","import utils from './../utils.js';\nimport platform from '../platform/index.js';\n\nexport default platform.hasStandardBrowserEnv ?\n\n // Standard browser envs support document.cookie\n {\n write(name, value, expires, path, domain, secure) {\n const cookie = [name + '=' + encodeURIComponent(value)];\n\n utils.isNumber(expires) && cookie.push('expires=' + new Date(expires).toGMTString());\n\n utils.isString(path) && cookie.push('path=' + path);\n\n utils.isString(domain) && cookie.push('domain=' + domain);\n\n secure === true && cookie.push('secure');\n\n document.cookie = cookie.join('; ');\n },\n\n read(name) {\n const match = document.cookie.match(new RegExp('(^|;\\\\s*)(' + name + ')=([^;]*)'));\n return (match ? decodeURIComponent(match[3]) : null);\n },\n\n remove(name) {\n this.write(name, '', Date.now() - 86400000);\n }\n }\n\n :\n\n // Non-standard browser env (web workers, react-native) lack needed support.\n {\n write() {},\n read() {\n return null;\n },\n remove() {}\n };\n\n","'use strict';\n\n/**\n * Determines whether the specified URL is absolute\n *\n * @param {string} url The URL to test\n *\n * @returns {boolean} True if the specified URL is absolute, otherwise false\n */\nexport default function isAbsoluteURL(url) {\n // A URL is considered absolute if it begins with \"<scheme>://\" or \"//\" (protocol-relative URL).\n // RFC 3986 defines scheme name as a sequence of characters beginning with a letter and followed\n // by any combination of letters, digits, plus, period, or hyphen.\n return /^([a-z][a-z\\d+\\-.]*:)?\\/\\//i.test(url);\n}\n","'use strict';\n\n/**\n * Creates a new URL by combining the specified URLs\n *\n * @param {string} baseURL The base URL\n * @param {string} relativeURL The relative URL\n *\n * @returns {string} The combined URL\n */\nexport default function combineURLs(baseURL, relativeURL) {\n return relativeURL\n ? baseURL.replace(/\\/?\\/$/, '') + '/' + relativeURL.replace(/^\\/+/, '')\n : baseURL;\n}\n","'use strict';\n\nimport isAbsoluteURL from '../helpers/isAbsoluteURL.js';\nimport combineURLs from '../helpers/combineURLs.js';\n\n/**\n * Creates a new URL by combining the baseURL with the requestedURL,\n * only when the requestedURL is not already an absolute URL.\n * If the requestURL is absolute, this function returns the requestedURL untouched.\n *\n * @param {string} baseURL The base URL\n * @param {string} requestedURL Absolute or relative URL to combine\n *\n * @returns {string} The combined full path\n */\nexport default function buildFullPath(baseURL, requestedURL, allowAbsoluteUrls) {\n let isRelativeUrl = !isAbsoluteURL(requestedURL);\n if (baseURL && (isRelativeUrl || allowAbsoluteUrls == false)) {\n return combineURLs(baseURL, requestedURL);\n }\n return requestedURL;\n}\n","'use strict';\n\nimport utils from '../utils.js';\nimport AxiosHeaders from \"./AxiosHeaders.js\";\n\nconst headersToObject = (thing) => thing instanceof AxiosHeaders ? { ...thing } : thing;\n\n/**\n * Config-specific merge-function which creates a new config-object\n * by merging two configuration objects together.\n *\n * @param {Object} config1\n * @param {Object} config2\n *\n * @returns {Object} New object resulting from merging config2 to config1\n */\nexport default function mergeConfig(config1, config2) {\n // eslint-disable-next-line no-param-reassign\n config2 = config2 || {};\n const config = {};\n\n function getMergedValue(target, source, prop, caseless) {\n if (utils.isPlainObject(target) && utils.isPlainObject(source)) {\n return utils.merge.call({caseless}, target, source);\n } else if (utils.isPlainObject(source)) {\n return utils.merge({}, source);\n } else if (utils.isArray(source)) {\n return source.slice();\n }\n return source;\n }\n\n // eslint-disable-next-line consistent-return\n function mergeDeepProperties(a, b, prop , caseless) {\n if (!utils.isUndefined(b)) {\n return getMergedValue(a, b, prop , caseless);\n } else if (!utils.isUndefined(a)) {\n return getMergedValue(undefined, a, prop , caseless);\n }\n }\n\n // eslint-disable-next-line consistent-return\n function valueFromConfig2(a, b) {\n if (!utils.isUndefined(b)) {\n return getMergedValue(undefined, b);\n }\n }\n\n // eslint-disable-next-line consistent-return\n function defaultToConfig2(a, b) {\n if (!utils.isUndefined(b)) {\n return getMergedValue(undefined, b);\n } else if (!utils.isUndefined(a)) {\n return getMergedValue(undefined, a);\n }\n }\n\n // eslint-disable-next-line consistent-return\n function mergeDirectKeys(a, b, prop) {\n if (prop in config2) {\n return getMergedValue(a, b);\n } else if (prop in config1) {\n return getMergedValue(undefined, a);\n }\n }\n\n const mergeMap = {\n url: valueFromConfig2,\n method: valueFromConfig2,\n data: valueFromConfig2,\n baseURL: defaultToConfig2,\n transformRequest: defaultToConfig2,\n transformResponse: defaultToConfig2,\n paramsSerializer: defaultToConfig2,\n timeout: defaultToConfig2,\n timeoutMessage: defaultToConfig2,\n withCredentials: defaultToConfig2,\n withXSRFToken: defaultToConfig2,\n adapter: defaultToConfig2,\n responseType: defaultToConfig2,\n xsrfCookieName: defaultToConfig2,\n xsrfHeaderName: defaultToConfig2,\n onUploadProgress: defaultToConfig2,\n onDownloadProgress: defaultToConfig2,\n decompress: defaultToConfig2,\n maxContentLength: defaultToConfig2,\n maxBodyLength: defaultToConfig2,\n beforeRedirect: defaultToConfig2,\n transport: defaultToConfig2,\n httpAgent: defaultToConfig2,\n httpsAgent: defaultToConfig2,\n cancelToken: defaultToConfig2,\n socketPath: defaultToConfig2,\n responseEncoding: defaultToConfig2,\n validateStatus: mergeDirectKeys,\n headers: (a, b , prop) => mergeDeepProperties(headersToObject(a), headersToObject(b),prop, true)\n };\n\n utils.forEach(Object.keys(Object.assign({}, config1, config2)), function computeConfigValue(prop) {\n const merge = mergeMap[prop] || mergeDeepProperties;\n const configValue = merge(config1[prop], config2[prop], prop);\n (utils.isUndefined(configValue) && merge !== mergeDirectKeys) || (config[prop] = configValue);\n });\n\n return config;\n}\n","import platform from \"../platform/index.js\";\nimport utils from \"../utils.js\";\nimport isURLSameOrigin from \"./isURLSameOrigin.js\";\nimport cookies from \"./cookies.js\";\nimport buildFullPath from \"../core/buildFullPath.js\";\nimport mergeConfig from \"../core/mergeConfig.js\";\nimport AxiosHeaders from \"../core/AxiosHeaders.js\";\nimport buildURL from \"./buildURL.js\";\n\nexport default (config) => {\n const newConfig = mergeConfig({}, config);\n\n let {data, withXSRFToken, xsrfHeaderName, xsrfCookieName, headers, auth} = newConfig;\n\n newConfig.headers = headers = AxiosHeaders.from(headers);\n\n newConfig.url = buildURL(buildFullPath(newConfig.baseURL, newConfig.url, newConfig.allowAbsoluteUrls), config.params, config.paramsSerializer);\n\n // HTTP basic authentication\n if (auth) {\n headers.set('Authorization', 'Basic ' +\n btoa((auth.username || '') + ':' + (auth.password ? unescape(encodeURIComponent(auth.password)) : ''))\n );\n }\n\n let contentType;\n\n if (utils.isFormData(data)) {\n if (platform.hasStandardBrowserEnv || platform.hasStandardBrowserWebWorkerEnv) {\n headers.setContentType(undefined); // Let the browser set it\n } else if ((contentType = headers.getContentType()) !== false) {\n // fix semicolon duplication issue for ReactNative FormData implementation\n const [type, ...tokens] = contentType ? contentType.split(';').map(token => token.trim()).filter(Boolean) : [];\n headers.setContentType([type || 'multipart/form-data', ...tokens].join('; '));\n }\n }\n\n // Add xsrf header\n // This is only done if running in a standard browser environment.\n // Specifically not if we're in a web worker, or react-native.\n\n if (platform.hasStandardBrowserEnv) {\n withXSRFToken && utils.isFunction(withXSRFToken) && (withXSRFToken = withXSRFToken(newConfig));\n\n if (withXSRFToken || (withXSRFToken !== false && isURLSameOrigin(newConfig.url))) {\n // Add xsrf header\n const xsrfValue = xsrfHeaderName && xsrfCookieName && cookies.read(xsrfCookieName);\n\n if (xsrfValue) {\n headers.set(xsrfHeaderName, xsrfValue);\n }\n }\n }\n\n return newConfig;\n}\n\n","import utils from './../utils.js';\nimport settle from './../core/settle.js';\nimport transitionalDefaults from '../defaults/transitional.js';\nimport AxiosError from '../core/AxiosError.js';\nimport CanceledError from '../cancel/CanceledError.js';\nimport parseProtocol from '../helpers/parseProtocol.js';\nimport platform from '../platform/index.js';\nimport AxiosHeaders from '../core/AxiosHeaders.js';\nimport {progressEventReducer} from '../helpers/progressEventReducer.js';\nimport resolveConfig from \"../helpers/resolveConfig.js\";\n\nconst isXHRAdapterSupported = typeof XMLHttpRequest !== 'undefined';\n\nexport default isXHRAdapterSupported && function (config) {\n return new Promise(function dispatchXhrRequest(resolve, reject) {\n const _config = resolveConfig(config);\n let requestData = _config.data;\n const requestHeaders = AxiosHeaders.from(_config.headers).normalize();\n let {responseType, onUploadProgress, onDownloadProgress} = _config;\n let onCanceled;\n let uploadThrottled, downloadThrottled;\n let flushUpload, flushDownload;\n\n function done() {\n flushUpload && flushUpload(); // flush events\n flushDownload && flushDownload(); // flush events\n\n _config.cancelToken && _config.cancelToken.unsubscribe(onCanceled);\n\n _config.signal && _config.signal.removeEventListener('abort', onCanceled);\n }\n\n let request = new XMLHttpRequest();\n\n request.open(_config.method.toUpperCase(), _config.url, true);\n\n // Set the request timeout in MS\n request.timeout = _config.timeout;\n\n function onloadend() {\n if (!request) {\n return;\n }\n // Prepare the response\n const responseHeaders = AxiosHeaders.from(\n 'getAllResponseHeaders' in request && request.getAllResponseHeaders()\n );\n const responseData = !responseType || responseType === 'text' || responseType === 'json' ?\n request.responseText : request.response;\n const response = {\n data: responseData,\n status: request.status,\n statusText: request.statusText,\n headers: responseHeaders,\n config,\n request\n };\n\n settle(function _resolve(value) {\n resolve(value);\n done();\n }, function _reject(err) {\n reject(err);\n done();\n }, response);\n\n // Clean up request\n request = null;\n }\n\n if ('onloadend' in request) {\n // Use onloadend if available\n request.onloadend = onloadend;\n } else {\n // Listen for ready state to emulate onloadend\n request.onreadystatechange = function handleLoad() {\n if (!request || request.readyState !== 4) {\n return;\n }\n\n // The request errored out and we didn't get a response, this will be\n // handled by onerror instead\n // With one exception: request that using file: protocol, most browsers\n // will return status as 0 even though it's a successful request\n if (request.status === 0 && !(request.responseURL && request.responseURL.indexOf('file:') === 0)) {\n return;\n }\n // readystate handler is calling before onerror or ontimeout handlers,\n // so we should call onloadend on the next 'tick'\n setTimeout(onloadend);\n };\n }\n\n // Handle browser request cancellation (as opposed to a manual cancellation)\n request.onabort = function handleAbort() {\n if (!request) {\n return;\n }\n\n reject(new AxiosError('Request aborted', AxiosError.ECONNABORTED, config, request));\n\n // Clean up request\n request = null;\n };\n\n // Handle low level network errors\n request.onerror = function handleError() {\n // Real errors are hidden from us by the browser\n // onerror should only fire if it's a network error\n reject(new AxiosError('Network Error', AxiosError.ERR_NETWORK, config, request));\n\n // Clean up request\n request = null;\n };\n\n // Handle timeout\n request.ontimeout = function handleTimeout() {\n let timeoutErrorMessage = _config.timeout ? 'timeout of ' + _config.timeout + 'ms exceeded' : 'timeout exceeded';\n const transitional = _config.transitional || transitionalDefaults;\n if (_config.timeoutErrorMessage) {\n timeoutErrorMessage = _config.timeoutErrorMessage;\n }\n reject(new AxiosError(\n timeoutErrorMessage,\n transitional.clarifyTimeoutError ? AxiosError.ETIMEDOUT : AxiosError.ECONNABORTED,\n config,\n request));\n\n // Clean up request\n request = null;\n };\n\n // Remove Content-Type if data is undefined\n requestData === undefined && requestHeaders.setContentType(null);\n\n // Add headers to the request\n if ('setRequestHeader' in request) {\n utils.forEach(requestHeaders.toJSON(), function setRequestHeader(val, key) {\n request.setRequestHeader(key, val);\n });\n }\n\n // Add withCredentials to request if needed\n if (!utils.isUndefined(_config.withCredentials)) {\n request.withCredentials = !!_config.withCredentials;\n }\n\n // Add responseType to request if needed\n if (responseType && responseType !== 'json') {\n request.responseType = _config.responseType;\n }\n\n // Handle progress if needed\n if (onDownloadProgress) {\n ([downloadThrottled, flushDownload] = progressEventReducer(onDownloadProgress, true));\n request.addEventListener('progress', downloadThrottled);\n }\n\n // Not all browsers support upload events\n if (onUploadProgress && request.upload) {\n ([uploadThrottled, flushUpload] = progressEventReducer(onUploadProgress));\n\n request.upload.addEventListener('progress', uploadThrottled);\n\n request.upload.addEventListener('loadend', flushUpload);\n }\n\n if (_config.cancelToken || _config.signal) {\n // Handle cancellation\n // eslint-disable-next-line func-names\n onCanceled = cancel => {\n if (!request) {\n return;\n }\n reject(!cancel || cancel.type ? new CanceledError(null, config, request) : cancel);\n request.abort();\n request = null;\n };\n\n _config.cancelToken && _config.cancelToken.subscribe(onCanceled);\n if (_config.signal) {\n _config.signal.aborted ? onCanceled() : _config.signal.addEventListener('abort', onCanceled);\n }\n }\n\n const protocol = parseProtocol(_config.url);\n\n if (protocol && platform.protocols.indexOf(protocol) === -1) {\n reject(new AxiosError('Unsupported protocol ' + protocol + ':', AxiosError.ERR_BAD_REQUEST, config));\n return;\n }\n\n\n // Send the request\n request.send(requestData || null);\n });\n}\n","import CanceledError from \"../cancel/CanceledError.js\";\nimport AxiosError from \"../core/AxiosError.js\";\nimport utils from '../utils.js';\n\nconst composeSignals = (signals, timeout) => {\n const {length} = (signals = signals ? signals.filter(Boolean) : []);\n\n if (timeout || length) {\n let controller = new AbortController();\n\n let aborted;\n\n const onabort = function (reason) {\n if (!aborted) {\n aborted = true;\n unsubscribe();\n const err = reason instanceof Error ? reason : this.reason;\n controller.abort(err instanceof AxiosError ? err : new CanceledError(err instanceof Error ? err.message : err));\n }\n }\n\n let timer = timeout && setTimeout(() => {\n timer = null;\n onabort(new AxiosError(`timeout ${timeout} of ms exceeded`, AxiosError.ETIMEDOUT))\n }, timeout)\n\n const unsubscribe = () => {\n if (signals) {\n timer && clearTimeout(timer);\n timer = null;\n signals.forEach(signal => {\n signal.unsubscribe ? signal.unsubscribe(onabort) : signal.removeEventListener('abort', onabort);\n });\n signals = null;\n }\n }\n\n signals.forEach((signal) => signal.addEventListener('abort', onabort));\n\n const {signal} = controller;\n\n signal.unsubscribe = () => utils.asap(unsubscribe);\n\n return signal;\n }\n}\n\nexport default composeSignals;\n","\nexport const streamChunk = function* (chunk, chunkSize) {\n let len = chunk.byteLength;\n\n if (!chunkSize || len < chunkSize) {\n yield chunk;\n return;\n }\n\n let pos = 0;\n let end;\n\n while (pos < len) {\n end = pos + chunkSize;\n yield chunk.slice(pos, end);\n pos = end;\n }\n}\n\nexport const readBytes = async function* (iterable, chunkSize) {\n for await (const chunk of readStream(iterable)) {\n yield* streamChunk(chunk, chunkSize);\n }\n}\n\nconst readStream = async function* (stream) {\n if (stream[Symbol.asyncIterator]) {\n yield* stream;\n return;\n }\n\n const reader = stream.getReader();\n try {\n for (;;) {\n const {done, value} = await reader.read();\n if (done) {\n break;\n }\n yield value;\n }\n } finally {\n await reader.cancel();\n }\n}\n\nexport const trackStream = (stream, chunkSize, onProgress, onFinish) => {\n const iterator = readBytes(stream, chunkSize);\n\n let bytes = 0;\n let done;\n let _onFinish = (e) => {\n if (!done) {\n done = true;\n onFinish && onFinish(e);\n }\n }\n\n return new ReadableStream({\n async pull(controller) {\n try {\n const {done, value} = await iterator.next();\n\n if (done) {\n _onFinish();\n controller.close();\n return;\n }\n\n let len = value.byteLength;\n if (onProgress) {\n let loadedBytes = bytes += len;\n onProgress(loadedBytes);\n }\n controller.enqueue(new Uint8Array(value));\n } catch (err) {\n _onFinish(err);\n throw err;\n }\n },\n cancel(reason) {\n _onFinish(reason);\n return iterator.return();\n }\n }, {\n highWaterMark: 2\n })\n}\n","import platform from \"../platform/index.js\";\nimport utils from \"../utils.js\";\nimport AxiosError from \"../core/AxiosError.js\";\nimport composeSignals from \"../helpers/composeSignals.js\";\nimport {trackStream} from \"../helpers/trackStream.js\";\nimport AxiosHeaders from \"../core/AxiosHeaders.js\";\nimport {progressEventReducer, progressEventDecorator, asyncDecorator} from \"../helpers/progressEventReducer.js\";\nimport resolveConfig from \"../helpers/resolveConfig.js\";\nimport settle from \"../core/settle.js\";\n\nconst isFetchSupported = typeof fetch === 'function' && typeof Request === 'function' && typeof Response === 'function';\nconst isReadableStreamSupported = isFetchSupported && typeof ReadableStream === 'function';\n\n// used only inside the fetch adapter\nconst encodeText = isFetchSupported && (typeof TextEncoder === 'function' ?\n ((encoder) => (str) => encoder.encode(str))(new TextEncoder()) :\n async (str) => new Uint8Array(await new Response(str).arrayBuffer())\n);\n\nconst test = (fn, ...args) => {\n try {\n return !!fn(...args);\n } catch (e) {\n return false\n }\n}\n\nconst supportsRequestStream = isReadableStreamSupported && test(() => {\n let duplexAccessed = false;\n\n const hasContentType = new Request(platform.origin, {\n body: new ReadableStream(),\n method: 'POST',\n get duplex() {\n duplexAccessed = true;\n return 'half';\n },\n }).headers.has('Content-Type');\n\n return duplexAccessed && !hasContentType;\n});\n\nconst DEFAULT_CHUNK_SIZE = 64 * 1024;\n\nconst supportsResponseStream = isReadableStreamSupported &&\n test(() => utils.isReadableStream(new Response('').body));\n\n\nconst resolvers = {\n stream: supportsResponseStream && ((res) => res.body)\n};\n\nisFetchSupported && (((res) => {\n ['text', 'arrayBuffer', 'blob', 'formData', 'stream'].forEach(type => {\n !resolvers[type] && (resolvers[type] = utils.isFunction(res[type]) ? (res) => res[type]() :\n (_, config) => {\n throw new AxiosError(`Response type '${type}' is not supported`, AxiosError.ERR_NOT_SUPPORT, config);\n })\n });\n})(new Response));\n\nconst getBodyLength = async (body) => {\n if (body == null) {\n return 0;\n }\n\n if(utils.isBlob(body)) {\n return body.size;\n }\n\n if(utils.isSpecCompliantForm(body)) {\n const _request = new Request(platform.origin, {\n method: 'POST',\n body,\n });\n return (await _request.arrayBuffer()).byteLength;\n }\n\n if(utils.isArrayBufferView(body) || utils.isArrayBuffer(body)) {\n return body.byteLength;\n }\n\n if(utils.isURLSearchParams(body)) {\n body = body + '';\n }\n\n if(utils.isString(body)) {\n return (await encodeText(body)).byteLength;\n }\n}\n\nconst resolveBodyLength = async (headers, body) => {\n const length = utils.toFiniteNumber(headers.getContentLength());\n\n return length == null ? getBodyLength(body) : length;\n}\n\nexport default isFetchSupported && (async (config) => {\n let {\n url,\n method,\n data,\n signal,\n cancelToken,\n timeout,\n onDownloadProgress,\n onUploadProgress,\n responseType,\n headers,\n withCredentials = 'same-origin',\n fetchOptions\n } = resolveConfig(config);\n\n responseType = responseType ? (responseType + '').toLowerCase() : 'text';\n\n let composedSignal = composeSignals([signal, cancelToken && cancelToken.toAbortSignal()], timeout);\n\n let request;\n\n const unsubscribe = composedSignal && composedSignal.unsubscribe && (() => {\n composedSignal.unsubscribe();\n });\n\n let requestContentLength;\n\n try {\n if (\n onUploadProgress && supportsRequestStream && method !== 'get' && method !== 'head' &&\n (requestContentLength = await resolveBodyLength(headers, data)) !== 0\n ) {\n let _request = new Request(url, {\n method: 'POST',\n body: data,\n duplex: \"half\"\n });\n\n let contentTypeHeader;\n\n if (utils.isFormData(data) && (contentTypeHeader = _request.headers.get('content-type'))) {\n headers.setContentType(contentTypeHeader)\n }\n\n if (_request.body) {\n const [onProgress, flush] = progressEventDecorator(\n requestContentLength,\n progressEventReducer(asyncDecorator(onUploadProgress))\n );\n\n data = trackStream(_request.body, DEFAULT_CHUNK_SIZE, onProgress, flush);\n }\n }\n\n if (!utils.isString(withCredentials)) {\n withCredentials = withCredentials ? 'include' : 'omit';\n }\n\n // Cloudflare Workers throws when credentials are defined\n // see https://github.com/cloudflare/workerd/issues/902\n const isCredentialsSupported = \"credentials\" in Request.prototype;\n request = new Request(url, {\n ...fetchOptions,\n signal: composedSignal,\n method: method.toUpperCase(),\n headers: headers.normalize().toJSON(),\n body: data,\n duplex: \"half\",\n credentials: isCredentialsSupported ? withCredentials : undefined\n });\n\n let response = await fetch(request, fetchOptions);\n\n const isStreamResponse = supportsResponseStream && (responseType === 'stream' || responseType === 'response');\n\n if (supportsResponseStream && (onDownloadProgress || (isStreamResponse && unsubscribe))) {\n const options = {};\n\n ['status', 'statusText', 'headers'].forEach(prop => {\n options[prop] = response[prop];\n });\n\n const responseContentLength = utils.toFiniteNumber(response.headers.get('content-length'));\n\n const [onProgress, flush] = onDownloadProgress && progressEventDecorator(\n responseContentLength,\n progressEventReducer(asyncDecorator(onDownloadProgress), true)\n ) || [];\n\n response = new Response(\n trackStream(response.body, DEFAULT_CHUNK_SIZE, onProgress, () => {\n flush && flush();\n unsubscribe && unsubscribe();\n }),\n options\n );\n }\n\n responseType = responseType || 'text';\n\n let responseData = await resolvers[utils.findKey(resolvers, responseType) || 'text'](response, config);\n\n !isStreamResponse && unsubscribe && unsubscribe();\n\n return await new Promise((resolve, reject) => {\n settle(resolve, reject, {\n data: responseData,\n headers: AxiosHeaders.from(response.headers),\n status: response.status,\n statusText: response.statusText,\n config,\n request\n })\n })\n } catch (err) {\n unsubscribe && unsubscribe();\n\n if (err && err.name === 'TypeError' && /Load failed|fetch/i.test(err.message)) {\n throw Object.assign(\n new AxiosError('Network Error', AxiosError.ERR_NETWORK, config, request),\n {\n cause: err.cause || err\n }\n )\n }\n\n throw AxiosError.from(err, err && err.code, config, request);\n }\n});\n\n\n","import utils from '../utils.js';\nimport httpAdapter from './http.js';\nimport xhrAdapter from './xhr.js';\nimport fetchAdapter from './fetch.js';\nimport AxiosError from \"../core/AxiosError.js\";\n\nconst knownAdapters = {\n http: httpAdapter,\n xhr: xhrAdapter,\n fetch: fetchAdapter\n}\n\nutils.forEach(knownAdapters, (fn, value) => {\n if (fn) {\n try {\n Object.defineProperty(fn, 'name', {value});\n } catch (e) {\n // eslint-disable-next-line no-empty\n }\n Object.defineProperty(fn, 'adapterName', {value});\n }\n});\n\nconst renderReason = (reason) => `- ${reason}`;\n\nconst isResolvedHandle = (adapter) => utils.isFunction(adapter) || adapter === null || adapter === false;\n\nexport default {\n getAdapter: (adapters) => {\n adapters = utils.isArray(adapters) ? adapters : [adapters];\n\n const {length} = adapters;\n let nameOrAdapter;\n let adapter;\n\n const rejectedReasons = {};\n\n for (let i = 0; i < length; i++) {\n nameOrAdapter = adapters[i];\n let id;\n\n adapter = nameOrAdapter;\n\n if (!isResolvedHandle(nameOrAdapter)) {\n adapter = knownAdapters[(id = String(nameOrAdapter)).toLowerCase()];\n\n if (adapter === undefined) {\n throw new AxiosError(`Unknown adapter '${id}'`);\n }\n }\n\n if (adapter) {\n break;\n }\n\n rejectedReasons[id || '#' + i] = adapter;\n }\n\n if (!adapter) {\n\n const reasons = Object.entries(rejectedReasons)\n .map(([id, state]) => `adapter ${id} ` +\n (state === false ? 'is not supported by the environment' : 'is not available in the build')\n );\n\n let s = length ?\n (reasons.length > 1 ? 'since :\\n' + reasons.map(renderReason).join('\\n') : ' ' + renderReason(reasons[0])) :\n 'as no adapter specified';\n\n throw new AxiosError(\n `There is no suitable adapter to dispatch the request ` + s,\n 'ERR_NOT_SUPPORT'\n );\n }\n\n return adapter;\n },\n adapters: knownAdapters\n}\n","'use strict';\n\nimport transformData from './transformData.js';\nimport isCancel from '../cancel/isCancel.js';\nimport defaults from '../defaults/index.js';\nimport CanceledError from '../cancel/CanceledError.js';\nimport AxiosHeaders from '../core/AxiosHeaders.js';\nimport adapters from \"../adapters/adapters.js\";\n\n/**\n * Throws a `CanceledError` if cancellation has been requested.\n *\n * @param {Object} config The config that is to be used for the request\n *\n * @returns {void}\n */\nfunction throwIfCancellationRequested(config) {\n if (config.cancelToken) {\n config.cancelToken.throwIfRequested();\n }\n\n if (config.signal && config.signal.aborted) {\n throw new CanceledError(null, config);\n }\n}\n\n/**\n * Dispatch a request to the server using the configured adapter.\n *\n * @param {object} config The config that is to be used for the request\n *\n * @returns {Promise} The Promise to be fulfilled\n */\nexport default function dispatchRequest(config) {\n throwIfCancellationRequested(config);\n\n config.headers = AxiosHeaders.from(config.headers);\n\n // Transform request data\n config.data = transformData.call(\n config,\n config.transformRequest\n );\n\n if (['post', 'put', 'patch'].indexOf(config.method) !== -1) {\n config.headers.setContentType('application/x-www-form-urlencoded', false);\n }\n\n const adapter = adapters.getAdapter(config.adapter || defaults.adapter);\n\n return adapter(config).then(function onAdapterResolution(response) {\n throwIfCancellationRequested(config);\n\n // Transform response data\n response.data = transformData.call(\n config,\n config.transformResponse,\n response\n );\n\n response.headers = AxiosHeaders.from(response.headers);\n\n return response;\n }, function onAdapterRejection(reason) {\n if (!isCancel(reason)) {\n throwIfCancellationRequested(config);\n\n // Transform response data\n if (reason && reason.response) {\n reason.response.data = transformData.call(\n config,\n config.transformResponse,\n reason.response\n );\n reason.response.headers = AxiosHeaders.from(reason.response.headers);\n }\n }\n\n return Promise.reject(reason);\n });\n}\n","export const VERSION = \"1.10.0\";","'use strict';\n\nimport {VERSION} from '../env/data.js';\nimport AxiosError from '../core/AxiosError.js';\n\nconst validators = {};\n\n// eslint-disable-next-line func-names\n['object', 'boolean', 'number', 'function', 'string', 'symbol'].forEach((type, i) => {\n validators[type] = function validator(thing) {\n return typeof thing === type || 'a' + (i < 1 ? 'n ' : ' ') + type;\n };\n});\n\nconst deprecatedWarnings = {};\n\n/**\n * Transitional option validator\n *\n * @param {function|boolean?} validator - set to false if the transitional option has been removed\n * @param {string?} version - deprecated version / removed since version\n * @param {string?} message - some message with additional info\n *\n * @returns {function}\n */\nvalidators.transitional = function transitional(validator, version, message) {\n function formatMessage(opt, desc) {\n return '[Axios v' + VERSION + '] Transitional option \\'' + opt + '\\'' + desc + (message ? '. ' + message : '');\n }\n\n // eslint-disable-next-line func-names\n return (value, opt, opts) => {\n if (validator === false) {\n throw new AxiosError(\n formatMessage(opt, ' has been removed' + (version ? ' in ' + version : '')),\n AxiosError.ERR_DEPRECATED\n );\n }\n\n if (version && !deprecatedWarnings[opt]) {\n deprecatedWarnings[opt] = true;\n // eslint-disable-next-line no-console\n console.warn(\n formatMessage(\n opt,\n ' has been deprecated since v' + version + ' and will be removed in the near future'\n )\n );\n }\n\n return validator ? validator(value, opt, opts) : true;\n };\n};\n\nvalidators.spelling = function spelling(correctSpelling) {\n return (value, opt) => {\n // eslint-disable-next-line no-console\n console.warn(`${opt} is likely a misspelling of ${correctSpelling}`);\n return true;\n }\n};\n\n/**\n * Assert object's properties type\n *\n * @param {object} options\n * @param {object} schema\n * @param {boolean?} allowUnknown\n *\n * @returns {object}\n */\n\nfunction assertOptions(options, schema, allowUnknown) {\n if (typeof options !== 'object') {\n throw new AxiosError('options must be an object', AxiosError.ERR_BAD_OPTION_VALUE);\n }\n const keys = Object.keys(options);\n let i = keys.length;\n while (i-- > 0) {\n const opt = keys[i];\n const validator = schema[opt];\n if (validator) {\n const value = options[opt];\n const result = value === undefined || validator(value, opt, options);\n if (result !== true) {\n throw new AxiosError('option ' + opt + ' must be ' + result, AxiosError.ERR_BAD_OPTION_VALUE);\n }\n continue;\n }\n if (allowUnknown !== true) {\n throw new AxiosError('Unknown option ' + opt, AxiosError.ERR_BAD_OPTION);\n }\n }\n}\n\nexport default {\n assertOptions,\n validators\n};\n","'use strict';\n\nimport utils from './../utils.js';\nimport buildURL from '../helpers/buildURL.js';\nimport InterceptorManager from './InterceptorManager.js';\nimport dispatchRequest from './dispatchRequest.js';\nimport mergeConfig from './mergeConfig.js';\nimport buildFullPath from './buildFullPath.js';\nimport validator from '../helpers/validator.js';\nimport AxiosHeaders from './AxiosHeaders.js';\n\nconst validators = validator.validators;\n\n/**\n * Create a new instance of Axios\n *\n * @param {Object} instanceConfig The default config for the instance\n *\n * @return {Axios} A new instance of Axios\n */\nclass Axios {\n constructor(instanceConfig) {\n this.defaults = instanceConfig || {};\n this.interceptors = {\n request: new InterceptorManager(),\n response: new InterceptorManager()\n };\n }\n\n /**\n * Dispatch a request\n *\n * @param {String|Object} configOrUrl The config specific for this request (merged with this.defaults)\n * @param {?Object} config\n *\n * @returns {Promise} The Promise to be fulfilled\n */\n async request(configOrUrl, config) {\n try {\n return await this._request(configOrUrl, config);\n } catch (err) {\n if (err instanceof Error) {\n let dummy = {};\n\n Error.captureStackTrace ? Error.captureStackTrace(dummy) : (dummy = new Error());\n\n // slice off the Error: ... line\n const stack = dummy.stack ? dummy.stack.replace(/^.+\\n/, '') : '';\n try {\n if (!err.stack) {\n err.stack = stack;\n // match without the 2 top stack lines\n } else if (stack && !String(err.stack).endsWith(stack.replace(/^.+\\n.+\\n/, ''))) {\n err.stack += '\\n' + stack\n }\n } catch (e) {\n // ignore the case where \"stack\" is an un-writable property\n }\n }\n\n throw err;\n }\n }\n\n _request(configOrUrl, config) {\n /*eslint no-param-reassign:0*/\n // Allow for axios('example/url'[, config]) a la fetch API\n if (typeof configOrUrl === 'string') {\n config = config || {};\n config.url = configOrUrl;\n } else {\n config = configOrUrl || {};\n }\n\n config = mergeConfig(this.defaults, config);\n\n const {transitional, paramsSerializer, headers} = config;\n\n if (transitional !== undefined) {\n validator.assertOptions(transitional, {\n silentJSONParsing: validators.transitional(validators.boolean),\n forcedJSONParsing: validators.transitional(validators.boolean),\n clarifyTimeoutError: validators.transitional(validators.boolean)\n }, false);\n }\n\n if (paramsSerializer != null) {\n if (utils.isFunction(paramsSerializer)) {\n config.paramsSerializer = {\n serialize: paramsSerializer\n }\n } else {\n validator.assertOptions(paramsSerializer, {\n encode: validators.function,\n serialize: validators.function\n }, true);\n }\n }\n\n // Set config.allowAbsoluteUrls\n if (config.allowAbsoluteUrls !== undefined) {\n // do nothing\n } else if (this.defaults.allowAbsoluteUrls !== undefined) {\n config.allowAbsoluteUrls = this.defaults.allowAbsoluteUrls;\n } else {\n config.allowAbsoluteUrls = true;\n }\n\n validator.assertOptions(config, {\n baseUrl: validators.spelling('baseURL'),\n withXsrfToken: validators.spelling('withXSRFToken')\n }, true);\n\n // Set config.method\n config.method = (config.method || this.defaults.method || 'get').toLowerCase();\n\n // Flatten headers\n let contextHeaders = headers && utils.merge(\n headers.common,\n headers[config.method]\n );\n\n headers && utils.forEach(\n ['delete', 'get', 'head', 'post', 'put', 'patch', 'common'],\n (method) => {\n delete headers[method];\n }\n );\n\n config.headers = AxiosHeaders.concat(contextHeaders, headers);\n\n // filter out skipped interceptors\n const requestInterceptorChain = [];\n let synchronousRequestInterceptors = true;\n this.interceptors.request.forEach(function unshiftRequestInterceptors(interceptor) {\n if (typeof interceptor.runWhen === 'function' && interceptor.runWhen(config) === false) {\n return;\n }\n\n synchronousRequestInterceptors = synchronousRequestInterceptors && interceptor.synchronous;\n\n requestInterceptorChain.unshift(interceptor.fulfilled, interceptor.rejected);\n });\n\n const responseInterceptorChain = [];\n this.interceptors.response.forEach(function pushResponseInterceptors(interceptor) {\n responseInterceptorChain.push(interceptor.fulfilled, interceptor.rejected);\n });\n\n let promise;\n let i = 0;\n let len;\n\n if (!synchronousRequestInterceptors) {\n const chain = [dispatchRequest.bind(this), undefined];\n chain.unshift.apply(chain, requestInterceptorChain);\n chain.push.apply(chain, responseInterceptorChain);\n len = chain.length;\n\n promise = Promise.resolve(config);\n\n while (i < len) {\n promise = promise.then(chain[i++], chain[i++]);\n }\n\n return promise;\n }\n\n len = requestInterceptorChain.length;\n\n let newConfig = config;\n\n i = 0;\n\n while (i < len) {\n const onFulfilled = requestInterceptorChain[i++];\n const onRejected = requestInterceptorChain[i++];\n try {\n newConfig = onFulfilled(newConfig);\n } catch (error) {\n onRejected.call(this, error);\n break;\n }\n }\n\n try {\n promise = dispatchRequest.call(this, newConfig);\n } catch (error) {\n return Promise.reject(error);\n }\n\n i = 0;\n len = responseInterceptorChain.length;\n\n while (i < len) {\n promise = promise.then(responseInterceptorChain[i++], responseInterceptorChain[i++]);\n }\n\n return promise;\n }\n\n getUri(config) {\n config = mergeConfig(this.defaults, config);\n const fullPath = buildFullPath(config.baseURL, config.url, config.allowAbsoluteUrls);\n return buildURL(fullPath, config.params, config.paramsSerializer);\n }\n}\n\n// Provide aliases for supported request methods\nutils.forEach(['delete', 'get', 'head', 'options'], function forEachMethodNoData(method) {\n /*eslint func-names:0*/\n Axios.prototype[method] = function(url, config) {\n return this.request(mergeConfig(config || {}, {\n method,\n url,\n data: (config || {}).data\n }));\n };\n});\n\nutils.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) {\n /*eslint func-names:0*/\n\n function generateHTTPMethod(isForm) {\n return function httpMethod(url, data, config) {\n return this.request(mergeConfig(config || {}, {\n method,\n headers: isForm ? {\n 'Content-Type': 'multipart/form-data'\n } : {},\n url,\n data\n }));\n };\n }\n\n Axios.prototype[method] = generateHTTPMethod();\n\n Axios.prototype[method + 'Form'] = generateHTTPMethod(true);\n});\n\nexport default Axios;\n","'use strict';\n\nimport CanceledError from './CanceledError.js';\n\n/**\n * A `CancelToken` is an object that can be used to request cancellation of an operation.\n *\n * @param {Function} executor The executor function.\n *\n * @returns {CancelToken}\n */\nclass CancelToken {\n constructor(executor) {\n if (typeof executor !== 'function') {\n throw new TypeError('executor must be a function.');\n }\n\n let resolvePromise;\n\n this.promise = new Promise(function promiseExecutor(resolve) {\n resolvePromise = resolve;\n });\n\n const token = this;\n\n // eslint-disable-next-line func-names\n this.promise.then(cancel => {\n if (!token._listeners) return;\n\n let i = token._listeners.length;\n\n while (i-- > 0) {\n token._listeners[i](cancel);\n }\n token._listeners = null;\n });\n\n // eslint-disable-next-line func-names\n this.promise.then = onfulfilled => {\n let _resolve;\n // eslint-disable-next-line func-names\n const promise = new Promise(resolve => {\n token.subscribe(resolve);\n _resolve = resolve;\n }).then(onfulfilled);\n\n promise.cancel = function reject() {\n token.unsubscribe(_resolve);\n };\n\n return promise;\n };\n\n executor(function cancel(message, config, request) {\n if (token.reason) {\n // Cancellation has already been requested\n return;\n }\n\n token.reason = new CanceledError(message, config, request);\n resolvePromise(token.reason);\n });\n }\n\n /**\n * Throws a `CanceledError` if cancellation has been requested.\n */\n throwIfRequested() {\n if (this.reason) {\n throw this.reason;\n }\n }\n\n /**\n * Subscribe to the cancel signal\n */\n\n subscribe(listener) {\n if (this.reason) {\n listener(this.reason);\n return;\n }\n\n if (this._listeners) {\n this._listeners.push(listener);\n } else {\n this._listeners = [listener];\n }\n }\n\n /**\n * Unsubscribe from the cancel signal\n */\n\n unsubscribe(listener) {\n if (!this._listeners) {\n return;\n }\n const index = this._listeners.indexOf(listener);\n if (index !== -1) {\n this._listeners.splice(index, 1);\n }\n }\n\n toAbortSignal() {\n const controller = new AbortController();\n\n const abort = (err) => {\n controller.abort(err);\n };\n\n this.subscribe(abort);\n\n controller.signal.unsubscribe = () => this.unsubscribe(abort);\n\n return controller.signal;\n }\n\n /**\n * Returns an object that contains a new `CancelToken` and a function that, when called,\n * cancels the `CancelToken`.\n */\n static source() {\n let cancel;\n const token = new CancelToken(function executor(c) {\n cancel = c;\n });\n return {\n token,\n cancel\n };\n }\n}\n\nexport default CancelToken;\n","'use strict';\n\n/**\n * Syntactic sugar for invoking a function and expanding an array for arguments.\n *\n * Common use case would be to use `Function.prototype.apply`.\n *\n * ```js\n * function f(x, y, z) {}\n * var args = [1, 2, 3];\n * f.apply(null, args);\n * ```\n *\n * With `spread` this example can be re-written.\n *\n * ```js\n * spread(function(x, y, z) {})([1, 2, 3]);\n * ```\n *\n * @param {Function} callback\n *\n * @returns {Function}\n */\nexport default function spread(callback) {\n return function wrap(arr) {\n return callback.apply(null, arr);\n };\n}\n","'use strict';\n\nimport utils from './../utils.js';\n\n/**\n * Determines whether the payload is an error thrown by Axios\n *\n * @param {*} payload The value to test\n *\n * @returns {boolean} True if the payload is an error thrown by Axios, otherwise false\n */\nexport default function isAxiosError(payload) {\n return utils.isObject(payload) && (payload.isAxiosError === true);\n}\n","const HttpStatusCode = {\n Continue: 100,\n SwitchingProtocols: 101,\n Processing: 102,\n EarlyHints: 103,\n Ok: 200,\n Created: 201,\n Accepted: 202,\n NonAuthoritativeInformation: 203,\n NoContent: 204,\n ResetContent: 205,\n PartialContent: 206,\n MultiStatus: 207,\n AlreadyReported: 208,\n ImUsed: 226,\n MultipleChoices: 300,\n MovedPermanently: 301,\n Found: 302,\n SeeOther: 303,\n NotModified: 304,\n UseProxy: 305,\n Unused: 306,\n TemporaryRedirect: 307,\n PermanentRedirect: 308,\n BadRequest: 400,\n Unauthorized: 401,\n PaymentRequired: 402,\n Forbidden: 403,\n NotFound: 404,\n MethodNotAllowed: 405,\n NotAcceptable: 406,\n ProxyAuthenticationRequired: 407,\n RequestTimeout: 408,\n Conflict: 409,\n Gone: 410,\n LengthRequired: 411,\n PreconditionFailed: 412,\n PayloadTooLarge: 413,\n UriTooLong: 414,\n UnsupportedMediaType: 415,\n RangeNotSatisfiable: 416,\n ExpectationFailed: 417,\n ImATeapot: 418,\n MisdirectedRequest: 421,\n UnprocessableEntity: 422,\n Locked: 423,\n FailedDependency: 424,\n TooEarly: 425,\n UpgradeRequired: 426,\n PreconditionRequired: 428,\n TooManyRequests: 429,\n RequestHeaderFieldsTooLarge: 431,\n UnavailableForLegalReasons: 451,\n InternalServerError: 500,\n NotImplemented: 501,\n BadGateway: 502,\n ServiceUnavailable: 503,\n GatewayTimeout: 504,\n HttpVersionNotSupported: 505,\n VariantAlsoNegotiates: 506,\n InsufficientStorage: 507,\n LoopDetected: 508,\n NotExtended: 510,\n NetworkAuthenticationRequired: 511,\n};\n\nObject.entries(HttpStatusCode).forEach(([key, value]) => {\n HttpStatusCode[value] = key;\n});\n\nexport default HttpStatusCode;\n","'use strict';\n\nimport utils from './utils.js';\nimport bind from './helpers/bind.js';\nimport Axios from './core/Axios.js';\nimport mergeConfig from './core/mergeConfig.js';\nimport defaults from './defaults/index.js';\nimport formDataToJSON from './helpers/formDataToJSON.js';\nimport CanceledError from './cancel/CanceledError.js';\nimport CancelToken from './cancel/CancelToken.js';\nimport isCancel from './cancel/isCancel.js';\nimport {VERSION} from './env/data.js';\nimport toFormData from './helpers/toFormData.js';\nimport AxiosError from './core/AxiosError.js';\nimport spread from './helpers/spread.js';\nimport isAxiosError from './helpers/isAxiosError.js';\nimport AxiosHeaders from \"./core/AxiosHeaders.js\";\nimport adapters from './adapters/adapters.js';\nimport HttpStatusCode from './helpers/HttpStatusCode.js';\n\n/**\n * Create an instance of Axios\n *\n * @param {Object} defaultConfig The default config for the instance\n *\n * @returns {Axios} A new instance of Axios\n */\nfunction createInstance(defaultConfig) {\n const context = new Axios(defaultConfig);\n const instance = bind(Axios.prototype.request, context);\n\n // Copy axios.prototype to instance\n utils.extend(instance, Axios.prototype, context, {allOwnKeys: true});\n\n // Copy context to instance\n utils.extend(instance, context, null, {allOwnKeys: true});\n\n // Factory for creating new instances\n instance.create = function create(instanceConfig) {\n return createInstance(mergeConfig(defaultConfig, instanceConfig));\n };\n\n return instance;\n}\n\n// Create the default instance to be exported\nconst axios = createInstance(defaults);\n\n// Expose Axios class to allow class inheritance\naxios.Axios = Axios;\n\n// Expose Cancel & CancelToken\naxios.CanceledError = CanceledError;\naxios.CancelToken = CancelToken;\naxios.isCancel = isCancel;\naxios.VERSION = VERSION;\naxios.toFormData = toFormData;\n\n// Expose AxiosError class\naxios.AxiosError = AxiosError;\n\n// alias for CanceledError for backward compatibility\naxios.Cancel = axios.CanceledError;\n\n// Expose all/spread\naxios.all = function all(promises) {\n return Promise.all(promises);\n};\n\naxios.spread = spread;\n\n// Expose isAxiosError\naxios.isAxiosError = isAxiosError;\n\n// Expose mergeConfig\naxios.mergeConfig = mergeConfig;\n\naxios.AxiosHeaders = AxiosHeaders;\n\naxios.formToJSON = thing => formDataToJSON(utils.isHTMLForm(thing) ? new FormData(thing) : thing);\n\naxios.getAdapter = adapters.getAdapter;\n\naxios.HttpStatusCode = HttpStatusCode;\n\naxios.default = axios;\n\n// this module should only have a default export\nexport default axios\n","import axios from './lib/axios.js';\n\n// This module is intended to unwrap Axios default export as named.\n// Keep top-level export same with static properties\n// so that it can keep same with es module or cjs\nconst {\n Axios,\n AxiosError,\n CanceledError,\n isCancel,\n CancelToken,\n VERSION,\n all,\n Cancel,\n isAxiosError,\n spread,\n toFormData,\n AxiosHeaders,\n HttpStatusCode,\n formToJSON,\n getAdapter,\n mergeConfig\n} = axios;\n\nexport {\n axios as default,\n Axios,\n AxiosError,\n CanceledError,\n isCancel,\n CancelToken,\n VERSION,\n all,\n Cancel,\n isAxiosError,\n spread,\n toFormData,\n AxiosHeaders,\n HttpStatusCode,\n formToJSON,\n getAdapter,\n mergeConfig\n}\n"],"names":["AxiosError","utils","prototype","toFormData","encode","URLSearchParams","FormData","Blob","platform","AxiosHeaders","defaults","isCancel","CanceledError","mergeConfig","composeSignals","VERSION","validators","Axios","InterceptorManager","CancelToken","spread","isAxiosError","HttpStatusCode","axios"],"mappings":";AAEe,SAAS,IAAI,CAAC,EAAE,EAAE,OAAO,EAAE;AAC1C,EAAE,OAAO,SAAS,IAAI,GAAG;AACzB,IAAI,OAAO,EAAE,CAAC,KAAK,CAAC,OAAO,EAAE,SAAS,CAAC,CAAC;AACxC,GAAG,CAAC;AACJ;;ACFA;AACA;AACA,MAAM,CAAC,QAAQ,CAAC,GAAG,MAAM,CAAC,SAAS,CAAC;AACpC,MAAM,CAAC,cAAc,CAA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.js 0000664 00000152025 15114741631 0013564 0 ustar 00 /*! Axios v1.10.0 Copyright (c) 2025 Matt Zabriskie and contributors */ !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).axios=t()}(this,(function(){"use strict";function e(e){var r,n;function o(r,n){try{var a=e[r](n),s=a.value,u=s instanceof t;Promise.resolve(u?s.v:s).then((function(t){if(u){var n="return"===r?"return":"next";if(!s.k||t.done)return o(n,t);t=e[n](t).value}i(a.done?"return":"normal",t)}),(function(e){o("throw",e)}))}catch(e){i("throw",e)}}function i(e,t){switch(e){case"return":r.resolve({value:t,done:!0});break;case"throw":r.reject(t);break;default:r.resolve({value:t,done:!1})}(r=r.next)?o(r.key,r.arg):n=null}this._invoke=function(e,t){return new Promise((function(i,a){var s={key:e,arg:t,resolve:i,reject:a,next:null};n?n=n.next=s:(r=n=s,o(e,t))}))},"function"!=typeof e.return&&(this.return=void 0)}function t(e,t){this.v=e,this.k=t}function r(e){var r={},n=!1;function o(r,o){return n=!0,o=new Promise((function(t){t(e[r](o))})),{done:!1,value:new t(o,1)}}return r["undefined"!=typeof Symbol&&Symbol.iterator||"@@iterator"]=function(){return this},r.next=function(e){return n?(n=!1,e):o("next",e)},"function"==typeof e.throw&&(r.throw=function(e){if(n)throw n=!1,e;return o("throw",e)}),"function"==typeof e.return&&(r.return=function(e){return n?(n=!1,e):o("return",e)}),r}function n(e){var t,r,n,i=2;for("undefined"!=typeof Symbol&&(r=Symbol.asyncIterator,n=Symbol.iterator);i--;){if(r&&null!=(t=e[r]))return t.call(e);if(n&&null!=(t=e[n]))return new o(t.call(e));r="@@asyncIterator",n="@@iterator"}throw new TypeError("Object is not async iterable")}function o(e){function t(e){if(Object(e)!==e)return Promise.reject(new TypeError(e+" is not an object."));var t=e.done;return Promise.resolve(e.value).then((function(e){return{value:e,done:t}}))}return o=function(e){this.s=e,this.n=e.next},o.prototype={s:null,n:null,next:function(){return t(this.n.apply(this.s,arguments))},return:function(e){var r=this.s.return;return void 0===r?Promise.resolve({value:e,done:!0}):t(r.apply(this.s,arguments))},throw:function(e){var r=this.s.return;return void 0===r?Promise.reject(e):t(r.apply(this.s,arguments))}},new o(e)}function i(e){return new t(e,0)}function a(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function s(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?a(Object(r),!0).forEach((function(t){m(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):a(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function u(){u=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(e,t,r){e[t]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",s=i.asyncIterator||"@@asyncIterator",c=i.toStringTag||"@@toStringTag";function f(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{f({},"")}catch(e){f=function(e,t,r){return e[t]=r}}function l(e,t,r,n){var i=t&&t.prototype instanceof m?t:m,a=Object.create(i.prototype),s=new P(n||[]);return o(a,"_invoke",{value:k(e,r,s)}),a}function p(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=l;var h="suspendedStart",d="executing",v="completed",y={};function m(){}function b(){}function g(){}var w={};f(w,a,(function(){return this}));var E=Object.getPrototypeOf,O=E&&E(E(L([])));O&&O!==r&&n.call(O,a)&&(w=O);var S=g.prototype=m.prototype=Object.create(w);function x(e){["next","throw","return"].forEach((function(t){f(e,t,(function(e){return this._invoke(t,e)}))}))}function R(e,t){function r(o,i,a,s){var u=p(e[o],e,i);if("throw"!==u.type){var c=u.arg,f=c.value;return f&&"object"==typeof f&&n.call(f,"__await")?t.resolve(f.__await).then((function(e){r("next",e,a,s)}),(function(e){r("throw",e,a,s)})):t.resolve(f).then((function(e){c.value=e,a(c)}),(function(e){return r("throw",e,a,s)}))}s(u.arg)}var i;o(this,"_invoke",{value:function(e,n){function o(){return new t((function(t,o){r(e,n,t,o)}))}return i=i?i.then(o,o):o()}})}function k(t,r,n){var o=h;return function(i,a){if(o===d)throw new Error("Generator is already running");if(o===v){if("throw"===i)throw a;return{value:e,done:!0}}for(n.method=i,n.arg=a;;){var s=n.delegate;if(s){var u=T(s,n);if(u){if(u===y)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===h)throw o=v,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=d;var c=p(t,r,n);if("normal"===c.type){if(o=n.done?v:"suspendedYield",c.arg===y)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(o=v,n.method="throw",n.arg=c.arg)}}}function T(t,r){var n=r.method,o=t.iterator[n];if(o===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,T(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),y;var i=p(o,t.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,y;var a=i.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,y):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,y)}function j(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function A(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function P(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(j,this),this.reset(!0)}function L(t){if(t||""===t){var r=t[a];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,i=function r(){for(;++o<t.length;)if(n.call(t,o))return r.value=t[o],r.done=!1,r;return r.value=e,r.done=!0,r};return i.next=i}}throw new TypeError(typeof t+" is not iterable")}return b.prototype=g,o(S,"constructor",{value:g,configurable:!0}),o(g,"constructor",{value:b,configurable:!0}),b.displayName=f(g,c,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===b||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,g):(e.__proto__=g,f(e,c,"GeneratorFunction")),e.prototype=Object.create(S),e},t.awrap=function(e){return{__await:e}},x(R.prototype),f(R.prototype,s,(function(){return this})),t.AsyncIterator=R,t.async=function(e,r,n,o,i){void 0===i&&(i=Promise);var a=new R(l(e,r,n,o),i);return t.isGeneratorFunction(r)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},x(S),f(S,c,"Generator"),f(S,a,(function(){return this})),f(S,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},t.values=L,P.prototype={constructor:P,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(A),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function o(n,o){return s.type="throw",s.arg=t,r.next=n,o&&(r.method="next",r.arg=e),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],s=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var u=n.call(a,"catchLoc"),c=n.call(a,"finallyLoc");if(u&&c){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(u){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===e||"continue"===e)&&i.tryLoc<=t&&t<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=e,a.arg=t,i?(this.method="next",this.next=i.finallyLoc,y):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),y},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),A(r),y}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;A(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:L(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),y}},t}function c(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}function f(e){return f="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},f(e)}function l(t){return function(){return new e(t.apply(this,arguments))}}function p(e,t,r,n,o,i,a){try{var s=e[i](a),u=s.value}catch(e){return void r(e)}s.done?t(u):Promise.resolve(u).then(n,o)}function h(e){return function(){var t=this,r=arguments;return new Promise((function(n,o){var i=e.apply(t,r);function a(e){p(i,n,o,a,s,"next",e)}function s(e){p(i,n,o,a,s,"throw",e)}a(void 0)}))}}function d(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function v(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,c(n.key),n)}}function y(e,t,r){return t&&v(e.prototype,t),r&&v(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function m(e,t,r){return(t=c(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function b(e,t){return w(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,s=[],u=!0,c=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=i.call(r)).done)&&(s.push(n.value),s.length!==t);u=!0);}catch(e){c=!0,o=e}finally{try{if(!u&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(c)throw o}}return s}}(e,t)||O(e,t)||x()}function g(e){return function(e){if(Array.isArray(e))return S(e)}(e)||E(e)||O(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function w(e){if(Array.isArray(e))return e}function E(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function O(e,t){if(e){if("string"==typeof e)return S(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?S(e,t):void 0}}function S(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function x(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function R(e,t){return function(){return e.apply(t,arguments)}}e.prototype["function"==typeof Symbol&&Symbol.asyncIterator||"@@asyncIterator"]=function(){return this},e.prototype.next=function(e){return this._invoke("next",e)},e.prototype.throw=function(e){return this._invoke("throw",e)},e.prototype.return=function(e){return this._invoke("return",e)};var k,T=Object.prototype.toString,j=Object.getPrototypeOf,A=Symbol.iterator,P=Symbol.toStringTag,L=(k=Object.create(null),function(e){var t=T.call(e);return k[t]||(k[t]=t.slice(8,-1).toLowerCase())}),N=function(e){return e=e.toLowerCase(),function(t){return L(t)===e}},_=function(e){return function(t){return f(t)===e}},C=Array.isArray,U=_("undefined");var F=N("ArrayBuffer");var B=_("string"),D=_("function"),q=_("number"),I=function(e){return null!==e&&"object"===f(e)},M=function(e){if("object"!==L(e))return!1;var t=j(e);return!(null!==t&&t!==Object.prototype&&null!==Object.getPrototypeOf(t)||P in e||A in e)},z=N("Date"),H=N("File"),J=N("Blob"),W=N("FileList"),K=N("URLSearchParams"),V=b(["ReadableStream","Request","Response","Headers"].map(N),4),G=V[0],X=V[1],$=V[2],Y=V[3];function Q(e,t){var r,n,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=o.allOwnKeys,a=void 0!==i&&i;if(null!=e)if("object"!==f(e)&&(e=[e]),C(e))for(r=0,n=e.length;r<n;r++)t.call(null,e[r],r,e);else{var s,u=a?Object.getOwnPropertyNames(e):Object.keys(e),c=u.length;for(r=0;r<c;r++)s=u[r],t.call(null,e[s],s,e)}}function Z(e,t){t=t.toLowerCase();for(var r,n=Object.keys(e),o=n.length;o-- >0;)if(t===(r=n[o]).toLowerCase())return r;return null}var ee="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:global,te=function(e){return!U(e)&&e!==ee};var re,ne=(re="undefined"!=typeof Uint8Array&&j(Uint8Array),function(e){return re&&e instanceof re}),oe=N("HTMLFormElement"),ie=function(e){var t=Object.prototype.hasOwnProperty;return function(e,r){return t.call(e,r)}}(),ae=N("RegExp"),se=function(e,t){var r=Object.getOwnPropertyDescriptors(e),n={};Q(r,(function(r,o){var i;!1!==(i=t(r,o,e))&&(n[o]=i||r)})),Object.defineProperties(e,n)};var ue,ce,fe,le,pe=N("AsyncFunction"),he=(ue="function"==typeof setImmediate,ce=D(ee.postMessage),ue?setImmediate:ce?(fe="axios@".concat(Math.random()),le=[],ee.addEventListener("message",(function(e){var t=e.source,r=e.data;t===ee&&r===fe&&le.length&&le.shift()()}),!1),function(e){le.push(e),ee.postMessage(fe,"*")}):function(e){return setTimeout(e)}),de="undefined"!=typeof queueMicrotask?queueMicrotask.bind(ee):"undefined"!=typeof process&&process.nextTick||he,ve={isArray:C,isArrayBuffer:F,isBuffer:function(e){return null!==e&&!U(e)&&null!==e.constructor&&!U(e.constructor)&&D(e.constructor.isBuffer)&&e.constructor.isBuffer(e)},isFormData:function(e){var t;return e&&("function"==typeof FormData&&e instanceof FormData||D(e.append)&&("formdata"===(t=L(e))||"object"===t&&D(e.toString)&&"[object FormData]"===e.toString()))},isArrayBufferView:function(e){return"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&F(e.buffer)},isString:B,isNumber:q,isBoolean:function(e){return!0===e||!1===e},isObject:I,isPlainObject:M,isReadableStream:G,isRequest:X,isResponse:$,isHeaders:Y,isUndefined:U,isDate:z,isFile:H,isBlob:J,isRegExp:ae,isFunction:D,isStream:function(e){return I(e)&&D(e.pipe)},isURLSearchParams:K,isTypedArray:ne,isFileList:W,forEach:Q,merge:function e(){for(var t=te(this)&&this||{},r=t.caseless,n={},o=function(t,o){var i=r&&Z(n,o)||o;M(n[i])&&M(t)?n[i]=e(n[i],t):M(t)?n[i]=e({},t):C(t)?n[i]=t.slice():n[i]=t},i=0,a=arguments.length;i<a;i++)arguments[i]&&Q(arguments[i],o);return n},extend:function(e,t,r){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},o=n.allOwnKeys;return Q(t,(function(t,n){r&&D(t)?e[n]=R(t,r):e[n]=t}),{allOwnKeys:o}),e},trim:function(e){return e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")},stripBOM:function(e){return 65279===e.charCodeAt(0)&&(e=e.slice(1)),e},inherits:function(e,t,r,n){e.prototype=Object.create(t.prototype,n),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),r&&Object.assign(e.prototype,r)},toFlatObject:function(e,t,r,n){var o,i,a,s={};if(t=t||{},null==e)return t;do{for(i=(o=Object.getOwnPropertyNames(e)).length;i-- >0;)a=o[i],n&&!n(a,e,t)||s[a]||(t[a]=e[a],s[a]=!0);e=!1!==r&&j(e)}while(e&&(!r||r(e,t))&&e!==Object.prototype);return t},kindOf:L,kindOfTest:N,endsWith:function(e,t,r){e=String(e),(void 0===r||r>e.length)&&(r=e.length),r-=t.length;var n=e.indexOf(t,r);return-1!==n&&n===r},toArray:function(e){if(!e)return null;if(C(e))return e;var t=e.length;if(!q(t))return null;for(var r=new Array(t);t-- >0;)r[t]=e[t];return r},forEachEntry:function(e,t){for(var r,n=(e&&e[A]).call(e);(r=n.next())&&!r.done;){var o=r.value;t.call(e,o[0],o[1])}},matchAll:function(e,t){for(var r,n=[];null!==(r=e.exec(t));)n.push(r);return n},isHTMLForm:oe,hasOwnProperty:ie,hasOwnProp:ie,reduceDescriptors:se,freezeMethods:function(e){se(e,(function(t,r){if(D(e)&&-1!==["arguments","caller","callee"].indexOf(r))return!1;var n=e[r];D(n)&&(t.enumerable=!1,"writable"in t?t.writable=!1:t.set||(t.set=function(){throw Error("Can not rewrite read-only method '"+r+"'")}))}))},toObjectSet:function(e,t){var r={},n=function(e){e.forEach((function(e){r[e]=!0}))};return C(e)?n(e):n(String(e).split(t)),r},toCamelCase:function(e){return e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,(function(e,t,r){return t.toUpperCase()+r}))},noop:function(){},toFiniteNumber:function(e,t){return null!=e&&Number.isFinite(e=+e)?e:t},findKey:Z,global:ee,isContextDefined:te,isSpecCompliantForm:function(e){return!!(e&&D(e.append)&&"FormData"===e[P]&&e[A])},toJSONObject:function(e){var t=new Array(10);return function e(r,n){if(I(r)){if(t.indexOf(r)>=0)return;if(!("toJSON"in r)){t[n]=r;var o=C(r)?[]:{};return Q(r,(function(t,r){var i=e(t,n+1);!U(i)&&(o[r]=i)})),t[n]=void 0,o}}return r}(e,0)},isAsyncFn:pe,isThenable:function(e){return e&&(I(e)||D(e))&&D(e.then)&&D(e.catch)},setImmediate:he,asap:de,isIterable:function(e){return null!=e&&D(e[A])}};function ye(e,t,r,n,o){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack,this.message=e,this.name="AxiosError",t&&(this.code=t),r&&(this.config=r),n&&(this.request=n),o&&(this.response=o,this.status=o.status?o.status:null)}ve.inherits(ye,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:ve.toJSONObject(this.config),code:this.code,status:this.status}}});var me=ye.prototype,be={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach((function(e){be[e]={value:e}})),Object.defineProperties(ye,be),Object.defineProperty(me,"isAxiosError",{value:!0}),ye.from=function(e,t,r,n,o,i){var a=Object.create(me);return ve.toFlatObject(e,a,(function(e){return e!==Error.prototype}),(function(e){return"isAxiosError"!==e})),ye.call(a,e.message,t,r,n,o),a.cause=e,a.name=e.name,i&&Object.assign(a,i),a};function ge(e){return ve.isPlainObject(e)||ve.isArray(e)}function we(e){return ve.endsWith(e,"[]")?e.slice(0,-2):e}function Ee(e,t,r){return e?e.concat(t).map((function(e,t){return e=we(e),!r&&t?"["+e+"]":e})).join(r?".":""):t}var Oe=ve.toFlatObject(ve,{},null,(function(e){return/^is[A-Z]/.test(e)}));function Se(e,t,r){if(!ve.isObject(e))throw new TypeError("target must be an object");t=t||new FormData;var n=(r=ve.toFlatObject(r,{metaTokens:!0,dots:!1,indexes:!1},!1,(function(e,t){return!ve.isUndefined(t[e])}))).metaTokens,o=r.visitor||c,i=r.dots,a=r.indexes,s=(r.Blob||"undefined"!=typeof Blob&&Blob)&&ve.isSpecCompliantForm(t);if(!ve.isFunction(o))throw new TypeError("visitor must be a function");function u(e){if(null===e)return"";if(ve.isDate(e))return e.toISOString();if(ve.isBoolean(e))return e.toString();if(!s&&ve.isBlob(e))throw new ye("Blob is not supported. Use a Buffer instead.");return ve.isArrayBuffer(e)||ve.isTypedArray(e)?s&&"function"==typeof Blob?new Blob([e]):Buffer.from(e):e}function c(e,r,o){var s=e;if(e&&!o&&"object"===f(e))if(ve.endsWith(r,"{}"))r=n?r:r.slice(0,-2),e=JSON.stringify(e);else if(ve.isArray(e)&&function(e){return ve.isArray(e)&&!e.some(ge)}(e)||(ve.isFileList(e)||ve.endsWith(r,"[]"))&&(s=ve.toArray(e)))return r=we(r),s.forEach((function(e,n){!ve.isUndefined(e)&&null!==e&&t.append(!0===a?Ee([r],n,i):null===a?r:r+"[]",u(e))})),!1;return!!ge(e)||(t.append(Ee(o,r,i),u(e)),!1)}var l=[],p=Object.assign(Oe,{defaultVisitor:c,convertValue:u,isVisitable:ge});if(!ve.isObject(e))throw new TypeError("data must be an object");return function e(r,n){if(!ve.isUndefined(r)){if(-1!==l.indexOf(r))throw Error("Circular reference detected in "+n.join("."));l.push(r),ve.forEach(r,(function(r,i){!0===(!(ve.isUndefined(r)||null===r)&&o.call(t,r,ve.isString(i)?i.trim():i,n,p))&&e(r,n?n.concat(i):[i])})),l.pop()}}(e),t}function xe(e){var t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,(function(e){return t[e]}))}function Re(e,t){this._pairs=[],e&&Se(e,this,t)}var ke=Re.prototype;function Te(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function je(e,t,r){if(!t)return e;var n=r&&r.encode||Te;ve.isFunction(r)&&(r={serialize:r});var o,i=r&&r.serialize;if(o=i?i(t,r):ve.isURLSearchParams(t)?t.toString():new Re(t,r).toString(n)){var a=e.indexOf("#");-1!==a&&(e=e.slice(0,a)),e+=(-1===e.indexOf("?")?"?":"&")+o}return e}ke.append=function(e,t){this._pairs.push([e,t])},ke.toString=function(e){var t=e?function(t){return e.call(this,t,xe)}:xe;return this._pairs.map((function(e){return t(e[0])+"="+t(e[1])}),"").join("&")};var Ae=function(){function e(){d(this,e),this.handlers=[]}return y(e,[{key:"use",value:function(e,t,r){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!r&&r.synchronous,runWhen:r?r.runWhen:null}),this.handlers.length-1}},{key:"eject",value:function(e){this.handlers[e]&&(this.handlers[e]=null)}},{key:"clear",value:function(){this.handlers&&(this.handlers=[])}},{key:"forEach",value:function(e){ve.forEach(this.handlers,(function(t){null!==t&&e(t)}))}}]),e}(),Pe={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Le={isBrowser:!0,classes:{URLSearchParams:"undefined"!=typeof URLSearchParams?URLSearchParams:Re,FormData:"undefined"!=typeof FormData?FormData:null,Blob:"undefined"!=typeof Blob?Blob:null},protocols:["http","https","file","blob","url","data"]},Ne="undefined"!=typeof window&&"undefined"!=typeof document,_e="object"===("undefined"==typeof navigator?"undefined":f(navigator))&&navigator||void 0,Ce=Ne&&(!_e||["ReactNative","NativeScript","NS"].indexOf(_e.product)<0),Ue="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"==typeof self.importScripts,Fe=Ne&&window.location.href||"http://localhost",Be=s(s({},Object.freeze({__proto__:null,hasBrowserEnv:Ne,hasStandardBrowserWebWorkerEnv:Ue,hasStandardBrowserEnv:Ce,navigator:_e,origin:Fe})),Le);function De(e){function t(e,r,n,o){var i=e[o++];if("__proto__"===i)return!0;var a=Number.isFinite(+i),s=o>=e.length;return i=!i&&ve.isArray(n)?n.length:i,s?(ve.hasOwnProp(n,i)?n[i]=[n[i],r]:n[i]=r,!a):(n[i]&&ve.isObject(n[i])||(n[i]=[]),t(e,r,n[i],o)&&ve.isArray(n[i])&&(n[i]=function(e){var t,r,n={},o=Object.keys(e),i=o.length;for(t=0;t<i;t++)n[r=o[t]]=e[r];return n}(n[i])),!a)}if(ve.isFormData(e)&&ve.isFunction(e.entries)){var r={};return ve.forEachEntry(e,(function(e,n){t(function(e){return ve.matchAll(/\w+|\[(\w*)]/g,e).map((function(e){return"[]"===e[0]?"":e[1]||e[0]}))}(e),n,r,0)})),r}return null}var qe={transitional:Pe,adapter:["xhr","http","fetch"],transformRequest:[function(e,t){var r,n=t.getContentType()||"",o=n.indexOf("application/json")>-1,i=ve.isObject(e);if(i&&ve.isHTMLForm(e)&&(e=new FormData(e)),ve.isFormData(e))return o?JSON.stringify(De(e)):e;if(ve.isArrayBuffer(e)||ve.isBuffer(e)||ve.isStream(e)||ve.isFile(e)||ve.isBlob(e)||ve.isReadableStream(e))return e;if(ve.isArrayBufferView(e))return e.buffer;if(ve.isURLSearchParams(e))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();if(i){if(n.indexOf("application/x-www-form-urlencoded")>-1)return function(e,t){return Se(e,new Be.classes.URLSearchParams,Object.assign({visitor:function(e,t,r,n){return Be.isNode&&ve.isBuffer(e)?(this.append(t,e.toString("base64")),!1):n.defaultVisitor.apply(this,arguments)}},t))}(e,this.formSerializer).toString();if((r=ve.isFileList(e))||n.indexOf("multipart/form-data")>-1){var a=this.env&&this.env.FormData;return Se(r?{"files[]":e}:e,a&&new a,this.formSerializer)}}return i||o?(t.setContentType("application/json",!1),function(e,t,r){if(ve.isString(e))try{return(t||JSON.parse)(e),ve.trim(e)}catch(e){if("SyntaxError"!==e.name)throw e}return(r||JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){var t=this.transitional||qe.transitional,r=t&&t.forcedJSONParsing,n="json"===this.responseType;if(ve.isResponse(e)||ve.isReadableStream(e))return e;if(e&&ve.isString(e)&&(r&&!this.responseType||n)){var o=!(t&&t.silentJSONParsing)&&n;try{return JSON.parse(e)}catch(e){if(o){if("SyntaxError"===e.name)throw ye.from(e,ye.ERR_BAD_RESPONSE,this,null,this.response);throw e}}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Be.classes.FormData,Blob:Be.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};ve.forEach(["delete","get","head","post","put","patch"],(function(e){qe.headers[e]={}}));var Ie=qe,Me=ve.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),ze=Symbol("internals");function He(e){return e&&String(e).trim().toLowerCase()}function Je(e){return!1===e||null==e?e:ve.isArray(e)?e.map(Je):String(e)}function We(e,t,r,n,o){return ve.isFunction(n)?n.call(this,t,r):(o&&(t=r),ve.isString(t)?ve.isString(n)?-1!==t.indexOf(n):ve.isRegExp(n)?n.test(t):void 0:void 0)}var Ke=function(e,t){function r(e){d(this,r),e&&this.set(e)}return y(r,[{key:"set",value:function(e,t,r){var n=this;function o(e,t,r){var o=He(t);if(!o)throw new Error("header name must be a non-empty string");var i=ve.findKey(n,o);(!i||void 0===n[i]||!0===r||void 0===r&&!1!==n[i])&&(n[i||t]=Je(e))}var i=function(e,t){return ve.forEach(e,(function(e,r){return o(e,r,t)}))};if(ve.isPlainObject(e)||e instanceof this.constructor)i(e,t);else if(ve.isString(e)&&(e=e.trim())&&!/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim()))i(function(e){var t,r,n,o={};return e&&e.split("\n").forEach((function(e){n=e.indexOf(":"),t=e.substring(0,n).trim().toLowerCase(),r=e.substring(n+1).trim(),!t||o[t]&&Me[t]||("set-cookie"===t?o[t]?o[t].push(r):o[t]=[r]:o[t]=o[t]?o[t]+", "+r:r)})),o}(e),t);else if(ve.isObject(e)&&ve.isIterable(e)){var a,s,u,c={},f=function(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=O(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,s=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){s=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(s)throw i}}}}(e);try{for(f.s();!(u=f.n()).done;){var l=u.value;if(!ve.isArray(l))throw TypeError("Object iterator must return a key-value pair");c[s=l[0]]=(a=c[s])?ve.isArray(a)?[].concat(g(a),[l[1]]):[a,l[1]]:l[1]}}catch(e){f.e(e)}finally{f.f()}i(c,t)}else null!=e&&o(t,e,r);return this}},{key:"get",value:function(e,t){if(e=He(e)){var r=ve.findKey(this,e);if(r){var n=this[r];if(!t)return n;if(!0===t)return function(e){for(var t,r=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;t=n.exec(e);)r[t[1]]=t[2];return r}(n);if(ve.isFunction(t))return t.call(this,n,r);if(ve.isRegExp(t))return t.exec(n);throw new TypeError("parser must be boolean|regexp|function")}}}},{key:"has",value:function(e,t){if(e=He(e)){var r=ve.findKey(this,e);return!(!r||void 0===this[r]||t&&!We(0,this[r],r,t))}return!1}},{key:"delete",value:function(e,t){var r=this,n=!1;function o(e){if(e=He(e)){var o=ve.findKey(r,e);!o||t&&!We(0,r[o],o,t)||(delete r[o],n=!0)}}return ve.isArray(e)?e.forEach(o):o(e),n}},{key:"clear",value:function(e){for(var t=Object.keys(this),r=t.length,n=!1;r--;){var o=t[r];e&&!We(0,this[o],o,e,!0)||(delete this[o],n=!0)}return n}},{key:"normalize",value:function(e){var t=this,r={};return ve.forEach(this,(function(n,o){var i=ve.findKey(r,o);if(i)return t[i]=Je(n),void delete t[o];var a=e?function(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(function(e,t,r){return t.toUpperCase()+r}))}(o):String(o).trim();a!==o&&delete t[o],t[a]=Je(n),r[a]=!0})),this}},{key:"concat",value:function(){for(var e,t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return(e=this.constructor).concat.apply(e,[this].concat(r))}},{key:"toJSON",value:function(e){var t=Object.create(null);return ve.forEach(this,(function(r,n){null!=r&&!1!==r&&(t[n]=e&&ve.isArray(r)?r.join(", "):r)})),t}},{key:Symbol.iterator,value:function(){return Object.entries(this.toJSON())[Symbol.iterator]()}},{key:"toString",value:function(){return Object.entries(this.toJSON()).map((function(e){var t=b(e,2);return t[0]+": "+t[1]})).join("\n")}},{key:"getSetCookie",value:function(){return this.get("set-cookie")||[]}},{key:Symbol.toStringTag,get:function(){return"AxiosHeaders"}}],[{key:"from",value:function(e){return e instanceof this?e:new this(e)}},{key:"concat",value:function(e){for(var t=new this(e),r=arguments.length,n=new Array(r>1?r-1:0),o=1;o<r;o++)n[o-1]=arguments[o];return n.forEach((function(e){return t.set(e)})),t}},{key:"accessor",value:function(e){var t=(this[ze]=this[ze]={accessors:{}}).accessors,r=this.prototype;function n(e){var n=He(e);t[n]||(!function(e,t){var r=ve.toCamelCase(" "+t);["get","set","has"].forEach((function(n){Object.defineProperty(e,n+r,{value:function(e,r,o){return this[n].call(this,t,e,r,o)},configurable:!0})}))}(r,e),t[n]=!0)}return ve.isArray(e)?e.forEach(n):n(e),this}}]),r}();Ke.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),ve.reduceDescriptors(Ke.prototype,(function(e,t){var r=e.value,n=t[0].toUpperCase()+t.slice(1);return{get:function(){return r},set:function(e){this[n]=e}}})),ve.freezeMethods(Ke);var Ve=Ke;function Ge(e,t){var r=this||Ie,n=t||r,o=Ve.from(n.headers),i=n.data;return ve.forEach(e,(function(e){i=e.call(r,i,o.normalize(),t?t.status:void 0)})),o.normalize(),i}function Xe(e){return!(!e||!e.__CANCEL__)}function $e(e,t,r){ye.call(this,null==e?"canceled":e,ye.ERR_CANCELED,t,r),this.name="CanceledError"}function Ye(e,t,r){var n=r.config.validateStatus;r.status&&n&&!n(r.status)?t(new ye("Request failed with status code "+r.status,[ye.ERR_BAD_REQUEST,ye.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r)):e(r)}function Qe(e,t){e=e||10;var r,n=new Array(e),o=new Array(e),i=0,a=0;return t=void 0!==t?t:1e3,function(s){var u=Date.now(),c=o[a];r||(r=u),n[i]=s,o[i]=u;for(var f=a,l=0;f!==i;)l+=n[f++],f%=e;if((i=(i+1)%e)===a&&(a=(a+1)%e),!(u-r<t)){var p=c&&u-c;return p?Math.round(1e3*l/p):void 0}}}function Ze(e,t){var r,n,o=0,i=1e3/t,a=function(t){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Date.now();o=i,r=null,n&&(clearTimeout(n),n=null),e.apply(null,t)};return[function(){for(var e=Date.now(),t=e-o,s=arguments.length,u=new Array(s),c=0;c<s;c++)u[c]=arguments[c];t>=i?a(u,e):(r=u,n||(n=setTimeout((function(){n=null,a(r)}),i-t)))},function(){return r&&a(r)}]}ve.inherits($e,ye,{__CANCEL__:!0});var et=function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:3,n=0,o=Qe(50,250);return Ze((function(r){var i=r.loaded,a=r.lengthComputable?r.total:void 0,s=i-n,u=o(s);n=i;var c=m({loaded:i,total:a,progress:a?i/a:void 0,bytes:s,rate:u||void 0,estimated:u&&a&&i<=a?(a-i)/u:void 0,event:r,lengthComputable:null!=a},t?"download":"upload",!0);e(c)}),r)},tt=function(e,t){var r=null!=e;return[function(n){return t[0]({lengthComputable:r,total:e,loaded:n})},t[1]]},rt=function(e){return function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return ve.asap((function(){return e.apply(void 0,r)}))}},nt=Be.hasStandardBrowserEnv?function(e,t){return function(r){return r=new URL(r,Be.origin),e.protocol===r.protocol&&e.host===r.host&&(t||e.port===r.port)}}(new URL(Be.origin),Be.navigator&&/(msie|trident)/i.test(Be.navigator.userAgent)):function(){return!0},ot=Be.hasStandardBrowserEnv?{write:function(e,t,r,n,o,i){var a=[e+"="+encodeURIComponent(t)];ve.isNumber(r)&&a.push("expires="+new Date(r).toGMTString()),ve.isString(n)&&a.push("path="+n),ve.isString(o)&&a.push("domain="+o),!0===i&&a.push("secure"),document.cookie=a.join("; ")},read:function(e){var t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove:function(e){this.write(e,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}};function it(e,t,r){var n=!/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t);return e&&(n||0==r)?function(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}(e,t):t}var at=function(e){return e instanceof Ve?s({},e):e};function st(e,t){t=t||{};var r={};function n(e,t,r,n){return ve.isPlainObject(e)&&ve.isPlainObject(t)?ve.merge.call({caseless:n},e,t):ve.isPlainObject(t)?ve.merge({},t):ve.isArray(t)?t.slice():t}function o(e,t,r,o){return ve.isUndefined(t)?ve.isUndefined(e)?void 0:n(void 0,e,0,o):n(e,t,0,o)}function i(e,t){if(!ve.isUndefined(t))return n(void 0,t)}function a(e,t){return ve.isUndefined(t)?ve.isUndefined(e)?void 0:n(void 0,e):n(void 0,t)}function s(r,o,i){return i in t?n(r,o):i in e?n(void 0,r):void 0}var u={url:i,method:i,data:i,baseURL:a,transformRequest:a,transformResponse:a,paramsSerializer:a,timeout:a,timeoutMessage:a,withCredentials:a,withXSRFToken:a,adapter:a,responseType:a,xsrfCookieName:a,xsrfHeaderName:a,onUploadProgress:a,onDownloadProgress:a,decompress:a,maxContentLength:a,maxBodyLength:a,beforeRedirect:a,transport:a,httpAgent:a,httpsAgent:a,cancelToken:a,socketPath:a,responseEncoding:a,validateStatus:s,headers:function(e,t,r){return o(at(e),at(t),0,!0)}};return ve.forEach(Object.keys(Object.assign({},e,t)),(function(n){var i=u[n]||o,a=i(e[n],t[n],n);ve.isUndefined(a)&&i!==s||(r[n]=a)})),r}var ut,ct,ft=function(e){var t,r,n=st({},e),o=n.data,i=n.withXSRFToken,a=n.xsrfHeaderName,s=n.xsrfCookieName,u=n.headers,c=n.auth;if(n.headers=u=Ve.from(u),n.url=je(it(n.baseURL,n.url,n.allowAbsoluteUrls),e.params,e.paramsSerializer),c&&u.set("Authorization","Basic "+btoa((c.username||"")+":"+(c.password?unescape(encodeURIComponent(c.password)):""))),ve.isFormData(o))if(Be.hasStandardBrowserEnv||Be.hasStandardBrowserWebWorkerEnv)u.setContentType(void 0);else if(!1!==(t=u.getContentType())){var f=t?t.split(";").map((function(e){return e.trim()})).filter(Boolean):[],l=w(r=f)||E(r)||O(r)||x(),p=l[0],h=l.slice(1);u.setContentType([p||"multipart/form-data"].concat(g(h)).join("; "))}if(Be.hasStandardBrowserEnv&&(i&&ve.isFunction(i)&&(i=i(n)),i||!1!==i&&nt(n.url))){var d=a&&s&&ot.read(s);d&&u.set(a,d)}return n},lt="undefined"!=typeof XMLHttpRequest&&function(e){return new Promise((function(t,r){var n,o,i,a,s,u=ft(e),c=u.data,f=Ve.from(u.headers).normalize(),l=u.responseType,p=u.onUploadProgress,h=u.onDownloadProgress;function d(){a&&a(),s&&s(),u.cancelToken&&u.cancelToken.unsubscribe(n),u.signal&&u.signal.removeEventListener("abort",n)}var v=new XMLHttpRequest;function y(){if(v){var n=Ve.from("getAllResponseHeaders"in v&&v.getAllResponseHeaders());Ye((function(e){t(e),d()}),(function(e){r(e),d()}),{data:l&&"text"!==l&&"json"!==l?v.response:v.responseText,status:v.status,statusText:v.statusText,headers:n,config:e,request:v}),v=null}}if(v.open(u.method.toUpperCase(),u.url,!0),v.timeout=u.timeout,"onloadend"in v?v.onloadend=y:v.onreadystatechange=function(){v&&4===v.readyState&&(0!==v.status||v.responseURL&&0===v.responseURL.indexOf("file:"))&&setTimeout(y)},v.onabort=function(){v&&(r(new ye("Request aborted",ye.ECONNABORTED,e,v)),v=null)},v.onerror=function(){r(new ye("Network Error",ye.ERR_NETWORK,e,v)),v=null},v.ontimeout=function(){var t=u.timeout?"timeout of "+u.timeout+"ms exceeded":"timeout exceeded",n=u.transitional||Pe;u.timeoutErrorMessage&&(t=u.timeoutErrorMessage),r(new ye(t,n.clarifyTimeoutError?ye.ETIMEDOUT:ye.ECONNABORTED,e,v)),v=null},void 0===c&&f.setContentType(null),"setRequestHeader"in v&&ve.forEach(f.toJSON(),(function(e,t){v.setRequestHeader(t,e)})),ve.isUndefined(u.withCredentials)||(v.withCredentials=!!u.withCredentials),l&&"json"!==l&&(v.responseType=u.responseType),h){var m=b(et(h,!0),2);i=m[0],s=m[1],v.addEventListener("progress",i)}if(p&&v.upload){var g=b(et(p),2);o=g[0],a=g[1],v.upload.addEventListener("progress",o),v.upload.addEventListener("loadend",a)}(u.cancelToken||u.signal)&&(n=function(t){v&&(r(!t||t.type?new $e(null,e,v):t),v.abort(),v=null)},u.cancelToken&&u.cancelToken.subscribe(n),u.signal&&(u.signal.aborted?n():u.signal.addEventListener("abort",n)));var w,E,O=(w=u.url,(E=/^([-+\w]{1,25})(:?\/\/|:)/.exec(w))&&E[1]||"");O&&-1===Be.protocols.indexOf(O)?r(new ye("Unsupported protocol "+O+":",ye.ERR_BAD_REQUEST,e)):v.send(c||null)}))},pt=function(e,t){var r=(e=e?e.filter(Boolean):[]).length;if(t||r){var n,o=new AbortController,i=function(e){if(!n){n=!0,s();var t=e instanceof Error?e:this.reason;o.abort(t instanceof ye?t:new $e(t instanceof Error?t.message:t))}},a=t&&setTimeout((function(){a=null,i(new ye("timeout ".concat(t," of ms exceeded"),ye.ETIMEDOUT))}),t),s=function(){e&&(a&&clearTimeout(a),a=null,e.forEach((function(e){e.unsubscribe?e.unsubscribe(i):e.removeEventListener("abort",i)})),e=null)};e.forEach((function(e){return e.addEventListener("abort",i)}));var u=o.signal;return u.unsubscribe=function(){return ve.asap(s)},u}},ht=u().mark((function e(t,r){var n,o,i;return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=t.byteLength,r&&!(n<r)){e.next=5;break}return e.next=4,t;case 4:return e.abrupt("return");case 5:o=0;case 6:if(!(o<n)){e.next=13;break}return i=o+r,e.next=10,t.slice(o,i);case 10:o=i,e.next=6;break;case 13:case"end":return e.stop()}}),e)})),dt=function(){var e=l(u().mark((function e(t,o){var a,s,c,f,l,p;return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:a=!1,s=!1,e.prev=2,f=n(vt(t));case 4:return e.next=6,i(f.next());case 6:if(!(a=!(l=e.sent).done)){e.next=12;break}return p=l.value,e.delegateYield(r(n(ht(p,o))),"t0",9);case 9:a=!1,e.next=4;break;case 12:e.next=18;break;case 14:e.prev=14,e.t1=e.catch(2),s=!0,c=e.t1;case 18:if(e.prev=18,e.prev=19,!a||null==f.return){e.next=23;break}return e.next=23,i(f.return());case 23:if(e.prev=23,!s){e.next=26;break}throw c;case 26:return e.finish(23);case 27:return e.finish(18);case 28:case"end":return e.stop()}}),e,null,[[2,14,18,28],[19,,23,27]])})));return function(t,r){return e.apply(this,arguments)}}(),vt=function(){var e=l(u().mark((function e(t){var o,a,s,c;return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!t[Symbol.asyncIterator]){e.next=3;break}return e.delegateYield(r(n(t)),"t0",2);case 2:return e.abrupt("return");case 3:o=t.getReader(),e.prev=4;case 5:return e.next=7,i(o.read());case 7:if(a=e.sent,s=a.done,c=a.value,!s){e.next=12;break}return e.abrupt("break",16);case 12:return e.next=14,c;case 14:e.next=5;break;case 16:return e.prev=16,e.next=19,i(o.cancel());case 19:return e.finish(16);case 20:case"end":return e.stop()}}),e,null,[[4,,16,20]])})));return function(t){return e.apply(this,arguments)}}(),yt=function(e,t,r,n){var o,i=dt(e,t),a=0,s=function(e){o||(o=!0,n&&n(e))};return new ReadableStream({pull:function(e){return h(u().mark((function t(){var n,o,c,f,l;return u().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,i.next();case 3:if(n=t.sent,o=n.done,c=n.value,!o){t.next=10;break}return s(),e.close(),t.abrupt("return");case 10:f=c.byteLength,r&&(l=a+=f,r(l)),e.enqueue(new Uint8Array(c)),t.next=19;break;case 15:throw t.prev=15,t.t0=t.catch(0),s(t.t0),t.t0;case 19:case"end":return t.stop()}}),t,null,[[0,15]])})))()},cancel:function(e){return s(e),i.return()}},{highWaterMark:2})},mt="function"==typeof fetch&&"function"==typeof Request&&"function"==typeof Response,bt=mt&&"function"==typeof ReadableStream,gt=mt&&("function"==typeof TextEncoder?(ut=new TextEncoder,function(e){return ut.encode(e)}):function(){var e=h(u().mark((function e(t){return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.t0=Uint8Array,e.next=3,new Response(t).arrayBuffer();case 3:return e.t1=e.sent,e.abrupt("return",new e.t0(e.t1));case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()),wt=function(e){try{for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];return!!e.apply(void 0,r)}catch(e){return!1}},Et=bt&&wt((function(){var e=!1,t=new Request(Be.origin,{body:new ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t})),Ot=bt&&wt((function(){return ve.isReadableStream(new Response("").body)})),St={stream:Ot&&function(e){return e.body}};mt&&(ct=new Response,["text","arrayBuffer","blob","formData","stream"].forEach((function(e){!St[e]&&(St[e]=ve.isFunction(ct[e])?function(t){return t[e]()}:function(t,r){throw new ye("Response type '".concat(e,"' is not supported"),ye.ERR_NOT_SUPPORT,r)})})));var xt=function(){var e=h(u().mark((function e(t){var r;return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(null!=t){e.next=2;break}return e.abrupt("return",0);case 2:if(!ve.isBlob(t)){e.next=4;break}return e.abrupt("return",t.size);case 4:if(!ve.isSpecCompliantForm(t)){e.next=9;break}return r=new Request(Be.origin,{method:"POST",body:t}),e.next=8,r.arrayBuffer();case 8:case 15:return e.abrupt("return",e.sent.byteLength);case 9:if(!ve.isArrayBufferView(t)&&!ve.isArrayBuffer(t)){e.next=11;break}return e.abrupt("return",t.byteLength);case 11:if(ve.isURLSearchParams(t)&&(t+=""),!ve.isString(t)){e.next=16;break}return e.next=15,gt(t);case 16:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),Rt=function(){var e=h(u().mark((function e(t,r){var n;return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=ve.toFiniteNumber(t.getContentLength()),e.abrupt("return",null==n?xt(r):n);case 2:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}(),kt=mt&&function(){var e=h(u().mark((function e(t){var r,n,o,i,a,c,f,l,p,h,d,v,y,m,g,w,E,O,S,x,R,k,T,j,A,P,L,N,_,C,U,F,B,D;return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=ft(t),n=r.url,o=r.method,i=r.data,a=r.signal,c=r.cancelToken,f=r.timeout,l=r.onDownloadProgress,p=r.onUploadProgress,h=r.responseType,d=r.headers,v=r.withCredentials,y=void 0===v?"same-origin":v,m=r.fetchOptions,h=h?(h+"").toLowerCase():"text",g=pt([a,c&&c.toAbortSignal()],f),E=g&&g.unsubscribe&&function(){g.unsubscribe()},e.prev=4,e.t0=p&&Et&&"get"!==o&&"head"!==o,!e.t0){e.next=11;break}return e.next=9,Rt(d,i);case 9:e.t1=O=e.sent,e.t0=0!==e.t1;case 11:if(!e.t0){e.next=15;break}S=new Request(n,{method:"POST",body:i,duplex:"half"}),ve.isFormData(i)&&(x=S.headers.get("content-type"))&&d.setContentType(x),S.body&&(R=tt(O,et(rt(p))),k=b(R,2),T=k[0],j=k[1],i=yt(S.body,65536,T,j));case 15:return ve.isString(y)||(y=y?"include":"omit"),A="credentials"in Request.prototype,w=new Request(n,s(s({},m),{},{signal:g,method:o.toUpperCase(),headers:d.normalize().toJSON(),body:i,duplex:"half",credentials:A?y:void 0})),e.next=20,fetch(w,m);case 20:return P=e.sent,L=Ot&&("stream"===h||"response"===h),Ot&&(l||L&&E)&&(N={},["status","statusText","headers"].forEach((function(e){N[e]=P[e]})),_=ve.toFiniteNumber(P.headers.get("content-length")),C=l&&tt(_,et(rt(l),!0))||[],U=b(C,2),F=U[0],B=U[1],P=new Response(yt(P.body,65536,F,(function(){B&&B(),E&&E()})),N)),h=h||"text",e.next=26,St[ve.findKey(St,h)||"text"](P,t);case 26:return D=e.sent,!L&&E&&E(),e.next=30,new Promise((function(e,r){Ye(e,r,{data:D,headers:Ve.from(P.headers),status:P.status,statusText:P.statusText,config:t,request:w})}));case 30:return e.abrupt("return",e.sent);case 33:if(e.prev=33,e.t2=e.catch(4),E&&E(),!e.t2||"TypeError"!==e.t2.name||!/Load failed|fetch/i.test(e.t2.message)){e.next=38;break}throw Object.assign(new ye("Network Error",ye.ERR_NETWORK,t,w),{cause:e.t2.cause||e.t2});case 38:throw ye.from(e.t2,e.t2&&e.t2.code,t,w);case 39:case"end":return e.stop()}}),e,null,[[4,33]])})));return function(t){return e.apply(this,arguments)}}(),Tt={http:null,xhr:lt,fetch:kt};ve.forEach(Tt,(function(e,t){if(e){try{Object.defineProperty(e,"name",{value:t})}catch(e){}Object.defineProperty(e,"adapterName",{value:t})}}));var jt=function(e){return"- ".concat(e)},At=function(e){return ve.isFunction(e)||null===e||!1===e},Pt=function(e){for(var t,r,n=(e=ve.isArray(e)?e:[e]).length,o={},i=0;i<n;i++){var a=void 0;if(r=t=e[i],!At(t)&&void 0===(r=Tt[(a=String(t)).toLowerCase()]))throw new ye("Unknown adapter '".concat(a,"'"));if(r)break;o[a||"#"+i]=r}if(!r){var s=Object.entries(o).map((function(e){var t=b(e,2),r=t[0],n=t[1];return"adapter ".concat(r," ")+(!1===n?"is not supported by the environment":"is not available in the build")}));throw new ye("There is no suitable adapter to dispatch the request "+(n?s.length>1?"since :\n"+s.map(jt).join("\n"):" "+jt(s[0]):"as no adapter specified"),"ERR_NOT_SUPPORT")}return r};function Lt(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new $e(null,e)}function Nt(e){return Lt(e),e.headers=Ve.from(e.headers),e.data=Ge.call(e,e.transformRequest),-1!==["post","put","patch"].indexOf(e.method)&&e.headers.setContentType("application/x-www-form-urlencoded",!1),Pt(e.adapter||Ie.adapter)(e).then((function(t){return Lt(e),t.data=Ge.call(e,e.transformResponse,t),t.headers=Ve.from(t.headers),t}),(function(t){return Xe(t)||(Lt(e),t&&t.response&&(t.response.data=Ge.call(e,e.transformResponse,t.response),t.response.headers=Ve.from(t.response.headers))),Promise.reject(t)}))}var _t="1.10.0",Ct={};["object","boolean","number","function","string","symbol"].forEach((function(e,t){Ct[e]=function(r){return f(r)===e||"a"+(t<1?"n ":" ")+e}}));var Ut={};Ct.transitional=function(e,t,r){function n(e,t){return"[Axios v1.10.0] Transitional option '"+e+"'"+t+(r?". "+r:"")}return function(r,o,i){if(!1===e)throw new ye(n(o," has been removed"+(t?" in "+t:"")),ye.ERR_DEPRECATED);return t&&!Ut[o]&&(Ut[o]=!0,console.warn(n(o," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(r,o,i)}},Ct.spelling=function(e){return function(t,r){return console.warn("".concat(r," is likely a misspelling of ").concat(e)),!0}};var Ft={assertOptions:function(e,t,r){if("object"!==f(e))throw new ye("options must be an object",ye.ERR_BAD_OPTION_VALUE);for(var n=Object.keys(e),o=n.length;o-- >0;){var i=n[o],a=t[i];if(a){var s=e[i],u=void 0===s||a(s,i,e);if(!0!==u)throw new ye("option "+i+" must be "+u,ye.ERR_BAD_OPTION_VALUE)}else if(!0!==r)throw new ye("Unknown option "+i,ye.ERR_BAD_OPTION)}},validators:Ct},Bt=Ft.validators,Dt=function(){function e(t){d(this,e),this.defaults=t||{},this.interceptors={request:new Ae,response:new Ae}}var t;return y(e,[{key:"request",value:(t=h(u().mark((function e(t,r){var n,o;return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,this._request(t,r);case 3:return e.abrupt("return",e.sent);case 6:if(e.prev=6,e.t0=e.catch(0),e.t0 instanceof Error){n={},Error.captureStackTrace?Error.captureStackTrace(n):n=new Error,o=n.stack?n.stack.replace(/^.+\n/,""):"";try{e.t0.stack?o&&!String(e.t0.stack).endsWith(o.replace(/^.+\n.+\n/,""))&&(e.t0.stack+="\n"+o):e.t0.stack=o}catch(e){}}throw e.t0;case 10:case"end":return e.stop()}}),e,this,[[0,6]])}))),function(e,r){return t.apply(this,arguments)})},{key:"_request",value:function(e,t){"string"==typeof e?(t=t||{}).url=e:t=e||{};var r=t=st(this.defaults,t),n=r.transitional,o=r.paramsSerializer,i=r.headers;void 0!==n&&Ft.assertOptions(n,{silentJSONParsing:Bt.transitional(Bt.boolean),forcedJSONParsing:Bt.transitional(Bt.boolean),clarifyTimeoutError:Bt.transitional(Bt.boolean)},!1),null!=o&&(ve.isFunction(o)?t.paramsSerializer={serialize:o}:Ft.assertOptions(o,{encode:Bt.function,serialize:Bt.function},!0)),void 0!==t.allowAbsoluteUrls||(void 0!==this.defaults.allowAbsoluteUrls?t.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:t.allowAbsoluteUrls=!0),Ft.assertOptions(t,{baseUrl:Bt.spelling("baseURL"),withXsrfToken:Bt.spelling("withXSRFToken")},!0),t.method=(t.method||this.defaults.method||"get").toLowerCase();var a=i&&ve.merge(i.common,i[t.method]);i&&ve.forEach(["delete","get","head","post","put","patch","common"],(function(e){delete i[e]})),t.headers=Ve.concat(a,i);var s=[],u=!0;this.interceptors.request.forEach((function(e){"function"==typeof e.runWhen&&!1===e.runWhen(t)||(u=u&&e.synchronous,s.unshift(e.fulfilled,e.rejected))}));var c,f=[];this.interceptors.response.forEach((function(e){f.push(e.fulfilled,e.rejected)}));var l,p=0;if(!u){var h=[Nt.bind(this),void 0];for(h.unshift.apply(h,s),h.push.apply(h,f),l=h.length,c=Promise.resolve(t);p<l;)c=c.then(h[p++],h[p++]);return c}l=s.length;var d=t;for(p=0;p<l;){var v=s[p++],y=s[p++];try{d=v(d)}catch(e){y.call(this,e);break}}try{c=Nt.call(this,d)}catch(e){return Promise.reject(e)}for(p=0,l=f.length;p<l;)c=c.then(f[p++],f[p++]);return c}},{key:"getUri",value:function(e){return je(it((e=st(this.defaults,e)).baseURL,e.url,e.allowAbsoluteUrls),e.params,e.paramsSerializer)}}]),e}();ve.forEach(["delete","get","head","options"],(function(e){Dt.prototype[e]=function(t,r){return this.request(st(r||{},{method:e,url:t,data:(r||{}).data}))}})),ve.forEach(["post","put","patch"],(function(e){function t(t){return function(r,n,o){return this.request(st(o||{},{method:e,headers:t?{"Content-Type":"multipart/form-data"}:{},url:r,data:n}))}}Dt.prototype[e]=t(),Dt.prototype[e+"Form"]=t(!0)}));var qt=Dt,It=function(){function e(t){if(d(this,e),"function"!=typeof t)throw new TypeError("executor must be a function.");var r;this.promise=new Promise((function(e){r=e}));var n=this;this.promise.then((function(e){if(n._listeners){for(var t=n._listeners.length;t-- >0;)n._listeners[t](e);n._listeners=null}})),this.promise.then=function(e){var t,r=new Promise((function(e){n.subscribe(e),t=e})).then(e);return r.cancel=function(){n.unsubscribe(t)},r},t((function(e,t,o){n.reason||(n.reason=new $e(e,t,o),r(n.reason))}))}return y(e,[{key:"throwIfRequested",value:function(){if(this.reason)throw this.reason}},{key:"subscribe",value:function(e){this.reason?e(this.reason):this._listeners?this._listeners.push(e):this._listeners=[e]}},{key:"unsubscribe",value:function(e){if(this._listeners){var t=this._listeners.indexOf(e);-1!==t&&this._listeners.splice(t,1)}}},{key:"toAbortSignal",value:function(){var e=this,t=new AbortController,r=function(e){t.abort(e)};return this.subscribe(r),t.signal.unsubscribe=function(){return e.unsubscribe(r)},t.signal}}],[{key:"source",value:function(){var t;return{token:new e((function(e){t=e})),cancel:t}}}]),e}(),Mt=It;var zt={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(zt).forEach((function(e){var t=b(e,2),r=t[0],n=t[1];zt[n]=r}));var Ht=zt;var Jt=function e(t){var r=new qt(t),n=R(qt.prototype.request,r);return ve.extend(n,qt.prototype,r,{allOwnKeys:!0}),ve.extend(n,r,null,{allOwnKeys:!0}),n.create=function(r){return e(st(t,r))},n}(Ie);return Jt.Axios=qt,Jt.CanceledError=$e,Jt.CancelToken=Mt,Jt.isCancel=Xe,Jt.VERSION=_t,Jt.toFormData=Se,Jt.AxiosError=ye,Jt.Cancel=Jt.CanceledError,Jt.all=function(e){return Promise.all(e)},Jt.spread=function(e){return function(t){return e.apply(null,t)}},Jt.isAxiosError=function(e){return ve.isObject(e)&&!0===e.isAxiosError},Jt.mergeConfig=st,Jt.AxiosHeaders=Ve,Jt.formToJSON=function(e){return De(ve.isHTMLForm(e)?new FormData(e):e)},Jt.getAdapter=Pt,Jt.HttpStatusCode=Ht,Jt.default=Jt,Jt})); //# sourceMappingURL=axios.min.js.map node_modules/axios/dist/axios.min.js.map 0000664 00000517270 15114741631 0014347 0 ustar 00 {"version":3,"file":"axios.min.js","sources":["../lib/helpers/bind.js","../lib/utils.js","../lib/core/AxiosError.js","../lib/helpers/toFormData.js","../lib/helpers/AxiosURLSearchParams.js","../lib/helpers/buildURL.js","../lib/core/InterceptorManager.js","../lib/defaults/transitional.js","../lib/platform/browser/index.js","../lib/platform/browser/classes/URLSearchParams.js","../lib/platform/browser/classes/FormData.js","../lib/platform/browser/classes/Blob.js","../lib/platform/common/utils.js","../lib/platform/index.js","../lib/helpers/formDataToJSON.js","../lib/defaults/index.js","../lib/helpers/toURLEncodedForm.js","../lib/helpers/parseHeaders.js","../lib/core/AxiosHeaders.js","../lib/core/transformData.js","../lib/cancel/isCancel.js","../lib/cancel/CanceledError.js","../lib/core/settle.js","../lib/helpers/speedometer.js","../lib/helpers/throttle.js","../lib/helpers/progressEventReducer.js","../lib/helpers/isURLSameOrigin.js","../lib/helpers/cookies.js","../lib/core/buildFullPath.js","../lib/helpers/isAbsoluteURL.js","../lib/helpers/combineURLs.js","../lib/core/mergeConfig.js","../lib/helpers/resolveConfig.js","../lib/adapters/fetch.js","../lib/adapters/xhr.js","../lib/helpers/parseProtocol.js","../lib/helpers/composeSignals.js","../lib/helpers/trackStream.js","../lib/adapters/adapters.js","../lib/helpers/null.js","../lib/core/dispatchRequest.js","../lib/env/data.js","../lib/helpers/validator.js","../lib/core/Axios.js","../lib/cancel/CancelToken.js","../lib/helpers/HttpStatusCode.js","../lib/axios.js","../lib/helpers/spread.js","../lib/helpers/isAxiosError.js"],"sourcesContent":["'use strict';\n\nexport default function bind(fn, thisArg) {\n return function wrap() {\n return fn.apply(thisArg, arguments);\n };\n}\n","'use strict';\n\nimport bind from './helpers/bind.js';\n\n// utils is a library of generic helper functions non-specific to axios\n\nconst {toString} = Object.prototype;\nconst {getPrototypeOf} = Object;\nconst {iterator, toStringTag} = Symbol;\n\nconst kindOf = (cache => thing => {\n const str = toString.call(thing);\n return cache[str] || (cache[str] = str.slice(8, -1).toLowerCase());\n})(Object.create(null));\n\nconst kindOfTest = (type) => {\n type = type.toLowerCase();\n return (thing) => kindOf(thing) === type\n}\n\nconst typeOfTest = type => thing => typeof thing === type;\n\n/**\n * Determine if a value is an Array\n *\n * @param {Object} val The value to test\n *\n * @returns {boolean} True if value is an Array, otherwise false\n */\nconst {isArray} = Array;\n\n/**\n * Determine if a value is undefined\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if the value is undefined, otherwise false\n */\nconst isUndefined = typeOfTest('undefined');\n\n/**\n * Determine if a value is a Buffer\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a Buffer, otherwise false\n */\nfunction isBuffer(val) {\n return val !== null && !isUndefined(val) && val.constructor !== null && !isUndefined(val.constructor)\n && isFunction(val.constructor.isBuffer) && val.constructor.isBuffer(val);\n}\n\n/**\n * Determine if a value is an ArrayBuffer\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is an ArrayBuffer, otherwise false\n */\nconst isArrayBuffer = kindOfTest('ArrayBuffer');\n\n\n/**\n * Determine if a value is a view on an ArrayBuffer\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a view on an ArrayBuffer, otherwise false\n */\nfunction isArrayBufferView(val) {\n let result;\n if ((typeof ArrayBuffer !== 'undefined') && (ArrayBuffer.isView)) {\n result = ArrayBuffer.isView(val);\n } else {\n result = (val) && (val.buffer) && (isArrayBuffer(val.buffer));\n }\n return result;\n}\n\n/**\n * Determine if a value is a String\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a String, otherwise false\n */\nconst isString = typeOfTest('string');\n\n/**\n * Determine if a value is a Function\n *\n * @param {*} val The value to test\n * @returns {boolean} True if value is a Function, otherwise false\n */\nconst isFunction = typeOfTest('function');\n\n/**\n * Determine if a value is a Number\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a Number, otherwise false\n */\nconst isNumber = typeOfTest('number');\n\n/**\n * Determine if a value is an Object\n *\n * @param {*} thing The value to test\n *\n * @returns {boolean} True if value is an Object, otherwise false\n */\nconst isObject = (thing) => thing !== null && typeof thing === 'object';\n\n/**\n * Determine if a value is a Boolean\n *\n * @param {*} thing The value to test\n * @returns {boolean} True if value is a Boolean, otherwise false\n */\nconst isBoolean = thing => thing === true || thing === false;\n\n/**\n * Determine if a value is a plain Object\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a plain Object, otherwise false\n */\nconst isPlainObject = (val) => {\n if (kindOf(val) !== 'object') {\n return false;\n }\n\n const prototype = getPrototypeOf(val);\n return (prototype === null || prototype === Object.prototype || Object.getPrototypeOf(prototype) === null) && !(toStringTag in val) && !(iterator in val);\n}\n\n/**\n * Determine if a value is a Date\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a Date, otherwise false\n */\nconst isDate = kindOfTest('Date');\n\n/**\n * Determine if a value is a File\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a File, otherwise false\n */\nconst isFile = kindOfTest('File');\n\n/**\n * Determine if a value is a Blob\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a Blob, otherwise false\n */\nconst isBlob = kindOfTest('Blob');\n\n/**\n * Determine if a value is a FileList\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a File, otherwise false\n */\nconst isFileList = kindOfTest('FileList');\n\n/**\n * Determine if a value is a Stream\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a Stream, otherwise false\n */\nconst isStream = (val) => isObject(val) && isFunction(val.pipe);\n\n/**\n * Determine if a value is a FormData\n *\n * @param {*} thing The value to test\n *\n * @returns {boolean} True if value is an FormData, otherwise false\n */\nconst isFormData = (thing) => {\n let kind;\n return thing && (\n (typeof FormData === 'function' && thing instanceof FormData) || (\n isFunction(thing.append) && (\n (kind = kindOf(thing)) === 'formdata' ||\n // detect form-data instance\n (kind === 'object' && isFunction(thing.toString) && thing.toString() === '[object FormData]')\n )\n )\n )\n}\n\n/**\n * Determine if a value is a URLSearchParams object\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a URLSearchParams object, otherwise false\n */\nconst isURLSearchParams = kindOfTest('URLSearchParams');\n\nconst [isReadableStream, isRequest, isResponse, isHeaders] = ['ReadableStream', 'Request', 'Response', 'Headers'].map(kindOfTest);\n\n/**\n * Trim excess whitespace off the beginning and end of a string\n *\n * @param {String} str The String to trim\n *\n * @returns {String} The String freed of excess whitespace\n */\nconst trim = (str) => str.trim ?\n str.trim() : str.replace(/^[\\s\\uFEFF\\xA0]+|[\\s\\uFEFF\\xA0]+$/g, '');\n\n/**\n * Iterate over an Array or an Object invoking a function for each item.\n *\n * If `obj` is an Array callback will be called passing\n * the value, index, and complete array for each item.\n *\n * If 'obj' is an Object callback will be called passing\n * the value, key, and complete object for each property.\n *\n * @param {Object|Array} obj The object to iterate\n * @param {Function} fn The callback to invoke for each item\n *\n * @param {Boolean} [allOwnKeys = false]\n * @returns {any}\n */\nfunction forEach(obj, fn, {allOwnKeys = false} = {}) {\n // Don't bother if no value provided\n if (obj === null || typeof obj === 'undefined') {\n return;\n }\n\n let i;\n let l;\n\n // Force an array if not already something iterable\n if (typeof obj !== 'object') {\n /*eslint no-param-reassign:0*/\n obj = [obj];\n }\n\n if (isArray(obj)) {\n // Iterate over array values\n for (i = 0, l = obj.length; i < l; i++) {\n fn.call(null, obj[i], i, obj);\n }\n } else {\n // Iterate over object keys\n const keys = allOwnKeys ? Object.getOwnPropertyNames(obj) : Object.keys(obj);\n const len = keys.length;\n let key;\n\n for (i = 0; i < len; i++) {\n key = keys[i];\n fn.call(null, obj[key], key, obj);\n }\n }\n}\n\nfunction findKey(obj, key) {\n key = key.toLowerCase();\n const keys = Object.keys(obj);\n let i = keys.length;\n let _key;\n while (i-- > 0) {\n _key = keys[i];\n if (key === _key.toLowerCase()) {\n return _key;\n }\n }\n return null;\n}\n\nconst _global = (() => {\n /*eslint no-undef:0*/\n if (typeof globalThis !== \"undefined\") return globalThis;\n return typeof self !== \"undefined\" ? self : (typeof window !== 'undefined' ? window : global)\n})();\n\nconst isContextDefined = (context) => !isUndefined(context) && context !== _global;\n\n/**\n * Accepts varargs expecting each argument to be an object, then\n * immutably merges the properties of each object and returns result.\n *\n * When multiple objects contain the same key the later object in\n * the arguments list will take precedence.\n *\n * Example:\n *\n * ```js\n * var result = merge({foo: 123}, {foo: 456});\n * console.log(result.foo); // outputs 456\n * ```\n *\n * @param {Object} obj1 Object to merge\n *\n * @returns {Object} Result of all merge properties\n */\nfunction merge(/* obj1, obj2, obj3, ... */) {\n const {caseless} = isContextDefined(this) && this || {};\n const result = {};\n const assignValue = (val, key) => {\n const targetKey = caseless && findKey(result, key) || key;\n if (isPlainObject(result[targetKey]) && isPlainObject(val)) {\n result[targetKey] = merge(result[targetKey], val);\n } else if (isPlainObject(val)) {\n result[targetKey] = merge({}, val);\n } else if (isArray(val)) {\n result[targetKey] = val.slice();\n } else {\n result[targetKey] = val;\n }\n }\n\n for (let i = 0, l = arguments.length; i < l; i++) {\n arguments[i] && forEach(arguments[i], assignValue);\n }\n return result;\n}\n\n/**\n * Extends object a by mutably adding to it the properties of object b.\n *\n * @param {Object} a The object to be extended\n * @param {Object} b The object to copy properties from\n * @param {Object} thisArg The object to bind function to\n *\n * @param {Boolean} [allOwnKeys]\n * @returns {Object} The resulting value of object a\n */\nconst extend = (a, b, thisArg, {allOwnKeys}= {}) => {\n forEach(b, (val, key) => {\n if (thisArg && isFunction(val)) {\n a[key] = bind(val, thisArg);\n } else {\n a[key] = val;\n }\n }, {allOwnKeys});\n return a;\n}\n\n/**\n * Remove byte order marker. This catches EF BB BF (the UTF-8 BOM)\n *\n * @param {string} content with BOM\n *\n * @returns {string} content value without BOM\n */\nconst stripBOM = (content) => {\n if (content.charCodeAt(0) === 0xFEFF) {\n content = content.slice(1);\n }\n return content;\n}\n\n/**\n * Inherit the prototype methods from one constructor into another\n * @param {function} constructor\n * @param {function} superConstructor\n * @param {object} [props]\n * @param {object} [descriptors]\n *\n * @returns {void}\n */\nconst inherits = (constructor, superConstructor, props, descriptors) => {\n constructor.prototype = Object.create(superConstructor.prototype, descriptors);\n constructor.prototype.constructor = constructor;\n Object.defineProperty(constructor, 'super', {\n value: superConstructor.prototype\n });\n props && Object.assign(constructor.prototype, props);\n}\n\n/**\n * Resolve object with deep prototype chain to a flat object\n * @param {Object} sourceObj source object\n * @param {Object} [destObj]\n * @param {Function|Boolean} [filter]\n * @param {Function} [propFilter]\n *\n * @returns {Object}\n */\nconst toFlatObject = (sourceObj, destObj, filter, propFilter) => {\n let props;\n let i;\n let prop;\n const merged = {};\n\n destObj = destObj || {};\n // eslint-disable-next-line no-eq-null,eqeqeq\n if (sourceObj == null) return destObj;\n\n do {\n props = Object.getOwnPropertyNames(sourceObj);\n i = props.length;\n while (i-- > 0) {\n prop = props[i];\n if ((!propFilter || propFilter(prop, sourceObj, destObj)) && !merged[prop]) {\n destObj[prop] = sourceObj[prop];\n merged[prop] = true;\n }\n }\n sourceObj = filter !== false && getPrototypeOf(sourceObj);\n } while (sourceObj && (!filter || filter(sourceObj, destObj)) && sourceObj !== Object.prototype);\n\n return destObj;\n}\n\n/**\n * Determines whether a string ends with the characters of a specified string\n *\n * @param {String} str\n * @param {String} searchString\n * @param {Number} [position= 0]\n *\n * @returns {boolean}\n */\nconst endsWith = (str, searchString, position) => {\n str = String(str);\n if (position === undefined || position > str.length) {\n position = str.length;\n }\n position -= searchString.length;\n const lastIndex = str.indexOf(searchString, position);\n return lastIndex !== -1 && lastIndex === position;\n}\n\n\n/**\n * Returns new array from array like object or null if failed\n *\n * @param {*} [thing]\n *\n * @returns {?Array}\n */\nconst toArray = (thing) => {\n if (!thing) return null;\n if (isArray(thing)) return thing;\n let i = thing.length;\n if (!isNumber(i)) return null;\n const arr = new Array(i);\n while (i-- > 0) {\n arr[i] = thing[i];\n }\n return arr;\n}\n\n/**\n * Checking if the Uint8Array exists and if it does, it returns a function that checks if the\n * thing passed in is an instance of Uint8Array\n *\n * @param {TypedArray}\n *\n * @returns {Array}\n */\n// eslint-disable-next-line func-names\nconst isTypedArray = (TypedArray => {\n // eslint-disable-next-line func-names\n return thing => {\n return TypedArray && thing instanceof TypedArray;\n };\n})(typeof Uint8Array !== 'undefined' && getPrototypeOf(Uint8Array));\n\n/**\n * For each entry in the object, call the function with the key and value.\n *\n * @param {Object<any, any>} obj - The object to iterate over.\n * @param {Function} fn - The function to call for each entry.\n *\n * @returns {void}\n */\nconst forEachEntry = (obj, fn) => {\n const generator = obj && obj[iterator];\n\n const _iterator = generator.call(obj);\n\n let result;\n\n while ((result = _iterator.next()) && !result.done) {\n const pair = result.value;\n fn.call(obj, pair[0], pair[1]);\n }\n}\n\n/**\n * It takes a regular expression and a string, and returns an array of all the matches\n *\n * @param {string} regExp - The regular expression to match against.\n * @param {string} str - The string to search.\n *\n * @returns {Array<boolean>}\n */\nconst matchAll = (regExp, str) => {\n let matches;\n const arr = [];\n\n while ((matches = regExp.exec(str)) !== null) {\n arr.push(matches);\n }\n\n return arr;\n}\n\n/* Checking if the kindOfTest function returns true when passed an HTMLFormElement. */\nconst isHTMLForm = kindOfTest('HTMLFormElement');\n\nconst toCamelCase = str => {\n return str.toLowerCase().replace(/[-_\\s]([a-z\\d])(\\w*)/g,\n function replacer(m, p1, p2) {\n return p1.toUpperCase() + p2;\n }\n );\n};\n\n/* Creating a function that will check if an object has a property. */\nconst hasOwnProperty = (({hasOwnProperty}) => (obj, prop) => hasOwnProperty.call(obj, prop))(Object.prototype);\n\n/**\n * Determine if a value is a RegExp object\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a RegExp object, otherwise false\n */\nconst isRegExp = kindOfTest('RegExp');\n\nconst reduceDescriptors = (obj, reducer) => {\n const descriptors = Object.getOwnPropertyDescriptors(obj);\n const reducedDescriptors = {};\n\n forEach(descriptors, (descriptor, name) => {\n let ret;\n if ((ret = reducer(descriptor, name, obj)) !== false) {\n reducedDescriptors[name] = ret || descriptor;\n }\n });\n\n Object.defineProperties(obj, reducedDescriptors);\n}\n\n/**\n * Makes all methods read-only\n * @param {Object} obj\n */\n\nconst freezeMethods = (obj) => {\n reduceDescriptors(obj, (descriptor, name) => {\n // skip restricted props in strict mode\n if (isFunction(obj) && ['arguments', 'caller', 'callee'].indexOf(name) !== -1) {\n return false;\n }\n\n const value = obj[name];\n\n if (!isFunction(value)) return;\n\n descriptor.enumerable = false;\n\n if ('writable' in descriptor) {\n descriptor.writable = false;\n return;\n }\n\n if (!descriptor.set) {\n descriptor.set = () => {\n throw Error('Can not rewrite read-only method \\'' + name + '\\'');\n };\n }\n });\n}\n\nconst toObjectSet = (arrayOrString, delimiter) => {\n const obj = {};\n\n const define = (arr) => {\n arr.forEach(value => {\n obj[value] = true;\n });\n }\n\n isArray(arrayOrString) ? define(arrayOrString) : define(String(arrayOrString).split(delimiter));\n\n return obj;\n}\n\nconst noop = () => {}\n\nconst toFiniteNumber = (value, defaultValue) => {\n return value != null && Number.isFinite(value = +value) ? value : defaultValue;\n}\n\n/**\n * If the thing is a FormData object, return true, otherwise return false.\n *\n * @param {unknown} thing - The thing to check.\n *\n * @returns {boolean}\n */\nfunction isSpecCompliantForm(thing) {\n return !!(thing && isFunction(thing.append) && thing[toStringTag] === 'FormData' && thing[iterator]);\n}\n\nconst toJSONObject = (obj) => {\n const stack = new Array(10);\n\n const visit = (source, i) => {\n\n if (isObject(source)) {\n if (stack.indexOf(source) >= 0) {\n return;\n }\n\n if(!('toJSON' in source)) {\n stack[i] = source;\n const target = isArray(source) ? [] : {};\n\n forEach(source, (value, key) => {\n const reducedValue = visit(value, i + 1);\n !isUndefined(reducedValue) && (target[key] = reducedValue);\n });\n\n stack[i] = undefined;\n\n return target;\n }\n }\n\n return source;\n }\n\n return visit(obj, 0);\n}\n\nconst isAsyncFn = kindOfTest('AsyncFunction');\n\nconst isThenable = (thing) =>\n thing && (isObject(thing) || isFunction(thing)) && isFunction(thing.then) && isFunction(thing.catch);\n\n// original code\n// https://github.com/DigitalBrainJS/AxiosPromise/blob/16deab13710ec09779922131f3fa5954320f83ab/lib/utils.js#L11-L34\n\nconst _setImmediate = ((setImmediateSupported, postMessageSupported) => {\n if (setImmediateSupported) {\n return setImmediate;\n }\n\n return postMessageSupported ? ((token, callbacks) => {\n _global.addEventListener(\"message\", ({source, data}) => {\n if (source === _global && data === token) {\n callbacks.length && callbacks.shift()();\n }\n }, false);\n\n return (cb) => {\n callbacks.push(cb);\n _global.postMessage(token, \"*\");\n }\n })(`axios@${Math.random()}`, []) : (cb) => setTimeout(cb);\n})(\n typeof setImmediate === 'function',\n isFunction(_global.postMessage)\n);\n\nconst asap = typeof queueMicrotask !== 'undefined' ?\n queueMicrotask.bind(_global) : ( typeof process !== 'undefined' && process.nextTick || _setImmediate);\n\n// *********************\n\n\nconst isIterable = (thing) => thing != null && isFunction(thing[iterator]);\n\n\nexport default {\n isArray,\n isArrayBuffer,\n isBuffer,\n isFormData,\n isArrayBufferView,\n isString,\n isNumber,\n isBoolean,\n isObject,\n isPlainObject,\n isReadableStream,\n isRequest,\n isResponse,\n isHeaders,\n isUndefined,\n isDate,\n isFile,\n isBlob,\n isRegExp,\n isFunction,\n isStream,\n isURLSearchParams,\n isTypedArray,\n isFileList,\n forEach,\n merge,\n extend,\n trim,\n stripBOM,\n inherits,\n toFlatObject,\n kindOf,\n kindOfTest,\n endsWith,\n toArray,\n forEachEntry,\n matchAll,\n isHTMLForm,\n hasOwnProperty,\n hasOwnProp: hasOwnProperty, // an alias to avoid ESLint no-prototype-builtins detection\n reduceDescriptors,\n freezeMethods,\n toObjectSet,\n toCamelCase,\n noop,\n toFiniteNumber,\n findKey,\n global: _global,\n isContextDefined,\n isSpecCompliantForm,\n toJSONObject,\n isAsyncFn,\n isThenable,\n setImmediate: _setImmediate,\n asap,\n isIterable\n};\n","'use strict';\n\nimport utils from '../utils.js';\n\n/**\n * Create an Error with the specified message, config, error code, request and response.\n *\n * @param {string} message The error message.\n * @param {string} [code] The error code (for example, 'ECONNABORTED').\n * @param {Object} [config] The config.\n * @param {Object} [request] The request.\n * @param {Object} [response] The response.\n *\n * @returns {Error} The created error.\n */\nfunction AxiosError(message, code, config, request, response) {\n Error.call(this);\n\n if (Error.captureStackTrace) {\n Error.captureStackTrace(this, this.constructor);\n } else {\n this.stack = (new Error()).stack;\n }\n\n this.message = message;\n this.name = 'AxiosError';\n code && (this.code = code);\n config && (this.config = config);\n request && (this.request = request);\n if (response) {\n this.response = response;\n this.status = response.status ? response.status : null;\n }\n}\n\nutils.inherits(AxiosError, Error, {\n toJSON: function toJSON() {\n return {\n // Standard\n message: this.message,\n name: this.name,\n // Microsoft\n description: this.description,\n number: this.number,\n // Mozilla\n fileName: this.fileName,\n lineNumber: this.lineNumber,\n columnNumber: this.columnNumber,\n stack: this.stack,\n // Axios\n config: utils.toJSONObject(this.config),\n code: this.code,\n status: this.status\n };\n }\n});\n\nconst prototype = AxiosError.prototype;\nconst descriptors = {};\n\n[\n 'ERR_BAD_OPTION_VALUE',\n 'ERR_BAD_OPTION',\n 'ECONNABORTED',\n 'ETIMEDOUT',\n 'ERR_NETWORK',\n 'ERR_FR_TOO_MANY_REDIRECTS',\n 'ERR_DEPRECATED',\n 'ERR_BAD_RESPONSE',\n 'ERR_BAD_REQUEST',\n 'ERR_CANCELED',\n 'ERR_NOT_SUPPORT',\n 'ERR_INVALID_URL'\n// eslint-disable-next-line func-names\n].forEach(code => {\n descriptors[code] = {value: code};\n});\n\nObject.defineProperties(AxiosError, descriptors);\nObject.defineProperty(prototype, 'isAxiosError', {value: true});\n\n// eslint-disable-next-line func-names\nAxiosError.from = (error, code, config, request, response, customProps) => {\n const axiosError = Object.create(prototype);\n\n utils.toFlatObject(error, axiosError, function filter(obj) {\n return obj !== Error.prototype;\n }, prop => {\n return prop !== 'isAxiosError';\n });\n\n AxiosError.call(axiosError, error.message, code, config, request, response);\n\n axiosError.cause = error;\n\n axiosError.name = error.name;\n\n customProps && Object.assign(axiosError, customProps);\n\n return axiosError;\n};\n\nexport default AxiosError;\n","'use strict';\n\nimport utils from '../utils.js';\nimport AxiosError from '../core/AxiosError.js';\n// temporary hotfix to avoid circular references until AxiosURLSearchParams is refactored\nimport PlatformFormData from '../platform/node/classes/FormData.js';\n\n/**\n * Determines if the given thing is a array or js object.\n *\n * @param {string} thing - The object or array to be visited.\n *\n * @returns {boolean}\n */\nfunction isVisitable(thing) {\n return utils.isPlainObject(thing) || utils.isArray(thing);\n}\n\n/**\n * It removes the brackets from the end of a string\n *\n * @param {string} key - The key of the parameter.\n *\n * @returns {string} the key without the brackets.\n */\nfunction removeBrackets(key) {\n return utils.endsWith(key, '[]') ? key.slice(0, -2) : key;\n}\n\n/**\n * It takes a path, a key, and a boolean, and returns a string\n *\n * @param {string} path - The path to the current key.\n * @param {string} key - The key of the current object being iterated over.\n * @param {string} dots - If true, the key will be rendered with dots instead of brackets.\n *\n * @returns {string} The path to the current key.\n */\nfunction renderKey(path, key, dots) {\n if (!path) return key;\n return path.concat(key).map(function each(token, i) {\n // eslint-disable-next-line no-param-reassign\n token = removeBrackets(token);\n return !dots && i ? '[' + token + ']' : token;\n }).join(dots ? '.' : '');\n}\n\n/**\n * If the array is an array and none of its elements are visitable, then it's a flat array.\n *\n * @param {Array<any>} arr - The array to check\n *\n * @returns {boolean}\n */\nfunction isFlatArray(arr) {\n return utils.isArray(arr) && !arr.some(isVisitable);\n}\n\nconst predicates = utils.toFlatObject(utils, {}, null, function filter(prop) {\n return /^is[A-Z]/.test(prop);\n});\n\n/**\n * Convert a data object to FormData\n *\n * @param {Object} obj\n * @param {?Object} [formData]\n * @param {?Object} [options]\n * @param {Function} [options.visitor]\n * @param {Boolean} [options.metaTokens = true]\n * @param {Boolean} [options.dots = false]\n * @param {?Boolean} [options.indexes = false]\n *\n * @returns {Object}\n **/\n\n/**\n * It converts an object into a FormData object\n *\n * @param {Object<any, any>} obj - The object to convert to form data.\n * @param {string} formData - The FormData object to append to.\n * @param {Object<string, any>} options\n *\n * @returns\n */\nfunction toFormData(obj, formData, options) {\n if (!utils.isObject(obj)) {\n throw new TypeError('target must be an object');\n }\n\n // eslint-disable-next-line no-param-reassign\n formData = formData || new (PlatformFormData || FormData)();\n\n // eslint-disable-next-line no-param-reassign\n options = utils.toFlatObject(options, {\n metaTokens: true,\n dots: false,\n indexes: false\n }, false, function defined(option, source) {\n // eslint-disable-next-line no-eq-null,eqeqeq\n return !utils.isUndefined(source[option]);\n });\n\n const metaTokens = options.metaTokens;\n // eslint-disable-next-line no-use-before-define\n const visitor = options.visitor || defaultVisitor;\n const dots = options.dots;\n const indexes = options.indexes;\n const _Blob = options.Blob || typeof Blob !== 'undefined' && Blob;\n const useBlob = _Blob && utils.isSpecCompliantForm(formData);\n\n if (!utils.isFunction(visitor)) {\n throw new TypeError('visitor must be a function');\n }\n\n function convertValue(value) {\n if (value === null) return '';\n\n if (utils.isDate(value)) {\n return value.toISOString();\n }\n\n if (utils.isBoolean(value)) {\n return value.toString();\n }\n\n if (!useBlob && utils.isBlob(value)) {\n throw new AxiosError('Blob is not supported. Use a Buffer instead.');\n }\n\n if (utils.isArrayBuffer(value) || utils.isTypedArray(value)) {\n return useBlob && typeof Blob === 'function' ? new Blob([value]) : Buffer.from(value);\n }\n\n return value;\n }\n\n /**\n * Default visitor.\n *\n * @param {*} value\n * @param {String|Number} key\n * @param {Array<String|Number>} path\n * @this {FormData}\n *\n * @returns {boolean} return true to visit the each prop of the value recursively\n */\n function defaultVisitor(value, key, path) {\n let arr = value;\n\n if (value && !path && typeof value === 'object') {\n if (utils.endsWith(key, '{}')) {\n // eslint-disable-next-line no-param-reassign\n key = metaTokens ? key : key.slice(0, -2);\n // eslint-disable-next-line no-param-reassign\n value = JSON.stringify(value);\n } else if (\n (utils.isArray(value) && isFlatArray(value)) ||\n ((utils.isFileList(value) || utils.endsWith(key, '[]')) && (arr = utils.toArray(value))\n )) {\n // eslint-disable-next-line no-param-reassign\n key = removeBrackets(key);\n\n arr.forEach(function each(el, index) {\n !(utils.isUndefined(el) || el === null) && formData.append(\n // eslint-disable-next-line no-nested-ternary\n indexes === true ? renderKey([key], index, dots) : (indexes === null ? key : key + '[]'),\n convertValue(el)\n );\n });\n return false;\n }\n }\n\n if (isVisitable(value)) {\n return true;\n }\n\n formData.append(renderKey(path, key, dots), convertValue(value));\n\n return false;\n }\n\n const stack = [];\n\n const exposedHelpers = Object.assign(predicates, {\n defaultVisitor,\n convertValue,\n isVisitable\n });\n\n function build(value, path) {\n if (utils.isUndefined(value)) return;\n\n if (stack.indexOf(value) !== -1) {\n throw Error('Circular reference detected in ' + path.join('.'));\n }\n\n stack.push(value);\n\n utils.forEach(value, function each(el, key) {\n const result = !(utils.isUndefined(el) || el === null) && visitor.call(\n formData, el, utils.isString(key) ? key.trim() : key, path, exposedHelpers\n );\n\n if (result === true) {\n build(el, path ? path.concat(key) : [key]);\n }\n });\n\n stack.pop();\n }\n\n if (!utils.isObject(obj)) {\n throw new TypeError('data must be an object');\n }\n\n build(obj);\n\n return formData;\n}\n\nexport default toFormData;\n","'use strict';\n\nimport toFormData from './toFormData.js';\n\n/**\n * It encodes a string by replacing all characters that are not in the unreserved set with\n * their percent-encoded equivalents\n *\n * @param {string} str - The string to encode.\n *\n * @returns {string} The encoded string.\n */\nfunction encode(str) {\n const charMap = {\n '!': '%21',\n \"'\": '%27',\n '(': '%28',\n ')': '%29',\n '~': '%7E',\n '%20': '+',\n '%00': '\\x00'\n };\n return encodeURIComponent(str).replace(/[!'()~]|%20|%00/g, function replacer(match) {\n return charMap[match];\n });\n}\n\n/**\n * It takes a params object and converts it to a FormData object\n *\n * @param {Object<string, any>} params - The parameters to be converted to a FormData object.\n * @param {Object<string, any>} options - The options object passed to the Axios constructor.\n *\n * @returns {void}\n */\nfunction AxiosURLSearchParams(params, options) {\n this._pairs = [];\n\n params && toFormData(params, this, options);\n}\n\nconst prototype = AxiosURLSearchParams.prototype;\n\nprototype.append = function append(name, value) {\n this._pairs.push([name, value]);\n};\n\nprototype.toString = function toString(encoder) {\n const _encode = encoder ? function(value) {\n return encoder.call(this, value, encode);\n } : encode;\n\n return this._pairs.map(function each(pair) {\n return _encode(pair[0]) + '=' + _encode(pair[1]);\n }, '').join('&');\n};\n\nexport default AxiosURLSearchParams;\n","'use strict';\n\nimport utils from '../utils.js';\nimport AxiosURLSearchParams from '../helpers/AxiosURLSearchParams.js';\n\n/**\n * It replaces all instances of the characters `:`, `$`, `,`, `+`, `[`, and `]` with their\n * URI encoded counterparts\n *\n * @param {string} val The value to be encoded.\n *\n * @returns {string} The encoded value.\n */\nfunction encode(val) {\n return encodeURIComponent(val).\n replace(/%3A/gi, ':').\n replace(/%24/g, '$').\n replace(/%2C/gi, ',').\n replace(/%20/g, '+').\n replace(/%5B/gi, '[').\n replace(/%5D/gi, ']');\n}\n\n/**\n * Build a URL by appending params to the end\n *\n * @param {string} url The base of the url (e.g., http://www.google.com)\n * @param {object} [params] The params to be appended\n * @param {?(object|Function)} options\n *\n * @returns {string} The formatted url\n */\nexport default function buildURL(url, params, options) {\n /*eslint no-param-reassign:0*/\n if (!params) {\n return url;\n }\n \n const _encode = options && options.encode || encode;\n\n if (utils.isFunction(options)) {\n options = {\n serialize: options\n };\n } \n\n const serializeFn = options && options.serialize;\n\n let serializedParams;\n\n if (serializeFn) {\n serializedParams = serializeFn(params, options);\n } else {\n serializedParams = utils.isURLSearchParams(params) ?\n params.toString() :\n new AxiosURLSearchParams(params, options).toString(_encode);\n }\n\n if (serializedParams) {\n const hashmarkIndex = url.indexOf(\"#\");\n\n if (hashmarkIndex !== -1) {\n url = url.slice(0, hashmarkIndex);\n }\n url += (url.indexOf('?') === -1 ? '?' : '&') + serializedParams;\n }\n\n return url;\n}\n","'use strict';\n\nimport utils from './../utils.js';\n\nclass InterceptorManager {\n constructor() {\n this.handlers = [];\n }\n\n /**\n * Add a new interceptor to the stack\n *\n * @param {Function} fulfilled The function to handle `then` for a `Promise`\n * @param {Function} rejected The function to handle `reject` for a `Promise`\n *\n * @return {Number} An ID used to remove interceptor later\n */\n use(fulfilled, rejected, options) {\n this.handlers.push({\n fulfilled,\n rejected,\n synchronous: options ? options.synchronous : false,\n runWhen: options ? options.runWhen : null\n });\n return this.handlers.length - 1;\n }\n\n /**\n * Remove an interceptor from the stack\n *\n * @param {Number} id The ID that was returned by `use`\n *\n * @returns {Boolean} `true` if the interceptor was removed, `false` otherwise\n */\n eject(id) {\n if (this.handlers[id]) {\n this.handlers[id] = null;\n }\n }\n\n /**\n * Clear all interceptors from the stack\n *\n * @returns {void}\n */\n clear() {\n if (this.handlers) {\n this.handlers = [];\n }\n }\n\n /**\n * Iterate over all the registered interceptors\n *\n * This method is particularly useful for skipping over any\n * interceptors that may have become `null` calling `eject`.\n *\n * @param {Function} fn The function to call for each interceptor\n *\n * @returns {void}\n */\n forEach(fn) {\n utils.forEach(this.handlers, function forEachHandler(h) {\n if (h !== null) {\n fn(h);\n }\n });\n }\n}\n\nexport default InterceptorManager;\n","'use strict';\n\nexport default {\n silentJSONParsing: true,\n forcedJSONParsing: true,\n clarifyTimeoutError: false\n};\n","import URLSearchParams from './classes/URLSearchParams.js'\nimport FormData from './classes/FormData.js'\nimport Blob from './classes/Blob.js'\n\nexport default {\n isBrowser: true,\n classes: {\n URLSearchParams,\n FormData,\n Blob\n },\n protocols: ['http', 'https', 'file', 'blob', 'url', 'data']\n};\n","'use strict';\n\nimport AxiosURLSearchParams from '../../../helpers/AxiosURLSearchParams.js';\nexport default typeof URLSearchParams !== 'undefined' ? URLSearchParams : AxiosURLSearchParams;\n","'use strict';\n\nexport default typeof FormData !== 'undefined' ? FormData : null;\n","'use strict'\n\nexport default typeof Blob !== 'undefined' ? Blob : null\n","const hasBrowserEnv = typeof window !== 'undefined' && typeof document !== 'undefined';\n\nconst _navigator = typeof navigator === 'object' && navigator || undefined;\n\n/**\n * Determine if we're running in a standard browser environment\n *\n * This allows axios to run in a web worker, and react-native.\n * Both environments support XMLHttpRequest, but not fully standard globals.\n *\n * web workers:\n * typeof window -> undefined\n * typeof document -> undefined\n *\n * react-native:\n * navigator.product -> 'ReactNative'\n * nativescript\n * navigator.product -> 'NativeScript' or 'NS'\n *\n * @returns {boolean}\n */\nconst hasStandardBrowserEnv = hasBrowserEnv &&\n (!_navigator || ['ReactNative', 'NativeScript', 'NS'].indexOf(_navigator.product) < 0);\n\n/**\n * Determine if we're running in a standard browser webWorker environment\n *\n * Although the `isStandardBrowserEnv` method indicates that\n * `allows axios to run in a web worker`, the WebWorker will still be\n * filtered out due to its judgment standard\n * `typeof window !== 'undefined' && typeof document !== 'undefined'`.\n * This leads to a problem when axios post `FormData` in webWorker\n */\nconst hasStandardBrowserWebWorkerEnv = (() => {\n return (\n typeof WorkerGlobalScope !== 'undefined' &&\n // eslint-disable-next-line no-undef\n self instanceof WorkerGlobalScope &&\n typeof self.importScripts === 'function'\n );\n})();\n\nconst origin = hasBrowserEnv && window.location.href || 'http://localhost';\n\nexport {\n hasBrowserEnv,\n hasStandardBrowserWebWorkerEnv,\n hasStandardBrowserEnv,\n _navigator as navigator,\n origin\n}\n","import platform from './node/index.js';\nimport * as utils from './common/utils.js';\n\nexport default {\n ...utils,\n ...platform\n}\n","'use strict';\n\nimport utils from '../utils.js';\n\n/**\n * It takes a string like `foo[x][y][z]` and returns an array like `['foo', 'x', 'y', 'z']\n *\n * @param {string} name - The name of the property to get.\n *\n * @returns An array of strings.\n */\nfunction parsePropPath(name) {\n // foo[x][y][z]\n // foo.x.y.z\n // foo-x-y-z\n // foo x y z\n return utils.matchAll(/\\w+|\\[(\\w*)]/g, name).map(match => {\n return match[0] === '[]' ? '' : match[1] || match[0];\n });\n}\n\n/**\n * Convert an array to an object.\n *\n * @param {Array<any>} arr - The array to convert to an object.\n *\n * @returns An object with the same keys and values as the array.\n */\nfunction arrayToObject(arr) {\n const obj = {};\n const keys = Object.keys(arr);\n let i;\n const len = keys.length;\n let key;\n for (i = 0; i < len; i++) {\n key = keys[i];\n obj[key] = arr[key];\n }\n return obj;\n}\n\n/**\n * It takes a FormData object and returns a JavaScript object\n *\n * @param {string} formData The FormData object to convert to JSON.\n *\n * @returns {Object<string, any> | null} The converted object.\n */\nfunction formDataToJSON(formData) {\n function buildPath(path, value, target, index) {\n let name = path[index++];\n\n if (name === '__proto__') return true;\n\n const isNumericKey = Number.isFinite(+name);\n const isLast = index >= path.length;\n name = !name && utils.isArray(target) ? target.length : name;\n\n if (isLast) {\n if (utils.hasOwnProp(target, name)) {\n target[name] = [target[name], value];\n } else {\n target[name] = value;\n }\n\n return !isNumericKey;\n }\n\n if (!target[name] || !utils.isObject(target[name])) {\n target[name] = [];\n }\n\n const result = buildPath(path, value, target[name], index);\n\n if (result && utils.isArray(target[name])) {\n target[name] = arrayToObject(target[name]);\n }\n\n return !isNumericKey;\n }\n\n if (utils.isFormData(formData) && utils.isFunction(formData.entries)) {\n const obj = {};\n\n utils.forEachEntry(formData, (name, value) => {\n buildPath(parsePropPath(name), value, obj, 0);\n });\n\n return obj;\n }\n\n return null;\n}\n\nexport default formDataToJSON;\n","'use strict';\n\nimport utils from '../utils.js';\nimport AxiosError from '../core/AxiosError.js';\nimport transitionalDefaults from './transitional.js';\nimport toFormData from '../helpers/toFormData.js';\nimport toURLEncodedForm from '../helpers/toURLEncodedForm.js';\nimport platform from '../platform/index.js';\nimport formDataToJSON from '../helpers/formDataToJSON.js';\n\n/**\n * It takes a string, tries to parse it, and if it fails, it returns the stringified version\n * of the input\n *\n * @param {any} rawValue - The value to be stringified.\n * @param {Function} parser - A function that parses a string into a JavaScript object.\n * @param {Function} encoder - A function that takes a value and returns a string.\n *\n * @returns {string} A stringified version of the rawValue.\n */\nfunction stringifySafely(rawValue, parser, encoder) {\n if (utils.isString(rawValue)) {\n try {\n (parser || JSON.parse)(rawValue);\n return utils.trim(rawValue);\n } catch (e) {\n if (e.name !== 'SyntaxError') {\n throw e;\n }\n }\n }\n\n return (encoder || JSON.stringify)(rawValue);\n}\n\nconst defaults = {\n\n transitional: transitionalDefaults,\n\n adapter: ['xhr', 'http', 'fetch'],\n\n transformRequest: [function transformRequest(data, headers) {\n const contentType = headers.getContentType() || '';\n const hasJSONContentType = contentType.indexOf('application/json') > -1;\n const isObjectPayload = utils.isObject(data);\n\n if (isObjectPayload && utils.isHTMLForm(data)) {\n data = new FormData(data);\n }\n\n const isFormData = utils.isFormData(data);\n\n if (isFormData) {\n return hasJSONContentType ? JSON.stringify(formDataToJSON(data)) : data;\n }\n\n if (utils.isArrayBuffer(data) ||\n utils.isBuffer(data) ||\n utils.isStream(data) ||\n utils.isFile(data) ||\n utils.isBlob(data) ||\n utils.isReadableStream(data)\n ) {\n return data;\n }\n if (utils.isArrayBufferView(data)) {\n return data.buffer;\n }\n if (utils.isURLSearchParams(data)) {\n headers.setContentType('application/x-www-form-urlencoded;charset=utf-8', false);\n return data.toString();\n }\n\n let isFileList;\n\n if (isObjectPayload) {\n if (contentType.indexOf('application/x-www-form-urlencoded') > -1) {\n return toURLEncodedForm(data, this.formSerializer).toString();\n }\n\n if ((isFileList = utils.isFileList(data)) || contentType.indexOf('multipart/form-data') > -1) {\n const _FormData = this.env && this.env.FormData;\n\n return toFormData(\n isFileList ? {'files[]': data} : data,\n _FormData && new _FormData(),\n this.formSerializer\n );\n }\n }\n\n if (isObjectPayload || hasJSONContentType ) {\n headers.setContentType('application/json', false);\n return stringifySafely(data);\n }\n\n return data;\n }],\n\n transformResponse: [function transformResponse(data) {\n const transitional = this.transitional || defaults.transitional;\n const forcedJSONParsing = transitional && transitional.forcedJSONParsing;\n const JSONRequested = this.responseType === 'json';\n\n if (utils.isResponse(data) || utils.isReadableStream(data)) {\n return data;\n }\n\n if (data && utils.isString(data) && ((forcedJSONParsing && !this.responseType) || JSONRequested)) {\n const silentJSONParsing = transitional && transitional.silentJSONParsing;\n const strictJSONParsing = !silentJSONParsing && JSONRequested;\n\n try {\n return JSON.parse(data);\n } catch (e) {\n if (strictJSONParsing) {\n if (e.name === 'SyntaxError') {\n throw AxiosError.from(e, AxiosError.ERR_BAD_RESPONSE, this, null, this.response);\n }\n throw e;\n }\n }\n }\n\n return data;\n }],\n\n /**\n * A timeout in milliseconds to abort a request. If set to 0 (default) a\n * timeout is not created.\n */\n timeout: 0,\n\n xsrfCookieName: 'XSRF-TOKEN',\n xsrfHeaderName: 'X-XSRF-TOKEN',\n\n maxContentLength: -1,\n maxBodyLength: -1,\n\n env: {\n FormData: platform.classes.FormData,\n Blob: platform.classes.Blob\n },\n\n validateStatus: function validateStatus(status) {\n return status >= 200 && status < 300;\n },\n\n headers: {\n common: {\n 'Accept': 'application/json, text/plain, */*',\n 'Content-Type': undefined\n }\n }\n};\n\nutils.forEach(['delete', 'get', 'head', 'post', 'put', 'patch'], (method) => {\n defaults.headers[method] = {};\n});\n\nexport default defaults;\n","'use strict';\n\nimport utils from '../utils.js';\nimport toFormData from './toFormData.js';\nimport platform from '../platform/index.js';\n\nexport default function toURLEncodedForm(data, options) {\n return toFormData(data, new platform.classes.URLSearchParams(), Object.assign({\n visitor: function(value, key, path, helpers) {\n if (platform.isNode && utils.isBuffer(value)) {\n this.append(key, value.toString('base64'));\n return false;\n }\n\n return helpers.defaultVisitor.apply(this, arguments);\n }\n }, options));\n}\n","'use strict';\n\nimport utils from './../utils.js';\n\n// RawAxiosHeaders whose duplicates are ignored by node\n// c.f. https://nodejs.org/api/http.html#http_message_headers\nconst ignoreDuplicateOf = utils.toObjectSet([\n 'age', 'authorization', 'content-length', 'content-type', 'etag',\n 'expires', 'from', 'host', 'if-modified-since', 'if-unmodified-since',\n 'last-modified', 'location', 'max-forwards', 'proxy-authorization',\n 'referer', 'retry-after', 'user-agent'\n]);\n\n/**\n * Parse headers into an object\n *\n * ```\n * Date: Wed, 27 Aug 2014 08:58:49 GMT\n * Content-Type: application/json\n * Connection: keep-alive\n * Transfer-Encoding: chunked\n * ```\n *\n * @param {String} rawHeaders Headers needing to be parsed\n *\n * @returns {Object} Headers parsed into an object\n */\nexport default rawHeaders => {\n const parsed = {};\n let key;\n let val;\n let i;\n\n rawHeaders && rawHeaders.split('\\n').forEach(function parser(line) {\n i = line.indexOf(':');\n key = line.substring(0, i).trim().toLowerCase();\n val = line.substring(i + 1).trim();\n\n if (!key || (parsed[key] && ignoreDuplicateOf[key])) {\n return;\n }\n\n if (key === 'set-cookie') {\n if (parsed[key]) {\n parsed[key].push(val);\n } else {\n parsed[key] = [val];\n }\n } else {\n parsed[key] = parsed[key] ? parsed[key] + ', ' + val : val;\n }\n });\n\n return parsed;\n};\n","'use strict';\n\nimport utils from '../utils.js';\nimport parseHeaders from '../helpers/parseHeaders.js';\n\nconst $internals = Symbol('internals');\n\nfunction normalizeHeader(header) {\n return header && String(header).trim().toLowerCase();\n}\n\nfunction normalizeValue(value) {\n if (value === false || value == null) {\n return value;\n }\n\n return utils.isArray(value) ? value.map(normalizeValue) : String(value);\n}\n\nfunction parseTokens(str) {\n const tokens = Object.create(null);\n const tokensRE = /([^\\s,;=]+)\\s*(?:=\\s*([^,;]+))?/g;\n let match;\n\n while ((match = tokensRE.exec(str))) {\n tokens[match[1]] = match[2];\n }\n\n return tokens;\n}\n\nconst isValidHeaderName = (str) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(str.trim());\n\nfunction matchHeaderValue(context, value, header, filter, isHeaderNameFilter) {\n if (utils.isFunction(filter)) {\n return filter.call(this, value, header);\n }\n\n if (isHeaderNameFilter) {\n value = header;\n }\n\n if (!utils.isString(value)) return;\n\n if (utils.isString(filter)) {\n return value.indexOf(filter) !== -1;\n }\n\n if (utils.isRegExp(filter)) {\n return filter.test(value);\n }\n}\n\nfunction formatHeader(header) {\n return header.trim()\n .toLowerCase().replace(/([a-z\\d])(\\w*)/g, (w, char, str) => {\n return char.toUpperCase() + str;\n });\n}\n\nfunction buildAccessors(obj, header) {\n const accessorName = utils.toCamelCase(' ' + header);\n\n ['get', 'set', 'has'].forEach(methodName => {\n Object.defineProperty(obj, methodName + accessorName, {\n value: function(arg1, arg2, arg3) {\n return this[methodName].call(this, header, arg1, arg2, arg3);\n },\n configurable: true\n });\n });\n}\n\nclass AxiosHeaders {\n constructor(headers) {\n headers && this.set(headers);\n }\n\n set(header, valueOrRewrite, rewrite) {\n const self = this;\n\n function setHeader(_value, _header, _rewrite) {\n const lHeader = normalizeHeader(_header);\n\n if (!lHeader) {\n throw new Error('header name must be a non-empty string');\n }\n\n const key = utils.findKey(self, lHeader);\n\n if(!key || self[key] === undefined || _rewrite === true || (_rewrite === undefined && self[key] !== false)) {\n self[key || _header] = normalizeValue(_value);\n }\n }\n\n const setHeaders = (headers, _rewrite) =>\n utils.forEach(headers, (_value, _header) => setHeader(_value, _header, _rewrite));\n\n if (utils.isPlainObject(header) || header instanceof this.constructor) {\n setHeaders(header, valueOrRewrite)\n } else if(utils.isString(header) && (header = header.trim()) && !isValidHeaderName(header)) {\n setHeaders(parseHeaders(header), valueOrRewrite);\n } else if (utils.isObject(header) && utils.isIterable(header)) {\n let obj = {}, dest, key;\n for (const entry of header) {\n if (!utils.isArray(entry)) {\n throw TypeError('Object iterator must return a key-value pair');\n }\n\n obj[key = entry[0]] = (dest = obj[key]) ?\n (utils.isArray(dest) ? [...dest, entry[1]] : [dest, entry[1]]) : entry[1];\n }\n\n setHeaders(obj, valueOrRewrite)\n } else {\n header != null && setHeader(valueOrRewrite, header, rewrite);\n }\n\n return this;\n }\n\n get(header, parser) {\n header = normalizeHeader(header);\n\n if (header) {\n const key = utils.findKey(this, header);\n\n if (key) {\n const value = this[key];\n\n if (!parser) {\n return value;\n }\n\n if (parser === true) {\n return parseTokens(value);\n }\n\n if (utils.isFunction(parser)) {\n return parser.call(this, value, key);\n }\n\n if (utils.isRegExp(parser)) {\n return parser.exec(value);\n }\n\n throw new TypeError('parser must be boolean|regexp|function');\n }\n }\n }\n\n has(header, matcher) {\n header = normalizeHeader(header);\n\n if (header) {\n const key = utils.findKey(this, header);\n\n return !!(key && this[key] !== undefined && (!matcher || matchHeaderValue(this, this[key], key, matcher)));\n }\n\n return false;\n }\n\n delete(header, matcher) {\n const self = this;\n let deleted = false;\n\n function deleteHeader(_header) {\n _header = normalizeHeader(_header);\n\n if (_header) {\n const key = utils.findKey(self, _header);\n\n if (key && (!matcher || matchHeaderValue(self, self[key], key, matcher))) {\n delete self[key];\n\n deleted = true;\n }\n }\n }\n\n if (utils.isArray(header)) {\n header.forEach(deleteHeader);\n } else {\n deleteHeader(header);\n }\n\n return deleted;\n }\n\n clear(matcher) {\n const keys = Object.keys(this);\n let i = keys.length;\n let deleted = false;\n\n while (i--) {\n const key = keys[i];\n if(!matcher || matchHeaderValue(this, this[key], key, matcher, true)) {\n delete this[key];\n deleted = true;\n }\n }\n\n return deleted;\n }\n\n normalize(format) {\n const self = this;\n const headers = {};\n\n utils.forEach(this, (value, header) => {\n const key = utils.findKey(headers, header);\n\n if (key) {\n self[key] = normalizeValue(value);\n delete self[header];\n return;\n }\n\n const normalized = format ? formatHeader(header) : String(header).trim();\n\n if (normalized !== header) {\n delete self[header];\n }\n\n self[normalized] = normalizeValue(value);\n\n headers[normalized] = true;\n });\n\n return this;\n }\n\n concat(...targets) {\n return this.constructor.concat(this, ...targets);\n }\n\n toJSON(asStrings) {\n const obj = Object.create(null);\n\n utils.forEach(this, (value, header) => {\n value != null && value !== false && (obj[header] = asStrings && utils.isArray(value) ? value.join(', ') : value);\n });\n\n return obj;\n }\n\n [Symbol.iterator]() {\n return Object.entries(this.toJSON())[Symbol.iterator]();\n }\n\n toString() {\n return Object.entries(this.toJSON()).map(([header, value]) => header + ': ' + value).join('\\n');\n }\n\n getSetCookie() {\n return this.get(\"set-cookie\") || [];\n }\n\n get [Symbol.toStringTag]() {\n return 'AxiosHeaders';\n }\n\n static from(thing) {\n return thing instanceof this ? thing : new this(thing);\n }\n\n static concat(first, ...targets) {\n const computed = new this(first);\n\n targets.forEach((target) => computed.set(target));\n\n return computed;\n }\n\n static accessor(header) {\n const internals = this[$internals] = (this[$internals] = {\n accessors: {}\n });\n\n const accessors = internals.accessors;\n const prototype = this.prototype;\n\n function defineAccessor(_header) {\n const lHeader = normalizeHeader(_header);\n\n if (!accessors[lHeader]) {\n buildAccessors(prototype, _header);\n accessors[lHeader] = true;\n }\n }\n\n utils.isArray(header) ? header.forEach(defineAccessor) : defineAccessor(header);\n\n return this;\n }\n}\n\nAxiosHeaders.accessor(['Content-Type', 'Content-Length', 'Accept', 'Accept-Encoding', 'User-Agent', 'Authorization']);\n\n// reserved names hotfix\nutils.reduceDescriptors(AxiosHeaders.prototype, ({value}, key) => {\n let mapped = key[0].toUpperCase() + key.slice(1); // map `set` => `Set`\n return {\n get: () => value,\n set(headerValue) {\n this[mapped] = headerValue;\n }\n }\n});\n\nutils.freezeMethods(AxiosHeaders);\n\nexport default AxiosHeaders;\n","'use strict';\n\nimport utils from './../utils.js';\nimport defaults from '../defaults/index.js';\nimport AxiosHeaders from '../core/AxiosHeaders.js';\n\n/**\n * Transform the data for a request or a response\n *\n * @param {Array|Function} fns A single function or Array of functions\n * @param {?Object} response The response object\n *\n * @returns {*} The resulting transformed data\n */\nexport default function transformData(fns, response) {\n const config = this || defaults;\n const context = response || config;\n const headers = AxiosHeaders.from(context.headers);\n let data = context.data;\n\n utils.forEach(fns, function transform(fn) {\n data = fn.call(config, data, headers.normalize(), response ? response.status : undefined);\n });\n\n headers.normalize();\n\n return data;\n}\n","'use strict';\n\nexport default function isCancel(value) {\n return !!(value && value.__CANCEL__);\n}\n","'use strict';\n\nimport AxiosError from '../core/AxiosError.js';\nimport utils from '../utils.js';\n\n/**\n * A `CanceledError` is an object that is thrown when an operation is canceled.\n *\n * @param {string=} message The message.\n * @param {Object=} config The config.\n * @param {Object=} request The request.\n *\n * @returns {CanceledError} The created error.\n */\nfunction CanceledError(message, config, request) {\n // eslint-disable-next-line no-eq-null,eqeqeq\n AxiosError.call(this, message == null ? 'canceled' : message, AxiosError.ERR_CANCELED, config, request);\n this.name = 'CanceledError';\n}\n\nutils.inherits(CanceledError, AxiosError, {\n __CANCEL__: true\n});\n\nexport default CanceledError;\n","'use strict';\n\nimport AxiosError from './AxiosError.js';\n\n/**\n * Resolve or reject a Promise based on response status.\n *\n * @param {Function} resolve A function that resolves the promise.\n * @param {Function} reject A function that rejects the promise.\n * @param {object} response The response.\n *\n * @returns {object} The response.\n */\nexport default function settle(resolve, reject, response) {\n const validateStatus = response.config.validateStatus;\n if (!response.status || !validateStatus || validateStatus(response.status)) {\n resolve(response);\n } else {\n reject(new AxiosError(\n 'Request failed with status code ' + response.status,\n [AxiosError.ERR_BAD_REQUEST, AxiosError.ERR_BAD_RESPONSE][Math.floor(response.status / 100) - 4],\n response.config,\n response.request,\n response\n ));\n }\n}\n","'use strict';\n\n/**\n * Calculate data maxRate\n * @param {Number} [samplesCount= 10]\n * @param {Number} [min= 1000]\n * @returns {Function}\n */\nfunction speedometer(samplesCount, min) {\n samplesCount = samplesCount || 10;\n const bytes = new Array(samplesCount);\n const timestamps = new Array(samplesCount);\n let head = 0;\n let tail = 0;\n let firstSampleTS;\n\n min = min !== undefined ? min : 1000;\n\n return function push(chunkLength) {\n const now = Date.now();\n\n const startedAt = timestamps[tail];\n\n if (!firstSampleTS) {\n firstSampleTS = now;\n }\n\n bytes[head] = chunkLength;\n timestamps[head] = now;\n\n let i = tail;\n let bytesCount = 0;\n\n while (i !== head) {\n bytesCount += bytes[i++];\n i = i % samplesCount;\n }\n\n head = (head + 1) % samplesCount;\n\n if (head === tail) {\n tail = (tail + 1) % samplesCount;\n }\n\n if (now - firstSampleTS < min) {\n return;\n }\n\n const passed = startedAt && now - startedAt;\n\n return passed ? Math.round(bytesCount * 1000 / passed) : undefined;\n };\n}\n\nexport default speedometer;\n","/**\n * Throttle decorator\n * @param {Function} fn\n * @param {Number} freq\n * @return {Function}\n */\nfunction throttle(fn, freq) {\n let timestamp = 0;\n let threshold = 1000 / freq;\n let lastArgs;\n let timer;\n\n const invoke = (args, now = Date.now()) => {\n timestamp = now;\n lastArgs = null;\n if (timer) {\n clearTimeout(timer);\n timer = null;\n }\n fn.apply(null, args);\n }\n\n const throttled = (...args) => {\n const now = Date.now();\n const passed = now - timestamp;\n if ( passed >= threshold) {\n invoke(args, now);\n } else {\n lastArgs = args;\n if (!timer) {\n timer = setTimeout(() => {\n timer = null;\n invoke(lastArgs)\n }, threshold - passed);\n }\n }\n }\n\n const flush = () => lastArgs && invoke(lastArgs);\n\n return [throttled, flush];\n}\n\nexport default throttle;\n","import speedometer from \"./speedometer.js\";\nimport throttle from \"./throttle.js\";\nimport utils from \"../utils.js\";\n\nexport const progressEventReducer = (listener, isDownloadStream, freq = 3) => {\n let bytesNotified = 0;\n const _speedometer = speedometer(50, 250);\n\n return throttle(e => {\n const loaded = e.loaded;\n const total = e.lengthComputable ? e.total : undefined;\n const progressBytes = loaded - bytesNotified;\n const rate = _speedometer(progressBytes);\n const inRange = loaded <= total;\n\n bytesNotified = loaded;\n\n const data = {\n loaded,\n total,\n progress: total ? (loaded / total) : undefined,\n bytes: progressBytes,\n rate: rate ? rate : undefined,\n estimated: rate && total && inRange ? (total - loaded) / rate : undefined,\n event: e,\n lengthComputable: total != null,\n [isDownloadStream ? 'download' : 'upload']: true\n };\n\n listener(data);\n }, freq);\n}\n\nexport const progressEventDecorator = (total, throttled) => {\n const lengthComputable = total != null;\n\n return [(loaded) => throttled[0]({\n lengthComputable,\n total,\n loaded\n }), throttled[1]];\n}\n\nexport const asyncDecorator = (fn) => (...args) => utils.asap(() => fn(...args));\n","import platform from '../platform/index.js';\n\nexport default platform.hasStandardBrowserEnv ? ((origin, isMSIE) => (url) => {\n url = new URL(url, platform.origin);\n\n return (\n origin.protocol === url.protocol &&\n origin.host === url.host &&\n (isMSIE || origin.port === url.port)\n );\n})(\n new URL(platform.origin),\n platform.navigator && /(msie|trident)/i.test(platform.navigator.userAgent)\n) : () => true;\n","import utils from './../utils.js';\nimport platform from '../platform/index.js';\n\nexport default platform.hasStandardBrowserEnv ?\n\n // Standard browser envs support document.cookie\n {\n write(name, value, expires, path, domain, secure) {\n const cookie = [name + '=' + encodeURIComponent(value)];\n\n utils.isNumber(expires) && cookie.push('expires=' + new Date(expires).toGMTString());\n\n utils.isString(path) && cookie.push('path=' + path);\n\n utils.isString(domain) && cookie.push('domain=' + domain);\n\n secure === true && cookie.push('secure');\n\n document.cookie = cookie.join('; ');\n },\n\n read(name) {\n const match = document.cookie.match(new RegExp('(^|;\\\\s*)(' + name + ')=([^;]*)'));\n return (match ? decodeURIComponent(match[3]) : null);\n },\n\n remove(name) {\n this.write(name, '', Date.now() - 86400000);\n }\n }\n\n :\n\n // Non-standard browser env (web workers, react-native) lack needed support.\n {\n write() {},\n read() {\n return null;\n },\n remove() {}\n };\n\n","'use strict';\n\nimport isAbsoluteURL from '../helpers/isAbsoluteURL.js';\nimport combineURLs from '../helpers/combineURLs.js';\n\n/**\n * Creates a new URL by combining the baseURL with the requestedURL,\n * only when the requestedURL is not already an absolute URL.\n * If the requestURL is absolute, this function returns the requestedURL untouched.\n *\n * @param {string} baseURL The base URL\n * @param {string} requestedURL Absolute or relative URL to combine\n *\n * @returns {string} The combined full path\n */\nexport default function buildFullPath(baseURL, requestedURL, allowAbsoluteUrls) {\n let isRelativeUrl = !isAbsoluteURL(requestedURL);\n if (baseURL && (isRelativeUrl || allowAbsoluteUrls == false)) {\n return combineURLs(baseURL, requestedURL);\n }\n return requestedURL;\n}\n","'use strict';\n\n/**\n * Determines whether the specified URL is absolute\n *\n * @param {string} url The URL to test\n *\n * @returns {boolean} True if the specified URL is absolute, otherwise false\n */\nexport default function isAbsoluteURL(url) {\n // A URL is considered absolute if it begins with \"<scheme>://\" or \"//\" (protocol-relative URL).\n // RFC 3986 defines scheme name as a sequence of characters beginning with a letter and followed\n // by any combination of letters, digits, plus, period, or hyphen.\n return /^([a-z][a-z\\d+\\-.]*:)?\\/\\//i.test(url);\n}\n","'use strict';\n\n/**\n * Creates a new URL by combining the specified URLs\n *\n * @param {string} baseURL The base URL\n * @param {string} relativeURL The relative URL\n *\n * @returns {string} The combined URL\n */\nexport default function combineURLs(baseURL, relativeURL) {\n return relativeURL\n ? baseURL.replace(/\\/?\\/$/, '') + '/' + relativeURL.replace(/^\\/+/, '')\n : baseURL;\n}\n","'use strict';\n\nimport utils from '../utils.js';\nimport AxiosHeaders from \"./AxiosHeaders.js\";\n\nconst headersToObject = (thing) => thing instanceof AxiosHeaders ? { ...thing } : thing;\n\n/**\n * Config-specific merge-function which creates a new config-object\n * by merging two configuration objects together.\n *\n * @param {Object} config1\n * @param {Object} config2\n *\n * @returns {Object} New object resulting from merging config2 to config1\n */\nexport default function mergeConfig(config1, config2) {\n // eslint-disable-next-line no-param-reassign\n config2 = config2 || {};\n const config = {};\n\n function getMergedValue(target, source, prop, caseless) {\n if (utils.isPlainObject(target) && utils.isPlainObject(source)) {\n return utils.merge.call({caseless}, target, source);\n } else if (utils.isPlainObject(source)) {\n return utils.merge({}, source);\n } else if (utils.isArray(source)) {\n return source.slice();\n }\n return source;\n }\n\n // eslint-disable-next-line consistent-return\n function mergeDeepProperties(a, b, prop , caseless) {\n if (!utils.isUndefined(b)) {\n return getMergedValue(a, b, prop , caseless);\n } else if (!utils.isUndefined(a)) {\n return getMergedValue(undefined, a, prop , caseless);\n }\n }\n\n // eslint-disable-next-line consistent-return\n function valueFromConfig2(a, b) {\n if (!utils.isUndefined(b)) {\n return getMergedValue(undefined, b);\n }\n }\n\n // eslint-disable-next-line consistent-return\n function defaultToConfig2(a, b) {\n if (!utils.isUndefined(b)) {\n return getMergedValue(undefined, b);\n } else if (!utils.isUndefined(a)) {\n return getMergedValue(undefined, a);\n }\n }\n\n // eslint-disable-next-line consistent-return\n function mergeDirectKeys(a, b, prop) {\n if (prop in config2) {\n return getMergedValue(a, b);\n } else if (prop in config1) {\n return getMergedValue(undefined, a);\n }\n }\n\n const mergeMap = {\n url: valueFromConfig2,\n method: valueFromConfig2,\n data: valueFromConfig2,\n baseURL: defaultToConfig2,\n transformRequest: defaultToConfig2,\n transformResponse: defaultToConfig2,\n paramsSerializer: defaultToConfig2,\n timeout: defaultToConfig2,\n timeoutMessage: defaultToConfig2,\n withCredentials: defaultToConfig2,\n withXSRFToken: defaultToConfig2,\n adapter: defaultToConfig2,\n responseType: defaultToConfig2,\n xsrfCookieName: defaultToConfig2,\n xsrfHeaderName: defaultToConfig2,\n onUploadProgress: defaultToConfig2,\n onDownloadProgress: defaultToConfig2,\n decompress: defaultToConfig2,\n maxContentLength: defaultToConfig2,\n maxBodyLength: defaultToConfig2,\n beforeRedirect: defaultToConfig2,\n transport: defaultToConfig2,\n httpAgent: defaultToConfig2,\n httpsAgent: defaultToConfig2,\n cancelToken: defaultToConfig2,\n socketPath: defaultToConfig2,\n responseEncoding: defaultToConfig2,\n validateStatus: mergeDirectKeys,\n headers: (a, b , prop) => mergeDeepProperties(headersToObject(a), headersToObject(b),prop, true)\n };\n\n utils.forEach(Object.keys(Object.assign({}, config1, config2)), function computeConfigValue(prop) {\n const merge = mergeMap[prop] || mergeDeepProperties;\n const configValue = merge(config1[prop], config2[prop], prop);\n (utils.isUndefined(configValue) && merge !== mergeDirectKeys) || (config[prop] = configValue);\n });\n\n return config;\n}\n","import platform from \"../platform/index.js\";\nimport utils from \"../utils.js\";\nimport isURLSameOrigin from \"./isURLSameOrigin.js\";\nimport cookies from \"./cookies.js\";\nimport buildFullPath from \"../core/buildFullPath.js\";\nimport mergeConfig from \"../core/mergeConfig.js\";\nimport AxiosHeaders from \"../core/AxiosHeaders.js\";\nimport buildURL from \"./buildURL.js\";\n\nexport default (config) => {\n const newConfig = mergeConfig({}, config);\n\n let {data, withXSRFToken, xsrfHeaderName, xsrfCookieName, headers, auth} = newConfig;\n\n newConfig.headers = headers = AxiosHeaders.from(headers);\n\n newConfig.url = buildURL(buildFullPath(newConfig.baseURL, newConfig.url, newConfig.allowAbsoluteUrls), config.params, config.paramsSerializer);\n\n // HTTP basic authentication\n if (auth) {\n headers.set('Authorization', 'Basic ' +\n btoa((auth.username || '') + ':' + (auth.password ? unescape(encodeURIComponent(auth.password)) : ''))\n );\n }\n\n let contentType;\n\n if (utils.isFormData(data)) {\n if (platform.hasStandardBrowserEnv || platform.hasStandardBrowserWebWorkerEnv) {\n headers.setContentType(undefined); // Let the browser set it\n } else if ((contentType = headers.getContentType()) !== false) {\n // fix semicolon duplication issue for ReactNative FormData implementation\n const [type, ...tokens] = contentType ? contentType.split(';').map(token => token.trim()).filter(Boolean) : [];\n headers.setContentType([type || 'multipart/form-data', ...tokens].join('; '));\n }\n }\n\n // Add xsrf header\n // This is only done if running in a standard browser environment.\n // Specifically not if we're in a web worker, or react-native.\n\n if (platform.hasStandardBrowserEnv) {\n withXSRFToken && utils.isFunction(withXSRFToken) && (withXSRFToken = withXSRFToken(newConfig));\n\n if (withXSRFToken || (withXSRFToken !== false && isURLSameOrigin(newConfig.url))) {\n // Add xsrf header\n const xsrfValue = xsrfHeaderName && xsrfCookieName && cookies.read(xsrfCookieName);\n\n if (xsrfValue) {\n headers.set(xsrfHeaderName, xsrfValue);\n }\n }\n }\n\n return newConfig;\n}\n\n","import platform from \"../platform/index.js\";\nimport utils from \"../utils.js\";\nimport AxiosError from \"../core/AxiosError.js\";\nimport composeSignals from \"../helpers/composeSignals.js\";\nimport {trackStream} from \"../helpers/trackStream.js\";\nimport AxiosHeaders from \"../core/AxiosHeaders.js\";\nimport {progressEventReducer, progressEventDecorator, asyncDecorator} from \"../helpers/progressEventReducer.js\";\nimport resolveConfig from \"../helpers/resolveConfig.js\";\nimport settle from \"../core/settle.js\";\n\nconst isFetchSupported = typeof fetch === 'function' && typeof Request === 'function' && typeof Response === 'function';\nconst isReadableStreamSupported = isFetchSupported && typeof ReadableStream === 'function';\n\n// used only inside the fetch adapter\nconst encodeText = isFetchSupported && (typeof TextEncoder === 'function' ?\n ((encoder) => (str) => encoder.encode(str))(new TextEncoder()) :\n async (str) => new Uint8Array(await new Response(str).arrayBuffer())\n);\n\nconst test = (fn, ...args) => {\n try {\n return !!fn(...args);\n } catch (e) {\n return false\n }\n}\n\nconst supportsRequestStream = isReadableStreamSupported && test(() => {\n let duplexAccessed = false;\n\n const hasContentType = new Request(platform.origin, {\n body: new ReadableStream(),\n method: 'POST',\n get duplex() {\n duplexAccessed = true;\n return 'half';\n },\n }).headers.has('Content-Type');\n\n return duplexAccessed && !hasContentType;\n});\n\nconst DEFAULT_CHUNK_SIZE = 64 * 1024;\n\nconst supportsResponseStream = isReadableStreamSupported &&\n test(() => utils.isReadableStream(new Response('').body));\n\n\nconst resolvers = {\n stream: supportsResponseStream && ((res) => res.body)\n};\n\nisFetchSupported && (((res) => {\n ['text', 'arrayBuffer', 'blob', 'formData', 'stream'].forEach(type => {\n !resolvers[type] && (resolvers[type] = utils.isFunction(res[type]) ? (res) => res[type]() :\n (_, config) => {\n throw new AxiosError(`Response type '${type}' is not supported`, AxiosError.ERR_NOT_SUPPORT, config);\n })\n });\n})(new Response));\n\nconst getBodyLength = async (body) => {\n if (body == null) {\n return 0;\n }\n\n if(utils.isBlob(body)) {\n return body.size;\n }\n\n if(utils.isSpecCompliantForm(body)) {\n const _request = new Request(platform.origin, {\n method: 'POST',\n body,\n });\n return (await _request.arrayBuffer()).byteLength;\n }\n\n if(utils.isArrayBufferView(body) || utils.isArrayBuffer(body)) {\n return body.byteLength;\n }\n\n if(utils.isURLSearchParams(body)) {\n body = body + '';\n }\n\n if(utils.isString(body)) {\n return (await encodeText(body)).byteLength;\n }\n}\n\nconst resolveBodyLength = async (headers, body) => {\n const length = utils.toFiniteNumber(headers.getContentLength());\n\n return length == null ? getBodyLength(body) : length;\n}\n\nexport default isFetchSupported && (async (config) => {\n let {\n url,\n method,\n data,\n signal,\n cancelToken,\n timeout,\n onDownloadProgress,\n onUploadProgress,\n responseType,\n headers,\n withCredentials = 'same-origin',\n fetchOptions\n } = resolveConfig(config);\n\n responseType = responseType ? (responseType + '').toLowerCase() : 'text';\n\n let composedSignal = composeSignals([signal, cancelToken && cancelToken.toAbortSignal()], timeout);\n\n let request;\n\n const unsubscribe = composedSignal && composedSignal.unsubscribe && (() => {\n composedSignal.unsubscribe();\n });\n\n let requestContentLength;\n\n try {\n if (\n onUploadProgress && supportsRequestStream && method !== 'get' && method !== 'head' &&\n (requestContentLength = await resolveBodyLength(headers, data)) !== 0\n ) {\n let _request = new Request(url, {\n method: 'POST',\n body: data,\n duplex: \"half\"\n });\n\n let contentTypeHeader;\n\n if (utils.isFormData(data) && (contentTypeHeader = _request.headers.get('content-type'))) {\n headers.setContentType(contentTypeHeader)\n }\n\n if (_request.body) {\n const [onProgress, flush] = progressEventDecorator(\n requestContentLength,\n progressEventReducer(asyncDecorator(onUploadProgress))\n );\n\n data = trackStream(_request.body, DEFAULT_CHUNK_SIZE, onProgress, flush);\n }\n }\n\n if (!utils.isString(withCredentials)) {\n withCredentials = withCredentials ? 'include' : 'omit';\n }\n\n // Cloudflare Workers throws when credentials are defined\n // see https://github.com/cloudflare/workerd/issues/902\n const isCredentialsSupported = \"credentials\" in Request.prototype;\n request = new Request(url, {\n ...fetchOptions,\n signal: composedSignal,\n method: method.toUpperCase(),\n headers: headers.normalize().toJSON(),\n body: data,\n duplex: \"half\",\n credentials: isCredentialsSupported ? withCredentials : undefined\n });\n\n let response = await fetch(request, fetchOptions);\n\n const isStreamResponse = supportsResponseStream && (responseType === 'stream' || responseType === 'response');\n\n if (supportsResponseStream && (onDownloadProgress || (isStreamResponse && unsubscribe))) {\n const options = {};\n\n ['status', 'statusText', 'headers'].forEach(prop => {\n options[prop] = response[prop];\n });\n\n const responseContentLength = utils.toFiniteNumber(response.headers.get('content-length'));\n\n const [onProgress, flush] = onDownloadProgress && progressEventDecorator(\n responseContentLength,\n progressEventReducer(asyncDecorator(onDownloadProgress), true)\n ) || [];\n\n response = new Response(\n trackStream(response.body, DEFAULT_CHUNK_SIZE, onProgress, () => {\n flush && flush();\n unsubscribe && unsubscribe();\n }),\n options\n );\n }\n\n responseType = responseType || 'text';\n\n let responseData = await resolvers[utils.findKey(resolvers, responseType) || 'text'](response, config);\n\n !isStreamResponse && unsubscribe && unsubscribe();\n\n return await new Promise((resolve, reject) => {\n settle(resolve, reject, {\n data: responseData,\n headers: AxiosHeaders.from(response.headers),\n status: response.status,\n statusText: response.statusText,\n config,\n request\n })\n })\n } catch (err) {\n unsubscribe && unsubscribe();\n\n if (err && err.name === 'TypeError' && /Load failed|fetch/i.test(err.message)) {\n throw Object.assign(\n new AxiosError('Network Error', AxiosError.ERR_NETWORK, config, request),\n {\n cause: err.cause || err\n }\n )\n }\n\n throw AxiosError.from(err, err && err.code, config, request);\n }\n});\n\n\n","import utils from './../utils.js';\nimport settle from './../core/settle.js';\nimport transitionalDefaults from '../defaults/transitional.js';\nimport AxiosError from '../core/AxiosError.js';\nimport CanceledError from '../cancel/CanceledError.js';\nimport parseProtocol from '../helpers/parseProtocol.js';\nimport platform from '../platform/index.js';\nimport AxiosHeaders from '../core/AxiosHeaders.js';\nimport {progressEventReducer} from '../helpers/progressEventReducer.js';\nimport resolveConfig from \"../helpers/resolveConfig.js\";\n\nconst isXHRAdapterSupported = typeof XMLHttpRequest !== 'undefined';\n\nexport default isXHRAdapterSupported && function (config) {\n return new Promise(function dispatchXhrRequest(resolve, reject) {\n const _config = resolveConfig(config);\n let requestData = _config.data;\n const requestHeaders = AxiosHeaders.from(_config.headers).normalize();\n let {responseType, onUploadProgress, onDownloadProgress} = _config;\n let onCanceled;\n let uploadThrottled, downloadThrottled;\n let flushUpload, flushDownload;\n\n function done() {\n flushUpload && flushUpload(); // flush events\n flushDownload && flushDownload(); // flush events\n\n _config.cancelToken && _config.cancelToken.unsubscribe(onCanceled);\n\n _config.signal && _config.signal.removeEventListener('abort', onCanceled);\n }\n\n let request = new XMLHttpRequest();\n\n request.open(_config.method.toUpperCase(), _config.url, true);\n\n // Set the request timeout in MS\n request.timeout = _config.timeout;\n\n function onloadend() {\n if (!request) {\n return;\n }\n // Prepare the response\n const responseHeaders = AxiosHeaders.from(\n 'getAllResponseHeaders' in request && request.getAllResponseHeaders()\n );\n const responseData = !responseType || responseType === 'text' || responseType === 'json' ?\n request.responseText : request.response;\n const response = {\n data: responseData,\n status: request.status,\n statusText: request.statusText,\n headers: responseHeaders,\n config,\n request\n };\n\n settle(function _resolve(value) {\n resolve(value);\n done();\n }, function _reject(err) {\n reject(err);\n done();\n }, response);\n\n // Clean up request\n request = null;\n }\n\n if ('onloadend' in request) {\n // Use onloadend if available\n request.onloadend = onloadend;\n } else {\n // Listen for ready state to emulate onloadend\n request.onreadystatechange = function handleLoad() {\n if (!request || request.readyState !== 4) {\n return;\n }\n\n // The request errored out and we didn't get a response, this will be\n // handled by onerror instead\n // With one exception: request that using file: protocol, most browsers\n // will return status as 0 even though it's a successful request\n if (request.status === 0 && !(request.responseURL && request.responseURL.indexOf('file:') === 0)) {\n return;\n }\n // readystate handler is calling before onerror or ontimeout handlers,\n // so we should call onloadend on the next 'tick'\n setTimeout(onloadend);\n };\n }\n\n // Handle browser request cancellation (as opposed to a manual cancellation)\n request.onabort = function handleAbort() {\n if (!request) {\n return;\n }\n\n reject(new AxiosError('Request aborted', AxiosError.ECONNABORTED, config, request));\n\n // Clean up request\n request = null;\n };\n\n // Handle low level network errors\n request.onerror = function handleError() {\n // Real errors are hidden from us by the browser\n // onerror should only fire if it's a network error\n reject(new AxiosError('Network Error', AxiosError.ERR_NETWORK, config, request));\n\n // Clean up request\n request = null;\n };\n\n // Handle timeout\n request.ontimeout = function handleTimeout() {\n let timeoutErrorMessage = _config.timeout ? 'timeout of ' + _config.timeout + 'ms exceeded' : 'timeout exceeded';\n const transitional = _config.transitional || transitionalDefaults;\n if (_config.timeoutErrorMessage) {\n timeoutErrorMessage = _config.timeoutErrorMessage;\n }\n reject(new AxiosError(\n timeoutErrorMessage,\n transitional.clarifyTimeoutError ? AxiosError.ETIMEDOUT : AxiosError.ECONNABORTED,\n config,\n request));\n\n // Clean up request\n request = null;\n };\n\n // Remove Content-Type if data is undefined\n requestData === undefined && requestHeaders.setContentType(null);\n\n // Add headers to the request\n if ('setRequestHeader' in request) {\n utils.forEach(requestHeaders.toJSON(), function setRequestHeader(val, key) {\n request.setRequestHeader(key, val);\n });\n }\n\n // Add withCredentials to request if needed\n if (!utils.isUndefined(_config.withCredentials)) {\n request.withCredentials = !!_config.withCredentials;\n }\n\n // Add responseType to request if needed\n if (responseType && responseType !== 'json') {\n request.responseType = _config.responseType;\n }\n\n // Handle progress if needed\n if (onDownloadProgress) {\n ([downloadThrottled, flushDownload] = progressEventReducer(onDownloadProgress, true));\n request.addEventListener('progress', downloadThrottled);\n }\n\n // Not all browsers support upload events\n if (onUploadProgress && request.upload) {\n ([uploadThrottled, flushUpload] = progressEventReducer(onUploadProgress));\n\n request.upload.addEventListener('progress', uploadThrottled);\n\n request.upload.addEventListener('loadend', flushUpload);\n }\n\n if (_config.cancelToken || _config.signal) {\n // Handle cancellation\n // eslint-disable-next-line func-names\n onCanceled = cancel => {\n if (!request) {\n return;\n }\n reject(!cancel || cancel.type ? new CanceledError(null, config, request) : cancel);\n request.abort();\n request = null;\n };\n\n _config.cancelToken && _config.cancelToken.subscribe(onCanceled);\n if (_config.signal) {\n _config.signal.aborted ? onCanceled() : _config.signal.addEventListener('abort', onCanceled);\n }\n }\n\n const protocol = parseProtocol(_config.url);\n\n if (protocol && platform.protocols.indexOf(protocol) === -1) {\n reject(new AxiosError('Unsupported protocol ' + protocol + ':', AxiosError.ERR_BAD_REQUEST, config));\n return;\n }\n\n\n // Send the request\n request.send(requestData || null);\n });\n}\n","'use strict';\n\nexport default function parseProtocol(url) {\n const match = /^([-+\\w]{1,25})(:?\\/\\/|:)/.exec(url);\n return match && match[1] || '';\n}\n","import CanceledError from \"../cancel/CanceledError.js\";\nimport AxiosError from \"../core/AxiosError.js\";\nimport utils from '../utils.js';\n\nconst composeSignals = (signals, timeout) => {\n const {length} = (signals = signals ? signals.filter(Boolean) : []);\n\n if (timeout || length) {\n let controller = new AbortController();\n\n let aborted;\n\n const onabort = function (reason) {\n if (!aborted) {\n aborted = true;\n unsubscribe();\n const err = reason instanceof Error ? reason : this.reason;\n controller.abort(err instanceof AxiosError ? err : new CanceledError(err instanceof Error ? err.message : err));\n }\n }\n\n let timer = timeout && setTimeout(() => {\n timer = null;\n onabort(new AxiosError(`timeout ${timeout} of ms exceeded`, AxiosError.ETIMEDOUT))\n }, timeout)\n\n const unsubscribe = () => {\n if (signals) {\n timer && clearTimeout(timer);\n timer = null;\n signals.forEach(signal => {\n signal.unsubscribe ? signal.unsubscribe(onabort) : signal.removeEventListener('abort', onabort);\n });\n signals = null;\n }\n }\n\n signals.forEach((signal) => signal.addEventListener('abort', onabort));\n\n const {signal} = controller;\n\n signal.unsubscribe = () => utils.asap(unsubscribe);\n\n return signal;\n }\n}\n\nexport default composeSignals;\n","\nexport const streamChunk = function* (chunk, chunkSize) {\n let len = chunk.byteLength;\n\n if (!chunkSize || len < chunkSize) {\n yield chunk;\n return;\n }\n\n let pos = 0;\n let end;\n\n while (pos < len) {\n end = pos + chunkSize;\n yield chunk.slice(pos, end);\n pos = end;\n }\n}\n\nexport const readBytes = async function* (iterable, chunkSize) {\n for await (const chunk of readStream(iterable)) {\n yield* streamChunk(chunk, chunkSize);\n }\n}\n\nconst readStream = async function* (stream) {\n if (stream[Symbol.asyncIterator]) {\n yield* stream;\n return;\n }\n\n const reader = stream.getReader();\n try {\n for (;;) {\n const {done, value} = await reader.read();\n if (done) {\n break;\n }\n yield value;\n }\n } finally {\n await reader.cancel();\n }\n}\n\nexport const trackStream = (stream, chunkSize, onProgress, onFinish) => {\n const iterator = readBytes(stream, chunkSize);\n\n let bytes = 0;\n let done;\n let _onFinish = (e) => {\n if (!done) {\n done = true;\n onFinish && onFinish(e);\n }\n }\n\n return new ReadableStream({\n async pull(controller) {\n try {\n const {done, value} = await iterator.next();\n\n if (done) {\n _onFinish();\n controller.close();\n return;\n }\n\n let len = value.byteLength;\n if (onProgress) {\n let loadedBytes = bytes += len;\n onProgress(loadedBytes);\n }\n controller.enqueue(new Uint8Array(value));\n } catch (err) {\n _onFinish(err);\n throw err;\n }\n },\n cancel(reason) {\n _onFinish(reason);\n return iterator.return();\n }\n }, {\n highWaterMark: 2\n })\n}\n","import utils from '../utils.js';\nimport httpAdapter from './http.js';\nimport xhrAdapter from './xhr.js';\nimport fetchAdapter from './fetch.js';\nimport AxiosError from \"../core/AxiosError.js\";\n\nconst knownAdapters = {\n http: httpAdapter,\n xhr: xhrAdapter,\n fetch: fetchAdapter\n}\n\nutils.forEach(knownAdapters, (fn, value) => {\n if (fn) {\n try {\n Object.defineProperty(fn, 'name', {value});\n } catch (e) {\n // eslint-disable-next-line no-empty\n }\n Object.defineProperty(fn, 'adapterName', {value});\n }\n});\n\nconst renderReason = (reason) => `- ${reason}`;\n\nconst isResolvedHandle = (adapter) => utils.isFunction(adapter) || adapter === null || adapter === false;\n\nexport default {\n getAdapter: (adapters) => {\n adapters = utils.isArray(adapters) ? adapters : [adapters];\n\n const {length} = adapters;\n let nameOrAdapter;\n let adapter;\n\n const rejectedReasons = {};\n\n for (let i = 0; i < length; i++) {\n nameOrAdapter = adapters[i];\n let id;\n\n adapter = nameOrAdapter;\n\n if (!isResolvedHandle(nameOrAdapter)) {\n adapter = knownAdapters[(id = String(nameOrAdapter)).toLowerCase()];\n\n if (adapter === undefined) {\n throw new AxiosError(`Unknown adapter '${id}'`);\n }\n }\n\n if (adapter) {\n break;\n }\n\n rejectedReasons[id || '#' + i] = adapter;\n }\n\n if (!adapter) {\n\n const reasons = Object.entries(rejectedReasons)\n .map(([id, state]) => `adapter ${id} ` +\n (state === false ? 'is not supported by the environment' : 'is not available in the build')\n );\n\n let s = length ?\n (reasons.length > 1 ? 'since :\\n' + reasons.map(renderReason).join('\\n') : ' ' + renderReason(reasons[0])) :\n 'as no adapter specified';\n\n throw new AxiosError(\n `There is no suitable adapter to dispatch the request ` + s,\n 'ERR_NOT_SUPPORT'\n );\n }\n\n return adapter;\n },\n adapters: knownAdapters\n}\n","// eslint-disable-next-line strict\nexport default null;\n","'use strict';\n\nimport transformData from './transformData.js';\nimport isCancel from '../cancel/isCancel.js';\nimport defaults from '../defaults/index.js';\nimport CanceledError from '../cancel/CanceledError.js';\nimport AxiosHeaders from '../core/AxiosHeaders.js';\nimport adapters from \"../adapters/adapters.js\";\n\n/**\n * Throws a `CanceledError` if cancellation has been requested.\n *\n * @param {Object} config The config that is to be used for the request\n *\n * @returns {void}\n */\nfunction throwIfCancellationRequested(config) {\n if (config.cancelToken) {\n config.cancelToken.throwIfRequested();\n }\n\n if (config.signal && config.signal.aborted) {\n throw new CanceledError(null, config);\n }\n}\n\n/**\n * Dispatch a request to the server using the configured adapter.\n *\n * @param {object} config The config that is to be used for the request\n *\n * @returns {Promise} The Promise to be fulfilled\n */\nexport default function dispatchRequest(config) {\n throwIfCancellationRequested(config);\n\n config.headers = AxiosHeaders.from(config.headers);\n\n // Transform request data\n config.data = transformData.call(\n config,\n config.transformRequest\n );\n\n if (['post', 'put', 'patch'].indexOf(config.method) !== -1) {\n config.headers.setContentType('application/x-www-form-urlencoded', false);\n }\n\n const adapter = adapters.getAdapter(config.adapter || defaults.adapter);\n\n return adapter(config).then(function onAdapterResolution(response) {\n throwIfCancellationRequested(config);\n\n // Transform response data\n response.data = transformData.call(\n config,\n config.transformResponse,\n response\n );\n\n response.headers = AxiosHeaders.from(response.headers);\n\n return response;\n }, function onAdapterRejection(reason) {\n if (!isCancel(reason)) {\n throwIfCancellationRequested(config);\n\n // Transform response data\n if (reason && reason.response) {\n reason.response.data = transformData.call(\n config,\n config.transformResponse,\n reason.response\n );\n reason.response.headers = AxiosHeaders.from(reason.response.headers);\n }\n }\n\n return Promise.reject(reason);\n });\n}\n","export const VERSION = \"1.10.0\";","'use strict';\n\nimport {VERSION} from '../env/data.js';\nimport AxiosError from '../core/AxiosError.js';\n\nconst validators = {};\n\n// eslint-disable-next-line func-names\n['object', 'boolean', 'number', 'function', 'string', 'symbol'].forEach((type, i) => {\n validators[type] = function validator(thing) {\n return typeof thing === type || 'a' + (i < 1 ? 'n ' : ' ') + type;\n };\n});\n\nconst deprecatedWarnings = {};\n\n/**\n * Transitional option validator\n *\n * @param {function|boolean?} validator - set to false if the transitional option has been removed\n * @param {string?} version - deprecated version / removed since version\n * @param {string?} message - some message with additional info\n *\n * @returns {function}\n */\nvalidators.transitional = function transitional(validator, version, message) {\n function formatMessage(opt, desc) {\n return '[Axios v' + VERSION + '] Transitional option \\'' + opt + '\\'' + desc + (message ? '. ' + message : '');\n }\n\n // eslint-disable-next-line func-names\n return (value, opt, opts) => {\n if (validator === false) {\n throw new AxiosError(\n formatMessage(opt, ' has been removed' + (version ? ' in ' + version : '')),\n AxiosError.ERR_DEPRECATED\n );\n }\n\n if (version && !deprecatedWarnings[opt]) {\n deprecatedWarnings[opt] = true;\n // eslint-disable-next-line no-console\n console.warn(\n formatMessage(\n opt,\n ' has been deprecated since v' + version + ' and will be removed in the near future'\n )\n );\n }\n\n return validator ? validator(value, opt, opts) : true;\n };\n};\n\nvalidators.spelling = function spelling(correctSpelling) {\n return (value, opt) => {\n // eslint-disable-next-line no-console\n console.warn(`${opt} is likely a misspelling of ${correctSpelling}`);\n return true;\n }\n};\n\n/**\n * Assert object's properties type\n *\n * @param {object} options\n * @param {object} schema\n * @param {boolean?} allowUnknown\n *\n * @returns {object}\n */\n\nfunction assertOptions(options, schema, allowUnknown) {\n if (typeof options !== 'object') {\n throw new AxiosError('options must be an object', AxiosError.ERR_BAD_OPTION_VALUE);\n }\n const keys = Object.keys(options);\n let i = keys.length;\n while (i-- > 0) {\n const opt = keys[i];\n const validator = schema[opt];\n if (validator) {\n const value = options[opt];\n const result = value === undefined || validator(value, opt, options);\n if (result !== true) {\n throw new AxiosError('option ' + opt + ' must be ' + result, AxiosError.ERR_BAD_OPTION_VALUE);\n }\n continue;\n }\n if (allowUnknown !== true) {\n throw new AxiosError('Unknown option ' + opt, AxiosError.ERR_BAD_OPTION);\n }\n }\n}\n\nexport default {\n assertOptions,\n validators\n};\n","'use strict';\n\nimport utils from './../utils.js';\nimport buildURL from '../helpers/buildURL.js';\nimport InterceptorManager from './InterceptorManager.js';\nimport dispatchRequest from './dispatchRequest.js';\nimport mergeConfig from './mergeConfig.js';\nimport buildFullPath from './buildFullPath.js';\nimport validator from '../helpers/validator.js';\nimport AxiosHeaders from './AxiosHeaders.js';\n\nconst validators = validator.validators;\n\n/**\n * Create a new instance of Axios\n *\n * @param {Object} instanceConfig The default config for the instance\n *\n * @return {Axios} A new instance of Axios\n */\nclass Axios {\n constructor(instanceConfig) {\n this.defaults = instanceConfig || {};\n this.interceptors = {\n request: new InterceptorManager(),\n response: new InterceptorManager()\n };\n }\n\n /**\n * Dispatch a request\n *\n * @param {String|Object} configOrUrl The config specific for this request (merged with this.defaults)\n * @param {?Object} config\n *\n * @returns {Promise} The Promise to be fulfilled\n */\n async request(configOrUrl, config) {\n try {\n return await this._request(configOrUrl, config);\n } catch (err) {\n if (err instanceof Error) {\n let dummy = {};\n\n Error.captureStackTrace ? Error.captureStackTrace(dummy) : (dummy = new Error());\n\n // slice off the Error: ... line\n const stack = dummy.stack ? dummy.stack.replace(/^.+\\n/, '') : '';\n try {\n if (!err.stack) {\n err.stack = stack;\n // match without the 2 top stack lines\n } else if (stack && !String(err.stack).endsWith(stack.replace(/^.+\\n.+\\n/, ''))) {\n err.stack += '\\n' + stack\n }\n } catch (e) {\n // ignore the case where \"stack\" is an un-writable property\n }\n }\n\n throw err;\n }\n }\n\n _request(configOrUrl, config) {\n /*eslint no-param-reassign:0*/\n // Allow for axios('example/url'[, config]) a la fetch API\n if (typeof configOrUrl === 'string') {\n config = config || {};\n config.url = configOrUrl;\n } else {\n config = configOrUrl || {};\n }\n\n config = mergeConfig(this.defaults, config);\n\n const {transitional, paramsSerializer, headers} = config;\n\n if (transitional !== undefined) {\n validator.assertOptions(transitional, {\n silentJSONParsing: validators.transitional(validators.boolean),\n forcedJSONParsing: validators.transitional(validators.boolean),\n clarifyTimeoutError: validators.transitional(validators.boolean)\n }, false);\n }\n\n if (paramsSerializer != null) {\n if (utils.isFunction(paramsSerializer)) {\n config.paramsSerializer = {\n serialize: paramsSerializer\n }\n } else {\n validator.assertOptions(paramsSerializer, {\n encode: validators.function,\n serialize: validators.function\n }, true);\n }\n }\n\n // Set config.allowAbsoluteUrls\n if (config.allowAbsoluteUrls !== undefined) {\n // do nothing\n } else if (this.defaults.allowAbsoluteUrls !== undefined) {\n config.allowAbsoluteUrls = this.defaults.allowAbsoluteUrls;\n } else {\n config.allowAbsoluteUrls = true;\n }\n\n validator.assertOptions(config, {\n baseUrl: validators.spelling('baseURL'),\n withXsrfToken: validators.spelling('withXSRFToken')\n }, true);\n\n // Set config.method\n config.method = (config.method || this.defaults.method || 'get').toLowerCase();\n\n // Flatten headers\n let contextHeaders = headers && utils.merge(\n headers.common,\n headers[config.method]\n );\n\n headers && utils.forEach(\n ['delete', 'get', 'head', 'post', 'put', 'patch', 'common'],\n (method) => {\n delete headers[method];\n }\n );\n\n config.headers = AxiosHeaders.concat(contextHeaders, headers);\n\n // filter out skipped interceptors\n const requestInterceptorChain = [];\n let synchronousRequestInterceptors = true;\n this.interceptors.request.forEach(function unshiftRequestInterceptors(interceptor) {\n if (typeof interceptor.runWhen === 'function' && interceptor.runWhen(config) === false) {\n return;\n }\n\n synchronousRequestInterceptors = synchronousRequestInterceptors && interceptor.synchronous;\n\n requestInterceptorChain.unshift(interceptor.fulfilled, interceptor.rejected);\n });\n\n const responseInterceptorChain = [];\n this.interceptors.response.forEach(function pushResponseInterceptors(interceptor) {\n responseInterceptorChain.push(interceptor.fulfilled, interceptor.rejected);\n });\n\n let promise;\n let i = 0;\n let len;\n\n if (!synchronousRequestInterceptors) {\n const chain = [dispatchRequest.bind(this), undefined];\n chain.unshift.apply(chain, requestInterceptorChain);\n chain.push.apply(chain, responseInterceptorChain);\n len = chain.length;\n\n promise = Promise.resolve(config);\n\n while (i < len) {\n promise = promise.then(chain[i++], chain[i++]);\n }\n\n return promise;\n }\n\n len = requestInterceptorChain.length;\n\n let newConfig = config;\n\n i = 0;\n\n while (i < len) {\n const onFulfilled = requestInterceptorChain[i++];\n const onRejected = requestInterceptorChain[i++];\n try {\n newConfig = onFulfilled(newConfig);\n } catch (error) {\n onRejected.call(this, error);\n break;\n }\n }\n\n try {\n promise = dispatchRequest.call(this, newConfig);\n } catch (error) {\n return Promise.reject(error);\n }\n\n i = 0;\n len = responseInterceptorChain.length;\n\n while (i < len) {\n promise = promise.then(responseInterceptorChain[i++], responseInterceptorChain[i++]);\n }\n\n return promise;\n }\n\n getUri(config) {\n config = mergeConfig(this.defaults, config);\n const fullPath = buildFullPath(config.baseURL, config.url, config.allowAbsoluteUrls);\n return buildURL(fullPath, config.params, config.paramsSerializer);\n }\n}\n\n// Provide aliases for supported request methods\nutils.forEach(['delete', 'get', 'head', 'options'], function forEachMethodNoData(method) {\n /*eslint func-names:0*/\n Axios.prototype[method] = function(url, config) {\n return this.request(mergeConfig(config || {}, {\n method,\n url,\n data: (config || {}).data\n }));\n };\n});\n\nutils.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) {\n /*eslint func-names:0*/\n\n function generateHTTPMethod(isForm) {\n return function httpMethod(url, data, config) {\n return this.request(mergeConfig(config || {}, {\n method,\n headers: isForm ? {\n 'Content-Type': 'multipart/form-data'\n } : {},\n url,\n data\n }));\n };\n }\n\n Axios.prototype[method] = generateHTTPMethod();\n\n Axios.prototype[method + 'Form'] = generateHTTPMethod(true);\n});\n\nexport default Axios;\n","'use strict';\n\nimport CanceledError from './CanceledError.js';\n\n/**\n * A `CancelToken` is an object that can be used to request cancellation of an operation.\n *\n * @param {Function} executor The executor function.\n *\n * @returns {CancelToken}\n */\nclass CancelToken {\n constructor(executor) {\n if (typeof executor !== 'function') {\n throw new TypeError('executor must be a function.');\n }\n\n let resolvePromise;\n\n this.promise = new Promise(function promiseExecutor(resolve) {\n resolvePromise = resolve;\n });\n\n const token = this;\n\n // eslint-disable-next-line func-names\n this.promise.then(cancel => {\n if (!token._listeners) return;\n\n let i = token._listeners.length;\n\n while (i-- > 0) {\n token._listeners[i](cancel);\n }\n token._listeners = null;\n });\n\n // eslint-disable-next-line func-names\n this.promise.then = onfulfilled => {\n let _resolve;\n // eslint-disable-next-line func-names\n const promise = new Promise(resolve => {\n token.subscribe(resolve);\n _resolve = resolve;\n }).then(onfulfilled);\n\n promise.cancel = function reject() {\n token.unsubscribe(_resolve);\n };\n\n return promise;\n };\n\n executor(function cancel(message, config, request) {\n if (token.reason) {\n // Cancellation has already been requested\n return;\n }\n\n token.reason = new CanceledError(message, config, request);\n resolvePromise(token.reason);\n });\n }\n\n /**\n * Throws a `CanceledError` if cancellation has been requested.\n */\n throwIfRequested() {\n if (this.reason) {\n throw this.reason;\n }\n }\n\n /**\n * Subscribe to the cancel signal\n */\n\n subscribe(listener) {\n if (this.reason) {\n listener(this.reason);\n return;\n }\n\n if (this._listeners) {\n this._listeners.push(listener);\n } else {\n this._listeners = [listener];\n }\n }\n\n /**\n * Unsubscribe from the cancel signal\n */\n\n unsubscribe(listener) {\n if (!this._listeners) {\n return;\n }\n const index = this._listeners.indexOf(listener);\n if (index !== -1) {\n this._listeners.splice(index, 1);\n }\n }\n\n toAbortSignal() {\n const controller = new AbortController();\n\n const abort = (err) => {\n controller.abort(err);\n };\n\n this.subscribe(abort);\n\n controller.signal.unsubscribe = () => this.unsubscribe(abort);\n\n return controller.signal;\n }\n\n /**\n * Returns an object that contains a new `CancelToken` and a function that, when called,\n * cancels the `CancelToken`.\n */\n static source() {\n let cancel;\n const token = new CancelToken(function executor(c) {\n cancel = c;\n });\n return {\n token,\n cancel\n };\n }\n}\n\nexport default CancelToken;\n","const HttpStatusCode = {\n Continue: 100,\n SwitchingProtocols: 101,\n Processing: 102,\n EarlyHints: 103,\n Ok: 200,\n Created: 201,\n Accepted: 202,\n NonAuthoritativeInformation: 203,\n NoContent: 204,\n ResetContent: 205,\n PartialContent: 206,\n MultiStatus: 207,\n AlreadyReported: 208,\n ImUsed: 226,\n MultipleChoices: 300,\n MovedPermanently: 301,\n Found: 302,\n SeeOther: 303,\n NotModified: 304,\n UseProxy: 305,\n Unused: 306,\n TemporaryRedirect: 307,\n PermanentRedirect: 308,\n BadRequest: 400,\n Unauthorized: 401,\n PaymentRequired: 402,\n Forbidden: 403,\n NotFound: 404,\n MethodNotAllowed: 405,\n NotAcceptable: 406,\n ProxyAuthenticationRequired: 407,\n RequestTimeout: 408,\n Conflict: 409,\n Gone: 410,\n LengthRequired: 411,\n PreconditionFailed: 412,\n PayloadTooLarge: 413,\n UriTooLong: 414,\n UnsupportedMediaType: 415,\n RangeNotSatisfiable: 416,\n ExpectationFailed: 417,\n ImATeapot: 418,\n MisdirectedRequest: 421,\n UnprocessableEntity: 422,\n Locked: 423,\n FailedDependency: 424,\n TooEarly: 425,\n UpgradeRequired: 426,\n PreconditionRequired: 428,\n TooManyRequests: 429,\n RequestHeaderFieldsTooLarge: 431,\n UnavailableForLegalReasons: 451,\n InternalServerError: 500,\n NotImplemented: 501,\n BadGateway: 502,\n ServiceUnavailable: 503,\n GatewayTimeout: 504,\n HttpVersionNotSupported: 505,\n VariantAlsoNegotiates: 506,\n InsufficientStorage: 507,\n LoopDetected: 508,\n NotExtended: 510,\n NetworkAuthenticationRequired: 511,\n};\n\nObject.entries(HttpStatusCode).forEach(([key, value]) => {\n HttpStatusCode[value] = key;\n});\n\nexport default HttpStatusCode;\n","'use strict';\n\nimport utils from './utils.js';\nimport bind from './helpers/bind.js';\nimport Axios from './core/Axios.js';\nimport mergeConfig from './core/mergeConfig.js';\nimport defaults from './defaults/index.js';\nimport formDataToJSON from './helpers/formDataToJSON.js';\nimport CanceledError from './cancel/CanceledError.js';\nimport CancelToken from './cancel/CancelToken.js';\nimport isCancel from './cancel/isCancel.js';\nimport {VERSION} from './env/data.js';\nimport toFormData from './helpers/toFormData.js';\nimport AxiosError from './core/AxiosError.js';\nimport spread from './helpers/spread.js';\nimport isAxiosError from './helpers/isAxiosError.js';\nimport AxiosHeaders from \"./core/AxiosHeaders.js\";\nimport adapters from './adapters/adapters.js';\nimport HttpStatusCode from './helpers/HttpStatusCode.js';\n\n/**\n * Create an instance of Axios\n *\n * @param {Object} defaultConfig The default config for the instance\n *\n * @returns {Axios} A new instance of Axios\n */\nfunction createInstance(defaultConfig) {\n const context = new Axios(defaultConfig);\n const instance = bind(Axios.prototype.request, context);\n\n // Copy axios.prototype to instance\n utils.extend(instance, Axios.prototype, context, {allOwnKeys: true});\n\n // Copy context to instance\n utils.extend(instance, context, null, {allOwnKeys: true});\n\n // Factory for creating new instances\n instance.create = function create(instanceConfig) {\n return createInstance(mergeConfig(defaultConfig, instanceConfig));\n };\n\n return instance;\n}\n\n// Create the default instance to be exported\nconst axios = createInstance(defaults);\n\n// Expose Axios class to allow class inheritance\naxios.Axios = Axios;\n\n// Expose Cancel & CancelToken\naxios.CanceledError = CanceledError;\naxios.CancelToken = CancelToken;\naxios.isCancel = isCancel;\naxios.VERSION = VERSION;\naxios.toFormData = toFormData;\n\n// Expose AxiosError class\naxios.AxiosError = AxiosError;\n\n// alias for CanceledError for backward compatibility\naxios.Cancel = axios.CanceledError;\n\n// Expose all/spread\naxios.all = function all(promises) {\n return Promise.all(promises);\n};\n\naxios.spread = spread;\n\n// Expose isAxiosError\naxios.isAxiosError = isAxiosError;\n\n// Expose mergeConfig\naxios.mergeConfig = mergeConfig;\n\naxios.AxiosHeaders = AxiosHeaders;\n\naxios.formToJSON = thing => formDataToJSON(utils.isHTMLForm(thing) ? new FormData(thing) : thing);\n\naxios.getAdapter = adapters.getAdapter;\n\naxios.HttpStatusCode = HttpStatusCode;\n\naxios.default = axios;\n\n// this module should only have a default export\nexport default axios\n","'use strict';\n\n/**\n * Syntactic sugar for invoking a function and expanding an array for arguments.\n *\n * Common use case would be to use `Function.prototype.apply`.\n *\n * ```js\n * function f(x, y, z) {}\n * var args = [1, 2, 3];\n * f.apply(null, args);\n * ```\n *\n * With `spread` this example can be re-written.\n *\n * ```js\n * spread(function(x, y, z) {})([1, 2, 3]);\n * ```\n *\n * @param {Function} callback\n *\n * @returns {Function}\n */\nexport default function spread(callback) {\n return function wrap(arr) {\n return callback.apply(null, arr);\n };\n}\n","'use strict';\n\nimport utils from './../utils.js';\n\n/**\n * Determines whether the payload is an error thrown by Axios\n *\n * @param {*} payload The value to test\n *\n * @returns {boolean} True if the payload is an error thrown by Axios, otherwise false\n */\nexport default function isAxiosError(payload) {\n return utils.isObject(payload) && (payload.isAxiosError === true);\n}\n"],"names":["bind","fn","thisArg","apply","arguments","cache","toString","Object","prototype","getPrototypeOf","iterator","Symbol","toStringTag","kindOf","create","thing","str","call","slice","toLowerCase","kindOfTest","type","typeOfTest","_typeof","isArray","Array","isUndefined","isArrayBuffer","isString","isFunction","isNumber","isObject","isPlainObject","val","isDate","isFile","isBlob","isFileList","isURLSearchParams","_map2","_slicedToArray","map","isReadableStream","isRequest","isResponse","isHeaders","forEach","obj","i","l","_ref","length","undefined","_ref$allOwnKeys","allOwnKeys","key","keys","getOwnPropertyNames","len","findKey","_key","_global","globalThis","self","window","global","isContextDefined","context","TypedArray","isTypedArray","Uint8Array","isHTMLForm","hasOwnProperty","_ref4","prop","isRegExp","reduceDescriptors","reducer","descriptors","getOwnPropertyDescriptors","reducedDescriptors","descriptor","name","ret","defineProperties","setImmediateSupported","postMessageSupported","token","callbacks","isAsyncFn","_setImmediate","setImmediate","postMessage","concat","Math","random","addEventListener","_ref5","source","data","shift","cb","push","setTimeout","asap","queueMicrotask","process","nextTick","utils$1","isBuffer","constructor","isFormData","kind","FormData","append","isArrayBufferView","ArrayBuffer","isView","buffer","isBoolean","isStream","pipe","merge","_ref2","this","caseless","result","assignValue","targetKey","extend","a","b","_ref3","trim","replace","stripBOM","content","charCodeAt","inherits","superConstructor","props","defineProperty","value","assign","toFlatObject","sourceObj","destObj","filter","propFilter","merged","endsWith","searchString","position","String","lastIndex","indexOf","toArray","arr","forEachEntry","_iterator","next","done","pair","matchAll","regExp","matches","exec","hasOwnProp","freezeMethods","enumerable","writable","set","Error","toObjectSet","arrayOrString","delimiter","define","split","toCamelCase","m","p1","p2","toUpperCase","noop","toFiniteNumber","defaultValue","Number","isFinite","isSpecCompliantForm","toJSONObject","stack","visit","target","reducedValue","isThenable","then","isIterable","AxiosError","message","code","config","request","response","captureStackTrace","status","utils","toJSON","description","number","fileName","lineNumber","columnNumber","from","error","customProps","axiosError","cause","isVisitable","removeBrackets","renderKey","path","dots","join","predicates","test","toFormData","formData","options","TypeError","metaTokens","indexes","option","visitor","defaultVisitor","useBlob","Blob","convertValue","toISOString","Buffer","JSON","stringify","some","isFlatArray","el","index","exposedHelpers","build","pop","encode","charMap","encodeURIComponent","match","AxiosURLSearchParams","params","_pairs","buildURL","url","_encode","serialize","serializedParams","serializeFn","hashmarkIndex","encoder","InterceptorManager$1","InterceptorManager","_classCallCheck","handlers","_createClass","fulfilled","rejected","synchronous","runWhen","id","h","transitionalDefaults","silentJSONParsing","forcedJSONParsing","clarifyTimeoutError","platform$1","isBrowser","classes","URLSearchParams","protocols","hasBrowserEnv","document","_navigator","navigator","hasStandardBrowserEnv","product","hasStandardBrowserWebWorkerEnv","WorkerGlobalScope","importScripts","origin","location","href","_objectSpread","platform","formDataToJSON","buildPath","isNumericKey","isLast","arrayToObject","entries","parsePropPath","defaults","transitional","adapter","transformRequest","headers","contentType","getContentType","hasJSONContentType","isObjectPayload","setContentType","helpers","isNode","toURLEncodedForm","formSerializer","_FormData","env","rawValue","parser","parse","e","stringifySafely","transformResponse","JSONRequested","responseType","strictJSONParsing","ERR_BAD_RESPONSE","timeout","xsrfCookieName","xsrfHeaderName","maxContentLength","maxBodyLength","validateStatus","common","Accept","method","defaults$1","ignoreDuplicateOf","$internals","normalizeHeader","header","normalizeValue","matchHeaderValue","isHeaderNameFilter","AxiosHeaders","_Symbol$iterator","_Symbol$toStringTag","valueOrRewrite","rewrite","setHeader","_value","_header","_rewrite","lHeader","setHeaders","rawHeaders","parsed","line","substring","parseHeaders","dest","_step","_createForOfIteratorHelper","s","n","entry","_toConsumableArray","err","f","tokens","tokensRE","parseTokens","matcher","deleted","deleteHeader","format","normalized","w","char","formatHeader","_this$constructor","_len","targets","asStrings","get","first","computed","_len2","_key2","accessors","defineAccessor","accessorName","methodName","arg1","arg2","arg3","configurable","buildAccessors","accessor","mapped","headerValue","AxiosHeaders$1","transformData","fns","normalize","isCancel","__CANCEL__","CanceledError","ERR_CANCELED","settle","resolve","reject","ERR_BAD_REQUEST","floor","speedometer","samplesCount","min","firstSampleTS","bytes","timestamps","head","tail","chunkLength","now","Date","startedAt","bytesCount","passed","round","throttle","freq","lastArgs","timer","timestamp","threshold","invoke","args","clearTimeout","progressEventReducer","listener","isDownloadStream","bytesNotified","_speedometer","loaded","total","lengthComputable","progressBytes","rate","_defineProperty","progress","estimated","event","progressEventDecorator","throttled","asyncDecorator","isMSIE","URL","protocol","host","port","userAgent","write","expires","domain","secure","cookie","toGMTString","read","RegExp","decodeURIComponent","remove","buildFullPath","baseURL","requestedURL","allowAbsoluteUrls","isRelativeUrl","relativeURL","combineURLs","headersToObject","mergeConfig","config1","config2","getMergedValue","mergeDeepProperties","valueFromConfig2","defaultToConfig2","mergeDirectKeys","mergeMap","paramsSerializer","timeoutMessage","withCredentials","withXSRFToken","onUploadProgress","onDownloadProgress","decompress","beforeRedirect","transport","httpAgent","httpsAgent","cancelToken","socketPath","responseEncoding","configValue","res","resolveConfig","newConfig","auth","btoa","username","password","unescape","Boolean","isURLSameOrigin","xsrfValue","cookies","xhrAdapter","XMLHttpRequest","Promise","onCanceled","uploadThrottled","downloadThrottled","flushUpload","flushDownload","_config","requestData","requestHeaders","unsubscribe","signal","removeEventListener","onloadend","responseHeaders","getAllResponseHeaders","responseText","statusText","open","onreadystatechange","readyState","responseURL","onabort","ECONNABORTED","onerror","ERR_NETWORK","ontimeout","timeoutErrorMessage","ETIMEDOUT","setRequestHeader","_progressEventReducer2","upload","_progressEventReducer4","cancel","abort","subscribe","aborted","send","composeSignals$1","signals","controller","AbortController","reason","streamChunk","_regeneratorRuntime","mark","chunk","chunkSize","pos","end","wrap","_context","prev","byteLength","abrupt","stop","readBytes","_wrapAsyncGenerator","_callee","iterable","_iteratorAbruptCompletion","_didIteratorError","_iteratorError","_context2","_asyncIterator","readStream","_awaitAsyncGenerator","sent","delegateYield","_asyncGeneratorDelegate","t1","finish","_x","_x2","_callee2","stream","reader","_yield$_awaitAsyncGen","_context3","asyncIterator","getReader","_x3","trackStream","onProgress","onFinish","_onFinish","ReadableStream","pull","_asyncToGenerator","_callee3","_yield$iterator$next","_done","loadedBytes","_context4","close","enqueue","t0","highWaterMark","isFetchSupported","fetch","Request","Response","isReadableStreamSupported","encodeText","TextEncoder","arrayBuffer","supportsRequestStream","duplexAccessed","hasContentType","body","duplex","has","supportsResponseStream","resolvers","_","ERR_NOT_SUPPORT","getBodyLength","_request","size","resolveBodyLength","getContentLength","_x4","_callee4","_resolveConfig","_resolveConfig$withCr","fetchOptions","composedSignal","requestContentLength","contentTypeHeader","_progressEventDecorat","_progressEventDecorat2","flush","isCredentialsSupported","isStreamResponse","responseContentLength","_ref6","_onProgress","_flush","responseData","composeSignals","toAbortSignal","credentials","t2","_x5","knownAdapters","http","xhr","fetchAdapter","renderReason","isResolvedHandle","adapters","nameOrAdapter","rejectedReasons","reasons","state","throwIfCancellationRequested","throwIfRequested","dispatchRequest","VERSION","validators","deprecatedWarnings","validators$1","validator","version","formatMessage","opt","desc","opts","ERR_DEPRECATED","console","warn","spelling","correctSpelling","assertOptions","schema","allowUnknown","ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","Axios","instanceConfig","interceptors","_request2","configOrUrl","dummy","baseUrl","withXsrfToken","contextHeaders","requestInterceptorChain","synchronousRequestInterceptors","interceptor","unshift","promise","responseInterceptorChain","chain","onFulfilled","onRejected","generateHTTPMethod","isForm","Axios$1","CancelToken","executor","resolvePromise","_listeners","onfulfilled","_resolve","splice","_this","c","CancelToken$1","HttpStatusCode","Continue","SwitchingProtocols","Processing","EarlyHints","Ok","Created","Accepted","NonAuthoritativeInformation","NoContent","ResetContent","PartialContent","MultiStatus","AlreadyReported","ImUsed","MultipleChoices","MovedPermanently","Found","SeeOther","NotModified","UseProxy","Unused","TemporaryRedirect","PermanentRedirect","BadRequest","Unauthorized","PaymentRequired","Forbidden","NotFound","MethodNotAllowed","NotAcceptable","ProxyAuthenticationRequired","RequestTimeout","Conflict","Gone","LengthRequired","PreconditionFailed","PayloadTooLarge","UriTooLong","UnsupportedMediaType","RangeNotSatisfiable","ExpectationFailed","ImATeapot","MisdirectedRequest","UnprocessableEntity","Locked","FailedDependency","TooEarly","UpgradeRequired","PreconditionRequired","TooManyRequests","RequestHeaderFieldsTooLarge","UnavailableForLegalReasons","InternalServerError","NotImplemented","BadGateway","ServiceUnavailable","GatewayTimeout","HttpVersionNotSupported","VariantAlsoNegotiates","InsufficientStorage","LoopDetected","NotExtended","NetworkAuthenticationRequired","HttpStatusCode$1","axios","createInstance","defaultConfig","instance","Cancel","all","promises","spread","callback","isAxiosError","payload","formToJSON","getAdapter"],"mappings":";w5XAEe,SAASA,EAAKC,EAAI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C,EF8DAT,GAAMvT,YAAcA,GAEpBuT,GAAM9b,aAAeA,GAErB8b,GAAMW,WAAa,SAAArxB,GAAK,OAAI0R,GAAe5F,GAAMtI,WAAWxD,GAAS,IAAIkG,SAASlG,GAASA,EAAM,EAEjG0wB,GAAMY,WAAaxI,GAEnB4H,GAAMjE,eAAiBA,GAEvBiE,GAAK,QAAWA"} node_modules/axios/dist/axios.js 0000664 00000433200 15114741631 0012777 0 ustar 00 /*! Axios v1.10.0 Copyright (c) 2025 Matt Zabriskie and contributors */ (function (global, factory) { typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() : typeof define === 'function' && define.amd ? define(factory) : (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.axios = factory()); })(this, (function () { 'use strict'; function _AsyncGenerator(e) { var r, t; function resume(r, t) { try { var n = e[r](t), o = n.value, u = o instanceof _OverloadYield; Promise.resolve(u ? o.v : o).then(function (t) { if (u) { var i = "return" === r ? "return" : "next"; if (!o.k || t.done) return resume(i, t); t = e[i](t).value; } settle(n.done ? "return" : "normal", t); }, function (e) { resume("throw", e); }); } catch (e) { settle("throw", e); } } function settle(e, n) { switch (e) { case "return": r.resolve({ value: n, done: !0 }); break; case "throw": r.reject(n); break; default: r.resolve({ value: n, done: !1 }); } (r = r.next) ? resume(r.key, r.arg) : t = null; } this._invoke = function (e, n) { return new Promise(function (o, u) { var i = { key: e, arg: n, resolve: o, reject: u, next: null }; t ? t = t.next = i : (r = t = i, resume(e, n)); }); }, "function" != typeof e.return && (this.return = void 0); } _AsyncGenerator.prototype["function" == typeof Symbol && Symbol.asyncIterator || "@@asyncIterator"] = function () { return this; }, _AsyncGenerator.prototype.next = function (e) { return this._invoke("next", e); }, _AsyncGenerator.prototype.throw = function (e) { return this._invoke("throw", e); }, _AsyncGenerator.prototype.return = function (e) { return this._invoke("return", e); }; function _OverloadYield(t, e) { this.v = t, this.k = e; } function _asyncGeneratorDelegate(t) { var e = {}, n = !1; function pump(e, r) { return n = !0, r = new Promise(function (n) { n(t[e](r)); }), { done: !1, value: new _OverloadYield(r, 1) }; } return e["undefined" != typeof Symbol && Symbol.iterator || "@@iterator"] = function () { return this; }, e.next = function (t) { return n ? (n = !1, t) : pump("next", t); }, "function" == typeof t.throw && (e.throw = function (t) { if (n) throw n = !1, t; return pump("throw", t); }), "function" == typeof t.return && (e.return = function (t) { return n ? (n = !1, t) : pump("return", t); }), e; } function _asyncIterator(r) { var n, t, o, e = 2; for ("undefined" != typeof Symbol && (t = Symbol.asyncIterator, o = Symbol.iterator); e--;) { if (t && null != (n = r[t])) return n.call(r); if (o && null != (n = r[o])) return new AsyncFromSyncIterator(n.call(r)); t = "@@asyncIterator", o = "@@iterator"; } throw new TypeError("Object is not async iterable"); } function AsyncFromSyncIterator(r) { function AsyncFromSyncIteratorContinuation(r) { if (Object(r) !== r) return Promise.reject(new TypeError(r + " is not an object.")); var n = r.done; return Promise.resolve(r.value).then(function (r) { return { value: r, done: n }; }); } return AsyncFromSyncIterator = function (r) { this.s = r, this.n = r.next; }, AsyncFromSyncIterator.prototype = { s: null, n: null, next: function () { return AsyncFromSyncIteratorContinuation(this.n.apply(this.s, arguments)); }, return: function (r) { var n = this.s.return; return void 0 === n ? Promise.resolve({ value: r, done: !0 }) : AsyncFromSyncIteratorContinuation(n.apply(this.s, arguments)); }, throw: function (r) { var n = this.s.return; return void 0 === n ? Promise.reject(r) : AsyncFromSyncIteratorContinuation(n.apply(this.s, arguments)); } }, new AsyncFromSyncIterator(r); } function _awaitAsyncGenerator(e) { return new _OverloadYield(e, 0); } function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } } function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; } function _objectSpread2(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; } function _regeneratorRuntime() { _regeneratorRuntime = function () { return e; }; var t, e = {}, r = Object.prototype, n = r.hasOwnProperty, o = Object.defineProperty || function (t, e, r) { t[e] = r.value; }, i = "function" == typeof Symbol ? Symbol : {}, a = i.iterator || "@@iterator", c = i.asyncIterator || "@@asyncIterator", u = i.toStringTag || "@@toStringTag"; function define(t, e, r) { return Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }), t[e]; } try { define({}, ""); } catch (t) { define = function (t, e, r) { return t[e] = r; }; } function wrap(t, e, r, n) { var i = e && e.prototype instanceof Generator ? e : Generator, a = Object.create(i.prototype), c = new Context(n || []); return o(a, "_invoke", { value: makeInvokeMethod(t, r, c) }), a; } function tryCatch(t, e, r) { try { return { type: "normal", arg: t.call(e, r) }; } catch (t) { return { type: "throw", arg: t }; } } e.wrap = wrap; var h = "suspendedStart", l = "suspendedYield", f = "executing", s = "completed", y = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var p = {}; define(p, a, function () { return this; }); var d = Object.getPrototypeOf, v = d && d(d(values([]))); v && v !== r && n.call(v, a) && (p = v); var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p); function defineIteratorMethods(t) { ["next", "throw", "return"].forEach(function (e) { define(t, e, function (t) { return this._invoke(e, t); }); }); } function AsyncIterator(t, e) { function invoke(r, o, i, a) { var c = tryCatch(t[r], t, o); if ("throw" !== c.type) { var u = c.arg, h = u.value; return h && "object" == typeof h && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) { invoke("next", t, i, a); }, function (t) { invoke("throw", t, i, a); }) : e.resolve(h).then(function (t) { u.value = t, i(u); }, function (t) { return invoke("throw", t, i, a); }); } a(c.arg); } var r; o(this, "_invoke", { value: function (t, n) { function callInvokeWithMethodAndArg() { return new e(function (e, r) { invoke(t, n, e, r); }); } return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(e, r, n) { var o = h; return function (i, a) { if (o === f) throw new Error("Generator is already running"); if (o === s) { if ("throw" === i) throw a; return { value: t, done: !0 }; } for (n.method = i, n.arg = a;;) { var c = n.delegate; if (c) { var u = maybeInvokeDelegate(c, n); if (u) { if (u === y) continue; return u; } } if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) { if (o === h) throw o = s, n.arg; n.dispatchException(n.arg); } else "return" === n.method && n.abrupt("return", n.arg); o = f; var p = tryCatch(e, r, n); if ("normal" === p.type) { if (o = n.done ? s : l, p.arg === y) continue; return { value: p.arg, done: n.done }; } "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg); } }; } function maybeInvokeDelegate(e, r) { var n = r.method, o = e.iterator[n]; if (o === t) return r.delegate = null, "throw" === n && e.iterator.return && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y; var i = tryCatch(o, e.iterator, r.arg); if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y; var a = i.arg; return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y); } function pushTryEntry(t) { var e = { tryLoc: t[0] }; 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e); } function resetTryEntry(t) { var e = t.completion || {}; e.type = "normal", delete e.arg, t.completion = e; } function Context(t) { this.tryEntries = [{ tryLoc: "root" }], t.forEach(pushTryEntry, this), this.reset(!0); } function values(e) { if (e || "" === e) { var r = e[a]; if (r) return r.call(e); if ("function" == typeof e.next) return e; if (!isNaN(e.length)) { var o = -1, i = function next() { for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next; return next.value = t, next.done = !0, next; }; return i.next = i; } } throw new TypeError(typeof e + " is not iterable"); } return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), o(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) { var e = "function" == typeof t && t.constructor; return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name)); }, e.mark = function (t) { return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t; }, e.awrap = function (t) { return { __await: t }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () { return this; }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) { void 0 === i && (i = Promise); var a = new AsyncIterator(wrap(t, r, n, o), i); return e.isGeneratorFunction(r) ? a : a.next().then(function (t) { return t.done ? t.value : a.next(); }); }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () { return this; }), define(g, "toString", function () { return "[object Generator]"; }), e.keys = function (t) { var e = Object(t), r = []; for (var n in e) r.push(n); return r.reverse(), function next() { for (; r.length;) { var t = r.pop(); if (t in e) return next.value = t, next.done = !1, next; } return next.done = !0, next; }; }, e.values = values, Context.prototype = { constructor: Context, reset: function (e) { if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t); }, stop: function () { this.done = !0; var t = this.tryEntries[0].completion; if ("throw" === t.type) throw t.arg; return this.rval; }, dispatchException: function (e) { if (this.done) throw e; var r = this; function handle(n, o) { return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o; } for (var o = this.tryEntries.length - 1; o >= 0; --o) { var i = this.tryEntries[o], a = i.completion; if ("root" === i.tryLoc) return handle("end"); if (i.tryLoc <= this.prev) { var c = n.call(i, "catchLoc"), u = n.call(i, "finallyLoc"); if (c && u) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } else if (c) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); } else { if (!u) throw new Error("try statement without catch or finally"); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } } } }, abrupt: function (t, e) { for (var r = this.tryEntries.length - 1; r >= 0; --r) { var o = this.tryEntries[r]; if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) { var i = o; break; } } i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); var a = i ? i.completion : {}; return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a); }, complete: function (t, e) { if ("throw" === t.type) throw t.arg; return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y; }, finish: function (t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y; } }, catch: function (t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.tryLoc === t) { var n = r.completion; if ("throw" === n.type) { var o = n.arg; resetTryEntry(r); } return o; } } throw new Error("illegal catch attempt"); }, delegateYield: function (e, r, n) { return this.delegate = { iterator: values(e), resultName: r, nextLoc: n }, "next" === this.method && (this.arg = t), y; } }, e; } function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : String(i); } function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); } function _wrapAsyncGenerator(fn) { return function () { return new _AsyncGenerator(fn.apply(this, arguments)); }; } function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } } function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } } function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; } function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); } function _toArray(arr) { return _arrayWithHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableRest(); } function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); } function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); } function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; } function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); } function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); } function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; } function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function () {}; return { s: F, n: function () { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function (e) { throw e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function () { it = it.call(o); }, n: function () { var step = it.next(); normalCompletion = step.done; return step; }, e: function (e) { didErr = true; err = e; }, f: function () { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; } function bind(fn, thisArg) { return function wrap() { return fn.apply(thisArg, arguments); }; } // utils is a library of generic helper functions non-specific to axios var toString = Object.prototype.toString; var getPrototypeOf = Object.getPrototypeOf; var iterator = Symbol.iterator, toStringTag = Symbol.toStringTag; var kindOf = function (cache) { return function (thing) { var str = toString.call(thing); return cache[str] || (cache[str] = str.slice(8, -1).toLowerCase()); }; }(Object.create(null)); var kindOfTest = function kindOfTest(type) { type = type.toLowerCase(); return function (thing) { return kindOf(thing) === type; }; }; var typeOfTest = function typeOfTest(type) { return function (thing) { return _typeof(thing) === type; }; }; /** * Determine if a value is an Array * * @param {Object} val The value to test * * @returns {boolean} True if value is an Array, otherwise false */ var isArray = Array.isArray; /** * Determine if a value is undefined * * @param {*} val The value to test * * @returns {boolean} True if the value is undefined, otherwise false */ var isUndefined = typeOfTest('undefined'); /** * Determine if a value is a Buffer * * @param {*} val The value to test * * @returns {boolean} True if value is a Buffer, otherwise false */ function isBuffer(val) { return val !== null && !isUndefined(val) && val.constructor !== null && !isUndefined(val.constructor) && isFunction(val.constructor.isBuffer) && val.constructor.isBuffer(val); } /** * Determine if a value is an ArrayBuffer * * @param {*} val The value to test * * @returns {boolean} True if value is an ArrayBuffer, otherwise false */ var isArrayBuffer = kindOfTest('ArrayBuffer'); /** * Determine if a value is a view on an ArrayBuffer * * @param {*} val The value to test * * @returns {boolean} True if value is a view on an ArrayBuffer, otherwise false */ function isArrayBufferView(val) { var result; if (typeof ArrayBuffer !== 'undefined' && ArrayBuffer.isView) { result = ArrayBuffer.isView(val); } else { result = val && val.buffer && isArrayBuffer(val.buffer); } return result; } /** * Determine if a value is a String * * @param {*} val The value to test * * @returns {boolean} True if value is a String, otherwise false */ var isString = typeOfTest('string'); /** * Determine if a value is a Function * * @param {*} val The value to test * @returns {boolean} True if value is a Function, otherwise false */ var isFunction = typeOfTest('function'); /** * Determine if a value is a Number * * @param {*} val The value to test * * @returns {boolean} True if value is a Number, otherwise false */ var isNumber = typeOfTest('number'); /** * Determine if a value is an Object * * @param {*} thing The value to test * * @returns {boolean} True if value is an Object, otherwise false */ var isObject = function isObject(thing) { return thing !== null && _typeof(thing) === 'object'; }; /** * Determine if a value is a Boolean * * @param {*} thing The value to test * @returns {boolean} True if value is a Boolean, otherwise false */ var isBoolean = function isBoolean(thing) { return thing === true || thing === false; }; /** * Determine if a value is a plain Object * * @param {*} val The value to test * * @returns {boolean} True if value is a plain Object, otherwise false */ var isPlainObject = function isPlainObject(val) { if (kindOf(val) !== 'object') { return false; } var prototype = getPrototypeOf(val); return (prototype === null || prototype === Object.prototype || Object.getPrototypeOf(prototype) === null) && !(toStringTag in val) && !(iterator in val); }; /** * Determine if a value is a Date * * @param {*} val The value to test * * @returns {boolean} True if value is a Date, otherwise false */ var isDate = kindOfTest('Date'); /** * Determine if a value is a File * * @param {*} val The value to test * * @returns {boolean} True if value is a File, otherwise false */ var isFile = kindOfTest('File'); /** * Determine if a value is a Blob * * @param {*} val The value to test * * @returns {boolean} True if value is a Blob, otherwise false */ var isBlob = kindOfTest('Blob'); /** * Determine if a value is a FileList * * @param {*} val The value to test * * @returns {boolean} True if value is a File, otherwise false */ var isFileList = kindOfTest('FileList'); /** * Determine if a value is a Stream * * @param {*} val The value to test * * @returns {boolean} True if value is a Stream, otherwise false */ var isStream = function isStream(val) { return isObject(val) && isFunction(val.pipe); }; /** * Determine if a value is a FormData * * @param {*} thing The value to test * * @returns {boolean} True if value is an FormData, otherwise false */ var isFormData = function isFormData(thing) { var kind; return thing && (typeof FormData === 'function' && thing instanceof FormData || isFunction(thing.append) && ((kind = kindOf(thing)) === 'formdata' || // detect form-data instance kind === 'object' && isFunction(thing.toString) && thing.toString() === '[object FormData]')); }; /** * Determine if a value is a URLSearchParams object * * @param {*} val The value to test * * @returns {boolean} True if value is a URLSearchParams object, otherwise false */ var isURLSearchParams = kindOfTest('URLSearchParams'); var _map = ['ReadableStream', 'Request', 'Response', 'Headers'].map(kindOfTest), _map2 = _slicedToArray(_map, 4), isReadableStream = _map2[0], isRequest = _map2[1], isResponse = _map2[2], isHeaders = _map2[3]; /** * Trim excess whitespace off the beginning and end of a string * * @param {String} str The String to trim * * @returns {String} The String freed of excess whitespace */ var trim = function trim(str) { return str.trim ? str.trim() : str.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, ''); }; /** * Iterate over an Array or an Object invoking a function for each item. * * If `obj` is an Array callback will be called passing * the value, index, and complete array for each item. * * If 'obj' is an Object callback will be called passing * the value, key, and complete object for each property. * * @param {Object|Array} obj The object to iterate * @param {Function} fn The callback to invoke for each item * * @param {Boolean} [allOwnKeys = false] * @returns {any} */ function forEach(obj, fn) { var _ref = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {}, _ref$allOwnKeys = _ref.allOwnKeys, allOwnKeys = _ref$allOwnKeys === void 0 ? false : _ref$allOwnKeys; // Don't bother if no value provided if (obj === null || typeof obj === 'undefined') { return; } var i; var l; // Force an array if not already something iterable if (_typeof(obj) !== 'object') { /*eslint no-param-reassign:0*/ obj = [obj]; } if (isArray(obj)) { // Iterate over array values for (i = 0, l = obj.length; i < l; i++) { fn.call(null, obj[i], i, obj); } } else { // Iterate over object keys var keys = allOwnKeys ? Object.getOwnPropertyNames(obj) : Object.keys(obj); var len = keys.length; var key; for (i = 0; i < len; i++) { key = keys[i]; fn.call(null, obj[key], key, obj); } } } function findKey(obj, key) { key = key.toLowerCase(); var keys = Object.keys(obj); var i = keys.length; var _key; while (i-- > 0) { _key = keys[i]; if (key === _key.toLowerCase()) { return _key; } } return null; } var _global = function () { /*eslint no-undef:0*/ if (typeof globalThis !== "undefined") return globalThis; return typeof self !== "undefined" ? self : typeof window !== 'undefined' ? window : global; }(); var isContextDefined = function isContextDefined(context) { return !isUndefined(context) && context !== _global; }; /** * Accepts varargs expecting each argument to be an object, then * immutably merges the properties of each object and returns result. * * When multiple objects contain the same key the later object in * the arguments list will take precedence. * * Example: * * ```js * var result = merge({foo: 123}, {foo: 456}); * console.log(result.foo); // outputs 456 * ``` * * @param {Object} obj1 Object to merge * * @returns {Object} Result of all merge properties */ function merge( /* obj1, obj2, obj3, ... */ ) { var _ref2 = isContextDefined(this) && this || {}, caseless = _ref2.caseless; var result = {}; var assignValue = function assignValue(val, key) { var targetKey = caseless && findKey(result, key) || key; if (isPlainObject(result[targetKey]) && isPlainObject(val)) { result[targetKey] = merge(result[targetKey], val); } else if (isPlainObject(val)) { result[targetKey] = merge({}, val); } else if (isArray(val)) { result[targetKey] = val.slice(); } else { result[targetKey] = val; } }; for (var i = 0, l = arguments.length; i < l; i++) { arguments[i] && forEach(arguments[i], assignValue); } return result; } /** * Extends object a by mutably adding to it the properties of object b. * * @param {Object} a The object to be extended * @param {Object} b The object to copy properties from * @param {Object} thisArg The object to bind function to * * @param {Boolean} [allOwnKeys] * @returns {Object} The resulting value of object a */ var extend = function extend(a, b, thisArg) { var _ref3 = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {}, allOwnKeys = _ref3.allOwnKeys; forEach(b, function (val, key) { if (thisArg && isFunction(val)) { a[key] = bind(val, thisArg); } else { a[key] = val; } }, { allOwnKeys: allOwnKeys }); return a; }; /** * Remove byte order marker. This catches EF BB BF (the UTF-8 BOM) * * @param {string} content with BOM * * @returns {string} content value without BOM */ var stripBOM = function stripBOM(content) { if (content.charCodeAt(0) === 0xFEFF) { content = content.slice(1); } return content; }; /** * Inherit the prototype methods from one constructor into another * @param {function} constructor * @param {function} superConstructor * @param {object} [props] * @param {object} [descriptors] * * @returns {void} */ var inherits = function inherits(constructor, superConstructor, props, descriptors) { constructor.prototype = Object.create(superConstructor.prototype, descriptors); constructor.prototype.constructor = constructor; Object.defineProperty(constructor, 'super', { value: superConstructor.prototype }); props && Object.assign(constructor.prototype, props); }; /** * Resolve object with deep prototype chain to a flat object * @param {Object} sourceObj source object * @param {Object} [destObj] * @param {Function|Boolean} [filter] * @param {Function} [propFilter] * * @returns {Object} */ var toFlatObject = function toFlatObject(sourceObj, destObj, filter, propFilter) { var props; var i; var prop; var merged = {}; destObj = destObj || {}; // eslint-disable-next-line no-eq-null,eqeqeq if (sourceObj == null) return destObj; do { props = Object.getOwnPropertyNames(sourceObj); i = props.length; while (i-- > 0) { prop = props[i]; if ((!propFilter || propFilter(prop, sourceObj, destObj)) && !merged[prop]) { destObj[prop] = sourceObj[prop]; merged[prop] = true; } } sourceObj = filter !== false && getPrototypeOf(sourceObj); } while (sourceObj && (!filter || filter(sourceObj, destObj)) && sourceObj !== Object.prototype); return destObj; }; /** * Determines whether a string ends with the characters of a specified string * * @param {String} str * @param {String} searchString * @param {Number} [position= 0] * * @returns {boolean} */ var endsWith = function endsWith(str, searchString, position) { str = String(str); if (position === undefined || position > str.length) { position = str.length; } position -= searchString.length; var lastIndex = str.indexOf(searchString, position); return lastIndex !== -1 && lastIndex === position; }; /** * Returns new array from array like object or null if failed * * @param {*} [thing] * * @returns {?Array} */ var toArray = function toArray(thing) { if (!thing) return null; if (isArray(thing)) return thing; var i = thing.length; if (!isNumber(i)) return null; var arr = new Array(i); while (i-- > 0) { arr[i] = thing[i]; } return arr; }; /** * Checking if the Uint8Array exists and if it does, it returns a function that checks if the * thing passed in is an instance of Uint8Array * * @param {TypedArray} * * @returns {Array} */ // eslint-disable-next-line func-names var isTypedArray = function (TypedArray) { // eslint-disable-next-line func-names return function (thing) { return TypedArray && thing instanceof TypedArray; }; }(typeof Uint8Array !== 'undefined' && getPrototypeOf(Uint8Array)); /** * For each entry in the object, call the function with the key and value. * * @param {Object<any, any>} obj - The object to iterate over. * @param {Function} fn - The function to call for each entry. * * @returns {void} */ var forEachEntry = function forEachEntry(obj, fn) { var generator = obj && obj[iterator]; var _iterator = generator.call(obj); var result; while ((result = _iterator.next()) && !result.done) { var pair = result.value; fn.call(obj, pair[0], pair[1]); } }; /** * It takes a regular expression and a string, and returns an array of all the matches * * @param {string} regExp - The regular expression to match against. * @param {string} str - The string to search. * * @returns {Array<boolean>} */ var matchAll = function matchAll(regExp, str) { var matches; var arr = []; while ((matches = regExp.exec(str)) !== null) { arr.push(matches); } return arr; }; /* Checking if the kindOfTest function returns true when passed an HTMLFormElement. */ var isHTMLForm = kindOfTest('HTMLFormElement'); var toCamelCase = function toCamelCase(str) { return str.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g, function replacer(m, p1, p2) { return p1.toUpperCase() + p2; }); }; /* Creating a function that will check if an object has a property. */ var hasOwnProperty = function (_ref4) { var hasOwnProperty = _ref4.hasOwnProperty; return function (obj, prop) { return hasOwnProperty.call(obj, prop); }; }(Object.prototype); /** * Determine if a value is a RegExp object * * @param {*} val The value to test * * @returns {boolean} True if value is a RegExp object, otherwise false */ var isRegExp = kindOfTest('RegExp'); var reduceDescriptors = function reduceDescriptors(obj, reducer) { var descriptors = Object.getOwnPropertyDescriptors(obj); var reducedDescriptors = {}; forEach(descriptors, function (descriptor, name) { var ret; if ((ret = reducer(descriptor, name, obj)) !== false) { reducedDescriptors[name] = ret || descriptor; } }); Object.defineProperties(obj, reducedDescriptors); }; /** * Makes all methods read-only * @param {Object} obj */ var freezeMethods = function freezeMethods(obj) { reduceDescriptors(obj, function (descriptor, name) { // skip restricted props in strict mode if (isFunction(obj) && ['arguments', 'caller', 'callee'].indexOf(name) !== -1) { return false; } var value = obj[name]; if (!isFunction(value)) return; descriptor.enumerable = false; if ('writable' in descriptor) { descriptor.writable = false; return; } if (!descriptor.set) { descriptor.set = function () { throw Error('Can not rewrite read-only method \'' + name + '\''); }; } }); }; var toObjectSet = function toObjectSet(arrayOrString, delimiter) { var obj = {}; var define = function define(arr) { arr.forEach(function (value) { obj[value] = true; }); }; isArray(arrayOrString) ? define(arrayOrString) : define(String(arrayOrString).split(delimiter)); return obj; }; var noop = function noop() {}; var toFiniteNumber = function toFiniteNumber(value, defaultValue) { return value != null && Number.isFinite(value = +value) ? value : defaultValue; }; /** * If the thing is a FormData object, return true, otherwise return false. * * @param {unknown} thing - The thing to check. * * @returns {boolean} */ function isSpecCompliantForm(thing) { return !!(thing && isFunction(thing.append) && thing[toStringTag] === 'FormData' && thing[iterator]); } var toJSONObject = function toJSONObject(obj) { var stack = new Array(10); var visit = function visit(source, i) { if (isObject(source)) { if (stack.indexOf(source) >= 0) { return; } if (!('toJSON' in source)) { stack[i] = source; var target = isArray(source) ? [] : {}; forEach(source, function (value, key) { var reducedValue = visit(value, i + 1); !isUndefined(reducedValue) && (target[key] = reducedValue); }); stack[i] = undefined; return target; } } return source; }; return visit(obj, 0); }; var isAsyncFn = kindOfTest('AsyncFunction'); var isThenable = function isThenable(thing) { return thing && (isObject(thing) || isFunction(thing)) && isFunction(thing.then) && isFunction(thing["catch"]); }; // original code // https://github.com/DigitalBrainJS/AxiosPromise/blob/16deab13710ec09779922131f3fa5954320f83ab/lib/utils.js#L11-L34 var _setImmediate = function (setImmediateSupported, postMessageSupported) { if (setImmediateSupported) { return setImmediate; } return postMessageSupported ? function (token, callbacks) { _global.addEventListener("message", function (_ref5) { var source = _ref5.source, data = _ref5.data; if (source === _global && data === token) { callbacks.length && callbacks.shift()(); } }, false); return function (cb) { callbacks.push(cb); _global.postMessage(token, "*"); }; }("axios@".concat(Math.random()), []) : function (cb) { return setTimeout(cb); }; }(typeof setImmediate === 'function', isFunction(_global.postMessage)); var asap = typeof queueMicrotask !== 'undefined' ? queueMicrotask.bind(_global) : typeof process !== 'undefined' && process.nextTick || _setImmediate; // ********************* var isIterable = function isIterable(thing) { return thing != null && isFunction(thing[iterator]); }; var utils$1 = { isArray: isArray, isArrayBuffer: isArrayBuffer, isBuffer: isBuffer, isFormData: isFormData, isArrayBufferView: isArrayBufferView, isString: isString, isNumber: isNumber, isBoolean: isBoolean, isObject: isObject, isPlainObject: isPlainObject, isReadableStream: isReadableStream, isRequest: isRequest, isResponse: isResponse, isHeaders: isHeaders, isUndefined: isUndefined, isDate: isDate, isFile: isFile, isBlob: isBlob, isRegExp: isRegExp, isFunction: isFunction, isStream: isStream, isURLSearchParams: isURLSearchParams, isTypedArray: isTypedArray, isFileList: isFileList, forEach: forEach, merge: merge, extend: extend, trim: trim, stripBOM: stripBOM, inherits: inherits, toFlatObject: toFlatObject, kindOf: kindOf, kindOfTest: kindOfTest, endsWith: endsWith, toArray: toArray, forEachEntry: forEachEntry, matchAll: matchAll, isHTMLForm: isHTMLForm, hasOwnProperty: hasOwnProperty, hasOwnProp: hasOwnProperty, // an alias to avoid ESLint no-prototype-builtins detection reduceDescriptors: reduceDescriptors, freezeMethods: freezeMethods, toObjectSet: toObjectSet, toCamelCase: toCamelCase, noop: noop, toFiniteNumber: toFiniteNumber, findKey: findKey, global: _global, isContextDefined: isContextDefined, isSpecCompliantForm: isSpecCompliantForm, toJSONObject: toJSONObject, isAsyncFn: isAsyncFn, isThenable: isThenable, setImmediate: _setImmediate, asap: asap, isIterable: isIterable }; /** * Create an Error with the specified message, config, error code, request and response. * * @param {string} message The error message. * @param {string} [code] The error code (for example, 'ECONNABORTED'). * @param {Object} [config] The config. * @param {Object} [request] The request. * @param {Object} [response] The response. * * @returns {Error} The created error. */ function AxiosError(message, code, config, request, response) { Error.call(this); if (Error.captureStackTrace) { Error.captureStackTrace(this, this.constructor); } else { this.stack = new Error().stack; } this.message = message; this.name = 'AxiosError'; code && (this.code = code); config && (this.config = config); request && (this.request = request); if (response) { this.response = response; this.status = response.status ? response.status : null; } } utils$1.inherits(AxiosError, Error, { toJSON: function toJSON() { return { // Standard message: this.message, name: this.name, // Microsoft description: this.description, number: this.number, // Mozilla fileName: this.fileName, lineNumber: this.lineNumber, columnNumber: this.columnNumber, stack: this.stack, // Axios config: utils$1.toJSONObject(this.config), code: this.code, status: this.status }; } }); var prototype$1 = AxiosError.prototype; var descriptors = {}; ['ERR_BAD_OPTION_VALUE', 'ERR_BAD_OPTION', 'ECONNABORTED', 'ETIMEDOUT', 'ERR_NETWORK', 'ERR_FR_TOO_MANY_REDIRECTS', 'ERR_DEPRECATED', 'ERR_BAD_RESPONSE', 'ERR_BAD_REQUEST', 'ERR_CANCELED', 'ERR_NOT_SUPPORT', 'ERR_INVALID_URL' // eslint-disable-next-line func-names ].forEach(function (code) { descriptors[code] = { value: code }; }); Object.defineProperties(AxiosError, descriptors); Object.defineProperty(prototype$1, 'isAxiosError', { value: true }); // eslint-disable-next-line func-names AxiosError.from = function (error, code, config, request, response, customProps) { var axiosError = Object.create(prototype$1); utils$1.toFlatObject(error, axiosError, function filter(obj) { return obj !== Error.prototype; }, function (prop) { return prop !== 'isAxiosError'; }); AxiosError.call(axiosError, error.message, code, config, request, response); axiosError.cause = error; axiosError.name = error.name; customProps && Object.assign(axiosError, customProps); return axiosError; }; // eslint-disable-next-line strict var httpAdapter = null; /** * Determines if the given thing is a array or js object. * * @param {string} thing - The object or array to be visited. * * @returns {boolean} */ function isVisitable(thing) { return utils$1.isPlainObject(thing) || utils$1.isArray(thing); } /** * It removes the brackets from the end of a string * * @param {string} key - The key of the parameter. * * @returns {string} the key without the brackets. */ function removeBrackets(key) { return utils$1.endsWith(key, '[]') ? key.slice(0, -2) : key; } /** * It takes a path, a key, and a boolean, and returns a string * * @param {string} path - The path to the current key. * @param {string} key - The key of the current object being iterated over. * @param {string} dots - If true, the key will be rendered with dots instead of brackets. * * @returns {string} The path to the current key. */ function renderKey(path, key, dots) { if (!path) return key; return path.concat(key).map(function each(token, i) { // eslint-disable-next-line no-param-reassign token = removeBrackets(token); return !dots && i ? '[' + token + ']' : token; }).join(dots ? '.' : ''); } /** * If the array is an array and none of its elements are visitable, then it's a flat array. * * @param {Array<any>} arr - The array to check * * @returns {boolean} */ function isFlatArray(arr) { return utils$1.isArray(arr) && !arr.some(isVisitable); } var predicates = utils$1.toFlatObject(utils$1, {}, null, function filter(prop) { return /^is[A-Z]/.test(prop); }); /** * Convert a data object to FormData * * @param {Object} obj * @param {?Object} [formData] * @param {?Object} [options] * @param {Function} [options.visitor] * @param {Boolean} [options.metaTokens = true] * @param {Boolean} [options.dots = false] * @param {?Boolean} [options.indexes = false] * * @returns {Object} **/ /** * It converts an object into a FormData object * * @param {Object<any, any>} obj - The object to convert to form data. * @param {string} formData - The FormData object to append to. * @param {Object<string, any>} options * * @returns */ function toFormData(obj, formData, options) { if (!utils$1.isObject(obj)) { throw new TypeError('target must be an object'); } // eslint-disable-next-line no-param-reassign formData = formData || new (FormData)(); // eslint-disable-next-line no-param-reassign options = utils$1.toFlatObject(options, { metaTokens: true, dots: false, indexes: false }, false, function defined(option, source) { // eslint-disable-next-line no-eq-null,eqeqeq return !utils$1.isUndefined(source[option]); }); var metaTokens = options.metaTokens; // eslint-disable-next-line no-use-before-define var visitor = options.visitor || defaultVisitor; var dots = options.dots; var indexes = options.indexes; var _Blob = options.Blob || typeof Blob !== 'undefined' && Blob; var useBlob = _Blob && utils$1.isSpecCompliantForm(formData); if (!utils$1.isFunction(visitor)) { throw new TypeError('visitor must be a function'); } function convertValue(value) { if (value === null) return ''; if (utils$1.isDate(value)) { return value.toISOString(); } if (utils$1.isBoolean(value)) { return value.toString(); } if (!useBlob && utils$1.isBlob(value)) { throw new AxiosError('Blob is not supported. Use a Buffer instead.'); } if (utils$1.isArrayBuffer(value) || utils$1.isTypedArray(value)) { return useBlob && typeof Blob === 'function' ? new Blob([value]) : Buffer.from(value); } return value; } /** * Default visitor. * * @param {*} value * @param {String|Number} key * @param {Array<String|Number>} path * @this {FormData} * * @returns {boolean} return true to visit the each prop of the value recursively */ function defaultVisitor(value, key, path) { var arr = value; if (value && !path && _typeof(value) === 'object') { if (utils$1.endsWith(key, '{}')) { // eslint-disable-next-line no-param-reassign key = metaTokens ? key : key.slice(0, -2); // eslint-disable-next-line no-param-reassign value = JSON.stringify(value); } else if (utils$1.isArray(value) && isFlatArray(value) || (utils$1.isFileList(value) || utils$1.endsWith(key, '[]')) && (arr = utils$1.toArray(value))) { // eslint-disable-next-line no-param-reassign key = removeBrackets(key); arr.forEach(function each(el, index) { !(utils$1.isUndefined(el) || el === null) && formData.append( // eslint-disable-next-line no-nested-ternary indexes === true ? renderKey([key], index, dots) : indexes === null ? key : key + '[]', convertValue(el)); }); return false; } } if (isVisitable(value)) { return true; } formData.append(renderKey(path, key, dots), convertValue(value)); return false; } var stack = []; var exposedHelpers = Object.assign(predicates, { defaultVisitor: defaultVisitor, convertValue: convertValue, isVisitable: isVisitable }); function build(value, path) { if (utils$1.isUndefined(value)) return; if (stack.indexOf(value) !== -1) { throw Error('Circular reference detected in ' + path.join('.')); } stack.push(value); utils$1.forEach(value, function each(el, key) { var result = !(utils$1.isUndefined(el) || el === null) && visitor.call(formData, el, utils$1.isString(key) ? key.trim() : key, path, exposedHelpers); if (result === true) { build(el, path ? path.concat(key) : [key]); } }); stack.pop(); } if (!utils$1.isObject(obj)) { throw new TypeError('data must be an object'); } build(obj); return formData; } /** * It encodes a string by replacing all characters that are not in the unreserved set with * their percent-encoded equivalents * * @param {string} str - The string to encode. * * @returns {string} The encoded string. */ function encode$1(str) { var charMap = { '!': '%21', "'": '%27', '(': '%28', ')': '%29', '~': '%7E', '%20': '+', '%00': '\x00' }; return encodeURIComponent(str).replace(/[!'()~]|%20|%00/g, function replacer(match) { return charMap[match]; }); } /** * It takes a params object and converts it to a FormData object * * @param {Object<string, any>} params - The parameters to be converted to a FormData object. * @param {Object<string, any>} options - The options object passed to the Axios constructor. * * @returns {void} */ function AxiosURLSearchParams(params, options) { this._pairs = []; params && toFormData(params, this, options); } var prototype = AxiosURLSearchParams.prototype; prototype.append = function append(name, value) { this._pairs.push([name, value]); }; prototype.toString = function toString(encoder) { var _encode = encoder ? function (value) { return encoder.call(this, value, encode$1); } : encode$1; return this._pairs.map(function each(pair) { return _encode(pair[0]) + '=' + _encode(pair[1]); }, '').join('&'); }; /** * It replaces all instances of the characters `:`, `$`, `,`, `+`, `[`, and `]` with their * URI encoded counterparts * * @param {string} val The value to be encoded. * * @returns {string} The encoded value. */ function encode(val) { return encodeURIComponent(val).replace(/%3A/gi, ':').replace(/%24/g, '$').replace(/%2C/gi, ',').replace(/%20/g, '+').replace(/%5B/gi, '[').replace(/%5D/gi, ']'); } /** * Build a URL by appending params to the end * * @param {string} url The base of the url (e.g., http://www.google.com) * @param {object} [params] The params to be appended * @param {?(object|Function)} options * * @returns {string} The formatted url */ function buildURL(url, params, options) { /*eslint no-param-reassign:0*/ if (!params) { return url; } var _encode = options && options.encode || encode; if (utils$1.isFunction(options)) { options = { serialize: options }; } var serializeFn = options && options.serialize; var serializedParams; if (serializeFn) { serializedParams = serializeFn(params, options); } else { serializedParams = utils$1.isURLSearchParams(params) ? params.toString() : new AxiosURLSearchParams(params, options).toString(_encode); } if (serializedParams) { var hashmarkIndex = url.indexOf("#"); if (hashmarkIndex !== -1) { url = url.slice(0, hashmarkIndex); } url += (url.indexOf('?') === -1 ? '?' : '&') + serializedParams; } return url; } var InterceptorManager = /*#__PURE__*/function () { function InterceptorManager() { _classCallCheck(this, InterceptorManager); this.handlers = []; } /** * Add a new interceptor to the stack * * @param {Function} fulfilled The function to handle `then` for a `Promise` * @param {Function} rejected The function to handle `reject` for a `Promise` * * @return {Number} An ID used to remove interceptor later */ _createClass(InterceptorManager, [{ key: "use", value: function use(fulfilled, rejected, options) { this.handlers.push({ fulfilled: fulfilled, rejected: rejected, synchronous: options ? options.synchronous : false, runWhen: options ? options.runWhen : null }); return this.handlers.length - 1; } /** * Remove an interceptor from the stack * * @param {Number} id The ID that was returned by `use` * * @returns {Boolean} `true` if the interceptor was removed, `false` otherwise */ }, { key: "eject", value: function eject(id) { if (this.handlers[id]) { this.handlers[id] = null; } } /** * Clear all interceptors from the stack * * @returns {void} */ }, { key: "clear", value: function clear() { if (this.handlers) { this.handlers = []; } } /** * Iterate over all the registered interceptors * * This method is particularly useful for skipping over any * interceptors that may have become `null` calling `eject`. * * @param {Function} fn The function to call for each interceptor * * @returns {void} */ }, { key: "forEach", value: function forEach(fn) { utils$1.forEach(this.handlers, function forEachHandler(h) { if (h !== null) { fn(h); } }); } }]); return InterceptorManager; }(); var InterceptorManager$1 = InterceptorManager; var transitionalDefaults = { silentJSONParsing: true, forcedJSONParsing: true, clarifyTimeoutError: false }; var URLSearchParams$1 = typeof URLSearchParams !== 'undefined' ? URLSearchParams : AxiosURLSearchParams; var FormData$1 = typeof FormData !== 'undefined' ? FormData : null; var Blob$1 = typeof Blob !== 'undefined' ? Blob : null; var platform$1 = { isBrowser: true, classes: { URLSearchParams: URLSearchParams$1, FormData: FormData$1, Blob: Blob$1 }, protocols: ['http', 'https', 'file', 'blob', 'url', 'data'] }; var hasBrowserEnv = typeof window !== 'undefined' && typeof document !== 'undefined'; var _navigator = (typeof navigator === "undefined" ? "undefined" : _typeof(navigator)) === 'object' && navigator || undefined; /** * Determine if we're running in a standard browser environment * * This allows axios to run in a web worker, and react-native. * Both environments support XMLHttpRequest, but not fully standard globals. * * web workers: * typeof window -> undefined * typeof document -> undefined * * react-native: * navigator.product -> 'ReactNative' * nativescript * navigator.product -> 'NativeScript' or 'NS' * * @returns {boolean} */ var hasStandardBrowserEnv = hasBrowserEnv && (!_navigator || ['ReactNative', 'NativeScript', 'NS'].indexOf(_navigator.product) < 0); /** * Determine if we're running in a standard browser webWorker environment * * Although the `isStandardBrowserEnv` method indicates that * `allows axios to run in a web worker`, the WebWorker will still be * filtered out due to its judgment standard * `typeof window !== 'undefined' && typeof document !== 'undefined'`. * This leads to a problem when axios post `FormData` in webWorker */ var hasStandardBrowserWebWorkerEnv = function () { return typeof WorkerGlobalScope !== 'undefined' && // eslint-disable-next-line no-undef self instanceof WorkerGlobalScope && typeof self.importScripts === 'function'; }(); var origin = hasBrowserEnv && window.location.href || 'http://localhost'; var utils = /*#__PURE__*/Object.freeze({ __proto__: null, hasBrowserEnv: hasBrowserEnv, hasStandardBrowserWebWorkerEnv: hasStandardBrowserWebWorkerEnv, hasStandardBrowserEnv: hasStandardBrowserEnv, navigator: _navigator, origin: origin }); var platform = _objectSpread2(_objectSpread2({}, utils), platform$1); function toURLEncodedForm(data, options) { return toFormData(data, new platform.classes.URLSearchParams(), Object.assign({ visitor: function visitor(value, key, path, helpers) { if (platform.isNode && utils$1.isBuffer(value)) { this.append(key, value.toString('base64')); return false; } return helpers.defaultVisitor.apply(this, arguments); } }, options)); } /** * It takes a string like `foo[x][y][z]` and returns an array like `['foo', 'x', 'y', 'z'] * * @param {string} name - The name of the property to get. * * @returns An array of strings. */ function parsePropPath(name) { // foo[x][y][z] // foo.x.y.z // foo-x-y-z // foo x y z return utils$1.matchAll(/\w+|\[(\w*)]/g, name).map(function (match) { return match[0] === '[]' ? '' : match[1] || match[0]; }); } /** * Convert an array to an object. * * @param {Array<any>} arr - The array to convert to an object. * * @returns An object with the same keys and values as the array. */ function arrayToObject(arr) { var obj = {}; var keys = Object.keys(arr); var i; var len = keys.length; var key; for (i = 0; i < len; i++) { key = keys[i]; obj[key] = arr[key]; } return obj; } /** * It takes a FormData object and returns a JavaScript object * * @param {string} formData The FormData object to convert to JSON. * * @returns {Object<string, any> | null} The converted object. */ function formDataToJSON(formData) { function buildPath(path, value, target, index) { var name = path[index++]; if (name === '__proto__') return true; var isNumericKey = Number.isFinite(+name); var isLast = index >= path.length; name = !name && utils$1.isArray(target) ? target.length : name; if (isLast) { if (utils$1.hasOwnProp(target, name)) { target[name] = [target[name], value]; } else { target[name] = value; } return !isNumericKey; } if (!target[name] || !utils$1.isObject(target[name])) { target[name] = []; } var result = buildPath(path, value, target[name], index); if (result && utils$1.isArray(target[name])) { target[name] = arrayToObject(target[name]); } return !isNumericKey; } if (utils$1.isFormData(formData) && utils$1.isFunction(formData.entries)) { var obj = {}; utils$1.forEachEntry(formData, function (name, value) { buildPath(parsePropPath(name), value, obj, 0); }); return obj; } return null; } /** * It takes a string, tries to parse it, and if it fails, it returns the stringified version * of the input * * @param {any} rawValue - The value to be stringified. * @param {Function} parser - A function that parses a string into a JavaScript object. * @param {Function} encoder - A function that takes a value and returns a string. * * @returns {string} A stringified version of the rawValue. */ function stringifySafely(rawValue, parser, encoder) { if (utils$1.isString(rawValue)) { try { (parser || JSON.parse)(rawValue); return utils$1.trim(rawValue); } catch (e) { if (e.name !== 'SyntaxError') { throw e; } } } return (encoder || JSON.stringify)(rawValue); } var defaults = { transitional: transitionalDefaults, adapter: ['xhr', 'http', 'fetch'], transformRequest: [function transformRequest(data, headers) { var contentType = headers.getContentType() || ''; var hasJSONContentType = contentType.indexOf('application/json') > -1; var isObjectPayload = utils$1.isObject(data); if (isObjectPayload && utils$1.isHTMLForm(data)) { data = new FormData(data); } var isFormData = utils$1.isFormData(data); if (isFormData) { return hasJSONContentType ? JSON.stringify(formDataToJSON(data)) : data; } if (utils$1.isArrayBuffer(data) || utils$1.isBuffer(data) || utils$1.isStream(data) || utils$1.isFile(data) || utils$1.isBlob(data) || utils$1.isReadableStream(data)) { return data; } if (utils$1.isArrayBufferView(data)) { return data.buffer; } if (utils$1.isURLSearchParams(data)) { headers.setContentType('application/x-www-form-urlencoded;charset=utf-8', false); return data.toString(); } var isFileList; if (isObjectPayload) { if (contentType.indexOf('application/x-www-form-urlencoded') > -1) { return toURLEncodedForm(data, this.formSerializer).toString(); } if ((isFileList = utils$1.isFileList(data)) || contentType.indexOf('multipart/form-data') > -1) { var _FormData = this.env && this.env.FormData; return toFormData(isFileList ? { 'files[]': data } : data, _FormData && new _FormData(), this.formSerializer); } } if (isObjectPayload || hasJSONContentType) { headers.setContentType('application/json', false); return stringifySafely(data); } return data; }], transformResponse: [function transformResponse(data) { var transitional = this.transitional || defaults.transitional; var forcedJSONParsing = transitional && transitional.forcedJSONParsing; var JSONRequested = this.responseType === 'json'; if (utils$1.isResponse(data) || utils$1.isReadableStream(data)) { return data; } if (data && utils$1.isString(data) && (forcedJSONParsing && !this.responseType || JSONRequested)) { var silentJSONParsing = transitional && transitional.silentJSONParsing; var strictJSONParsing = !silentJSONParsing && JSONRequested; try { return JSON.parse(data); } catch (e) { if (strictJSONParsing) { if (e.name === 'SyntaxError') { throw AxiosError.from(e, AxiosError.ERR_BAD_RESPONSE, this, null, this.response); } throw e; } } } return data; }], /** * A timeout in milliseconds to abort a request. If set to 0 (default) a * timeout is not created. */ timeout: 0, xsrfCookieName: 'XSRF-TOKEN', xsrfHeaderName: 'X-XSRF-TOKEN', maxContentLength: -1, maxBodyLength: -1, env: { FormData: platform.classes.FormData, Blob: platform.classes.Blob }, validateStatus: function validateStatus(status) { return status >= 200 && status < 300; }, headers: { common: { 'Accept': 'application/json, text/plain, */*', 'Content-Type': undefined } } }; utils$1.forEach(['delete', 'get', 'head', 'post', 'put', 'patch'], function (method) { defaults.headers[method] = {}; }); var defaults$1 = defaults; // RawAxiosHeaders whose duplicates are ignored by node // c.f. https://nodejs.org/api/http.html#http_message_headers var ignoreDuplicateOf = utils$1.toObjectSet(['age', 'authorization', 'content-length', 'content-type', 'etag', 'expires', 'from', 'host', 'if-modified-since', 'if-unmodified-since', 'last-modified', 'location', 'max-forwards', 'proxy-authorization', 'referer', 'retry-after', 'user-agent']); /** * Parse headers into an object * * ``` * Date: Wed, 27 Aug 2014 08:58:49 GMT * Content-Type: application/json * Connection: keep-alive * Transfer-Encoding: chunked * ``` * * @param {String} rawHeaders Headers needing to be parsed * * @returns {Object} Headers parsed into an object */ var parseHeaders = (function (rawHeaders) { var parsed = {}; var key; var val; var i; rawHeaders && rawHeaders.split('\n').forEach(function parser(line) { i = line.indexOf(':'); key = line.substring(0, i).trim().toLowerCase(); val = line.substring(i + 1).trim(); if (!key || parsed[key] && ignoreDuplicateOf[key]) { return; } if (key === 'set-cookie') { if (parsed[key]) { parsed[key].push(val); } else { parsed[key] = [val]; } } else { parsed[key] = parsed[key] ? parsed[key] + ', ' + val : val; } }); return parsed; }); var $internals = Symbol('internals'); function normalizeHeader(header) { return header && String(header).trim().toLowerCase(); } function normalizeValue(value) { if (value === false || value == null) { return value; } return utils$1.isArray(value) ? value.map(normalizeValue) : String(value); } function parseTokens(str) { var tokens = Object.create(null); var tokensRE = /([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g; var match; while (match = tokensRE.exec(str)) { tokens[match[1]] = match[2]; } return tokens; } var isValidHeaderName = function isValidHeaderName(str) { return /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(str.trim()); }; function matchHeaderValue(context, value, header, filter, isHeaderNameFilter) { if (utils$1.isFunction(filter)) { return filter.call(this, value, header); } if (isHeaderNameFilter) { value = header; } if (!utils$1.isString(value)) return; if (utils$1.isString(filter)) { return value.indexOf(filter) !== -1; } if (utils$1.isRegExp(filter)) { return filter.test(value); } } function formatHeader(header) { return header.trim().toLowerCase().replace(/([a-z\d])(\w*)/g, function (w, _char, str) { return _char.toUpperCase() + str; }); } function buildAccessors(obj, header) { var accessorName = utils$1.toCamelCase(' ' + header); ['get', 'set', 'has'].forEach(function (methodName) { Object.defineProperty(obj, methodName + accessorName, { value: function value(arg1, arg2, arg3) { return this[methodName].call(this, header, arg1, arg2, arg3); }, configurable: true }); }); } var AxiosHeaders = /*#__PURE__*/function (_Symbol$iterator, _Symbol$toStringTag) { function AxiosHeaders(headers) { _classCallCheck(this, AxiosHeaders); headers && this.set(headers); } _createClass(AxiosHeaders, [{ key: "set", value: function set(header, valueOrRewrite, rewrite) { var self = this; function setHeader(_value, _header, _rewrite) { var lHeader = normalizeHeader(_header); if (!lHeader) { throw new Error('header name must be a non-empty string'); } var key = utils$1.findKey(self, lHeader); if (!key || self[key] === undefined || _rewrite === true || _rewrite === undefined && self[key] !== false) { self[key || _header] = normalizeValue(_value); } } var setHeaders = function setHeaders(headers, _rewrite) { return utils$1.forEach(headers, function (_value, _header) { return setHeader(_value, _header, _rewrite); }); }; if (utils$1.isPlainObject(header) || header instanceof this.constructor) { setHeaders(header, valueOrRewrite); } else if (utils$1.isString(header) && (header = header.trim()) && !isValidHeaderName(header)) { setHeaders(parseHeaders(header), valueOrRewrite); } else if (utils$1.isObject(header) && utils$1.isIterable(header)) { var obj = {}, dest, key; var _iterator = _createForOfIteratorHelper(header), _step; try { for (_iterator.s(); !(_step = _iterator.n()).done;) { var entry = _step.value; if (!utils$1.isArray(entry)) { throw TypeError('Object iterator must return a key-value pair'); } obj[key = entry[0]] = (dest = obj[key]) ? utils$1.isArray(dest) ? [].concat(_toConsumableArray(dest), [entry[1]]) : [dest, entry[1]] : entry[1]; } } catch (err) { _iterator.e(err); } finally { _iterator.f(); } setHeaders(obj, valueOrRewrite); } else { header != null && setHeader(valueOrRewrite, header, rewrite); } return this; } }, { key: "get", value: function get(header, parser) { header = normalizeHeader(header); if (header) { var key = utils$1.findKey(this, header); if (key) { var value = this[key]; if (!parser) { return value; } if (parser === true) { return parseTokens(value); } if (utils$1.isFunction(parser)) { return parser.call(this, value, key); } if (utils$1.isRegExp(parser)) { return parser.exec(value); } throw new TypeError('parser must be boolean|regexp|function'); } } } }, { key: "has", value: function has(header, matcher) { header = normalizeHeader(header); if (header) { var key = utils$1.findKey(this, header); return !!(key && this[key] !== undefined && (!matcher || matchHeaderValue(this, this[key], key, matcher))); } return false; } }, { key: "delete", value: function _delete(header, matcher) { var self = this; var deleted = false; function deleteHeader(_header) { _header = normalizeHeader(_header); if (_header) { var key = utils$1.findKey(self, _header); if (key && (!matcher || matchHeaderValue(self, self[key], key, matcher))) { delete self[key]; deleted = true; } } } if (utils$1.isArray(header)) { header.forEach(deleteHeader); } else { deleteHeader(header); } return deleted; } }, { key: "clear", value: function clear(matcher) { var keys = Object.keys(this); var i = keys.length; var deleted = false; while (i--) { var key = keys[i]; if (!matcher || matchHeaderValue(this, this[key], key, matcher, true)) { delete this[key]; deleted = true; } } return deleted; } }, { key: "normalize", value: function normalize(format) { var self = this; var headers = {}; utils$1.forEach(this, function (value, header) { var key = utils$1.findKey(headers, header); if (key) { self[key] = normalizeValue(value); delete self[header]; return; } var normalized = format ? formatHeader(header) : String(header).trim(); if (normalized !== header) { delete self[header]; } self[normalized] = normalizeValue(value); headers[normalized] = true; }); return this; } }, { key: "concat", value: function concat() { var _this$constructor; for (var _len = arguments.length, targets = new Array(_len), _key = 0; _key < _len; _key++) { targets[_key] = arguments[_key]; } return (_this$constructor = this.constructor).concat.apply(_this$constructor, [this].concat(targets)); } }, { key: "toJSON", value: function toJSON(asStrings) { var obj = Object.create(null); utils$1.forEach(this, function (value, header) { value != null && value !== false && (obj[header] = asStrings && utils$1.isArray(value) ? value.join(', ') : value); }); return obj; } }, { key: _Symbol$iterator, value: function value() { return Object.entries(this.toJSON())[Symbol.iterator](); } }, { key: "toString", value: function toString() { return Object.entries(this.toJSON()).map(function (_ref) { var _ref2 = _slicedToArray(_ref, 2), header = _ref2[0], value = _ref2[1]; return header + ': ' + value; }).join('\n'); } }, { key: "getSetCookie", value: function getSetCookie() { return this.get("set-cookie") || []; } }, { key: _Symbol$toStringTag, get: function get() { return 'AxiosHeaders'; } }], [{ key: "from", value: function from(thing) { return thing instanceof this ? thing : new this(thing); } }, { key: "concat", value: function concat(first) { var computed = new this(first); for (var _len2 = arguments.length, targets = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) { targets[_key2 - 1] = arguments[_key2]; } targets.forEach(function (target) { return computed.set(target); }); return computed; } }, { key: "accessor", value: function accessor(header) { var internals = this[$internals] = this[$internals] = { accessors: {} }; var accessors = internals.accessors; var prototype = this.prototype; function defineAccessor(_header) { var lHeader = normalizeHeader(_header); if (!accessors[lHeader]) { buildAccessors(prototype, _header); accessors[lHeader] = true; } } utils$1.isArray(header) ? header.forEach(defineAccessor) : defineAccessor(header); return this; } }]); return AxiosHeaders; }(Symbol.iterator, Symbol.toStringTag); AxiosHeaders.accessor(['Content-Type', 'Content-Length', 'Accept', 'Accept-Encoding', 'User-Agent', 'Authorization']); // reserved names hotfix utils$1.reduceDescriptors(AxiosHeaders.prototype, function (_ref3, key) { var value = _ref3.value; var mapped = key[0].toUpperCase() + key.slice(1); // map `set` => `Set` return { get: function get() { return value; }, set: function set(headerValue) { this[mapped] = headerValue; } }; }); utils$1.freezeMethods(AxiosHeaders); var AxiosHeaders$1 = AxiosHeaders; /** * Transform the data for a request or a response * * @param {Array|Function} fns A single function or Array of functions * @param {?Object} response The response object * * @returns {*} The resulting transformed data */ function transformData(fns, response) { var config = this || defaults$1; var context = response || config; var headers = AxiosHeaders$1.from(context.headers); var data = context.data; utils$1.forEach(fns, function transform(fn) { data = fn.call(config, data, headers.normalize(), response ? response.status : undefined); }); headers.normalize(); return data; } function isCancel(value) { return !!(value && value.__CANCEL__); } /** * A `CanceledError` is an object that is thrown when an operation is canceled. * * @param {string=} message The message. * @param {Object=} config The config. * @param {Object=} request The request. * * @returns {CanceledError} The created error. */ function CanceledError(message, config, request) { // eslint-disable-next-line no-eq-null,eqeqeq AxiosError.call(this, message == null ? 'canceled' : message, AxiosError.ERR_CANCELED, config, request); this.name = 'CanceledError'; } utils$1.inherits(CanceledError, AxiosError, { __CANCEL__: true }); /** * Resolve or reject a Promise based on response status. * * @param {Function} resolve A function that resolves the promise. * @param {Function} reject A function that rejects the promise. * @param {object} response The response. * * @returns {object} The response. */ function settle(resolve, reject, response) { var validateStatus = response.config.validateStatus; if (!response.status || !validateStatus || validateStatus(response.status)) { resolve(response); } else { reject(new AxiosError('Request failed with status code ' + response.status, [AxiosError.ERR_BAD_REQUEST, AxiosError.ERR_BAD_RESPONSE][Math.floor(response.status / 100) - 4], response.config, response.request, response)); } } function parseProtocol(url) { var match = /^([-+\w]{1,25})(:?\/\/|:)/.exec(url); return match && match[1] || ''; } /** * Calculate data maxRate * @param {Number} [samplesCount= 10] * @param {Number} [min= 1000] * @returns {Function} */ function speedometer(samplesCount, min) { samplesCount = samplesCount || 10; var bytes = new Array(samplesCount); var timestamps = new Array(samplesCount); var head = 0; var tail = 0; var firstSampleTS; min = min !== undefined ? min : 1000; return function push(chunkLength) { var now = Date.now(); var startedAt = timestamps[tail]; if (!firstSampleTS) { firstSampleTS = now; } bytes[head] = chunkLength; timestamps[head] = now; var i = tail; var bytesCount = 0; while (i !== head) { bytesCount += bytes[i++]; i = i % samplesCount; } head = (head + 1) % samplesCount; if (head === tail) { tail = (tail + 1) % samplesCount; } if (now - firstSampleTS < min) { return; } var passed = startedAt && now - startedAt; return passed ? Math.round(bytesCount * 1000 / passed) : undefined; }; } /** * Throttle decorator * @param {Function} fn * @param {Number} freq * @return {Function} */ function throttle(fn, freq) { var timestamp = 0; var threshold = 1000 / freq; var lastArgs; var timer; var invoke = function invoke(args) { var now = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : Date.now(); timestamp = now; lastArgs = null; if (timer) { clearTimeout(timer); timer = null; } fn.apply(null, args); }; var throttled = function throttled() { var now = Date.now(); var passed = now - timestamp; for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { args[_key] = arguments[_key]; } if (passed >= threshold) { invoke(args, now); } else { lastArgs = args; if (!timer) { timer = setTimeout(function () { timer = null; invoke(lastArgs); }, threshold - passed); } } }; var flush = function flush() { return lastArgs && invoke(lastArgs); }; return [throttled, flush]; } var progressEventReducer = function progressEventReducer(listener, isDownloadStream) { var freq = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 3; var bytesNotified = 0; var _speedometer = speedometer(50, 250); return throttle(function (e) { var loaded = e.loaded; var total = e.lengthComputable ? e.total : undefined; var progressBytes = loaded - bytesNotified; var rate = _speedometer(progressBytes); var inRange = loaded <= total; bytesNotified = loaded; var data = _defineProperty({ loaded: loaded, total: total, progress: total ? loaded / total : undefined, bytes: progressBytes, rate: rate ? rate : undefined, estimated: rate && total && inRange ? (total - loaded) / rate : undefined, event: e, lengthComputable: total != null }, isDownloadStream ? 'download' : 'upload', true); listener(data); }, freq); }; var progressEventDecorator = function progressEventDecorator(total, throttled) { var lengthComputable = total != null; return [function (loaded) { return throttled[0]({ lengthComputable: lengthComputable, total: total, loaded: loaded }); }, throttled[1]]; }; var asyncDecorator = function asyncDecorator(fn) { return function () { for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { args[_key] = arguments[_key]; } return utils$1.asap(function () { return fn.apply(void 0, args); }); }; }; var isURLSameOrigin = platform.hasStandardBrowserEnv ? function (origin, isMSIE) { return function (url) { url = new URL(url, platform.origin); return origin.protocol === url.protocol && origin.host === url.host && (isMSIE || origin.port === url.port); }; }(new URL(platform.origin), platform.navigator && /(msie|trident)/i.test(platform.navigator.userAgent)) : function () { return true; }; var cookies = platform.hasStandardBrowserEnv ? // Standard browser envs support document.cookie { write: function write(name, value, expires, path, domain, secure) { var cookie = [name + '=' + encodeURIComponent(value)]; utils$1.isNumber(expires) && cookie.push('expires=' + new Date(expires).toGMTString()); utils$1.isString(path) && cookie.push('path=' + path); utils$1.isString(domain) && cookie.push('domain=' + domain); secure === true && cookie.push('secure'); document.cookie = cookie.join('; '); }, read: function read(name) { var match = document.cookie.match(new RegExp('(^|;\\s*)(' + name + ')=([^;]*)')); return match ? decodeURIComponent(match[3]) : null; }, remove: function remove(name) { this.write(name, '', Date.now() - 86400000); } } : // Non-standard browser env (web workers, react-native) lack needed support. { write: function write() {}, read: function read() { return null; }, remove: function remove() {} }; /** * Determines whether the specified URL is absolute * * @param {string} url The URL to test * * @returns {boolean} True if the specified URL is absolute, otherwise false */ function isAbsoluteURL(url) { // A URL is considered absolute if it begins with "<scheme>://" or "//" (protocol-relative URL). // RFC 3986 defines scheme name as a sequence of characters beginning with a letter and followed // by any combination of letters, digits, plus, period, or hyphen. return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(url); } /** * Creates a new URL by combining the specified URLs * * @param {string} baseURL The base URL * @param {string} relativeURL The relative URL * * @returns {string} The combined URL */ function combineURLs(baseURL, relativeURL) { return relativeURL ? baseURL.replace(/\/?\/$/, '') + '/' + relativeURL.replace(/^\/+/, '') : baseURL; } /** * Creates a new URL by combining the baseURL with the requestedURL, * only when the requestedURL is not already an absolute URL. * If the requestURL is absolute, this function returns the requestedURL untouched. * * @param {string} baseURL The base URL * @param {string} requestedURL Absolute or relative URL to combine * * @returns {string} The combined full path */ function buildFullPath(baseURL, requestedURL, allowAbsoluteUrls) { var isRelativeUrl = !isAbsoluteURL(requestedURL); if (baseURL && (isRelativeUrl || allowAbsoluteUrls == false)) { return combineURLs(baseURL, requestedURL); } return requestedURL; } var headersToObject = function headersToObject(thing) { return thing instanceof AxiosHeaders$1 ? _objectSpread2({}, thing) : thing; }; /** * Config-specific merge-function which creates a new config-object * by merging two configuration objects together. * * @param {Object} config1 * @param {Object} config2 * * @returns {Object} New object resulting from merging config2 to config1 */ function mergeConfig(config1, config2) { // eslint-disable-next-line no-param-reassign config2 = config2 || {}; var config = {}; function getMergedValue(target, source, prop, caseless) { if (utils$1.isPlainObject(target) && utils$1.isPlainObject(source)) { return utils$1.merge.call({ caseless: caseless }, target, source); } else if (utils$1.isPlainObject(source)) { return utils$1.merge({}, source); } else if (utils$1.isArray(source)) { return source.slice(); } return source; } // eslint-disable-next-line consistent-return function mergeDeepProperties(a, b, prop, caseless) { if (!utils$1.isUndefined(b)) { return getMergedValue(a, b, prop, caseless); } else if (!utils$1.isUndefined(a)) { return getMergedValue(undefined, a, prop, caseless); } } // eslint-disable-next-line consistent-return function valueFromConfig2(a, b) { if (!utils$1.isUndefined(b)) { return getMergedValue(undefined, b); } } // eslint-disable-next-line consistent-return function defaultToConfig2(a, b) { if (!utils$1.isUndefined(b)) { return getMergedValue(undefined, b); } else if (!utils$1.isUndefined(a)) { return getMergedValue(undefined, a); } } // eslint-disable-next-line consistent-return function mergeDirectKeys(a, b, prop) { if (prop in config2) { return getMergedValue(a, b); } else if (prop in config1) { return getMergedValue(undefined, a); } } var mergeMap = { url: valueFromConfig2, method: valueFromConfig2, data: valueFromConfig2, baseURL: defaultToConfig2, transformRequest: defaultToConfig2, transformResponse: defaultToConfig2, paramsSerializer: defaultToConfig2, timeout: defaultToConfig2, timeoutMessage: defaultToConfig2, withCredentials: defaultToConfig2, withXSRFToken: defaultToConfig2, adapter: defaultToConfig2, responseType: defaultToConfig2, xsrfCookieName: defaultToConfig2, xsrfHeaderName: defaultToConfig2, onUploadProgress: defaultToConfig2, onDownloadProgress: defaultToConfig2, decompress: defaultToConfig2, maxContentLength: defaultToConfig2, maxBodyLength: defaultToConfig2, beforeRedirect: defaultToConfig2, transport: defaultToConfig2, httpAgent: defaultToConfig2, httpsAgent: defaultToConfig2, cancelToken: defaultToConfig2, socketPath: defaultToConfig2, responseEncoding: defaultToConfig2, validateStatus: mergeDirectKeys, headers: function headers(a, b, prop) { return mergeDeepProperties(headersToObject(a), headersToObject(b), prop, true); } }; utils$1.forEach(Object.keys(Object.assign({}, config1, config2)), function computeConfigValue(prop) { var merge = mergeMap[prop] || mergeDeepProperties; var configValue = merge(config1[prop], config2[prop], prop); utils$1.isUndefined(configValue) && merge !== mergeDirectKeys || (config[prop] = configValue); }); return config; } var resolveConfig = (function (config) { var newConfig = mergeConfig({}, config); var data = newConfig.data, withXSRFToken = newConfig.withXSRFToken, xsrfHeaderName = newConfig.xsrfHeaderName, xsrfCookieName = newConfig.xsrfCookieName, headers = newConfig.headers, auth = newConfig.auth; newConfig.headers = headers = AxiosHeaders$1.from(headers); newConfig.url = buildURL(buildFullPath(newConfig.baseURL, newConfig.url, newConfig.allowAbsoluteUrls), config.params, config.paramsSerializer); // HTTP basic authentication if (auth) { headers.set('Authorization', 'Basic ' + btoa((auth.username || '') + ':' + (auth.password ? unescape(encodeURIComponent(auth.password)) : ''))); } var contentType; if (utils$1.isFormData(data)) { if (platform.hasStandardBrowserEnv || platform.hasStandardBrowserWebWorkerEnv) { headers.setContentType(undefined); // Let the browser set it } else if ((contentType = headers.getContentType()) !== false) { // fix semicolon duplication issue for ReactNative FormData implementation var _ref = contentType ? contentType.split(';').map(function (token) { return token.trim(); }).filter(Boolean) : [], _ref2 = _toArray(_ref), type = _ref2[0], tokens = _ref2.slice(1); headers.setContentType([type || 'multipart/form-data'].concat(_toConsumableArray(tokens)).join('; ')); } } // Add xsrf header // This is only done if running in a standard browser environment. // Specifically not if we're in a web worker, or react-native. if (platform.hasStandardBrowserEnv) { withXSRFToken && utils$1.isFunction(withXSRFToken) && (withXSRFToken = withXSRFToken(newConfig)); if (withXSRFToken || withXSRFToken !== false && isURLSameOrigin(newConfig.url)) { // Add xsrf header var xsrfValue = xsrfHeaderName && xsrfCookieName && cookies.read(xsrfCookieName); if (xsrfValue) { headers.set(xsrfHeaderName, xsrfValue); } } } return newConfig; }); var isXHRAdapterSupported = typeof XMLHttpRequest !== 'undefined'; var xhrAdapter = isXHRAdapterSupported && function (config) { return new Promise(function dispatchXhrRequest(resolve, reject) { var _config = resolveConfig(config); var requestData = _config.data; var requestHeaders = AxiosHeaders$1.from(_config.headers).normalize(); var responseType = _config.responseType, onUploadProgress = _config.onUploadProgress, onDownloadProgress = _config.onDownloadProgress; var onCanceled; var uploadThrottled, downloadThrottled; var flushUpload, flushDownload; function done() { flushUpload && flushUpload(); // flush events flushDownload && flushDownload(); // flush events _config.cancelToken && _config.cancelToken.unsubscribe(onCanceled); _config.signal && _config.signal.removeEventListener('abort', onCanceled); } var request = new XMLHttpRequest(); request.open(_config.method.toUpperCase(), _config.url, true); // Set the request timeout in MS request.timeout = _config.timeout; function onloadend() { if (!request) { return; } // Prepare the response var responseHeaders = AxiosHeaders$1.from('getAllResponseHeaders' in request && request.getAllResponseHeaders()); var responseData = !responseType || responseType === 'text' || responseType === 'json' ? request.responseText : request.response; var response = { data: responseData, status: request.status, statusText: request.statusText, headers: responseHeaders, config: config, request: request }; settle(function _resolve(value) { resolve(value); done(); }, function _reject(err) { reject(err); done(); }, response); // Clean up request request = null; } if ('onloadend' in request) { // Use onloadend if available request.onloadend = onloadend; } else { // Listen for ready state to emulate onloadend request.onreadystatechange = function handleLoad() { if (!request || request.readyState !== 4) { return; } // The request errored out and we didn't get a response, this will be // handled by onerror instead // With one exception: request that using file: protocol, most browsers // will return status as 0 even though it's a successful request if (request.status === 0 && !(request.responseURL && request.responseURL.indexOf('file:') === 0)) { return; } // readystate handler is calling before onerror or ontimeout handlers, // so we should call onloadend on the next 'tick' setTimeout(onloadend); }; } // Handle browser request cancellation (as opposed to a manual cancellation) request.onabort = function handleAbort() { if (!request) { return; } reject(new AxiosError('Request aborted', AxiosError.ECONNABORTED, config, request)); // Clean up request request = null; }; // Handle low level network errors request.onerror = function handleError() { // Real errors are hidden from us by the browser // onerror should only fire if it's a network error reject(new AxiosError('Network Error', AxiosError.ERR_NETWORK, config, request)); // Clean up request request = null; }; // Handle timeout request.ontimeout = function handleTimeout() { var timeoutErrorMessage = _config.timeout ? 'timeout of ' + _config.timeout + 'ms exceeded' : 'timeout exceeded'; var transitional = _config.transitional || transitionalDefaults; if (_config.timeoutErrorMessage) { timeoutErrorMessage = _config.timeoutErrorMessage; } reject(new AxiosError(timeoutErrorMessage, transitional.clarifyTimeoutError ? AxiosError.ETIMEDOUT : AxiosError.ECONNABORTED, config, request)); // Clean up request request = null; }; // Remove Content-Type if data is undefined requestData === undefined && requestHeaders.setContentType(null); // Add headers to the request if ('setRequestHeader' in request) { utils$1.forEach(requestHeaders.toJSON(), function setRequestHeader(val, key) { request.setRequestHeader(key, val); }); } // Add withCredentials to request if needed if (!utils$1.isUndefined(_config.withCredentials)) { request.withCredentials = !!_config.withCredentials; } // Add responseType to request if needed if (responseType && responseType !== 'json') { request.responseType = _config.responseType; } // Handle progress if needed if (onDownloadProgress) { var _progressEventReducer = progressEventReducer(onDownloadProgress, true); var _progressEventReducer2 = _slicedToArray(_progressEventReducer, 2); downloadThrottled = _progressEventReducer2[0]; flushDownload = _progressEventReducer2[1]; request.addEventListener('progress', downloadThrottled); } // Not all browsers support upload events if (onUploadProgress && request.upload) { var _progressEventReducer3 = progressEventReducer(onUploadProgress); var _progressEventReducer4 = _slicedToArray(_progressEventReducer3, 2); uploadThrottled = _progressEventReducer4[0]; flushUpload = _progressEventReducer4[1]; request.upload.addEventListener('progress', uploadThrottled); request.upload.addEventListener('loadend', flushUpload); } if (_config.cancelToken || _config.signal) { // Handle cancellation // eslint-disable-next-line func-names onCanceled = function onCanceled(cancel) { if (!request) { return; } reject(!cancel || cancel.type ? new CanceledError(null, config, request) : cancel); request.abort(); request = null; }; _config.cancelToken && _config.cancelToken.subscribe(onCanceled); if (_config.signal) { _config.signal.aborted ? onCanceled() : _config.signal.addEventListener('abort', onCanceled); } } var protocol = parseProtocol(_config.url); if (protocol && platform.protocols.indexOf(protocol) === -1) { reject(new AxiosError('Unsupported protocol ' + protocol + ':', AxiosError.ERR_BAD_REQUEST, config)); return; } // Send the request request.send(requestData || null); }); }; var composeSignals = function composeSignals(signals, timeout) { var _signals = signals = signals ? signals.filter(Boolean) : [], length = _signals.length; if (timeout || length) { var controller = new AbortController(); var aborted; var onabort = function onabort(reason) { if (!aborted) { aborted = true; unsubscribe(); var err = reason instanceof Error ? reason : this.reason; controller.abort(err instanceof AxiosError ? err : new CanceledError(err instanceof Error ? err.message : err)); } }; var timer = timeout && setTimeout(function () { timer = null; onabort(new AxiosError("timeout ".concat(timeout, " of ms exceeded"), AxiosError.ETIMEDOUT)); }, timeout); var unsubscribe = function unsubscribe() { if (signals) { timer && clearTimeout(timer); timer = null; signals.forEach(function (signal) { signal.unsubscribe ? signal.unsubscribe(onabort) : signal.removeEventListener('abort', onabort); }); signals = null; } }; signals.forEach(function (signal) { return signal.addEventListener('abort', onabort); }); var signal = controller.signal; signal.unsubscribe = function () { return utils$1.asap(unsubscribe); }; return signal; } }; var composeSignals$1 = composeSignals; var streamChunk = /*#__PURE__*/_regeneratorRuntime().mark(function streamChunk(chunk, chunkSize) { var len, pos, end; return _regeneratorRuntime().wrap(function streamChunk$(_context) { while (1) switch (_context.prev = _context.next) { case 0: len = chunk.byteLength; if (!(!chunkSize || len < chunkSize)) { _context.next = 5; break; } _context.next = 4; return chunk; case 4: return _context.abrupt("return"); case 5: pos = 0; case 6: if (!(pos < len)) { _context.next = 13; break; } end = pos + chunkSize; _context.next = 10; return chunk.slice(pos, end); case 10: pos = end; _context.next = 6; break; case 13: case "end": return _context.stop(); } }, streamChunk); }); var readBytes = /*#__PURE__*/function () { var _ref = _wrapAsyncGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(iterable, chunkSize) { var _iteratorAbruptCompletion, _didIteratorError, _iteratorError, _iterator, _step, chunk; return _regeneratorRuntime().wrap(function _callee$(_context2) { while (1) switch (_context2.prev = _context2.next) { case 0: _iteratorAbruptCompletion = false; _didIteratorError = false; _context2.prev = 2; _iterator = _asyncIterator(readStream(iterable)); case 4: _context2.next = 6; return _awaitAsyncGenerator(_iterator.next()); case 6: if (!(_iteratorAbruptCompletion = !(_step = _context2.sent).done)) { _context2.next = 12; break; } chunk = _step.value; return _context2.delegateYield(_asyncGeneratorDelegate(_asyncIterator(streamChunk(chunk, chunkSize))), "t0", 9); case 9: _iteratorAbruptCompletion = false; _context2.next = 4; break; case 12: _context2.next = 18; break; case 14: _context2.prev = 14; _context2.t1 = _context2["catch"](2); _didIteratorError = true; _iteratorError = _context2.t1; case 18: _context2.prev = 18; _context2.prev = 19; if (!(_iteratorAbruptCompletion && _iterator["return"] != null)) { _context2.next = 23; break; } _context2.next = 23; return _awaitAsyncGenerator(_iterator["return"]()); case 23: _context2.prev = 23; if (!_didIteratorError) { _context2.next = 26; break; } throw _iteratorError; case 26: return _context2.finish(23); case 27: return _context2.finish(18); case 28: case "end": return _context2.stop(); } }, _callee, null, [[2, 14, 18, 28], [19,, 23, 27]]); })); return function readBytes(_x, _x2) { return _ref.apply(this, arguments); }; }(); var readStream = /*#__PURE__*/function () { var _ref2 = _wrapAsyncGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(stream) { var reader, _yield$_awaitAsyncGen, done, value; return _regeneratorRuntime().wrap(function _callee2$(_context3) { while (1) switch (_context3.prev = _context3.next) { case 0: if (!stream[Symbol.asyncIterator]) { _context3.next = 3; break; } return _context3.delegateYield(_asyncGeneratorDelegate(_asyncIterator(stream)), "t0", 2); case 2: return _context3.abrupt("return"); case 3: reader = stream.getReader(); _context3.prev = 4; case 5: _context3.next = 7; return _awaitAsyncGenerator(reader.read()); case 7: _yield$_awaitAsyncGen = _context3.sent; done = _yield$_awaitAsyncGen.done; value = _yield$_awaitAsyncGen.value; if (!done) { _context3.next = 12; break; } return _context3.abrupt("break", 16); case 12: _context3.next = 14; return value; case 14: _context3.next = 5; break; case 16: _context3.prev = 16; _context3.next = 19; return _awaitAsyncGenerator(reader.cancel()); case 19: return _context3.finish(16); case 20: case "end": return _context3.stop(); } }, _callee2, null, [[4,, 16, 20]]); })); return function readStream(_x3) { return _ref2.apply(this, arguments); }; }(); var trackStream = function trackStream(stream, chunkSize, onProgress, onFinish) { var iterator = readBytes(stream, chunkSize); var bytes = 0; var done; var _onFinish = function _onFinish(e) { if (!done) { done = true; onFinish && onFinish(e); } }; return new ReadableStream({ pull: function pull(controller) { return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3() { var _yield$iterator$next, _done, value, len, loadedBytes; return _regeneratorRuntime().wrap(function _callee3$(_context4) { while (1) switch (_context4.prev = _context4.next) { case 0: _context4.prev = 0; _context4.next = 3; return iterator.next(); case 3: _yield$iterator$next = _context4.sent; _done = _yield$iterator$next.done; value = _yield$iterator$next.value; if (!_done) { _context4.next = 10; break; } _onFinish(); controller.close(); return _context4.abrupt("return"); case 10: len = value.byteLength; if (onProgress) { loadedBytes = bytes += len; onProgress(loadedBytes); } controller.enqueue(new Uint8Array(value)); _context4.next = 19; break; case 15: _context4.prev = 15; _context4.t0 = _context4["catch"](0); _onFinish(_context4.t0); throw _context4.t0; case 19: case "end": return _context4.stop(); } }, _callee3, null, [[0, 15]]); }))(); }, cancel: function cancel(reason) { _onFinish(reason); return iterator["return"](); } }, { highWaterMark: 2 }); }; var isFetchSupported = typeof fetch === 'function' && typeof Request === 'function' && typeof Response === 'function'; var isReadableStreamSupported = isFetchSupported && typeof ReadableStream === 'function'; // used only inside the fetch adapter var encodeText = isFetchSupported && (typeof TextEncoder === 'function' ? function (encoder) { return function (str) { return encoder.encode(str); }; }(new TextEncoder()) : ( /*#__PURE__*/function () { var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(str) { return _regeneratorRuntime().wrap(function _callee$(_context) { while (1) switch (_context.prev = _context.next) { case 0: _context.t0 = Uint8Array; _context.next = 3; return new Response(str).arrayBuffer(); case 3: _context.t1 = _context.sent; return _context.abrupt("return", new _context.t0(_context.t1)); case 5: case "end": return _context.stop(); } }, _callee); })); return function (_x) { return _ref.apply(this, arguments); }; }())); var test = function test(fn) { try { for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { args[_key - 1] = arguments[_key]; } return !!fn.apply(void 0, args); } catch (e) { return false; } }; var supportsRequestStream = isReadableStreamSupported && test(function () { var duplexAccessed = false; var hasContentType = new Request(platform.origin, { body: new ReadableStream(), method: 'POST', get duplex() { duplexAccessed = true; return 'half'; } }).headers.has('Content-Type'); return duplexAccessed && !hasContentType; }); var DEFAULT_CHUNK_SIZE = 64 * 1024; var supportsResponseStream = isReadableStreamSupported && test(function () { return utils$1.isReadableStream(new Response('').body); }); var resolvers = { stream: supportsResponseStream && function (res) { return res.body; } }; isFetchSupported && function (res) { ['text', 'arrayBuffer', 'blob', 'formData', 'stream'].forEach(function (type) { !resolvers[type] && (resolvers[type] = utils$1.isFunction(res[type]) ? function (res) { return res[type](); } : function (_, config) { throw new AxiosError("Response type '".concat(type, "' is not supported"), AxiosError.ERR_NOT_SUPPORT, config); }); }); }(new Response()); var getBodyLength = /*#__PURE__*/function () { var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(body) { var _request; return _regeneratorRuntime().wrap(function _callee2$(_context2) { while (1) switch (_context2.prev = _context2.next) { case 0: if (!(body == null)) { _context2.next = 2; break; } return _context2.abrupt("return", 0); case 2: if (!utils$1.isBlob(body)) { _context2.next = 4; break; } return _context2.abrupt("return", body.size); case 4: if (!utils$1.isSpecCompliantForm(body)) { _context2.next = 9; break; } _request = new Request(platform.origin, { method: 'POST', body: body }); _context2.next = 8; return _request.arrayBuffer(); case 8: return _context2.abrupt("return", _context2.sent.byteLength); case 9: if (!(utils$1.isArrayBufferView(body) || utils$1.isArrayBuffer(body))) { _context2.next = 11; break; } return _context2.abrupt("return", body.byteLength); case 11: if (utils$1.isURLSearchParams(body)) { body = body + ''; } if (!utils$1.isString(body)) { _context2.next = 16; break; } _context2.next = 15; return encodeText(body); case 15: return _context2.abrupt("return", _context2.sent.byteLength); case 16: case "end": return _context2.stop(); } }, _callee2); })); return function getBodyLength(_x2) { return _ref2.apply(this, arguments); }; }(); var resolveBodyLength = /*#__PURE__*/function () { var _ref3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3(headers, body) { var length; return _regeneratorRuntime().wrap(function _callee3$(_context3) { while (1) switch (_context3.prev = _context3.next) { case 0: length = utils$1.toFiniteNumber(headers.getContentLength()); return _context3.abrupt("return", length == null ? getBodyLength(body) : length); case 2: case "end": return _context3.stop(); } }, _callee3); })); return function resolveBodyLength(_x3, _x4) { return _ref3.apply(this, arguments); }; }(); var fetchAdapter = isFetchSupported && ( /*#__PURE__*/function () { var _ref4 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4(config) { var _resolveConfig, url, method, data, signal, cancelToken, timeout, onDownloadProgress, onUploadProgress, responseType, headers, _resolveConfig$withCr, withCredentials, fetchOptions, composedSignal, request, unsubscribe, requestContentLength, _request, contentTypeHeader, _progressEventDecorat, _progressEventDecorat2, onProgress, flush, isCredentialsSupported, response, isStreamResponse, options, responseContentLength, _ref5, _ref6, _onProgress, _flush, responseData; return _regeneratorRuntime().wrap(function _callee4$(_context4) { while (1) switch (_context4.prev = _context4.next) { case 0: _resolveConfig = resolveConfig(config), url = _resolveConfig.url, method = _resolveConfig.method, data = _resolveConfig.data, signal = _resolveConfig.signal, cancelToken = _resolveConfig.cancelToken, timeout = _resolveConfig.timeout, onDownloadProgress = _resolveConfig.onDownloadProgress, onUploadProgress = _resolveConfig.onUploadProgress, responseType = _resolveConfig.responseType, headers = _resolveConfig.headers, _resolveConfig$withCr = _resolveConfig.withCredentials, withCredentials = _resolveConfig$withCr === void 0 ? 'same-origin' : _resolveConfig$withCr, fetchOptions = _resolveConfig.fetchOptions; responseType = responseType ? (responseType + '').toLowerCase() : 'text'; composedSignal = composeSignals$1([signal, cancelToken && cancelToken.toAbortSignal()], timeout); unsubscribe = composedSignal && composedSignal.unsubscribe && function () { composedSignal.unsubscribe(); }; _context4.prev = 4; _context4.t0 = onUploadProgress && supportsRequestStream && method !== 'get' && method !== 'head'; if (!_context4.t0) { _context4.next = 11; break; } _context4.next = 9; return resolveBodyLength(headers, data); case 9: _context4.t1 = requestContentLength = _context4.sent; _context4.t0 = _context4.t1 !== 0; case 11: if (!_context4.t0) { _context4.next = 15; break; } _request = new Request(url, { method: 'POST', body: data, duplex: "half" }); if (utils$1.isFormData(data) && (contentTypeHeader = _request.headers.get('content-type'))) { headers.setContentType(contentTypeHeader); } if (_request.body) { _progressEventDecorat = progressEventDecorator(requestContentLength, progressEventReducer(asyncDecorator(onUploadProgress))), _progressEventDecorat2 = _slicedToArray(_progressEventDecorat, 2), onProgress = _progressEventDecorat2[0], flush = _progressEventDecorat2[1]; data = trackStream(_request.body, DEFAULT_CHUNK_SIZE, onProgress, flush); } case 15: if (!utils$1.isString(withCredentials)) { withCredentials = withCredentials ? 'include' : 'omit'; } // Cloudflare Workers throws when credentials are defined // see https://github.com/cloudflare/workerd/issues/902 isCredentialsSupported = "credentials" in Request.prototype; request = new Request(url, _objectSpread2(_objectSpread2({}, fetchOptions), {}, { signal: composedSignal, method: method.toUpperCase(), headers: headers.normalize().toJSON(), body: data, duplex: "half", credentials: isCredentialsSupported ? withCredentials : undefined })); _context4.next = 20; return fetch(request, fetchOptions); case 20: response = _context4.sent; isStreamResponse = supportsResponseStream && (responseType === 'stream' || responseType === 'response'); if (supportsResponseStream && (onDownloadProgress || isStreamResponse && unsubscribe)) { options = {}; ['status', 'statusText', 'headers'].forEach(function (prop) { options[prop] = response[prop]; }); responseContentLength = utils$1.toFiniteNumber(response.headers.get('content-length')); _ref5 = onDownloadProgress && progressEventDecorator(responseContentLength, progressEventReducer(asyncDecorator(onDownloadProgress), true)) || [], _ref6 = _slicedToArray(_ref5, 2), _onProgress = _ref6[0], _flush = _ref6[1]; response = new Response(trackStream(response.body, DEFAULT_CHUNK_SIZE, _onProgress, function () { _flush && _flush(); unsubscribe && unsubscribe(); }), options); } responseType = responseType || 'text'; _context4.next = 26; return resolvers[utils$1.findKey(resolvers, responseType) || 'text'](response, config); case 26: responseData = _context4.sent; !isStreamResponse && unsubscribe && unsubscribe(); _context4.next = 30; return new Promise(function (resolve, reject) { settle(resolve, reject, { data: responseData, headers: AxiosHeaders$1.from(response.headers), status: response.status, statusText: response.statusText, config: config, request: request }); }); case 30: return _context4.abrupt("return", _context4.sent); case 33: _context4.prev = 33; _context4.t2 = _context4["catch"](4); unsubscribe && unsubscribe(); if (!(_context4.t2 && _context4.t2.name === 'TypeError' && /Load failed|fetch/i.test(_context4.t2.message))) { _context4.next = 38; break; } throw Object.assign(new AxiosError('Network Error', AxiosError.ERR_NETWORK, config, request), { cause: _context4.t2.cause || _context4.t2 }); case 38: throw AxiosError.from(_context4.t2, _context4.t2 && _context4.t2.code, config, request); case 39: case "end": return _context4.stop(); } }, _callee4, null, [[4, 33]]); })); return function (_x5) { return _ref4.apply(this, arguments); }; }()); var knownAdapters = { http: httpAdapter, xhr: xhrAdapter, fetch: fetchAdapter }; utils$1.forEach(knownAdapters, function (fn, value) { if (fn) { try { Object.defineProperty(fn, 'name', { value: value }); } catch (e) { // eslint-disable-next-line no-empty } Object.defineProperty(fn, 'adapterName', { value: value }); } }); var renderReason = function renderReason(reason) { return "- ".concat(reason); }; var isResolvedHandle = function isResolvedHandle(adapter) { return utils$1.isFunction(adapter) || adapter === null || adapter === false; }; var adapters = { getAdapter: function getAdapter(adapters) { adapters = utils$1.isArray(adapters) ? adapters : [adapters]; var _adapters = adapters, length = _adapters.length; var nameOrAdapter; var adapter; var rejectedReasons = {}; for (var i = 0; i < length; i++) { nameOrAdapter = adapters[i]; var id = void 0; adapter = nameOrAdapter; if (!isResolvedHandle(nameOrAdapter)) { adapter = knownAdapters[(id = String(nameOrAdapter)).toLowerCase()]; if (adapter === undefined) { throw new AxiosError("Unknown adapter '".concat(id, "'")); } } if (adapter) { break; } rejectedReasons[id || '#' + i] = adapter; } if (!adapter) { var reasons = Object.entries(rejectedReasons).map(function (_ref) { var _ref2 = _slicedToArray(_ref, 2), id = _ref2[0], state = _ref2[1]; return "adapter ".concat(id, " ") + (state === false ? 'is not supported by the environment' : 'is not available in the build'); }); var s = length ? reasons.length > 1 ? 'since :\n' + reasons.map(renderReason).join('\n') : ' ' + renderReason(reasons[0]) : 'as no adapter specified'; throw new AxiosError("There is no suitable adapter to dispatch the request " + s, 'ERR_NOT_SUPPORT'); } return adapter; }, adapters: knownAdapters }; /** * Throws a `CanceledError` if cancellation has been requested. * * @param {Object} config The config that is to be used for the request * * @returns {void} */ function throwIfCancellationRequested(config) { if (config.cancelToken) { config.cancelToken.throwIfRequested(); } if (config.signal && config.signal.aborted) { throw new CanceledError(null, config); } } /** * Dispatch a request to the server using the configured adapter. * * @param {object} config The config that is to be used for the request * * @returns {Promise} The Promise to be fulfilled */ function dispatchRequest(config) { throwIfCancellationRequested(config); config.headers = AxiosHeaders$1.from(config.headers); // Transform request data config.data = transformData.call(config, config.transformRequest); if (['post', 'put', 'patch'].indexOf(config.method) !== -1) { config.headers.setContentType('application/x-www-form-urlencoded', false); } var adapter = adapters.getAdapter(config.adapter || defaults$1.adapter); return adapter(config).then(function onAdapterResolution(response) { throwIfCancellationRequested(config); // Transform response data response.data = transformData.call(config, config.transformResponse, response); response.headers = AxiosHeaders$1.from(response.headers); return response; }, function onAdapterRejection(reason) { if (!isCancel(reason)) { throwIfCancellationRequested(config); // Transform response data if (reason && reason.response) { reason.response.data = transformData.call(config, config.transformResponse, reason.response); reason.response.headers = AxiosHeaders$1.from(reason.response.headers); } } return Promise.reject(reason); }); } var VERSION = "1.10.0"; var validators$1 = {}; // eslint-disable-next-line func-names ['object', 'boolean', 'number', 'function', 'string', 'symbol'].forEach(function (type, i) { validators$1[type] = function validator(thing) { return _typeof(thing) === type || 'a' + (i < 1 ? 'n ' : ' ') + type; }; }); var deprecatedWarnings = {}; /** * Transitional option validator * * @param {function|boolean?} validator - set to false if the transitional option has been removed * @param {string?} version - deprecated version / removed since version * @param {string?} message - some message with additional info * * @returns {function} */ validators$1.transitional = function transitional(validator, version, message) { function formatMessage(opt, desc) { return '[Axios v' + VERSION + '] Transitional option \'' + opt + '\'' + desc + (message ? '. ' + message : ''); } // eslint-disable-next-line func-names return function (value, opt, opts) { if (validator === false) { throw new AxiosError(formatMessage(opt, ' has been removed' + (version ? ' in ' + version : '')), AxiosError.ERR_DEPRECATED); } if (version && !deprecatedWarnings[opt]) { deprecatedWarnings[opt] = true; // eslint-disable-next-line no-console console.warn(formatMessage(opt, ' has been deprecated since v' + version + ' and will be removed in the near future')); } return validator ? validator(value, opt, opts) : true; }; }; validators$1.spelling = function spelling(correctSpelling) { return function (value, opt) { // eslint-disable-next-line no-console console.warn("".concat(opt, " is likely a misspelling of ").concat(correctSpelling)); return true; }; }; /** * Assert object's properties type * * @param {object} options * @param {object} schema * @param {boolean?} allowUnknown * * @returns {object} */ function assertOptions(options, schema, allowUnknown) { if (_typeof(options) !== 'object') { throw new AxiosError('options must be an object', AxiosError.ERR_BAD_OPTION_VALUE); } var keys = Object.keys(options); var i = keys.length; while (i-- > 0) { var opt = keys[i]; var validator = schema[opt]; if (validator) { var value = options[opt]; var result = value === undefined || validator(value, opt, options); if (result !== true) { throw new AxiosError('option ' + opt + ' must be ' + result, AxiosError.ERR_BAD_OPTION_VALUE); } continue; } if (allowUnknown !== true) { throw new AxiosError('Unknown option ' + opt, AxiosError.ERR_BAD_OPTION); } } } var validator = { assertOptions: assertOptions, validators: validators$1 }; var validators = validator.validators; /** * Create a new instance of Axios * * @param {Object} instanceConfig The default config for the instance * * @return {Axios} A new instance of Axios */ var Axios = /*#__PURE__*/function () { function Axios(instanceConfig) { _classCallCheck(this, Axios); this.defaults = instanceConfig || {}; this.interceptors = { request: new InterceptorManager$1(), response: new InterceptorManager$1() }; } /** * Dispatch a request * * @param {String|Object} configOrUrl The config specific for this request (merged with this.defaults) * @param {?Object} config * * @returns {Promise} The Promise to be fulfilled */ _createClass(Axios, [{ key: "request", value: (function () { var _request2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(configOrUrl, config) { var dummy, stack; return _regeneratorRuntime().wrap(function _callee$(_context) { while (1) switch (_context.prev = _context.next) { case 0: _context.prev = 0; _context.next = 3; return this._request(configOrUrl, config); case 3: return _context.abrupt("return", _context.sent); case 6: _context.prev = 6; _context.t0 = _context["catch"](0); if (_context.t0 instanceof Error) { dummy = {}; Error.captureStackTrace ? Error.captureStackTrace(dummy) : dummy = new Error(); // slice off the Error: ... line stack = dummy.stack ? dummy.stack.replace(/^.+\n/, '') : ''; try { if (!_context.t0.stack) { _context.t0.stack = stack; // match without the 2 top stack lines } else if (stack && !String(_context.t0.stack).endsWith(stack.replace(/^.+\n.+\n/, ''))) { _context.t0.stack += '\n' + stack; } } catch (e) { // ignore the case where "stack" is an un-writable property } } throw _context.t0; case 10: case "end": return _context.stop(); } }, _callee, this, [[0, 6]]); })); function request(_x, _x2) { return _request2.apply(this, arguments); } return request; }()) }, { key: "_request", value: function _request(configOrUrl, config) { /*eslint no-param-reassign:0*/ // Allow for axios('example/url'[, config]) a la fetch API if (typeof configOrUrl === 'string') { config = config || {}; config.url = configOrUrl; } else { config = configOrUrl || {}; } config = mergeConfig(this.defaults, config); var _config = config, transitional = _config.transitional, paramsSerializer = _config.paramsSerializer, headers = _config.headers; if (transitional !== undefined) { validator.assertOptions(transitional, { silentJSONParsing: validators.transitional(validators["boolean"]), forcedJSONParsing: validators.transitional(validators["boolean"]), clarifyTimeoutError: validators.transitional(validators["boolean"]) }, false); } if (paramsSerializer != null) { if (utils$1.isFunction(paramsSerializer)) { config.paramsSerializer = { serialize: paramsSerializer }; } else { validator.assertOptions(paramsSerializer, { encode: validators["function"], serialize: validators["function"] }, true); } } // Set config.allowAbsoluteUrls if (config.allowAbsoluteUrls !== undefined) ; else if (this.defaults.allowAbsoluteUrls !== undefined) { config.allowAbsoluteUrls = this.defaults.allowAbsoluteUrls; } else { config.allowAbsoluteUrls = true; } validator.assertOptions(config, { baseUrl: validators.spelling('baseURL'), withXsrfToken: validators.spelling('withXSRFToken') }, true); // Set config.method config.method = (config.method || this.defaults.method || 'get').toLowerCase(); // Flatten headers var contextHeaders = headers && utils$1.merge(headers.common, headers[config.method]); headers && utils$1.forEach(['delete', 'get', 'head', 'post', 'put', 'patch', 'common'], function (method) { delete headers[method]; }); config.headers = AxiosHeaders$1.concat(contextHeaders, headers); // filter out skipped interceptors var requestInterceptorChain = []; var synchronousRequestInterceptors = true; this.interceptors.request.forEach(function unshiftRequestInterceptors(interceptor) { if (typeof interceptor.runWhen === 'function' && interceptor.runWhen(config) === false) { return; } synchronousRequestInterceptors = synchronousRequestInterceptors && interceptor.synchronous; requestInterceptorChain.unshift(interceptor.fulfilled, interceptor.rejected); }); var responseInterceptorChain = []; this.interceptors.response.forEach(function pushResponseInterceptors(interceptor) { responseInterceptorChain.push(interceptor.fulfilled, interceptor.rejected); }); var promise; var i = 0; var len; if (!synchronousRequestInterceptors) { var chain = [dispatchRequest.bind(this), undefined]; chain.unshift.apply(chain, requestInterceptorChain); chain.push.apply(chain, responseInterceptorChain); len = chain.length; promise = Promise.resolve(config); while (i < len) { promise = promise.then(chain[i++], chain[i++]); } return promise; } len = requestInterceptorChain.length; var newConfig = config; i = 0; while (i < len) { var onFulfilled = requestInterceptorChain[i++]; var onRejected = requestInterceptorChain[i++]; try { newConfig = onFulfilled(newConfig); } catch (error) { onRejected.call(this, error); break; } } try { promise = dispatchRequest.call(this, newConfig); } catch (error) { return Promise.reject(error); } i = 0; len = responseInterceptorChain.length; while (i < len) { promise = promise.then(responseInterceptorChain[i++], responseInterceptorChain[i++]); } return promise; } }, { key: "getUri", value: function getUri(config) { config = mergeConfig(this.defaults, config); var fullPath = buildFullPath(config.baseURL, config.url, config.allowAbsoluteUrls); return buildURL(fullPath, config.params, config.paramsSerializer); } }]); return Axios; }(); // Provide aliases for supported request methods utils$1.forEach(['delete', 'get', 'head', 'options'], function forEachMethodNoData(method) { /*eslint func-names:0*/ Axios.prototype[method] = function (url, config) { return this.request(mergeConfig(config || {}, { method: method, url: url, data: (config || {}).data })); }; }); utils$1.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) { /*eslint func-names:0*/ function generateHTTPMethod(isForm) { return function httpMethod(url, data, config) { return this.request(mergeConfig(config || {}, { method: method, headers: isForm ? { 'Content-Type': 'multipart/form-data' } : {}, url: url, data: data })); }; } Axios.prototype[method] = generateHTTPMethod(); Axios.prototype[method + 'Form'] = generateHTTPMethod(true); }); var Axios$1 = Axios; /** * A `CancelToken` is an object that can be used to request cancellation of an operation. * * @param {Function} executor The executor function. * * @returns {CancelToken} */ var CancelToken = /*#__PURE__*/function () { function CancelToken(executor) { _classCallCheck(this, CancelToken); if (typeof executor !== 'function') { throw new TypeError('executor must be a function.'); } var resolvePromise; this.promise = new Promise(function promiseExecutor(resolve) { resolvePromise = resolve; }); var token = this; // eslint-disable-next-line func-names this.promise.then(function (cancel) { if (!token._listeners) return; var i = token._listeners.length; while (i-- > 0) { token._listeners[i](cancel); } token._listeners = null; }); // eslint-disable-next-line func-names this.promise.then = function (onfulfilled) { var _resolve; // eslint-disable-next-line func-names var promise = new Promise(function (resolve) { token.subscribe(resolve); _resolve = resolve; }).then(onfulfilled); promise.cancel = function reject() { token.unsubscribe(_resolve); }; return promise; }; executor(function cancel(message, config, request) { if (token.reason) { // Cancellation has already been requested return; } token.reason = new CanceledError(message, config, request); resolvePromise(token.reason); }); } /** * Throws a `CanceledError` if cancellation has been requested. */ _createClass(CancelToken, [{ key: "throwIfRequested", value: function throwIfRequested() { if (this.reason) { throw this.reason; } } /** * Subscribe to the cancel signal */ }, { key: "subscribe", value: function subscribe(listener) { if (this.reason) { listener(this.reason); return; } if (this._listeners) { this._listeners.push(listener); } else { this._listeners = [listener]; } } /** * Unsubscribe from the cancel signal */ }, { key: "unsubscribe", value: function unsubscribe(listener) { if (!this._listeners) { return; } var index = this._listeners.indexOf(listener); if (index !== -1) { this._listeners.splice(index, 1); } } }, { key: "toAbortSignal", value: function toAbortSignal() { var _this = this; var controller = new AbortController(); var abort = function abort(err) { controller.abort(err); }; this.subscribe(abort); controller.signal.unsubscribe = function () { return _this.unsubscribe(abort); }; return controller.signal; } /** * Returns an object that contains a new `CancelToken` and a function that, when called, * cancels the `CancelToken`. */ }], [{ key: "source", value: function source() { var cancel; var token = new CancelToken(function executor(c) { cancel = c; }); return { token: token, cancel: cancel }; } }]); return CancelToken; }(); var CancelToken$1 = CancelToken; /** * Syntactic sugar for invoking a function and expanding an array for arguments. * * Common use case would be to use `Function.prototype.apply`. * * ```js * function f(x, y, z) {} * var args = [1, 2, 3]; * f.apply(null, args); * ``` * * With `spread` this example can be re-written. * * ```js * spread(function(x, y, z) {})([1, 2, 3]); * ``` * * @param {Function} callback * * @returns {Function} */ function spread(callback) { return function wrap(arr) { return callback.apply(null, arr); }; } /** * Determines whether the payload is an error thrown by Axios * * @param {*} payload The value to test * * @returns {boolean} True if the payload is an error thrown by Axios, otherwise false */ function isAxiosError(payload) { return utils$1.isObject(payload) && payload.isAxiosError === true; } var HttpStatusCode = { Continue: 100, SwitchingProtocols: 101, Processing: 102, EarlyHints: 103, Ok: 200, Created: 201, Accepted: 202, NonAuthoritativeInformation: 203, NoContent: 204, ResetContent: 205, PartialContent: 206, MultiStatus: 207, AlreadyReported: 208, ImUsed: 226, MultipleChoices: 300, MovedPermanently: 301, Found: 302, SeeOther: 303, NotModified: 304, UseProxy: 305, Unused: 306, TemporaryRedirect: 307, PermanentRedirect: 308, BadRequest: 400, Unauthorized: 401, PaymentRequired: 402, Forbidden: 403, NotFound: 404, MethodNotAllowed: 405, NotAcceptable: 406, ProxyAuthenticationRequired: 407, RequestTimeout: 408, Conflict: 409, Gone: 410, LengthRequired: 411, PreconditionFailed: 412, PayloadTooLarge: 413, UriTooLong: 414, UnsupportedMediaType: 415, RangeNotSatisfiable: 416, ExpectationFailed: 417, ImATeapot: 418, MisdirectedRequest: 421, UnprocessableEntity: 422, Locked: 423, FailedDependency: 424, TooEarly: 425, UpgradeRequired: 426, PreconditionRequired: 428, TooManyRequests: 429, RequestHeaderFieldsTooLarge: 431, UnavailableForLegalReasons: 451, InternalServerError: 500, NotImplemented: 501, BadGateway: 502, ServiceUnavailable: 503, GatewayTimeout: 504, HttpVersionNotSupported: 505, VariantAlsoNegotiates: 506, InsufficientStorage: 507, LoopDetected: 508, NotExtended: 510, NetworkAuthenticationRequired: 511 }; Object.entries(HttpStatusCode).forEach(function (_ref) { var _ref2 = _slicedToArray(_ref, 2), key = _ref2[0], value = _ref2[1]; HttpStatusCode[value] = key; }); var HttpStatusCode$1 = HttpStatusCode; /** * Create an instance of Axios * * @param {Object} defaultConfig The default config for the instance * * @returns {Axios} A new instance of Axios */ function createInstance(defaultConfig) { var context = new Axios$1(defaultConfig); var instance = bind(Axios$1.prototype.request, context); // Copy axios.prototype to instance utils$1.extend(instance, Axios$1.prototype, context, { allOwnKeys: true }); // Copy context to instance utils$1.extend(instance, context, null, { allOwnKeys: true }); // Factory for creating new instances instance.create = function create(instanceConfig) { return createInstance(mergeConfig(defaultConfig, instanceConfig)); }; return instance; } // Create the default instance to be exported var axios = createInstance(defaults$1); // Expose Axios class to allow class inheritance axios.Axios = Axios$1; // Expose Cancel & CancelToken axios.CanceledError = CanceledError; axios.CancelToken = CancelToken$1; axios.isCancel = isCancel; axios.VERSION = VERSION; axios.toFormData = toFormData; // Expose AxiosError class axios.AxiosError = AxiosError; // alias for CanceledError for backward compatibility axios.Cancel = axios.CanceledError; // Expose all/spread axios.all = function all(promises) { return Promise.all(promises); }; axios.spread = spread; // Expose isAxiosError axios.isAxiosError = isAxiosError; // Expose mergeConfig axios.mergeConfig = mergeConfig; axios.AxiosHeaders = AxiosHeaders$1; axios.formToJSON = function (thing) { return formDataToJSON(utils$1.isHTMLForm(thing) ? new FormData(thing) : thing); }; axios.getAdapter = adapters.getAdapter; axios.HttpStatusCode = HttpStatusCode$1; axios["default"] = axios; return axios; })); //# sourceMappingURL=axios.js.map node_modules/axios/dist/axios.js.map 0000664 00000731102 15114741631 0013555 0 ustar 00 {"version":3,"file":"axios.js","sources":["../lib/helpers/bind.js","../lib/utils.js","../lib/core/AxiosError.js","../lib/helpers/null.js","../lib/helpers/toFormData.js","../lib/helpers/AxiosURLSearchParams.js","../lib/helpers/buildURL.js","../lib/core/InterceptorManager.js","../lib/defaults/transitional.js","../lib/platform/browser/classes/URLSearchParams.js","../lib/platform/browser/classes/FormData.js","../lib/platform/browser/classes/Blob.js","../lib/platform/browser/index.js","../lib/platform/common/utils.js","../lib/platform/index.js","../lib/helpers/toURLEncodedForm.js","../lib/helpers/formDataToJSON.js","../lib/defaults/index.js","../lib/helpers/parseHeaders.js","../lib/core/AxiosHeaders.js","../lib/core/transformData.js","../lib/cancel/isCancel.js","../lib/cancel/CanceledError.js","../lib/core/settle.js","../lib/helpers/parseProtocol.js","../lib/helpers/speedometer.js","../lib/helpers/throttle.js","../lib/helpers/progressEventReducer.js","../lib/helpers/isURLSameOrigin.js","../lib/helpers/cookies.js","../lib/helpers/isAbsoluteURL.js","../lib/helpers/combineURLs.js","../lib/core/buildFullPath.js","../lib/core/mergeConfig.js","../lib/helpers/resolveConfig.js","../lib/adapters/xhr.js","../lib/helpers/composeSignals.js","../lib/helpers/trackStream.js","../lib/adapters/fetch.js","../lib/adapters/adapters.js","../lib/core/dispatchRequest.js","../lib/env/data.js","../lib/helpers/validator.js","../lib/core/Axios.js","../lib/cancel/CancelToken.js","../lib/helpers/spread.js","../lib/helpers/isAxiosError.js","../lib/helpers/HttpStatusCode.js","../lib/axios.js"],"sourcesContent":["'use strict';\n\nexport default function bind(fn, thisArg) {\n return function wrap() {\n return fn.apply(thisArg, arguments);\n };\n}\n","'use strict';\n\nimport bind from './helpers/bind.js';\n\n// utils is a library of generic helper functions non-specific to axios\n\nconst {toString} = Object.prototype;\nconst {getPrototypeOf} = Object;\nconst {iterator, toStringTag} = Symbol;\n\nconst kindOf = (cache => thing => {\n const str = toString.call(thing);\n return cache[str] || (cache[str] = str.slice(8, -1).toLowerCase());\n})(Object.create(null));\n\nconst kindOfTest = (type) => {\n type = type.toLowerCase();\n return (thing) => kindOf(thing) === type\n}\n\nconst typeOfTest = type => thing => typeof thing === type;\n\n/**\n * Determine if a value is an Array\n *\n * @param {Object} val The value to test\n *\n * @returns {boolean} True if value is an Array, otherwise false\n */\nconst {isArray} = Array;\n\n/**\n * Determine if a value is undefined\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if the value is undefined, otherwise false\n */\nconst isUndefined = typeOfTest('undefined');\n\n/**\n * Determine if a value is a Buffer\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a Buffer, otherwise false\n */\nfunction isBuffer(val) {\n return val !== null && !isUndefined(val) && val.constructor !== null && !isUndefined(val.constructor)\n && isFunction(val.constructor.isBuffer) && val.constructor.isBuffer(val);\n}\n\n/**\n * Determine if a value is an ArrayBuffer\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is an ArrayBuffer, otherwise false\n */\nconst isArrayBuffer = kindOfTest('ArrayBuffer');\n\n\n/**\n * Determine if a value is a view on an ArrayBuffer\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a view on an ArrayBuffer, otherwise false\n */\nfunction isArrayBufferView(val) {\n let result;\n if ((typeof ArrayBuffer !== 'undefined') && (ArrayBuffer.isView)) {\n result = ArrayBuffer.isView(val);\n } else {\n result = (val) && (val.buffer) && (isArrayBuffer(val.buffer));\n }\n return result;\n}\n\n/**\n * Determine if a value is a String\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a String, otherwise false\n */\nconst isString = typeOfTest('string');\n\n/**\n * Determine if a value is a Function\n *\n * @param {*} val The value to test\n * @returns {boolean} True if value is a Function, otherwise false\n */\nconst isFunction = typeOfTest('function');\n\n/**\n * Determine if a value is a Number\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a Number, otherwise false\n */\nconst isNumber = typeOfTest('number');\n\n/**\n * Determine if a value is an Object\n *\n * @param {*} thing The value to test\n *\n * @returns {boolean} True if value is an Object, otherwise false\n */\nconst isObject = (thing) => thing !== null && typeof thing === 'object';\n\n/**\n * Determine if a value is a Boolean\n *\n * @param {*} thing The value to test\n * @returns {boolean} True if value is a Boolean, otherwise false\n */\nconst isBoolean = thing => thing === true || thing === false;\n\n/**\n * Determine if a value is a plain Object\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a plain Object, otherwise false\n */\nconst isPlainObject = (val) => {\n if (kindOf(val) !== 'object') {\n return false;\n }\n\n const prototype = getPrototypeOf(val);\n return (prototype === null || prototype === Object.prototype || Object.getPrototypeOf(prototype) === null) && !(toStringTag in val) && !(iterator in val);\n}\n\n/**\n * Determine if a value is a Date\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a Date, otherwise false\n */\nconst isDate = kindOfTest('Date');\n\n/**\n * Determine if a value is a File\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a File, otherwise false\n */\nconst isFile = kindOfTest('File');\n\n/**\n * Determine if a value is a Blob\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a Blob, otherwise false\n */\nconst isBlob = kindOfTest('Blob');\n\n/**\n * Determine if a value is a FileList\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a File, otherwise false\n */\nconst isFileList = kindOfTest('FileList');\n\n/**\n * Determine if a value is a Stream\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a Stream, otherwise false\n */\nconst isStream = (val) => isObject(val) && isFunction(val.pipe);\n\n/**\n * Determine if a value is a FormData\n *\n * @param {*} thing The value to test\n *\n * @returns {boolean} True if value is an FormData, otherwise false\n */\nconst isFormData = (thing) => {\n let kind;\n return thing && (\n (typeof FormData === 'function' && thing instanceof FormData) || (\n isFunction(thing.append) && (\n (kind = kindOf(thing)) === 'formdata' ||\n // detect form-data instance\n (kind === 'object' && isFunction(thing.toString) && thing.toString() === '[object FormData]')\n )\n )\n )\n}\n\n/**\n * Determine if a value is a URLSearchParams object\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a URLSearchParams object, otherwise false\n */\nconst isURLSearchParams = kindOfTest('URLSearchParams');\n\nconst [isReadableStream, isRequest, isResponse, isHeaders] = ['ReadableStream', 'Request', 'Response', 'Headers'].map(kindOfTest);\n\n/**\n * Trim excess whitespace off the beginning and end of a string\n *\n * @param {String} str The String to trim\n *\n * @returns {String} The String freed of excess whitespace\n */\nconst trim = (str) => str.trim ?\n str.trim() : str.replace(/^[\\s\\uFEFF\\xA0]+|[\\s\\uFEFF\\xA0]+$/g, '');\n\n/**\n * Iterate over an Array or an Object invoking a function for each item.\n *\n * If `obj` is an Array callback will be called passing\n * the value, index, and complete array for each item.\n *\n * If 'obj' is an Object callback will be called passing\n * the value, key, and complete object for each property.\n *\n * @param {Object|Array} obj The object to iterate\n * @param {Function} fn The callback to invoke for each item\n *\n * @param {Boolean} [allOwnKeys = false]\n * @returns {any}\n */\nfunction forEach(obj, fn, {allOwnKeys = false} = {}) {\n // Don't bother if no value provided\n if (obj === null || typeof obj === 'undefined') {\n return;\n }\n\n let i;\n let l;\n\n // Force an array if not already something iterable\n if (typeof obj !== 'object') {\n /*eslint no-param-reassign:0*/\n obj = [obj];\n }\n\n if (isArray(obj)) {\n // Iterate over array values\n for (i = 0, l = obj.length; i < l; i++) {\n fn.call(null, obj[i], i, obj);\n }\n } else {\n // Iterate over object keys\n const keys = allOwnKeys ? Object.getOwnPropertyNames(obj) : Object.keys(obj);\n const len = keys.length;\n let key;\n\n for (i = 0; i < len; i++) {\n key = keys[i];\n fn.call(null, obj[key], key, obj);\n }\n }\n}\n\nfunction findKey(obj, key) {\n key = key.toLowerCase();\n const keys = Object.keys(obj);\n let i = keys.length;\n let _key;\n while (i-- > 0) {\n _key = keys[i];\n if (key === _key.toLowerCase()) {\n return _key;\n }\n }\n return null;\n}\n\nconst _global = (() => {\n /*eslint no-undef:0*/\n if (typeof globalThis !== \"undefined\") return globalThis;\n return typeof self !== \"undefined\" ? self : (typeof window !== 'undefined' ? window : global)\n})();\n\nconst isContextDefined = (context) => !isUndefined(context) && context !== _global;\n\n/**\n * Accepts varargs expecting each argument to be an object, then\n * immutably merges the properties of each object and returns result.\n *\n * When multiple objects contain the same key the later object in\n * the arguments list will take precedence.\n *\n * Example:\n *\n * ```js\n * var result = merge({foo: 123}, {foo: 456});\n * console.log(result.foo); // outputs 456\n * ```\n *\n * @param {Object} obj1 Object to merge\n *\n * @returns {Object} Result of all merge properties\n */\nfunction merge(/* obj1, obj2, obj3, ... */) {\n const {caseless} = isContextDefined(this) && this || {};\n const result = {};\n const assignValue = (val, key) => {\n const targetKey = caseless && findKey(result, key) || key;\n if (isPlainObject(result[targetKey]) && isPlainObject(val)) {\n result[targetKey] = merge(result[targetKey], val);\n } else if (isPlainObject(val)) {\n result[targetKey] = merge({}, val);\n } else if (isArray(val)) {\n result[targetKey] = val.slice();\n } else {\n result[targetKey] = val;\n }\n }\n\n for (let i = 0, l = arguments.length; i < l; i++) {\n arguments[i] && forEach(arguments[i], assignValue);\n }\n return result;\n}\n\n/**\n * Extends object a by mutably adding to it the properties of object b.\n *\n * @param {Object} a The object to be extended\n * @param {Object} b The object to copy properties from\n * @param {Object} thisArg The object to bind function to\n *\n * @param {Boolean} [allOwnKeys]\n * @returns {Object} The resulting value of object a\n */\nconst extend = (a, b, thisArg, {allOwnKeys}= {}) => {\n forEach(b, (val, key) => {\n if (thisArg && isFunction(val)) {\n a[key] = bind(val, thisArg);\n } else {\n a[key] = val;\n }\n }, {allOwnKeys});\n return a;\n}\n\n/**\n * Remove byte order marker. This catches EF BB BF (the UTF-8 BOM)\n *\n * @param {string} content with BOM\n *\n * @returns {string} content value without BOM\n */\nconst stripBOM = (content) => {\n if (content.charCodeAt(0) === 0xFEFF) {\n content = content.slice(1);\n }\n return content;\n}\n\n/**\n * Inherit the prototype methods from one constructor into another\n * @param {function} constructor\n * @param {function} superConstructor\n * @param {object} [props]\n * @param {object} [descriptors]\n *\n * @returns {void}\n */\nconst inherits = (constructor, superConstructor, props, descriptors) => {\n constructor.prototype = Object.create(superConstructor.prototype, descriptors);\n constructor.prototype.constructor = constructor;\n Object.defineProperty(constructor, 'super', {\n value: superConstructor.prototype\n });\n props && Object.assign(constructor.prototype, props);\n}\n\n/**\n * Resolve object with deep prototype chain to a flat object\n * @param {Object} sourceObj source object\n * @param {Object} [destObj]\n * @param {Function|Boolean} [filter]\n * @param {Function} [propFilter]\n *\n * @returns {Object}\n */\nconst toFlatObject = (sourceObj, destObj, filter, propFilter) => {\n let props;\n let i;\n let prop;\n const merged = {};\n\n destObj = destObj || {};\n // eslint-disable-next-line no-eq-null,eqeqeq\n if (sourceObj == null) return destObj;\n\n do {\n props = Object.getOwnPropertyNames(sourceObj);\n i = props.length;\n while (i-- > 0) {\n prop = props[i];\n if ((!propFilter || propFilter(prop, sourceObj, destObj)) && !merged[prop]) {\n destObj[prop] = sourceObj[prop];\n merged[prop] = true;\n }\n }\n sourceObj = filter !== false && getPrototypeOf(sourceObj);\n } while (sourceObj && (!filter || filter(sourceObj, destObj)) && sourceObj !== Object.prototype);\n\n return destObj;\n}\n\n/**\n * Determines whether a string ends with the characters of a specified string\n *\n * @param {String} str\n * @param {String} searchString\n * @param {Number} [position= 0]\n *\n * @returns {boolean}\n */\nconst endsWith = (str, searchString, position) => {\n str = String(str);\n if (position === undefined || position > str.length) {\n position = str.length;\n }\n position -= searchString.length;\n const lastIndex = str.indexOf(searchString, position);\n return lastIndex !== -1 && lastIndex === position;\n}\n\n\n/**\n * Returns new array from array like object or null if failed\n *\n * @param {*} [thing]\n *\n * @returns {?Array}\n */\nconst toArray = (thing) => {\n if (!thing) return null;\n if (isArray(thing)) return thing;\n let i = thing.length;\n if (!isNumber(i)) return null;\n const arr = new Array(i);\n while (i-- > 0) {\n arr[i] = thing[i];\n }\n return arr;\n}\n\n/**\n * Checking if the Uint8Array exists and if it does, it returns a function that checks if the\n * thing passed in is an instance of Uint8Array\n *\n * @param {TypedArray}\n *\n * @returns {Array}\n */\n// eslint-disable-next-line func-names\nconst isTypedArray = (TypedArray => {\n // eslint-disable-next-line func-names\n return thing => {\n return TypedArray && thing instanceof TypedArray;\n };\n})(typeof Uint8Array !== 'undefined' && getPrototypeOf(Uint8Array));\n\n/**\n * For each entry in the object, call the function with the key and value.\n *\n * @param {Object<any, any>} obj - The object to iterate over.\n * @param {Function} fn - The function to call for each entry.\n *\n * @returns {void}\n */\nconst forEachEntry = (obj, fn) => {\n const generator = obj && obj[iterator];\n\n const _iterator = generator.call(obj);\n\n let result;\n\n while ((result = _iterator.next()) && !result.done) {\n const pair = result.value;\n fn.call(obj, pair[0], pair[1]);\n }\n}\n\n/**\n * It takes a regular expression and a string, and returns an array of all the matches\n *\n * @param {string} regExp - The regular expression to match against.\n * @param {string} str - The string to search.\n *\n * @returns {Array<boolean>}\n */\nconst matchAll = (regExp, str) => {\n let matches;\n const arr = [];\n\n while ((matches = regExp.exec(str)) !== null) {\n arr.push(matches);\n }\n\n return arr;\n}\n\n/* Checking if the kindOfTest function returns true when passed an HTMLFormElement. */\nconst isHTMLForm = kindOfTest('HTMLFormElement');\n\nconst toCamelCase = str => {\n return str.toLowerCase().replace(/[-_\\s]([a-z\\d])(\\w*)/g,\n function replacer(m, p1, p2) {\n return p1.toUpperCase() + p2;\n }\n );\n};\n\n/* Creating a function that will check if an object has a property. */\nconst hasOwnProperty = (({hasOwnProperty}) => (obj, prop) => hasOwnProperty.call(obj, prop))(Object.prototype);\n\n/**\n * Determine if a value is a RegExp object\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a RegExp object, otherwise false\n */\nconst isRegExp = kindOfTest('RegExp');\n\nconst reduceDescriptors = (obj, reducer) => {\n const descriptors = Object.getOwnPropertyDescriptors(obj);\n const reducedDescriptors = {};\n\n forEach(descriptors, (descriptor, name) => {\n let ret;\n if ((ret = reducer(descriptor, name, obj)) !== false) {\n reducedDescriptors[name] = ret || descriptor;\n }\n });\n\n Object.defineProperties(obj, reducedDescriptors);\n}\n\n/**\n * Makes all methods read-only\n * @param {Object} obj\n */\n\nconst freezeMethods = (obj) => {\n reduceDescriptors(obj, (descriptor, name) => {\n // skip restricted props in strict mode\n if (isFunction(obj) && ['arguments', 'caller', 'callee'].indexOf(name) !== -1) {\n return false;\n }\n\n const value = obj[name];\n\n if (!isFunction(value)) return;\n\n descriptor.enumerable = false;\n\n if ('writable' in descriptor) {\n descriptor.writable = false;\n return;\n }\n\n if (!descriptor.set) {\n descriptor.set = () => {\n throw Error('Can not rewrite read-only method \\'' + name + '\\'');\n };\n }\n });\n}\n\nconst toObjectSet = (arrayOrString, delimiter) => {\n const obj = {};\n\n const define = (arr) => {\n arr.forEach(value => {\n obj[value] = true;\n });\n }\n\n isArray(arrayOrString) ? define(arrayOrString) : define(String(arrayOrString).split(delimiter));\n\n return obj;\n}\n\nconst noop = () => {}\n\nconst toFiniteNumber = (value, defaultValue) => {\n return value != null && Number.isFinite(value = +value) ? value : defaultValue;\n}\n\n/**\n * If the thing is a FormData object, return true, otherwise return false.\n *\n * @param {unknown} thing - The thing to check.\n *\n * @returns {boolean}\n */\nfunction isSpecCompliantForm(thing) {\n return !!(thing && isFunction(thing.append) && thing[toStringTag] === 'FormData' && thing[iterator]);\n}\n\nconst toJSONObject = (obj) => {\n const stack = new Array(10);\n\n const visit = (source, i) => {\n\n if (isObject(source)) {\n if (stack.indexOf(source) >= 0) {\n return;\n }\n\n if(!('toJSON' in source)) {\n stack[i] = source;\n const target = isArray(source) ? [] : {};\n\n forEach(source, (value, key) => {\n const reducedValue = visit(value, i + 1);\n !isUndefined(reducedValue) && (target[key] = reducedValue);\n });\n\n stack[i] = undefined;\n\n return target;\n }\n }\n\n return source;\n }\n\n return visit(obj, 0);\n}\n\nconst isAsyncFn = kindOfTest('AsyncFunction');\n\nconst isThenable = (thing) =>\n thing && (isObject(thing) || isFunction(thing)) && isFunction(thing.then) && isFunction(thing.catch);\n\n// original code\n// https://github.com/DigitalBrainJS/AxiosPromise/blob/16deab13710ec09779922131f3fa5954320f83ab/lib/utils.js#L11-L34\n\nconst _setImmediate = ((setImmediateSupported, postMessageSupported) => {\n if (setImmediateSupported) {\n return setImmediate;\n }\n\n return postMessageSupported ? ((token, callbacks) => {\n _global.addEventListener(\"message\", ({source, data}) => {\n if (source === _global && data === token) {\n callbacks.length && callbacks.shift()();\n }\n }, false);\n\n return (cb) => {\n callbacks.push(cb);\n _global.postMessage(token, \"*\");\n }\n })(`axios@${Math.random()}`, []) : (cb) => setTimeout(cb);\n})(\n typeof setImmediate === 'function',\n isFunction(_global.postMessage)\n);\n\nconst asap = typeof queueMicrotask !== 'undefined' ?\n queueMicrotask.bind(_global) : ( typeof process !== 'undefined' && process.nextTick || _setImmediate);\n\n// *********************\n\n\nconst isIterable = (thing) => thing != null && isFunction(thing[iterator]);\n\n\nexport default {\n isArray,\n isArrayBuffer,\n isBuffer,\n isFormData,\n isArrayBufferView,\n isString,\n isNumber,\n isBoolean,\n isObject,\n isPlainObject,\n isReadableStream,\n isRequest,\n isResponse,\n isHeaders,\n isUndefined,\n isDate,\n isFile,\n isBlob,\n isRegExp,\n isFunction,\n isStream,\n isURLSearchParams,\n isTypedArray,\n isFileList,\n forEach,\n merge,\n extend,\n trim,\n stripBOM,\n inherits,\n toFlatObject,\n kindOf,\n kindOfTest,\n endsWith,\n toArray,\n forEachEntry,\n matchAll,\n isHTMLForm,\n hasOwnProperty,\n hasOwnProp: hasOwnProperty, // an alias to avoid ESLint no-prototype-builtins detection\n reduceDescriptors,\n freezeMethods,\n toObjectSet,\n toCamelCase,\n noop,\n toFiniteNumber,\n findKey,\n global: _global,\n isContextDefined,\n isSpecCompliantForm,\n toJSONObject,\n isAsyncFn,\n isThenable,\n setImmediate: _setImmediate,\n asap,\n isIterable\n};\n","'use strict';\n\nimport utils from '../utils.js';\n\n/**\n * Create an Error with the specified message, config, error code, request and response.\n *\n * @param {string} message The error message.\n * @param {string} [code] The error code (for example, 'ECONNABORTED').\n * @param {Object} [config] The config.\n * @param {Object} [request] The request.\n * @param {Object} [response] The response.\n *\n * @returns {Error} The created error.\n */\nfunction AxiosError(message, code, config, request, response) {\n Error.call(this);\n\n if (Error.captureStackTrace) {\n Error.captureStackTrace(this, this.constructor);\n } else {\n this.stack = (new Error()).stack;\n }\n\n this.message = message;\n this.name = 'AxiosError';\n code && (this.code = code);\n config && (this.config = config);\n request && (this.request = request);\n if (response) {\n this.response = response;\n this.status = response.status ? response.status : null;\n }\n}\n\nutils.inherits(AxiosError, Error, {\n toJSON: function toJSON() {\n return {\n // Standard\n message: this.message,\n name: this.name,\n // Microsoft\n description: this.description,\n number: this.number,\n // Mozilla\n fileName: this.fileName,\n lineNumber: this.lineNumber,\n columnNumber: this.columnNumber,\n stack: this.stack,\n // Axios\n config: utils.toJSONObject(this.config),\n code: this.code,\n status: this.status\n };\n }\n});\n\nconst prototype = AxiosError.prototype;\nconst descriptors = {};\n\n[\n 'ERR_BAD_OPTION_VALUE',\n 'ERR_BAD_OPTION',\n 'ECONNABORTED',\n 'ETIMEDOUT',\n 'ERR_NETWORK',\n 'ERR_FR_TOO_MANY_REDIRECTS',\n 'ERR_DEPRECATED',\n 'ERR_BAD_RESPONSE',\n 'ERR_BAD_REQUEST',\n 'ERR_CANCELED',\n 'ERR_NOT_SUPPORT',\n 'ERR_INVALID_URL'\n// eslint-disable-next-line func-names\n].forEach(code => {\n descriptors[code] = {value: code};\n});\n\nObject.defineProperties(AxiosError, descriptors);\nObject.defineProperty(prototype, 'isAxiosError', {value: true});\n\n// eslint-disable-next-line func-names\nAxiosError.from = (error, code, config, request, response, customProps) => {\n const axiosError = Object.create(prototype);\n\n utils.toFlatObject(error, axiosError, function filter(obj) {\n return obj !== Error.prototype;\n }, prop => {\n return prop !== 'isAxiosError';\n });\n\n AxiosError.call(axiosError, error.message, code, config, request, response);\n\n axiosError.cause = error;\n\n axiosError.name = error.name;\n\n customProps && Object.assign(axiosError, customProps);\n\n return axiosError;\n};\n\nexport default AxiosError;\n","// eslint-disable-next-line strict\nexport default null;\n","'use strict';\n\nimport utils from '../utils.js';\nimport AxiosError from '../core/AxiosError.js';\n// temporary hotfix to avoid circular references until AxiosURLSearchParams is refactored\nimport PlatformFormData from '../platform/node/classes/FormData.js';\n\n/**\n * Determines if the given thing is a array or js object.\n *\n * @param {string} thing - The object or array to be visited.\n *\n * @returns {boolean}\n */\nfunction isVisitable(thing) {\n return utils.isPlainObject(thing) || utils.isArray(thing);\n}\n\n/**\n * It removes the brackets from the end of a string\n *\n * @param {string} key - The key of the parameter.\n *\n * @returns {string} the key without the brackets.\n */\nfunction removeBrackets(key) {\n return utils.endsWith(key, '[]') ? key.slice(0, -2) : key;\n}\n\n/**\n * It takes a path, a key, and a boolean, and returns a string\n *\n * @param {string} path - The path to the current key.\n * @param {string} key - The key of the current object being iterated over.\n * @param {string} dots - If true, the key will be rendered with dots instead of brackets.\n *\n * @returns {string} The path to the current key.\n */\nfunction renderKey(path, key, dots) {\n if (!path) return key;\n return path.concat(key).map(function each(token, i) {\n // eslint-disable-next-line no-param-reassign\n token = removeBrackets(token);\n return !dots && i ? '[' + token + ']' : token;\n }).join(dots ? '.' : '');\n}\n\n/**\n * If the array is an array and none of its elements are visitable, then it's a flat array.\n *\n * @param {Array<any>} arr - The array to check\n *\n * @returns {boolean}\n */\nfunction isFlatArray(arr) {\n return utils.isArray(arr) && !arr.some(isVisitable);\n}\n\nconst predicates = utils.toFlatObject(utils, {}, null, function filter(prop) {\n return /^is[A-Z]/.test(prop);\n});\n\n/**\n * Convert a data object to FormData\n *\n * @param {Object} obj\n * @param {?Object} [formData]\n * @param {?Object} [options]\n * @param {Function} [options.visitor]\n * @param {Boolean} [options.metaTokens = true]\n * @param {Boolean} [options.dots = false]\n * @param {?Boolean} [options.indexes = false]\n *\n * @returns {Object}\n **/\n\n/**\n * It converts an object into a FormData object\n *\n * @param {Object<any, any>} obj - The object to convert to form data.\n * @param {string} formData - The FormData object to append to.\n * @param {Object<string, any>} options\n *\n * @returns\n */\nfunction toFormData(obj, formData, options) {\n if (!utils.isObject(obj)) {\n throw new TypeError('target must be an object');\n }\n\n // eslint-disable-next-line no-param-reassign\n formData = formData || new (PlatformFormData || FormData)();\n\n // eslint-disable-next-line no-param-reassign\n options = utils.toFlatObject(options, {\n metaTokens: true,\n dots: false,\n indexes: false\n }, false, function defined(option, source) {\n // eslint-disable-next-line no-eq-null,eqeqeq\n return !utils.isUndefined(source[option]);\n });\n\n const metaTokens = options.metaTokens;\n // eslint-disable-next-line no-use-before-define\n const visitor = options.visitor || defaultVisitor;\n const dots = options.dots;\n const indexes = options.indexes;\n const _Blob = options.Blob || typeof Blob !== 'undefined' && Blob;\n const useBlob = _Blob && utils.isSpecCompliantForm(formData);\n\n if (!utils.isFunction(visitor)) {\n throw new TypeError('visitor must be a function');\n }\n\n function convertValue(value) {\n if (value === null) return '';\n\n if (utils.isDate(value)) {\n return value.toISOString();\n }\n\n if (utils.isBoolean(value)) {\n return value.toString();\n }\n\n if (!useBlob && utils.isBlob(value)) {\n throw new AxiosError('Blob is not supported. Use a Buffer instead.');\n }\n\n if (utils.isArrayBuffer(value) || utils.isTypedArray(value)) {\n return useBlob && typeof Blob === 'function' ? new Blob([value]) : Buffer.from(value);\n }\n\n return value;\n }\n\n /**\n * Default visitor.\n *\n * @param {*} value\n * @param {String|Number} key\n * @param {Array<String|Number>} path\n * @this {FormData}\n *\n * @returns {boolean} return true to visit the each prop of the value recursively\n */\n function defaultVisitor(value, key, path) {\n let arr = value;\n\n if (value && !path && typeof value === 'object') {\n if (utils.endsWith(key, '{}')) {\n // eslint-disable-next-line no-param-reassign\n key = metaTokens ? key : key.slice(0, -2);\n // eslint-disable-next-line no-param-reassign\n value = JSON.stringify(value);\n } else if (\n (utils.isArray(value) && isFlatArray(value)) ||\n ((utils.isFileList(value) || utils.endsWith(key, '[]')) && (arr = utils.toArray(value))\n )) {\n // eslint-disable-next-line no-param-reassign\n key = removeBrackets(key);\n\n arr.forEach(function each(el, index) {\n !(utils.isUndefined(el) || el === null) && formData.append(\n // eslint-disable-next-line no-nested-ternary\n indexes === true ? renderKey([key], index, dots) : (indexes === null ? key : key + '[]'),\n convertValue(el)\n );\n });\n return false;\n }\n }\n\n if (isVisitable(value)) {\n return true;\n }\n\n formData.append(renderKey(path, key, dots), convertValue(value));\n\n return false;\n }\n\n const stack = [];\n\n const exposedHelpers = Object.assign(predicates, {\n defaultVisitor,\n convertValue,\n isVisitable\n });\n\n function build(value, path) {\n if (utils.isUndefined(value)) return;\n\n if (stack.indexOf(value) !== -1) {\n throw Error('Circular reference detected in ' + path.join('.'));\n }\n\n stack.push(value);\n\n utils.forEach(value, function each(el, key) {\n const result = !(utils.isUndefined(el) || el === null) && visitor.call(\n formData, el, utils.isString(key) ? key.trim() : key, path, exposedHelpers\n );\n\n if (result === true) {\n build(el, path ? path.concat(key) : [key]);\n }\n });\n\n stack.pop();\n }\n\n if (!utils.isObject(obj)) {\n throw new TypeError('data must be an object');\n }\n\n build(obj);\n\n return formData;\n}\n\nexport default toFormData;\n","'use strict';\n\nimport toFormData from './toFormData.js';\n\n/**\n * It encodes a string by replacing all characters that are not in the unreserved set with\n * their percent-encoded equivalents\n *\n * @param {string} str - The string to encode.\n *\n * @returns {string} The encoded string.\n */\nfunction encode(str) {\n const charMap = {\n '!': '%21',\n \"'\": '%27',\n '(': '%28',\n ')': '%29',\n '~': '%7E',\n '%20': '+',\n '%00': '\\x00'\n };\n return encodeURIComponent(str).replace(/[!'()~]|%20|%00/g, function replacer(match) {\n return charMap[match];\n });\n}\n\n/**\n * It takes a params object and converts it to a FormData object\n *\n * @param {Object<string, any>} params - The parameters to be converted to a FormData object.\n * @param {Object<string, any>} options - The options object passed to the Axios constructor.\n *\n * @returns {void}\n */\nfunction AxiosURLSearchParams(params, options) {\n this._pairs = [];\n\n params && toFormData(params, this, options);\n}\n\nconst prototype = AxiosURLSearchParams.prototype;\n\nprototype.append = function append(name, value) {\n this._pairs.push([name, value]);\n};\n\nprototype.toString = function toString(encoder) {\n const _encode = encoder ? function(value) {\n return encoder.call(this, value, encode);\n } : encode;\n\n return this._pairs.map(function each(pair) {\n return _encode(pair[0]) + '=' + _encode(pair[1]);\n }, '').join('&');\n};\n\nexport default AxiosURLSearchParams;\n","'use strict';\n\nimport utils from '../utils.js';\nimport AxiosURLSearchParams from '../helpers/AxiosURLSearchParams.js';\n\n/**\n * It replaces all instances of the characters `:`, `$`, `,`, `+`, `[`, and `]` with their\n * URI encoded counterparts\n *\n * @param {string} val The value to be encoded.\n *\n * @returns {string} The encoded value.\n */\nfunction encode(val) {\n return encodeURIComponent(val).\n replace(/%3A/gi, ':').\n replace(/%24/g, '$').\n replace(/%2C/gi, ',').\n replace(/%20/g, '+').\n replace(/%5B/gi, '[').\n replace(/%5D/gi, ']');\n}\n\n/**\n * Build a URL by appending params to the end\n *\n * @param {string} url The base of the url (e.g., http://www.google.com)\n * @param {object} [params] The params to be appended\n * @param {?(object|Function)} options\n *\n * @returns {string} The formatted url\n */\nexport default function buildURL(url, params, options) {\n /*eslint no-param-reassign:0*/\n if (!params) {\n return url;\n }\n \n const _encode = options && options.encode || encode;\n\n if (utils.isFunction(options)) {\n options = {\n serialize: options\n };\n } \n\n const serializeFn = options && options.serialize;\n\n let serializedParams;\n\n if (serializeFn) {\n serializedParams = serializeFn(params, options);\n } else {\n serializedParams = utils.isURLSearchParams(params) ?\n params.toString() :\n new AxiosURLSearchParams(params, options).toString(_encode);\n }\n\n if (serializedParams) {\n const hashmarkIndex = url.indexOf(\"#\");\n\n if (hashmarkIndex !== -1) {\n url = url.slice(0, hashmarkIndex);\n }\n url += (url.indexOf('?') === -1 ? '?' : '&') + serializedParams;\n }\n\n return url;\n}\n","'use strict';\n\nimport utils from './../utils.js';\n\nclass InterceptorManager {\n constructor() {\n this.handlers = [];\n }\n\n /**\n * Add a new interceptor to the stack\n *\n * @param {Function} fulfilled The function to handle `then` for a `Promise`\n * @param {Function} rejected The function to handle `reject` for a `Promise`\n *\n * @return {Number} An ID used to remove interceptor later\n */\n use(fulfilled, rejected, options) {\n this.handlers.push({\n fulfilled,\n rejected,\n synchronous: options ? options.synchronous : false,\n runWhen: options ? options.runWhen : null\n });\n return this.handlers.length - 1;\n }\n\n /**\n * Remove an interceptor from the stack\n *\n * @param {Number} id The ID that was returned by `use`\n *\n * @returns {Boolean} `true` if the interceptor was removed, `false` otherwise\n */\n eject(id) {\n if (this.handlers[id]) {\n this.handlers[id] = null;\n }\n }\n\n /**\n * Clear all interceptors from the stack\n *\n * @returns {void}\n */\n clear() {\n if (this.handlers) {\n this.handlers = [];\n }\n }\n\n /**\n * Iterate over all the registered interceptors\n *\n * This method is particularly useful for skipping over any\n * interceptors that may have become `null` calling `eject`.\n *\n * @param {Function} fn The function to call for each interceptor\n *\n * @returns {void}\n */\n forEach(fn) {\n utils.forEach(this.handlers, function forEachHandler(h) {\n if (h !== null) {\n fn(h);\n }\n });\n }\n}\n\nexport default InterceptorManager;\n","'use strict';\n\nexport default {\n silentJSONParsing: true,\n forcedJSONParsing: true,\n clarifyTimeoutError: false\n};\n","'use strict';\n\nimport AxiosURLSearchParams from '../../../helpers/AxiosURLSearchParams.js';\nexport default typeof URLSearchParams !== 'undefined' ? URLSearchParams : AxiosURLSearchParams;\n","'use strict';\n\nexport default typeof FormData !== 'undefined' ? FormData : null;\n","'use strict'\n\nexport default typeof Blob !== 'undefined' ? Blob : null\n","import URLSearchParams from './classes/URLSearchParams.js'\nimport FormData from './classes/FormData.js'\nimport Blob from './classes/Blob.js'\n\nexport default {\n isBrowser: true,\n classes: {\n URLSearchParams,\n FormData,\n Blob\n },\n protocols: ['http', 'https', 'file', 'blob', 'url', 'data']\n};\n","const hasBrowserEnv = typeof window !== 'undefined' && typeof document !== 'undefined';\n\nconst _navigator = typeof navigator === 'object' && navigator || undefined;\n\n/**\n * Determine if we're running in a standard browser environment\n *\n * This allows axios to run in a web worker, and react-native.\n * Both environments support XMLHttpRequest, but not fully standard globals.\n *\n * web workers:\n * typeof window -> undefined\n * typeof document -> undefined\n *\n * react-native:\n * navigator.product -> 'ReactNative'\n * nativescript\n * navigator.product -> 'NativeScript' or 'NS'\n *\n * @returns {boolean}\n */\nconst hasStandardBrowserEnv = hasBrowserEnv &&\n (!_navigator || ['ReactNative', 'NativeScript', 'NS'].indexOf(_navigator.product) < 0);\n\n/**\n * Determine if we're running in a standard browser webWorker environment\n *\n * Although the `isStandardBrowserEnv` method indicates that\n * `allows axios to run in a web worker`, the WebWorker will still be\n * filtered out due to its judgment standard\n * `typeof window !== 'undefined' && typeof document !== 'undefined'`.\n * This leads to a problem when axios post `FormData` in webWorker\n */\nconst hasStandardBrowserWebWorkerEnv = (() => {\n return (\n typeof WorkerGlobalScope !== 'undefined' &&\n // eslint-disable-next-line no-undef\n self instanceof WorkerGlobalScope &&\n typeof self.importScripts === 'function'\n );\n})();\n\nconst origin = hasBrowserEnv && window.location.href || 'http://localhost';\n\nexport {\n hasBrowserEnv,\n hasStandardBrowserWebWorkerEnv,\n hasStandardBrowserEnv,\n _navigator as navigator,\n origin\n}\n","import platform from './node/index.js';\nimport * as utils from './common/utils.js';\n\nexport default {\n ...utils,\n ...platform\n}\n","'use strict';\n\nimport utils from '../utils.js';\nimport toFormData from './toFormData.js';\nimport platform from '../platform/index.js';\n\nexport default function toURLEncodedForm(data, options) {\n return toFormData(data, new platform.classes.URLSearchParams(), Object.assign({\n visitor: function(value, key, path, helpers) {\n if (platform.isNode && utils.isBuffer(value)) {\n this.append(key, value.toString('base64'));\n return false;\n }\n\n return helpers.defaultVisitor.apply(this, arguments);\n }\n }, options));\n}\n","'use strict';\n\nimport utils from '../utils.js';\n\n/**\n * It takes a string like `foo[x][y][z]` and returns an array like `['foo', 'x', 'y', 'z']\n *\n * @param {string} name - The name of the property to get.\n *\n * @returns An array of strings.\n */\nfunction parsePropPath(name) {\n // foo[x][y][z]\n // foo.x.y.z\n // foo-x-y-z\n // foo x y z\n return utils.matchAll(/\\w+|\\[(\\w*)]/g, name).map(match => {\n return match[0] === '[]' ? '' : match[1] || match[0];\n });\n}\n\n/**\n * Convert an array to an object.\n *\n * @param {Array<any>} arr - The array to convert to an object.\n *\n * @returns An object with the same keys and values as the array.\n */\nfunction arrayToObject(arr) {\n const obj = {};\n const keys = Object.keys(arr);\n let i;\n const len = keys.length;\n let key;\n for (i = 0; i < len; i++) {\n key = keys[i];\n obj[key] = arr[key];\n }\n return obj;\n}\n\n/**\n * It takes a FormData object and returns a JavaScript object\n *\n * @param {string} formData The FormData object to convert to JSON.\n *\n * @returns {Object<string, any> | null} The converted object.\n */\nfunction formDataToJSON(formData) {\n function buildPath(path, value, target, index) {\n let name = path[index++];\n\n if (name === '__proto__') return true;\n\n const isNumericKey = Number.isFinite(+name);\n const isLast = index >= path.length;\n name = !name && utils.isArray(target) ? target.length : name;\n\n if (isLast) {\n if (utils.hasOwnProp(target, name)) {\n target[name] = [target[name], value];\n } else {\n target[name] = value;\n }\n\n return !isNumericKey;\n }\n\n if (!target[name] || !utils.isObject(target[name])) {\n target[name] = [];\n }\n\n const result = buildPath(path, value, target[name], index);\n\n if (result && utils.isArray(target[name])) {\n target[name] = arrayToObject(target[name]);\n }\n\n return !isNumericKey;\n }\n\n if (utils.isFormData(formData) && utils.isFunction(formData.entries)) {\n const obj = {};\n\n utils.forEachEntry(formData, (name, value) => {\n buildPath(parsePropPath(name), value, obj, 0);\n });\n\n return obj;\n }\n\n return null;\n}\n\nexport default formDataToJSON;\n","'use strict';\n\nimport utils from '../utils.js';\nimport AxiosError from '../core/AxiosError.js';\nimport transitionalDefaults from './transitional.js';\nimport toFormData from '../helpers/toFormData.js';\nimport toURLEncodedForm from '../helpers/toURLEncodedForm.js';\nimport platform from '../platform/index.js';\nimport formDataToJSON from '../helpers/formDataToJSON.js';\n\n/**\n * It takes a string, tries to parse it, and if it fails, it returns the stringified version\n * of the input\n *\n * @param {any} rawValue - The value to be stringified.\n * @param {Function} parser - A function that parses a string into a JavaScript object.\n * @param {Function} encoder - A function that takes a value and returns a string.\n *\n * @returns {string} A stringified version of the rawValue.\n */\nfunction stringifySafely(rawValue, parser, encoder) {\n if (utils.isString(rawValue)) {\n try {\n (parser || JSON.parse)(rawValue);\n return utils.trim(rawValue);\n } catch (e) {\n if (e.name !== 'SyntaxError') {\n throw e;\n }\n }\n }\n\n return (encoder || JSON.stringify)(rawValue);\n}\n\nconst defaults = {\n\n transitional: transitionalDefaults,\n\n adapter: ['xhr', 'http', 'fetch'],\n\n transformRequest: [function transformRequest(data, headers) {\n const contentType = headers.getContentType() || '';\n const hasJSONContentType = contentType.indexOf('application/json') > -1;\n const isObjectPayload = utils.isObject(data);\n\n if (isObjectPayload && utils.isHTMLForm(data)) {\n data = new FormData(data);\n }\n\n const isFormData = utils.isFormData(data);\n\n if (isFormData) {\n return hasJSONContentType ? JSON.stringify(formDataToJSON(data)) : data;\n }\n\n if (utils.isArrayBuffer(data) ||\n utils.isBuffer(data) ||\n utils.isStream(data) ||\n utils.isFile(data) ||\n utils.isBlob(data) ||\n utils.isReadableStream(data)\n ) {\n return data;\n }\n if (utils.isArrayBufferView(data)) {\n return data.buffer;\n }\n if (utils.isURLSearchParams(data)) {\n headers.setContentType('application/x-www-form-urlencoded;charset=utf-8', false);\n return data.toString();\n }\n\n let isFileList;\n\n if (isObjectPayload) {\n if (contentType.indexOf('application/x-www-form-urlencoded') > -1) {\n return toURLEncodedForm(data, this.formSerializer).toString();\n }\n\n if ((isFileList = utils.isFileList(data)) || contentType.indexOf('multipart/form-data') > -1) {\n const _FormData = this.env && this.env.FormData;\n\n return toFormData(\n isFileList ? {'files[]': data} : data,\n _FormData && new _FormData(),\n this.formSerializer\n );\n }\n }\n\n if (isObjectPayload || hasJSONContentType ) {\n headers.setContentType('application/json', false);\n return stringifySafely(data);\n }\n\n return data;\n }],\n\n transformResponse: [function transformResponse(data) {\n const transitional = this.transitional || defaults.transitional;\n const forcedJSONParsing = transitional && transitional.forcedJSONParsing;\n const JSONRequested = this.responseType === 'json';\n\n if (utils.isResponse(data) || utils.isReadableStream(data)) {\n return data;\n }\n\n if (data && utils.isString(data) && ((forcedJSONParsing && !this.responseType) || JSONRequested)) {\n const silentJSONParsing = transitional && transitional.silentJSONParsing;\n const strictJSONParsing = !silentJSONParsing && JSONRequested;\n\n try {\n return JSON.parse(data);\n } catch (e) {\n if (strictJSONParsing) {\n if (e.name === 'SyntaxError') {\n throw AxiosError.from(e, AxiosError.ERR_BAD_RESPONSE, this, null, this.response);\n }\n throw e;\n }\n }\n }\n\n return data;\n }],\n\n /**\n * A timeout in milliseconds to abort a request. If set to 0 (default) a\n * timeout is not created.\n */\n timeout: 0,\n\n xsrfCookieName: 'XSRF-TOKEN',\n xsrfHeaderName: 'X-XSRF-TOKEN',\n\n maxContentLength: -1,\n maxBodyLength: -1,\n\n env: {\n FormData: platform.classes.FormData,\n Blob: platform.classes.Blob\n },\n\n validateStatus: function validateStatus(status) {\n return status >= 200 && status < 300;\n },\n\n headers: {\n common: {\n 'Accept': 'application/json, text/plain, */*',\n 'Content-Type': undefined\n }\n }\n};\n\nutils.forEach(['delete', 'get', 'head', 'post', 'put', 'patch'], (method) => {\n defaults.headers[method] = {};\n});\n\nexport default defaults;\n","'use strict';\n\nimport utils from './../utils.js';\n\n// RawAxiosHeaders whose duplicates are ignored by node\n// c.f. https://nodejs.org/api/http.html#http_message_headers\nconst ignoreDuplicateOf = utils.toObjectSet([\n 'age', 'authorization', 'content-length', 'content-type', 'etag',\n 'expires', 'from', 'host', 'if-modified-since', 'if-unmodified-since',\n 'last-modified', 'location', 'max-forwards', 'proxy-authorization',\n 'referer', 'retry-after', 'user-agent'\n]);\n\n/**\n * Parse headers into an object\n *\n * ```\n * Date: Wed, 27 Aug 2014 08:58:49 GMT\n * Content-Type: application/json\n * Connection: keep-alive\n * Transfer-Encoding: chunked\n * ```\n *\n * @param {String} rawHeaders Headers needing to be parsed\n *\n * @returns {Object} Headers parsed into an object\n */\nexport default rawHeaders => {\n const parsed = {};\n let key;\n let val;\n let i;\n\n rawHeaders && rawHeaders.split('\\n').forEach(function parser(line) {\n i = line.indexOf(':');\n key = line.substring(0, i).trim().toLowerCase();\n val = line.substring(i + 1).trim();\n\n if (!key || (parsed[key] && ignoreDuplicateOf[key])) {\n return;\n }\n\n if (key === 'set-cookie') {\n if (parsed[key]) {\n parsed[key].push(val);\n } else {\n parsed[key] = [val];\n }\n } else {\n parsed[key] = parsed[key] ? parsed[key] + ', ' + val : val;\n }\n });\n\n return parsed;\n};\n","'use strict';\n\nimport utils from '../utils.js';\nimport parseHeaders from '../helpers/parseHeaders.js';\n\nconst $internals = Symbol('internals');\n\nfunction normalizeHeader(header) {\n return header && String(header).trim().toLowerCase();\n}\n\nfunction normalizeValue(value) {\n if (value === false || value == null) {\n return value;\n }\n\n return utils.isArray(value) ? value.map(normalizeValue) : String(value);\n}\n\nfunction parseTokens(str) {\n const tokens = Object.create(null);\n const tokensRE = /([^\\s,;=]+)\\s*(?:=\\s*([^,;]+))?/g;\n let match;\n\n while ((match = tokensRE.exec(str))) {\n tokens[match[1]] = match[2];\n }\n\n return tokens;\n}\n\nconst isValidHeaderName = (str) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(str.trim());\n\nfunction matchHeaderValue(context, value, header, filter, isHeaderNameFilter) {\n if (utils.isFunction(filter)) {\n return filter.call(this, value, header);\n }\n\n if (isHeaderNameFilter) {\n value = header;\n }\n\n if (!utils.isString(value)) return;\n\n if (utils.isString(filter)) {\n return value.indexOf(filter) !== -1;\n }\n\n if (utils.isRegExp(filter)) {\n return filter.test(value);\n }\n}\n\nfunction formatHeader(header) {\n return header.trim()\n .toLowerCase().replace(/([a-z\\d])(\\w*)/g, (w, char, str) => {\n return char.toUpperCase() + str;\n });\n}\n\nfunction buildAccessors(obj, header) {\n const accessorName = utils.toCamelCase(' ' + header);\n\n ['get', 'set', 'has'].forEach(methodName => {\n Object.defineProperty(obj, methodName + accessorName, {\n value: function(arg1, arg2, arg3) {\n return this[methodName].call(this, header, arg1, arg2, arg3);\n },\n configurable: true\n });\n });\n}\n\nclass AxiosHeaders {\n constructor(headers) {\n headers && this.set(headers);\n }\n\n set(header, valueOrRewrite, rewrite) {\n const self = this;\n\n function setHeader(_value, _header, _rewrite) {\n const lHeader = normalizeHeader(_header);\n\n if (!lHeader) {\n throw new Error('header name must be a non-empty string');\n }\n\n const key = utils.findKey(self, lHeader);\n\n if(!key || self[key] === undefined || _rewrite === true || (_rewrite === undefined && self[key] !== false)) {\n self[key || _header] = normalizeValue(_value);\n }\n }\n\n const setHeaders = (headers, _rewrite) =>\n utils.forEach(headers, (_value, _header) => setHeader(_value, _header, _rewrite));\n\n if (utils.isPlainObject(header) || header instanceof this.constructor) {\n setHeaders(header, valueOrRewrite)\n } else if(utils.isString(header) && (header = header.trim()) && !isValidHeaderName(header)) {\n setHeaders(parseHeaders(header), valueOrRewrite);\n } else if (utils.isObject(header) && utils.isIterable(header)) {\n let obj = {}, dest, key;\n for (const entry of header) {\n if (!utils.isArray(entry)) {\n throw TypeError('Object iterator must return a key-value pair');\n }\n\n obj[key = entry[0]] = (dest = obj[key]) ?\n (utils.isArray(dest) ? [...dest, entry[1]] : [dest, entry[1]]) : entry[1];\n }\n\n setHeaders(obj, valueOrRewrite)\n } else {\n header != null && setHeader(valueOrRewrite, header, rewrite);\n }\n\n return this;\n }\n\n get(header, parser) {\n header = normalizeHeader(header);\n\n if (header) {\n const key = utils.findKey(this, header);\n\n if (key) {\n const value = this[key];\n\n if (!parser) {\n return value;\n }\n\n if (parser === true) {\n return parseTokens(value);\n }\n\n if (utils.isFunction(parser)) {\n return parser.call(this, value, key);\n }\n\n if (utils.isRegExp(parser)) {\n return parser.exec(value);\n }\n\n throw new TypeError('parser must be boolean|regexp|function');\n }\n }\n }\n\n has(header, matcher) {\n header = normalizeHeader(header);\n\n if (header) {\n const key = utils.findKey(this, header);\n\n return !!(key && this[key] !== undefined && (!matcher || matchHeaderValue(this, this[key], key, matcher)));\n }\n\n return false;\n }\n\n delete(header, matcher) {\n const self = this;\n let deleted = false;\n\n function deleteHeader(_header) {\n _header = normalizeHeader(_header);\n\n if (_header) {\n const key = utils.findKey(self, _header);\n\n if (key && (!matcher || matchHeaderValue(self, self[key], key, matcher))) {\n delete self[key];\n\n deleted = true;\n }\n }\n }\n\n if (utils.isArray(header)) {\n header.forEach(deleteHeader);\n } else {\n deleteHeader(header);\n }\n\n return deleted;\n }\n\n clear(matcher) {\n const keys = Object.keys(this);\n let i = keys.length;\n let deleted = false;\n\n while (i--) {\n const key = keys[i];\n if(!matcher || matchHeaderValue(this, this[key], key, matcher, true)) {\n delete this[key];\n deleted = true;\n }\n }\n\n return deleted;\n }\n\n normalize(format) {\n const self = this;\n const headers = {};\n\n utils.forEach(this, (value, header) => {\n const key = utils.findKey(headers, header);\n\n if (key) {\n self[key] = normalizeValue(value);\n delete self[header];\n return;\n }\n\n const normalized = format ? formatHeader(header) : String(header).trim();\n\n if (normalized !== header) {\n delete self[header];\n }\n\n self[normalized] = normalizeValue(value);\n\n headers[normalized] = true;\n });\n\n return this;\n }\n\n concat(...targets) {\n return this.constructor.concat(this, ...targets);\n }\n\n toJSON(asStrings) {\n const obj = Object.create(null);\n\n utils.forEach(this, (value, header) => {\n value != null && value !== false && (obj[header] = asStrings && utils.isArray(value) ? value.join(', ') : value);\n });\n\n return obj;\n }\n\n [Symbol.iterator]() {\n return Object.entries(this.toJSON())[Symbol.iterator]();\n }\n\n toString() {\n return Object.entries(this.toJSON()).map(([header, value]) => header + ': ' + value).join('\\n');\n }\n\n getSetCookie() {\n return this.get(\"set-cookie\") || [];\n }\n\n get [Symbol.toStringTag]() {\n return 'AxiosHeaders';\n }\n\n static from(thing) {\n return thing instanceof this ? thing : new this(thing);\n }\n\n static concat(first, ...targets) {\n const computed = new this(first);\n\n targets.forEach((target) => computed.set(target));\n\n return computed;\n }\n\n static accessor(header) {\n const internals = this[$internals] = (this[$internals] = {\n accessors: {}\n });\n\n const accessors = internals.accessors;\n const prototype = this.prototype;\n\n function defineAccessor(_header) {\n const lHeader = normalizeHeader(_header);\n\n if (!accessors[lHeader]) {\n buildAccessors(prototype, _header);\n accessors[lHeader] = true;\n }\n }\n\n utils.isArray(header) ? header.forEach(defineAccessor) : defineAccessor(header);\n\n return this;\n }\n}\n\nAxiosHeaders.accessor(['Content-Type', 'Content-Length', 'Accept', 'Accept-Encoding', 'User-Agent', 'Authorization']);\n\n// reserved names hotfix\nutils.reduceDescriptors(AxiosHeaders.prototype, ({value}, key) => {\n let mapped = key[0].toUpperCase() + key.slice(1); // map `set` => `Set`\n return {\n get: () => value,\n set(headerValue) {\n this[mapped] = headerValue;\n }\n }\n});\n\nutils.freezeMethods(AxiosHeaders);\n\nexport default AxiosHeaders;\n","'use strict';\n\nimport utils from './../utils.js';\nimport defaults from '../defaults/index.js';\nimport AxiosHeaders from '../core/AxiosHeaders.js';\n\n/**\n * Transform the data for a request or a response\n *\n * @param {Array|Function} fns A single function or Array of functions\n * @param {?Object} response The response object\n *\n * @returns {*} The resulting transformed data\n */\nexport default function transformData(fns, response) {\n const config = this || defaults;\n const context = response || config;\n const headers = AxiosHeaders.from(context.headers);\n let data = context.data;\n\n utils.forEach(fns, function transform(fn) {\n data = fn.call(config, data, headers.normalize(), response ? response.status : undefined);\n });\n\n headers.normalize();\n\n return data;\n}\n","'use strict';\n\nexport default function isCancel(value) {\n return !!(value && value.__CANCEL__);\n}\n","'use strict';\n\nimport AxiosError from '../core/AxiosError.js';\nimport utils from '../utils.js';\n\n/**\n * A `CanceledError` is an object that is thrown when an operation is canceled.\n *\n * @param {string=} message The message.\n * @param {Object=} config The config.\n * @param {Object=} request The request.\n *\n * @returns {CanceledError} The created error.\n */\nfunction CanceledError(message, config, request) {\n // eslint-disable-next-line no-eq-null,eqeqeq\n AxiosError.call(this, message == null ? 'canceled' : message, AxiosError.ERR_CANCELED, config, request);\n this.name = 'CanceledError';\n}\n\nutils.inherits(CanceledError, AxiosError, {\n __CANCEL__: true\n});\n\nexport default CanceledError;\n","'use strict';\n\nimport AxiosError from './AxiosError.js';\n\n/**\n * Resolve or reject a Promise based on response status.\n *\n * @param {Function} resolve A function that resolves the promise.\n * @param {Function} reject A function that rejects the promise.\n * @param {object} response The response.\n *\n * @returns {object} The response.\n */\nexport default function settle(resolve, reject, response) {\n const validateStatus = response.config.validateStatus;\n if (!response.status || !validateStatus || validateStatus(response.status)) {\n resolve(response);\n } else {\n reject(new AxiosError(\n 'Request failed with status code ' + response.status,\n [AxiosError.ERR_BAD_REQUEST, AxiosError.ERR_BAD_RESPONSE][Math.floor(response.status / 100) - 4],\n response.config,\n response.request,\n response\n ));\n }\n}\n","'use strict';\n\nexport default function parseProtocol(url) {\n const match = /^([-+\\w]{1,25})(:?\\/\\/|:)/.exec(url);\n return match && match[1] || '';\n}\n","'use strict';\n\n/**\n * Calculate data maxRate\n * @param {Number} [samplesCount= 10]\n * @param {Number} [min= 1000]\n * @returns {Function}\n */\nfunction speedometer(samplesCount, min) {\n samplesCount = samplesCount || 10;\n const bytes = new Array(samplesCount);\n const timestamps = new Array(samplesCount);\n let head = 0;\n let tail = 0;\n let firstSampleTS;\n\n min = min !== undefined ? min : 1000;\n\n return function push(chunkLength) {\n const now = Date.now();\n\n const startedAt = timestamps[tail];\n\n if (!firstSampleTS) {\n firstSampleTS = now;\n }\n\n bytes[head] = chunkLength;\n timestamps[head] = now;\n\n let i = tail;\n let bytesCount = 0;\n\n while (i !== head) {\n bytesCount += bytes[i++];\n i = i % samplesCount;\n }\n\n head = (head + 1) % samplesCount;\n\n if (head === tail) {\n tail = (tail + 1) % samplesCount;\n }\n\n if (now - firstSampleTS < min) {\n return;\n }\n\n const passed = startedAt && now - startedAt;\n\n return passed ? Math.round(bytesCount * 1000 / passed) : undefined;\n };\n}\n\nexport default speedometer;\n","/**\n * Throttle decorator\n * @param {Function} fn\n * @param {Number} freq\n * @return {Function}\n */\nfunction throttle(fn, freq) {\n let timestamp = 0;\n let threshold = 1000 / freq;\n let lastArgs;\n let timer;\n\n const invoke = (args, now = Date.now()) => {\n timestamp = now;\n lastArgs = null;\n if (timer) {\n clearTimeout(timer);\n timer = null;\n }\n fn.apply(null, args);\n }\n\n const throttled = (...args) => {\n const now = Date.now();\n const passed = now - timestamp;\n if ( passed >= threshold) {\n invoke(args, now);\n } else {\n lastArgs = args;\n if (!timer) {\n timer = setTimeout(() => {\n timer = null;\n invoke(lastArgs)\n }, threshold - passed);\n }\n }\n }\n\n const flush = () => lastArgs && invoke(lastArgs);\n\n return [throttled, flush];\n}\n\nexport default throttle;\n","import speedometer from \"./speedometer.js\";\nimport throttle from \"./throttle.js\";\nimport utils from \"../utils.js\";\n\nexport const progressEventReducer = (listener, isDownloadStream, freq = 3) => {\n let bytesNotified = 0;\n const _speedometer = speedometer(50, 250);\n\n return throttle(e => {\n const loaded = e.loaded;\n const total = e.lengthComputable ? e.total : undefined;\n const progressBytes = loaded - bytesNotified;\n const rate = _speedometer(progressBytes);\n const inRange = loaded <= total;\n\n bytesNotified = loaded;\n\n const data = {\n loaded,\n total,\n progress: total ? (loaded / total) : undefined,\n bytes: progressBytes,\n rate: rate ? rate : undefined,\n estimated: rate && total && inRange ? (total - loaded) / rate : undefined,\n event: e,\n lengthComputable: total != null,\n [isDownloadStream ? 'download' : 'upload']: true\n };\n\n listener(data);\n }, freq);\n}\n\nexport const progressEventDecorator = (total, throttled) => {\n const lengthComputable = total != null;\n\n return [(loaded) => throttled[0]({\n lengthComputable,\n total,\n loaded\n }), throttled[1]];\n}\n\nexport const asyncDecorator = (fn) => (...args) => utils.asap(() => fn(...args));\n","import platform from '../platform/index.js';\n\nexport default platform.hasStandardBrowserEnv ? ((origin, isMSIE) => (url) => {\n url = new URL(url, platform.origin);\n\n return (\n origin.protocol === url.protocol &&\n origin.host === url.host &&\n (isMSIE || origin.port === url.port)\n );\n})(\n new URL(platform.origin),\n platform.navigator && /(msie|trident)/i.test(platform.navigator.userAgent)\n) : () => true;\n","import utils from './../utils.js';\nimport platform from '../platform/index.js';\n\nexport default platform.hasStandardBrowserEnv ?\n\n // Standard browser envs support document.cookie\n {\n write(name, value, expires, path, domain, secure) {\n const cookie = [name + '=' + encodeURIComponent(value)];\n\n utils.isNumber(expires) && cookie.push('expires=' + new Date(expires).toGMTString());\n\n utils.isString(path) && cookie.push('path=' + path);\n\n utils.isString(domain) && cookie.push('domain=' + domain);\n\n secure === true && cookie.push('secure');\n\n document.cookie = cookie.join('; ');\n },\n\n read(name) {\n const match = document.cookie.match(new RegExp('(^|;\\\\s*)(' + name + ')=([^;]*)'));\n return (match ? decodeURIComponent(match[3]) : null);\n },\n\n remove(name) {\n this.write(name, '', Date.now() - 86400000);\n }\n }\n\n :\n\n // Non-standard browser env (web workers, react-native) lack needed support.\n {\n write() {},\n read() {\n return null;\n },\n remove() {}\n };\n\n","'use strict';\n\n/**\n * Determines whether the specified URL is absolute\n *\n * @param {string} url The URL to test\n *\n * @returns {boolean} True if the specified URL is absolute, otherwise false\n */\nexport default function isAbsoluteURL(url) {\n // A URL is considered absolute if it begins with \"<scheme>://\" or \"//\" (protocol-relative URL).\n // RFC 3986 defines scheme name as a sequence of characters beginning with a letter and followed\n // by any combination of letters, digits, plus, period, or hyphen.\n return /^([a-z][a-z\\d+\\-.]*:)?\\/\\//i.test(url);\n}\n","'use strict';\n\n/**\n * Creates a new URL by combining the specified URLs\n *\n * @param {string} baseURL The base URL\n * @param {string} relativeURL The relative URL\n *\n * @returns {string} The combined URL\n */\nexport default function combineURLs(baseURL, relativeURL) {\n return relativeURL\n ? baseURL.replace(/\\/?\\/$/, '') + '/' + relativeURL.replace(/^\\/+/, '')\n : baseURL;\n}\n","'use strict';\n\nimport isAbsoluteURL from '../helpers/isAbsoluteURL.js';\nimport combineURLs from '../helpers/combineURLs.js';\n\n/**\n * Creates a new URL by combining the baseURL with the requestedURL,\n * only when the requestedURL is not already an absolute URL.\n * If the requestURL is absolute, this function returns the requestedURL untouched.\n *\n * @param {string} baseURL The base URL\n * @param {string} requestedURL Absolute or relative URL to combine\n *\n * @returns {string} The combined full path\n */\nexport default function buildFullPath(baseURL, requestedURL, allowAbsoluteUrls) {\n let isRelativeUrl = !isAbsoluteURL(requestedURL);\n if (baseURL && (isRelativeUrl || allowAbsoluteUrls == false)) {\n return combineURLs(baseURL, requestedURL);\n }\n return requestedURL;\n}\n","'use strict';\n\nimport utils from '../utils.js';\nimport AxiosHeaders from \"./AxiosHeaders.js\";\n\nconst headersToObject = (thing) => thing instanceof AxiosHeaders ? { ...thing } : thing;\n\n/**\n * Config-specific merge-function which creates a new config-object\n * by merging two configuration objects together.\n *\n * @param {Object} config1\n * @param {Object} config2\n *\n * @returns {Object} New object resulting from merging config2 to config1\n */\nexport default function mergeConfig(config1, config2) {\n // eslint-disable-next-line no-param-reassign\n config2 = config2 || {};\n const config = {};\n\n function getMergedValue(target, source, prop, caseless) {\n if (utils.isPlainObject(target) && utils.isPlainObject(source)) {\n return utils.merge.call({caseless}, target, source);\n } else if (utils.isPlainObject(source)) {\n return utils.merge({}, source);\n } else if (utils.isArray(source)) {\n return source.slice();\n }\n return source;\n }\n\n // eslint-disable-next-line consistent-return\n function mergeDeepProperties(a, b, prop , caseless) {\n if (!utils.isUndefined(b)) {\n return getMergedValue(a, b, prop , caseless);\n } else if (!utils.isUndefined(a)) {\n return getMergedValue(undefined, a, prop , caseless);\n }\n }\n\n // eslint-disable-next-line consistent-return\n function valueFromConfig2(a, b) {\n if (!utils.isUndefined(b)) {\n return getMergedValue(undefined, b);\n }\n }\n\n // eslint-disable-next-line consistent-return\n function defaultToConfig2(a, b) {\n if (!utils.isUndefined(b)) {\n return getMergedValue(undefined, b);\n } else if (!utils.isUndefined(a)) {\n return getMergedValue(undefined, a);\n }\n }\n\n // eslint-disable-next-line consistent-return\n function mergeDirectKeys(a, b, prop) {\n if (prop in config2) {\n return getMergedValue(a, b);\n } else if (prop in config1) {\n return getMergedValue(undefined, a);\n }\n }\n\n const mergeMap = {\n url: valueFromConfig2,\n method: valueFromConfig2,\n data: valueFromConfig2,\n baseURL: defaultToConfig2,\n transformRequest: defaultToConfig2,\n transformResponse: defaultToConfig2,\n paramsSerializer: defaultToConfig2,\n timeout: defaultToConfig2,\n timeoutMessage: defaultToConfig2,\n withCredentials: defaultToConfig2,\n withXSRFToken: defaultToConfig2,\n adapter: defaultToConfig2,\n responseType: defaultToConfig2,\n xsrfCookieName: defaultToConfig2,\n xsrfHeaderName: defaultToConfig2,\n onUploadProgress: defaultToConfig2,\n onDownloadProgress: defaultToConfig2,\n decompress: defaultToConfig2,\n maxContentLength: defaultToConfig2,\n maxBodyLength: defaultToConfig2,\n beforeRedirect: defaultToConfig2,\n transport: defaultToConfig2,\n httpAgent: defaultToConfig2,\n httpsAgent: defaultToConfig2,\n cancelToken: defaultToConfig2,\n socketPath: defaultToConfig2,\n responseEncoding: defaultToConfig2,\n validateStatus: mergeDirectKeys,\n headers: (a, b , prop) => mergeDeepProperties(headersToObject(a), headersToObject(b),prop, true)\n };\n\n utils.forEach(Object.keys(Object.assign({}, config1, config2)), function computeConfigValue(prop) {\n const merge = mergeMap[prop] || mergeDeepProperties;\n const configValue = merge(config1[prop], config2[prop], prop);\n (utils.isUndefined(configValue) && merge !== mergeDirectKeys) || (config[prop] = configValue);\n });\n\n return config;\n}\n","import platform from \"../platform/index.js\";\nimport utils from \"../utils.js\";\nimport isURLSameOrigin from \"./isURLSameOrigin.js\";\nimport cookies from \"./cookies.js\";\nimport buildFullPath from \"../core/buildFullPath.js\";\nimport mergeConfig from \"../core/mergeConfig.js\";\nimport AxiosHeaders from \"../core/AxiosHeaders.js\";\nimport buildURL from \"./buildURL.js\";\n\nexport default (config) => {\n const newConfig = mergeConfig({}, config);\n\n let {data, withXSRFToken, xsrfHeaderName, xsrfCookieName, headers, auth} = newConfig;\n\n newConfig.headers = headers = AxiosHeaders.from(headers);\n\n newConfig.url = buildURL(buildFullPath(newConfig.baseURL, newConfig.url, newConfig.allowAbsoluteUrls), config.params, config.paramsSerializer);\n\n // HTTP basic authentication\n if (auth) {\n headers.set('Authorization', 'Basic ' +\n btoa((auth.username || '') + ':' + (auth.password ? unescape(encodeURIComponent(auth.password)) : ''))\n );\n }\n\n let contentType;\n\n if (utils.isFormData(data)) {\n if (platform.hasStandardBrowserEnv || platform.hasStandardBrowserWebWorkerEnv) {\n headers.setContentType(undefined); // Let the browser set it\n } else if ((contentType = headers.getContentType()) !== false) {\n // fix semicolon duplication issue for ReactNative FormData implementation\n const [type, ...tokens] = contentType ? contentType.split(';').map(token => token.trim()).filter(Boolean) : [];\n headers.setContentType([type || 'multipart/form-data', ...tokens].join('; '));\n }\n }\n\n // Add xsrf header\n // This is only done if running in a standard browser environment.\n // Specifically not if we're in a web worker, or react-native.\n\n if (platform.hasStandardBrowserEnv) {\n withXSRFToken && utils.isFunction(withXSRFToken) && (withXSRFToken = withXSRFToken(newConfig));\n\n if (withXSRFToken || (withXSRFToken !== false && isURLSameOrigin(newConfig.url))) {\n // Add xsrf header\n const xsrfValue = xsrfHeaderName && xsrfCookieName && cookies.read(xsrfCookieName);\n\n if (xsrfValue) {\n headers.set(xsrfHeaderName, xsrfValue);\n }\n }\n }\n\n return newConfig;\n}\n\n","import utils from './../utils.js';\nimport settle from './../core/settle.js';\nimport transitionalDefaults from '../defaults/transitional.js';\nimport AxiosError from '../core/AxiosError.js';\nimport CanceledError from '../cancel/CanceledError.js';\nimport parseProtocol from '../helpers/parseProtocol.js';\nimport platform from '../platform/index.js';\nimport AxiosHeaders from '../core/AxiosHeaders.js';\nimport {progressEventReducer} from '../helpers/progressEventReducer.js';\nimport resolveConfig from \"../helpers/resolveConfig.js\";\n\nconst isXHRAdapterSupported = typeof XMLHttpRequest !== 'undefined';\n\nexport default isXHRAdapterSupported && function (config) {\n return new Promise(function dispatchXhrRequest(resolve, reject) {\n const _config = resolveConfig(config);\n let requestData = _config.data;\n const requestHeaders = AxiosHeaders.from(_config.headers).normalize();\n let {responseType, onUploadProgress, onDownloadProgress} = _config;\n let onCanceled;\n let uploadThrottled, downloadThrottled;\n let flushUpload, flushDownload;\n\n function done() {\n flushUpload && flushUpload(); // flush events\n flushDownload && flushDownload(); // flush events\n\n _config.cancelToken && _config.cancelToken.unsubscribe(onCanceled);\n\n _config.signal && _config.signal.removeEventListener('abort', onCanceled);\n }\n\n let request = new XMLHttpRequest();\n\n request.open(_config.method.toUpperCase(), _config.url, true);\n\n // Set the request timeout in MS\n request.timeout = _config.timeout;\n\n function onloadend() {\n if (!request) {\n return;\n }\n // Prepare the response\n const responseHeaders = AxiosHeaders.from(\n 'getAllResponseHeaders' in request && request.getAllResponseHeaders()\n );\n const responseData = !responseType || responseType === 'text' || responseType === 'json' ?\n request.responseText : request.response;\n const response = {\n data: responseData,\n status: request.status,\n statusText: request.statusText,\n headers: responseHeaders,\n config,\n request\n };\n\n settle(function _resolve(value) {\n resolve(value);\n done();\n }, function _reject(err) {\n reject(err);\n done();\n }, response);\n\n // Clean up request\n request = null;\n }\n\n if ('onloadend' in request) {\n // Use onloadend if available\n request.onloadend = onloadend;\n } else {\n // Listen for ready state to emulate onloadend\n request.onreadystatechange = function handleLoad() {\n if (!request || request.readyState !== 4) {\n return;\n }\n\n // The request errored out and we didn't get a response, this will be\n // handled by onerror instead\n // With one exception: request that using file: protocol, most browsers\n // will return status as 0 even though it's a successful request\n if (request.status === 0 && !(request.responseURL && request.responseURL.indexOf('file:') === 0)) {\n return;\n }\n // readystate handler is calling before onerror or ontimeout handlers,\n // so we should call onloadend on the next 'tick'\n setTimeout(onloadend);\n };\n }\n\n // Handle browser request cancellation (as opposed to a manual cancellation)\n request.onabort = function handleAbort() {\n if (!request) {\n return;\n }\n\n reject(new AxiosError('Request aborted', AxiosError.ECONNABORTED, config, request));\n\n // Clean up request\n request = null;\n };\n\n // Handle low level network errors\n request.onerror = function handleError() {\n // Real errors are hidden from us by the browser\n // onerror should only fire if it's a network error\n reject(new AxiosError('Network Error', AxiosError.ERR_NETWORK, config, request));\n\n // Clean up request\n request = null;\n };\n\n // Handle timeout\n request.ontimeout = function handleTimeout() {\n let timeoutErrorMessage = _config.timeout ? 'timeout of ' + _config.timeout + 'ms exceeded' : 'timeout exceeded';\n const transitional = _config.transitional || transitionalDefaults;\n if (_config.timeoutErrorMessage) {\n timeoutErrorMessage = _config.timeoutErrorMessage;\n }\n reject(new AxiosError(\n timeoutErrorMessage,\n transitional.clarifyTimeoutError ? AxiosError.ETIMEDOUT : AxiosError.ECONNABORTED,\n config,\n request));\n\n // Clean up request\n request = null;\n };\n\n // Remove Content-Type if data is undefined\n requestData === undefined && requestHeaders.setContentType(null);\n\n // Add headers to the request\n if ('setRequestHeader' in request) {\n utils.forEach(requestHeaders.toJSON(), function setRequestHeader(val, key) {\n request.setRequestHeader(key, val);\n });\n }\n\n // Add withCredentials to request if needed\n if (!utils.isUndefined(_config.withCredentials)) {\n request.withCredentials = !!_config.withCredentials;\n }\n\n // Add responseType to request if needed\n if (responseType && responseType !== 'json') {\n request.responseType = _config.responseType;\n }\n\n // Handle progress if needed\n if (onDownloadProgress) {\n ([downloadThrottled, flushDownload] = progressEventReducer(onDownloadProgress, true));\n request.addEventListener('progress', downloadThrottled);\n }\n\n // Not all browsers support upload events\n if (onUploadProgress && request.upload) {\n ([uploadThrottled, flushUpload] = progressEventReducer(onUploadProgress));\n\n request.upload.addEventListener('progress', uploadThrottled);\n\n request.upload.addEventListener('loadend', flushUpload);\n }\n\n if (_config.cancelToken || _config.signal) {\n // Handle cancellation\n // eslint-disable-next-line func-names\n onCanceled = cancel => {\n if (!request) {\n return;\n }\n reject(!cancel || cancel.type ? new CanceledError(null, config, request) : cancel);\n request.abort();\n request = null;\n };\n\n _config.cancelToken && _config.cancelToken.subscribe(onCanceled);\n if (_config.signal) {\n _config.signal.aborted ? onCanceled() : _config.signal.addEventListener('abort', onCanceled);\n }\n }\n\n const protocol = parseProtocol(_config.url);\n\n if (protocol && platform.protocols.indexOf(protocol) === -1) {\n reject(new AxiosError('Unsupported protocol ' + protocol + ':', AxiosError.ERR_BAD_REQUEST, config));\n return;\n }\n\n\n // Send the request\n request.send(requestData || null);\n });\n}\n","import CanceledError from \"../cancel/CanceledError.js\";\nimport AxiosError from \"../core/AxiosError.js\";\nimport utils from '../utils.js';\n\nconst composeSignals = (signals, timeout) => {\n const {length} = (signals = signals ? signals.filter(Boolean) : []);\n\n if (timeout || length) {\n let controller = new AbortController();\n\n let aborted;\n\n const onabort = function (reason) {\n if (!aborted) {\n aborted = true;\n unsubscribe();\n const err = reason instanceof Error ? reason : this.reason;\n controller.abort(err instanceof AxiosError ? err : new CanceledError(err instanceof Error ? err.message : err));\n }\n }\n\n let timer = timeout && setTimeout(() => {\n timer = null;\n onabort(new AxiosError(`timeout ${timeout} of ms exceeded`, AxiosError.ETIMEDOUT))\n }, timeout)\n\n const unsubscribe = () => {\n if (signals) {\n timer && clearTimeout(timer);\n timer = null;\n signals.forEach(signal => {\n signal.unsubscribe ? signal.unsubscribe(onabort) : signal.removeEventListener('abort', onabort);\n });\n signals = null;\n }\n }\n\n signals.forEach((signal) => signal.addEventListener('abort', onabort));\n\n const {signal} = controller;\n\n signal.unsubscribe = () => utils.asap(unsubscribe);\n\n return signal;\n }\n}\n\nexport default composeSignals;\n","\nexport const streamChunk = function* (chunk, chunkSize) {\n let len = chunk.byteLength;\n\n if (!chunkSize || len < chunkSize) {\n yield chunk;\n return;\n }\n\n let pos = 0;\n let end;\n\n while (pos < len) {\n end = pos + chunkSize;\n yield chunk.slice(pos, end);\n pos = end;\n }\n}\n\nexport const readBytes = async function* (iterable, chunkSize) {\n for await (const chunk of readStream(iterable)) {\n yield* streamChunk(chunk, chunkSize);\n }\n}\n\nconst readStream = async function* (stream) {\n if (stream[Symbol.asyncIterator]) {\n yield* stream;\n return;\n }\n\n const reader = stream.getReader();\n try {\n for (;;) {\n const {done, value} = await reader.read();\n if (done) {\n break;\n }\n yield value;\n }\n } finally {\n await reader.cancel();\n }\n}\n\nexport const trackStream = (stream, chunkSize, onProgress, onFinish) => {\n const iterator = readBytes(stream, chunkSize);\n\n let bytes = 0;\n let done;\n let _onFinish = (e) => {\n if (!done) {\n done = true;\n onFinish && onFinish(e);\n }\n }\n\n return new ReadableStream({\n async pull(controller) {\n try {\n const {done, value} = await iterator.next();\n\n if (done) {\n _onFinish();\n controller.close();\n return;\n }\n\n let len = value.byteLength;\n if (onProgress) {\n let loadedBytes = bytes += len;\n onProgress(loadedBytes);\n }\n controller.enqueue(new Uint8Array(value));\n } catch (err) {\n _onFinish(err);\n throw err;\n }\n },\n cancel(reason) {\n _onFinish(reason);\n return iterator.return();\n }\n }, {\n highWaterMark: 2\n })\n}\n","import platform from \"../platform/index.js\";\nimport utils from \"../utils.js\";\nimport AxiosError from \"../core/AxiosError.js\";\nimport composeSignals from \"../helpers/composeSignals.js\";\nimport {trackStream} from \"../helpers/trackStream.js\";\nimport AxiosHeaders from \"../core/AxiosHeaders.js\";\nimport {progressEventReducer, progressEventDecorator, asyncDecorator} from \"../helpers/progressEventReducer.js\";\nimport resolveConfig from \"../helpers/resolveConfig.js\";\nimport settle from \"../core/settle.js\";\n\nconst isFetchSupported = typeof fetch === 'function' && typeof Request === 'function' && typeof Response === 'function';\nconst isReadableStreamSupported = isFetchSupported && typeof ReadableStream === 'function';\n\n// used only inside the fetch adapter\nconst encodeText = isFetchSupported && (typeof TextEncoder === 'function' ?\n ((encoder) => (str) => encoder.encode(str))(new TextEncoder()) :\n async (str) => new Uint8Array(await new Response(str).arrayBuffer())\n);\n\nconst test = (fn, ...args) => {\n try {\n return !!fn(...args);\n } catch (e) {\n return false\n }\n}\n\nconst supportsRequestStream = isReadableStreamSupported && test(() => {\n let duplexAccessed = false;\n\n const hasContentType = new Request(platform.origin, {\n body: new ReadableStream(),\n method: 'POST',\n get duplex() {\n duplexAccessed = true;\n return 'half';\n },\n }).headers.has('Content-Type');\n\n return duplexAccessed && !hasContentType;\n});\n\nconst DEFAULT_CHUNK_SIZE = 64 * 1024;\n\nconst supportsResponseStream = isReadableStreamSupported &&\n test(() => utils.isReadableStream(new Response('').body));\n\n\nconst resolvers = {\n stream: supportsResponseStream && ((res) => res.body)\n};\n\nisFetchSupported && (((res) => {\n ['text', 'arrayBuffer', 'blob', 'formData', 'stream'].forEach(type => {\n !resolvers[type] && (resolvers[type] = utils.isFunction(res[type]) ? (res) => res[type]() :\n (_, config) => {\n throw new AxiosError(`Response type '${type}' is not supported`, AxiosError.ERR_NOT_SUPPORT, config);\n })\n });\n})(new Response));\n\nconst getBodyLength = async (body) => {\n if (body == null) {\n return 0;\n }\n\n if(utils.isBlob(body)) {\n return body.size;\n }\n\n if(utils.isSpecCompliantForm(body)) {\n const _request = new Request(platform.origin, {\n method: 'POST',\n body,\n });\n return (await _request.arrayBuffer()).byteLength;\n }\n\n if(utils.isArrayBufferView(body) || utils.isArrayBuffer(body)) {\n return body.byteLength;\n }\n\n if(utils.isURLSearchParams(body)) {\n body = body + '';\n }\n\n if(utils.isString(body)) {\n return (await encodeText(body)).byteLength;\n }\n}\n\nconst resolveBodyLength = async (headers, body) => {\n const length = utils.toFiniteNumber(headers.getContentLength());\n\n return length == null ? getBodyLength(body) : length;\n}\n\nexport default isFetchSupported && (async (config) => {\n let {\n url,\n method,\n data,\n signal,\n cancelToken,\n timeout,\n onDownloadProgress,\n onUploadProgress,\n responseType,\n headers,\n withCredentials = 'same-origin',\n fetchOptions\n } = resolveConfig(config);\n\n responseType = responseType ? (responseType + '').toLowerCase() : 'text';\n\n let composedSignal = composeSignals([signal, cancelToken && cancelToken.toAbortSignal()], timeout);\n\n let request;\n\n const unsubscribe = composedSignal && composedSignal.unsubscribe && (() => {\n composedSignal.unsubscribe();\n });\n\n let requestContentLength;\n\n try {\n if (\n onUploadProgress && supportsRequestStream && method !== 'get' && method !== 'head' &&\n (requestContentLength = await resolveBodyLength(headers, data)) !== 0\n ) {\n let _request = new Request(url, {\n method: 'POST',\n body: data,\n duplex: \"half\"\n });\n\n let contentTypeHeader;\n\n if (utils.isFormData(data) && (contentTypeHeader = _request.headers.get('content-type'))) {\n headers.setContentType(contentTypeHeader)\n }\n\n if (_request.body) {\n const [onProgress, flush] = progressEventDecorator(\n requestContentLength,\n progressEventReducer(asyncDecorator(onUploadProgress))\n );\n\n data = trackStream(_request.body, DEFAULT_CHUNK_SIZE, onProgress, flush);\n }\n }\n\n if (!utils.isString(withCredentials)) {\n withCredentials = withCredentials ? 'include' : 'omit';\n }\n\n // Cloudflare Workers throws when credentials are defined\n // see https://github.com/cloudflare/workerd/issues/902\n const isCredentialsSupported = \"credentials\" in Request.prototype;\n request = new Request(url, {\n ...fetchOptions,\n signal: composedSignal,\n method: method.toUpperCase(),\n headers: headers.normalize().toJSON(),\n body: data,\n duplex: \"half\",\n credentials: isCredentialsSupported ? withCredentials : undefined\n });\n\n let response = await fetch(request, fetchOptions);\n\n const isStreamResponse = supportsResponseStream && (responseType === 'stream' || responseType === 'response');\n\n if (supportsResponseStream && (onDownloadProgress || (isStreamResponse && unsubscribe))) {\n const options = {};\n\n ['status', 'statusText', 'headers'].forEach(prop => {\n options[prop] = response[prop];\n });\n\n const responseContentLength = utils.toFiniteNumber(response.headers.get('content-length'));\n\n const [onProgress, flush] = onDownloadProgress && progressEventDecorator(\n responseContentLength,\n progressEventReducer(asyncDecorator(onDownloadProgress), true)\n ) || [];\n\n response = new Response(\n trackStream(response.body, DEFAULT_CHUNK_SIZE, onProgress, () => {\n flush && flush();\n unsubscribe && unsubscribe();\n }),\n options\n );\n }\n\n responseType = responseType || 'text';\n\n let responseData = await resolvers[utils.findKey(resolvers, responseType) || 'text'](response, config);\n\n !isStreamResponse && unsubscribe && unsubscribe();\n\n return await new Promise((resolve, reject) => {\n settle(resolve, reject, {\n data: responseData,\n headers: AxiosHeaders.from(response.headers),\n status: response.status,\n statusText: response.statusText,\n config,\n request\n })\n })\n } catch (err) {\n unsubscribe && unsubscribe();\n\n if (err && err.name === 'TypeError' && /Load failed|fetch/i.test(err.message)) {\n throw Object.assign(\n new AxiosError('Network Error', AxiosError.ERR_NETWORK, config, request),\n {\n cause: err.cause || err\n }\n )\n }\n\n throw AxiosError.from(err, err && err.code, config, request);\n }\n});\n\n\n","import utils from '../utils.js';\nimport httpAdapter from './http.js';\nimport xhrAdapter from './xhr.js';\nimport fetchAdapter from './fetch.js';\nimport AxiosError from \"../core/AxiosError.js\";\n\nconst knownAdapters = {\n http: httpAdapter,\n xhr: xhrAdapter,\n fetch: fetchAdapter\n}\n\nutils.forEach(knownAdapters, (fn, value) => {\n if (fn) {\n try {\n Object.defineProperty(fn, 'name', {value});\n } catch (e) {\n // eslint-disable-next-line no-empty\n }\n Object.defineProperty(fn, 'adapterName', {value});\n }\n});\n\nconst renderReason = (reason) => `- ${reason}`;\n\nconst isResolvedHandle = (adapter) => utils.isFunction(adapter) || adapter === null || adapter === false;\n\nexport default {\n getAdapter: (adapters) => {\n adapters = utils.isArray(adapters) ? adapters : [adapters];\n\n const {length} = adapters;\n let nameOrAdapter;\n let adapter;\n\n const rejectedReasons = {};\n\n for (let i = 0; i < length; i++) {\n nameOrAdapter = adapters[i];\n let id;\n\n adapter = nameOrAdapter;\n\n if (!isResolvedHandle(nameOrAdapter)) {\n adapter = knownAdapters[(id = String(nameOrAdapter)).toLowerCase()];\n\n if (adapter === undefined) {\n throw new AxiosError(`Unknown adapter '${id}'`);\n }\n }\n\n if (adapter) {\n break;\n }\n\n rejectedReasons[id || '#' + i] = adapter;\n }\n\n if (!adapter) {\n\n const reasons = Object.entries(rejectedReasons)\n .map(([id, state]) => `adapter ${id} ` +\n (state === false ? 'is not supported by the environment' : 'is not available in the build')\n );\n\n let s = length ?\n (reasons.length > 1 ? 'since :\\n' + reasons.map(renderReason).join('\\n') : ' ' + renderReason(reasons[0])) :\n 'as no adapter specified';\n\n throw new AxiosError(\n `There is no suitable adapter to dispatch the request ` + s,\n 'ERR_NOT_SUPPORT'\n );\n }\n\n return adapter;\n },\n adapters: knownAdapters\n}\n","'use strict';\n\nimport transformData from './transformData.js';\nimport isCancel from '../cancel/isCancel.js';\nimport defaults from '../defaults/index.js';\nimport CanceledError from '../cancel/CanceledError.js';\nimport AxiosHeaders from '../core/AxiosHeaders.js';\nimport adapters from \"../adapters/adapters.js\";\n\n/**\n * Throws a `CanceledError` if cancellation has been requested.\n *\n * @param {Object} config The config that is to be used for the request\n *\n * @returns {void}\n */\nfunction throwIfCancellationRequested(config) {\n if (config.cancelToken) {\n config.cancelToken.throwIfRequested();\n }\n\n if (config.signal && config.signal.aborted) {\n throw new CanceledError(null, config);\n }\n}\n\n/**\n * Dispatch a request to the server using the configured adapter.\n *\n * @param {object} config The config that is to be used for the request\n *\n * @returns {Promise} The Promise to be fulfilled\n */\nexport default function dispatchRequest(config) {\n throwIfCancellationRequested(config);\n\n config.headers = AxiosHeaders.from(config.headers);\n\n // Transform request data\n config.data = transformData.call(\n config,\n config.transformRequest\n );\n\n if (['post', 'put', 'patch'].indexOf(config.method) !== -1) {\n config.headers.setContentType('application/x-www-form-urlencoded', false);\n }\n\n const adapter = adapters.getAdapter(config.adapter || defaults.adapter);\n\n return adapter(config).then(function onAdapterResolution(response) {\n throwIfCancellationRequested(config);\n\n // Transform response data\n response.data = transformData.call(\n config,\n config.transformResponse,\n response\n );\n\n response.headers = AxiosHeaders.from(response.headers);\n\n return response;\n }, function onAdapterRejection(reason) {\n if (!isCancel(reason)) {\n throwIfCancellationRequested(config);\n\n // Transform response data\n if (reason && reason.response) {\n reason.response.data = transformData.call(\n config,\n config.transformResponse,\n reason.response\n );\n reason.response.headers = AxiosHeaders.from(reason.response.headers);\n }\n }\n\n return Promise.reject(reason);\n });\n}\n","export const VERSION = \"1.10.0\";","'use strict';\n\nimport {VERSION} from '../env/data.js';\nimport AxiosError from '../core/AxiosError.js';\n\nconst validators = {};\n\n// eslint-disable-next-line func-names\n['object', 'boolean', 'number', 'function', 'string', 'symbol'].forEach((type, i) => {\n validators[type] = function validator(thing) {\n return typeof thing === type || 'a' + (i < 1 ? 'n ' : ' ') + type;\n };\n});\n\nconst deprecatedWarnings = {};\n\n/**\n * Transitional option validator\n *\n * @param {function|boolean?} validator - set to false if the transitional option has been removed\n * @param {string?} version - deprecated version / removed since version\n * @param {string?} message - some message with additional info\n *\n * @returns {function}\n */\nvalidators.transitional = function transitional(validator, version, message) {\n function formatMessage(opt, desc) {\n return '[Axios v' + VERSION + '] Transitional option \\'' + opt + '\\'' + desc + (message ? '. ' + message : '');\n }\n\n // eslint-disable-next-line func-names\n return (value, opt, opts) => {\n if (validator === false) {\n throw new AxiosError(\n formatMessage(opt, ' has been removed' + (version ? ' in ' + version : '')),\n AxiosError.ERR_DEPRECATED\n );\n }\n\n if (version && !deprecatedWarnings[opt]) {\n deprecatedWarnings[opt] = true;\n // eslint-disable-next-line no-console\n console.warn(\n formatMessage(\n opt,\n ' has been deprecated since v' + version + ' and will be removed in the near future'\n )\n );\n }\n\n return validator ? validator(value, opt, opts) : true;\n };\n};\n\nvalidators.spelling = function spelling(correctSpelling) {\n return (value, opt) => {\n // eslint-disable-next-line no-console\n console.warn(`${opt} is likely a misspelling of ${correctSpelling}`);\n return true;\n }\n};\n\n/**\n * Assert object's properties type\n *\n * @param {object} options\n * @param {object} schema\n * @param {boolean?} allowUnknown\n *\n * @returns {object}\n */\n\nfunction assertOptions(options, schema, allowUnknown) {\n if (typeof options !== 'object') {\n throw new AxiosError('options must be an object', AxiosError.ERR_BAD_OPTION_VALUE);\n }\n const keys = Object.keys(options);\n let i = keys.length;\n while (i-- > 0) {\n const opt = keys[i];\n const validator = schema[opt];\n if (validator) {\n const value = options[opt];\n const result = value === undefined || validator(value, opt, options);\n if (result !== true) {\n throw new AxiosError('option ' + opt + ' must be ' + result, AxiosError.ERR_BAD_OPTION_VALUE);\n }\n continue;\n }\n if (allowUnknown !== true) {\n throw new AxiosError('Unknown option ' + opt, AxiosError.ERR_BAD_OPTION);\n }\n }\n}\n\nexport default {\n assertOptions,\n validators\n};\n","'use strict';\n\nimport utils from './../utils.js';\nimport buildURL from '../helpers/buildURL.js';\nimport InterceptorManager from './InterceptorManager.js';\nimport dispatchRequest from './dispatchRequest.js';\nimport mergeConfig from './mergeConfig.js';\nimport buildFullPath from './buildFullPath.js';\nimport validator from '../helpers/validator.js';\nimport AxiosHeaders from './AxiosHeaders.js';\n\nconst validators = validator.validators;\n\n/**\n * Create a new instance of Axios\n *\n * @param {Object} instanceConfig The default config for the instance\n *\n * @return {Axios} A new instance of Axios\n */\nclass Axios {\n constructor(instanceConfig) {\n this.defaults = instanceConfig || {};\n this.interceptors = {\n request: new InterceptorManager(),\n response: new InterceptorManager()\n };\n }\n\n /**\n * Dispatch a request\n *\n * @param {String|Object} configOrUrl The config specific for this request (merged with this.defaults)\n * @param {?Object} config\n *\n * @returns {Promise} The Promise to be fulfilled\n */\n async request(configOrUrl, config) {\n try {\n return await this._request(configOrUrl, config);\n } catch (err) {\n if (err instanceof Error) {\n let dummy = {};\n\n Error.captureStackTrace ? Error.captureStackTrace(dummy) : (dummy = new Error());\n\n // slice off the Error: ... line\n const stack = dummy.stack ? dummy.stack.replace(/^.+\\n/, '') : '';\n try {\n if (!err.stack) {\n err.stack = stack;\n // match without the 2 top stack lines\n } else if (stack && !String(err.stack).endsWith(stack.replace(/^.+\\n.+\\n/, ''))) {\n err.stack += '\\n' + stack\n }\n } catch (e) {\n // ignore the case where \"stack\" is an un-writable property\n }\n }\n\n throw err;\n }\n }\n\n _request(configOrUrl, config) {\n /*eslint no-param-reassign:0*/\n // Allow for axios('example/url'[, config]) a la fetch API\n if (typeof configOrUrl === 'string') {\n config = config || {};\n config.url = configOrUrl;\n } else {\n config = configOrUrl || {};\n }\n\n config = mergeConfig(this.defaults, config);\n\n const {transitional, paramsSerializer, headers} = config;\n\n if (transitional !== undefined) {\n validator.assertOptions(transitional, {\n silentJSONParsing: validators.transitional(validators.boolean),\n forcedJSONParsing: validators.transitional(validators.boolean),\n clarifyTimeoutError: validators.transitional(validators.boolean)\n }, false);\n }\n\n if (paramsSerializer != null) {\n if (utils.isFunction(paramsSerializer)) {\n config.paramsSerializer = {\n serialize: paramsSerializer\n }\n } else {\n validator.assertOptions(paramsSerializer, {\n encode: validators.function,\n serialize: validators.function\n }, true);\n }\n }\n\n // Set config.allowAbsoluteUrls\n if (config.allowAbsoluteUrls !== undefined) {\n // do nothing\n } else if (this.defaults.allowAbsoluteUrls !== undefined) {\n config.allowAbsoluteUrls = this.defaults.allowAbsoluteUrls;\n } else {\n config.allowAbsoluteUrls = true;\n }\n\n validator.assertOptions(config, {\n baseUrl: validators.spelling('baseURL'),\n withXsrfToken: validators.spelling('withXSRFToken')\n }, true);\n\n // Set config.method\n config.method = (config.method || this.defaults.method || 'get').toLowerCase();\n\n // Flatten headers\n let contextHeaders = headers && utils.merge(\n headers.common,\n headers[config.method]\n );\n\n headers && utils.forEach(\n ['delete', 'get', 'head', 'post', 'put', 'patch', 'common'],\n (method) => {\n delete headers[method];\n }\n );\n\n config.headers = AxiosHeaders.concat(contextHeaders, headers);\n\n // filter out skipped interceptors\n const requestInterceptorChain = [];\n let synchronousRequestInterceptors = true;\n this.interceptors.request.forEach(function unshiftRequestInterceptors(interceptor) {\n if (typeof interceptor.runWhen === 'function' && interceptor.runWhen(config) === false) {\n return;\n }\n\n synchronousRequestInterceptors = synchronousRequestInterceptors && interceptor.synchronous;\n\n requestInterceptorChain.unshift(interceptor.fulfilled, interceptor.rejected);\n });\n\n const responseInterceptorChain = [];\n this.interceptors.response.forEach(function pushResponseInterceptors(interceptor) {\n responseInterceptorChain.push(interceptor.fulfilled, interceptor.rejected);\n });\n\n let promise;\n let i = 0;\n let len;\n\n if (!synchronousRequestInterceptors) {\n const chain = [dispatchRequest.bind(this), undefined];\n chain.unshift.apply(chain, requestInterceptorChain);\n chain.push.apply(chain, responseInterceptorChain);\n len = chain.length;\n\n promise = Promise.resolve(config);\n\n while (i < len) {\n promise = promise.then(chain[i++], chain[i++]);\n }\n\n return promise;\n }\n\n len = requestInterceptorChain.length;\n\n let newConfig = config;\n\n i = 0;\n\n while (i < len) {\n const onFulfilled = requestInterceptorChain[i++];\n const onRejected = requestInterceptorChain[i++];\n try {\n newConfig = onFulfilled(newConfig);\n } catch (error) {\n onRejected.call(this, error);\n break;\n }\n }\n\n try {\n promise = dispatchRequest.call(this, newConfig);\n } catch (error) {\n return Promise.reject(error);\n }\n\n i = 0;\n len = responseInterceptorChain.length;\n\n while (i < len) {\n promise = promise.then(responseInterceptorChain[i++], responseInterceptorChain[i++]);\n }\n\n return promise;\n }\n\n getUri(config) {\n config = mergeConfig(this.defaults, config);\n const fullPath = buildFullPath(config.baseURL, config.url, config.allowAbsoluteUrls);\n return buildURL(fullPath, config.params, config.paramsSerializer);\n }\n}\n\n// Provide aliases for supported request methods\nutils.forEach(['delete', 'get', 'head', 'options'], function forEachMethodNoData(method) {\n /*eslint func-names:0*/\n Axios.prototype[method] = function(url, config) {\n return this.request(mergeConfig(config || {}, {\n method,\n url,\n data: (config || {}).data\n }));\n };\n});\n\nutils.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) {\n /*eslint func-names:0*/\n\n function generateHTTPMethod(isForm) {\n return function httpMethod(url, data, config) {\n return this.request(mergeConfig(config || {}, {\n method,\n headers: isForm ? {\n 'Content-Type': 'multipart/form-data'\n } : {},\n url,\n data\n }));\n };\n }\n\n Axios.prototype[method] = generateHTTPMethod();\n\n Axios.prototype[method + 'Form'] = generateHTTPMethod(true);\n});\n\nexport default Axios;\n","'use strict';\n\nimport CanceledError from './CanceledError.js';\n\n/**\n * A `CancelToken` is an object that can be used to request cancellation of an operation.\n *\n * @param {Function} executor The executor function.\n *\n * @returns {CancelToken}\n */\nclass CancelToken {\n constructor(executor) {\n if (typeof executor !== 'function') {\n throw new TypeError('executor must be a function.');\n }\n\n let resolvePromise;\n\n this.promise = new Promise(function promiseExecutor(resolve) {\n resolvePromise = resolve;\n });\n\n const token = this;\n\n // eslint-disable-next-line func-names\n this.promise.then(cancel => {\n if (!token._listeners) return;\n\n let i = token._listeners.length;\n\n while (i-- > 0) {\n token._listeners[i](cancel);\n }\n token._listeners = null;\n });\n\n // eslint-disable-next-line func-names\n this.promise.then = onfulfilled => {\n let _resolve;\n // eslint-disable-next-line func-names\n const promise = new Promise(resolve => {\n token.subscribe(resolve);\n _resolve = resolve;\n }).then(onfulfilled);\n\n promise.cancel = function reject() {\n token.unsubscribe(_resolve);\n };\n\n return promise;\n };\n\n executor(function cancel(message, config, request) {\n if (token.reason) {\n // Cancellation has already been requested\n return;\n }\n\n token.reason = new CanceledError(message, config, request);\n resolvePromise(token.reason);\n });\n }\n\n /**\n * Throws a `CanceledError` if cancellation has been requested.\n */\n throwIfRequested() {\n if (this.reason) {\n throw this.reason;\n }\n }\n\n /**\n * Subscribe to the cancel signal\n */\n\n subscribe(listener) {\n if (this.reason) {\n listener(this.reason);\n return;\n }\n\n if (this._listeners) {\n this._listeners.push(listener);\n } else {\n this._listeners = [listener];\n }\n }\n\n /**\n * Unsubscribe from the cancel signal\n */\n\n unsubscribe(listener) {\n if (!this._listeners) {\n return;\n }\n const index = this._listeners.indexOf(listener);\n if (index !== -1) {\n this._listeners.splice(index, 1);\n }\n }\n\n toAbortSignal() {\n const controller = new AbortController();\n\n const abort = (err) => {\n controller.abort(err);\n };\n\n this.subscribe(abort);\n\n controller.signal.unsubscribe = () => this.unsubscribe(abort);\n\n return controller.signal;\n }\n\n /**\n * Returns an object that contains a new `CancelToken` and a function that, when called,\n * cancels the `CancelToken`.\n */\n static source() {\n let cancel;\n const token = new CancelToken(function executor(c) {\n cancel = c;\n });\n return {\n token,\n cancel\n };\n }\n}\n\nexport default CancelToken;\n","'use strict';\n\n/**\n * Syntactic sugar for invoking a function and expanding an array for arguments.\n *\n * Common use case would be to use `Function.prototype.apply`.\n *\n * ```js\n * function f(x, y, z) {}\n * var args = [1, 2, 3];\n * f.apply(null, args);\n * ```\n *\n * With `spread` this example can be re-written.\n *\n * ```js\n * spread(function(x, y, z) {})([1, 2, 3]);\n * ```\n *\n * @param {Function} callback\n *\n * @returns {Function}\n */\nexport default function spread(callback) {\n return function wrap(arr) {\n return callback.apply(null, arr);\n };\n}\n","'use strict';\n\nimport utils from './../utils.js';\n\n/**\n * Determines whether the payload is an error thrown by Axios\n *\n * @param {*} payload The value to test\n *\n * @returns {boolean} True if the payload is an error thrown by Axios, otherwise false\n */\nexport default function isAxiosError(payload) {\n return utils.isObject(payload) && (payload.isAxiosError === true);\n}\n","const HttpStatusCode = {\n Continue: 100,\n SwitchingProtocols: 101,\n Processing: 102,\n EarlyHints: 103,\n Ok: 200,\n Created: 201,\n Accepted: 202,\n NonAuthoritativeInformation: 203,\n NoContent: 204,\n ResetContent: 205,\n PartialContent: 206,\n MultiStatus: 207,\n AlreadyReported: 208,\n ImUsed: 226,\n MultipleChoices: 300,\n MovedPermanently: 301,\n Found: 302,\n SeeOther: 303,\n NotModified: 304,\n UseProxy: 305,\n Unused: 306,\n TemporaryRedirect: 307,\n PermanentRedirect: 308,\n BadRequest: 400,\n Unauthorized: 401,\n PaymentRequired: 402,\n Forbidden: 403,\n NotFound: 404,\n MethodNotAllowed: 405,\n NotAcceptable: 406,\n ProxyAuthenticationRequired: 407,\n RequestTimeout: 408,\n Conflict: 409,\n Gone: 410,\n LengthRequired: 411,\n PreconditionFailed: 412,\n PayloadTooLarge: 413,\n UriTooLong: 414,\n UnsupportedMediaType: 415,\n RangeNotSatisfiable: 416,\n ExpectationFailed: 417,\n ImATeapot: 418,\n MisdirectedRequest: 421,\n UnprocessableEntity: 422,\n Locked: 423,\n FailedDependency: 424,\n TooEarly: 425,\n UpgradeRequired: 426,\n PreconditionRequired: 428,\n TooManyRequests: 429,\n RequestHeaderFieldsTooLarge: 431,\n UnavailableForLegalReasons: 451,\n InternalServerError: 500,\n NotImplemented: 501,\n BadGateway: 502,\n ServiceUnavailable: 503,\n GatewayTimeout: 504,\n HttpVersionNotSupported: 505,\n VariantAlsoNegotiates: 506,\n InsufficientStorage: 507,\n LoopDetected: 508,\n NotExtended: 510,\n NetworkAuthenticationRequired: 511,\n};\n\nObject.entries(HttpStatusCode).forEach(([key, value]) => {\n HttpStatusCode[value] = key;\n});\n\nexport default HttpStatusCode;\n","'use strict';\n\nimport utils from './utils.js';\nimport bind from './helpers/bind.js';\nimport Axios from './core/Axios.js';\nimport mergeConfig from './core/mergeConfig.js';\nimport defaults from './defaults/index.js';\nimport formDataToJSON from './helpers/formDataToJSON.js';\nimport CanceledError from './cancel/CanceledError.js';\nimport CancelToken from './cancel/CancelToken.js';\nimport isCancel from './cancel/isCancel.js';\nimport {VERSION} from './env/data.js';\nimport toFormData from './helpers/toFormData.js';\nimport AxiosError from './core/AxiosError.js';\nimport spread from './helpers/spread.js';\nimport isAxiosError from './helpers/isAxiosError.js';\nimport AxiosHeaders from \"./core/AxiosHeaders.js\";\nimport adapters from './adapters/adapters.js';\nimport HttpStatusCode from './helpers/HttpStatusCode.js';\n\n/**\n * Create an instance of Axios\n *\n * @param {Object} defaultConfig The default config for the instance\n *\n * @returns {Axios} A new instance of Axios\n */\nfunction createInstance(defaultConfig) {\n const context = new Axios(defaultConfig);\n const instance = bind(Axios.prototype.request, context);\n\n // Copy axios.prototype to instance\n utils.extend(instance, Axios.prototype, context, {allOwnKeys: true});\n\n // Copy context to instance\n utils.extend(instance, context, null, {allOwnKeys: true});\n\n // Factory for creating new instances\n instance.create = function create(instanceConfig) {\n return createInstance(mergeConfig(defaultConfig, instanceConfig));\n };\n\n return instance;\n}\n\n// Create the default instance to be exported\nconst axios = createInstance(defaults);\n\n// Expose Axios class to allow class inheritance\naxios.Axios = Axios;\n\n// Expose Cancel & CancelToken\naxios.CanceledError = CanceledError;\naxios.CancelToken = CancelToken;\naxios.isCancel = isCancel;\naxios.VERSION = VERSION;\naxios.toFormData = toFormData;\n\n// Expose AxiosError class\naxios.AxiosError = AxiosError;\n\n// alias for CanceledError for backward compatibility\naxios.Cancel = axios.CanceledError;\n\n// Expose all/spread\naxios.all = function all(promises) {\n return Promise.all(promises);\n};\n\naxios.spread = spread;\n\n// Expose isAxiosError\naxios.isAxiosError = isAxiosError;\n\n// Expose mergeConfig\naxios.mergeConfig = mergeConfig;\n\naxios.AxiosHeaders = AxiosHeaders;\n\naxios.formToJSON = thing => formDataToJSON(utils.isHTMLForm(thing) ? new FormData(thing) : thing);\n\naxios.getAdapter = adapters.getAdapter;\n\naxios.HttpStatusCode = HttpStatusCode;\n\naxios.default = axios;\n\n// this module should only have a default export\nexport default axios\n"],"names":["bind","fn","thisArg","wrap","apply","arguments","toString","Object","prototype","getPrototypeOf","iterator","Symbol","toStringTag","kindOf","cache","thing","str","call","slice","toLowerCase","create","kindOfTest","type","typeOfTest","_typeof","isArray","Array","isUndefined","isBuffer","val","constructor","isFunction","isArrayBuffer","isArrayBufferView","result","ArrayBuffer","isView","buffer","isString","isNumber","isObject","isBoolean","isPlainObject","isDate","isFile","isBlob","isFileList","isStream","pipe","isFormData","kind","FormData","append","isURLSearchParams","_map","map","_map2","_slicedToArray","isReadableStream","isRequest","isResponse","isHeaders","trim","replace","forEach","obj","_ref","length","undefined","_ref$allOwnKeys","allOwnKeys","i","l","keys","getOwnPropertyNames","len","key","findKey","_key","_global","globalThis","self","window","global","isContextDefined","context","merge","_ref2","caseless","assignValue","targetKey","extend","a","b","_ref3","stripBOM","content","charCodeAt","inherits","superConstructor","props","descriptors","defineProperty","value","assign","toFlatObject","sourceObj","destObj","filter","propFilter","prop","merged","endsWith","searchString","position","String","lastIndex","indexOf","toArray","arr","isTypedArray","TypedArray","Uint8Array","forEachEntry","generator","_iterator","next","done","pair","matchAll","regExp","matches","exec","push","isHTMLForm","toCamelCase","replacer","m","p1","p2","toUpperCase","hasOwnProperty","_ref4","isRegExp","reduceDescriptors","reducer","getOwnPropertyDescriptors","reducedDescriptors","descriptor","name","ret","defineProperties","freezeMethods","enumerable","writable","set","Error","toObjectSet","arrayOrString","delimiter","define","split","noop","toFiniteNumber","defaultValue","Number","isFinite","isSpecCompliantForm","toJSONObject","stack","visit","source","target","reducedValue","isAsyncFn","isThenable","then","_setImmediate","setImmediateSupported","postMessageSupported","setImmediate","token","callbacks","addEventListener","_ref5","data","shift","cb","postMessage","concat","Math","random","setTimeout","asap","queueMicrotask","process","nextTick","isIterable","hasOwnProp","AxiosError","message","code","config","request","response","captureStackTrace","status","utils","toJSON","description","number","fileName","lineNumber","columnNumber","from","error","customProps","axiosError","cause","isVisitable","removeBrackets","renderKey","path","dots","each","join","isFlatArray","some","predicates","test","toFormData","formData","options","TypeError","metaTokens","indexes","defined","option","visitor","defaultVisitor","_Blob","Blob","useBlob","convertValue","toISOString","Buffer","JSON","stringify","el","index","exposedHelpers","build","pop","encode","charMap","encodeURIComponent","match","AxiosURLSearchParams","params","_pairs","encoder","_encode","buildURL","url","serialize","serializeFn","serializedParams","hashmarkIndex","InterceptorManager","_classCallCheck","handlers","_createClass","use","fulfilled","rejected","synchronous","runWhen","eject","id","clear","forEachHandler","h","silentJSONParsing","forcedJSONParsing","clarifyTimeoutError","URLSearchParams","isBrowser","classes","protocols","hasBrowserEnv","document","_navigator","navigator","hasStandardBrowserEnv","product","hasStandardBrowserWebWorkerEnv","WorkerGlobalScope","importScripts","origin","location","href","_objectSpread","platform","toURLEncodedForm","helpers","isNode","parsePropPath","arrayToObject","formDataToJSON","buildPath","isNumericKey","isLast","entries","stringifySafely","rawValue","parser","parse","e","defaults","transitional","transitionalDefaults","adapter","transformRequest","headers","contentType","getContentType","hasJSONContentType","isObjectPayload","setContentType","formSerializer","_FormData","env","transformResponse","JSONRequested","responseType","strictJSONParsing","ERR_BAD_RESPONSE","timeout","xsrfCookieName","xsrfHeaderName","maxContentLength","maxBodyLength","validateStatus","common","method","ignoreDuplicateOf","rawHeaders","parsed","line","substring","$internals","normalizeHeader","header","normalizeValue","parseTokens","tokens","tokensRE","isValidHeaderName","matchHeaderValue","isHeaderNameFilter","formatHeader","w","char","buildAccessors","accessorName","methodName","arg1","arg2","arg3","configurable","AxiosHeaders","_Symbol$iterator","_Symbol$toStringTag","valueOrRewrite","rewrite","setHeader","_value","_header","_rewrite","lHeader","setHeaders","parseHeaders","dest","_createForOfIteratorHelper","_step","s","n","entry","_toConsumableArray","err","f","get","has","matcher","_delete","deleted","deleteHeader","normalize","format","normalized","_this$constructor","_len","targets","asStrings","getSetCookie","first","computed","_len2","_key2","accessor","internals","accessors","defineAccessor","mapped","headerValue","transformData","fns","transform","isCancel","__CANCEL__","CanceledError","ERR_CANCELED","settle","resolve","reject","ERR_BAD_REQUEST","floor","parseProtocol","speedometer","samplesCount","min","bytes","timestamps","head","tail","firstSampleTS","chunkLength","now","Date","startedAt","bytesCount","passed","round","throttle","freq","timestamp","threshold","lastArgs","timer","invoke","args","clearTimeout","throttled","flush","progressEventReducer","listener","isDownloadStream","bytesNotified","_speedometer","loaded","total","lengthComputable","progressBytes","rate","inRange","_defineProperty","progress","estimated","event","progressEventDecorator","asyncDecorator","isMSIE","URL","protocol","host","port","userAgent","write","expires","domain","secure","cookie","toGMTString","read","RegExp","decodeURIComponent","remove","isAbsoluteURL","combineURLs","baseURL","relativeURL","buildFullPath","requestedURL","allowAbsoluteUrls","isRelativeUrl","headersToObject","mergeConfig","config1","config2","getMergedValue","mergeDeepProperties","valueFromConfig2","defaultToConfig2","mergeDirectKeys","mergeMap","paramsSerializer","timeoutMessage","withCredentials","withXSRFToken","onUploadProgress","onDownloadProgress","decompress","beforeRedirect","transport","httpAgent","httpsAgent","cancelToken","socketPath","responseEncoding","computeConfigValue","configValue","newConfig","auth","btoa","username","password","unescape","Boolean","_toArray","isURLSameOrigin","xsrfValue","cookies","isXHRAdapterSupported","XMLHttpRequest","Promise","dispatchXhrRequest","_config","resolveConfig","requestData","requestHeaders","onCanceled","uploadThrottled","downloadThrottled","flushUpload","flushDownload","unsubscribe","signal","removeEventListener","open","onloadend","responseHeaders","getAllResponseHeaders","responseData","responseText","statusText","_resolve","_reject","onreadystatechange","handleLoad","readyState","responseURL","onabort","handleAbort","ECONNABORTED","onerror","handleError","ERR_NETWORK","ontimeout","handleTimeout","timeoutErrorMessage","ETIMEDOUT","setRequestHeader","_progressEventReducer","_progressEventReducer2","upload","_progressEventReducer3","_progressEventReducer4","cancel","abort","subscribe","aborted","send","composeSignals","signals","_signals","controller","AbortController","reason","streamChunk","_regeneratorRuntime","mark","chunk","chunkSize","pos","end","streamChunk$","_context","prev","byteLength","abrupt","stop","readBytes","_wrapAsyncGenerator","_callee","iterable","_iteratorAbruptCompletion","_didIteratorError","_iteratorError","_callee$","_context2","_asyncIterator","readStream","_awaitAsyncGenerator","sent","delegateYield","_asyncGeneratorDelegate","t1","finish","_x","_x2","_callee2","stream","reader","_yield$_awaitAsyncGen","_callee2$","_context3","asyncIterator","getReader","_x3","trackStream","onProgress","onFinish","_onFinish","ReadableStream","pull","_asyncToGenerator","_callee3","_yield$iterator$next","_done","loadedBytes","_callee3$","_context4","close","enqueue","t0","highWaterMark","isFetchSupported","fetch","Request","Response","isReadableStreamSupported","encodeText","TextEncoder","arrayBuffer","supportsRequestStream","duplexAccessed","hasContentType","body","duplex","DEFAULT_CHUNK_SIZE","supportsResponseStream","resolvers","res","_","ERR_NOT_SUPPORT","getBodyLength","_request","size","resolveBodyLength","getContentLength","_x4","_callee4","_resolveConfig","_resolveConfig$withCr","fetchOptions","composedSignal","requestContentLength","contentTypeHeader","_progressEventDecorat","_progressEventDecorat2","isCredentialsSupported","isStreamResponse","responseContentLength","_ref6","_onProgress","_flush","_callee4$","toAbortSignal","credentials","t2","_x5","knownAdapters","http","httpAdapter","xhr","xhrAdapter","fetchAdapter","renderReason","isResolvedHandle","getAdapter","adapters","_adapters","nameOrAdapter","rejectedReasons","reasons","state","throwIfCancellationRequested","throwIfRequested","dispatchRequest","onAdapterResolution","onAdapterRejection","VERSION","validators","validator","deprecatedWarnings","version","formatMessage","opt","desc","opts","ERR_DEPRECATED","console","warn","spelling","correctSpelling","assertOptions","schema","allowUnknown","ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","Axios","instanceConfig","interceptors","_request2","configOrUrl","dummy","baseUrl","withXsrfToken","contextHeaders","requestInterceptorChain","synchronousRequestInterceptors","unshiftRequestInterceptors","interceptor","unshift","responseInterceptorChain","pushResponseInterceptors","promise","chain","onFulfilled","onRejected","getUri","fullPath","forEachMethodNoData","forEachMethodWithData","generateHTTPMethod","isForm","httpMethod","CancelToken","executor","resolvePromise","promiseExecutor","_listeners","onfulfilled","splice","_this","c","spread","callback","isAxiosError","payload","HttpStatusCode","Continue","SwitchingProtocols","Processing","EarlyHints","Ok","Created","Accepted","NonAuthoritativeInformation","NoContent","ResetContent","PartialContent","MultiStatus","AlreadyReported","ImUsed","MultipleChoices","MovedPermanently","Found","SeeOther","NotModified","UseProxy","Unused","TemporaryRedirect","PermanentRedirect","BadRequest","Unauthorized","PaymentRequired","Forbidden","NotFound","MethodNotAllowed","NotAcceptable","ProxyAuthenticationRequired","RequestTimeout","Conflict","Gone","LengthRequired","PreconditionFailed","PayloadTooLarge","UriTooLong","UnsupportedMediaType","RangeNotSatisfiable","ExpectationFailed","ImATeapot","MisdirectedRequest","UnprocessableEntity","Locked","FailedDependency","TooEarly","UpgradeRequired","PreconditionRequired","TooManyRequests","RequestHeaderFieldsTooLarge","UnavailableForLegalReasons","InternalServerError","NotImplemented","BadGateway","ServiceUnavailable","GatewayTimeout","HttpVersionNotSupported","VariantAlsoNegotiates","InsufficientStorage","LoopDetected","NotExtended","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OAAO,GAAGA,OAAO,CAAA;EACvB8H,KAAK,CAAC/lB,UAAU,GAAGA,UAAU,CAAA;;EAE7B;EACA+lB,KAAK,CAAC9nB,UAAU,GAAGA,UAAU,CAAA;;EAE7B;EACA8nB,KAAK,CAACC,MAAM,GAAGD,KAAK,CAACja,aAAa,CAAA;;EAElC;EACAia,KAAK,CAACE,GAAG,GAAG,SAASA,GAAGA,CAACC,QAAQ,EAAE;EACjC,EAAA,OAAOlT,OAAO,CAACiT,GAAG,CAACC,QAAQ,CAAC,CAAA;EAC9B,CAAC,CAAA;EAEDH,KAAK,CAACvE,MAAM,GAAGA,MAAM,CAAA;;EAErB;EACAuE,KAAK,CAACrE,YAAY,GAAGA,YAAY,CAAA;;EAEjC;EACAqE,KAAK,CAACrV,WAAW,GAAGA,WAAW,CAAA;EAE/BqV,KAAK,CAACnd,YAAY,GAAGA,cAAY,CAAA;EAEjCmd,KAAK,CAACI,UAAU,GAAG,UAAA1zB,KAAK,EAAA;EAAA,EAAA,OAAIqS,cAAc,CAACrG,OAAK,CAACzE,UAAU,CAACvH,KAAK,CAAC,GAAG,IAAIoC,QAAQ,CAACpC,KAAK,CAAC,GAAGA,KAAK,CAAC,CAAA;EAAA,CAAA,CAAA;EAEjGszB,KAAK,CAAC1I,UAAU,GAAGC,QAAQ,CAACD,UAAU,CAAA;EAEtC0I,KAAK,CAACnE,cAAc,GAAGA,gBAAc,CAAA;EAErCmE,KAAK,CAAA,SAAA,CAAQ,GAAGA,KAAK;;;;;;;;"} node_modules/axios/dist/node/axios.cjs.map 0000664 00001027073 15114741631 0014653 0 ustar 00 {"version":3,"file":"axios.cjs","sources":["../../lib/helpers/bind.js","../../lib/utils.js","../../lib/core/AxiosError.js","../../lib/helpers/toFormData.js","../../lib/helpers/AxiosURLSearchParams.js","../../lib/helpers/buildURL.js","../../lib/core/InterceptorManager.js","../../lib/defaults/transitional.js","../../lib/platform/node/classes/URLSearchParams.js","../../lib/platform/node/index.js","../../lib/platform/common/utils.js","../../lib/platform/index.js","../../lib/helpers/toURLEncodedForm.js","../../lib/helpers/formDataToJSON.js","../../lib/defaults/index.js","../../lib/helpers/parseHeaders.js","../../lib/core/AxiosHeaders.js","../../lib/core/transformData.js","../../lib/cancel/isCancel.js","../../lib/cancel/CanceledError.js","../../lib/core/settle.js","../../lib/helpers/isAbsoluteURL.js","../../lib/helpers/combineURLs.js","../../lib/core/buildFullPath.js","../../lib/env/data.js","../../lib/helpers/parseProtocol.js","../../lib/helpers/fromDataURI.js","../../lib/helpers/AxiosTransformStream.js","../../lib/helpers/readBlob.js","../../lib/helpers/formDataToStream.js","../../lib/helpers/ZlibHeaderTransformStream.js","../../lib/helpers/callbackify.js","../../lib/helpers/speedometer.js","../../lib/helpers/throttle.js","../../lib/helpers/progressEventReducer.js","../../lib/adapters/http.js","../../lib/helpers/isURLSameOrigin.js","../../lib/helpers/cookies.js","../../lib/core/mergeConfig.js","../../lib/helpers/resolveConfig.js","../../lib/adapters/xhr.js","../../lib/helpers/composeSignals.js","../../lib/helpers/trackStream.js","../../lib/adapters/fetch.js","../../lib/adapters/adapters.js","../../lib/core/dispatchRequest.js","../../lib/helpers/validator.js","../../lib/core/Axios.js","../../lib/cancel/CancelToken.js","../../lib/helpers/spread.js","../../lib/helpers/isAxiosError.js","../../lib/helpers/HttpStatusCode.js","../../lib/axios.js"],"sourcesContent":["'use strict';\n\nexport default function bind(fn, thisArg) {\n return function wrap() {\n return fn.apply(thisArg, arguments);\n };\n}\n","'use strict';\n\nimport bind from './helpers/bind.js';\n\n// utils is a library of generic helper functions non-specific to axios\n\nconst {toString} = Object.prototype;\nconst {getPrototypeOf} = Object;\nconst {iterator, toStringTag} = Symbol;\n\nconst kindOf = (cache => thing => {\n const str = toString.call(thing);\n return cache[str] || (cache[str] = str.slice(8, -1).toLowerCase());\n})(Object.create(null));\n\nconst kindOfTest = (type) => {\n type = type.toLowerCase();\n return (thing) => kindOf(thing) === type\n}\n\nconst typeOfTest = type => thing => typeof thing === type;\n\n/**\n * Determine if a value is an Array\n *\n * @param {Object} val The value to test\n *\n * @returns {boolean} True if value is an Array, otherwise false\n */\nconst {isArray} = Array;\n\n/**\n * Determine if a value is undefined\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if the value is undefined, otherwise false\n */\nconst isUndefined = typeOfTest('undefined');\n\n/**\n * Determine if a value is a Buffer\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a Buffer, otherwise false\n */\nfunction isBuffer(val) {\n return val !== null && !isUndefined(val) && val.constructor !== null && !isUndefined(val.constructor)\n && isFunction(val.constructor.isBuffer) && val.constructor.isBuffer(val);\n}\n\n/**\n * Determine if a value is an ArrayBuffer\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is an ArrayBuffer, otherwise false\n */\nconst isArrayBuffer = kindOfTest('ArrayBuffer');\n\n\n/**\n * Determine if a value is a view on an ArrayBuffer\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a view on an ArrayBuffer, otherwise false\n */\nfunction isArrayBufferView(val) {\n let result;\n if ((typeof ArrayBuffer !== 'undefined') && (ArrayBuffer.isView)) {\n result = ArrayBuffer.isView(val);\n } else {\n result = (val) && (val.buffer) && (isArrayBuffer(val.buffer));\n }\n return result;\n}\n\n/**\n * Determine if a value is a String\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a String, otherwise false\n */\nconst isString = typeOfTest('string');\n\n/**\n * Determine if a value is a Function\n *\n * @param {*} val The value to test\n * @returns {boolean} True if value is a Function, otherwise false\n */\nconst isFunction = typeOfTest('function');\n\n/**\n * Determine if a value is a Number\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a Number, otherwise false\n */\nconst isNumber = typeOfTest('number');\n\n/**\n * Determine if a value is an Object\n *\n * @param {*} thing The value to test\n *\n * @returns {boolean} True if value is an Object, otherwise false\n */\nconst isObject = (thing) => thing !== null && typeof thing === 'object';\n\n/**\n * Determine if a value is a Boolean\n *\n * @param {*} thing The value to test\n * @returns {boolean} True if value is a Boolean, otherwise false\n */\nconst isBoolean = thing => thing === true || thing === false;\n\n/**\n * Determine if a value is a plain Object\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a plain Object, otherwise false\n */\nconst isPlainObject = (val) => {\n if (kindOf(val) !== 'object') {\n return false;\n }\n\n const prototype = getPrototypeOf(val);\n return (prototype === null || prototype === Object.prototype || Object.getPrototypeOf(prototype) === null) && !(toStringTag in val) && !(iterator in val);\n}\n\n/**\n * Determine if a value is a Date\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a Date, otherwise false\n */\nconst isDate = kindOfTest('Date');\n\n/**\n * Determine if a value is a File\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a File, otherwise false\n */\nconst isFile = kindOfTest('File');\n\n/**\n * Determine if a value is a Blob\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a Blob, otherwise false\n */\nconst isBlob = kindOfTest('Blob');\n\n/**\n * Determine if a value is a FileList\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a File, otherwise false\n */\nconst isFileList = kindOfTest('FileList');\n\n/**\n * Determine if a value is a Stream\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a Stream, otherwise false\n */\nconst isStream = (val) => isObject(val) && isFunction(val.pipe);\n\n/**\n * Determine if a value is a FormData\n *\n * @param {*} thing The value to test\n *\n * @returns {boolean} True if value is an FormData, otherwise false\n */\nconst isFormData = (thing) => {\n let kind;\n return thing && (\n (typeof FormData === 'function' && thing instanceof FormData) || (\n isFunction(thing.append) && (\n (kind = kindOf(thing)) === 'formdata' ||\n // detect form-data instance\n (kind === 'object' && isFunction(thing.toString) && thing.toString() === '[object FormData]')\n )\n )\n )\n}\n\n/**\n * Determine if a value is a URLSearchParams object\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a URLSearchParams object, otherwise false\n */\nconst isURLSearchParams = kindOfTest('URLSearchParams');\n\nconst [isReadableStream, isRequest, isResponse, isHeaders] = ['ReadableStream', 'Request', 'Response', 'Headers'].map(kindOfTest);\n\n/**\n * Trim excess whitespace off the beginning and end of a string\n *\n * @param {String} str The String to trim\n *\n * @returns {String} The String freed of excess whitespace\n */\nconst trim = (str) => str.trim ?\n str.trim() : str.replace(/^[\\s\\uFEFF\\xA0]+|[\\s\\uFEFF\\xA0]+$/g, '');\n\n/**\n * Iterate over an Array or an Object invoking a function for each item.\n *\n * If `obj` is an Array callback will be called passing\n * the value, index, and complete array for each item.\n *\n * If 'obj' is an Object callback will be called passing\n * the value, key, and complete object for each property.\n *\n * @param {Object|Array} obj The object to iterate\n * @param {Function} fn The callback to invoke for each item\n *\n * @param {Boolean} [allOwnKeys = false]\n * @returns {any}\n */\nfunction forEach(obj, fn, {allOwnKeys = false} = {}) {\n // Don't bother if no value provided\n if (obj === null || typeof obj === 'undefined') {\n return;\n }\n\n let i;\n let l;\n\n // Force an array if not already something iterable\n if (typeof obj !== 'object') {\n /*eslint no-param-reassign:0*/\n obj = [obj];\n }\n\n if (isArray(obj)) {\n // Iterate over array values\n for (i = 0, l = obj.length; i < l; i++) {\n fn.call(null, obj[i], i, obj);\n }\n } else {\n // Iterate over object keys\n const keys = allOwnKeys ? Object.getOwnPropertyNames(obj) : Object.keys(obj);\n const len = keys.length;\n let key;\n\n for (i = 0; i < len; i++) {\n key = keys[i];\n fn.call(null, obj[key], key, obj);\n }\n }\n}\n\nfunction findKey(obj, key) {\n key = key.toLowerCase();\n const keys = Object.keys(obj);\n let i = keys.length;\n let _key;\n while (i-- > 0) {\n _key = keys[i];\n if (key === _key.toLowerCase()) {\n return _key;\n }\n }\n return null;\n}\n\nconst _global = (() => {\n /*eslint no-undef:0*/\n if (typeof globalThis !== \"undefined\") return globalThis;\n return typeof self !== \"undefined\" ? self : (typeof window !== 'undefined' ? window : global)\n})();\n\nconst isContextDefined = (context) => !isUndefined(context) && context !== _global;\n\n/**\n * Accepts varargs expecting each argument to be an object, then\n * immutably merges the properties of each object and returns result.\n *\n * When multiple objects contain the same key the later object in\n * the arguments list will take precedence.\n *\n * Example:\n *\n * ```js\n * var result = merge({foo: 123}, {foo: 456});\n * console.log(result.foo); // outputs 456\n * ```\n *\n * @param {Object} obj1 Object to merge\n *\n * @returns {Object} Result of all merge properties\n */\nfunction merge(/* obj1, obj2, obj3, ... */) {\n const {caseless} = isContextDefined(this) && this || {};\n const result = {};\n const assignValue = (val, key) => {\n const targetKey = caseless && findKey(result, key) || key;\n if (isPlainObject(result[targetKey]) && isPlainObject(val)) {\n result[targetKey] = merge(result[targetKey], val);\n } else if (isPlainObject(val)) {\n result[targetKey] = merge({}, val);\n } else if (isArray(val)) {\n result[targetKey] = val.slice();\n } else {\n result[targetKey] = val;\n }\n }\n\n for (let i = 0, l = arguments.length; i < l; i++) {\n arguments[i] && forEach(arguments[i], assignValue);\n }\n return result;\n}\n\n/**\n * Extends object a by mutably adding to it the properties of object b.\n *\n * @param {Object} a The object to be extended\n * @param {Object} b The object to copy properties from\n * @param {Object} thisArg The object to bind function to\n *\n * @param {Boolean} [allOwnKeys]\n * @returns {Object} The resulting value of object a\n */\nconst extend = (a, b, thisArg, {allOwnKeys}= {}) => {\n forEach(b, (val, key) => {\n if (thisArg && isFunction(val)) {\n a[key] = bind(val, thisArg);\n } else {\n a[key] = val;\n }\n }, {allOwnKeys});\n return a;\n}\n\n/**\n * Remove byte order marker. This catches EF BB BF (the UTF-8 BOM)\n *\n * @param {string} content with BOM\n *\n * @returns {string} content value without BOM\n */\nconst stripBOM = (content) => {\n if (content.charCodeAt(0) === 0xFEFF) {\n content = content.slice(1);\n }\n return content;\n}\n\n/**\n * Inherit the prototype methods from one constructor into another\n * @param {function} constructor\n * @param {function} superConstructor\n * @param {object} [props]\n * @param {object} [descriptors]\n *\n * @returns {void}\n */\nconst inherits = (constructor, superConstructor, props, descriptors) => {\n constructor.prototype = Object.create(superConstructor.prototype, descriptors);\n constructor.prototype.constructor = constructor;\n Object.defineProperty(constructor, 'super', {\n value: superConstructor.prototype\n });\n props && Object.assign(constructor.prototype, props);\n}\n\n/**\n * Resolve object with deep prototype chain to a flat object\n * @param {Object} sourceObj source object\n * @param {Object} [destObj]\n * @param {Function|Boolean} [filter]\n * @param {Function} [propFilter]\n *\n * @returns {Object}\n */\nconst toFlatObject = (sourceObj, destObj, filter, propFilter) => {\n let props;\n let i;\n let prop;\n const merged = {};\n\n destObj = destObj || {};\n // eslint-disable-next-line no-eq-null,eqeqeq\n if (sourceObj == null) return destObj;\n\n do {\n props = Object.getOwnPropertyNames(sourceObj);\n i = props.length;\n while (i-- > 0) {\n prop = props[i];\n if ((!propFilter || propFilter(prop, sourceObj, destObj)) && !merged[prop]) {\n destObj[prop] = sourceObj[prop];\n merged[prop] = true;\n }\n }\n sourceObj = filter !== false && getPrototypeOf(sourceObj);\n } while (sourceObj && (!filter || filter(sourceObj, destObj)) && sourceObj !== Object.prototype);\n\n return destObj;\n}\n\n/**\n * Determines whether a string ends with the characters of a specified string\n *\n * @param {String} str\n * @param {String} searchString\n * @param {Number} [position= 0]\n *\n * @returns {boolean}\n */\nconst endsWith = (str, searchString, position) => {\n str = String(str);\n if (position === undefined || position > str.length) {\n position = str.length;\n }\n position -= searchString.length;\n const lastIndex = str.indexOf(searchString, position);\n return lastIndex !== -1 && lastIndex === position;\n}\n\n\n/**\n * Returns new array from array like object or null if failed\n *\n * @param {*} [thing]\n *\n * @returns {?Array}\n */\nconst toArray = (thing) => {\n if (!thing) return null;\n if (isArray(thing)) return thing;\n let i = thing.length;\n if (!isNumber(i)) return null;\n const arr = new Array(i);\n while (i-- > 0) {\n arr[i] = thing[i];\n }\n return arr;\n}\n\n/**\n * Checking if the Uint8Array exists and if it does, it returns a function that checks if the\n * thing passed in is an instance of Uint8Array\n *\n * @param {TypedArray}\n *\n * @returns {Array}\n */\n// eslint-disable-next-line func-names\nconst isTypedArray = (TypedArray => {\n // eslint-disable-next-line func-names\n return thing => {\n return TypedArray && thing instanceof TypedArray;\n };\n})(typeof Uint8Array !== 'undefined' && getPrototypeOf(Uint8Array));\n\n/**\n * For each entry in the object, call the function with the key and value.\n *\n * @param {Object<any, any>} obj - The object to iterate over.\n * @param {Function} fn - The function to call for each entry.\n *\n * @returns {void}\n */\nconst forEachEntry = (obj, fn) => {\n const generator = obj && obj[iterator];\n\n const _iterator = generator.call(obj);\n\n let result;\n\n while ((result = _iterator.next()) && !result.done) {\n const pair = result.value;\n fn.call(obj, pair[0], pair[1]);\n }\n}\n\n/**\n * It takes a regular expression and a string, and returns an array of all the matches\n *\n * @param {string} regExp - The regular expression to match against.\n * @param {string} str - The string to search.\n *\n * @returns {Array<boolean>}\n */\nconst matchAll = (regExp, str) => {\n let matches;\n const arr = [];\n\n while ((matches = regExp.exec(str)) !== null) {\n arr.push(matches);\n }\n\n return arr;\n}\n\n/* Checking if the kindOfTest function returns true when passed an HTMLFormElement. */\nconst isHTMLForm = kindOfTest('HTMLFormElement');\n\nconst toCamelCase = str => {\n return str.toLowerCase().replace(/[-_\\s]([a-z\\d])(\\w*)/g,\n function replacer(m, p1, p2) {\n return p1.toUpperCase() + p2;\n }\n );\n};\n\n/* Creating a function that will check if an object has a property. */\nconst hasOwnProperty = (({hasOwnProperty}) => (obj, prop) => hasOwnProperty.call(obj, prop))(Object.prototype);\n\n/**\n * Determine if a value is a RegExp object\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a RegExp object, otherwise false\n */\nconst isRegExp = kindOfTest('RegExp');\n\nconst reduceDescriptors = (obj, reducer) => {\n const descriptors = Object.getOwnPropertyDescriptors(obj);\n const reducedDescriptors = {};\n\n forEach(descriptors, (descriptor, name) => {\n let ret;\n if ((ret = reducer(descriptor, name, obj)) !== false) {\n reducedDescriptors[name] = ret || descriptor;\n }\n });\n\n Object.defineProperties(obj, reducedDescriptors);\n}\n\n/**\n * Makes all methods read-only\n * @param {Object} obj\n */\n\nconst freezeMethods = (obj) => {\n reduceDescriptors(obj, (descriptor, name) => {\n // skip restricted props in strict mode\n if (isFunction(obj) && ['arguments', 'caller', 'callee'].indexOf(name) !== -1) {\n return false;\n }\n\n const value = obj[name];\n\n if (!isFunction(value)) return;\n\n descriptor.enumerable = false;\n\n if ('writable' in descriptor) {\n descriptor.writable = false;\n return;\n }\n\n if (!descriptor.set) {\n descriptor.set = () => {\n throw Error('Can not rewrite read-only method \\'' + name + '\\'');\n };\n }\n });\n}\n\nconst toObjectSet = (arrayOrString, delimiter) => {\n const obj = {};\n\n const define = (arr) => {\n arr.forEach(value => {\n obj[value] = true;\n });\n }\n\n isArray(arrayOrString) ? define(arrayOrString) : define(String(arrayOrString).split(delimiter));\n\n return obj;\n}\n\nconst noop = () => {}\n\nconst toFiniteNumber = (value, defaultValue) => {\n return value != null && Number.isFinite(value = +value) ? value : defaultValue;\n}\n\n/**\n * If the thing is a FormData object, return true, otherwise return false.\n *\n * @param {unknown} thing - The thing to check.\n *\n * @returns {boolean}\n */\nfunction isSpecCompliantForm(thing) {\n return !!(thing && isFunction(thing.append) && thing[toStringTag] === 'FormData' && thing[iterator]);\n}\n\nconst toJSONObject = (obj) => {\n const stack = new Array(10);\n\n const visit = (source, i) => {\n\n if (isObject(source)) {\n if (stack.indexOf(source) >= 0) {\n return;\n }\n\n if(!('toJSON' in source)) {\n stack[i] = source;\n const target = isArray(source) ? [] : {};\n\n forEach(source, (value, key) => {\n const reducedValue = visit(value, i + 1);\n !isUndefined(reducedValue) && (target[key] = reducedValue);\n });\n\n stack[i] = undefined;\n\n return target;\n }\n }\n\n return source;\n }\n\n return visit(obj, 0);\n}\n\nconst isAsyncFn = kindOfTest('AsyncFunction');\n\nconst isThenable = (thing) =>\n thing && (isObject(thing) || isFunction(thing)) && isFunction(thing.then) && isFunction(thing.catch);\n\n// original code\n// https://github.com/DigitalBrainJS/AxiosPromise/blob/16deab13710ec09779922131f3fa5954320f83ab/lib/utils.js#L11-L34\n\nconst _setImmediate = ((setImmediateSupported, postMessageSupported) => {\n if (setImmediateSupported) {\n return setImmediate;\n }\n\n return postMessageSupported ? ((token, callbacks) => {\n _global.addEventListener(\"message\", ({source, data}) => {\n if (source === _global && data === token) {\n callbacks.length && callbacks.shift()();\n }\n }, false);\n\n return (cb) => {\n callbacks.push(cb);\n _global.postMessage(token, \"*\");\n }\n })(`axios@${Math.random()}`, []) : (cb) => setTimeout(cb);\n})(\n typeof setImmediate === 'function',\n isFunction(_global.postMessage)\n);\n\nconst asap = typeof queueMicrotask !== 'undefined' ?\n queueMicrotask.bind(_global) : ( typeof process !== 'undefined' && process.nextTick || _setImmediate);\n\n// *********************\n\n\nconst isIterable = (thing) => thing != null && isFunction(thing[iterator]);\n\n\nexport default {\n isArray,\n isArrayBuffer,\n isBuffer,\n isFormData,\n isArrayBufferView,\n isString,\n isNumber,\n isBoolean,\n isObject,\n isPlainObject,\n isReadableStream,\n isRequest,\n isResponse,\n isHeaders,\n isUndefined,\n isDate,\n isFile,\n isBlob,\n isRegExp,\n isFunction,\n isStream,\n isURLSearchParams,\n isTypedArray,\n isFileList,\n forEach,\n merge,\n extend,\n trim,\n stripBOM,\n inherits,\n toFlatObject,\n kindOf,\n kindOfTest,\n endsWith,\n toArray,\n forEachEntry,\n matchAll,\n isHTMLForm,\n hasOwnProperty,\n hasOwnProp: hasOwnProperty, // an alias to avoid ESLint no-prototype-builtins detection\n reduceDescriptors,\n freezeMethods,\n toObjectSet,\n toCamelCase,\n noop,\n toFiniteNumber,\n findKey,\n global: _global,\n isContextDefined,\n isSpecCompliantForm,\n toJSONObject,\n isAsyncFn,\n isThenable,\n setImmediate: _setImmediate,\n asap,\n isIterable\n};\n","'use strict';\n\nimport utils from '../utils.js';\n\n/**\n * Create an Error with the specified message, config, error code, request and response.\n *\n * @param {string} message The error message.\n * @param {string} [code] The error code (for example, 'ECONNABORTED').\n * @param {Object} [config] The config.\n * @param {Object} [request] The request.\n * @param {Object} [response] The response.\n *\n * @returns {Error} The created error.\n */\nfunction AxiosError(message, code, config, request, response) {\n Error.call(this);\n\n if (Error.captureStackTrace) {\n Error.captureStackTrace(this, this.constructor);\n } else {\n this.stack = (new Error()).stack;\n }\n\n this.message = message;\n this.name = 'AxiosError';\n code && (this.code = code);\n config && (this.config = config);\n request && (this.request = request);\n if (response) {\n this.response = response;\n this.status = response.status ? response.status : null;\n }\n}\n\nutils.inherits(AxiosError, Error, {\n toJSON: function toJSON() {\n return {\n // Standard\n message: this.message,\n name: this.name,\n // Microsoft\n description: this.description,\n number: this.number,\n // Mozilla\n fileName: this.fileName,\n lineNumber: this.lineNumber,\n columnNumber: this.columnNumber,\n stack: this.stack,\n // Axios\n config: utils.toJSONObject(this.config),\n code: this.code,\n status: this.status\n };\n }\n});\n\nconst prototype = AxiosError.prototype;\nconst descriptors = {};\n\n[\n 'ERR_BAD_OPTION_VALUE',\n 'ERR_BAD_OPTION',\n 'ECONNABORTED',\n 'ETIMEDOUT',\n 'ERR_NETWORK',\n 'ERR_FR_TOO_MANY_REDIRECTS',\n 'ERR_DEPRECATED',\n 'ERR_BAD_RESPONSE',\n 'ERR_BAD_REQUEST',\n 'ERR_CANCELED',\n 'ERR_NOT_SUPPORT',\n 'ERR_INVALID_URL'\n// eslint-disable-next-line func-names\n].forEach(code => {\n descriptors[code] = {value: code};\n});\n\nObject.defineProperties(AxiosError, descriptors);\nObject.defineProperty(prototype, 'isAxiosError', {value: true});\n\n// eslint-disable-next-line func-names\nAxiosError.from = (error, code, config, request, response, customProps) => {\n const axiosError = Object.create(prototype);\n\n utils.toFlatObject(error, axiosError, function filter(obj) {\n return obj !== Error.prototype;\n }, prop => {\n return prop !== 'isAxiosError';\n });\n\n AxiosError.call(axiosError, error.message, code, config, request, response);\n\n axiosError.cause = error;\n\n axiosError.name = error.name;\n\n customProps && Object.assign(axiosError, customProps);\n\n return axiosError;\n};\n\nexport default AxiosError;\n","'use strict';\n\nimport utils from '../utils.js';\nimport AxiosError from '../core/AxiosError.js';\n// temporary hotfix to avoid circular references until AxiosURLSearchParams is refactored\nimport PlatformFormData from '../platform/node/classes/FormData.js';\n\n/**\n * Determines if the given thing is a array or js object.\n *\n * @param {string} thing - The object or array to be visited.\n *\n * @returns {boolean}\n */\nfunction isVisitable(thing) {\n return utils.isPlainObject(thing) || utils.isArray(thing);\n}\n\n/**\n * It removes the brackets from the end of a string\n *\n * @param {string} key - The key of the parameter.\n *\n * @returns {string} the key without the brackets.\n */\nfunction removeBrackets(key) {\n return utils.endsWith(key, '[]') ? key.slice(0, -2) : key;\n}\n\n/**\n * It takes a path, a key, and a boolean, and returns a string\n *\n * @param {string} path - The path to the current key.\n * @param {string} key - The key of the current object being iterated over.\n * @param {string} dots - If true, the key will be rendered with dots instead of brackets.\n *\n * @returns {string} The path to the current key.\n */\nfunction renderKey(path, key, dots) {\n if (!path) return key;\n return path.concat(key).map(function each(token, i) {\n // eslint-disable-next-line no-param-reassign\n token = removeBrackets(token);\n return !dots && i ? '[' + token + ']' : token;\n }).join(dots ? '.' : '');\n}\n\n/**\n * If the array is an array and none of its elements are visitable, then it's a flat array.\n *\n * @param {Array<any>} arr - The array to check\n *\n * @returns {boolean}\n */\nfunction isFlatArray(arr) {\n return utils.isArray(arr) && !arr.some(isVisitable);\n}\n\nconst predicates = utils.toFlatObject(utils, {}, null, function filter(prop) {\n return /^is[A-Z]/.test(prop);\n});\n\n/**\n * Convert a data object to FormData\n *\n * @param {Object} obj\n * @param {?Object} [formData]\n * @param {?Object} [options]\n * @param {Function} [options.visitor]\n * @param {Boolean} [options.metaTokens = true]\n * @param {Boolean} [options.dots = false]\n * @param {?Boolean} [options.indexes = false]\n *\n * @returns {Object}\n **/\n\n/**\n * It converts an object into a FormData object\n *\n * @param {Object<any, any>} obj - The object to convert to form data.\n * @param {string} formData - The FormData object to append to.\n * @param {Object<string, any>} options\n *\n * @returns\n */\nfunction toFormData(obj, formData, options) {\n if (!utils.isObject(obj)) {\n throw new TypeError('target must be an object');\n }\n\n // eslint-disable-next-line no-param-reassign\n formData = formData || new (PlatformFormData || FormData)();\n\n // eslint-disable-next-line no-param-reassign\n options = utils.toFlatObject(options, {\n metaTokens: true,\n dots: false,\n indexes: false\n }, false, function defined(option, source) {\n // eslint-disable-next-line no-eq-null,eqeqeq\n return !utils.isUndefined(source[option]);\n });\n\n const metaTokens = options.metaTokens;\n // eslint-disable-next-line no-use-before-define\n const visitor = options.visitor || defaultVisitor;\n const dots = options.dots;\n const indexes = options.indexes;\n const _Blob = options.Blob || typeof Blob !== 'undefined' && Blob;\n const useBlob = _Blob && utils.isSpecCompliantForm(formData);\n\n if (!utils.isFunction(visitor)) {\n throw new TypeError('visitor must be a function');\n }\n\n function convertValue(value) {\n if (value === null) return '';\n\n if (utils.isDate(value)) {\n return value.toISOString();\n }\n\n if (utils.isBoolean(value)) {\n return value.toString();\n }\n\n if (!useBlob && utils.isBlob(value)) {\n throw new AxiosError('Blob is not supported. Use a Buffer instead.');\n }\n\n if (utils.isArrayBuffer(value) || utils.isTypedArray(value)) {\n return useBlob && typeof Blob === 'function' ? new Blob([value]) : Buffer.from(value);\n }\n\n return value;\n }\n\n /**\n * Default visitor.\n *\n * @param {*} value\n * @param {String|Number} key\n * @param {Array<String|Number>} path\n * @this {FormData}\n *\n * @returns {boolean} return true to visit the each prop of the value recursively\n */\n function defaultVisitor(value, key, path) {\n let arr = value;\n\n if (value && !path && typeof value === 'object') {\n if (utils.endsWith(key, '{}')) {\n // eslint-disable-next-line no-param-reassign\n key = metaTokens ? key : key.slice(0, -2);\n // eslint-disable-next-line no-param-reassign\n value = JSON.stringify(value);\n } else if (\n (utils.isArray(value) && isFlatArray(value)) ||\n ((utils.isFileList(value) || utils.endsWith(key, '[]')) && (arr = utils.toArray(value))\n )) {\n // eslint-disable-next-line no-param-reassign\n key = removeBrackets(key);\n\n arr.forEach(function each(el, index) {\n !(utils.isUndefined(el) || el === null) && formData.append(\n // eslint-disable-next-line no-nested-ternary\n indexes === true ? renderKey([key], index, dots) : (indexes === null ? key : key + '[]'),\n convertValue(el)\n );\n });\n return false;\n }\n }\n\n if (isVisitable(value)) {\n return true;\n }\n\n formData.append(renderKey(path, key, dots), convertValue(value));\n\n return false;\n }\n\n const stack = [];\n\n const exposedHelpers = Object.assign(predicates, {\n defaultVisitor,\n convertValue,\n isVisitable\n });\n\n function build(value, path) {\n if (utils.isUndefined(value)) return;\n\n if (stack.indexOf(value) !== -1) {\n throw Error('Circular reference detected in ' + path.join('.'));\n }\n\n stack.push(value);\n\n utils.forEach(value, function each(el, key) {\n const result = !(utils.isUndefined(el) || el === null) && visitor.call(\n formData, el, utils.isString(key) ? key.trim() : key, path, exposedHelpers\n );\n\n if (result === true) {\n build(el, path ? path.concat(key) : [key]);\n }\n });\n\n stack.pop();\n }\n\n if (!utils.isObject(obj)) {\n throw new TypeError('data must be an object');\n }\n\n build(obj);\n\n return formData;\n}\n\nexport default toFormData;\n","'use strict';\n\nimport toFormData from './toFormData.js';\n\n/**\n * It encodes a string by replacing all characters that are not in the unreserved set with\n * their percent-encoded equivalents\n *\n * @param {string} str - The string to encode.\n *\n * @returns {string} The encoded string.\n */\nfunction encode(str) {\n const charMap = {\n '!': '%21',\n \"'\": '%27',\n '(': '%28',\n ')': '%29',\n '~': '%7E',\n '%20': '+',\n '%00': '\\x00'\n };\n return encodeURIComponent(str).replace(/[!'()~]|%20|%00/g, function replacer(match) {\n return charMap[match];\n });\n}\n\n/**\n * It takes a params object and converts it to a FormData object\n *\n * @param {Object<string, any>} params - The parameters to be converted to a FormData object.\n * @param {Object<string, any>} options - The options object passed to the Axios constructor.\n *\n * @returns {void}\n */\nfunction AxiosURLSearchParams(params, options) {\n this._pairs = [];\n\n params && toFormData(params, this, options);\n}\n\nconst prototype = AxiosURLSearchParams.prototype;\n\nprototype.append = function append(name, value) {\n this._pairs.push([name, value]);\n};\n\nprototype.toString = function toString(encoder) {\n const _encode = encoder ? function(value) {\n return encoder.call(this, value, encode);\n } : encode;\n\n return this._pairs.map(function each(pair) {\n return _encode(pair[0]) + '=' + _encode(pair[1]);\n }, '').join('&');\n};\n\nexport default AxiosURLSearchParams;\n","'use strict';\n\nimport utils from '../utils.js';\nimport AxiosURLSearchParams from '../helpers/AxiosURLSearchParams.js';\n\n/**\n * It replaces all instances of the characters `:`, `$`, `,`, `+`, `[`, and `]` with their\n * URI encoded counterparts\n *\n * @param {string} val The value to be encoded.\n *\n * @returns {string} The encoded value.\n */\nfunction encode(val) {\n return encodeURIComponent(val).\n replace(/%3A/gi, ':').\n replace(/%24/g, '$').\n replace(/%2C/gi, ',').\n replace(/%20/g, '+').\n replace(/%5B/gi, '[').\n replace(/%5D/gi, ']');\n}\n\n/**\n * Build a URL by appending params to the end\n *\n * @param {string} url The base of the url (e.g., http://www.google.com)\n * @param {object} [params] The params to be appended\n * @param {?(object|Function)} options\n *\n * @returns {string} The formatted url\n */\nexport default function buildURL(url, params, options) {\n /*eslint no-param-reassign:0*/\n if (!params) {\n return url;\n }\n \n const _encode = options && options.encode || encode;\n\n if (utils.isFunction(options)) {\n options = {\n serialize: options\n };\n } \n\n const serializeFn = options && options.serialize;\n\n let serializedParams;\n\n if (serializeFn) {\n serializedParams = serializeFn(params, options);\n } else {\n serializedParams = utils.isURLSearchParams(params) ?\n params.toString() :\n new AxiosURLSearchParams(params, options).toString(_encode);\n }\n\n if (serializedParams) {\n const hashmarkIndex = url.indexOf(\"#\");\n\n if (hashmarkIndex !== -1) {\n url = url.slice(0, hashmarkIndex);\n }\n url += (url.indexOf('?') === -1 ? '?' : '&') + serializedParams;\n }\n\n return url;\n}\n","'use strict';\n\nimport utils from './../utils.js';\n\nclass InterceptorManager {\n constructor() {\n this.handlers = [];\n }\n\n /**\n * Add a new interceptor to the stack\n *\n * @param {Function} fulfilled The function to handle `then` for a `Promise`\n * @param {Function} rejected The function to handle `reject` for a `Promise`\n *\n * @return {Number} An ID used to remove interceptor later\n */\n use(fulfilled, rejected, options) {\n this.handlers.push({\n fulfilled,\n rejected,\n synchronous: options ? options.synchronous : false,\n runWhen: options ? options.runWhen : null\n });\n return this.handlers.length - 1;\n }\n\n /**\n * Remove an interceptor from the stack\n *\n * @param {Number} id The ID that was returned by `use`\n *\n * @returns {Boolean} `true` if the interceptor was removed, `false` otherwise\n */\n eject(id) {\n if (this.handlers[id]) {\n this.handlers[id] = null;\n }\n }\n\n /**\n * Clear all interceptors from the stack\n *\n * @returns {void}\n */\n clear() {\n if (this.handlers) {\n this.handlers = [];\n }\n }\n\n /**\n * Iterate over all the registered interceptors\n *\n * This method is particularly useful for skipping over any\n * interceptors that may have become `null` calling `eject`.\n *\n * @param {Function} fn The function to call for each interceptor\n *\n * @returns {void}\n */\n forEach(fn) {\n utils.forEach(this.handlers, function forEachHandler(h) {\n if (h !== null) {\n fn(h);\n }\n });\n }\n}\n\nexport default InterceptorManager;\n","'use strict';\n\nexport default {\n silentJSONParsing: true,\n forcedJSONParsing: true,\n clarifyTimeoutError: false\n};\n","'use strict';\n\nimport url from 'url';\nexport default url.URLSearchParams;\n","import crypto from 'crypto';\nimport URLSearchParams from './classes/URLSearchParams.js'\nimport FormData from './classes/FormData.js'\n\nconst ALPHA = 'abcdefghijklmnopqrstuvwxyz'\n\nconst DIGIT = '0123456789';\n\nconst ALPHABET = {\n DIGIT,\n ALPHA,\n ALPHA_DIGIT: ALPHA + ALPHA.toUpperCase() + DIGIT\n}\n\nconst generateString = (size = 16, alphabet = ALPHABET.ALPHA_DIGIT) => {\n let str = '';\n const {length} = alphabet;\n const randomValues = new Uint32Array(size);\n crypto.randomFillSync(randomValues);\n for (let i = 0; i < size; i++) {\n str += alphabet[randomValues[i] % length];\n }\n\n return str;\n}\n\n\nexport default {\n isNode: true,\n classes: {\n URLSearchParams,\n FormData,\n Blob: typeof Blob !== 'undefined' && Blob || null\n },\n ALPHABET,\n generateString,\n protocols: [ 'http', 'https', 'file', 'data' ]\n};\n","const hasBrowserEnv = typeof window !== 'undefined' && typeof document !== 'undefined';\n\nconst _navigator = typeof navigator === 'object' && navigator || undefined;\n\n/**\n * Determine if we're running in a standard browser environment\n *\n * This allows axios to run in a web worker, and react-native.\n * Both environments support XMLHttpRequest, but not fully standard globals.\n *\n * web workers:\n * typeof window -> undefined\n * typeof document -> undefined\n *\n * react-native:\n * navigator.product -> 'ReactNative'\n * nativescript\n * navigator.product -> 'NativeScript' or 'NS'\n *\n * @returns {boolean}\n */\nconst hasStandardBrowserEnv = hasBrowserEnv &&\n (!_navigator || ['ReactNative', 'NativeScript', 'NS'].indexOf(_navigator.product) < 0);\n\n/**\n * Determine if we're running in a standard browser webWorker environment\n *\n * Although the `isStandardBrowserEnv` method indicates that\n * `allows axios to run in a web worker`, the WebWorker will still be\n * filtered out due to its judgment standard\n * `typeof window !== 'undefined' && typeof document !== 'undefined'`.\n * This leads to a problem when axios post `FormData` in webWorker\n */\nconst hasStandardBrowserWebWorkerEnv = (() => {\n return (\n typeof WorkerGlobalScope !== 'undefined' &&\n // eslint-disable-next-line no-undef\n self instanceof WorkerGlobalScope &&\n typeof self.importScripts === 'function'\n );\n})();\n\nconst origin = hasBrowserEnv && window.location.href || 'http://localhost';\n\nexport {\n hasBrowserEnv,\n hasStandardBrowserWebWorkerEnv,\n hasStandardBrowserEnv,\n _navigator as navigator,\n origin\n}\n","import platform from './node/index.js';\nimport * as utils from './common/utils.js';\n\nexport default {\n ...utils,\n ...platform\n}\n","'use strict';\n\nimport utils from '../utils.js';\nimport toFormData from './toFormData.js';\nimport platform from '../platform/index.js';\n\nexport default function toURLEncodedForm(data, options) {\n return toFormData(data, new platform.classes.URLSearchParams(), Object.assign({\n visitor: function(value, key, path, helpers) {\n if (platform.isNode && utils.isBuffer(value)) {\n this.append(key, value.toString('base64'));\n return false;\n }\n\n return helpers.defaultVisitor.apply(this, arguments);\n }\n }, options));\n}\n","'use strict';\n\nimport utils from '../utils.js';\n\n/**\n * It takes a string like `foo[x][y][z]` and returns an array like `['foo', 'x', 'y', 'z']\n *\n * @param {string} name - The name of the property to get.\n *\n * @returns An array of strings.\n */\nfunction parsePropPath(name) {\n // foo[x][y][z]\n // foo.x.y.z\n // foo-x-y-z\n // foo x y z\n return utils.matchAll(/\\w+|\\[(\\w*)]/g, name).map(match => {\n return match[0] === '[]' ? '' : match[1] || match[0];\n });\n}\n\n/**\n * Convert an array to an object.\n *\n * @param {Array<any>} arr - The array to convert to an object.\n *\n * @returns An object with the same keys and values as the array.\n */\nfunction arrayToObject(arr) {\n const obj = {};\n const keys = Object.keys(arr);\n let i;\n const len = keys.length;\n let key;\n for (i = 0; i < len; i++) {\n key = keys[i];\n obj[key] = arr[key];\n }\n return obj;\n}\n\n/**\n * It takes a FormData object and returns a JavaScript object\n *\n * @param {string} formData The FormData object to convert to JSON.\n *\n * @returns {Object<string, any> | null} The converted object.\n */\nfunction formDataToJSON(formData) {\n function buildPath(path, value, target, index) {\n let name = path[index++];\n\n if (name === '__proto__') return true;\n\n const isNumericKey = Number.isFinite(+name);\n const isLast = index >= path.length;\n name = !name && utils.isArray(target) ? target.length : name;\n\n if (isLast) {\n if (utils.hasOwnProp(target, name)) {\n target[name] = [target[name], value];\n } else {\n target[name] = value;\n }\n\n return !isNumericKey;\n }\n\n if (!target[name] || !utils.isObject(target[name])) {\n target[name] = [];\n }\n\n const result = buildPath(path, value, target[name], index);\n\n if (result && utils.isArray(target[name])) {\n target[name] = arrayToObject(target[name]);\n }\n\n return !isNumericKey;\n }\n\n if (utils.isFormData(formData) && utils.isFunction(formData.entries)) {\n const obj = {};\n\n utils.forEachEntry(formData, (name, value) => {\n buildPath(parsePropPath(name), value, obj, 0);\n });\n\n return obj;\n }\n\n return null;\n}\n\nexport default formDataToJSON;\n","'use strict';\n\nimport utils from '../utils.js';\nimport AxiosError from '../core/AxiosError.js';\nimport transitionalDefaults from './transitional.js';\nimport toFormData from '../helpers/toFormData.js';\nimport toURLEncodedForm from '../helpers/toURLEncodedForm.js';\nimport platform from '../platform/index.js';\nimport formDataToJSON from '../helpers/formDataToJSON.js';\n\n/**\n * It takes a string, tries to parse it, and if it fails, it returns the stringified version\n * of the input\n *\n * @param {any} rawValue - The value to be stringified.\n * @param {Function} parser - A function that parses a string into a JavaScript object.\n * @param {Function} encoder - A function that takes a value and returns a string.\n *\n * @returns {string} A stringified version of the rawValue.\n */\nfunction stringifySafely(rawValue, parser, encoder) {\n if (utils.isString(rawValue)) {\n try {\n (parser || JSON.parse)(rawValue);\n return utils.trim(rawValue);\n } catch (e) {\n if (e.name !== 'SyntaxError') {\n throw e;\n }\n }\n }\n\n return (encoder || JSON.stringify)(rawValue);\n}\n\nconst defaults = {\n\n transitional: transitionalDefaults,\n\n adapter: ['xhr', 'http', 'fetch'],\n\n transformRequest: [function transformRequest(data, headers) {\n const contentType = headers.getContentType() || '';\n const hasJSONContentType = contentType.indexOf('application/json') > -1;\n const isObjectPayload = utils.isObject(data);\n\n if (isObjectPayload && utils.isHTMLForm(data)) {\n data = new FormData(data);\n }\n\n const isFormData = utils.isFormData(data);\n\n if (isFormData) {\n return hasJSONContentType ? JSON.stringify(formDataToJSON(data)) : data;\n }\n\n if (utils.isArrayBuffer(data) ||\n utils.isBuffer(data) ||\n utils.isStream(data) ||\n utils.isFile(data) ||\n utils.isBlob(data) ||\n utils.isReadableStream(data)\n ) {\n return data;\n }\n if (utils.isArrayBufferView(data)) {\n return data.buffer;\n }\n if (utils.isURLSearchParams(data)) {\n headers.setContentType('application/x-www-form-urlencoded;charset=utf-8', false);\n return data.toString();\n }\n\n let isFileList;\n\n if (isObjectPayload) {\n if (contentType.indexOf('application/x-www-form-urlencoded') > -1) {\n return toURLEncodedForm(data, this.formSerializer).toString();\n }\n\n if ((isFileList = utils.isFileList(data)) || contentType.indexOf('multipart/form-data') > -1) {\n const _FormData = this.env && this.env.FormData;\n\n return toFormData(\n isFileList ? {'files[]': data} : data,\n _FormData && new _FormData(),\n this.formSerializer\n );\n }\n }\n\n if (isObjectPayload || hasJSONContentType ) {\n headers.setContentType('application/json', false);\n return stringifySafely(data);\n }\n\n return data;\n }],\n\n transformResponse: [function transformResponse(data) {\n const transitional = this.transitional || defaults.transitional;\n const forcedJSONParsing = transitional && transitional.forcedJSONParsing;\n const JSONRequested = this.responseType === 'json';\n\n if (utils.isResponse(data) || utils.isReadableStream(data)) {\n return data;\n }\n\n if (data && utils.isString(data) && ((forcedJSONParsing && !this.responseType) || JSONRequested)) {\n const silentJSONParsing = transitional && transitional.silentJSONParsing;\n const strictJSONParsing = !silentJSONParsing && JSONRequested;\n\n try {\n return JSON.parse(data);\n } catch (e) {\n if (strictJSONParsing) {\n if (e.name === 'SyntaxError') {\n throw AxiosError.from(e, AxiosError.ERR_BAD_RESPONSE, this, null, this.response);\n }\n throw e;\n }\n }\n }\n\n return data;\n }],\n\n /**\n * A timeout in milliseconds to abort a request. If set to 0 (default) a\n * timeout is not created.\n */\n timeout: 0,\n\n xsrfCookieName: 'XSRF-TOKEN',\n xsrfHeaderName: 'X-XSRF-TOKEN',\n\n maxContentLength: -1,\n maxBodyLength: -1,\n\n env: {\n FormData: platform.classes.FormData,\n Blob: platform.classes.Blob\n },\n\n validateStatus: function validateStatus(status) {\n return status >= 200 && status < 300;\n },\n\n headers: {\n common: {\n 'Accept': 'application/json, text/plain, */*',\n 'Content-Type': undefined\n }\n }\n};\n\nutils.forEach(['delete', 'get', 'head', 'post', 'put', 'patch'], (method) => {\n defaults.headers[method] = {};\n});\n\nexport default defaults;\n","'use strict';\n\nimport utils from './../utils.js';\n\n// RawAxiosHeaders whose duplicates are ignored by node\n// c.f. https://nodejs.org/api/http.html#http_message_headers\nconst ignoreDuplicateOf = utils.toObjectSet([\n 'age', 'authorization', 'content-length', 'content-type', 'etag',\n 'expires', 'from', 'host', 'if-modified-since', 'if-unmodified-since',\n 'last-modified', 'location', 'max-forwards', 'proxy-authorization',\n 'referer', 'retry-after', 'user-agent'\n]);\n\n/**\n * Parse headers into an object\n *\n * ```\n * Date: Wed, 27 Aug 2014 08:58:49 GMT\n * Content-Type: application/json\n * Connection: keep-alive\n * Transfer-Encoding: chunked\n * ```\n *\n * @param {String} rawHeaders Headers needing to be parsed\n *\n * @returns {Object} Headers parsed into an object\n */\nexport default rawHeaders => {\n const parsed = {};\n let key;\n let val;\n let i;\n\n rawHeaders && rawHeaders.split('\\n').forEach(function parser(line) {\n i = line.indexOf(':');\n key = line.substring(0, i).trim().toLowerCase();\n val = line.substring(i + 1).trim();\n\n if (!key || (parsed[key] && ignoreDuplicateOf[key])) {\n return;\n }\n\n if (key === 'set-cookie') {\n if (parsed[key]) {\n parsed[key].push(val);\n } else {\n parsed[key] = [val];\n }\n } else {\n parsed[key] = parsed[key] ? parsed[key] + ', ' + val : val;\n }\n });\n\n return parsed;\n};\n","'use strict';\n\nimport utils from '../utils.js';\nimport parseHeaders from '../helpers/parseHeaders.js';\n\nconst $internals = Symbol('internals');\n\nfunction normalizeHeader(header) {\n return header && String(header).trim().toLowerCase();\n}\n\nfunction normalizeValue(value) {\n if (value === false || value == null) {\n return value;\n }\n\n return utils.isArray(value) ? value.map(normalizeValue) : String(value);\n}\n\nfunction parseTokens(str) {\n const tokens = Object.create(null);\n const tokensRE = /([^\\s,;=]+)\\s*(?:=\\s*([^,;]+))?/g;\n let match;\n\n while ((match = tokensRE.exec(str))) {\n tokens[match[1]] = match[2];\n }\n\n return tokens;\n}\n\nconst isValidHeaderName = (str) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(str.trim());\n\nfunction matchHeaderValue(context, value, header, filter, isHeaderNameFilter) {\n if (utils.isFunction(filter)) {\n return filter.call(this, value, header);\n }\n\n if (isHeaderNameFilter) {\n value = header;\n }\n\n if (!utils.isString(value)) return;\n\n if (utils.isString(filter)) {\n return value.indexOf(filter) !== -1;\n }\n\n if (utils.isRegExp(filter)) {\n return filter.test(value);\n }\n}\n\nfunction formatHeader(header) {\n return header.trim()\n .toLowerCase().replace(/([a-z\\d])(\\w*)/g, (w, char, str) => {\n return char.toUpperCase() + str;\n });\n}\n\nfunction buildAccessors(obj, header) {\n const accessorName = utils.toCamelCase(' ' + header);\n\n ['get', 'set', 'has'].forEach(methodName => {\n Object.defineProperty(obj, methodName + accessorName, {\n value: function(arg1, arg2, arg3) {\n return this[methodName].call(this, header, arg1, arg2, arg3);\n },\n configurable: true\n });\n });\n}\n\nclass AxiosHeaders {\n constructor(headers) {\n headers && this.set(headers);\n }\n\n set(header, valueOrRewrite, rewrite) {\n const self = this;\n\n function setHeader(_value, _header, _rewrite) {\n const lHeader = normalizeHeader(_header);\n\n if (!lHeader) {\n throw new Error('header name must be a non-empty string');\n }\n\n const key = utils.findKey(self, lHeader);\n\n if(!key || self[key] === undefined || _rewrite === true || (_rewrite === undefined && self[key] !== false)) {\n self[key || _header] = normalizeValue(_value);\n }\n }\n\n const setHeaders = (headers, _rewrite) =>\n utils.forEach(headers, (_value, _header) => setHeader(_value, _header, _rewrite));\n\n if (utils.isPlainObject(header) || header instanceof this.constructor) {\n setHeaders(header, valueOrRewrite)\n } else if(utils.isString(header) && (header = header.trim()) && !isValidHeaderName(header)) {\n setHeaders(parseHeaders(header), valueOrRewrite);\n } else if (utils.isObject(header) && utils.isIterable(header)) {\n let obj = {}, dest, key;\n for (const entry of header) {\n if (!utils.isArray(entry)) {\n throw TypeError('Object iterator must return a key-value pair');\n }\n\n obj[key = entry[0]] = (dest = obj[key]) ?\n (utils.isArray(dest) ? [...dest, entry[1]] : [dest, entry[1]]) : entry[1];\n }\n\n setHeaders(obj, valueOrRewrite)\n } else {\n header != null && setHeader(valueOrRewrite, header, rewrite);\n }\n\n return this;\n }\n\n get(header, parser) {\n header = normalizeHeader(header);\n\n if (header) {\n const key = utils.findKey(this, header);\n\n if (key) {\n const value = this[key];\n\n if (!parser) {\n return value;\n }\n\n if (parser === true) {\n return parseTokens(value);\n }\n\n if (utils.isFunction(parser)) {\n return parser.call(this, value, key);\n }\n\n if (utils.isRegExp(parser)) {\n return parser.exec(value);\n }\n\n throw new TypeError('parser must be boolean|regexp|function');\n }\n }\n }\n\n has(header, matcher) {\n header = normalizeHeader(header);\n\n if (header) {\n const key = utils.findKey(this, header);\n\n return !!(key && this[key] !== undefined && (!matcher || matchHeaderValue(this, this[key], key, matcher)));\n }\n\n return false;\n }\n\n delete(header, matcher) {\n const self = this;\n let deleted = false;\n\n function deleteHeader(_header) {\n _header = normalizeHeader(_header);\n\n if (_header) {\n const key = utils.findKey(self, _header);\n\n if (key && (!matcher || matchHeaderValue(self, self[key], key, matcher))) {\n delete self[key];\n\n deleted = true;\n }\n }\n }\n\n if (utils.isArray(header)) {\n header.forEach(deleteHeader);\n } else {\n deleteHeader(header);\n }\n\n return deleted;\n }\n\n clear(matcher) {\n const keys = Object.keys(this);\n let i = keys.length;\n let deleted = false;\n\n while (i--) {\n const key = keys[i];\n if(!matcher || matchHeaderValue(this, this[key], key, matcher, true)) {\n delete this[key];\n deleted = true;\n }\n }\n\n return deleted;\n }\n\n normalize(format) {\n const self = this;\n const headers = {};\n\n utils.forEach(this, (value, header) => {\n const key = utils.findKey(headers, header);\n\n if (key) {\n self[key] = normalizeValue(value);\n delete self[header];\n return;\n }\n\n const normalized = format ? formatHeader(header) : String(header).trim();\n\n if (normalized !== header) {\n delete self[header];\n }\n\n self[normalized] = normalizeValue(value);\n\n headers[normalized] = true;\n });\n\n return this;\n }\n\n concat(...targets) {\n return this.constructor.concat(this, ...targets);\n }\n\n toJSON(asStrings) {\n const obj = Object.create(null);\n\n utils.forEach(this, (value, header) => {\n value != null && value !== false && (obj[header] = asStrings && utils.isArray(value) ? value.join(', ') : value);\n });\n\n return obj;\n }\n\n [Symbol.iterator]() {\n return Object.entries(this.toJSON())[Symbol.iterator]();\n }\n\n toString() {\n return Object.entries(this.toJSON()).map(([header, value]) => header + ': ' + value).join('\\n');\n }\n\n getSetCookie() {\n return this.get(\"set-cookie\") || [];\n }\n\n get [Symbol.toStringTag]() {\n return 'AxiosHeaders';\n }\n\n static from(thing) {\n return thing instanceof this ? thing : new this(thing);\n }\n\n static concat(first, ...targets) {\n const computed = new this(first);\n\n targets.forEach((target) => computed.set(target));\n\n return computed;\n }\n\n static accessor(header) {\n const internals = this[$internals] = (this[$internals] = {\n accessors: {}\n });\n\n const accessors = internals.accessors;\n const prototype = this.prototype;\n\n function defineAccessor(_header) {\n const lHeader = normalizeHeader(_header);\n\n if (!accessors[lHeader]) {\n buildAccessors(prototype, _header);\n accessors[lHeader] = true;\n }\n }\n\n utils.isArray(header) ? header.forEach(defineAccessor) : defineAccessor(header);\n\n return this;\n }\n}\n\nAxiosHeaders.accessor(['Content-Type', 'Content-Length', 'Accept', 'Accept-Encoding', 'User-Agent', 'Authorization']);\n\n// reserved names hotfix\nutils.reduceDescriptors(AxiosHeaders.prototype, ({value}, key) => {\n let mapped = key[0].toUpperCase() + key.slice(1); // map `set` => `Set`\n return {\n get: () => value,\n set(headerValue) {\n this[mapped] = headerValue;\n }\n }\n});\n\nutils.freezeMethods(AxiosHeaders);\n\nexport default AxiosHeaders;\n","'use strict';\n\nimport utils from './../utils.js';\nimport defaults from '../defaults/index.js';\nimport AxiosHeaders from '../core/AxiosHeaders.js';\n\n/**\n * Transform the data for a request or a response\n *\n * @param {Array|Function} fns A single function or Array of functions\n * @param {?Object} response The response object\n *\n * @returns {*} The resulting transformed data\n */\nexport default function transformData(fns, response) {\n const config = this || defaults;\n const context = response || config;\n const headers = AxiosHeaders.from(context.headers);\n let data = context.data;\n\n utils.forEach(fns, function transform(fn) {\n data = fn.call(config, data, headers.normalize(), response ? response.status : undefined);\n });\n\n headers.normalize();\n\n return data;\n}\n","'use strict';\n\nexport default function isCancel(value) {\n return !!(value && value.__CANCEL__);\n}\n","'use strict';\n\nimport AxiosError from '../core/AxiosError.js';\nimport utils from '../utils.js';\n\n/**\n * A `CanceledError` is an object that is thrown when an operation is canceled.\n *\n * @param {string=} message The message.\n * @param {Object=} config The config.\n * @param {Object=} request The request.\n *\n * @returns {CanceledError} The created error.\n */\nfunction CanceledError(message, config, request) {\n // eslint-disable-next-line no-eq-null,eqeqeq\n AxiosError.call(this, message == null ? 'canceled' : message, AxiosError.ERR_CANCELED, config, request);\n this.name = 'CanceledError';\n}\n\nutils.inherits(CanceledError, AxiosError, {\n __CANCEL__: true\n});\n\nexport default CanceledError;\n","'use strict';\n\nimport AxiosError from './AxiosError.js';\n\n/**\n * Resolve or reject a Promise based on response status.\n *\n * @param {Function} resolve A function that resolves the promise.\n * @param {Function} reject A function that rejects the promise.\n * @param {object} response The response.\n *\n * @returns {object} The response.\n */\nexport default function settle(resolve, reject, response) {\n const validateStatus = response.config.validateStatus;\n if (!response.status || !validateStatus || validateStatus(response.status)) {\n resolve(response);\n } else {\n reject(new AxiosError(\n 'Request failed with status code ' + response.status,\n [AxiosError.ERR_BAD_REQUEST, AxiosError.ERR_BAD_RESPONSE][Math.floor(response.status / 100) - 4],\n response.config,\n response.request,\n response\n ));\n }\n}\n","'use strict';\n\n/**\n * Determines whether the specified URL is absolute\n *\n * @param {string} url The URL to test\n *\n * @returns {boolean} True if the specified URL is absolute, otherwise false\n */\nexport default function isAbsoluteURL(url) {\n // A URL is considered absolute if it begins with \"<scheme>://\" or \"//\" (protocol-relative URL).\n // RFC 3986 defines scheme name as a sequence of characters beginning with a letter and followed\n // by any combination of letters, digits, plus, period, or hyphen.\n return /^([a-z][a-z\\d+\\-.]*:)?\\/\\//i.test(url);\n}\n","'use strict';\n\n/**\n * Creates a new URL by combining the specified URLs\n *\n * @param {string} baseURL The base URL\n * @param {string} relativeURL The relative URL\n *\n * @returns {string} The combined URL\n */\nexport default function combineURLs(baseURL, relativeURL) {\n return relativeURL\n ? baseURL.replace(/\\/?\\/$/, '') + '/' + relativeURL.replace(/^\\/+/, '')\n : baseURL;\n}\n","'use strict';\n\nimport isAbsoluteURL from '../helpers/isAbsoluteURL.js';\nimport combineURLs from '../helpers/combineURLs.js';\n\n/**\n * Creates a new URL by combining the baseURL with the requestedURL,\n * only when the requestedURL is not already an absolute URL.\n * If the requestURL is absolute, this function returns the requestedURL untouched.\n *\n * @param {string} baseURL The base URL\n * @param {string} requestedURL Absolute or relative URL to combine\n *\n * @returns {string} The combined full path\n */\nexport default function buildFullPath(baseURL, requestedURL, allowAbsoluteUrls) {\n let isRelativeUrl = !isAbsoluteURL(requestedURL);\n if (baseURL && (isRelativeUrl || allowAbsoluteUrls == false)) {\n return combineURLs(baseURL, requestedURL);\n }\n return requestedURL;\n}\n","export const VERSION = \"1.10.0\";","'use strict';\n\nexport default function parseProtocol(url) {\n const match = /^([-+\\w]{1,25})(:?\\/\\/|:)/.exec(url);\n return match && match[1] || '';\n}\n","'use strict';\n\nimport AxiosError from '../core/AxiosError.js';\nimport parseProtocol from './parseProtocol.js';\nimport platform from '../platform/index.js';\n\nconst DATA_URL_PATTERN = /^(?:([^;]+);)?(?:[^;]+;)?(base64|),([\\s\\S]*)$/;\n\n/**\n * Parse data uri to a Buffer or Blob\n *\n * @param {String} uri\n * @param {?Boolean} asBlob\n * @param {?Object} options\n * @param {?Function} options.Blob\n *\n * @returns {Buffer|Blob}\n */\nexport default function fromDataURI(uri, asBlob, options) {\n const _Blob = options && options.Blob || platform.classes.Blob;\n const protocol = parseProtocol(uri);\n\n if (asBlob === undefined && _Blob) {\n asBlob = true;\n }\n\n if (protocol === 'data') {\n uri = protocol.length ? uri.slice(protocol.length + 1) : uri;\n\n const match = DATA_URL_PATTERN.exec(uri);\n\n if (!match) {\n throw new AxiosError('Invalid URL', AxiosError.ERR_INVALID_URL);\n }\n\n const mime = match[1];\n const isBase64 = match[2];\n const body = match[3];\n const buffer = Buffer.from(decodeURIComponent(body), isBase64 ? 'base64' : 'utf8');\n\n if (asBlob) {\n if (!_Blob) {\n throw new AxiosError('Blob is not supported', AxiosError.ERR_NOT_SUPPORT);\n }\n\n return new _Blob([buffer], {type: mime});\n }\n\n return buffer;\n }\n\n throw new AxiosError('Unsupported protocol ' + protocol, AxiosError.ERR_NOT_SUPPORT);\n}\n","'use strict';\n\nimport stream from 'stream';\nimport utils from '../utils.js';\n\nconst kInternals = Symbol('internals');\n\nclass AxiosTransformStream extends stream.Transform{\n constructor(options) {\n options = utils.toFlatObject(options, {\n maxRate: 0,\n chunkSize: 64 * 1024,\n minChunkSize: 100,\n timeWindow: 500,\n ticksRate: 2,\n samplesCount: 15\n }, null, (prop, source) => {\n return !utils.isUndefined(source[prop]);\n });\n\n super({\n readableHighWaterMark: options.chunkSize\n });\n\n const internals = this[kInternals] = {\n timeWindow: options.timeWindow,\n chunkSize: options.chunkSize,\n maxRate: options.maxRate,\n minChunkSize: options.minChunkSize,\n bytesSeen: 0,\n isCaptured: false,\n notifiedBytesLoaded: 0,\n ts: Date.now(),\n bytes: 0,\n onReadCallback: null\n };\n\n this.on('newListener', event => {\n if (event === 'progress') {\n if (!internals.isCaptured) {\n internals.isCaptured = true;\n }\n }\n });\n }\n\n _read(size) {\n const internals = this[kInternals];\n\n if (internals.onReadCallback) {\n internals.onReadCallback();\n }\n\n return super._read(size);\n }\n\n _transform(chunk, encoding, callback) {\n const internals = this[kInternals];\n const maxRate = internals.maxRate;\n\n const readableHighWaterMark = this.readableHighWaterMark;\n\n const timeWindow = internals.timeWindow;\n\n const divider = 1000 / timeWindow;\n const bytesThreshold = (maxRate / divider);\n const minChunkSize = internals.minChunkSize !== false ? Math.max(internals.minChunkSize, bytesThreshold * 0.01) : 0;\n\n const pushChunk = (_chunk, _callback) => {\n const bytes = Buffer.byteLength(_chunk);\n internals.bytesSeen += bytes;\n internals.bytes += bytes;\n\n internals.isCaptured && this.emit('progress', internals.bytesSeen);\n\n if (this.push(_chunk)) {\n process.nextTick(_callback);\n } else {\n internals.onReadCallback = () => {\n internals.onReadCallback = null;\n process.nextTick(_callback);\n };\n }\n }\n\n const transformChunk = (_chunk, _callback) => {\n const chunkSize = Buffer.byteLength(_chunk);\n let chunkRemainder = null;\n let maxChunkSize = readableHighWaterMark;\n let bytesLeft;\n let passed = 0;\n\n if (maxRate) {\n const now = Date.now();\n\n if (!internals.ts || (passed = (now - internals.ts)) >= timeWindow) {\n internals.ts = now;\n bytesLeft = bytesThreshold - internals.bytes;\n internals.bytes = bytesLeft < 0 ? -bytesLeft : 0;\n passed = 0;\n }\n\n bytesLeft = bytesThreshold - internals.bytes;\n }\n\n if (maxRate) {\n if (bytesLeft <= 0) {\n // next time window\n return setTimeout(() => {\n _callback(null, _chunk);\n }, timeWindow - passed);\n }\n\n if (bytesLeft < maxChunkSize) {\n maxChunkSize = bytesLeft;\n }\n }\n\n if (maxChunkSize && chunkSize > maxChunkSize && (chunkSize - maxChunkSize) > minChunkSize) {\n chunkRemainder = _chunk.subarray(maxChunkSize);\n _chunk = _chunk.subarray(0, maxChunkSize);\n }\n\n pushChunk(_chunk, chunkRemainder ? () => {\n process.nextTick(_callback, null, chunkRemainder);\n } : _callback);\n };\n\n transformChunk(chunk, function transformNextChunk(err, _chunk) {\n if (err) {\n return callback(err);\n }\n\n if (_chunk) {\n transformChunk(_chunk, transformNextChunk);\n } else {\n callback(null);\n }\n });\n }\n}\n\nexport default AxiosTransformStream;\n","const {asyncIterator} = Symbol;\n\nconst readBlob = async function* (blob) {\n if (blob.stream) {\n yield* blob.stream()\n } else if (blob.arrayBuffer) {\n yield await blob.arrayBuffer()\n } else if (blob[asyncIterator]) {\n yield* blob[asyncIterator]();\n } else {\n yield blob;\n }\n}\n\nexport default readBlob;\n","import util from 'util';\nimport {Readable} from 'stream';\nimport utils from \"../utils.js\";\nimport readBlob from \"./readBlob.js\";\nimport platform from \"../platform/index.js\";\n\nconst BOUNDARY_ALPHABET = platform.ALPHABET.ALPHA_DIGIT + '-_';\n\nconst textEncoder = typeof TextEncoder === 'function' ? new TextEncoder() : new util.TextEncoder();\n\nconst CRLF = '\\r\\n';\nconst CRLF_BYTES = textEncoder.encode(CRLF);\nconst CRLF_BYTES_COUNT = 2;\n\nclass FormDataPart {\n constructor(name, value) {\n const {escapeName} = this.constructor;\n const isStringValue = utils.isString(value);\n\n let headers = `Content-Disposition: form-data; name=\"${escapeName(name)}\"${\n !isStringValue && value.name ? `; filename=\"${escapeName(value.name)}\"` : ''\n }${CRLF}`;\n\n if (isStringValue) {\n value = textEncoder.encode(String(value).replace(/\\r?\\n|\\r\\n?/g, CRLF));\n } else {\n headers += `Content-Type: ${value.type || \"application/octet-stream\"}${CRLF}`\n }\n\n this.headers = textEncoder.encode(headers + CRLF);\n\n this.contentLength = isStringValue ? value.byteLength : value.size;\n\n this.size = this.headers.byteLength + this.contentLength + CRLF_BYTES_COUNT;\n\n this.name = name;\n this.value = value;\n }\n\n async *encode(){\n yield this.headers;\n\n const {value} = this;\n\n if(utils.isTypedArray(value)) {\n yield value;\n } else {\n yield* readBlob(value);\n }\n\n yield CRLF_BYTES;\n }\n\n static escapeName(name) {\n return String(name).replace(/[\\r\\n\"]/g, (match) => ({\n '\\r' : '%0D',\n '\\n' : '%0A',\n '\"' : '%22',\n }[match]));\n }\n}\n\nconst formDataToStream = (form, headersHandler, options) => {\n const {\n tag = 'form-data-boundary',\n size = 25,\n boundary = tag + '-' + platform.generateString(size, BOUNDARY_ALPHABET)\n } = options || {};\n\n if(!utils.isFormData(form)) {\n throw TypeError('FormData instance required');\n }\n\n if (boundary.length < 1 || boundary.length > 70) {\n throw Error('boundary must be 10-70 characters long')\n }\n\n const boundaryBytes = textEncoder.encode('--' + boundary + CRLF);\n const footerBytes = textEncoder.encode('--' + boundary + '--' + CRLF);\n let contentLength = footerBytes.byteLength;\n\n const parts = Array.from(form.entries()).map(([name, value]) => {\n const part = new FormDataPart(name, value);\n contentLength += part.size;\n return part;\n });\n\n contentLength += boundaryBytes.byteLength * parts.length;\n\n contentLength = utils.toFiniteNumber(contentLength);\n\n const computedHeaders = {\n 'Content-Type': `multipart/form-data; boundary=${boundary}`\n }\n\n if (Number.isFinite(contentLength)) {\n computedHeaders['Content-Length'] = contentLength;\n }\n\n headersHandler && headersHandler(computedHeaders);\n\n return Readable.from((async function *() {\n for(const part of parts) {\n yield boundaryBytes;\n yield* part.encode();\n }\n\n yield footerBytes;\n })());\n};\n\nexport default formDataToStream;\n","\"use strict\";\n\nimport stream from \"stream\";\n\nclass ZlibHeaderTransformStream extends stream.Transform {\n __transform(chunk, encoding, callback) {\n this.push(chunk);\n callback();\n }\n\n _transform(chunk, encoding, callback) {\n if (chunk.length !== 0) {\n this._transform = this.__transform;\n\n // Add Default Compression headers if no zlib headers are present\n if (chunk[0] !== 120) { // Hex: 78\n const header = Buffer.alloc(2);\n header[0] = 120; // Hex: 78\n header[1] = 156; // Hex: 9C \n this.push(header, encoding);\n }\n }\n\n this.__transform(chunk, encoding, callback);\n }\n}\n\nexport default ZlibHeaderTransformStream;\n","import utils from \"../utils.js\";\n\nconst callbackify = (fn, reducer) => {\n return utils.isAsyncFn(fn) ? function (...args) {\n const cb = args.pop();\n fn.apply(this, args).then((value) => {\n try {\n reducer ? cb(null, ...reducer(value)) : cb(null, value);\n } catch (err) {\n cb(err);\n }\n }, cb);\n } : fn;\n}\n\nexport default callbackify;\n","'use strict';\n\n/**\n * Calculate data maxRate\n * @param {Number} [samplesCount= 10]\n * @param {Number} [min= 1000]\n * @returns {Function}\n */\nfunction speedometer(samplesCount, min) {\n samplesCount = samplesCount || 10;\n const bytes = new Array(samplesCount);\n const timestamps = new Array(samplesCount);\n let head = 0;\n let tail = 0;\n let firstSampleTS;\n\n min = min !== undefined ? min : 1000;\n\n return function push(chunkLength) {\n const now = Date.now();\n\n const startedAt = timestamps[tail];\n\n if (!firstSampleTS) {\n firstSampleTS = now;\n }\n\n bytes[head] = chunkLength;\n timestamps[head] = now;\n\n let i = tail;\n let bytesCount = 0;\n\n while (i !== head) {\n bytesCount += bytes[i++];\n i = i % samplesCount;\n }\n\n head = (head + 1) % samplesCount;\n\n if (head === tail) {\n tail = (tail + 1) % samplesCount;\n }\n\n if (now - firstSampleTS < min) {\n return;\n }\n\n const passed = startedAt && now - startedAt;\n\n return passed ? Math.round(bytesCount * 1000 / passed) : undefined;\n };\n}\n\nexport default speedometer;\n","/**\n * Throttle decorator\n * @param {Function} fn\n * @param {Number} freq\n * @return {Function}\n */\nfunction throttle(fn, freq) {\n let timestamp = 0;\n let threshold = 1000 / freq;\n let lastArgs;\n let timer;\n\n const invoke = (args, now = Date.now()) => {\n timestamp = now;\n lastArgs = null;\n if (timer) {\n clearTimeout(timer);\n timer = null;\n }\n fn.apply(null, args);\n }\n\n const throttled = (...args) => {\n const now = Date.now();\n const passed = now - timestamp;\n if ( passed >= threshold) {\n invoke(args, now);\n } else {\n lastArgs = args;\n if (!timer) {\n timer = setTimeout(() => {\n timer = null;\n invoke(lastArgs)\n }, threshold - passed);\n }\n }\n }\n\n const flush = () => lastArgs && invoke(lastArgs);\n\n return [throttled, flush];\n}\n\nexport default throttle;\n","import speedometer from \"./speedometer.js\";\nimport throttle from \"./throttle.js\";\nimport utils from \"../utils.js\";\n\nexport const progressEventReducer = (listener, isDownloadStream, freq = 3) => {\n let bytesNotified = 0;\n const _speedometer = speedometer(50, 250);\n\n return throttle(e => {\n const loaded = e.loaded;\n const total = e.lengthComputable ? e.total : undefined;\n const progressBytes = loaded - bytesNotified;\n const rate = _speedometer(progressBytes);\n const inRange = loaded <= total;\n\n bytesNotified = loaded;\n\n const data = {\n loaded,\n total,\n progress: total ? (loaded / total) : undefined,\n bytes: progressBytes,\n rate: rate ? rate : undefined,\n estimated: rate && total && inRange ? (total - loaded) / rate : undefined,\n event: e,\n lengthComputable: total != null,\n [isDownloadStream ? 'download' : 'upload']: true\n };\n\n listener(data);\n }, freq);\n}\n\nexport const progressEventDecorator = (total, throttled) => {\n const lengthComputable = total != null;\n\n return [(loaded) => throttled[0]({\n lengthComputable,\n total,\n loaded\n }), throttled[1]];\n}\n\nexport const asyncDecorator = (fn) => (...args) => utils.asap(() => fn(...args));\n","'use strict';\n\nimport utils from './../utils.js';\nimport settle from './../core/settle.js';\nimport buildFullPath from '../core/buildFullPath.js';\nimport buildURL from './../helpers/buildURL.js';\nimport proxyFromEnv from 'proxy-from-env';\nimport http from 'http';\nimport https from 'https';\nimport util from 'util';\nimport followRedirects from 'follow-redirects';\nimport zlib from 'zlib';\nimport {VERSION} from '../env/data.js';\nimport transitionalDefaults from '../defaults/transitional.js';\nimport AxiosError from '../core/AxiosError.js';\nimport CanceledError from '../cancel/CanceledError.js';\nimport platform from '../platform/index.js';\nimport fromDataURI from '../helpers/fromDataURI.js';\nimport stream from 'stream';\nimport AxiosHeaders from '../core/AxiosHeaders.js';\nimport AxiosTransformStream from '../helpers/AxiosTransformStream.js';\nimport {EventEmitter} from 'events';\nimport formDataToStream from \"../helpers/formDataToStream.js\";\nimport readBlob from \"../helpers/readBlob.js\";\nimport ZlibHeaderTransformStream from '../helpers/ZlibHeaderTransformStream.js';\nimport callbackify from \"../helpers/callbackify.js\";\nimport {progressEventReducer, progressEventDecorator, asyncDecorator} from \"../helpers/progressEventReducer.js\";\n\nconst zlibOptions = {\n flush: zlib.constants.Z_SYNC_FLUSH,\n finishFlush: zlib.constants.Z_SYNC_FLUSH\n};\n\nconst brotliOptions = {\n flush: zlib.constants.BROTLI_OPERATION_FLUSH,\n finishFlush: zlib.constants.BROTLI_OPERATION_FLUSH\n}\n\nconst isBrotliSupported = utils.isFunction(zlib.createBrotliDecompress);\n\nconst {http: httpFollow, https: httpsFollow} = followRedirects;\n\nconst isHttps = /https:?/;\n\nconst supportedProtocols = platform.protocols.map(protocol => {\n return protocol + ':';\n});\n\nconst flushOnFinish = (stream, [throttled, flush]) => {\n stream\n .on('end', flush)\n .on('error', flush);\n\n return throttled;\n}\n\n/**\n * If the proxy or config beforeRedirects functions are defined, call them with the options\n * object.\n *\n * @param {Object<string, any>} options - The options object that was passed to the request.\n *\n * @returns {Object<string, any>}\n */\nfunction dispatchBeforeRedirect(options, responseDetails) {\n if (options.beforeRedirects.proxy) {\n options.beforeRedirects.proxy(options);\n }\n if (options.beforeRedirects.config) {\n options.beforeRedirects.config(options, responseDetails);\n }\n}\n\n/**\n * If the proxy or config afterRedirects functions are defined, call them with the options\n *\n * @param {http.ClientRequestArgs} options\n * @param {AxiosProxyConfig} configProxy configuration from Axios options object\n * @param {string} location\n *\n * @returns {http.ClientRequestArgs}\n */\nfunction setProxy(options, configProxy, location) {\n let proxy = configProxy;\n if (!proxy && proxy !== false) {\n const proxyUrl = proxyFromEnv.getProxyForUrl(location);\n if (proxyUrl) {\n proxy = new URL(proxyUrl);\n }\n }\n if (proxy) {\n // Basic proxy authorization\n if (proxy.username) {\n proxy.auth = (proxy.username || '') + ':' + (proxy.password || '');\n }\n\n if (proxy.auth) {\n // Support proxy auth object form\n if (proxy.auth.username || proxy.auth.password) {\n proxy.auth = (proxy.auth.username || '') + ':' + (proxy.auth.password || '');\n }\n const base64 = Buffer\n .from(proxy.auth, 'utf8')\n .toString('base64');\n options.headers['Proxy-Authorization'] = 'Basic ' + base64;\n }\n\n options.headers.host = options.hostname + (options.port ? ':' + options.port : '');\n const proxyHost = proxy.hostname || proxy.host;\n options.hostname = proxyHost;\n // Replace 'host' since options is not a URL object\n options.host = proxyHost;\n options.port = proxy.port;\n options.path = location;\n if (proxy.protocol) {\n options.protocol = proxy.protocol.includes(':') ? proxy.protocol : `${proxy.protocol}:`;\n }\n }\n\n options.beforeRedirects.proxy = function beforeRedirect(redirectOptions) {\n // Configure proxy for redirected request, passing the original config proxy to apply\n // the exact same logic as if the redirected request was performed by axios directly.\n setProxy(redirectOptions, configProxy, redirectOptions.href);\n };\n}\n\nconst isHttpAdapterSupported = typeof process !== 'undefined' && utils.kindOf(process) === 'process';\n\n// temporary hotfix\n\nconst wrapAsync = (asyncExecutor) => {\n return new Promise((resolve, reject) => {\n let onDone;\n let isDone;\n\n const done = (value, isRejected) => {\n if (isDone) return;\n isDone = true;\n onDone && onDone(value, isRejected);\n }\n\n const _resolve = (value) => {\n done(value);\n resolve(value);\n };\n\n const _reject = (reason) => {\n done(reason, true);\n reject(reason);\n }\n\n asyncExecutor(_resolve, _reject, (onDoneHandler) => (onDone = onDoneHandler)).catch(_reject);\n })\n};\n\nconst resolveFamily = ({address, family}) => {\n if (!utils.isString(address)) {\n throw TypeError('address must be a string');\n }\n return ({\n address,\n family: family || (address.indexOf('.') < 0 ? 6 : 4)\n });\n}\n\nconst buildAddressEntry = (address, family) => resolveFamily(utils.isObject(address) ? address : {address, family});\n\n/*eslint consistent-return:0*/\nexport default isHttpAdapterSupported && function httpAdapter(config) {\n return wrapAsync(async function dispatchHttpRequest(resolve, reject, onDone) {\n let {data, lookup, family} = config;\n const {responseType, responseEncoding} = config;\n const method = config.method.toUpperCase();\n let isDone;\n let rejected = false;\n let req;\n\n if (lookup) {\n const _lookup = callbackify(lookup, (value) => utils.isArray(value) ? value : [value]);\n // hotfix to support opt.all option which is required for node 20.x\n lookup = (hostname, opt, cb) => {\n _lookup(hostname, opt, (err, arg0, arg1) => {\n if (err) {\n return cb(err);\n }\n\n const addresses = utils.isArray(arg0) ? arg0.map(addr => buildAddressEntry(addr)) : [buildAddressEntry(arg0, arg1)];\n\n opt.all ? cb(err, addresses) : cb(err, addresses[0].address, addresses[0].family);\n });\n }\n }\n\n // temporary internal emitter until the AxiosRequest class will be implemented\n const emitter = new EventEmitter();\n\n const onFinished = () => {\n if (config.cancelToken) {\n config.cancelToken.unsubscribe(abort);\n }\n\n if (config.signal) {\n config.signal.removeEventListener('abort', abort);\n }\n\n emitter.removeAllListeners();\n }\n\n onDone((value, isRejected) => {\n isDone = true;\n if (isRejected) {\n rejected = true;\n onFinished();\n }\n });\n\n function abort(reason) {\n emitter.emit('abort', !reason || reason.type ? new CanceledError(null, config, req) : reason);\n }\n\n emitter.once('abort', reject);\n\n if (config.cancelToken || config.signal) {\n config.cancelToken && config.cancelToken.subscribe(abort);\n if (config.signal) {\n config.signal.aborted ? abort() : config.signal.addEventListener('abort', abort);\n }\n }\n\n // Parse url\n const fullPath = buildFullPath(config.baseURL, config.url, config.allowAbsoluteUrls);\n const parsed = new URL(fullPath, platform.hasBrowserEnv ? platform.origin : undefined);\n const protocol = parsed.protocol || supportedProtocols[0];\n\n if (protocol === 'data:') {\n let convertedData;\n\n if (method !== 'GET') {\n return settle(resolve, reject, {\n status: 405,\n statusText: 'method not allowed',\n headers: {},\n config\n });\n }\n\n try {\n convertedData = fromDataURI(config.url, responseType === 'blob', {\n Blob: config.env && config.env.Blob\n });\n } catch (err) {\n throw AxiosError.from(err, AxiosError.ERR_BAD_REQUEST, config);\n }\n\n if (responseType === 'text') {\n convertedData = convertedData.toString(responseEncoding);\n\n if (!responseEncoding || responseEncoding === 'utf8') {\n convertedData = utils.stripBOM(convertedData);\n }\n } else if (responseType === 'stream') {\n convertedData = stream.Readable.from(convertedData);\n }\n\n return settle(resolve, reject, {\n data: convertedData,\n status: 200,\n statusText: 'OK',\n headers: new AxiosHeaders(),\n config\n });\n }\n\n if (supportedProtocols.indexOf(protocol) === -1) {\n return reject(new AxiosError(\n 'Unsupported protocol ' + protocol,\n AxiosError.ERR_BAD_REQUEST,\n config\n ));\n }\n\n const headers = AxiosHeaders.from(config.headers).normalize();\n\n // Set User-Agent (required by some servers)\n // See https://github.com/axios/axios/issues/69\n // User-Agent is specified; handle case where no UA header is desired\n // Only set header if it hasn't been set in config\n headers.set('User-Agent', 'axios/' + VERSION, false);\n\n const {onUploadProgress, onDownloadProgress} = config;\n const maxRate = config.maxRate;\n let maxUploadRate = undefined;\n let maxDownloadRate = undefined;\n\n // support for spec compliant FormData objects\n if (utils.isSpecCompliantForm(data)) {\n const userBoundary = headers.getContentType(/boundary=([-_\\w\\d]{10,70})/i);\n\n data = formDataToStream(data, (formHeaders) => {\n headers.set(formHeaders);\n }, {\n tag: `axios-${VERSION}-boundary`,\n boundary: userBoundary && userBoundary[1] || undefined\n });\n // support for https://www.npmjs.com/package/form-data api\n } else if (utils.isFormData(data) && utils.isFunction(data.getHeaders)) {\n headers.set(data.getHeaders());\n\n if (!headers.hasContentLength()) {\n try {\n const knownLength = await util.promisify(data.getLength).call(data);\n Number.isFinite(knownLength) && knownLength >= 0 && headers.setContentLength(knownLength);\n /*eslint no-empty:0*/\n } catch (e) {\n }\n }\n } else if (utils.isBlob(data) || utils.isFile(data)) {\n data.size && headers.setContentType(data.type || 'application/octet-stream');\n headers.setContentLength(data.size || 0);\n data = stream.Readable.from(readBlob(data));\n } else if (data && !utils.isStream(data)) {\n if (Buffer.isBuffer(data)) {\n // Nothing to do...\n } else if (utils.isArrayBuffer(data)) {\n data = Buffer.from(new Uint8Array(data));\n } else if (utils.isString(data)) {\n data = Buffer.from(data, 'utf-8');\n } else {\n return reject(new AxiosError(\n 'Data after transformation must be a string, an ArrayBuffer, a Buffer, or a Stream',\n AxiosError.ERR_BAD_REQUEST,\n config\n ));\n }\n\n // Add Content-Length header if data exists\n headers.setContentLength(data.length, false);\n\n if (config.maxBodyLength > -1 && data.length > config.maxBodyLength) {\n return reject(new AxiosError(\n 'Request body larger than maxBodyLength limit',\n AxiosError.ERR_BAD_REQUEST,\n config\n ));\n }\n }\n\n const contentLength = utils.toFiniteNumber(headers.getContentLength());\n\n if (utils.isArray(maxRate)) {\n maxUploadRate = maxRate[0];\n maxDownloadRate = maxRate[1];\n } else {\n maxUploadRate = maxDownloadRate = maxRate;\n }\n\n if (data && (onUploadProgress || maxUploadRate)) {\n if (!utils.isStream(data)) {\n data = stream.Readable.from(data, {objectMode: false});\n }\n\n data = stream.pipeline([data, new AxiosTransformStream({\n maxRate: utils.toFiniteNumber(maxUploadRate)\n })], utils.noop);\n\n onUploadProgress && data.on('progress', flushOnFinish(\n data,\n progressEventDecorator(\n contentLength,\n progressEventReducer(asyncDecorator(onUploadProgress), false, 3)\n )\n ));\n }\n\n // HTTP basic authentication\n let auth = undefined;\n if (config.auth) {\n const username = config.auth.username || '';\n const password = config.auth.password || '';\n auth = username + ':' + password;\n }\n\n if (!auth && parsed.username) {\n const urlUsername = parsed.username;\n const urlPassword = parsed.password;\n auth = urlUsername + ':' + urlPassword;\n }\n\n auth && headers.delete('authorization');\n\n let path;\n\n try {\n path = buildURL(\n parsed.pathname + parsed.search,\n config.params,\n config.paramsSerializer\n ).replace(/^\\?/, '');\n } catch (err) {\n const customErr = new Error(err.message);\n customErr.config = config;\n customErr.url = config.url;\n customErr.exists = true;\n return reject(customErr);\n }\n\n headers.set(\n 'Accept-Encoding',\n 'gzip, compress, deflate' + (isBrotliSupported ? ', br' : ''), false\n );\n\n const options = {\n path,\n method: method,\n headers: headers.toJSON(),\n agents: { http: config.httpAgent, https: config.httpsAgent },\n auth,\n protocol,\n family,\n beforeRedirect: dispatchBeforeRedirect,\n beforeRedirects: {}\n };\n\n // cacheable-lookup integration hotfix\n !utils.isUndefined(lookup) && (options.lookup = lookup);\n\n if (config.socketPath) {\n options.socketPath = config.socketPath;\n } else {\n options.hostname = parsed.hostname.startsWith(\"[\") ? parsed.hostname.slice(1, -1) : parsed.hostname;\n options.port = parsed.port;\n setProxy(options, config.proxy, protocol + '//' + parsed.hostname + (parsed.port ? ':' + parsed.port : '') + options.path);\n }\n\n let transport;\n const isHttpsRequest = isHttps.test(options.protocol);\n options.agent = isHttpsRequest ? config.httpsAgent : config.httpAgent;\n if (config.transport) {\n transport = config.transport;\n } else if (config.maxRedirects === 0) {\n transport = isHttpsRequest ? https : http;\n } else {\n if (config.maxRedirects) {\n options.maxRedirects = config.maxRedirects;\n }\n if (config.beforeRedirect) {\n options.beforeRedirects.config = config.beforeRedirect;\n }\n transport = isHttpsRequest ? httpsFollow : httpFollow;\n }\n\n if (config.maxBodyLength > -1) {\n options.maxBodyLength = config.maxBodyLength;\n } else {\n // follow-redirects does not skip comparison, so it should always succeed for axios -1 unlimited\n options.maxBodyLength = Infinity;\n }\n\n if (config.insecureHTTPParser) {\n options.insecureHTTPParser = config.insecureHTTPParser;\n }\n\n // Create the request\n req = transport.request(options, function handleResponse(res) {\n if (req.destroyed) return;\n\n const streams = [res];\n\n const responseLength = +res.headers['content-length'];\n\n if (onDownloadProgress || maxDownloadRate) {\n const transformStream = new AxiosTransformStream({\n maxRate: utils.toFiniteNumber(maxDownloadRate)\n });\n\n onDownloadProgress && transformStream.on('progress', flushOnFinish(\n transformStream,\n progressEventDecorator(\n responseLength,\n progressEventReducer(asyncDecorator(onDownloadProgress), true, 3)\n )\n ));\n\n streams.push(transformStream);\n }\n\n // decompress the response body transparently if required\n let responseStream = res;\n\n // return the last request in case of redirects\n const lastRequest = res.req || req;\n\n // if decompress disabled we should not decompress\n if (config.decompress !== false && res.headers['content-encoding']) {\n // if no content, but headers still say that it is encoded,\n // remove the header not confuse downstream operations\n if (method === 'HEAD' || res.statusCode === 204) {\n delete res.headers['content-encoding'];\n }\n\n switch ((res.headers['content-encoding'] || '').toLowerCase()) {\n /*eslint default-case:0*/\n case 'gzip':\n case 'x-gzip':\n case 'compress':\n case 'x-compress':\n // add the unzipper to the body stream processing pipeline\n streams.push(zlib.createUnzip(zlibOptions));\n\n // remove the content-encoding in order to not confuse downstream operations\n delete res.headers['content-encoding'];\n break;\n case 'deflate':\n streams.push(new ZlibHeaderTransformStream());\n\n // add the unzipper to the body stream processing pipeline\n streams.push(zlib.createUnzip(zlibOptions));\n\n // remove the content-encoding in order to not confuse downstream operations\n delete res.headers['content-encoding'];\n break;\n case 'br':\n if (isBrotliSupported) {\n streams.push(zlib.createBrotliDecompress(brotliOptions));\n delete res.headers['content-encoding'];\n }\n }\n }\n\n responseStream = streams.length > 1 ? stream.pipeline(streams, utils.noop) : streams[0];\n\n const offListeners = stream.finished(responseStream, () => {\n offListeners();\n onFinished();\n });\n\n const response = {\n status: res.statusCode,\n statusText: res.statusMessage,\n headers: new AxiosHeaders(res.headers),\n config,\n request: lastRequest\n };\n\n if (responseType === 'stream') {\n response.data = responseStream;\n settle(resolve, reject, response);\n } else {\n const responseBuffer = [];\n let totalResponseBytes = 0;\n\n responseStream.on('data', function handleStreamData(chunk) {\n responseBuffer.push(chunk);\n totalResponseBytes += chunk.length;\n\n // make sure the content length is not over the maxContentLength if specified\n if (config.maxContentLength > -1 && totalResponseBytes > config.maxContentLength) {\n // stream.destroy() emit aborted event before calling reject() on Node.js v16\n rejected = true;\n responseStream.destroy();\n reject(new AxiosError('maxContentLength size of ' + config.maxContentLength + ' exceeded',\n AxiosError.ERR_BAD_RESPONSE, config, lastRequest));\n }\n });\n\n responseStream.on('aborted', function handlerStreamAborted() {\n if (rejected) {\n return;\n }\n\n const err = new AxiosError(\n 'stream has been aborted',\n AxiosError.ERR_BAD_RESPONSE,\n config,\n lastRequest\n );\n responseStream.destroy(err);\n reject(err);\n });\n\n responseStream.on('error', function handleStreamError(err) {\n if (req.destroyed) return;\n reject(AxiosError.from(err, null, config, lastRequest));\n });\n\n responseStream.on('end', function handleStreamEnd() {\n try {\n let responseData = responseBuffer.length === 1 ? responseBuffer[0] : Buffer.concat(responseBuffer);\n if (responseType !== 'arraybuffer') {\n responseData = responseData.toString(responseEncoding);\n if (!responseEncoding || responseEncoding === 'utf8') {\n responseData = utils.stripBOM(responseData);\n }\n }\n response.data = responseData;\n } catch (err) {\n return reject(AxiosError.from(err, null, config, response.request, response));\n }\n settle(resolve, reject, response);\n });\n }\n\n emitter.once('abort', err => {\n if (!responseStream.destroyed) {\n responseStream.emit('error', err);\n responseStream.destroy();\n }\n });\n });\n\n emitter.once('abort', err => {\n reject(err);\n req.destroy(err);\n });\n\n // Handle errors\n req.on('error', function handleRequestError(err) {\n // @todo remove\n // if (req.aborted && err.code !== AxiosError.ERR_FR_TOO_MANY_REDIRECTS) return;\n reject(AxiosError.from(err, null, config, req));\n });\n\n // set tcp keep alive to prevent drop connection by peer\n req.on('socket', function handleRequestSocket(socket) {\n // default interval of sending ack packet is 1 minute\n socket.setKeepAlive(true, 1000 * 60);\n });\n\n // Handle request timeout\n if (config.timeout) {\n // This is forcing a int timeout to avoid problems if the `req` interface doesn't handle other types.\n const timeout = parseInt(config.timeout, 10);\n\n if (Number.isNaN(timeout)) {\n reject(new AxiosError(\n 'error trying to parse `config.timeout` to int',\n AxiosError.ERR_BAD_OPTION_VALUE,\n config,\n req\n ));\n\n return;\n }\n\n // Sometime, the response will be very slow, and does not respond, the connect event will be block by event loop system.\n // And timer callback will be fired, and abort() will be invoked before connection, then get \"socket hang up\" and code ECONNRESET.\n // At this time, if we have a large number of request, nodejs will hang up some socket on background. and the number will up and up.\n // And then these socket which be hang up will devouring CPU little by little.\n // ClientRequest.setTimeout will be fired on the specify milliseconds, and can make sure that abort() will be fired after connect.\n req.setTimeout(timeout, function handleRequestTimeout() {\n if (isDone) return;\n let timeoutErrorMessage = config.timeout ? 'timeout of ' + config.timeout + 'ms exceeded' : 'timeout exceeded';\n const transitional = config.transitional || transitionalDefaults;\n if (config.timeoutErrorMessage) {\n timeoutErrorMessage = config.timeoutErrorMessage;\n }\n reject(new AxiosError(\n timeoutErrorMessage,\n transitional.clarifyTimeoutError ? AxiosError.ETIMEDOUT : AxiosError.ECONNABORTED,\n config,\n req\n ));\n abort();\n });\n }\n\n\n // Send the request\n if (utils.isStream(data)) {\n let ended = false;\n let errored = false;\n\n data.on('end', () => {\n ended = true;\n });\n\n data.once('error', err => {\n errored = true;\n req.destroy(err);\n });\n\n data.on('close', () => {\n if (!ended && !errored) {\n abort(new CanceledError('Request stream has been aborted', config, req));\n }\n });\n\n data.pipe(req);\n } else {\n req.end(data);\n }\n });\n}\n\nexport const __setProxy = setProxy;\n","import platform from '../platform/index.js';\n\nexport default platform.hasStandardBrowserEnv ? ((origin, isMSIE) => (url) => {\n url = new URL(url, platform.origin);\n\n return (\n origin.protocol === url.protocol &&\n origin.host === url.host &&\n (isMSIE || origin.port === url.port)\n );\n})(\n new URL(platform.origin),\n platform.navigator && /(msie|trident)/i.test(platform.navigator.userAgent)\n) : () => true;\n","import utils from './../utils.js';\nimport platform from '../platform/index.js';\n\nexport default platform.hasStandardBrowserEnv ?\n\n // Standard browser envs support document.cookie\n {\n write(name, value, expires, path, domain, secure) {\n const cookie = [name + '=' + encodeURIComponent(value)];\n\n utils.isNumber(expires) && cookie.push('expires=' + new Date(expires).toGMTString());\n\n utils.isString(path) && cookie.push('path=' + path);\n\n utils.isString(domain) && cookie.push('domain=' + domain);\n\n secure === true && cookie.push('secure');\n\n document.cookie = cookie.join('; ');\n },\n\n read(name) {\n const match = document.cookie.match(new RegExp('(^|;\\\\s*)(' + name + ')=([^;]*)'));\n return (match ? decodeURIComponent(match[3]) : null);\n },\n\n remove(name) {\n this.write(name, '', Date.now() - 86400000);\n }\n }\n\n :\n\n // Non-standard browser env (web workers, react-native) lack needed support.\n {\n write() {},\n read() {\n return null;\n },\n remove() {}\n };\n\n","'use strict';\n\nimport utils from '../utils.js';\nimport AxiosHeaders from \"./AxiosHeaders.js\";\n\nconst headersToObject = (thing) => thing instanceof AxiosHeaders ? { ...thing } : thing;\n\n/**\n * Config-specific merge-function which creates a new config-object\n * by merging two configuration objects together.\n *\n * @param {Object} config1\n * @param {Object} config2\n *\n * @returns {Object} New object resulting from merging config2 to config1\n */\nexport default function mergeConfig(config1, config2) {\n // eslint-disable-next-line no-param-reassign\n config2 = config2 || {};\n const config = {};\n\n function getMergedValue(target, source, prop, caseless) {\n if (utils.isPlainObject(target) && utils.isPlainObject(source)) {\n return utils.merge.call({caseless}, target, source);\n } else if (utils.isPlainObject(source)) {\n return utils.merge({}, source);\n } else if (utils.isArray(source)) {\n return source.slice();\n }\n return source;\n }\n\n // eslint-disable-next-line consistent-return\n function mergeDeepProperties(a, b, prop , caseless) {\n if (!utils.isUndefined(b)) {\n return getMergedValue(a, b, prop , caseless);\n } else if (!utils.isUndefined(a)) {\n return getMergedValue(undefined, a, prop , caseless);\n }\n }\n\n // eslint-disable-next-line consistent-return\n function valueFromConfig2(a, b) {\n if (!utils.isUndefined(b)) {\n return getMergedValue(undefined, b);\n }\n }\n\n // eslint-disable-next-line consistent-return\n function defaultToConfig2(a, b) {\n if (!utils.isUndefined(b)) {\n return getMergedValue(undefined, b);\n } else if (!utils.isUndefined(a)) {\n return getMergedValue(undefined, a);\n }\n }\n\n // eslint-disable-next-line consistent-return\n function mergeDirectKeys(a, b, prop) {\n if (prop in config2) {\n return getMergedValue(a, b);\n } else if (prop in config1) {\n return getMergedValue(undefined, a);\n }\n }\n\n const mergeMap = {\n url: valueFromConfig2,\n method: valueFromConfig2,\n data: valueFromConfig2,\n baseURL: defaultToConfig2,\n transformRequest: defaultToConfig2,\n transformResponse: defaultToConfig2,\n paramsSerializer: defaultToConfig2,\n timeout: defaultToConfig2,\n timeoutMessage: defaultToConfig2,\n withCredentials: defaultToConfig2,\n withXSRFToken: defaultToConfig2,\n adapter: defaultToConfig2,\n responseType: defaultToConfig2,\n xsrfCookieName: defaultToConfig2,\n xsrfHeaderName: defaultToConfig2,\n onUploadProgress: defaultToConfig2,\n onDownloadProgress: defaultToConfig2,\n decompress: defaultToConfig2,\n maxContentLength: defaultToConfig2,\n maxBodyLength: defaultToConfig2,\n beforeRedirect: defaultToConfig2,\n transport: defaultToConfig2,\n httpAgent: defaultToConfig2,\n httpsAgent: defaultToConfig2,\n cancelToken: defaultToConfig2,\n socketPath: defaultToConfig2,\n responseEncoding: defaultToConfig2,\n validateStatus: mergeDirectKeys,\n headers: (a, b , prop) => mergeDeepProperties(headersToObject(a), headersToObject(b),prop, true)\n };\n\n utils.forEach(Object.keys(Object.assign({}, config1, config2)), function computeConfigValue(prop) {\n const merge = mergeMap[prop] || mergeDeepProperties;\n const configValue = merge(config1[prop], config2[prop], prop);\n (utils.isUndefined(configValue) && merge !== mergeDirectKeys) || (config[prop] = configValue);\n });\n\n return config;\n}\n","import platform from \"../platform/index.js\";\nimport utils from \"../utils.js\";\nimport isURLSameOrigin from \"./isURLSameOrigin.js\";\nimport cookies from \"./cookies.js\";\nimport buildFullPath from \"../core/buildFullPath.js\";\nimport mergeConfig from \"../core/mergeConfig.js\";\nimport AxiosHeaders from \"../core/AxiosHeaders.js\";\nimport buildURL from \"./buildURL.js\";\n\nexport default (config) => {\n const newConfig = mergeConfig({}, config);\n\n let {data, withXSRFToken, xsrfHeaderName, xsrfCookieName, headers, auth} = newConfig;\n\n newConfig.headers = headers = AxiosHeaders.from(headers);\n\n newConfig.url = buildURL(buildFullPath(newConfig.baseURL, newConfig.url, newConfig.allowAbsoluteUrls), config.params, config.paramsSerializer);\n\n // HTTP basic authentication\n if (auth) {\n headers.set('Authorization', 'Basic ' +\n btoa((auth.username || '') + ':' + (auth.password ? unescape(encodeURIComponent(auth.password)) : ''))\n );\n }\n\n let contentType;\n\n if (utils.isFormData(data)) {\n if (platform.hasStandardBrowserEnv || platform.hasStandardBrowserWebWorkerEnv) {\n headers.setContentType(undefined); // Let the browser set it\n } else if ((contentType = headers.getContentType()) !== false) {\n // fix semicolon duplication issue for ReactNative FormData implementation\n const [type, ...tokens] = contentType ? contentType.split(';').map(token => token.trim()).filter(Boolean) : [];\n headers.setContentType([type || 'multipart/form-data', ...tokens].join('; '));\n }\n }\n\n // Add xsrf header\n // This is only done if running in a standard browser environment.\n // Specifically not if we're in a web worker, or react-native.\n\n if (platform.hasStandardBrowserEnv) {\n withXSRFToken && utils.isFunction(withXSRFToken) && (withXSRFToken = withXSRFToken(newConfig));\n\n if (withXSRFToken || (withXSRFToken !== false && isURLSameOrigin(newConfig.url))) {\n // Add xsrf header\n const xsrfValue = xsrfHeaderName && xsrfCookieName && cookies.read(xsrfCookieName);\n\n if (xsrfValue) {\n headers.set(xsrfHeaderName, xsrfValue);\n }\n }\n }\n\n return newConfig;\n}\n\n","import utils from './../utils.js';\nimport settle from './../core/settle.js';\nimport transitionalDefaults from '../defaults/transitional.js';\nimport AxiosError from '../core/AxiosError.js';\nimport CanceledError from '../cancel/CanceledError.js';\nimport parseProtocol from '../helpers/parseProtocol.js';\nimport platform from '../platform/index.js';\nimport AxiosHeaders from '../core/AxiosHeaders.js';\nimport {progressEventReducer} from '../helpers/progressEventReducer.js';\nimport resolveConfig from \"../helpers/resolveConfig.js\";\n\nconst isXHRAdapterSupported = typeof XMLHttpRequest !== 'undefined';\n\nexport default isXHRAdapterSupported && function (config) {\n return new Promise(function dispatchXhrRequest(resolve, reject) {\n const _config = resolveConfig(config);\n let requestData = _config.data;\n const requestHeaders = AxiosHeaders.from(_config.headers).normalize();\n let {responseType, onUploadProgress, onDownloadProgress} = _config;\n let onCanceled;\n let uploadThrottled, downloadThrottled;\n let flushUpload, flushDownload;\n\n function done() {\n flushUpload && flushUpload(); // flush events\n flushDownload && flushDownload(); // flush events\n\n _config.cancelToken && _config.cancelToken.unsubscribe(onCanceled);\n\n _config.signal && _config.signal.removeEventListener('abort', onCanceled);\n }\n\n let request = new XMLHttpRequest();\n\n request.open(_config.method.toUpperCase(), _config.url, true);\n\n // Set the request timeout in MS\n request.timeout = _config.timeout;\n\n function onloadend() {\n if (!request) {\n return;\n }\n // Prepare the response\n const responseHeaders = AxiosHeaders.from(\n 'getAllResponseHeaders' in request && request.getAllResponseHeaders()\n );\n const responseData = !responseType || responseType === 'text' || responseType === 'json' ?\n request.responseText : request.response;\n const response = {\n data: responseData,\n status: request.status,\n statusText: request.statusText,\n headers: responseHeaders,\n config,\n request\n };\n\n settle(function _resolve(value) {\n resolve(value);\n done();\n }, function _reject(err) {\n reject(err);\n done();\n }, response);\n\n // Clean up request\n request = null;\n }\n\n if ('onloadend' in request) {\n // Use onloadend if available\n request.onloadend = onloadend;\n } else {\n // Listen for ready state to emulate onloadend\n request.onreadystatechange = function handleLoad() {\n if (!request || request.readyState !== 4) {\n return;\n }\n\n // The request errored out and we didn't get a response, this will be\n // handled by onerror instead\n // With one exception: request that using file: protocol, most browsers\n // will return status as 0 even though it's a successful request\n if (request.status === 0 && !(request.responseURL && request.responseURL.indexOf('file:') === 0)) {\n return;\n }\n // readystate handler is calling before onerror or ontimeout handlers,\n // so we should call onloadend on the next 'tick'\n setTimeout(onloadend);\n };\n }\n\n // Handle browser request cancellation (as opposed to a manual cancellation)\n request.onabort = function handleAbort() {\n if (!request) {\n return;\n }\n\n reject(new AxiosError('Request aborted', AxiosError.ECONNABORTED, config, request));\n\n // Clean up request\n request = null;\n };\n\n // Handle low level network errors\n request.onerror = function handleError() {\n // Real errors are hidden from us by the browser\n // onerror should only fire if it's a network error\n reject(new AxiosError('Network Error', AxiosError.ERR_NETWORK, config, request));\n\n // Clean up request\n request = null;\n };\n\n // Handle timeout\n request.ontimeout = function handleTimeout() {\n let timeoutErrorMessage = _config.timeout ? 'timeout of ' + _config.timeout + 'ms exceeded' : 'timeout exceeded';\n const transitional = _config.transitional || transitionalDefaults;\n if (_config.timeoutErrorMessage) {\n timeoutErrorMessage = _config.timeoutErrorMessage;\n }\n reject(new AxiosError(\n timeoutErrorMessage,\n transitional.clarifyTimeoutError ? AxiosError.ETIMEDOUT : AxiosError.ECONNABORTED,\n config,\n request));\n\n // Clean up request\n request = null;\n };\n\n // Remove Content-Type if data is undefined\n requestData === undefined && requestHeaders.setContentType(null);\n\n // Add headers to the request\n if ('setRequestHeader' in request) {\n utils.forEach(requestHeaders.toJSON(), function setRequestHeader(val, key) {\n request.setRequestHeader(key, val);\n });\n }\n\n // Add withCredentials to request if needed\n if (!utils.isUndefined(_config.withCredentials)) {\n request.withCredentials = !!_config.withCredentials;\n }\n\n // Add responseType to request if needed\n if (responseType && responseType !== 'json') {\n request.responseType = _config.responseType;\n }\n\n // Handle progress if needed\n if (onDownloadProgress) {\n ([downloadThrottled, flushDownload] = progressEventReducer(onDownloadProgress, true));\n request.addEventListener('progress', downloadThrottled);\n }\n\n // Not all browsers support upload events\n if (onUploadProgress && request.upload) {\n ([uploadThrottled, flushUpload] = progressEventReducer(onUploadProgress));\n\n request.upload.addEventListener('progress', uploadThrottled);\n\n request.upload.addEventListener('loadend', flushUpload);\n }\n\n if (_config.cancelToken || _config.signal) {\n // Handle cancellation\n // eslint-disable-next-line func-names\n onCanceled = cancel => {\n if (!request) {\n return;\n }\n reject(!cancel || cancel.type ? new CanceledError(null, config, request) : cancel);\n request.abort();\n request = null;\n };\n\n _config.cancelToken && _config.cancelToken.subscribe(onCanceled);\n if (_config.signal) {\n _config.signal.aborted ? onCanceled() : _config.signal.addEventListener('abort', onCanceled);\n }\n }\n\n const protocol = parseProtocol(_config.url);\n\n if (protocol && platform.protocols.indexOf(protocol) === -1) {\n reject(new AxiosError('Unsupported protocol ' + protocol + ':', AxiosError.ERR_BAD_REQUEST, config));\n return;\n }\n\n\n // Send the request\n request.send(requestData || null);\n });\n}\n","import CanceledError from \"../cancel/CanceledError.js\";\nimport AxiosError from \"../core/AxiosError.js\";\nimport utils from '../utils.js';\n\nconst composeSignals = (signals, timeout) => {\n const {length} = (signals = signals ? signals.filter(Boolean) : []);\n\n if (timeout || length) {\n let controller = new AbortController();\n\n let aborted;\n\n const onabort = function (reason) {\n if (!aborted) {\n aborted = true;\n unsubscribe();\n const err = reason instanceof Error ? reason : this.reason;\n controller.abort(err instanceof AxiosError ? err : new CanceledError(err instanceof Error ? err.message : err));\n }\n }\n\n let timer = timeout && setTimeout(() => {\n timer = null;\n onabort(new AxiosError(`timeout ${timeout} of ms exceeded`, AxiosError.ETIMEDOUT))\n }, timeout)\n\n const unsubscribe = () => {\n if (signals) {\n timer && clearTimeout(timer);\n timer = null;\n signals.forEach(signal => {\n signal.unsubscribe ? signal.unsubscribe(onabort) : signal.removeEventListener('abort', onabort);\n });\n signals = null;\n }\n }\n\n signals.forEach((signal) => signal.addEventListener('abort', onabort));\n\n const {signal} = controller;\n\n signal.unsubscribe = () => utils.asap(unsubscribe);\n\n return signal;\n }\n}\n\nexport default composeSignals;\n","\nexport const streamChunk = function* (chunk, chunkSize) {\n let len = chunk.byteLength;\n\n if (!chunkSize || len < chunkSize) {\n yield chunk;\n return;\n }\n\n let pos = 0;\n let end;\n\n while (pos < len) {\n end = pos + chunkSize;\n yield chunk.slice(pos, end);\n pos = end;\n }\n}\n\nexport const readBytes = async function* (iterable, chunkSize) {\n for await (const chunk of readStream(iterable)) {\n yield* streamChunk(chunk, chunkSize);\n }\n}\n\nconst readStream = async function* (stream) {\n if (stream[Symbol.asyncIterator]) {\n yield* stream;\n return;\n }\n\n const reader = stream.getReader();\n try {\n for (;;) {\n const {done, value} = await reader.read();\n if (done) {\n break;\n }\n yield value;\n }\n } finally {\n await reader.cancel();\n }\n}\n\nexport const trackStream = (stream, chunkSize, onProgress, onFinish) => {\n const iterator = readBytes(stream, chunkSize);\n\n let bytes = 0;\n let done;\n let _onFinish = (e) => {\n if (!done) {\n done = true;\n onFinish && onFinish(e);\n }\n }\n\n return new ReadableStream({\n async pull(controller) {\n try {\n const {done, value} = await iterator.next();\n\n if (done) {\n _onFinish();\n controller.close();\n return;\n }\n\n let len = value.byteLength;\n if (onProgress) {\n let loadedBytes = bytes += len;\n onProgress(loadedBytes);\n }\n controller.enqueue(new Uint8Array(value));\n } catch (err) {\n _onFinish(err);\n throw err;\n }\n },\n cancel(reason) {\n _onFinish(reason);\n return iterator.return();\n }\n }, {\n highWaterMark: 2\n })\n}\n","import platform from \"../platform/index.js\";\nimport utils from \"../utils.js\";\nimport AxiosError from \"../core/AxiosError.js\";\nimport composeSignals from \"../helpers/composeSignals.js\";\nimport {trackStream} from \"../helpers/trackStream.js\";\nimport AxiosHeaders from \"../core/AxiosHeaders.js\";\nimport {progressEventReducer, progressEventDecorator, asyncDecorator} from \"../helpers/progressEventReducer.js\";\nimport resolveConfig from \"../helpers/resolveConfig.js\";\nimport settle from \"../core/settle.js\";\n\nconst isFetchSupported = typeof fetch === 'function' && typeof Request === 'function' && typeof Response === 'function';\nconst isReadableStreamSupported = isFetchSupported && typeof ReadableStream === 'function';\n\n// used only inside the fetch adapter\nconst encodeText = isFetchSupported && (typeof TextEncoder === 'function' ?\n ((encoder) => (str) => encoder.encode(str))(new TextEncoder()) :\n async (str) => new Uint8Array(await new Response(str).arrayBuffer())\n);\n\nconst test = (fn, ...args) => {\n try {\n return !!fn(...args);\n } catch (e) {\n return false\n }\n}\n\nconst supportsRequestStream = isReadableStreamSupported && test(() => {\n let duplexAccessed = false;\n\n const hasContentType = new Request(platform.origin, {\n body: new ReadableStream(),\n method: 'POST',\n get duplex() {\n duplexAccessed = true;\n return 'half';\n },\n }).headers.has('Content-Type');\n\n return duplexAccessed && !hasContentType;\n});\n\nconst DEFAULT_CHUNK_SIZE = 64 * 1024;\n\nconst supportsResponseStream = isReadableStreamSupported &&\n test(() => utils.isReadableStream(new Response('').body));\n\n\nconst resolvers = {\n stream: supportsResponseStream && ((res) => res.body)\n};\n\nisFetchSupported && (((res) => {\n ['text', 'arrayBuffer', 'blob', 'formData', 'stream'].forEach(type => {\n !resolvers[type] && (resolvers[type] = utils.isFunction(res[type]) ? (res) => res[type]() :\n (_, config) => {\n throw new AxiosError(`Response type '${type}' is not supported`, AxiosError.ERR_NOT_SUPPORT, config);\n })\n });\n})(new Response));\n\nconst getBodyLength = async (body) => {\n if (body == null) {\n return 0;\n }\n\n if(utils.isBlob(body)) {\n return body.size;\n }\n\n if(utils.isSpecCompliantForm(body)) {\n const _request = new Request(platform.origin, {\n method: 'POST',\n body,\n });\n return (await _request.arrayBuffer()).byteLength;\n }\n\n if(utils.isArrayBufferView(body) || utils.isArrayBuffer(body)) {\n return body.byteLength;\n }\n\n if(utils.isURLSearchParams(body)) {\n body = body + '';\n }\n\n if(utils.isString(body)) {\n return (await encodeText(body)).byteLength;\n }\n}\n\nconst resolveBodyLength = async (headers, body) => {\n const length = utils.toFiniteNumber(headers.getContentLength());\n\n return length == null ? getBodyLength(body) : length;\n}\n\nexport default isFetchSupported && (async (config) => {\n let {\n url,\n method,\n data,\n signal,\n cancelToken,\n timeout,\n onDownloadProgress,\n onUploadProgress,\n responseType,\n headers,\n withCredentials = 'same-origin',\n fetchOptions\n } = resolveConfig(config);\n\n responseType = responseType ? (responseType + '').toLowerCase() : 'text';\n\n let composedSignal = composeSignals([signal, cancelToken && cancelToken.toAbortSignal()], timeout);\n\n let request;\n\n const unsubscribe = composedSignal && composedSignal.unsubscribe && (() => {\n composedSignal.unsubscribe();\n });\n\n let requestContentLength;\n\n try {\n if (\n onUploadProgress && supportsRequestStream && method !== 'get' && method !== 'head' &&\n (requestContentLength = await resolveBodyLength(headers, data)) !== 0\n ) {\n let _request = new Request(url, {\n method: 'POST',\n body: data,\n duplex: \"half\"\n });\n\n let contentTypeHeader;\n\n if (utils.isFormData(data) && (contentTypeHeader = _request.headers.get('content-type'))) {\n headers.setContentType(contentTypeHeader)\n }\n\n if (_request.body) {\n const [onProgress, flush] = progressEventDecorator(\n requestContentLength,\n progressEventReducer(asyncDecorator(onUploadProgress))\n );\n\n data = trackStream(_request.body, DEFAULT_CHUNK_SIZE, onProgress, flush);\n }\n }\n\n if (!utils.isString(withCredentials)) {\n withCredentials = withCredentials ? 'include' : 'omit';\n }\n\n // Cloudflare Workers throws when credentials are defined\n // see https://github.com/cloudflare/workerd/issues/902\n const isCredentialsSupported = \"credentials\" in Request.prototype;\n request = new Request(url, {\n ...fetchOptions,\n signal: composedSignal,\n method: method.toUpperCase(),\n headers: headers.normalize().toJSON(),\n body: data,\n duplex: \"half\",\n credentials: isCredentialsSupported ? withCredentials : undefined\n });\n\n let response = await fetch(request, fetchOptions);\n\n const isStreamResponse = supportsResponseStream && (responseType === 'stream' || responseType === 'response');\n\n if (supportsResponseStream && (onDownloadProgress || (isStreamResponse && unsubscribe))) {\n const options = {};\n\n ['status', 'statusText', 'headers'].forEach(prop => {\n options[prop] = response[prop];\n });\n\n const responseContentLength = utils.toFiniteNumber(response.headers.get('content-length'));\n\n const [onProgress, flush] = onDownloadProgress && progressEventDecorator(\n responseContentLength,\n progressEventReducer(asyncDecorator(onDownloadProgress), true)\n ) || [];\n\n response = new Response(\n trackStream(response.body, DEFAULT_CHUNK_SIZE, onProgress, () => {\n flush && flush();\n unsubscribe && unsubscribe();\n }),\n options\n );\n }\n\n responseType = responseType || 'text';\n\n let responseData = await resolvers[utils.findKey(resolvers, responseType) || 'text'](response, config);\n\n !isStreamResponse && unsubscribe && unsubscribe();\n\n return await new Promise((resolve, reject) => {\n settle(resolve, reject, {\n data: responseData,\n headers: AxiosHeaders.from(response.headers),\n status: response.status,\n statusText: response.statusText,\n config,\n request\n })\n })\n } catch (err) {\n unsubscribe && unsubscribe();\n\n if (err && err.name === 'TypeError' && /Load failed|fetch/i.test(err.message)) {\n throw Object.assign(\n new AxiosError('Network Error', AxiosError.ERR_NETWORK, config, request),\n {\n cause: err.cause || err\n }\n )\n }\n\n throw AxiosError.from(err, err && err.code, config, request);\n }\n});\n\n\n","import utils from '../utils.js';\nimport httpAdapter from './http.js';\nimport xhrAdapter from './xhr.js';\nimport fetchAdapter from './fetch.js';\nimport AxiosError from \"../core/AxiosError.js\";\n\nconst knownAdapters = {\n http: httpAdapter,\n xhr: xhrAdapter,\n fetch: fetchAdapter\n}\n\nutils.forEach(knownAdapters, (fn, value) => {\n if (fn) {\n try {\n Object.defineProperty(fn, 'name', {value});\n } catch (e) {\n // eslint-disable-next-line no-empty\n }\n Object.defineProperty(fn, 'adapterName', {value});\n }\n});\n\nconst renderReason = (reason) => `- ${reason}`;\n\nconst isResolvedHandle = (adapter) => utils.isFunction(adapter) || adapter === null || adapter === false;\n\nexport default {\n getAdapter: (adapters) => {\n adapters = utils.isArray(adapters) ? adapters : [adapters];\n\n const {length} = adapters;\n let nameOrAdapter;\n let adapter;\n\n const rejectedReasons = {};\n\n for (let i = 0; i < length; i++) {\n nameOrAdapter = adapters[i];\n let id;\n\n adapter = nameOrAdapter;\n\n if (!isResolvedHandle(nameOrAdapter)) {\n adapter = knownAdapters[(id = String(nameOrAdapter)).toLowerCase()];\n\n if (adapter === undefined) {\n throw new AxiosError(`Unknown adapter '${id}'