dfx 0.66.1 → 0.66.2

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.
@@ -24,21 +24,21 @@ export interface OpsOptions<E, A> {
24
24
  remove: Stream.Stream<never, E, string>;
25
25
  }
26
26
  export declare const ops: <E, T>({ create, id, remove, update }: OpsOptions<E, T>) => Stream.Stream<never, E, CacheOp<T>>;
27
- export declare const guilds: <RM, EM, E>(makeDriver: Effect.Effect<RM, EM, CacheDriver<E, Discord.Guild>>) => Effect.Effect<DiscordREST | DiscordGateway | RM, EM, {
28
- get: (id: string) => Effect.Effect<never, import("../DiscordREST").DiscordRESTError | import("@effect/platform/Http/ClientError").ResponseError | E, Discord.Guild>;
27
+ export declare const guilds: <RM, EM, E>(makeDriver: Effect.Effect<RM, EM, CacheDriver<E, Discord.Guild>>) => Effect.Effect<RM | DiscordGateway | DiscordREST, EM, {
28
+ get: (id: string) => Effect.Effect<never, E | import("../DiscordREST").DiscordRESTError | import("@effect/platform/Http/ClientError").ResponseError, Discord.Guild>;
29
29
  put: (_: Discord.Guild) => Effect.Effect<never, E, void>;
30
- update: <R, E_1>(id: string, f: (_: Discord.Guild) => Effect.Effect<R, E_1, Discord.Guild>) => Effect.Effect<R, import("../DiscordREST").DiscordRESTError | import("@effect/platform/Http/ClientError").ResponseError | E | E_1, Discord.Guild>;
30
+ update: <R, E_1>(id: string, f: (_: Discord.Guild) => Effect.Effect<R, E_1, Discord.Guild>) => Effect.Effect<R, E | import("../DiscordREST").DiscordRESTError | import("@effect/platform/Http/ClientError").ResponseError | E_1, Discord.Guild>;
31
31
  run: Effect.Effect<never, E, void>;
32
32
  size: Effect.Effect<never, E, number>;
33
33
  set: (resourceId: string, resource: Discord.Guild) => Effect.Effect<never, E, void>;
34
34
  delete: (resourceId: string) => Effect.Effect<never, E, void>;
35
35
  refreshTTL: (resourceId: string) => Effect.Effect<never, E, void>;
36
36
  }>;
37
- export declare const channels: <RM, EM, E>(makeDriver: Effect.Effect<RM, EM, ParentCacheDriver<E, Discord.Channel>>) => Effect.Effect<DiscordREST | DiscordGateway | RM, EM, {
38
- get: (parentId: string, id: string) => Effect.Effect<never, import("../DiscordREST").DiscordRESTError | import("@effect/platform/Http/ClientError").ResponseError | E, Discord.Channel>;
39
- put: (_: Discord.Channel) => Effect.Effect<never, import("../DiscordREST").DiscordRESTError | import("@effect/platform/Http/ClientError").ResponseError | E, void>;
40
- update: <R, E_1>(parentId: string, id: string, f: (_: Discord.Channel) => Effect.Effect<R, E_1, Discord.Channel>) => Effect.Effect<R, import("../DiscordREST").DiscordRESTError | import("@effect/platform/Http/ClientError").ResponseError | E | E_1, Discord.Channel>;
41
- getForParent: (parentId: string) => Effect.Effect<never, import("../DiscordREST").DiscordRESTError | import("@effect/platform/Http/ClientError").ResponseError | E, ReadonlyMap<string, Discord.Channel>>;
37
+ export declare const channels: <RM, EM, E>(makeDriver: Effect.Effect<RM, EM, ParentCacheDriver<E, Discord.Channel>>) => Effect.Effect<RM | DiscordGateway | DiscordREST, EM, {
38
+ get: (parentId: string, id: string) => Effect.Effect<never, E | import("../DiscordREST").DiscordRESTError | import("@effect/platform/Http/ClientError").ResponseError, Discord.Channel>;
39
+ put: (_: Discord.Channel) => Effect.Effect<never, E | import("../DiscordREST").DiscordRESTError | import("@effect/platform/Http/ClientError").ResponseError, void>;
40
+ update: <R, E_1>(parentId: string, id: string, f: (_: Discord.Channel) => Effect.Effect<R, E_1, Discord.Channel>) => Effect.Effect<R, E | import("../DiscordREST").DiscordRESTError | import("@effect/platform/Http/ClientError").ResponseError | E_1, Discord.Channel>;
41
+ getForParent: (parentId: string) => Effect.Effect<never, E | import("../DiscordREST").DiscordRESTError | import("@effect/platform/Http/ClientError").ResponseError, ReadonlyMap<string, Discord.Channel>>;
42
42
  run: Effect.Effect<never, E, void>;
43
43
  size: Effect.Effect<never, E, number>;
44
44
  sizeForParent: (parentId: string) => Effect.Effect<never, E, number>;
@@ -47,11 +47,11 @@ export declare const channels: <RM, EM, E>(makeDriver: Effect.Effect<RM, EM, Par
47
47
  parentDelete: (parentId: string) => Effect.Effect<never, E, void>;
48
48
  refreshTTL: (parentId: string, resourceId: string) => Effect.Effect<never, E, void>;
49
49
  }>;
50
- export declare const roles: <RM, EM, E>(makeDriver: Effect.Effect<RM, EM, ParentCacheDriver<E, Discord.Role>>) => Effect.Effect<DiscordREST | DiscordGateway | RM, EM, {
50
+ export declare const roles: <RM, EM, E>(makeDriver: Effect.Effect<RM, EM, ParentCacheDriver<E, Discord.Role>>) => Effect.Effect<RM | DiscordGateway | DiscordREST, EM, {
51
51
  get: (parentId: string, id: string) => Effect.Effect<never, E | CacheMissError, Discord.Role>;
52
52
  put: (_: Discord.Role) => Effect.Effect<never, E | CacheMissError, void>;
53
53
  update: <R, E_1>(parentId: string, id: string, f: (_: Discord.Role) => Effect.Effect<R, E_1, Discord.Role>) => Effect.Effect<R, E | CacheMissError | E_1, Discord.Role>;
54
- getForParent: (parentId: string) => Effect.Effect<never, import("../DiscordREST").DiscordRESTError | import("@effect/platform/Http/ClientError").ResponseError | E, ReadonlyMap<string, Discord.Role>>;
54
+ getForParent: (parentId: string) => Effect.Effect<never, E | import("../DiscordREST").DiscordRESTError | import("@effect/platform/Http/ClientError").ResponseError, ReadonlyMap<string, Discord.Role>>;
55
55
  run: Effect.Effect<never, E, void>;
56
56
  size: Effect.Effect<never, E, number>;
57
57
  sizeForParent: (parentId: string) => Effect.Effect<never, E, number>;
@@ -19,7 +19,7 @@ export declare const make: Effect.Effect<RateLimiter | Log | DiscordConfig | Dis
19
19
  export interface Shard extends Effect.Effect.Success<typeof make> {
20
20
  }
21
21
  export declare const Shard: Tag<Shard, Shard>;
22
- export declare const LiveShard: Layer.Layer<import("dfx/RateLimit").RateLimitStore | Log | DiscordConfig | import("dfx/DiscordGateway/DiscordWS").DiscordWSCodec, never, Shard>;
22
+ export declare const LiveShard: Layer.Layer<import("dfx/RateLimit").RateLimitStore | Log | import("dfx/DiscordGateway/DiscordWS").DiscordWSCodec | DiscordConfig, never, Shard>;
23
23
  export interface RunningShard extends Effect.Effect.Success<ReturnType<Shard["connect"]>> {
24
24
  }
25
25
  //# sourceMappingURL=Shard.d.ts.map
@@ -12,13 +12,13 @@ import type { WebSocketCloseError, WebSocketError } from "dfx/DiscordGateway/WS"
12
12
  import { DiscordREST } from "dfx/DiscordREST";
13
13
  import { RateLimiter } from "dfx/RateLimit";
14
14
  import type * as Discord from "dfx/types";
15
- declare const make: Effect.Effect<RateLimiter | DiscordREST | DiscordConfig | ShardStore | Shard, never, {
15
+ declare const make: Effect.Effect<DiscordREST | RateLimiter | ShardStore | DiscordConfig | Shard, never, {
16
16
  readonly shards: Effect.Effect<never, never, HashSet.HashSet<RunningShard>>;
17
17
  readonly run: (hub: Hub.Hub<Discord.GatewayPayload<Discord.ReceiveEvent>>, sendQueue: Queue.Dequeue<Discord.GatewayPayload<Discord.SendEvent>>) => Effect.Effect<never, WebSocketError | WebSocketCloseError, never>;
18
18
  }>;
19
19
  export interface Sharder extends Effect.Effect.Success<typeof make> {
20
20
  }
21
21
  export declare const Sharder: Tag<Sharder, Sharder>;
22
- export declare const LiveSharder: Layer.Layer<import("dfx/RateLimit").RateLimitStore | import("../Log").Log | DiscordREST | DiscordConfig | ShardStore | import("./DiscordWS").DiscordWSCodec, never, Sharder>;
22
+ export declare const LiveSharder: Layer.Layer<DiscordREST | import("dfx/RateLimit").RateLimitStore | import("../Log").Log | ShardStore | import("./DiscordWS").DiscordWSCodec | DiscordConfig, never, Sharder>;
23
23
  export {};
24
24
  //# sourceMappingURL=Sharder.d.ts.map
@@ -17,5 +17,5 @@ export interface DiscordGateway {
17
17
  }
18
18
  export declare const DiscordGateway: Tag<DiscordGateway, DiscordGateway>;
19
19
  export declare const make: Effect.Effect<Sharder, never, DiscordGateway>;
20
- export declare const LiveDiscordGateway: Layer.Layer<import("./RateLimit").RateLimitStore | import("./Log").Log | import("./DiscordREST").DiscordREST | import("./DiscordConfig").DiscordConfig | import("./DiscordGateway/ShardStore").ShardStore | import("./DiscordGateway/DiscordWS").DiscordWSCodec, never, DiscordGateway>;
20
+ export declare const LiveDiscordGateway: Layer.Layer<import("./DiscordREST").DiscordREST | import("./RateLimit").RateLimitStore | import("./Log").Log | import("./DiscordGateway/ShardStore").ShardStore | import("./DiscordGateway/DiscordWS").DiscordWSCodec | import("./DiscordConfig").DiscordConfig, never, DiscordGateway>;
21
21
  //# sourceMappingURL=DiscordGateway.d.ts.map
@@ -16,7 +16,7 @@ export interface RunOpts {
16
16
  /**
17
17
  * @tsplus pipeable dfx/InteractionBuilder runGateway
18
18
  */
19
- export declare const run: <R, R2, E, TE, E2>(postHandler: (effect: Effect.Effect<Discord.Interaction | DiscordREST | R, DefinitionNotFound | DiscordRESTError | TE, void>) => Effect.Effect<R2, E2, void>, { sync }?: RunOpts) => (ix: InteractionBuilder<R, E, TE>) => Effect.Effect<DiscordREST | DiscordGateway | Exclude<R2, Discord.Interaction>, DiscordRESTError | Http.error.ResponseError | E2, never>;
19
+ export declare const run: <R, R2, E, TE, E2>(postHandler: (effect: Effect.Effect<DiscordREST | Discord.Interaction | R, DiscordRESTError | DefinitionNotFound | TE, void>) => Effect.Effect<R2, E2, void>, { sync }?: RunOpts) => (ix: InteractionBuilder<R, E, TE>) => Effect.Effect<DiscordGateway | DiscordREST | Exclude<R2, Discord.Interaction>, DiscordRESTError | Http.error.ResponseError | E2, never>;
20
20
  export interface InteractionsRegistry {
21
21
  readonly register: <E>(ix: InteractionBuilder<never, E, never>) => Effect.Effect<never, never, void>;
22
22
  readonly run: <R, E>(onError: (_: Cause<DiscordRESTError | DefinitionNotFound>) => Effect.Effect<R, E, void>, opts?: RunOpts) => Effect.Effect<DiscordREST | DiscordGateway | Exclude<R, Discord.Interaction>, DiscordRESTError | Http.error.ResponseError | E, never>;
@@ -59,7 +59,7 @@ export interface HandleWebhookOpts<E> {
59
59
  /**
60
60
  * @tsplus getter dfx/InteractionBuilder webhookHandler
61
61
  */
62
- export declare const makeHandler: <R, E, TE>(ix: InteractionBuilder<R, E, TE>) => ({ body, error, headers, success, }: HandleWebhookOpts<BadWebhookSignature | WebhookParseError | E | DefinitionNotFound>) => Effect.Effect<WebhookConfig, never, void>;
62
+ export declare const makeHandler: <R, E, TE>(ix: InteractionBuilder<R, E, TE>) => ({ body, error, headers, success, }: HandleWebhookOpts<DefinitionNotFound | BadWebhookSignature | WebhookParseError | E>) => Effect.Effect<WebhookConfig, never, void>;
63
63
  /**
64
64
  * @tsplus getter dfx/InteractionBuilder simpleWebhookHandler
65
65
  */
package/gateway.d.ts CHANGED
@@ -16,6 +16,6 @@ export { DiscordGateway, LiveDiscordGateway } from "dfx/DiscordGateway";
16
16
  export { InteractionsRegistry, InteractionsRegistryLive, run as runIx, } from "dfx/Interactions/gateway";
17
17
  export { CachePrelude, DiscordWS, SendEvent, Shard, ShardStore, WS };
18
18
  export declare const MemoryRateLimit: Layer.Layer<Log.Log, never, RateLimiter>;
19
- export declare const MemoryBot: Layer.Layer<Log.Log | DiscordConfig.DiscordConfig, never, RateLimiter | DiscordREST | InteractionsRegistry | DiscordGateway>;
19
+ export declare const MemoryBot: Layer.Layer<Log.Log | DiscordConfig.DiscordConfig, never, DiscordGateway | DiscordREST | RateLimiter | InteractionsRegistry>;
20
20
  export declare const gatewayLayer: (config: Config.Config.Wrap<DiscordConfig.MakeOpts>) => Layer.Layer<never, ConfigError.ConfigError, RateLimiter | Log.Log | InteractionsRegistry | DiscordREST | DiscordGateway | DiscordConfig.DiscordConfig>;
21
21
  //# sourceMappingURL=gateway.d.ts.map
package/mjs/version.mjs CHANGED
@@ -1,2 +1,2 @@
1
- export const LIB_VERSION = "0.66.1";
1
+ export const LIB_VERSION = "0.66.2";
2
2
  //# sourceMappingURL=version.mjs.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dfx",
3
- "version": "0.66.1",
3
+ "version": "0.66.2",
4
4
  "description": "Effect-TS discord library",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -39,7 +39,7 @@
39
39
  "ws": "^8.14.2"
40
40
  },
41
41
  "peerDependencies": {
42
- "@effect/platform": "^0.17.0",
42
+ "@effect/platform": "^0.18.2",
43
43
  "effect": "2.0.0-next.39"
44
44
  },
45
45
  "optionalDependencies": {
@@ -48,6 +48,6 @@
48
48
  "utf-8-validate": "^6.0.3",
49
49
  "zlib-sync": "^0.1.8"
50
50
  },
51
- "gitHead": "6377fc734cadfbb542199fb526cdf7498730f903",
51
+ "gitHead": "169f1d53c4a6848488b4aa724e00c5ef3ebe2053",
52
52
  "main": "./index.js"
53
53
  }
package/src/version.ts CHANGED
@@ -1 +1 @@
1
- export const LIB_VERSION = "0.66.1";
1
+ export const LIB_VERSION = "0.66.2";
package/version.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const LIB_VERSION = "0.66.1";
1
+ export declare const LIB_VERSION = "0.66.2";
2
2
  //# sourceMappingURL=version.d.ts.map
package/version.js CHANGED
@@ -4,5 +4,5 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.LIB_VERSION = void 0;
7
- const LIB_VERSION = exports.LIB_VERSION = "0.66.1";
7
+ const LIB_VERSION = exports.LIB_VERSION = "0.66.2";
8
8
  //# sourceMappingURL=version.js.map