@coopenomics/factory 2.2.7 → 2.2.9
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.cjs +793 -223
- package/dist/index.d.cts +166 -91
- package/dist/index.d.mts +166 -91
- package/dist/index.d.ts +166 -91
- package/dist/index.mjs +788 -224
- package/package.json +3 -4
package/dist/index.mjs
CHANGED
|
@@ -329,6 +329,18 @@ const VarsSchema = {
|
|
|
329
329
|
required: ["protocol_day_month_year", "protocol_number"],
|
|
330
330
|
additionalProperties: true,
|
|
331
331
|
nullable: true
|
|
332
|
+
},
|
|
333
|
+
investment_agreement: {
|
|
334
|
+
type: "object",
|
|
335
|
+
properties: {
|
|
336
|
+
protocol_number: { type: "string" },
|
|
337
|
+
protocol_day_month_year: { type: "string" },
|
|
338
|
+
subject: { type: "string" },
|
|
339
|
+
terms: { type: "string" }
|
|
340
|
+
},
|
|
341
|
+
required: ["protocol_day_month_year", "protocol_number"],
|
|
342
|
+
additionalProperties: true,
|
|
343
|
+
nullable: true
|
|
332
344
|
}
|
|
333
345
|
},
|
|
334
346
|
required: [
|
|
@@ -353,8 +365,8 @@ const VarsSchema = {
|
|
|
353
365
|
additionalProperties: true
|
|
354
366
|
};
|
|
355
367
|
|
|
356
|
-
const registry_id$
|
|
357
|
-
const Schema$
|
|
368
|
+
const registry_id$l = Cooperative$1.Registry.WalletAgreement.registry_id;
|
|
369
|
+
const Schema$l = {
|
|
358
370
|
type: "object",
|
|
359
371
|
properties: {
|
|
360
372
|
meta: IMetaJSONSchema,
|
|
@@ -364,23 +376,23 @@ const Schema$f = {
|
|
|
364
376
|
required: ["meta", "coop", "vars"],
|
|
365
377
|
additionalProperties: true
|
|
366
378
|
};
|
|
367
|
-
const Template$
|
|
379
|
+
const Template$l = {
|
|
368
380
|
title: Cooperative$1.Registry.WalletAgreement.title,
|
|
369
381
|
description: Cooperative$1.Registry.WalletAgreement.description,
|
|
370
|
-
model: Schema$
|
|
382
|
+
model: Schema$l,
|
|
371
383
|
context: Cooperative$1.Registry.WalletAgreement.context,
|
|
372
384
|
translations: Cooperative$1.Registry.WalletAgreement.translations
|
|
373
385
|
};
|
|
374
386
|
|
|
375
387
|
const WalletAgreement = {
|
|
376
388
|
__proto__: null,
|
|
377
|
-
Schema: Schema$
|
|
378
|
-
Template: Template$
|
|
379
|
-
registry_id: registry_id$
|
|
389
|
+
Schema: Schema$l,
|
|
390
|
+
Template: Template$l,
|
|
391
|
+
registry_id: registry_id$l
|
|
380
392
|
};
|
|
381
393
|
|
|
382
|
-
const registry_id$
|
|
383
|
-
const Schema$
|
|
394
|
+
const registry_id$k = Cooperative$1.Registry.RegulationElectronicSignature.registry_id;
|
|
395
|
+
const Schema$k = {
|
|
384
396
|
type: "object",
|
|
385
397
|
properties: {
|
|
386
398
|
meta: IMetaJSONSchema,
|
|
@@ -390,23 +402,23 @@ const Schema$e = {
|
|
|
390
402
|
required: ["meta", "coop", "vars"],
|
|
391
403
|
additionalProperties: true
|
|
392
404
|
};
|
|
393
|
-
const Template$
|
|
405
|
+
const Template$k = {
|
|
394
406
|
title: Cooperative$1.Registry.RegulationElectronicSignature.title,
|
|
395
407
|
description: Cooperative$1.Registry.RegulationElectronicSignature.description,
|
|
396
|
-
model: Schema$
|
|
408
|
+
model: Schema$k,
|
|
397
409
|
context: Cooperative$1.Registry.RegulationElectronicSignature.context,
|
|
398
410
|
translations: Cooperative$1.Registry.RegulationElectronicSignature.translations
|
|
399
411
|
};
|
|
400
412
|
|
|
401
413
|
const RegulationElectronicSignaturet = {
|
|
402
414
|
__proto__: null,
|
|
403
|
-
Schema: Schema$
|
|
404
|
-
Template: Template$
|
|
405
|
-
registry_id: registry_id$
|
|
415
|
+
Schema: Schema$k,
|
|
416
|
+
Template: Template$k,
|
|
417
|
+
registry_id: registry_id$k
|
|
406
418
|
};
|
|
407
419
|
|
|
408
|
-
const registry_id$
|
|
409
|
-
const Schema$
|
|
420
|
+
const registry_id$j = Cooperative$1.Registry.PrivacyPolicy.registry_id;
|
|
421
|
+
const Schema$j = {
|
|
410
422
|
type: "object",
|
|
411
423
|
properties: {
|
|
412
424
|
meta: IMetaJSONSchema,
|
|
@@ -416,23 +428,23 @@ const Schema$d = {
|
|
|
416
428
|
required: ["meta", "coop", "vars"],
|
|
417
429
|
additionalProperties: true
|
|
418
430
|
};
|
|
419
|
-
const Template$
|
|
431
|
+
const Template$j = {
|
|
420
432
|
title: Cooperative$1.Registry.PrivacyPolicy.title,
|
|
421
433
|
description: Cooperative$1.Registry.PrivacyPolicy.description,
|
|
422
|
-
model: Schema$
|
|
434
|
+
model: Schema$j,
|
|
423
435
|
context: Cooperative$1.Registry.PrivacyPolicy.context,
|
|
424
436
|
translations: Cooperative$1.Registry.PrivacyPolicy.translations
|
|
425
437
|
};
|
|
426
438
|
|
|
427
439
|
const PrivacyPolicy = {
|
|
428
440
|
__proto__: null,
|
|
429
|
-
Schema: Schema$
|
|
430
|
-
Template: Template$
|
|
431
|
-
registry_id: registry_id$
|
|
441
|
+
Schema: Schema$j,
|
|
442
|
+
Template: Template$j,
|
|
443
|
+
registry_id: registry_id$j
|
|
432
444
|
};
|
|
433
445
|
|
|
434
|
-
const registry_id$
|
|
435
|
-
const Schema$
|
|
446
|
+
const registry_id$i = Cooperative$1.Registry.UserAgreement.registry_id;
|
|
447
|
+
const Schema$i = {
|
|
436
448
|
type: "object",
|
|
437
449
|
properties: {
|
|
438
450
|
meta: IMetaJSONSchema,
|
|
@@ -449,23 +461,23 @@ const Schema$c = {
|
|
|
449
461
|
required: ["meta", "coop", "vars", "user"],
|
|
450
462
|
additionalProperties: true
|
|
451
463
|
};
|
|
452
|
-
const Template$
|
|
464
|
+
const Template$i = {
|
|
453
465
|
title: Cooperative$1.Registry.UserAgreement.title,
|
|
454
466
|
description: Cooperative$1.Registry.UserAgreement.description,
|
|
455
|
-
model: Schema$
|
|
467
|
+
model: Schema$i,
|
|
456
468
|
context: Cooperative$1.Registry.UserAgreement.context,
|
|
457
469
|
translations: Cooperative$1.Registry.UserAgreement.translations
|
|
458
470
|
};
|
|
459
471
|
|
|
460
472
|
const UserAgreement = {
|
|
461
473
|
__proto__: null,
|
|
462
|
-
Schema: Schema$
|
|
463
|
-
Template: Template$
|
|
464
|
-
registry_id: registry_id$
|
|
474
|
+
Schema: Schema$i,
|
|
475
|
+
Template: Template$i,
|
|
476
|
+
registry_id: registry_id$i
|
|
465
477
|
};
|
|
466
478
|
|
|
467
|
-
const registry_id$
|
|
468
|
-
const Schema$
|
|
479
|
+
const registry_id$h = Cooperative$1.Registry.CoopenomicsAgreement.registry_id;
|
|
480
|
+
const Schema$h = {
|
|
469
481
|
type: "object",
|
|
470
482
|
properties: {
|
|
471
483
|
meta: IMetaJSONSchema,
|
|
@@ -476,23 +488,23 @@ const Schema$b = {
|
|
|
476
488
|
required: ["meta", "coop", "vars", "partner"],
|
|
477
489
|
additionalProperties: true
|
|
478
490
|
};
|
|
479
|
-
const Template$
|
|
491
|
+
const Template$h = {
|
|
480
492
|
title: Cooperative$1.Registry.CoopenomicsAgreement.title,
|
|
481
493
|
description: Cooperative$1.Registry.CoopenomicsAgreement.description,
|
|
482
|
-
model: Schema$
|
|
494
|
+
model: Schema$h,
|
|
483
495
|
context: Cooperative$1.Registry.CoopenomicsAgreement.context,
|
|
484
496
|
translations: Cooperative$1.Registry.CoopenomicsAgreement.translations
|
|
485
497
|
};
|
|
486
498
|
|
|
487
499
|
const CoopenomicsAgreement = {
|
|
488
500
|
__proto__: null,
|
|
489
|
-
Schema: Schema$
|
|
490
|
-
Template: Template$
|
|
491
|
-
registry_id: registry_id$
|
|
501
|
+
Schema: Schema$h,
|
|
502
|
+
Template: Template$h,
|
|
503
|
+
registry_id: registry_id$h
|
|
492
504
|
};
|
|
493
505
|
|
|
494
|
-
const registry_id$
|
|
495
|
-
const Schema$
|
|
506
|
+
const registry_id$g = Cooperative$1.Registry.ParticipantApplication.registry_id;
|
|
507
|
+
const Schema$g = {
|
|
496
508
|
type: "object",
|
|
497
509
|
properties: {
|
|
498
510
|
type: {
|
|
@@ -564,23 +576,23 @@ const Schema$a = {
|
|
|
564
576
|
required: ["meta", "coop", "type", "signature"],
|
|
565
577
|
additionalProperties: true
|
|
566
578
|
};
|
|
567
|
-
const Template$
|
|
579
|
+
const Template$g = {
|
|
568
580
|
title: Cooperative$1.Registry.ParticipantApplication.title,
|
|
569
581
|
description: Cooperative$1.Registry.ParticipantApplication.description,
|
|
570
|
-
model: Schema$
|
|
582
|
+
model: Schema$g,
|
|
571
583
|
context: Cooperative$1.Registry.ParticipantApplication.context,
|
|
572
584
|
translations: Cooperative$1.Registry.ParticipantApplication.translations
|
|
573
585
|
};
|
|
574
586
|
|
|
575
587
|
const ParticipantApplication = {
|
|
576
588
|
__proto__: null,
|
|
577
|
-
Schema: Schema$
|
|
578
|
-
Template: Template$
|
|
579
|
-
registry_id: registry_id$
|
|
589
|
+
Schema: Schema$g,
|
|
590
|
+
Template: Template$g,
|
|
591
|
+
registry_id: registry_id$g
|
|
580
592
|
};
|
|
581
593
|
|
|
582
|
-
const registry_id$
|
|
583
|
-
const Schema$
|
|
594
|
+
const registry_id$f = Cooperative$1.Registry.DecisionOfParticipantApplication.registry_id;
|
|
595
|
+
const Schema$f = {
|
|
584
596
|
type: "object",
|
|
585
597
|
properties: {
|
|
586
598
|
type: {
|
|
@@ -644,23 +656,23 @@ const Schema$9 = {
|
|
|
644
656
|
// vars не добавляем в обязательные параметры для обратной совместимости (начиная с 2.26)
|
|
645
657
|
additionalProperties: true
|
|
646
658
|
};
|
|
647
|
-
const Template$
|
|
659
|
+
const Template$f = {
|
|
648
660
|
title: Cooperative$1.Registry.DecisionOfParticipantApplication.title,
|
|
649
661
|
description: Cooperative$1.Registry.DecisionOfParticipantApplication.description,
|
|
650
|
-
model: Schema$
|
|
662
|
+
model: Schema$f,
|
|
651
663
|
context: Cooperative$1.Registry.DecisionOfParticipantApplication.context,
|
|
652
664
|
translations: Cooperative$1.Registry.DecisionOfParticipantApplication.translations
|
|
653
665
|
};
|
|
654
666
|
|
|
655
667
|
const DecisionOfParticipantApplication = {
|
|
656
668
|
__proto__: null,
|
|
657
|
-
Schema: Schema$
|
|
658
|
-
Template: Template$
|
|
659
|
-
registry_id: registry_id$
|
|
669
|
+
Schema: Schema$f,
|
|
670
|
+
Template: Template$f,
|
|
671
|
+
registry_id: registry_id$f
|
|
660
672
|
};
|
|
661
673
|
|
|
662
|
-
const registry_id$
|
|
663
|
-
const Schema$
|
|
674
|
+
const registry_id$e = Cooperative$1.Registry.SelectBranchStatement.registry_id;
|
|
675
|
+
const Schema$e = {
|
|
664
676
|
type: "object",
|
|
665
677
|
properties: {
|
|
666
678
|
type: {
|
|
@@ -715,23 +727,23 @@ const Schema$8 = {
|
|
|
715
727
|
required: ["meta", "type", "branch", "vars"],
|
|
716
728
|
additionalProperties: true
|
|
717
729
|
};
|
|
718
|
-
const Template$
|
|
730
|
+
const Template$e = {
|
|
719
731
|
title: Cooperative$1.Registry.SelectBranchStatement.title,
|
|
720
732
|
description: Cooperative$1.Registry.SelectBranchStatement.description,
|
|
721
|
-
model: Schema$
|
|
733
|
+
model: Schema$e,
|
|
722
734
|
context: Cooperative$1.Registry.SelectBranchStatement.context,
|
|
723
735
|
translations: Cooperative$1.Registry.SelectBranchStatement.translations
|
|
724
736
|
};
|
|
725
737
|
|
|
726
738
|
const SelectBranchStatement = {
|
|
727
739
|
__proto__: null,
|
|
728
|
-
Schema: Schema$
|
|
729
|
-
Template: Template$
|
|
730
|
-
registry_id: registry_id$
|
|
740
|
+
Schema: Schema$e,
|
|
741
|
+
Template: Template$e,
|
|
742
|
+
registry_id: registry_id$e
|
|
731
743
|
};
|
|
732
744
|
|
|
733
|
-
const registry_id$
|
|
734
|
-
const Schema$
|
|
745
|
+
const registry_id$d = Cooperative$1.Registry.ProjectFreeDecision.registry_id;
|
|
746
|
+
const Schema$d = {
|
|
735
747
|
type: "object",
|
|
736
748
|
properties: {
|
|
737
749
|
coop: {
|
|
@@ -766,23 +778,23 @@ const Schema$7 = {
|
|
|
766
778
|
required: ["meta", "coop", "project", "suggester_name", "vars"],
|
|
767
779
|
additionalProperties: true
|
|
768
780
|
};
|
|
769
|
-
const Template$
|
|
781
|
+
const Template$d = {
|
|
770
782
|
title: Cooperative$1.Registry.ProjectFreeDecision.title,
|
|
771
783
|
description: Cooperative$1.Registry.ProjectFreeDecision.description,
|
|
772
|
-
model: Schema$
|
|
784
|
+
model: Schema$d,
|
|
773
785
|
context: Cooperative$1.Registry.ProjectFreeDecision.context,
|
|
774
786
|
translations: Cooperative$1.Registry.ProjectFreeDecision.translations
|
|
775
787
|
};
|
|
776
788
|
|
|
777
789
|
const ProjectFreeDecision = {
|
|
778
790
|
__proto__: null,
|
|
779
|
-
Schema: Schema$
|
|
780
|
-
Template: Template$
|
|
781
|
-
registry_id: registry_id$
|
|
791
|
+
Schema: Schema$d,
|
|
792
|
+
Template: Template$d,
|
|
793
|
+
registry_id: registry_id$d
|
|
782
794
|
};
|
|
783
795
|
|
|
784
|
-
const registry_id$
|
|
785
|
-
const Schema$
|
|
796
|
+
const registry_id$c = Cooperative$1.Registry.FreeDecision.registry_id;
|
|
797
|
+
const Schema$c = {
|
|
786
798
|
type: "object",
|
|
787
799
|
properties: {
|
|
788
800
|
coop: {
|
|
@@ -825,19 +837,19 @@ const Schema$6 = {
|
|
|
825
837
|
// vars не вносим для обратной совместимости начиная с версии 2.25
|
|
826
838
|
additionalProperties: true
|
|
827
839
|
};
|
|
828
|
-
const Template$
|
|
840
|
+
const Template$c = {
|
|
829
841
|
title: Cooperative$1.Registry.FreeDecision.title,
|
|
830
842
|
description: Cooperative$1.Registry.FreeDecision.description,
|
|
831
|
-
model: Schema$
|
|
843
|
+
model: Schema$c,
|
|
832
844
|
context: Cooperative$1.Registry.FreeDecision.context,
|
|
833
845
|
translations: Cooperative$1.Registry.FreeDecision.translations
|
|
834
846
|
};
|
|
835
847
|
|
|
836
848
|
const FreeDecision = {
|
|
837
849
|
__proto__: null,
|
|
838
|
-
Schema: Schema$
|
|
839
|
-
Template: Template$
|
|
840
|
-
registry_id: registry_id$
|
|
850
|
+
Schema: Schema$c,
|
|
851
|
+
Template: Template$c,
|
|
852
|
+
registry_id: registry_id$c
|
|
841
853
|
};
|
|
842
854
|
|
|
843
855
|
const CommonRequestSchema = {
|
|
@@ -877,8 +889,8 @@ const CommonUserSchema = {
|
|
|
877
889
|
additionalProperties: true
|
|
878
890
|
};
|
|
879
891
|
|
|
880
|
-
const registry_id$
|
|
881
|
-
const Schema$
|
|
892
|
+
const registry_id$b = Cooperative$1.Registry.AssetContributionStatement.registry_id;
|
|
893
|
+
const Schema$b = {
|
|
882
894
|
type: "object",
|
|
883
895
|
properties: {
|
|
884
896
|
meta: IMetaJSONSchema,
|
|
@@ -890,23 +902,23 @@ const Schema$5 = {
|
|
|
890
902
|
required: ["meta", "coop", "vars", "request", "user"],
|
|
891
903
|
additionalProperties: true
|
|
892
904
|
};
|
|
893
|
-
const Template$
|
|
905
|
+
const Template$b = {
|
|
894
906
|
title: Cooperative$1.Registry.AssetContributionStatement.title,
|
|
895
907
|
description: Cooperative$1.Registry.AssetContributionStatement.description,
|
|
896
|
-
model: Schema$
|
|
908
|
+
model: Schema$b,
|
|
897
909
|
context: Cooperative$1.Registry.AssetContributionStatement.context,
|
|
898
910
|
translations: Cooperative$1.Registry.AssetContributionStatement.translations
|
|
899
911
|
};
|
|
900
912
|
|
|
901
913
|
const AssetContributionStatement = {
|
|
902
914
|
__proto__: null,
|
|
903
|
-
Schema: Schema$
|
|
904
|
-
Template: Template$
|
|
905
|
-
registry_id: registry_id$
|
|
915
|
+
Schema: Schema$b,
|
|
916
|
+
Template: Template$b,
|
|
917
|
+
registry_id: registry_id$b
|
|
906
918
|
};
|
|
907
919
|
|
|
908
|
-
const registry_id$
|
|
909
|
-
const Schema$
|
|
920
|
+
const registry_id$a = Cooperative$1.Registry.ReturnByAssetStatement.registry_id;
|
|
921
|
+
const Schema$a = {
|
|
910
922
|
type: "object",
|
|
911
923
|
properties: {
|
|
912
924
|
meta: IMetaJSONSchema,
|
|
@@ -918,23 +930,23 @@ const Schema$4 = {
|
|
|
918
930
|
required: ["meta", "coop", "vars", "request", "user"],
|
|
919
931
|
additionalProperties: true
|
|
920
932
|
};
|
|
921
|
-
const Template$
|
|
933
|
+
const Template$a = {
|
|
922
934
|
title: Cooperative$1.Registry.ReturnByAssetStatement.title,
|
|
923
935
|
description: Cooperative$1.Registry.ReturnByAssetStatement.description,
|
|
924
|
-
model: Schema$
|
|
936
|
+
model: Schema$a,
|
|
925
937
|
context: Cooperative$1.Registry.ReturnByAssetStatement.context,
|
|
926
938
|
translations: Cooperative$1.Registry.ReturnByAssetStatement.translations
|
|
927
939
|
};
|
|
928
940
|
|
|
929
941
|
const ReturnByAssetStatement = {
|
|
930
942
|
__proto__: null,
|
|
931
|
-
Schema: Schema$
|
|
932
|
-
Template: Template$
|
|
933
|
-
registry_id: registry_id$
|
|
943
|
+
Schema: Schema$a,
|
|
944
|
+
Template: Template$a,
|
|
945
|
+
registry_id: registry_id$a
|
|
934
946
|
};
|
|
935
947
|
|
|
936
|
-
const registry_id$
|
|
937
|
-
const Schema$
|
|
948
|
+
const registry_id$9 = Cooperative$1.Registry.AssetContributionDecision.registry_id;
|
|
949
|
+
const Schema$9 = {
|
|
938
950
|
type: "object",
|
|
939
951
|
properties: {
|
|
940
952
|
meta: IMetaJSONSchema,
|
|
@@ -947,23 +959,23 @@ const Schema$3 = {
|
|
|
947
959
|
required: ["meta", "coop", "vars", "request", "user", "decision"],
|
|
948
960
|
additionalProperties: true
|
|
949
961
|
};
|
|
950
|
-
const Template$
|
|
962
|
+
const Template$9 = {
|
|
951
963
|
title: Cooperative$1.Registry.AssetContributionDecision.title,
|
|
952
964
|
description: Cooperative$1.Registry.AssetContributionDecision.description,
|
|
953
|
-
model: Schema$
|
|
965
|
+
model: Schema$9,
|
|
954
966
|
context: Cooperative$1.Registry.AssetContributionDecision.context,
|
|
955
967
|
translations: Cooperative$1.Registry.AssetContributionDecision.translations
|
|
956
968
|
};
|
|
957
969
|
|
|
958
970
|
const AssetContributionDecision = {
|
|
959
971
|
__proto__: null,
|
|
960
|
-
Schema: Schema$
|
|
961
|
-
Template: Template$
|
|
962
|
-
registry_id: registry_id$
|
|
972
|
+
Schema: Schema$9,
|
|
973
|
+
Template: Template$9,
|
|
974
|
+
registry_id: registry_id$9
|
|
963
975
|
};
|
|
964
976
|
|
|
965
|
-
const registry_id$
|
|
966
|
-
const Schema$
|
|
977
|
+
const registry_id$8 = Cooperative$1.Registry.ReturnByAssetDecision.registry_id;
|
|
978
|
+
const Schema$8 = {
|
|
967
979
|
type: "object",
|
|
968
980
|
properties: {
|
|
969
981
|
meta: IMetaJSONSchema,
|
|
@@ -976,19 +988,19 @@ const Schema$2 = {
|
|
|
976
988
|
required: ["meta", "coop", "vars", "request", "user", "decision"],
|
|
977
989
|
additionalProperties: true
|
|
978
990
|
};
|
|
979
|
-
const Template$
|
|
991
|
+
const Template$8 = {
|
|
980
992
|
title: Cooperative$1.Registry.ReturnByAssetDecision.title,
|
|
981
993
|
description: Cooperative$1.Registry.ReturnByAssetDecision.description,
|
|
982
|
-
model: Schema$
|
|
994
|
+
model: Schema$8,
|
|
983
995
|
context: Cooperative$1.Registry.ReturnByAssetDecision.context,
|
|
984
996
|
translations: Cooperative$1.Registry.ReturnByAssetDecision.translations
|
|
985
997
|
};
|
|
986
998
|
|
|
987
999
|
const ReturnByAssetDecision = {
|
|
988
1000
|
__proto__: null,
|
|
989
|
-
Schema: Schema$
|
|
990
|
-
Template: Template$
|
|
991
|
-
registry_id: registry_id$
|
|
1001
|
+
Schema: Schema$8,
|
|
1002
|
+
Template: Template$8,
|
|
1003
|
+
registry_id: registry_id$8
|
|
992
1004
|
};
|
|
993
1005
|
|
|
994
1006
|
const FirstLastMiddleNameSchema = {
|
|
@@ -1011,8 +1023,8 @@ const CommonProgramSchema = {
|
|
|
1011
1023
|
additionalProperties: true
|
|
1012
1024
|
};
|
|
1013
1025
|
|
|
1014
|
-
const registry_id$
|
|
1015
|
-
const Schema$
|
|
1026
|
+
const registry_id$7 = Cooperative$1.Registry.AssetContributionAct.registry_id;
|
|
1027
|
+
const Schema$7 = {
|
|
1016
1028
|
type: "object",
|
|
1017
1029
|
properties: {
|
|
1018
1030
|
meta: IMetaJSONSchema,
|
|
@@ -1029,23 +1041,23 @@ const Schema$1 = {
|
|
|
1029
1041
|
required: ["meta", "coop", "vars", "request", "user", "decision", "act_id", "receiver", "program"],
|
|
1030
1042
|
additionalProperties: true
|
|
1031
1043
|
};
|
|
1032
|
-
const Template$
|
|
1044
|
+
const Template$7 = {
|
|
1033
1045
|
title: Cooperative$1.Registry.AssetContributionAct.title,
|
|
1034
1046
|
description: Cooperative$1.Registry.AssetContributionAct.description,
|
|
1035
|
-
model: Schema$
|
|
1047
|
+
model: Schema$7,
|
|
1036
1048
|
context: Cooperative$1.Registry.AssetContributionAct.context,
|
|
1037
1049
|
translations: Cooperative$1.Registry.AssetContributionAct.translations
|
|
1038
1050
|
};
|
|
1039
1051
|
|
|
1040
1052
|
const AssetContributionAct = {
|
|
1041
1053
|
__proto__: null,
|
|
1042
|
-
Schema: Schema$
|
|
1043
|
-
Template: Template$
|
|
1044
|
-
registry_id: registry_id$
|
|
1054
|
+
Schema: Schema$7,
|
|
1055
|
+
Template: Template$7,
|
|
1056
|
+
registry_id: registry_id$7
|
|
1045
1057
|
};
|
|
1046
1058
|
|
|
1047
|
-
const registry_id = Cooperative$1.Registry.ReturnByAssetAct.registry_id;
|
|
1048
|
-
const Schema = {
|
|
1059
|
+
const registry_id$6 = Cooperative$1.Registry.ReturnByAssetAct.registry_id;
|
|
1060
|
+
const Schema$6 = {
|
|
1049
1061
|
type: "object",
|
|
1050
1062
|
properties: {
|
|
1051
1063
|
meta: IMetaJSONSchema,
|
|
@@ -1062,57 +1074,346 @@ const Schema = {
|
|
|
1062
1074
|
required: ["meta", "coop", "vars", "request", "user", "decision", "act_id", "transmitter", "program"],
|
|
1063
1075
|
additionalProperties: true
|
|
1064
1076
|
};
|
|
1065
|
-
const Template = {
|
|
1077
|
+
const Template$6 = {
|
|
1066
1078
|
title: Cooperative$1.Registry.ReturnByAssetAct.title,
|
|
1067
1079
|
description: Cooperative$1.Registry.ReturnByAssetAct.description,
|
|
1068
|
-
model: Schema,
|
|
1080
|
+
model: Schema$6,
|
|
1069
1081
|
context: Cooperative$1.Registry.ReturnByAssetAct.context,
|
|
1070
1082
|
translations: Cooperative$1.Registry.ReturnByAssetAct.translations
|
|
1071
1083
|
};
|
|
1072
1084
|
|
|
1073
1085
|
const ReturnByAssetAct = {
|
|
1074
1086
|
__proto__: null,
|
|
1075
|
-
Schema: Schema,
|
|
1076
|
-
Template: Template,
|
|
1077
|
-
registry_id: registry_id
|
|
1087
|
+
Schema: Schema$6,
|
|
1088
|
+
Template: Template$6,
|
|
1089
|
+
registry_id: registry_id$6
|
|
1078
1090
|
};
|
|
1079
1091
|
|
|
1080
|
-
const
|
|
1081
|
-
|
|
1082
|
-
|
|
1083
|
-
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
|
|
1094
|
-
|
|
1095
|
-
|
|
1096
|
-
|
|
1092
|
+
const registry_id$5 = Cooperative$1.Registry.InvestmentAgreement.registry_id;
|
|
1093
|
+
const Schema$5 = {
|
|
1094
|
+
type: "object",
|
|
1095
|
+
properties: {
|
|
1096
|
+
meta: IMetaJSONSchema,
|
|
1097
|
+
coop: CooperativeSchema,
|
|
1098
|
+
vars: {
|
|
1099
|
+
...VarsSchema,
|
|
1100
|
+
required: [...VarsSchema.required || [], "investment_agreement"]
|
|
1101
|
+
},
|
|
1102
|
+
subject: { type: "string" },
|
|
1103
|
+
terms: { type: "string" },
|
|
1104
|
+
uhdContract: {
|
|
1105
|
+
type: "object",
|
|
1106
|
+
properties: {
|
|
1107
|
+
date: { type: "string" },
|
|
1108
|
+
number: { type: "string" }
|
|
1109
|
+
},
|
|
1110
|
+
required: ["date", "number"]
|
|
1111
|
+
},
|
|
1112
|
+
user: CommonUserSchema,
|
|
1113
|
+
coopBankAccount: BankAccountSchema,
|
|
1114
|
+
type: {
|
|
1115
|
+
type: "string",
|
|
1116
|
+
enum: ["individual", "entrepreneur", "organization"]
|
|
1117
|
+
},
|
|
1118
|
+
individual: {
|
|
1119
|
+
type: "object",
|
|
1120
|
+
properties: {
|
|
1121
|
+
...individualSchema.properties
|
|
1122
|
+
},
|
|
1123
|
+
required: individualSchema.required,
|
|
1124
|
+
additionalProperties: true,
|
|
1125
|
+
nullable: true
|
|
1126
|
+
},
|
|
1127
|
+
organization: {
|
|
1128
|
+
type: "object",
|
|
1129
|
+
properties: {
|
|
1130
|
+
...organizationSchema.properties
|
|
1131
|
+
},
|
|
1132
|
+
required: organizationSchema.required,
|
|
1133
|
+
additionalProperties: true,
|
|
1134
|
+
nullable: true
|
|
1135
|
+
},
|
|
1136
|
+
entrepreneur: {
|
|
1137
|
+
type: "object",
|
|
1138
|
+
properties: {
|
|
1139
|
+
...entrepreneurSchema.properties
|
|
1140
|
+
},
|
|
1141
|
+
required: entrepreneurSchema.required,
|
|
1142
|
+
additionalProperties: true,
|
|
1143
|
+
nullable: true
|
|
1144
|
+
},
|
|
1145
|
+
organizationBankAccount: {
|
|
1146
|
+
type: "object",
|
|
1147
|
+
properties: {
|
|
1148
|
+
...BankAccountSchema.properties
|
|
1149
|
+
},
|
|
1150
|
+
required: BankAccountSchema.required,
|
|
1151
|
+
additionalProperties: true,
|
|
1152
|
+
nullable: true
|
|
1153
|
+
},
|
|
1154
|
+
entrepreneurBankAccount: {
|
|
1155
|
+
type: "object",
|
|
1156
|
+
properties: {
|
|
1157
|
+
...BankAccountSchema.properties
|
|
1158
|
+
},
|
|
1159
|
+
required: BankAccountSchema.required,
|
|
1160
|
+
additionalProperties: true,
|
|
1161
|
+
nullable: true
|
|
1162
|
+
}
|
|
1163
|
+
},
|
|
1164
|
+
required: ["meta", "coop", "vars", "uhdContract", "user", "coopBankAccount", "type"],
|
|
1165
|
+
additionalProperties: true
|
|
1166
|
+
};
|
|
1167
|
+
const Template$5 = {
|
|
1168
|
+
title: Cooperative$1.Registry.InvestmentAgreement.title,
|
|
1169
|
+
description: Cooperative$1.Registry.InvestmentAgreement.description,
|
|
1170
|
+
model: Schema$5,
|
|
1171
|
+
context: Cooperative$1.Registry.InvestmentAgreement.context,
|
|
1172
|
+
translations: Cooperative$1.Registry.InvestmentAgreement.translations
|
|
1097
1173
|
};
|
|
1098
1174
|
|
|
1099
|
-
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
|
|
1175
|
+
const InvestmentAgreement = {
|
|
1176
|
+
__proto__: null,
|
|
1177
|
+
Schema: Schema$5,
|
|
1178
|
+
Template: Template$5,
|
|
1179
|
+
registry_id: registry_id$5
|
|
1104
1180
|
};
|
|
1105
|
-
|
|
1106
|
-
|
|
1107
|
-
|
|
1108
|
-
|
|
1109
|
-
|
|
1110
|
-
}
|
|
1111
|
-
|
|
1112
|
-
|
|
1113
|
-
|
|
1114
|
-
|
|
1115
|
-
|
|
1181
|
+
|
|
1182
|
+
const UHDContractSchema = {
|
|
1183
|
+
type: "object",
|
|
1184
|
+
properties: {
|
|
1185
|
+
number: { type: "string" },
|
|
1186
|
+
date: { type: "string" }
|
|
1187
|
+
},
|
|
1188
|
+
required: ["number", "date"],
|
|
1189
|
+
additionalProperties: true
|
|
1190
|
+
};
|
|
1191
|
+
|
|
1192
|
+
const IntellectualResultSchema = {
|
|
1193
|
+
type: "object",
|
|
1194
|
+
properties: {
|
|
1195
|
+
quantity: { type: "number" },
|
|
1196
|
+
name: { type: "string" },
|
|
1197
|
+
currency: { type: "string" },
|
|
1198
|
+
unit_price: { type: "number" },
|
|
1199
|
+
total_price: { type: "number" },
|
|
1200
|
+
description: { type: "string" }
|
|
1201
|
+
},
|
|
1202
|
+
required: ["quantity", "name", "currency", "unit_price", "total_price", "description"],
|
|
1203
|
+
additionalProperties: true
|
|
1204
|
+
};
|
|
1205
|
+
|
|
1206
|
+
const registry_id$4 = Cooperative$1.Registry.InvestByResultStatement.registry_id;
|
|
1207
|
+
const Schema$4 = {
|
|
1208
|
+
type: "object",
|
|
1209
|
+
properties: {
|
|
1210
|
+
meta: IMetaJSONSchema,
|
|
1211
|
+
coop: CooperativeSchema,
|
|
1212
|
+
vars: VarsSchema,
|
|
1213
|
+
uhdContract: UHDContractSchema,
|
|
1214
|
+
user: CommonUserSchema,
|
|
1215
|
+
result: IntellectualResultSchema
|
|
1216
|
+
},
|
|
1217
|
+
required: ["meta", "coop", "vars", "uhdContract", "result", "user"],
|
|
1218
|
+
additionalProperties: true
|
|
1219
|
+
};
|
|
1220
|
+
const Template$4 = {
|
|
1221
|
+
title: Cooperative$1.Registry.InvestByResultStatement.title,
|
|
1222
|
+
description: Cooperative$1.Registry.InvestByResultStatement.description,
|
|
1223
|
+
model: Schema$4,
|
|
1224
|
+
context: Cooperative$1.Registry.InvestByResultStatement.context,
|
|
1225
|
+
translations: Cooperative$1.Registry.InvestByResultStatement.translations
|
|
1226
|
+
};
|
|
1227
|
+
|
|
1228
|
+
const InvestByResultStatement = {
|
|
1229
|
+
__proto__: null,
|
|
1230
|
+
Schema: Schema$4,
|
|
1231
|
+
Template: Template$4,
|
|
1232
|
+
registry_id: registry_id$4
|
|
1233
|
+
};
|
|
1234
|
+
|
|
1235
|
+
const registry_id$3 = Cooperative$1.Registry.InvestByResultAct.registry_id;
|
|
1236
|
+
const Schema$3 = {
|
|
1237
|
+
type: "object",
|
|
1238
|
+
properties: {
|
|
1239
|
+
meta: IMetaJSONSchema,
|
|
1240
|
+
coop: CooperativeSchema,
|
|
1241
|
+
vars: VarsSchema,
|
|
1242
|
+
uhdContract: UHDContractSchema,
|
|
1243
|
+
user: CommonUserSchema,
|
|
1244
|
+
result: IntellectualResultSchema,
|
|
1245
|
+
decision: decisionSchema,
|
|
1246
|
+
act: {
|
|
1247
|
+
type: "object",
|
|
1248
|
+
properties: {
|
|
1249
|
+
number: { type: "string" }
|
|
1250
|
+
},
|
|
1251
|
+
required: ["number"],
|
|
1252
|
+
additionalProperties: true
|
|
1253
|
+
}
|
|
1254
|
+
},
|
|
1255
|
+
required: ["meta", "coop", "vars", "uhdContract", "result", "user"],
|
|
1256
|
+
additionalProperties: true
|
|
1257
|
+
};
|
|
1258
|
+
const Template$3 = {
|
|
1259
|
+
title: Cooperative$1.Registry.InvestByResultAct.title,
|
|
1260
|
+
description: Cooperative$1.Registry.InvestByResultAct.description,
|
|
1261
|
+
model: Schema$3,
|
|
1262
|
+
context: Cooperative$1.Registry.InvestByResultAct.context,
|
|
1263
|
+
translations: Cooperative$1.Registry.InvestByResultAct.translations
|
|
1264
|
+
};
|
|
1265
|
+
|
|
1266
|
+
const InvestByResultAct = {
|
|
1267
|
+
__proto__: null,
|
|
1268
|
+
Schema: Schema$3,
|
|
1269
|
+
Template: Template$3,
|
|
1270
|
+
registry_id: registry_id$3
|
|
1271
|
+
};
|
|
1272
|
+
|
|
1273
|
+
const ContributionAmountSchema = {
|
|
1274
|
+
type: "object",
|
|
1275
|
+
properties: {
|
|
1276
|
+
amount: { type: "number" },
|
|
1277
|
+
currency: { type: "string" },
|
|
1278
|
+
words: { type: "string" }
|
|
1279
|
+
},
|
|
1280
|
+
required: ["amount", "currency", "words"],
|
|
1281
|
+
additionalProperties: true
|
|
1282
|
+
};
|
|
1283
|
+
|
|
1284
|
+
const registry_id$2 = Cooperative$1.Registry.InvestByMoneyStatement.registry_id;
|
|
1285
|
+
const Schema$2 = {
|
|
1286
|
+
type: "object",
|
|
1287
|
+
properties: {
|
|
1288
|
+
meta: IMetaJSONSchema,
|
|
1289
|
+
coop: CooperativeSchema,
|
|
1290
|
+
uhdContract: UHDContractSchema,
|
|
1291
|
+
user: CommonUserSchema,
|
|
1292
|
+
contribution: ContributionAmountSchema
|
|
1293
|
+
},
|
|
1294
|
+
required: ["meta", "coop", "uhdContract", "user", "contribution"],
|
|
1295
|
+
additionalProperties: true
|
|
1296
|
+
};
|
|
1297
|
+
const Template$2 = {
|
|
1298
|
+
title: Cooperative$1.Registry.InvestByMoneyStatement.title,
|
|
1299
|
+
description: Cooperative$1.Registry.InvestByMoneyStatement.description,
|
|
1300
|
+
model: Schema$2,
|
|
1301
|
+
context: Cooperative$1.Registry.InvestByMoneyStatement.context,
|
|
1302
|
+
translations: Cooperative$1.Registry.InvestByMoneyStatement.translations
|
|
1303
|
+
};
|
|
1304
|
+
|
|
1305
|
+
const InvestByMoneyStatement = {
|
|
1306
|
+
__proto__: null,
|
|
1307
|
+
Schema: Schema$2,
|
|
1308
|
+
Template: Template$2,
|
|
1309
|
+
registry_id: registry_id$2
|
|
1310
|
+
};
|
|
1311
|
+
|
|
1312
|
+
const registry_id$1 = Cooperative$1.Registry.InvestMembershipConvertation.registry_id;
|
|
1313
|
+
const Schema$1 = {
|
|
1314
|
+
type: "object",
|
|
1315
|
+
properties: {
|
|
1316
|
+
meta: IMetaJSONSchema,
|
|
1317
|
+
coop: CooperativeSchema,
|
|
1318
|
+
uhdContract: UHDContractSchema,
|
|
1319
|
+
user: CommonUserSchema,
|
|
1320
|
+
vars: VarsSchema,
|
|
1321
|
+
contribution: ContributionAmountSchema,
|
|
1322
|
+
appendix: {
|
|
1323
|
+
type: "object",
|
|
1324
|
+
properties: {
|
|
1325
|
+
number: { type: "string" }
|
|
1326
|
+
},
|
|
1327
|
+
required: ["number"],
|
|
1328
|
+
additionalProperties: true
|
|
1329
|
+
}
|
|
1330
|
+
},
|
|
1331
|
+
required: ["meta", "coop", "uhdContract", "user", "contribution", "appendix", "vars"],
|
|
1332
|
+
additionalProperties: true
|
|
1333
|
+
};
|
|
1334
|
+
const Template$1 = {
|
|
1335
|
+
title: Cooperative$1.Registry.InvestMembershipConvertation.title,
|
|
1336
|
+
description: Cooperative$1.Registry.InvestMembershipConvertation.description,
|
|
1337
|
+
model: Schema$1,
|
|
1338
|
+
context: Cooperative$1.Registry.InvestMembershipConvertation.context,
|
|
1339
|
+
translations: Cooperative$1.Registry.InvestMembershipConvertation.translations
|
|
1340
|
+
};
|
|
1341
|
+
|
|
1342
|
+
const InvestMembershipConvertation = {
|
|
1343
|
+
__proto__: null,
|
|
1344
|
+
Schema: Schema$1,
|
|
1345
|
+
Template: Template$1,
|
|
1346
|
+
registry_id: registry_id$1
|
|
1347
|
+
};
|
|
1348
|
+
|
|
1349
|
+
const registry_id = Cooperative$1.Registry.SosediAgreement.registry_id;
|
|
1350
|
+
const Schema = {
|
|
1351
|
+
type: "object",
|
|
1352
|
+
properties: {
|
|
1353
|
+
meta: IMetaJSONSchema,
|
|
1354
|
+
coop: CooperativeSchema,
|
|
1355
|
+
vars: VarsSchema
|
|
1356
|
+
},
|
|
1357
|
+
required: ["meta", "coop", "vars"],
|
|
1358
|
+
additionalProperties: true
|
|
1359
|
+
};
|
|
1360
|
+
const Template = {
|
|
1361
|
+
title: Cooperative$1.Registry.SosediAgreement.title,
|
|
1362
|
+
description: Cooperative$1.Registry.SosediAgreement.description,
|
|
1363
|
+
model: Schema,
|
|
1364
|
+
context: Cooperative$1.Registry.SosediAgreement.context,
|
|
1365
|
+
translations: Cooperative$1.Registry.SosediAgreement.translations
|
|
1366
|
+
};
|
|
1367
|
+
|
|
1368
|
+
const SosediAgreement = {
|
|
1369
|
+
__proto__: null,
|
|
1370
|
+
Schema: Schema,
|
|
1371
|
+
Template: Template,
|
|
1372
|
+
registry_id: registry_id
|
|
1373
|
+
};
|
|
1374
|
+
|
|
1375
|
+
const Registry = {
|
|
1376
|
+
1: WalletAgreement,
|
|
1377
|
+
2: RegulationElectronicSignaturet,
|
|
1378
|
+
3: PrivacyPolicy,
|
|
1379
|
+
4: UserAgreement,
|
|
1380
|
+
50: CoopenomicsAgreement,
|
|
1381
|
+
100: ParticipantApplication,
|
|
1382
|
+
101: SelectBranchStatement,
|
|
1383
|
+
501: DecisionOfParticipantApplication,
|
|
1384
|
+
599: ProjectFreeDecision,
|
|
1385
|
+
600: FreeDecision,
|
|
1386
|
+
699: SosediAgreement,
|
|
1387
|
+
700: AssetContributionStatement,
|
|
1388
|
+
701: AssetContributionDecision,
|
|
1389
|
+
702: AssetContributionAct,
|
|
1390
|
+
800: ReturnByAssetStatement,
|
|
1391
|
+
801: ReturnByAssetDecision,
|
|
1392
|
+
802: ReturnByAssetAct,
|
|
1393
|
+
1e3: InvestmentAgreement,
|
|
1394
|
+
1001: InvestByResultStatement,
|
|
1395
|
+
1002: InvestByResultAct,
|
|
1396
|
+
1005: InvestByMoneyStatement,
|
|
1397
|
+
1010: InvestMembershipConvertation
|
|
1398
|
+
};
|
|
1399
|
+
|
|
1400
|
+
var __defProp$c = Object.defineProperty;
|
|
1401
|
+
var __defNormalProp$c = (obj, key, value) => key in obj ? __defProp$c(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
1402
|
+
var __publicField$c = (obj, key, value) => {
|
|
1403
|
+
__defNormalProp$c(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
1404
|
+
return value;
|
|
1405
|
+
};
|
|
1406
|
+
const ajv = new Ajv();
|
|
1407
|
+
addFormats(ajv);
|
|
1408
|
+
ajv.addFormat("phone", {
|
|
1409
|
+
type: "string",
|
|
1410
|
+
validate: () => true
|
|
1411
|
+
});
|
|
1412
|
+
class Validator {
|
|
1413
|
+
constructor(schema, data) {
|
|
1414
|
+
__publicField$c(this, "schema");
|
|
1415
|
+
__publicField$c(this, "data");
|
|
1416
|
+
this.schema = schema;
|
|
1116
1417
|
this.data = data;
|
|
1117
1418
|
}
|
|
1118
1419
|
validate() {
|
|
@@ -1714,7 +2015,7 @@ class PDFService {
|
|
|
1714
2015
|
|
|
1715
2016
|
const name = "@coopenomics/factory";
|
|
1716
2017
|
const type = "module";
|
|
1717
|
-
const version = "2.2.
|
|
2018
|
+
const version = "2.2.9";
|
|
1718
2019
|
const packageManager = "pnpm@9.0.6";
|
|
1719
2020
|
const description = "";
|
|
1720
2021
|
const author = "Alex Ant <chairman.voskhod@gmail.com>";
|
|
@@ -1763,7 +2064,7 @@ const dependencies = {
|
|
|
1763
2064
|
"ajv-formats": "^3.0.1",
|
|
1764
2065
|
"ajv-i18n": "^4.2.0",
|
|
1765
2066
|
axios: "^1.7.2",
|
|
1766
|
-
cooptypes: "2.2.
|
|
2067
|
+
cooptypes: "2.2.9",
|
|
1767
2068
|
dotenv: "^16.4.5",
|
|
1768
2069
|
"eosjs-ecc": "^4.0.7",
|
|
1769
2070
|
handlebars: "^4.7.8",
|
|
@@ -1773,7 +2074,6 @@ const dependencies = {
|
|
|
1773
2074
|
mongodb: "^6.6.1",
|
|
1774
2075
|
nunjucks: "^3.2.4",
|
|
1775
2076
|
"pdf-lib": "^1.17.1",
|
|
1776
|
-
puppeteer: "^22.8.0",
|
|
1777
2077
|
uuid: "^11.0.0"
|
|
1778
2078
|
};
|
|
1779
2079
|
const devDependencies = {
|
|
@@ -1805,7 +2105,7 @@ const pnpm = {
|
|
|
1805
2105
|
"vite@>=5.1.0 <=5.1.6": ">=5.1.7"
|
|
1806
2106
|
}
|
|
1807
2107
|
};
|
|
1808
|
-
const gitHead = "
|
|
2108
|
+
const gitHead = "51d736eba49ce8aaea6e58c40772254c0c194f46";
|
|
1809
2109
|
const packageJson = {
|
|
1810
2110
|
name: name,
|
|
1811
2111
|
type: type,
|
|
@@ -2049,13 +2349,55 @@ class DocFactory {
|
|
|
2049
2349
|
middle_name: "middle_name" in data ? data.middle_name : ""
|
|
2050
2350
|
};
|
|
2051
2351
|
}
|
|
2052
|
-
|
|
2352
|
+
extractOrganizationName(input) {
|
|
2353
|
+
const regex = /^\s*(?:[А-ЯЁA-Za-z]{2,4}\s+)?["'«»“”]?([А-ЯЁа-яёA-Za-z0-9\- ]+(?:\s[А-ЯЁа-яёA-Za-z0-9\- ]+)*)["'«»“”]?\s*$/;
|
|
2354
|
+
const match = input.short_name.match(regex);
|
|
2355
|
+
if (!match) {
|
|
2356
|
+
throw new Error(`\u041D\u0435 \u0443\u0434\u0430\u043B\u043E\u0441\u044C \u0438\u0437\u0432\u043B\u0435\u0447\u044C \u0438\u043C\u044F \u043E\u0440\u0433\u0430\u043D\u0438\u0437\u0430\u0446\u0438\u0438 \u0438\u0437: "${input.short_name}"`);
|
|
2357
|
+
}
|
|
2358
|
+
return match[1].toUpperCase();
|
|
2359
|
+
}
|
|
2360
|
+
extractPersonalAbbreviatedName(input) {
|
|
2361
|
+
return `${input.first_name[0]}${input.middle_name[0]}${input.last_name[0]}`.toUpperCase();
|
|
2362
|
+
}
|
|
2363
|
+
parseDateForAgreements(created_at, timezone) {
|
|
2364
|
+
const dateWithTimezone = created_at ? moment.tz(created_at, "DD.MM.YYYY HH:mm", timezone) : moment.tz(timezone);
|
|
2365
|
+
return {
|
|
2366
|
+
day: dateWithTimezone.format("DD"),
|
|
2367
|
+
month: dateWithTimezone.format("MM"),
|
|
2368
|
+
year: dateWithTimezone.format("YY")
|
|
2369
|
+
};
|
|
2370
|
+
}
|
|
2371
|
+
constructUHDContract(created_at) {
|
|
2372
|
+
const date = created_at ? moment(created_at, "DD.MM.YYYY HH:mm") : moment();
|
|
2053
2373
|
return {
|
|
2054
|
-
|
|
2055
|
-
|
|
2056
|
-
birthdate_or_ogrn: "birthdate" in data ? data.birthdate : "details" in data ? data.details.ogrn : ""
|
|
2374
|
+
number: `\u0423\u0425\u0414-${date.format("DD")}-${date.format("MM")}-${date.format("YY")}`,
|
|
2375
|
+
date: date.format("DD.MM.YYYY")
|
|
2057
2376
|
};
|
|
2058
2377
|
}
|
|
2378
|
+
getCommonUser(input) {
|
|
2379
|
+
switch (input.type) {
|
|
2380
|
+
case "individual":
|
|
2381
|
+
case "entrepreneur": {
|
|
2382
|
+
const data = input.data;
|
|
2383
|
+
return {
|
|
2384
|
+
abbr_full_name: this.extractPersonalAbbreviatedName(data),
|
|
2385
|
+
full_name_or_short_name: this.getFullParticipantName(data),
|
|
2386
|
+
birthdate_or_ogrn: data.birthdate
|
|
2387
|
+
};
|
|
2388
|
+
}
|
|
2389
|
+
case "organization": {
|
|
2390
|
+
const data = input.data;
|
|
2391
|
+
return {
|
|
2392
|
+
abbr_full_name: this.extractOrganizationName(data),
|
|
2393
|
+
full_name_or_short_name: this.getFullParticipantName(data),
|
|
2394
|
+
birthdate_or_ogrn: data.details.ogrn
|
|
2395
|
+
};
|
|
2396
|
+
}
|
|
2397
|
+
default:
|
|
2398
|
+
throw new Error(`cant extract common user data`);
|
|
2399
|
+
}
|
|
2400
|
+
}
|
|
2059
2401
|
async saveDraft(document) {
|
|
2060
2402
|
await this.storage.saveDraft(document);
|
|
2061
2403
|
}
|
|
@@ -2103,16 +2445,16 @@ class DocFactory {
|
|
|
2103
2445
|
}
|
|
2104
2446
|
}
|
|
2105
2447
|
|
|
2106
|
-
let Factory$
|
|
2448
|
+
let Factory$l = class Factory extends DocFactory {
|
|
2107
2449
|
constructor(storage) {
|
|
2108
2450
|
super(storage);
|
|
2109
2451
|
}
|
|
2110
2452
|
async generateDocument(data, options) {
|
|
2111
2453
|
let template;
|
|
2112
2454
|
if (process.env.SOURCE === "local") {
|
|
2113
|
-
template = Template$
|
|
2455
|
+
template = Template$l;
|
|
2114
2456
|
} else {
|
|
2115
|
-
template = await this.getTemplate(DraftContract.contractName.production, registry_id$
|
|
2457
|
+
template = await this.getTemplate(DraftContract.contractName.production, registry_id$l, data.block_num);
|
|
2116
2458
|
}
|
|
2117
2459
|
const meta = await super.getMeta({ title: template.title, ...data });
|
|
2118
2460
|
const coop = await super.getCooperative(data.coopname, data.block_num);
|
|
@@ -2130,16 +2472,16 @@ let Factory$f = class Factory extends DocFactory {
|
|
|
2130
2472
|
}
|
|
2131
2473
|
};
|
|
2132
2474
|
|
|
2133
|
-
let Factory$
|
|
2475
|
+
let Factory$k = class Factory extends DocFactory {
|
|
2134
2476
|
constructor(storage) {
|
|
2135
2477
|
super(storage);
|
|
2136
2478
|
}
|
|
2137
2479
|
async generateDocument(data, options) {
|
|
2138
2480
|
let template;
|
|
2139
2481
|
if (process.env.SOURCE === "local") {
|
|
2140
|
-
template = Template$
|
|
2482
|
+
template = Template$k;
|
|
2141
2483
|
} else {
|
|
2142
|
-
template = await this.getTemplate(DraftContract.contractName.production, registry_id$
|
|
2484
|
+
template = await this.getTemplate(DraftContract.contractName.production, registry_id$k, data.block_num);
|
|
2143
2485
|
}
|
|
2144
2486
|
const meta = await super.getMeta({ title: template.title, ...data });
|
|
2145
2487
|
const coop = await super.getCooperative(data.coopname, data.block_num);
|
|
@@ -2157,16 +2499,16 @@ let Factory$e = class Factory extends DocFactory {
|
|
|
2157
2499
|
}
|
|
2158
2500
|
};
|
|
2159
2501
|
|
|
2160
|
-
let Factory$
|
|
2502
|
+
let Factory$j = class Factory extends DocFactory {
|
|
2161
2503
|
constructor(storage) {
|
|
2162
2504
|
super(storage);
|
|
2163
2505
|
}
|
|
2164
2506
|
async generateDocument(data, options) {
|
|
2165
2507
|
let template;
|
|
2166
2508
|
if (process.env.SOURCE === "local") {
|
|
2167
|
-
template = Template$
|
|
2509
|
+
template = Template$j;
|
|
2168
2510
|
} else {
|
|
2169
|
-
template = await this.getTemplate(DraftContract.contractName.production, registry_id$
|
|
2511
|
+
template = await this.getTemplate(DraftContract.contractName.production, registry_id$j, data.block_num);
|
|
2170
2512
|
}
|
|
2171
2513
|
const meta = await super.getMeta({ title: template.title, ...data });
|
|
2172
2514
|
const coop = await super.getCooperative(data.coopname, data.block_num);
|
|
@@ -2184,16 +2526,16 @@ let Factory$d = class Factory extends DocFactory {
|
|
|
2184
2526
|
}
|
|
2185
2527
|
};
|
|
2186
2528
|
|
|
2187
|
-
let Factory$
|
|
2529
|
+
let Factory$i = class Factory extends DocFactory {
|
|
2188
2530
|
constructor(storage) {
|
|
2189
2531
|
super(storage);
|
|
2190
2532
|
}
|
|
2191
2533
|
async generateDocument(data, options) {
|
|
2192
2534
|
let template;
|
|
2193
2535
|
if (process.env.SOURCE === "local") {
|
|
2194
|
-
template = Template$
|
|
2536
|
+
template = Template$i;
|
|
2195
2537
|
} else {
|
|
2196
|
-
template = await this.getTemplate(DraftContract.contractName.production, registry_id$
|
|
2538
|
+
template = await this.getTemplate(DraftContract.contractName.production, registry_id$i, data.block_num);
|
|
2197
2539
|
}
|
|
2198
2540
|
const meta = await super.getMeta({ title: template.title, ...data });
|
|
2199
2541
|
const coop = await super.getCooperative(data.coopname, data.block_num);
|
|
@@ -2215,16 +2557,16 @@ let Factory$c = class Factory extends DocFactory {
|
|
|
2215
2557
|
}
|
|
2216
2558
|
};
|
|
2217
2559
|
|
|
2218
|
-
let Factory$
|
|
2560
|
+
let Factory$h = class Factory extends DocFactory {
|
|
2219
2561
|
constructor(storage) {
|
|
2220
2562
|
super(storage);
|
|
2221
2563
|
}
|
|
2222
2564
|
async generateDocument(data, options) {
|
|
2223
2565
|
let template;
|
|
2224
2566
|
if (process.env.SOURCE === "local") {
|
|
2225
|
-
template = Template$
|
|
2567
|
+
template = Template$h;
|
|
2226
2568
|
} else {
|
|
2227
|
-
template = await this.getTemplate(DraftContract.contractName.production, registry_id$
|
|
2569
|
+
template = await this.getTemplate(DraftContract.contractName.production, registry_id$h, data.block_num);
|
|
2228
2570
|
}
|
|
2229
2571
|
const meta = await super.getMeta({ title: template.title, ...data });
|
|
2230
2572
|
const coop = await super.getCooperative(data.coopname, data.block_num);
|
|
@@ -2244,16 +2586,16 @@ let Factory$b = class Factory extends DocFactory {
|
|
|
2244
2586
|
}
|
|
2245
2587
|
};
|
|
2246
2588
|
|
|
2247
|
-
let Factory$
|
|
2589
|
+
let Factory$g = class Factory extends DocFactory {
|
|
2248
2590
|
constructor(storage) {
|
|
2249
2591
|
super(storage);
|
|
2250
2592
|
}
|
|
2251
2593
|
async generateDocument(data, _options) {
|
|
2252
2594
|
let template;
|
|
2253
2595
|
if (process.env.SOURCE === "local") {
|
|
2254
|
-
template = Template$
|
|
2596
|
+
template = Template$e;
|
|
2255
2597
|
} else {
|
|
2256
|
-
template = await this.getTemplate(DraftContract.contractName.production, registry_id$
|
|
2598
|
+
template = await this.getTemplate(DraftContract.contractName.production, registry_id$e, data.block_num);
|
|
2257
2599
|
}
|
|
2258
2600
|
const user = await super.getUser(data.username, data.block_num);
|
|
2259
2601
|
const userData = {
|
|
@@ -2275,16 +2617,16 @@ let Factory$a = class Factory extends DocFactory {
|
|
|
2275
2617
|
}
|
|
2276
2618
|
};
|
|
2277
2619
|
|
|
2278
|
-
let Factory$
|
|
2620
|
+
let Factory$f = class Factory extends DocFactory {
|
|
2279
2621
|
constructor(storage) {
|
|
2280
2622
|
super(storage);
|
|
2281
2623
|
}
|
|
2282
2624
|
async generateDocument(data, _options) {
|
|
2283
2625
|
let template;
|
|
2284
2626
|
if (process.env.SOURCE === "local") {
|
|
2285
|
-
template = Template$
|
|
2627
|
+
template = Template$g;
|
|
2286
2628
|
} else {
|
|
2287
|
-
template = await this.getTemplate(DraftContract.contractName.production, registry_id$
|
|
2629
|
+
template = await this.getTemplate(DraftContract.contractName.production, registry_id$g, data.block_num);
|
|
2288
2630
|
}
|
|
2289
2631
|
const user = await super.getUser(data.username, data.block_num);
|
|
2290
2632
|
let bank_account = {};
|
|
@@ -2334,16 +2676,16 @@ let Factory$9 = class Factory extends DocFactory {
|
|
|
2334
2676
|
}
|
|
2335
2677
|
};
|
|
2336
2678
|
|
|
2337
|
-
let Factory$
|
|
2679
|
+
let Factory$e = class Factory extends DocFactory {
|
|
2338
2680
|
constructor(storage) {
|
|
2339
2681
|
super(storage);
|
|
2340
2682
|
}
|
|
2341
2683
|
async generateDocument(data, options) {
|
|
2342
2684
|
let template;
|
|
2343
2685
|
if (process.env.SOURCE === "local") {
|
|
2344
|
-
template = Template$
|
|
2686
|
+
template = Template$f;
|
|
2345
2687
|
} else {
|
|
2346
|
-
template = await this.getTemplate(DraftContract.contractName.production, registry_id$
|
|
2688
|
+
template = await this.getTemplate(DraftContract.contractName.production, registry_id$f, data.block_num);
|
|
2347
2689
|
}
|
|
2348
2690
|
const user = await super.getUser(data.username, data.block_num);
|
|
2349
2691
|
const userData = {
|
|
@@ -2383,16 +2725,16 @@ let Factory$8 = class Factory extends DocFactory {
|
|
|
2383
2725
|
}
|
|
2384
2726
|
};
|
|
2385
2727
|
|
|
2386
|
-
let Factory$
|
|
2728
|
+
let Factory$d = class Factory extends DocFactory {
|
|
2387
2729
|
constructor(storage) {
|
|
2388
2730
|
super(storage);
|
|
2389
2731
|
}
|
|
2390
2732
|
async generateDocument(data, options) {
|
|
2391
2733
|
let template;
|
|
2392
2734
|
if (process.env.SOURCE === "local") {
|
|
2393
|
-
template = Template$
|
|
2735
|
+
template = Template$d;
|
|
2394
2736
|
} else {
|
|
2395
|
-
template = await this.getTemplate(DraftContract.contractName.production, registry_id$
|
|
2737
|
+
template = await this.getTemplate(DraftContract.contractName.production, registry_id$d, data.block_num);
|
|
2396
2738
|
}
|
|
2397
2739
|
const user = await this.getUser(data.username, data.block_num);
|
|
2398
2740
|
const suggester_name = await this.getFullName(user.data);
|
|
@@ -2428,16 +2770,16 @@ let Factory$7 = class Factory extends DocFactory {
|
|
|
2428
2770
|
}
|
|
2429
2771
|
};
|
|
2430
2772
|
|
|
2431
|
-
let Factory$
|
|
2773
|
+
let Factory$c = class Factory extends DocFactory {
|
|
2432
2774
|
constructor(storage) {
|
|
2433
2775
|
super(storage);
|
|
2434
2776
|
}
|
|
2435
2777
|
async generateDocument(data, options) {
|
|
2436
2778
|
let template;
|
|
2437
2779
|
if (process.env.SOURCE === "local") {
|
|
2438
|
-
template = Template$
|
|
2780
|
+
template = Template$c;
|
|
2439
2781
|
} else {
|
|
2440
|
-
template = await this.getTemplate(DraftContract.contractName.production, registry_id$
|
|
2782
|
+
template = await this.getTemplate(DraftContract.contractName.production, registry_id$c, data.block_num);
|
|
2441
2783
|
}
|
|
2442
2784
|
const user = await this.getUser(data.username, data.block_num);
|
|
2443
2785
|
const userData = {
|
|
@@ -2480,23 +2822,23 @@ let Factory$6 = class Factory extends DocFactory {
|
|
|
2480
2822
|
}
|
|
2481
2823
|
};
|
|
2482
2824
|
|
|
2483
|
-
let Factory$
|
|
2825
|
+
let Factory$b = class Factory extends DocFactory {
|
|
2484
2826
|
constructor(storage) {
|
|
2485
2827
|
super(storage);
|
|
2486
2828
|
}
|
|
2487
2829
|
async generateDocument(data, options) {
|
|
2488
2830
|
let template;
|
|
2489
2831
|
if (process.env.SOURCE === "local") {
|
|
2490
|
-
template = Template$
|
|
2832
|
+
template = Template$b;
|
|
2491
2833
|
} else {
|
|
2492
|
-
template = await this.getTemplate(DraftContract.contractName.production, registry_id$
|
|
2834
|
+
template = await this.getTemplate(DraftContract.contractName.production, registry_id$b, data.block_num);
|
|
2493
2835
|
}
|
|
2494
2836
|
const meta = await super.getMeta({ title: template.title, ...data });
|
|
2495
2837
|
const coop = await super.getCooperative(data.coopname, data.block_num);
|
|
2496
2838
|
const vars = await super.getVars(data.coopname, data.block_num);
|
|
2497
2839
|
const user = await super.getUser(data.username, data.block_num);
|
|
2498
2840
|
const request = data.request;
|
|
2499
|
-
const commonUser = this.getCommonUser(user
|
|
2841
|
+
const commonUser = this.getCommonUser(user);
|
|
2500
2842
|
const combinedData = {
|
|
2501
2843
|
meta,
|
|
2502
2844
|
coop,
|
|
@@ -2511,23 +2853,23 @@ let Factory$5 = class Factory extends DocFactory {
|
|
|
2511
2853
|
}
|
|
2512
2854
|
};
|
|
2513
2855
|
|
|
2514
|
-
let Factory$
|
|
2856
|
+
let Factory$a = class Factory extends DocFactory {
|
|
2515
2857
|
constructor(storage) {
|
|
2516
2858
|
super(storage);
|
|
2517
2859
|
}
|
|
2518
2860
|
async generateDocument(data, options) {
|
|
2519
2861
|
let template;
|
|
2520
2862
|
if (process.env.SOURCE === "local") {
|
|
2521
|
-
template = Template$
|
|
2863
|
+
template = Template$a;
|
|
2522
2864
|
} else {
|
|
2523
|
-
template = await this.getTemplate(DraftContract.contractName.production, registry_id$
|
|
2865
|
+
template = await this.getTemplate(DraftContract.contractName.production, registry_id$a, data.block_num);
|
|
2524
2866
|
}
|
|
2525
2867
|
const meta = await this.getMeta({ title: template.title, ...data });
|
|
2526
2868
|
const coop = await this.getCooperative(data.coopname, data.block_num);
|
|
2527
2869
|
const vars = await this.getVars(data.coopname, data.block_num);
|
|
2528
2870
|
const user = await this.getUser(data.username, data.block_num);
|
|
2529
2871
|
const request = data.request;
|
|
2530
|
-
const commonUser = this.getCommonUser(user
|
|
2872
|
+
const commonUser = this.getCommonUser(user);
|
|
2531
2873
|
const combinedData = {
|
|
2532
2874
|
meta,
|
|
2533
2875
|
coop,
|
|
@@ -2542,16 +2884,43 @@ let Factory$4 = class Factory extends DocFactory {
|
|
|
2542
2884
|
}
|
|
2543
2885
|
};
|
|
2544
2886
|
|
|
2545
|
-
let Factory$
|
|
2887
|
+
let Factory$9 = class Factory extends DocFactory {
|
|
2546
2888
|
constructor(storage) {
|
|
2547
2889
|
super(storage);
|
|
2548
2890
|
}
|
|
2549
2891
|
async generateDocument(data, options) {
|
|
2550
2892
|
let template;
|
|
2551
2893
|
if (process.env.SOURCE === "local") {
|
|
2552
|
-
template = Template
|
|
2894
|
+
template = Template;
|
|
2553
2895
|
} else {
|
|
2554
|
-
template = await this.getTemplate(DraftContract.contractName.production, registry_id
|
|
2896
|
+
template = await this.getTemplate(DraftContract.contractName.production, registry_id, data.block_num);
|
|
2897
|
+
}
|
|
2898
|
+
const meta = await super.getMeta({ title: template.title, ...data });
|
|
2899
|
+
const coop = await super.getCooperative(data.coopname, data.block_num);
|
|
2900
|
+
const vars = await super.getVars(data.coopname, data.block_num);
|
|
2901
|
+
const user = await super.getUser(data.username, data.block_num);
|
|
2902
|
+
const combinedData = {
|
|
2903
|
+
meta,
|
|
2904
|
+
coop,
|
|
2905
|
+
vars
|
|
2906
|
+
};
|
|
2907
|
+
await super.validate(combinedData, template.model);
|
|
2908
|
+
const translation = template.translations[meta.lang];
|
|
2909
|
+
const document = await super.generatePDF(user.data, template.context, combinedData, translation, meta, options?.skip_save);
|
|
2910
|
+
return document;
|
|
2911
|
+
}
|
|
2912
|
+
};
|
|
2913
|
+
|
|
2914
|
+
let Factory$8 = class Factory extends DocFactory {
|
|
2915
|
+
constructor(storage) {
|
|
2916
|
+
super(storage);
|
|
2917
|
+
}
|
|
2918
|
+
async generateDocument(data, options) {
|
|
2919
|
+
let template;
|
|
2920
|
+
if (process.env.SOURCE === "local") {
|
|
2921
|
+
template = Template$9;
|
|
2922
|
+
} else {
|
|
2923
|
+
template = await this.getTemplate(DraftContract.contractName.production, registry_id$9, data.block_num);
|
|
2555
2924
|
}
|
|
2556
2925
|
const meta = await this.getMeta({ title: template.title, ...data });
|
|
2557
2926
|
const coop = await this.getCooperative(data.coopname, data.block_num);
|
|
@@ -2559,7 +2928,7 @@ let Factory$3 = class Factory extends DocFactory {
|
|
|
2559
2928
|
const user = await this.getUser(data.username, data.block_num);
|
|
2560
2929
|
const request = await this.getRequest(data.request_id, data.block_num);
|
|
2561
2930
|
const decision = await this.getDecision(coop, data.coopname, data.decision_id, meta.created_at);
|
|
2562
|
-
const commonUser = this.getCommonUser(user
|
|
2931
|
+
const commonUser = this.getCommonUser(user);
|
|
2563
2932
|
const combinedData = {
|
|
2564
2933
|
meta,
|
|
2565
2934
|
coop,
|
|
@@ -2575,16 +2944,16 @@ let Factory$3 = class Factory extends DocFactory {
|
|
|
2575
2944
|
}
|
|
2576
2945
|
};
|
|
2577
2946
|
|
|
2578
|
-
let Factory$
|
|
2947
|
+
let Factory$7 = class Factory extends DocFactory {
|
|
2579
2948
|
constructor(storage) {
|
|
2580
2949
|
super(storage);
|
|
2581
2950
|
}
|
|
2582
2951
|
async generateDocument(data, options) {
|
|
2583
2952
|
let template;
|
|
2584
2953
|
if (process.env.SOURCE === "local") {
|
|
2585
|
-
template = Template$
|
|
2954
|
+
template = Template$7;
|
|
2586
2955
|
} else {
|
|
2587
|
-
template = await this.getTemplate(DraftContract.contractName.production, registry_id$
|
|
2956
|
+
template = await this.getTemplate(DraftContract.contractName.production, registry_id$7, data.block_num);
|
|
2588
2957
|
}
|
|
2589
2958
|
const meta = await this.getMeta({ title: template.title, ...data });
|
|
2590
2959
|
const coop = await this.getCooperative(data.coopname, data.block_num);
|
|
@@ -2592,7 +2961,7 @@ let Factory$2 = class Factory extends DocFactory {
|
|
|
2592
2961
|
const user = await this.getUser(data.username, data.block_num);
|
|
2593
2962
|
const request = await this.getRequest(data.request_id, data.block_num);
|
|
2594
2963
|
const decision = await this.getDecision(coop, data.coopname, data.decision_id, meta.created_at);
|
|
2595
|
-
const commonUser = this.getCommonUser(user
|
|
2964
|
+
const commonUser = this.getCommonUser(user);
|
|
2596
2965
|
const receiver = await this.getUser(data.receiver, data.block_num);
|
|
2597
2966
|
if (coop.is_branched && !data.braname)
|
|
2598
2967
|
throw new Error("Branch name is required");
|
|
@@ -2619,16 +2988,16 @@ let Factory$2 = class Factory extends DocFactory {
|
|
|
2619
2988
|
}
|
|
2620
2989
|
};
|
|
2621
2990
|
|
|
2622
|
-
let Factory$
|
|
2991
|
+
let Factory$6 = class Factory extends DocFactory {
|
|
2623
2992
|
constructor(storage) {
|
|
2624
2993
|
super(storage);
|
|
2625
2994
|
}
|
|
2626
2995
|
async generateDocument(data, options) {
|
|
2627
2996
|
let template;
|
|
2628
2997
|
if (process.env.SOURCE === "local") {
|
|
2629
|
-
template = Template$
|
|
2998
|
+
template = Template$8;
|
|
2630
2999
|
} else {
|
|
2631
|
-
template = await this.getTemplate(DraftContract.contractName.production, registry_id$
|
|
3000
|
+
template = await this.getTemplate(DraftContract.contractName.production, registry_id$8, data.block_num);
|
|
2632
3001
|
}
|
|
2633
3002
|
const meta = await this.getMeta({ title: template.title, ...data });
|
|
2634
3003
|
const coop = await this.getCooperative(data.coopname, data.block_num);
|
|
@@ -2636,7 +3005,7 @@ let Factory$1 = class Factory extends DocFactory {
|
|
|
2636
3005
|
const user = await this.getUser(data.username, data.block_num);
|
|
2637
3006
|
const request = await this.getRequest(data.request_id, data.block_num);
|
|
2638
3007
|
const decision = await this.getDecision(coop, data.coopname, data.decision_id, meta.created_at);
|
|
2639
|
-
const commonUser = this.getCommonUser(user
|
|
3008
|
+
const commonUser = this.getCommonUser(user);
|
|
2640
3009
|
const combinedData = {
|
|
2641
3010
|
meta,
|
|
2642
3011
|
coop,
|
|
@@ -2652,16 +3021,16 @@ let Factory$1 = class Factory extends DocFactory {
|
|
|
2652
3021
|
}
|
|
2653
3022
|
};
|
|
2654
3023
|
|
|
2655
|
-
class Factory extends DocFactory {
|
|
3024
|
+
let Factory$5 = class Factory extends DocFactory {
|
|
2656
3025
|
constructor(storage) {
|
|
2657
3026
|
super(storage);
|
|
2658
3027
|
}
|
|
2659
3028
|
async generateDocument(data, options) {
|
|
2660
3029
|
let template;
|
|
2661
3030
|
if (process.env.SOURCE === "local") {
|
|
2662
|
-
template = Template;
|
|
3031
|
+
template = Template$6;
|
|
2663
3032
|
} else {
|
|
2664
|
-
template = await this.getTemplate(DraftContract.contractName.production, registry_id, data.block_num);
|
|
3033
|
+
template = await this.getTemplate(DraftContract.contractName.production, registry_id$6, data.block_num);
|
|
2665
3034
|
}
|
|
2666
3035
|
const meta = await this.getMeta({ title: template.title, ...data });
|
|
2667
3036
|
const coop = await this.getCooperative(data.coopname, data.block_num);
|
|
@@ -2669,7 +3038,7 @@ class Factory extends DocFactory {
|
|
|
2669
3038
|
const user = await this.getUser(data.username, data.block_num);
|
|
2670
3039
|
const request = await this.getRequest(data.request_id, data.block_num);
|
|
2671
3040
|
const decision = await this.getDecision(coop, data.coopname, data.decision_id, meta.created_at);
|
|
2672
|
-
const commonUser = this.getCommonUser(user
|
|
3041
|
+
const commonUser = this.getCommonUser(user);
|
|
2673
3042
|
const transmitter = await this.getUser(data.transmitter, data.block_num);
|
|
2674
3043
|
if (coop.is_branched && !data.braname)
|
|
2675
3044
|
throw new Error("Branch name is required");
|
|
@@ -2694,6 +3063,189 @@ class Factory extends DocFactory {
|
|
|
2694
3063
|
const document = await this.generatePDF(commonUser.full_name_or_short_name, template.context, combinedData, translation, meta, options?.skip_save);
|
|
2695
3064
|
return document;
|
|
2696
3065
|
}
|
|
3066
|
+
};
|
|
3067
|
+
|
|
3068
|
+
let Factory$4 = class Factory extends DocFactory {
|
|
3069
|
+
constructor(storage) {
|
|
3070
|
+
super(storage);
|
|
3071
|
+
}
|
|
3072
|
+
async generateDocument(data, options) {
|
|
3073
|
+
let template;
|
|
3074
|
+
if (process.env.SOURCE === "local") {
|
|
3075
|
+
template = Template$5;
|
|
3076
|
+
} else {
|
|
3077
|
+
template = await this.getTemplate(DraftContract.contractName.production, registry_id$5, data.block_num);
|
|
3078
|
+
}
|
|
3079
|
+
const meta = await this.getMeta({ title: template.title, ...data });
|
|
3080
|
+
const coop = await this.getCooperative(data.coopname, data.block_num);
|
|
3081
|
+
const vars = await this.getVars(data.coopname, data.block_num);
|
|
3082
|
+
const user = await this.getUser(data.username, data.block_num);
|
|
3083
|
+
const commonUser = this.getCommonUser(user);
|
|
3084
|
+
const userData = {
|
|
3085
|
+
[user.type]: {
|
|
3086
|
+
...user.data
|
|
3087
|
+
}
|
|
3088
|
+
};
|
|
3089
|
+
const uhdContract = this.constructUHDContract(meta.created_at);
|
|
3090
|
+
const subject = data.subject ?? vars.investment_agreement?.subject;
|
|
3091
|
+
const terms = data.terms ?? vars.investment_agreement?.terms;
|
|
3092
|
+
const coopBankAccount = await this.getBankAccount(data.coopname, meta.block_num);
|
|
3093
|
+
const combinedData = {
|
|
3094
|
+
meta,
|
|
3095
|
+
coop,
|
|
3096
|
+
vars,
|
|
3097
|
+
user: commonUser,
|
|
3098
|
+
uhdContract,
|
|
3099
|
+
subject,
|
|
3100
|
+
terms,
|
|
3101
|
+
coopBankAccount,
|
|
3102
|
+
...userData,
|
|
3103
|
+
type: user.type
|
|
3104
|
+
};
|
|
3105
|
+
await this.validate(combinedData, template.model);
|
|
3106
|
+
const translation = template.translations[meta.lang];
|
|
3107
|
+
const document = await this.generatePDF(commonUser.full_name_or_short_name, template.context, combinedData, translation, meta, options?.skip_save);
|
|
3108
|
+
return document;
|
|
3109
|
+
}
|
|
3110
|
+
};
|
|
3111
|
+
|
|
3112
|
+
let Factory$3 = class Factory extends DocFactory {
|
|
3113
|
+
constructor(storage) {
|
|
3114
|
+
super(storage);
|
|
3115
|
+
}
|
|
3116
|
+
async generateDocument(data, options) {
|
|
3117
|
+
let template;
|
|
3118
|
+
if (process.env.SOURCE === "local") {
|
|
3119
|
+
template = Template$4;
|
|
3120
|
+
} else {
|
|
3121
|
+
template = await this.getTemplate(DraftContract.contractName.production, registry_id$4, data.block_num);
|
|
3122
|
+
}
|
|
3123
|
+
const meta = await this.getMeta({ title: template.title, ...data });
|
|
3124
|
+
const coop = await this.getCooperative(data.coopname, data.block_num);
|
|
3125
|
+
const vars = await this.getVars(data.coopname, data.block_num);
|
|
3126
|
+
const user = await this.getUser(data.username, data.block_num);
|
|
3127
|
+
const commonUser = this.getCommonUser(user);
|
|
3128
|
+
const uhdContract = this.constructUHDContract(meta.created_at);
|
|
3129
|
+
const combinedData = {
|
|
3130
|
+
meta,
|
|
3131
|
+
coop,
|
|
3132
|
+
vars,
|
|
3133
|
+
user: commonUser,
|
|
3134
|
+
uhdContract,
|
|
3135
|
+
result: data.result
|
|
3136
|
+
};
|
|
3137
|
+
await this.validate(combinedData, template.model);
|
|
3138
|
+
const translation = template.translations[meta.lang];
|
|
3139
|
+
const document = await this.generatePDF(commonUser.full_name_or_short_name, template.context, combinedData, translation, meta, options?.skip_save);
|
|
3140
|
+
return document;
|
|
3141
|
+
}
|
|
3142
|
+
};
|
|
3143
|
+
|
|
3144
|
+
let Factory$2 = class Factory extends DocFactory {
|
|
3145
|
+
constructor(storage) {
|
|
3146
|
+
super(storage);
|
|
3147
|
+
}
|
|
3148
|
+
async generateDocument(data, options) {
|
|
3149
|
+
let template;
|
|
3150
|
+
if (process.env.SOURCE === "local") {
|
|
3151
|
+
template = Template$3;
|
|
3152
|
+
} else {
|
|
3153
|
+
template = await this.getTemplate(DraftContract.contractName.production, registry_id$3, data.block_num);
|
|
3154
|
+
}
|
|
3155
|
+
const meta = await this.getMeta({ title: template.title, ...data });
|
|
3156
|
+
const coop = await this.getCooperative(data.coopname, data.block_num);
|
|
3157
|
+
const vars = await this.getVars(data.coopname, data.block_num);
|
|
3158
|
+
const user = await this.getUser(data.username, data.block_num);
|
|
3159
|
+
const commonUser = this.getCommonUser(user);
|
|
3160
|
+
const uhdContract = this.constructUHDContract(meta.created_at);
|
|
3161
|
+
const decision = await this.getDecision(
|
|
3162
|
+
coop,
|
|
3163
|
+
data.coopname,
|
|
3164
|
+
data.decision_id,
|
|
3165
|
+
meta.created_at
|
|
3166
|
+
);
|
|
3167
|
+
const act = {
|
|
3168
|
+
number: "123"
|
|
3169
|
+
};
|
|
3170
|
+
const combinedData = {
|
|
3171
|
+
meta,
|
|
3172
|
+
coop,
|
|
3173
|
+
vars,
|
|
3174
|
+
decision,
|
|
3175
|
+
user: commonUser,
|
|
3176
|
+
uhdContract,
|
|
3177
|
+
result: data.result,
|
|
3178
|
+
act
|
|
3179
|
+
};
|
|
3180
|
+
await this.validate(combinedData, template.model);
|
|
3181
|
+
const translation = template.translations[meta.lang];
|
|
3182
|
+
const document = await this.generatePDF(commonUser.full_name_or_short_name, template.context, combinedData, translation, meta, options?.skip_save);
|
|
3183
|
+
return document;
|
|
3184
|
+
}
|
|
3185
|
+
};
|
|
3186
|
+
|
|
3187
|
+
let Factory$1 = class Factory extends DocFactory {
|
|
3188
|
+
constructor(storage) {
|
|
3189
|
+
super(storage);
|
|
3190
|
+
}
|
|
3191
|
+
async generateDocument(data, options) {
|
|
3192
|
+
let template;
|
|
3193
|
+
if (process.env.SOURCE === "local") {
|
|
3194
|
+
template = Template$2;
|
|
3195
|
+
} else {
|
|
3196
|
+
template = await this.getTemplate(DraftContract.contractName.production, registry_id$2, data.block_num);
|
|
3197
|
+
}
|
|
3198
|
+
const meta = await this.getMeta({ title: template.title, ...data });
|
|
3199
|
+
const coop = await this.getCooperative(data.coopname, data.block_num);
|
|
3200
|
+
const user = await this.getUser(data.username, data.block_num);
|
|
3201
|
+
const commonUser = this.getCommonUser(user);
|
|
3202
|
+
const uhdContract = this.constructUHDContract(meta.created_at);
|
|
3203
|
+
const combinedData = {
|
|
3204
|
+
meta,
|
|
3205
|
+
coop,
|
|
3206
|
+
user: commonUser,
|
|
3207
|
+
uhdContract,
|
|
3208
|
+
contribution: data.contribution
|
|
3209
|
+
};
|
|
3210
|
+
await this.validate(combinedData, template.model);
|
|
3211
|
+
const translation = template.translations[meta.lang];
|
|
3212
|
+
const document = await this.generatePDF(commonUser.full_name_or_short_name, template.context, combinedData, translation, meta, options?.skip_save);
|
|
3213
|
+
return document;
|
|
3214
|
+
}
|
|
3215
|
+
};
|
|
3216
|
+
|
|
3217
|
+
class Factory extends DocFactory {
|
|
3218
|
+
constructor(storage) {
|
|
3219
|
+
super(storage);
|
|
3220
|
+
}
|
|
3221
|
+
async generateDocument(data, options) {
|
|
3222
|
+
let template;
|
|
3223
|
+
if (process.env.SOURCE === "local") {
|
|
3224
|
+
template = Template$1;
|
|
3225
|
+
} else {
|
|
3226
|
+
template = await this.getTemplate(DraftContract.contractName.production, registry_id$1, data.block_num);
|
|
3227
|
+
}
|
|
3228
|
+
const meta = await this.getMeta({ title: template.title, ...data });
|
|
3229
|
+
const coop = await this.getCooperative(data.coopname, data.block_num);
|
|
3230
|
+
const user = await this.getUser(data.username, data.block_num);
|
|
3231
|
+
const commonUser = this.getCommonUser(user);
|
|
3232
|
+
const vars = await this.getVars(data.coopname, data.block_num);
|
|
3233
|
+
const uhdContract = this.constructUHDContract(meta.created_at);
|
|
3234
|
+
const appendix = { number: "123" };
|
|
3235
|
+
const combinedData = {
|
|
3236
|
+
meta,
|
|
3237
|
+
coop,
|
|
3238
|
+
vars,
|
|
3239
|
+
user: commonUser,
|
|
3240
|
+
uhdContract,
|
|
3241
|
+
contribution: data.contribution,
|
|
3242
|
+
appendix
|
|
3243
|
+
};
|
|
3244
|
+
await this.validate(combinedData, template.model);
|
|
3245
|
+
const translation = template.translations[meta.lang];
|
|
3246
|
+
const document = await this.generatePDF(commonUser.full_name_or_short_name, template.context, combinedData, translation, meta, options?.skip_save);
|
|
3247
|
+
return document;
|
|
3248
|
+
}
|
|
2697
3249
|
}
|
|
2698
3250
|
|
|
2699
3251
|
var __defProp$1 = Object.defineProperty;
|
|
@@ -2758,38 +3310,50 @@ class Generator {
|
|
|
2758
3310
|
async connect(mongoUri) {
|
|
2759
3311
|
this.storage = new MongoDBConnector(mongoUri);
|
|
2760
3312
|
this.factories = {
|
|
2761
|
-
[registry_id$
|
|
3313
|
+
[registry_id$l]: new Factory$l(this.storage),
|
|
2762
3314
|
// 1
|
|
2763
|
-
[registry_id$
|
|
3315
|
+
[registry_id$k]: new Factory$k(this.storage),
|
|
2764
3316
|
// 2
|
|
2765
|
-
[registry_id$
|
|
3317
|
+
[registry_id$j]: new Factory$j(this.storage),
|
|
2766
3318
|
// 3
|
|
2767
|
-
[registry_id$
|
|
3319
|
+
[registry_id$i]: new Factory$i(this.storage),
|
|
2768
3320
|
// 4
|
|
2769
|
-
[registry_id$
|
|
3321
|
+
[registry_id$h]: new Factory$h(this.storage),
|
|
2770
3322
|
// 50
|
|
2771
|
-
[registry_id$
|
|
3323
|
+
[registry_id$g]: new Factory$f(this.storage),
|
|
2772
3324
|
// 100
|
|
2773
|
-
[registry_id$
|
|
3325
|
+
[registry_id$e]: new Factory$g(this.storage),
|
|
2774
3326
|
// 101
|
|
2775
|
-
[registry_id$
|
|
3327
|
+
[registry_id$f]: new Factory$e(this.storage),
|
|
2776
3328
|
// 501
|
|
2777
|
-
[registry_id$
|
|
3329
|
+
[registry_id$d]: new Factory$d(this.storage),
|
|
2778
3330
|
// 599
|
|
2779
|
-
[registry_id$
|
|
3331
|
+
[registry_id$c]: new Factory$c(this.storage),
|
|
2780
3332
|
// 600
|
|
2781
|
-
[registry_id
|
|
3333
|
+
[registry_id]: new Factory$9(this.storage),
|
|
3334
|
+
// 699
|
|
3335
|
+
[registry_id$b]: new Factory$b(this.storage),
|
|
2782
3336
|
// 700
|
|
2783
|
-
[registry_id$
|
|
3337
|
+
[registry_id$a]: new Factory$a(this.storage),
|
|
2784
3338
|
// 800
|
|
2785
|
-
[registry_id$
|
|
3339
|
+
[registry_id$8]: new Factory$6(this.storage),
|
|
2786
3340
|
// 801
|
|
2787
|
-
[registry_id]: new Factory(this.storage),
|
|
3341
|
+
[registry_id$6]: new Factory$5(this.storage),
|
|
2788
3342
|
// 802
|
|
2789
|
-
[registry_id$
|
|
3343
|
+
[registry_id$9]: new Factory$8(this.storage),
|
|
2790
3344
|
// 701
|
|
2791
|
-
[registry_id$
|
|
3345
|
+
[registry_id$7]: new Factory$7(this.storage),
|
|
2792
3346
|
// 702
|
|
3347
|
+
[registry_id$5]: new Factory$4(this.storage),
|
|
3348
|
+
// 1000
|
|
3349
|
+
[registry_id$4]: new Factory$3(this.storage),
|
|
3350
|
+
// 1001
|
|
3351
|
+
[registry_id$3]: new Factory$2(this.storage),
|
|
3352
|
+
// 1002
|
|
3353
|
+
[registry_id$2]: new Factory$1(this.storage),
|
|
3354
|
+
// 1005
|
|
3355
|
+
[registry_id$1]: new Factory(this.storage)
|
|
3356
|
+
// 1010
|
|
2793
3357
|
};
|
|
2794
3358
|
await this.storage.connect();
|
|
2795
3359
|
}
|
|
@@ -2854,4 +3418,4 @@ class Generator {
|
|
|
2854
3418
|
}
|
|
2855
3419
|
}
|
|
2856
3420
|
|
|
2857
|
-
export { AssetContributionAct, AssetContributionDecision, AssetContributionStatement, BankAccountSchema, CoopenomicsAgreement, CooperativeSchema, DecisionOfParticipantApplication, FreeDecision, Generator, ParticipantApplication, PrivacyPolicy, ProjectFreeDecision, Registry, RegulationElectronicSignaturet as RegulationElectronicSignature, ReturnByAssetAct, ReturnByAssetDecision, ReturnByAssetStatement, SelectBranchStatement, UserAgreement, VarsSchema, WalletAgreement, decisionSchema, entrepreneurSchema, individualSchema, organizationSchema, paymentMethodSchema };
|
|
3421
|
+
export { AssetContributionAct, AssetContributionDecision, AssetContributionStatement, BankAccountSchema, CoopenomicsAgreement, CooperativeSchema, DecisionOfParticipantApplication, FreeDecision, Generator, InvestByMoneyStatement, InvestByResultAct, InvestByResultStatement, InvestMembershipConvertation, InvestmentAgreement, ParticipantApplication, PrivacyPolicy, ProjectFreeDecision, Registry, RegulationElectronicSignaturet as RegulationElectronicSignature, ReturnByAssetAct, ReturnByAssetDecision, ReturnByAssetStatement, SelectBranchStatement, SosediAgreement, UserAgreement, VarsSchema, WalletAgreement, decisionSchema, entrepreneurSchema, individualSchema, organizationSchema, paymentMethodSchema };
|