vintasend 0.9.0 → 0.9.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.
package/README.md CHANGED
@@ -587,7 +587,7 @@ VintaSend has many backend, adapter, and template renderer implementations. If y
587
587
 
588
588
  ##### Backends
589
589
 
590
- * **[vintasend-prisma](https://github.com/vintasoftware/vintasend-prisma/)**: Uses Prisma Client to manage the notifications in the database.
590
+ * **[vintasend-prisma](https://github.com/vintasoftware/vintasend-ts-prisma/)**: Uses Prisma Client to manage the notifications in the database.
591
591
  * **[vintasend-medplum](https://github.com/vintasoftware/vintasend-medplum/)**: Uses Medplum FHIR resources (Communication, Binary, Media) to manage notifications in healthcare applications.
592
592
 
593
593
  ##### Adapters
@@ -0,0 +1,21 @@
1
+ import type { Buffer } from 'node:buffer';
2
+ import type { JsonObject } from '../../types/json-values';
3
+ import type { AnyNotification } from '../../types/notification';
4
+ import type { BaseNotificationTypeConfig } from '../../types/notification-type-config';
5
+ import type { BaseLogger } from '../loggers/base-logger';
6
+ import type { BaseNotificationTemplateRenderer } from './base-notification-template-renderer';
7
+ export type Attachment = File | Buffer | string;
8
+ export type TextNotificationTemplate = {
9
+ text: string;
10
+ };
11
+ export type TextNotificationTemplateContent = {
12
+ text: string;
13
+ };
14
+ export interface BaseTextNotificationTemplateRenderer<Config extends BaseNotificationTypeConfig> extends BaseNotificationTemplateRenderer<Config, TextNotificationTemplate> {
15
+ render(notification: AnyNotification<Config>, context: JsonObject): Promise<TextNotificationTemplate>;
16
+ renderFromTemplateContent(notification: AnyNotification<Config>, templateContent: TextNotificationTemplateContent, context: JsonObject): Promise<TextNotificationTemplate>;
17
+ /**
18
+ * Inject logger into the template renderer (optional - called by VintaSend when logger exists)
19
+ */
20
+ injectLogger?(logger: BaseLogger): void;
21
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vintasend",
3
- "version": "0.9.0",
3
+ "version": "0.9.1",
4
4
  "main": "dist/index.js",
5
5
  "files": [
6
6
  "dist"
@@ -13,9 +13,9 @@
13
13
  "check": "biome check --write .",
14
14
  "build": "tsc",
15
15
  "prepublishOnly": "npm run build",
16
- "test": "jest",
17
- "test:watch": "jest --watch",
18
- "test:coverage": "jest --coverage",
16
+ "test": "vitest run",
17
+ "test:watch": "vitest",
18
+ "test:coverage": "vitest run --coverage",
19
19
  "test:implementations:local": "node scripts/test-implementations-local.js",
20
20
  "release:bump": "node scripts/release-bump.js",
21
21
  "release:bump:patch": "node scripts/release-bump.js --bump=patch",
@@ -26,12 +26,11 @@
26
26
  },
27
27
  "devDependencies": {
28
28
  "@biomejs/biome": "^2.3.11",
29
- "@types/jest": "^30.0.0",
30
29
  "@types/mime-types": "^3.0.1",
31
30
  "@types/node": "^25.0.8",
32
- "jest": "^30.2.0",
33
- "ts-jest": "^29.4.6",
34
- "typescript": "^5.9.3"
31
+ "@vitest/coverage-v8": "4.0.18",
32
+ "typescript": "^5.9.3",
33
+ "vitest": "4.0.18"
35
34
  },
36
35
  "dependencies": {
37
36
  "mime-types": "^3.0.2"