@develit-services/notification 0.6.1 → 0.6.3

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.
@@ -3,19 +3,13 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const backendSdk = require('@develit-io/backend-sdk');
6
- const database_schema = require('../database/schema.cjs');
7
- require('drizzle-orm');
8
- require('drizzle-orm/sqlite-core');
9
6
  const webhook_connector = require('../shared/notification.BLPB8Ib2.cjs');
10
7
  require('@develit-io/backend-sdk/signature');
11
8
  const cloudflare_workers = require('cloudflare:workers');
12
- const d1 = require('drizzle-orm/d1');
13
9
  require('zod');
14
10
  require('zod/v4');
15
11
  require('twilio');
16
12
 
17
- const tables = database_schema.schema;
18
-
19
13
  const initiateEmailConnector = async (provider, apiKey, smtpHost, senderEmail, senderName) => {
20
14
  const connector = [webhook_connector.EcomailConnector].find(
21
15
  (conn) => conn.providerName === provider
@@ -71,7 +65,28 @@ let NotificationServiceBase = class extends backendSdk.develitWorker(
71
65
  constructor(ctx, env) {
72
66
  super(ctx, env);
73
67
  this.slackConnector = new webhook_connector.SlackConnector(this.env.SLACK_WEBHOOK);
74
- this.db = d1.drizzle(this.env.NOTIFICATION_D1, { schema: tables });
68
+ }
69
+ getContactEmail(contact) {
70
+ return typeof contact === "string" ? contact : contact.email;
71
+ }
72
+ isEmailAllowed(email, allowedEmails) {
73
+ return allowedEmails.includes(email.toLowerCase());
74
+ }
75
+ applyEmailWhitelist(email) {
76
+ const whitelist = this.env.EMAIL_WHITELIST;
77
+ if (!whitelist) return email;
78
+ const fallback = this.env.EMAIL_WHITELIST_FALLBACK;
79
+ const allowedEmails = whitelist.split(",").map((e) => e.trim().toLowerCase());
80
+ const toEmail = this.getContactEmail(
81
+ Array.isArray(email.to) ? email.to[0] : email.to
82
+ );
83
+ if (this.isEmailAllowed(toEmail, allowedEmails)) return email;
84
+ if (fallback) return { ...email, to: fallback };
85
+ throw backendSdk.createInternalError(null, {
86
+ message: `Email not on whitelist and no fallback configured: ${toEmail}`,
87
+ code: "SYS-N-03",
88
+ status: 400
89
+ });
75
90
  }
76
91
  async queue(batch) {
77
92
  for (const message of batch.messages) {
@@ -144,7 +159,8 @@ let NotificationServiceBase = class extends backendSdk.develitWorker(
144
159
  this.env.EMAIL_SENDER_NAME
145
160
  );
146
161
  }
147
- await this.emailConnector.sendEmail(email);
162
+ const filteredEmail = this.applyEmailWhitelist(email);
163
+ await this.emailConnector.sendEmail(filteredEmail);
148
164
  try {
149
165
  await this.pushToQueue(this.env.AUDIT_LOGS_QUEUE, {
150
166
  logType: "event",
@@ -1,22 +1,20 @@
1
1
  import * as _develit_io_backend_sdk from '@develit-io/backend-sdk';
2
2
  import { IRPCResponse } from '@develit-io/backend-sdk';
3
- import { s as schema } from '../database/schema.cjs';
4
3
  import { S as SlackConnector, W as WebhookConnector, I as IEmailConnector, a as ISmsConnector, N as NotificationQueueMessage, b as SendEmailInput, c as SendEmailOutput, d as SendSmsInput, e as SendSmsOutput, f as SendSlackInput, g as SendSlackOutput, h as SendWebhookInput, i as SendWebhookOutput, G as GetReceivedEmailsInput, j as GetReceivedEmailsOutput, k as WaitForEmailInput, l as WaitForEmailOutput, C as ClearReceivedEmailsInput, m as ClearReceivedEmailsOutput } from '../shared/notification.BiG4Q650.cjs';
5
4
  import { WorkerEntrypoint } from 'cloudflare:workers';
6
- import { DrizzleD1Database } from 'drizzle-orm/d1';
7
5
  import 'zod';
8
6
  import 'zod/v4';
9
7
 
10
- declare const tables: typeof schema;
11
-
12
8
  declare const NotificationServiceBase_base: (abstract new (ctx: ExecutionContext, env: NotificationEnv) => WorkerEntrypoint<NotificationEnv, {}>) & (abstract new (...args: any[]) => _develit_io_backend_sdk.DevelitWorkerMethods);
13
9
  declare class NotificationServiceBase extends NotificationServiceBase_base {
14
10
  readonly slackConnector: SlackConnector;
15
11
  protected webhookConnector: WebhookConnector;
16
12
  protected emailConnector: IEmailConnector;
17
13
  protected smsConnector: ISmsConnector;
18
- readonly db: DrizzleD1Database<typeof tables>;
19
14
  constructor(ctx: ExecutionContext, env: NotificationEnv);
15
+ private getContactEmail;
16
+ private isEmailAllowed;
17
+ private applyEmailWhitelist;
20
18
  queue(batch: MessageBatch<NotificationQueueMessage>): Promise<void>;
21
19
  protected _sendEmail(input: SendEmailInput): Promise<IRPCResponse<SendEmailOutput>>;
22
20
  protected _sendSms(input: SendSmsInput): Promise<IRPCResponse<SendSmsOutput>>;
@@ -1,22 +1,20 @@
1
1
  import * as _develit_io_backend_sdk from '@develit-io/backend-sdk';
2
2
  import { IRPCResponse } from '@develit-io/backend-sdk';
3
- import { s as schema } from '../database/schema.mjs';
4
3
  import { S as SlackConnector, W as WebhookConnector, I as IEmailConnector, a as ISmsConnector, N as NotificationQueueMessage, b as SendEmailInput, c as SendEmailOutput, d as SendSmsInput, e as SendSmsOutput, f as SendSlackInput, g as SendSlackOutput, h as SendWebhookInput, i as SendWebhookOutput, G as GetReceivedEmailsInput, j as GetReceivedEmailsOutput, k as WaitForEmailInput, l as WaitForEmailOutput, C as ClearReceivedEmailsInput, m as ClearReceivedEmailsOutput } from '../shared/notification.BiG4Q650.mjs';
5
4
  import { WorkerEntrypoint } from 'cloudflare:workers';
6
- import { DrizzleD1Database } from 'drizzle-orm/d1';
7
5
  import 'zod';
8
6
  import 'zod/v4';
9
7
 
10
- declare const tables: typeof schema;
11
-
12
8
  declare const NotificationServiceBase_base: (abstract new (ctx: ExecutionContext, env: NotificationEnv) => WorkerEntrypoint<NotificationEnv, {}>) & (abstract new (...args: any[]) => _develit_io_backend_sdk.DevelitWorkerMethods);
13
9
  declare class NotificationServiceBase extends NotificationServiceBase_base {
14
10
  readonly slackConnector: SlackConnector;
15
11
  protected webhookConnector: WebhookConnector;
16
12
  protected emailConnector: IEmailConnector;
17
13
  protected smsConnector: ISmsConnector;
18
- readonly db: DrizzleD1Database<typeof tables>;
19
14
  constructor(ctx: ExecutionContext, env: NotificationEnv);
15
+ private getContactEmail;
16
+ private isEmailAllowed;
17
+ private applyEmailWhitelist;
20
18
  queue(batch: MessageBatch<NotificationQueueMessage>): Promise<void>;
21
19
  protected _sendEmail(input: SendEmailInput): Promise<IRPCResponse<SendEmailOutput>>;
22
20
  protected _sendSms(input: SendSmsInput): Promise<IRPCResponse<SendSmsOutput>>;
@@ -1,22 +1,20 @@
1
1
  import * as _develit_io_backend_sdk from '@develit-io/backend-sdk';
2
2
  import { IRPCResponse } from '@develit-io/backend-sdk';
3
- import { s as schema } from '../database/schema.js';
4
3
  import { S as SlackConnector, W as WebhookConnector, I as IEmailConnector, a as ISmsConnector, N as NotificationQueueMessage, b as SendEmailInput, c as SendEmailOutput, d as SendSmsInput, e as SendSmsOutput, f as SendSlackInput, g as SendSlackOutput, h as SendWebhookInput, i as SendWebhookOutput, G as GetReceivedEmailsInput, j as GetReceivedEmailsOutput, k as WaitForEmailInput, l as WaitForEmailOutput, C as ClearReceivedEmailsInput, m as ClearReceivedEmailsOutput } from '../shared/notification.BiG4Q650.js';
5
4
  import { WorkerEntrypoint } from 'cloudflare:workers';
6
- import { DrizzleD1Database } from 'drizzle-orm/d1';
7
5
  import 'zod';
8
6
  import 'zod/v4';
9
7
 
10
- declare const tables: typeof schema;
11
-
12
8
  declare const NotificationServiceBase_base: (abstract new (ctx: ExecutionContext, env: NotificationEnv) => WorkerEntrypoint<NotificationEnv, {}>) & (abstract new (...args: any[]) => _develit_io_backend_sdk.DevelitWorkerMethods);
13
9
  declare class NotificationServiceBase extends NotificationServiceBase_base {
14
10
  readonly slackConnector: SlackConnector;
15
11
  protected webhookConnector: WebhookConnector;
16
12
  protected emailConnector: IEmailConnector;
17
13
  protected smsConnector: ISmsConnector;
18
- readonly db: DrizzleD1Database<typeof tables>;
19
14
  constructor(ctx: ExecutionContext, env: NotificationEnv);
15
+ private getContactEmail;
16
+ private isEmailAllowed;
17
+ private applyEmailWhitelist;
20
18
  queue(batch: MessageBatch<NotificationQueueMessage>): Promise<void>;
21
19
  protected _sendEmail(input: SendEmailInput): Promise<IRPCResponse<SendEmailOutput>>;
22
20
  protected _sendSms(input: SendSmsInput): Promise<IRPCResponse<SendSmsOutput>>;
@@ -1,17 +1,11 @@
1
1
  import { createInternalError, develitWorker, uuidv4, cloudflareQueue, action, service } from '@develit-io/backend-sdk';
2
- import { s as schema } from '../database/schema.mjs';
3
- import 'drizzle-orm';
4
- import 'drizzle-orm/sqlite-core';
5
2
  import { E as EcomailConnector, T as TwilioConnector, S as SlackConnector, s as sendEmailInputSchema, f as sendSmsInputSchema, e as sendSlackInputSchema, h as sendWebhookInputSchema, W as WebhookConnector, g as getReceivedEmailsInputSchema, w as waitForEmailInputSchema, c as clearReceivedEmailsInputSchema } from '../shared/notification.CP_hFlNt.mjs';
6
3
  import '@develit-io/backend-sdk/signature';
7
4
  import { WorkerEntrypoint } from 'cloudflare:workers';
8
- import { drizzle } from 'drizzle-orm/d1';
9
5
  import 'zod';
10
6
  import 'zod/v4';
11
7
  import 'twilio';
12
8
 
13
- const tables = schema;
14
-
15
9
  const initiateEmailConnector = async (provider, apiKey, smtpHost, senderEmail, senderName) => {
16
10
  const connector = [EcomailConnector].find(
17
11
  (conn) => conn.providerName === provider
@@ -67,7 +61,28 @@ let NotificationServiceBase = class extends develitWorker(
67
61
  constructor(ctx, env) {
68
62
  super(ctx, env);
69
63
  this.slackConnector = new SlackConnector(this.env.SLACK_WEBHOOK);
70
- this.db = drizzle(this.env.NOTIFICATION_D1, { schema: tables });
64
+ }
65
+ getContactEmail(contact) {
66
+ return typeof contact === "string" ? contact : contact.email;
67
+ }
68
+ isEmailAllowed(email, allowedEmails) {
69
+ return allowedEmails.includes(email.toLowerCase());
70
+ }
71
+ applyEmailWhitelist(email) {
72
+ const whitelist = this.env.EMAIL_WHITELIST;
73
+ if (!whitelist) return email;
74
+ const fallback = this.env.EMAIL_WHITELIST_FALLBACK;
75
+ const allowedEmails = whitelist.split(",").map((e) => e.trim().toLowerCase());
76
+ const toEmail = this.getContactEmail(
77
+ Array.isArray(email.to) ? email.to[0] : email.to
78
+ );
79
+ if (this.isEmailAllowed(toEmail, allowedEmails)) return email;
80
+ if (fallback) return { ...email, to: fallback };
81
+ throw createInternalError(null, {
82
+ message: `Email not on whitelist and no fallback configured: ${toEmail}`,
83
+ code: "SYS-N-03",
84
+ status: 400
85
+ });
71
86
  }
72
87
  async queue(batch) {
73
88
  for (const message of batch.messages) {
@@ -140,7 +155,8 @@ let NotificationServiceBase = class extends develitWorker(
140
155
  this.env.EMAIL_SENDER_NAME
141
156
  );
142
157
  }
143
- await this.emailConnector.sendEmail(email);
158
+ const filteredEmail = this.applyEmailWhitelist(email);
159
+ await this.emailConnector.sendEmail(filteredEmail);
144
160
  try {
145
161
  await this.pushToQueue(this.env.AUDIT_LOGS_QUEUE, {
146
162
  logType: "event",
@@ -19,14 +19,6 @@ function defineNotificationServiceWrangler(config) {
19
19
  service: `${project}-secrets-store`
20
20
  }
21
21
  ],
22
- d1_databases: [
23
- {
24
- binding: "NOTIFICATION_D1",
25
- database_name: `${project}-notification`,
26
- database_id: envs.local.d1.id,
27
- migrations_dir: "./src/database/migrations"
28
- }
29
- ],
30
22
  kv_namespaces: envs.local.kv ? [
31
23
  {
32
24
  binding: "RECEIVED_EMAILS_KV",
@@ -63,14 +55,6 @@ function defineNotificationServiceWrangler(config) {
63
55
  ...envCfg.vars,
64
56
  ENVIRONMENT: envName
65
57
  },
66
- d1_databases: [
67
- {
68
- binding: "NOTIFICATION_D1",
69
- database_name: `${project}-notification-${envName}`,
70
- database_id: envCfg.d1.id,
71
- migrations_dir: "./src/database/migrations"
72
- }
73
- ],
74
58
  ...envCfg.kv && {
75
59
  kv_namespaces: [
76
60
  {
@@ -1,4 +1,4 @@
1
- import { N as NotificationServiceWranglerConfig } from '../shared/notification.CdlaOUd0.cjs';
1
+ import { N as NotificationServiceWranglerConfig } from '../shared/notification.mdV1ug8W.cjs';
2
2
 
3
3
  declare function defineNotificationServiceWrangler(config: NotificationServiceWranglerConfig): {
4
4
  vars: {
@@ -9,17 +9,13 @@ declare function defineNotificationServiceWrangler(config: NotificationServiceWr
9
9
  EMAIL_SMTP_HOST: string;
10
10
  SMS_PROVIDER: "twilio";
11
11
  SLACK_WEBHOOK: string;
12
+ EMAIL_WHITELIST?: string;
13
+ EMAIL_WHITELIST_FALLBACK?: string;
12
14
  };
13
15
  services: {
14
16
  binding: string;
15
17
  service: string;
16
18
  }[];
17
- d1_databases: {
18
- binding: string;
19
- database_name: string;
20
- database_id: string;
21
- migrations_dir: string;
22
- }[];
23
19
  kv_namespaces: {
24
20
  binding: string;
25
21
  id: string;
@@ -1,4 +1,4 @@
1
- import { N as NotificationServiceWranglerConfig } from '../shared/notification.CdlaOUd0.mjs';
1
+ import { N as NotificationServiceWranglerConfig } from '../shared/notification.mdV1ug8W.mjs';
2
2
 
3
3
  declare function defineNotificationServiceWrangler(config: NotificationServiceWranglerConfig): {
4
4
  vars: {
@@ -9,17 +9,13 @@ declare function defineNotificationServiceWrangler(config: NotificationServiceWr
9
9
  EMAIL_SMTP_HOST: string;
10
10
  SMS_PROVIDER: "twilio";
11
11
  SLACK_WEBHOOK: string;
12
+ EMAIL_WHITELIST?: string;
13
+ EMAIL_WHITELIST_FALLBACK?: string;
12
14
  };
13
15
  services: {
14
16
  binding: string;
15
17
  service: string;
16
18
  }[];
17
- d1_databases: {
18
- binding: string;
19
- database_name: string;
20
- database_id: string;
21
- migrations_dir: string;
22
- }[];
23
19
  kv_namespaces: {
24
20
  binding: string;
25
21
  id: string;
@@ -1,4 +1,4 @@
1
- import { N as NotificationServiceWranglerConfig } from '../shared/notification.CdlaOUd0.js';
1
+ import { N as NotificationServiceWranglerConfig } from '../shared/notification.mdV1ug8W.js';
2
2
 
3
3
  declare function defineNotificationServiceWrangler(config: NotificationServiceWranglerConfig): {
4
4
  vars: {
@@ -9,17 +9,13 @@ declare function defineNotificationServiceWrangler(config: NotificationServiceWr
9
9
  EMAIL_SMTP_HOST: string;
10
10
  SMS_PROVIDER: "twilio";
11
11
  SLACK_WEBHOOK: string;
12
+ EMAIL_WHITELIST?: string;
13
+ EMAIL_WHITELIST_FALLBACK?: string;
12
14
  };
13
15
  services: {
14
16
  binding: string;
15
17
  service: string;
16
18
  }[];
17
- d1_databases: {
18
- binding: string;
19
- database_name: string;
20
- database_id: string;
21
- migrations_dir: string;
22
- }[];
23
19
  kv_namespaces: {
24
20
  binding: string;
25
21
  id: string;
@@ -17,14 +17,6 @@ function defineNotificationServiceWrangler(config) {
17
17
  service: `${project}-secrets-store`
18
18
  }
19
19
  ],
20
- d1_databases: [
21
- {
22
- binding: "NOTIFICATION_D1",
23
- database_name: `${project}-notification`,
24
- database_id: envs.local.d1.id,
25
- migrations_dir: "./src/database/migrations"
26
- }
27
- ],
28
20
  kv_namespaces: envs.local.kv ? [
29
21
  {
30
22
  binding: "RECEIVED_EMAILS_KV",
@@ -61,14 +53,6 @@ function defineNotificationServiceWrangler(config) {
61
53
  ...envCfg.vars,
62
54
  ENVIRONMENT: envName
63
55
  },
64
- d1_databases: [
65
- {
66
- binding: "NOTIFICATION_D1",
67
- database_name: `${project}-notification-${envName}`,
68
- database_id: envCfg.d1.id,
69
- migrations_dir: "./src/database/migrations"
70
- }
71
- ],
72
56
  ...envCfg.kv && {
73
57
  kv_namespaces: [
74
58
  {
@@ -3,9 +3,6 @@ interface NotificationServiceEnvironmentConfig {
3
3
  max_batch_size?: number;
4
4
  max_batch_timeout?: number;
5
5
  };
6
- d1: {
7
- id: string;
8
- };
9
6
  kv?: {
10
7
  id: string;
11
8
  };
@@ -16,6 +13,8 @@ interface NotificationServiceEnvironmentConfig {
16
13
  EMAIL_SMTP_HOST: string;
17
14
  SMS_PROVIDER: 'twilio';
18
15
  SLACK_WEBHOOK: string;
16
+ EMAIL_WHITELIST?: string;
17
+ EMAIL_WHITELIST_FALLBACK?: string;
19
18
  };
20
19
  }
21
20
  interface NotificationServiceWranglerConfig {
@@ -3,9 +3,6 @@ interface NotificationServiceEnvironmentConfig {
3
3
  max_batch_size?: number;
4
4
  max_batch_timeout?: number;
5
5
  };
6
- d1: {
7
- id: string;
8
- };
9
6
  kv?: {
10
7
  id: string;
11
8
  };
@@ -16,6 +13,8 @@ interface NotificationServiceEnvironmentConfig {
16
13
  EMAIL_SMTP_HOST: string;
17
14
  SMS_PROVIDER: 'twilio';
18
15
  SLACK_WEBHOOK: string;
16
+ EMAIL_WHITELIST?: string;
17
+ EMAIL_WHITELIST_FALLBACK?: string;
19
18
  };
20
19
  }
21
20
  interface NotificationServiceWranglerConfig {
@@ -3,9 +3,6 @@ interface NotificationServiceEnvironmentConfig {
3
3
  max_batch_size?: number;
4
4
  max_batch_timeout?: number;
5
5
  };
6
- d1: {
7
- id: string;
8
- };
9
6
  kv?: {
10
7
  id: string;
11
8
  };
@@ -16,6 +13,8 @@ interface NotificationServiceEnvironmentConfig {
16
13
  EMAIL_SMTP_HOST: string;
17
14
  SMS_PROVIDER: 'twilio';
18
15
  SLACK_WEBHOOK: string;
16
+ EMAIL_WHITELIST?: string;
17
+ EMAIL_WHITELIST_FALLBACK?: string;
19
18
  };
20
19
  }
21
20
  interface NotificationServiceWranglerConfig {
package/dist/types.d.cts CHANGED
@@ -1,7 +1,7 @@
1
1
  import { I as IEmailConnector, n as IEmail, o as IContact, a as ISmsConnector, p as ISms } from './shared/notification.BiG4Q650.cjs';
2
2
  export { C as ClearReceivedEmailsInput, m as ClearReceivedEmailsOutput, G as GetReceivedEmailsInput, j as GetReceivedEmailsOutput, q as IAttachment, r as IPushNotification, s as ISlack, t as IWebhook, N as NotificationQueueMessage, R as ReceivedEmail, b as SendEmailInput, c as SendEmailOutput, f as SendSlackInput, g as SendSlackOutput, d as SendSmsInput, e as SendSmsOutput, h as SendWebhookInput, i as SendWebhookOutput, S as SlackConnector, k as WaitForEmailInput, l as WaitForEmailOutput, W as WebhookConnector, u as clearReceivedEmailsInputSchema, v as getReceivedEmailsInputSchema, w as iAttachmentSchema, x as iContactSchema, y as iEmailSchema, z as sendEmailInputSchema, A as sendSlackInputSchema, B as sendSmsInputSchema, D as sendWebhookInputSchema, E as waitForEmailInputSchema } from './shared/notification.BiG4Q650.cjs';
3
3
  import twilio from 'twilio';
4
- export { a as NotificationServiceEnv, b as NotificationServiceEnvironmentConfig, N as NotificationServiceWranglerConfig } from './shared/notification.CdlaOUd0.cjs';
4
+ export { a as NotificationServiceEnv, b as NotificationServiceEnvironmentConfig, N as NotificationServiceWranglerConfig } from './shared/notification.mdV1ug8W.cjs';
5
5
  import 'zod';
6
6
  import 'zod/v4';
7
7
 
package/dist/types.d.mts CHANGED
@@ -1,7 +1,7 @@
1
1
  import { I as IEmailConnector, n as IEmail, o as IContact, a as ISmsConnector, p as ISms } from './shared/notification.BiG4Q650.mjs';
2
2
  export { C as ClearReceivedEmailsInput, m as ClearReceivedEmailsOutput, G as GetReceivedEmailsInput, j as GetReceivedEmailsOutput, q as IAttachment, r as IPushNotification, s as ISlack, t as IWebhook, N as NotificationQueueMessage, R as ReceivedEmail, b as SendEmailInput, c as SendEmailOutput, f as SendSlackInput, g as SendSlackOutput, d as SendSmsInput, e as SendSmsOutput, h as SendWebhookInput, i as SendWebhookOutput, S as SlackConnector, k as WaitForEmailInput, l as WaitForEmailOutput, W as WebhookConnector, u as clearReceivedEmailsInputSchema, v as getReceivedEmailsInputSchema, w as iAttachmentSchema, x as iContactSchema, y as iEmailSchema, z as sendEmailInputSchema, A as sendSlackInputSchema, B as sendSmsInputSchema, D as sendWebhookInputSchema, E as waitForEmailInputSchema } from './shared/notification.BiG4Q650.mjs';
3
3
  import twilio from 'twilio';
4
- export { a as NotificationServiceEnv, b as NotificationServiceEnvironmentConfig, N as NotificationServiceWranglerConfig } from './shared/notification.CdlaOUd0.mjs';
4
+ export { a as NotificationServiceEnv, b as NotificationServiceEnvironmentConfig, N as NotificationServiceWranglerConfig } from './shared/notification.mdV1ug8W.mjs';
5
5
  import 'zod';
6
6
  import 'zod/v4';
7
7
 
package/dist/types.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  import { I as IEmailConnector, n as IEmail, o as IContact, a as ISmsConnector, p as ISms } from './shared/notification.BiG4Q650.js';
2
2
  export { C as ClearReceivedEmailsInput, m as ClearReceivedEmailsOutput, G as GetReceivedEmailsInput, j as GetReceivedEmailsOutput, q as IAttachment, r as IPushNotification, s as ISlack, t as IWebhook, N as NotificationQueueMessage, R as ReceivedEmail, b as SendEmailInput, c as SendEmailOutput, f as SendSlackInput, g as SendSlackOutput, d as SendSmsInput, e as SendSmsOutput, h as SendWebhookInput, i as SendWebhookOutput, S as SlackConnector, k as WaitForEmailInput, l as WaitForEmailOutput, W as WebhookConnector, u as clearReceivedEmailsInputSchema, v as getReceivedEmailsInputSchema, w as iAttachmentSchema, x as iContactSchema, y as iEmailSchema, z as sendEmailInputSchema, A as sendSlackInputSchema, B as sendSmsInputSchema, D as sendWebhookInputSchema, E as waitForEmailInputSchema } from './shared/notification.BiG4Q650.js';
3
3
  import twilio from 'twilio';
4
- export { a as NotificationServiceEnv, b as NotificationServiceEnvironmentConfig, N as NotificationServiceWranglerConfig } from './shared/notification.CdlaOUd0.js';
4
+ export { a as NotificationServiceEnv, b as NotificationServiceEnvironmentConfig, N as NotificationServiceWranglerConfig } from './shared/notification.mdV1ug8W.js';
5
5
  import 'zod';
6
6
  import 'zod/v4';
7
7
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@develit-services/notification",
3
- "version": "0.6.1",
3
+ "version": "0.6.3",
4
4
  "author": "Develit.io s.r.o.",
5
5
  "type": "module",
6
6
  "exports": {
@@ -14,11 +14,6 @@
14
14
  "import": "./dist/export/worker.mjs",
15
15
  "require": "./dist/export/worker.cjs"
16
16
  },
17
- "./db-schema": {
18
- "types": "./dist/database/schema.d.ts",
19
- "import": "./dist/database/schema.mjs",
20
- "require": "./dist/database/schema.cjs"
21
- },
22
17
  "./@types": {
23
18
  "types": "./dist/types.d.ts",
24
19
  "import": "./dist/types.mjs",
@@ -32,10 +27,6 @@
32
27
  "scripts": {
33
28
  "dev": "wrangler dev --port 9236 --persist-to ../../.wrangler/state -c ./wrangler.jsonc -c ../../apps/secrets-store/wrangler.jsonc",
34
29
  "wrangler:generate": "bunx develit wrangler:generate --types",
35
- "db:init": "wrangler d1 execute develit-notification --local --persist-to ../../.wrangler/state --command=\"SELECT 'Creating database...' AS status;\"",
36
- "db:generate": "NODE_OPTIONS='--import tsx' drizzle-kit generate",
37
- "db:migrate": "NODE_OPTIONS='--import tsx' drizzle-kit migrate",
38
- "db:explore": "NODE_OPTIONS='--import tsx' drizzle-kit studio",
39
30
  "types": "bash typegen.sh",
40
31
  "lint": "biome check",
41
32
  "lint:fix": "biome check --fix",
@@ -50,7 +41,6 @@
50
41
  },
51
42
  "peerDependencies": {
52
43
  "@develit-io/backend-sdk": "^9.10.3",
53
- "drizzle-orm": "^0.45.0",
54
44
  "zod": "^4.1.13"
55
45
  }
56
46
  }
@@ -1,7 +0,0 @@
1
- 'use strict';
2
-
3
- const schema = {
4
- __proto__: null
5
- };
6
-
7
- exports.schema = schema;
@@ -1,6 +0,0 @@
1
- declare namespace schema {
2
- export {
3
- };
4
- }
5
-
6
- export { schema as s };
@@ -1,6 +0,0 @@
1
- declare namespace schema {
2
- export {
3
- };
4
- }
5
-
6
- export { schema as s };
@@ -1,6 +0,0 @@
1
- declare namespace schema {
2
- export {
3
- };
4
- }
5
-
6
- export { schema as s };
@@ -1,5 +0,0 @@
1
- const schema = {
2
- __proto__: null
3
- };
4
-
5
- export { schema as s };