dfx 0.105.0 → 0.107.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/mjs/types.mjs +30 -2
- package/mjs/types.mjs.map +1 -1
- package/mjs/utils/Effect.mjs +8 -13
- package/mjs/utils/Effect.mjs.map +1 -1
- package/mjs/version.mjs +1 -1
- package/package.json +4 -4
- package/src/types.ts +136 -30
- package/src/utils/Effect.ts +20 -37
- package/src/version.ts +1 -1
- package/tsconfig.tsbuildinfo +1 -1
- package/types.d.ts +123 -30
- package/types.d.ts.map +1 -1
- package/types.js +31 -3
- package/types.js.map +1 -1
- package/utils/Effect.d.ts.map +1 -1
- package/utils/Effect.js +8 -13
- package/utils/Effect.js.map +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
package/types.d.ts
CHANGED
|
@@ -97,25 +97,25 @@ export interface ActivityInstance {
|
|
|
97
97
|
readonly instance_id: string;
|
|
98
98
|
/** Unique identifier for the launch */
|
|
99
99
|
readonly launch_id: Snowflake;
|
|
100
|
-
/**
|
|
100
|
+
/** Location the instance is runnning in */
|
|
101
101
|
readonly location: ActivityLocation;
|
|
102
|
-
/**
|
|
102
|
+
/** IDs of the Users currently connected to the instance */
|
|
103
103
|
readonly users: Array<Snowflake>;
|
|
104
104
|
}
|
|
105
105
|
export interface ActivityLocation {
|
|
106
|
-
/**
|
|
106
|
+
/** Unique identifier for the location */
|
|
107
107
|
readonly id: string;
|
|
108
108
|
/** Enum describing kind of location */
|
|
109
109
|
readonly kind: ActivityLocationKind;
|
|
110
|
-
/**
|
|
110
|
+
/** ID of the Channel */
|
|
111
111
|
readonly channel_id: Snowflake;
|
|
112
|
-
/**
|
|
112
|
+
/** ID of the Guild */
|
|
113
113
|
readonly guild_id?: Snowflake | null;
|
|
114
114
|
}
|
|
115
115
|
export declare enum ActivityLocationKind {
|
|
116
|
-
/**
|
|
116
|
+
/** Location is a Guild Channel */
|
|
117
117
|
GC = "'gc'",
|
|
118
|
-
/**
|
|
118
|
+
/** Location is a Private Channel, such as a DM or GDM */
|
|
119
119
|
PC = "'pc'"
|
|
120
120
|
}
|
|
121
121
|
export interface ActivityParty {
|
|
@@ -231,6 +231,12 @@ export interface Application {
|
|
|
231
231
|
readonly interactions_endpoint_url?: string | null;
|
|
232
232
|
/** Role connection verification URL for the app */
|
|
233
233
|
readonly role_connections_verification_url?: string | null;
|
|
234
|
+
/** Event webhooks URL for the app to receive webhook events */
|
|
235
|
+
readonly event_webhooks_url?: string | null;
|
|
236
|
+
/** If webhook events are enabled for the app. 1 (default) means disabled, 2 means enabled, and 3 means disabled by Discord */
|
|
237
|
+
readonly event_webhooks_status: ApplicationEventWebhookStatus;
|
|
238
|
+
/** List of Webhook event types the app subscribes to */
|
|
239
|
+
readonly event_webhooks_types?: Array<EventType>;
|
|
234
240
|
/** List of tags describing the content and functionality of the app. Max of 5 tags. */
|
|
235
241
|
readonly tags?: Array<string>;
|
|
236
242
|
/** Settings for the app's default in-app authorization link, if enabled */
|
|
@@ -240,6 +246,16 @@ export interface Application {
|
|
|
240
246
|
/** Default custom authorization URL for the app, if enabled */
|
|
241
247
|
readonly custom_install_url?: string;
|
|
242
248
|
}
|
|
249
|
+
export interface ApplicationAuthorized {
|
|
250
|
+
/** Installation context for the authorization. Either guild (0) if installed to a server or user (1) if installed to a user's account */
|
|
251
|
+
readonly integration_type?: ApplicationIntegrationType;
|
|
252
|
+
/** User who authorized the app */
|
|
253
|
+
readonly user: User;
|
|
254
|
+
/** List of scopes the user authorized */
|
|
255
|
+
readonly scopes: Array<OAuth2Scope>;
|
|
256
|
+
/** Server which app was authorized for (when integration type is 0) */
|
|
257
|
+
readonly guild?: Guild;
|
|
258
|
+
}
|
|
243
259
|
export interface ApplicationCommand {
|
|
244
260
|
/** Unique ID of command */
|
|
245
261
|
readonly id: Snowflake;
|
|
@@ -304,6 +320,22 @@ export interface ApplicationCommandInteractionDataOption {
|
|
|
304
320
|
/** true if this option is the currently focused option for autocomplete */
|
|
305
321
|
readonly focused?: boolean;
|
|
306
322
|
}
|
|
323
|
+
export interface ApplicationCommandInteractionMetadatum {
|
|
324
|
+
/** ID of the interaction */
|
|
325
|
+
readonly id: Snowflake;
|
|
326
|
+
/** Type of interaction */
|
|
327
|
+
readonly type: InteractionType;
|
|
328
|
+
/** User who triggered the interaction */
|
|
329
|
+
readonly user: User;
|
|
330
|
+
/** IDs for installation context(s) related to an interaction. Details in Authorizing Integration Owners Object */
|
|
331
|
+
readonly authorizing_integration_owners: ApplicationIntegrationType;
|
|
332
|
+
/** ID of the original response message, present only on follow-up messages */
|
|
333
|
+
readonly original_response_message_id?: Snowflake;
|
|
334
|
+
/** The user the command was run on, present only on user command interactions */
|
|
335
|
+
readonly target_user?: User;
|
|
336
|
+
/** The ID of the message the command was run on, present only on message command interactions. The original response message will also have message_reference and referenced_message pointing to this message. */
|
|
337
|
+
readonly target_message_id?: Snowflake;
|
|
338
|
+
}
|
|
307
339
|
export interface ApplicationCommandOption {
|
|
308
340
|
/** Type of option */
|
|
309
341
|
readonly type: any;
|
|
@@ -379,6 +411,14 @@ export declare enum ApplicationCommandType {
|
|
|
379
411
|
/** A UI-based command that represents the primary way to invoke an app's Activity */
|
|
380
412
|
PRIMARY_ENTRY_POINT = 4
|
|
381
413
|
}
|
|
414
|
+
export declare enum ApplicationEventWebhookStatus {
|
|
415
|
+
/** Webhook events are disabled by developer */
|
|
416
|
+
DISABLED = 1,
|
|
417
|
+
/** Webhook events are enabled by developer */
|
|
418
|
+
ENABLED = 2,
|
|
419
|
+
/** Webhook events are disabled by Discord, usually due to inactivity */
|
|
420
|
+
DISABLED_BY_DISCORD = 3
|
|
421
|
+
}
|
|
382
422
|
export declare const ApplicationFlag: {
|
|
383
423
|
/** Indicates if an app uses the Auto Moderation API */
|
|
384
424
|
readonly APPLICATION_AUTO_MODERATION_RULE_CREATE_BADGE: number;
|
|
@@ -1360,6 +1400,12 @@ export interface EditCurrentApplicationParams {
|
|
|
1360
1400
|
readonly interactions_endpoint_url: string;
|
|
1361
1401
|
/** List of tags describing the content and functionality of the app (max of 20 characters per tag). Max of 5 tags. */
|
|
1362
1402
|
readonly tags: Array<string>;
|
|
1403
|
+
/** Event webhooks URL for the app to receive webhook events */
|
|
1404
|
+
readonly event_webhooks_url: string;
|
|
1405
|
+
/** If webhook events are enabled for the app. 1 to disable, and 2 to enable */
|
|
1406
|
+
readonly event_webhooks_status: ApplicationEventWebhookStatus;
|
|
1407
|
+
/** List of Webhook event types to subscribe to */
|
|
1408
|
+
readonly event_webhooks_types: Array<EventType>;
|
|
1363
1409
|
}
|
|
1364
1410
|
export interface EditGlobalApplicationCommandParams {
|
|
1365
1411
|
/** Name of command, 1-32 characters */
|
|
@@ -1740,7 +1786,7 @@ export interface Endpoints<O> {
|
|
|
1740
1786
|
getCurrentAuthorizationInformation: (options?: O) => RestResponse<GetCurrentAuthorizationInformationResponse>;
|
|
1741
1787
|
/** Returns the bot's application object. */
|
|
1742
1788
|
getCurrentBotApplicationInformation: (options?: O) => RestResponse<Application>;
|
|
1743
|
-
/** Returns the user object of the requester's account. For OAuth2, this requires the identify scope, which will return the object without an email, and optionally the email scope, which returns the object with an email. */
|
|
1789
|
+
/** Returns the user object of the requester's account. For OAuth2, this requires the identify scope, which will return the object without an email, and optionally the email scope, which returns the object with an email if the user has one. */
|
|
1744
1790
|
getCurrentUser: (options?: O) => RestResponse<User>;
|
|
1745
1791
|
/** Returns the application role connection for the user. Requires an OAuth2 access token with role_connections.write scope for the application specified in the path. */
|
|
1746
1792
|
getCurrentUserApplicationRoleConnection: (applicationId: string, options?: O) => RestResponse<ApplicationRoleConnection>;
|
|
@@ -1752,6 +1798,8 @@ export interface Endpoints<O> {
|
|
|
1752
1798
|
getCurrentUserGuilds: (params?: Partial<GetCurrentUserGuildParams>, options?: O) => RestResponse<Array<Guild>>;
|
|
1753
1799
|
/** Returns the current user's voice state in the guild. */
|
|
1754
1800
|
getCurrentUserVoiceState: (guildId: string, options?: O) => RestResponse<VoiceState>;
|
|
1801
|
+
/** Returns an entitlement. */
|
|
1802
|
+
getEntitlement: (applicationId: string, entitlementId: string, options?: O) => RestResponse<any>;
|
|
1755
1803
|
/** Returns a followup message for an Interaction. Functions the same as Get Webhook Message. */
|
|
1756
1804
|
getFollowupMessage: (applicationId: string, interactionToken: string, messageId: string, params?: Partial<GetWebhookMessageParams>, options?: O) => RestResponse<Message>;
|
|
1757
1805
|
getGateway: (options?: O) => RestResponse<any>;
|
|
@@ -1996,6 +2044,7 @@ export interface Entitlement {
|
|
|
1996
2044
|
readonly consumed?: boolean;
|
|
1997
2045
|
}
|
|
1998
2046
|
export type EntitlementCreateEvent = Entitlement;
|
|
2047
|
+
export type EntitlementCreateStructureEvent = Entitlement;
|
|
1999
2048
|
export type EntitlementDeleteEvent = Entitlement;
|
|
2000
2049
|
export declare enum EntitlementType {
|
|
2001
2050
|
/** Entitlement was purchased by user */
|
|
@@ -2020,6 +2069,22 @@ export declare enum EntryPointCommandHandlerType {
|
|
|
2020
2069
|
APP_HANDLER = 1,
|
|
2021
2070
|
DISCORD_LAUNCH_ACTIVITY = 2
|
|
2022
2071
|
}
|
|
2072
|
+
export interface EventBody {
|
|
2073
|
+
/** Event type */
|
|
2074
|
+
readonly type: EventType;
|
|
2075
|
+
/** Timestamp of when the event occurred in ISO8601 format */
|
|
2076
|
+
readonly timestamp: string;
|
|
2077
|
+
/** Data for the event. The shape depends on the event type */
|
|
2078
|
+
readonly data?: EventType;
|
|
2079
|
+
}
|
|
2080
|
+
export declare enum EventType {
|
|
2081
|
+
/** Sent when an app was authorized by a user to a server or their account */
|
|
2082
|
+
APPLICATION_AUTHORIZED = "APPLICATION_AUTHORIZED",
|
|
2083
|
+
/** Entitlement was created */
|
|
2084
|
+
ENTITLEMENT_CREATE = "ENTITLEMENT_CREATE",
|
|
2085
|
+
/** User was added to a Quest (currently unavailable) */
|
|
2086
|
+
QUEST_USER_ENROLLMENT = "QUEST_USER_ENROLLMENT"
|
|
2087
|
+
}
|
|
2023
2088
|
export declare enum EventType {
|
|
2024
2089
|
/** when a member sends or edits a message in the guild */
|
|
2025
2090
|
MESSAGE_SEND = 1,
|
|
@@ -2531,6 +2596,8 @@ export interface GuildMember {
|
|
|
2531
2596
|
readonly nick?: string | null;
|
|
2532
2597
|
/** the member's guild avatar hash */
|
|
2533
2598
|
readonly avatar?: string | null;
|
|
2599
|
+
/** the member's guild banner hash */
|
|
2600
|
+
readonly banner?: string | null;
|
|
2534
2601
|
/** array of role object ids */
|
|
2535
2602
|
readonly roles: Array<Snowflake>;
|
|
2536
2603
|
/** when the user joined the guild */
|
|
@@ -2588,7 +2655,7 @@ export interface GuildMembersChunkEvent {
|
|
|
2588
2655
|
readonly guild_id: Snowflake;
|
|
2589
2656
|
/** Set of guild members */
|
|
2590
2657
|
readonly members: Array<GuildMember>;
|
|
2591
|
-
/** Chunk index in the expected chunks for this response (0 <=
|
|
2658
|
+
/** Chunk index in the expected chunks for this response (0 <= chunk\_index < chunk\_count) */
|
|
2592
2659
|
readonly chunk_index: number;
|
|
2593
2660
|
/** Total number of expected chunks for this response */
|
|
2594
2661
|
readonly chunk_count: number;
|
|
@@ -2610,6 +2677,8 @@ export interface GuildMemberUpdateEvent {
|
|
|
2610
2677
|
readonly nick?: string | null;
|
|
2611
2678
|
/** Member's guild avatar hash */
|
|
2612
2679
|
readonly avatar?: string | null;
|
|
2680
|
+
/** Member's guild banner hash */
|
|
2681
|
+
readonly banner?: string | null;
|
|
2613
2682
|
/** When the user joined the guild */
|
|
2614
2683
|
readonly joined_at?: string | null;
|
|
2615
2684
|
/** When the user starting boosting the guild */
|
|
@@ -2833,7 +2902,12 @@ export interface GuildSoundboardSoundDeleteEvent {
|
|
|
2833
2902
|
/** ID of the guild the sound was in */
|
|
2834
2903
|
readonly guild_id: Snowflake;
|
|
2835
2904
|
}
|
|
2836
|
-
export
|
|
2905
|
+
export interface GuildSoundboardSoundsUpdateEvent {
|
|
2906
|
+
/** The guild's soundboard sounds */
|
|
2907
|
+
readonly soundboard_sounds: Array<SoundboardSound>;
|
|
2908
|
+
/** ID of the guild */
|
|
2909
|
+
readonly guild_id: Snowflake;
|
|
2910
|
+
}
|
|
2837
2911
|
export type GuildSoundboardSoundUpdateEvent = SoundboardSound;
|
|
2838
2912
|
export interface GuildStickersUpdateEvent {
|
|
2839
2913
|
/** ID of the guild */
|
|
@@ -2860,7 +2934,7 @@ export interface GuildTemplate {
|
|
|
2860
2934
|
readonly updated_at: string;
|
|
2861
2935
|
/** the ID of the guild this template is based on */
|
|
2862
2936
|
readonly source_guild_id: Snowflake;
|
|
2863
|
-
/** the guild snapshot this template contains */
|
|
2937
|
+
/** the guild snapshot this template contains; placeholder IDs are given as integers */
|
|
2864
2938
|
readonly serialized_source_guild: Guild;
|
|
2865
2939
|
/** whether the template has unsynced changes */
|
|
2866
2940
|
readonly is_dirty?: boolean | null;
|
|
@@ -3036,7 +3110,7 @@ export interface Interaction {
|
|
|
3036
3110
|
readonly context?: InteractionContextType;
|
|
3037
3111
|
}
|
|
3038
3112
|
export interface InteractionCallback {
|
|
3039
|
-
/**
|
|
3113
|
+
/** ID of the interaction */
|
|
3040
3114
|
readonly id: Snowflake;
|
|
3041
3115
|
/** Interaction type */
|
|
3042
3116
|
readonly type: InteractionType;
|
|
@@ -3093,7 +3167,7 @@ export interface InteractionCallbackResource {
|
|
|
3093
3167
|
readonly message?: Message;
|
|
3094
3168
|
}
|
|
3095
3169
|
export interface InteractionCallbackResponse {
|
|
3096
|
-
/** The interaction object associated with the */
|
|
3170
|
+
/** The interaction object associated with the interaction response. */
|
|
3097
3171
|
readonly interaction: InteractionCallback;
|
|
3098
3172
|
/** The resource that was created by the interaction response. */
|
|
3099
3173
|
readonly resource?: InteractionCallbackResource;
|
|
@@ -3430,7 +3504,7 @@ export interface Message {
|
|
|
3430
3504
|
readonly message_snapshots: Array<MessageSnapshot>;
|
|
3431
3505
|
/** the message associated with the message_reference */
|
|
3432
3506
|
readonly referenced_message?: Message | null;
|
|
3433
|
-
/**
|
|
3507
|
+
/** Sent if the message is sent as a result of an interaction */
|
|
3434
3508
|
readonly interaction_metadata?: MessageInteractionMetadatum;
|
|
3435
3509
|
/** Deprecated in favor of interaction_metadata; sent if the message is a response to an interaction */
|
|
3436
3510
|
readonly interaction?: MessageInteraction;
|
|
@@ -3481,6 +3555,20 @@ export interface MessageComponentDatum {
|
|
|
3481
3555
|
/** Resolved entities from selected options */
|
|
3482
3556
|
readonly resolved?: ResolvedDatum;
|
|
3483
3557
|
}
|
|
3558
|
+
export interface MessageComponentInteractionMetadatum {
|
|
3559
|
+
/** ID of the interaction */
|
|
3560
|
+
readonly id: Snowflake;
|
|
3561
|
+
/** Type of interaction */
|
|
3562
|
+
readonly type: InteractionType;
|
|
3563
|
+
/** User who triggered the interaction */
|
|
3564
|
+
readonly user: User;
|
|
3565
|
+
/** IDs for installation context(s) related to an interaction. Details in Authorizing Integration Owners Object */
|
|
3566
|
+
readonly authorizing_integration_owners: ApplicationIntegrationType;
|
|
3567
|
+
/** ID of the original response message, present only on follow-up messages */
|
|
3568
|
+
readonly original_response_message_id?: Snowflake;
|
|
3569
|
+
/** ID of the message that contained the interactive component */
|
|
3570
|
+
readonly interacted_message_id: Snowflake;
|
|
3571
|
+
}
|
|
3484
3572
|
export type MessageCreateEvent = Message & MessageCreateExtra;
|
|
3485
3573
|
export interface MessageCreateExtra {
|
|
3486
3574
|
/** ID of the guild the message was sent in - unless it is an ephemeral message */
|
|
@@ -3542,22 +3630,7 @@ export interface MessageInteraction {
|
|
|
3542
3630
|
/** Member who invoked the interaction in the guild */
|
|
3543
3631
|
readonly member?: GuildMember;
|
|
3544
3632
|
}
|
|
3545
|
-
export
|
|
3546
|
-
/** ID of the interaction */
|
|
3547
|
-
readonly id: Snowflake;
|
|
3548
|
-
/** Type of interaction */
|
|
3549
|
-
readonly type: InteractionType;
|
|
3550
|
-
/** User who triggered the interaction */
|
|
3551
|
-
readonly user: User;
|
|
3552
|
-
/** IDs for installation context(s) related to an interaction. Details in Authorizing Integration Owners Object */
|
|
3553
|
-
readonly authorizing_integration_owners: ApplicationIntegrationType;
|
|
3554
|
-
/** ID of the original response message, present only on follow-up messages */
|
|
3555
|
-
readonly original_response_message_id?: Snowflake;
|
|
3556
|
-
/** ID of the message that contained interactive component, present only on messages created from component interactions */
|
|
3557
|
-
readonly interacted_message_id?: Snowflake;
|
|
3558
|
-
/** Metadata for the interaction that was used to open the modal, present only on modal submit interactions */
|
|
3559
|
-
readonly triggering_interaction_metadata?: MessageInteractionMetadatum;
|
|
3560
|
-
}
|
|
3633
|
+
export type MessageInteractionMetadatum = ApplicationCommandInteractionMetadatum | MessageComponentInteractionMetadatum | ModalSubmitInteractionMetadatum;
|
|
3561
3634
|
export interface MessagePollVoteAddEvent {
|
|
3562
3635
|
/** ID of the user */
|
|
3563
3636
|
readonly user_id: Snowflake;
|
|
@@ -3712,6 +3785,20 @@ export interface ModalSubmitDatum {
|
|
|
3712
3785
|
/** Values submitted by the user */
|
|
3713
3786
|
readonly components: Array<Component>;
|
|
3714
3787
|
}
|
|
3788
|
+
export interface ModalSubmitInteractionMetadatum {
|
|
3789
|
+
/** ID of the interaction */
|
|
3790
|
+
readonly id: Snowflake;
|
|
3791
|
+
/** Type of interaction */
|
|
3792
|
+
readonly type: InteractionType;
|
|
3793
|
+
/** User who triggered the interaction */
|
|
3794
|
+
readonly user: User;
|
|
3795
|
+
/** IDs for installation context(s) related to an interaction. Details in Authorizing Integration Owners Object */
|
|
3796
|
+
readonly authorizing_integration_owners: ApplicationIntegrationType;
|
|
3797
|
+
/** ID of the original response message, present only on follow-up messages */
|
|
3798
|
+
readonly original_response_message_id?: Snowflake;
|
|
3799
|
+
/** Metadata for the interaction that was used to open the modal */
|
|
3800
|
+
readonly triggering_interaction_metadata: ApplicationCommandInteractionMetadatum;
|
|
3801
|
+
}
|
|
3715
3802
|
export interface ModifyApplicationEmojiParams {
|
|
3716
3803
|
/** name of the emoji */
|
|
3717
3804
|
readonly name: string;
|
|
@@ -5287,6 +5374,12 @@ export interface WebhooksUpdateEvent {
|
|
|
5287
5374
|
/** ID of the channel */
|
|
5288
5375
|
readonly channel_id: Snowflake;
|
|
5289
5376
|
}
|
|
5377
|
+
export declare enum WebhookType {
|
|
5378
|
+
/** PING event sent to verify your Webhook Event URL is active */
|
|
5379
|
+
PING = 0,
|
|
5380
|
+
/** Webhook event (details for event in event body object) */
|
|
5381
|
+
EVENT = 1
|
|
5382
|
+
}
|
|
5290
5383
|
export declare enum WebhookType {
|
|
5291
5384
|
/** Incoming Webhooks can post messages to channels with a generated token */
|
|
5292
5385
|
INCOMING = 1,
|