@coopenomics/docs-factory 1.2.0 → 1.4.0
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/README.md +2 -1
- package/dist/index.cjs +218 -63
- package/dist/index.d.cts +29 -38
- package/dist/index.d.mts +29 -38
- package/dist/index.d.ts +29 -38
- package/dist/index.mjs +220 -65
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -20,7 +20,8 @@
|
|
|
20
20
|
новый `minor` в конце файла.
|
|
21
21
|
- **Шаблоны документов** — второй пакет репозитория `@coopenomics/docs-templates`
|
|
22
22
|
(`packages/docs-templates`): тексты, схемы, переводы, типы `Action` и `Model`
|
|
23
|
-
каждого вида
|
|
23
|
+
каждого вида документа, модель документа, данные кооператива, субъекты и
|
|
24
|
+
реквизиты. Пакет самостоятельный, зависимостей нет. Выходит одной версией с фабрикой. Фабрика собирает из
|
|
24
25
|
них реестр шаблонов (`src/Templates`) с номерами редакций; ключ `x-builder` в
|
|
25
26
|
схеме редакции объявляет, под какой `major` сборщика она написана.
|
|
26
27
|
- **Порт хранилища** `IFactoryStorage` и реализации: PostgreSQL
|
package/dist/index.cjs
CHANGED
|
@@ -2631,9 +2631,23 @@ const registry_id$M = docsTemplates.Registry.CapitalizationPropertyInvestStateme
|
|
|
2631
2631
|
const Schema$M = {
|
|
2632
2632
|
type: "object",
|
|
2633
2633
|
properties: {
|
|
2634
|
-
meta: IMetaJSONSchema
|
|
2635
|
-
|
|
2636
|
-
|
|
2634
|
+
meta: IMetaJSONSchema,
|
|
2635
|
+
coop: CooperativeSchema,
|
|
2636
|
+
vars: VarsSchema,
|
|
2637
|
+
common_user: CommonUserSchema,
|
|
2638
|
+
contributor_contract_number: { type: "string" },
|
|
2639
|
+
contributor_contract_created_at: { type: "string" },
|
|
2640
|
+
blagorost_agreement_number: { type: "string" },
|
|
2641
|
+
blagorost_agreement_created_at: { type: "string" },
|
|
2642
|
+
property_hash: { type: "string" },
|
|
2643
|
+
property_short_hash: { type: "string" },
|
|
2644
|
+
property_name: { type: "string" },
|
|
2645
|
+
property_description: { type: "string" },
|
|
2646
|
+
property_quantity: { type: "string" },
|
|
2647
|
+
property_unit: { type: "string" },
|
|
2648
|
+
property_amount: { type: "string" }
|
|
2649
|
+
},
|
|
2650
|
+
required: ["meta", "coop", "vars", "common_user", "contributor_contract_number", "contributor_contract_created_at", "blagorost_agreement_number", "blagorost_agreement_created_at", "property_hash", "property_short_hash", "property_name", "property_description", "property_quantity", "property_unit", "property_amount"],
|
|
2637
2651
|
additionalProperties: true
|
|
2638
2652
|
};
|
|
2639
2653
|
const Template$M = {
|
|
@@ -2655,9 +2669,24 @@ const registry_id$L = docsTemplates.Registry.CapitalizationPropertyInvestDecisio
|
|
|
2655
2669
|
const Schema$L = {
|
|
2656
2670
|
type: "object",
|
|
2657
2671
|
properties: {
|
|
2658
|
-
meta: IMetaJSONSchema
|
|
2659
|
-
|
|
2660
|
-
|
|
2672
|
+
meta: IMetaJSONSchema,
|
|
2673
|
+
coop: CooperativeSchema,
|
|
2674
|
+
vars: VarsSchema,
|
|
2675
|
+
decision: decisionSchema,
|
|
2676
|
+
common_user: CommonUserSchema,
|
|
2677
|
+
contributor_contract_number: { type: "string" },
|
|
2678
|
+
contributor_contract_created_at: { type: "string" },
|
|
2679
|
+
blagorost_agreement_number: { type: "string" },
|
|
2680
|
+
blagorost_agreement_created_at: { type: "string" },
|
|
2681
|
+
property_hash: { type: "string" },
|
|
2682
|
+
property_short_hash: { type: "string" },
|
|
2683
|
+
property_name: { type: "string" },
|
|
2684
|
+
property_description: { type: "string" },
|
|
2685
|
+
property_quantity: { type: "string" },
|
|
2686
|
+
property_unit: { type: "string" },
|
|
2687
|
+
property_amount: { type: "string" }
|
|
2688
|
+
},
|
|
2689
|
+
required: ["meta", "coop", "vars", "decision", "common_user", "contributor_contract_number", "contributor_contract_created_at", "blagorost_agreement_number", "blagorost_agreement_created_at", "property_hash", "property_short_hash", "property_name", "property_description", "property_quantity", "property_unit", "property_amount"],
|
|
2661
2690
|
additionalProperties: true
|
|
2662
2691
|
};
|
|
2663
2692
|
const Template$L = {
|
|
@@ -2679,9 +2708,24 @@ const registry_id$K = docsTemplates.Registry.CapitalizationPropertyInvestAct.reg
|
|
|
2679
2708
|
const Schema$K = {
|
|
2680
2709
|
type: "object",
|
|
2681
2710
|
properties: {
|
|
2682
|
-
meta: IMetaJSONSchema
|
|
2683
|
-
|
|
2684
|
-
|
|
2711
|
+
meta: IMetaJSONSchema,
|
|
2712
|
+
coop: CooperativeSchema,
|
|
2713
|
+
vars: VarsSchema,
|
|
2714
|
+
decision: decisionSchema,
|
|
2715
|
+
common_user: CommonUserSchema,
|
|
2716
|
+
contributor_contract_number: { type: "string" },
|
|
2717
|
+
contributor_contract_created_at: { type: "string" },
|
|
2718
|
+
blagorost_agreement_number: { type: "string" },
|
|
2719
|
+
blagorost_agreement_created_at: { type: "string" },
|
|
2720
|
+
property_hash: { type: "string" },
|
|
2721
|
+
property_short_hash: { type: "string" },
|
|
2722
|
+
property_name: { type: "string" },
|
|
2723
|
+
property_description: { type: "string" },
|
|
2724
|
+
property_quantity: { type: "string" },
|
|
2725
|
+
property_unit: { type: "string" },
|
|
2726
|
+
property_amount: { type: "string" }
|
|
2727
|
+
},
|
|
2728
|
+
required: ["meta", "coop", "vars", "decision", "common_user", "contributor_contract_number", "contributor_contract_created_at", "blagorost_agreement_number", "blagorost_agreement_created_at", "property_hash", "property_short_hash", "property_name", "property_description", "property_quantity", "property_unit", "property_amount"],
|
|
2685
2729
|
additionalProperties: true
|
|
2686
2730
|
};
|
|
2687
2731
|
const Template$K = {
|
|
@@ -5046,7 +5090,7 @@ function latestMinorOf(versions, major) {
|
|
|
5046
5090
|
|
|
5047
5091
|
const name = "@coopenomics/docs-factory";
|
|
5048
5092
|
const type = "module";
|
|
5049
|
-
const version = "1.
|
|
5093
|
+
const version = "1.4.0";
|
|
5050
5094
|
const description = "Фабрика документов цифрового кооператива: сборка документов по шаблонам, сборщики всех видов документов, версии сборщиков";
|
|
5051
5095
|
const author = "Alex Ant <chairman.voskhod@gmail.com>";
|
|
5052
5096
|
const license = "MIT";
|
|
@@ -7480,8 +7524,8 @@ const Factory$19 = defineBuilder()({
|
|
|
7480
7524
|
vars: () => f.getVars(data.coopname, data.block_num),
|
|
7481
7525
|
coop: () => f.getCooperative(data.coopname, data.block_num),
|
|
7482
7526
|
userData: () => f.getUser(data.username, data.block_num),
|
|
7483
|
-
blagorostAgreementUdata: udata(
|
|
7484
|
-
blagorostAgreementCreatedAtUdata: udata(
|
|
7527
|
+
blagorostAgreementUdata: udata(docsTemplates.UdataKey.BLAGOROST_AGREEMENT_NUMBER),
|
|
7528
|
+
blagorostAgreementCreatedAtUdata: udata(docsTemplates.UdataKey.BLAGOROST_AGREEMENT_CREATED_AT),
|
|
7485
7529
|
docData: () => f.loadDocData(data)
|
|
7486
7530
|
};
|
|
7487
7531
|
},
|
|
@@ -7520,7 +7564,7 @@ const Factory$18 = defineBuilder()({
|
|
|
7520
7564
|
coop: () => f.getCooperative(data.coopname, data.block_num),
|
|
7521
7565
|
vars: () => f.getVars(data.coopname, data.block_num),
|
|
7522
7566
|
userData: () => f.getUser(data.username, data.block_num),
|
|
7523
|
-
contributorContractUdata: () => f.getUdata({ coopname: data.coopname, username: data.username, key:
|
|
7567
|
+
contributorContractUdata: () => f.getUdata({ coopname: data.coopname, username: data.username, key: docsTemplates.UdataKey.BLAGOROST_CONTRIBUTOR_CONTRACT_NUMBER, block_num: data.block_num })
|
|
7524
7568
|
}),
|
|
7525
7569
|
assemble: ({ data, meta, reads: { coop, vars, userData, contributorContractUdata } }) => {
|
|
7526
7570
|
if (!vars.generation_contract_template?.protocol_number || !vars.generation_contract_template?.protocol_day_month_year)
|
|
@@ -7555,10 +7599,10 @@ const Factory$17 = defineBuilder()({
|
|
|
7555
7599
|
coop: () => f.getCooperative(data.coopname, data.block_num),
|
|
7556
7600
|
vars: () => f.getVars(data.coopname, data.block_num),
|
|
7557
7601
|
userData: () => f.getUser(data.username, data.block_num),
|
|
7558
|
-
generatorAgreementUdata: udata(
|
|
7559
|
-
generatorAgreementCreatedAtUdata: udata(
|
|
7560
|
-
contributorContractUdata: udata(
|
|
7561
|
-
contributorContractCreatedAtUdata: udata(
|
|
7602
|
+
generatorAgreementUdata: udata(docsTemplates.UdataKey.GENERATOR_AGREEMENT_NUMBER),
|
|
7603
|
+
generatorAgreementCreatedAtUdata: udata(docsTemplates.UdataKey.GENERATOR_AGREEMENT_CREATED_AT),
|
|
7604
|
+
contributorContractUdata: udata(docsTemplates.UdataKey.BLAGOROST_CONTRIBUTOR_CONTRACT_NUMBER),
|
|
7605
|
+
contributorContractCreatedAtUdata: udata(docsTemplates.UdataKey.BLAGOROST_CONTRIBUTOR_CONTRACT_CREATED_AT)
|
|
7562
7606
|
};
|
|
7563
7607
|
},
|
|
7564
7608
|
assemble: ({ data, meta, reads: { coop, vars, userData, generatorAgreementUdata, generatorAgreementCreatedAtUdata, contributorContractUdata, contributorContractCreatedAtUdata } }) => {
|
|
@@ -7602,10 +7646,10 @@ const Factory$16 = defineBuilder()({
|
|
|
7602
7646
|
coop: () => f.getCooperative(data.coopname, data.block_num),
|
|
7603
7647
|
vars: () => f.getVars(data.coopname, data.block_num),
|
|
7604
7648
|
userData: () => f.getUser(data.username, data.block_num),
|
|
7605
|
-
generatorAgreementUdata: udata(
|
|
7606
|
-
generatorAgreementCreatedAtUdata: udata(
|
|
7607
|
-
contributorContractUdata: udata(
|
|
7608
|
-
contributorContractCreatedAtUdata: udata(
|
|
7649
|
+
generatorAgreementUdata: udata(docsTemplates.UdataKey.GENERATOR_AGREEMENT_NUMBER),
|
|
7650
|
+
generatorAgreementCreatedAtUdata: udata(docsTemplates.UdataKey.GENERATOR_AGREEMENT_CREATED_AT),
|
|
7651
|
+
contributorContractUdata: udata(docsTemplates.UdataKey.BLAGOROST_CONTRIBUTOR_CONTRACT_NUMBER),
|
|
7652
|
+
contributorContractCreatedAtUdata: udata(docsTemplates.UdataKey.BLAGOROST_CONTRIBUTOR_CONTRACT_CREATED_AT)
|
|
7609
7653
|
};
|
|
7610
7654
|
},
|
|
7611
7655
|
assemble: ({ data, meta, reads: { coop, vars, userData, generatorAgreementUdata, generatorAgreementCreatedAtUdata, contributorContractUdata, contributorContractCreatedAtUdata } }) => {
|
|
@@ -7651,11 +7695,11 @@ const Factory$15 = defineBuilder()({
|
|
|
7651
7695
|
coop: () => f.getCooperative(data.coopname, data.block_num),
|
|
7652
7696
|
vars: () => f.getVars(data.coopname, data.block_num),
|
|
7653
7697
|
userData: () => f.getUser(data.username, data.block_num),
|
|
7654
|
-
storageAgreementUdata: udata(
|
|
7655
|
-
storageAgreementCreatedAtUdata: udata(
|
|
7656
|
-
contributorContractUdata: udata(
|
|
7657
|
-
generatorAgreementUdata: udata(
|
|
7658
|
-
generatorAgreementCreatedAtUdata: udata(
|
|
7698
|
+
storageAgreementUdata: udata(docsTemplates.UdataKey.BLAGOROST_STORAGE_AGREEMENT_NUMBER),
|
|
7699
|
+
storageAgreementCreatedAtUdata: udata(docsTemplates.UdataKey.BLAGOROST_STORAGE_AGREEMENT_CREATED_AT),
|
|
7700
|
+
contributorContractUdata: udata(docsTemplates.UdataKey.BLAGOROST_CONTRIBUTOR_CONTRACT_NUMBER),
|
|
7701
|
+
generatorAgreementUdata: udata(docsTemplates.UdataKey.GENERATOR_AGREEMENT_NUMBER),
|
|
7702
|
+
generatorAgreementCreatedAtUdata: udata(docsTemplates.UdataKey.GENERATOR_AGREEMENT_CREATED_AT)
|
|
7659
7703
|
};
|
|
7660
7704
|
},
|
|
7661
7705
|
assemble: ({ data, meta, reads: { coop, vars, userData, storageAgreementUdata, storageAgreementCreatedAtUdata, contributorContractUdata, generatorAgreementUdata, generatorAgreementCreatedAtUdata } }) => {
|
|
@@ -7704,9 +7748,9 @@ const Factory$14 = defineBuilder()({
|
|
|
7704
7748
|
coop: () => f.getCooperative(data.coopname, data.block_num),
|
|
7705
7749
|
vars: () => f.getVars(data.coopname, data.block_num),
|
|
7706
7750
|
userData: () => f.getUser(data.username, data.block_num),
|
|
7707
|
-
blagorostAgreementUdata: udata(
|
|
7708
|
-
contributorContractUdata: udata(
|
|
7709
|
-
contributorContractCreatedAtUdata: udata(
|
|
7751
|
+
blagorostAgreementUdata: udata(docsTemplates.UdataKey.BLAGOROST_AGREEMENT_NUMBER),
|
|
7752
|
+
contributorContractUdata: udata(docsTemplates.UdataKey.BLAGOROST_CONTRIBUTOR_CONTRACT_NUMBER),
|
|
7753
|
+
contributorContractCreatedAtUdata: udata(docsTemplates.UdataKey.BLAGOROST_CONTRIBUTOR_CONTRACT_CREATED_AT)
|
|
7710
7754
|
};
|
|
7711
7755
|
},
|
|
7712
7756
|
assemble: ({ data, meta, reads: { coop, vars, userData, blagorostAgreementUdata, contributorContractUdata, contributorContractCreatedAtUdata } }) => {
|
|
@@ -7905,10 +7949,10 @@ const Factory$Z = defineBuilder()({
|
|
|
7905
7949
|
coop: () => f.getCooperative(data.coopname, data.block_num),
|
|
7906
7950
|
vars: () => f.getVars(data.coopname, data.block_num),
|
|
7907
7951
|
userData: () => f.getUser(data.username, data.block_num),
|
|
7908
|
-
contributorContractUdata: udata(
|
|
7909
|
-
contributorContractCreatedAtUdata: udata(
|
|
7910
|
-
blagorostAgreementUdata: udata(
|
|
7911
|
-
blagorostAgreementCreatedAtUdata: udata(
|
|
7952
|
+
contributorContractUdata: udata(docsTemplates.UdataKey.BLAGOROST_CONTRIBUTOR_CONTRACT_NUMBER),
|
|
7953
|
+
contributorContractCreatedAtUdata: udata(docsTemplates.UdataKey.BLAGOROST_CONTRIBUTOR_CONTRACT_CREATED_AT),
|
|
7954
|
+
blagorostAgreementUdata: udata(docsTemplates.UdataKey.BLAGOROST_AGREEMENT_NUMBER),
|
|
7955
|
+
blagorostAgreementCreatedAtUdata: udata(docsTemplates.UdataKey.BLAGOROST_AGREEMENT_CREATED_AT)
|
|
7912
7956
|
};
|
|
7913
7957
|
},
|
|
7914
7958
|
assemble: ({ data, meta, reads: { coop, vars, userData, contributorContractUdata, contributorContractCreatedAtUdata, blagorostAgreementUdata, blagorostAgreementCreatedAtUdata } }) => {
|
|
@@ -7952,10 +7996,10 @@ const Factory$Y = defineBuilder()({
|
|
|
7952
7996
|
return {
|
|
7953
7997
|
vars: () => f.getVars(data.coopname, data.block_num),
|
|
7954
7998
|
userData: () => f.getUser(data.username, data.block_num),
|
|
7955
|
-
contributorContractUdata: udata(
|
|
7956
|
-
contributorContractCreatedAtUdata: udata(
|
|
7957
|
-
generatorAgreementUdata: udata(
|
|
7958
|
-
generatorAgreementCreatedAtUdata: udata(
|
|
7999
|
+
contributorContractUdata: udata(docsTemplates.UdataKey.BLAGOROST_CONTRIBUTOR_CONTRACT_NUMBER),
|
|
8000
|
+
contributorContractCreatedAtUdata: udata(docsTemplates.UdataKey.BLAGOROST_CONTRIBUTOR_CONTRACT_CREATED_AT),
|
|
8001
|
+
generatorAgreementUdata: udata(docsTemplates.UdataKey.GENERATOR_AGREEMENT_NUMBER),
|
|
8002
|
+
generatorAgreementCreatedAtUdata: udata(docsTemplates.UdataKey.GENERATOR_AGREEMENT_CREATED_AT)
|
|
7959
8003
|
};
|
|
7960
8004
|
},
|
|
7961
8005
|
assemble: ({ data, meta, reads: { vars, userData, contributorContractUdata, contributorContractCreatedAtUdata, generatorAgreementUdata, generatorAgreementCreatedAtUdata } }) => {
|
|
@@ -8017,10 +8061,10 @@ const Factory$W = defineBuilder()({
|
|
|
8017
8061
|
coop: () => f.getCooperative(data.coopname, data.block_num),
|
|
8018
8062
|
vars: () => f.getVars(data.coopname, data.block_num),
|
|
8019
8063
|
userData: () => f.getUser(data.username, data.block_num),
|
|
8020
|
-
contributorContractUdata: udata(
|
|
8021
|
-
contributorContractCreatedAtUdata: udata(
|
|
8022
|
-
blagorostAgreementUdata: udata(
|
|
8023
|
-
blagorostAgreementCreatedAtUdata: udata(
|
|
8064
|
+
contributorContractUdata: udata(docsTemplates.UdataKey.BLAGOROST_CONTRIBUTOR_CONTRACT_NUMBER),
|
|
8065
|
+
contributorContractCreatedAtUdata: udata(docsTemplates.UdataKey.BLAGOROST_CONTRIBUTOR_CONTRACT_CREATED_AT),
|
|
8066
|
+
blagorostAgreementUdata: udata(docsTemplates.UdataKey.BLAGOROST_AGREEMENT_NUMBER),
|
|
8067
|
+
blagorostAgreementCreatedAtUdata: udata(docsTemplates.UdataKey.BLAGOROST_AGREEMENT_CREATED_AT)
|
|
8024
8068
|
};
|
|
8025
8069
|
},
|
|
8026
8070
|
assemble: ({ data, meta, reads: { coop, vars, userData, contributorContractUdata, contributorContractCreatedAtUdata, blagorostAgreementUdata, blagorostAgreementCreatedAtUdata } }) => {
|
|
@@ -8066,10 +8110,10 @@ const Factory$V = defineBuilder()({
|
|
|
8066
8110
|
coop: () => f.getCooperative(data.coopname, data.block_num),
|
|
8067
8111
|
vars: () => f.getVars(data.coopname, data.block_num),
|
|
8068
8112
|
userData: () => f.getUser(data.username, data.block_num),
|
|
8069
|
-
contributorContractUdata: udata(
|
|
8070
|
-
contributorContractCreatedAtUdata: udata(
|
|
8071
|
-
blagorostAgreementUdata: udata(
|
|
8072
|
-
blagorostAgreementCreatedAtUdata: udata(
|
|
8113
|
+
contributorContractUdata: udata(docsTemplates.UdataKey.BLAGOROST_CONTRIBUTOR_CONTRACT_NUMBER),
|
|
8114
|
+
contributorContractCreatedAtUdata: udata(docsTemplates.UdataKey.BLAGOROST_CONTRIBUTOR_CONTRACT_CREATED_AT),
|
|
8115
|
+
blagorostAgreementUdata: udata(docsTemplates.UdataKey.BLAGOROST_AGREEMENT_NUMBER),
|
|
8116
|
+
blagorostAgreementCreatedAtUdata: udata(docsTemplates.UdataKey.BLAGOROST_AGREEMENT_CREATED_AT)
|
|
8073
8117
|
};
|
|
8074
8118
|
},
|
|
8075
8119
|
derive: ({ data, f, meta, reads: { coop } }) => ({
|
|
@@ -8119,10 +8163,10 @@ const Factory$U = defineBuilder()({
|
|
|
8119
8163
|
coop: () => f.getCooperative(data.coopname, data.block_num),
|
|
8120
8164
|
vars: () => f.getVars(data.coopname, data.block_num),
|
|
8121
8165
|
userData: () => f.getUser(data.username, data.block_num),
|
|
8122
|
-
contributorContractUdata: udata(
|
|
8123
|
-
contributorContractCreatedAtUdata: udata(
|
|
8124
|
-
blagorostAgreementUdata: udata(
|
|
8125
|
-
blagorostAgreementCreatedAtUdata: udata(
|
|
8166
|
+
contributorContractUdata: udata(docsTemplates.UdataKey.BLAGOROST_CONTRIBUTOR_CONTRACT_NUMBER),
|
|
8167
|
+
contributorContractCreatedAtUdata: udata(docsTemplates.UdataKey.BLAGOROST_CONTRIBUTOR_CONTRACT_CREATED_AT),
|
|
8168
|
+
blagorostAgreementUdata: udata(docsTemplates.UdataKey.BLAGOROST_AGREEMENT_NUMBER),
|
|
8169
|
+
blagorostAgreementCreatedAtUdata: udata(docsTemplates.UdataKey.BLAGOROST_AGREEMENT_CREATED_AT)
|
|
8126
8170
|
};
|
|
8127
8171
|
},
|
|
8128
8172
|
derive: ({ data, f, reads: { coop } }) => ({
|
|
@@ -8227,16 +8271,74 @@ const _1062_GenerationPropertyInvestAct = {
|
|
|
8227
8271
|
Template: GenerationPropertyInvestAct
|
|
8228
8272
|
};
|
|
8229
8273
|
|
|
8274
|
+
async function getBlagorostContractRef(sources, data) {
|
|
8275
|
+
const read = (key) => sources.udata({ coopname: data.coopname, username: data.username, key, block_num: data.block_num });
|
|
8276
|
+
const [contractNumber, contractCreatedAt, agreementNumber, agreementCreatedAt] = await Promise.all([
|
|
8277
|
+
read(docsTemplates.UdataKey.BLAGOROST_CONTRIBUTOR_CONTRACT_NUMBER),
|
|
8278
|
+
read(docsTemplates.UdataKey.BLAGOROST_CONTRIBUTOR_CONTRACT_CREATED_AT),
|
|
8279
|
+
read(docsTemplates.UdataKey.BLAGOROST_AGREEMENT_NUMBER),
|
|
8280
|
+
read(docsTemplates.UdataKey.BLAGOROST_AGREEMENT_CREATED_AT)
|
|
8281
|
+
]);
|
|
8282
|
+
if (!contractNumber?.value)
|
|
8283
|
+
throw new Error("\u0414\u0430\u043D\u043D\u044B\u0435 \u0434\u043E\u0433\u043E\u0432\u043E\u0440\u0430 \u0423\u0425\u0414 \u0443\u0447\u0430\u0441\u0442\u043D\u0438\u043A\u0430 \u043D\u0435 \u043D\u0430\u0439\u0434\u0435\u043D\u044B \u0432 Udata");
|
|
8284
|
+
if (!contractCreatedAt?.value)
|
|
8285
|
+
throw new Error("\u0414\u0430\u0442\u0430 \u0441\u043E\u0437\u0434\u0430\u043D\u0438\u044F \u0434\u043E\u0433\u043E\u0432\u043E\u0440\u0430 \u0423\u0425\u0414 \u0443\u0447\u0430\u0441\u0442\u043D\u0438\u043A\u0430 \u043D\u0435 \u043D\u0430\u0439\u0434\u0435\u043D\u0430 \u0432 Udata");
|
|
8286
|
+
if (!agreementNumber?.value)
|
|
8287
|
+
throw new Error("\u0414\u0430\u043D\u043D\u044B\u0435 \u0441\u043E\u0433\u043B\u0430\u0448\u0435\u043D\u0438\u044F \u0431\u043B\u0430\u0433\u043E\u0440\u043E\u0441\u0442\u0430 \u043D\u0435 \u043D\u0430\u0439\u0434\u0435\u043D\u044B \u0432 Udata");
|
|
8288
|
+
if (!agreementCreatedAt?.value)
|
|
8289
|
+
throw new Error("\u0414\u0430\u0442\u0430 \u0441\u043E\u0437\u0434\u0430\u043D\u0438\u044F \u0441\u043E\u0433\u043B\u0430\u0448\u0435\u043D\u0438\u044F \u0431\u043B\u0430\u0433\u043E\u0440\u043E\u0441\u0442\u0430 \u043D\u0435 \u043D\u0430\u0439\u0434\u0435\u043D\u0430 \u0432 Udata");
|
|
8290
|
+
return {
|
|
8291
|
+
contributor_contract_number: String(contractNumber.value),
|
|
8292
|
+
contributor_contract_created_at: String(contractCreatedAt.value),
|
|
8293
|
+
blagorost_agreement_number: String(agreementNumber.value),
|
|
8294
|
+
blagorost_agreement_created_at: String(agreementCreatedAt.value)
|
|
8295
|
+
};
|
|
8296
|
+
}
|
|
8297
|
+
function propertyPositionFields(data) {
|
|
8298
|
+
return {
|
|
8299
|
+
property_hash: data.property_hash,
|
|
8300
|
+
property_short_hash: shortHash(data.property_hash),
|
|
8301
|
+
property_name: data.property_name,
|
|
8302
|
+
property_description: data.property_description,
|
|
8303
|
+
property_quantity: data.property_quantity,
|
|
8304
|
+
property_unit: data.property_unit,
|
|
8305
|
+
property_amount: formatAsset(data.property_amount)
|
|
8306
|
+
};
|
|
8307
|
+
}
|
|
8308
|
+
|
|
8230
8309
|
const Factory$O = defineBuilder()({
|
|
8231
8310
|
registry_id: registry_id$M,
|
|
8232
8311
|
version: "1.0",
|
|
8233
8312
|
reads: () => ({}),
|
|
8313
|
+
// Заглушка 1.0 собирала только мету и документов в цепях не дала; модель шаблона
|
|
8314
|
+
// с версии 1.1 шире (позиция имущества, реквизиты договоров). Код версии заморожен.
|
|
8315
|
+
// @ts-expect-error модель 1.1 требует полей, которых у заглушки нет
|
|
8234
8316
|
assemble: ({ meta }) => ({ meta })
|
|
8235
8317
|
});
|
|
8318
|
+
const Factory_1_1$2 = defineBuilder()({
|
|
8319
|
+
registry_id: registry_id$M,
|
|
8320
|
+
version: "1.1",
|
|
8321
|
+
reads: ({ data, f, s }) => ({
|
|
8322
|
+
coop: () => f.getCooperative(data.coopname, data.block_num),
|
|
8323
|
+
vars: () => f.getVars(data.coopname, data.block_num),
|
|
8324
|
+
userData: () => f.getUser(data.username, data.block_num),
|
|
8325
|
+
contract: () => getBlagorostContractRef(s, data)
|
|
8326
|
+
}),
|
|
8327
|
+
assemble: ({ data, meta, reads: { coop, vars, userData, contract } }) => ({
|
|
8328
|
+
meta,
|
|
8329
|
+
coop,
|
|
8330
|
+
vars,
|
|
8331
|
+
common_user: commonUser(userData),
|
|
8332
|
+
...contract,
|
|
8333
|
+
...propertyPositionFields(data)
|
|
8334
|
+
}),
|
|
8335
|
+
signer: ({ reads: { userData } }) => commonUser(userData).full_name_or_short_name
|
|
8336
|
+
});
|
|
8236
8337
|
|
|
8237
8338
|
const _1070_CapitalizationPropertyInvestStatement = {
|
|
8238
8339
|
__proto__: null,
|
|
8239
8340
|
Factory: Factory$O,
|
|
8341
|
+
Factory_1_1: Factory_1_1$2,
|
|
8240
8342
|
Template: CapitalizationPropertyInvestStatement
|
|
8241
8343
|
};
|
|
8242
8344
|
|
|
@@ -8244,12 +8346,38 @@ const Factory$N = defineBuilder()({
|
|
|
8244
8346
|
registry_id: registry_id$L,
|
|
8245
8347
|
version: "1.0",
|
|
8246
8348
|
reads: () => ({}),
|
|
8349
|
+
// Заглушка 1.0 собирала только мету и документов в цепях не дала; модель шаблона
|
|
8350
|
+
// с версии 1.1 шире (позиция имущества, реквизиты договоров). Код версии заморожен.
|
|
8351
|
+
// @ts-expect-error модель 1.1 требует полей, которых у заглушки нет
|
|
8247
8352
|
assemble: ({ meta }) => ({ meta })
|
|
8248
8353
|
});
|
|
8354
|
+
const Factory_1_1$1 = defineBuilder()({
|
|
8355
|
+
registry_id: registry_id$L,
|
|
8356
|
+
version: "1.1",
|
|
8357
|
+
reads: ({ data, f, s }) => ({
|
|
8358
|
+
coop: () => f.getCooperative(data.coopname, data.block_num),
|
|
8359
|
+
vars: () => f.getVars(data.coopname, data.block_num),
|
|
8360
|
+
userData: () => f.getUser(data.username, data.block_num),
|
|
8361
|
+
contract: () => getBlagorostContractRef(s, data)
|
|
8362
|
+
}),
|
|
8363
|
+
derive: ({ data, f, meta, reads: { coop } }) => ({
|
|
8364
|
+
decision: () => f.getDecision(coop, data.coopname, data.decision_id, meta.created_at, meta.timezone)
|
|
8365
|
+
}),
|
|
8366
|
+
assemble: ({ data, meta, reads: { coop, vars, userData, contract }, derived: { decision } }) => ({
|
|
8367
|
+
meta,
|
|
8368
|
+
coop,
|
|
8369
|
+
vars,
|
|
8370
|
+
decision,
|
|
8371
|
+
common_user: commonUser(userData),
|
|
8372
|
+
...contract,
|
|
8373
|
+
...propertyPositionFields(data)
|
|
8374
|
+
})
|
|
8375
|
+
});
|
|
8249
8376
|
|
|
8250
8377
|
const _1071_CapitalizationPropertyInvestDecision = {
|
|
8251
8378
|
__proto__: null,
|
|
8252
8379
|
Factory: Factory$N,
|
|
8380
|
+
Factory_1_1: Factory_1_1$1,
|
|
8253
8381
|
Template: CapitalizationPropertyInvestDecision
|
|
8254
8382
|
};
|
|
8255
8383
|
|
|
@@ -8257,12 +8385,39 @@ const Factory$M = defineBuilder()({
|
|
|
8257
8385
|
registry_id: registry_id$K,
|
|
8258
8386
|
version: "1.0",
|
|
8259
8387
|
reads: () => ({}),
|
|
8388
|
+
// Заглушка 1.0 собирала только мету и документов в цепях не дала; модель шаблона
|
|
8389
|
+
// с версии 1.1 шире (позиция имущества, реквизиты договоров). Код версии заморожен.
|
|
8390
|
+
// @ts-expect-error модель 1.1 требует полей, которых у заглушки нет
|
|
8260
8391
|
assemble: ({ meta }) => ({ meta })
|
|
8261
8392
|
});
|
|
8393
|
+
const Factory_1_1 = defineBuilder()({
|
|
8394
|
+
registry_id: registry_id$K,
|
|
8395
|
+
version: "1.1",
|
|
8396
|
+
reads: ({ data, f, s }) => ({
|
|
8397
|
+
coop: () => f.getCooperative(data.coopname, data.block_num),
|
|
8398
|
+
vars: () => f.getVars(data.coopname, data.block_num),
|
|
8399
|
+
userData: () => f.getUser(data.username, data.block_num),
|
|
8400
|
+
contract: () => getBlagorostContractRef(s, data)
|
|
8401
|
+
}),
|
|
8402
|
+
derive: ({ data, f, reads: { coop } }) => ({
|
|
8403
|
+
decision: () => f.getApprovedDecision(coop, data.coopname, data.decision_id)
|
|
8404
|
+
}),
|
|
8405
|
+
assemble: ({ data, meta, reads: { coop, vars, userData, contract }, derived: { decision } }) => ({
|
|
8406
|
+
meta,
|
|
8407
|
+
coop,
|
|
8408
|
+
vars,
|
|
8409
|
+
decision,
|
|
8410
|
+
common_user: commonUser(userData),
|
|
8411
|
+
...contract,
|
|
8412
|
+
...propertyPositionFields(data)
|
|
8413
|
+
}),
|
|
8414
|
+
signer: ({ reads: { userData } }) => commonUser(userData).full_name_or_short_name
|
|
8415
|
+
});
|
|
8262
8416
|
|
|
8263
8417
|
const _1072_CapitalizationPropertyInvestAct = {
|
|
8264
8418
|
__proto__: null,
|
|
8265
8419
|
Factory: Factory$M,
|
|
8420
|
+
Factory_1_1: Factory_1_1,
|
|
8266
8421
|
Template: CapitalizationPropertyInvestAct
|
|
8267
8422
|
};
|
|
8268
8423
|
|
|
@@ -8275,8 +8430,8 @@ const Factory$L = defineBuilder()({
|
|
|
8275
8430
|
coop: () => f.getCooperative(data.coopname, data.block_num),
|
|
8276
8431
|
vars: () => f.getVars(data.coopname, data.block_num),
|
|
8277
8432
|
userData: () => f.getUser(data.username, data.block_num),
|
|
8278
|
-
contributorContractUdata: udata(
|
|
8279
|
-
contributorContractCreatedAtUdata: udata(
|
|
8433
|
+
contributorContractUdata: udata(docsTemplates.UdataKey.BLAGOROST_CONTRIBUTOR_CONTRACT_NUMBER),
|
|
8434
|
+
contributorContractCreatedAtUdata: udata(docsTemplates.UdataKey.BLAGOROST_CONTRIBUTOR_CONTRACT_CREATED_AT)
|
|
8280
8435
|
};
|
|
8281
8436
|
},
|
|
8282
8437
|
assemble: ({ data, meta, reads: { coop, vars, userData, contributorContractUdata, contributorContractCreatedAtUdata } }) => {
|
|
@@ -8817,8 +8972,8 @@ const Factory$t = defineBuilder()({
|
|
|
8817
8972
|
vars: () => f.getVars(data.coopname, data.block_num),
|
|
8818
8973
|
coop: () => f.getCooperative(data.coopname, data.block_num),
|
|
8819
8974
|
user: () => f.getUser(data.username, data.block_num),
|
|
8820
|
-
generatorAgreementUdata: udata(
|
|
8821
|
-
generatorAgreementCreatedAtUdata: udata(
|
|
8975
|
+
generatorAgreementUdata: udata(docsTemplates.UdataKey.GENERATOR_AGREEMENT_NUMBER),
|
|
8976
|
+
generatorAgreementCreatedAtUdata: udata(docsTemplates.UdataKey.GENERATOR_AGREEMENT_CREATED_AT),
|
|
8822
8977
|
docData: () => f.loadDocData(data)
|
|
8823
8978
|
};
|
|
8824
8979
|
},
|
|
@@ -8897,8 +9052,8 @@ const Factory$q = defineBuilder()({
|
|
|
8897
9052
|
coop: () => f.getCooperative(data.coopname, data.block_num),
|
|
8898
9053
|
vars: () => f.getVars(data.coopname, data.block_num),
|
|
8899
9054
|
userData: () => f.getUser(data.username, data.block_num),
|
|
8900
|
-
numberUdata: () => data.marketplace_agreement_number ? Promise.resolve(null) : udata(
|
|
8901
|
-
createdAtUdata: () => data.marketplace_agreement_created_at ? Promise.resolve(null) : udata(
|
|
9055
|
+
numberUdata: () => data.marketplace_agreement_number ? Promise.resolve(null) : udata(docsTemplates.UdataKey.MARKETPLACE_AGREEMENT_NUMBER),
|
|
9056
|
+
createdAtUdata: () => data.marketplace_agreement_created_at ? Promise.resolve(null) : udata(docsTemplates.UdataKey.MARKETPLACE_AGREEMENT_CREATED_AT)
|
|
8902
9057
|
};
|
|
8903
9058
|
},
|
|
8904
9059
|
assemble: ({ data, meta, reads: { coop, vars, userData, numberUdata, createdAtUdata } }) => {
|
|
@@ -9273,8 +9428,8 @@ const Factory$f = defineBuilder()({
|
|
|
9273
9428
|
coop: () => f.getCooperative(data.coopname, data.block_num),
|
|
9274
9429
|
vars: () => f.getVars(data.coopname, data.block_num),
|
|
9275
9430
|
userData: () => f.getUser(data.username, data.block_num),
|
|
9276
|
-
numberRow: () => data.agreement_number ? Promise.resolve(null) : udata(
|
|
9277
|
-
createdAtRow: () => data.agreement_created_at ? Promise.resolve(null) : udata(
|
|
9431
|
+
numberRow: () => data.agreement_number ? Promise.resolve(null) : udata(docsTemplates.UdataKey.EDUCATION_PARENT_AGREEMENT_NUMBER),
|
|
9432
|
+
createdAtRow: () => data.agreement_created_at ? Promise.resolve(null) : udata(docsTemplates.UdataKey.EDUCATION_PARENT_AGREEMENT_CREATED_AT)
|
|
9278
9433
|
};
|
|
9279
9434
|
},
|
|
9280
9435
|
assemble: ({ data, meta, reads: { coop, vars, userData, numberRow, createdAtRow } }) => {
|
|
@@ -9309,8 +9464,8 @@ const Factory$e = defineBuilder()({
|
|
|
9309
9464
|
coop: () => f.getCooperative(data.coopname, data.block_num),
|
|
9310
9465
|
vars: () => f.getVars(data.coopname, data.block_num),
|
|
9311
9466
|
userData: () => f.getUser(data.username, data.block_num),
|
|
9312
|
-
numberRow: () => data.agreement_number ? Promise.resolve(null) : udata(
|
|
9313
|
-
createdAtRow: () => data.agreement_created_at ? Promise.resolve(null) : udata(
|
|
9467
|
+
numberRow: () => data.agreement_number ? Promise.resolve(null) : udata(docsTemplates.UdataKey.EDUCATION_TEACHER_AGREEMENT_NUMBER),
|
|
9468
|
+
createdAtRow: () => data.agreement_created_at ? Promise.resolve(null) : udata(docsTemplates.UdataKey.EDUCATION_TEACHER_AGREEMENT_CREATED_AT)
|
|
9314
9469
|
};
|
|
9315
9470
|
},
|
|
9316
9471
|
assemble: ({ data, meta, reads: { coop, vars, userData, numberRow, createdAtRow } }) => {
|
|
@@ -9345,8 +9500,8 @@ const Factory$d = defineBuilder()({
|
|
|
9345
9500
|
coop: () => f.getCooperative(data.coopname, data.block_num),
|
|
9346
9501
|
vars: () => f.getVars(data.coopname, data.block_num),
|
|
9347
9502
|
userData: () => f.getUser(data.username, data.block_num),
|
|
9348
|
-
numberRow: () => data.contract_number ? Promise.resolve(null) : udata(
|
|
9349
|
-
createdAtRow: () => data.contract_created_at ? Promise.resolve(null) : udata(
|
|
9503
|
+
numberRow: () => data.contract_number ? Promise.resolve(null) : udata(docsTemplates.UdataKey.EDUCATION_CONTRACT_NUMBER),
|
|
9504
|
+
createdAtRow: () => data.contract_created_at ? Promise.resolve(null) : udata(docsTemplates.UdataKey.EDUCATION_CONTRACT_CREATED_AT)
|
|
9350
9505
|
};
|
|
9351
9506
|
},
|
|
9352
9507
|
assemble: ({ data, meta, reads: { coop, vars, userData, numberRow, createdAtRow } }) => {
|
|
@@ -9374,8 +9529,8 @@ const _3006_EducationParticipationContract = {
|
|
|
9374
9529
|
|
|
9375
9530
|
async function getEducationContractRef(sources, data) {
|
|
9376
9531
|
const [number, createdAt] = await Promise.all([
|
|
9377
|
-
sources.udata({ coopname: data.coopname, username: data.username, key:
|
|
9378
|
-
sources.udata({ coopname: data.coopname, username: data.username, key:
|
|
9532
|
+
sources.udata({ coopname: data.coopname, username: data.username, key: docsTemplates.UdataKey.EDUCATION_CONTRACT_NUMBER, block_num: data.block_num }),
|
|
9533
|
+
sources.udata({ coopname: data.coopname, username: data.username, key: docsTemplates.UdataKey.EDUCATION_CONTRACT_CREATED_AT, block_num: data.block_num })
|
|
9379
9534
|
]);
|
|
9380
9535
|
if (!number?.value || !createdAt?.value)
|
|
9381
9536
|
throw new Error("\u041D\u043E\u043C\u0435\u0440 \u0438 \u0434\u0430\u0442\u0430 \u0434\u043E\u0433\u043E\u0432\u043E\u0440\u0430 \u0443\u0447\u0430\u0441\u0442\u0438\u044F \u0432 \u0445\u043E\u0437\u044F\u0439\u0441\u0442\u0432\u0435\u043D\u043D\u043E\u0439 \u0434\u0435\u044F\u0442\u0435\u043B\u044C\u043D\u043E\u0441\u0442\u0438 \u043F\u0440\u0435\u043F\u043E\u0434\u0430\u0432\u0430\u0442\u0435\u043B\u044F \u043D\u0435 \u043D\u0430\u0439\u0434\u0435\u043D\u044B \u0432 Udata");
|