@facteurjs/core 2.0.0-beta.0 → 2.0.0-beta.1

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 (33) hide show
  1. package/dist/channels/aws-sns/channel.d.mts +3 -1
  2. package/dist/channels/discord/channel.d.mts +3 -1
  3. package/dist/channels/expo/channel.d.mts +3 -1
  4. package/dist/channels/expo/message.d.mts +0 -1
  5. package/dist/channels/fcm/channel.d.mts +3 -1
  6. package/dist/channels/slack/channel.d.mts +3 -1
  7. package/dist/channels/socketio/channel.d.mts +3 -1
  8. package/dist/channels/transmit/channel.d.mts +3 -1
  9. package/dist/channels/twilio/channel.d.mts +3 -1
  10. package/dist/channels/webhook/exceptions.d.mts +0 -1
  11. package/dist/channels/webhook/provider.d.mts +1 -0
  12. package/dist/channels/webpush/channel.d.mts +3 -1
  13. package/dist/database/channel.d.mts +3 -1
  14. package/dist/database/types.d.mts +1 -0
  15. package/dist/errors/http_error.d.mts +0 -1
  16. package/dist/errors/index.d.mts +0 -1
  17. package/dist/errors/index.mjs +2 -2
  18. package/dist/events/events.d.mts +1 -0
  19. package/dist/facteur.d.mts +1 -0
  20. package/dist/fake.d.mts +1 -0
  21. package/dist/index.d.mts +0 -1
  22. package/dist/notifications/batching_sender.mjs +3 -3
  23. package/dist/notifications/channel_resolver.mjs +2 -2
  24. package/dist/notifications/notification_discoverer.d.mts +1 -0
  25. package/dist/notifications/notification_discoverer.mjs +2 -2
  26. package/dist/notifications/notification_sender.mjs +7 -7
  27. package/dist/options.d.mts +1 -0
  28. package/dist/types/builder.d.mts +0 -1
  29. package/dist/types/events.d.mts +0 -1
  30. package/dist/types/extend.d.mts +0 -1
  31. package/dist/types/notifications.d.mts +1 -1
  32. package/dist/types/options.d.mts +2 -2
  33. package/package.json +7 -7
@@ -1,6 +1,8 @@
1
1
  import { Channel, ChannelSendParams, kTargetSymbol } from "../../types/channel.mjs";
2
+ import "../../types.mjs";
2
3
  import { AwsSnsMessage } from "./message.mjs";
3
4
  import { AwsSnsConfig, AwsSnsTargets } from "./types.mjs";
5
+ import { Awaitable } from "@julr/utils/types";
4
6
 
5
7
  //#region src/channels/aws-sns/channel.d.ts
6
8
  declare function awsSnsChannel(config: AwsSnsConfig): AwsSnsChannel;
@@ -14,7 +16,7 @@ declare class AwsSnsChannel implements Channel<AwsSnsConfig, AwsSnsMessage, any,
14
16
  }
15
17
  declare module '@facteurjs/core/types' {
16
18
  interface Notification {
17
- asAwsSnsMessage(): AwsSnsMessage;
19
+ asAwsSnsMessage(): Awaitable<AwsSnsMessage>;
18
20
  }
19
21
  }
20
22
  //#endregion
@@ -1,8 +1,10 @@
1
1
  import { Channel } from "../../types/channel.mjs";
2
+ import "../../types.mjs";
2
3
  import { WebhookOptions, WebhookTargets } from "../webhook/types.mjs";
3
4
  import { DiscordResponse } from "./types.mjs";
4
5
  import { DiscordMessage } from "./message.mjs";
5
6
  import { WebhookChannel } from "../webhook/provider.mjs";
7
+ import { Awaitable } from "@julr/utils/types";
6
8
 
7
9
  //#region src/channels/discord/channel.d.ts
8
10
  declare function discordWebhookChannel<Options extends WebhookOptions<any>>(options: Options): DiscordProvider<Options>;
