@coopenomics/docs-factory 1.2.0 → 1.3.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 +54 -54
- 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 +56 -56
- 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
|
@@ -5046,7 +5046,7 @@ function latestMinorOf(versions, major) {
|
|
|
5046
5046
|
|
|
5047
5047
|
const name = "@coopenomics/docs-factory";
|
|
5048
5048
|
const type = "module";
|
|
5049
|
-
const version = "1.
|
|
5049
|
+
const version = "1.3.0";
|
|
5050
5050
|
const description = "Фабрика документов цифрового кооператива: сборка документов по шаблонам, сборщики всех видов документов, версии сборщиков";
|
|
5051
5051
|
const author = "Alex Ant <chairman.voskhod@gmail.com>";
|
|
5052
5052
|
const license = "MIT";
|
|
@@ -7480,8 +7480,8 @@ const Factory$19 = defineBuilder()({
|
|
|
7480
7480
|
vars: () => f.getVars(data.coopname, data.block_num),
|
|
7481
7481
|
coop: () => f.getCooperative(data.coopname, data.block_num),
|
|
7482
7482
|
userData: () => f.getUser(data.username, data.block_num),
|
|
7483
|
-
blagorostAgreementUdata: udata(
|
|
7484
|
-
blagorostAgreementCreatedAtUdata: udata(
|
|
7483
|
+
blagorostAgreementUdata: udata(docsTemplates.UdataKey.BLAGOROST_AGREEMENT_NUMBER),
|
|
7484
|
+
blagorostAgreementCreatedAtUdata: udata(docsTemplates.UdataKey.BLAGOROST_AGREEMENT_CREATED_AT),
|
|
7485
7485
|
docData: () => f.loadDocData(data)
|
|
7486
7486
|
};
|
|
7487
7487
|
},
|
|
@@ -7520,7 +7520,7 @@ const Factory$18 = defineBuilder()({
|
|
|
7520
7520
|
coop: () => f.getCooperative(data.coopname, data.block_num),
|
|
7521
7521
|
vars: () => f.getVars(data.coopname, data.block_num),
|
|
7522
7522
|
userData: () => f.getUser(data.username, data.block_num),
|
|
7523
|
-
contributorContractUdata: () => f.getUdata({ coopname: data.coopname, username: data.username, key:
|
|
7523
|
+
contributorContractUdata: () => f.getUdata({ coopname: data.coopname, username: data.username, key: docsTemplates.UdataKey.BLAGOROST_CONTRIBUTOR_CONTRACT_NUMBER, block_num: data.block_num })
|
|
7524
7524
|
}),
|
|
7525
7525
|
assemble: ({ data, meta, reads: { coop, vars, userData, contributorContractUdata } }) => {
|
|
7526
7526
|
if (!vars.generation_contract_template?.protocol_number || !vars.generation_contract_template?.protocol_day_month_year)
|
|
@@ -7555,10 +7555,10 @@ const Factory$17 = defineBuilder()({
|
|
|
7555
7555
|
coop: () => f.getCooperative(data.coopname, data.block_num),
|
|
7556
7556
|
vars: () => f.getVars(data.coopname, data.block_num),
|
|
7557
7557
|
userData: () => f.getUser(data.username, data.block_num),
|
|
7558
|
-
generatorAgreementUdata: udata(
|
|
7559
|
-
generatorAgreementCreatedAtUdata: udata(
|
|
7560
|
-
contributorContractUdata: udata(
|
|
7561
|
-
contributorContractCreatedAtUdata: udata(
|
|
7558
|
+
generatorAgreementUdata: udata(docsTemplates.UdataKey.GENERATOR_AGREEMENT_NUMBER),
|
|
7559
|
+
generatorAgreementCreatedAtUdata: udata(docsTemplates.UdataKey.GENERATOR_AGREEMENT_CREATED_AT),
|
|
7560
|
+
contributorContractUdata: udata(docsTemplates.UdataKey.BLAGOROST_CONTRIBUTOR_CONTRACT_NUMBER),
|
|
7561
|
+
contributorContractCreatedAtUdata: udata(docsTemplates.UdataKey.BLAGOROST_CONTRIBUTOR_CONTRACT_CREATED_AT)
|
|
7562
7562
|
};
|
|
7563
7563
|
},
|
|
7564
7564
|
assemble: ({ data, meta, reads: { coop, vars, userData, generatorAgreementUdata, generatorAgreementCreatedAtUdata, contributorContractUdata, contributorContractCreatedAtUdata } }) => {
|
|
@@ -7602,10 +7602,10 @@ const Factory$16 = defineBuilder()({
|
|
|
7602
7602
|
coop: () => f.getCooperative(data.coopname, data.block_num),
|
|
7603
7603
|
vars: () => f.getVars(data.coopname, data.block_num),
|
|
7604
7604
|
userData: () => f.getUser(data.username, data.block_num),
|
|
7605
|
-
generatorAgreementUdata: udata(
|
|
7606
|
-
generatorAgreementCreatedAtUdata: udata(
|
|
7607
|
-
contributorContractUdata: udata(
|
|
7608
|
-
contributorContractCreatedAtUdata: udata(
|
|
7605
|
+
generatorAgreementUdata: udata(docsTemplates.UdataKey.GENERATOR_AGREEMENT_NUMBER),
|
|
7606
|
+
generatorAgreementCreatedAtUdata: udata(docsTemplates.UdataKey.GENERATOR_AGREEMENT_CREATED_AT),
|
|
7607
|
+
contributorContractUdata: udata(docsTemplates.UdataKey.BLAGOROST_CONTRIBUTOR_CONTRACT_NUMBER),
|
|
7608
|
+
contributorContractCreatedAtUdata: udata(docsTemplates.UdataKey.BLAGOROST_CONTRIBUTOR_CONTRACT_CREATED_AT)
|
|
7609
7609
|
};
|
|
7610
7610
|
},
|
|
7611
7611
|
assemble: ({ data, meta, reads: { coop, vars, userData, generatorAgreementUdata, generatorAgreementCreatedAtUdata, contributorContractUdata, contributorContractCreatedAtUdata } }) => {
|
|
@@ -7651,11 +7651,11 @@ const Factory$15 = defineBuilder()({
|
|
|
7651
7651
|
coop: () => f.getCooperative(data.coopname, data.block_num),
|
|
7652
7652
|
vars: () => f.getVars(data.coopname, data.block_num),
|
|
7653
7653
|
userData: () => f.getUser(data.username, data.block_num),
|
|
7654
|
-
storageAgreementUdata: udata(
|
|
7655
|
-
storageAgreementCreatedAtUdata: udata(
|
|
7656
|
-
contributorContractUdata: udata(
|
|
7657
|
-
generatorAgreementUdata: udata(
|
|
7658
|
-
generatorAgreementCreatedAtUdata: udata(
|
|
7654
|
+
storageAgreementUdata: udata(docsTemplates.UdataKey.BLAGOROST_STORAGE_AGREEMENT_NUMBER),
|
|
7655
|
+
storageAgreementCreatedAtUdata: udata(docsTemplates.UdataKey.BLAGOROST_STORAGE_AGREEMENT_CREATED_AT),
|
|
7656
|
+
contributorContractUdata: udata(docsTemplates.UdataKey.BLAGOROST_CONTRIBUTOR_CONTRACT_NUMBER),
|
|
7657
|
+
generatorAgreementUdata: udata(docsTemplates.UdataKey.GENERATOR_AGREEMENT_NUMBER),
|
|
7658
|
+
generatorAgreementCreatedAtUdata: udata(docsTemplates.UdataKey.GENERATOR_AGREEMENT_CREATED_AT)
|
|
7659
7659
|
};
|
|
7660
7660
|
},
|
|
7661
7661
|
assemble: ({ data, meta, reads: { coop, vars, userData, storageAgreementUdata, storageAgreementCreatedAtUdata, contributorContractUdata, generatorAgreementUdata, generatorAgreementCreatedAtUdata } }) => {
|
|
@@ -7704,9 +7704,9 @@ const Factory$14 = defineBuilder()({
|
|
|
7704
7704
|
coop: () => f.getCooperative(data.coopname, data.block_num),
|
|
7705
7705
|
vars: () => f.getVars(data.coopname, data.block_num),
|
|
7706
7706
|
userData: () => f.getUser(data.username, data.block_num),
|
|
7707
|
-
blagorostAgreementUdata: udata(
|
|
7708
|
-
contributorContractUdata: udata(
|
|
7709
|
-
contributorContractCreatedAtUdata: udata(
|
|
7707
|
+
blagorostAgreementUdata: udata(docsTemplates.UdataKey.BLAGOROST_AGREEMENT_NUMBER),
|
|
7708
|
+
contributorContractUdata: udata(docsTemplates.UdataKey.BLAGOROST_CONTRIBUTOR_CONTRACT_NUMBER),
|
|
7709
|
+
contributorContractCreatedAtUdata: udata(docsTemplates.UdataKey.BLAGOROST_CONTRIBUTOR_CONTRACT_CREATED_AT)
|
|
7710
7710
|
};
|
|
7711
7711
|
},
|
|
7712
7712
|
assemble: ({ data, meta, reads: { coop, vars, userData, blagorostAgreementUdata, contributorContractUdata, contributorContractCreatedAtUdata } }) => {
|
|
@@ -7905,10 +7905,10 @@ const Factory$Z = defineBuilder()({
|
|
|
7905
7905
|
coop: () => f.getCooperative(data.coopname, data.block_num),
|
|
7906
7906
|
vars: () => f.getVars(data.coopname, data.block_num),
|
|
7907
7907
|
userData: () => f.getUser(data.username, data.block_num),
|
|
7908
|
-
contributorContractUdata: udata(
|
|
7909
|
-
contributorContractCreatedAtUdata: udata(
|
|
7910
|
-
blagorostAgreementUdata: udata(
|
|
7911
|
-
blagorostAgreementCreatedAtUdata: udata(
|
|
7908
|
+
contributorContractUdata: udata(docsTemplates.UdataKey.BLAGOROST_CONTRIBUTOR_CONTRACT_NUMBER),
|
|
7909
|
+
contributorContractCreatedAtUdata: udata(docsTemplates.UdataKey.BLAGOROST_CONTRIBUTOR_CONTRACT_CREATED_AT),
|
|
7910
|
+
blagorostAgreementUdata: udata(docsTemplates.UdataKey.BLAGOROST_AGREEMENT_NUMBER),
|
|
7911
|
+
blagorostAgreementCreatedAtUdata: udata(docsTemplates.UdataKey.BLAGOROST_AGREEMENT_CREATED_AT)
|
|
7912
7912
|
};
|
|
7913
7913
|
},
|
|
7914
7914
|
assemble: ({ data, meta, reads: { coop, vars, userData, contributorContractUdata, contributorContractCreatedAtUdata, blagorostAgreementUdata, blagorostAgreementCreatedAtUdata } }) => {
|
|
@@ -7952,10 +7952,10 @@ const Factory$Y = defineBuilder()({
|
|
|
7952
7952
|
return {
|
|
7953
7953
|
vars: () => f.getVars(data.coopname, data.block_num),
|
|
7954
7954
|
userData: () => f.getUser(data.username, data.block_num),
|
|
7955
|
-
contributorContractUdata: udata(
|
|
7956
|
-
contributorContractCreatedAtUdata: udata(
|
|
7957
|
-
generatorAgreementUdata: udata(
|
|
7958
|
-
generatorAgreementCreatedAtUdata: udata(
|
|
7955
|
+
contributorContractUdata: udata(docsTemplates.UdataKey.BLAGOROST_CONTRIBUTOR_CONTRACT_NUMBER),
|
|
7956
|
+
contributorContractCreatedAtUdata: udata(docsTemplates.UdataKey.BLAGOROST_CONTRIBUTOR_CONTRACT_CREATED_AT),
|
|
7957
|
+
generatorAgreementUdata: udata(docsTemplates.UdataKey.GENERATOR_AGREEMENT_NUMBER),
|
|
7958
|
+
generatorAgreementCreatedAtUdata: udata(docsTemplates.UdataKey.GENERATOR_AGREEMENT_CREATED_AT)
|
|
7959
7959
|
};
|
|
7960
7960
|
},
|
|
7961
7961
|
assemble: ({ data, meta, reads: { vars, userData, contributorContractUdata, contributorContractCreatedAtUdata, generatorAgreementUdata, generatorAgreementCreatedAtUdata } }) => {
|
|
@@ -8017,10 +8017,10 @@ const Factory$W = defineBuilder()({
|
|
|
8017
8017
|
coop: () => f.getCooperative(data.coopname, data.block_num),
|
|
8018
8018
|
vars: () => f.getVars(data.coopname, data.block_num),
|
|
8019
8019
|
userData: () => f.getUser(data.username, data.block_num),
|
|
8020
|
-
contributorContractUdata: udata(
|
|
8021
|
-
contributorContractCreatedAtUdata: udata(
|
|
8022
|
-
blagorostAgreementUdata: udata(
|
|
8023
|
-
blagorostAgreementCreatedAtUdata: udata(
|
|
8020
|
+
contributorContractUdata: udata(docsTemplates.UdataKey.BLAGOROST_CONTRIBUTOR_CONTRACT_NUMBER),
|
|
8021
|
+
contributorContractCreatedAtUdata: udata(docsTemplates.UdataKey.BLAGOROST_CONTRIBUTOR_CONTRACT_CREATED_AT),
|
|
8022
|
+
blagorostAgreementUdata: udata(docsTemplates.UdataKey.BLAGOROST_AGREEMENT_NUMBER),
|
|
8023
|
+
blagorostAgreementCreatedAtUdata: udata(docsTemplates.UdataKey.BLAGOROST_AGREEMENT_CREATED_AT)
|
|
8024
8024
|
};
|
|
8025
8025
|
},
|
|
8026
8026
|
assemble: ({ data, meta, reads: { coop, vars, userData, contributorContractUdata, contributorContractCreatedAtUdata, blagorostAgreementUdata, blagorostAgreementCreatedAtUdata } }) => {
|
|
@@ -8066,10 +8066,10 @@ const Factory$V = defineBuilder()({
|
|
|
8066
8066
|
coop: () => f.getCooperative(data.coopname, data.block_num),
|
|
8067
8067
|
vars: () => f.getVars(data.coopname, data.block_num),
|
|
8068
8068
|
userData: () => f.getUser(data.username, data.block_num),
|
|
8069
|
-
contributorContractUdata: udata(
|
|
8070
|
-
contributorContractCreatedAtUdata: udata(
|
|
8071
|
-
blagorostAgreementUdata: udata(
|
|
8072
|
-
blagorostAgreementCreatedAtUdata: udata(
|
|
8069
|
+
contributorContractUdata: udata(docsTemplates.UdataKey.BLAGOROST_CONTRIBUTOR_CONTRACT_NUMBER),
|
|
8070
|
+
contributorContractCreatedAtUdata: udata(docsTemplates.UdataKey.BLAGOROST_CONTRIBUTOR_CONTRACT_CREATED_AT),
|
|
8071
|
+
blagorostAgreementUdata: udata(docsTemplates.UdataKey.BLAGOROST_AGREEMENT_NUMBER),
|
|
8072
|
+
blagorostAgreementCreatedAtUdata: udata(docsTemplates.UdataKey.BLAGOROST_AGREEMENT_CREATED_AT)
|
|
8073
8073
|
};
|
|
8074
8074
|
},
|
|
8075
8075
|
derive: ({ data, f, meta, reads: { coop } }) => ({
|
|
@@ -8119,10 +8119,10 @@ const Factory$U = defineBuilder()({
|
|
|
8119
8119
|
coop: () => f.getCooperative(data.coopname, data.block_num),
|
|
8120
8120
|
vars: () => f.getVars(data.coopname, data.block_num),
|
|
8121
8121
|
userData: () => f.getUser(data.username, data.block_num),
|
|
8122
|
-
contributorContractUdata: udata(
|
|
8123
|
-
contributorContractCreatedAtUdata: udata(
|
|
8124
|
-
blagorostAgreementUdata: udata(
|
|
8125
|
-
blagorostAgreementCreatedAtUdata: udata(
|
|
8122
|
+
contributorContractUdata: udata(docsTemplates.UdataKey.BLAGOROST_CONTRIBUTOR_CONTRACT_NUMBER),
|
|
8123
|
+
contributorContractCreatedAtUdata: udata(docsTemplates.UdataKey.BLAGOROST_CONTRIBUTOR_CONTRACT_CREATED_AT),
|
|
8124
|
+
blagorostAgreementUdata: udata(docsTemplates.UdataKey.BLAGOROST_AGREEMENT_NUMBER),
|
|
8125
|
+
blagorostAgreementCreatedAtUdata: udata(docsTemplates.UdataKey.BLAGOROST_AGREEMENT_CREATED_AT)
|
|
8126
8126
|
};
|
|
8127
8127
|
},
|
|
8128
8128
|
derive: ({ data, f, reads: { coop } }) => ({
|
|
@@ -8275,8 +8275,8 @@ const Factory$L = defineBuilder()({
|
|
|
8275
8275
|
coop: () => f.getCooperative(data.coopname, data.block_num),
|
|
8276
8276
|
vars: () => f.getVars(data.coopname, data.block_num),
|
|
8277
8277
|
userData: () => f.getUser(data.username, data.block_num),
|
|
8278
|
-
contributorContractUdata: udata(
|
|
8279
|
-
contributorContractCreatedAtUdata: udata(
|
|
8278
|
+
contributorContractUdata: udata(docsTemplates.UdataKey.BLAGOROST_CONTRIBUTOR_CONTRACT_NUMBER),
|
|
8279
|
+
contributorContractCreatedAtUdata: udata(docsTemplates.UdataKey.BLAGOROST_CONTRIBUTOR_CONTRACT_CREATED_AT)
|
|
8280
8280
|
};
|
|
8281
8281
|
},
|
|
8282
8282
|
assemble: ({ data, meta, reads: { coop, vars, userData, contributorContractUdata, contributorContractCreatedAtUdata } }) => {
|
|
@@ -8817,8 +8817,8 @@ const Factory$t = defineBuilder()({
|
|
|
8817
8817
|
vars: () => f.getVars(data.coopname, data.block_num),
|
|
8818
8818
|
coop: () => f.getCooperative(data.coopname, data.block_num),
|
|
8819
8819
|
user: () => f.getUser(data.username, data.block_num),
|
|
8820
|
-
generatorAgreementUdata: udata(
|
|
8821
|
-
generatorAgreementCreatedAtUdata: udata(
|
|
8820
|
+
generatorAgreementUdata: udata(docsTemplates.UdataKey.GENERATOR_AGREEMENT_NUMBER),
|
|
8821
|
+
generatorAgreementCreatedAtUdata: udata(docsTemplates.UdataKey.GENERATOR_AGREEMENT_CREATED_AT),
|
|
8822
8822
|
docData: () => f.loadDocData(data)
|
|
8823
8823
|
};
|
|
8824
8824
|
},
|
|
@@ -8897,8 +8897,8 @@ const Factory$q = defineBuilder()({
|
|
|
8897
8897
|
coop: () => f.getCooperative(data.coopname, data.block_num),
|
|
8898
8898
|
vars: () => f.getVars(data.coopname, data.block_num),
|
|
8899
8899
|
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(
|
|
8900
|
+
numberUdata: () => data.marketplace_agreement_number ? Promise.resolve(null) : udata(docsTemplates.UdataKey.MARKETPLACE_AGREEMENT_NUMBER),
|
|
8901
|
+
createdAtUdata: () => data.marketplace_agreement_created_at ? Promise.resolve(null) : udata(docsTemplates.UdataKey.MARKETPLACE_AGREEMENT_CREATED_AT)
|
|
8902
8902
|
};
|
|
8903
8903
|
},
|
|
8904
8904
|
assemble: ({ data, meta, reads: { coop, vars, userData, numberUdata, createdAtUdata } }) => {
|
|
@@ -9273,8 +9273,8 @@ const Factory$f = defineBuilder()({
|
|
|
9273
9273
|
coop: () => f.getCooperative(data.coopname, data.block_num),
|
|
9274
9274
|
vars: () => f.getVars(data.coopname, data.block_num),
|
|
9275
9275
|
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(
|
|
9276
|
+
numberRow: () => data.agreement_number ? Promise.resolve(null) : udata(docsTemplates.UdataKey.EDUCATION_PARENT_AGREEMENT_NUMBER),
|
|
9277
|
+
createdAtRow: () => data.agreement_created_at ? Promise.resolve(null) : udata(docsTemplates.UdataKey.EDUCATION_PARENT_AGREEMENT_CREATED_AT)
|
|
9278
9278
|
};
|
|
9279
9279
|
},
|
|
9280
9280
|
assemble: ({ data, meta, reads: { coop, vars, userData, numberRow, createdAtRow } }) => {
|
|
@@ -9309,8 +9309,8 @@ const Factory$e = defineBuilder()({
|
|
|
9309
9309
|
coop: () => f.getCooperative(data.coopname, data.block_num),
|
|
9310
9310
|
vars: () => f.getVars(data.coopname, data.block_num),
|
|
9311
9311
|
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(
|
|
9312
|
+
numberRow: () => data.agreement_number ? Promise.resolve(null) : udata(docsTemplates.UdataKey.EDUCATION_TEACHER_AGREEMENT_NUMBER),
|
|
9313
|
+
createdAtRow: () => data.agreement_created_at ? Promise.resolve(null) : udata(docsTemplates.UdataKey.EDUCATION_TEACHER_AGREEMENT_CREATED_AT)
|
|
9314
9314
|
};
|
|
9315
9315
|
},
|
|
9316
9316
|
assemble: ({ data, meta, reads: { coop, vars, userData, numberRow, createdAtRow } }) => {
|
|
@@ -9345,8 +9345,8 @@ const Factory$d = defineBuilder()({
|
|
|
9345
9345
|
coop: () => f.getCooperative(data.coopname, data.block_num),
|
|
9346
9346
|
vars: () => f.getVars(data.coopname, data.block_num),
|
|
9347
9347
|
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(
|
|
9348
|
+
numberRow: () => data.contract_number ? Promise.resolve(null) : udata(docsTemplates.UdataKey.EDUCATION_CONTRACT_NUMBER),
|
|
9349
|
+
createdAtRow: () => data.contract_created_at ? Promise.resolve(null) : udata(docsTemplates.UdataKey.EDUCATION_CONTRACT_CREATED_AT)
|
|
9350
9350
|
};
|
|
9351
9351
|
},
|
|
9352
9352
|
assemble: ({ data, meta, reads: { coop, vars, userData, numberRow, createdAtRow } }) => {
|
|
@@ -9374,8 +9374,8 @@ const _3006_EducationParticipationContract = {
|
|
|
9374
9374
|
|
|
9375
9375
|
async function getEducationContractRef(sources, data) {
|
|
9376
9376
|
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:
|
|
9377
|
+
sources.udata({ coopname: data.coopname, username: data.username, key: docsTemplates.UdataKey.EDUCATION_CONTRACT_NUMBER, block_num: data.block_num }),
|
|
9378
|
+
sources.udata({ coopname: data.coopname, username: data.username, key: docsTemplates.UdataKey.EDUCATION_CONTRACT_CREATED_AT, block_num: data.block_num })
|
|
9379
9379
|
]);
|
|
9380
9380
|
if (!number?.value || !createdAt?.value)
|
|
9381
9381
|
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");
|
package/dist/index.d.cts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { JSONSchemaType } from 'ajv';
|
|
2
|
+
import { Registry as Registry$1, ICooperativeData, IIndividualData, IOrganizationData, IEntrepreneurData, IBankAccount as IBankAccount$1, IVars as IVars$1, IProjectData, IUdata, IMetaDocument, IPaymentData as IPaymentData$1, IGenerateJoinCoopDecision as IGenerateJoinCoopDecision$1, IGenerate, IGenerateWalletAgreement, IDecisionData, IMeetExtended, IQuestionExtended, ICommonUser, UdataKey, IGenerationOptions, IFirstLastMiddleName } from '@coopenomics/docs-templates';
|
|
3
|
+
export { IGenerate, IGenerationOptions, IMetaDocument } from '@coopenomics/docs-templates';
|
|
2
4
|
import { Cooperative, Interfaces, MeetContract, SovietContract } from 'cooptypes';
|
|
3
|
-
import { Registry as Registry$1 } from '@coopenomics/docs-templates';
|
|
4
5
|
import { Kysely } from 'kysely';
|
|
5
6
|
import { PoolConfig } from 'pg';
|
|
6
7
|
import moment from 'moment-timezone';
|
|
@@ -1434,9 +1435,9 @@ interface IChainDataSource {
|
|
|
1434
1435
|
getCurrentBlock: () => Promise<number>;
|
|
1435
1436
|
}
|
|
1436
1437
|
|
|
1437
|
-
type CooperativeData =
|
|
1438
|
+
type CooperativeData = ICooperativeData;
|
|
1438
1439
|
|
|
1439
|
-
type ExternalIndividualData =
|
|
1440
|
+
type ExternalIndividualData = IIndividualData;
|
|
1440
1441
|
type InternalIndividualData = ExternalIndividualData;
|
|
1441
1442
|
declare class Individual {
|
|
1442
1443
|
individual?: ExternalIndividualData;
|
|
@@ -1454,8 +1455,8 @@ declare class Individual {
|
|
|
1454
1455
|
}>;
|
|
1455
1456
|
}
|
|
1456
1457
|
|
|
1457
|
-
type ExternalOrganizationData =
|
|
1458
|
-
type InternalOrganizationData =
|
|
1458
|
+
type ExternalOrganizationData = IOrganizationData;
|
|
1459
|
+
type InternalOrganizationData = IOrganizationData;
|
|
1459
1460
|
declare class Organization {
|
|
1460
1461
|
db: IFactoryStorage;
|
|
1461
1462
|
organization?: ExternalOrganizationData;
|
|
@@ -1473,9 +1474,9 @@ declare class Organization {
|
|
|
1473
1474
|
}>;
|
|
1474
1475
|
}
|
|
1475
1476
|
|
|
1476
|
-
type ExternalEntrepreneurData =
|
|
1477
|
+
type ExternalEntrepreneurData = IEntrepreneurData;
|
|
1477
1478
|
type InternalEntrepreneurData = Omit<ExternalEntrepreneurData, 'bank_account'> & {
|
|
1478
|
-
bank_account?:
|
|
1479
|
+
bank_account?: IBankAccount$1;
|
|
1479
1480
|
};
|
|
1480
1481
|
declare class Entrepreneur {
|
|
1481
1482
|
db: IFactoryStorage;
|
|
@@ -1512,7 +1513,7 @@ declare class PaymentMethod {
|
|
|
1512
1513
|
}>;
|
|
1513
1514
|
}
|
|
1514
1515
|
|
|
1515
|
-
type IVars =
|
|
1516
|
+
type IVars = IVars$1;
|
|
1516
1517
|
declare class Vars {
|
|
1517
1518
|
data?: IVars;
|
|
1518
1519
|
private data_service;
|
|
@@ -1532,7 +1533,7 @@ declare class Vars {
|
|
|
1532
1533
|
}>;
|
|
1533
1534
|
}
|
|
1534
1535
|
|
|
1535
|
-
type ExternalProjectData =
|
|
1536
|
+
type ExternalProjectData = IProjectData;
|
|
1536
1537
|
interface InternalProjectData extends ExternalProjectData {
|
|
1537
1538
|
block_num?: number;
|
|
1538
1539
|
deleted?: boolean;
|
|
@@ -1553,7 +1554,7 @@ declare class Project {
|
|
|
1553
1554
|
}>;
|
|
1554
1555
|
}
|
|
1555
1556
|
|
|
1556
|
-
type ExternalUdata =
|
|
1557
|
+
type ExternalUdata = IUdata;
|
|
1557
1558
|
type InternalUdata = ExternalUdata;
|
|
1558
1559
|
declare class Udata {
|
|
1559
1560
|
udata?: ExternalUdata;
|
|
@@ -1571,14 +1572,6 @@ declare class Udata {
|
|
|
1571
1572
|
}>;
|
|
1572
1573
|
}
|
|
1573
1574
|
|
|
1574
|
-
/**
|
|
1575
|
-
* Мета документа. Поле `builder` (версия сборщика, шаг 7) объявлено и здесь:
|
|
1576
|
-
* `cooptypes` приходит от приложения-хозяина, и его выпуск может быть старше
|
|
1577
|
-
* пакета фабрики.
|
|
1578
|
-
*/
|
|
1579
|
-
type IMetaDocument = Cooperative.Document.IMetaDocument & {
|
|
1580
|
-
builder?: string;
|
|
1581
|
-
};
|
|
1582
1575
|
interface IGeneratedDocument {
|
|
1583
1576
|
full_title: string;
|
|
1584
1577
|
html: string;
|
|
@@ -1614,8 +1607,6 @@ interface IMetaDocumentPartial extends Partial<IMetaDocument> {
|
|
|
1614
1607
|
registry_id: number;
|
|
1615
1608
|
title: string;
|
|
1616
1609
|
}
|
|
1617
|
-
type IGenerate = Cooperative.Document.IGenerate;
|
|
1618
|
-
type IGenerationOptions = Cooperative.Document.IGenerationOptions;
|
|
1619
1610
|
/**
|
|
1620
1611
|
* Вход сборки бланка: документ без данных события — только шаблон из цепи и
|
|
1621
1612
|
* реквизиты кооператива. Без `block_num` редакцию шаблона выбирает источник
|
|
@@ -1636,8 +1627,8 @@ interface IGeneratedBlank {
|
|
|
1636
1627
|
}
|
|
1637
1628
|
|
|
1638
1629
|
type Currency = 'RUB' | 'Other';
|
|
1639
|
-
type IBankAccount =
|
|
1640
|
-
type IPaymentData =
|
|
1630
|
+
type IBankAccount = IBankAccount$1;
|
|
1631
|
+
type IPaymentData = IPaymentData$1;
|
|
1641
1632
|
|
|
1642
1633
|
interface IFilterDeltas {
|
|
1643
1634
|
present: boolean;
|
|
@@ -1674,7 +1665,7 @@ type internalFilterTypes = InternalIndividualData | InternalEntrepreneurData | I
|
|
|
1674
1665
|
type externalDataTypes = ExternalIndividualData | ExternalEntrepreneurData | ExternalOrganizationData | PaymentData | IVars | ExternalProjectData | ExternalUdata;
|
|
1675
1666
|
type externalDataTypesArrays = ExternalIndividualData[] | ExternalEntrepreneurData[] | ExternalOrganizationData[] | PaymentData[] | IVars[] | ExternalProjectData[] | ExternalUdata[];
|
|
1676
1667
|
|
|
1677
|
-
type IGenerateJoinCoopDecision =
|
|
1668
|
+
type IGenerateJoinCoopDecision = IGenerateJoinCoopDecision$1;
|
|
1678
1669
|
/**
|
|
1679
1670
|
* Интерфейс генерации заявления на вступление в кооператив
|
|
1680
1671
|
*/
|
|
@@ -1682,7 +1673,7 @@ interface IGenerateJoinCoop extends IGenerate {
|
|
|
1682
1673
|
signature: string;
|
|
1683
1674
|
skip_save: boolean;
|
|
1684
1675
|
}
|
|
1685
|
-
type IGenerateAgreement =
|
|
1676
|
+
type IGenerateAgreement = IGenerateWalletAgreement;
|
|
1686
1677
|
|
|
1687
1678
|
/**
|
|
1688
1679
|
* Реестр версий шаблонов документов.
|
|
@@ -1723,7 +1714,7 @@ declare function getTemplateVersion(registry_id: number | string): number;
|
|
|
1723
1714
|
|
|
1724
1715
|
declare const BankAccountSchema: JSONSchemaType<IBankAccount>;
|
|
1725
1716
|
|
|
1726
|
-
declare const decisionSchema: JSONSchemaType<
|
|
1717
|
+
declare const decisionSchema: JSONSchemaType<IDecisionData>;
|
|
1727
1718
|
|
|
1728
1719
|
declare const entrepreneurSchema: JSONSchemaType<ExternalEntrepreneurData>;
|
|
1729
1720
|
|
|
@@ -1737,12 +1728,12 @@ declare const CooperativeSchema: JSONSchemaType<CooperativeData>;
|
|
|
1737
1728
|
|
|
1738
1729
|
declare const VarsSchema: JSONSchemaType<IVars>;
|
|
1739
1730
|
|
|
1740
|
-
declare const MeetSchema: JSONSchemaType<
|
|
1731
|
+
declare const MeetSchema: JSONSchemaType<IMeetExtended>;
|
|
1741
1732
|
declare const MeetPointSchema: JSONSchemaType<Interfaces.Meet.IMeetPoint>;
|
|
1742
1733
|
declare const QuestionSchema: JSONSchemaType<Interfaces.Meet.IQuestion>;
|
|
1743
|
-
declare const QuestionExtendedSchema: JSONSchemaType<
|
|
1734
|
+
declare const QuestionExtendedSchema: JSONSchemaType<IQuestionExtended>;
|
|
1744
1735
|
|
|
1745
|
-
declare const CommonUserSchema: JSONSchemaType<
|
|
1736
|
+
declare const CommonUserSchema: JSONSchemaType<ICommonUser>;
|
|
1746
1737
|
|
|
1747
1738
|
interface IAgendaMeet {
|
|
1748
1739
|
type: 'regular' | 'extra';
|
|
@@ -1758,7 +1749,7 @@ interface IAgendaQuestion {
|
|
|
1758
1749
|
declare const AgendaMeetSchema: JSONSchemaType<IAgendaMeet>;
|
|
1759
1750
|
declare const AgendaQuestionSchema: JSONSchemaType<IAgendaQuestion>;
|
|
1760
1751
|
|
|
1761
|
-
declare const udataSchema: JSONSchemaType<
|
|
1752
|
+
declare const udataSchema: JSONSchemaType<IUdata>;
|
|
1762
1753
|
|
|
1763
1754
|
/** Публичная позиция расхода — то, что едет в meta документа on-chain. */
|
|
1764
1755
|
interface IExpenseItem {
|
|
@@ -1895,7 +1886,7 @@ interface IUserAt {
|
|
|
1895
1886
|
interface IUdataFilter {
|
|
1896
1887
|
coopname: string;
|
|
1897
1888
|
username: string;
|
|
1898
|
-
key:
|
|
1889
|
+
key: UdataKey;
|
|
1899
1890
|
block_num?: number;
|
|
1900
1891
|
}
|
|
1901
1892
|
/** Отбор способа оплаты: поля записи плюс граница по блоку. */
|
|
@@ -2083,11 +2074,11 @@ declare abstract class DocFactory<T extends IGenerate> {
|
|
|
2083
2074
|
getCooperative(username: string, block_num?: number): Promise<CooperativeData>;
|
|
2084
2075
|
getProject(id: string, block_num?: number): Promise<InternalProjectData>;
|
|
2085
2076
|
getVars(coopname: string, block_num?: number): Promise<IVars>;
|
|
2086
|
-
getGeneralMeetingDecision(meet: Interfaces.Meet.IMeet, created_at: string, timezone: string): Promise<
|
|
2087
|
-
getDecision(coop: CooperativeData, coopname: string, decision_id: number, created_at: string, timezone: string): Promise<
|
|
2088
|
-
getApprovedDecision(coop: CooperativeData, coopname: string, decision_id: number): Promise<
|
|
2089
|
-
getMeet(coopname: string, meet_hash: string, block_num?: number): Promise<
|
|
2090
|
-
getMeetQuestions(coopname: string, meet_id: number, block_num?: number): Promise<
|
|
2077
|
+
getGeneralMeetingDecision(meet: Interfaces.Meet.IMeet, created_at: string, timezone: string): Promise<IDecisionData>;
|
|
2078
|
+
getDecision(coop: CooperativeData, coopname: string, decision_id: number, created_at: string, timezone: string): Promise<IDecisionData>;
|
|
2079
|
+
getApprovedDecision(coop: CooperativeData, coopname: string, decision_id: number): Promise<IDecisionData>;
|
|
2080
|
+
getMeet(coopname: string, meet_hash: string, block_num?: number): Promise<IMeetExtended>;
|
|
2081
|
+
getMeetQuestions(coopname: string, meet_id: number, block_num?: number): Promise<IQuestionExtended[]>;
|
|
2091
2082
|
/**
|
|
2092
2083
|
* Определяет как пользователь проголосовал по конкретному вопросу
|
|
2093
2084
|
* @param question Вопрос голосования
|
|
@@ -2099,7 +2090,7 @@ declare abstract class DocFactory<T extends IGenerate> {
|
|
|
2099
2090
|
generatePDF(data: externalDataTypes | string, context: string, vars: ICombinedData, translation: ITranslations, meta: IMetaDocument, skip_save?: boolean, skip_pdf?: boolean): Promise<IGeneratedDocument>;
|
|
2100
2091
|
getFullName(data: externalDataTypes | string): string;
|
|
2101
2092
|
getFullParticipantName(data: externalDataTypes): string;
|
|
2102
|
-
getFirstLastMiddleName(data: externalDataTypes):
|
|
2093
|
+
getFirstLastMiddleName(data: externalDataTypes): IFirstLastMiddleName;
|
|
2103
2094
|
extractOrganizationName(input: ExternalOrganizationData): string;
|
|
2104
2095
|
extractPersonalAbbreviatedName(input: ExternalIndividualData | ExternalEntrepreneurData): string;
|
|
2105
2096
|
parseDateForAgreements(created_at: string, timezone: string): {
|
|
@@ -2108,7 +2099,7 @@ declare abstract class DocFactory<T extends IGenerate> {
|
|
|
2108
2099
|
year: string;
|
|
2109
2100
|
};
|
|
2110
2101
|
constructUHDContractNumber(contributor_hash: string): string;
|
|
2111
|
-
getCommonUser(input: InternalGetUserResult):
|
|
2102
|
+
getCommonUser(input: InternalGetUserResult): ICommonUser;
|
|
2112
2103
|
getShortHash(hash: string, length?: number): string;
|
|
2113
2104
|
saveDraft(document: IGeneratedDocument): Promise<void>;
|
|
2114
2105
|
getMeta<T extends IMetaDocumentPartial>(input: T): Promise<IMetaDocument>;
|
|
@@ -2283,4 +2274,4 @@ declare class Generator implements IGenerator {
|
|
|
2283
2274
|
}
|
|
2284
2275
|
|
|
2285
2276
|
export { AgendaMeetSchema, AgendaQuestionSchema, AnnualGeneralMeetingAgenda, AnnualGeneralMeetingDecision, AnnualGeneralMeetingNotification, AnnualGeneralMeetingSovietDecision, AnnualGeneralMeetingVotingBallot, BankAccountSchema, BillingConversionStatement, BlagorostAgreement, BlagorostOffer, BlagorostProgramTemplate, BranchEstablishmentPetition, BranchEstablishmentSovietDecision, BranchFinancialAidProtocol, BranchFinancialAidStatement, BranchMeetingBallot, BranchMeetingDecision, BranchMeetingProposal, BranchTrustedLiabilityAgreement, BranchTrustedPowerOfAttorney, BranchTrustedStatement, BranchTrusteeLiabilityAgreement, BranchTrusteePowerOfAttorney, CapitalizationMoneyInvestStatement, CapitalizationPropertyInvestAct, CapitalizationPropertyInvestDecision, CapitalizationPropertyInvestStatement, CapitalizationToMainWalletConvertStatement, ChainRpcDataSource, CommonUserSchema, ComponentGenerationContract, ConvertToAxonStatement, CoopenomicsAgreement, CooperativeSchema, DEFAULT_TEMPLATE_VERSION, version as DOCS_FACTORY_VERSION, DecisionOfParticipantApplication, DecisionOfParticipantExit, DocumentNotApprovedError, EducationConvertStatement, EducationGuaranteeDecision, EducationGuaranteeStatement, EducationParentOffer, EducationParticipationContract, EducationProgramTemplate, EducationRidAct, EducationRidDecision, EducationRidStatement, EducationRidStorageAct, EducationShareWithdrawStatement, EducationTeacherOffer, ExpenseDecision, ExpenseItemSchema, ExpenseProposalDecision, ExpenseProposalDecisionBodySchema, ExpenseProposalHeaderSchema, ExpenseProposalStatement, ExpenseRenderItemSchema, ExpenseStatement, FACTORY_STORAGE_DDL, FIRST_BUILDER_VERSION, FreeDecision, GenerationContract, GenerationConvertStatement, GenerationMoneyInvestStatement, GenerationMoneyReturnUnusedStatement, GenerationPropertyInvestAct, GenerationPropertyInvestDecision, GenerationPropertyInvestStatement, Generator, GeneratorOffer, GeneratorProgramTemplate, GetLoanDecision, GetLoanStatement, InitProjectDecision, InitProjectStatement, MarketplaceAplReception, MarketplaceConvertStatement, MarketplaceOffer, MarketplaceProgramTemplate, MarketplaceReturnCancelDecision, MarketplaceReturnCancelStatement, MarketplaceReturnStatement, MarketplaceShareReturnAct, MarketplaceShareReturnDecision, MarketplaceShareReturnStatement, MarketplaceTransportNote, MarketplaceWriteoffProtocol, MarketplaceWriteoffServiceMemo, MarketplaceWriteoffStatement, MeetPointSchema, MeetSchema, MemoryFactoryStorage, ParticipantApplication, ParticipantExitApplication, PostgresFactoryStorage, PrivacyPolicy, ProgramAgreementsAnnulmentStatement, ProjectFreeDecision, ProjectGenerationContract, QuestionExtendedSchema, QuestionSchema, RECORD_COLLECTIONS, Registry, RegulationElectronicSignaturet as RegulationElectronicSignature, ResultContributionAct, ResultContributionDecision, ResultContributionStatement, ReturnByMoney, ReturnByMoneyDecision, SelectBranchStatement, SosediAgreement, StorageAgreement, TemplateVersions, UnknownBuilderVersionError, UnknownDocumentFactoryError, UserAgreement, VarsSchema, WalletAgreement, X_BUILDER_KEY, decisionSchema, documentMetaKey, entrepreneurSchema, formatCreatedAt, getTemplateVersion, individualSchema, isBuilderVersion, isIsoCreatedAt, isLegacyCreatedAt, latestMinorOf, matchesWhere, nowCreatedAt, organizationSchema, parseBuilderVersion, parseCreatedAt, paymentMethodSchema, splitCreatedAt, templateBuilderMajor, udataSchema };
|
|
2286
|
-
export type { BuilderVersion, Currency, DocDataRecord, DocumentPage, DocumentWhere, FieldCondition, IActionQuery, IBCState, IBankAccount, IBuilderVersionParts, IChainDataSource, ICombinedData, CooperativeData as ICooperativeData, IDocumentFilter, ExternalEntrepreneurData as IEntrepreneurData, IExpenseItem, IExpenseProposalDecisionBody, IExpenseProposalHeader, IExpenseRenderItem, ExternalProjectData as IExternalProjectData, IFactoryStorage, IFilterActions, IFilterDeltas,
|
|
2277
|
+
export type { BuilderVersion, Currency, DocDataRecord, DocumentPage, DocumentWhere, FieldCondition, IActionQuery, IBCState, IBankAccount, IBuilderVersionParts, IChainDataSource, ICombinedData, CooperativeData as ICooperativeData, IDocumentFilter, ExternalEntrepreneurData as IEntrepreneurData, IExpenseItem, IExpenseProposalDecisionBody, IExpenseProposalHeader, IExpenseRenderItem, ExternalProjectData as IExternalProjectData, IFactoryStorage, IFilterActions, IFilterDeltas, IGenerateAgreement, IGenerateBlank, IGenerateJoinCoop, IGenerateJoinCoopDecision, IGeneratedBlank, IGeneratedDocument, IGenerator, ExternalIndividualData as IIndividualData, IMetaDocumentPartial, ExternalOrganizationData as IOrganizationData, IPaymentData, ISearchResult, ITableQuery, ITemplate, ITranslations, ExternalUdata as IUdata, LangType, NestedRecord, Numbers, RecordCollection, StoredDocument, StoredRecord, Where, dataTypes, externalDataTypes, externalDataTypesArrays, internalFilterTypes };
|
package/dist/index.d.mts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { JSONSchemaType } from 'ajv';
|
|
2
|
+
import { Registry as Registry$1, ICooperativeData, IIndividualData, IOrganizationData, IEntrepreneurData, IBankAccount as IBankAccount$1, IVars as IVars$1, IProjectData, IUdata, IMetaDocument, IPaymentData as IPaymentData$1, IGenerateJoinCoopDecision as IGenerateJoinCoopDecision$1, IGenerate, IGenerateWalletAgreement, IDecisionData, IMeetExtended, IQuestionExtended, ICommonUser, UdataKey, IGenerationOptions, IFirstLastMiddleName } from '@coopenomics/docs-templates';
|
|
3
|
+
export { IGenerate, IGenerationOptions, IMetaDocument } from '@coopenomics/docs-templates';
|
|
2
4
|
import { Cooperative, Interfaces, MeetContract, SovietContract } from 'cooptypes';
|
|
3
|
-
import { Registry as Registry$1 } from '@coopenomics/docs-templates';
|
|
4
5
|
import { Kysely } from 'kysely';
|
|
5
6
|
import { PoolConfig } from 'pg';
|
|
6
7
|
import moment from 'moment-timezone';
|
|
@@ -1434,9 +1435,9 @@ interface IChainDataSource {
|
|
|
1434
1435
|
getCurrentBlock: () => Promise<number>;
|
|
1435
1436
|
}
|
|
1436
1437
|
|
|
1437
|
-
type CooperativeData =
|
|
1438
|
+
type CooperativeData = ICooperativeData;
|
|
1438
1439
|
|
|
1439
|
-
type ExternalIndividualData =
|
|
1440
|
+
type ExternalIndividualData = IIndividualData;
|
|
1440
1441
|
type InternalIndividualData = ExternalIndividualData;
|
|
1441
1442
|
declare class Individual {
|
|
1442
1443
|
individual?: ExternalIndividualData;
|
|
@@ -1454,8 +1455,8 @@ declare class Individual {
|
|
|
1454
1455
|
}>;
|
|
1455
1456
|
}
|
|
1456
1457
|
|
|
1457
|
-
type ExternalOrganizationData =
|
|
1458
|
-
type InternalOrganizationData =
|
|
1458
|
+
type ExternalOrganizationData = IOrganizationData;
|
|
1459
|
+
type InternalOrganizationData = IOrganizationData;
|
|
1459
1460
|
declare class Organization {
|
|
1460
1461
|
db: IFactoryStorage;
|
|
1461
1462
|
organization?: ExternalOrganizationData;
|
|
@@ -1473,9 +1474,9 @@ declare class Organization {
|
|
|
1473
1474
|
}>;
|
|
1474
1475
|
}
|
|
1475
1476
|
|
|
1476
|
-
type ExternalEntrepreneurData =
|
|
1477
|
+
type ExternalEntrepreneurData = IEntrepreneurData;
|
|
1477
1478
|
type InternalEntrepreneurData = Omit<ExternalEntrepreneurData, 'bank_account'> & {
|
|
1478
|
-
bank_account?:
|
|
1479
|
+
bank_account?: IBankAccount$1;
|
|
1479
1480
|
};
|
|
1480
1481
|
declare class Entrepreneur {
|
|
1481
1482
|
db: IFactoryStorage;
|
|
@@ -1512,7 +1513,7 @@ declare class PaymentMethod {
|
|
|
1512
1513
|
}>;
|
|
1513
1514
|
}
|
|
1514
1515
|
|
|
1515
|
-
type IVars =
|
|
1516
|
+
type IVars = IVars$1;
|
|
1516
1517
|
declare class Vars {
|
|
1517
1518
|
data?: IVars;
|
|
1518
1519
|
private data_service;
|
|
@@ -1532,7 +1533,7 @@ declare class Vars {
|
|
|
1532
1533
|
}>;
|
|
1533
1534
|
}
|
|
1534
1535
|
|
|
1535
|
-
type ExternalProjectData =
|
|
1536
|
+
type ExternalProjectData = IProjectData;
|
|
1536
1537
|
interface InternalProjectData extends ExternalProjectData {
|
|
1537
1538
|
block_num?: number;
|
|
1538
1539
|
deleted?: boolean;
|
|
@@ -1553,7 +1554,7 @@ declare class Project {
|
|
|
1553
1554
|
}>;
|
|
1554
1555
|
}
|
|
1555
1556
|
|
|
1556
|
-
type ExternalUdata =
|
|
1557
|
+
type ExternalUdata = IUdata;
|
|
1557
1558
|
type InternalUdata = ExternalUdata;
|
|
1558
1559
|
declare class Udata {
|
|
1559
1560
|
udata?: ExternalUdata;
|
|
@@ -1571,14 +1572,6 @@ declare class Udata {
|
|
|
1571
1572
|
}>;
|
|
1572
1573
|
}
|
|
1573
1574
|
|
|
1574
|
-
/**
|
|
1575
|
-
* Мета документа. Поле `builder` (версия сборщика, шаг 7) объявлено и здесь:
|
|
1576
|
-
* `cooptypes` приходит от приложения-хозяина, и его выпуск может быть старше
|
|
1577
|
-
* пакета фабрики.
|
|
1578
|
-
*/
|
|
1579
|
-
type IMetaDocument = Cooperative.Document.IMetaDocument & {
|
|
1580
|
-
builder?: string;
|
|
1581
|
-
};
|
|
1582
1575
|
interface IGeneratedDocument {
|
|
1583
1576
|
full_title: string;
|
|
1584
1577
|
html: string;
|
|
@@ -1614,8 +1607,6 @@ interface IMetaDocumentPartial extends Partial<IMetaDocument> {
|
|
|
1614
1607
|
registry_id: number;
|
|
1615
1608
|
title: string;
|
|
1616
1609
|
}
|
|
1617
|
-
type IGenerate = Cooperative.Document.IGenerate;
|
|
1618
|
-
type IGenerationOptions = Cooperative.Document.IGenerationOptions;
|
|
1619
1610
|
/**
|
|
1620
1611
|
* Вход сборки бланка: документ без данных события — только шаблон из цепи и
|
|
1621
1612
|
* реквизиты кооператива. Без `block_num` редакцию шаблона выбирает источник
|
|
@@ -1636,8 +1627,8 @@ interface IGeneratedBlank {
|
|
|
1636
1627
|
}
|
|
1637
1628
|
|
|
1638
1629
|
type Currency = 'RUB' | 'Other';
|
|
1639
|
-
type IBankAccount =
|
|
1640
|
-
type IPaymentData =
|
|
1630
|
+
type IBankAccount = IBankAccount$1;
|
|
1631
|
+
type IPaymentData = IPaymentData$1;
|
|
1641
1632
|
|
|
1642
1633
|
interface IFilterDeltas {
|
|
1643
1634
|
present: boolean;
|
|
@@ -1674,7 +1665,7 @@ type internalFilterTypes = InternalIndividualData | InternalEntrepreneurData | I
|
|
|
1674
1665
|
type externalDataTypes = ExternalIndividualData | ExternalEntrepreneurData | ExternalOrganizationData | PaymentData | IVars | ExternalProjectData | ExternalUdata;
|
|
1675
1666
|
type externalDataTypesArrays = ExternalIndividualData[] | ExternalEntrepreneurData[] | ExternalOrganizationData[] | PaymentData[] | IVars[] | ExternalProjectData[] | ExternalUdata[];
|
|
1676
1667
|
|
|
1677
|
-
type IGenerateJoinCoopDecision =
|
|
1668
|
+
type IGenerateJoinCoopDecision = IGenerateJoinCoopDecision$1;
|
|
1678
1669
|
/**
|
|
1679
1670
|
* Интерфейс генерации заявления на вступление в кооператив
|
|
1680
1671
|
*/
|
|
@@ -1682,7 +1673,7 @@ interface IGenerateJoinCoop extends IGenerate {
|
|
|
1682
1673
|
signature: string;
|
|
1683
1674
|
skip_save: boolean;
|
|
1684
1675
|
}
|
|
1685
|
-
type IGenerateAgreement =
|
|
1676
|
+
type IGenerateAgreement = IGenerateWalletAgreement;
|
|
1686
1677
|
|
|
1687
1678
|
/**
|
|
1688
1679
|
* Реестр версий шаблонов документов.
|
|
@@ -1723,7 +1714,7 @@ declare function getTemplateVersion(registry_id: number | string): number;
|
|
|
1723
1714
|
|
|
1724
1715
|
declare const BankAccountSchema: JSONSchemaType<IBankAccount>;
|
|
1725
1716
|
|
|
1726
|
-
declare const decisionSchema: JSONSchemaType<
|
|
1717
|
+
declare const decisionSchema: JSONSchemaType<IDecisionData>;
|
|
1727
1718
|
|
|
1728
1719
|
declare const entrepreneurSchema: JSONSchemaType<ExternalEntrepreneurData>;
|
|
1729
1720
|
|
|
@@ -1737,12 +1728,12 @@ declare const CooperativeSchema: JSONSchemaType<CooperativeData>;
|
|
|
1737
1728
|
|
|
1738
1729
|
declare const VarsSchema: JSONSchemaType<IVars>;
|
|
1739
1730
|
|
|
1740
|
-
declare const MeetSchema: JSONSchemaType<
|
|
1731
|
+
declare const MeetSchema: JSONSchemaType<IMeetExtended>;
|
|
1741
1732
|
declare const MeetPointSchema: JSONSchemaType<Interfaces.Meet.IMeetPoint>;
|
|
1742
1733
|
declare const QuestionSchema: JSONSchemaType<Interfaces.Meet.IQuestion>;
|
|
1743
|
-
declare const QuestionExtendedSchema: JSONSchemaType<
|
|
1734
|
+
declare const QuestionExtendedSchema: JSONSchemaType<IQuestionExtended>;
|
|
1744
1735
|
|
|
1745
|
-
declare const CommonUserSchema: JSONSchemaType<
|
|
1736
|
+
declare const CommonUserSchema: JSONSchemaType<ICommonUser>;
|
|
1746
1737
|
|
|
1747
1738
|
interface IAgendaMeet {
|
|
1748
1739
|
type: 'regular' | 'extra';
|
|
@@ -1758,7 +1749,7 @@ interface IAgendaQuestion {
|
|
|
1758
1749
|
declare const AgendaMeetSchema: JSONSchemaType<IAgendaMeet>;
|
|
1759
1750
|
declare const AgendaQuestionSchema: JSONSchemaType<IAgendaQuestion>;
|
|
1760
1751
|
|
|
1761
|
-
declare const udataSchema: JSONSchemaType<
|
|
1752
|
+
declare const udataSchema: JSONSchemaType<IUdata>;
|
|
1762
1753
|
|
|
1763
1754
|
/** Публичная позиция расхода — то, что едет в meta документа on-chain. */
|
|
1764
1755
|
interface IExpenseItem {
|
|
@@ -1895,7 +1886,7 @@ interface IUserAt {
|
|
|
1895
1886
|
interface IUdataFilter {
|
|
1896
1887
|
coopname: string;
|
|
1897
1888
|
username: string;
|
|
1898
|
-
key:
|
|
1889
|
+
key: UdataKey;
|
|
1899
1890
|
block_num?: number;
|
|
1900
1891
|
}
|
|
1901
1892
|
/** Отбор способа оплаты: поля записи плюс граница по блоку. */
|
|
@@ -2083,11 +2074,11 @@ declare abstract class DocFactory<T extends IGenerate> {
|
|
|
2083
2074
|
getCooperative(username: string, block_num?: number): Promise<CooperativeData>;
|
|
2084
2075
|
getProject(id: string, block_num?: number): Promise<InternalProjectData>;
|
|
2085
2076
|
getVars(coopname: string, block_num?: number): Promise<IVars>;
|
|
2086
|
-
getGeneralMeetingDecision(meet: Interfaces.Meet.IMeet, created_at: string, timezone: string): Promise<
|
|
2087
|
-
getDecision(coop: CooperativeData, coopname: string, decision_id: number, created_at: string, timezone: string): Promise<
|
|
2088
|
-
getApprovedDecision(coop: CooperativeData, coopname: string, decision_id: number): Promise<
|
|
2089
|
-
getMeet(coopname: string, meet_hash: string, block_num?: number): Promise<
|
|
2090
|
-
getMeetQuestions(coopname: string, meet_id: number, block_num?: number): Promise<
|
|
2077
|
+
getGeneralMeetingDecision(meet: Interfaces.Meet.IMeet, created_at: string, timezone: string): Promise<IDecisionData>;
|
|
2078
|
+
getDecision(coop: CooperativeData, coopname: string, decision_id: number, created_at: string, timezone: string): Promise<IDecisionData>;
|
|
2079
|
+
getApprovedDecision(coop: CooperativeData, coopname: string, decision_id: number): Promise<IDecisionData>;
|
|
2080
|
+
getMeet(coopname: string, meet_hash: string, block_num?: number): Promise<IMeetExtended>;
|
|
2081
|
+
getMeetQuestions(coopname: string, meet_id: number, block_num?: number): Promise<IQuestionExtended[]>;
|
|
2091
2082
|
/**
|
|
2092
2083
|
* Определяет как пользователь проголосовал по конкретному вопросу
|
|
2093
2084
|
* @param question Вопрос голосования
|
|
@@ -2099,7 +2090,7 @@ declare abstract class DocFactory<T extends IGenerate> {
|
|
|
2099
2090
|
generatePDF(data: externalDataTypes | string, context: string, vars: ICombinedData, translation: ITranslations, meta: IMetaDocument, skip_save?: boolean, skip_pdf?: boolean): Promise<IGeneratedDocument>;
|
|
2100
2091
|
getFullName(data: externalDataTypes | string): string;
|
|
2101
2092
|
getFullParticipantName(data: externalDataTypes): string;
|
|
2102
|
-
getFirstLastMiddleName(data: externalDataTypes):
|
|
2093
|
+
getFirstLastMiddleName(data: externalDataTypes): IFirstLastMiddleName;
|
|
2103
2094
|
extractOrganizationName(input: ExternalOrganizationData): string;
|
|
2104
2095
|
extractPersonalAbbreviatedName(input: ExternalIndividualData | ExternalEntrepreneurData): string;
|
|
2105
2096
|
parseDateForAgreements(created_at: string, timezone: string): {
|
|
@@ -2108,7 +2099,7 @@ declare abstract class DocFactory<T extends IGenerate> {
|
|
|
2108
2099
|
year: string;
|
|
2109
2100
|
};
|
|
2110
2101
|
constructUHDContractNumber(contributor_hash: string): string;
|
|
2111
|
-
getCommonUser(input: InternalGetUserResult):
|
|
2102
|
+
getCommonUser(input: InternalGetUserResult): ICommonUser;
|
|
2112
2103
|
getShortHash(hash: string, length?: number): string;
|
|
2113
2104
|
saveDraft(document: IGeneratedDocument): Promise<void>;
|
|
2114
2105
|
getMeta<T extends IMetaDocumentPartial>(input: T): Promise<IMetaDocument>;
|
|
@@ -2283,4 +2274,4 @@ declare class Generator implements IGenerator {
|
|
|
2283
2274
|
}
|
|
2284
2275
|
|
|
2285
2276
|
export { AgendaMeetSchema, AgendaQuestionSchema, AnnualGeneralMeetingAgenda, AnnualGeneralMeetingDecision, AnnualGeneralMeetingNotification, AnnualGeneralMeetingSovietDecision, AnnualGeneralMeetingVotingBallot, BankAccountSchema, BillingConversionStatement, BlagorostAgreement, BlagorostOffer, BlagorostProgramTemplate, BranchEstablishmentPetition, BranchEstablishmentSovietDecision, BranchFinancialAidProtocol, BranchFinancialAidStatement, BranchMeetingBallot, BranchMeetingDecision, BranchMeetingProposal, BranchTrustedLiabilityAgreement, BranchTrustedPowerOfAttorney, BranchTrustedStatement, BranchTrusteeLiabilityAgreement, BranchTrusteePowerOfAttorney, CapitalizationMoneyInvestStatement, CapitalizationPropertyInvestAct, CapitalizationPropertyInvestDecision, CapitalizationPropertyInvestStatement, CapitalizationToMainWalletConvertStatement, ChainRpcDataSource, CommonUserSchema, ComponentGenerationContract, ConvertToAxonStatement, CoopenomicsAgreement, CooperativeSchema, DEFAULT_TEMPLATE_VERSION, version as DOCS_FACTORY_VERSION, DecisionOfParticipantApplication, DecisionOfParticipantExit, DocumentNotApprovedError, EducationConvertStatement, EducationGuaranteeDecision, EducationGuaranteeStatement, EducationParentOffer, EducationParticipationContract, EducationProgramTemplate, EducationRidAct, EducationRidDecision, EducationRidStatement, EducationRidStorageAct, EducationShareWithdrawStatement, EducationTeacherOffer, ExpenseDecision, ExpenseItemSchema, ExpenseProposalDecision, ExpenseProposalDecisionBodySchema, ExpenseProposalHeaderSchema, ExpenseProposalStatement, ExpenseRenderItemSchema, ExpenseStatement, FACTORY_STORAGE_DDL, FIRST_BUILDER_VERSION, FreeDecision, GenerationContract, GenerationConvertStatement, GenerationMoneyInvestStatement, GenerationMoneyReturnUnusedStatement, GenerationPropertyInvestAct, GenerationPropertyInvestDecision, GenerationPropertyInvestStatement, Generator, GeneratorOffer, GeneratorProgramTemplate, GetLoanDecision, GetLoanStatement, InitProjectDecision, InitProjectStatement, MarketplaceAplReception, MarketplaceConvertStatement, MarketplaceOffer, MarketplaceProgramTemplate, MarketplaceReturnCancelDecision, MarketplaceReturnCancelStatement, MarketplaceReturnStatement, MarketplaceShareReturnAct, MarketplaceShareReturnDecision, MarketplaceShareReturnStatement, MarketplaceTransportNote, MarketplaceWriteoffProtocol, MarketplaceWriteoffServiceMemo, MarketplaceWriteoffStatement, MeetPointSchema, MeetSchema, MemoryFactoryStorage, ParticipantApplication, ParticipantExitApplication, PostgresFactoryStorage, PrivacyPolicy, ProgramAgreementsAnnulmentStatement, ProjectFreeDecision, ProjectGenerationContract, QuestionExtendedSchema, QuestionSchema, RECORD_COLLECTIONS, Registry, RegulationElectronicSignaturet as RegulationElectronicSignature, ResultContributionAct, ResultContributionDecision, ResultContributionStatement, ReturnByMoney, ReturnByMoneyDecision, SelectBranchStatement, SosediAgreement, StorageAgreement, TemplateVersions, UnknownBuilderVersionError, UnknownDocumentFactoryError, UserAgreement, VarsSchema, WalletAgreement, X_BUILDER_KEY, decisionSchema, documentMetaKey, entrepreneurSchema, formatCreatedAt, getTemplateVersion, individualSchema, isBuilderVersion, isIsoCreatedAt, isLegacyCreatedAt, latestMinorOf, matchesWhere, nowCreatedAt, organizationSchema, parseBuilderVersion, parseCreatedAt, paymentMethodSchema, splitCreatedAt, templateBuilderMajor, udataSchema };
|
|
2286
|
-
export type { BuilderVersion, Currency, DocDataRecord, DocumentPage, DocumentWhere, FieldCondition, IActionQuery, IBCState, IBankAccount, IBuilderVersionParts, IChainDataSource, ICombinedData, CooperativeData as ICooperativeData, IDocumentFilter, ExternalEntrepreneurData as IEntrepreneurData, IExpenseItem, IExpenseProposalDecisionBody, IExpenseProposalHeader, IExpenseRenderItem, ExternalProjectData as IExternalProjectData, IFactoryStorage, IFilterActions, IFilterDeltas,
|
|
2277
|
+
export type { BuilderVersion, Currency, DocDataRecord, DocumentPage, DocumentWhere, FieldCondition, IActionQuery, IBCState, IBankAccount, IBuilderVersionParts, IChainDataSource, ICombinedData, CooperativeData as ICooperativeData, IDocumentFilter, ExternalEntrepreneurData as IEntrepreneurData, IExpenseItem, IExpenseProposalDecisionBody, IExpenseProposalHeader, IExpenseRenderItem, ExternalProjectData as IExternalProjectData, IFactoryStorage, IFilterActions, IFilterDeltas, IGenerateAgreement, IGenerateBlank, IGenerateJoinCoop, IGenerateJoinCoopDecision, IGeneratedBlank, IGeneratedDocument, IGenerator, ExternalIndividualData as IIndividualData, IMetaDocumentPartial, ExternalOrganizationData as IOrganizationData, IPaymentData, ISearchResult, ITableQuery, ITemplate, ITranslations, ExternalUdata as IUdata, LangType, NestedRecord, Numbers, RecordCollection, StoredDocument, StoredRecord, Where, dataTypes, externalDataTypes, externalDataTypesArrays, internalFilterTypes };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { JSONSchemaType } from 'ajv';
|
|
2
|
+
import { Registry as Registry$1, ICooperativeData, IIndividualData, IOrganizationData, IEntrepreneurData, IBankAccount as IBankAccount$1, IVars as IVars$1, IProjectData, IUdata, IMetaDocument, IPaymentData as IPaymentData$1, IGenerateJoinCoopDecision as IGenerateJoinCoopDecision$1, IGenerate, IGenerateWalletAgreement, IDecisionData, IMeetExtended, IQuestionExtended, ICommonUser, UdataKey, IGenerationOptions, IFirstLastMiddleName } from '@coopenomics/docs-templates';
|
|
3
|
+
export { IGenerate, IGenerationOptions, IMetaDocument } from '@coopenomics/docs-templates';
|
|
2
4
|
import { Cooperative, Interfaces, MeetContract, SovietContract } from 'cooptypes';
|
|
3
|
-
import { Registry as Registry$1 } from '@coopenomics/docs-templates';
|
|
4
5
|
import { Kysely } from 'kysely';
|
|
5
6
|
import { PoolConfig } from 'pg';
|
|
6
7
|
import moment from 'moment-timezone';
|
|
@@ -1434,9 +1435,9 @@ interface IChainDataSource {
|
|
|
1434
1435
|
getCurrentBlock: () => Promise<number>;
|
|
1435
1436
|
}
|
|
1436
1437
|
|
|
1437
|
-
type CooperativeData =
|
|
1438
|
+
type CooperativeData = ICooperativeData;
|
|
1438
1439
|
|
|
1439
|
-
type ExternalIndividualData =
|
|
1440
|
+
type ExternalIndividualData = IIndividualData;
|
|
1440
1441
|
type InternalIndividualData = ExternalIndividualData;
|
|
1441
1442
|
declare class Individual {
|
|
1442
1443
|
individual?: ExternalIndividualData;
|
|
@@ -1454,8 +1455,8 @@ declare class Individual {
|
|
|
1454
1455
|
}>;
|
|
1455
1456
|
}
|
|
1456
1457
|
|
|
1457
|
-
type ExternalOrganizationData =
|
|
1458
|
-
type InternalOrganizationData =
|
|
1458
|
+
type ExternalOrganizationData = IOrganizationData;
|
|
1459
|
+
type InternalOrganizationData = IOrganizationData;
|
|
1459
1460
|
declare class Organization {
|
|
1460
1461
|
db: IFactoryStorage;
|
|
1461
1462
|
organization?: ExternalOrganizationData;
|
|
@@ -1473,9 +1474,9 @@ declare class Organization {
|
|
|
1473
1474
|
}>;
|
|
1474
1475
|
}
|
|
1475
1476
|
|
|
1476
|
-
type ExternalEntrepreneurData =
|
|
1477
|
+
type ExternalEntrepreneurData = IEntrepreneurData;
|
|
1477
1478
|
type InternalEntrepreneurData = Omit<ExternalEntrepreneurData, 'bank_account'> & {
|
|
1478
|
-
bank_account?:
|
|
1479
|
+
bank_account?: IBankAccount$1;
|
|
1479
1480
|
};
|
|
1480
1481
|
declare class Entrepreneur {
|
|
1481
1482
|
db: IFactoryStorage;
|
|
@@ -1512,7 +1513,7 @@ declare class PaymentMethod {
|
|
|
1512
1513
|
}>;
|
|
1513
1514
|
}
|
|
1514
1515
|
|
|
1515
|
-
type IVars =
|
|
1516
|
+
type IVars = IVars$1;
|
|
1516
1517
|
declare class Vars {
|
|
1517
1518
|
data?: IVars;
|
|
1518
1519
|
private data_service;
|
|
@@ -1532,7 +1533,7 @@ declare class Vars {
|
|
|
1532
1533
|
}>;
|
|
1533
1534
|
}
|
|
1534
1535
|
|
|
1535
|
-
type ExternalProjectData =
|
|
1536
|
+
type ExternalProjectData = IProjectData;
|
|
1536
1537
|
interface InternalProjectData extends ExternalProjectData {
|
|
1537
1538
|
block_num?: number;
|
|
1538
1539
|
deleted?: boolean;
|
|
@@ -1553,7 +1554,7 @@ declare class Project {
|
|
|
1553
1554
|
}>;
|
|
1554
1555
|
}
|
|
1555
1556
|
|
|
1556
|
-
type ExternalUdata =
|
|
1557
|
+
type ExternalUdata = IUdata;
|
|
1557
1558
|
type InternalUdata = ExternalUdata;
|
|
1558
1559
|
declare class Udata {
|
|
1559
1560
|
udata?: ExternalUdata;
|
|
@@ -1571,14 +1572,6 @@ declare class Udata {
|
|
|
1571
1572
|
}>;
|
|
1572
1573
|
}
|
|
1573
1574
|
|
|
1574
|
-
/**
|
|
1575
|
-
* Мета документа. Поле `builder` (версия сборщика, шаг 7) объявлено и здесь:
|
|
1576
|
-
* `cooptypes` приходит от приложения-хозяина, и его выпуск может быть старше
|
|
1577
|
-
* пакета фабрики.
|
|
1578
|
-
*/
|
|
1579
|
-
type IMetaDocument = Cooperative.Document.IMetaDocument & {
|
|
1580
|
-
builder?: string;
|
|
1581
|
-
};
|
|
1582
1575
|
interface IGeneratedDocument {
|
|
1583
1576
|
full_title: string;
|
|
1584
1577
|
html: string;
|
|
@@ -1614,8 +1607,6 @@ interface IMetaDocumentPartial extends Partial<IMetaDocument> {
|
|
|
1614
1607
|
registry_id: number;
|
|
1615
1608
|
title: string;
|
|
1616
1609
|
}
|
|
1617
|
-
type IGenerate = Cooperative.Document.IGenerate;
|
|
1618
|
-
type IGenerationOptions = Cooperative.Document.IGenerationOptions;
|
|
1619
1610
|
/**
|
|
1620
1611
|
* Вход сборки бланка: документ без данных события — только шаблон из цепи и
|
|
1621
1612
|
* реквизиты кооператива. Без `block_num` редакцию шаблона выбирает источник
|
|
@@ -1636,8 +1627,8 @@ interface IGeneratedBlank {
|
|
|
1636
1627
|
}
|
|
1637
1628
|
|
|
1638
1629
|
type Currency = 'RUB' | 'Other';
|
|
1639
|
-
type IBankAccount =
|
|
1640
|
-
type IPaymentData =
|
|
1630
|
+
type IBankAccount = IBankAccount$1;
|
|
1631
|
+
type IPaymentData = IPaymentData$1;
|
|
1641
1632
|
|
|
1642
1633
|
interface IFilterDeltas {
|
|
1643
1634
|
present: boolean;
|
|
@@ -1674,7 +1665,7 @@ type internalFilterTypes = InternalIndividualData | InternalEntrepreneurData | I
|
|
|
1674
1665
|
type externalDataTypes = ExternalIndividualData | ExternalEntrepreneurData | ExternalOrganizationData | PaymentData | IVars | ExternalProjectData | ExternalUdata;
|
|
1675
1666
|
type externalDataTypesArrays = ExternalIndividualData[] | ExternalEntrepreneurData[] | ExternalOrganizationData[] | PaymentData[] | IVars[] | ExternalProjectData[] | ExternalUdata[];
|
|
1676
1667
|
|
|
1677
|
-
type IGenerateJoinCoopDecision =
|
|
1668
|
+
type IGenerateJoinCoopDecision = IGenerateJoinCoopDecision$1;
|
|
1678
1669
|
/**
|
|
1679
1670
|
* Интерфейс генерации заявления на вступление в кооператив
|
|
1680
1671
|
*/
|
|
@@ -1682,7 +1673,7 @@ interface IGenerateJoinCoop extends IGenerate {
|
|
|
1682
1673
|
signature: string;
|
|
1683
1674
|
skip_save: boolean;
|
|
1684
1675
|
}
|
|
1685
|
-
type IGenerateAgreement =
|
|
1676
|
+
type IGenerateAgreement = IGenerateWalletAgreement;
|
|
1686
1677
|
|
|
1687
1678
|
/**
|
|
1688
1679
|
* Реестр версий шаблонов документов.
|
|
@@ -1723,7 +1714,7 @@ declare function getTemplateVersion(registry_id: number | string): number;
|
|
|
1723
1714
|
|
|
1724
1715
|
declare const BankAccountSchema: JSONSchemaType<IBankAccount>;
|
|
1725
1716
|
|
|
1726
|
-
declare const decisionSchema: JSONSchemaType<
|
|
1717
|
+
declare const decisionSchema: JSONSchemaType<IDecisionData>;
|
|
1727
1718
|
|
|
1728
1719
|
declare const entrepreneurSchema: JSONSchemaType<ExternalEntrepreneurData>;
|
|
1729
1720
|
|
|
@@ -1737,12 +1728,12 @@ declare const CooperativeSchema: JSONSchemaType<CooperativeData>;
|
|
|
1737
1728
|
|
|
1738
1729
|
declare const VarsSchema: JSONSchemaType<IVars>;
|
|
1739
1730
|
|
|
1740
|
-
declare const MeetSchema: JSONSchemaType<
|
|
1731
|
+
declare const MeetSchema: JSONSchemaType<IMeetExtended>;
|
|
1741
1732
|
declare const MeetPointSchema: JSONSchemaType<Interfaces.Meet.IMeetPoint>;
|
|
1742
1733
|
declare const QuestionSchema: JSONSchemaType<Interfaces.Meet.IQuestion>;
|
|
1743
|
-
declare const QuestionExtendedSchema: JSONSchemaType<
|
|
1734
|
+
declare const QuestionExtendedSchema: JSONSchemaType<IQuestionExtended>;
|
|
1744
1735
|
|
|
1745
|
-
declare const CommonUserSchema: JSONSchemaType<
|
|
1736
|
+
declare const CommonUserSchema: JSONSchemaType<ICommonUser>;
|
|
1746
1737
|
|
|
1747
1738
|
interface IAgendaMeet {
|
|
1748
1739
|
type: 'regular' | 'extra';
|
|
@@ -1758,7 +1749,7 @@ interface IAgendaQuestion {
|
|
|
1758
1749
|
declare const AgendaMeetSchema: JSONSchemaType<IAgendaMeet>;
|
|
1759
1750
|
declare const AgendaQuestionSchema: JSONSchemaType<IAgendaQuestion>;
|
|
1760
1751
|
|
|
1761
|
-
declare const udataSchema: JSONSchemaType<
|
|
1752
|
+
declare const udataSchema: JSONSchemaType<IUdata>;
|
|
1762
1753
|
|
|
1763
1754
|
/** Публичная позиция расхода — то, что едет в meta документа on-chain. */
|
|
1764
1755
|
interface IExpenseItem {
|
|
@@ -1895,7 +1886,7 @@ interface IUserAt {
|
|
|
1895
1886
|
interface IUdataFilter {
|
|
1896
1887
|
coopname: string;
|
|
1897
1888
|
username: string;
|
|
1898
|
-
key:
|
|
1889
|
+
key: UdataKey;
|
|
1899
1890
|
block_num?: number;
|
|
1900
1891
|
}
|
|
1901
1892
|
/** Отбор способа оплаты: поля записи плюс граница по блоку. */
|
|
@@ -2083,11 +2074,11 @@ declare abstract class DocFactory<T extends IGenerate> {
|
|
|
2083
2074
|
getCooperative(username: string, block_num?: number): Promise<CooperativeData>;
|
|
2084
2075
|
getProject(id: string, block_num?: number): Promise<InternalProjectData>;
|
|
2085
2076
|
getVars(coopname: string, block_num?: number): Promise<IVars>;
|
|
2086
|
-
getGeneralMeetingDecision(meet: Interfaces.Meet.IMeet, created_at: string, timezone: string): Promise<
|
|
2087
|
-
getDecision(coop: CooperativeData, coopname: string, decision_id: number, created_at: string, timezone: string): Promise<
|
|
2088
|
-
getApprovedDecision(coop: CooperativeData, coopname: string, decision_id: number): Promise<
|
|
2089
|
-
getMeet(coopname: string, meet_hash: string, block_num?: number): Promise<
|
|
2090
|
-
getMeetQuestions(coopname: string, meet_id: number, block_num?: number): Promise<
|
|
2077
|
+
getGeneralMeetingDecision(meet: Interfaces.Meet.IMeet, created_at: string, timezone: string): Promise<IDecisionData>;
|
|
2078
|
+
getDecision(coop: CooperativeData, coopname: string, decision_id: number, created_at: string, timezone: string): Promise<IDecisionData>;
|
|
2079
|
+
getApprovedDecision(coop: CooperativeData, coopname: string, decision_id: number): Promise<IDecisionData>;
|
|
2080
|
+
getMeet(coopname: string, meet_hash: string, block_num?: number): Promise<IMeetExtended>;
|
|
2081
|
+
getMeetQuestions(coopname: string, meet_id: number, block_num?: number): Promise<IQuestionExtended[]>;
|
|
2091
2082
|
/**
|
|
2092
2083
|
* Определяет как пользователь проголосовал по конкретному вопросу
|
|
2093
2084
|
* @param question Вопрос голосования
|
|
@@ -2099,7 +2090,7 @@ declare abstract class DocFactory<T extends IGenerate> {
|
|
|
2099
2090
|
generatePDF(data: externalDataTypes | string, context: string, vars: ICombinedData, translation: ITranslations, meta: IMetaDocument, skip_save?: boolean, skip_pdf?: boolean): Promise<IGeneratedDocument>;
|
|
2100
2091
|
getFullName(data: externalDataTypes | string): string;
|
|
2101
2092
|
getFullParticipantName(data: externalDataTypes): string;
|
|
2102
|
-
getFirstLastMiddleName(data: externalDataTypes):
|
|
2093
|
+
getFirstLastMiddleName(data: externalDataTypes): IFirstLastMiddleName;
|
|
2103
2094
|
extractOrganizationName(input: ExternalOrganizationData): string;
|
|
2104
2095
|
extractPersonalAbbreviatedName(input: ExternalIndividualData | ExternalEntrepreneurData): string;
|
|
2105
2096
|
parseDateForAgreements(created_at: string, timezone: string): {
|
|
@@ -2108,7 +2099,7 @@ declare abstract class DocFactory<T extends IGenerate> {
|
|
|
2108
2099
|
year: string;
|
|
2109
2100
|
};
|
|
2110
2101
|
constructUHDContractNumber(contributor_hash: string): string;
|
|
2111
|
-
getCommonUser(input: InternalGetUserResult):
|
|
2102
|
+
getCommonUser(input: InternalGetUserResult): ICommonUser;
|
|
2112
2103
|
getShortHash(hash: string, length?: number): string;
|
|
2113
2104
|
saveDraft(document: IGeneratedDocument): Promise<void>;
|
|
2114
2105
|
getMeta<T extends IMetaDocumentPartial>(input: T): Promise<IMetaDocument>;
|
|
@@ -2283,4 +2274,4 @@ declare class Generator implements IGenerator {
|
|
|
2283
2274
|
}
|
|
2284
2275
|
|
|
2285
2276
|
export { AgendaMeetSchema, AgendaQuestionSchema, AnnualGeneralMeetingAgenda, AnnualGeneralMeetingDecision, AnnualGeneralMeetingNotification, AnnualGeneralMeetingSovietDecision, AnnualGeneralMeetingVotingBallot, BankAccountSchema, BillingConversionStatement, BlagorostAgreement, BlagorostOffer, BlagorostProgramTemplate, BranchEstablishmentPetition, BranchEstablishmentSovietDecision, BranchFinancialAidProtocol, BranchFinancialAidStatement, BranchMeetingBallot, BranchMeetingDecision, BranchMeetingProposal, BranchTrustedLiabilityAgreement, BranchTrustedPowerOfAttorney, BranchTrustedStatement, BranchTrusteeLiabilityAgreement, BranchTrusteePowerOfAttorney, CapitalizationMoneyInvestStatement, CapitalizationPropertyInvestAct, CapitalizationPropertyInvestDecision, CapitalizationPropertyInvestStatement, CapitalizationToMainWalletConvertStatement, ChainRpcDataSource, CommonUserSchema, ComponentGenerationContract, ConvertToAxonStatement, CoopenomicsAgreement, CooperativeSchema, DEFAULT_TEMPLATE_VERSION, version as DOCS_FACTORY_VERSION, DecisionOfParticipantApplication, DecisionOfParticipantExit, DocumentNotApprovedError, EducationConvertStatement, EducationGuaranteeDecision, EducationGuaranteeStatement, EducationParentOffer, EducationParticipationContract, EducationProgramTemplate, EducationRidAct, EducationRidDecision, EducationRidStatement, EducationRidStorageAct, EducationShareWithdrawStatement, EducationTeacherOffer, ExpenseDecision, ExpenseItemSchema, ExpenseProposalDecision, ExpenseProposalDecisionBodySchema, ExpenseProposalHeaderSchema, ExpenseProposalStatement, ExpenseRenderItemSchema, ExpenseStatement, FACTORY_STORAGE_DDL, FIRST_BUILDER_VERSION, FreeDecision, GenerationContract, GenerationConvertStatement, GenerationMoneyInvestStatement, GenerationMoneyReturnUnusedStatement, GenerationPropertyInvestAct, GenerationPropertyInvestDecision, GenerationPropertyInvestStatement, Generator, GeneratorOffer, GeneratorProgramTemplate, GetLoanDecision, GetLoanStatement, InitProjectDecision, InitProjectStatement, MarketplaceAplReception, MarketplaceConvertStatement, MarketplaceOffer, MarketplaceProgramTemplate, MarketplaceReturnCancelDecision, MarketplaceReturnCancelStatement, MarketplaceReturnStatement, MarketplaceShareReturnAct, MarketplaceShareReturnDecision, MarketplaceShareReturnStatement, MarketplaceTransportNote, MarketplaceWriteoffProtocol, MarketplaceWriteoffServiceMemo, MarketplaceWriteoffStatement, MeetPointSchema, MeetSchema, MemoryFactoryStorage, ParticipantApplication, ParticipantExitApplication, PostgresFactoryStorage, PrivacyPolicy, ProgramAgreementsAnnulmentStatement, ProjectFreeDecision, ProjectGenerationContract, QuestionExtendedSchema, QuestionSchema, RECORD_COLLECTIONS, Registry, RegulationElectronicSignaturet as RegulationElectronicSignature, ResultContributionAct, ResultContributionDecision, ResultContributionStatement, ReturnByMoney, ReturnByMoneyDecision, SelectBranchStatement, SosediAgreement, StorageAgreement, TemplateVersions, UnknownBuilderVersionError, UnknownDocumentFactoryError, UserAgreement, VarsSchema, WalletAgreement, X_BUILDER_KEY, decisionSchema, documentMetaKey, entrepreneurSchema, formatCreatedAt, getTemplateVersion, individualSchema, isBuilderVersion, isIsoCreatedAt, isLegacyCreatedAt, latestMinorOf, matchesWhere, nowCreatedAt, organizationSchema, parseBuilderVersion, parseCreatedAt, paymentMethodSchema, splitCreatedAt, templateBuilderMajor, udataSchema };
|
|
2286
|
-
export type { BuilderVersion, Currency, DocDataRecord, DocumentPage, DocumentWhere, FieldCondition, IActionQuery, IBCState, IBankAccount, IBuilderVersionParts, IChainDataSource, ICombinedData, CooperativeData as ICooperativeData, IDocumentFilter, ExternalEntrepreneurData as IEntrepreneurData, IExpenseItem, IExpenseProposalDecisionBody, IExpenseProposalHeader, IExpenseRenderItem, ExternalProjectData as IExternalProjectData, IFactoryStorage, IFilterActions, IFilterDeltas,
|
|
2277
|
+
export type { BuilderVersion, Currency, DocDataRecord, DocumentPage, DocumentWhere, FieldCondition, IActionQuery, IBCState, IBankAccount, IBuilderVersionParts, IChainDataSource, ICombinedData, CooperativeData as ICooperativeData, IDocumentFilter, ExternalEntrepreneurData as IEntrepreneurData, IExpenseItem, IExpenseProposalDecisionBody, IExpenseProposalHeader, IExpenseRenderItem, ExternalProjectData as IExternalProjectData, IFactoryStorage, IFilterActions, IFilterDeltas, IGenerateAgreement, IGenerateBlank, IGenerateJoinCoop, IGenerateJoinCoopDecision, IGeneratedBlank, IGeneratedDocument, IGenerator, ExternalIndividualData as IIndividualData, IMetaDocumentPartial, ExternalOrganizationData as IOrganizationData, IPaymentData, ISearchResult, ITableQuery, ITemplate, ITranslations, ExternalUdata as IUdata, LangType, NestedRecord, Numbers, RecordCollection, StoredDocument, StoredRecord, Where, dataTypes, externalDataTypes, externalDataTypesArrays, internalFilterTypes };
|
package/dist/index.mjs
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { createHash } from 'node:crypto';
|
|
2
2
|
import moment from 'moment-timezone';
|
|
3
|
-
import { RegistratorContract, SovietContract, DraftContract
|
|
3
|
+
import { RegistratorContract, SovietContract, DraftContract } from 'cooptypes';
|
|
4
4
|
import Ajv from 'ajv';
|
|
5
5
|
import addFormats from 'ajv-formats';
|
|
6
6
|
import localize_ru from 'ajv-i18n/localize/ru';
|
|
7
7
|
import { Buffer as Buffer$1 } from 'node:buffer';
|
|
8
|
-
import { Registry as Registry$1 } from '@coopenomics/docs-templates';
|
|
8
|
+
import { Registry as Registry$1, UdataKey } from '@coopenomics/docs-templates';
|
|
9
9
|
import fs from 'node:fs';
|
|
10
10
|
import os from 'node:os';
|
|
11
11
|
import path from 'node:path';
|
|
@@ -5031,7 +5031,7 @@ function latestMinorOf(versions, major) {
|
|
|
5031
5031
|
|
|
5032
5032
|
const name = "@coopenomics/docs-factory";
|
|
5033
5033
|
const type = "module";
|
|
5034
|
-
const version = "1.
|
|
5034
|
+
const version = "1.3.0";
|
|
5035
5035
|
const description = "Фабрика документов цифрового кооператива: сборка документов по шаблонам, сборщики всех видов документов, версии сборщиков";
|
|
5036
5036
|
const author = "Alex Ant <chairman.voskhod@gmail.com>";
|
|
5037
5037
|
const license = "MIT";
|
|
@@ -7465,8 +7465,8 @@ const Factory$19 = defineBuilder()({
|
|
|
7465
7465
|
vars: () => f.getVars(data.coopname, data.block_num),
|
|
7466
7466
|
coop: () => f.getCooperative(data.coopname, data.block_num),
|
|
7467
7467
|
userData: () => f.getUser(data.username, data.block_num),
|
|
7468
|
-
blagorostAgreementUdata: udata(
|
|
7469
|
-
blagorostAgreementCreatedAtUdata: udata(
|
|
7468
|
+
blagorostAgreementUdata: udata(UdataKey.BLAGOROST_AGREEMENT_NUMBER),
|
|
7469
|
+
blagorostAgreementCreatedAtUdata: udata(UdataKey.BLAGOROST_AGREEMENT_CREATED_AT),
|
|
7470
7470
|
docData: () => f.loadDocData(data)
|
|
7471
7471
|
};
|
|
7472
7472
|
},
|
|
@@ -7505,7 +7505,7 @@ const Factory$18 = defineBuilder()({
|
|
|
7505
7505
|
coop: () => f.getCooperative(data.coopname, data.block_num),
|
|
7506
7506
|
vars: () => f.getVars(data.coopname, data.block_num),
|
|
7507
7507
|
userData: () => f.getUser(data.username, data.block_num),
|
|
7508
|
-
contributorContractUdata: () => f.getUdata({ coopname: data.coopname, username: data.username, key:
|
|
7508
|
+
contributorContractUdata: () => f.getUdata({ coopname: data.coopname, username: data.username, key: UdataKey.BLAGOROST_CONTRIBUTOR_CONTRACT_NUMBER, block_num: data.block_num })
|
|
7509
7509
|
}),
|
|
7510
7510
|
assemble: ({ data, meta, reads: { coop, vars, userData, contributorContractUdata } }) => {
|
|
7511
7511
|
if (!vars.generation_contract_template?.protocol_number || !vars.generation_contract_template?.protocol_day_month_year)
|
|
@@ -7540,10 +7540,10 @@ const Factory$17 = defineBuilder()({
|
|
|
7540
7540
|
coop: () => f.getCooperative(data.coopname, data.block_num),
|
|
7541
7541
|
vars: () => f.getVars(data.coopname, data.block_num),
|
|
7542
7542
|
userData: () => f.getUser(data.username, data.block_num),
|
|
7543
|
-
generatorAgreementUdata: udata(
|
|
7544
|
-
generatorAgreementCreatedAtUdata: udata(
|
|
7545
|
-
contributorContractUdata: udata(
|
|
7546
|
-
contributorContractCreatedAtUdata: udata(
|
|
7543
|
+
generatorAgreementUdata: udata(UdataKey.GENERATOR_AGREEMENT_NUMBER),
|
|
7544
|
+
generatorAgreementCreatedAtUdata: udata(UdataKey.GENERATOR_AGREEMENT_CREATED_AT),
|
|
7545
|
+
contributorContractUdata: udata(UdataKey.BLAGOROST_CONTRIBUTOR_CONTRACT_NUMBER),
|
|
7546
|
+
contributorContractCreatedAtUdata: udata(UdataKey.BLAGOROST_CONTRIBUTOR_CONTRACT_CREATED_AT)
|
|
7547
7547
|
};
|
|
7548
7548
|
},
|
|
7549
7549
|
assemble: ({ data, meta, reads: { coop, vars, userData, generatorAgreementUdata, generatorAgreementCreatedAtUdata, contributorContractUdata, contributorContractCreatedAtUdata } }) => {
|
|
@@ -7587,10 +7587,10 @@ const Factory$16 = defineBuilder()({
|
|
|
7587
7587
|
coop: () => f.getCooperative(data.coopname, data.block_num),
|
|
7588
7588
|
vars: () => f.getVars(data.coopname, data.block_num),
|
|
7589
7589
|
userData: () => f.getUser(data.username, data.block_num),
|
|
7590
|
-
generatorAgreementUdata: udata(
|
|
7591
|
-
generatorAgreementCreatedAtUdata: udata(
|
|
7592
|
-
contributorContractUdata: udata(
|
|
7593
|
-
contributorContractCreatedAtUdata: udata(
|
|
7590
|
+
generatorAgreementUdata: udata(UdataKey.GENERATOR_AGREEMENT_NUMBER),
|
|
7591
|
+
generatorAgreementCreatedAtUdata: udata(UdataKey.GENERATOR_AGREEMENT_CREATED_AT),
|
|
7592
|
+
contributorContractUdata: udata(UdataKey.BLAGOROST_CONTRIBUTOR_CONTRACT_NUMBER),
|
|
7593
|
+
contributorContractCreatedAtUdata: udata(UdataKey.BLAGOROST_CONTRIBUTOR_CONTRACT_CREATED_AT)
|
|
7594
7594
|
};
|
|
7595
7595
|
},
|
|
7596
7596
|
assemble: ({ data, meta, reads: { coop, vars, userData, generatorAgreementUdata, generatorAgreementCreatedAtUdata, contributorContractUdata, contributorContractCreatedAtUdata } }) => {
|
|
@@ -7636,11 +7636,11 @@ const Factory$15 = defineBuilder()({
|
|
|
7636
7636
|
coop: () => f.getCooperative(data.coopname, data.block_num),
|
|
7637
7637
|
vars: () => f.getVars(data.coopname, data.block_num),
|
|
7638
7638
|
userData: () => f.getUser(data.username, data.block_num),
|
|
7639
|
-
storageAgreementUdata: udata(
|
|
7640
|
-
storageAgreementCreatedAtUdata: udata(
|
|
7641
|
-
contributorContractUdata: udata(
|
|
7642
|
-
generatorAgreementUdata: udata(
|
|
7643
|
-
generatorAgreementCreatedAtUdata: udata(
|
|
7639
|
+
storageAgreementUdata: udata(UdataKey.BLAGOROST_STORAGE_AGREEMENT_NUMBER),
|
|
7640
|
+
storageAgreementCreatedAtUdata: udata(UdataKey.BLAGOROST_STORAGE_AGREEMENT_CREATED_AT),
|
|
7641
|
+
contributorContractUdata: udata(UdataKey.BLAGOROST_CONTRIBUTOR_CONTRACT_NUMBER),
|
|
7642
|
+
generatorAgreementUdata: udata(UdataKey.GENERATOR_AGREEMENT_NUMBER),
|
|
7643
|
+
generatorAgreementCreatedAtUdata: udata(UdataKey.GENERATOR_AGREEMENT_CREATED_AT)
|
|
7644
7644
|
};
|
|
7645
7645
|
},
|
|
7646
7646
|
assemble: ({ data, meta, reads: { coop, vars, userData, storageAgreementUdata, storageAgreementCreatedAtUdata, contributorContractUdata, generatorAgreementUdata, generatorAgreementCreatedAtUdata } }) => {
|
|
@@ -7689,9 +7689,9 @@ const Factory$14 = defineBuilder()({
|
|
|
7689
7689
|
coop: () => f.getCooperative(data.coopname, data.block_num),
|
|
7690
7690
|
vars: () => f.getVars(data.coopname, data.block_num),
|
|
7691
7691
|
userData: () => f.getUser(data.username, data.block_num),
|
|
7692
|
-
blagorostAgreementUdata: udata(
|
|
7693
|
-
contributorContractUdata: udata(
|
|
7694
|
-
contributorContractCreatedAtUdata: udata(
|
|
7692
|
+
blagorostAgreementUdata: udata(UdataKey.BLAGOROST_AGREEMENT_NUMBER),
|
|
7693
|
+
contributorContractUdata: udata(UdataKey.BLAGOROST_CONTRIBUTOR_CONTRACT_NUMBER),
|
|
7694
|
+
contributorContractCreatedAtUdata: udata(UdataKey.BLAGOROST_CONTRIBUTOR_CONTRACT_CREATED_AT)
|
|
7695
7695
|
};
|
|
7696
7696
|
},
|
|
7697
7697
|
assemble: ({ data, meta, reads: { coop, vars, userData, blagorostAgreementUdata, contributorContractUdata, contributorContractCreatedAtUdata } }) => {
|
|
@@ -7890,10 +7890,10 @@ const Factory$Z = defineBuilder()({
|
|
|
7890
7890
|
coop: () => f.getCooperative(data.coopname, data.block_num),
|
|
7891
7891
|
vars: () => f.getVars(data.coopname, data.block_num),
|
|
7892
7892
|
userData: () => f.getUser(data.username, data.block_num),
|
|
7893
|
-
contributorContractUdata: udata(
|
|
7894
|
-
contributorContractCreatedAtUdata: udata(
|
|
7895
|
-
blagorostAgreementUdata: udata(
|
|
7896
|
-
blagorostAgreementCreatedAtUdata: udata(
|
|
7893
|
+
contributorContractUdata: udata(UdataKey.BLAGOROST_CONTRIBUTOR_CONTRACT_NUMBER),
|
|
7894
|
+
contributorContractCreatedAtUdata: udata(UdataKey.BLAGOROST_CONTRIBUTOR_CONTRACT_CREATED_AT),
|
|
7895
|
+
blagorostAgreementUdata: udata(UdataKey.BLAGOROST_AGREEMENT_NUMBER),
|
|
7896
|
+
blagorostAgreementCreatedAtUdata: udata(UdataKey.BLAGOROST_AGREEMENT_CREATED_AT)
|
|
7897
7897
|
};
|
|
7898
7898
|
},
|
|
7899
7899
|
assemble: ({ data, meta, reads: { coop, vars, userData, contributorContractUdata, contributorContractCreatedAtUdata, blagorostAgreementUdata, blagorostAgreementCreatedAtUdata } }) => {
|
|
@@ -7937,10 +7937,10 @@ const Factory$Y = defineBuilder()({
|
|
|
7937
7937
|
return {
|
|
7938
7938
|
vars: () => f.getVars(data.coopname, data.block_num),
|
|
7939
7939
|
userData: () => f.getUser(data.username, data.block_num),
|
|
7940
|
-
contributorContractUdata: udata(
|
|
7941
|
-
contributorContractCreatedAtUdata: udata(
|
|
7942
|
-
generatorAgreementUdata: udata(
|
|
7943
|
-
generatorAgreementCreatedAtUdata: udata(
|
|
7940
|
+
contributorContractUdata: udata(UdataKey.BLAGOROST_CONTRIBUTOR_CONTRACT_NUMBER),
|
|
7941
|
+
contributorContractCreatedAtUdata: udata(UdataKey.BLAGOROST_CONTRIBUTOR_CONTRACT_CREATED_AT),
|
|
7942
|
+
generatorAgreementUdata: udata(UdataKey.GENERATOR_AGREEMENT_NUMBER),
|
|
7943
|
+
generatorAgreementCreatedAtUdata: udata(UdataKey.GENERATOR_AGREEMENT_CREATED_AT)
|
|
7944
7944
|
};
|
|
7945
7945
|
},
|
|
7946
7946
|
assemble: ({ data, meta, reads: { vars, userData, contributorContractUdata, contributorContractCreatedAtUdata, generatorAgreementUdata, generatorAgreementCreatedAtUdata } }) => {
|
|
@@ -8002,10 +8002,10 @@ const Factory$W = defineBuilder()({
|
|
|
8002
8002
|
coop: () => f.getCooperative(data.coopname, data.block_num),
|
|
8003
8003
|
vars: () => f.getVars(data.coopname, data.block_num),
|
|
8004
8004
|
userData: () => f.getUser(data.username, data.block_num),
|
|
8005
|
-
contributorContractUdata: udata(
|
|
8006
|
-
contributorContractCreatedAtUdata: udata(
|
|
8007
|
-
blagorostAgreementUdata: udata(
|
|
8008
|
-
blagorostAgreementCreatedAtUdata: udata(
|
|
8005
|
+
contributorContractUdata: udata(UdataKey.BLAGOROST_CONTRIBUTOR_CONTRACT_NUMBER),
|
|
8006
|
+
contributorContractCreatedAtUdata: udata(UdataKey.BLAGOROST_CONTRIBUTOR_CONTRACT_CREATED_AT),
|
|
8007
|
+
blagorostAgreementUdata: udata(UdataKey.BLAGOROST_AGREEMENT_NUMBER),
|
|
8008
|
+
blagorostAgreementCreatedAtUdata: udata(UdataKey.BLAGOROST_AGREEMENT_CREATED_AT)
|
|
8009
8009
|
};
|
|
8010
8010
|
},
|
|
8011
8011
|
assemble: ({ data, meta, reads: { coop, vars, userData, contributorContractUdata, contributorContractCreatedAtUdata, blagorostAgreementUdata, blagorostAgreementCreatedAtUdata } }) => {
|
|
@@ -8051,10 +8051,10 @@ const Factory$V = defineBuilder()({
|
|
|
8051
8051
|
coop: () => f.getCooperative(data.coopname, data.block_num),
|
|
8052
8052
|
vars: () => f.getVars(data.coopname, data.block_num),
|
|
8053
8053
|
userData: () => f.getUser(data.username, data.block_num),
|
|
8054
|
-
contributorContractUdata: udata(
|
|
8055
|
-
contributorContractCreatedAtUdata: udata(
|
|
8056
|
-
blagorostAgreementUdata: udata(
|
|
8057
|
-
blagorostAgreementCreatedAtUdata: udata(
|
|
8054
|
+
contributorContractUdata: udata(UdataKey.BLAGOROST_CONTRIBUTOR_CONTRACT_NUMBER),
|
|
8055
|
+
contributorContractCreatedAtUdata: udata(UdataKey.BLAGOROST_CONTRIBUTOR_CONTRACT_CREATED_AT),
|
|
8056
|
+
blagorostAgreementUdata: udata(UdataKey.BLAGOROST_AGREEMENT_NUMBER),
|
|
8057
|
+
blagorostAgreementCreatedAtUdata: udata(UdataKey.BLAGOROST_AGREEMENT_CREATED_AT)
|
|
8058
8058
|
};
|
|
8059
8059
|
},
|
|
8060
8060
|
derive: ({ data, f, meta, reads: { coop } }) => ({
|
|
@@ -8104,10 +8104,10 @@ const Factory$U = defineBuilder()({
|
|
|
8104
8104
|
coop: () => f.getCooperative(data.coopname, data.block_num),
|
|
8105
8105
|
vars: () => f.getVars(data.coopname, data.block_num),
|
|
8106
8106
|
userData: () => f.getUser(data.username, data.block_num),
|
|
8107
|
-
contributorContractUdata: udata(
|
|
8108
|
-
contributorContractCreatedAtUdata: udata(
|
|
8109
|
-
blagorostAgreementUdata: udata(
|
|
8110
|
-
blagorostAgreementCreatedAtUdata: udata(
|
|
8107
|
+
contributorContractUdata: udata(UdataKey.BLAGOROST_CONTRIBUTOR_CONTRACT_NUMBER),
|
|
8108
|
+
contributorContractCreatedAtUdata: udata(UdataKey.BLAGOROST_CONTRIBUTOR_CONTRACT_CREATED_AT),
|
|
8109
|
+
blagorostAgreementUdata: udata(UdataKey.BLAGOROST_AGREEMENT_NUMBER),
|
|
8110
|
+
blagorostAgreementCreatedAtUdata: udata(UdataKey.BLAGOROST_AGREEMENT_CREATED_AT)
|
|
8111
8111
|
};
|
|
8112
8112
|
},
|
|
8113
8113
|
derive: ({ data, f, reads: { coop } }) => ({
|
|
@@ -8260,8 +8260,8 @@ const Factory$L = defineBuilder()({
|
|
|
8260
8260
|
coop: () => f.getCooperative(data.coopname, data.block_num),
|
|
8261
8261
|
vars: () => f.getVars(data.coopname, data.block_num),
|
|
8262
8262
|
userData: () => f.getUser(data.username, data.block_num),
|
|
8263
|
-
contributorContractUdata: udata(
|
|
8264
|
-
contributorContractCreatedAtUdata: udata(
|
|
8263
|
+
contributorContractUdata: udata(UdataKey.BLAGOROST_CONTRIBUTOR_CONTRACT_NUMBER),
|
|
8264
|
+
contributorContractCreatedAtUdata: udata(UdataKey.BLAGOROST_CONTRIBUTOR_CONTRACT_CREATED_AT)
|
|
8265
8265
|
};
|
|
8266
8266
|
},
|
|
8267
8267
|
assemble: ({ data, meta, reads: { coop, vars, userData, contributorContractUdata, contributorContractCreatedAtUdata } }) => {
|
|
@@ -8802,8 +8802,8 @@ const Factory$t = defineBuilder()({
|
|
|
8802
8802
|
vars: () => f.getVars(data.coopname, data.block_num),
|
|
8803
8803
|
coop: () => f.getCooperative(data.coopname, data.block_num),
|
|
8804
8804
|
user: () => f.getUser(data.username, data.block_num),
|
|
8805
|
-
generatorAgreementUdata: udata(
|
|
8806
|
-
generatorAgreementCreatedAtUdata: udata(
|
|
8805
|
+
generatorAgreementUdata: udata(UdataKey.GENERATOR_AGREEMENT_NUMBER),
|
|
8806
|
+
generatorAgreementCreatedAtUdata: udata(UdataKey.GENERATOR_AGREEMENT_CREATED_AT),
|
|
8807
8807
|
docData: () => f.loadDocData(data)
|
|
8808
8808
|
};
|
|
8809
8809
|
},
|
|
@@ -8882,8 +8882,8 @@ const Factory$q = defineBuilder()({
|
|
|
8882
8882
|
coop: () => f.getCooperative(data.coopname, data.block_num),
|
|
8883
8883
|
vars: () => f.getVars(data.coopname, data.block_num),
|
|
8884
8884
|
userData: () => f.getUser(data.username, data.block_num),
|
|
8885
|
-
numberUdata: () => data.marketplace_agreement_number ? Promise.resolve(null) : udata(
|
|
8886
|
-
createdAtUdata: () => data.marketplace_agreement_created_at ? Promise.resolve(null) : udata(
|
|
8885
|
+
numberUdata: () => data.marketplace_agreement_number ? Promise.resolve(null) : udata(UdataKey.MARKETPLACE_AGREEMENT_NUMBER),
|
|
8886
|
+
createdAtUdata: () => data.marketplace_agreement_created_at ? Promise.resolve(null) : udata(UdataKey.MARKETPLACE_AGREEMENT_CREATED_AT)
|
|
8887
8887
|
};
|
|
8888
8888
|
},
|
|
8889
8889
|
assemble: ({ data, meta, reads: { coop, vars, userData, numberUdata, createdAtUdata } }) => {
|
|
@@ -9258,8 +9258,8 @@ const Factory$f = defineBuilder()({
|
|
|
9258
9258
|
coop: () => f.getCooperative(data.coopname, data.block_num),
|
|
9259
9259
|
vars: () => f.getVars(data.coopname, data.block_num),
|
|
9260
9260
|
userData: () => f.getUser(data.username, data.block_num),
|
|
9261
|
-
numberRow: () => data.agreement_number ? Promise.resolve(null) : udata(
|
|
9262
|
-
createdAtRow: () => data.agreement_created_at ? Promise.resolve(null) : udata(
|
|
9261
|
+
numberRow: () => data.agreement_number ? Promise.resolve(null) : udata(UdataKey.EDUCATION_PARENT_AGREEMENT_NUMBER),
|
|
9262
|
+
createdAtRow: () => data.agreement_created_at ? Promise.resolve(null) : udata(UdataKey.EDUCATION_PARENT_AGREEMENT_CREATED_AT)
|
|
9263
9263
|
};
|
|
9264
9264
|
},
|
|
9265
9265
|
assemble: ({ data, meta, reads: { coop, vars, userData, numberRow, createdAtRow } }) => {
|
|
@@ -9294,8 +9294,8 @@ const Factory$e = defineBuilder()({
|
|
|
9294
9294
|
coop: () => f.getCooperative(data.coopname, data.block_num),
|
|
9295
9295
|
vars: () => f.getVars(data.coopname, data.block_num),
|
|
9296
9296
|
userData: () => f.getUser(data.username, data.block_num),
|
|
9297
|
-
numberRow: () => data.agreement_number ? Promise.resolve(null) : udata(
|
|
9298
|
-
createdAtRow: () => data.agreement_created_at ? Promise.resolve(null) : udata(
|
|
9297
|
+
numberRow: () => data.agreement_number ? Promise.resolve(null) : udata(UdataKey.EDUCATION_TEACHER_AGREEMENT_NUMBER),
|
|
9298
|
+
createdAtRow: () => data.agreement_created_at ? Promise.resolve(null) : udata(UdataKey.EDUCATION_TEACHER_AGREEMENT_CREATED_AT)
|
|
9299
9299
|
};
|
|
9300
9300
|
},
|
|
9301
9301
|
assemble: ({ data, meta, reads: { coop, vars, userData, numberRow, createdAtRow } }) => {
|
|
@@ -9330,8 +9330,8 @@ const Factory$d = defineBuilder()({
|
|
|
9330
9330
|
coop: () => f.getCooperative(data.coopname, data.block_num),
|
|
9331
9331
|
vars: () => f.getVars(data.coopname, data.block_num),
|
|
9332
9332
|
userData: () => f.getUser(data.username, data.block_num),
|
|
9333
|
-
numberRow: () => data.contract_number ? Promise.resolve(null) : udata(
|
|
9334
|
-
createdAtRow: () => data.contract_created_at ? Promise.resolve(null) : udata(
|
|
9333
|
+
numberRow: () => data.contract_number ? Promise.resolve(null) : udata(UdataKey.EDUCATION_CONTRACT_NUMBER),
|
|
9334
|
+
createdAtRow: () => data.contract_created_at ? Promise.resolve(null) : udata(UdataKey.EDUCATION_CONTRACT_CREATED_AT)
|
|
9335
9335
|
};
|
|
9336
9336
|
},
|
|
9337
9337
|
assemble: ({ data, meta, reads: { coop, vars, userData, numberRow, createdAtRow } }) => {
|
|
@@ -9359,8 +9359,8 @@ const _3006_EducationParticipationContract = {
|
|
|
9359
9359
|
|
|
9360
9360
|
async function getEducationContractRef(sources, data) {
|
|
9361
9361
|
const [number, createdAt] = await Promise.all([
|
|
9362
|
-
sources.udata({ coopname: data.coopname, username: data.username, key:
|
|
9363
|
-
sources.udata({ coopname: data.coopname, username: data.username, key:
|
|
9362
|
+
sources.udata({ coopname: data.coopname, username: data.username, key: UdataKey.EDUCATION_CONTRACT_NUMBER, block_num: data.block_num }),
|
|
9363
|
+
sources.udata({ coopname: data.coopname, username: data.username, key: UdataKey.EDUCATION_CONTRACT_CREATED_AT, block_num: data.block_num })
|
|
9364
9364
|
]);
|
|
9365
9365
|
if (!number?.value || !createdAt?.value)
|
|
9366
9366
|
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");
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@coopenomics/docs-factory",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "1.
|
|
4
|
+
"version": "1.3.0",
|
|
5
5
|
"description": "Фабрика документов цифрового кооператива: сборка документов по шаблонам, сборщики всех видов документов, версии сборщиков",
|
|
6
6
|
"author": "Alex Ant <chairman.voskhod@gmail.com>",
|
|
7
7
|
"license": "MIT",
|
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
"pdf-lib": "^1.17.1",
|
|
51
51
|
"pg": "^8.16.3",
|
|
52
52
|
"uuid": "^11.0.0",
|
|
53
|
-
"@coopenomics/docs-templates": "1.
|
|
53
|
+
"@coopenomics/docs-templates": "1.3.0"
|
|
54
54
|
},
|
|
55
55
|
"devDependencies": {
|
|
56
56
|
"@antfu/eslint-config": "^2.17.0",
|