@opencrvs/toolkit 1.8.0-rc.f8be155 → 1.8.0-rc.f8e0ee5

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.
Files changed (33) hide show
  1. package/dist/commons/api/router.d.ts +2029 -5136
  2. package/dist/commons/conditionals/conditionals.d.ts +0 -4
  3. package/dist/commons/conditionals/validate.d.ts +0 -6
  4. package/dist/commons/events/ActionConfig.d.ts +20914 -44038
  5. package/dist/commons/events/ActionDocument.d.ts +484 -1888
  6. package/dist/commons/events/ActionInput.d.ts +304 -1504
  7. package/dist/commons/events/ActionType.d.ts +0 -4
  8. package/dist/commons/events/AdvancedSearchConfig.d.ts +3 -75
  9. package/dist/commons/events/CompositeFieldValue.d.ts +0 -28
  10. package/dist/commons/events/Constants.d.ts +0 -1
  11. package/dist/commons/events/CreatedAtLocation.d.ts +2 -1
  12. package/dist/commons/events/Draft.d.ts +34 -130
  13. package/dist/commons/events/EventConfig.d.ts +16720 -30190
  14. package/dist/commons/events/EventDocument.d.ts +346 -1210
  15. package/dist/commons/events/EventIndex.d.ts +32 -270
  16. package/dist/commons/events/EventMetadata.d.ts +60 -27
  17. package/dist/commons/events/FieldConfig.d.ts +893 -1682
  18. package/dist/commons/events/FieldType.d.ts +1 -4
  19. package/dist/commons/events/FieldTypeMapping.d.ts +50 -89
  20. package/dist/commons/events/FieldValue.d.ts +5 -41
  21. package/dist/commons/events/FormConfig.d.ts +2510 -7640
  22. package/dist/commons/events/PageConfig.d.ts +1638 -2896
  23. package/dist/commons/events/SummaryConfig.d.ts +5 -0
  24. package/dist/commons/events/WorkqueueConfig.d.ts +19 -297
  25. package/dist/commons/events/defineConfig.d.ts +1440 -3841
  26. package/dist/commons/events/field.d.ts +0 -4
  27. package/dist/commons/events/scopes.d.ts +1 -1
  28. package/dist/commons/events/test.utils.d.ts +39 -126
  29. package/dist/commons/events/transactions.d.ts +1 -1
  30. package/dist/commons/events/utils.d.ts +18 -9664
  31. package/dist/conditionals/index.js +1 -18
  32. package/dist/events/index.js +1103 -1370
  33. package/package.json +1 -1
@@ -29,6 +29,11 @@ export declare const SummaryConfig: z.ZodObject<{
29
29
  description: string;
30
30
  defaultMessage: string;
31
31
  }>;
32
+ emptyValueMessage: z.ZodOptional<z.ZodObject<import("./TranslationConfig").MessageDescriptorZod, "strip", z.ZodTypeAny, TranslationConfig, {
33
+ id: string;
34
+ description: string;
35
+ defaultMessage: string;
36
+ }>>;
32
37
  }>, "strip", z.ZodTypeAny, {
33
38
  id: string;
34
39
  value: TranslationConfig;
@@ -1,13 +1,11 @@
1
1
  import { z } from 'zod';
2
2
  import { TranslationConfig } from './TranslationConfig';
3
- export declare const mandatoryColumns: {
3
+ export declare const dateOfEventColumn: {
4
4
  value: {
5
5
  $event: "type" | "id" | "status" | "title" | "createdAt" | "createdBy" | "createdAtLocation" | "assignedTo" | "updatedAt" | "trackingId" | "legalStatuses" | "dateOfEvent" | "updatedByUserRole" | "updatedAtLocation" | "updatedBy" | "flags";
6
6
  };
7
7
  label: TranslationConfig;
8
8
  }[];
9
- export declare const WorkqueueActionsWithDefault: z.ZodEnum<["DELETE", "DECLARE", "VALIDATE", "REGISTER", "PRINT_CERTIFICATE", "READ", "ASSIGN", "UNASSIGN", "DEFAULT"]>;
10
- export type WorkqueueActionsWithDefault = z.infer<typeof WorkqueueActionsWithDefault>;
11
9
  /**
12
10
  * Configuration for workqueue. Workqueues are used to display a list of events.
13
11
  */
@@ -1120,13 +1118,13 @@ export declare const WorkqueueConfig: z.ZodObject<{
1120
1118
  }[];
1121
1119
  }>]>;
