@coopenomics/factory 2026.3.19-2 → 2026.4.26-4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs CHANGED
@@ -4156,7 +4156,7 @@ class PDFService {
4156
4156
 
4157
4157
  const name = "@coopenomics/factory";
4158
4158
  const type = "module";
4159
- const version = "2026.3.19-2";
4159
+ const version = "2026.4.26-4";
4160
4160
  const description = "Фабрика юридических документов кооператива";
4161
4161
  const author = "Alex Ant <chairman.voskhod@gmail.com>";
4162
4162
  const license = "MIT";
@@ -4206,7 +4206,7 @@ const dependencies = {
4206
4206
  "ajv-formats": "^3.0.1",
4207
4207
  "ajv-i18n": "^4.2.0",
4208
4208
  axios: "^1.13.5",
4209
- cooptypes: "2026.3.19-2",
4209
+ cooptypes: "2026.4.26-4",
4210
4210
  dotenv: "^16.4.5",
4211
4211
  "eosjs-ecc": "^4.0.7",
4212
4212
  handlebars: "^4.7.8",
@@ -4238,7 +4238,7 @@ const devDependencies = {
4238
4238
  vite: "^5.2.11",
4239
4239
  vitest: "^1.6.0"
4240
4240
  };
4241
- const gitHead = "01de5de342aebb38ed82a33e1abbf797c89ec4ec";
4241
+ const gitHead = "9a983e67fefa1c70125a37ddbdc0ffe9d9ea60ba";
4242
4242
  const packageJson = {
4243
4243
  name: name,
4244
4244
  type: type,
@@ -4469,7 +4469,7 @@ class DocFactory {
4469
4469
  })
4470
4470
  })))?.results[0]?.data;
4471
4471
  if (!decision) {
4472
- throw new Error(`\u041F\u0440\u0438\u043D\u044F\u0442\u043E\u0435 \u0440\u0435\u0448\u0435\u043D\u0438\u0435 \u043D\u0435 \u043D\u0430\u0439\u0434\u0435\u043D\u043E \u0432 \u0434\u0435\u043B\u044C\u0442\u0430\u0445: decision_id=${decision_id}, coopname=${coopname}`);
4472
+ throw new Error(`\u041F\u0440\u0438\u043D\u044F\u0442\u043E\u0435 \u0440\u0435\u0448\u0435\u043D\u0438\u0435 \u043D\u0435 \u043D\u0430\u0439\u0434\u0435\u043D\u043E \u0432 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044F\u0445 authorize: decision_id=${decision_id}, coopname=${coopname}`);
4473
4473
  }
4474
4474
  const authorizationDoc = decision.document;
