@develit-services/notification 0.4.0 → 0.4.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.
@@ -191,11 +191,15 @@ let NotificationServiceBase = class extends backendSdk.develitWorker(
191
191
  if (!this.smsConnector) {
192
192
  this.smsConnector = await initiateSmsConnector(
193
193
  this.env.SMS_PROVIDER,
194
- this.env.SMS_ACCOUNT_ID,
194
+ (await this.env.SECRETS_STORE.get({
195
+ secretName: "NOTIFICATION_SERVICE_SMS_ACCOUNT_ID"
196
+ })).data?.secretValue || "",
195
197
  (await this.env.SECRETS_STORE.get({
196
198
  secretName: "NOTIFICATION_SERVICE_SMS_AUTH_TOKEN"
197
199
  })).data?.secretValue || "",
198
- this.env.SMS_SERVICE_ID
200
+ (await this.env.SECRETS_STORE.get({
201
+ secretName: "NOTIFICATION_SERVICE_SMS_SERVICE_ID"
202
+ })).data?.secretValue || ""
199
203
  );
200
204
  }
201
205
  await this.smsConnector.sendSms({ message, to });
@@ -187,11 +187,15 @@ let NotificationServiceBase = class extends develitWorker(
187
187
  if (!this.smsConnector) {
188
188
  this.smsConnector = await initiateSmsConnector(
189
189
  this.env.SMS_PROVIDER,
190
- this.env.SMS_ACCOUNT_ID,
190
+ (await this.env.SECRETS_STORE.get({
191
+ secretName: "NOTIFICATION_SERVICE_SMS_ACCOUNT_ID"
192
+ })).data?.secretValue || "",
191
193
  (await this.env.SECRETS_STORE.get({
192
194
  secretName: "NOTIFICATION_SERVICE_SMS_AUTH_TOKEN"
193
195
  })).data?.secretValue || "",
194
- this.env.SMS_SERVICE_ID
196
+ (await this.env.SECRETS_STORE.get({
197
+ secretName: "NOTIFICATION_SERVICE_SMS_SERVICE_ID"
198
+ })).data?.secretValue || ""
195
199
  );
196
200
  }
197
201
  await this.smsConnector.sendSms({ message, to });
@@ -53,12 +53,6 @@ function defineNotificationServiceWrangler(config) {
53
53
  ...envCfg.vars,
54
54
  ENVIRONMENT: envName
55
55
  },
56
- services: [
57
- {
58
- binding: "SECRETS_STORE",
59
- service: `${project}-secrets-store-${envName}`
60
- }
61
- ],
62
56
  d1_databases: [
63
57
  {
64
58
  binding: "NOTIFICATION_D1",
@@ -1,4 +1,4 @@
1
- import { N as NotificationServiceWranglerConfig } from '../shared/notification.CBrLTgQh.cjs';
1
+ import { N as NotificationServiceWranglerConfig } from '../shared/notification.ko9XPJGs.cjs';
2
2
 
3
3
  declare function defineNotificationServiceWrangler(config: NotificationServiceWranglerConfig): {
4
4
  vars: {
@@ -8,8 +8,6 @@ declare function defineNotificationServiceWrangler(config: NotificationServiceWr
8
8
  EMAIL_SENDER_NAME: string;
9
9
  EMAIL_SMTP_HOST: string;
10
10
  SMS_PROVIDER: "twilio";
11
- SMS_ACCOUNT_ID: string;
12
- SMS_SERVICE_ID: string | number;
13
11
  SLACK_WEBHOOK: string;
14
12
  };
15
13
  services: {
@@ -1,4 +1,4 @@
1
- import { N as NotificationServiceWranglerConfig } from '../shared/notification.CBrLTgQh.mjs';
1
+ import { N as NotificationServiceWranglerConfig } from '../shared/notification.ko9XPJGs.mjs';
2
2
 
3
3
  declare function defineNotificationServiceWrangler(config: NotificationServiceWranglerConfig): {
4
4
  vars: {
@@ -8,8 +8,6 @@ declare function defineNotificationServiceWrangler(config: NotificationServiceWr
8
8
  EMAIL_SENDER_NAME: string;
9
9
  EMAIL_SMTP_HOST: string;
10
10
  SMS_PROVIDER: "twilio";
11
- SMS_ACCOUNT_ID: string;
12
- SMS_SERVICE_ID: string | number;
13
11
  SLACK_WEBHOOK: string;
14
12
  };
15
13
  services: {
@@ -1,4 +1,4 @@
1
- import { N as NotificationServiceWranglerConfig } from '../shared/notification.CBrLTgQh.js';
1
+ import { N as NotificationServiceWranglerConfig } from '../shared/notification.ko9XPJGs.js';
2
2
 
3
3
  declare function defineNotificationServiceWrangler(config: NotificationServiceWranglerConfig): {
4
4
  vars: {
@@ -8,8 +8,6 @@ declare function defineNotificationServiceWrangler(config: NotificationServiceWr
8
8
  EMAIL_SENDER_NAME: string;
9
9
  EMAIL_SMTP_HOST: string;
10
10
  SMS_PROVIDER: "twilio";
11
- SMS_ACCOUNT_ID: string;
12
- SMS_SERVICE_ID: string | number;
13
11
  SLACK_WEBHOOK: string;
14
12
  };
15
13
  services: {
@@ -51,12 +51,6 @@ function defineNotificationServiceWrangler(config) {
51
51
  ...envCfg.vars,
52
52
  ENVIRONMENT: envName
53
53
  },
54
- services: [
55
- {
56
- binding: "SECRETS_STORE",
57
- service: `${project}-secrets-store-${envName}`
58
- }
59
- ],
60
54
  d1_databases: [
61
55
  {
62
56
  binding: "NOTIFICATION_D1",
@@ -12,8 +12,6 @@ interface NotificationServiceEnvironmentConfig {
12
12
  EMAIL_SENDER_NAME: string;
13
13
  EMAIL_SMTP_HOST: string;
14
14
  SMS_PROVIDER: 'twilio';
15
- SMS_ACCOUNT_ID: string;
16
- SMS_SERVICE_ID: string | number;
17
15
  SLACK_WEBHOOK: string;
18
16
  };
19
17
  }
@@ -12,8 +12,6 @@ interface NotificationServiceEnvironmentConfig {
12
12
  EMAIL_SENDER_NAME: string;
13
13
  EMAIL_SMTP_HOST: string;
14
14
  SMS_PROVIDER: 'twilio';
15
- SMS_ACCOUNT_ID: string;
16
- SMS_SERVICE_ID: string | number;
17
15
  SLACK_WEBHOOK: string;
18
16
  };
19
17
  }
@@ -12,8 +12,6 @@ interface NotificationServiceEnvironmentConfig {
12
12
  EMAIL_SENDER_NAME: string;
13
13
  EMAIL_SMTP_HOST: string;
14
14
  SMS_PROVIDER: 'twilio';
15
- SMS_ACCOUNT_ID: string;
16
- SMS_SERVICE_ID: string | number;
17
15
  SLACK_WEBHOOK: string;
18
16
  };
19
17
  }
package/dist/types.d.cts CHANGED
@@ -3,7 +3,7 @@ export { n as IAttachment, q as IPushNotification, r as ISlack, N as Notificatio
3
3
  import { InternalError } from '@develit-io/backend-sdk';
4
4
  import twilio from 'twilio';
5
5
  import { InferSelectModel, InferInsertModel } from 'drizzle-orm';
6
- export { b as NotificationServiceEnv, a as NotificationServiceEnvironmentConfig, N as NotificationServiceWranglerConfig } from './shared/notification.CBrLTgQh.cjs';
6
+ export { b as NotificationServiceEnv, a as NotificationServiceEnvironmentConfig, N as NotificationServiceWranglerConfig } from './shared/notification.ko9XPJGs.cjs';
7
7
  import './shared/notification.BJyMXKGH.cjs';
8
8
  import 'drizzle-orm/sqlite-core';
9
9
  import 'zod';
package/dist/types.d.mts CHANGED
@@ -3,7 +3,7 @@ export { n as IAttachment, q as IPushNotification, r as ISlack, N as Notificatio
3
3
  import { InternalError } from '@develit-io/backend-sdk';
4
4
  import twilio from 'twilio';
5
5
  import { InferSelectModel, InferInsertModel } from 'drizzle-orm';
6
- export { b as NotificationServiceEnv, a as NotificationServiceEnvironmentConfig, N as NotificationServiceWranglerConfig } from './shared/notification.CBrLTgQh.mjs';
6
+ export { b as NotificationServiceEnv, a as NotificationServiceEnvironmentConfig, N as NotificationServiceWranglerConfig } from './shared/notification.ko9XPJGs.mjs';
7
7
  import './shared/notification.BJyMXKGH.mjs';
8
8
  import 'drizzle-orm/sqlite-core';
9
9
  import 'zod';
package/dist/types.d.ts CHANGED
@@ -3,7 +3,7 @@ export { n as IAttachment, q as IPushNotification, r as ISlack, N as Notificatio
3
3
  import { InternalError } from '@develit-io/backend-sdk';
4
4
  import twilio from 'twilio';
5
5
  import { InferSelectModel, InferInsertModel } from 'drizzle-orm';
6
- export { b as NotificationServiceEnv, a as NotificationServiceEnvironmentConfig, N as NotificationServiceWranglerConfig } from './shared/notification.CBrLTgQh.js';
6
+ export { b as NotificationServiceEnv, a as NotificationServiceEnvironmentConfig, N as NotificationServiceWranglerConfig } from './shared/notification.ko9XPJGs.js';
7
7
  import './shared/notification.BJyMXKGH.js';
8
8
  import 'drizzle-orm/sqlite-core';
9
9
  import 'zod';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@develit-services/notification",
3
- "version": "0.4.0",
3
+ "version": "0.4.1",
4
4
  "author": "Develit.io s.r.o.",
5
5
  "type": "module",
6
6
  "exports": {