1122
1120
  actions: z.ZodArray<z.ZodObject<{
1123
- type: z.ZodEnum<["DELETE", "DECLARE", "VALIDATE", "REGISTER", "PRINT_CERTIFICATE", "READ", "ASSIGN", "UNASSIGN", "DEFAULT"]>;
1121
+ type: z.ZodString;
1124
1122
  conditionals: z.ZodOptional<z.ZodArray<z.ZodType<import(".").JSONSchema, z.ZodTypeDef, import(".").JSONSchema>, "many">>;
1125
1123
  }, "strip", z.ZodTypeAny, {
1126
- type: "DECLARE" | "REGISTER" | "VALIDATE" | "DELETE" | "PRINT_CERTIFICATE" | "READ" | "ASSIGN" | "UNASSIGN" | "DEFAULT";
1124
+ type: string;
1127
1125
  conditionals?: import(".").JSONSchema[] | undefined;
1128
1126
  }, {
1129
- type: "DECLARE" | "REGISTER" | "VALIDATE" | "DELETE" | "PRINT_CERTIFICATE" | "READ" | "ASSIGN" | "UNASSIGN" | "DEFAULT";
1127
+ type: string;
1130
1128
  conditionals?: import(".").JSONSchema[] | undefined;
1131
1129
  }>, "many">;