@@ -11,7 +13,7 @@ declare class DiscordProvider<T extends WebhookOptions<any>> extends WebhookChan
11
13
  }
12
14
  declare module '@facteurjs/core/types' {
13
15
  interface Notification {
14
- asDiscordMessage(): DiscordMessage;
16
+ asDiscordMessage(): Awaitable<DiscordMessage>;
15
17
  }
16
18
  }
17
19
  //#endregion
@@ -1,6 +1,8 @@
1
1
  import { BatchConfig, BatchSendResult, Channel, ChannelSendParams, kTargetSymbol } from "../../types/channel.mjs";
2
+ import "../../types.mjs";
2
3
  import { ExpoMessage } from "./message.mjs";
3
4
  import { ExpoConfig, ExpoTargets } from "./types.mjs";
5
+ import { Awaitable } from "@julr/utils/types";
4
6
 
5
7
  //#region src/channels/expo/channel.d.ts
6
8
  declare function expoChannel(config?: ExpoConfig): ExpoChannel;
@@ -18,7 +20,7 @@ declare class ExpoChannel implements Channel<ExpoConfig, ExpoMessage, any, ExpoT
18
20
  }
19
21
  declare module '@facteurjs/core/types' {
20
22
  interface Notification {
21
- asExpoMessage(): ExpoMessage;
23
+ asExpoMessage(): Awaitable<ExpoMessage>;
22
24
  }
23
25
  }
24
26
  //#endregion
@@ -1,7 +1,6 @@
1
1
  import { ExpoPushMessage } from "expo-server-sdk";
2
2
 
3
3
  //#region src/channels/expo/message.d.ts
4
-
5
4
  /**
6
5
  * Expo push notification message
7
6
  */
@@ -1,6 +1,8 @@
1
1
  import { BatchConfig, BatchSendResult, Channel, ChannelSendParams, kTargetSymbol } from "../../types/channel.mjs";
2
+ import "../../types.mjs";
2
3
  import { FcmMessage } from "./message.mjs";
3
4
  import { FcmConfig, FcmTargets } from "./types.mjs";
5
+ import { Awaitable } from "@julr/utils/types";
4
6
 
5
7
  //#region src/channels/fcm/channel.d.ts
6
8
  declare function fcmChannel(config: FcmConfig): FcmChannel;
@@ -15,7 +17,7 @@ declare class FcmChannel implements Channel<FcmConfig, FcmMessage, any, FcmTarge
15
17
  }
16
18
  declare module '@facteurjs/core/types' {
17
19
  interface Notification {
18
- asFcmMessage(): FcmMessage;
20
+ asFcmMessage(): Awaitable<FcmMessage>;
19
21
  }
20
22
  }
21
23
  //#endregion
@@ -1,7 +1,9 @@
1
1
  import { Channel } from "../../types/channel.mjs";
2
+ import "../../types.mjs";
2
3
  import { WebhookChannel } from "../webhook/provider.mjs";
3
4
  import { SlackMessage } from "./message.mjs";
4
5
  import { SlackOptions, SlackTargets } from "./types.mjs";
6
+ import { Awaitable } from "@julr/utils/types";
5
7
 
6
8
  //#region src/channels/slack/channel.d.ts
7
9
  declare function slackWebhookChannel<Options extends SlackOptions<any>>(options: Options): SlackWebhookChannel<Options>;
@@ -11,7 +13,7 @@ declare class SlackWebhookChannel<T extends SlackOptions<any>> extends WebhookCh
11
13
  }
12
14
  declare module '@facteurjs/core/types' {
13
15
  interface Notification {
14
- asSlackMessage(): SlackMessage;
16
+ asSlackMessage(): Awaitable<SlackMessage>;
15
17
  }
16
18
  }
17
19
  //#endregion
@@ -1,6 +1,8 @@
1
1
  import { Channel, ChannelSendParams, kTargetSymbol } from "../../types/channel.mjs";
