dfx 0.97.6 → 0.98.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.
Files changed (99) hide show
  1. package/Cache/driver.d.ts.map +1 -1
  2. package/Cache/memory.d.ts.map +1 -1
  3. package/Cache/memoryTTL.d.ts.map +1 -1
  4. package/Cache/prelude.d.ts +1 -1
  5. package/Cache/prelude.d.ts.map +1 -1
  6. package/Cache.d.ts.map +1 -1
  7. package/DiscordConfig.d.ts +5 -5
  8. package/DiscordConfig.d.ts.map +1 -1
  9. package/DiscordConfig.js +2 -2
  10. package/DiscordConfig.js.map +1 -1
  11. package/DiscordGateway/Messaging.d.ts +2 -2
  12. package/DiscordGateway/Messaging.d.ts.map +1 -1
  13. package/DiscordGateway/Shard/heartbeats.d.ts.map +1 -1
  14. package/DiscordGateway/Shard/identify.d.ts.map +1 -1
  15. package/DiscordGateway/Shard/sendEvents.d.ts.map +1 -1
  16. package/DiscordGateway/Shard/utils.d.ts.map +1 -1
  17. package/DiscordGateway/Shard.d.ts +2 -2
  18. package/DiscordGateway/Shard.js +2 -2
  19. package/DiscordGateway/Shard.js.map +1 -1
  20. package/DiscordGateway/Sharder.d.ts +1 -1
  21. package/DiscordGateway/Sharder.d.ts.map +1 -1
  22. package/DiscordGateway.d.ts +1 -1
  23. package/DiscordGateway.d.ts.map +1 -1
  24. package/DiscordREST/types.d.ts +6 -5
  25. package/DiscordREST/types.d.ts.map +1 -1
  26. package/DiscordREST/utils.d.ts +4 -4
  27. package/DiscordREST/utils.d.ts.map +1 -1
  28. package/DiscordREST/utils.js +3 -3
  29. package/DiscordREST/utils.js.map +1 -1
  30. package/DiscordREST.d.ts +7 -5
  31. package/DiscordREST.d.ts.map +1 -1
  32. package/DiscordREST.js +10 -9
  33. package/DiscordREST.js.map +1 -1
  34. package/Helpers/flags.d.ts.map +1 -1
  35. package/Helpers/intents.d.ts +2 -2
  36. package/Helpers/intents.d.ts.map +1 -1
  37. package/Helpers/interactions.d.ts.map +1 -1
  38. package/Helpers/members.d.ts.map +1 -1
  39. package/Helpers/permissions.d.ts +2 -2
  40. package/Helpers/permissions.d.ts.map +1 -1
  41. package/Helpers/ui.d.ts.map +1 -1
  42. package/Interactions/builder.d.ts +1 -2
  43. package/Interactions/builder.d.ts.map +1 -1
  44. package/Interactions/builder.js +2 -2
  45. package/Interactions/builder.js.map +1 -1
  46. package/Interactions/context.d.ts +3 -3
  47. package/Interactions/context.d.ts.map +1 -1
  48. package/Interactions/definitions.d.ts +5 -5
  49. package/Interactions/definitions.d.ts.map +1 -1
  50. package/Interactions/gateway.d.ts +2 -2
  51. package/Interactions/gateway.d.ts.map +1 -1
  52. package/Interactions/gateway.js +2 -2
  53. package/Interactions/gateway.js.map +1 -1
  54. package/Interactions/handlers.d.ts +1 -4
  55. package/Interactions/handlers.d.ts.map +1 -1
  56. package/Interactions/index.d.ts.map +1 -1
  57. package/Interactions/utils.d.ts +1 -4
  58. package/Interactions/utils.d.ts.map +1 -1
  59. package/Interactions/webhook.d.ts.map +1 -1
  60. package/RateLimit.d.ts.map +1 -1
  61. package/gateway.d.ts +2 -2
  62. package/gateway.d.ts.map +1 -1
  63. package/index.d.ts +1 -1
  64. package/index.d.ts.map +1 -1
  65. package/mjs/DiscordConfig.mjs +2 -2
  66. package/mjs/DiscordConfig.mjs.map +1 -1
  67. package/mjs/DiscordGateway/Shard.mjs +2 -2
  68. package/mjs/DiscordGateway/Shard.mjs.map +1 -1
  69. package/mjs/DiscordREST/utils.mjs +3 -3
  70. package/mjs/DiscordREST/utils.mjs.map +1 -1
  71. package/mjs/DiscordREST.mjs +10 -9
  72. package/mjs/DiscordREST.mjs.map +1 -1
  73. package/mjs/Interactions/builder.mjs +2 -2
  74. package/mjs/Interactions/builder.mjs.map +1 -1
  75. package/mjs/Interactions/gateway.mjs +2 -2
  76. package/mjs/Interactions/gateway.mjs.map +1 -1
  77. package/mjs/types.mjs +2 -1
  78. package/mjs/types.mjs.map +1 -1
  79. package/mjs/version.mjs +1 -1
  80. package/package.json +4 -4
  81. package/src/Cache/prelude.ts +1 -1
  82. package/src/DiscordConfig.ts +7 -9
  83. package/src/DiscordGateway/Shard.ts +2 -2
  84. package/src/DiscordREST/types.ts +6 -5
  85. package/src/DiscordREST/utils.ts +6 -6
  86. package/src/DiscordREST.ts +24 -21
  87. package/src/Interactions/builder.ts +2 -2
  88. package/src/Interactions/gateway.ts +4 -3
  89. package/src/types.ts +4 -1
  90. package/src/version.ts +1 -1
  91. package/types.d.ts +5 -2
  92. package/types.d.ts.map +1 -1
  93. package/types.js +2 -1
  94. package/types.js.map +1 -1
  95. package/utils/Effect.d.ts.map +1 -1
  96. package/version.d.ts +1 -1
  97. package/version.js +1 -1
  98. package/webhooks.d.ts +1 -1
  99. package/webhooks.d.ts.map +1 -1
