@opencrvs/toolkit 1.8.1-rc.74b9d6e → 1.8.1-rc.77e91ea

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@opencrvs/toolkit",
3
- "version": "1.8.1-rc.74b9d6e",
3
+ "version": "1.8.1-rc.77e91ea",
4
4
  "description": "OpenCRVS toolkit for building country configurations",
5
5
  "license": "MPL-2.0",
6
6
  "exports": {
@@ -8,8 +8,7 @@
8
8
  "./api": "./dist/api/index.js",
9
9
  "./events": "./dist/events/index.js",
10
10
  "./scopes": "./dist/scopes/index.js",
11
- "./conditionals": "./dist/conditionals/index.js",
12
- "./notification": "./dist/notification/index.js"
11
+ "./conditionals": "./dist/conditionals/index.js"
13
12
  },
14
13
  "scripts": {
15
14
  "build": "./build.sh",
package/tsconfig.json CHANGED
@@ -16,8 +16,7 @@
16
16
  "../commons/src/conditionals/conditionals.ts"
17
17
  ],
18
18
  "@opencrvs/commons/scopes": ["../commons/src/scopes.ts"],
19
- "@opencrvs/commons/events": ["../commons/src/events/index.ts"],
20
- "@opencrvs/commons/notification": ["../commons/src/notification/index.ts"]
19
+ "@opencrvs/commons/events": ["../commons/src/events/index.ts"]
21
20
  }
22
21
  },
23
22
  "references": [{ "path": "../commons/tsconfig-commonjs.json" }],
