@coopenomics/factory 2.2.6 → 2.2.8

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,144 +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$b = 1;
6
- type Action$b = Cooperative.Registry.WalletAgreement.Action;
7
- type Model$b = 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;
8
48
  declare const Schema$b: JSONSchemaType<Model$b>;
9
49
  declare const Template$b: ITemplate<Model$b>;
10
50
 
11
- declare namespace WalletAgreement {
51
+ declare namespace CoopenomicsAgreement {
12
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 };
13
53
  }
14
54
 
15
- declare const registry_id$a = 2;
16
- type Action$a = Cooperative.Registry.RegulationElectronicSignature.Action;
17
- type Model$a = Cooperative.Registry.RegulationElectronicSignature.Model;
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;
18
61
  declare const Schema$a: JSONSchemaType<Model$a>;
19
62
  declare const Template$a: ITemplate<Model$a>;
20
63
 
21
- declare namespace RegulationElectronicSignaturet {
64
+ declare namespace ParticipantApplication {
22
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 };
23
66
  }
24
67
 
25
- declare const registry_id$9 = 3;
26
- type Action$9 = Cooperative.Registry.PrivacyPolicy.Action;
27
- type Model$9 = Cooperative.Registry.PrivacyPolicy.Model;
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;
28
74
  declare const Schema$9: JSONSchemaType<Model$9>;
29
75
  declare const Template$9: ITemplate<Model$9>;
30
76
 
31
- declare namespace PrivacyPolicy {
77
+ declare namespace DecisionOfParticipantApplication {
32
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 };
33
79
  }
34
80
 
35
- declare const registry_id$8 = 4;
36
- type Action$8 = Cooperative.Registry.UserAgreement.Action;
37
- type Model$8 = Cooperative.Registry.UserAgreement.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;
38
87
  declare const Schema$8: JSONSchemaType<Model$8>;
39
88
  declare const Template$8: ITemplate<Model$8>;
40
89
 
41
- declare namespace UserAgreement {
90
+ declare namespace SelectBranchStatement {
42
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 };
43
92
  }
44
93
 
45
- declare const registry_id$7 = 50;
46
- type Action$7 = Cooperative.Registry.CoopenomicsAgreement.Action;
47
- type Model$7 = Cooperative.Registry.CoopenomicsAgreement.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;
48
100
  declare const Schema$7: JSONSchemaType<Model$7>;
49
101
  declare const Template$7: ITemplate<Model$7>;
50
102
 
51
- declare namespace CoopenomicsAgreement {
103
+ declare namespace ProjectFreeDecision {
52
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 };
53
105
  }
54
106
 
55
- declare const registry_id$6 = 100;
107
+ declare const registry_id$6 = 600;
56
108
  /**
57
- * Интерфейс генерации заявления на вступление в кооператив
109
+ * Интерфейс генерации решения совета
58
110
  */
59
- type Action$6 = Cooperative.Registry.ParticipantApplication.Action;
60
- type Model$6 = Cooperative.Registry.ParticipantApplication.Model;
111
+ type Action$6 = Cooperative.Registry.FreeDecision.Action;
112
+ type Model$6 = Cooperative.Registry.FreeDecision.Model;
61
113
  declare const Schema$6: JSONSchemaType<Model$6>;
62
114
  declare const Template$6: ITemplate<Model$6>;
63
115
 
64
- declare namespace ParticipantApplication {
116
+ declare namespace FreeDecision {
65
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 };
66
118
  }
67
119
 
68
- declare const registry_id$5 = 501;
69
- /**
70
- * Интерфейс генерации решения совета
71
- */
72
- type Action$5 = Cooperative.Registry.DecisionOfParticipantApplication.Action;
73
- type Model$5 = Cooperative.Registry.DecisionOfParticipantApplication.Model;
120
+ declare const registry_id$5 = 700;
121
+ type Action$5 = Cooperative.Registry.AssetContributionStatement.Action;
122
+ type Model$5 = Cooperative.Registry.AssetContributionStatement.Model;
74
123
  declare const Schema$5: JSONSchemaType<Model$5>;
75
124
  declare const Template$5: ITemplate<Model$5>;
76
125
 
77
- declare namespace DecisionOfParticipantApplication {
126
+ declare namespace AssetContributionStatement {
78
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 };
79
128
  }
80
129
 
81
- declare const registry_id$4 = 101;
82
- /**
83
- * Интерфейс генерации заявления на вступление в кооператив
84
- */
85
- type Action$4 = Cooperative.Registry.SelectBranchStatement.Action;
86
- type Model$4 = Cooperative.Registry.SelectBranchStatement.Model;
130
+ declare const registry_id$4 = 800;
131
+ type Action$4 = Cooperative.Registry.ReturnByAssetStatement.Action;
132
+ type Model$4 = Cooperative.Registry.ReturnByAssetStatement.Model;
87
133
  declare const Schema$4: JSONSchemaType<Model$4>;
88
134
  declare const Template$4: ITemplate<Model$4>;
89
135
 
90
- declare namespace SelectBranchStatement {
136
+ declare namespace ReturnByAssetStatement {
91
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 };
92
138
  }
93
139
 
94
- declare const registry_id$3 = 599;
95
- /**
96
- * Интерфейс генерации решения совета
97
- */
98
- type Action$3 = Cooperative.Registry.ProjectFreeDecision.Action;
99
- type Model$3 = Cooperative.Registry.ProjectFreeDecision.Model;
140
+ declare const registry_id$3 = 701;
141
+ type Action$3 = Cooperative.Registry.AssetContributionDecision.Action;
142
+ type Model$3 = Cooperative.Registry.AssetContributionDecision.Model;
100
143
  declare const Schema$3: JSONSchemaType<Model$3>;