2
+ import "../../types.mjs";
2
3
  import { SocketIoMessage } from "./message.mjs";
3
4
  import { SocketIOConfig, SocketIOTargets } from "./types.mjs";
5
+ import { Awaitable } from "@julr/utils/types";
4
6
  import { Server } from "socket.io";
5
7
 
6
8
  //#region src/channels/socketio/channel.d.ts
@@ -16,7 +18,7 @@ declare class SocketIOChannel implements Channel<SocketIOConfig, SocketIoMessage
16
18
  }
17
19
  declare module '@facteurjs/core/types' {
18
20
  interface Notification {
19
- asSocketIoMessage(): SocketIoMessage;
21
+ asSocketIoMessage(): Awaitable<SocketIoMessage>;
20
22
  }
21
23
  }
22
24
  //#endregion
@@ -1,6 +1,8 @@
1
1
  import { Channel, ChannelSendParams, kTargetSymbol } from "../../types/channel.mjs";
2
+ import "../../types.mjs";
2
3
  import { TransmitMessage } from "./message.mjs";
3
4
  import { TransmitConfig, TransmitTargets } from "./types.mjs";
5
+ import { Awaitable } from "@julr/utils/types";
4
6
 
5
7
  //#region src/channels/transmit/channel.d.ts
6
8
  declare function transmitChannel(config: TransmitConfig): TransmitChannel;
@@ -14,7 +16,7 @@ declare class TransmitChannel implements Channel<TransmitConfig, TransmitMessage
14
16
  }
15
17
  declare module '@facteurjs/core/types' {
16
18
  interface Notification {
17
- asTransmitMessage(): TransmitMessage;
19
+ asTransmitMessage(): Awaitable<TransmitMessage>;
18
20
  }
19
21
  }
20
22
  //#endregion
@@ -1,6 +1,8 @@
1
1
  import { Channel, ChannelSendParams, kTargetSymbol } from "../../types/channel.mjs";
2
+ import "../../types.mjs";
2
3
  import { TwilioMessage } from "./message.mjs";
3
4
  import { TwilioConfig, TwilioTargets } from "./types.mjs";
5
+ import { Awaitable } from "@julr/utils/types";
4
6
 
5
7
  //#region src/channels/twilio/channel.d.ts
6
8
  declare function twilioChannel(config: TwilioConfig): TwilioChannel;
@@ -14,7 +16,7 @@ declare class TwilioChannel implements Channel<TwilioConfig, TwilioMessage, any,
14
16
  }
15
17
  declare module '@facteurjs/core/types' {
16
18
  interface Notification {
17
- asTwilioMessage(): TwilioMessage;
19
+ asTwilioMessage(): Awaitable<TwilioMessage>;
18
20
  }
19
21
  }
20
22
  //#endregion
@@ -1,7 +1,6 @@
1
1
  import { HTTPErrorInfo } from "../../errors/http_error.mjs";
2
2
 
3
3
  //#region src/channels/webhook/exceptions.d.ts
4
-
5
4
  /**
6
5
  * Exception thrown when a webhook request fails
7
6
  */
@@ -1,4 +1,5 @@
1
1
  import { Channel, ChannelSendParams, kTargetSymbol } from "../../types/channel.mjs";
2
+ import "../../types.mjs";
2
3
  import { WebhookOptions, WebhookTargets } from "./types.mjs";
3
4
  import { WebhookMessage } from "./message.mjs";
4
5
 
@@ -1,7 +1,9 @@
1
1
  import { Channel, ChannelSendParams, kTargetSymbol } from "../../types/channel.mjs";
2
+ import "../../types.mjs";
2
3
  import { WebpushMessage } from "./message.mjs";
3
4
  import { WebpushConfig, WebpushTargets } from "./types.mjs";
4
5
  import webpush from "web-push";
6
+ import { Awaitable } from "@julr/utils/types";
5
7
 
