@discordjs/rest 3.0.0-dev.1763510521-315f42278 → 3.0.0-dev.1763683321-0b1226337

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
@@ -4,7 +4,8 @@ export { ImageSize } from 'discord-api-types/v10';
4
4
  import { Readable } from 'node:stream';
5
5
  import { ReadableStream } from 'node:stream/web';
6
6
  import { Collection } from '@discordjs/collection';
7
- import { Awaitable } from '@discordjs/util';
7
+ import { RawFile, Awaitable } from '@discordjs/util';
8
+ export { RawFile } from '@discordjs/util';
8
9
  import * as undici from 'undici';
9
10
  import { RequestInit, Response, BodyInit, Agent, Dispatcher } from 'undici';
10
11
  import { AsyncEventEmitter } from '@vladfrangu/async_event_emitter';
@@ -283,29 +284,7 @@ interface InvalidRequestWarningData {
283
284
  */
284
285
  remainingTime: number;
285
286
  }
286
- /**
287
- * Represents a file to be added to the request
288
- */
289
- interface RawFile {
290
- /**
291
- * Content-Type of the file
292
- */
293
- contentType?: string;
294
- /**
295
- * The actual data for the file
296
- */
297
- data: Buffer | Uint8Array | boolean | number | string;
298
- /**
299
- * An explicit key to use for key of the formdata field for this file.
300
- * When not provided, the index of the file in the files array is used in the form `files[${index}]`.
301
- * If you wish to alter the placeholder snowflake, you must provide this property in the same form (`files[${placeholder}]`)
302
- */
303
- key?: string;
304
- /**
305
- * The name of the file
306
- */
307
- name: string;
308
- }
287
+
309
288
  interface AuthData {
310
289
  /**
311
290
  * The authorization prefix to use for this request, useful if you use this with bearer tokens
@@ -949,4 +928,4 @@ declare function calculateUserDefaultAvatarIndex(userId: Snowflake): number;
949
928
  */
950
929
  declare const version: string;
951
930
 
952
- export { ALLOWED_EXTENSIONS, ALLOWED_SIZES, ALLOWED_STICKER_EXTENSIONS, type APIRequest, AUTH_UUID_NAMESPACE, type AuthData, type BaseImageURLOptions, BurstHandlerMajorIdKey, CDN, type CDNOptions, DefaultRestOptions, DefaultUserAgent, DefaultUserAgentAppendix, DiscordAPIError, type DiscordError, type DiscordErrorData, type DiscordErrorFieldInformation, type DiscordErrorGroupWrapper, type EmojiURLOptions, type EmojiURLOptionsNotWebp, type EmojiURLOptionsWebp, type GetRateLimitOffsetFunction, type GetRetryBackoffFunction, type GetTimeoutFunction, HTTPError, type HandlerRequestData, type HashData, type IHandler, type ImageExtension, type ImageURLOptions, type InternalRequest, type InvalidRequestWarningData, 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 };
931
+ export { ALLOWED_EXTENSIONS, ALLOWED_SIZES, ALLOWED_STICKER_EXTENSIONS, type APIRequest, AUTH_UUID_NAMESPACE, type AuthData, type BaseImageURLOptions, BurstHandlerMajorIdKey, CDN, type CDNOptions, DefaultRestOptions, DefaultUserAgent, DefaultUserAgentAppendix, DiscordAPIError, type DiscordError, type DiscordErrorData, type DiscordErrorFieldInformation, type DiscordErrorGroupWrapper, type EmojiURLOptions, type EmojiURLOptionsNotWebp, type EmojiURLOptionsWebp, type GetRateLimitOffsetFunction, type GetRetryBackoffFunction, type GetTimeoutFunction, HTTPError, type HandlerRequestData, type HashData, type IHandler, type ImageExtension, type ImageURLOptions, type InternalRequest, type InvalidRequestWarningData, type OAuthErrorData, OverwrittenMimeTypes, REST, RESTEvents, type RESTOptions, type RateLimitData, RateLimitError, type RateLimitQueueFilter, 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
@@ -4,7 +4,8 @@ export { ImageSize } from 'discord-api-types/v10';
4
4
  import { Readable } from 'node:stream';
5
5
  import { ReadableStream } from 'node:stream/web';
6
6
  import { Collection } from '@discordjs/collection';
7
- import { Awaitable } from '@discordjs/util';
7
+ import { RawFile, Awaitable } from '@discordjs/util';
8
+ export { RawFile } from '@discordjs/util';
8
9
  import * as undici from 'undici';
9
10
  import { RequestInit, Response, BodyInit, Agent, Dispatcher } from 'undici';
10
11
  import { AsyncEventEmitter } from '@vladfrangu/async_event_emitter';
@@ -283,29 +284,7 @@ interface InvalidRequestWarningData {
283
284
  */
284
285
  remainingTime: number;
285
286
  }
286
- /**
287
- * Represents a file to be added to the request
288
- */
289
- interface RawFile {
290
- /**
291
- * Content-Type of the file
292
- */
293
- contentType?: string;
294
- /**
295
- * The actual data for the file
296
- */
297
- data: Buffer | Uint8Array | boolean | number | string;
298
- /**
299
- * An explicit key to use for key of the formdata field for this file.
300
- * When not provided, the index of the file in the files array is used in the form `files[${index}]`.
301
- * If you wish to alter the placeholder snowflake, you must provide this property in the same form (`files[${placeholder}]`)
302
- */
303
- key?: string;
304
- /**
305
- * The name of the file
306
- */
307
- name: string;
308
- }
287
+
309
288
  interface AuthData {
310
289
  /**
311
290
  * The authorization prefix to use for this request, useful if you use this with bearer tokens
@@ -949,4 +928,4 @@ declare function calculateUserDefaultAvatarIndex(userId: Snowflake): number;
949
928
  */
950
929
  declare const version: string;
951
930
 
952
- export { ALLOWED_EXTENSIONS, ALLOWED_SIZES, ALLOWED_STICKER_EXTENSIONS, type APIRequest, AUTH_UUID_NAMESPACE, type AuthData, type BaseImageURLOptions, BurstHandlerMajorIdKey, CDN, type CDNOptions, DefaultRestOptions, DefaultUserAgent, DefaultUserAgentAppendix, DiscordAPIError, type DiscordError, type DiscordErrorData, type DiscordErrorFieldInformation, type DiscordErrorGroupWrapper, type EmojiURLOptions, type EmojiURLOptionsNotWebp, type EmojiURLOptionsWebp, type GetRateLimitOffsetFunction, type GetRetryBackoffFunction, type GetTimeoutFunction, HTTPError, type HandlerRequestData, type HashData, type IHandler, type ImageExtension, type ImageURLOptions, type InternalRequest, type InvalidRequestWarningData, 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 };
931
+ export { ALLOWED_EXTENSIONS, ALLOWED_SIZES, ALLOWED_STICKER_EXTENSIONS, type APIRequest, AUTH_UUID_NAMESPACE, type AuthData, type BaseImageURLOptions, BurstHandlerMajorIdKey, CDN, type CDNOptions, DefaultRestOptions, DefaultUserAgent, DefaultUserAgentAppendix, DiscordAPIError, type DiscordError, type DiscordErrorData, type DiscordErrorFieldInformation, type DiscordErrorGroupWrapper, type EmojiURLOptions, type EmojiURLOptionsNotWebp, type EmojiURLOptionsWebp, type GetRateLimitOffsetFunction, type GetRetryBackoffFunction, type GetTimeoutFunction, HTTPError, type HandlerRequestData, type HashData, type IHandler, type ImageExtension, type ImageURLOptions, type InternalRequest, type InvalidRequestWarningData, type OAuthErrorData, OverwrittenMimeTypes, REST, RESTEvents, type RESTOptions, type RateLimitData, RateLimitError, type RateLimitQueueFilter, 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
@@ -139,7 +139,7 @@ var import_v102 = require("discord-api-types/v10");
139
139
  // src/lib/utils/constants.ts
140
140
  var import_util = require("@discordjs/util");
141
141
  var import_v10 = require("discord-api-types/v10");
142
- var DefaultUserAgent = `DiscordBot (https://discord.js.org, 3.0.0-dev.1763510521-315f42278)`;
142
+ var DefaultUserAgent = `DiscordBot (https://discord.js.org, 3.0.0-dev.1763683321-0b1226337)`;
143
143
  var DefaultUserAgentAppendix = (0, import_util.getUserAgentAppendix)();
144
144
  var DefaultRestOptions = {
145
145
  agent: null,
@@ -1540,7 +1540,7 @@ var REST = class _REST extends import_async_event_emitter.AsyncEventEmitter {
1540
1540
  };
1541
1541
 
1542
1542
  // src/shared.ts
1543
- var version = "3.0.0-dev.1763510521-315f42278";
1543
+ var version = "3.0.0-dev.1763683321-0b1226337";
1544
1544
 
1545
1545
  // src/index.ts
1546
1546
  setDefaultStrategy((0, import_util2.shouldUseGlobalFetchAndWebSocket)() ? fetch : makeRequest);