101
144
  declare const Template$3: ITemplate<Model$3>;
102
145
 
103
- declare namespace ProjectFreeDecision {
146
+ declare namespace AssetContributionDecision {
104
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 };
105
148
  }
106
149
 
107
- declare const registry_id$2 = 600;
108
- /**
109
- * Интерфейс генерации решения совета
110
- */
111
- type Action$2 = Cooperative.Registry.FreeDecision.Action;
112
- type Model$2 = Cooperative.Registry.FreeDecision.Model;
150
+ declare const registry_id$2 = 801;
151
+ type Action$2 = Cooperative.Registry.ReturnByAssetDecision.Action;
152
+ type Model$2 = Cooperative.Registry.ReturnByAssetDecision.Model;
113
153
  declare const Schema$2: JSONSchemaType<Model$2>;
114
154
  declare const Template$2: ITemplate<Model$2>;
115
155
 
116
- declare namespace FreeDecision {
156
+ declare namespace ReturnByAssetDecision {
117
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 };
118
158
  }
119
159
 
120
- declare const registry_id$1 = 700;
121
- type Action$1 = Cooperative.Registry.AssetContributionStatement.Action;
122
- type Model$1 = Cooperative.Registry.AssetContributionStatement.Model;
160
+ declare const registry_id$1 = 702;
161
+ type Action$1 = Cooperative.Registry.AssetContributionAct.Action;
162
+ type Model$1 = Cooperative.Registry.AssetContributionAct.Model;
123
163
  declare const Schema$1: JSONSchemaType<Model$1>;
124
164
  declare const Template$1: ITemplate<Model$1>;
125
165
 
126
- declare namespace AssetContributionStatement {
166
+ declare namespace AssetContributionAct {
127
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 };
128
168
  }
129
169
 
130
- declare const registry_id: 800;
131
- type Action = Cooperative.Registry.ReturnByAssetStatement.Action;
132
- type Model = Cooperative.Registry.ReturnByAssetStatement.Model;
170
+ declare const registry_id: 802;
171
+ type Action = Cooperative.Registry.ReturnByAssetAct.Action;
172
+ type Model = Cooperative.Registry.ReturnByAssetAct.Model;
133
173
  declare const Schema: JSONSchemaType<Model>;
134
174
  declare const Template: ITemplate<Model>;
135
175
 
136
- type ReturnByAssetStatement_Action = Action;
137
- type ReturnByAssetStatement_Model = Model;
138
- declare const ReturnByAssetStatement_Schema: typeof Schema;
139
- declare const ReturnByAssetStatement_Template: typeof Template;
140
- declare const ReturnByAssetStatement_registry_id: typeof registry_id;
141
- declare namespace ReturnByAssetStatement {
142
- export { type ReturnByAssetStatement_Action as Action, type ReturnByAssetStatement_Model as Model, ReturnByAssetStatement_Schema as Schema, ReturnByAssetStatement_Template as Template, ReturnByAssetStatement_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 };
143
183
  }
144
184
 
145
185
  declare const Registry: {
@@ -154,7 +194,11 @@ declare const Registry: {
154
194
  599: typeof ProjectFreeDecision;
155
195
  600: typeof FreeDecision;
156
196
  700: typeof AssetContributionStatement;
197
+ 701: typeof AssetContributionDecision;
198
+ 702: typeof AssetContributionAct;
157
199
  800: typeof ReturnByAssetStatement;
200
+ 801: typeof ReturnByAssetDecision;
201
+ 802: typeof ReturnByAssetAct;
158
202
  };
159
203
 
160
204
  interface ValidateResult {
@@ -372,11 +416,15 @@ declare abstract class DocFactory<T extends IGenerate> {
372
416
  getCooperative(username: string, block_num?: number): Promise<CooperativeData>;
373
417
  getProject(id: string, block_num?: number): Promise<InternalProjectData>;
374
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>;
375
421
  getDecision(coop: CooperativeData, coopname: string, decision_id: number, created_at: string): Promise<Cooperative.Document.IDecisionData>;
376
422
  getTemplate<T>(scope: string, registry_id: number, block_num?: number): Promise<ITemplate<T>>;
377
423
  generatePDF(data: externalDataTypes | string, context: string, vars: ICombinedData, translation: ITranslations, meta: IMetaDocument, skip_save?: boolean): Promise<IGeneratedDocument>;
378
424
  getFullName(data: externalDataTypes | string): string;
379
425
  getFullParticipantName(data: externalDataTypes): string;
426
+ getFirstLastMiddleName(data: externalDataTypes): Cooperative.Model.IFirstLastMiddleName;
427
+ getCommonUser(data: externalDataTypes): Cooperative.Model.ICommonUser;
380
428
  saveDraft(document: IGeneratedDocument): Promise<void>;
381
429
  getMeta<T extends IMetaDocumentPartial>({ title, username, coopname, registry_id, links, lang, generator, version, // TODO перенести в .env
382
430
  created_at, block_num, timezone, // TODO перенести в .env
@@ -420,4 +468,4 @@ declare class Generator implements IGenerator {
420
468
  constructCooperative(username: string, block_num?: number): Promise<CooperativeData | null>;
421
469
  }
422
470
 
423
- export { 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, ReturnByAssetStatement, 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 };