@discordjs/rest 3.0.0-dev.1745194445-8f35dfd03 → 3.0.0-dev.1745453598-abc5d99ce

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.mts CHANGED
@@ -1,5 +1,6 @@
1
1
  import * as url from 'url';
2
- import { Snowflake } from 'discord-api-types/v10';
2
+ import { ImageSize, Snowflake } from 'discord-api-types/v10';
3
+ export { ImageSize } from 'discord-api-types/v10';
3
4
  import { Readable } from 'node:stream';
4
5
  import { ReadableStream } from 'node:stream/web';
5
6
  import { Collection } from '@discordjs/collection';
@@ -438,10 +439,9 @@ declare enum RESTEvents {
438
439
  }
439
440
  declare const ALLOWED_EXTENSIONS: readonly ["webp", "png", "jpg", "jpeg", "gif"];
440
441
  declare const ALLOWED_STICKER_EXTENSIONS: readonly ["png", "json", "gif"];
441
- declare const ALLOWED_SIZES: readonly [16, 32, 64, 128, 256, 512, 1024, 2048, 4096];
442
+ declare const ALLOWED_SIZES: readonly number[];
442
443
  type ImageExtension = (typeof ALLOWED_EXTENSIONS)[number];
443
444
  type StickerExtension = (typeof ALLOWED_STICKER_EXTENSIONS)[number];
444
- type ImageSize = (typeof ALLOWED_SIZES)[number];
445
445
  declare const OverwrittenMimeTypes: {
446
446
  readonly 'image/apng': "image/png";
447
447
  };
@@ -910,4 +910,4 @@ declare function calculateUserDefaultAvatarIndex(userId: Snowflake): number;
910
910
  */
911
911
  declare const version: string;
912
912
 
913
- export { ALLOWED_EXTENSIONS, ALLOWED_SIZES, ALLOWED_STICKER_EXTENSIONS, type APIRequest, AUTH_UUID_NAMESPACE, type AuthData, type BaseImageURLOptions, BurstHandlerMajorIdKey, CDN, DefaultRestOptions, DefaultUserAgent, DefaultUserAgentAppendix, DiscordAPIError, type DiscordErrorData, type GetRateLimitOffsetFunction, HTTPError, type HandlerRequestData, type HashData, type ImageExtension, type ImageSize, type ImageURLOptions, type InternalRequest, type InvalidRequestWarningData, type MakeURLOptions, type OAuthErrorData, OverwrittenMimeTypes, REST, RESTEvents, type RESTOptions, type RateLimitData, RateLimitError, type RateLimitQueueFilter, type RawFile, type RequestBody, type RequestData, type RequestHeaders, RequestMethod, type ResponseLike, type RestEvents, type RestEventsMap, type RouteData, type RouteLike, type StickerExtension, calculateUserDefaultAvatarIndex, makeURLSearchParams, parseResponse, version };
913
+ export { ALLOWED_EXTENSIONS, ALLOWED_SIZES, ALLOWED_STICKER_EXTENSIONS, type APIRequest, AUTH_UUID_NAMESPACE, type AuthData, type BaseImageURLOptions, BurstHandlerMajorIdKey, CDN, DefaultRestOptions, DefaultUserAgent, DefaultUserAgentAppendix, DiscordAPIError, type DiscordErrorData, type GetRateLimitOffsetFunction, HTTPError, type HandlerRequestData, type HashData, type ImageExtension, type ImageURLOptions, type InternalRequest, type InvalidRequestWarningData, type MakeURLOptions, type OAuthErrorData, OverwrittenMimeTypes, REST, RESTEvents, type RESTOptions, type RateLimitData, RateLimitError, type RateLimitQueueFilter, type RawFile, type RequestBody, type RequestData, type RequestHeaders, RequestMethod, type ResponseLike, type RestEvents, type RestEventsMap, type RouteData, type RouteLike, type StickerExtension, calculateUserDefaultAvatarIndex, makeURLSearchParams, parseResponse, version };
package/dist/index.d.ts CHANGED
@@ -1,5 +1,6 @@
1
1
  import * as url from 'url';
2
- import { Snowflake } from 'discord-api-types/v10';
2
+ import { ImageSize, Snowflake } from 'discord-api-types/v10';
3
+ export { ImageSize } from 'discord-api-types/v10';
3
4
  import { Readable } from 'node:stream';
4
5
  import { ReadableStream } from 'node:stream/web';
5
6
  import { Collection } from '@discordjs/collection';
@@ -438,10 +439,9 @@ declare enum RESTEvents {
438
439
  }
439
440
  declare const ALLOWED_EXTENSIONS: readonly ["webp", "png", "jpg", "jpeg", "gif"];
440
441
  declare const ALLOWED_STICKER_EXTENSIONS: readonly ["png", "json", "gif"];
441
- declare const ALLOWED_SIZES: readonly [16, 32, 64, 128, 256, 512, 1024, 2048, 4096];
442
+ declare const ALLOWED_SIZES: readonly number[];
442
443
  type ImageExtension = (typeof ALLOWED_EXTENSIONS)[number];
