vintasend 0.10.0 → 0.11.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/index.d.ts CHANGED
@@ -2,18 +2,22 @@ export { BaseAttachmentManager } from './services/attachment-manager/base-attach
2
2
  export type { LocalFileAttachmentManagerConfig } from './services/attachment-manager/local-file-attachment-manager';
3
3
  export { LocalFileAttachmentManager } from './services/attachment-manager/local-file-attachment-manager';
4
4
  export type { BaseGitCommitShaProvider } from './services/git-commit-sha/base-git-commit-sha-provider';
5
+ export type { BaseLogger } from './services/loggers/base-logger';
5
6
  export { BaseNotificationAdapter, isOneOffNotification, } from './services/notification-adapters/base-notification-adapter';
6
7
  export type { BaseNotificationBackend } from './services/notification-backends/base-notification-backend';
7
- export { supportsAttachments, isFieldFilter } from './services/notification-backends/base-notification-backend';
8
- export type { NotificationFilter, NotificationFilterFields, DateRange, NotificationFilterCapabilities, StringFilterLookup, StringFieldFilter, } from './services/notification-backends/base-notification-backend';
8
+ export { supportsAttachments, isFieldFilter, } from './services/notification-backends/base-notification-backend';
9
+ export type { NotificationFilter, NotificationFilterFields, DateRange, NotificationFilterCapabilities, NotificationOrderBy, NotificationOrderByField, NotificationOrderDirection, StringFilterLookup, StringFieldFilter, } from './services/notification-backends/base-notification-backend';
9
10
  export type { BaseNotificationQueueService } from './services/notification-queue-service/base-notification-queue-service';
10
11
  export type { BaseNotificationReplicationQueueService } from './services/notification-queue-service/base-notification-replication-queue-service';
11
12
  export type { VintaSend } from './services/notification-service';
12
13
  export { VintaSendFactory } from './services/notification-service';
13
- export type { BaseEmailTemplateRenderer } from './services/notification-template-renderers/base-email-template-renderer';
14
+ export type { BaseEmailTemplateRenderer, EmailTemplate, EmailTemplateContent, } from './services/notification-template-renderers/base-email-template-renderer';
14
15
  export type { BaseNotificationTemplateRenderer } from './services/notification-template-renderers/base-notification-template-renderer';
15
- export type { AttachmentFile, AttachmentFileRecord, FileAttachment, NotificationAttachment, NotificationAttachmentReference, NotificationAttachmentUpload, StoredAttachment, } from './types/attachment';
16
+ export type { AttachmentFile, AttachmentFileRecord, FileAttachment, NotificationAttachment, NotificationAttachmentReference, NotificationAttachmentUpload, StorageIdentifiers, StoredAttachment, } from './types/attachment';
16
17
  export { isAttachmentReference } from './types/attachment';
18
+ export type { InputJsonArray, InputJsonObject, InputJsonValue, JsonArray, JsonObject, JsonPrimitive, JsonValue, } from './types/json-values';
17
19
  export type { AnyDatabaseNotification, AnyNotification, AnyNotificationInput, DatabaseNotification, DatabaseOneOffNotification, Notification, NotificationInput, NotificationResendWithContextInput, OneOffNotification, OneOffNotificationInput, OneOffNotificationResendWithContextInput, } from './types/notification';
18
20
  export type { ContextGenerator } from './types/notification-context-generators';
21
+ export type { NotificationStatus } from './types/notification-status';
22
+ export type { NotificationType } from './types/notification-type';
19
23
  export type { BaseNotificationTypeConfig } from './types/notification-type-config';