6
8
  //#region src/channels/webpush/channel.d.ts
7
9
  declare function webpushChannel(config: WebpushConfig): WebpushChannel;
@@ -19,7 +21,7 @@ declare class WebpushChannel implements Channel<WebpushConfig, WebpushMessage, a
19
21
  }
20
22
  declare module '@facteurjs/core/types' {
21
23
  interface Notification {
22
- asWebpushMessage(): WebpushMessage;
24
+ asWebpushMessage(): Awaitable<WebpushMessage>;
23
25
  }
24
26
  }
25
27
  //#endregion
@@ -1,6 +1,8 @@
1
1
  import { Channel, ChannelSendParams, kTargetSymbol } from "../types/channel.mjs";
2
+ import "../types.mjs";
2
3
  import { DatabaseConfig, Identifier } from "./types.mjs";
3
4
  import { DatabaseMessage } from "./message.mjs";
5
+ import { Awaitable } from "@julr/utils/types";
4
6
 
5
7
  //#region src/database/channel.d.ts
6
8
  declare function databaseChannel(options: DatabaseConfig): DatabaseChannel;
@@ -17,7 +19,7 @@ declare class DatabaseChannel implements Channel<DatabaseConfig, DatabaseMessage
17
19
  }
18
20
  declare module '@facteurjs/core/types' {
19
21
  interface Notification {
20
- asDatabaseMessage(): DatabaseMessage;
22
+ asDatabaseMessage(): Awaitable<DatabaseMessage>;
21
23
  }
22
24
  }
23
25
  //#endregion
@@ -1,4 +1,5 @@
1
1
  import { ChannelName } from "../types/extend.mjs";
2
+ import "../types.mjs";
2
3
  import { Kysely } from "kysely";
3
4
  import { Knex } from "knex";
4
5
 
@@ -1,5 +1,4 @@
1
1
  //#region src/errors/http_error.d.ts
2
-
3
2
  /**
4
3
  * Represents an HTTP error with decoded response body
5
4
  */
@@ -2,7 +2,6 @@ import { E_DUPLICATE_NOTIFICATION } from "./duplicate_notification_exception.mjs
2
2
  import * as _poppinss_exception0 from "@poppinss/exception";
3
3
 
4
4
  //#region src/errors/index.d.ts
5
-
6
5
  /**
7
6
  * Thrown when the notification targets for a channel cannot be determined
8
7
  * before sending the notification.
@@ -22,8 +22,8 @@ const E_MISSING_MESSAGE_METHOD = createError(`Notification is missing "as%sMessa
22
22
  var E_SEND_NOTIFICATION_FAILED = class extends AggregateError {
23
23
  code = "E_SEND_NOTIFICATION_FAILED";
24
24
  status = 500;
25
- constructor(errors$1) {
26
- super(errors$1, "Failed to send notification due to errors in one or more channels.");
25
+ constructor(errors) {
26
+ super(errors, "Failed to send notification due to errors in one or more channels.");
27
27
  }
28
28
  };
29
29
  const errors = {
@@ -1,5 +1,6 @@
1
1
  import { ChannelName } from "../types/extend.mjs";
2
2
  import { Notification } from "../types/notifications.mjs";
3
+ import "../types.mjs";
3
4
 
4
5
  //#region src/events/events.d.ts
5
6
  interface MessageEventOptions {
@@ -4,6 +4,7 @@ import { FacteurFake } from "./fake.mjs";
4
4
  import { FacteurDatabase } from "./database/database.mjs";
5
5
  import { FacteurConfiguration } from "./types/options.mjs";
6
6
  import { Notification, NotificationClass } from "./types/notifications.mjs";
7
+ import "./types.mjs";
7
8
  import { DatabaseAdapter } from "./database/types.mjs";
8
9
 
9
10
  //#region src/facteur.d.ts
package/dist/fake.d.mts CHANGED
@@ -1,5 +1,6 @@
1
1
  import { InternalSendOptions } from "./types/builder.mjs";
2
2
  import { Notification, NotificationSendResult } from "./types/notifications.mjs";
3
+ import "./types.mjs";
3
4
 
4
5
  //#region src/fake.d.ts
5
6
  interface SentNotification<N extends Notification = Notification> {
package/dist/index.d.mts CHANGED
@@ -3,7 +3,6 @@ import { Facteur, createFacteur } from "./facteur.mjs";
3
3
  import { E_MISSING_MESSAGE_METHOD, E_QUEUE_NOT_SET, E_SEND_NOTIFICATION_FAILED, E_UNAVAILABLE_TARGETS, errors } from "./errors/index.mjs";
4
4
 
5
5
  //#region src/index.d.ts
6
-
7
6
  /**
8
7
  * Define a new provider
9
8
  */
