@simplens/mock 1.0.0 → 1.0.2

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
@@ -40,24 +40,6 @@ The mock provider accepts notifications with the following structure:
40
40
  }
41
41
  ```
42
42
 
43
- ### Example
44
-
45
- ```typescript
46
- import { SimpleNS } from '@simplens/core';
47
-
48
- const notification = {
49
- channel: 'mock',
50
- recipient: {
51
- user_id: 'test-user-123'
52
- },
53
- content: {
54
- message: 'Hello, this is a test notification!'
55
- }
56
- };
57
-
58
- await simplens.send(notification);
59
- ```
60
-
61
43
  ## Configuration Options
62
44
 
63
45
  | Option | Type | Default | Description |
package/dist/index.d.ts CHANGED
@@ -3,6 +3,7 @@ declare const mockNotificationSchema: z.ZodObject<{
3
3
  notification_id: z.ZodString;
4
4
  request_id: z.ZodString;
5
5
  client_id: z.ZodString;
6
+ provider: z.ZodOptional<z.ZodString>;
6
7
  variables: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
7
8
  webhook_url: z.ZodString;
8
9
  retry_count: z.ZodNumber;
@@ -23,35 +24,37 @@ declare const mockNotificationSchema: z.ZodObject<{
23
24
  message: string;
24
25
  }>;
25
26
  created_at: z.ZodDate;
26
- }, z.core.$strip, z.ZodTypeAny, {
27
- notification_id: string;
28
- request_id: string;
29
- client_id: string;
27
+ }, "strip", z.ZodTypeAny, {
30
28
  channel: "mock";
31
- webhook_url: string;
32
- retry_count: number;
33
- created_at: Date;
34
29
  recipient: {
35
30
  user_id: string;
36
31
  };
37
32
  content: {
38
33
  message: string;
39
34
  };
40
- variables?: Record<string, string> | undefined;
41
- }, {
35
+ created_at: Date;
42
36
  notification_id: string;
43
37
  request_id: string;
44
38
  client_id: string;
45
- channel: "mock";
46
39
  webhook_url: string;
47
40
  retry_count: number;
48
- created_at: Date;
41
+ provider?: string | undefined;
42
+ variables?: Record<string, string> | undefined;
43
+ }, {
44
+ channel: "mock";
49
45
  recipient: {
50
46
  user_id: string;
51
47
  };
52
48
  content: {
53
49
  message: string;
54
50
  };
51
+ created_at: Date;
52
+ notification_id: string;
53
+ request_id: string;
54
+ client_id: string;
55
+ webhook_url: string;
56
+ retry_count: number;
57
+ provider?: string | undefined;
55
58
  variables?: Record<string, string> | undefined;
56
59
  }>;
57
60
  type MockNotification = z.infer<typeof mockNotificationSchema>;
@@ -62,6 +65,7 @@ declare class MockProvider implements SimpleNSProvider<MockNotification> {
62
65
  notification_id: z.ZodString;
63
66
  request_id: z.ZodString;
64
67
  client_id: z.ZodString;
68
+ provider: z.ZodOptional<z.ZodString>;
65
69
  variables: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
66
70
  webhook_url: z.ZodString;
67
71
  retry_count: z.ZodNumber;
@@ -82,35 +86,37 @@ declare class MockProvider implements SimpleNSProvider<MockNotification> {
82
86
  message: string;
83
87
  }>;
84
88
  created_at: z.ZodDate;
85
- }, z.core.$strip, z.ZodTypeAny, {
86
- notification_id: string;
87
- request_id: string;
88
- client_id: string;
89
+ }, "strip", z.ZodTypeAny, {
89
90
  channel: "mock";
90
- webhook_url: string;
91
- retry_count: number;
92
- created_at: Date;
93
91
  recipient: {
94
92
  user_id: string;
95
93
  };
96
94
  content: {
97
95
  message: string;
98
96
  };
99
- variables?: Record<string, string> | undefined;
100
- }, {
97
+ created_at: Date;
101
98
  notification_id: string;
102
99
  request_id: string;
103
100
  client_id: string;
104
- channel: "mock";
105
101
  webhook_url: string;
106
102
  retry_count: number;
107
- created_at: Date;
103
+ provider?: string | undefined;
104
+ variables?: Record<string, string> | undefined;
105
+ }, {
106
+ channel: "mock";
108
107
  recipient: {
109
108
  user_id: string;
110
109
  };
111
110
  content: {
112
111
  message: string;
113
112
  };
113
+ created_at: Date;
114
+ notification_id: string;
115
+ request_id: string;
116
+ client_id: string;
117
+ webhook_url: string;
118
+ retry_count: number;
119
+ provider?: string | undefined;
114
120
  variables?: Record<string, string> | undefined;
115
121
  }>;
116
122
  getRecipientSchema(): z.ZodObject<{
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACH,CAAC,EACD,KAAK,gBAAgB,EACrB,KAAK,gBAAgB,EACrB,KAAK,cAAc,EACnB,KAAK,cAAc,EACnB,KAAK,eAAe,EAEvB,MAAM,eAAe,CAAC;AAUvB,QAAA,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAK1B,CAAC;AAEH,KAAK,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAC;AAE/D,cAAM,YAAa,YAAW,gBAAgB,CAAC,gBAAgB,CAAC;IAE5D,OAAO,CAAC,MAAM,CAA+B;IAE7C,QAAQ,CAAC,QAAQ,EAAE,gBAAgB,CASjC;IAEF,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAIrB,kBAAkB;;;;;;;IAIlB,gBAAgB;;;;;;;IAIhB,kBAAkB,IAAI,eAAe;IAU/B,UAAU,CAAC,MAAM,EAAE,cAAc,GAAG,OAAO,CAAC,IAAI,CAAC;IAIjD,WAAW,IAAI,OAAO,CAAC,OAAO,CAAC;IAI/B,IAAI,CAAC,YAAY,EAAE,gBAAgB,GAAG,OAAO,CAAC,cAAc,CAAC;IAe7D,QAAQ,IAAI,OAAO,CAAC,IAAI,CAAC;CAGlC;AAED,eAAe,YAAY,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACH,CAAC,EACD,KAAK,gBAAgB,EACrB,KAAK,gBAAgB,EACrB,KAAK,cAAc,EACnB,KAAK,cAAc,EACnB,KAAK,eAAe,EAEvB,MAAM,eAAe,CAAC;AAUvB,QAAA,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAK1B,CAAC;AAEH,KAAK,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAC;AAE/D,cAAM,YAAa,YAAW,gBAAgB,CAAC,gBAAgB,CAAC;IAE5D,OAAO,CAAC,MAAM,CAA+B;IAE7C,QAAQ,CAAC,QAAQ,EAAE,gBAAgB,CASjC;IAEF,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAIrB,kBAAkB;;;;;;;IAIlB,gBAAgB;;;;;;;IAIhB,kBAAkB,IAAI,eAAe;IAU/B,UAAU,CAAC,MAAM,EAAE,cAAc,GAAG,OAAO,CAAC,IAAI,CAAC;IAIjD,WAAW,IAAI,OAAO,CAAC,OAAO,CAAC;IAI/B,IAAI,CAAC,YAAY,EAAE,gBAAgB,GAAG,OAAO,CAAC,cAAc,CAAC;IAe7D,QAAQ,IAAI,OAAO,CAAC,IAAI,CAAC;CAGlC;AAED,eAAe,YAAY,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@simplens/mock",
3
- "version": "1.0.0",
3
+ "version": "1.0.2",
4
4
  "description": "Mock provider plugin for SimpleNS for testing",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -26,7 +26,7 @@
26
26
  "author": "SimpleNS Team",
27
27
  "license": "MIT",
28
28
  "dependencies": {
29
- "@simplens/sdk": "^1.0.3"
29
+ "@simplens/sdk": "^1.0.4"
30
30
  },
31
31
  "devDependencies": {
32
32
  "@types/node": "^25.0.3",
@@ -41,4 +41,4 @@
41
41
  "type": "git",
42
42
  "url": "https://github.com/SimpleNotificationSystem/plugin-mock"
43
43
  }
44
- }
44
+ }