@@ -147,7 +147,7 @@ export interface BaseNotificationBackend<Config extends BaseNotificationTypeConf
147
147
  /**
148
148
  * Filter notifications using composable query filters.
149
149
  * Supports filtering by status, notification type, adapter, recipient,
150
- * body/subject templates, context, and date ranges (sendAfter, created, sent).
150
+ * body/subject templates, context, and date ranges (sendAfter, created, sent).
151
151
  * Filters can be combined with logical operators (and, or, not).
152
152
  *
153
153
  * @param filter - Composable filter expression
@@ -187,7 +187,7 @@ export declare class VintaSend<Config extends BaseNotificationTypeConfig, Adapte
187
187
  *
188
188
  * @param notificationId - The ID of the one-off notification to retrieve
189
189
  * @param forUpdate - Whether the notification is being retrieved for update (default: false)
190
- * @param backendIdentifier - Optional backend identifier. When omitted, the primary backend is used.
190
+ * @param backendIdentifier - Optional backend identifier. When omitted, the primary backend is used.
191
191
  * @returns The one-off notification or null if not found
192
192
  */
193
193
  getOneOffNotification(notificationId: Config['NotificationIdType'], forUpdate?: boolean, backendIdentifier?: string): Promise<DatabaseOneOffNotification<Config> | null>;
@@ -68,7 +68,6 @@ class VintaSend {
68
68
  adapter.injectBackend(backend);
69
69
  adapter.injectLogger(logger);
70
70
  // Inject logger into template renderer if it supports it
71
- // biome-ignore lint/suspicious/noExplicitAny: accessing protected templateRenderer property
72
71
  const templateRenderer = adapter.templateRenderer;
73
72
  if (templateRenderer && typeof templateRenderer.injectLogger === 'function') {
74
73
  templateRenderer.injectLogger(logger);
@@ -518,7 +517,7 @@ class VintaSend {
518
517
  *
519
518
  * @param notificationId - The ID of the one-off notification to retrieve
520
519
  * @param forUpdate - Whether the notification is being retrieved for update (default: false)
521
- * @param backendIdentifier - Optional backend identifier. When omitted, the primary backend is used.
520
+ * @param backendIdentifier - Optional backend identifier. When omitted, the primary backend is used.
522
521
  * @returns The one-off notification or null if not found
523
522
  */
524
523
  async getOneOffNotification(notificationId, forUpdate = false, backendIdentifier) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vintasend",
3
- "version": "0.10.0",
3
+ "version": "0.11.0",
4
4
  "main": "dist/index.js",
5
5
  "files": [
6
6
  "dist"
@@ -9,7 +9,7 @@
9
9
  "license": "MIT",
10
10
  "scripts": {
11
11
  "lint": "biome check .",
12
- "format": "biome format .",
12
+ "format": "biome check --write .",
13
13
  "check": "biome check --write .",
14
14
  "build": "tsc",
15
15
  "prepublishOnly": "npm run build",
@@ -17,19 +17,25 @@
17
17
  "test:watch": "vitest",
18
18
  "test:coverage": "vitest run --coverage",
19
19
  "implementation:generate": "node scripts/generate-implementation.js",
20
+ "lint:implementations": "node scripts/run-implementations-script.js lint",
21
+ "format:implementations": "node scripts/run-implementations-script.js format",
20
22
  "test:implementations:local": "node scripts/test-implementations-local.js",
23
+ "build:implementations:local": "node scripts/test-implementations-local.js --command=build",
24
+ "release:prepare": "npm run format:implementations && npm run test:implementations:local && npm run build:implementations:local",
21
25
  "release:bump": "node scripts/release-bump.js",
22
26
  "release:bump:patch": "node scripts/release-bump.js --bump=patch",
23
27
  "release:bump:minor": "node scripts/release-bump.js --bump=minor",
24
28
  "release:bump:alpha": "node scripts/release-bump.js --bump=alpha",
25
29
  "release:bump:promote": "node scripts/release-bump.js --bump=promote",
26
- "release:publish": "node scripts/release-publish.js"
30
+ "release:publish": "node scripts/release-publish.js",
31
+ "prepare": "husky"
27
32
  },
28
33
  "devDependencies": {
29
- "@biomejs/biome": "^2.3.11",
34
+ "@biomejs/biome": "^2.4.5",
30
35
  "@types/mime-types": "^3.0.1",
31
36
  "@types/node": "^25.0.8",
32
37
  "@vitest/coverage-v8": "4.0.18",
38
+ "husky": "^9.1.7",
33
39
  "typescript": "^5.9.3",
34
40
  "vitest": "4.0.18"
35
41
  },