4475
4475
  if (!authorizationDoc) {
@@ -6253,7 +6253,7 @@ let Factory$q = class Factory extends DocFactory {
6253
6253
  meta,
6254
6254
  vars,
6255
6255
  common_user,
6256
- amount: data.amount
6256
+ amount: super.formatAsset(data.amount)
6257
6257
  };
6258
6258
  await this.validate(combinedData, template.model);
6259
6259
  const translation = template.translations[meta.lang];
@@ -6831,7 +6831,12 @@ let Factory$9 = class Factory extends DocFactory {
6831
6831
  const meta = await super.getMeta({ title: template.title, ...data });
6832
6832
  const coop = await super.getCooperative(data.coopname, data.block_num);
6833
6833
  const vars = await super.getVars(data.coopname, data.block_num);
6834
- const decision = await super.getApprovedDecision(coop, data.coopname, data.decision_id);
6834
+ let decision;
6835
+ try {
6836
+ decision = await super.getDecision(coop, data.coopname, data.decision_id, meta.created_at);
6837
+ } catch {
6838
+ decision = await super.getApprovedDecision(coop, data.coopname, data.decision_id);
6839
+ }
6835
6840
  const meet = await super.getMeet(data.coopname, data.meet_hash, data.block_num);
6836
6841
  const questions = await super.getMeetQuestions(data.coopname, Number(meet.id), data.block_num);
6837
6842
  const combinedData = {
package/dist/index.mjs CHANGED
@@ -4143,7 +4143,7 @@ class PDFService {
4143
4143
 
4144
4144
  const name = "@coopenomics/factory";
4145
4145
  const type = "module";
4146
- const version = "2026.3.19-2";
4146
+ const version = "2026.4.26-4";
4147
4147
  const description = "Фабрика юридических документов кооператива";
4148
4148
  const author = "Alex Ant <chairman.voskhod@gmail.com>";
4149
4149
  const license = "MIT";
@@ -4193,7 +4193,7 @@ const dependencies = {
4193
4193
  "ajv-formats": "^3.0.1",
4194
4194
  "ajv-i18n": "^4.2.0",
4195
4195
  axios: "^1.13.5",
4196
- cooptypes: "2026.3.19-2",
4196
+ cooptypes: "2026.4.26-4",
4197
4197
  dotenv: "^16.4.5",
4198
4198
  "eosjs-ecc": "^4.0.7",
4199
4199
  handlebars: "^4.7.8",
@@ -4225,7 +4225,7 @@ const devDependencies = {
4225
4225
  vite: "^5.2.11",
4226
4226
  vitest: "^1.6.0"
4227
4227
  };
4228
- const gitHead = "01de5de342aebb38ed82a33e1abbf797c89ec4ec";
4228
+ const gitHead = "9a983e67fefa1c70125a37ddbdc0ffe9d9ea60ba";
4229
4229
  const packageJson = {
4230
4230
  name: name,
4231
4231
  type: type,
@@ -4456,7 +4456,7 @@ class DocFactory {
4456
4456
  })
4457
4457
  })))?.results[0]?.data;
4458
4458
  if (!decision) {
4459
- throw new Error(`\u041F\u0440\u0438\u043D\u044F\u0442\u043E\u0435 \u0440\u0435\u0448\u0435\u043D\u0438\u0435 \u043D\u0435 \u043D\u0430\u0439\u0434\u0435\u043D\u043E \u0432 \u0434\u0435\u043B\u044C\u0442\u0430\u0445: decision_id=${decision_id}, coopname=${coopname}`);
4459
+ throw new Error(`\u041F\u0440\u0438\u043D\u044F\u0442\u043E\u0435 \u0440\u0435\u0448\u0435\u043D\u0438\u0435 \u043D\u0435 \u043D\u0430\u0439\u0434\u0435\u043D\u043E \u0432 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044F\u0445 authorize: decision_id=${decision_id}, coopname=${coopname}`);
4460
4460
  }
4461
4461
  const authorizationDoc = decision.document;
4462
4462
  if (!authorizationDoc) {
@@ -6240,7 +6240,7 @@ let Factory$q = class Factory extends DocFactory {
6240
6240
  meta,
6241
6241
  vars,
6242
6242
  common_user,
6243
- amount: data.amount
6243
+ amount: super.formatAsset(data.amount)
6244
6244
  };
6245
6245
  await this.validate(combinedData, template.model);
6246
6246
  const translation = template.translations[meta.lang];
@@ -6818,7 +6818,12 @@ let Factory$9 = class Factory extends DocFactory {
6818
6818
  const meta = await super.getMeta({ title: template.title, ...data });
6819
6819
  const coop = await super.getCooperative(data.coopname, data.block_num);
6820
6820
  const vars = await super.getVars(data.coopname, data.block_num);
6821
- const decision = await super.getApprovedDecision(coop, data.coopname, data.decision_id);
6821
+ let decision;
6822
+ try {
6823
+ decision = await super.getDecision(coop, data.coopname, data.decision_id, meta.created_at);
6824
+ } catch {
6825
+ decision = await super.getApprovedDecision(coop, data.coopname, data.decision_id);
6826
+ }
6822
6827
  const meet = await super.getMeet(data.coopname, data.meet_hash, data.block_num);
6823
6828
  const questions = await super.getMeetQuestions(data.coopname, Number(meet.id), data.block_num);
6824
6829
  const combinedData = {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@coopenomics/factory",
3
3
  "type": "module",
4
- "version": "2026.3.19-2",
4
+ "version": "2026.4.26-4",
5
5
  "description": "Фабрика юридических документов кооператива",
6
6
  "author": "Alex Ant <chairman.voskhod@gmail.com>",
7
7
  "license": "MIT",
@@ -50,7 +50,7 @@
50
50
  "ajv-formats": "^3.0.1",
51
51
  "ajv-i18n": "^4.2.0",
52
52
  "axios": "^1.13.5",
53
- "cooptypes": "2026.3.19-2",
53
+ "cooptypes": "2026.4.26-4",
54
54
  "dotenv": "^16.4.5",
55
55
  "eosjs-ecc": "^4.0.7",
56
56
  "handlebars": "^4.7.8",
@@ -82,5 +82,5 @@
82
82
  "vite": "^5.2.11",
83
83
  "vitest": "^1.6.0"
84
84
  },
85
- "gitHead": "01de5de342aebb38ed82a33e1abbf797c89ec4ec"
85
+ "gitHead": "9a983e67fefa1c70125a37ddbdc0ffe9d9ea60ba"
86
86
  }