@develit-services/notification 0.1.0 → 0.3.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.
- package/dist/export/worker.cjs +25 -23
- package/dist/export/worker.d.cts +3 -4
- package/dist/export/worker.d.mts +3 -4
- package/dist/export/worker.d.ts +3 -4
- package/dist/export/worker.mjs +26 -24
- package/dist/types.d.cts +4 -4
- package/dist/types.d.mts +4 -4
- package/dist/types.d.ts +4 -4
- package/package.json +9 -12
- package/dist/shared/{notification.7yl25yVk.d.cts → notification.B6BS7SD_.d.cts} +3 -3
- package/dist/shared/{notification.Cwt3LtuI.d.ts → notification.CQ6qviKt.d.ts} +3 -3
- package/dist/shared/{notification.BiN8R884.d.mts → notification.jZ826xHp.d.mts} +3 -3
package/dist/export/worker.cjs
CHANGED
|
@@ -3,16 +3,18 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const backendSdk = require('@develit-io/backend-sdk');
|
|
6
|
-
const cloudflare_workers = require('cloudflare:workers');
|
|
7
|
-
const d1 = require('drizzle-orm/d1');
|
|
8
|
-
const slack_connector = require('../shared/notification.Dk_5TX9v.cjs');
|
|
9
6
|
const database_schema = require('../shared/notification.4b3eUEIG.cjs');
|
|
10
7
|
require('drizzle-orm');
|
|
11
8
|
require('drizzle-orm/sqlite-core');
|
|
9
|
+
const cloudflare_workers = require('cloudflare:workers');
|
|
10
|
+
const d1 = require('drizzle-orm/d1');
|
|
11
|
+
const slack_connector = require('../shared/notification.Dk_5TX9v.cjs');
|
|
12
12
|
require('zod');
|
|
13
13
|
require('zod/v4');
|
|
14
14
|
require('twilio');
|
|
15
15
|
|
|
16
|
+
const tables = database_schema.schema;
|
|
17
|
+
|
|
16
18
|
const initiateEmailConnector = async (provider, apiKey, smtpHost, senderEmail, senderName) => {
|
|
17
19
|
const connector = [slack_connector.EcomailConnector].find(
|
|
18
20
|
(conn) => conn.providerName === provider
|
|
@@ -30,8 +32,6 @@ const initiateEmailConnector = async (provider, apiKey, smtpHost, senderEmail, s
|
|
|
30
32
|
});
|
|
31
33
|
};
|
|
32
34
|
|
|
33
|
-
const tables = database_schema.schema;
|
|
34
|
-
|
|
35
35
|
const createAuditLogCommand = async ({
|
|
36
36
|
db,
|
|
37
37
|
auditLog: {
|
|
@@ -77,20 +77,19 @@ const initiateSmsConnector = async (provider, accountId, authToken, serviceId) =
|
|
|
77
77
|
var __defProp = Object.defineProperty;
|
|
78
78
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
79
79
|
var __decorateClass = (decorators, target, key, kind) => {
|
|
80
|
-
var result = __getOwnPropDesc(target, key) ;
|
|
80
|
+
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc(target, key) : target;
|
|
81
81
|
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
82
82
|
if (decorator = decorators[i])
|
|
83
|
-
result = (decorator(target, key, result) ) || result;
|
|
84
|
-
if (result) __defProp(target, key, result);
|
|
83
|
+
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
84
|
+
if (kind && result) __defProp(target, key, result);
|
|
85
85
|
return result;
|
|
86
86
|
};
|
|
87
|
-
|
|
87
|
+
let NotificationServiceBase = class extends backendSdk.develitWorker(
|
|
88
88
|
cloudflare_workers.WorkerEntrypoint
|
|
89
89
|
) {
|
|
90
90
|
constructor(ctx, env) {
|
|
91
91
|
super(ctx, env);
|
|
92
92
|
this.slackConnector = new slack_connector.SlackConnector(this.env.SLACK_WEBHOOK);
|
|
93
|
-
this.name = "notification-service";
|
|
94
93
|
this.db = d1.drizzle(this.env.NOTIFICATION_D1, { schema: tables });
|
|
95
94
|
}
|
|
96
95
|
async queue(batch) {
|
|
@@ -144,7 +143,7 @@ class NotificationServiceBase extends backendSdk.develitWorker(
|
|
|
144
143
|
metadata: {
|
|
145
144
|
ip,
|
|
146
145
|
userAgent,
|
|
147
|
-
initiator: { service, userId }
|
|
146
|
+
initiator: { service: service2, userId }
|
|
148
147
|
}
|
|
149
148
|
} = params;
|
|
150
149
|
if (!this.emailConnector) {
|
|
@@ -163,7 +162,7 @@ class NotificationServiceBase extends backendSdk.develitWorker(
|
|
|
163
162
|
id: backendSdk.uuidv4(),
|
|
164
163
|
event: "EMAIL",
|
|
165
164
|
ip,
|
|
166
|
-
initiatorService:
|
|
165
|
+
initiatorService: service2,
|
|
167
166
|
initiatorUserId: userId,
|
|
168
167
|
userAgent,
|
|
169
168
|
description: JSON.stringify(input)
|
|
@@ -184,7 +183,7 @@ class NotificationServiceBase extends backendSdk.develitWorker(
|
|
|
184
183
|
metadata: {
|
|
185
184
|
ip,
|
|
186
185
|
userAgent,
|
|
187
|
-
initiator: { service, userId }
|
|
186
|
+
initiator: { service: service2, userId }
|
|
188
187
|
}
|
|
189
188
|
} = params;
|
|
190
189
|
if (!this.smsConnector) {
|
|
@@ -203,7 +202,7 @@ class NotificationServiceBase extends backendSdk.develitWorker(
|
|
|
203
202
|
event: "SMS",
|
|
204
203
|
ip,
|
|
205
204
|
userAgent,
|
|
206
|
-
initiatorService:
|
|
205
|
+
initiatorService: service2,
|
|
207
206
|
initiatorUserId: userId,
|
|
208
207
|
description: JSON.stringify(input)
|
|
209
208
|
}
|
|
@@ -291,31 +290,34 @@ class NotificationServiceBase extends backendSdk.develitWorker(
|
|
|
291
290
|
}
|
|
292
291
|
);
|
|
293
292
|
}
|
|
294
|
-
}
|
|
293
|
+
};
|
|
295
294
|
__decorateClass([
|
|
296
295
|
backendSdk.cloudflareQueue({ baseDelay: 60 })
|
|
297
|
-
], NotificationServiceBase.prototype, "queue");
|
|
296
|
+
], NotificationServiceBase.prototype, "queue", 1);
|
|
298
297
|
__decorateClass([
|
|
299
298
|
backendSdk.action("private-send-email")
|
|
300
|
-
], NotificationServiceBase.prototype, "_sendEmail");
|
|
299
|
+
], NotificationServiceBase.prototype, "_sendEmail", 1);
|
|
301
300
|
__decorateClass([
|
|
302
301
|
backendSdk.action("private-send-sms")
|
|
303
|
-
], NotificationServiceBase.prototype, "_sendSms");
|
|
302
|
+
], NotificationServiceBase.prototype, "_sendSms", 1);
|
|
304
303
|
__decorateClass([
|
|
305
304
|
backendSdk.action("public-send-email")
|
|
306
|
-
], NotificationServiceBase.prototype, "sendEmail");
|
|
305
|
+
], NotificationServiceBase.prototype, "sendEmail", 1);
|
|
307
306
|
__decorateClass([
|
|
308
307
|
backendSdk.action("public-send-email-sync")
|
|
309
|
-
], NotificationServiceBase.prototype, "sendEmailSync");
|
|
308
|
+
], NotificationServiceBase.prototype, "sendEmailSync", 1);
|
|
310
309
|
__decorateClass([
|
|
311
310
|
backendSdk.action("public-send-sms")
|
|
312
|
-
], NotificationServiceBase.prototype, "sendSms");
|
|
311
|
+
], NotificationServiceBase.prototype, "sendSms", 1);
|
|
313
312
|
__decorateClass([
|
|
314
313
|
backendSdk.action("send-push-notification")
|
|
315
|
-
], NotificationServiceBase.prototype, "_sendPushNotification");
|
|
314
|
+
], NotificationServiceBase.prototype, "_sendPushNotification", 1);
|
|
316
315
|
__decorateClass([
|
|
317
316
|
backendSdk.action("send-slack-notification")
|
|
318
|
-
], NotificationServiceBase.prototype, "sendSlackNotification");
|
|
317
|
+
], NotificationServiceBase.prototype, "sendSlackNotification", 1);
|
|
318
|
+
NotificationServiceBase = __decorateClass([
|
|
319
|
+
backendSdk.service("notification")
|
|
320
|
+
], NotificationServiceBase);
|
|
319
321
|
function defineNotificationService() {
|
|
320
322
|
return class NotificationService extends NotificationServiceBase {
|
|
321
323
|
constructor(ctx, env) {
|
package/dist/export/worker.d.cts
CHANGED
|
@@ -1,16 +1,15 @@
|
|
|
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 SlackConnector, I as IEmailConnector, a as ISmsConnector, t as tables, N as NotificationQueueMessage, b as SendEmailInput, c as SendEmailOutput, d as SendSmsInput, e as SendSmsOutput, f as SendSlackInput, g as SendSlackOutput } from '../shared/notification.B6BS7SD_.cjs';
|
|
3
4
|
import { WorkerEntrypoint } from 'cloudflare:workers';
|
|
4
5
|
import { DrizzleD1Database } from 'drizzle-orm/d1';
|
|
5
|
-
import { S as SlackConnector, I as IEmailConnector, a as ISmsConnector, t as tables, N as NotificationQueueMessage, b as SendEmailInput, c as SendEmailOutput, d as SendSmsInput, e as SendSmsOutput, f as SendSlackInput, g as SendSlackOutput } from '../shared/notification.7yl25yVk.cjs';
|
|
6
|
-
import 'zod';
|
|
7
|
-
import 'zod/v4';
|
|
8
6
|
import '../shared/notification.BJyMXKGH.cjs';
|
|
9
7
|
import 'drizzle-orm/sqlite-core';
|
|
8
|
+
import 'zod';
|
|
9
|
+
import 'zod/v4';
|
|
10
10
|
|
|
11
11
|
declare const NotificationServiceBase_base: (abstract new (ctx: ExecutionContext, env: NotificationEnv) => WorkerEntrypoint<NotificationEnv, {}>) & (abstract new (...args: any[]) => _develit_io_backend_sdk.DevelitWorkerMethods);
|
|
12
12
|
declare class NotificationServiceBase extends NotificationServiceBase_base {
|
|
13
|
-
readonly name: string;
|
|
14
13
|
readonly slackConnector: SlackConnector;
|
|
15
14
|
protected emailConnector: IEmailConnector;
|
|
16
15
|
protected smsConnector: ISmsConnector;
|
package/dist/export/worker.d.mts
CHANGED
|
@@ -1,16 +1,15 @@
|
|
|
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 SlackConnector, I as IEmailConnector, a as ISmsConnector, t as tables, N as NotificationQueueMessage, b as SendEmailInput, c as SendEmailOutput, d as SendSmsInput, e as SendSmsOutput, f as SendSlackInput, g as SendSlackOutput } from '../shared/notification.jZ826xHp.mjs';
|
|
3
4
|
import { WorkerEntrypoint } from 'cloudflare:workers';
|
|
4
5
|
import { DrizzleD1Database } from 'drizzle-orm/d1';
|
|
5
|
-
import { S as SlackConnector, I as IEmailConnector, a as ISmsConnector, t as tables, N as NotificationQueueMessage, b as SendEmailInput, c as SendEmailOutput, d as SendSmsInput, e as SendSmsOutput, f as SendSlackInput, g as SendSlackOutput } from '../shared/notification.BiN8R884.mjs';
|
|
6
|
-
import 'zod';
|
|
7
|
-
import 'zod/v4';
|
|
8
6
|
import '../shared/notification.BJyMXKGH.mjs';
|
|
9
7
|
import 'drizzle-orm/sqlite-core';
|
|
8
|
+
import 'zod';
|
|
9
|
+
import 'zod/v4';
|
|
10
10
|
|
|
11
11
|
declare const NotificationServiceBase_base: (abstract new (ctx: ExecutionContext, env: NotificationEnv) => WorkerEntrypoint<NotificationEnv, {}>) & (abstract new (...args: any[]) => _develit_io_backend_sdk.DevelitWorkerMethods);
|
|
12
12
|
declare class NotificationServiceBase extends NotificationServiceBase_base {
|
|
13
|
-
readonly name: string;
|
|
14
13
|
readonly slackConnector: SlackConnector;
|
|
15
14
|
protected emailConnector: IEmailConnector;
|
|
16
15
|
protected smsConnector: ISmsConnector;
|
package/dist/export/worker.d.ts
CHANGED
|
@@ -1,16 +1,15 @@
|
|
|
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 SlackConnector, I as IEmailConnector, a as ISmsConnector, t as tables, N as NotificationQueueMessage, b as SendEmailInput, c as SendEmailOutput, d as SendSmsInput, e as SendSmsOutput, f as SendSlackInput, g as SendSlackOutput } from '../shared/notification.CQ6qviKt.js';
|
|
3
4
|
import { WorkerEntrypoint } from 'cloudflare:workers';
|
|
4
5
|
import { DrizzleD1Database } from 'drizzle-orm/d1';
|
|
5
|
-
import { S as SlackConnector, I as IEmailConnector, a as ISmsConnector, t as tables, N as NotificationQueueMessage, b as SendEmailInput, c as SendEmailOutput, d as SendSmsInput, e as SendSmsOutput, f as SendSlackInput, g as SendSlackOutput } from '../shared/notification.Cwt3LtuI.js';
|
|
6
|
-
import 'zod';
|
|
7
|
-
import 'zod/v4';
|
|
8
6
|
import '../shared/notification.BJyMXKGH.js';
|
|
9
7
|
import 'drizzle-orm/sqlite-core';
|
|
8
|
+
import 'zod';
|
|
9
|
+
import 'zod/v4';
|
|
10
10
|
|
|
11
11
|
declare const NotificationServiceBase_base: (abstract new (ctx: ExecutionContext, env: NotificationEnv) => WorkerEntrypoint<NotificationEnv, {}>) & (abstract new (...args: any[]) => _develit_io_backend_sdk.DevelitWorkerMethods);
|
|
12
12
|
declare class NotificationServiceBase extends NotificationServiceBase_base {
|
|
13
|
-
readonly name: string;
|
|
14
13
|
readonly slackConnector: SlackConnector;
|
|
15
14
|
protected emailConnector: IEmailConnector;
|
|
16
15
|
protected smsConnector: ISmsConnector;
|
package/dist/export/worker.mjs
CHANGED
|
@@ -1,14 +1,16 @@
|
|
|
1
|
-
import { createInternalError, uuidv4, develitWorker, cloudflareQueue, action } from '@develit-io/backend-sdk';
|
|
2
|
-
import { WorkerEntrypoint } from 'cloudflare:workers';
|
|
3
|
-
import { drizzle } from 'drizzle-orm/d1';
|
|
4
|
-
import { E as EcomailConnector, T as TwilioConnector, S as SlackConnector, s as sendEmailInputSchema, a as sendSmsInputSchema, b as sendSlackInputSchema } from '../shared/notification.DkjmuyrV.mjs';
|
|
1
|
+
import { createInternalError, uuidv4, develitWorker, cloudflareQueue, action, service } from '@develit-io/backend-sdk';
|
|
5
2
|
import { s as schema } from '../shared/notification.C0X8Orrh.mjs';
|
|
6
3
|
import 'drizzle-orm';
|
|
7
4
|
import 'drizzle-orm/sqlite-core';
|
|
5
|
+
import { WorkerEntrypoint } from 'cloudflare:workers';
|
|
6
|
+
import { drizzle } from 'drizzle-orm/d1';
|
|
7
|
+
import { E as EcomailConnector, T as TwilioConnector, S as SlackConnector, s as sendEmailInputSchema, a as sendSmsInputSchema, b as sendSlackInputSchema } from '../shared/notification.DkjmuyrV.mjs';
|
|
8
8
|
import 'zod';
|
|
9
9
|
import 'zod/v4';
|
|
10
10
|
import 'twilio';
|
|
11
11
|
|
|
12
|
+
const tables = schema;
|
|
13
|
+
|
|
12
14
|
const initiateEmailConnector = async (provider, apiKey, smtpHost, senderEmail, senderName) => {
|
|
13
15
|
const connector = [EcomailConnector].find(
|
|
14
16
|
(conn) => conn.providerName === provider
|
|
@@ -26,8 +28,6 @@ const initiateEmailConnector = async (provider, apiKey, smtpHost, senderEmail, s
|
|
|
26
28
|
});
|
|
27
29
|
};
|
|
28
30
|
|
|
29
|
-
const tables = schema;
|
|
30
|
-
|
|
31
31
|
const createAuditLogCommand = async ({
|
|
32
32
|
db,
|
|
33
33
|
auditLog: {
|
|
@@ -73,20 +73,19 @@ const initiateSmsConnector = async (provider, accountId, authToken, serviceId) =
|
|
|
73
73
|
var __defProp = Object.defineProperty;
|
|
74
74
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
75
75
|
var __decorateClass = (decorators, target, key, kind) => {
|
|
76
|
-
var result = __getOwnPropDesc(target, key) ;
|
|
76
|
+
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc(target, key) : target;
|
|
77
77
|
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
78
78
|
if (decorator = decorators[i])
|
|
79
|
-
result = (decorator(target, key, result) ) || result;
|
|
80
|
-
if (result) __defProp(target, key, result);
|
|
79
|
+
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
80
|
+
if (kind && result) __defProp(target, key, result);
|
|
81
81
|
return result;
|
|
82
82
|
};
|
|
83
|
-
|
|
83
|
+
let NotificationServiceBase = class extends develitWorker(
|
|
84
84
|
WorkerEntrypoint
|
|
85
85
|
) {
|
|
86
86
|
constructor(ctx, env) {
|
|
87
87
|
super(ctx, env);
|
|
88
88
|
this.slackConnector = new SlackConnector(this.env.SLACK_WEBHOOK);
|
|
89
|
-
this.name = "notification-service";
|
|
90
89
|
this.db = drizzle(this.env.NOTIFICATION_D1, { schema: tables });
|
|
91
90
|
}
|
|
92
91
|
async queue(batch) {
|
|
@@ -140,7 +139,7 @@ class NotificationServiceBase extends develitWorker(
|
|
|
140
139
|
metadata: {
|
|
141
140
|
ip,
|
|
142
141
|
userAgent,
|
|
143
|
-
initiator: { service, userId }
|
|
142
|
+
initiator: { service: service2, userId }
|
|
144
143
|
}
|
|
145
144
|
} = params;
|
|
146
145
|
if (!this.emailConnector) {
|
|
@@ -159,7 +158,7 @@ class NotificationServiceBase extends develitWorker(
|
|
|
159
158
|
id: uuidv4(),
|
|
160
159
|
event: "EMAIL",
|
|
161
160
|
ip,
|
|
162
|
-
initiatorService:
|
|
161
|
+
initiatorService: service2,
|
|
163
162
|
initiatorUserId: userId,
|
|
164
163
|
userAgent,
|
|
165
164
|
description: JSON.stringify(input)
|
|
@@ -180,7 +179,7 @@ class NotificationServiceBase extends develitWorker(
|
|
|
180
179
|
metadata: {
|
|
181
180
|
ip,
|
|
182
181
|
userAgent,
|
|
183
|
-
initiator: { service, userId }
|
|
182
|
+
initiator: { service: service2, userId }
|
|
184
183
|
}
|
|
185
184
|
} = params;
|
|
186
185
|
if (!this.smsConnector) {
|
|
@@ -199,7 +198,7 @@ class NotificationServiceBase extends develitWorker(
|
|
|
199
198
|
event: "SMS",
|
|
200
199
|
ip,
|
|
201
200
|
userAgent,
|
|
202
|
-
initiatorService:
|
|
201
|
+
initiatorService: service2,
|
|
203
202
|
initiatorUserId: userId,
|
|
204
203
|
description: JSON.stringify(input)
|
|
205
204
|
}
|
|
@@ -287,31 +286,34 @@ class NotificationServiceBase extends develitWorker(
|
|
|
287
286
|
}
|
|
288
287
|
);
|
|
289
288
|
}
|
|
290
|
-
}
|
|
289
|
+
};
|
|
291
290
|
__decorateClass([
|
|
292
291
|
cloudflareQueue({ baseDelay: 60 })
|
|
293
|
-
], NotificationServiceBase.prototype, "queue");
|
|
292
|
+
], NotificationServiceBase.prototype, "queue", 1);
|
|
294
293
|
__decorateClass([
|
|
295
294
|
action("private-send-email")
|
|
296
|
-
], NotificationServiceBase.prototype, "_sendEmail");
|
|
295
|
+
], NotificationServiceBase.prototype, "_sendEmail", 1);
|
|
297
296
|
__decorateClass([
|
|
298
297
|
action("private-send-sms")
|
|
299
|
-
], NotificationServiceBase.prototype, "_sendSms");
|
|
298
|
+
], NotificationServiceBase.prototype, "_sendSms", 1);
|
|
300
299
|
__decorateClass([
|
|
301
300
|
action("public-send-email")
|
|
302
|
-
], NotificationServiceBase.prototype, "sendEmail");
|
|
301
|
+
], NotificationServiceBase.prototype, "sendEmail", 1);
|
|
303
302
|
__decorateClass([
|
|
304
303
|
action("public-send-email-sync")
|
|
305
|
-
], NotificationServiceBase.prototype, "sendEmailSync");
|
|
304
|
+
], NotificationServiceBase.prototype, "sendEmailSync", 1);
|
|
306
305
|
__decorateClass([
|
|
307
306
|
action("public-send-sms")
|
|
308
|
-
], NotificationServiceBase.prototype, "sendSms");
|
|
307
|
+
], NotificationServiceBase.prototype, "sendSms", 1);
|
|
309
308
|
__decorateClass([
|
|
310
309
|
action("send-push-notification")
|
|
311
|
-
], NotificationServiceBase.prototype, "_sendPushNotification");
|
|
310
|
+
], NotificationServiceBase.prototype, "_sendPushNotification", 1);
|
|
312
311
|
__decorateClass([
|
|
313
312
|
action("send-slack-notification")
|
|
314
|
-
], NotificationServiceBase.prototype, "sendSlackNotification");
|
|
313
|
+
], NotificationServiceBase.prototype, "sendSlackNotification", 1);
|
|
314
|
+
NotificationServiceBase = __decorateClass([
|
|
315
|
+
service("notification")
|
|
316
|
+
], NotificationServiceBase);
|
|
315
317
|
function defineNotificationService() {
|
|
316
318
|
return class NotificationService extends NotificationServiceBase {
|
|
317
319
|
constructor(ctx, env) {
|
package/dist/types.d.cts
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { I as IEmailConnector, h as IEmail, i as IContact, a as ISmsConnector, j as ISms, t as tables } from './shared/notification.
|
|
2
|
-
export { n as IAttachment, q as IPushNotification, r as ISlack, N as NotificationQueueMessage, b as SendEmailInput, c as SendEmailOutput, f as SendSlackInput, g as SendSlackOutput, d as SendSmsInput, e as SendSmsOutput, S as SlackConnector, l as iAttachmentSchema, k as iContactSchema, m as iEmailSchema, s as sendEmailInputSchema, o as sendSlackInputSchema, p as sendSmsInputSchema } from './shared/notification.
|
|
1
|
+
import { I as IEmailConnector, h as IEmail, i as IContact, a as ISmsConnector, j as ISms, t as tables } from './shared/notification.B6BS7SD_.cjs';
|
|
2
|
+
export { n as IAttachment, q as IPushNotification, r as ISlack, N as NotificationQueueMessage, b as SendEmailInput, c as SendEmailOutput, f as SendSlackInput, g as SendSlackOutput, d as SendSmsInput, e as SendSmsOutput, S as SlackConnector, l as iAttachmentSchema, k as iContactSchema, m as iEmailSchema, s as sendEmailInputSchema, o as sendSlackInputSchema, p as sendSmsInputSchema } from './shared/notification.B6BS7SD_.cjs';
|
|
3
3
|
import { InternalError } from '@develit-io/backend-sdk';
|
|
4
4
|
import twilio from 'twilio';
|
|
5
5
|
import { InferSelectModel, InferInsertModel } from 'drizzle-orm';
|
|
6
6
|
export { b as NotificationServiceEnv, a as NotificationServiceEnvironmentConfig, N as NotificationServiceWranglerConfig } from './shared/notification.CBrLTgQh.cjs';
|
|
7
|
-
import 'zod';
|
|
8
|
-
import 'zod/v4';
|
|
9
7
|
import './shared/notification.BJyMXKGH.cjs';
|
|
10
8
|
import 'drizzle-orm/sqlite-core';
|
|
9
|
+
import 'zod';
|
|
10
|
+
import 'zod/v4';
|
|
11
11
|
|
|
12
12
|
declare class EcomailConnector extends IEmailConnector {
|
|
13
13
|
static providerName: string;
|
package/dist/types.d.mts
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { I as IEmailConnector, h as IEmail, i as IContact, a as ISmsConnector, j as ISms, t as tables } from './shared/notification.
|
|
2
|
-
export { n as IAttachment, q as IPushNotification, r as ISlack, N as NotificationQueueMessage, b as SendEmailInput, c as SendEmailOutput, f as SendSlackInput, g as SendSlackOutput, d as SendSmsInput, e as SendSmsOutput, S as SlackConnector, l as iAttachmentSchema, k as iContactSchema, m as iEmailSchema, s as sendEmailInputSchema, o as sendSlackInputSchema, p as sendSmsInputSchema } from './shared/notification.
|
|
1
|
+
import { I as IEmailConnector, h as IEmail, i as IContact, a as ISmsConnector, j as ISms, t as tables } from './shared/notification.jZ826xHp.mjs';
|
|
2
|
+
export { n as IAttachment, q as IPushNotification, r as ISlack, N as NotificationQueueMessage, b as SendEmailInput, c as SendEmailOutput, f as SendSlackInput, g as SendSlackOutput, d as SendSmsInput, e as SendSmsOutput, S as SlackConnector, l as iAttachmentSchema, k as iContactSchema, m as iEmailSchema, s as sendEmailInputSchema, o as sendSlackInputSchema, p as sendSmsInputSchema } from './shared/notification.jZ826xHp.mjs';
|
|
3
3
|
import { InternalError } from '@develit-io/backend-sdk';
|
|
4
4
|
import twilio from 'twilio';
|
|
5
5
|
import { InferSelectModel, InferInsertModel } from 'drizzle-orm';
|
|
6
6
|
export { b as NotificationServiceEnv, a as NotificationServiceEnvironmentConfig, N as NotificationServiceWranglerConfig } from './shared/notification.CBrLTgQh.mjs';
|
|
7
|
-
import 'zod';
|
|
8
|
-
import 'zod/v4';
|
|
9
7
|
import './shared/notification.BJyMXKGH.mjs';
|
|
10
8
|
import 'drizzle-orm/sqlite-core';
|
|
9
|
+
import 'zod';
|
|
10
|
+
import 'zod/v4';
|
|
11
11
|
|
|
12
12
|
declare class EcomailConnector extends IEmailConnector {
|
|
13
13
|
static providerName: string;
|
package/dist/types.d.ts
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { I as IEmailConnector, h as IEmail, i as IContact, a as ISmsConnector, j as ISms, t as tables } from './shared/notification.
|
|
2
|
-
export { n as IAttachment, q as IPushNotification, r as ISlack, N as NotificationQueueMessage, b as SendEmailInput, c as SendEmailOutput, f as SendSlackInput, g as SendSlackOutput, d as SendSmsInput, e as SendSmsOutput, S as SlackConnector, l as iAttachmentSchema, k as iContactSchema, m as iEmailSchema, s as sendEmailInputSchema, o as sendSlackInputSchema, p as sendSmsInputSchema } from './shared/notification.
|
|
1
|
+
import { I as IEmailConnector, h as IEmail, i as IContact, a as ISmsConnector, j as ISms, t as tables } from './shared/notification.CQ6qviKt.js';
|
|
2
|
+
export { n as IAttachment, q as IPushNotification, r as ISlack, N as NotificationQueueMessage, b as SendEmailInput, c as SendEmailOutput, f as SendSlackInput, g as SendSlackOutput, d as SendSmsInput, e as SendSmsOutput, S as SlackConnector, l as iAttachmentSchema, k as iContactSchema, m as iEmailSchema, s as sendEmailInputSchema, o as sendSlackInputSchema, p as sendSmsInputSchema } from './shared/notification.CQ6qviKt.js';
|
|
3
3
|
import { InternalError } from '@develit-io/backend-sdk';
|
|
4
4
|
import twilio from 'twilio';
|
|
5
5
|
import { InferSelectModel, InferInsertModel } from 'drizzle-orm';
|
|
6
6
|
export { b as NotificationServiceEnv, a as NotificationServiceEnvironmentConfig, N as NotificationServiceWranglerConfig } from './shared/notification.CBrLTgQh.js';
|
|
7
|
-
import 'zod';
|
|
8
|
-
import 'zod/v4';
|
|
9
7
|
import './shared/notification.BJyMXKGH.js';
|
|
10
8
|
import 'drizzle-orm/sqlite-core';
|
|
9
|
+
import 'zod';
|
|
10
|
+
import 'zod/v4';
|
|
11
11
|
|
|
12
12
|
declare class EcomailConnector extends IEmailConnector {
|
|
13
13
|
static providerName: string;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@develit-services/notification",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.0",
|
|
4
4
|
"author": "Develit.io s.r.o.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"exports": {
|
|
@@ -30,33 +30,30 @@
|
|
|
30
30
|
"./dist"
|
|
31
31
|
],
|
|
32
32
|
"scripts": {
|
|
33
|
-
"dev": "wrangler dev --port
|
|
33
|
+
"dev": "wrangler dev --port 9236 --persist-to ../../.wrangler/state",
|
|
34
34
|
"wrangler:generate": "bunx develit wrangler:generate --types",
|
|
35
35
|
"db:init": "wrangler d1 execute develit-notification --local --persist-to ../../.wrangler/state --command=\"SELECT 'Creating database...' AS status;\"",
|
|
36
36
|
"db:generate": "drizzle-kit generate",
|
|
37
37
|
"db:migrate": "drizzle-kit migrate",
|
|
38
38
|
"db:explore": "drizzle-kit studio",
|
|
39
39
|
"types": "wrangler types --env-interface NotificationEnv --include-runtime false",
|
|
40
|
-
"typecheck": "tsc",
|
|
41
40
|
"lint": "biome check",
|
|
42
41
|
"lint:fix": "biome check --fix",
|
|
43
42
|
"test": "vitest",
|
|
44
43
|
"test:cov": "vitest run --coverage",
|
|
45
44
|
"test:unit": "vitest unit fixtures",
|
|
46
45
|
"test:int": "vitest integration",
|
|
47
|
-
"build": "unbuild"
|
|
48
|
-
"changelogen": "bunx changelogen@latest --bump",
|
|
49
|
-
"release": "bun run build && bunx changelogen@latest --release --push && npm publish --access public"
|
|
46
|
+
"build": "unbuild"
|
|
50
47
|
},
|
|
51
48
|
"peerDependencies": {
|
|
52
|
-
"@develit-io/backend-sdk": "
|
|
53
|
-
"drizzle-kit": "
|
|
54
|
-
"drizzle-orm": "
|
|
49
|
+
"@develit-io/backend-sdk": "9.1.6",
|
|
50
|
+
"drizzle-kit": "0.31.8",
|
|
51
|
+
"drizzle-orm": "0.45.0",
|
|
55
52
|
"drizzle-seed": "*",
|
|
56
|
-
"wrangler": "
|
|
57
|
-
"zod": "
|
|
53
|
+
"wrangler": "4.50.0",
|
|
54
|
+
"zod": "4.1.13"
|
|
58
55
|
},
|
|
59
56
|
"dependencies": {
|
|
60
|
-
"twilio": "^5.10.
|
|
57
|
+
"twilio": "^5.10.7"
|
|
61
58
|
}
|
|
62
59
|
}
|
|
@@ -1,7 +1,9 @@
|
|
|
1
|
+
import { s as schema } from './notification.BJyMXKGH.cjs';
|
|
1
2
|
import z$1, { z } from 'zod';
|
|
2
3
|
import { z as z$2 } from 'zod/v4';
|
|
3
4
|
import { InternalError } from '@develit-io/backend-sdk';
|
|
4
|
-
|
|
5
|
+
|
|
6
|
+
declare const tables: typeof schema;
|
|
5
7
|
|
|
6
8
|
declare const iContactSchema: z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
7
9
|
email: z.ZodString;
|
|
@@ -223,7 +225,5 @@ declare class SlackConnector {
|
|
|
223
225
|
sendNotificationToAllSlack(message: string): Promise<void>;
|
|
224
226
|
}
|
|
225
227
|
|
|
226
|
-
declare const tables: typeof schema;
|
|
227
|
-
|
|
228
228
|
export { IEmailConnector as I, SlackConnector as S, ISmsConnector as a, iContactSchema as k, iAttachmentSchema as l, iEmailSchema as m, sendSlackInputSchema as o, sendSmsInputSchema as p, sendEmailInputSchema as s, tables as t };
|
|
229
229
|
export type { NotificationQueueMessage as N, SendEmailInput as b, SendEmailOutput as c, SendSmsInput as d, SendSmsOutput as e, SendSlackInput as f, SendSlackOutput as g, IEmail as h, IContact as i, ISms as j, IAttachment as n, IPushNotification as q, ISlack as r };
|
|
@@ -1,7 +1,9 @@
|
|
|
1
|
+
import { s as schema } from './notification.BJyMXKGH.js';
|
|
1
2
|
import z$1, { z } from 'zod';
|
|
2
3
|
import { z as z$2 } from 'zod/v4';
|
|
3
4
|
import { InternalError } from '@develit-io/backend-sdk';
|
|
4
|
-
|
|
5
|
+
|
|
6
|
+
declare const tables: typeof schema;
|
|
5
7
|
|
|
6
8
|
declare const iContactSchema: z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
7
9
|
email: z.ZodString;
|
|
@@ -223,7 +225,5 @@ declare class SlackConnector {
|
|
|
223
225
|
sendNotificationToAllSlack(message: string): Promise<void>;
|
|
224
226
|
}
|
|
225
227
|
|
|
226
|
-
declare const tables: typeof schema;
|
|
227
|
-
|
|
228
228
|
export { IEmailConnector as I, SlackConnector as S, ISmsConnector as a, iContactSchema as k, iAttachmentSchema as l, iEmailSchema as m, sendSlackInputSchema as o, sendSmsInputSchema as p, sendEmailInputSchema as s, tables as t };
|
|
229
229
|
export type { NotificationQueueMessage as N, SendEmailInput as b, SendEmailOutput as c, SendSmsInput as d, SendSmsOutput as e, SendSlackInput as f, SendSlackOutput as g, IEmail as h, IContact as i, ISms as j, IAttachment as n, IPushNotification as q, ISlack as r };
|
|
@@ -1,7 +1,9 @@
|
|
|
1
|
+
import { s as schema } from './notification.BJyMXKGH.mjs';
|
|
1
2
|
import z$1, { z } from 'zod';
|
|
2
3
|
import { z as z$2 } from 'zod/v4';
|
|
3
4
|
import { InternalError } from '@develit-io/backend-sdk';
|
|
4
|
-
|
|
5
|
+
|
|
6
|
+
declare const tables: typeof schema;
|
|
5
7
|
|
|
6
8
|
declare const iContactSchema: z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
7
9
|
email: z.ZodString;
|
|
@@ -223,7 +225,5 @@ declare class SlackConnector {
|
|
|
223
225
|
sendNotificationToAllSlack(message: string): Promise<void>;
|
|
224
226
|
}
|
|
225
227
|
|
|
226
|
-
declare const tables: typeof schema;
|
|
227
|
-
|
|
228
228
|
export { IEmailConnector as I, SlackConnector as S, ISmsConnector as a, iContactSchema as k, iAttachmentSchema as l, iEmailSchema as m, sendSlackInputSchema as o, sendSmsInputSchema as p, sendEmailInputSchema as s, tables as t };
|
|
229
229
|
export type { NotificationQueueMessage as N, SendEmailInput as b, SendEmailOutput as c, SendSmsInput as d, SendSmsOutput as e, SendSlackInput as f, SendSlackOutput as g, IEmail as h, IContact as i, ISms as j, IAttachment as n, IPushNotification as q, ISlack as r };
|