@@ -6,7 +6,8 @@ import * as Effect from "effect/Effect"
6
6
  import * as Layer from "effect/Layer"
7
7
  import * as Queue from "effect/Queue"
8
8
  import * as Ref from "effect/Ref"
9
- import * as Http from "@effect/platform/HttpClient"
9
+ import * as HttpBody from "@effect/platform/HttpBody"
10
+ import type * as HttpClientError from "@effect/platform/HttpClientError"
10
11
  import { DiscordGateway } from "dfx/DiscordGateway"
11
12
  import type { DiscordRESTError } from "dfx/DiscordREST"
12
13
  import { DiscordREST } from "dfx/DiscordREST"
@@ -48,7 +49,7 @@ export const run =
48
49
  ix: InteractionBuilder<R, E, TE>,
49
50
  ): Effect.Effect<
50
51
  never,
51
- E2 | DiscordRESTError | Http.error.ResponseError,
52
+ E2 | DiscordRESTError | HttpClientError.ResponseError,
52
53
  DiscordREST | DiscordGateway | Exclude<R2, DiscordInteraction>
53
54
  > =>
54
55
  Effect.gen(function* () {
@@ -77,7 +78,7 @@ export const run =
77
78
  const globalSync = rest.bulkOverwriteGlobalApplicationCommands(
78
79
  application.id,
79
80
  {
80
- body: Http.body.unsafeJson(
81
+ body: HttpBody.unsafeJson(
81
82
  GlobalApplicationCommand.map(_ => _.command),
82
83
  ),
83
84
  },
package/src/types.ts CHANGED
@@ -779,6 +779,8 @@ export interface Button {
779
779
  readonly emoji?: Emoji
780
780
  /** Developer-defined identifier for the button; max 100 characters */
781
781
  readonly custom_id?: string
782
+ /** Identifier for a purchasable SKU, only available when using premium-style buttons */
783
+ readonly sku_id?: Snowflake
782
784
  /** URL for link-style buttons */
783
785
  readonly url?: string
784
786
  /** Whether the button is disabled (defaults to false) */
@@ -790,6 +792,7 @@ export enum ButtonStyle {
790
792
  SUCCESS = 3,
791
793
  DANGER = 4,
792
794
  LINK = 5,
795
+ PREMIUM = 6,
793
796
  }
794
797
  export interface Channel {
795
798
  /** the id of this channel */
@@ -4865,7 +4868,7 @@ export enum InteractionCallbackType {
4865
4868
  APPLICATION_COMMAND_AUTOCOMPLETE_RESULT = 8,
4866
4869
  /** respond to an interaction with a popup modal */
4867
4870
  MODAL = 9,
4868
- /** respond to an interaction with an upgrade button, only available for apps with monetization enabled */
4871
+ /** Deprecated; respond to an interaction with an upgrade button, only available for apps with monetization enabled */
4869
4872
  PREMIUM_REQUIRED = 10,
4870
4873
  }
4871
4874
  export enum InteractionContextType {
package/src/version.ts CHANGED
@@ -1 +1 @@
1
- export const LIB_VERSION = "0.97.6";
1
+ export const LIB_VERSION = "0.98.0";
package/types.d.ts CHANGED
@@ -777,6 +777,8 @@ export interface Button {
777
777
  readonly emoji?: Emoji;
778
778
  /** Developer-defined identifier for the button; max 100 characters */
779
779
  readonly custom_id?: string;
780
+ /** Identifier for a purchasable SKU, only available when using premium-style buttons */
781
+ readonly sku_id?: Snowflake;
780
782
  /** URL for link-style buttons */
781
783
  readonly url?: string;
782
784
  /** Whether the button is disabled (defaults to false) */
@@ -787,7 +789,8 @@ export declare enum ButtonStyle {
787
789
  SECONDARY = 2,
788
790
  SUCCESS = 3,
789
791
  DANGER = 4,
790
- LINK = 5
792
+ LINK = 5,
793
+ PREMIUM = 6
791
794
  }
792
795
  export interface Channel {
793
796
  /** the id of this channel */
@@ -2881,7 +2884,7 @@ export declare enum InteractionCallbackType {
2881
2884
  APPLICATION_COMMAND_AUTOCOMPLETE_RESULT = 8,
2882
2885
  /** respond to an interaction with a popup modal */
2883
2886
  MODAL = 9,
2884
- /** respond to an interaction with an upgrade button, only available for apps with monetization enabled */
2887
+ /** Deprecated; respond to an interaction with an upgrade button, only available for apps with monetization enabled */
2885
2888
  PREMIUM_REQUIRED = 10
2886
2889
  }
2887
2890
  export declare enum InteractionContextType {