@coopenomics/factory 2.2.6 → 2.2.7
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 +502 -158
- package/dist/index.d.cts +116 -68
- package/dist/index.d.mts +116 -68
- package/dist/index.d.ts +116 -68
- package/dist/index.mjs +499 -159
- package/package.json +3 -3
package/dist/index.mjs
CHANGED
|
@@ -77,7 +77,7 @@ const decisionSchema = {
|
|
|
77
77
|
voters_percent: { type: "number" }
|
|
78
78
|
},
|
|
79
79
|
required: ["id", "date", "time", "votes_for", "votes_against", "votes_abstained", "voters_percent"],
|
|
80
|
-
additionalProperties:
|
|
80
|
+
additionalProperties: true
|
|
81
81
|
};
|
|
82
82
|
|
|
83
83
|
const entrepreneurSchema = {
|
|
@@ -118,7 +118,7 @@ const organizationSchema = {
|
|
|
118
118
|
type: "object",
|
|
119
119
|
properties: {
|
|
120
120
|
username: { type: "string" },
|
|
121
|
-
type: { type: "string", enum: ["coop", "ooo", "oao", "zao", "pao", "ao"] },
|
|
121
|
+
type: { type: "string", enum: ["coop", "prodcoop", "ooo", "oao", "zao", "pao", "ao"] },
|
|
122
122
|
short_name: { type: "string" },
|
|
123
123
|
full_name: { type: "string" },
|
|
124
124
|
represented_by: {
|
|
@@ -353,8 +353,8 @@ const VarsSchema = {
|
|
|
353
353
|
additionalProperties: true
|
|
354
354
|
};
|
|
355
355
|
|
|
356
|
-
const registry_id$
|
|
357
|
-
const Schema$
|
|
356
|
+
const registry_id$f = Cooperative$1.Registry.WalletAgreement.registry_id;
|
|
357
|
+
const Schema$f = {
|
|
358
358
|
type: "object",
|
|
359
359
|
properties: {
|
|
360
360
|
meta: IMetaJSONSchema,
|
|
@@ -364,23 +364,23 @@ const Schema$b = {
|
|
|
364
364
|
required: ["meta", "coop", "vars"],
|
|
365
365
|
additionalProperties: true
|
|
366
366
|
};
|
|
367
|
-
const Template$
|
|
367
|
+
const Template$f = {
|
|
368
368
|
title: Cooperative$1.Registry.WalletAgreement.title,
|
|
369
369
|
description: Cooperative$1.Registry.WalletAgreement.description,
|
|
370
|
-
model: Schema$
|
|
370
|
+
model: Schema$f,
|
|
371
371
|
context: Cooperative$1.Registry.WalletAgreement.context,
|
|
372
372
|
translations: Cooperative$1.Registry.WalletAgreement.translations
|
|
373
373
|
};
|
|
374
374
|
|
|
375
375
|
const WalletAgreement = {
|
|
376
376
|
__proto__: null,
|
|
377
|
-
Schema: Schema$
|
|
378
|
-
Template: Template$
|
|
379
|
-
registry_id: registry_id$
|
|
377
|
+
Schema: Schema$f,
|
|
378
|
+
Template: Template$f,
|
|
379
|
+
registry_id: registry_id$f
|
|
380
380
|
};
|
|
381
381
|
|
|
382
|
-
const registry_id$
|
|
383
|
-
const Schema$
|
|
382
|
+
const registry_id$e = Cooperative$1.Registry.RegulationElectronicSignature.registry_id;
|
|
383
|
+
const Schema$e = {
|
|
384
384
|
type: "object",
|
|
385
385
|
properties: {
|
|
386
386
|
meta: IMetaJSONSchema,
|
|
@@ -390,23 +390,23 @@ const Schema$a = {
|
|
|
390
390
|
required: ["meta", "coop", "vars"],
|
|
391
391
|
additionalProperties: true
|
|
392
392
|
};
|
|
393
|
-
const Template$
|
|
393
|
+
const Template$e = {
|
|
394
394
|
title: Cooperative$1.Registry.RegulationElectronicSignature.title,
|
|
395
395
|
description: Cooperative$1.Registry.RegulationElectronicSignature.description,
|
|
396
|
-
model: Schema$
|
|
396
|
+
model: Schema$e,
|
|
397
397
|
context: Cooperative$1.Registry.RegulationElectronicSignature.context,
|
|
398
398
|
translations: Cooperative$1.Registry.RegulationElectronicSignature.translations
|
|
399
399
|
};
|
|
400
400
|
|
|
401
401
|
const RegulationElectronicSignaturet = {
|
|
402
402
|
__proto__: null,
|
|
403
|
-
Schema: Schema$
|
|
404
|
-
Template: Template$
|
|
405
|
-
registry_id: registry_id$
|
|
403
|
+
Schema: Schema$e,
|
|
404
|
+
Template: Template$e,
|
|
405
|
+
registry_id: registry_id$e
|
|
406
406
|
};
|
|
407
407
|
|
|
408
|
-
const registry_id$
|
|
409
|
-
const Schema$
|
|
408
|
+
const registry_id$d = Cooperative$1.Registry.PrivacyPolicy.registry_id;
|
|
409
|
+
const Schema$d = {
|
|
410
410
|
type: "object",
|
|
411
411
|
properties: {
|
|
412
412
|
meta: IMetaJSONSchema,
|
|
@@ -416,23 +416,23 @@ const Schema$9 = {
|
|
|
416
416
|
required: ["meta", "coop", "vars"],
|
|
417
417
|
additionalProperties: true
|
|
418
418
|
};
|
|
419
|
-
const Template$
|
|
419
|
+
const Template$d = {
|
|
420
420
|
title: Cooperative$1.Registry.PrivacyPolicy.title,
|
|
421
421
|
description: Cooperative$1.Registry.PrivacyPolicy.description,
|
|
422
|
-
model: Schema$
|
|
422
|
+
model: Schema$d,
|
|
423
423
|
context: Cooperative$1.Registry.PrivacyPolicy.context,
|
|
424
424
|
translations: Cooperative$1.Registry.PrivacyPolicy.translations
|
|
425
425
|
};
|
|
426
426
|
|
|
427
427
|
const PrivacyPolicy = {
|
|
428
428
|
__proto__: null,
|
|
429
|
-
Schema: Schema$
|
|
430
|
-
Template: Template$
|
|
431
|
-
registry_id: registry_id$
|
|
429
|
+
Schema: Schema$d,
|
|
430
|
+
Template: Template$d,
|
|
431
|
+
registry_id: registry_id$d
|
|
432
432
|
};
|
|
433
433
|
|
|
434
|
-
const registry_id$
|
|
435
|
-
const Schema$
|
|
434
|
+
const registry_id$c = Cooperative$1.Registry.UserAgreement.registry_id;
|
|
435
|
+
const Schema$c = {
|
|
436
436
|
type: "object",
|
|
437
437
|
properties: {
|
|
438
438
|
meta: IMetaJSONSchema,
|
|
@@ -449,23 +449,23 @@ const Schema$8 = {
|
|
|
449
449
|
required: ["meta", "coop", "vars", "user"],
|
|
450
450
|
additionalProperties: true
|
|
451
451
|
};
|
|
452
|
-
const Template$
|
|
452
|
+
const Template$c = {
|
|
453
453
|
title: Cooperative$1.Registry.UserAgreement.title,
|
|
454
454
|
description: Cooperative$1.Registry.UserAgreement.description,
|
|
455
|
-
model: Schema$
|
|
455
|
+
model: Schema$c,
|
|
456
456
|
context: Cooperative$1.Registry.UserAgreement.context,
|
|
457
457
|
translations: Cooperative$1.Registry.UserAgreement.translations
|
|
458
458
|
};
|
|
459
459
|
|
|
460
460
|
const UserAgreement = {
|
|
461
461
|
__proto__: null,
|
|
462
|
-
Schema: Schema$
|
|
463
|
-
Template: Template$
|
|
464
|
-
registry_id: registry_id$
|
|
462
|
+
Schema: Schema$c,
|
|
463
|
+
Template: Template$c,
|
|
464
|
+
registry_id: registry_id$c
|
|
465
465
|
};
|
|
466
466
|
|
|
467
|
-
const registry_id$
|
|
468
|
-
const Schema$
|
|
467
|
+
const registry_id$b = Cooperative$1.Registry.CoopenomicsAgreement.registry_id;
|
|
468
|
+
const Schema$b = {
|
|
469
469
|
type: "object",
|
|
470
470
|
properties: {
|
|
471
471
|
meta: IMetaJSONSchema,
|
|
@@ -476,23 +476,23 @@ const Schema$7 = {
|
|
|
476
476
|
required: ["meta", "coop", "vars", "partner"],
|
|
477
477
|
additionalProperties: true
|
|
478
478
|
};
|
|
479
|
-
const Template$
|
|
479
|
+
const Template$b = {
|
|
480
480
|
title: Cooperative$1.Registry.CoopenomicsAgreement.title,
|
|
481
481
|
description: Cooperative$1.Registry.CoopenomicsAgreement.description,
|
|
482
|
-
model: Schema$
|
|
482
|
+
model: Schema$b,
|
|
483
483
|
context: Cooperative$1.Registry.CoopenomicsAgreement.context,
|
|
484
484
|
translations: Cooperative$1.Registry.CoopenomicsAgreement.translations
|
|
485
485
|
};
|
|
486
486
|
|
|
487
487
|
const CoopenomicsAgreement = {
|
|
488
488
|
__proto__: null,
|
|
489
|
-
Schema: Schema$
|
|
490
|
-
Template: Template$
|
|
491
|
-
registry_id: registry_id$
|
|
489
|
+
Schema: Schema$b,
|
|
490
|
+
Template: Template$b,
|
|
491
|
+
registry_id: registry_id$b
|
|
492
492
|
};
|
|
493
493
|
|
|
494
|
-
const registry_id$
|
|
495
|
-
const Schema$
|
|
494
|
+
const registry_id$a = Cooperative$1.Registry.ParticipantApplication.registry_id;
|
|
495
|
+
const Schema$a = {
|
|
496
496
|
type: "object",
|
|
497
497
|
properties: {
|
|
498
498
|
type: {
|
|
@@ -564,23 +564,23 @@ const Schema$6 = {
|
|
|
564
564
|
required: ["meta", "coop", "type", "signature"],
|
|
565
565
|
additionalProperties: true
|
|
566
566
|
};
|
|
567
|
-
const Template$
|
|
567
|
+
const Template$a = {
|
|
568
568
|
title: Cooperative$1.Registry.ParticipantApplication.title,
|
|
569
569
|
description: Cooperative$1.Registry.ParticipantApplication.description,
|
|
570
|
-
model: Schema$
|
|
570
|
+
model: Schema$a,
|
|
571
571
|
context: Cooperative$1.Registry.ParticipantApplication.context,
|
|
572
572
|
translations: Cooperative$1.Registry.ParticipantApplication.translations
|
|
573
573
|
};
|
|
574
574
|
|
|
575
575
|
const ParticipantApplication = {
|
|
576
576
|
__proto__: null,
|
|
577
|
-
Schema: Schema$
|
|
578
|
-
Template: Template$
|
|
579
|
-
registry_id: registry_id$
|
|
577
|
+
Schema: Schema$a,
|
|
578
|
+
Template: Template$a,
|
|
579
|
+
registry_id: registry_id$a
|
|
580
580
|
};
|
|
581
581
|
|
|
582
|
-
const registry_id$
|
|
583
|
-
const Schema$
|
|
582
|
+
const registry_id$9 = Cooperative$1.Registry.DecisionOfParticipantApplication.registry_id;
|
|
583
|
+
const Schema$9 = {
|
|
584
584
|
type: "object",
|
|
585
585
|
properties: {
|
|
586
586
|
type: {
|
|
@@ -644,23 +644,23 @@ const Schema$5 = {
|
|
|
644
644
|
// vars не добавляем в обязательные параметры для обратной совместимости (начиная с 2.26)
|
|
645
645
|
additionalProperties: true
|
|
646
646
|
};
|
|
647
|
-
const Template$
|
|
647
|
+
const Template$9 = {
|
|
648
648
|
title: Cooperative$1.Registry.DecisionOfParticipantApplication.title,
|
|
649
649
|
description: Cooperative$1.Registry.DecisionOfParticipantApplication.description,
|
|
650
|
-
model: Schema$
|
|
650
|
+
model: Schema$9,
|
|
651
651
|
context: Cooperative$1.Registry.DecisionOfParticipantApplication.context,
|
|
652
652
|
translations: Cooperative$1.Registry.DecisionOfParticipantApplication.translations
|
|
653
653
|
};
|
|
654
654
|
|
|
655
655
|
const DecisionOfParticipantApplication = {
|
|
656
656
|
__proto__: null,
|
|
657
|
-
Schema: Schema$
|
|
658
|
-
Template: Template$
|
|
659
|
-
registry_id: registry_id$
|
|
657
|
+
Schema: Schema$9,
|
|
658
|
+
Template: Template$9,
|
|
659
|
+
registry_id: registry_id$9
|
|
660
660
|
};
|
|
661
661
|
|
|
662
|
-
const registry_id$
|
|
663
|
-
const Schema$
|
|
662
|
+
const registry_id$8 = Cooperative$1.Registry.SelectBranchStatement.registry_id;
|
|
663
|
+
const Schema$8 = {
|
|
664
664
|
type: "object",
|
|
665
665
|
properties: {
|
|
666
666
|
type: {
|
|
@@ -715,23 +715,23 @@ const Schema$4 = {
|
|
|
715
715
|
required: ["meta", "type", "branch", "vars"],
|
|
716
716
|
additionalProperties: true
|
|
717
717
|
};
|
|
718
|
-
const Template$
|
|
718
|
+
const Template$8 = {
|
|
719
719
|
title: Cooperative$1.Registry.SelectBranchStatement.title,
|
|
720
720
|
description: Cooperative$1.Registry.SelectBranchStatement.description,
|
|
721
|
-
model: Schema$
|
|
721
|
+
model: Schema$8,
|
|
722
722
|
context: Cooperative$1.Registry.SelectBranchStatement.context,
|
|
723
723
|
translations: Cooperative$1.Registry.SelectBranchStatement.translations
|
|
724
724
|
};
|
|
725
725
|
|
|
726
726
|
const SelectBranchStatement = {
|
|
727
727
|
__proto__: null,
|
|
728
|
-
Schema: Schema$
|
|
729
|
-
Template: Template$
|
|
730
|
-
registry_id: registry_id$
|
|
728
|
+
Schema: Schema$8,
|
|
729
|
+
Template: Template$8,
|
|
730
|
+
registry_id: registry_id$8
|
|
731
731
|
};
|
|
732
732
|
|
|
733
|
-
const registry_id$
|
|
734
|
-
const Schema$
|
|
733
|
+
const registry_id$7 = Cooperative$1.Registry.ProjectFreeDecision.registry_id;
|
|
734
|
+
const Schema$7 = {
|
|
735
735
|
type: "object",
|
|
736
736
|
properties: {
|
|
737
737
|
coop: {
|
|
@@ -766,23 +766,23 @@ const Schema$3 = {
|
|
|
766
766
|
required: ["meta", "coop", "project", "suggester_name", "vars"],
|
|
767
767
|
additionalProperties: true
|
|
768
768
|
};
|
|
769
|
-
const Template$
|
|
769
|
+
const Template$7 = {
|
|
770
770
|
title: Cooperative$1.Registry.ProjectFreeDecision.title,
|
|
771
771
|
description: Cooperative$1.Registry.ProjectFreeDecision.description,
|
|
772
|
-
model: Schema$
|
|
772
|
+
model: Schema$7,
|
|
773
773
|
context: Cooperative$1.Registry.ProjectFreeDecision.context,
|
|
774
774
|
translations: Cooperative$1.Registry.ProjectFreeDecision.translations
|
|
775
775
|
};
|
|
776
776
|
|
|
777
777
|
const ProjectFreeDecision = {
|
|
778
778
|
__proto__: null,
|
|
779
|
-
Schema: Schema$
|
|
780
|
-
Template: Template$
|
|
781
|
-
registry_id: registry_id$
|
|
779
|
+
Schema: Schema$7,
|
|
780
|
+
Template: Template$7,
|
|
781
|
+
registry_id: registry_id$7
|
|
782
782
|
};
|
|
783
783
|
|
|
784
|
-
const registry_id$
|
|
785
|
-
const Schema$
|
|
784
|
+
const registry_id$6 = Cooperative$1.Registry.FreeDecision.registry_id;
|
|
785
|
+
const Schema$6 = {
|
|
786
786
|
type: "object",
|
|
787
787
|
properties: {
|
|
788
788
|
coop: {
|
|
@@ -825,32 +825,33 @@ const Schema$2 = {
|
|
|
825
825
|
// vars не вносим для обратной совместимости начиная с версии 2.25
|
|
826
826
|
additionalProperties: true
|
|
827
827
|
};
|
|
828
|
-
const Template$
|
|
828
|
+
const Template$6 = {
|
|
829
829
|
title: Cooperative$1.Registry.FreeDecision.title,
|
|
830
830
|
description: Cooperative$1.Registry.FreeDecision.description,
|
|
831
|
-
model: Schema$
|
|
831
|
+
model: Schema$6,
|
|
832
832
|
context: Cooperative$1.Registry.FreeDecision.context,
|
|
833
833
|
translations: Cooperative$1.Registry.FreeDecision.translations
|
|
834
834
|
};
|
|
835
835
|
|
|
836
836
|
const FreeDecision = {
|
|
837
837
|
__proto__: null,
|
|
838
|
-
Schema: Schema$
|
|
839
|
-
Template: Template$
|
|
840
|
-
registry_id: registry_id$
|
|
838
|
+
Schema: Schema$6,
|
|
839
|
+
Template: Template$6,
|
|
840
|
+
registry_id: registry_id$6
|
|
841
841
|
};
|
|
842
842
|
|
|
843
|
-
const
|
|
843
|
+
const CommonRequestSchema = {
|
|
844
844
|
type: "object",
|
|
845
845
|
properties: {
|
|
846
846
|
hash: { type: "string" },
|
|
847
847
|
title: { type: "string" },
|
|
848
848
|
unit_of_measurement: { type: "string" },
|
|
849
849
|
units: { type: "number" },
|
|
850
|
-
unit_cost: { type: "
|
|
851
|
-
total_cost: { type: "
|
|
850
|
+
unit_cost: { type: "string" },
|
|
851
|
+
total_cost: { type: "string" },
|
|
852
852
|
currency: { type: "string" },
|
|
853
|
-
type: { type: "string" }
|
|
853
|
+
type: { type: "string" },
|
|
854
|
+
program_id: { type: "number" }
|
|
854
855
|
},
|
|
855
856
|
required: [
|
|
856
857
|
"hash",
|
|
@@ -860,71 +861,216 @@ const MiddlewareRequestSchema = {
|
|
|
860
861
|
"unit_cost",
|
|
861
862
|
"total_cost",
|
|
862
863
|
"currency",
|
|
863
|
-
"type"
|
|
864
|
+
"type",
|
|
865
|
+
"program_id"
|
|
864
866
|
],
|
|
865
867
|
additionalProperties: true
|
|
866
868
|
};
|
|
867
869
|
|
|
868
|
-
const
|
|
870
|
+
const CommonUserSchema = {
|
|
869
871
|
type: "object",
|
|
870
872
|
properties: {
|
|
871
|
-
|
|
873
|
+
full_name_or_short_name: { type: "string" },
|
|
874
|
+
birthdate_or_ogrn: { type: "string" }
|
|
872
875
|
},
|
|
873
|
-
required: ["
|
|
876
|
+
required: ["full_name_or_short_name", "birthdate_or_ogrn"],
|
|
874
877
|
additionalProperties: true
|
|
875
878
|
};
|
|
876
879
|
|
|
877
|
-
const registry_id$
|
|
878
|
-
const Schema$
|
|
880
|
+
const registry_id$5 = Cooperative$1.Registry.AssetContributionStatement.registry_id;
|
|
881
|
+
const Schema$5 = {
|
|
879
882
|
type: "object",
|
|
880
883
|
properties: {
|
|
881
884
|
meta: IMetaJSONSchema,
|
|
882
885
|
coop: CooperativeSchema,
|
|
883
886
|
vars: VarsSchema,
|
|
884
|
-
request:
|
|
885
|
-
user:
|
|
886
|
-
currency: { type: "string" }
|
|
887
|
+
request: CommonRequestSchema,
|
|
888
|
+
user: CommonUserSchema
|
|
887
889
|
},
|
|
888
|
-
required: ["meta", "coop", "vars", "request", "user"
|
|
890
|
+
required: ["meta", "coop", "vars", "request", "user"],
|
|
889
891
|
additionalProperties: true
|
|
890
892
|
};
|
|
891
|
-
const Template$
|
|
893
|
+
const Template$5 = {
|
|
892
894
|
title: Cooperative$1.Registry.AssetContributionStatement.title,
|
|
893
895
|
description: Cooperative$1.Registry.AssetContributionStatement.description,
|
|
894
|
-
model: Schema$
|
|
896
|
+
model: Schema$5,
|
|
895
897
|
context: Cooperative$1.Registry.AssetContributionStatement.context,
|
|
896
898
|
translations: Cooperative$1.Registry.AssetContributionStatement.translations
|
|
897
899
|
};
|
|
898
900
|
|
|
899
901
|
const AssetContributionStatement = {
|
|
900
902
|
__proto__: null,
|
|
901
|
-
Schema: Schema$
|
|
902
|
-
Template: Template$
|
|
903
|
-
registry_id: registry_id$
|
|
903
|
+
Schema: Schema$5,
|
|
904
|
+
Template: Template$5,
|
|
905
|
+
registry_id: registry_id$5
|
|
904
906
|
};
|
|
905
907
|
|
|
906
|
-
const registry_id = Cooperative$1.Registry.ReturnByAssetStatement.registry_id;
|
|
907
|
-
const Schema = {
|
|
908
|
+
const registry_id$4 = Cooperative$1.Registry.ReturnByAssetStatement.registry_id;
|
|
909
|
+
const Schema$4 = {
|
|
908
910
|
type: "object",
|
|
909
911
|
properties: {
|
|
910
912
|
meta: IMetaJSONSchema,
|
|
911
913
|
coop: CooperativeSchema,
|
|
912
914
|
vars: VarsSchema,
|
|
913
|
-
request:
|
|
914
|
-
user:
|
|
915
|
+
request: CommonRequestSchema,
|
|
916
|
+
user: CommonUserSchema
|
|
915
917
|
},
|
|
916
918
|
required: ["meta", "coop", "vars", "request", "user"],
|
|
917
919
|
additionalProperties: true
|
|
918
920
|
};
|
|
919
|
-
const Template = {
|
|
921
|
+
const Template$4 = {
|
|
920
922
|
title: Cooperative$1.Registry.ReturnByAssetStatement.title,
|
|
921
923
|
description: Cooperative$1.Registry.ReturnByAssetStatement.description,
|
|
922
|
-
model: Schema,
|
|
924
|
+
model: Schema$4,
|
|
923
925
|
context: Cooperative$1.Registry.ReturnByAssetStatement.context,
|
|
924
926
|
translations: Cooperative$1.Registry.ReturnByAssetStatement.translations
|
|
925
927
|
};
|
|
926
928
|
|
|
927
929
|
const ReturnByAssetStatement = {
|
|
930
|
+
__proto__: null,
|
|
931
|
+
Schema: Schema$4,
|
|
932
|
+
Template: Template$4,
|
|
933
|
+
registry_id: registry_id$4
|
|
934
|
+
};
|
|
935
|
+
|
|
936
|
+
const registry_id$3 = Cooperative$1.Registry.AssetContributionDecision.registry_id;
|
|
937
|
+
const Schema$3 = {
|
|
938
|
+
type: "object",
|
|
939
|
+
properties: {
|
|
940
|
+
meta: IMetaJSONSchema,
|
|
941
|
+
coop: CooperativeSchema,
|
|
942
|
+
vars: VarsSchema,
|
|
943
|
+
request: CommonRequestSchema,
|
|
944
|
+
user: CommonUserSchema,
|
|
945
|
+
decision: decisionSchema
|
|
946
|
+
},
|
|
947
|
+
required: ["meta", "coop", "vars", "request", "user", "decision"],
|
|
948
|
+
additionalProperties: true
|
|
949
|
+
};
|
|
950
|
+
const Template$3 = {
|
|
951
|
+
title: Cooperative$1.Registry.AssetContributionDecision.title,
|
|
952
|
+
description: Cooperative$1.Registry.AssetContributionDecision.description,
|
|
953
|
+
model: Schema$3,
|
|
954
|
+
context: Cooperative$1.Registry.AssetContributionDecision.context,
|
|
955
|
+
translations: Cooperative$1.Registry.AssetContributionDecision.translations
|
|
956
|
+
};
|
|
957
|
+
|
|
958
|
+
const AssetContributionDecision = {
|
|
959
|
+
__proto__: null,
|
|
960
|
+
Schema: Schema$3,
|
|
961
|
+
Template: Template$3,
|
|
962
|
+
registry_id: registry_id$3
|
|
963
|
+
};
|
|
964
|
+
|
|
965
|
+
const registry_id$2 = Cooperative$1.Registry.ReturnByAssetDecision.registry_id;
|
|
966
|
+
const Schema$2 = {
|
|
967
|
+
type: "object",
|
|
968
|
+
properties: {
|
|
969
|
+
meta: IMetaJSONSchema,
|
|
970
|
+
coop: CooperativeSchema,
|
|
971
|
+
vars: VarsSchema,
|
|
972
|
+
request: CommonRequestSchema,
|
|
973
|
+
user: CommonUserSchema,
|
|
974
|
+
decision: decisionSchema
|
|
975
|
+
},
|
|
976
|
+
required: ["meta", "coop", "vars", "request", "user", "decision"],
|
|
977
|
+
additionalProperties: true
|
|
978
|
+
};
|
|
979
|
+
const Template$2 = {
|
|
980
|
+
title: Cooperative$1.Registry.ReturnByAssetDecision.title,
|
|
981
|
+
description: Cooperative$1.Registry.ReturnByAssetDecision.description,
|
|
982
|
+
model: Schema$2,
|
|
983
|
+
context: Cooperative$1.Registry.ReturnByAssetDecision.context,
|
|
984
|
+
translations: Cooperative$1.Registry.ReturnByAssetDecision.translations
|
|
985
|
+
};
|
|
986
|
+
|
|
987
|
+
const ReturnByAssetDecision = {
|
|
988
|
+
__proto__: null,
|
|
989
|
+
Schema: Schema$2,
|
|
990
|
+
Template: Template$2,
|
|
991
|
+
registry_id: registry_id$2
|
|
992
|
+
};
|
|
993
|
+
|
|
994
|
+
const FirstLastMiddleNameSchema = {
|
|
995
|
+
type: "object",
|
|
996
|
+
properties: {
|
|
997
|
+
first_name: { type: "string" },
|
|
998
|
+
last_name: { type: "string" },
|
|
999
|
+
middle_name: { type: "string" }
|
|
1000
|
+
},
|
|
1001
|
+
required: ["first_name", "last_name", "middle_name"],
|
|
1002
|
+
additionalProperties: true
|
|
1003
|
+
};
|
|
1004
|
+
|
|
1005
|
+
const CommonProgramSchema = {
|
|
1006
|
+
type: "object",
|
|
1007
|
+
properties: {
|
|
1008
|
+
name: { type: "string" }
|
|
1009
|
+
},
|
|
1010
|
+
required: ["name"],
|
|
1011
|
+
additionalProperties: true
|
|
1012
|
+
};
|
|
1013
|
+
|
|
1014
|
+
const registry_id$1 = Cooperative$1.Registry.AssetContributionAct.registry_id;
|
|
1015
|
+
const Schema$1 = {
|
|
1016
|
+
type: "object",
|
|
1017
|
+
properties: {
|
|
1018
|
+
meta: IMetaJSONSchema,
|
|
1019
|
+
coop: CooperativeSchema,
|
|
1020
|
+
vars: VarsSchema,
|
|
1021
|
+
request: CommonRequestSchema,
|
|
1022
|
+
user: CommonUserSchema,
|
|
1023
|
+
decision: decisionSchema,
|
|
1024
|
+
act_id: { type: "string" },
|
|
1025
|
+
receiver: FirstLastMiddleNameSchema,
|
|
1026
|
+
program: CommonProgramSchema,
|
|
1027
|
+
branch: { ...organizationSchema, nullable: true }
|
|
1028
|
+
},
|
|
1029
|
+
required: ["meta", "coop", "vars", "request", "user", "decision", "act_id", "receiver", "program"],
|
|
1030
|
+
additionalProperties: true
|
|
1031
|
+
};
|
|
1032
|
+
const Template$1 = {
|
|
1033
|
+
title: Cooperative$1.Registry.AssetContributionAct.title,
|
|
1034
|
+
description: Cooperative$1.Registry.AssetContributionAct.description,
|
|
1035
|
+
model: Schema$1,
|
|
1036
|
+
context: Cooperative$1.Registry.AssetContributionAct.context,
|
|
1037
|
+
translations: Cooperative$1.Registry.AssetContributionAct.translations
|
|
1038
|
+
};
|
|
1039
|
+
|
|
1040
|
+
const AssetContributionAct = {
|
|
1041
|
+
__proto__: null,
|
|
1042
|
+
Schema: Schema$1,
|
|
1043
|
+
Template: Template$1,
|
|
1044
|
+
registry_id: registry_id$1
|
|
1045
|
+
};
|
|
1046
|
+
|
|
1047
|
+
const registry_id = Cooperative$1.Registry.ReturnByAssetAct.registry_id;
|
|
1048
|
+
const Schema = {
|
|
1049
|
+
type: "object",
|
|
1050
|
+
properties: {
|
|
1051
|
+
meta: IMetaJSONSchema,
|
|
1052
|
+
coop: CooperativeSchema,
|
|
1053
|
+
vars: VarsSchema,
|
|
1054
|
+
request: CommonRequestSchema,
|
|
1055
|
+
user: CommonUserSchema,
|
|
1056
|
+
decision: decisionSchema,
|
|
1057
|
+
act_id: { type: "string" },
|
|
1058
|
+
transmitter: FirstLastMiddleNameSchema,
|
|
1059
|
+
program: CommonProgramSchema,
|
|
1060
|
+
branch: { ...organizationSchema, nullable: true }
|
|
1061
|
+
},
|
|
1062
|
+
required: ["meta", "coop", "vars", "request", "user", "decision", "act_id", "transmitter", "program"],
|
|
1063
|
+
additionalProperties: true
|
|
1064
|
+
};
|
|
1065
|
+
const Template = {
|
|
1066
|
+
title: Cooperative$1.Registry.ReturnByAssetAct.title,
|
|
1067
|
+
description: Cooperative$1.Registry.ReturnByAssetAct.description,
|
|
1068
|
+
model: Schema,
|
|
1069
|
+
context: Cooperative$1.Registry.ReturnByAssetAct.context,
|
|
1070
|
+
translations: Cooperative$1.Registry.ReturnByAssetAct.translations
|
|
1071
|
+
};
|
|
1072
|
+
|
|
1073
|
+
const ReturnByAssetAct = {
|
|
928
1074
|
__proto__: null,
|
|
929
1075
|
Schema: Schema,
|
|
930
1076
|
Template: Template,
|
|
@@ -943,7 +1089,11 @@ const Registry = {
|
|
|
943
1089
|
599: ProjectFreeDecision,
|
|
944
1090
|
600: FreeDecision,
|
|
945
1091
|
700: AssetContributionStatement,
|
|
946
|
-
|
|
1092
|
+
701: AssetContributionDecision,
|
|
1093
|
+
702: AssetContributionAct,
|
|
1094
|
+
800: ReturnByAssetStatement,
|
|
1095
|
+
801: ReturnByAssetDecision,
|
|
1096
|
+
802: ReturnByAssetAct
|
|
947
1097
|
};
|
|
948
1098
|
|
|
949
1099
|
var __defProp$c = Object.defineProperty;
|
|
@@ -1564,7 +1714,7 @@ class PDFService {
|
|
|
1564
1714
|
|
|
1565
1715
|
const name = "@coopenomics/factory";
|
|
1566
1716
|
const type = "module";
|
|
1567
|
-
const version = "2.2.
|
|
1717
|
+
const version = "2.2.7";
|
|
1568
1718
|
const packageManager = "pnpm@9.0.6";
|
|
1569
1719
|
const description = "";
|
|
1570
1720
|
const author = "Alex Ant <chairman.voskhod@gmail.com>";
|
|
@@ -1613,7 +1763,7 @@ const dependencies = {
|
|
|
1613
1763
|
"ajv-formats": "^3.0.1",
|
|
1614
1764
|
"ajv-i18n": "^4.2.0",
|
|
1615
1765
|
axios: "^1.7.2",
|
|
1616
|
-
cooptypes: "2.2.
|
|
1766
|
+
cooptypes: "2.2.7",
|
|
1617
1767
|
dotenv: "^16.4.5",
|
|
1618
1768
|
"eosjs-ecc": "^4.0.7",
|
|
1619
1769
|
handlebars: "^4.7.8",
|
|
@@ -1655,7 +1805,7 @@ const pnpm = {
|
|
|
1655
1805
|
"vite@>=5.1.0 <=5.1.6": ">=5.1.7"
|
|
1656
1806
|
}
|
|
1657
1807
|
};
|
|
1658
|
-
const gitHead = "
|
|
1808
|
+
const gitHead = "3be56ba462561e4dd9e7225bb95b254b20f89042";
|
|
1659
1809
|
const packageJson = {
|
|
1660
1810
|
name: name,
|
|
1661
1811
|
type: type,
|
|
@@ -1760,6 +1910,24 @@ class DocFactory {
|
|
|
1760
1910
|
throw new Error("\u041F\u0435\u0440\u0435\u043C\u0435\u043D\u043D\u044B\u0435 \u043A\u043E\u043E\u043F\u0435\u0440\u0430\u0442\u0438\u0432\u0430 \u043D\u0435 \u043D\u0430\u0439\u0434\u0435\u043D\u044B");
|
|
1761
1911
|
return vars;
|
|
1762
1912
|
}
|
|
1913
|
+
async getRequest(_request_id, _block_num) {
|
|
1914
|
+
return {
|
|
1915
|
+
hash: "1234567890",
|
|
1916
|
+
title: "\u041C\u043E\u043B\u043E\u043A\u043E \u0411\u0443\u0440\u0451\u043D\u043A\u0430",
|
|
1917
|
+
unit_of_measurement: "\u043B\u0438\u0442\u0440\u044B",
|
|
1918
|
+
units: 100,
|
|
1919
|
+
unit_cost: "1000",
|
|
1920
|
+
total_cost: "100000",
|
|
1921
|
+
currency: "RUB",
|
|
1922
|
+
type: "receive",
|
|
1923
|
+
program_id: 1
|
|
1924
|
+
};
|
|
1925
|
+
}
|
|
1926
|
+
async getProgram(_program_id) {
|
|
1927
|
+
return {
|
|
1928
|
+
name: "\u0421\u041E\u0421\u0415\u0414\u0418"
|
|
1929
|
+
};
|
|
1930
|
+
}
|
|
1763
1931
|
async getDecision(coop, coopname, decision_id, created_at) {
|
|
1764
1932
|
const votes_for_actions = (await getFetch(`${getEnvVar("SIMPLE_EXPLORER_API")}/get-actions`, new URLSearchParams({
|
|
1765
1933
|
filter: JSON.stringify({
|
|
@@ -1874,6 +2042,20 @@ class DocFactory {
|
|
|
1874
2042
|
}
|
|
1875
2043
|
return "";
|
|
1876
2044
|
}
|
|
2045
|
+
getFirstLastMiddleName(data) {
|
|
2046
|
+
return {
|
|
2047
|
+
first_name: "first_name" in data ? data.first_name : "",
|
|
2048
|
+
last_name: "last_name" in data ? data.last_name : "",
|
|
2049
|
+
middle_name: "middle_name" in data ? data.middle_name : ""
|
|
2050
|
+
};
|
|
2051
|
+
}
|
|
2052
|
+
getCommonUser(data) {
|
|
2053
|
+
return {
|
|
2054
|
+
full_name_or_short_name: this.getFullParticipantName(data),
|
|
2055
|
+
// or_short_name
|
|
2056
|
+
birthdate_or_ogrn: "birthdate" in data ? data.birthdate : "details" in data ? data.details.ogrn : ""
|
|
2057
|
+
};
|
|
2058
|
+
}
|
|
1877
2059
|
async saveDraft(document) {
|
|
1878
2060
|
await this.storage.saveDraft(document);
|
|
1879
2061
|
}
|
|
@@ -1921,16 +2103,16 @@ class DocFactory {
|
|
|
1921
2103
|
}
|
|
1922
2104
|
}
|
|
1923
2105
|
|
|
1924
|
-
let Factory$
|
|
2106
|
+
let Factory$f = class Factory extends DocFactory {
|
|
1925
2107
|
constructor(storage) {
|
|
1926
2108
|
super(storage);
|
|
1927
2109
|
}
|
|
1928
2110
|
async generateDocument(data, options) {
|
|
1929
2111
|
let template;
|
|
1930
2112
|
if (process.env.SOURCE === "local") {
|
|
1931
|
-
template = Template$
|
|
2113
|
+
template = Template$f;
|
|
1932
2114
|
} else {
|
|
1933
|
-
template = await this.getTemplate(DraftContract.contractName.production, registry_id$
|
|
2115
|
+
template = await this.getTemplate(DraftContract.contractName.production, registry_id$f, data.block_num);
|
|
1934
2116
|
}
|
|
1935
2117
|
const meta = await super.getMeta({ title: template.title, ...data });
|
|
1936
2118
|
const coop = await super.getCooperative(data.coopname, data.block_num);
|
|
@@ -1948,16 +2130,16 @@ let Factory$b = class Factory extends DocFactory {
|
|
|
1948
2130
|
}
|
|
1949
2131
|
};
|
|
1950
2132
|
|
|
1951
|
-
let Factory$
|
|
2133
|
+
let Factory$e = class Factory extends DocFactory {
|
|
1952
2134
|
constructor(storage) {
|
|
1953
2135
|
super(storage);
|
|
1954
2136
|
}
|
|
1955
2137
|
async generateDocument(data, options) {
|
|
1956
2138
|
let template;
|
|
1957
2139
|
if (process.env.SOURCE === "local") {
|
|
1958
|
-
template = Template$
|
|
2140
|
+
template = Template$e;
|
|
1959
2141
|
} else {
|
|
1960
|
-
template = await this.getTemplate(DraftContract.contractName.production, registry_id$
|
|
2142
|
+
template = await this.getTemplate(DraftContract.contractName.production, registry_id$e, data.block_num);
|
|
1961
2143
|
}
|
|
1962
2144
|
const meta = await super.getMeta({ title: template.title, ...data });
|
|
1963
2145
|
const coop = await super.getCooperative(data.coopname, data.block_num);
|
|
@@ -1975,16 +2157,16 @@ let Factory$a = class Factory extends DocFactory {
|
|
|
1975
2157
|
}
|
|
1976
2158
|
};
|
|
1977
2159
|
|
|
1978
|
-
let Factory$
|
|
2160
|
+
let Factory$d = class Factory extends DocFactory {
|
|
1979
2161
|
constructor(storage) {
|
|
1980
2162
|
super(storage);
|
|
1981
2163
|
}
|
|
1982
2164
|
async generateDocument(data, options) {
|
|
1983
2165
|
let template;
|
|
1984
2166
|
if (process.env.SOURCE === "local") {
|
|
1985
|
-
template = Template$
|
|
2167
|
+
template = Template$d;
|
|
1986
2168
|
} else {
|
|
1987
|
-
template = await this.getTemplate(DraftContract.contractName.production, registry_id$
|
|
2169
|
+
template = await this.getTemplate(DraftContract.contractName.production, registry_id$d, data.block_num);
|
|
1988
2170
|
}
|
|
1989
2171
|
const meta = await super.getMeta({ title: template.title, ...data });
|
|
1990
2172
|
const coop = await super.getCooperative(data.coopname, data.block_num);
|
|
@@ -2002,16 +2184,16 @@ let Factory$9 = class Factory extends DocFactory {
|
|
|
2002
2184
|
}
|
|
2003
2185
|
};
|
|
2004
2186
|
|
|
2005
|
-
let Factory$
|
|
2187
|
+
let Factory$c = class Factory extends DocFactory {
|
|
2006
2188
|
constructor(storage) {
|
|
2007
2189
|
super(storage);
|
|
2008
2190
|
}
|
|
2009
2191
|
async generateDocument(data, options) {
|
|
2010
2192
|
let template;
|
|
2011
2193
|
if (process.env.SOURCE === "local") {
|
|
2012
|
-
template = Template$
|
|
2194
|
+
template = Template$c;
|
|
2013
2195
|
} else {
|
|
2014
|
-
template = await this.getTemplate(DraftContract.contractName.production, registry_id$
|
|
2196
|
+
template = await this.getTemplate(DraftContract.contractName.production, registry_id$c, data.block_num);
|
|
2015
2197
|
}
|
|
2016
2198
|
const meta = await super.getMeta({ title: template.title, ...data });
|
|
2017
2199
|
const coop = await super.getCooperative(data.coopname, data.block_num);
|
|
@@ -2033,16 +2215,16 @@ let Factory$8 = class Factory extends DocFactory {
|
|
|
2033
2215
|
}
|
|
2034
2216
|
};
|
|
2035
2217
|
|
|
2036
|
-
let Factory$
|
|
2218
|
+
let Factory$b = class Factory extends DocFactory {
|
|
2037
2219
|
constructor(storage) {
|
|
2038
2220
|
super(storage);
|
|
2039
2221
|
}
|
|
2040
2222
|
async generateDocument(data, options) {
|
|
2041
2223
|
let template;
|
|
2042
2224
|
if (process.env.SOURCE === "local") {
|
|
2043
|
-
template = Template$
|
|
2225
|
+
template = Template$b;
|
|
2044
2226
|
} else {
|
|
2045
|
-
template = await this.getTemplate(DraftContract.contractName.production, registry_id$
|
|
2227
|
+
template = await this.getTemplate(DraftContract.contractName.production, registry_id$b, data.block_num);
|
|
2046
2228
|
}
|
|
2047
2229
|
const meta = await super.getMeta({ title: template.title, ...data });
|
|
2048
2230
|
const coop = await super.getCooperative(data.coopname, data.block_num);
|
|
@@ -2062,16 +2244,16 @@ let Factory$7 = class Factory extends DocFactory {
|
|
|
2062
2244
|
}
|
|
2063
2245
|
};
|
|
2064
2246
|
|
|
2065
|
-
let Factory$
|
|
2247
|
+
let Factory$a = class Factory extends DocFactory {
|
|
2066
2248
|
constructor(storage) {
|
|
2067
2249
|
super(storage);
|
|
2068
2250
|
}
|
|
2069
2251
|
async generateDocument(data, _options) {
|
|
2070
2252
|
let template;
|
|
2071
2253
|
if (process.env.SOURCE === "local") {
|
|
2072
|
-
template = Template$
|
|
2254
|
+
template = Template$8;
|
|
2073
2255
|
} else {
|
|
2074
|
-
template = await this.getTemplate(DraftContract.contractName.production, registry_id$
|
|
2256
|
+
template = await this.getTemplate(DraftContract.contractName.production, registry_id$8, data.block_num);
|
|
2075
2257
|
}
|
|
2076
2258
|
const user = await super.getUser(data.username, data.block_num);
|
|
2077
2259
|
const userData = {
|
|
@@ -2093,16 +2275,16 @@ let Factory$6 = class Factory extends DocFactory {
|
|
|
2093
2275
|
}
|
|
2094
2276
|
};
|
|
2095
2277
|
|
|
2096
|
-
let Factory$
|
|
2278
|
+
let Factory$9 = class Factory extends DocFactory {
|
|
2097
2279
|
constructor(storage) {
|
|
2098
2280
|
super(storage);
|
|
2099
2281
|
}
|
|
2100
2282
|
async generateDocument(data, _options) {
|
|
2101
2283
|
let template;
|
|
2102
2284
|
if (process.env.SOURCE === "local") {
|
|
2103
|
-
template = Template$
|
|
2285
|
+
template = Template$a;
|
|
2104
2286
|
} else {
|
|
2105
|
-
template = await this.getTemplate(DraftContract.contractName.production, registry_id$
|
|
2287
|
+
template = await this.getTemplate(DraftContract.contractName.production, registry_id$a, data.block_num);
|
|
2106
2288
|
}
|
|
2107
2289
|
const user = await super.getUser(data.username, data.block_num);
|
|
2108
2290
|
let bank_account = {};
|
|
@@ -2152,16 +2334,16 @@ let Factory$5 = class Factory extends DocFactory {
|
|
|
2152
2334
|
}
|
|
2153
2335
|
};
|
|
2154
2336
|
|
|
2155
|
-
let Factory$
|
|
2337
|
+
let Factory$8 = class Factory extends DocFactory {
|
|
2156
2338
|
constructor(storage) {
|
|
2157
2339
|
super(storage);
|
|
2158
2340
|
}
|
|
2159
2341
|
async generateDocument(data, options) {
|
|
2160
2342
|
let template;
|
|
2161
2343
|
if (process.env.SOURCE === "local") {
|
|
2162
|
-
template = Template$
|
|
2344
|
+
template = Template$9;
|
|
2163
2345
|
} else {
|
|
2164
|
-
template = await this.getTemplate(DraftContract.contractName.production, registry_id$
|
|
2346
|
+
template = await this.getTemplate(DraftContract.contractName.production, registry_id$9, data.block_num);
|
|
2165
2347
|
}
|
|
2166
2348
|
const user = await super.getUser(data.username, data.block_num);
|
|
2167
2349
|
const userData = {
|
|
@@ -2201,16 +2383,16 @@ let Factory$4 = class Factory extends DocFactory {
|
|
|
2201
2383
|
}
|
|
2202
2384
|
};
|
|
2203
2385
|
|
|
2204
|
-
let Factory$
|
|
2386
|
+
let Factory$7 = class Factory extends DocFactory {
|
|
2205
2387
|
constructor(storage) {
|
|
2206
2388
|
super(storage);
|
|
2207
2389
|
}
|
|
2208
2390
|
async generateDocument(data, options) {
|
|
2209
2391
|
let template;
|
|
2210
2392
|
if (process.env.SOURCE === "local") {
|
|
2211
|
-
template = Template$
|
|
2393
|
+
template = Template$7;
|
|
2212
2394
|
} else {
|
|
2213
|
-
template = await this.getTemplate(DraftContract.contractName.production, registry_id$
|
|
2395
|
+
template = await this.getTemplate(DraftContract.contractName.production, registry_id$7, data.block_num);
|
|
2214
2396
|
}
|
|
2215
2397
|
const user = await this.getUser(data.username, data.block_num);
|
|
2216
2398
|
const suggester_name = await this.getFullName(user.data);
|
|
@@ -2246,16 +2428,16 @@ let Factory$3 = class Factory extends DocFactory {
|
|
|
2246
2428
|
}
|
|
2247
2429
|
};
|
|
2248
2430
|
|
|
2249
|
-
let Factory$
|
|
2431
|
+
let Factory$6 = class Factory extends DocFactory {
|
|
2250
2432
|
constructor(storage) {
|
|
2251
2433
|
super(storage);
|
|
2252
2434
|
}
|
|
2253
2435
|
async generateDocument(data, options) {
|
|
2254
2436
|
let template;
|
|
2255
2437
|
if (process.env.SOURCE === "local") {
|
|
2256
|
-
template = Template$
|
|
2438
|
+
template = Template$6;
|
|
2257
2439
|
} else {
|
|
2258
|
-
template = await this.getTemplate(DraftContract.contractName.production, registry_id$
|
|
2440
|
+
template = await this.getTemplate(DraftContract.contractName.production, registry_id$6, data.block_num);
|
|
2259
2441
|
}
|
|
2260
2442
|
const user = await this.getUser(data.username, data.block_num);
|
|
2261
2443
|
const userData = {
|
|
@@ -2298,35 +2480,174 @@ let Factory$2 = class Factory extends DocFactory {
|
|
|
2298
2480
|
}
|
|
2299
2481
|
};
|
|
2300
2482
|
|
|
2301
|
-
let Factory$
|
|
2483
|
+
let Factory$5 = class Factory extends DocFactory {
|
|
2302
2484
|
constructor(storage) {
|
|
2303
2485
|
super(storage);
|
|
2304
2486
|
}
|
|
2305
2487
|
async generateDocument(data, options) {
|
|
2306
2488
|
let template;
|
|
2307
2489
|
if (process.env.SOURCE === "local") {
|
|
2308
|
-
template = Template$
|
|
2490
|
+
template = Template$5;
|
|
2309
2491
|
} else {
|
|
2310
|
-
template = await this.getTemplate(DraftContract.contractName.production, registry_id$
|
|
2492
|
+
template = await this.getTemplate(DraftContract.contractName.production, registry_id$5, data.block_num);
|
|
2311
2493
|
}
|
|
2312
2494
|
const meta = await super.getMeta({ title: template.title, ...data });
|
|
2313
2495
|
const coop = await super.getCooperative(data.coopname, data.block_num);
|
|
2314
2496
|
const vars = await super.getVars(data.coopname, data.block_num);
|
|
2315
2497
|
const user = await super.getUser(data.username, data.block_num);
|
|
2316
2498
|
const request = data.request;
|
|
2317
|
-
const
|
|
2499
|
+
const commonUser = this.getCommonUser(user.data);
|
|
2318
2500
|
const combinedData = {
|
|
2319
2501
|
meta,
|
|
2320
2502
|
coop,
|
|
2321
2503
|
vars,
|
|
2322
|
-
user:
|
|
2323
|
-
full_name
|
|
2324
|
-
},
|
|
2504
|
+
user: commonUser,
|
|
2325
2505
|
request
|
|
2326
2506
|
};
|
|
2327
2507
|
await super.validate(combinedData, template.model);
|
|
2328
2508
|
const translation = template.translations[meta.lang];
|
|
2329
|
-
const document = await super.generatePDF(
|
|
2509
|
+
const document = await super.generatePDF(commonUser.full_name_or_short_name, template.context, combinedData, translation, meta, options?.skip_save);
|
|
2510
|
+
return document;
|
|
2511
|
+
}
|
|
2512
|
+
};
|
|
2513
|
+
|
|
2514
|
+
let Factory$4 = class Factory extends DocFactory {
|
|
2515
|
+
constructor(storage) {
|
|
2516
|
+
super(storage);
|
|
2517
|
+
}
|
|
2518
|
+
async generateDocument(data, options) {
|
|
2519
|
+
let template;
|
|
2520
|
+
if (process.env.SOURCE === "local") {
|
|
2521
|
+
template = Template$4;
|
|
2522
|
+
} else {
|
|
2523
|
+
template = await this.getTemplate(DraftContract.contractName.production, registry_id$4, data.block_num);
|
|
2524
|
+
}
|
|
2525
|
+
const meta = await this.getMeta({ title: template.title, ...data });
|
|
2526
|
+
const coop = await this.getCooperative(data.coopname, data.block_num);
|
|
2527
|
+
const vars = await this.getVars(data.coopname, data.block_num);
|
|
2528
|
+
const user = await this.getUser(data.username, data.block_num);
|
|
2529
|
+
const request = data.request;
|
|
2530
|
+
const commonUser = this.getCommonUser(user.data);
|
|
2531
|
+
const combinedData = {
|
|
2532
|
+
meta,
|
|
2533
|
+
coop,
|
|
2534
|
+
vars,
|
|
2535
|
+
user: commonUser,
|
|
2536
|
+
request
|
|
2537
|
+
};
|
|
2538
|
+
await this.validate(combinedData, template.model);
|
|
2539
|
+
const translation = template.translations[meta.lang];
|
|
2540
|
+
const document = await super.generatePDF(commonUser.full_name_or_short_name, template.context, combinedData, translation, meta, options?.skip_save);
|
|
2541
|
+
return document;
|
|
2542
|
+
}
|
|
2543
|
+
};
|
|
2544
|
+
|
|
2545
|
+
let Factory$3 = class Factory extends DocFactory {
|
|
2546
|
+
constructor(storage) {
|
|
2547
|
+
super(storage);
|
|
2548
|
+
}
|
|
2549
|
+
async generateDocument(data, options) {
|
|
2550
|
+
let template;
|
|
2551
|
+
if (process.env.SOURCE === "local") {
|
|
2552
|
+
template = Template$3;
|
|
2553
|
+
} else {
|
|
2554
|
+
template = await this.getTemplate(DraftContract.contractName.production, registry_id$3, data.block_num);
|
|
2555
|
+
}
|
|
2556
|
+
const meta = await this.getMeta({ title: template.title, ...data });
|
|
2557
|
+
const coop = await this.getCooperative(data.coopname, data.block_num);
|
|
2558
|
+
const vars = await this.getVars(data.coopname, data.block_num);
|
|
2559
|
+
const user = await this.getUser(data.username, data.block_num);
|
|
2560
|
+
const request = await this.getRequest(data.request_id, data.block_num);
|
|
2561
|
+
const decision = await this.getDecision(coop, data.coopname, data.decision_id, meta.created_at);
|
|
2562
|
+
const commonUser = this.getCommonUser(user.data);
|
|
2563
|
+
const combinedData = {
|
|
2564
|
+
meta,
|
|
2565
|
+
coop,
|
|
2566
|
+
vars,
|
|
2567
|
+
user: commonUser,
|
|
2568
|
+
request,
|
|
2569
|
+
decision
|
|
2570
|
+
};
|
|
2571
|
+
await this.validate(combinedData, template.model);
|
|
2572
|
+
const translation = template.translations[meta.lang];
|
|
2573
|
+
const document = await this.generatePDF(commonUser.full_name_or_short_name, template.context, combinedData, translation, meta, options?.skip_save);
|
|
2574
|
+
return document;
|
|
2575
|
+
}
|
|
2576
|
+
};
|
|
2577
|
+
|
|
2578
|
+
let Factory$2 = class Factory extends DocFactory {
|
|
2579
|
+
constructor(storage) {
|
|
2580
|
+
super(storage);
|
|
2581
|
+
}
|
|
2582
|
+
async generateDocument(data, options) {
|
|
2583
|
+
let template;
|
|
2584
|
+
if (process.env.SOURCE === "local") {
|
|
2585
|
+
template = Template$1;
|
|
2586
|
+
} else {
|
|
2587
|
+
template = await this.getTemplate(DraftContract.contractName.production, registry_id$1, data.block_num);
|
|
2588
|
+
}
|
|
2589
|
+
const meta = await this.getMeta({ title: template.title, ...data });
|
|
2590
|
+
const coop = await this.getCooperative(data.coopname, data.block_num);
|
|
2591
|
+
const vars = await this.getVars(data.coopname, data.block_num);
|
|
2592
|
+
const user = await this.getUser(data.username, data.block_num);
|
|
2593
|
+
const request = await this.getRequest(data.request_id, data.block_num);
|
|
2594
|
+
const decision = await this.getDecision(coop, data.coopname, data.decision_id, meta.created_at);
|
|
2595
|
+
const commonUser = this.getCommonUser(user.data);
|
|
2596
|
+
const receiver = await this.getUser(data.receiver, data.block_num);
|
|
2597
|
+
if (coop.is_branched && !data.braname)
|
|
2598
|
+
throw new Error("Branch name is required");
|
|
2599
|
+
let branch;
|
|
2600
|
+
if (data.braname)
|
|
2601
|
+
branch = await this.getOrganization(data.braname, data.block_num);
|
|
2602
|
+
const program = await this.getProgram(request.program_id);
|
|
2603
|
+
const combinedData = {
|
|
2604
|
+
meta,
|
|
2605
|
+
coop,
|
|
2606
|
+
vars,
|
|
2607
|
+
user: commonUser,
|
|
2608
|
+
request,
|
|
2609
|
+
decision,
|
|
2610
|
+
program,
|
|
2611
|
+
act_id: data.act_id,
|
|
2612
|
+
receiver: this.getFirstLastMiddleName(receiver.data),
|
|
2613
|
+
branch
|
|
2614
|
+
};
|
|
2615
|
+
await this.validate(combinedData, template.model);
|
|
2616
|
+
const translation = template.translations[meta.lang];
|
|
2617
|
+
const document = await this.generatePDF(commonUser.full_name_or_short_name, template.context, combinedData, translation, meta, options?.skip_save);
|
|
2618
|
+
return document;
|
|
2619
|
+
}
|
|
2620
|
+
};
|
|
2621
|
+
|
|
2622
|
+
let Factory$1 = class Factory extends DocFactory {
|
|
2623
|
+
constructor(storage) {
|
|
2624
|
+
super(storage);
|
|
2625
|
+
}
|
|
2626
|
+
async generateDocument(data, options) {
|
|
2627
|
+
let template;
|
|
2628
|
+
if (process.env.SOURCE === "local") {
|
|
2629
|
+
template = Template$2;
|
|
2630
|
+
} else {
|
|
2631
|
+
template = await this.getTemplate(DraftContract.contractName.production, registry_id$2, data.block_num);
|
|
2632
|
+
}
|
|
2633
|
+
const meta = await this.getMeta({ title: template.title, ...data });
|
|
2634
|
+
const coop = await this.getCooperative(data.coopname, data.block_num);
|
|
2635
|
+
const vars = await this.getVars(data.coopname, data.block_num);
|
|
2636
|
+
const user = await this.getUser(data.username, data.block_num);
|
|
2637
|
+
const request = await this.getRequest(data.request_id, data.block_num);
|
|
2638
|
+
const decision = await this.getDecision(coop, data.coopname, data.decision_id, meta.created_at);
|
|
2639
|
+
const commonUser = this.getCommonUser(user.data);
|
|
2640
|
+
const combinedData = {
|
|
2641
|
+
meta,
|
|
2642
|
+
coop,
|
|
2643
|
+
vars,
|
|
2644
|
+
user: commonUser,
|
|
2645
|
+
request,
|
|
2646
|
+
decision
|
|
2647
|
+
};
|
|
2648
|
+
await this.validate(combinedData, template.model);
|
|
2649
|
+
const translation = template.translations[meta.lang];
|
|
2650
|
+
const document = await this.generatePDF(commonUser.full_name_or_short_name, template.context, combinedData, translation, meta, options?.skip_save);
|
|
2330
2651
|
return document;
|
|
2331
2652
|
}
|
|
2332
2653
|
};
|
|
@@ -2346,20 +2667,31 @@ class Factory extends DocFactory {
|
|
|
2346
2667
|
const coop = await this.getCooperative(data.coopname, data.block_num);
|
|
2347
2668
|
const vars = await this.getVars(data.coopname, data.block_num);
|
|
2348
2669
|
const user = await this.getUser(data.username, data.block_num);
|
|
2349
|
-
const request = data.
|
|
2350
|
-
const
|
|
2670
|
+
const request = await this.getRequest(data.request_id, data.block_num);
|
|
2671
|
+
const decision = await this.getDecision(coop, data.coopname, data.decision_id, meta.created_at);
|
|
2672
|
+
const commonUser = this.getCommonUser(user.data);
|
|
2673
|
+
const transmitter = await this.getUser(data.transmitter, data.block_num);
|
|
2674
|
+
if (coop.is_branched && !data.braname)
|
|
2675
|
+
throw new Error("Branch name is required");
|
|
2676
|
+
let branch;
|
|
2677
|
+
if (data.braname)
|
|
2678
|
+
branch = await this.getOrganization(data.braname, data.block_num);
|
|
2679
|
+
const program = await this.getProgram(request.program_id);
|
|
2351
2680
|
const combinedData = {
|
|
2352
2681
|
meta,
|
|
2353
2682
|
coop,
|
|
2354
2683
|
vars,
|
|
2355
|
-
user:
|
|
2356
|
-
|
|
2357
|
-
|
|
2358
|
-
|
|
2684
|
+
user: commonUser,
|
|
2685
|
+
request,
|
|
2686
|
+
decision,
|
|
2687
|
+
program,
|
|
2688
|
+
act_id: data.act_id,
|
|
2689
|
+
transmitter: this.getFirstLastMiddleName(transmitter.data),
|
|
2690
|
+
branch
|
|
2359
2691
|
};
|
|
2360
2692
|
await this.validate(combinedData, template.model);
|
|
2361
2693
|
const translation = template.translations[meta.lang];
|
|
2362
|
-
const document = await
|
|
2694
|
+
const document = await this.generatePDF(commonUser.full_name_or_short_name, template.context, combinedData, translation, meta, options?.skip_save);
|
|
2363
2695
|
return document;
|
|
2364
2696
|
}
|
|
2365
2697
|
}
|
|
@@ -2426,30 +2758,38 @@ class Generator {
|
|
|
2426
2758
|
async connect(mongoUri) {
|
|
2427
2759
|
this.storage = new MongoDBConnector(mongoUri);
|
|
2428
2760
|
this.factories = {
|
|
2429
|
-
[registry_id$
|
|
2761
|
+
[registry_id$f]: new Factory$f(this.storage),
|
|
2430
2762
|
// 1
|
|
2431
|
-
[registry_id$
|
|
2763
|
+
[registry_id$e]: new Factory$e(this.storage),
|
|
2432
2764
|
// 2
|
|
2433
|
-
[registry_id$
|
|
2765
|
+
[registry_id$d]: new Factory$d(this.storage),
|
|
2434
2766
|
// 3
|
|
2435
|
-
[registry_id$
|
|
2767
|
+
[registry_id$c]: new Factory$c(this.storage),
|
|
2436
2768
|
// 4
|
|
2437
|
-
[registry_id$
|
|
2769
|
+
[registry_id$b]: new Factory$b(this.storage),
|
|
2438
2770
|
// 50
|
|
2439
|
-
[registry_id$
|
|
2771
|
+
[registry_id$a]: new Factory$9(this.storage),
|
|
2440
2772
|
// 100
|
|
2441
|
-
[registry_id$
|
|
2773
|
+
[registry_id$8]: new Factory$a(this.storage),
|
|
2442
2774
|
// 101
|
|
2443
|
-
[registry_id$
|
|
2775
|
+
[registry_id$9]: new Factory$8(this.storage),
|
|
2444
2776
|
// 501
|
|
2445
|
-
[registry_id$
|
|
2777
|
+
[registry_id$7]: new Factory$7(this.storage),
|
|
2446
2778
|
// 599
|
|
2447
|
-
[registry_id$
|
|
2779
|
+
[registry_id$6]: new Factory$6(this.storage),
|
|
2448
2780
|
// 600
|
|
2449
|
-
[registry_id$
|
|
2781
|
+
[registry_id$5]: new Factory$5(this.storage),
|
|
2450
2782
|
// 700
|
|
2451
|
-
[registry_id]: new Factory(this.storage)
|
|
2783
|
+
[registry_id$4]: new Factory$4(this.storage),
|
|
2452
2784
|
// 800
|
|
2785
|
+
[registry_id$2]: new Factory$1(this.storage),
|
|
2786
|
+
// 801
|
|
2787
|
+
[registry_id]: new Factory(this.storage),
|
|
2788
|
+
// 802
|
|
2789
|
+
[registry_id$3]: new Factory$3(this.storage),
|
|
2790
|
+
// 701
|
|
2791
|
+
[registry_id$1]: new Factory$2(this.storage)
|
|
2792
|
+
// 702
|
|
2453
2793
|
};
|
|
2454
2794
|
await this.storage.connect();
|
|
2455
2795
|
}
|
|
@@ -2514,4 +2854,4 @@ class Generator {
|
|
|
2514
2854
|
}
|
|
2515
2855
|
}
|
|
2516
2856
|
|
|
2517
|
-
export { AssetContributionStatement, BankAccountSchema, CoopenomicsAgreement, CooperativeSchema, DecisionOfParticipantApplication, FreeDecision, Generator, ParticipantApplication, PrivacyPolicy, ProjectFreeDecision, Registry, RegulationElectronicSignaturet as RegulationElectronicSignature, ReturnByAssetStatement, SelectBranchStatement, UserAgreement, VarsSchema, WalletAgreement, decisionSchema, entrepreneurSchema, individualSchema, organizationSchema, paymentMethodSchema };
|
|
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 };
|