@@ -56,7 +56,7 @@ var BatchingSender = class {
56
56
  continueOnError: options.continueOnError,
57
57
  ...options.timeout && { timeout: options.timeout }
58
58
  });
59
- const messagesByChannel = this.#groupByChannel(preparedRecipients);
59
+ const messagesByChannel = await this.#groupByChannel(preparedRecipients);
60
60
  return this.#sendBatches({
61
61
  messagesByChannel,
62
62
  builderOptions: options.builderOptions,
@@ -98,11 +98,11 @@ var BatchingSender = class {
98
98
  /**
99
99
  * Groups prepared messages by channel name for batch sending
100
100
  */
101
- #groupByChannel(preparedRecipients) {
101
+ async #groupByChannel(preparedRecipients) {
102
102
  const messagesByChannel = /* @__PURE__ */ new Map();
103
103
  for (const prepared of preparedRecipients) for (const [channelName, channelConfig] of Object.entries(prepared.resolvedChannels)) {
104
104
  if (!channelConfig.shouldSend || !channelConfig.target) continue;
105
- const message = this.#sender.prepareMessage({
105
+ const message = await this.#sender.prepareMessage({
106
106
  notification: prepared.notification,
107
107
  channelName,
108
108
  sendOptions: prepared.options,
@@ -74,8 +74,8 @@ var ChannelResolver = class {
74
74
  const currentTenant = preferences?.tenants?.[tenantId || -1];
75
75
  const tenantPreferences = currentTenant?.global;
76
76
  const globalPreferences = preferences?.global.global;
77
- const notificationTenantPreference = currentTenant?.notifications?.find(({ notification: notification$1 }) => notification$1.identifier === notificationIdentifier);
78
- const notificationGlobalPreference = preferences?.global.notifications.find(({ notification: notification$1 }) => notification$1.identifier === notificationIdentifier);
77
+ const notificationTenantPreference = currentTenant?.notifications?.find(({ notification }) => notification.identifier === notificationIdentifier);
78
+ const notificationGlobalPreference = preferences?.global.notifications.find(({ notification }) => notification.identifier === notificationIdentifier);
79
79
  return mapEntries(fromDeliverBy, (channelName, { shouldSend, target }) => {
80
80
  if (shouldSend === false) return [channelName, {
81
81
  shouldSend: false,
@@ -1,4 +1,5 @@
1
1
  import { Notification } from "../types/notifications.mjs";
2
+ import "../types.mjs";
2
3
 
3
4
  //#region src/notifications/notification_discoverer.d.ts
4
5
  interface NotificationDiscovererConfig {
@@ -57,9 +57,9 @@ var NotificationDiscoverer = class {
57
57
  */
58
58
  #validateUniqueNotificationNames(notifications) {
59
59
  const notificationsByName = Object.groupBy(notifications, (i) => i.notification.name);
60
- const duplicates = Object.entries(notificationsByName).filter(([_, notifications$1]) => (notifications$1?.length || 0) > 1).map(([notificationName, notifications$1]) => ({
60
+ const duplicates = Object.entries(notificationsByName).filter(([_, notifications]) => (notifications?.length || 0) > 1).map(([notificationName, notifications]) => ({
61
61
  notificationName,
62
- notifications: notifications$1
62
+ notifications
63
63
  }));
64
64
  if (duplicates.length > 0) throw new errors.E_DUPLICATE_NOTIFICATION(this.#config.searchDirectory, duplicates);
65
65
  }
@@ -20,12 +20,12 @@ var NotificationSender = class {
20
20
  /**
21
21
  * Build the message content by calling the notification's `as<ChannelName>Message` method
22
22
  */
23
- #buildMessageContent(options) {
23
+ async #buildMessageContent(options) {
24
24
  const { notification, channelName, sendOptions } = options;
25
25
  const capitalizedChannelName = capitalizeFirstLetter(channelName);
26
26
  const messageBuilder = notification[`as${capitalizedChannelName}Message`];
27
27
  if (typeof messageBuilder !== "function") throw new errors.E_MISSING_MESSAGE_METHOD([capitalizedChannelName]);
28
- const content = messageBuilder.call(notification, {
28
+ const content = await messageBuilder.call(notification, {
29
29
  to: sendOptions.to,
30
30
  params: sendOptions.params,
31
31
  tenantId: sendOptions.tenantId
@@ -75,10 +75,10 @@ var NotificationSender = class {
75
75
  /**
76
76
  * Emit notification failed event
77
77
  */
78
- #emitNotificationFailed(notification, errors$1) {
78
+ #emitNotificationFailed(notification, errors) {
79
79
  const event = facteurEvents.notificationFailed({
80
80
  notification,
81
- errors: errors$1
81
+ errors
82
82
  });
83
83
  this.emitter.emit(event.name, event.data);
84
84
  }
@@ -144,7 +144,7 @@ var NotificationSender = class {
144
144
  async #sendMessage(options) {
145
145
  const { notification, channelName, options: sendOptions, channelConfig } = options;
146
146
  const channel = this.#getChannel(channelName);
147
- const messageResult = this.#buildMessageContent({
147
+ const messageResult = await this.#buildMessageContent({
148
148
  notification,
149
149
  channelName,
150
150
  sendOptions
@@ -304,10 +304,10 @@ var NotificationSender = class {
304
304
  * Prepare a message for a specific channel without sending it.
305
305
  * Returns null if the message should not be sent.
306
306
  */
307
- prepareMessage(options) {
307
+ async prepareMessage(options) {
308
308
  const { notification, channelName, sendOptions, channelConfig } = options;
309
309
  this.#getChannel(channelName);
310
- const messageResult = this.#buildMessageContent({
310
+ const messageResult = await this.#buildMessageContent({
311
311
  notification,
312
312
  channelName,
313
313
  sendOptions
@@ -3,6 +3,7 @@ import { QueueAdapter } from "./types/queue.mjs";
3
3
  import { ResolvedDefaultPreferences } from "./types/preferences.mjs";
4
4
  import { Emitter } from "./types/events.mjs";
5
5
  import { FacteurConfiguration, NotificationResolver, RetryConfig } from "./types/options.mjs";
6
+ import "./types.mjs";
6
7
  import { DatabaseAdapter } from "./database/types.mjs";
7
8
  import { Logger } from "@julr/utils/logger";
8
9
 
@@ -5,7 +5,6 @@ import { Identifier } from "../database/types.mjs";
5
5
  import { Duration } from "@julr/tenace/types";
6
6
 
7
7
  //#region src/types/builder.d.ts
8
-
9
8
  /**
10
9
  * Helper type to check if params are required for a notification
11
10
  */
@@ -1,7 +1,6 @@
1
1
  import { facteurEvents } from "../events/events.mjs";
2
2
 
3
3
  //#region src/types/events.d.ts
4
-
5
4
  /**
6
5
  * Shape of the emitter accepted by facteur
7
6
  * Should be compatible with node's EventEmitter and Emittery
@@ -2,7 +2,6 @@ import { Facteur } from "../facteur.mjs";
2
2
  import { FacteurConfiguration } from "./options.mjs";
3
3
 
4
4
  //#region src/types/extend.d.ts
5
-
6
5
  /**
7
6
  * List of available channels
8
7
  */
@@ -1,10 +1,10 @@
1
1
  import { ChannelName, NotificationChannels } from "./extend.mjs";
2
2
  import { ExtractChannelTargets, MessageCtx, NotificationOptions } from "./options.mjs";
3
+ import "../types.mjs";
3
4
  import { Identifier } from "../database/types.mjs";
4
5
  import { Awaitable } from "@julr/utils/types";
5
6
 
6
7
  //#region src/types/notifications.d.ts
7
-
8
8
  /**
9
9
  * Constructor type for notification classes
10
10
  */
@@ -4,13 +4,13 @@ import { DefaultPreferences } from "./preferences.mjs";
4
4
  import { ChannelName, NotificationChannels } from "./extend.mjs";
5
5
  import { Emitter } from "./events.mjs";
6
6
  import { Notifiable, Notification, NotificationClass } from "./notifications.mjs";
7
+ import "../types.mjs";
7
8
  import { DatabaseAdapter, Identifier } from "../database/types.mjs";
8
9
  import { Logger } from "@julr/utils/logger";
9
10
  import { Awaitable } from "@julr/utils/types";
10
11
  import { Duration } from "@julr/tenace/types";
11
12
 
12
13
  //#region src/types/options.d.ts
13
-
14
14
  /**
15
15
  * Type for values that can be a single item or an array of items
16
16
  */
@@ -162,7 +162,7 @@ type SendOptions<TNotificationClass extends NotificationClass<any, any>> = IsAno
162
162
  };
163
163
  type ChannelSpecificConfig<N extends Notifiable> = { [K in ChannelName]?: boolean | ProviderTarget<N, K> };
164
164
  type ExtractChannelTargets<T> = T extends Channel<any, any, any, infer U> ? U : never;
165
- type ProviderTarget<_N extends Notifiable, K$1 extends ChannelName> = ExtractChannelTargets<NotificationChannels[K$1]>;
165
+ type ProviderTarget<_N extends Notifiable, K extends ChannelName> = ExtractChannelTargets<NotificationChannels[K]>;
166
166
  /**
167
167
  * Retry options for channel sends
168
168
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@facteurjs/core",
3
- "version": "2.0.0-beta.0",
3
+ "version": "2.0.0-beta.1",
4
4
  "description": "Framework-agnostic notification system for Node.js with support for multiple channels (email, SMS, push, webhooks, etc.)",
5
5
  "keywords": [
6
6
  "discord",
@@ -65,18 +65,18 @@
65
65
  "@julr/tenace": "1.0.0-next.0",
66
66
  "@julr/utils": "1.9.0",
67
67
  "@poppinss/exception": "^1.2.3",
68
- "ky": "^1.14.2"
68
+ "ky": "^1.14.3"
69
69
  },
70
70
  "devDependencies": {
71
- "@aws-sdk/client-sns": "^3.958.0",
72
- "@boringnode/transmit": "^0.3.0",
71
+ "@aws-sdk/client-sns": "^3.987.0",
72
+ "@boringnode/transmit": "^0.4.0",
73
73
  "@types/web-push": "^3.6.4",
74
74
  "expo-server-sdk": "^4.0.0",
75
- "firebase-admin": "^13.6.0",
75
+ "firebase-admin": "^13.6.1",
76
76
  "knex": "^3.1.0",
77
- "kysely": "^0.28.9",
77
+ "kysely": "^0.28.11",
78
78
  "socket.io": "^4.8.3",
79
- "twilio": "^5.11.1",
79
+ "twilio": "^5.12.1",
80
80
  "web-push": "^3.6.7"
81
81
  },
82
82
  "peerDependencies": {