@k-msg/webhook 0.23.1 → 0.24.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.
@@ -47,18 +47,9 @@ export interface StorageConfig {
47
47
  maxMemoryUsage?: number;
48
48
  retentionDays?: number;
49
49
  /**
50
- * Preferred option. If both legacy and `fieldCrypto` are set, `fieldCrypto` takes precedence.
50
+ * Field-level crypto policy for endpoint secret and delivery payload.
51
51
  */
52
52
  fieldCrypto?: FieldCryptoConfig;
53
- /**
54
- * @deprecated Use `fieldCrypto` instead.
55
- */
56
- enableEncryption?: boolean;
57
- /**
58
- * @deprecated Use `fieldCrypto` with a provider implementation.
59
- * Legacy option kept for compatibility only.
60
- */
61
- encryptionKey?: string;
62
53
  }
63
54
  export interface PaginationOptions {
64
55
  page: number;
@@ -1,3 +1,4 @@
1
+ import type { FieldCryptoConfig } from "@k-msg/core";
1
2
  import type { HttpClient } from "../services/webhook.dispatcher";
2
3
  import type { WebhookConfig, WebhookDelivery, WebhookEndpoint, WebhookEvent, WebhookTestResult } from "../types/webhook.types";
3
4
  export interface WebhookDeliveryListOptions {
@@ -27,6 +28,11 @@ export interface WebhookRuntimeSecurityOptions {
27
28
  allowPrivateHosts?: boolean;
28
29
  allowHttpForLocalhost?: boolean;
29
30
  }
31
+ export interface WebhookRuntimeFieldCryptoOptions {
32
+ tenantId?: string;
33
+ endpoint?: FieldCryptoConfig;
34
+ delivery?: FieldCryptoConfig;
35
+ }
30
36
  export type WebhookEndpointInput = Omit<WebhookEndpoint, "id" | "createdAt" | "updatedAt" | "status"> & {
31
37
  id?: string;
32
38
  status?: WebhookEndpoint["status"];
@@ -36,6 +42,7 @@ export interface WebhookRuntimeConfig {
36
42
  persistence?: WebhookPersistence;
37
43
  endpointStore?: WebhookEndpointStore;
38
44
  deliveryStore?: WebhookDeliveryStore;
45
+ fieldCrypto?: WebhookRuntimeFieldCryptoOptions;
39
46
  httpClient?: HttpClient;
40
47
  security?: WebhookRuntimeSecurityOptions;
41
48
  autoStart?: boolean;