@coopenomics/factory 2025.6.24 → 2025.7.1

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 CHANGED
@@ -657,8 +657,8 @@ const AgendaQuestionSchema = {
657
657
  additionalProperties: true
658
658
  };
659
659
 
660
- const registry_id$q = cooptypes.Cooperative.Registry.WalletAgreement.registry_id;
661
- const Schema$q = {
660
+ const registry_id$s = cooptypes.Cooperative.Registry.WalletAgreement.registry_id;
661
+ const Schema$s = {
662
662
  type: "object",
663
663
  properties: {
664
664
  meta: IMetaJSONSchema,
@@ -668,23 +668,23 @@ const Schema$q = {
668
668
  required: ["meta", "coop", "vars"],
669
669
  additionalProperties: true
670
670
  };
671
- const Template$q = {
671
+ const Template$s = {
672
672
  title: cooptypes.Cooperative.Registry.WalletAgreement.title,
673
673
  description: cooptypes.Cooperative.Registry.WalletAgreement.description,
674
- model: Schema$q,
674
+ model: Schema$s,
675
675
  context: cooptypes.Cooperative.Registry.WalletAgreement.context,
676
676
  translations: cooptypes.Cooperative.Registry.WalletAgreement.translations
677
677
  };
678
678
 
679
679
  const WalletAgreement = {
680
680
  __proto__: null,
681
- Schema: Schema$q,
682
- Template: Template$q,
683
- registry_id: registry_id$q
681
+ Schema: Schema$s,
682
+ Template: Template$s,
683
+ registry_id: registry_id$s
684
684
  };
685
685
 
686
- const registry_id$p = cooptypes.Cooperative.Registry.RegulationElectronicSignature.registry_id;
687
- const Schema$p = {
686
+ const registry_id$r = cooptypes.Cooperative.Registry.RegulationElectronicSignature.registry_id;
687
+ const Schema$r = {
688
688
  type: "object",
689
689
  properties: {
690
690
  meta: IMetaJSONSchema,
@@ -694,23 +694,23 @@ const Schema$p = {
694
694
  required: ["meta", "coop", "vars"],
695
695
  additionalProperties: true
696
696
  };
697
- const Template$p = {
697
+ const Template$r = {
698
698
  title: cooptypes.Cooperative.Registry.RegulationElectronicSignature.title,
699
699
  description: cooptypes.Cooperative.Registry.RegulationElectronicSignature.description,
700
- model: Schema$p,
700
+ model: Schema$r,
701
701
  context: cooptypes.Cooperative.Registry.RegulationElectronicSignature.context,
702
702
  translations: cooptypes.Cooperative.Registry.RegulationElectronicSignature.translations
703
703
  };
704
704
 
705
705
  const RegulationElectronicSignaturet = {
706
706
  __proto__: null,
707
- Schema: Schema$p,
708
- Template: Template$p,
709
- registry_id: registry_id$p
707
+ Schema: Schema$r,
708
+ Template: Template$r,
709
+ registry_id: registry_id$r
710
710
  };
711
711
 
712
- const registry_id$o = cooptypes.Cooperative.Registry.PrivacyPolicy.registry_id;
713
- const Schema$o = {
712
+ const registry_id$q = cooptypes.Cooperative.Registry.PrivacyPolicy.registry_id;
713
+ const Schema$q = {
714
714
  type: "object",
715
715
  properties: {
716
716
  meta: IMetaJSONSchema,
@@ -720,23 +720,23 @@ const Schema$o = {
720
720
  required: ["meta", "coop", "vars"],
721
721
  additionalProperties: true
722
722
  };
723
- const Template$o = {
723
+ const Template$q = {
724
724
  title: cooptypes.Cooperative.Registry.PrivacyPolicy.title,
725
725
  description: cooptypes.Cooperative.Registry.PrivacyPolicy.description,
726
- model: Schema$o,
726
+ model: Schema$q,
727
727
  context: cooptypes.Cooperative.Registry.PrivacyPolicy.context,
728
728
  translations: cooptypes.Cooperative.Registry.PrivacyPolicy.translations
729
729
  };
730
730
 
731
731
  const PrivacyPolicy = {
732
732
  __proto__: null,
733
- Schema: Schema$o,
734
- Template: Template$o,
735
- registry_id: registry_id$o
733
+ Schema: Schema$q,
734
+ Template: Template$q,
735
+ registry_id: registry_id$q
736
736
  };
737
737
 
738
- const registry_id$n = cooptypes.Cooperative.Registry.UserAgreement.registry_id;
739
- const Schema$n = {
738
+ const registry_id$p = cooptypes.Cooperative.Registry.UserAgreement.registry_id;
739
+ const Schema$p = {
740
740
  type: "object",
741
741
  properties: {
742
742
  meta: IMetaJSONSchema,
@@ -753,23 +753,23 @@ const Schema$n = {
753
753
  required: ["meta", "coop", "vars", "user"],
754
754
  additionalProperties: true
755
755
  };
756
- const Template$n = {
756
+ const Template$p = {
757
757
  title: cooptypes.Cooperative.Registry.UserAgreement.title,
758
758
  description: cooptypes.Cooperative.Registry.UserAgreement.description,
759
- model: Schema$n,
759
+ model: Schema$p,
760
760
  context: cooptypes.Cooperative.Registry.UserAgreement.context,
761
761
  translations: cooptypes.Cooperative.Registry.UserAgreement.translations
762
762
  };
763
763
 
764
764
  const UserAgreement = {
765
765
  __proto__: null,
766
- Schema: Schema$n,
767
- Template: Template$n,
768
- registry_id: registry_id$n
766
+ Schema: Schema$p,
767
+ Template: Template$p,
768
+ registry_id: registry_id$p
769
769
  };
770
770
 
771
- const registry_id$m = cooptypes.Cooperative.Registry.CoopenomicsAgreement.registry_id;
772
- const Schema$m = {
771
+ const registry_id$o = cooptypes.Cooperative.Registry.CoopenomicsAgreement.registry_id;
772
+ const Schema$o = {
773
773
  type: "object",
774
774
  properties: {
775
775
  meta: IMetaJSONSchema,
@@ -780,23 +780,23 @@ const Schema$m = {
780
780
  required: ["meta", "coop", "vars", "partner"],
781
781
  additionalProperties: true
782
782
  };
783
- const Template$m = {
783
+ const Template$o = {
784
784
  title: cooptypes.Cooperative.Registry.CoopenomicsAgreement.title,
785
785
  description: cooptypes.Cooperative.Registry.CoopenomicsAgreement.description,
786
- model: Schema$m,
786
+ model: Schema$o,
787
787
  context: cooptypes.Cooperative.Registry.CoopenomicsAgreement.context,
788
788
  translations: cooptypes.Cooperative.Registry.CoopenomicsAgreement.translations
789
789
  };
790
790
 
791
791
  const CoopenomicsAgreement = {
792
792
  __proto__: null,
793
- Schema: Schema$m,
794
- Template: Template$m,
795
- registry_id: registry_id$m
793
+ Schema: Schema$o,
794
+ Template: Template$o,
795
+ registry_id: registry_id$o
796
796
  };
797
797
 
798
- const registry_id$l = cooptypes.Cooperative.Registry.ParticipantApplication.registry_id;
799
- const Schema$l = {
798
+ const registry_id$n = cooptypes.Cooperative.Registry.ParticipantApplication.registry_id;
799
+ const Schema$n = {
800
800
  type: "object",
801
801
  properties: {
802
802
  type: {
@@ -885,23 +885,23 @@ const Schema$l = {
885
885
  required: ["meta", "coop", "type"],
886
886
  additionalProperties: true
887
887
  };
888
- const Template$l = {
888
+ const Template$n = {
889
889
  title: cooptypes.Cooperative.Registry.ParticipantApplication.title,
890
890
  description: cooptypes.Cooperative.Registry.ParticipantApplication.description,
891
- model: Schema$l,
891
+ model: Schema$n,
892
892
  context: cooptypes.Cooperative.Registry.ParticipantApplication.context,
893
893
  translations: cooptypes.Cooperative.Registry.ParticipantApplication.translations
894
894
  };
895
895
 
896
896
  const ParticipantApplication = {
897
897
  __proto__: null,
898
- Schema: Schema$l,
899
- Template: Template$l,
900
- registry_id: registry_id$l
898
+ Schema: Schema$n,
899
+ Template: Template$n,
900
+ registry_id: registry_id$n
901
901
  };
902
902
 
903
- const registry_id$k = cooptypes.Cooperative.Registry.DecisionOfParticipantApplication.registry_id;
904
- const Schema$k = {
903
+ const registry_id$m = cooptypes.Cooperative.Registry.DecisionOfParticipantApplication.registry_id;
904
+ const Schema$m = {
905
905
  type: "object",
906
906
  properties: {
907
907
  type: {
@@ -965,23 +965,23 @@ const Schema$k = {
965
965
  // vars не добавляем в обязательные параметры для обратной совместимости (начиная с 2.26)
966
966
  additionalProperties: true
967
967
  };
968
- const Template$k = {
968
+ const Template$m = {
969
969
  title: cooptypes.Cooperative.Registry.DecisionOfParticipantApplication.title,
970
970
  description: cooptypes.Cooperative.Registry.DecisionOfParticipantApplication.description,
971
- model: Schema$k,
971
+ model: Schema$m,
972
972
  context: cooptypes.Cooperative.Registry.DecisionOfParticipantApplication.context,
973
973
  translations: cooptypes.Cooperative.Registry.DecisionOfParticipantApplication.translations
974
974
  };
975
975
 
976
976
  const DecisionOfParticipantApplication = {
977
977
  __proto__: null,
978
- Schema: Schema$k,
979
- Template: Template$k,
980
- registry_id: registry_id$k
978
+ Schema: Schema$m,
979
+ Template: Template$m,
980
+ registry_id: registry_id$m
981
981
  };
982
982
 
983
- const registry_id$j = cooptypes.Cooperative.Registry.SelectBranchStatement.registry_id;
984
- const Schema$j = {
983
+ const registry_id$l = cooptypes.Cooperative.Registry.SelectBranchStatement.registry_id;
984
+ const Schema$l = {
985
985
  type: "object",
986
986
  properties: {
987
987
  type: {
@@ -1044,23 +1044,23 @@ const Schema$j = {
1044
1044
  required: ["meta", "type", "branch", "vars", "coop"],
1045
1045
  additionalProperties: true
1046
1046
  };
1047
- const Template$j = {
1047
+ const Template$l = {
1048
1048
  title: cooptypes.Cooperative.Registry.SelectBranchStatement.title,
1049
1049
  description: cooptypes.Cooperative.Registry.SelectBranchStatement.description,
1050
- model: Schema$j,
1050
+ model: Schema$l,
1051
1051
  context: cooptypes.Cooperative.Registry.SelectBranchStatement.context,
1052
1052
  translations: cooptypes.Cooperative.Registry.SelectBranchStatement.translations
1053
1053
  };
1054
1054
 
1055
1055
  const SelectBranchStatement = {
1056
1056
  __proto__: null,
1057
- Schema: Schema$j,
1058
- Template: Template$j,
1059
- registry_id: registry_id$j
1057
+ Schema: Schema$l,
1058
+ Template: Template$l,
1059
+ registry_id: registry_id$l
1060
1060
  };
1061
1061
 
1062
- const registry_id$i = cooptypes.Cooperative.Registry.ProjectFreeDecision.registry_id;
1063
- const Schema$i = {
1062
+ const registry_id$k = cooptypes.Cooperative.Registry.ProjectFreeDecision.registry_id;
1063
+ const Schema$k = {
1064
1064
  type: "object",
1065
1065
  properties: {
1066
1066
  coop: {
@@ -1095,23 +1095,23 @@ const Schema$i = {
1095
1095
  required: ["meta", "coop", "project", "suggester_name", "vars"],
1096
1096
  additionalProperties: true
1097
1097
  };
1098
- const Template$i = {
1098
+ const Template$k = {
1099
1099
  title: cooptypes.Cooperative.Registry.ProjectFreeDecision.title,
1100
1100
  description: cooptypes.Cooperative.Registry.ProjectFreeDecision.description,
1101
- model: Schema$i,
1101
+ model: Schema$k,
1102
1102
  context: cooptypes.Cooperative.Registry.ProjectFreeDecision.context,
1103
1103
  translations: cooptypes.Cooperative.Registry.ProjectFreeDecision.translations
1104
1104
  };
1105
1105
 
1106
1106
  const ProjectFreeDecision = {
1107
1107
  __proto__: null,
1108
- Schema: Schema$i,
1109
- Template: Template$i,
1110
- registry_id: registry_id$i
1108
+ Schema: Schema$k,
1109
+ Template: Template$k,
1110
+ registry_id: registry_id$k
1111
1111
  };
1112
1112
 
1113
- const registry_id$h = cooptypes.Cooperative.Registry.FreeDecision.registry_id;
1114
- const Schema$h = {
1113
+ const registry_id$j = cooptypes.Cooperative.Registry.FreeDecision.registry_id;
1114
+ const Schema$j = {
1115
1115
  type: "object",
1116
1116
  properties: {
1117
1117
  coop: {
@@ -1154,19 +1154,19 @@ const Schema$h = {
1154
1154
  // vars не вносим для обратной совместимости начиная с версии 2.25
1155
1155
  additionalProperties: true
1156
1156
  };
1157
- const Template$h = {
1157
+ const Template$j = {
1158
1158
  title: cooptypes.Cooperative.Registry.FreeDecision.title,
1159
1159
  description: cooptypes.Cooperative.Registry.FreeDecision.description,
1160
- model: Schema$h,
1160
+ model: Schema$j,
1161
1161
  context: cooptypes.Cooperative.Registry.FreeDecision.context,
1162
1162
  translations: cooptypes.Cooperative.Registry.FreeDecision.translations
1163
1163
  };
1164
1164
 
1165
1165
  const FreeDecision = {
1166
1166
  __proto__: null,
1167
- Schema: Schema$h,
1168
- Template: Template$h,
1169
- registry_id: registry_id$h
1167
+ Schema: Schema$j,
1168
+ Template: Template$j,
1169
+ registry_id: registry_id$j
1170
1170
  };
1171
1171
 
1172
1172
  const CommonRequestSchema = {
@@ -1196,8 +1196,8 @@ const CommonRequestSchema = {
1196
1196
  additionalProperties: true
1197
1197
  };
1198
1198
 
1199
- const registry_id$g = cooptypes.Cooperative.Registry.AssetContributionStatement.registry_id;
1200
- const Schema$g = {
1199
+ const registry_id$i = cooptypes.Cooperative.Registry.AssetContributionStatement.registry_id;
1200
+ const Schema$i = {
1201
1201
  type: "object",
1202
1202
  properties: {
1203
1203
  meta: IMetaJSONSchema,
@@ -1209,23 +1209,23 @@ const Schema$g = {
1209
1209
  required: ["meta", "coop", "vars", "request", "user"],
1210
1210
  additionalProperties: true
1211
1211
  };
1212
- const Template$g = {
1212
+ const Template$i = {
1213
1213
  title: cooptypes.Cooperative.Registry.AssetContributionStatement.title,
1214
1214
  description: cooptypes.Cooperative.Registry.AssetContributionStatement.description,
1215
- model: Schema$g,
1215
+ model: Schema$i,
1216
1216
  context: cooptypes.Cooperative.Registry.AssetContributionStatement.context,
1217
1217
  translations: cooptypes.Cooperative.Registry.AssetContributionStatement.translations
1218
1218
  };
1219
1219
 
1220
1220
  const AssetContributionStatement = {
1221
1221
  __proto__: null,
1222
- Schema: Schema$g,
1223
- Template: Template$g,
1224
- registry_id: registry_id$g
1222
+ Schema: Schema$i,
1223
+ Template: Template$i,
1224
+ registry_id: registry_id$i
1225
1225
  };
1226
1226
 
1227
- const registry_id$f = cooptypes.Cooperative.Registry.ReturnByAssetStatement.registry_id;
1228
- const Schema$f = {
1227
+ const registry_id$h = cooptypes.Cooperative.Registry.ReturnByAssetStatement.registry_id;
1228
+ const Schema$h = {
1229
1229
  type: "object",
1230
1230
  properties: {
1231
1231
  meta: IMetaJSONSchema,
@@ -1237,23 +1237,23 @@ const Schema$f = {
1237
1237
  required: ["meta", "coop", "vars", "request", "user"],
1238
1238
  additionalProperties: true
1239
1239
  };
1240
- const Template$f = {
1240
+ const Template$h = {
1241
1241
  title: cooptypes.Cooperative.Registry.ReturnByAssetStatement.title,
1242
1242
  description: cooptypes.Cooperative.Registry.ReturnByAssetStatement.description,
1243
- model: Schema$f,
1243
+ model: Schema$h,
1244
1244
  context: cooptypes.Cooperative.Registry.ReturnByAssetStatement.context,
1245
1245
  translations: cooptypes.Cooperative.Registry.ReturnByAssetStatement.translations
1246
1246
  };
1247
1247
 
1248
1248
  const ReturnByAssetStatement = {
1249
1249
  __proto__: null,
1250
- Schema: Schema$f,
1251
- Template: Template$f,
1252
- registry_id: registry_id$f
1250
+ Schema: Schema$h,
1251
+ Template: Template$h,
1252
+ registry_id: registry_id$h
1253
1253
  };
1254
1254
 
1255
- const registry_id$e = cooptypes.Cooperative.Registry.AssetContributionDecision.registry_id;
1256
- const Schema$e = {
1255
+ const registry_id$g = cooptypes.Cooperative.Registry.AssetContributionDecision.registry_id;
1256
+ const Schema$g = {
1257
1257
  type: "object",
1258
1258
  properties: {
1259
1259
  meta: IMetaJSONSchema,
@@ -1266,23 +1266,23 @@ const Schema$e = {
1266
1266
  required: ["meta", "coop", "vars", "request", "user", "decision"],
1267
1267
  additionalProperties: true
1268
1268
  };
1269
- const Template$e = {
1269
+ const Template$g = {
1270
1270
  title: cooptypes.Cooperative.Registry.AssetContributionDecision.title,
1271
1271
  description: cooptypes.Cooperative.Registry.AssetContributionDecision.description,
1272
- model: Schema$e,
1272
+ model: Schema$g,
1273
1273
  context: cooptypes.Cooperative.Registry.AssetContributionDecision.context,
1274
1274
  translations: cooptypes.Cooperative.Registry.AssetContributionDecision.translations
1275
1275
  };
1276
1276
 
1277
1277
  const AssetContributionDecision = {
1278
1278
  __proto__: null,
1279
- Schema: Schema$e,
1280
- Template: Template$e,
1281
- registry_id: registry_id$e
1279
+ Schema: Schema$g,
1280
+ Template: Template$g,
1281
+ registry_id: registry_id$g
1282
1282
  };
1283
1283
 
1284
- const registry_id$d = cooptypes.Cooperative.Registry.ReturnByAssetDecision.registry_id;
1285
- const Schema$d = {
1284
+ const registry_id$f = cooptypes.Cooperative.Registry.ReturnByAssetDecision.registry_id;
1285
+ const Schema$f = {
1286
1286
  type: "object",
1287
1287
  properties: {
1288
1288
  meta: IMetaJSONSchema,
@@ -1295,19 +1295,19 @@ const Schema$d = {
1295
1295
  required: ["meta", "coop", "vars", "request", "user", "decision"],
1296
1296
  additionalProperties: true
1297
1297
  };
1298
- const Template$d = {
1298
+ const Template$f = {
1299
1299
  title: cooptypes.Cooperative.Registry.ReturnByAssetDecision.title,
1300
1300
  description: cooptypes.Cooperative.Registry.ReturnByAssetDecision.description,
1301
- model: Schema$d,
1301
+ model: Schema$f,
1302
1302
  context: cooptypes.Cooperative.Registry.ReturnByAssetDecision.context,
1303
1303
  translations: cooptypes.Cooperative.Registry.ReturnByAssetDecision.translations
1304
1304
  };
1305
1305
 
1306
1306
  const ReturnByAssetDecision = {
1307
1307
  __proto__: null,
1308
- Schema: Schema$d,
1309
- Template: Template$d,
1310
- registry_id: registry_id$d
1308
+ Schema: Schema$f,
1309
+ Template: Template$f,
1310
+ registry_id: registry_id$f
1311
1311
  };
1312
1312
 
1313
1313
  const FirstLastMiddleNameSchema = {
@@ -1330,8 +1330,8 @@ const CommonProgramSchema = {
1330
1330
  additionalProperties: true
1331
1331
  };
1332
1332
 
1333
- const registry_id$c = cooptypes.Cooperative.Registry.AssetContributionAct.registry_id;
1334
- const Schema$c = {
1333
+ const registry_id$e = cooptypes.Cooperative.Registry.AssetContributionAct.registry_id;
1334
+ const Schema$e = {
1335
1335
  type: "object",
1336
1336
  properties: {
1337
1337
  meta: IMetaJSONSchema,
@@ -1348,23 +1348,23 @@ const Schema$c = {
1348
1348
  required: ["meta", "coop", "vars", "request", "user", "decision", "act_id", "receiver", "program"],
1349
1349
  additionalProperties: true
1350
1350
  };
1351
- const Template$c = {
1351
+ const Template$e = {
1352
1352
  title: cooptypes.Cooperative.Registry.AssetContributionAct.title,
1353
1353
  description: cooptypes.Cooperative.Registry.AssetContributionAct.description,
1354
- model: Schema$c,
1354
+ model: Schema$e,
1355
1355
  context: cooptypes.Cooperative.Registry.AssetContributionAct.context,
1356
1356
  translations: cooptypes.Cooperative.Registry.AssetContributionAct.translations
1357
1357
  };
1358
1358
 
1359
1359
  const AssetContributionAct = {
1360
1360
  __proto__: null,
1361
- Schema: Schema$c,
1362
- Template: Template$c,
1363
- registry_id: registry_id$c
1361
+ Schema: Schema$e,
1362
+ Template: Template$e,
1363
+ registry_id: registry_id$e
1364
1364
  };
1365
1365
 
1366
- const registry_id$b = cooptypes.Cooperative.Registry.ReturnByAssetAct.registry_id;
1367
- const Schema$b = {
1366
+ const registry_id$d = cooptypes.Cooperative.Registry.ReturnByAssetAct.registry_id;
1367
+ const Schema$d = {
1368
1368
  type: "object",
1369
1369
  properties: {
1370
1370
  meta: IMetaJSONSchema,
@@ -1381,15 +1381,97 @@ const Schema$b = {
1381
1381
  required: ["meta", "coop", "vars", "request", "user", "decision", "act_id", "transmitter", "program"],
1382
1382
  additionalProperties: true
1383
1383
  };
1384
- const Template$b = {
1384
+ const Template$d = {
1385
1385
  title: cooptypes.Cooperative.Registry.ReturnByAssetAct.title,
1386
1386
  description: cooptypes.Cooperative.Registry.ReturnByAssetAct.description,
1387
- model: Schema$b,
1387
+ model: Schema$d,
1388
1388
  context: cooptypes.Cooperative.Registry.ReturnByAssetAct.context,
1389
1389
  translations: cooptypes.Cooperative.Registry.ReturnByAssetAct.translations
1390
1390
  };
1391
1391
 
1392
1392
  const ReturnByAssetAct = {
1393
+ __proto__: null,
1394
+ Schema: Schema$d,
1395
+ Template: Template$d,
1396
+ registry_id: registry_id$d
1397
+ };
1398
+
1399
+ const registry_id$c = cooptypes.Cooperative.Registry.ReturnByMoney.registry_id;
1400
+ const Schema$c = {
1401
+ type: "object",
1402
+ properties: {
1403
+ meta: IMetaJSONSchema,
1404
+ coop: CooperativeSchema,
1405
+ vars: VarsSchema,
1406
+ user: CommonUserSchema,
1407
+ payment_details: { type: "string" },
1408
+ quantity: { type: "string" },
1409
+ currency: { type: "string" },
1410
+ payment_hash: { type: "string" }
1411
+ },
1412
+ required: ["meta", "coop", "vars", "user", "payment_details", "quantity", "currency", "payment_hash"],
1413
+ additionalProperties: false
1414
+ };
1415
+ const Template$c = {
1416
+ title: cooptypes.Cooperative.Registry.ReturnByMoney.title,
1417
+ description: cooptypes.Cooperative.Registry.ReturnByMoney.description,
1418
+ model: Schema$c,
1419
+ context: cooptypes.Cooperative.Registry.ReturnByMoney.context,
1420
+ translations: cooptypes.Cooperative.Registry.ReturnByMoney.translations
1421
+ };
1422
+
1423
+ const ReturnByMoney = {
1424
+ __proto__: null,
1425
+ Schema: Schema$c,
1426
+ Template: Template$c,
1427
+ registry_id: registry_id$c
1428
+ };
1429
+
1430
+ const registry_id$b = cooptypes.Cooperative.Registry.ReturnByMoneyDecision.registry_id;
1431
+ const Schema$b = {
1432
+ type: "object",
1433
+ properties: {
1434
+ meta: {
1435
+ type: "object",
1436
+ properties: {
1437
+ ...IMetaJSONSchema.properties
1438
+ },
1439
+ required: [...IMetaJSONSchema.required],
1440
+ additionalProperties: true
1441
+ },
1442
+ coop: {
1443
+ type: "object",
1444
+ properties: {
1445
+ ...CooperativeSchema.properties
1446
+ },
1447
+ required: [...CooperativeSchema.required],
1448
+ additionalProperties: true
1449
+ },
1450
+ decision: {
1451
+ type: "object",
1452
+ properties: {
1453
+ ...decisionSchema.properties
1454
+ },
1455
+ required: [...decisionSchema.required],
1456
+ additionalProperties: true
1457
+ },
1458
+ user: CommonUserSchema,
1459
+ quantity: { type: "string" },
1460
+ currency: { type: "string" },
1461
+ vars: VarsSchema
1462
+ },
1463
+ required: ["meta", "coop", "decision", "user", "quantity", "currency", "vars"],
1464
+ additionalProperties: false
1465
+ };
1466
+ const Template$b = {
1467
+ title: cooptypes.Cooperative.Registry.ReturnByMoneyDecision.title,
1468
+ description: cooptypes.Cooperative.Registry.ReturnByMoneyDecision.description,
1469
+ model: Schema$b,
1470
+ context: cooptypes.Cooperative.Registry.ReturnByMoneyDecision.context,
1471
+ translations: cooptypes.Cooperative.Registry.ReturnByMoneyDecision.translations
1472
+ };
1473
+
1474
+ const ReturnByMoneyDecision = {
1393
1475
  __proto__: null,
1394
1476
  Schema: Schema$b,
1395
1477
  Template: Template$b,
@@ -1892,6 +1974,8 @@ const Registry = {
1892
1974
  800: ReturnByAssetStatement,
1893
1975
  801: ReturnByAssetDecision,
1894
1976
  802: ReturnByAssetAct,
1977
+ 900: ReturnByMoney,
1978
+ 901: ReturnByMoneyDecision,
1895
1979
  1e3: InvestmentAgreement,
1896
1980
  1001: InvestByResultStatement,
1897
1981
  1002: InvestByResultAct,
@@ -2181,7 +2265,322 @@ class Entrepreneur {
2181
2265
  }
2182
2266
  }
2183
2267
 
2268
+ function matchMock({ code, table, value, actionName }, url, params) {
2269
+ if (!url.includes("/get-tables") && !url.includes("/get-actions")) {
2270
+ return false;
2271
+ }
2272
+ if (!params) {
2273
+ return false;
2274
+ }
2275
+ const filter = params.get("filter");
2276
+ if (!filter) {
2277
+ return false;
2278
+ }
2279
+ try {
2280
+ const obj = JSON.parse(filter);
2281
+ if (url.includes("/get-actions")) {
2282
+ if (code && obj.account !== code) {
2283
+ return false;
2284
+ }
2285
+ if (actionName && obj.name !== actionName) {
2286
+ return false;
2287
+ }
2288
+ } else {
2289
+ if (code && obj.code !== code) {
2290
+ return false;
2291
+ }
2292
+ if (table && obj.table !== table) {
2293
+ return false;
2294
+ }
2295
+ }
2296
+ if (value) {
2297
+ for (const key in value) {
2298
+ if (obj[key] !== value[key]) {
2299
+ return false;
2300
+ }
2301
+ }
2302
+ }
2303
+ return true;
2304
+ } catch {
2305
+ return false;
2306
+ }
2307
+ }
2308
+
2309
+ const meetValue = {
2310
+ id: "14",
2311
+ hash: "TEST_MEET_HASH_12345",
2312
+ coopname: "voskhod",
2313
+ type: "regular",
2314
+ level: "cooperative",
2315
+ initiator: "ant",
2316
+ presider: "ant",
2317
+ secretary: "ant",
2318
+ status: "created",
2319
+ created_at: "2025-06-23T12:31:46.000",
2320
+ open_at: "2025-06-23T12:20:00.000",
2321
+ close_at: "2025-06-23T12:22:00.000",
2322
+ notified_users: [],
2323
+ quorum_percent: 75,
2324
+ signed_ballots: "100",
2325
+ current_quorum_percent: 0,
2326
+ cycle: "1",
2327
+ quorum_passed: false,
2328
+ proposal: {
2329
+ version: "1.0.0",
2330
+ hash: "0EADEE40FCCBA221729FA5F5719F973E7BA90B2CA04841A9778D2A9F17F7F590",
2331
+ doc_hash: "C2EFB045E14EA76FC220102EEB2F13F38E771B74F4EE22EB7BDA66C70FD34530",
2332
+ meta_hash: "45D1F9A527D32A84295BD59D61FA28CB5162CD0BE179423926AE44F9CA84AA00",
2333
+ meta: '{"block_num":1700158,"coopname":"voskhod","created_at":"23.06.2025 15:31","generator":"coopjs","is_repeated":false,"lang":"ru","links":[],"meet":{"close_at_datetime":"23.06.2025 15:22 (\u041C\u0441\u043A)","open_at_datetime":"23.06.2025 15:20 (\u041C\u0441\u043A)","type":"regular"},"questions":[{"context":"\u0422\u0443\u0442 \u043F\u0440\u0438\u043B\u043E\u0436\u0435\u043D\u0438\u044F \u043A \u0432\u043E\u043F\u0440\u043E\u0441\u0443","decision":"\u0422\u0443\u0442 \u043F\u0440\u043E\u0435\u043A\u0442 \u0440\u0435\u0448\u0435\u043D\u0438\u044F \u043F\u043E \u0432\u043E\u043F\u0440\u043E\u0441\u0443","number":"1","title":"\u0422\u0435\u0441\u0442\u043E\u0432\u044B\u0439 \u0432\u043E\u043F\u0440\u043E\u0441"}],"registry_id":300,"timezone":"Europe/Moscow","title":"\u041F\u0440\u0435\u0434\u043B\u043E\u0436\u0435\u043D\u0438\u0435 \u043F\u043E\u0432\u0435\u0441\u0442\u043A\u0438 \u0434\u043D\u044F \u043E\u0431\u0449\u0435\u0433\u043E \u0441\u043E\u0431\u0440\u0430\u043D\u0438\u044F","username":"ant","version":"2025.6.19"}',
2334
+ signatures: [
2335
+ {
2336
+ id: 1,
2337
+ signed_hash: "B452BB6063CF5DBBDF9E30EB1D2BA64CB65265C8C311DD5013C1237FA4327CDF",
2338
+ signer: "ant",
2339
+ public_key: "PUB_K1_6MRyAjQq8ud7hVNYcfnVPJqcVpscN5So8BhtHuGYqET5BoDq63",
2340
+ signature: "SIG_K1_Kd6HWvecCZ1nmSZyvy3c2B9Rkvj3Y8tiv8yubXEK7V46E2ERUZSpLoedASi6vCwJQcu3cUK1WzR4oxbYKPRbvnom3QfZLa",
2341
+ signed_at: "2025-06-23T12:31:45.000",
2342
+ meta: "{}"
2343
+ }
2344
+ ]
2345
+ },
2346
+ authorization: {
2347
+ version: "",
2348
+ hash: "0000000000000000000000000000000000000000000000000000000000000000",
2349
+ doc_hash: "0000000000000000000000000000000000000000000000000000000000000000",
2350
+ meta_hash: "0000000000000000000000000000000000000000000000000000000000000000",
2351
+ meta: "",
2352
+ signatures: []
2353
+ },
2354
+ decision1: {
2355
+ version: "",
2356
+ hash: "0000000000000000000000000000000000000000000000000000000000000000",
2357
+ doc_hash: "0000000000000000000000000000000000000000000000000000000000000000",
2358
+ meta_hash: "0000000000000000000000000000000000000000000000000000000000000000",
2359
+ meta: "",
2360
+ signatures: []
2361
+ },
2362
+ decision2: {
2363
+ version: "",
2364
+ hash: "0000000000000000000000000000000000000000000000000000000000000000",
2365
+ doc_hash: "0000000000000000000000000000000000000000000000000000000000000000",
2366
+ meta_hash: "0000000000000000000000000000000000000000000000000000000000000000",
2367
+ meta: "",
2368
+ signatures: []
2369
+ }
2370
+ };
2371
+ const meetTableFull = {
2372
+ _id: "685949339bd56240ad71b34f",
2373
+ chain_id: "f50256680336ee6daaeee93915b945c1166b5dfc98977adcb717403ae225c559",
2374
+ block_num: 1700165,
2375
+ block_id: "0019F1455FEF5180A7106C1F80FB651C0FC1B7596A83FA33E4774C525929A0E4",
2376
+ present: true,
2377
+ code: "meet",
2378
+ scope: "voskhod",
2379
+ table: "meets",
2380
+ primary_key: "14",
2381
+ value: meetValue
2382
+ };
2383
+ const meetTableMock = {
2384
+ code: "meet",
2385
+ table: "meets",
2386
+ value: { "value.hash": "TEST_MEET_HASH_12345" },
2387
+ data: {
2388
+ results: [meetTableFull]
2389
+ },
2390
+ match: (_url, _params) => false
2391
+ };
2392
+
2393
+ meetTableMock.match = function(url, params) {
2394
+ return matchMock(this, url, params);
2395
+ };
2396
+ const tablesMocks = [meetTableMock];
2397
+
2398
+ const voteForAction = {
2399
+ _id: "6852b0389bd56240ad71b225",
2400
+ chain_id: "f50256680336ee6daaeee93915b945c1166b5dfc98977adcb717403ae225c559",
2401
+ block_id: "000CBF518A8998507069881FF00EE74E1E2E5345CD9B3D1F34E09DA732AC1D3D",
2402
+ block_num: 835409,
2403
+ transaction_id: "F79ED54A8D37076C3ADC73D3A10EF2A3933089D7B2B3D87F46D8703BCB34DA5B",
2404
+ global_sequence: "836089",
2405
+ receipt: {
2406
+ receiver: "soviet",
2407
+ act_digest: "642C266D89D4FB33ACB2A41E4294A382A451F361FCD040F5D202F8D1816FBFF2",
2408
+ global_sequence: "836089",
2409
+ recv_sequence: "163",
2410
+ auth_sequence: [{ account: "xtszqmpgtuiv", sequence: "3" }],
2411
+ code_sequence: 1,
2412
+ abi_sequence: 1
2413
+ },
2414
+ account: "soviet",
2415
+ name: "votefor",
2416
+ authorization: [{ actor: "xtszqmpgtuiv", permission: "active" }],
2417
+ data: {
2418
+ version: "1.0.0",
2419
+ coopname: "voskhod",
2420
+ username: "xtszqmpgtuiv",
2421
+ decision_id: "17",
2422
+ signed_at: "2025-06-18T12:25:23.000",
2423
+ signed_hash: "940734E565D3FA78527CC85C90D8601D7801F896EC5B40F6D1CC1DF0C6600948",
2424
+ signature: "SIG_K1_KkSjs8tZtmDmTyLvaCEETVZ2QQQpshMF3ZyEjVXadNXivsAQfjbkrN6smKRoApqXjBhc5vHhL8vbSt4itAzYRbrvHF18WF",
2425
+ public_key: "PUB_K1_52YPV66yKaju9WTXKuk8xWRSsCZ18Ewt9Z6SW24yMsRySPi2mZ"
2426
+ },
2427
+ action_ordinal: 1,
2428
+ creator_action_ordinal: 0,
2429
+ receiver: "soviet",
2430
+ context_free: false,
2431
+ elapsed: "0",
2432
+ console: "",
2433
+ account_ram_deltas: [{ account: "soviet", delta: "8" }],
2434
+ return_value: ""
2435
+ };
2436
+ const voteforActionMock = {
2437
+ code: "soviet",
2438
+ actionName: "votefor",
2439
+ value: { "data.decision_id": "17", "data.coopname": "voskhod" },
2440
+ data: {
2441
+ results: [voteForAction]
2442
+ },
2443
+ match: (_url, _params) => false
2444
+ };
2445
+
2446
+ const returnByMoneyDecisionAction = {
2447
+ _id: "6852b0389bd56240ad71b998",
2448
+ chain_id: "f50256680336ee6daaeee93915b945c1166b5dfc98977adcb717403ae225c559",
2449
+ block_id: "000CBF518A8998507069881FF00EE74E1E2E5345CD9B3D1F34E09DA732AC1D3D",
2450
+ block_num: 835409,
2451
+ transaction_id: "F79ED54A8D37076C3ADC73D3A10EF2A3933089D7B2B3D87F46D8703BCB34DA5B",
2452
+ global_sequence: "836089",
2453
+ receipt: {
2454
+ receiver: "soviet",
2455
+ act_digest: "642C266D89D4FB33ACB2A41E4294A382A451F361FCD040F5D202F8D1816FBFF2",
2456
+ global_sequence: "836089",
2457
+ recv_sequence: "163",
2458
+ auth_sequence: [{ account: "ant", sequence: "3" }],
2459
+ code_sequence: 1,
2460
+ abi_sequence: 1
2461
+ },
2462
+ account: "soviet",
2463
+ name: "returnbymoneydecision",
2464
+ authorization: [{ actor: "ant", permission: "active" }],
2465
+ data: {
2466
+ version: "1.0.0",
2467
+ coopname: "voskhod",
2468
+ username: "ant",
2469
+ decision_id: "9001",
2470
+ payment_hash: "abc123def456hash789",
2471
+ amount: "50000",
2472
+ currency: "\u0440\u0443\u0431.",
2473
+ signed_at: "2025-06-18T12:25:23.000",
2474
+ signed_hash: "940734E565D3FA78527CC85C90D8601D7801F896EC5B40F6D1CC1DF0C6600948",
2475
+ signature: "SIG_K1_KkSjs8tZtmDmTyLvaCEETVZ2QQQpshMF3ZyEjVXadNXivsAQfjbkrN6smKRoApqXjBhc5vHhL8vbSt4itAzYRbrvHF18WF",
2476
+ public_key: "PUB_K1_52YPV66yKaju9WTXKuk8xWRSsCZ18Ewt9Z6SW24yMsRySPi2mZ"
2477
+ },
2478
+ action_ordinal: 1,
2479
+ creator_action_ordinal: 0,
2480
+ receiver: "soviet",
2481
+ context_free: false,
2482
+ elapsed: "0",
2483
+ console: "",
2484
+ account_ram_deltas: [{ account: "soviet", delta: "8" }],
2485
+ return_value: ""
2486
+ };
2487
+ const voteForAction9001_1 = {
2488
+ _id: "6852b0389bd56240ad71b990",
2489
+ chain_id: "f50256680336ee6daaeee93915b945c1166b5dfc98977adcb717403ae225c559",
2490
+ block_id: "000CBF518A8998507069881FF00EE74E1E2E5345CD9B3D1F34E09DA732AC1D3D",
2491
+ block_num: 835400,
2492
+ transaction_id: "F79ED54A8D37076C3ADC73D3A10EF2A3933089D7B2B3D87F46D8703BCB34DA5A",
2493
+ global_sequence: "836080",
2494
+ receipt: {
2495
+ receiver: "soviet",
2496
+ act_digest: "642C266D89D4FB33ACB2A41E4294A382A451F361FCD040F5D202F8D1816FBFF1",
2497
+ global_sequence: "836080",
2498
+ recv_sequence: "160",
2499
+ auth_sequence: [{ account: "member1", sequence: "1" }],
2500
+ code_sequence: 1,
2501
+ abi_sequence: 1
2502
+ },
2503
+ account: "soviet",
2504
+ name: "votefor",
2505
+ authorization: [{ actor: "member1", permission: "active" }],
2506
+ data: {
2507
+ version: "1.0.0",
2508
+ coopname: "voskhod",
2509
+ username: "member1",
2510
+ decision_id: "9001",
2511
+ signed_at: "2025-06-18T12:20:00.000",
2512
+ signed_hash: "940734E565D3FA78527CC85C90D8601D7801F896EC5B40F6D1CC1DF0C6600940",
2513
+ signature: "SIG_K1_KkSjs8tZtmDmTyLvaCEETVZ2QQQpshMF3ZyEjVXadNXivsAQfjbkrN6smKRoApqXjBhc5vHhL8vbSt4itAzYRbrvHF18WA",
2514
+ public_key: "PUB_K1_52YPV66yKaju9WTXKuk8xWRSsCZ18Ewt9Z6SW24yMsRySPi2mA"
2515
+ },
2516
+ action_ordinal: 1,
2517
+ creator_action_ordinal: 0,
2518
+ receiver: "soviet",
2519
+ context_free: false,
2520
+ elapsed: "0",
2521
+ console: "",
2522
+ account_ram_deltas: [{ account: "soviet", delta: "8" }],
2523
+ return_value: ""
2524
+ };
2525
+ const voteAgainstAction9001 = [];
2526
+ const returnByMoneyDecisionActionMock = {
2527
+ code: "soviet",
2528
+ actionName: "returnbymoneydecision",
2529
+ value: { "data.decision_id": "9001", "data.coopname": "voskhod" },
2530
+ data: {
2531
+ results: [returnByMoneyDecisionAction]
2532
+ },
2533
+ match: (_url, _params) => false
2534
+ };
2535
+ const voteForDecision9001Mock = {
2536
+ code: "soviet",
2537
+ actionName: "votefor",
2538
+ value: { "data.decision_id": "9001", "data.coopname": "voskhod" },
2539
+ data: {
2540
+ results: [voteForAction9001_1]
2541
+ },
2542
+ match: (_url, _params) => false
2543
+ };
2544
+ const voteAgainstDecision9001Mock = {
2545
+ code: "soviet",
2546
+ actionName: "voteagainst",
2547
+ value: { "data.decision_id": "9001", "data.coopname": "voskhod" },
2548
+ data: {
2549
+ results: voteAgainstAction9001
2550
+ },
2551
+ match: (_url, _params) => false
2552
+ };
2553
+
2554
+ voteforActionMock.match = function(url, params) {
2555
+ return matchMock(this, url, params);
2556
+ };
2557
+ returnByMoneyDecisionActionMock.match = function(url, params) {
2558
+ return matchMock(this, url, params);
2559
+ };
2560
+ voteForDecision9001Mock.match = function(url, params) {
2561
+ return matchMock(this, url, params);
2562
+ };
2563
+ voteAgainstDecision9001Mock.match = function(url, params) {
2564
+ return matchMock(this, url, params);
2565
+ };
2566
+ const actionsMocks = [
2567
+ voteforActionMock,
2568
+ returnByMoneyDecisionActionMock,
2569
+ voteForDecision9001Mock,
2570
+ voteAgainstDecision9001Mock
2571
+ ];
2572
+
2573
+ const testMocks = [
2574
+ ...tablesMocks,
2575
+ ...actionsMocks
2576
+ ];
2577
+
2184
2578
  async function getFetch(url, params) {
2579
+ if (process.env.NODE_ENV === "test") {
2580
+ const mock = testMocks.find((m) => m.match(url, params));
2581
+ if (mock)
2582
+ return mock.data;
2583
+ }
2185
2584
  try {
2186
2585
  const response = await fetch(`${url}?${params?.toString()}`, {
2187
2586
  method: "GET",
@@ -2517,7 +2916,7 @@ class PDFService {
2517
2916
 
2518
2917
  const name = "@coopenomics/factory";
2519
2918
  const type = "module";
2520
- const version = "2025.6.24";
2919
+ const version = "2025.7.1";
2521
2920
  const packageManager = "pnpm@9.0.6";
2522
2921
  const description = "";
2523
2922
  const author = "Alex Ant <chairman.voskhod@gmail.com>";
@@ -2567,7 +2966,7 @@ const dependencies = {
2567
2966
  "ajv-formats": "^3.0.1",
2568
2967
  "ajv-i18n": "^4.2.0",
2569
2968
  axios: "^1.7.2",
2570
- cooptypes: "2025.6.24",
2969
+ cooptypes: "2025.7.1",
2571
2970
  dotenv: "^16.4.5",
2572
2971
  "eosjs-ecc": "^4.0.7",
2573
2972
  handlebars: "^4.7.8",
@@ -2608,7 +3007,7 @@ const pnpm = {
2608
3007
  "vite@>=5.1.0 <=5.1.6": ">=5.1.7"
2609
3008
  }
2610
3009
  };
2611
- const gitHead = "32e6a45f0597e651c2f3ab787462f7aa723c1732";
3010
+ const gitHead = "ac8836628eb82672b481dbf86050918f41bf24ca";
2612
3011
  const packageJson = {
2613
3012
  name: name,
2614
3013
  type: type,
@@ -3092,18 +3491,37 @@ class DocFactory {
3092
3491
  const [, amount, symbol] = match;
3093
3492
  return `${Number.parseFloat(amount).toFixed(precision)} ${symbol}`;
3094
3493
  }
3494
+ formatPaymentDetails(paymentMethod, recipientName) {
3495
+ switch (paymentMethod.method_type) {
3496
+ case "bank_transfer": {
3497
+ const bankData = paymentMethod.data;
3498
+ return `\u2116 \u0441\u0447\u0435\u0442\u0430 \u043F\u043E\u043B\u0443\u0447\u0430\u0442\u0435\u043B\u044F: ${bankData.account_number}
3499
+ \u0411\u0430\u043D\u043A \u043F\u043E\u043B\u0443\u0447\u0430\u0442\u0435\u043B\u044F: ${bankData.bank_name}
3500
+ \u041A\u043E\u0440\u0440. \u0441\u0447\u0435\u0442 \u0431\u0430\u043D\u043A\u0430: ${bankData.details?.corr || ""}
3501
+ \u0411\u0418\u041A ${bankData.details?.bik || ""}
3502
+ \u041F\u043E\u043B\u0443\u0447\u0430\u0442\u0435\u043B\u044C: ${recipientName}`;
3503
+ }
3504
+ case "sbp": {
3505
+ const sbpData = paymentMethod.data;
3506
+ return `\u0421\u0411\u041F
3507
+ \u0422\u0435\u043B\u0435\u0444\u043E\u043D \u043F\u043E\u043B\u0443\u0447\u0430\u0442\u0435\u043B\u044F: ${sbpData.phone}`;
3508
+ }
3509
+ default:
3510
+ return JSON.stringify(paymentMethod.data);
3511
+ }
3512
+ }
3095
3513
  }
3096
3514
 
3097
- let Factory$q = class Factory extends DocFactory {
3515
+ let Factory$s = class Factory extends DocFactory {
3098
3516
  constructor(storage) {
3099
3517
  super(storage);
3100
3518
  }
3101
3519
  async generateDocument(data, options) {
3102
3520
  let template;
3103
3521
  if (process.env.SOURCE === "local") {
3104
- template = Template$q;
3522
+ template = Template$s;
3105
3523
  } else {
3106
- template = await this.getTemplate(cooptypes.DraftContract.contractName.production, registry_id$q, data.block_num);
3524
+ template = await this.getTemplate(cooptypes.DraftContract.contractName.production, registry_id$s, data.block_num);
3107
3525
  }
3108
3526
  const meta = await super.getMeta({ title: template.title, ...data });
3109
3527
  const coop = await super.getCooperative(data.coopname, data.block_num);
@@ -3121,16 +3539,16 @@ let Factory$q = class Factory extends DocFactory {
3121
3539
  }
3122
3540
  };
3123
3541
 
3124
- let Factory$p = class Factory extends DocFactory {
3542
+ let Factory$r = class Factory extends DocFactory {
3125
3543
  constructor(storage) {
3126
3544
  super(storage);
3127
3545
  }
3128
3546
  async generateDocument(data, options) {
3129
3547
  let template;
3130
3548
  if (process.env.SOURCE === "local") {
3131
- template = Template$p;
3549
+ template = Template$r;
3132
3550
  } else {
3133
- template = await this.getTemplate(cooptypes.DraftContract.contractName.production, registry_id$p, data.block_num);
3551
+ template = await this.getTemplate(cooptypes.DraftContract.contractName.production, registry_id$r, data.block_num);
3134
3552
  }
3135
3553
  const meta = await super.getMeta({ title: template.title, ...data });
3136
3554
  const coop = await super.getCooperative(data.coopname, data.block_num);
@@ -3148,16 +3566,16 @@ let Factory$p = class Factory extends DocFactory {
3148
3566
  }
3149
3567
  };
3150
3568
 
3151
- let Factory$o = class Factory extends DocFactory {
3569
+ let Factory$q = class Factory extends DocFactory {
3152
3570
  constructor(storage) {
3153
3571
  super(storage);
3154
3572
  }
3155
3573
  async generateDocument(data, options) {
3156
3574
  let template;
3157
3575
  if (process.env.SOURCE === "local") {
3158
- template = Template$o;
3576
+ template = Template$q;
3159
3577
  } else {
3160
- template = await this.getTemplate(cooptypes.DraftContract.contractName.production, registry_id$o, data.block_num);
3578
+ template = await this.getTemplate(cooptypes.DraftContract.contractName.production, registry_id$q, data.block_num);
3161
3579
  }
3162
3580
  const meta = await super.getMeta({ title: template.title, ...data });
3163
3581
  const coop = await super.getCooperative(data.coopname, data.block_num);
@@ -3175,16 +3593,16 @@ let Factory$o = class Factory extends DocFactory {
3175
3593
  }
3176
3594
  };
3177
3595
 
3178
- let Factory$n = class Factory extends DocFactory {
3596
+ let Factory$p = class Factory extends DocFactory {
3179
3597
  constructor(storage) {
3180
3598
  super(storage);
3181
3599
  }
3182
3600
  async generateDocument(data, options) {
3183
3601
  let template;
3184
3602
  if (process.env.SOURCE === "local") {
3185
- template = Template$n;
3603
+ template = Template$p;
3186
3604
  } else {
3187
- template = await this.getTemplate(cooptypes.DraftContract.contractName.production, registry_id$n, data.block_num);
3605
+ template = await this.getTemplate(cooptypes.DraftContract.contractName.production, registry_id$p, data.block_num);
3188
3606
  }
3189
3607
  const meta = await super.getMeta({ title: template.title, ...data });
3190
3608
  const coop = await super.getCooperative(data.coopname, data.block_num);
@@ -3206,16 +3624,16 @@ let Factory$n = class Factory extends DocFactory {
3206
3624
  }
3207
3625
  };
3208
3626
 
3209
- let Factory$m = class Factory extends DocFactory {
3627
+ let Factory$o = class Factory extends DocFactory {
3210
3628
  constructor(storage) {
3211
3629
  super(storage);
3212
3630
  }
3213
3631
  async generateDocument(data, options) {
3214
3632
  let template;
3215
3633
  if (process.env.SOURCE === "local") {
3216
- template = Template$m;
3634
+ template = Template$o;
3217
3635
  } else {
3218
- template = await this.getTemplate(cooptypes.DraftContract.contractName.production, registry_id$m, data.block_num);
3636
+ template = await this.getTemplate(cooptypes.DraftContract.contractName.production, registry_id$o, data.block_num);
3219
3637
  }
3220
3638
  const meta = await super.getMeta({ title: template.title, ...data });
3221
3639
  const coop = await super.getCooperative(data.coopname, data.block_num);
@@ -3235,16 +3653,16 @@ let Factory$m = class Factory extends DocFactory {
3235
3653
  }
3236
3654
  };
3237
3655
 
3238
- let Factory$l = class Factory extends DocFactory {
3656
+ let Factory$n = class Factory extends DocFactory {
3239
3657
  constructor(storage) {
3240
3658
  super(storage);
3241
3659
  }
3242
3660
  async generateDocument(data, _options) {
3243
3661
  let template;
3244
3662
  if (process.env.SOURCE === "local") {
3245
- template = Template$j;
3663
+ template = Template$l;
3246
3664
  } else {
3247
- template = await this.getTemplate(cooptypes.DraftContract.contractName.production, registry_id$j, data.block_num);
3665
+ template = await this.getTemplate(cooptypes.DraftContract.contractName.production, registry_id$l, data.block_num);
3248
3666
  }
3249
3667
  const user = await super.getUser(data.username, data.block_num);
3250
3668
  const userData = {
@@ -3266,16 +3684,16 @@ let Factory$l = class Factory extends DocFactory {
3266
3684
  }
3267
3685
  };
3268
3686
 
3269
- let Factory$k = class Factory extends DocFactory {
3687
+ let Factory$m = class Factory extends DocFactory {
3270
3688
  constructor(storage) {
3271
3689
  super(storage);
3272
3690
  }
3273
3691
  async generateDocument(data, _options) {
3274
3692
  let template;
3275
3693
  if (process.env.SOURCE === "local") {
3276
- template = Template$l;
3694
+ template = Template$n;
3277
3695
  } else {
3278
- template = await this.getTemplate(cooptypes.DraftContract.contractName.production, registry_id$l, data.block_num);
3696
+ template = await this.getTemplate(cooptypes.DraftContract.contractName.production, registry_id$n, data.block_num);
3279
3697
  }
3280
3698
  const user = await super.getUser(data.username, data.block_num);
3281
3699
  let bank_account = {};
@@ -3336,16 +3754,16 @@ let Factory$k = class Factory extends DocFactory {
3336
3754
  }
3337
3755
  };
3338
3756
 
3339
- let Factory$j = class Factory extends DocFactory {
3757
+ let Factory$l = class Factory extends DocFactory {
3340
3758
  constructor(storage) {
3341
3759
  super(storage);
3342
3760
  }
3343
3761
  async generateDocument(data, options) {
3344
3762
  let template;
3345
3763
  if (process.env.SOURCE === "local") {
3346
- template = Template$k;
3764
+ template = Template$m;
3347
3765
  } else {
3348
- template = await this.getTemplate(cooptypes.DraftContract.contractName.production, registry_id$k, data.block_num);
3766
+ template = await this.getTemplate(cooptypes.DraftContract.contractName.production, registry_id$m, data.block_num);
3349
3767
  }
3350
3768
  const user = await super.getUser(data.username, data.block_num);
3351
3769
  const userData = {
@@ -3385,16 +3803,16 @@ let Factory$j = class Factory extends DocFactory {
3385
3803
  }
3386
3804
  };
3387
3805
 
3388
- let Factory$i = class Factory extends DocFactory {
3806
+ let Factory$k = class Factory extends DocFactory {
3389
3807
  constructor(storage) {
3390
3808
  super(storage);
3391
3809
  }
3392
3810
  async generateDocument(data, options) {
3393
3811
  let template;
3394
3812
  if (process.env.SOURCE === "local") {
3395
- template = Template$i;
3813
+ template = Template$k;
3396
3814
  } else {
3397
- template = await this.getTemplate(cooptypes.DraftContract.contractName.production, registry_id$i, data.block_num);
3815
+ template = await this.getTemplate(cooptypes.DraftContract.contractName.production, registry_id$k, data.block_num);
3398
3816
  }
3399
3817
  const user = await this.getUser(data.username, data.block_num);
3400
3818
  const suggester_name = await this.getFullName(user.data);
@@ -3430,16 +3848,16 @@ let Factory$i = class Factory extends DocFactory {
3430
3848
  }
3431
3849
  };
3432
3850
 
3433
- let Factory$h = class Factory extends DocFactory {
3851
+ let Factory$j = class Factory extends DocFactory {
3434
3852
  constructor(storage) {
3435
3853
  super(storage);
3436
3854
  }
3437
3855
  async generateDocument(data, options) {
3438
3856
  let template;
3439
3857
  if (process.env.SOURCE === "local") {
3440
- template = Template$h;
3858
+ template = Template$j;
3441
3859
  } else {
3442
- template = await this.getTemplate(cooptypes.DraftContract.contractName.production, registry_id$h, data.block_num);
3860
+ template = await this.getTemplate(cooptypes.DraftContract.contractName.production, registry_id$j, data.block_num);
3443
3861
  }
3444
3862
  const user = await this.getUser(data.username, data.block_num);
3445
3863
  const userData = {
@@ -3482,16 +3900,16 @@ let Factory$h = class Factory extends DocFactory {
3482
3900
  }
3483
3901
  };
3484
3902
 
3485
- let Factory$g = class Factory extends DocFactory {
3903
+ let Factory$i = class Factory extends DocFactory {
3486
3904
  constructor(storage) {
3487
3905
  super(storage);
3488
3906
  }
3489
3907
  async generateDocument(data, options) {
3490
3908
  let template;
3491
3909
  if (process.env.SOURCE === "local") {
3492
- template = Template$g;
3910
+ template = Template$i;
3493
3911
  } else {
3494
- template = await this.getTemplate(cooptypes.DraftContract.contractName.production, registry_id$g, data.block_num);
3912
+ template = await this.getTemplate(cooptypes.DraftContract.contractName.production, registry_id$i, data.block_num);
3495
3913
  }
3496
3914
  const meta = await super.getMeta({ title: template.title, ...data });
3497
3915
  const coop = await super.getCooperative(data.coopname, data.block_num);
@@ -3513,16 +3931,16 @@ let Factory$g = class Factory extends DocFactory {
3513
3931
  }
3514
3932
  };
3515
3933
 
3516
- let Factory$f = class Factory extends DocFactory {
3934
+ let Factory$h = class Factory extends DocFactory {
3517
3935
  constructor(storage) {
3518
3936
  super(storage);
3519
3937
  }
3520
3938
  async generateDocument(data, options) {
3521
3939
  let template;
3522
3940
  if (process.env.SOURCE === "local") {
3523
- template = Template$f;
3941
+ template = Template$h;
3524
3942
  } else {
3525
- template = await this.getTemplate(cooptypes.DraftContract.contractName.production, registry_id$f, data.block_num);
3943
+ template = await this.getTemplate(cooptypes.DraftContract.contractName.production, registry_id$h, data.block_num);
3526
3944
  }
3527
3945
  const meta = await this.getMeta({ title: template.title, ...data });
3528
3946
  const coop = await this.getCooperative(data.coopname, data.block_num);
@@ -3544,7 +3962,7 @@ let Factory$f = class Factory extends DocFactory {
3544
3962
  }
3545
3963
  };
3546
3964
 
3547
- let Factory$e = class Factory extends DocFactory {
3965
+ let Factory$g = class Factory extends DocFactory {
3548
3966
  constructor(storage) {
3549
3967
  super(storage);
3550
3968
  }
@@ -3571,16 +3989,16 @@ let Factory$e = class Factory extends DocFactory {
3571
3989
  }
3572
3990
  };
3573
3991
 
3574
- let Factory$d = class Factory extends DocFactory {
3992
+ let Factory$f = class Factory extends DocFactory {
3575
3993
  constructor(storage) {
3576
3994
  super(storage);
3577
3995
  }
3578
3996
  async generateDocument(data, options) {
3579
3997
  let template;
3580
3998
  if (process.env.SOURCE === "local") {
3581
- template = Template$e;
3999
+ template = Template$g;
3582
4000
  } else {
3583
- template = await this.getTemplate(cooptypes.DraftContract.contractName.production, registry_id$e, data.block_num);
4001
+ template = await this.getTemplate(cooptypes.DraftContract.contractName.production, registry_id$g, data.block_num);
3584
4002
  }
3585
4003
  const meta = await this.getMeta({ title: template.title, ...data });
3586
4004
  const coop = await this.getCooperative(data.coopname, data.block_num);
@@ -3604,16 +4022,16 @@ let Factory$d = class Factory extends DocFactory {
3604
4022
  }
3605
4023
  };
3606
4024
 
3607
- let Factory$c = class Factory extends DocFactory {
4025
+ let Factory$e = class Factory extends DocFactory {
3608
4026
  constructor(storage) {
3609
4027
  super(storage);
3610
4028
  }
3611
4029
  async generateDocument(data, options) {
3612
4030
  let template;
3613
4031
  if (process.env.SOURCE === "local") {
3614
- template = Template$c;
4032
+ template = Template$e;
3615
4033
  } else {
3616
- template = await this.getTemplate(cooptypes.DraftContract.contractName.production, registry_id$c, data.block_num);
4034
+ template = await this.getTemplate(cooptypes.DraftContract.contractName.production, registry_id$e, data.block_num);
3617
4035
  }
3618
4036
  const meta = await this.getMeta({ title: template.title, ...data });
3619
4037
  const coop = await this.getCooperative(data.coopname, data.block_num);
@@ -3648,16 +4066,16 @@ let Factory$c = class Factory extends DocFactory {
3648
4066
  }
3649
4067
  };
3650
4068
 
3651
- let Factory$b = class Factory extends DocFactory {
4069
+ let Factory$d = class Factory extends DocFactory {
3652
4070
  constructor(storage) {
3653
4071
  super(storage);
3654
4072
  }
3655
4073
  async generateDocument(data, options) {
3656
4074
  let template;
3657
4075
  if (process.env.SOURCE === "local") {
3658
- template = Template$d;
4076
+ template = Template$f;
3659
4077
  } else {
3660
- template = await this.getTemplate(cooptypes.DraftContract.contractName.production, registry_id$d, data.block_num);
4078
+ template = await this.getTemplate(cooptypes.DraftContract.contractName.production, registry_id$f, data.block_num);
3661
4079
  }
3662
4080
  const meta = await this.getMeta({ title: template.title, ...data });
3663
4081
  const coop = await this.getCooperative(data.coopname, data.block_num);
@@ -3681,16 +4099,16 @@ let Factory$b = class Factory extends DocFactory {
3681
4099
  }
3682
4100
  };
3683
4101
 
3684
- let Factory$a = class Factory extends DocFactory {
4102
+ let Factory$c = class Factory extends DocFactory {
3685
4103
  constructor(storage) {
3686
4104
  super(storage);
3687
4105
  }
3688
4106
  async generateDocument(data, options) {
3689
4107
  let template;
3690
4108
  if (process.env.SOURCE === "local") {
3691
- template = Template$b;
4109
+ template = Template$d;
3692
4110
  } else {
3693
- template = await this.getTemplate(cooptypes.DraftContract.contractName.production, registry_id$b, data.block_num);
4111
+ template = await this.getTemplate(cooptypes.DraftContract.contractName.production, registry_id$d, data.block_num);
3694
4112
  }
3695
4113
  const meta = await this.getMeta({ title: template.title, ...data });
3696
4114
  const coop = await this.getCooperative(data.coopname, data.block_num);
@@ -3725,6 +4143,96 @@ let Factory$a = class Factory extends DocFactory {
3725
4143
  }
3726
4144
  };
3727
4145
 
4146
+ let Factory$b = class Factory extends DocFactory {
4147
+ constructor(storage) {
4148
+ super(storage);
4149
+ }
4150
+ async generateDocument(data, options) {
4151
+ let template;
4152
+ if (process.env.SOURCE === "local") {
4153
+ template = Template$c;
4154
+ } else {
4155
+ template = await this.getTemplate(cooptypes.DraftContract.contractName.production, registry_id$c, data.block_num);
4156
+ }
4157
+ console.log(data);
4158
+ const meta = await this.getMeta({ title: template.title, ...data });
4159
+ const coop = await this.getCooperative(data.coopname, data.block_num);
4160
+ const vars = await this.getVars(data.coopname, data.block_num);
4161
+ const user = await this.getUser(data.username, data.block_num);
4162
+ const commonUser = this.getCommonUser(user);
4163
+ const paymentMethodService = new PaymentMethod(this.storage);
4164
+ const paymentMethod = await paymentMethodService.getOne({
4165
+ method_id: data.method_id,
4166
+ username: data.username,
4167
+ deleted: false
4168
+ });
4169
+ if (!paymentMethod) {
4170
+ throw new Error(`\u041F\u043B\u0430\u0442\u0435\u0436\u043D\u044B\u0439 \u043C\u0435\u0442\u043E\u0434 \u0441 ID ${data.method_id} \u043D\u0435 \u043D\u0430\u0439\u0434\u0435\u043D \u0434\u043B\u044F \u043F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u0442\u0435\u043B\u044F ${data.username}`);
4171
+ }
4172
+ const combinedData = {
4173
+ meta,
4174
+ coop,
4175
+ vars,
4176
+ user: commonUser,
4177
+ payment_details: this.formatPaymentDetails(paymentMethod, commonUser.full_name_or_short_name),
4178
+ quantity: data.quantity,
4179
+ currency: data.currency,
4180
+ payment_hash: data.payment_hash
4181
+ };
4182
+ await this.validate(combinedData, template.model);
4183
+ const translation = template.translations[meta.lang];
4184
+ const document = await this.generatePDF(commonUser.full_name_or_short_name, template.context, combinedData, translation, meta, options?.skip_save);
4185
+ return document;
4186
+ }
4187
+ };
4188
+
4189
+ let Factory$a = class Factory extends DocFactory {
4190
+ constructor(storage) {
4191
+ super(storage);
4192
+ }
4193
+ async generateDocument(data, options) {
4194
+ let template;
4195
+ if (process.env.SOURCE === "local") {
4196
+ template = Template$b;
4197
+ } else {
4198
+ template = await this.getTemplate(cooptypes.DraftContract.contractName.production, registry_id$b, data.block_num);
4199
+ }
4200
+ const user = await super.getUser(data.username, data.block_num);
4201
+ const coop = await super.getCooperative(data.coopname, data.block_num);
4202
+ const vars = await super.getVars(data.coopname, data.block_num);
4203
+ const meta = await super.getMeta({
4204
+ title: template.title,
4205
+ ...data
4206
+ });
4207
+ const decision = await super.getDecision(
4208
+ coop,
4209
+ data.coopname,
4210
+ data.decision_id,
4211
+ meta.created_at
4212
+ );
4213
+ const combinedData = {
4214
+ vars,
4215
+ meta,
4216
+ coop,
4217
+ decision,
4218
+ user: super.getCommonUser(user),
4219
+ quantity: data.quantity,
4220
+ currency: data.currency
4221
+ };
4222
+ await super.validate(combinedData, template.model);
4223
+ const translation = template.translations[meta.lang];
4224
+ const document = await super.generatePDF(
4225
+ user.data,
4226
+ template.context,
4227
+ combinedData,
4228
+ translation,
4229
+ meta,
4230
+ options?.skip_save
4231
+ );
4232
+ return document;
4233
+ }
4234
+ };
4235
+
3728
4236
  let Factory$9 = class Factory extends DocFactory {
3729
4237
  constructor(storage) {
3730
4238
  super(storage);
@@ -3926,7 +4434,6 @@ let Factory$4 = class Factory extends DocFactory {
3926
4434
  const user = super.getCommonUser(userData);
3927
4435
  const meet = { ...data.meet };
3928
4436
  const questions = [...data.questions];
3929
- console.log("coop os: ", coop);
3930
4437
  const combinedData = {
3931
4438
  meta,
3932
4439
  coop,
@@ -4370,19 +4877,19 @@ class Generator {
4370
4877
  this.storage = new MongoDBConnector(mongoUri);
4371
4878
  this.searchService = new SearchService(this.storage);
4372
4879
  this.factories = {
4373
- [registry_id$q]: new Factory$q(this.storage),
4880
+ [registry_id$s]: new Factory$s(this.storage),
4374
4881
  // 1
4375
- [registry_id$p]: new Factory$p(this.storage),
4882
+ [registry_id$r]: new Factory$r(this.storage),
4376
4883
  // 2
4377
- [registry_id$o]: new Factory$o(this.storage),
4884
+ [registry_id$q]: new Factory$q(this.storage),
4378
4885
  // 3
4379
- [registry_id$n]: new Factory$n(this.storage),
4886
+ [registry_id$p]: new Factory$p(this.storage),
4380
4887
  // 4
4381
- [registry_id$m]: new Factory$m(this.storage),
4888
+ [registry_id$o]: new Factory$o(this.storage),
4382
4889
  // 50
4383
- [registry_id$l]: new Factory$k(this.storage),
4890
+ [registry_id$n]: new Factory$m(this.storage),
4384
4891
  // 100
4385
- [registry_id$j]: new Factory$l(this.storage),
4892
+ [registry_id$l]: new Factory$n(this.storage),
4386
4893
  // 101
4387
4894
  // общее собрание
4388
4895
  [registry_id$4]: new Factory$4(this.storage),
@@ -4395,25 +4902,29 @@ class Generator {
4395
4902
  // 303
4396
4903
  [registry_id]: new Factory(this.storage),
4397
4904
  // 304
4398
- [registry_id$k]: new Factory$j(this.storage),
4905
+ [registry_id$m]: new Factory$l(this.storage),
4399
4906
  // 501
4400
- [registry_id$i]: new Factory$i(this.storage),
4907
+ [registry_id$k]: new Factory$k(this.storage),
4401
4908
  // 599
4402
- [registry_id$h]: new Factory$h(this.storage),
4909
+ [registry_id$j]: new Factory$j(this.storage),
4403
4910
  // 600
4404
- [registry_id$5]: new Factory$e(this.storage),
4911
+ [registry_id$5]: new Factory$g(this.storage),
4405
4912
  // 699
4406
- [registry_id$g]: new Factory$g(this.storage),
4913
+ [registry_id$i]: new Factory$i(this.storage),
4407
4914
  // 700
4408
- [registry_id$f]: new Factory$f(this.storage),
4915
+ [registry_id$h]: new Factory$h(this.storage),
4409
4916
  // 800
4410
- [registry_id$d]: new Factory$b(this.storage),
4917
+ [registry_id$f]: new Factory$d(this.storage),
4411
4918
  // 801
4412
- [registry_id$b]: new Factory$a(this.storage),
4919
+ [registry_id$d]: new Factory$c(this.storage),
4413
4920
  // 802
4414
- [registry_id$e]: new Factory$d(this.storage),
4921
+ [registry_id$c]: new Factory$b(this.storage),
4922
+ // 900
4923
+ [registry_id$b]: new Factory$a(this.storage),
4924
+ // 901
4925
+ [registry_id$g]: new Factory$f(this.storage),
4415
4926
  // 701
4416
- [registry_id$c]: new Factory$c(this.storage),
4927
+ [registry_id$e]: new Factory$e(this.storage),
4417
4928
  // 702
4418
4929
  [registry_id$a]: new Factory$9(this.storage),
4419
4930
  // 1000
@@ -4527,6 +5038,8 @@ exports.RegulationElectronicSignature = RegulationElectronicSignaturet;
4527
5038
  exports.ReturnByAssetAct = ReturnByAssetAct;
4528
5039
  exports.ReturnByAssetDecision = ReturnByAssetDecision;
4529
5040
  exports.ReturnByAssetStatement = ReturnByAssetStatement;
5041
+ exports.ReturnByMoney = ReturnByMoney;
5042
+ exports.ReturnByMoneyDecision = ReturnByMoneyDecision;
4530
5043
  exports.SelectBranchStatement = SelectBranchStatement;
4531
5044
  exports.SosediAgreement = SosediAgreement;
4532
5045
  exports.UserAgreement = UserAgreement;