Skip to content

Commit

Permalink
fix: nullable recurrence_rule on patch (#1063)
Browse files Browse the repository at this point in the history
  • Loading branch information
almeidx authored Aug 19, 2024
1 parent 31b3766 commit 19d2aeb
Show file tree
Hide file tree
Showing 4 changed files with 40 additions and 60 deletions.
25 changes: 10 additions & 15 deletions deno/rest/v10/guildScheduledEvent.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { Snowflake } from '../../globals.ts';
import type { StrictPartial } from '../../utils/internals.ts';
import type { Nullable, StrictPartial } from '../../utils/internals.ts';
import type {
APIGuildScheduledEvent,
APIGuildScheduledEventEntityMetadata,
Expand Down Expand Up @@ -94,20 +94,15 @@ export type RESTGetAPIGuildScheduledEventResult = APIGuildScheduledEvent;
/**
* https://discord.com/developers/docs/resources/guild-scheduled-event#modify-guild-scheduled-event
*/
export type RESTPatchAPIGuildScheduledEventJSONBody = StrictPartial<RESTPostAPIGuildScheduledEventJSONBody> & {
/**
* The status of the scheduled event
*/
status?: GuildScheduledEventStatus | undefined;
/**
* The entity metadata of the scheduled event
*/
entity_metadata?: APIGuildScheduledEventEntityMetadata | null | undefined;
/**
* The description of the guild event
*/
description?: string | null | undefined;
};
export type RESTPatchAPIGuildScheduledEventJSONBody = Nullable<
Pick<RESTPostAPIGuildScheduledEventJSONBody, 'description' | 'entity_metadata' | 'recurrence_rule'>
> &
StrictPartial<Omit<RESTPostAPIGuildScheduledEventJSONBody, 'recurrence_rule'>> & {
/**
* The status of the scheduled event
*/
status?: GuildScheduledEventStatus | undefined;
};

/**
* https://discord.com/developers/docs/resources/guild-scheduled-event#modify-guild-scheduled-event
Expand Down
25 changes: 10 additions & 15 deletions deno/rest/v9/guildScheduledEvent.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { Snowflake } from '../../globals.ts';
import type { StrictPartial } from '../../utils/internals.ts';
import type { Nullable, StrictPartial } from '../../utils/internals.ts';
import type {
APIGuildScheduledEvent,
APIGuildScheduledEventEntityMetadata,
Expand Down Expand Up @@ -94,20 +94,15 @@ export type RESTGetAPIGuildScheduledEventResult = APIGuildScheduledEvent;
/**
* https://discord.com/developers/docs/resources/guild-scheduled-event#modify-guild-scheduled-event
*/
export type RESTPatchAPIGuildScheduledEventJSONBody = StrictPartial<RESTPostAPIGuildScheduledEventJSONBody> & {
/**
* The status of the scheduled event
*/
status?: GuildScheduledEventStatus | undefined;
/**
* The entity metadata of the scheduled event
*/
entity_metadata?: APIGuildScheduledEventEntityMetadata | null | undefined;
/**
* The description of the guild event
*/
description?: string | null | undefined;
};
export type RESTPatchAPIGuildScheduledEventJSONBody = Nullable<
Pick<RESTPostAPIGuildScheduledEventJSONBody, 'description' | 'entity_metadata' | 'recurrence_rule'>
> &
StrictPartial<Omit<RESTPostAPIGuildScheduledEventJSONBody, 'recurrence_rule'>> & {
/**
* The status of the scheduled event
*/
status?: GuildScheduledEventStatus | undefined;
};

/**
* https://discord.com/developers/docs/resources/guild-scheduled-event#modify-guild-scheduled-event
Expand Down
25 changes: 10 additions & 15 deletions rest/v10/guildScheduledEvent.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { Snowflake } from '../../globals';
import type { StrictPartial } from '../../utils/internals';
import type { Nullable, StrictPartial } from '../../utils/internals';
import type {
APIGuildScheduledEvent,
APIGuildScheduledEventEntityMetadata,
Expand Down Expand Up @@ -94,20 +94,15 @@ export type RESTGetAPIGuildScheduledEventResult = APIGuildScheduledEvent;
/**
* https://discord.com/developers/docs/resources/guild-scheduled-event#modify-guild-scheduled-event
*/
export type RESTPatchAPIGuildScheduledEventJSONBody = StrictPartial<RESTPostAPIGuildScheduledEventJSONBody> & {
/**
* The status of the scheduled event
*/
status?: GuildScheduledEventStatus | undefined;
/**
* The entity metadata of the scheduled event
*/
entity_metadata?: APIGuildScheduledEventEntityMetadata | null | undefined;
/**
* The description of the guild event
*/
description?: string | null | undefined;
};
export type RESTPatchAPIGuildScheduledEventJSONBody = Nullable<
Pick<RESTPostAPIGuildScheduledEventJSONBody, 'description' | 'entity_metadata' | 'recurrence_rule'>
> &
StrictPartial<Omit<RESTPostAPIGuildScheduledEventJSONBody, 'recurrence_rule'>> & {
/**
* The status of the scheduled event
*/
status?: GuildScheduledEventStatus | undefined;
};

/**
* https://discord.com/developers/docs/resources/guild-scheduled-event#modify-guild-scheduled-event
Expand Down
25 changes: 10 additions & 15 deletions rest/v9/guildScheduledEvent.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { Snowflake } from '../../globals';
import type { StrictPartial } from '../../utils/internals';
import type { Nullable, StrictPartial } from '../../utils/internals';
import type {
APIGuildScheduledEvent,
APIGuildScheduledEventEntityMetadata,
Expand Down Expand Up @@ -94,20 +94,15 @@ export type RESTGetAPIGuildScheduledEventResult = APIGuildScheduledEvent;
/**
* https://discord.com/developers/docs/resources/guild-scheduled-event#modify-guild-scheduled-event
*/
export type RESTPatchAPIGuildScheduledEventJSONBody = StrictPartial<RESTPostAPIGuildScheduledEventJSONBody> & {
/**
* The status of the scheduled event
*/
status?: GuildScheduledEventStatus | undefined;
/**
* The entity metadata of the scheduled event
*/
entity_metadata?: APIGuildScheduledEventEntityMetadata | null | undefined;
/**
* The description of the guild event
*/
description?: string | null | undefined;
};
export type RESTPatchAPIGuildScheduledEventJSONBody = Nullable<
Pick<RESTPostAPIGuildScheduledEventJSONBody, 'description' | 'entity_metadata' | 'recurrence_rule'>
> &
StrictPartial<Omit<RESTPostAPIGuildScheduledEventJSONBody, 'recurrence_rule'>> & {
/**
* The status of the scheduled event
*/
status?: GuildScheduledEventStatus | undefined;
};

/**
* https://discord.com/developers/docs/resources/guild-scheduled-event#modify-guild-scheduled-event
Expand Down

0 comments on commit 19d2aeb

Please sign in to comment.