443
444
  type StickerExtension = (typeof ALLOWED_STICKER_EXTENSIONS)[number];
444
- type ImageSize = (typeof ALLOWED_SIZES)[number];
445
445
  declare const OverwrittenMimeTypes: {
446
446
  readonly 'image/apng': "image/png";
447
447
  };
@@ -910,4 +910,4 @@ declare function calculateUserDefaultAvatarIndex(userId: Snowflake): number;
910
910
  */
911
911
  declare const version: string;
912
912
 
913
- export { ALLOWED_EXTENSIONS, ALLOWED_SIZES, ALLOWED_STICKER_EXTENSIONS, type APIRequest, AUTH_UUID_NAMESPACE, type AuthData, type BaseImageURLOptions, BurstHandlerMajorIdKey, CDN, DefaultRestOptions, DefaultUserAgent, DefaultUserAgentAppendix, DiscordAPIError, type DiscordErrorData, type GetRateLimitOffsetFunction, HTTPError, type HandlerRequestData, type HashData, type ImageExtension, type ImageSize, type ImageURLOptions, type InternalRequest, type InvalidRequestWarningData, type MakeURLOptions, type OAuthErrorData, OverwrittenMimeTypes, REST, RESTEvents, type RESTOptions, type RateLimitData, RateLimitError, type RateLimitQueueFilter, type RawFile, type RequestBody, type RequestData, type RequestHeaders, RequestMethod, type ResponseLike, type RestEvents, type RestEventsMap, type RouteData, type RouteLike, type StickerExtension, calculateUserDefaultAvatarIndex, makeURLSearchParams, parseResponse, version };
913
+ export { ALLOWED_EXTENSIONS, ALLOWED_SIZES, ALLOWED_STICKER_EXTENSIONS, type APIRequest, AUTH_UUID_NAMESPACE, type AuthData, type BaseImageURLOptions, BurstHandlerMajorIdKey, CDN, DefaultRestOptions, DefaultUserAgent, DefaultUserAgentAppendix, DiscordAPIError, type DiscordErrorData, type GetRateLimitOffsetFunction, HTTPError, type HandlerRequestData, type HashData, type ImageExtension, type ImageURLOptions, type InternalRequest, type InvalidRequestWarningData, type MakeURLOptions, type OAuthErrorData, OverwrittenMimeTypes, REST, RESTEvents, type RESTOptions, type RateLimitData, RateLimitError, type RateLimitQueueFilter, type RawFile, type RequestBody, type RequestData, type RequestHeaders, RequestMethod, type ResponseLike, type RestEvents, type RestEventsMap, type RouteData, type RouteLike, type StickerExtension, calculateUserDefaultAvatarIndex, makeURLSearchParams, parseResponse, version };
package/dist/index.js CHANGED
@@ -124,7 +124,7 @@ __name(resolveBody, "resolveBody");
124
124
  // src/lib/utils/constants.ts
125
125
  var import_util = require("@discordjs/util");
126
126
  var import_v10 = require("discord-api-types/v10");
127
- var DefaultUserAgent = `DiscordBot (https://discord.js.org, 3.0.0-dev.1745194445-8f35dfd03)`;
127
+ var DefaultUserAgent = `DiscordBot (https://discord.js.org, 3.0.0-dev.1745453598-abc5d99ce)`;
128
128
  var DefaultUserAgentAppendix = (0, import_util.getUserAgentAppendix)();
129
129
  var DefaultRestOptions = {
130
130
  agent: null,
@@ -162,7 +162,17 @@ var RESTEvents = /* @__PURE__ */ ((RESTEvents2) => {
162
162
  })(RESTEvents || {});
163
163
  var ALLOWED_EXTENSIONS = ["webp", "png", "jpg", "jpeg", "gif"];
164
164
  var ALLOWED_STICKER_EXTENSIONS = ["png", "json", "gif"];
165
- var ALLOWED_SIZES = [16, 32, 64, 128, 256, 512, 1024, 2048, 4096];
165
+ var ALLOWED_SIZES = [
166
+ 16,
167
+ 32,
168
+ 64,
169
+ 128,
170
+ 256,
171
+ 512,
172
+ 1024,
173
+ 2048,
174
+ 4096
175
+ ];
166
176
  var OverwrittenMimeTypes = {
167
177
  // https://github.com/discordjs/discord.js/issues/8557
168
178
  "image/apng": "image/png"
@@ -1448,7 +1458,7 @@ var REST = class _REST extends import_async_event_emitter.AsyncEventEmitter {
1448
1458
  };
1449
1459
 
1450
1460
  // src/shared.ts
1451
- var version = "3.0.0-dev.1745194445-8f35dfd03";
1461
+ var version = "3.0.0-dev.1745453598-abc5d99ce";
1452
1462
 
1453
1463
  // src/index.ts
1454
1464
  globalThis.FormData ??= import_undici2.FormData;