discord-api-types
Advanced tools
Comparing version 0.37.113-next.d222c61.1734689633 to 0.37.113-next.fc4e7be.1734898335
{ | ||
"name": "discord-api-types", | ||
"version": "0.37.113-next.d222c61.1734689633", | ||
"version": "0.37.113-next.fc4e7be.1734898335", | ||
"description": "Discord API typings that are kept up to date for use in bot library creation.", | ||
@@ -147,3 +147,3 @@ "homepage": "https://discord-api-types.dev", | ||
"husky": "^9.0.11", | ||
"is-ci": "^3.0.1", | ||
"is-ci": "^4.0.0", | ||
"lint-staged": "^15.2.2", | ||
@@ -150,0 +150,0 @@ "npm-run-all2": "^7.0.0", |
@@ -18,2 +18,3 @@ "use strict"; | ||
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); | ||
@@ -953,3 +954,12 @@ __exportStar(require("./application"), exports); | ||
exports.Routes[key] = (...args) => { | ||
const escaped = args.map((arg) => arg && encodeURIComponent(arg)); | ||
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 | ||
@@ -1197,3 +1207,12 @@ return fn.call(null, ...escaped); | ||
exports.CDNRoutes[key] = (...args) => { | ||
const escaped = args.map((arg) => arg && encodeURIComponent(arg)); | ||
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 | ||
@@ -1200,0 +1219,0 @@ return fn.call(null, ...escaped); |
@@ -18,2 +18,3 @@ "use strict"; | ||
exports.Routes = exports.APIVersion = void 0; | ||
const internals_1 = require("../../utils/internals"); | ||
__exportStar(require("../common"), exports); | ||
@@ -483,3 +484,12 @@ __exportStar(require("./auditLog"), exports); | ||
exports.Routes[key] = (...args) => { | ||
const escaped = args.map((arg) => encodeURIComponent(arg)); | ||
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 | ||
@@ -486,0 +496,0 @@ return fn.call(null, ...escaped); |
@@ -18,2 +18,3 @@ "use strict"; | ||
exports.OAuth2Routes = exports.RouteBases = exports.Routes = exports.APIVersion = void 0; | ||
const internals_1 = require("../../utils/internals"); | ||
__exportStar(require("../common"), exports); | ||
@@ -711,3 +712,12 @@ __exportStar(require("./auditLog"), exports); | ||
exports.Routes[key] = (...args) => { | ||
const escaped = args.map((arg) => encodeURIComponent(arg)); | ||
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 | ||
@@ -714,0 +724,0 @@ return fn.call(null, ...escaped); |
@@ -904,4 +904,4 @@ import type { Snowflake } from '../../globals'; | ||
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 TeamIconFormat = Exclude<ImageFormat, ImageFormat.GIF | ImageFormat.Lottie>; | ||
export type StickerFormat = Extract<ImageFormat, ImageFormat.GIF | ImageFormat.Lottie | ImageFormat.PNG>; | ||
@@ -922,2 +922,3 @@ export type RoleIconFormat = Exclude<ImageFormat, ImageFormat.GIF | ImageFormat.Lottie>; | ||
readonly cdn: "https://cdn.discordapp.com"; | ||
readonly media: "https://media.discordapp.net"; | ||
readonly invite: "https://discord.gg"; | ||
@@ -924,0 +925,0 @@ readonly template: "https://discord.new"; |
@@ -18,2 +18,3 @@ "use strict"; | ||
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); | ||
@@ -960,3 +961,12 @@ __exportStar(require("./application"), exports); | ||
exports.Routes[key] = (...args) => { | ||
const escaped = args.map((arg) => arg && encodeURIComponent(arg)); | ||
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 | ||
@@ -1204,3 +1214,12 @@ return fn.call(null, ...escaped); | ||
exports.CDNRoutes[key] = (...args) => { | ||
const escaped = args.map((arg) => arg && encodeURIComponent(arg)); | ||
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 | ||
@@ -1215,2 +1234,3 @@ return fn.call(null, ...escaped); | ||
cdn: 'https://cdn.discordapp.com', | ||
media: 'https://media.discordapp.net', | ||
invite: 'https://discord.gg', | ||
@@ -1217,0 +1237,0 @@ template: 'https://discord.new', |
@@ -31,3 +31,4 @@ export type Nullable<T> = { | ||
type Omit_<T, K> = Omit<T, Extract<keyof T, K>>; | ||
export declare const urlSafeCharacters: RegExp; | ||
export {}; | ||
//# sourceMappingURL=internals.d.ts.map |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.urlSafeCharacters = void 0; | ||
exports.urlSafeCharacters = /^[\d%A-Za-z-]+$/g; | ||
//# sourceMappingURL=internals.js.map |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
2876529
56718