mirror of
https://github.com/discordjs/discord-api-types.git
synced 2026-05-22 19:30:09 +00:00
Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
1d8399d925 | ||
|
|
a8efb1949a |
@@ -1,3 +1,9 @@
|
||||
## [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
|
||||
|
||||
@@ -1,3 +1,9 @@
|
||||
## [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
|
||||
|
||||
@@ -24,8 +24,11 @@ import type {
|
||||
GuildSystemChannelFlags,
|
||||
GuildVerificationLevel,
|
||||
GuildWidgetStyle,
|
||||
APIGuildOnboardingPrompt,
|
||||
APIGuildOnboardingPromptOption,
|
||||
} from '../../payloads/v10/mod.ts';
|
||||
import type {
|
||||
AddUndefinedToPossiblyUndefinedPropertiesOfInterface,
|
||||
DistributiveOmit,
|
||||
DistributivePick,
|
||||
Nullable,
|
||||
@@ -930,10 +933,42 @@ export type RESTGetAPIGuildOnboardingResult = APIGuildOnboarding;
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/guild#modify-guild-onboarding
|
||||
*/
|
||||
export type RESTPutAPIGuildOnboardingJSONBody = Pick<
|
||||
APIGuildOnboarding,
|
||||
'default_channel_ids' | 'enabled' | 'mode' | 'prompts'
|
||||
>;
|
||||
export type RESTPutAPIGuildOnboardingJSONBody = AddUndefinedToPossiblyUndefinedPropertiesOfInterface<
|
||||
Partial<Pick<APIGuildOnboarding, 'default_channel_ids' | 'enabled' | 'mode'>>
|
||||
> & {
|
||||
/**
|
||||
* Prompts shown during onboarding and in customize community
|
||||
*/
|
||||
prompts?: RESTAPIModifyGuildOnboardingPromptData[] | undefined;
|
||||
};
|
||||
|
||||
export type RESTAPIModifyGuildOnboardingPromptData = Pick<APIGuildOnboardingPrompt, 'id' | 'title'> &
|
||||
AddUndefinedToPossiblyUndefinedPropertiesOfInterface<
|
||||
Partial<Omit<APIGuildOnboardingPrompt, 'id' | 'title' | 'options' | 'guild_id'>>
|
||||
> & {
|
||||
/**
|
||||
* Options available within the prompt
|
||||
*/
|
||||
options: RESTAPIModifyGuildOnboardingPromptOptionData[];
|
||||
};
|
||||
|
||||
export type RESTAPIModifyGuildOnboardingPromptOptionData = Pick<APIGuildOnboardingPromptOption, 'title'> &
|
||||
AddUndefinedToPossiblyUndefinedPropertiesOfInterface<
|
||||
Partial<Omit<APIGuildOnboardingPromptOption, 'title' | 'emoji' | 'guild_id'>>
|
||||
> & {
|
||||
/**
|
||||
* Emoji id
|
||||
*/
|
||||
emoji_id?: Snowflake | null | undefined;
|
||||
/**
|
||||
* Emoji name
|
||||
*/
|
||||
emoji_name?: string | null | undefined;
|
||||
/**
|
||||
* Whether this emoji is animated
|
||||
*/
|
||||
emoji_animated?: boolean | null | undefined;
|
||||
};
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/guild#modify-guild-onboarding
|
||||
|
||||
@@ -24,8 +24,11 @@ import type {
|
||||
GuildWidgetStyle,
|
||||
APIDMChannel,
|
||||
APIGroupDMChannel,
|
||||
APIGuildOnboardingPrompt,
|
||||
APIGuildOnboardingPromptOption,
|
||||
} from '../../payloads/v9/mod.ts';
|
||||
import type {
|
||||
AddUndefinedToPossiblyUndefinedPropertiesOfInterface,
|
||||
DistributiveOmit,
|
||||
DistributivePick,
|
||||
Nullable,
|
||||
@@ -936,10 +939,42 @@ export type RESTGetAPIGuildOnboardingResult = APIGuildOnboarding;
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/guild#modify-guild-onboarding
|
||||
*/
|
||||
export type RESTPutAPIGuildOnboardingJSONBody = Pick<
|
||||
APIGuildOnboarding,
|
||||
'default_channel_ids' | 'enabled' | 'mode' | 'prompts'
|
||||
>;
|
||||
export type RESTPutAPIGuildOnboardingJSONBody = AddUndefinedToPossiblyUndefinedPropertiesOfInterface<
|
||||
Partial<Pick<APIGuildOnboarding, 'default_channel_ids' | 'enabled' | 'mode'>>
|
||||
> & {
|
||||
/**
|
||||
* Prompts shown during onboarding and in customize community
|
||||
*/
|
||||
prompts?: RESTAPIModifyGuildOnboardingPromptData[] | undefined;
|
||||
};
|
||||
|
||||
export type RESTAPIModifyGuildOnboardingPromptData = Pick<APIGuildOnboardingPrompt, 'id' | 'title'> &
|
||||
AddUndefinedToPossiblyUndefinedPropertiesOfInterface<
|
||||
Partial<Omit<APIGuildOnboardingPrompt, 'id' | 'title' | 'options' | 'guild_id'>>
|
||||
> & {
|
||||
/**
|
||||
* Options available within the prompt
|
||||
*/
|
||||
options: RESTAPIModifyGuildOnboardingPromptOptionData[];
|
||||
};
|
||||
|
||||
export type RESTAPIModifyGuildOnboardingPromptOptionData = Pick<APIGuildOnboardingPromptOption, 'title'> &
|
||||
AddUndefinedToPossiblyUndefinedPropertiesOfInterface<
|
||||
Partial<Omit<APIGuildOnboardingPromptOption, 'title' | 'emoji' | 'guild_id'>>
|
||||
> & {
|
||||
/**
|
||||
* Emoji id
|
||||
*/
|
||||
emoji_id?: Snowflake | null | undefined;
|
||||
/**
|
||||
* Emoji name
|
||||
*/
|
||||
emoji_name?: string | null | undefined;
|
||||
/**
|
||||
* Whether this emoji is animated
|
||||
*/
|
||||
emoji_animated?: boolean | null | undefined;
|
||||
};
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/guild#modify-guild-onboarding
|
||||
|
||||
4
package-lock.json
generated
4
package-lock.json
generated
@@ -1,12 +1,12 @@
|
||||
{
|
||||
"name": "discord-api-types",
|
||||
"version": "0.37.62",
|
||||
"version": "0.37.63",
|
||||
"lockfileVersion": 3,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "discord-api-types",
|
||||
"version": "0.37.62",
|
||||
"version": "0.37.63",
|
||||
"license": "MIT",
|
||||
"devDependencies": {
|
||||
"@babel/runtime-corejs3": "^7.18.0",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "discord-api-types",
|
||||
"version": "0.37.62",
|
||||
"version": "0.37.63",
|
||||
"description": "Discord API typings that are kept up to date for use in bot library creation.",
|
||||
"homepage": "https://discord-api-types.dev",
|
||||
"exports": {
|
||||
|
||||
@@ -24,8 +24,11 @@ import type {
|
||||
GuildSystemChannelFlags,
|
||||
GuildVerificationLevel,
|
||||
GuildWidgetStyle,
|
||||
APIGuildOnboardingPrompt,
|
||||
APIGuildOnboardingPromptOption,
|
||||
} from '../../payloads/v10/index';
|
||||
import type {
|
||||
AddUndefinedToPossiblyUndefinedPropertiesOfInterface,
|
||||
DistributiveOmit,
|
||||
DistributivePick,
|
||||
Nullable,
|
||||
@@ -930,10 +933,42 @@ export type RESTGetAPIGuildOnboardingResult = APIGuildOnboarding;
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/guild#modify-guild-onboarding
|
||||
*/
|
||||
export type RESTPutAPIGuildOnboardingJSONBody = Pick<
|
||||
APIGuildOnboarding,
|
||||
'default_channel_ids' | 'enabled' | 'mode' | 'prompts'
|
||||
>;
|
||||
export type RESTPutAPIGuildOnboardingJSONBody = AddUndefinedToPossiblyUndefinedPropertiesOfInterface<
|
||||
Partial<Pick<APIGuildOnboarding, 'default_channel_ids' | 'enabled' | 'mode'>>
|
||||
> & {
|
||||
/**
|
||||
* Prompts shown during onboarding and in customize community
|
||||
*/
|
||||
prompts?: RESTAPIModifyGuildOnboardingPromptData[] | undefined;
|
||||
};
|
||||
|
||||
export type RESTAPIModifyGuildOnboardingPromptData = Pick<APIGuildOnboardingPrompt, 'id' | 'title'> &
|
||||
AddUndefinedToPossiblyUndefinedPropertiesOfInterface<
|
||||
Partial<Omit<APIGuildOnboardingPrompt, 'id' | 'title' | 'options' | 'guild_id'>>
|
||||
> & {
|
||||
/**
|
||||
* Options available within the prompt
|
||||
*/
|
||||
options: RESTAPIModifyGuildOnboardingPromptOptionData[];
|
||||
};
|
||||
|
||||
export type RESTAPIModifyGuildOnboardingPromptOptionData = Pick<APIGuildOnboardingPromptOption, 'title'> &
|
||||
AddUndefinedToPossiblyUndefinedPropertiesOfInterface<
|
||||
Partial<Omit<APIGuildOnboardingPromptOption, 'title' | 'emoji' | 'guild_id'>>
|
||||
> & {
|
||||
/**
|
||||
* Emoji id
|
||||
*/
|
||||
emoji_id?: Snowflake | null | undefined;
|
||||
/**
|
||||
* Emoji name
|
||||
*/
|
||||
emoji_name?: string | null | undefined;
|
||||
/**
|
||||
* Whether this emoji is animated
|
||||
*/
|
||||
emoji_animated?: boolean | null | undefined;
|
||||
};
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/guild#modify-guild-onboarding
|
||||
|
||||
@@ -24,8 +24,11 @@ import type {
|
||||
GuildWidgetStyle,
|
||||
APIDMChannel,
|
||||
APIGroupDMChannel,
|
||||
APIGuildOnboardingPrompt,
|
||||
APIGuildOnboardingPromptOption,
|
||||
} from '../../payloads/v9/index';
|
||||
import type {
|
||||
AddUndefinedToPossiblyUndefinedPropertiesOfInterface,
|
||||
DistributiveOmit,
|
||||
DistributivePick,
|
||||
Nullable,
|
||||
@@ -936,10 +939,42 @@ export type RESTGetAPIGuildOnboardingResult = APIGuildOnboarding;
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/guild#modify-guild-onboarding
|
||||
*/
|
||||
export type RESTPutAPIGuildOnboardingJSONBody = Pick<
|
||||
APIGuildOnboarding,
|
||||
'default_channel_ids' | 'enabled' | 'mode' | 'prompts'
|
||||
>;
|
||||
export type RESTPutAPIGuildOnboardingJSONBody = AddUndefinedToPossiblyUndefinedPropertiesOfInterface<
|
||||
Partial<Pick<APIGuildOnboarding, 'default_channel_ids' | 'enabled' | 'mode'>>
|
||||
> & {
|
||||
/**
|
||||
* Prompts shown during onboarding and in customize community
|
||||
*/
|
||||
prompts?: RESTAPIModifyGuildOnboardingPromptData[] | undefined;
|
||||
};
|
||||
|
||||
export type RESTAPIModifyGuildOnboardingPromptData = Pick<APIGuildOnboardingPrompt, 'id' | 'title'> &
|
||||
AddUndefinedToPossiblyUndefinedPropertiesOfInterface<
|
||||
Partial<Omit<APIGuildOnboardingPrompt, 'id' | 'title' | 'options' | 'guild_id'>>
|
||||
> & {
|
||||
/**
|
||||
* Options available within the prompt
|
||||
*/
|
||||
options: RESTAPIModifyGuildOnboardingPromptOptionData[];
|
||||
};
|
||||
|
||||
export type RESTAPIModifyGuildOnboardingPromptOptionData = Pick<APIGuildOnboardingPromptOption, 'title'> &
|
||||
AddUndefinedToPossiblyUndefinedPropertiesOfInterface<
|
||||
Partial<Omit<APIGuildOnboardingPromptOption, 'title' | 'emoji' | 'guild_id'>>
|
||||
> & {
|
||||
/**
|
||||
* Emoji id
|
||||
*/
|
||||
emoji_id?: Snowflake | null | undefined;
|
||||
/**
|
||||
* Emoji name
|
||||
*/
|
||||
emoji_name?: string | null | undefined;
|
||||
/**
|
||||
* Whether this emoji is animated
|
||||
*/
|
||||
emoji_animated?: boolean | null | undefined;
|
||||
};
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/guild#modify-guild-onboarding
|
||||
|
||||
30
tests/v10/onboarding.test-d.ts
Normal file
30
tests/v10/onboarding.test-d.ts
Normal file
@@ -0,0 +1,30 @@
|
||||
import { expectAssignable } from 'tsd';
|
||||
import type { APIGuildOnboarding, RESTPutAPIGuildOnboardingJSONBody } from '../../v10';
|
||||
|
||||
declare const onboarding: APIGuildOnboarding;
|
||||
|
||||
expectAssignable<RESTPutAPIGuildOnboardingJSONBody>({});
|
||||
expectAssignable<RESTPutAPIGuildOnboardingJSONBody>(onboarding);
|
||||
expectAssignable<RESTPutAPIGuildOnboardingJSONBody>({
|
||||
default_channel_ids: ['123456789012345678'],
|
||||
prompts: [
|
||||
{
|
||||
id: '123456789012345678',
|
||||
title: 'This is a title',
|
||||
options: [
|
||||
{
|
||||
title: 'yeet',
|
||||
emoji_name: '😎',
|
||||
role_ids: undefined,
|
||||
},
|
||||
{
|
||||
id: '123456789012345678',
|
||||
title: 'yeet with id',
|
||||
emoji_id: '123456789012345678',
|
||||
},
|
||||
],
|
||||
in_onboarding: undefined,
|
||||
},
|
||||
],
|
||||
enabled: undefined,
|
||||
});
|
||||
File diff suppressed because one or more lines are too long
@@ -1 +1 @@
|
||||
[{"entryPoints":{"globals":{"path":"globals.ts","label":"Global Types"},"gateway/common":{"path":"gateway/common.ts","label":"Gateway - Common Types"},"payloads/common":{"path":"payloads/common.ts","label":"Payloads - Common Types"},"rest/common":{"path":"rest/common.ts","label":"REST - Common Types"},"rpc/common":{"path":"rpc/common.ts","label":"RPC - Common Types"},"v6":{"path":"v6.ts","label":"API v6 - Deprecated"},"v8":{"path":"v8.ts","label":"API v8 - Deprecated"},"v9":{"path":"v9.ts","label":"API v9"},"v10":{"path":"v10.ts","label":"API v10"},"rpc/v8":{"path":"rpc/v8.ts","label":"RPC v8"},"rpc/v9":{"path":"rpc/v9.ts","label":"RPC v9"},"rpc/v10":{"path":"rpc/v10.ts","label":"RPC v10"},"voice/v4":{"path":"voice/v4.ts","label":"Voice v4"},"utils/v8":{"path":"utils/v8.ts","label":"Utils v8"},"utils/v9":{"path":"utils/v9.ts","label":"Utils v9"},"utils/v10":{"path":"utils/v10.ts","label":"Utils v10"}},"packagePath":"./","packageSlug":"discord-api-types","packageName":"discord-api-types","packageVersion":"0.37.61"}]
|
||||
[{"entryPoints":{"globals":{"path":"globals.ts","label":"Global Types"},"gateway/common":{"path":"gateway/common.ts","label":"Gateway - Common Types"},"payloads/common":{"path":"payloads/common.ts","label":"Payloads - Common Types"},"rest/common":{"path":"rest/common.ts","label":"REST - Common Types"},"rpc/common":{"path":"rpc/common.ts","label":"RPC - Common Types"},"v6":{"path":"v6.ts","label":"API v6 - Deprecated"},"v8":{"path":"v8.ts","label":"API v8 - Deprecated"},"v9":{"path":"v9.ts","label":"API v9"},"v10":{"path":"v10.ts","label":"API v10"},"rpc/v8":{"path":"rpc/v8.ts","label":"RPC v8"},"rpc/v9":{"path":"rpc/v9.ts","label":"RPC v9"},"rpc/v10":{"path":"rpc/v10.ts","label":"RPC v10"},"voice/v4":{"path":"voice/v4.ts","label":"Voice v4"},"utils/v8":{"path":"utils/v8.ts","label":"Utils v8"},"utils/v9":{"path":"utils/v9.ts","label":"Utils v9"},"utils/v10":{"path":"utils/v10.ts","label":"Utils v10"}},"packagePath":"./","packageSlug":"discord-api-types","packageName":"discord-api-types","packageVersion":"0.37.63"}]
|
||||
1
website/versioned_docs/version-0.37.63/api-typedoc.json
Normal file
1
website/versioned_docs/version-0.37.63/api-typedoc.json
Normal file
File diff suppressed because one or more lines are too long
|
Before Width: | Height: | Size: 126 KiB After Width: | Height: | Size: 126 KiB |
@@ -1,4 +1,4 @@
|
||||
[
|
||||
"0.37.62",
|
||||
"0.37.61"
|
||||
"0.37.63",
|
||||
"0.37.62"
|
||||
]
|
||||
Reference in New Issue
Block a user