@develit-services/notification 1.0.1 → 2.1.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.
@@ -1,7 +1,5 @@
1
1
  'use strict';
2
2
 
3
- Object.defineProperty(exports, '__esModule', { value: true });
4
-
5
3
  const backendSdk = require('@develit-io/backend-sdk');
6
4
  const webhook_connector = require('../shared/notification.BLPB8Ib2.cjs');
7
5
  require('@develit-io/backend-sdk/signature');
@@ -570,7 +568,4 @@ function defineNotificationService() {
570
568
  };
571
569
  }
572
570
 
573
- const NotificationService = defineNotificationService();
574
-
575
- exports.default = NotificationService;
576
571
  exports.defineNotificationService = defineNotificationService;
@@ -41,10 +41,6 @@ declare class NotificationServiceBase extends NotificationServiceBase_base {
41
41
  */
42
42
  clearReceivedEmails(input: ClearReceivedEmailsInput): Promise<IRPCResponse<ClearReceivedEmailsOutput>>;
43
43
  }
44
- declare function defineNotificationService(): new (ctx: ExecutionContext, env: NotificationEnv) => NotificationServiceBase;
44
+ declare function defineNotificationService(): typeof NotificationServiceBase;
45
45
 
46
- declare const _default: new (ctx: ExecutionContext, env: NotificationEnv) => WorkerEntrypoint<NotificationEnv>;
47
-
48
- // @ts-ignore
49
- export = _default;
50
46
  export { defineNotificationService };
@@ -41,8 +41,6 @@ declare class NotificationServiceBase extends NotificationServiceBase_base {
41
41
  */
42
42
  clearReceivedEmails(input: ClearReceivedEmailsInput): Promise<IRPCResponse<ClearReceivedEmailsOutput>>;
43
43
  }
44
- declare function defineNotificationService(): new (ctx: ExecutionContext, env: NotificationEnv) => NotificationServiceBase;
44
+ declare function defineNotificationService(): typeof NotificationServiceBase;
45
45
 
46
- declare const _default: new (ctx: ExecutionContext, env: NotificationEnv) => WorkerEntrypoint<NotificationEnv>;
47
-
48
- export { _default as default, defineNotificationService };
46
+ export { defineNotificationService };
@@ -41,10 +41,6 @@ declare class NotificationServiceBase extends NotificationServiceBase_base {
41
41
  */
42
42
  clearReceivedEmails(input: ClearReceivedEmailsInput): Promise<IRPCResponse<ClearReceivedEmailsOutput>>;
43
43
  }
44
- declare function defineNotificationService(): new (ctx: ExecutionContext, env: NotificationEnv) => NotificationServiceBase;
44
+ declare function defineNotificationService(): typeof NotificationServiceBase;
45
45
 
46
- declare const _default: new (ctx: ExecutionContext, env: NotificationEnv) => WorkerEntrypoint<NotificationEnv>;
47
-
48
- // @ts-ignore
49
- export = _default;
50
46
  export { defineNotificationService };
@@ -566,6 +566,4 @@ function defineNotificationService() {
566
566
  };
567
567
  }
568
568
 
569
- const NotificationService = defineNotificationService();
570
-
571
- export { NotificationService as default, defineNotificationService };
569
+ export { defineNotificationService };
@@ -10,6 +10,7 @@ function defineNotificationServiceWrangler(config) {
10
10
  name
11
11
  }),
12
12
  vars: {
13
+ ...envs.local.customVars,
13
14
  ...envs.local.vars,
14
15
  ENVIRONMENT: "localhost"
15
16
  },
@@ -52,6 +53,7 @@ function defineNotificationServiceWrangler(config) {
52
53
  )) {
53
54
  base.env[envName] = {
54
55
  vars: {
56
+ ...envCfg.customVars,
55
57
  ...envCfg.vars,
56
58
  ENVIRONMENT: envName
57
59
  },
@@ -1,4 +1,4 @@
1
- import { N as NotificationServiceWranglerConfig } from '../shared/notification.mdV1ug8W.cjs';
1
+ import { N as NotificationServiceWranglerConfig } from '../shared/notification.CpJOS747.cjs';
2
2
 
3
3
  declare function defineNotificationServiceWrangler(config: NotificationServiceWranglerConfig): {
4
4
  vars: {
@@ -1,4 +1,4 @@
1
- import { N as NotificationServiceWranglerConfig } from '../shared/notification.mdV1ug8W.mjs';
1
+ import { N as NotificationServiceWranglerConfig } from '../shared/notification.CpJOS747.mjs';
2
2
 
3
3
  declare function defineNotificationServiceWrangler(config: NotificationServiceWranglerConfig): {
4
4
  vars: {
@@ -1,4 +1,4 @@
1
- import { N as NotificationServiceWranglerConfig } from '../shared/notification.mdV1ug8W.js';
1
+ import { N as NotificationServiceWranglerConfig } from '../shared/notification.CpJOS747.js';
2
2
 
3
3
  declare function defineNotificationServiceWrangler(config: NotificationServiceWranglerConfig): {
4
4
  vars: {
@@ -8,6 +8,7 @@ function defineNotificationServiceWrangler(config) {
8
8
  name
9
9
  }),
10
10
  vars: {
11
+ ...envs.local.customVars,
11
12
  ...envs.local.vars,
12
13
  ENVIRONMENT: "localhost"
13
14
  },
@@ -50,6 +51,7 @@ function defineNotificationServiceWrangler(config) {
50
51
  )) {
51
52
  base.env[envName] = {
52
53
  vars: {
54
+ ...envCfg.customVars,
53
55
  ...envCfg.vars,
54
56
  ENVIRONMENT: envName
55
57
  },
@@ -16,6 +16,7 @@ interface NotificationServiceEnvironmentConfig {
16
16
  EMAIL_WHITELIST?: string;
17
17
  EMAIL_WHITELIST_FALLBACK?: string;
18
18
  };
19
+ customVars?: Record<string, string>;
19
20
  }
20
21
  interface NotificationServiceWranglerConfig {
21
22
  project: string;
@@ -16,6 +16,7 @@ interface NotificationServiceEnvironmentConfig {
16
16
  EMAIL_WHITELIST?: string;
17
17
  EMAIL_WHITELIST_FALLBACK?: string;
18
18
  };
19
+ customVars?: Record<string, string>;
19
20
  }
20
21
  interface NotificationServiceWranglerConfig {
21
22
  project: string;
@@ -16,6 +16,7 @@ interface NotificationServiceEnvironmentConfig {
16
16
  EMAIL_WHITELIST?: string;
17
17
  EMAIL_WHITELIST_FALLBACK?: string;
18
18
  };
19
+ customVars?: Record<string, string>;
19
20
  }
20
21
  interface NotificationServiceWranglerConfig {
21
22
  project: string;
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.mdV1ug8W.cjs';
4
+ export { a as NotificationServiceEnv, b as NotificationServiceEnvironmentConfig, N as NotificationServiceWranglerConfig } from './shared/notification.CpJOS747.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.mdV1ug8W.mjs';
4
+ export { a as NotificationServiceEnv, b as NotificationServiceEnvironmentConfig, N as NotificationServiceWranglerConfig } from './shared/notification.CpJOS747.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.mdV1ug8W.js';
4
+ export { a as NotificationServiceEnv, b as NotificationServiceEnvironmentConfig, N as NotificationServiceWranglerConfig } from './shared/notification.CpJOS747.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": "1.0.1",
3
+ "version": "2.1.0",
4
4
  "author": "Develit.io s.r.o.",
5
5
  "type": "module",
6
6
  "exports": {