@coopenomics/factory 2.2.5 → 2.2.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -2,124 +2,184 @@ import { JSONSchemaType } from 'ajv';
2
2
  import { Cooperative } from 'cooptypes';
3
3
  import { InsertOneResult, Filter, UpdateResult, Document, MongoClient, Db, Collection } from 'mongodb';
4
4
 
5
- declare const registry_id$9 = 1;
6
- type Action$9 = Cooperative.Registry.WalletAgreement.Action;
7
- type Model$9 = Cooperative.Registry.WalletAgreement.Model;
5
+ declare const registry_id$f = 1;
6
+ type Action$f = Cooperative.Registry.WalletAgreement.Action;
7
+ type Model$f = Cooperative.Registry.WalletAgreement.Model;
8
+ declare const Schema$f: JSONSchemaType<Model$f>;
9
+ declare const Template$f: ITemplate<Model$f>;
10
+
11
+ declare namespace WalletAgreement {
12
+ export { type Action$f as Action, type Model$f as Model, Schema$f as Schema, Template$f as Template, registry_id$f as registry_id };
13
+ }
14
+
15
+ declare const registry_id$e = 2;
16
+ type Action$e = Cooperative.Registry.RegulationElectronicSignature.Action;
17
+ type Model$e = Cooperative.Registry.RegulationElectronicSignature.Model;
18
+ declare const Schema$e: JSONSchemaType<Model$e>;
19
+ declare const Template$e: ITemplate<Model$e>;
20
+
21
+ declare namespace RegulationElectronicSignaturet {
22
+ export { type Action$e as Action, type Model$e as Model, Schema$e as Schema, Template$e as Template, registry_id$e as registry_id };
23
+ }
24
+
25
+ declare const registry_id$d = 3;
26
+ type Action$d = Cooperative.Registry.PrivacyPolicy.Action;
27
+ type Model$d = Cooperative.Registry.PrivacyPolicy.Model;
28
+ declare const Schema$d: JSONSchemaType<Model$d>;
29
+ declare const Template$d: ITemplate<Model$d>;
30
+
31
+ declare namespace PrivacyPolicy {
32
+ export { type Action$d as Action, type Model$d as Model, Schema$d as Schema, Template$d as Template, registry_id$d as registry_id };
33
+ }
34
+
35
+ declare const registry_id$c = 4;
36
+ type Action$c = Cooperative.Registry.UserAgreement.Action;
37
+ type Model$c = Cooperative.Registry.UserAgreement.Model;
38
+ declare const Schema$c: JSONSchemaType<Model$c>;
39
+ declare const Template$c: ITemplate<Model$c>;
40
+
41
+ declare namespace UserAgreement {
42
+ export { type Action$c as Action, type Model$c as Model, Schema$c as Schema, Template$c as Template, registry_id$c as registry_id };
43
+ }
44
+
45
+ declare const registry_id$b = 50;
46
+ type Action$b = Cooperative.Registry.CoopenomicsAgreement.Action;
47
+ type Model$b = Cooperative.Registry.CoopenomicsAgreement.Model;
48
+ declare const Schema$b: JSONSchemaType<Model$b>;
49
+ declare const Template$b: ITemplate<Model$b>;
50
+
51
+ declare namespace CoopenomicsAgreement {
52
+ export { type Action$b as Action, type Model$b as Model, Schema$b as Schema, Template$b as Template, registry_id$b as registry_id };
53
+ }
54
+
55
+ declare const registry_id$a = 100;
56
+ /**
57
+ * Интерфейс генерации заявления на вступление в кооператив
58
+ */
59
+ type Action$a = Cooperative.Registry.ParticipantApplication.Action;
60
+ type Model$a = Cooperative.Registry.ParticipantApplication.Model;
61
+ declare const Schema$a: JSONSchemaType<Model$a>;
62
+ declare const Template$a: ITemplate<Model$a>;
63
+
64
+ declare namespace ParticipantApplication {
65
+ export { type Action$a as Action, type Model$a as Model, Schema$a as Schema, Template$a as Template, registry_id$a as registry_id };
66
+ }
67
+
68
+ declare const registry_id$9 = 501;
69
+ /**
70
+ * Интерфейс генерации решения совета
71
+ */
72
+ type Action$9 = Cooperative.Registry.DecisionOfParticipantApplication.Action;
73
+ type Model$9 = Cooperative.Registry.DecisionOfParticipantApplication.Model;
8
74
  declare const Schema$9: JSONSchemaType<Model$9>;