@@ -1 +1 @@
1
- {"root":["./src/api/index.ts","./src/conditionals/deduplication.ts","./src/conditionals/index.ts","./src/events/index.ts","./src/notification/index.ts","./src/scopes/index.ts"],"version":"5.6.3"}
1
+ {"root":["./src/api/index.ts","./src/conditionals/deduplication.ts","./src/conditionals/index.ts","./src/events/index.ts","./src/scopes/index.ts"],"version":"5.6.3"}
@@ -1,547 +0,0 @@
1
- import { z } from 'zod';
2
- export declare const TriggerEvent: {
3
- readonly USER_CREATED: "user-created";
4
- readonly USER_UPDATED: "user-updated";
5
- readonly USERNAME_REMINDER: "username-reminder";
6
- readonly RESET_PASSWORD: "reset-password";
7
- readonly RESET_PASSWORD_BY_ADMIN: "reset-password-by-admin";
8
- readonly TWO_FA: "2fa";
9
- };
10
- export type TriggerEvent = (typeof TriggerEvent)[keyof typeof TriggerEvent];
11
- export declare const FullName: z.ZodObject<{
12
- use: z.ZodString;
13
- family: z.ZodString;
14
- given: z.ZodArray<z.ZodString, "many">;
15
- }, "strip", z.ZodTypeAny, {
16
- use: string;
17
- given: string[];
18
- family: string;
19
- }, {
20
- use: string;
21
- given: string[];
22
- family: string;
23
- }>;
24
- export type FullName = z.infer<typeof FullName>;
25
- export declare const Recipient: z.ZodObject<{
26
- name: z.ZodArray<z.ZodObject<{
27
- use: z.ZodString;
28
- family: z.ZodString;
29
- given: z.ZodArray<z.ZodString, "many">;
30
- }, "strip", z.ZodTypeAny, {
31
- use: string;
32
- given: string[];
33
- family: string;
34
- }, {
35
- use: string;
36
- given: string[];
37
- family: string;
38
- }>, "many">;
39
- mobile: z.ZodOptional<z.ZodString>;
40
- email: z.ZodOptional<z.ZodString>;
41
- }, "strip", z.ZodTypeAny, {
42
- name: {
43
- use: string;
44
- given: string[];
45
- family: string;
46
- }[];
47
- email?: string | undefined;
48
- mobile?: string | undefined;
49
- }, {
50
- name: {
51
- use: string;
52
- given: string[];
53
- family: string;
54
- }[];
55
- email?: string | undefined;
56
- mobile?: string | undefined;
57
- }>;
58
- export type Recipient = z.infer<typeof Recipient>;
59
- export declare const BasePayload: z.ZodObject<{
60
- recipient: z.ZodObject<{
61
- name: z.ZodArray<z.ZodObject<{
62
- use: z.ZodString;
63
- family: z.ZodString;
64
- given: z.ZodArray<z.ZodString, "many">;
65
- }, "strip", z.ZodTypeAny, {
66
- use: string;
67
- given: string[];
68
- family: string;
69
- }, {
70
- use: string;
71
- given: string[];
72
- family: string;
73
- }>, "many">;
74
- mobile: z.ZodOptional<z.ZodString>;
75
- email: z.ZodOptional<z.ZodString>;
76
- }, "strip", z.ZodTypeAny, {
77
- name: {
78
- use: string;
79
- given: string[];
80
- family: string;
81
- }[];
82
- email?: string | undefined;
83
- mobile?: string | undefined;
84
- }, {
85
- name: {
86
- use: string;
87
- given: string[];
88
- family: string;
89
- }[];
90
- email?: string | undefined;
91
- mobile?: string | undefined;
92
- }>;
93
- }, "strip", z.ZodTypeAny, {
94
- recipient: {
95
- name: {
96
- use: string;
97
- given: string[];
98
- family: string;
99
- }[];
100
- email?: string | undefined;
101
- mobile?: string | undefined;
102
- };
103
- }, {
104
- recipient: {
105
- name: {
106
- use: string;
107
- given: string[];
108
- family: string;
109
- }[];
110
- email?: string | undefined;
111
- mobile?: string | undefined;
112
- };
113
- }>;
114
- export type BasePayload = z.infer<typeof BasePayload>;
115
- export declare const TriggerPayload: {
116
- readonly "user-created": z.ZodObject<z.objectUtil.extendShape<{
117
- recipient: z.ZodObject<{
118
- name: z.ZodArray<z.ZodObject<{
119
- use: z.ZodString;
120
- family: z.ZodString;
121
- given: z.ZodArray<z.ZodString, "many">;
122
- }, "strip", z.ZodTypeAny, {
123
- use: string;
124
- given: string[];
125
- family: string;
126
- }, {
127
- use: string;
128
- given: string[];
129
- family: string;
130
- }>, "many">;
131
- mobile: z.ZodOptional<z.ZodString>;
132
- email: z.ZodOptional<z.ZodString>;
133
- }, "strip", z.ZodTypeAny, {
134
- name: {
135
- use: string;
136
- given: string[];
137
- family: string;
138
- }[];
139
- email?: string | undefined;
140
- mobile?: string | undefined;
141
- }, {
142
- name: {
143
- use: string;
144
- given: string[];
145
- family: string;
146
- }[];
147
- email?: string | undefined;
148
- mobile?: string | undefined;
149
- }>;
150
- }, {
151
- username: z.ZodString;
152
- temporaryPassword: z.ZodString;
153
- }>, "strip", z.ZodTypeAny, {
154
- recipient: {
155
- name: {
156
- use: string;
157
- given: string[];
158
- family: string;
159
- }[];
160
- email?: string | undefined;
161
- mobile?: string | undefined;
162
- };
163
- username: string;
164
- temporaryPassword: string;
165
- }, {
166
- recipient: {
167
- name: {
168
- use: string;
169
- given: string[];
170
- family: string;
171
- }[];
172
- email?: string | undefined;
173
- mobile?: string | undefined;
174
- };
175
- username: string;
176
- temporaryPassword: string;
177
- }>;
178
- readonly "user-updated": z.ZodObject<z.objectUtil.extendShape<{
179
- recipient: z.ZodObject<{
180
- name: z.ZodArray<z.ZodObject<{
181
- use: z.ZodString;
182
- family: z.ZodString;
183
- given: z.ZodArray<z.ZodString, "many">;
184
- }, "strip", z.ZodTypeAny, {
185
- use: string;
186
- given: string[];
187
- family: string;
188
- }, {
189
- use: string;
190
- given: string[];
191
- family: string;
192
- }>, "many">;
193
- mobile: z.ZodOptional<z.ZodString>;
194
- email: z.ZodOptional<z.ZodString>;
195
- }, "strip", z.ZodTypeAny, {
196
- name: {
197
- use: string;
198
- given: string[];
199
- family: string;
200
- }[];
201
- email?: string | undefined;
202
- mobile?: string | undefined;
203
- }, {
204
- name: {
205
- use: string;
206
- given: string[];
207
- family: string;
208
- }[];
209
- email?: string | undefined;
210
- mobile?: string | undefined;
211
- }>;
212
- }, {
213
- username: z.ZodString;
214
- }>, "strip", z.ZodTypeAny, {
215
- recipient: {
216
- name: {
217
- use: string;
218
- given: string[];
219
- family: string;
220
- }[];
221
- email?: string | undefined;
222
- mobile?: string | undefined;
223
- };
224
- username: string;
225
- }, {
226
- recipient: {
227
- name: {
228
- use: string;
229
- given: string[];
230
- family: string;
231
- }[];
232
- email?: string | undefined;
233
- mobile?: string | undefined;
234
- };
235
- username: string;
236
- }>;
237
- readonly "username-reminder": z.ZodObject<z.objectUtil.extendShape<{
238
- recipient: z.ZodObject<{
239
- name: z.ZodArray<z.ZodObject<{
240
- use: z.ZodString;
241
- family: z.ZodString;
242
- given: z.ZodArray<z.ZodString, "many">;
243
- }, "strip", z.ZodTypeAny, {
244
- use: string;
245
- given: string[];
246
- family: string;
247
- }, {
248
- use: string;
249
- given: string[];
250
- family: string;
251
- }>, "many">;
252
- mobile: z.ZodOptional<z.ZodString>;
253
- email: z.ZodOptional<z.ZodString>;
254
- }, "strip", z.ZodTypeAny, {
255
- name: {
256
- use: string;
257
- given: string[];
258
- family: string;
259
- }[];
260
- email?: string | undefined;
261
- mobile?: string | undefined;
262
- }, {
263
- name: {
264
- use: string;
265
- given: string[];
266
- family: string;
267
- }[];
268
- email?: string | undefined;
269
- mobile?: string | undefined;
270
- }>;
271
- }, {
272
- username: z.ZodString;
273
- }>, "strip", z.ZodTypeAny, {
274
- recipient: {
275
- name: {
276
- use: string;
277
- given: string[];
278
- family: string;
279
- }[];
280
- email?: string | undefined;
281
- mobile?: string | undefined;
282
- };
283
- username: string;
284
- }, {
285
- recipient: {
286
- name: {
287
- use: string;
288
- given: string[];
289
- family: string;
290
- }[];
291
- email?: string | undefined;
292
- mobile?: string | undefined;
293
- };
294
- username: string;
295
- }>;
296
- readonly "reset-password": z.ZodObject<z.objectUtil.extendShape<{
297
- recipient: z.ZodObject<{
298
- name: z.ZodArray<z.ZodObject<{
299
- use: z.ZodString;
300
- family: z.ZodString;
301
- given: z.ZodArray<z.ZodString, "many">;
302
- }, "strip", z.ZodTypeAny, {
303
- use: string;
304
- given: string[];
305
- family: string;
306
- }, {
307
- use: string;
308
- given: string[];
309
- family: string;
310
- }>, "many">;
311
- mobile: z.ZodOptional<z.ZodString>;
312
- email: z.ZodOptional<z.ZodString>;
313
- }, "strip", z.ZodTypeAny, {
314
- name: {
315
- use: string;
316
- given: string[];
317
- family: string;
318
- }[];
319
- email?: string | undefined;
320
- mobile?: string | undefined;
321
- }, {
322
- name: {
323
- use: string;
324
- given: string[];
325
- family: string;
326
- }[];
327
- email?: string | undefined;
328
- mobile?: string | undefined;
329
- }>;
330
- }, {
331
- code: z.ZodString;
332
- }>, "strip", z.ZodTypeAny, {
333
- code: string;
334
- recipient: {
335
- name: {
336
- use: string;
337
- given: string[];
338
- family: string;
339
- }[];
340
- email?: string | undefined;
341
- mobile?: string | undefined;
342
- };
343
- }, {
344
- code: string;
345
- recipient: {
346
- name: {
347
- use: string;
348
- given: string[];
349
- family: string;
350
- }[];
351
- email?: string | undefined;
352
- mobile?: string | undefined;
353
- };
354
- }>;
355
- readonly "reset-password-by-admin": z.ZodObject<z.objectUtil.extendShape<{
356
- recipient: z.ZodObject<{
357
- name: z.ZodArray<z.ZodObject<{
358
- use: z.ZodString;
359
- family: z.ZodString;
360
- given: z.ZodArray<z.ZodString, "many">;
361
- }, "strip", z.ZodTypeAny, {
362
- use: string;
363
- given: string[];
364
- family: string;
365
- }, {
366
- use: string;
367
- given: string[];
368
- family: string;
369
- }>, "many">;
370
- mobile: z.ZodOptional<z.ZodString>;
371
- email: z.ZodOptional<z.ZodString>;
372
- }, "strip", z.ZodTypeAny, {
373
- name: {
374
- use: string;
375
- given: string[];
376
- family: string;
377
- }[];
378
- email?: string | undefined;
379
- mobile?: string | undefined;
380
- }, {
381
- name: {
382
- use: string;
383
- given: string[];
384
- family: string;
385
- }[];
386
- email?: string | undefined;
387
- mobile?: string | undefined;
388
- }>;
389
- }, {
390
- temporaryPassword: z.ZodString;
391
- admin: z.ZodObject<{
392
- id: z.ZodString;
393
- name: z.ZodArray<z.ZodObject<{
394
- use: z.ZodString;
395
- given: z.ZodArray<z.ZodString, "many">;
396
- family: z.ZodString;
397
- }, "strip", z.ZodTypeAny, {
398
- use: string;
399
- given: string[];
400
- family: string;
401
- }, {
402
- use: string;
403
- given: string[];
404
- family: string;
405
- }>, "many">;
406
- role: z.ZodString;
407
- avatar: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
408
- signature: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
409
- }, "strip", z.ZodTypeAny, {
410
- id: string;
411
- name: {
412
- use: string;
413
- given: string[];
414
- family: string;
415
- }[];
416
- role: string;
417
- signature?: string | undefined;
418
- avatar?: string | undefined;
419
- }, {
420
- id: string;
421
- name: {
422
- use: string;
423
- given: string[];
424
- family: string;
425
- }[];
426
- role: string;
427
- signature?: string | undefined;
428
- avatar?: string | undefined;
429
- }>;
430
- }>, "strip", z.ZodTypeAny, {
431
- recipient: {
432
- name: {
433
- use: string;
434
- given: string[];
435
- family: string;
436
- }[];
437
- email?: string | undefined;
438
- mobile?: string | undefined;
439
- };
440
- temporaryPassword: string;
441
- admin: {
442
- id: string;
443
- name: {
444
- use: string;
445
- given: string[];
446
- family: string;
447
- }[];
448
- role: string;
449
- signature?: string | undefined;
450
- avatar?: string | undefined;
451
- };
452
- }, {
453
- recipient: {
454
- name: {
455
- use: string;
456
- given: string[];
457
- family: string;
458
- }[];
459
- email?: string | undefined;
460
- mobile?: string | undefined;
461
- };
462
- temporaryPassword: string;
463
- admin: {
464
- id: string;
465
- name: {
466
- use: string;
467
- given: string[];
468
- family: string;
469
- }[];
470
- role: string;
471
- signature?: string | undefined;
472
- avatar?: string | undefined;
473
- };
474
- }>;
475
- readonly "2fa": z.ZodObject<z.objectUtil.extendShape<{
476
- recipient: z.ZodObject<{
477
- name: z.ZodArray<z.ZodObject<{
478
- use: z.ZodString;
479
- family: z.ZodString;
480
- given: z.ZodArray<z.ZodString, "many">;
481
- }, "strip", z.ZodTypeAny, {
482
- use: string;
483
- given: string[];
484
- family: string;
485
- }, {
486
- use: string;
487
- given: string[];
488
- family: string;
489
- }>, "many">;
490
- mobile: z.ZodOptional<z.ZodString>;
491
- email: z.ZodOptional<z.ZodString>;
492
- }, "strip", z.ZodTypeAny, {
493
- name: {
494
- use: string;
495
- given: string[];
496
- family: string;
497
- }[];
498
- email?: string | undefined;
499
- mobile?: string | undefined;
500
- }, {
501
- name: {
502
- use: string;
503
- given: string[];
504
- family: string;
505
- }[];
506
- email?: string | undefined;
507
- mobile?: string | undefined;
508
- }>;
509
- }, {
510
- code: z.ZodString;
511
- }>, "strip", z.ZodTypeAny, {
512
- code: string;
513
- recipient: {
514
- name: {
515
- use: string;
516
- given: string[];
517
- family: string;
518
- }[];
519
- email?: string | undefined;
520
- mobile?: string | undefined;
521
- };
522
- }, {
523
- code: string;
524
- recipient: {
525
- name: {
526
- use: string;
527
- given: string[];
528
- family: string;
529
- }[];
530
- email?: string | undefined;
531
- mobile?: string | undefined;
532
- };
533
- }>;
534
- };
535
- export type TriggerPayload = {
536
- [K in TriggerEvent]: z.infer<(typeof TriggerPayload)[K]>;
537
- };
538
- export declare function triggerUserEventNotification<T extends TriggerEvent>({ event, payload, countryConfigUrl, authHeader }: {
539
- event: T;
540
- payload: TriggerPayload[T];
541
- countryConfigUrl: string;
542
- authHeader: {
543
- Authorization: string;
544
- };
545
- }): Promise<Response>;
546
- export declare function parseUserEventTrigger<T extends TriggerEvent>(event: T, body: unknown): TriggerPayload[T];
547
- //# sourceMappingURL=UserNotifications.d.ts.map
@@ -1,2 +0,0 @@
1
- export * from './UserNotifications';
2
- //# sourceMappingURL=index.d.ts.map
@@ -1,2 +0,0 @@
1
- export * from '../commons/notification';
2
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/notification/index.ts"],"names":[],"mappings":"AAUA,cAAc,gCAAgC,CAAA"}