dfx 0.56.0 → 0.57.0

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/types.d.ts CHANGED
@@ -173,8 +173,10 @@ export interface Application {
173
173
  readonly verify_key: string;
174
174
  /** if the application belongs to a team, this will be a list of the members of that team */
175
175
  readonly team?: Team | null;
176
- /** if this application is a game sold on Discord, this field will be the guild to which it has been linked */
176
+ /** guild associated with the app. For example, a developer support server. */
177
177
  readonly guild_id?: Snowflake;
178
+ /** a partial object of the associated guild */
179
+ readonly guild?: Guild;
178
180
  /** if this application is a game sold on Discord, this field will be the id of the "Game SKU" that is created, if exists */
179
181
  readonly primary_sku_id?: Snowflake;
180
182
  /** if this application is a game sold on Discord, this field will be the URL slug that links to the store page */
@@ -183,6 +185,8 @@ export interface Application {
183
185
  readonly cover_image?: string;
184
186
  /** the application's public flags */
185
187
  readonly flags?: number;
188
+ /** an approximate count of the app's guild membership. */
189
+ readonly approximate_guild_count?: number;
186
190
  /** up to 5 tags describing the content and functionality of the application */
187
191
  readonly tags?: string[];
188
192
  /** settings for the application's default in-app authorization link, if enabled */
@@ -410,7 +414,13 @@ export interface Attachment {
410
414
  readonly duration_secs?: number;
411
415
  /** base64 encoded bytearray representing a sampled waveform (currently for voice messages) */
412
416
  readonly waveform?: string;
417
+ /** attachment flags combined as a bitfield */
418
+ readonly flags?: number;
413
419
  }
420
+ export declare const AttachmentFlag: {
421
+ /** this attachment has been edited using the remix feature on mobile */
422
+ readonly IS_REMIX: number;
423
+ };
414
424
  export interface AuditEntryInfo {
415
425
  /** ID of the app whose permissions were targeted */
416
426
  readonly application_id: Snowflake;
@@ -585,7 +595,11 @@ export declare const enum AuditLogEvent {
585
595
  /** Message was flagged by Auto Moderation */
586
596
  AUTO_MODERATION_FLAG_TO_CHANNEL = 144,
587
597
  /** Member was timed out by Auto Moderation */
588
- AUTO_MODERATION_USER_COMMUNICATION_DISABLED = 145
598
+ AUTO_MODERATION_USER_COMMUNICATION_DISABLED = 145,
599
+ /** Creator monetization request was created */
600
+ CREATOR_MONETIZATION_REQUEST_CREATED = 150,
601
+ /** Creator monetization terms were accepted */
602
+ CREATOR_MONETIZATION_TERMS_ACCEPTED = 151
589
603
  }
590
604
  export interface AutoModerationAction {
591
605
  /** the type of action */
@@ -1010,6 +1024,8 @@ export interface CreateGuildChannelParams {
1010
1024
  readonly available_tags: ForumTag[];
1011
1025
  /** the default sort order type used to order posts in GUILD_FORUM channels */
1012
1026
  readonly default_sort_order: SortOrderType;
1027
+ /** the default forum layout view used to display posts in GUILD_FORUM channels */
1028
+ readonly default_forum_layout: ForumLayoutType;
1013
1029
  }
1014
1030
  export interface CreateGuildEmojiParams {
1015
1031
  /** name of the emoji */
@@ -1514,6 +1530,8 @@ export interface Endpoints<O> {
1514
1530
  getChannelMessages: (channelId: string, params?: Partial<GetChannelMessageParams>, options?: O) => RestResponse<Message[]>;
1515
1531
  /** Returns a list of channel webhook objects. Requires the MANAGE_WEBHOOKS permission. */
1516
1532
  getChannelWebhooks: (channelId: string, options?: O) => RestResponse<Webhook[]>;
1533
+ /** Returns the application object associated with the requesting bot user. */
1534
+ getCurrentApplication: (options?: O) => RestResponse<Application>;
1517
1535
  /** Returns info about the current authorization. Requires authentication with a bearer token. */
1518
1536
  getCurrentAuthorizationInformation: (options?: O) => RestResponse<GetCurrentAuthorizationInformationResponse>;
1519
1537
  /** Returns the bot's application object. */
@@ -1668,6 +1686,8 @@ export interface Endpoints<O> {
1668
1686
  modifyGuildMember: (guildId: string, userId: string, params?: Partial<ModifyGuildMemberParams>, options?: O) => RestResponse<GuildMember>;
1669
1687
  /** Modify a guild's MFA level. Requires guild ownership. Returns the updated level on success. Fires a Guild Update Gateway event. */
1670
1688
  modifyGuildMfaLevel: (guildId: string, params?: Partial<ModifyGuildMfaLevelParams>, options?: O) => RestResponse<MfaLevel>;
1689
+ /** Modifies the onboarding configuration of the guild. Returns a 200 with the Onboarding object for the guild. Requires the MANAGE_GUILD and MANAGE_ROLES permissions. */
1690
+ modifyGuildOnboarding: (guildId: string, params?: Partial<ModifyGuildOnboardingParams>, options?: O) => RestResponse<GuildOnboarding>;
1671
1691
  /** Modify a guild role. Requires the MANAGE_ROLES permission. Returns the updated role on success. Fires a Guild Role Update Gateway event. */
1672
1692
  modifyGuildRole: (guildId: string, roleId: string, params?: Partial<ModifyGuildRoleParams>, options?: O) => RestResponse<Role>;
1673
1693
  /** Modify the positions of a set of role objects for the guild. Requires the MANAGE_ROLES permission. Returns a list of all of the guild's role objects on success. Fires multiple Guild Role Update Gateway events. */
@@ -1680,7 +1700,7 @@ export interface Endpoints<O> {
1680
1700
  modifyGuildTemplate: (guildId: string, templateCode: string, params?: Partial<ModifyGuildTemplateParams>, options?: O) => RestResponse<GuildTemplate>;
1681
1701
  /** Modify the guild's Welcome Screen. Requires the MANAGE_GUILD permission. Returns the updated Welcome Screen object. May fire a Guild Update Gateway event. */
1682
1702
  modifyGuildWelcomeScreen: (guildId: string, params?: Partial<ModifyGuildWelcomeScreenParams>, options?: O) => RestResponse<WelcomeScreen>;
1683
- /** Modify a guild widget settings object for the guild. All attributes may be passed in with JSON and modified. Requires the MANAGE_GUILD permission. Returns the updated guild widget object. */
1703
+ /** Modify a guild widget settings object for the guild. All attributes may be passed in with JSON and modified. Requires the MANAGE_GUILD permission. Returns the updated guild widget settings object. */
1684
1704
  modifyGuildWidget: (guildId: string, options?: O) => RestResponse<GuildWidgetSetting>;
1685
1705
  /** Updates fields of an existing Stage instance. Returns the updated Stage instance. Fires a Stage Instance Update Gateway event. */
1686
1706
  modifyStageInstance: (channelId: string, params?: Partial<ModifyStageInstanceParams>, options?: O) => RestResponse<StageInstance>;
@@ -1897,6 +1917,8 @@ export interface GetCurrentUserGuildParams {
1897
1917
  readonly after: Snowflake;
1898
1918
  /** max number of guilds to return (1-200) */
1899
1919
  readonly limit: number;
1920
+ /** include approximate member and presence counts in response */
1921
+ readonly with_counts: boolean;
1900
1922
  }
1901
1923
  export interface GetGatewayBotResponse {
1902
1924
  /** WSS URL that can be used for connecting to the Gateway */
@@ -2063,9 +2085,9 @@ export interface Guild {
2063
2085
  readonly max_video_channel_users?: number;
2064
2086
  /** the maximum amount of users in a stage video channel */
2065
2087
  readonly max_stage_video_channel_users?: number;
2066
- /** approximate number of members in this guild, returned from the GET /guilds/<id> endpoint when with_counts is true */
2088
+ /** approximate number of members in this guild, returned from the GET /guilds/<id> and /users/@me/guilds endpoints when with_counts is true */
2067
2089
  readonly approximate_member_count?: number;
2068
- /** approximate number of non-offline members in this guild, returned from the GET /guilds/<id> endpoint when with_counts is true */
2090
+ /** approximate number of non-offline members in this guild, returned from the GET /guilds/<id> and /users/@me/guilds endpoints when with_counts is true */
2069
2091
  readonly approximate_presence_count?: number;
2070
2092
  /** the welcome screen of a Community guild, shown to new members, returned in an Invite's guild object */
2071
2093
  readonly welcome_screen?: WelcomeScreen;
@@ -2295,6 +2317,8 @@ export interface GuildOnboarding {
2295
2317
  readonly default_channel_ids: Snowflake[];
2296
2318
  /** Whether onboarding is enabled in the guild */
2297
2319
  readonly enabled: boolean;
2320
+ /** Current mode of onboarding */
2321
+ readonly mode: OnboardingMode;
2298
2322
  }
2299
2323
  export interface GuildPreview {
2300
2324
  /** guild id */
@@ -3055,6 +3079,8 @@ export interface MessageReactionAddEvent {
3055
3079
  readonly member?: GuildMember;
3056
3080
  /** Emoji used to react - example */
3057
3081
  readonly emoji: Emoji;
3082
+ /** ID of the user who authored the message which was reacted to */
3083
+ readonly message_author_id?: Snowflake;
3058
3084
  }
3059
3085
  export interface MessageReactionRemoveAllEvent {
3060
3086
  /** ID of the channel */
@@ -3281,6 +3307,16 @@ export interface ModifyGuildMfaLevelParams {
3281
3307
  /** MFA level */
3282
3308
  readonly level: MfaLevel;
3283
3309
  }
3310
+ export interface ModifyGuildOnboardingParams {
3311
+ /** Prompts shown during onboarding and in customize community */
3312
+ readonly prompts: OnboardingPrompt[];
3313
+ /** Channel IDs that members get opted into automatically */
3314
+ readonly default_channel_ids: Snowflake[];
3315
+ /** Whether onboarding is enabled in the guild */
3316
+ readonly enabled: boolean;
3317
+ /** Current mode of onboarding */
3318
+ readonly mode: OnboardingMode;
3319
+ }
3284
3320
  export interface ModifyGuildParams {
3285
3321
  /** guild name */
3286
3322
  readonly name: string;
@@ -3475,6 +3511,12 @@ export declare const enum OAuth2Scope {
3475
3511
  /** this generates a webhook that is returned in the oauth token response for authorization code grants */
3476
3512
  WEBHOOK_INCOMING = "webhook.incoming"
3477
3513
  }
3514
+ export declare const enum OnboardingMode {
3515
+ /** Counts only Default Channels towards constraints */
3516
+ ONBOARDING_DEFAULT = 0,
3517
+ /** Counts Default Channels and Questions towards constraints */
3518
+ ONBOARDING_ADVANCED = 1
3519
+ }
3478
3520
  export interface OnboardingPrompt {
3479
3521
  /** ID of the prompt */
3480
3522
  readonly id: Snowflake;
@@ -3815,7 +3857,13 @@ export interface Role {
3815
3857
  readonly mentionable: boolean;
3816
3858
  /** the tags this role has */
3817
3859
  readonly tags?: RoleTag;
3860
+ /** role flags combined as a bitfield */
3861
+ readonly flags: number;
3818
3862
  }
3863
+ export declare const RoleFlag: {
3864
+ /** role can be selected by members in an onboarding prompt */
3865
+ readonly IN_PROMPT: number;
3866
+ };
3819
3867
  export interface RoleSubscriptionDatum {
3820
3868
  /** the id of the sku and listing that the user is subscribed to */
3821
3869
  readonly role_subscription_listing_id: Snowflake;
@@ -4274,6 +4322,8 @@ export interface User {
4274
4322
  readonly premium_type?: PremiumType;
4275
4323
  /** the public flags on a user's account */
4276
4324
  readonly public_flags?: number;
4325
+ /** the user's avatar decoration hash */
4326
+ readonly avatar_decoration?: string | null;
4277
4327
  }
4278
4328
  export declare const UserFlag: {
4279
4329
  /** Discord Employee */