9
75
  declare const Template$9: ITemplate<Model$9>;
10
76
 
11
- declare namespace WalletAgreement {
77
+ declare namespace DecisionOfParticipantApplication {
12
78
  export { type Action$9 as Action, type Model$9 as Model, Schema$9 as Schema, Template$9 as Template, registry_id$9 as registry_id };
13
79
  }
14
80
 
15
- declare const registry_id$8 = 2;
16
- type Action$8 = Cooperative.Registry.RegulationElectronicSignature.Action;
17
- type Model$8 = Cooperative.Registry.RegulationElectronicSignature.Model;
81
+ declare const registry_id$8 = 101;
82
+ /**
83
+ * Интерфейс генерации заявления на вступление в кооператив
84
+ */
85
+ type Action$8 = Cooperative.Registry.SelectBranchStatement.Action;
86
+ type Model$8 = Cooperative.Registry.SelectBranchStatement.Model;
18
87
  declare const Schema$8: JSONSchemaType<Model$8>;
19
88
  declare const Template$8: ITemplate<Model$8>;
20
89
 
21
- declare namespace RegulationElectronicSignaturet {
90
+ declare namespace SelectBranchStatement {
22
91
  export { type Action$8 as Action, type Model$8 as Model, Schema$8 as Schema, Template$8 as Template, registry_id$8 as registry_id };
23
92
  }
24
93
 
25
- declare const registry_id$7 = 3;
26
- type Action$7 = Cooperative.Registry.PrivacyPolicy.Action;
27
- type Model$7 = Cooperative.Registry.PrivacyPolicy.Model;
94
+ declare const registry_id$7 = 599;
95
+ /**
96
+ * Интерфейс генерации решения совета
97
+ */
98
+ type Action$7 = Cooperative.Registry.ProjectFreeDecision.Action;
99
+ type Model$7 = Cooperative.Registry.ProjectFreeDecision.Model;
28
100
  declare const Schema$7: JSONSchemaType<Model$7>;
29
101
  declare const Template$7: ITemplate<Model$7>;
30
102
 
31
- declare namespace PrivacyPolicy {
103
+ declare namespace ProjectFreeDecision {
32
104
  export { type Action$7 as Action, type Model$7 as Model, Schema$7 as Schema, Template$7 as Template, registry_id$7 as registry_id };
33
105
  }
34
106
 
35
- declare const registry_id$6 = 4;
36
- type Action$6 = Cooperative.Registry.UserAgreement.Action;
37
- type Model$6 = Cooperative.Registry.UserAgreement.Model;
107
+ declare const registry_id$6 = 600;
108
+ /**
109
+ * Интерфейс генерации решения совета
110
+ */
111
+ type Action$6 = Cooperative.Registry.FreeDecision.Action;
112
+ type Model$6 = Cooperative.Registry.FreeDecision.Model;
38
113
  declare const Schema$6: JSONSchemaType<Model$6>;
39
114
  declare const Template$6: ITemplate<Model$6>;
40
115
 
41
- declare namespace UserAgreement {
116
+ declare namespace FreeDecision {
42
117
  export { type Action$6 as Action, type Model$6 as Model, Schema$6 as Schema, Template$6 as Template, registry_id$6 as registry_id };
43
118
  }
44
119
 
45
- declare const registry_id$5 = 50;
46
- type Action$5 = Cooperative.Registry.CoopenomicsAgreement.Action;
47
- type Model$5 = Cooperative.Registry.CoopenomicsAgreement.Model;
120
+ declare const registry_id$5 = 700;
121
+ type Action$5 = Cooperative.Registry.AssetContributionStatement.Action;
122
+ type Model$5 = Cooperative.Registry.AssetContributionStatement.Model;
48
123
  declare const Schema$5: JSONSchemaType<Model$5>;
49
124
  declare const Template$5: ITemplate<Model$5>;
50
125
 
51
- declare namespace CoopenomicsAgreement {
126
+ declare namespace AssetContributionStatement {
52
127
  export { type Action$5 as Action, type Model$5 as Model, Schema$5 as Schema, Template$5 as Template, registry_id$5 as registry_id };
53
128
  }
54
129
 
55
- declare const registry_id$4 = 100;
56
- /**
57
- * Интерфейс генерации заявления на вступление в кооператив
58
- */
59
- type Action$4 = Cooperative.Registry.ParticipantApplication.Action;
60
- type Model$4 = Cooperative.Registry.ParticipantApplication.Model;
130
+ declare const registry_id$4 = 800;
131
+ type Action$4 = Cooperative.Registry.ReturnByAssetStatement.Action;
132
+ type Model$4 = Cooperative.Registry.ReturnByAssetStatement.Model;
61
133
  declare const Schema$4: JSONSchemaType<Model$4>;
62
134
  declare const Template$4: ITemplate<Model$4>;
63
135
 
64
- declare namespace ParticipantApplication {
136
+ declare namespace ReturnByAssetStatement {
65
137
  export { type Action$4 as Action, type Model$4 as Model, Schema$4 as Schema, Template$4 as Template, registry_id$4 as registry_id };
66
138
  }
67
139
 
68
- declare const registry_id$3 = 501;
69
- /**
70
- * Интерфейс генерации решения совета
71
- */
72
- type Action$3 = Cooperative.Registry.DecisionOfParticipantApplication.Action;
73
- type Model$3 = Cooperative.Registry.DecisionOfParticipantApplication.Model;
140
+ declare const registry_id$3 = 701;
141
+ type Action$3 = Cooperative.Registry.AssetContributionDecision.Action;
142
+ type Model$3 = Cooperative.Registry.AssetContributionDecision.Model;
74
143
  declare const Schema$3: JSONSchemaType<Model$3>;
75
144
  declare const Template$3: ITemplate<Model$3>;
76
145
 
77
- declare namespace DecisionOfParticipantApplication {
146
+ declare namespace AssetContributionDecision {
78
147
  export { type Action$3 as Action, type Model$3 as Model, Schema$3 as Schema, Template$3 as Template, registry_id$3 as registry_id };
79
148
  }
80
149
 
81
- declare const registry_id$2 = 101;
82
- /**
83
- * Интерфейс генерации заявления на вступление в кооператив
84
- */
85
- type Action$2 = Cooperative.Registry.SelectBranchStatement.Action;
86
- type Model$2 = Cooperative.Registry.SelectBranchStatement.Model;
150
+ declare const registry_id$2 = 801;
151
+ type Action$2 = Cooperative.Registry.ReturnByAssetDecision.Action;
152
+ type Model$2 = Cooperative.Registry.ReturnByAssetDecision.Model;
87
153
  declare const Schema$2: JSONSchemaType<Model$2>;
88
154
  declare const Template$2: ITemplate<Model$2>;
89
155
 
90
- declare namespace SelectBranchStatement {
156
+ declare namespace ReturnByAssetDecision {
91
157
  export { type Action$2 as Action, type Model$2 as Model, Schema$2 as Schema, Template$2 as Template, registry_id$2 as registry_id };
92
158
  }
93
159
 
94
- declare const registry_id$1 = 599;
95
- /**
96
- * Интерфейс генерации решения совета
97
- */
98
- type Action$1 = Cooperative.Registry.ProjectFreeDecision.Action;
99
- type Model$1 = Cooperative.Registry.ProjectFreeDecision.Model;
160
+ declare const registry_id$1 = 702;
161
+ type Action$1 = Cooperative.Registry.AssetContributionAct.Action;
162
+ type Model$1 = Cooperative.Registry.AssetContributionAct.Model;
100
163
  declare const Schema$1: JSONSchemaType<Model$1>;
101
164
  declare const Template$1: ITemplate<Model$1>;
102
165
 
103
- declare namespace ProjectFreeDecision {
166
+ declare namespace AssetContributionAct {
104
167
  export { type Action$1 as Action, type Model$1 as Model, Schema$1 as Schema, Template$1 as Template, registry_id$1 as registry_id };
105
168
  }
106
169
 
107
- declare const registry_id: 600;
108
- /**
109
- * Интерфейс генерации решения совета
110
- */
111
- type Action = Cooperative.Registry.FreeDecision.Action;
112
- type Model = Cooperative.Registry.FreeDecision.Model;
170
+ declare const registry_id: 802;
171
+ type Action = Cooperative.Registry.ReturnByAssetAct.Action;
172
+ type Model = Cooperative.Registry.ReturnByAssetAct.Model;
113
173
  declare const Schema: JSONSchemaType<Model>;
114
174
  declare const Template: ITemplate<Model>;
115
175
 
116
- type FreeDecision_Action = Action;
117
- type FreeDecision_Model = Model;
118
- declare const FreeDecision_Schema: typeof Schema;
119
- declare const FreeDecision_Template: typeof Template;
120
- declare const FreeDecision_registry_id: typeof registry_id;
121
- declare namespace FreeDecision {
122
- export { type FreeDecision_Action as Action, type FreeDecision_Model as Model, FreeDecision_Schema as Schema, FreeDecision_Template as Template, FreeDecision_registry_id as registry_id };
176
+ type ReturnByAssetAct_Action = Action;
177
+ type ReturnByAssetAct_Model = Model;
178
+ declare const ReturnByAssetAct_Schema: typeof Schema;
179
+ declare const ReturnByAssetAct_Template: typeof Template;
180
+ declare const ReturnByAssetAct_registry_id: typeof registry_id;
181
+ declare namespace ReturnByAssetAct {
182
+ export { type ReturnByAssetAct_Action as Action, type ReturnByAssetAct_Model as Model, ReturnByAssetAct_Schema as Schema, ReturnByAssetAct_Template as Template, ReturnByAssetAct_registry_id as registry_id };
123
183
  }
124
184
 
125
185
  declare const Registry: {
@@ -133,6 +193,12 @@ declare const Registry: {
133
193
  501: typeof DecisionOfParticipantApplication;
134
194
  599: typeof ProjectFreeDecision;
135
195
  600: typeof FreeDecision;
196
+ 700: typeof AssetContributionStatement;
197
+ 701: typeof AssetContributionDecision;
198
+ 702: typeof AssetContributionAct;
199
+ 800: typeof ReturnByAssetStatement;
200
+ 801: typeof ReturnByAssetDecision;
201
+ 802: typeof ReturnByAssetAct;
136
202
  };
137
203
 
138
204
  interface ValidateResult {
@@ -350,10 +416,15 @@ declare abstract class DocFactory<T extends IGenerate> {
350
416
  getCooperative(username: string, block_num?: number): Promise<CooperativeData>;
351
417
  getProject(id: string, block_num?: number): Promise<InternalProjectData>;
352
418
  getVars(coopname: string, block_num?: number): Promise<IVars>;
419
+ getRequest(_request_id: number, _block_num?: number): Promise<Cooperative.Model.ICommonRequest>;
420
+ getProgram(_program_id: number): Promise<Cooperative.Model.ICommonProgram>;
353
421
  getDecision(coop: CooperativeData, coopname: string, decision_id: number, created_at: string): Promise<Cooperative.Document.IDecisionData>;
354
422
  getTemplate<T>(scope: string, registry_id: number, block_num?: number): Promise<ITemplate<T>>;
355
423
  generatePDF(data: externalDataTypes | string, context: string, vars: ICombinedData, translation: ITranslations, meta: IMetaDocument, skip_save?: boolean): Promise<IGeneratedDocument>;
356
424
  getFullName(data: externalDataTypes | string): string;
425
+ getFullParticipantName(data: externalDataTypes): string;
426
+ getFirstLastMiddleName(data: externalDataTypes): Cooperative.Model.IFirstLastMiddleName;
427
+ getCommonUser(data: externalDataTypes): Cooperative.Model.ICommonUser;
357
428
  saveDraft(document: IGeneratedDocument): Promise<void>;
358
429
  getMeta<T extends IMetaDocumentPartial>({ title, username, coopname, registry_id, links, lang, generator, version, // TODO перенести в .env
359
430
  created_at, block_num, timezone, // TODO перенести в .env
@@ -397,4 +468,4 @@ declare class Generator implements IGenerator {
397
468
  constructCooperative(username: string, block_num?: number): Promise<CooperativeData | null>;
398
469
  }
399
470
 
400
- export { BankAccountSchema, CoopenomicsAgreement, CooperativeSchema, type Currency, DecisionOfParticipantApplication, FreeDecision, Generator, type IBCState, type IBankAccount, type ICombinedData, type CooperativeData as ICooperativeData, type ExternalEntrepreneurData as IEntrepreneurData, type ExternalProjectData as IExternalProjectData, type IFilterActions, type IFilterDeltas, type IFilterDocuments, type IGenerate, type IGeneratedDocument, type IGenerationOptions, type IGenerator, type ExternalIndividualData as IIndividualData, type IMetaDocument, type IMetaDocumentPartial, type ExternalOrganizationData as IOrganizationData, type IPaymentData, type ITemplate, type ITranslations, type LangType, type NestedRecord, type Numbers, ParticipantApplication, PrivacyPolicy, ProjectFreeDecision, Registry, RegulationElectronicSignaturet as RegulationElectronicSignature, SelectBranchStatement, UserAgreement, VarsSchema, WalletAgreement, type dataTypes, decisionSchema, entrepreneurSchema, type externalDataTypes, type externalDataTypesArrays, individualSchema, type internalFilterTypes, organizationSchema, paymentMethodSchema };
471
+ export { AssetContributionAct, AssetContributionDecision, AssetContributionStatement, BankAccountSchema, CoopenomicsAgreement, CooperativeSchema, type Currency, DecisionOfParticipantApplication, FreeDecision, Generator, type IBCState, type IBankAccount, type ICombinedData, type CooperativeData as ICooperativeData, type ExternalEntrepreneurData as IEntrepreneurData, type ExternalProjectData as IExternalProjectData, type IFilterActions, type IFilterDeltas, type IFilterDocuments, type IGenerate, type IGeneratedDocument, type IGenerationOptions, type IGenerator, type ExternalIndividualData as IIndividualData, type IMetaDocument, type IMetaDocumentPartial, type ExternalOrganizationData as IOrganizationData, type IPaymentData, type ITemplate, type ITranslations, type LangType, type NestedRecord, type Numbers, ParticipantApplication, PrivacyPolicy, ProjectFreeDecision, Registry, RegulationElectronicSignaturet as RegulationElectronicSignature, ReturnByAssetAct, ReturnByAssetDecision, ReturnByAssetStatement, SelectBranchStatement, UserAgreement, VarsSchema, WalletAgreement, type dataTypes, decisionSchema, entrepreneurSchema, type externalDataTypes, type externalDataTypesArrays, individualSchema, type internalFilterTypes, organizationSchema, paymentMethodSchema };