1132
1130
  columns: z.ZodDefault<z.ZodArray<z.ZodObject<{
@@ -1161,7 +1159,7 @@ export declare const WorkqueueConfig: z.ZodObject<{
1161
1159
  }, "strip", z.ZodTypeAny, {
1162
1160
  name: TranslationConfig;
1163
1161
  actions: {
1164
- type: "DECLARE" | "REGISTER" | "VALIDATE" | "DELETE" | "PRINT_CERTIFICATE" | "READ" | "ASSIGN" | "UNASSIGN" | "DEFAULT";
1162
+ type: string;
1165
1163
  conditionals?: import(".").JSONSchema[] | undefined;
1166
1164
  }[];
1167
1165
  query: {
@@ -1340,7 +1338,7 @@ export declare const WorkqueueConfig: z.ZodObject<{
1340
1338
  defaultMessage: string;
1341
1339
  };
1342
1340
  actions: {
1343
- type: "DECLARE" | "REGISTER" | "VALIDATE" | "DELETE" | "PRINT_CERTIFICATE" | "READ" | "ASSIGN" | "UNASSIGN" | "DEFAULT";
1341
+ type: string;
1344
1342
  conditionals?: import(".").JSONSchema[] | undefined;
1345
1343
  }[];
1346
1344
  query: {
@@ -3013,13 +3011,13 @@ export declare const WorkqueueConfigInput: z.ZodObject<{
3013
3011
  }[];
3014
3012
  }>]>;
3015
3013
  actions: z.ZodArray<z.ZodObject<{
3016
- type: z.ZodEnum<["DELETE", "DECLARE", "VALIDATE", "REGISTER", "PRINT_CERTIFICATE", "READ", "ASSIGN", "UNASSIGN", "DEFAULT"]>;
3014
+ type: z.ZodString;
3017
3015
  conditionals: z.ZodOptional<z.ZodArray<z.ZodType<import(".").JSONSchema, z.ZodTypeDef, import(".").JSONSchema>, "many">>;
3018
3016
  }, "strip", z.ZodTypeAny, {
3019
- type: "DECLARE" | "REGISTER" | "VALIDATE" | "DELETE" | "PRINT_CERTIFICATE" | "READ" | "ASSIGN" | "UNASSIGN" | "DEFAULT";
3017
+ type: string;
3020
3018
  conditionals?: import(".").JSONSchema[] | undefined;
3021
3019
  }, {
3022
- type: "DECLARE" | "REGISTER" | "VALIDATE" | "DELETE" | "PRINT_CERTIFICATE" | "READ" | "ASSIGN" | "UNASSIGN" | "DEFAULT";
3020
+ type: string;
3023
3021
  conditionals?: import(".").JSONSchema[] | undefined;
3024
3022
  }>, "many">;
3025
3023
  columns: z.ZodDefault<z.ZodArray<z.ZodObject<{
@@ -3054,7 +3052,7 @@ export declare const WorkqueueConfigInput: z.ZodObject<{
3054
3052
  }, "strip", z.ZodTypeAny, {
3055
3053
  name: TranslationConfig;
3056
3054
  actions: {
3057
- type: "DECLARE" | "REGISTER" | "VALIDATE" | "DELETE" | "PRINT_CERTIFICATE" | "READ" | "ASSIGN" | "UNASSIGN" | "DEFAULT";
3055
+ type: string;
3058
3056
  conditionals?: import(".").JSONSchema[] | undefined;
3059
3057
  }[];
3060
3058
  query: {
@@ -3310,7 +3308,7 @@ export declare const WorkqueueConfigInput: z.ZodObject<{
3310
3308
  defaultMessage: string;
3311
3309
  };
3312
3310
  actions: {
3313
- type: "DECLARE" | "REGISTER" | "VALIDATE" | "DELETE" | "PRINT_CERTIFICATE" | "READ" | "ASSIGN" | "UNASSIGN" | "DEFAULT";
3311
+ type: string;
3314
3312
  conditionals?: import(".").JSONSchema[] | undefined;
3315
3313
  }[];
3316
3314
  query: {
@@ -3569,7 +3567,7 @@ export type WorkqueueConfigInput = z.input<typeof WorkqueueConfigInput>;
3569
3567
  export declare function defineWorkqueue(workqueueInput: WorkqueueConfigInput): {
3570
3568
  name: TranslationConfig;
3571
3569
  actions: {
3572
- type: "DECLARE" | "REGISTER" | "VALIDATE" | "DELETE" | "PRINT_CERTIFICATE" | "READ" | "ASSIGN" | "UNASSIGN" | "DEFAULT";
3570
+ type: string;
3573
3571
  conditionals?: import(".").JSONSchema[] | undefined;
3574
3572
  }[];
3575
3573
  query: {
@@ -3745,7 +3743,7 @@ export declare function defineWorkqueue(workqueueInput: WorkqueueConfigInput): {
3745
3743
  export declare function defineWorkqueues(workqueues: WorkqueueConfigInput[]): {
3746
3744
  name: TranslationConfig;
3747
3745
  actions: {
3748
- type: "DECLARE" | "REGISTER" | "VALIDATE" | "DELETE" | "PRINT_CERTIFICATE" | "READ" | "ASSIGN" | "UNASSIGN" | "DEFAULT";
3746
+ type: string;
3749
3747
  conditionals?: import(".").JSONSchema[] | undefined;
3750
3748
  }[];
3751
3749
  query: {
@@ -4028,16 +4026,6 @@ export declare const WorkqueueCountInput: z.ZodArray<z.ZodObject<{
4028
4026
  type: "exact";
4029
4027
  term: string;
4030
4028
  }>]>>>;
4031
- 'legalStatus.REGISTERED.registrationNumber': z.ZodOptional<z.ZodOptional<z.ZodObject<{
4032
- type: z.ZodLiteral<"exact">;
4033
- term: z.ZodString;
4034
- }, "strip", z.ZodTypeAny, {
4035
- type: "exact";
4036
- term: string;
4037
- }, {
4038
- type: "exact";
4039
- term: string;
4040
- }>>>;
4041
4029
  createdAtLocation: z.ZodOptional<z.ZodOptional<z.ZodUnion<[z.ZodObject<{
4042
4030
  type: z.ZodLiteral<"within">;
4043
4031
  location: z.ZodString;
@@ -4214,10 +4202,6 @@ export declare const WorkqueueCountInput: z.ZodArray<z.ZodObject<{
4214
4202
  type: "within";
4215
4203
  location: string;
4216
4204
  } | undefined;
4217
- 'legalStatus.REGISTERED.registrationNumber'?: {
4218
- type: "exact";
4219
- term: string;
4220
- } | undefined;
4221
4205
  }, {
4222
4206
  status?: {
4223
4207
  type: "exact";
@@ -4296,93 +4280,7 @@ export declare const WorkqueueCountInput: z.ZodArray<z.ZodObject<{
4296
4280
  type: "within";
4297
4281
  location: string;
4298
4282
  } | undefined;
4299
- 'legalStatus.REGISTERED.registrationNumber'?: {
4300
- type: "exact";
4301
- term: string;
4302
- } | undefined;
4303
- }>, "atleastone">, [{
4304
- status?: {
4305
- type: "exact";
4306
- term: "ARCHIVED" | "CERTIFIED" | "DECLARED" | "REGISTERED" | "REJECTED" | "VALIDATED" | "CREATED" | "NOTIFIED";
4307
- } | {
4308
- type: "anyOf";
4309
- terms: ("ARCHIVED" | "CERTIFIED" | "DECLARED" | "REGISTERED" | "REJECTED" | "VALIDATED" | "CREATED" | "NOTIFIED")[];
4310
- } | undefined;
4311
- data?: any;
4312
- createdAt?: {
4313
- type: "exact";
4314
- term: string;
4315
- } | {
4316
- type: "range";
4317
- gte: string;
4318
- lte: string;
4319
- } | undefined;
4320
- createdBy?: {
4321
- type: "exact";
4322
- term: string;
4323
- } | undefined;
4324
- createdAtLocation?: {
4325
- type: "exact";
4326
- term: string;
4327
- } | {
4328
- type: "within";
4329
- location: string;
4330
- } | undefined;
4331
- assignedTo?: {
4332
- type: "exact";
4333
- term: string;
4334
- } | undefined;
4335
- updatedAt?: {
4336
- type: "exact";
4337
- term: string;
4338
- } | {
4339
- type: "range";
4340
- gte: string;
4341
- lte: string;
4342
- } | undefined;
4343
- trackingId?: {
4344
- type: "exact";
4345
- term: string;
4346
- } | undefined;
4347
- updatedAtLocation?: {
4348
- type: "exact";
4349
- term: string;
4350
- } | {
4351
- type: "within";
4352
- location: string;
4353
- } | undefined;
4354
- updatedBy?: {
4355
- type: "exact";
4356
- term: string;
4357
- } | undefined;
4358
- flags?: ({
4359
- type: "anyOf";
4360
- terms: string[];
4361
- } | {
4362
- type: "not";
4363
- term: string;
4364
- })[] | undefined;
4365
- eventType?: string | undefined;
4366
- 'legalStatus.REGISTERED.createdAt'?: {
4367
- type: "exact";
4368
- term: string;
4369
- } | {
4370
- type: "range";
4371
- gte: string;
4372
- lte: string;
4373
- } | undefined;
4374
- 'legalStatus.REGISTERED.createdAtLocation'?: {
4375
- type: "exact";
4376
- term: string;
4377
- } | {
4378
- type: "within";
4379
- location: string;
4380
- } | undefined;
4381
- 'legalStatus.REGISTERED.registrationNumber'?: {
4382
- type: "exact";
4383
- term: string;
4384
- } | undefined;
4385
- }, ...{
4283
+ }>, "many">, {
4386
4284
  status?: {
4387
4285
  type: "exact";
4388
4286
  term: "ARCHIVED" | "CERTIFIED" | "DECLARED" | "REGISTERED" | "REJECTED" | "VALIDATED" | "CREATED" | "NOTIFIED";
@@ -4460,96 +4358,10 @@ export declare const WorkqueueCountInput: z.ZodArray<z.ZodObject<{
4460
4358
  type: "within";
4461
4359
  location: string;
4462
4360
  } | undefined;
4463
- 'legalStatus.REGISTERED.registrationNumber'?: {
4464
- type: "exact";
4465
- term: string;
4466
- } | undefined;
4467
- }[]], unknown>;
4361
+ }[], unknown>;
4468
4362
  }, "strip", z.ZodTypeAny, {
4469
4363
  type: "and" | "or";
4470
- clauses: [{
4471
- status?: {
4472
- type: "exact";
4473
- term: "ARCHIVED" | "CERTIFIED" | "DECLARED" | "REGISTERED" | "REJECTED" | "VALIDATED" | "CREATED" | "NOTIFIED";
4474
- } | {
4475
- type: "anyOf";
4476
- terms: ("ARCHIVED" | "CERTIFIED" | "DECLARED" | "REGISTERED" | "REJECTED" | "VALIDATED" | "CREATED" | "NOTIFIED")[];
4477
- } | undefined;
4478
- data?: any;
4479
- createdAt?: {
4480
- type: "exact";
4481
- term: string;
4482
- } | {
4483
- type: "range";
4484
- gte: string;
4485
- lte: string;
4486
- } | undefined;
4487
- createdBy?: {
4488
- type: "exact";
4489
- term: string;
4490
- } | undefined;
4491
- createdAtLocation?: {
4492
- type: "exact";
4493
- term: string;
4494
- } | {
4495
- type: "within";
4496
- location: string;
4497
- } | undefined;
4498
- assignedTo?: {
4499
- type: "exact";
4500
- term: string;
4501
- } | undefined;
4502
- updatedAt?: {
4503
- type: "exact";
4504
- term: string;
4505
- } | {
4506
- type: "range";
4507
- gte: string;
4508
- lte: string;
4509
- } | undefined;
4510
- trackingId?: {
4511
- type: "exact";
4512
- term: string;
4513
- } | undefined;
4514
- updatedAtLocation?: {
4515
- type: "exact";
4516
- term: string;
4517
- } | {
4518
- type: "within";
4519
- location: string;
4520
- } | undefined;
4521
- updatedBy?: {
4522
- type: "exact";
4523
- term: string;
4524
- } | undefined;
4525
- flags?: ({
4526
- type: "anyOf";
4527
- terms: string[];
4528
- } | {
4529
- type: "not";
4530
- term: string;
4531
- })[] | undefined;
4532
- eventType?: string | undefined;
4533
- 'legalStatus.REGISTERED.createdAt'?: {
4534
- type: "exact";
4535
- term: string;
4536
- } | {
4537
- type: "range";
4538
- gte: string;
4539
- lte: string;
4540
- } | undefined;
4541
- 'legalStatus.REGISTERED.createdAtLocation'?: {
4542
- type: "exact";
4543
- term: string;
4544
- } | {
4545
- type: "within";
4546
- location: string;
4547
- } | undefined;
4548
- 'legalStatus.REGISTERED.registrationNumber'?: {
4549
- type: "exact";
4550
- term: string;
4551
- } | undefined;
4552
- }, ...{
4364
+ clauses: {
4553
4365
  status?: {
4554
4366
  type: "exact";
4555
4367
  term: "ARCHIVED" | "CERTIFIED" | "DECLARED" | "REGISTERED" | "REJECTED" | "VALIDATED" | "CREATED" | "NOTIFIED";
@@ -4627,11 +4439,7 @@ export declare const WorkqueueCountInput: z.ZodArray<z.ZodObject<{
4627
4439
  type: "within";
4628
4440
  location: string;
4629
4441
  } | undefined;
4630
- 'legalStatus.REGISTERED.registrationNumber'?: {
4631
- type: "exact";
4632
- term: string;
4633
- } | undefined;
4634
- }[]];
4442
+ }[];
4635
4443
  }, {
4636
4444
  type: "and" | "or";
4637
4445
  clauses?: unknown;
@@ -4639,89 +4447,7 @@ export declare const WorkqueueCountInput: z.ZodArray<z.ZodObject<{
4639
4447
  }, "strip", z.ZodTypeAny, {
4640
4448
  query: {
4641
4449
  type: "and" | "or";
4642
- clauses: [{
4643
- status?: {
4644
- type: "exact";
4645
- term: "ARCHIVED" | "CERTIFIED" | "DECLARED" | "REGISTERED" | "REJECTED" | "VALIDATED" | "CREATED" | "NOTIFIED";
4646
- } | {
4647
- type: "anyOf";
4648
- terms: ("ARCHIVED" | "CERTIFIED" | "DECLARED" | "REGISTERED" | "REJECTED" | "VALIDATED" | "CREATED" | "NOTIFIED")[];
4649
- } | undefined;
4650
- data?: any;
4651
- createdAt?: {
4652
- type: "exact";
4653
- term: string;
4654
- } | {
4655
- type: "range";
4656
- gte: string;
4657
- lte: string;
4658
- } | undefined;
4659
- createdBy?: {
4660
- type: "exact";
4661
- term: string;
4662
- } | undefined;
4663
- createdAtLocation?: {
4664
- type: "exact";
4665
- term: string;
4666
- } | {
4667
- type: "within";
4668
- location: string;
4669
- } | undefined;
4670
- assignedTo?: {
4671
- type: "exact";
4672
- term: string;
4673
- } | undefined;
4674
- updatedAt?: {
4675
- type: "exact";
4676
- term: string;
4677
- } | {
4678
- type: "range";
4679
- gte: string;
4680
- lte: string;
4681
- } | undefined;
4682
- trackingId?: {
4683
- type: "exact";
4684
- term: string;
4685
- } | undefined;
4686
- updatedAtLocation?: {
4687
- type: "exact";
4688
- term: string;
4689
- } | {
4690
- type: "within";
4691
- location: string;
4692
- } | undefined;
4693
- updatedBy?: {
4694
- type: "exact";
4695
- term: string;
4696
- } | undefined;
4697
- flags?: ({
4698
- type: "anyOf";
4699
- terms: string[];
4700
- } | {
4701
- type: "not";
4702
- term: string;
4703
- })[] | undefined;
4704
- eventType?: string | undefined;
4705
- 'legalStatus.REGISTERED.createdAt'?: {
4706
- type: "exact";
4707
- term: string;
4708
- } | {
4709
- type: "range";
4710
- gte: string;
4711
- lte: string;
4712
- } | undefined;
4713
- 'legalStatus.REGISTERED.createdAtLocation'?: {
4714
- type: "exact";
4715
- term: string;
4716
- } | {
4717
- type: "within";
4718
- location: string;
4719
- } | undefined;
4720
- 'legalStatus.REGISTERED.registrationNumber'?: {
4721
- type: "exact";
4722
- term: string;
4723
- } | undefined;
4724
- }, ...{
4450
+ clauses: {
4725
4451
  status?: {
4726
4452
  type: "exact";
4727
4453
  term: "ARCHIVED" | "CERTIFIED" | "DECLARED" | "REGISTERED" | "REJECTED" | "VALIDATED" | "CREATED" | "NOTIFIED";
@@ -4799,11 +4525,7 @@ export declare const WorkqueueCountInput: z.ZodArray<z.ZodObject<{
4799
4525
  type: "within";
4800
4526
  location: string;
4801
4527
  } | undefined;
4802
- 'legalStatus.REGISTERED.registrationNumber'?: {
4803
- type: "exact";
4804
- term: string;
4805
- } | undefined;
4806
- }[]];
4528
+ }[];
4807
4529
  };
4808
4530
  slug: string;
4809
4531
  }, {