@discordjs/core 1.1.2-dev.1703117367-891a67ac4 → 1.2.0-dev.1703462992-0f1e02b3d
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/http-only.d.mts +51 -2
- package/dist/http-only.d.ts +51 -2
- package/dist/http-only.js +145 -64
- package/dist/http-only.js.map +1 -1
- package/dist/http-only.mjs +150 -65
- package/dist/http-only.mjs.map +1 -1
- package/dist/index.d.mts +54 -2
- package/dist/index.d.ts +54 -2
- package/dist/index.js +151 -71
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +151 -67
- package/dist/index.mjs.map +1 -1
- package/package.json +3 -3
package/dist/http-only.d.mts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { REST, RequestData, RawFile } from '@discordjs/rest';
|
|
2
2
|
import * as discord_api_types_v10 from 'discord-api-types/v10';
|
|
3
|
-
import { Snowflake, RESTGetAPIApplicationCommandsQuery, RESTGetAPIApplicationCommandsResult, RESTPostAPIApplicationCommandsJSONBody, RESTPatchAPIApplicationCommandJSONBody, RESTPutAPIApplicationCommandsJSONBody, RESTPutAPIApplicationCommandsResult, RESTGetAPIApplicationGuildCommandsQuery, RESTGetAPIApplicationGuildCommandsResult, RESTPostAPIApplicationGuildCommandsJSONBody, RESTPostAPIApplicationGuildCommandsResult, RESTGetAPIApplicationGuildCommandResult, RESTPatchAPIApplicationGuildCommandJSONBody, RESTPatchAPIApplicationGuildCommandResult, RESTPutAPIApplicationGuildCommandsJSONBody, RESTPutAPIApplicationGuildCommandsResult, RESTGetAPIGuildApplicationCommandsPermissionsResult, RESTPutAPIApplicationCommandPermissionsJSONBody, RESTPatchCurrentApplicationJSONBody, RESTPostAPIGuildForumThreadsJSONBody, RESTPostAPIChannelMessageJSONBody, RESTPatchAPIChannelMessageJSONBody, RESTGetAPIChannelMessageReactionUsersQuery, RESTGetAPIChannelMessageReactionUsersResult, RESTPatchAPIChannelJSONBody, RESTGetAPIChannelMessagesQuery, RESTGetAPIChannelMessagesResult, RESTGetAPIChannelPinsResult, RESTPostAPIChannelInviteJSONBody, RESTGetAPIChannelInvitesResult, RESTPostAPIChannelThreadsJSONBody, APIThreadChannel, RESTGetAPIChannelThreadsArchivedQuery, RESTGetAPIChannelUsersThreadsArchivedResult, RESTPostAPIChannelWebhookJSONBody, RESTGetAPIChannelWebhooksResult, RESTPutAPIChannelPermissionJSONBody, RESTPostAPIGuildsJSONBody, RESTPatchAPIGuildJSONBody, RESTPutAPIGuildMemberJSONBody, RESTPutAPIGuildMemberResult, RESTGetAPIGuildMembersQuery, RESTGetAPIGuildMembersResult, RESTGetAPIGuildChannelsResult, RESTPostAPIGuildChannelJSONBody, RESTPatchAPIGuildChannelPositionsJSONBody, RESTGetAPIGuildBansQuery, RESTGetAPIGuildBansResult, RESTPutAPIGuildBanJSONBody, RESTGetAPIGuildRolesResult, RESTPostAPIGuildRoleJSONBody, RESTPatchAPIGuildRolePositionsJSONBody, RESTPatchAPIGuildRolePositionsResult, RESTPatchAPIGuildRoleJSONBody, GuildMFALevel, RESTGetAPIGuildPruneCountQuery, RESTGetAPIGuildPruneCountResult, RESTPostAPIGuildPruneJSONBody, RESTPostAPIGuildPruneResult, RESTGetAPIGuildVoiceRegionsResult, RESTGetAPIGuildInvitesResult, RESTGetAPIGuildIntegrationsResult, RESTPatchAPIGuildWidgetSettingsJSONBody, RESTGetAPIGuildVanityUrlResult, GuildWidgetStyle, RESTPatchAPIGuildWelcomeScreenJSONBody, RESTPatchAPIGuildVoiceStateUserJSONBody, RESTGetAPIGuildEmojisResult, RESTPostAPIGuildEmojiJSONBody, RESTPatchAPIGuildEmojiJSONBody, RESTGetAPIGuildScheduledEventsQuery, RESTGetAPIGuildScheduledEventsResult, RESTPostAPIGuildScheduledEventJSONBody, RESTGetAPIGuildScheduledEventQuery, RESTPatchAPIGuildScheduledEventJSONBody, RESTGetAPIGuildScheduledEventUsersQuery, RESTGetAPIGuildScheduledEventUsersResult, RESTGetAPIGuildTemplatesResult, RESTPatchAPIGuildTemplateJSONBody, RESTGetAPIGuildStickersResult, RESTPostAPIGuildStickerFormDataBody, RESTPatchAPIGuildStickerJSONBody, RESTGetAPIAuditLogQuery, RESTGetAPIAutoModerationRulesResult, RESTPostAPIAutoModerationRuleJSONBody, RESTPatchAPIAutoModerationRuleJSONBody, RESTGetAPIGuildMembersSearchQuery, RESTGetAPIGuildMembersSearchResult, RESTPatchAPIGuildMemberJSONBody, RESTPostAPIGuildTemplatesJSONBody, RESTGetAPIGuildWebhooksResult, RESTPatchAPIGuildVoiceStateCurrentMemberJSONBody, RESTPutAPIGuildOnboardingJSONBody, RESTPatchAPIWebhookJSONBody, RESTPostAPIWebhookWithTokenJSONBody, RESTPostAPIWebhookWithTokenQuery, RESTPostAPIWebhookWithTokenWaitResult, RESTPostAPIWebhookWithTokenSlackQuery, RESTPostAPIWebhookWithTokenGitHubQuery, RESTGetAPIWebhookWithTokenMessageQuery, RESTPatchAPIWebhookWithTokenMessageJSONBody, APIInteractionResponseCallbackData, APIInteractionResponseDeferredChannelMessageWithSource, APICommandAutocompleteInteractionResponseCallbackData, APIModalInteractionResponseCallbackData, RESTGetAPIInviteQuery, RESTOAuth2AuthorizationQuery, RESTPostOAuth2AccessTokenURLEncodedData, RESTPostOAuth2AccessTokenResult, RESTPostOAuth2RefreshTokenURLEncodedData, RESTPostOAuth2ClientCredentialsURLEncodedData, RESTGetAPIOAuth2CurrentApplicationResult, RESTGetAPIOAuth2CurrentAuthorizationResult, RESTGetAPIApplicationRoleConnectionMetadataResult, RESTPutAPIApplicationRoleConnectionMetadataJSONBody, RESTPutAPIApplicationRoleConnectionMetadataResult, RESTPostAPIStageInstanceJSONBody, RESTPatchAPIStageInstanceJSONBody, RESTGetStickerPacksResult, APIThreadMember, RESTGetAPIChannelThreadMembersResult, RESTGetAPICurrentUserGuildsQuery, RESTGetAPICurrentUserGuildsResult, RESTPatchAPICurrentUserJSONBody, RESTGetAPICurrentUserConnectionsResult, RESTPutAPICurrentUserApplicationRoleConnectionJSONBody, RESTGetAPIVoiceRegionsResult } from 'discord-api-types/v10';
|
|
3
|
+
import { Snowflake, RESTGetAPIApplicationCommandsQuery, RESTGetAPIApplicationCommandsResult, RESTPostAPIApplicationCommandsJSONBody, RESTPatchAPIApplicationCommandJSONBody, RESTPutAPIApplicationCommandsJSONBody, RESTPutAPIApplicationCommandsResult, RESTGetAPIApplicationGuildCommandsQuery, RESTGetAPIApplicationGuildCommandsResult, RESTPostAPIApplicationGuildCommandsJSONBody, RESTPostAPIApplicationGuildCommandsResult, RESTGetAPIApplicationGuildCommandResult, RESTPatchAPIApplicationGuildCommandJSONBody, RESTPatchAPIApplicationGuildCommandResult, RESTPutAPIApplicationGuildCommandsJSONBody, RESTPutAPIApplicationGuildCommandsResult, RESTGetAPIGuildApplicationCommandsPermissionsResult, RESTPutAPIApplicationCommandPermissionsJSONBody, RESTPatchCurrentApplicationJSONBody, RESTPostAPIGuildForumThreadsJSONBody, RESTPostAPIChannelMessageJSONBody, RESTPatchAPIChannelMessageJSONBody, RESTGetAPIChannelMessageReactionUsersQuery, RESTGetAPIChannelMessageReactionUsersResult, RESTPatchAPIChannelJSONBody, RESTGetAPIChannelMessagesQuery, RESTGetAPIChannelMessagesResult, RESTGetAPIChannelPinsResult, RESTPostAPIChannelInviteJSONBody, RESTGetAPIChannelInvitesResult, RESTPostAPIChannelThreadsJSONBody, APIThreadChannel, RESTGetAPIChannelThreadsArchivedQuery, RESTGetAPIChannelUsersThreadsArchivedResult, RESTPostAPIChannelWebhookJSONBody, RESTGetAPIChannelWebhooksResult, RESTPutAPIChannelPermissionJSONBody, RESTPostAPIGuildsJSONBody, RESTPatchAPIGuildJSONBody, RESTPutAPIGuildMemberJSONBody, RESTPutAPIGuildMemberResult, RESTGetAPIGuildMembersQuery, RESTGetAPIGuildMembersResult, RESTGetAPIGuildChannelsResult, RESTPostAPIGuildChannelJSONBody, RESTPatchAPIGuildChannelPositionsJSONBody, RESTGetAPIGuildBansQuery, RESTGetAPIGuildBansResult, RESTPutAPIGuildBanJSONBody, RESTGetAPIGuildRolesResult, RESTPostAPIGuildRoleJSONBody, RESTPatchAPIGuildRolePositionsJSONBody, RESTPatchAPIGuildRolePositionsResult, RESTPatchAPIGuildRoleJSONBody, GuildMFALevel, RESTGetAPIGuildPruneCountQuery, RESTGetAPIGuildPruneCountResult, RESTPostAPIGuildPruneJSONBody, RESTPostAPIGuildPruneResult, RESTGetAPIGuildVoiceRegionsResult, RESTGetAPIGuildInvitesResult, RESTGetAPIGuildIntegrationsResult, RESTPatchAPIGuildWidgetSettingsJSONBody, RESTGetAPIGuildVanityUrlResult, GuildWidgetStyle, RESTPatchAPIGuildWelcomeScreenJSONBody, RESTPatchAPIGuildVoiceStateUserJSONBody, RESTGetAPIGuildEmojisResult, RESTPostAPIGuildEmojiJSONBody, RESTPatchAPIGuildEmojiJSONBody, RESTGetAPIGuildScheduledEventsQuery, RESTGetAPIGuildScheduledEventsResult, RESTPostAPIGuildScheduledEventJSONBody, RESTGetAPIGuildScheduledEventQuery, RESTPatchAPIGuildScheduledEventJSONBody, RESTGetAPIGuildScheduledEventUsersQuery, RESTGetAPIGuildScheduledEventUsersResult, RESTGetAPIGuildTemplatesResult, RESTPatchAPIGuildTemplateJSONBody, RESTGetAPIGuildStickersResult, RESTPostAPIGuildStickerFormDataBody, RESTPatchAPIGuildStickerJSONBody, RESTGetAPIAuditLogQuery, RESTGetAPIAutoModerationRulesResult, RESTPostAPIAutoModerationRuleJSONBody, RESTPatchAPIAutoModerationRuleJSONBody, RESTGetAPIGuildMembersSearchQuery, RESTGetAPIGuildMembersSearchResult, RESTPatchAPIGuildMemberJSONBody, RESTPostAPIGuildTemplatesJSONBody, RESTGetAPIGuildWebhooksResult, RESTPatchAPIGuildVoiceStateCurrentMemberJSONBody, RESTPutAPIGuildOnboardingJSONBody, RESTPatchAPIWebhookJSONBody, RESTPostAPIWebhookWithTokenJSONBody, RESTPostAPIWebhookWithTokenQuery, RESTPostAPIWebhookWithTokenWaitResult, RESTPostAPIWebhookWithTokenSlackQuery, RESTPostAPIWebhookWithTokenGitHubQuery, RESTGetAPIWebhookWithTokenMessageQuery, RESTPatchAPIWebhookWithTokenMessageJSONBody, APIInteractionResponseCallbackData, APIInteractionResponseDeferredChannelMessageWithSource, APICommandAutocompleteInteractionResponseCallbackData, APIModalInteractionResponseCallbackData, RESTGetAPIInviteQuery, RESTGetAPISKUsResult, RESTGetAPIEntitlementsQuery, RESTGetAPIEntitlementsResult, RESTPostAPIEntitlementBody, RESTOAuth2AuthorizationQuery, RESTPostOAuth2AccessTokenURLEncodedData, RESTPostOAuth2AccessTokenResult, RESTPostOAuth2RefreshTokenURLEncodedData, RESTPostOAuth2ClientCredentialsURLEncodedData, RESTGetAPIOAuth2CurrentApplicationResult, RESTGetAPIOAuth2CurrentAuthorizationResult, RESTGetAPIApplicationRoleConnectionMetadataResult, RESTPutAPIApplicationRoleConnectionMetadataJSONBody, RESTPutAPIApplicationRoleConnectionMetadataResult, RESTPostAPIStageInstanceJSONBody, RESTPatchAPIStageInstanceJSONBody, RESTGetStickerPacksResult, APIThreadMember, RESTGetAPIChannelThreadMembersResult, RESTGetAPICurrentUserGuildsQuery, RESTGetAPICurrentUserGuildsResult, RESTPatchAPICurrentUserJSONBody, RESTGetAPICurrentUserConnectionsResult, RESTPutAPICurrentUserApplicationRoleConnectionJSONBody, RESTGetAPIVoiceRegionsResult } from 'discord-api-types/v10';
|
|
4
4
|
export * from 'discord-api-types/v10';
|
|
5
5
|
|
|
6
6
|
declare class ApplicationCommandsAPI {
|
|
@@ -1367,6 +1367,15 @@ declare class InteractionsAPI {
|
|
|
1367
1367
|
* @param options - The options for sending the modal
|
|
1368
1368
|
*/
|
|
1369
1369
|
createModal(interactionId: Snowflake, interactionToken: string, callbackData: APIModalInteractionResponseCallbackData, { signal }?: Pick<RequestData, 'signal'>): Promise<void>;
|
|
1370
|
+
/**
|
|
1371
|
+
* Sends a premium required response to an interaction
|
|
1372
|
+
*
|
|
1373
|
+
* @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#create-interaction-response}
|
|
1374
|
+
* @param interactionId - The id of the interaction
|
|
1375
|
+
* @param interactionToken - The token of the interaction
|
|
1376
|
+
* @param options - The options for sending the premium required response
|
|
1377
|
+
*/
|
|
1378
|
+
sendPremiumRequired(interactionId: Snowflake, interactionToken: string, { signal }?: Pick<RequestData, 'signal'>): Promise<void>;
|
|
1370
1379
|
}
|
|
1371
1380
|
|
|
1372
1381
|
declare class InvitesAPI {
|
|
@@ -1391,6 +1400,45 @@ declare class InvitesAPI {
|
|
|
1391
1400
|
delete(code: string, { reason, signal }?: Pick<RequestData, 'reason' | 'signal'>): Promise<void>;
|
|
1392
1401
|
}
|
|
1393
1402
|
|
|
1403
|
+
declare class MonetizationAPI {
|
|
1404
|
+
private readonly rest;
|
|
1405
|
+
constructor(rest: REST);
|
|
1406
|
+
/**
|
|
1407
|
+
* Fetches the SKUs for an application.
|
|
1408
|
+
*
|
|
1409
|
+
* @see {@link https://discord.com/developers/docs/monetization/skus#list-skus}
|
|
1410
|
+
* @param options - The options for fetching the SKUs.
|
|
1411
|
+
*/
|
|
1412
|
+
getSKUs(applicationId: Snowflake, { signal }?: Pick<RequestData, 'signal'>): Promise<RESTGetAPISKUsResult>;
|
|
1413
|
+
/**
|
|
1414
|
+
* Fetches the entitlements for an application.
|
|
1415
|
+
*
|
|
1416
|
+
* @see {@link https://discord.com/developers/docs/monetization/entitlements#list-entitlements}
|
|
1417
|
+
* @param applicationId - The application id to fetch entitlements for
|
|
1418
|
+
* @param query - The query options for fetching entitlements
|
|
1419
|
+
* @param options - The options for fetching entitlements
|
|
1420
|
+
*/
|
|
1421
|
+
getEntitlements(applicationId: Snowflake, query: RESTGetAPIEntitlementsQuery, { signal }?: Pick<RequestData, 'signal'>): Promise<RESTGetAPIEntitlementsResult>;
|
|
1422
|
+
/**
|
|
1423
|
+
* Creates a test entitlement for an application's SKU.
|
|
1424
|
+
*
|
|
1425
|
+
* @see {@link https://discord.com/developers/docs/monetization/entitlements#create-test-entitlement}
|
|
1426
|
+
* @param applicationId - The application id to create the entitlement for
|
|
1427
|
+
* @param body - The data for creating the entitlement
|
|
1428
|
+
* @param options - The options for creating the entitlement
|
|
1429
|
+
*/
|
|
1430
|
+
createTestEntitlement(applicationId: Snowflake, body: RESTPostAPIEntitlementBody, { signal }?: Pick<RequestData, 'signal'>): Promise<Partial<Omit<discord_api_types_v10.APIEntitlement, "starts_at" | "ends_at">>>;
|
|
1431
|
+
/**
|
|
1432
|
+
* Deletes a test entitlement for an application's SKU.
|
|
1433
|
+
*
|
|
1434
|
+
* @see {@link https://discord.com/developers/docs/monetization/entitlements#delete-test-entitlement}
|
|
1435
|
+
* @param applicationId - The application id to delete the entitlement for
|
|
1436
|
+
* @param entitlementId - The entitlement id to delete
|
|
1437
|
+
* @param options - The options for deleting the entitlement
|
|
1438
|
+
*/
|
|
1439
|
+
deleteTestEntitlement(applicationId: Snowflake, entitlementId: Snowflake, { signal }?: Pick<RequestData, 'signal'>): Promise<void>;
|
|
1440
|
+
}
|
|
1441
|
+
|
|
1394
1442
|
declare class OAuth2API {
|
|
1395
1443
|
private readonly rest;
|
|
1396
1444
|
constructor(rest: REST);
|
|
@@ -1700,6 +1748,7 @@ declare class API {
|
|
|
1700
1748
|
readonly guilds: GuildsAPI;
|
|
1701
1749
|
readonly interactions: InteractionsAPI;
|
|
1702
1750
|
readonly invites: InvitesAPI;
|
|
1751
|
+
readonly monetization: MonetizationAPI;
|
|
1703
1752
|
readonly oauth2: OAuth2API;
|
|
1704
1753
|
readonly roleConnections: RoleConnectionsAPI;
|
|
1705
1754
|
readonly stageInstances: StageInstancesAPI;
|
|
@@ -1746,4 +1795,4 @@ declare function withFiles(files: DescriptiveRawFile[], options: APIInteractionR
|
|
|
1746
1795
|
*/
|
|
1747
1796
|
declare const version: string;
|
|
1748
1797
|
|
|
1749
|
-
export { API, ApplicationCommandsAPI, ApplicationsAPI, ChannelsAPI, DescriptiveRawFile, GuildsAPI, InteractionsAPI, InvitesAPI, OAuth2API, RoleConnectionsAPI, StageInstancesAPI, StartForumThreadOptions, StickersAPI, ThreadsAPI, UsersAPI, VoiceAPI, WebhooksAPI, version, withFiles };
|
|
1798
|
+
export { API, ApplicationCommandsAPI, ApplicationsAPI, ChannelsAPI, DescriptiveRawFile, GuildsAPI, InteractionsAPI, InvitesAPI, MonetizationAPI, OAuth2API, RoleConnectionsAPI, StageInstancesAPI, StartForumThreadOptions, StickersAPI, ThreadsAPI, UsersAPI, VoiceAPI, WebhooksAPI, version, withFiles };
|
package/dist/http-only.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { REST, RequestData, RawFile } from '@discordjs/rest';
|
|
2
2
|
import * as discord_api_types_v10 from 'discord-api-types/v10';
|
|
3
|
-
import { Snowflake, RESTGetAPIApplicationCommandsQuery, RESTGetAPIApplicationCommandsResult, RESTPostAPIApplicationCommandsJSONBody, RESTPatchAPIApplicationCommandJSONBody, RESTPutAPIApplicationCommandsJSONBody, RESTPutAPIApplicationCommandsResult, RESTGetAPIApplicationGuildCommandsQuery, RESTGetAPIApplicationGuildCommandsResult, RESTPostAPIApplicationGuildCommandsJSONBody, RESTPostAPIApplicationGuildCommandsResult, RESTGetAPIApplicationGuildCommandResult, RESTPatchAPIApplicationGuildCommandJSONBody, RESTPatchAPIApplicationGuildCommandResult, RESTPutAPIApplicationGuildCommandsJSONBody, RESTPutAPIApplicationGuildCommandsResult, RESTGetAPIGuildApplicationCommandsPermissionsResult, RESTPutAPIApplicationCommandPermissionsJSONBody, RESTPatchCurrentApplicationJSONBody, RESTPostAPIGuildForumThreadsJSONBody, RESTPostAPIChannelMessageJSONBody, RESTPatchAPIChannelMessageJSONBody, RESTGetAPIChannelMessageReactionUsersQuery, RESTGetAPIChannelMessageReactionUsersResult, RESTPatchAPIChannelJSONBody, RESTGetAPIChannelMessagesQuery, RESTGetAPIChannelMessagesResult, RESTGetAPIChannelPinsResult, RESTPostAPIChannelInviteJSONBody, RESTGetAPIChannelInvitesResult, RESTPostAPIChannelThreadsJSONBody, APIThreadChannel, RESTGetAPIChannelThreadsArchivedQuery, RESTGetAPIChannelUsersThreadsArchivedResult, RESTPostAPIChannelWebhookJSONBody, RESTGetAPIChannelWebhooksResult, RESTPutAPIChannelPermissionJSONBody, RESTPostAPIGuildsJSONBody, RESTPatchAPIGuildJSONBody, RESTPutAPIGuildMemberJSONBody, RESTPutAPIGuildMemberResult, RESTGetAPIGuildMembersQuery, RESTGetAPIGuildMembersResult, RESTGetAPIGuildChannelsResult, RESTPostAPIGuildChannelJSONBody, RESTPatchAPIGuildChannelPositionsJSONBody, RESTGetAPIGuildBansQuery, RESTGetAPIGuildBansResult, RESTPutAPIGuildBanJSONBody, RESTGetAPIGuildRolesResult, RESTPostAPIGuildRoleJSONBody, RESTPatchAPIGuildRolePositionsJSONBody, RESTPatchAPIGuildRolePositionsResult, RESTPatchAPIGuildRoleJSONBody, GuildMFALevel, RESTGetAPIGuildPruneCountQuery, RESTGetAPIGuildPruneCountResult, RESTPostAPIGuildPruneJSONBody, RESTPostAPIGuildPruneResult, RESTGetAPIGuildVoiceRegionsResult, RESTGetAPIGuildInvitesResult, RESTGetAPIGuildIntegrationsResult, RESTPatchAPIGuildWidgetSettingsJSONBody, RESTGetAPIGuildVanityUrlResult, GuildWidgetStyle, RESTPatchAPIGuildWelcomeScreenJSONBody, RESTPatchAPIGuildVoiceStateUserJSONBody, RESTGetAPIGuildEmojisResult, RESTPostAPIGuildEmojiJSONBody, RESTPatchAPIGuildEmojiJSONBody, RESTGetAPIGuildScheduledEventsQuery, RESTGetAPIGuildScheduledEventsResult, RESTPostAPIGuildScheduledEventJSONBody, RESTGetAPIGuildScheduledEventQuery, RESTPatchAPIGuildScheduledEventJSONBody, RESTGetAPIGuildScheduledEventUsersQuery, RESTGetAPIGuildScheduledEventUsersResult, RESTGetAPIGuildTemplatesResult, RESTPatchAPIGuildTemplateJSONBody, RESTGetAPIGuildStickersResult, RESTPostAPIGuildStickerFormDataBody, RESTPatchAPIGuildStickerJSONBody, RESTGetAPIAuditLogQuery, RESTGetAPIAutoModerationRulesResult, RESTPostAPIAutoModerationRuleJSONBody, RESTPatchAPIAutoModerationRuleJSONBody, RESTGetAPIGuildMembersSearchQuery, RESTGetAPIGuildMembersSearchResult, RESTPatchAPIGuildMemberJSONBody, RESTPostAPIGuildTemplatesJSONBody, RESTGetAPIGuildWebhooksResult, RESTPatchAPIGuildVoiceStateCurrentMemberJSONBody, RESTPutAPIGuildOnboardingJSONBody, RESTPatchAPIWebhookJSONBody, RESTPostAPIWebhookWithTokenJSONBody, RESTPostAPIWebhookWithTokenQuery, RESTPostAPIWebhookWithTokenWaitResult, RESTPostAPIWebhookWithTokenSlackQuery, RESTPostAPIWebhookWithTokenGitHubQuery, RESTGetAPIWebhookWithTokenMessageQuery, RESTPatchAPIWebhookWithTokenMessageJSONBody, APIInteractionResponseCallbackData, APIInteractionResponseDeferredChannelMessageWithSource, APICommandAutocompleteInteractionResponseCallbackData, APIModalInteractionResponseCallbackData, RESTGetAPIInviteQuery, RESTOAuth2AuthorizationQuery, RESTPostOAuth2AccessTokenURLEncodedData, RESTPostOAuth2AccessTokenResult, RESTPostOAuth2RefreshTokenURLEncodedData, RESTPostOAuth2ClientCredentialsURLEncodedData, RESTGetAPIOAuth2CurrentApplicationResult, RESTGetAPIOAuth2CurrentAuthorizationResult, RESTGetAPIApplicationRoleConnectionMetadataResult, RESTPutAPIApplicationRoleConnectionMetadataJSONBody, RESTPutAPIApplicationRoleConnectionMetadataResult, RESTPostAPIStageInstanceJSONBody, RESTPatchAPIStageInstanceJSONBody, RESTGetStickerPacksResult, APIThreadMember, RESTGetAPIChannelThreadMembersResult, RESTGetAPICurrentUserGuildsQuery, RESTGetAPICurrentUserGuildsResult, RESTPatchAPICurrentUserJSONBody, RESTGetAPICurrentUserConnectionsResult, RESTPutAPICurrentUserApplicationRoleConnectionJSONBody, RESTGetAPIVoiceRegionsResult } from 'discord-api-types/v10';
|
|
3
|
+
import { Snowflake, RESTGetAPIApplicationCommandsQuery, RESTGetAPIApplicationCommandsResult, RESTPostAPIApplicationCommandsJSONBody, RESTPatchAPIApplicationCommandJSONBody, RESTPutAPIApplicationCommandsJSONBody, RESTPutAPIApplicationCommandsResult, RESTGetAPIApplicationGuildCommandsQuery, RESTGetAPIApplicationGuildCommandsResult, RESTPostAPIApplicationGuildCommandsJSONBody, RESTPostAPIApplicationGuildCommandsResult, RESTGetAPIApplicationGuildCommandResult, RESTPatchAPIApplicationGuildCommandJSONBody, RESTPatchAPIApplicationGuildCommandResult, RESTPutAPIApplicationGuildCommandsJSONBody, RESTPutAPIApplicationGuildCommandsResult, RESTGetAPIGuildApplicationCommandsPermissionsResult, RESTPutAPIApplicationCommandPermissionsJSONBody, RESTPatchCurrentApplicationJSONBody, RESTPostAPIGuildForumThreadsJSONBody, RESTPostAPIChannelMessageJSONBody, RESTPatchAPIChannelMessageJSONBody, RESTGetAPIChannelMessageReactionUsersQuery, RESTGetAPIChannelMessageReactionUsersResult, RESTPatchAPIChannelJSONBody, RESTGetAPIChannelMessagesQuery, RESTGetAPIChannelMessagesResult, RESTGetAPIChannelPinsResult, RESTPostAPIChannelInviteJSONBody, RESTGetAPIChannelInvitesResult, RESTPostAPIChannelThreadsJSONBody, APIThreadChannel, RESTGetAPIChannelThreadsArchivedQuery, RESTGetAPIChannelUsersThreadsArchivedResult, RESTPostAPIChannelWebhookJSONBody, RESTGetAPIChannelWebhooksResult, RESTPutAPIChannelPermissionJSONBody, RESTPostAPIGuildsJSONBody, RESTPatchAPIGuildJSONBody, RESTPutAPIGuildMemberJSONBody, RESTPutAPIGuildMemberResult, RESTGetAPIGuildMembersQuery, RESTGetAPIGuildMembersResult, RESTGetAPIGuildChannelsResult, RESTPostAPIGuildChannelJSONBody, RESTPatchAPIGuildChannelPositionsJSONBody, RESTGetAPIGuildBansQuery, RESTGetAPIGuildBansResult, RESTPutAPIGuildBanJSONBody, RESTGetAPIGuildRolesResult, RESTPostAPIGuildRoleJSONBody, RESTPatchAPIGuildRolePositionsJSONBody, RESTPatchAPIGuildRolePositionsResult, RESTPatchAPIGuildRoleJSONBody, GuildMFALevel, RESTGetAPIGuildPruneCountQuery, RESTGetAPIGuildPruneCountResult, RESTPostAPIGuildPruneJSONBody, RESTPostAPIGuildPruneResult, RESTGetAPIGuildVoiceRegionsResult, RESTGetAPIGuildInvitesResult, RESTGetAPIGuildIntegrationsResult, RESTPatchAPIGuildWidgetSettingsJSONBody, RESTGetAPIGuildVanityUrlResult, GuildWidgetStyle, RESTPatchAPIGuildWelcomeScreenJSONBody, RESTPatchAPIGuildVoiceStateUserJSONBody, RESTGetAPIGuildEmojisResult, RESTPostAPIGuildEmojiJSONBody, RESTPatchAPIGuildEmojiJSONBody, RESTGetAPIGuildScheduledEventsQuery, RESTGetAPIGuildScheduledEventsResult, RESTPostAPIGuildScheduledEventJSONBody, RESTGetAPIGuildScheduledEventQuery, RESTPatchAPIGuildScheduledEventJSONBody, RESTGetAPIGuildScheduledEventUsersQuery, RESTGetAPIGuildScheduledEventUsersResult, RESTGetAPIGuildTemplatesResult, RESTPatchAPIGuildTemplateJSONBody, RESTGetAPIGuildStickersResult, RESTPostAPIGuildStickerFormDataBody, RESTPatchAPIGuildStickerJSONBody, RESTGetAPIAuditLogQuery, RESTGetAPIAutoModerationRulesResult, RESTPostAPIAutoModerationRuleJSONBody, RESTPatchAPIAutoModerationRuleJSONBody, RESTGetAPIGuildMembersSearchQuery, RESTGetAPIGuildMembersSearchResult, RESTPatchAPIGuildMemberJSONBody, RESTPostAPIGuildTemplatesJSONBody, RESTGetAPIGuildWebhooksResult, RESTPatchAPIGuildVoiceStateCurrentMemberJSONBody, RESTPutAPIGuildOnboardingJSONBody, RESTPatchAPIWebhookJSONBody, RESTPostAPIWebhookWithTokenJSONBody, RESTPostAPIWebhookWithTokenQuery, RESTPostAPIWebhookWithTokenWaitResult, RESTPostAPIWebhookWithTokenSlackQuery, RESTPostAPIWebhookWithTokenGitHubQuery, RESTGetAPIWebhookWithTokenMessageQuery, RESTPatchAPIWebhookWithTokenMessageJSONBody, APIInteractionResponseCallbackData, APIInteractionResponseDeferredChannelMessageWithSource, APICommandAutocompleteInteractionResponseCallbackData, APIModalInteractionResponseCallbackData, RESTGetAPIInviteQuery, RESTGetAPISKUsResult, RESTGetAPIEntitlementsQuery, RESTGetAPIEntitlementsResult, RESTPostAPIEntitlementBody, RESTOAuth2AuthorizationQuery, RESTPostOAuth2AccessTokenURLEncodedData, RESTPostOAuth2AccessTokenResult, RESTPostOAuth2RefreshTokenURLEncodedData, RESTPostOAuth2ClientCredentialsURLEncodedData, RESTGetAPIOAuth2CurrentApplicationResult, RESTGetAPIOAuth2CurrentAuthorizationResult, RESTGetAPIApplicationRoleConnectionMetadataResult, RESTPutAPIApplicationRoleConnectionMetadataJSONBody, RESTPutAPIApplicationRoleConnectionMetadataResult, RESTPostAPIStageInstanceJSONBody, RESTPatchAPIStageInstanceJSONBody, RESTGetStickerPacksResult, APIThreadMember, RESTGetAPIChannelThreadMembersResult, RESTGetAPICurrentUserGuildsQuery, RESTGetAPICurrentUserGuildsResult, RESTPatchAPICurrentUserJSONBody, RESTGetAPICurrentUserConnectionsResult, RESTPutAPICurrentUserApplicationRoleConnectionJSONBody, RESTGetAPIVoiceRegionsResult } from 'discord-api-types/v10';
|
|
4
4
|
export * from 'discord-api-types/v10';
|
|
5
5
|
|
|
6
6
|
declare class ApplicationCommandsAPI {
|
|
@@ -1367,6 +1367,15 @@ declare class InteractionsAPI {
|
|
|
1367
1367
|
* @param options - The options for sending the modal
|
|
1368
1368
|
*/
|
|
1369
1369
|
createModal(interactionId: Snowflake, interactionToken: string, callbackData: APIModalInteractionResponseCallbackData, { signal }?: Pick<RequestData, 'signal'>): Promise<void>;
|
|
1370
|
+
/**
|
|
1371
|
+
* Sends a premium required response to an interaction
|
|
1372
|
+
*
|
|
1373
|
+
* @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#create-interaction-response}
|
|
1374
|
+
* @param interactionId - The id of the interaction
|
|
1375
|
+
* @param interactionToken - The token of the interaction
|
|
1376
|
+
* @param options - The options for sending the premium required response
|
|
1377
|
+
*/
|
|
1378
|
+
sendPremiumRequired(interactionId: Snowflake, interactionToken: string, { signal }?: Pick<RequestData, 'signal'>): Promise<void>;
|
|
1370
1379
|
}
|
|
1371
1380
|
|
|
1372
1381
|
declare class InvitesAPI {
|
|
@@ -1391,6 +1400,45 @@ declare class InvitesAPI {
|
|
|
1391
1400
|
delete(code: string, { reason, signal }?: Pick<RequestData, 'reason' | 'signal'>): Promise<void>;
|
|
1392
1401
|
}
|
|
1393
1402
|
|
|
1403
|
+
declare class MonetizationAPI {
|
|
1404
|
+
private readonly rest;
|
|
1405
|
+
constructor(rest: REST);
|
|
1406
|
+
/**
|
|
1407
|
+
* Fetches the SKUs for an application.
|
|
1408
|
+
*
|
|
1409
|
+
* @see {@link https://discord.com/developers/docs/monetization/skus#list-skus}
|
|
1410
|
+
* @param options - The options for fetching the SKUs.
|
|
1411
|
+
*/
|
|
1412
|
+
getSKUs(applicationId: Snowflake, { signal }?: Pick<RequestData, 'signal'>): Promise<RESTGetAPISKUsResult>;
|
|
1413
|
+
/**
|
|
1414
|
+
* Fetches the entitlements for an application.
|
|
1415
|
+
*
|
|
1416
|
+
* @see {@link https://discord.com/developers/docs/monetization/entitlements#list-entitlements}
|
|
1417
|
+
* @param applicationId - The application id to fetch entitlements for
|
|
1418
|
+
* @param query - The query options for fetching entitlements
|
|
1419
|
+
* @param options - The options for fetching entitlements
|
|
1420
|
+
*/
|
|
1421
|
+
getEntitlements(applicationId: Snowflake, query: RESTGetAPIEntitlementsQuery, { signal }?: Pick<RequestData, 'signal'>): Promise<RESTGetAPIEntitlementsResult>;
|
|
1422
|
+
/**
|
|
1423
|
+
* Creates a test entitlement for an application's SKU.
|
|
1424
|
+
*
|
|
1425
|
+
* @see {@link https://discord.com/developers/docs/monetization/entitlements#create-test-entitlement}
|
|
1426
|
+
* @param applicationId - The application id to create the entitlement for
|
|
1427
|
+
* @param body - The data for creating the entitlement
|
|
1428
|
+
* @param options - The options for creating the entitlement
|
|
1429
|
+
*/
|
|
1430
|
+
createTestEntitlement(applicationId: Snowflake, body: RESTPostAPIEntitlementBody, { signal }?: Pick<RequestData, 'signal'>): Promise<Partial<Omit<discord_api_types_v10.APIEntitlement, "starts_at" | "ends_at">>>;
|
|
1431
|
+
/**
|
|
1432
|
+
* Deletes a test entitlement for an application's SKU.
|
|
1433
|
+
*
|
|
1434
|
+
* @see {@link https://discord.com/developers/docs/monetization/entitlements#delete-test-entitlement}
|
|
1435
|
+
* @param applicationId - The application id to delete the entitlement for
|
|
1436
|
+
* @param entitlementId - The entitlement id to delete
|
|
1437
|
+
* @param options - The options for deleting the entitlement
|
|
1438
|
+
*/
|
|
1439
|
+
deleteTestEntitlement(applicationId: Snowflake, entitlementId: Snowflake, { signal }?: Pick<RequestData, 'signal'>): Promise<void>;
|
|
1440
|
+
}
|
|
1441
|
+
|
|
1394
1442
|
declare class OAuth2API {
|
|
1395
1443
|
private readonly rest;
|
|
1396
1444
|
constructor(rest: REST);
|
|
@@ -1700,6 +1748,7 @@ declare class API {
|
|
|
1700
1748
|
readonly guilds: GuildsAPI;
|
|
1701
1749
|
readonly interactions: InteractionsAPI;
|
|
1702
1750
|
readonly invites: InvitesAPI;
|
|
1751
|
+
readonly monetization: MonetizationAPI;
|
|
1703
1752
|
readonly oauth2: OAuth2API;
|
|
1704
1753
|
readonly roleConnections: RoleConnectionsAPI;
|
|
1705
1754
|
readonly stageInstances: StageInstancesAPI;
|
|
@@ -1746,4 +1795,4 @@ declare function withFiles(files: DescriptiveRawFile[], options: APIInteractionR
|
|
|
1746
1795
|
*/
|
|
1747
1796
|
declare const version: string;
|
|
1748
1797
|
|
|
1749
|
-
export { API, ApplicationCommandsAPI, ApplicationsAPI, ChannelsAPI, DescriptiveRawFile, GuildsAPI, InteractionsAPI, InvitesAPI, OAuth2API, RoleConnectionsAPI, StageInstancesAPI, StartForumThreadOptions, StickersAPI, ThreadsAPI, UsersAPI, VoiceAPI, WebhooksAPI, version, withFiles };
|
|
1798
|
+
export { API, ApplicationCommandsAPI, ApplicationsAPI, ChannelsAPI, DescriptiveRawFile, GuildsAPI, InteractionsAPI, InvitesAPI, MonetizationAPI, OAuth2API, RoleConnectionsAPI, StageInstancesAPI, StartForumThreadOptions, StickersAPI, ThreadsAPI, UsersAPI, VoiceAPI, WebhooksAPI, version, withFiles };
|